{"version":3,"file":"app-c842dd46.9729664bca28a8e6916d.bundle.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAuBA;AAAA;AArBA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAGA;AACA;AAEA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AAKA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAtKA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AAEA;AASA;AAAA;AAPA;AACA;AAAA;AAOA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAtBA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;ACXA;AACA;AACA;AACA;AAEA;AAgBA;AAAA;AAdA;AACA;AAAA;AAGA;AACA;AACA;AACA;AAGA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAIA;AACA;AACA;AACA;AAEA;AACA;AAGA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAjEA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AAwBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAjBA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAGA;AAAA;AAAA;AAAA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA1JA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;;;;ACpBA;AACA;AACA;AACA;AAEA;AAOA;AAAA;AAJA;AAKA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AApCA;;;;;;;;;;;;;;;;;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAuBA;AAAA;AArBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AAIA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AA3GA;;;;;;;;;;;;;;;;;;ACXA;AACA;AACA;AACA;AAEA;AAQA;AAAA;AANA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AACA;AACA;AA/BA;;;;;;;;;;;;;;;ACLA;AAEA;AAUA;AAAA;AARA;AACA;AAEA;AACA;AACA;AAIA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AAnCA;;;;;;;;;;;;;;;ACFA;AAEA;AAQA;AAAA;AANA;AACA;AAEA;AAIA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AAAA;AACA;AACA;AAtBA;;;;;;;;;;;;;;ACFA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAmCA;AAAA;AAjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAKA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AAEA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AAAA;AAAA;AACA;AAGA;AAEA;AACA;AAEA;AAEA;AACA;AACA;AACA;AAEA;AAEA;AAEA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAhgBA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AAkCA;AAAA;AAhCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAGA;AACA;AACA;AAGA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAxVA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAUA;AAAA;AACA;AAAA;AAQA;AAAA;AAjBA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAMA;AAAA;AAEA;AAAA;AAAA;AAAA;AAAA;AAEA;AA6FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA9GA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAyBA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAjMA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA;AAAA;AAAA;AAAA;AAAA;AAEA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;;;;AC3BA;AACA;AACA;AACA;AAEA;AAMA;AAAA;AAJA;AACA;AAIA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AACA;AAlCA;;;;;;;;;;;;;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AAEA;AAWA;AAAA;AATA;AACA;AACA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAvEA;;;;;;;;;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AAEA;AASA;AAAA;AAPA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AACA;AAnCA;;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACJA;AAGA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACVA;AAGA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACXA;;;;;;;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACPA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA","sources":["webpack://www.zeusteam.com/./src/members/leads/activity-dashboard.js","webpack://www.zeusteam.com/./src/members/leads/agent-lead-card-widgets.js","webpack://www.zeusteam.com/./src/members/leads/agent-lead-card.js","webpack://www.zeusteam.com/./src/members/leads/controls/agent-lead-list.js","webpack://www.zeusteam.com/./src/members/leads/dialogs/agent-lead-card-dialog.js","webpack://www.zeusteam.com/./src/members/leads/dialogs/edit-lead-dialog.js","webpack://www.zeusteam.com/./src/members/leads/dialogs/lead-card-dialog2.js","webpack://www.zeusteam.com/./src/members/leads/dialogs/prompt-for-disposition.js","webpack://www.zeusteam.com/./src/members/leads/dialogs/select-dialer-team-dialog.js","webpack://www.zeusteam.com/./src/members/leads/import.js","webpack://www.zeusteam.com/./src/members/leads/lead-card2.js","webpack://www.zeusteam.com/./src/members/leads/lead-list.js","webpack://www.zeusteam.com/./src/members/leads/lead-map.js","webpack://www.zeusteam.com/./src/members/leads/lead.js","webpack://www.zeusteam.com/./src/members/leads/tabs/tab-activity.js","webpack://www.zeusteam.com/./src/members/leads/tabs/tab-assignments.js","webpack://www.zeusteam.com/./src/members/leads/tabs/tab-details.js","webpack://www.zeusteam.com/./src/members/leads/tabs/tab-notes.js","webpack://www.zeusteam.com/./src/members/leads/tabs/tab-scripts.js","webpack://www.zeusteam.com/./src/members/leads/tracking-system.js","webpack://www.zeusteam.com/./src/members/leads/activity-dashboard.scss","webpack://www.zeusteam.com/./src/members/leads/dialogs/lead-card-dialog2.scss","webpack://www.zeusteam.com/./src/members/leads/lead-card.scss","webpack://www.zeusteam.com/./src/members/leads/lead-card2.scss","webpack://www.zeusteam.com/./src/members/leads/lead-list.scss","webpack://www.zeusteam.com/./src/members/leads/activity-dashboard.html","webpack://www.zeusteam.com/./src/members/leads/agent-lead-card-widgets.html","webpack://www.zeusteam.com/./src/members/leads/agent-lead-card.html","webpack://www.zeusteam.com/./src/members/leads/controls/agent-lead-list.html","webpack://www.zeusteam.com/./src/members/leads/dialogs/agent-lead-card-dialog.html","webpack://www.zeusteam.com/./src/members/leads/dialogs/edit-lead-dialog.html","webpack://www.zeusteam.com/./src/members/leads/dialogs/lead-card-dialog2.html","webpack://www.zeusteam.com/./src/members/leads/dialogs/prompt-for-disposition.html","webpack://www.zeusteam.com/./src/members/leads/dialogs/select-dialer-team-dialog.html","webpack://www.zeusteam.com/./src/members/leads/import.html","webpack://www.zeusteam.com/./src/members/leads/lead-card2.html","webpack://www.zeusteam.com/./src/members/leads/lead-list.html","webpack://www.zeusteam.com/./src/members/leads/lead-map.html","webpack://www.zeusteam.com/./src/members/leads/lead.html","webpack://www.zeusteam.com/./src/members/leads/tabs/tab-activity.html","webpack://www.zeusteam.com/./src/members/leads/tabs/tab-assignments.html","webpack://www.zeusteam.com/./src/members/leads/tabs/tab-details.html","webpack://www.zeusteam.com/./src/members/leads/tabs/tab-notes.html","webpack://www.zeusteam.com/./src/members/leads/tabs/tab-scripts.html","webpack://www.zeusteam.com/./src/members/leads/tracking-system.html"],"sourcesContent":["import { observable } from 'aurelia-framework';\r\nimport { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { Security } from 'common/security';\r\nimport { Leads } from 'services/leads';\r\nimport { Members } from 'services/members';\r\nimport { TIME_PERIOD } from 'common/constants';\r\nimport { WIDGET } from 'common/constants';\r\n\r\nexport class ActivityDashboard {\r\n static inject = [Element, EventAggregator, Security, Leads, Members];\r\n _element;\r\n _ea;\r\n _security;\r\n _leads;\r\n _members;\r\n\r\n kpiTimePeriods = TIME_PERIOD.common();\r\n kpiTimePeriod = TIME_PERIOD.default();\r\n @observable kpiCustomRange;\r\n\r\n kpiViews;\r\n kpiView;\r\n\r\n kpiGroupBys;\r\n kpiGroupBy;\r\n\r\n agentView = 'grid';\r\n filters = [{ value: '', keys: ['agent.fullName'] }];\r\n\r\n _handlers = [];\r\n\r\n constructor(element, ea, security, leads, members) {\r\n this._element = element;\r\n this._ea = ea;\r\n this._security = security;\r\n this._leads = leads;\r\n this._members = members;\r\n this.agent = this._security.agent;\r\n\r\n this.kpiTimePeriods = TIME_PERIOD.common();\r\n this.kpiTimePeriod = TIME_PERIOD.default();\r\n \r\n this.kpiViews = WIDGET.View.all(security, false, true);\r\n this.kpiView = WIDGET.View.default();\r\n\r\n this.kpiGroupBys = WIDGET.GroupBy.forAgents(security);\r\n this.kpiGroupBy = WIDGET.GroupBy.default();\r\n }\r\n\r\n attached() {\r\n this._isAttached = true;\r\n\r\n this.loadKpis();\r\n }\r\n\r\n detached() {\r\n this._handlers.forEach(h => h.dispose());\r\n this._handlers = [];\r\n }\r\n\r\n selectKpiView(view) {\r\n this.kpiView = view;\r\n this.loadKpis();\r\n }\r\n\r\n selectKpiGroupBy(groupBy) {\r\n this.kpiGroupBy = groupBy;\r\n this.loadKpis();\r\n }\r\n\r\n selectKpiTimePeriod(timePeriod) {\r\n this.kpiTimePeriod = timePeriod;\r\n if (this.kpiTimePeriod === 'custom') return;\r\n this._kpiStart = undefined;\r\n this._kpiEnd = undefined;\r\n this.loadKpis();\r\n }\r\n\r\n kpiCustomRangeChanged() {\r\n if (!this.kpiCustomRange || this.kpiCustomRange.length !== 2) return;\r\n this._kpiStart = this.kpiCustomRange[0].format('MM/DD/YYYY');\r\n this._kpiEnd = this.kpiCustomRange[1].format('MM/DD/YYYY');\r\n this.loadKpis(false);\r\n }\r\n\r\n async loadKpis() {\r\n try {\r\n this.loadingKpis = true;\r\n const kpiData = await this._leads.kpis(this.kpiTimePeriod, undefined, this._kpiStart, this._kpiEnd, 'lms', this.kpiView, this.kpiGroupBy);\r\n const kpiGroups = [];\r\n const groupCount = Math.ceil(kpiData.kpis.length / 4);\r\n for (let i = 0; i < groupCount; i++) kpiGroups.push({ expanded: i === 0, showExpander: i > 0, kpis: [] });\r\n this.drilldownAgents = [];\r\n var groupIndex = 0;\r\n kpiData.kpis.forEach(kpi => {\r\n kpi.canViewLeads = false;\r\n if (kpiGroups[groupIndex].kpis.length === 4) {\r\n groupIndex++;\r\n }\r\n kpiGroups[groupIndex].kpis.push(kpi);\r\n kpi.drilldown.forEach(dd => {\r\n if (this.drilldownAgents.findIndex(x => dd.agent.id === x.agent.id) >= 0) return;\r\n this.drilldownAgents.push({ id: dd.agent.id, agent: dd.agent, kpiGroups: [] });\r\n });\r\n });\r\n this.kpiGroups = kpiGroups;\r\n this.drilldownAgents.forEach(a => {\r\n // find the individual kpis for this agent\r\n for (let j = 0; j < kpiGroups.length; j++) {\r\n const ddKpiGroup = { expanded: kpiGroups[j].expanded, showExpander: kpiGroups[j].showExpander, kpis: [] };\r\n for (let i = 0; i < kpiGroups[j].kpis.length; i++) {\r\n let agentDrilldownKpi = kpiGroups[j].kpis[i].drilldown.find(x => x.agent.id === a.agent.id);\r\n if (!agentDrilldownKpi) {\r\n agentDrilldownKpi = JSON.parse(JSON.stringify(kpiGroups[j].kpis[i]));\r\n delete agentDrilldownKpi.drilldown;\r\n agentDrilldownKpi.increaseCountOverPreviousPeriod = 0;\r\n agentDrilldownKpi.increasePercentOverPreviousPeriod = 0;\r\n agentDrilldownKpi.leadIds = [];\r\n agentDrilldownKpi.previousPeriodValue = 0;\r\n agentDrilldownKpi.value = 0;\r\n }\r\n ddKpiGroup.kpis.push(agentDrilldownKpi);\r\n }\r\n a.kpiGroups.push(ddKpiGroup);\r\n }\r\n });\r\n this.progressPeriodName = kpiData.progressPeriodName;\r\n this.drilldownAgents.forEach(a => {\r\n a.kpi = {};\r\n a.kpi.dials = this._agentKpi(a.kpiGroups, 'total-dials');\r\n a.kpi.connects = this._agentKpi(a.kpiGroups, 'total-connects');\r\n a.kpi.appointmentsBooked = this._agentKpi(a.kpiGroups, 'appointments-booked');\r\n a.kpi.leadsReceived = this._agentKpi(a.kpiGroups, 'leads-received');\r\n a.kpi.dialsPerAppointment = this._agentKpi(a.kpiGroups, 'dial-appointment-ratio');\r\n a.kpi.connectsPerAppointment = this._agentKpi(a.kpiGroups, 'connect-appointment-ratio');\r\n a.kpi.appointmentsPerLead = this._agentKpi(a.kpiGroups, 'appointment-lead-ratio');\r\n a.kpi.dialsPerLead = this._agentKpi(a.kpiGroups, 'dials-per-lead');\r\n });\r\n } catch (err) {\r\n console.log(err);\r\n } finally {\r\n this.loadingKpis = false;\r\n }\r\n }\r\n\r\n _agentKpi(kpiGroups, kpiCode) {\r\n for (let kpiGroup of kpiGroups) {\r\n const kpi = kpiGroup.kpis.find(x => x.code === kpiCode);\r\n if (!kpi) continue;\r\n return { value: kpi.value, color: this.kpiColor(kpi.index)};\r\n }\r\n return { value: undefined };\r\n }\r\n\r\n kpiColor(index) {\r\n try {\r\n const colorIndex = index % 4;\r\n switch (colorIndex) {\r\n case 0: return 'zeus-kpi-success';\r\n case 1: return 'zeus-kpi-warning';\r\n case 2: return 'zeus-kpi-info';\r\n case 3: return 'zeus-kpi-danger';\r\n default: return 'zeus-kpi-success'\r\n }\r\n } catch (err) {\r\n console.log(err);\r\n return 'zeus-kpi-danger';\r\n }\r\n }\r\n\r\n showAgentView(agentView) {\r\n this.agentView = agentView;\r\n }\r\n\r\n viewAgentLeads(agent, kpi) {\r\n this.viewKpi = { agentId: agent.id, leadIds: kpi.leadIds };\r\n this.showLightbox = true;\r\n this.lightboxVM.open(false, true);\r\n }\r\n\r\n lightboxClosed() {\r\n this.viewKpi = undefined;\r\n this.showLightbox = false;\r\n }\r\n}\r\n","import { bindable } from 'aurelia-framework';\r\nimport { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { I18n } from 'common/i18n';\r\nimport { Leads } from 'services/leads';\r\nimport { c } from 'common/common';\r\n\r\nexport class AgentLeadCardWidgets {\r\n static inject = [EventAggregator, I18n, Leads];\r\n _ea;\r\n _leads;\r\n\r\n @bindable lead;\r\n\r\n _handlers = [];\r\n\r\n constructor(ea, i18n, leads) {\r\n this._ea = ea;\r\n this._leads = leads;\r\n }\r\n\r\n attached() {\r\n this._handlers.push(this._ea.subscribe(c.EventKeys.lead.updated, (data) => this._onLeadUpdated(data)));\r\n }\r\n\r\n detached() {\r\n this._handlers.forEach(h => h.dispose());\r\n this._handlers = [];\r\n }\r\n\r\n _onLeadUpdated(data) {\r\n if (!this.lead.id === data.id) return;\r\n this.lead = data.lead;\r\n }\r\n}","import { bindable } from 'aurelia-framework';\r\nimport { PLATFORM } from 'aurelia-pal';\r\nimport { Security } from 'common/security';\r\nimport { Leads } from 'services/leads';\r\n\r\nexport class AgentLeadCard {\r\n static inject = [Element, Security, Leads];\r\n _element;\r\n _leads;\r\n\r\n @bindable leadId;\r\n lead = null;\r\n tab;\r\n tabView = '';\r\n tabViewModel = null;\r\n\r\n tabs = [\r\n { key: 'activity', title: 'lead:activity', viewModel: PLATFORM.moduleName('./tabs/tab-activity'), display: true },\r\n { key: 'notes', title: 'notes', viewModel: PLATFORM.moduleName('./tabs/tab-notes'), display: true },\r\n ];\r\n\r\n\tconstructor(element, security, leads) {\r\n this._element = element;\r\n\t\tthis.security = security;\r\n this._leads = leads;\r\n\t}\r\n\r\n activate(model) {\r\n const activateTab = model.tab\r\n ? typeof model.tab === 'string' ? model.tab : model.tab.key || this.tabs[0].key\r\n : this.tabs[0].key;\r\n this.tab = activateTab ? this.tabs.find(x => x.key === activateTab) || this.tabs[0] : this.tabs[0];\r\n this.leadId = model.id;\r\n }\r\n\r\n attached() {\r\n this._isAttached = true;\r\n this._load();\r\n }\r\n\r\n leadIdChanged() {\r\n if (!this._isAttached) return;\r\n this._load();\r\n }\r\n\r\n async _load() {\r\n if (!this.leadId) return;\r\n try {\r\n this.loading = true;\r\n \t\tthis.lead = await this._leads.byId(this.leadId);\r\n this._element.dispatchEvent(new CustomEvent('loaded', { bubbles: true, detail: { name: this.lead.fullName } }));\r\n this.displayTab(this.tab);\r\n\t\t} catch (err) {\r\n console.log(err);\r\n } finally {\r\n this.loading = false;\r\n }\r\n\t}\r\n\r\n\tdisplayTab(tab) {\r\n this.tab = tab || this.tabs[0];\r\n this.tabModel = this.tabModel || {};\r\n this.tabViewModel = this.tab.viewModel;\r\n\t switch (this.tab.key) {\r\n case 'notes':\r\n this.tabModel = { leadId: this.lead.id, security: this.security };\r\n break;\r\n case 'activity':\r\n this.tabModel = this.lead;\r\n break;\r\n default:\r\n this.tabModel = this.lead;\r\n break;\r\n }\r\n\t}\r\n}\r\n","import { PLATFORM } from 'aurelia-pal';\r\nimport { bindable } from 'aurelia-framework';\r\nimport { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { Security } from 'common/security';\r\nimport { Leads, LEAD_STATUS } from 'services/leads';\r\nimport { Members } from 'services/members';\r\nimport { DialogService } from 'aurelia-dialog';\r\nimport { LeadStatusValueConverter } from 'resources/value-converters/lead-status';\r\nimport { LpfnUtil } from 'common/utils';\r\nimport { c } from 'common/common';\r\n\r\nimport { AgentLeadCardDialog } from './../dialogs/agent-lead-card-dialog';\r\nPLATFORM.moduleName('./../dialogs/agent-lead-card-dialog');\r\n\r\nexport class AgentLeadList {\r\n static inject = [EventAggregator, Security, Leads, Members, DialogService, LeadStatusValueConverter];\r\n @bindable agentId;\r\n @bindable showKpis = true;\r\n @bindable ids;\r\n @bindable restrictToIds = false;\r\n @bindable lsKey = 'zeus.lead-list.filters';\r\n _ea;\r\n _security;\r\n _leads;\r\n _members;\r\n _dialogService;\r\n _lsvc;\r\n\r\n pageSize = 10;\r\n DG_ORDERED_IDS_EVENT_KEY = 'zeus-agent-lead-list-data-grid-ordered-ids';\r\n\r\n filters = [\r\n { key: 'search', value: '', keys: ['firstName', 'lastName', 'city', 'state', 'zipCode', 'county', 'email', 'type', 'source', 'statusName', 'dispositionName'] },\r\n ];\r\n filterColumns;\r\n\r\n _handlers = [];\r\n\r\n constructor(ea, security, leads, members, dialogService, lsvc) {\r\n this._ea = ea;\r\n this._security = security;\r\n this._leads = leads;\r\n this._members = members;\r\n this._dialogService = dialogService;\r\n this._lsvc = lsvc;\r\n }\r\n\r\n attached() {\r\n this._isAttached = true;\r\n this._handlers.push(this._ea.subscribe(this.DG_ORDERED_IDS_EVENT_KEY, (data) => this._onDataGridOrderedIds(data)));\r\n this._load();\r\n }\r\n\r\n detached() {\r\n this._handlers.forEach(h => h.dispose());\r\n this._handlers = [];\r\n this._leads.clearNav();\r\n }\r\n\r\n agentIdChanged() {\r\n if (!this.agentId || !this._isAttached) return;\r\n this._load();\r\n }\r\n\r\n idsChanged() {\r\n if (!this.agentId || !this._isAttached) return;\r\n this._load();\r\n }\r\n\r\n _onDataGridOrderedIds(orderedIds) {\r\n this._leads.setNavListIds(orderedIds);\r\n }\r\n\r\n async _load() {\r\n if (!this.agentId) return;\r\n if (this.restrictToIds && !this.ids) return;\r\n try {\r\n this.loading = true;\r\n this.leads = await this._leads.forAgent(this.agentId, this.ids);\r\n this._onDataGridOrderedIds(this.leads.map(x => x.id));\r\n this._initializeFilters();\r\n } catch (err) {\r\n console.log(err);\r\n this._leads.clearNav();\r\n } finally {\r\n this.loading = false;\r\n }\r\n }\r\n\r\n async openLeadCard(lead) {\r\n try {\r\n const mentor = await this._members.getMentor(this.agentId);\r\n if (mentor && mentor.id === this._security.authenticatedMemberId) {\r\n this._ea.publish(c.EventKeys.site.openLead, { leadId: lead.id });\r\n } else {\r\n \t this._dialogService.open({ viewModel: AgentLeadCardDialog, model: lead, ignoreTransitions: true });\r\n }\r\n } catch (err) {\r\n console.log(err);\r\n this._dialogService.open({ viewModel: AgentLeadCardDialog, model: lead, igonreTransitions: true });\r\n }\r\n }\r\n\r\n _initializeFilters() {\r\n try {\r\n const filterColumns = [];\r\n const defaultStatuses = LEAD_STATUS.defaults().map(x => this._lsvc.toView(x));\r\n const allStatuses = LEAD_STATUS.all().map(x => this._lsvc.toView(x));\r\n filterColumns.push({ key: 'statusName', labelKey: 'status', type: 'options', options: allStatuses, defaultValue: defaultStatuses.join('|') });\r\n filterColumns.push({ key: 'firstName', labelKey: 'first-name', type: 'string', defaultValue: undefined });\r\n filterColumns.push({ key: 'lastName', labelKey: 'last-name', type: 'string', defaultValue: undefined });\r\n filterColumns.push({ key: 'city', labelKey: 'city', type: 'string', defaultValue: undefined });\r\n filterColumns.push({ key: 'state', labelKey: 'state', type: 'options', options: LpfnUtil.uniqueArray(this.leads.map(x => x.state)), defaultValue: undefined });\r\n filterColumns.push({ key: 'county', labelKey: 'county', type: 'options', options: LpfnUtil.uniqueArray(this.leads.map(x => x.county)), defaultValue: undefined });\r\n filterColumns.push({ key: 'zipCode', labelKey: 'zip', type: 'string', allowMultiple: true, multipleDelimiter: ',', defaultValue: undefined });\r\n filterColumns.push({ key: 'dispositionName', labelKey: 'lead:disposition', type: 'options', options: LpfnUtil.uniqueArray(this.leads.map(x => x.dispositionName)), defaultValue: undefined });\r\n filterColumns.push({ key: 'assignedDate', labelKey: 'lead:assigned', type: 'date', initializeValue: '>|-7', defaultValue: undefined });\r\n filterColumns.push({ key: 'lastWorkedDate', labelKey: 'lead:last-worked-date', type: 'date', initializeValue: '>|-7', defaultValue: undefined });\r\n\r\n if (this.restrictToIds) {\r\n // clear out the default values\r\n filterColumns.forEach(fc => fc.defaultValue = undefined);\r\n }\r\n this.filterColumns = filterColumns;\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n filterColumnsSet(filters) {\r\n if (!filters) return;\r\n const newFilters = [];\r\n this.filters.forEach(f => newFilters.push(f));\r\n filters.forEach(f => newFilters.push(f));\r\n this.filters = newFilters;\r\n }\r\n\r\n toggleFilters() {\r\n this.showDrawer = !this.showDrawer;\r\n }\r\n\r\n gridFiltered(data) {\r\n this.filtered = data.filtered;\r\n this.filteredBy = data.filteredBy;\r\n }\r\n\r\n removeFilter(filter) {\r\n this.removeAdvancedFilter = filter;\r\n }\r\n\r\n viewLeadsFromKpi(leadIds) {\r\n if (leadIds === undefined) {\r\n this.viewingKpiLeads = false;\r\n this.leads = JSON.parse(JSON.stringify(this._displayedLeads));\r\n this._displayedLeads = undefined;\r\n this.restoreFilters = new Date().valueOf();\r\n } else {\r\n if (this.viewingKpiLeads) {\r\n // need to reset the list based on the original, not the current kpi list\r\n const originalLeads = JSON.parse(JSON.stringify(this._displayedLeads));\r\n this.leads = originalLeads.filter(x => leadIds.includes(x.id));\r\n } else {\r\n this.viewingKpiLeads = true;\r\n this._displayedLeads = JSON.parse(JSON.stringify(this.leads));\r\n this.leads = this.leads.filter(x => leadIds.includes(x.id));\r\n this.clearFilters = new Date().valueOf();\r\n }\r\n }\r\n this.reapplyDataGrid = new Date().valueOf();\r\n }\r\n}\r\n","import { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { DialogController } from 'aurelia-dialog';\r\nimport { Leads } from 'services/leads';\r\nimport { c } from 'common/common';\r\n\r\nexport class AgentLeadCardDialog {\r\n static inject = [EventAggregator, DialogController, Leads];\r\n\r\n leadName;\r\n\r\n _handlers = [];\r\n\r\n\tconstructor(ea, dialogController, leads) {\r\n\t\tthis._ea = ea;\r\n this.dialogController = dialogController;\r\n this.dialogController.settings.centerHorizontalOnly = true;\r\n this._leads = leads;\r\n\t}\r\n\r\n activate(model) {\r\n this.leadId = model.id;\r\n this._handlers.push(this._ea.subscribe(c.EventKeys.login.timedOut, () => this.dialogController.cancel()));\r\n }\r\n\r\n deactivate() {\r\n this._handlers.forEach(h => h.dispose());\r\n this._handlers = [];\r\n }\r\n\r\n attached() {\r\n this.nav = this._leads.getNav(this.leadId);\r\n }\r\n\r\n leadLoaded(data) {\r\n this.leadName = data.name;\r\n }\r\n\r\n navigateList(id) {\r\n this.leadId = id;\r\n this.nav = this._leads.getNav(this.leadId);\r\n }\r\n}\r\n","import { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { DialogController } from 'aurelia-dialog';\r\nimport { I18n } from 'common/i18n';\r\nimport { c } from 'common/common';\r\nimport { Page, Notifier } from 'common/ui';\r\nimport { Security } from 'common/security';\r\nimport { Leads } from 'services/leads';\r\nimport { NewInstance } from 'aurelia-dependency-injection';\r\nimport { ValidationRules, ValidationController } from 'aurelia-validation';\r\nimport { BootstrapFormValidationRenderer } from 'validation/bootstrap-form-validation-renderer';\r\n\r\nexport class EditLeadDialog {\r\n static inject = [EventAggregator, DialogController, I18n, Page, Notifier, Security, Leads, NewInstance.of(ValidationController)];\r\n\t_ea;\r\n\tdialogController;\r\n\t_i18n;\r\n\t_page;\r\n\t_notifier;\r\n _security;\r\n\t_leads;\r\n\tvalidationController;\r\n\r\n\tfirstName;\r\n\tlastName;\r\n\temail;\r\n\tphone;\r\n\tstreetAddress;\r\n\tcity;\r\n\tstate;\r\n\tzip;\r\n\tcounty;\r\n\r\n\tusStates = [];\r\n\r\n\tconstructor(eventAggregator, dialogController, i18n, page, notifier, security, leads, validationController) {\r\n\t\tthis._ea = eventAggregator;\r\n this.dialogController = dialogController;\r\n\t\tthis._i18n = i18n;\r\n\t\tthis._page = page;\r\n\t\tthis._notifier = notifier;\r\n\t\tthis._security = security;\r\n\t\tthis._leads = leads;\r\n\t\tthis.validationController = validationController;\r\n\t\tthis.validationController.addRenderer(new BootstrapFormValidationRenderer());\r\n\r\n\t\tthis.usStates = c.Geography.usStates;\r\n\r\n\t\tValidationRules\r\n .ensure('firstName').required()\r\n\t .ensure('lastName').required()\r\n .on(this);\r\n }\r\n\r\n\tasync activate(model) {\r\n this.leadId = model.id;\r\n\t\tthis.firstName = model.firstName;\r\n\t\tthis.lastName = model.lastName;\r\n\t\tthis.email = model.email;\r\n\t\tthis.phone = model.phone;\r\n\t\tthis.streetAddress = model.address;\r\n\t\tthis.city = model.city;\r\n\t\tthis.state = model.state;\r\n\t\tthis.zip = model.zipCode;\r\n\t\tthis.county = model.county;\r\n\t\tthis.title = `${this.firstName} ${this.lastName}`;\r\n }\r\n\r\n\tattached() {\r\n\t\tthis._page.scrollToTop();\r\n\t}\r\n\r\n\taddressSelecting(selecting) {\r\n\t\tthis._isSelectingAddress = selecting;\r\n\t}\r\n\r\n\taddressSelected(data) {\r\n\t\tconsole.log(data);\r\n\t\tthis.streetAddress = data.streetAddress;\r\n\t\tthis.city = data.city;\r\n\t\tthis.state = data.state;\r\n\t\tthis.zip = data.zip;\r\n\t\tthis._isSelectingAddress = false;\r\n\t}\r\n\r\n\tasync updateProfile() {\r\n\t\tif (this._isSelectingAddress) return;\r\n\t\tif (this.processing) return;\r\n\r\n try {\r\n \t\tconst v = await this.validationController.validate();\r\n\t\t if (!v.valid) {\r\n\t\t this._page.scrollToTop();\r\n\t\t return;\r\n\t\t }\r\n\r\n\t\t this.processing = true;\r\n\t\t\tconst payload = {\r\n\t\t\t\tfirstName: this.firstName,\r\n\t\t\t\tlastName: this.lastName,\r\n\t\t\t\temail: this.email,\r\n\t\t\t\tphone: this.phone,\r\n\t\t\t\tstreetAddress: this.streetAddress,\r\n\t\t\t\tcity: this.city,\r\n\t\t\t\tstate: this.state,\r\n\t\t\t\tzipCode: this.zip,\r\n\t\t\t\tcounty: this.county,\r\n\t\t\t}\r\n\t\t\tconst updatedLead = await this._leads.updateProfile(this.leadId, payload);\r\n\t\t\tthis._ea.publish(c.EventKeys.lead.profileUpdated, { lead: updatedLead });\r\n\t\t\tthis.dialogController.ok();\r\n } catch (err) {\r\n console.log(err);\r\n if (typeof err === 'string') this.notifier.error(err);\r\n else this._notifier.generalError();\r\n } finally {\r\n this.processing = false;\r\n }\r\n\t}\r\n}\r\n","import { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { DialogController } from 'aurelia-dialog';\r\nimport { Security } from 'common/security';\r\nimport { c } from 'common/common';\r\n\r\nexport class LeadCardDialog2 {\r\n static inject = [EventAggregator, DialogController, Security];\r\n _ea;\r\n dialogController;\r\n security;\r\n\r\n _handlers = [];\r\n\r\n\tconstructor(ea, dialogController, security) {\r\n\t\tthis._ea = ea;\r\n this.dialogController = dialogController;\r\n this.dialogController.settings.centerHorizontalOnly = true;\r\n this.security = security;\r\n\t}\r\n\r\n activate(model) {\r\n this.tab = model.tab;\r\n this.action = model.action;\r\n this.leadId = model.loaded ? model.lead.id : model.id;\r\n this._handlers.push(this._ea.subscribe(c.EventKeys.login.timedOut, () => this.dialogController.cancel()));\r\n }\r\n\r\n deactivate() {\r\n this._handlers.forEach(h => h.dispose());\r\n this._handlers = [];\r\n }\r\n\r\n close() {\r\n this._ea.publish(c.EventKeys.site.leadClosed, { leadId: this.leadId });\r\n this.dialogController.cancel();\r\n }\r\n}\r\n","import { DialogController } from 'aurelia-dialog';\r\n\r\nexport class PromptForDisposition {\r\n static inject = [Element, DialogController];\r\n _element;\r\n dialogController;\r\n\r\n leadId;\r\n dispositions;\r\n disposition;\r\n autoDialNextLead;\r\n\r\n constructor(element, dialogController) {\r\n this._element = element;\r\n this.dialogController = dialogController;\r\n }\r\n\r\n activate(model) {\r\n this.leadId = model.leadId;\r\n this.dispositions = model.dispositions;\r\n this.dialerTeam = model.dialerTeam;\r\n this.doNotCall = model.doNotCall;\r\n this.autoDialNextLead = model.autoDialNextLead;\r\n this.nextLeadName = model.nextLeadName;\r\n }\r\n\r\n select() {\r\n if (!this.disposition) {\r\n this.noDisposition();\r\n return;\r\n }\r\n this.dialogController.ok({ disposition: this.disposition, autoDialNextLead: this.autoDialNextLead });\r\n }\r\n\r\n noDisposition() {\r\n this.dialogController.ok({ disposition: undefined, autoDialNextLead: this.autoDialNextLead });\r\n }\r\n}\r\n","import { DialogController } from 'aurelia-dialog';\r\n\r\nexport class SelectDialerTeamDialog {\r\n static inject = [Element, DialogController];\r\n _element;\r\n dialogController;\r\n\r\n dialerTeamKeys;\r\n dialerTeamKey;\r\n\r\n constructor(element, dialogController) {\r\n this._element = element;\r\n this.dialogController = dialogController;\r\n }\r\n\r\n activate(model) {\r\n this.dialerTeamKeys = model.dialerTeams;\r\n this.dialerTeam = '';\r\n }\r\n\r\n select() {\r\n if (!this.dialerTeamKey) return;\r\n this.dialogController.ok({ dialerTeam: this.dialerTeamKey });\r\n }\r\n}\r\n","export class Import {\r\n constructor() {}\r\n}","import { bindable, computedFrom } from 'aurelia-framework';\r\nimport { PLATFORM } from 'aurelia-pal';\r\nimport { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { Page } from 'common/ui';\r\nimport { Api } from 'common/server';\r\nimport { Security } from 'common/security';\r\nimport { Leads, LEAD_STATUS } from 'services/leads';\r\nimport { SCRIPT_TYPE, SCRIPT_PERSON } from 'services/lead-scripts';\r\nimport { Members } from 'services/members';\r\nimport { Dialer } from 'services/dialer';\r\nimport { Notifier } from 'common/ui';\r\nimport { FilesFor } from 'services/files-for';\r\nimport { DialogService } from 'aurelia-dialog';\r\nimport { I18n } from 'common/i18n';\r\nimport { MemberConfig } from 'services/member-config';\r\nimport { c } from 'common/common';\r\nimport { ROLE, ABOUT_TYPE } from 'common/constants';\r\nimport { LpfnUtil } from 'common/utils';\r\n\r\nimport { EditNote } from '../../resources/elements/notes/dialogs/edit-note';\r\nPLATFORM.moduleName('../../resources/elements/notes/dialogs/edit-note');\r\nimport { EditLeadDialog } from './dialogs/edit-lead-dialog';\r\nPLATFORM.moduleName('./dialogs/edit-lead-dialog');\r\nimport { PromptForDisposition } from './dialogs/prompt-for-disposition';\r\nPLATFORM.moduleName('./dialogs/prompt-for-disposition');\r\nimport { ConfirmDialog } from 'common/dialogs/confirm/confirm-dialog';\r\nPLATFORM.moduleName('common/dialogs/confirm/confirm-dialog');\r\n\r\nexport class LeadCard2 {\r\n static inject = [Element, EventAggregator, Page, Api, Security, Leads, Members, Dialer, Notifier, FilesFor, DialogService, I18n, MemberConfig];\r\n _element;\r\n _leads;\r\n _members;\r\n _dialer;\r\n _notifier;\r\n _filesFor;\r\n _dialogService;\r\n _i18n;\r\n _memberConfig;\r\n\r\n @bindable leadId;\r\n @bindable tab;\r\n @bindable action;\r\n lead = null;\r\n tab;\r\n tabView = '';\r\n tabViewModel = null;\r\n\r\n leadCardSettings = {};\r\n\r\n tabs = [];\r\n rightTabs = [];\r\n\r\n scriptTypes = SCRIPT_TYPE.all();\r\n scriptType;\r\n scriptPersons = SCRIPT_PERSON.all();\r\n scriptPerson;\r\n\r\n displayMapView = 'place';\r\n enlargeAddressMap;\r\n\r\n _handlers = [];\r\n\r\n\tconstructor(element, ea, page, api, security, leads, members, dialer, notifier, filesFor, dialogService, i18n, memberConfig) {\r\n this._element = element;\r\n\t\tthis._ea = ea;\r\n this._page = page;\r\n\t\tthis._api = api;\r\n\t\tthis.security = security;\r\n this._leads = leads;\r\n this._members = members;\r\n this._dialer = dialer;\r\n this._notifier = notifier;\r\n this._filesFor = filesFor;\r\n this._dialogService = dialogService;\r\n this._i18n = i18n;\r\n this._memberConfig = memberConfig;\r\n\r\n this.leadCardSettings = this._memberConfig.json('lead-card') || {};\r\n }\r\n\r\n activate(model) {\r\n this.leadId = model.id;\r\n }\r\n\r\n async attached() {\r\n this._isAttached = true;\r\n await this._load();\r\n this._loadHandlers();\r\n\r\n this.nav = this._leads.getNavWithNames(this.leadId);\r\n if (this.tab && this.tabs.length) {\r\n const defaultTab = this.tabs.find(x => x.key === this.tab);\r\n if (defaultTab) {\r\n this.activeTab = defaultTab.key;\r\n this.scrollToTab(defaultTab);\r\n }\r\n }\r\n if (!this.activeTab) this.activeTab = this.tabs.length ? this.tabs[0].key : undefined;\r\n this._initializeActions();\r\n\r\n if (this.action === 'auto-dial') {\r\n if (this.dialerTeam && !this.lead.doNotCall) {\r\n this.autoDial();\r\n }\r\n }\r\n }\r\n\r\n _loadHandlers() {\r\n this._handlers.push(this._ea.subscribe(c.EventKeys.lead.profileUpdated, () => {\r\n this.lead = undefined;\r\n this._load();\r\n }));\r\n this._handlers.push(this._ea.subscribe(c.EventKeys.lead.tabHeader, (data) => {\r\n const tab = this.tabs.find(x => x.key === data.key);\r\n if (!tab) return;\r\n tab.headerLeft = data.headerLeft;\r\n }));\r\n this._handlers.push(this._ea.subscribe('dnd:didEnd', async() => {\r\n window.setTimeout(() => this._saveOrdering(), 0);\r\n }));\r\n window.setTimeout(() => this._loadTabObservers(), 1000);\r\n }\r\n\r\n _saveOrdering() {\r\n const orderedKeys = this.tabs.map(x => x.key);\r\n this.leadCardSettings.tabOrder = orderedKeys;\r\n const rightOrderedKeys = this.rightTabs.map(x => x.key);\r\n this.leadCardSettings.rightTabOrder = rightOrderedKeys;\r\n this._saveSettings();\r\n }\r\n\r\n async _saveSettings() {\r\n try {\r\n await this._memberConfig.save('lead-card', JSON.stringify(this.leadCardSettings));\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n _initializeActions() {\r\n this.mapActions = [];\r\n this.mapActions.push({ key: 'map-default-street', name: this._i18n.tr('default-map-view-street'), icon: 'fa-duotone fa-street-view', cssClass: this.leadCardSettings.defaultMapView === 'street' ? 'zeus-success' : '' });\r\n this.mapActions.push({ key: 'map-default-map', name: this._i18n.tr('default-map-view-map'), icon: 'fa-duotone fa-map-marker-alt', cssClass: this.leadCardSettings.defaultMapView === 'map' || !this.leadCardSettings.defaultMapView ? 'zeus-success' : '' });\r\n this.mapActions.push({ key: 'map-default-zoom-plus', name: this._i18n.tr('default-map-zoom-plus'), icon: 'fa-duotone fa-magnifying-glass-plus' });\r\n this.mapActions.push({ key: 'map-default-zoom-minus', name: this._i18n.tr('default-map-zoom-minus'), icon: 'fa-duotone fa-magnifying-glass-minus' });\r\n }\r\n\r\n _loadTabObservers() {\r\n this.tabs.forEach(tab => {\r\n const tabEl = document.getElementById(`tab-${tab.key}`);\r\n if (!tabEl) return;\r\n this._handlers.push(LpfnUtil.inViewportHandler(tabEl, (isVisible, tab) => {\r\n tab.visible = isVisible;\r\n window.setTimeout(() => this._setActiveTab(), 0);\r\n }, tab));\r\n });\r\n }\r\n\r\n _setActiveTab() {\r\n if (this.activeTab) return;\r\n // The first tab after the top not visible tab is the active tab\r\n if (this.tabs[0].visible) {\r\n this.activeTab = this.tabs[0].key;\r\n return;\r\n }\r\n for (let i = 1; i < this.tabs.length; i++) {\r\n if (!this.tabs[i].visible) continue;\r\n this.activeTab = this.tabs[i].key;\r\n return;\r\n }\r\n }\r\n\r\n detached() {\r\n this._clearHandlers();\r\n }\r\n\r\n _clearHandlers() {\r\n this._handlers.forEach(h => h.dispose());\r\n this._handlers = [];\r\n }\r\n\r\n navigateList(item) {\r\n if (!this.allDispositions.length) {\r\n this._navigateList(item);\r\n return;\r\n }\r\n const promptModel = { leadId: this.lead.id, dispositions: this.allDispositions, dialerTeam: this.dialerTeam, doNotCall: this.lead.doNotCall, autoDialNextLead: this._autoDialNextLead, nextLeadName: item.name };\r\n this._dialogService.open({ viewModel: PromptForDisposition, model: promptModel, ignoreTransitions: true }).whenClosed(async(response) => {\r\n if (response.output.disposition) {\r\n // set the disposition\r\n await this.setDisposition(response.output.disposition);\r\n }\r\n this._autoDialNextLead = response.output.autoDialNextLead;\r\n if (response.output.autoDialNextLead) {\r\n this._autoDialNextLeadAfterLoad = true;\r\n }\r\n this._navigateList(item);\r\n });\r\n }\r\n\r\n _navigateList(item) {\r\n this.leadId = item.id;\r\n this.nav = this._leads.getNavWithNames(this.leadId);\r\n }\r\n\r\n async leadIdChanged() {\r\n if (!this._isAttached) return;\r\n await this._load();\r\n this._loadHandlers();\r\n if (this._autoDialNextLeadAfterLoad) {\r\n await this.autoDial();\r\n this._autoDialNextLeadAfterLoad = undefined;\r\n }\r\n }\r\n\r\n async _load() {\r\n if (!this.leadId) return;\r\n try {\r\n this.loading = true;\r\n this.displayMapView = this.leadCardSettings.defaultMapView === 'street' ? 'streetview' : 'place';\r\n this.enlargeAddressMap = undefined;\r\n this.mapZoom = this.leadCardSettings.defaultMapZoom ?? 15;\r\n const loaders = [\r\n this._leads.byId(this.leadId),\r\n this._members.autoDialTeam(),\r\n ];\r\n const data = await Promise.all(loaders);\r\n\r\n this.lead = data[0];\r\n this.dialerTeam = data[1];\r\n this.leadStatus = this.lead.status;\r\n this._element.dispatchEvent(new CustomEvent('loaded', { bubbles: true, detail: { name: this.lead.fullName } }));\r\n this._loadTabs();\r\n this._loadRightTabs();\r\n this._loadDispositionOptions();\r\n this.viewLeadPdf(true);\r\n } catch (err) {\r\n console.log(err);\r\n } finally {\r\n this.loading = false;\r\n }\r\n\t}\r\n\r\n _loadTabs() {\r\n this.tabs = [];\r\n const tabKeys = this.leadCardSettings.tabOrder ?? ['notes', 'scripts', 'details', 'activity', 'assignments'];\r\n tabKeys.forEach(tk => {\r\n if (tk === 'notes') this.tabs.push({ key: 'notes', expanded: !this.leadCardSettings.notesDefaultClosed, title: 'notes', viewModel: PLATFORM.moduleName('./tabs/tab-notes'), model: { minimal: true, leadId: this.lead.id, security: this.security }, display: true, actions: this._defaultClosedActions('notes', 'notesDefaultClosed') });\r\n if (tk === 'scripts') {\r\n const scriptActions = this._scriptsActions();\r\n const defaultScriptTypeAction = scriptActions.find(x => x.key.indexOf('scripts-default-script-type-') === 0 && x.cssClass === 'zeus-success');\r\n this.scriptType = defaultScriptTypeAction ? defaultScriptTypeAction.scriptType : SCRIPT_TYPE.InPerson;\r\n const defaultScriptPersonAction = scriptActions.find(x => x.key.indexOf('scripts-default-script-person-') === 0 && x.cssClass === 'zeus-success');\r\n this.scriptPerson = defaultScriptPersonAction ? defaultScriptPersonAction.scriptPerson : SCRIPT_PERSON.First;\r\n const scriptsModel = {\r\n lead: this.lead,\r\n scriptType: this.scriptType,\r\n scriptPerson: this.scriptPerson,\r\n };\r\n this.tabs.push({ key: 'scripts', expanded: !this.leadCardSettings.scriptsDefaultClosed, title: 'lead:script', viewModel: PLATFORM.moduleName('./tabs/tab-scripts'), model: scriptsModel, display: this.security.isInRole(ROLE.LeadScript), actions: scriptActions });\r\n }\r\n if (tk === 'details') this.tabs.push({ key: 'details', expanded: !this.leadCardSettings.detailsDefaultClosed, title: 'details', viewModel: PLATFORM.moduleName('./tabs/tab-details'), model: this.lead, display: true, actions: this._defaultClosedActions('details', 'detailsDefaultClosed') });\r\n if (tk === 'activity') this.tabs.push({ key: 'activity', expanded: !this.leadCardSettings.activityDefaultClosed, title: 'lead:activity', viewModel: PLATFORM.moduleName('./tabs/tab-activity'), model: { lead: this.lead, style: 'timeline' }, display: true, actions: this._defaultClosedActions('activity', 'activityDefaultClosed') });\r\n if (tk === 'assignments') this.tabs.push({ key: 'assignments', expanded: !this.leadCardSettings.assignmentsDefaultClosed, title: 'lead:assignments', viewModel: PLATFORM.moduleName('./tabs/tab-assignments'), model: this.lead, display: this.security.isInRole(ROLE.LeadManager), actions: this._defaultClosedActions('assignments', 'assignmentsDefaultClosed') });\r\n });\r\n }\r\n\r\n _defaultClosedActions(key, settingProperty) {\r\n const actions = [];\r\n actions.push({ key: `${key}-default-open`, name: this._i18n.tr('default-open'), icon: 'fa-duotone fa-folder-open', cssClass: this.leadCardSettings[settingProperty] ? '' : 'zeus-success' });\r\n actions.push({ key: `${key}-default-closed`, name: this._i18n.tr('default-closed'), icon: 'fa-duotone fa-folder-closed', cssClass: this.leadCardSettings[settingProperty] ? 'zeus-success' : '' });\r\n return actions;\r\n }\r\n\r\n _scriptsActions() {\r\n const actions = this._defaultClosedActions('scripts', 'scriptsDefaultClosed');\r\n SCRIPT_TYPE.allWithIcons().forEach(scriptType => {\r\n const settingProperty = 'scriptsDefaultType';\r\n const key = `scripts-default-script-type-${scriptType.key}`;\r\n actions.push({ key: key, name: this._i18n.tr(`lead:script-type-${scriptType.key}-default`), icon: scriptType.icon, cssClass: this.leadCardSettings[settingProperty] === key ? 'zeus-success' : '', scriptType: scriptType.key });\r\n });\r\n SCRIPT_PERSON.allWithIcons().forEach(scriptPerson => {\r\n const settingProperty = 'scriptsDefaultPerson';\r\n const key = `scripts-default-script-person-${scriptPerson.key}`;\r\n actions.push({ key: key, name: this._i18n.tr(`lead:script-person-${scriptPerson.key}-default`), icon: scriptPerson.icon, cssClass: this.leadCardSettings[settingProperty] === key ? 'zeus-success' : '', scriptPerson: scriptPerson.key });\r\n });\r\n return actions;\r\n }\r\n\r\n setScriptType(st) {\r\n this.scriptType = st;\r\n this._ea.publish(c.EventKeys.lead.changeScriptType, { scriptType: st });\r\n }\r\n\r\n setScriptPerson(sp) {\r\n this.scriptPerson = sp;\r\n this._ea.publish(c.EventKeys.lead.changeScriptPerson, { scriptPerson: sp });\r\n }\r\n\r\n\r\n @computedFrom('leadStatus')\r\n get statusIcon() {\r\n return LEAD_STATUS.icon(this.leadStatus);\r\n }\r\n\r\n @computedFrom('lead', 'security')\r\n get canEdit() {\r\n if (!this.lead) return false;\r\n if (this.security.isInRole(ROLE.LeadManager)) return true;\r\n if (!this.lead.assignedToAgentId) return false;\r\n return this.security.isAuthenticatedMember(this.lead.assignedToAgentId);\r\n\r\n }\r\n\r\n @computedFrom('lead', 'security')\r\n get canDelete() {\r\n if (!this.lead) return false;\r\n if (!this.lead.ownerMemberId) return false;\r\n return this.security.isAuthenticatedMember(this.lead.ownerMemberId);\r\n\r\n }\r\n\r\n tabAction(key) {\r\n try {\r\n const firstHyphen = key.indexOf('-');\r\n const tabKey = key.substr(0, firstHyphen);\r\n let checkKeyStartingWith;\r\n let checkDefaultClosed = false;\r\n if (key.indexOf('scripts-default-script-type-') === 0) {\r\n checkKeyStartingWith = 'scripts-default-script-type-';\r\n this.leadCardSettings.scriptsDefaultType = key;\r\n } else if (key.indexOf('scripts-default-script-person-') === 0) {\r\n checkKeyStartingWith = 'scripts-default-script-person-';\r\n this.leadCardSettings.scriptsDefaultPerson = key;\r\n } else {\r\n checkDefaultClosed = true;\r\n switch (key) {\r\n case 'notes-default-open':\r\n this.leadCardSettings.notesDefaultClosed = false;\r\n break;\r\n case 'notes-default-closed':\r\n this.leadCardSettings.notesDefaultClosed = true;\r\n break;\r\n case 'scripts-default-open':\r\n this.leadCardSettings.scriptsDefaultClosed = false;\r\n break;\r\n case 'scripts-default-closed':\r\n this.leadCardSettings.scriptsDefaultClosed = true;\r\n break;\r\n case 'details-default-open':\r\n this.leadCardSettings.detailsDefaultClosed = false;\r\n break;\r\n case 'details-default-closed':\r\n this.leadCardSettings.detailsDefaultClosed = true;\r\n break;\r\n case 'activity-default-open':\r\n this.leadCardSettings.activityDefaultClosed = false;\r\n break;\r\n case 'activity-default-closed':\r\n this.leadCardSettings.activityDefaultClosed = true;\r\n break;\r\n case 'assignments-default-open':\r\n this.leadCardSettings.assignmentsDefaultClosed = false;\r\n break;\r\n case 'assignments-default-closed':\r\n this.leadCardSettings.assignmentsDefaultClosed = true;\r\n break;\r\n }\r\n }\r\n // Need to set the css class based on all of the individual types.\r\n this.tabs.find(x => x.key === tabKey).actions.forEach(a => {\r\n if (checkDefaultClosed) {\r\n if (a.key.indexOf('default-closed') < 0 && a.key.indexOf('default-open') < 0) return;\r\n if (a.key === key) a.cssClass = 'zeus-success';\r\n else a.cssClass = '';\r\n return;\r\n }\r\n if (checkKeyStartingWith) {\r\n if (a.key.indexOf(checkKeyStartingWith) !== 0) return;\r\n if (a.key === key) a.cssClass = 'zeus-success';\r\n else a.cssClass = '';\r\n }\r\n });\r\n this._saveSettings();\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n _loadRightTabs() {\r\n this.rightTabs = [];\r\n const tabKeys = this.leadCardSettings.rightTabOrder ?? ['reminders', 'map', 'pdfs'];\r\n tabKeys.forEach(tk => {\r\n if (tk === 'reminders') this.rightTabs.push({ key: 'reminders', title: 'lead:reminders-appointments', display: true });\r\n if (tk === 'map') this.rightTabs.push({ key: 'map', title: 'map', display: true });\r\n if (tk === 'pdfs') this.rightTabs.push({ key: 'pdfs', title: 'pdfs', display: true });\r\n });\r\n this.activeRightTab = this.rightTabs[0].key;\r\n }\r\n\r\n mapAction(key) {\r\n try {\r\n switch (key) {\r\n case 'map-default-street':\r\n this.leadCardSettings.defaultMapView = 'street';\r\n break;\r\n case 'map-default-map':\r\n this.leadCardSettings.defaultMapView = 'map';\r\n break;\r\n case 'map-default-zoom-plus':\r\n this.mapZoom++;\r\n this.leadCardSettings.defaultMapZoom = this.mapZoom;\r\n break;\r\n case 'map-default-zoom-minus':\r\n this.mapZoom--;\r\n this.leadCardSettings.defaultMapZoom = this.mapZoom;\r\n break;\r\n }\r\n this._saveSettings();\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n deleteLead() {\r\n const model = { key: 'delete-lead', okButtonClass: 'btn-danger', messageObject: { name: this.lead.fullName } };\r\n\t this._dialogService.open({ viewModel: ConfirmDialog, model, ignoreTransitions: true }).whenClosed(async(response) => {\r\n\t if (response.wasCancelled) return;\r\n\t\t\ttry {\r\n this.loading = true;\r\n await this._leads.delete([this.lead.id]);\r\n this._ea.publish(c.EventKeys.lead.deleted, {});\r\n this._element.dispatchEvent(new CustomEvent('close', { bubbles: true, detail: {} }));\r\n\t\t\t} catch (err) {\r\n\t\t\t\tif (err) this.notifier.error(err);\r\n\t\t\t\telse this.notifier.generalError();\r\n\t\t\t} finally {\r\n\t\t\t\tthis.loading = false;\r\n\t\t\t}\r\n });\r\n }\r\n\r\n editLead() {\r\n this._dialogService.open({ viewModel: EditLeadDialog, model: this.lead, ignoreTransitions: true }).whenClosed(response => {\r\n if (response.wasCancelled) return;\r\n });\r\n }\r\n\r\n _loadDispositionOptions() {\r\n this.allDispositions = this._leads.dispositions(this.lead.status);\r\n }\r\n\r\n setMapView(view) {\r\n this.displayMapView = view;\r\n }\r\n\r\n async viewLeadPdf(initialLoad = false) {\r\n this.displayInlineFile = undefined;\r\n const model = { ids: [this.lead.id], inline: true };\r\n await this._page.export(this._api, 'leads/export/pdf', model, false, (src) => {\r\n this.displayInlineFile = { initialLoad, src };\r\n });\r\n }\r\n\r\n async autoDial() {\r\n try {\r\n if (!this.lead || !this.lead.id) return;\r\n const response = await this._dialer.call([this.lead.id]);\r\n if (response.succeeded) this._notifier.success('auto-dialer-success');\r\n else this._notifier.error(response.message);\r\n } catch (err) {\r\n console.log(err);\r\n this._notifier.error('auto-dialer-error');\r\n }\r\n }\r\n\r\n addNote() {\r\n const model = { type: ABOUT_TYPE.Lead, aboutId: this.lead.id, note: undefined };\r\n this._dialogService.open({ viewModel: EditNote, model, ignoreTransitions: true });\r\n }\r\n\r\n async setDisposition(d) {\r\n try {\r\n const result = await this._leads.setDisposition(this.lead.id, d);\r\n if (!result.succeeded) {\r\n this._notifier.error(result.message);\r\n return;\r\n }\r\n this.lead = result.model;\r\n this.leadStatus = this.lead.status;\r\n this._loadDispositionOptions();\r\n this._ea.publish(c.EventKeys.lead.updated, { id: this.lead.id, lead: result.model });\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n async resetToNew() {\r\n try {\r\n const result = await this._leads.resetToNew(this.lead.id);\r\n if (!result.succeeded) {\r\n this._notifier.error(result.message);\r\n return;\r\n }\r\n this.lead = result.model;\r\n this.leadStatus = this.lead.status;\r\n this._loadDispositionOptions();\r\n this._ea.publish(c.EventKeys.lead.updated, { id: this.lead.id, lead: result.model });\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n async removeDoNotCall() {\r\n try {\r\n await this._leads.removeDoNotCall(this.lead.id);\r\n this.lead.doNotCall = false;\r\n this.lead.doNotCallDate = null;\r\n this._ea.publish(c.EventKeys.lead.updated, { id: this.lead.id, lead: this.lead });\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n openMap() {\r\n this.enlargeAddressMap = new Date().valueOf();\r\n }\r\n\r\n\tscrollToTab(tab) {\r\n if (!this._isAttached) return;\r\n try {\r\n this.activeTab = tab.key;\r\n const scrollToEl = document.getElementById(`tab-${tab.key}`);\r\n if (!scrollToEl) return;\r\n LpfnUtil.scrollToElm(this.tabContainerEl, scrollToEl, 600);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n\tscrollToRightTab(tab) {\r\n if (!this._isAttached) return;\r\n try {\r\n this.activeRightTab = tab.key;\r\n const scrollToEl = document.getElementById(`rightTab-${tab.key}`);\r\n if (!scrollToEl) return;\r\n LpfnUtil.scrollToElm(this.rightTabContainerEl, scrollToEl, 600);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n\t}\r\n}\r\n","import { activationStrategy } from 'aurelia-router';\r\nimport { observable, computedFrom } from 'aurelia-framework';\r\nimport { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { I18n } from 'common/i18n';\r\nimport { Security } from 'common/security';\r\nimport { DIALER_TEAM, Dialer } from 'services/dialer';\r\nimport { Notifier } from 'common/ui';\r\nimport { Leads, LEAD_STATUS, LEAD_TYPE } from 'services/leads';\r\nimport { LeadStatusValueConverter } from 'resources/value-converters/lead-status';\r\nimport { LeadTypeValueConverter } from 'resources/value-converters/lead-type';\r\nimport { LeadDispositionValueConverter } from 'resources/value-converters/lead-disposition';\r\nimport { SelectDialerTeamDialog } from './dialogs/select-dialer-team-dialog';\r\nimport { DialogService } from 'aurelia-dialog';\r\nimport { Page } from 'common/ui';\r\nimport { Api } from 'common/server';\r\nimport { c } from 'common/common';\r\nimport { LpfnUtil } from 'common/utils';\r\nimport moment from 'moment';\r\n\r\nPLATFORM.moduleName('./dialogs/select-dialer-team-dialog');\r\n\r\nexport class LeadList {\r\n static inject = [EventAggregator, I18n, Security, Dialer, Notifier, Leads, LeadStatusValueConverter, LeadTypeValueConverter, LeadDispositionValueConverter, DialogService, Page, Api];\r\n _ea;\r\n _i18n;\r\n security;\r\n _dialer;\r\n _notifier;\r\n _leads;\r\n _lsvc;\r\n _ltvc;\r\n _ldvc;\r\n _dialogService;\r\n _page;\r\n _api;\r\n\r\n includePdf = true;\r\n includeLeadRecord = true;\r\n\r\n @observable toggleSelect = false;\r\n dialerTeam;\r\n canDial = false;\r\n totalItems;\r\n\r\n filters = [\r\n { key: 'search', value: '', keys: ['firstName', 'lastName', 'city', 'state', 'zipCode', 'county', 'email', 'typeName', 'source', 'statusName', 'dispositionName', 'phone'] },\r\n ];\r\n filterColumns;\r\n pageSize = 10;\r\n DG_ORDERED_IDS_EVENT_KEY = 'zeus-lead-list-data-grid-ordered-ids';\r\n selectedCount = 0;\r\n view = 'list';\r\n\r\n _handlers = [];\r\n\r\n constructor(ea, i18n, security, dialer, notifier, leads, lsvc, ltvc, ldvc, dialogService, page, api) {\r\n this._ea = ea;\r\n this._i18n = i18n;\r\n this.security = security;\r\n this._dialer = dialer;\r\n this._notifier = notifier;\r\n this._leads = leads;\r\n this._lsvc = lsvc;\r\n this._ltvc = ltvc;\r\n this._ldvc = ldvc;\r\n this._dialogService = dialogService;\r\n this._page = page;\r\n this._api = api;\r\n }\r\n\r\n determineActivationStrategy() {\r\n return activationStrategy.invokeLifecycle;\r\n }\r\n\r\n activate(model) {\r\n this._leadTypes = null;\r\n this._notLeadTypes = null;\r\n if (model.leadType === LEAD_TYPE.EmergencyContact) {\r\n this._leadTypes = [LEAD_TYPE.EmergencyContact];\r\n } else if (!model.leadType) {\r\n this._notLeadTypes = [LEAD_TYPE.EmergencyContact];\r\n }\r\n if (this._isAttached) {\r\n this._load();\r\n }\r\n }\r\n\r\n attached() {\r\n this._isAttached = true;\r\n this._handlers.push(this._ea.subscribe(c.EventKeys.lead.deleted, (data) => this._onLeadDeleted(data)));\r\n this._handlers.push(this._ea.subscribe(c.EventKeys.lead.updated, (data) => this._onLeadUpdated(data)));\r\n this._handlers.push(this._ea.subscribe(c.EventKeys.lead.profileUpdated, (data) => this._onLeadUpdated(data, true)));\r\n this._handlers.push(this._ea.subscribe(this.DG_ORDERED_IDS_EVENT_KEY, (data) => this._onDataGridOrderedIds(data)));\r\n this._handlers.push(this._ea.subscribe('lead-map-selected-ids-changed', (data) => this._onSelectedIdsChanged(data.ids)));\r\n this._load();\r\n this._loadCanAutoDial();\r\n }\r\n\r\n detached() {\r\n this._isAttached = false;\r\n this._handlers.forEach(h => h.dispose());\r\n this._handlers = [];\r\n this._leads.clearNav();\r\n }\r\n\r\n _onLeadDeleted() {\r\n this.reloadKpis = new Date().valueOf();\r\n this._load();\r\n }\r\n\r\n /**\r\n * Called when a lead is updated\r\n * @param {Object} data - { lead }\r\n */\r\n _onLeadUpdated(data, profileUpdated = false) {\r\n try {\r\n const lead = this.leads.find(x => x.id === data.lead.id);\r\n if (!lead) return;\r\n this.reloadKpis = new Date().valueOf();\r\n if (profileUpdated) {\r\n lead.fullName = data.lead.fullName;\r\n lead.firstName = data.lead.firstName;\r\n lead.lastName = data.lead.lastName;\r\n lead.city = data.lead.city;\r\n lead.state = data.lead.state;\r\n lead.zipCode = data.lead.zipCode;\r\n lead.county = data.lead.county;\r\n lead.email = data.lead.email;\r\n lead.phone = data.lead.phone;\r\n lead.lastWorkedDate = moment().toISOString();\r\n return;\r\n }\r\n\r\n // update the properties displayed on the list\r\n if (lead.disposition != data.lead.disposition) {\r\n lead.disposition = data.lead.disposition;\r\n lead.dispositionDate = data.lead.dispositionDate;\r\n lead.dispositionName = this._ldvc.toView(lead.disposition);\r\n lead.lastWorkedDate = moment().toISOString();\r\n }\r\n if (lead.status != data.lead.status) {\r\n lead.status = data.lead.status;\r\n lead.statusName = this._lsvc.toView(lead.status);\r\n lead.lastWorkedDate = moment().toISOString();\r\n }\r\n if (lead.doNotCall != data.lead.doNotCall) {\r\n lead.doNotCall = data.lead.doNotCall;\r\n lead.doNotCallDate = data.lead.doNotCallDate;\r\n lead.lastWorkedDate = moment().toISOString();\r\n }\r\n\r\n this.reapplyDataGrid = new Date().valueOf();\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n _onDataGridOrderedIds(orderedIds) {\r\n const navData = [];\r\n orderedIds.forEach(id => {\r\n const lead = this.leads.find(x => x.id === id);\r\n navData.push({ id, name: lead.fullName });\r\n });\r\n this._leads.setNavListWithNames(navData);\r\n }\r\n\r\n async _load() {\r\n try {\r\n this.loading = true;\r\n this.leads = await this._leads.forAgent(this._leadType, null, this._leadTypes, this._notLeadTypes);\r\n this._onDataGridOrderedIds(this.leads.map(x => x.id));\r\n this._initializeFilters();\r\n } catch (err) {\r\n console.log(err);\r\n this._leads.clearNav();\r\n } finally {\r\n this.loading = false;\r\n }\r\n }\r\n\r\n async _loadCanAutoDial() {\r\n try {\r\n this.dialerTeams = await this._dialer.agentTeams(this.security.authenticatedMemberId);\r\n this.canAutoDialLead = this.dialerTeams.includes(DIALER_TEAM.Single);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n async autoDial() {\r\n try {\r\n const leadIds = this.dgLeads.filter(x => x.selected).map(x => x.id);\r\n if (leadIds.length === 0) return;\r\n\r\n const model = { dialerTeams: this.dialerTeams };\r\n this._dialogService.open({ viewModel: SelectDialerTeamDialog, model: model, ignoreTransitions: true }).whenClosed(async(response) => {\r\n if (response.wasCancelled) return;\r\n const teamKey = response.output.dialerTeam;\r\n const dialerResponse = await this._dialer.call(leadIds, teamKey);\r\n if (dialerResponse.succeeded) this._notifier.success('auto-dialer-success');\r\n else this._notifier.error(dialerResponse.message);\r\n });\r\n } catch (err) {\r\n console.log(err);\r\n this._notifier.error('auto-dialer-error');\r\n }\r\n }\r\n\r\n toggleSelectChanged() {\r\n this.leads.forEach(l => {\r\n l.selected = this.toggleSelect;\r\n });\r\n this.dgLeads.forEach(l => {\r\n l.selected = this.toggleSelect;\r\n });\r\n this.selectedChanged();\r\n }\r\n\r\n selectedChanged() {\r\n this._ignoreNextSelectedIdsChangedEvent = true;\r\n const selectedIds = this.leads.filter(x => x.selected).map(x => x.id);\r\n this.canDial = selectedIds.length > 0;\r\n this._ea.publish('lead-list-selected-ids-changed', { ids: selectedIds });\r\n this.selectedCount = selectedIds.length;\r\n }\r\n\r\n clearSelected() {\r\n this.leads.forEach(l => l.selected = false);\r\n this.dgLeads.forEach(l => l.selected = false);\r\n this._ea.publish('lead-list-selected-ids-changed', { ids: [] });\r\n this.canDial = false;\r\n this.selectedCount = 0;\r\n }\r\n\r\n _onSelectedIdsChanged(ids) {\r\n this.dgLeads.forEach(l => {\r\n l.selected = ids.includes(l.id);\r\n });\r\n this.leads.forEach(l => {\r\n l.selected = ids.includes(l.id);\r\n });\r\n this.canDial = ids.length > 0;\r\n this.selectedCount = ids.length;\r\n }\r\n\r\n async exportLeads() {\r\n let exportIds = this.dgLeads.filter(x => x.selected).map(x => x.id);\r\n if (!exportIds.length) exportIds = this.dgLeads.map(x => x.id);\r\n const model = { ids: exportIds, exportType: null, assignedToAgentId: null };\r\n await this._page.export(this._api, 'leads/export/list', model);\r\n }\r\n\r\n async exportLeadsPdf() {\r\n let exportIds = this.dgLeads.filter(x => x.selected).map(x => x.id);\r\n if (!exportIds.length) exportIds = this.dgLeads.map(x => x.id);\r\n const model = { ids: exportIds, inline: true, includePdf: this.includePdf, includeLeadRecord: this.includeLeadRecord };\r\n await this._page.export(this._api, 'leads/export/pdf', model, true);\r\n }\r\n\r\n _initializeFilters() {\r\n try {\r\n const filterColumns = [];\r\n const defaultStatuses = LEAD_STATUS.defaults().map(x => this._lsvc.toView(x));\r\n const allStatuses = LEAD_STATUS.all().map(x => this._lsvc.toView(x));\r\n filterColumns.push({ key: 'statusName', labelKey: 'status', type: 'options', options: allStatuses, defaultValue: defaultStatuses.join('|') });\r\n filterColumns.push({ key: 'dispositionName', labelKey: 'lead:disposition', type: 'options', options: LpfnUtil.uniqueArray(this.leads.map(x => x.dispositionName)), defaultValue: undefined });\r\n filterColumns.push({ key: 'powerScore', labelKey: 'lead:power-score', type: 'number', defaultValue: undefined });\r\n filterColumns.push({ key: 'source', labelKey: 'lead:source', type: 'options', options: LpfnUtil.uniqueArray(this.leads.map(x => x.source)), defaultValue: undefined });\r\n filterColumns.push({ key: 'typeName', labelKey: 'lead:type', type: 'options', options: LpfnUtil.uniqueArray(this.leads.map(x => this._ltvc.toView(x.type))), defaultValue: undefined });\r\n filterColumns.push({ key: 'coverageAmount', labelKey: 'lead:coverage-amount', type: 'number', defaultValue: undefined });\r\n filterColumns.push({ key: 'city', labelKey: 'city', type: 'string', defaultValue: undefined });\r\n filterColumns.push({ key: 'state', labelKey: 'state', type: 'options', options: LpfnUtil.uniqueArray(this.leads.map(x => x.state)), defaultValue: undefined });\r\n filterColumns.push({ key: 'county', labelKey: 'county', type: 'options', options: LpfnUtil.uniqueArray(this.leads.map(x => x.county)), defaultValue: undefined });\r\n filterColumns.push({ key: 'zipCode', labelKey: 'zip', type: 'string', allowMultiple: true, multipleDelimiter: ',', defaultValue: undefined });\r\n filterColumns.push({ key: 'assignedDate', labelKey: 'lead:assigned', type: 'date', initializeValue: '>|-7', defaultValue: undefined });\r\n filterColumns.push({ key: 'firstName', labelKey: 'first-name', type: 'string', defaultValue: undefined });\r\n filterColumns.push({ key: 'lastName', labelKey: 'last-name', type: 'string', defaultValue: undefined });\r\n this.filterColumns = filterColumns;\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n toggleFilters() {\r\n this.showDrawer = !this.showDrawer;\r\n }\r\n\r\n /**\r\n * Sets all the filters used by the grid\r\n * Called by the filter element after it is initialized\r\n * @param {[Object]} filters - the filters set by the filter element\r\n * @returns \r\n */\r\n filterColumnsSet(filters) {\r\n if (!filters) return;\r\n const newFilters = [];\r\n this.filters.forEach(f => newFilters.push(f));\r\n filters.forEach(f => newFilters.push(f));\r\n this.filters = newFilters;\r\n }\r\n\r\n gridFiltered(data) {\r\n this.filtered = data.filtered;\r\n this.filteredBy = data.filteredBy;\r\n }\r\n\r\n removeFilter(filter) {\r\n this.removeAdvancedFilter = filter;\r\n }\r\n\r\n statusIcon(status) {\r\n return LEAD_STATUS.icon(status);\r\n }\r\n\r\n onDataGridChanged(detail) {\r\n if (!detail || !detail.filteredData) return;\r\n this.filteredLeads = [];\r\n this.filteredLeads = detail.filteredData;\r\n this.countWithoutGeolocation = this.filteredLeads.filter(l => !l.geolocation).length;\r\n }\r\n\r\n @computedFrom('view', 'countWithoutGeolocation')\r\n get showCountWithoutGeolocation() {\r\n if (this.view === 'list') return false;\r\n return this.countWithoutGeolocation > 0;\r\n }\r\n\r\n @computedFrom('filteredLeads', 'view')\r\n get leadsDisplayedCount() {\r\n if (this.view === 'list') {\r\n this.countWithoutGeolocation = this.filteredLeads ? this.filteredLeads.filter(x => !x.geolocation).length : 0;\r\n return this.totalItems;\r\n }\r\n // For the map, display the total with geolocation unless there are any checked leads\r\n const checkedIds = this.leads.filter(x => x.selected).map(x => x.id);\r\n let total = this.totalItems;\r\n if (checkedIds.length) {\r\n total = checkedIds.length;\r\n this.countWithoutGeolocation = this.filteredLeads ? this.filteredLeads.filter(x => checkedIds.includes(x.id) && !x.geolocation).length : 0;\r\n }\r\n return total - this.countWithoutGeolocation;\r\n }\r\n\r\n @computedFrom('filteredLeads', 'countWithoutGeolocation', 'view')\r\n get leadsNotDisplayedWithoutGeolocationCount() {\r\n if (this.view === 'list') return this.countWithoutGeolocation;\r\n // For the map, display the total without geolocation unless there are any checked leads\r\n const checkedIds = this.leads.filter(x => x.selected).map(x => x.id);\r\n if (checkedIds.length) {\r\n return this.filteredLeads.filter(x => checkedIds.includes(x.id) && !x.geolocation).length;\r\n }\r\n return this.countWithoutGeolocation;\r\n }\r\n\r\n showView(view) {\r\n this.view = view;\r\n this.viewingMap = this.view === 'map';\r\n\r\n if (this.view === 'map') {\r\n this.loadMap = new Date().valueOf();\r\n }\r\n }\r\n\r\n viewLeadsFromKpi(leadIds) {\r\n if (leadIds === undefined) {\r\n this.viewingKpiLeads = false;\r\n this.leads = JSON.parse(JSON.stringify(this._displayedLeads));\r\n this._displayedLeads = undefined;\r\n this.restoreFilters = new Date().valueOf();\r\n } else {\r\n if (this.viewingKpiLeads) {\r\n // need to reset the list based on the original, not the current kpi list\r\n const originalLeads = JSON.parse(JSON.stringify(this._displayedLeads));\r\n this.leads = originalLeads.filter(x => leadIds.includes(x.id));\r\n } else {\r\n this.viewingKpiLeads = true;\r\n this._displayedLeads = JSON.parse(JSON.stringify(this.leads));\r\n this.leads = this.leads.filter(x => leadIds.includes(x.id));\r\n this.clearFilters = new Date().valueOf();\r\n }\r\n }\r\n this.reapplyDataGrid = new Date().valueOf();\r\n }\r\n}\r\n","import { bindable, observable } from 'aurelia-framework';\r\nimport { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { CRM } from 'services/crm';\r\nimport { I18n } from 'common/i18n';\r\nimport { formatPhone } from 'services/functions';\r\nimport { CssAnimator } from 'aurelia-animator-css';\r\nimport { TemplatingEngine } from 'aurelia-templating';\r\nimport { Dialer, DIALER_TEAM } from 'services/dialer';\r\nimport haversine from 'haversine';\r\nimport { c } from 'common/common';\r\n\r\nexport class LeadMap {\r\n static inject = [EventAggregator, CRM, I18n, CssAnimator, TemplatingEngine, Dialer];\r\n _ea;\r\n _crm;\r\n _i18n;\r\n _animator;\r\n _templatingEngine;\r\n _dialer;\r\n\r\n @bindable waitForLoad = false;\r\n @bindable({ changeHandler: '_reloadData' }) load;\r\n @bindable({ changeHandler: '_reloadData' }) leads;\r\n\r\n markers;\r\n @observable visibleMarkers;\r\n visibleLeadFilters = [{ value: '', keys: ['city', 'email', 'firstName', 'lastName', 'phone', 'state', 'address', 'zipCode', 'county', 'product', 'statusName', 'typeName'] }];\r\n @observable currentLead;\r\n selectId;\r\n\r\n constructor(ea, crm, i18n, animator, templatingEngine, dialer) {\r\n this._ea = ea;\r\n this._crm = crm;\r\n this._i18n = i18n;\r\n this._animator = animator;\r\n this._templatingEngine = templatingEngine;\r\n this._dialer = dialer;\r\n }\r\n\r\n attached() {\r\n this._loadLeads();\r\n this._loadCanAutoDial();\r\n }\r\n\r\n async _loadCanAutoDial() {\r\n try {\r\n this.canAutoDial = await this._dialer.canDial(DIALER_TEAM.NoPrompt);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n _reloadData() {\r\n this._loadLeads();\r\n }\r\n\r\n async _loadLeads() {\r\n try {\r\n if (this.waitForLoad && !this.load) return;\r\n if (!this.leads.length) {\r\n this.markers = [];\r\n return;\r\n }\r\n const markers = [];\r\n this.leads.forEach(l => {\r\n if (!l.point) return;\r\n markers.push({\r\n id: l.id,\r\n title: l.fullName,\r\n lat: l.point.latitude,\r\n lng: l.point.longitude,\r\n marker: 'fa-solid fa-user-shield',\r\n selected: l.selected,\r\n });\r\n });\r\n this.markers = markers;\r\n } catch (err) {\r\n console.log(err);\r\n } \r\n }\r\n\r\n currentLeadChanged() {\r\n if (!this.currentLead || !this.visibleLeads) return;\r\n try {\r\n this.visibleLeads.forEach(l => {\r\n l.milesBetween = haversine(this.currentLead, l.point, { unit: 'mile'});\r\n l.milesBetweenFormatted = c.Helpers.formatNumber(l.milesBetween, 1);\r\n });\r\n this.visibleLeads.sort((a, b) => a.milesBetween - b.milesBetween);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n visibleMarkersChanged() {\r\n try {\r\n if (!this.visibleMarkers) return;\r\n this.visibleLeads = this.visibleMarkers.map((m, i) => {\r\n const lead = this.leads.find(x => x.id === m.id);\r\n if (this.currentLead && lead && lead.point) {\r\n lead.milesBetween = haversine(this.currentLead, lead.point, { unit: 'mile'});\r\n lead.milesBetweenFormatted = c.Helpers.formatNumber(lead.milesBetween, 1);\r\n }\r\n return lead\r\n });\r\n this.visibleLeads.sort((a, b) => a.milesBetween - b.milesBetween);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n toggleList() {\r\n this.showList = !this.showList;\r\n if (this.showList) {\r\n this._animator.addClass(this.mapListEl, 'zeus-map-list-show');\r\n } else {\r\n this._animator.removeClass(this.mapListEl, 'zeus-map-list-show');\r\n }\r\n }\r\n\r\n popupContent = async(id, el) => {\r\n try {\r\n const lead = this.leads.find(x => x.id === id);\r\n let html = `
`;\r\n if (this.canAutoDial) {\r\n html += `
${this._i18n.tr('lead:view-and-auto-dial')}
`;\r\n } else {\r\n html += `
${this._i18n.tr('lead:view')}
`;\r\n }\r\n html += `
${this._i18n.tr('lead:power-score')}: ${lead.powerScore}
`;\r\n if (lead.phone) html += `
${formatPhone(lead.phone)}
`;\r\n if (lead.email) html += `
${lead.email}
`;\r\n html += `
${lead.formattedAddress}
`;\r\n html += '
';\r\n return {\r\n header: lead.fullName,\r\n body: html,\r\n };\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n openLead(leadId) {\r\n let action = this.canAutoDial ? 'auto-dial' : undefined;\r\n let tab = this.canAutoDial ? 'scripts' : undefined;\r\n this._ea.publish(c.EventKeys.site.openLead, { leadId, tab, action });\r\n }\r\n\r\n openStreetView(leadId) {\r\n const lead = this.leads.find(x => x.id === leadId);\r\n this.streetView = lead.point;\r\n if (this.showList) this.toggleList();\r\n }\r\n\r\n onStreetViewClosed() {\r\n this.streetView = undefined;\r\n }\r\n\r\n onMarkerOpened(detail) {\r\n window.setTimeout(() => {\r\n const popupEl = document.getElementById(`zeus-map-view-popup-${detail.id}`);\r\n if (popupEl) {\r\n this._templatingEngine.enhance({ element: popupEl, bindingContext: this });\r\n }\r\n }, 0);\r\n if (this.selectId === detail.id) return;\r\n const selectedLead = this.leads.find(x => x.id === detail.id);\r\n if (!this.showList) this.toggleList();\r\n this.selectLead(selectedLead);\r\n }\r\n\r\n onMarkerClosed() {\r\n if (!this.selectId) return;\r\n this.selectId = undefined;\r\n this.selectedLead = undefined;\r\n }\r\n\r\n selectLead(lead) {\r\n this.selectId = lead.id;\r\n this.selectedLead = lead;\r\n }\r\n\r\n clearSelectedItem() {\r\n this.selectId = undefined;\r\n this.selectedLead = undefined;\r\n }\r\n\r\n onMouseenter(lead) {\r\n this.highlightId = lead.id;\r\n }\r\n\r\n onMouseleave() {\r\n this.highlightId = undefined;\r\n }\r\n\r\n _onSelectedIdsChanged(ids) {\r\n console.log('lead-map._onSelectedIdsChanged', ids);\r\n }\r\n\r\n onMarkersSelected(detail) {\r\n const ids = detail.ids ?? [];\r\n const addToSelectedIds = [];\r\n ids.forEach(id => {\r\n if (this.selectedIds.includes(id)) return;\r\n addToSelectedIds.push(id);\r\n });\r\n this.selectedIds = [...this.selectedIds, ...addToSelectedIds];\r\n }\r\n\r\n clearSelected() {\r\n this.clearSelectedFromMap = new Date().valueOf();\r\n }\r\n}\r\n","import { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { Router } from 'aurelia-router';\r\nimport { Leads } from 'services/leads';\r\nimport { c } from 'common/common';\r\n\r\nexport class Lead {\r\n static inject = [EventAggregator, Router, Leads];\r\n _ea;\r\n _router;\r\n _leads;\r\n\r\n constructor(ea, router, leads) {\r\n this._ea = ea;\r\n this._router = router;\r\n this._leads = leads;\r\n }\r\n\r\n async canActivate(model) {\r\n try {\r\n const canAccess = await this._leads.canAccess(model.id);\r\n if (!canAccess) {\r\n this._router.navigate('#/members/leads');\r\n return false;\r\n }\r\n return true;\r\n } catch (err) {\r\n console.log(err);\r\n return false;\r\n }\r\n }\r\n\r\n activate(model) {\r\n this.id = model.id;\r\n this.tab = model.view;\r\n }\r\n\r\n leadLoaded(data) {\r\n this._ea.publish(c.EventKeys.site.setPageTitle, { title: data.name });\r\n }\r\n}","import { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { I18n } from 'common/i18n';\r\nimport { Leads, LEAD_STATUS } from 'services/leads';\r\nimport { LeadStatusValueConverter } from 'resources/value-converters/lead-status';\r\nimport { LeadDispositionValueConverter } from 'resources/value-converters/lead-disposition';\r\nimport { c } from 'common/common';\r\n\r\nexport class TabActivity {\r\n static inject = [EventAggregator, I18n, Leads, LeadStatusValueConverter, LeadDispositionValueConverter];\r\n _ea;\r\n _i18n;\r\n _leads;\r\n _lsvc;\r\n _ldvc;\r\n lead;\r\n\r\n _handlers = [];\r\n\r\n constructor(ea, i18n, leads, lsvc, ldvc) {\r\n this._ea = ea;\r\n this._i18n = i18n;\r\n this._leads = leads;\r\n this._lsvc = lsvc;\r\n this._ldvc = ldvc;\r\n }\r\n\r\n activate(model) {\r\n this.leadId = model.lead ? model.lead.id : model.id;\r\n this.style = model.style || 'card';\r\n this._load();\r\n }\r\n\r\n attached() {\r\n this._handlers.push(this._ea.subscribe(c.EventKeys.lead.updated, () => this._load()));\r\n this._handlers.push(this._ea.subscribe(c.EventKeys.toDos.updated, () => this._load()));\r\n }\r\n\r\n detached() {\r\n this._handlers.forEach(h => h.dispose());\r\n }\r\n\r\n async _load() {\r\n try {\r\n this.loading = true;\r\n const allDispositions = this._leads.allDispositions();\r\n this.activities = [];\r\n this.activities = await this._leads.activities(this.leadId);\r\n let dialCount = 0;\r\n this.activities.forEach(a => {\r\n if (a.isDial) dialCount++;\r\n if (!a.metadata) a.metadata = JSON.parse(a.metadataJson);\r\n if (a.metadata.disposition) {\r\n a.metadata.dispositionName = this._ldvc.toView(a.metadata.disposition);\r\n const disposition = allDispositions.find(x => x.key === a.metadata.disposition);\r\n if (disposition) {\r\n a.metadata.dispositionIcon = disposition.icon;\r\n a.metadata.dispositionIconClass = disposition.cssClass;\r\n } else {\r\n a.metadata.dispositionIcon = 'fa-strong fa-circle-question';\r\n }\r\n }\r\n if (a.metadata.status) {\r\n a.metadata.statusName = this._lsvc.toView(a.metadata.status);\r\n a.metadata.statusIcon = LEAD_STATUS.icon(a.metadata.status);\r\n }\r\n if (a.type !== 'disposition') return;\r\n if (a.disposition) return;\r\n a.disposition = a.metadata.disposition;\r\n });\r\n\r\n const headerLeft = this._i18n.tr('lead:dial-count', { count: dialCount });\r\n this._ea.publish(c.EventKeys.lead.tabHeader, { key: 'activity', headerLeft });\r\n } catch (err) {\r\n console.log(err);\r\n } finally {\r\n this.loading = false;\r\n }\r\n }\r\n}\r\n","import { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { I18n } from 'common/i18n';\r\nimport { Leads } from 'services/leads';\r\nimport { Security } from 'common/security';\r\nimport { c } from 'common/common';\r\n\r\nexport class TabAssignments {\r\n static inject = [EventAggregator, I18n, Leads, Security];\r\n _ea;\r\n _i18n;\r\n _leads;\r\n _security;\r\n\r\n assignments = [];\r\n\r\n constructor(ea, i18n, leads, security) {\r\n this._ea = ea;\r\n this._i18n = i18n;\r\n this._leads = leads;\r\n this._security = security;\r\n }\r\n\r\n activate(model) {\r\n this.lead = model;\r\n this._load();\r\n }\r\n\r\n async _load() {\r\n try {\r\n if (!this._security.isAdmin) return;\r\n this.assignments = await this._leads.assignments(this.lead.id);\r\n const headerLeft = this._i18n.tr('lead:assignment-count', { count: this.assignments.length });\r\n this._ea.publish(c.EventKeys.lead.tabHeader, { key: 'assignments', headerLeft });\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n viewLead(leadId) {\r\n this._ea.publish(c.EventKeys.site.openLead, { leadId });\r\n }\r\n}\r\n","export class TabDetails {\r\n activate(model) {\r\n this.lead = model;\r\n }\r\n}\r\n","export class TabNotes {\r\n leadId;\r\n\r\n constructor() {\r\n }\r\n\r\n activate(model) {\r\n this.leadId = model.leadId;\r\n this.minimal = model.minimal;\r\n }\r\n}\r\n","export class TabScripts {\r\n leadId;\r\n\r\n constructor() {\r\n }\r\n\r\n activate(model) {\r\n this.leadId = model.lead.id;\r\n this.scriptType = model.scriptType;\r\n this.scriptPerson = model.scriptPerson;\r\n }\r\n}\r\n","export class TrackingSystem {\r\n \r\n}","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".zeus-lms-filters {\\n display: flex;\\n align-items: center;\\n}\\n.zeus-lms-filters > * {\\n margin-left: var(--zeus-margin-sm);\\n}\\n\\n.zeus-lms-kpis {\\n display: flex;\\n justify-content: space-between;\\n align-items: center;\\n flex-wrap: wrap;\\n}\\n.zeus-lms-kpis > * {\\n flex: 25%;\\n display: flex;\\n justify-content: center;\\n}\\n\\n.zeus-lms-drilldown-kpis {\\n display: flex;\\n justify-content: space-between;\\n align-items: center;\\n flex-wrap: wrap;\\n}\\n.zeus-lms-drilldown-kpis > * {\\n flex: 20%;\\n display: flex;\\n justify-content: center;\\n}\\n\\n.zeus-lms-drilldown-agent {\\n display: flex;\\n justify-content: flex-start;\\n}\\n\\n.zeus-lms-drilldown-agent-leads-container {\\n display: flex;\\n flex-direction: column;\\n justify-content: center;\\n}\\n.zeus-lms-drilldown-agent-leads-container .zeus-lms-drilldown-agent-leads {\\n padding: var(--zeus-margin);\\n border: 1px dashed var(--kt-card-border-color);\\n border-radius: var(--zeus-margin-lg);\\n background: var(--kt-card-bg);\\n}\\n\\n.zeus-lms-agent-container {\\n width: 100%;\\n display: flex;\\n padding: var(--zeus-margin);\\n border: 1px dashed var(--kt-card-border-color);\\n border-radius: var(--zeus-margin-lg);\\n background: var(--kt-card-bg);\\n margin-bottom: var(--zeus-margin-lg);\\n}\\n.zeus-lms-agent-container .zeus-lms-agent-name {\\n flex: 20%;\\n}\\n.zeus-lms-agent-container .zeus-lms-agent-kpis {\\n flex: 80%;\\n}\\n\\n.zeus-lms-kpi-leads {\\n padding: var(--zeus-margin-lg);\\n display: flex;\\n flex-direction: column;\\n overflow: auto;\\n width: 100%;\\n height: 100%;\\n}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/members/leads/activity-dashboard.scss\"],\"names\":[],\"mappings\":\"AAAA;EACI,aAAA;EACA,mBAAA;AACJ;AACI;EACI,kCAAA;AACR;;AAGA;EACI,aAAA;EACA,8BAAA;EACA,mBAAA;EACA,eAAA;AAAJ;AAEI;EACI,SAAA;EACA,aAAA;EACA,uBAAA;AAAR;;AAIA;EACI,aAAA;EACA,8BAAA;EACA,mBAAA;EACA,eAAA;AADJ;AAGI;EACI,SAAA;EACA,aAAA;EACA,uBAAA;AADR;;AAKA;EACI,aAAA;EACA,2BAAA;AAFJ;;AAKA;EACI,aAAA;EACA,sBAAA;EACA,uBAAA;AAFJ;AAII;EACI,2BAAA;EACA,8CAAA;EACA,oCAAA;EACA,6BAAA;AAFR;;AAMA;EACI,WAAA;EACA,aAAA;EACA,2BAAA;EACA,8CAAA;EACA,oCAAA;EACA,6BAAA;EACA,oCAAA;AAHJ;AAKI;EACI,SAAA;AAHR;AAMI;EACI,SAAA;AAJR;;AAQA;EACI,8BAAA;EACA,aAAA;EACA,sBAAA;EACA,cAAA;EACA,WAAA;EACA,YAAA;AALJ\",\"sourcesContent\":[\".zeus-lms-filters {\\r\\n display: flex;\\r\\n align-items: center;\\r\\n\\r\\n > * {\\r\\n margin-left: var(--zeus-margin-sm);\\r\\n }\\r\\n}\\r\\n\\r\\n.zeus-lms-kpis {\\r\\n display: flex;\\r\\n justify-content: space-between;\\r\\n align-items: center;\\r\\n flex-wrap: wrap;\\r\\n\\r\\n > * {\\r\\n flex: 25%;\\r\\n display: flex;\\r\\n justify-content: center;\\r\\n }\\r\\n}\\r\\n\\r\\n.zeus-lms-drilldown-kpis {\\r\\n display: flex;\\r\\n justify-content: space-between;\\r\\n align-items: center;\\r\\n flex-wrap: wrap;\\r\\n\\r\\n > * {\\r\\n flex: 20%;\\r\\n display: flex;\\r\\n justify-content: center;\\r\\n }\\r\\n}\\r\\n\\r\\n.zeus-lms-drilldown-agent {\\r\\n display: flex;\\r\\n justify-content: flex-start;\\r\\n}\\r\\n\\r\\n.zeus-lms-drilldown-agent-leads-container {\\r\\n display: flex;\\r\\n flex-direction: column;\\r\\n justify-content: center;\\r\\n\\r\\n .zeus-lms-drilldown-agent-leads {\\r\\n padding: var(--zeus-margin);\\r\\n border: 1px dashed var(--kt-card-border-color);\\r\\n border-radius: var(--zeus-margin-lg);\\r\\n background: var(--kt-card-bg);\\r\\n }\\r\\n}\\r\\n\\r\\n.zeus-lms-agent-container {\\r\\n width: 100%;\\r\\n display: flex;\\r\\n padding: var(--zeus-margin);\\r\\n border: 1px dashed var(--kt-card-border-color);\\r\\n border-radius: var(--zeus-margin-lg);\\r\\n background: var(--kt-card-bg);\\r\\n margin-bottom: var(--zeus-margin-lg);\\r\\n\\r\\n .zeus-lms-agent-name {\\r\\n flex: 20%;\\r\\n }\\r\\n\\r\\n .zeus-lms-agent-kpis {\\r\\n flex: 80%;\\r\\n }\\r\\n}\\r\\n\\r\\n.zeus-lms-kpi-leads {\\r\\n padding: var(--zeus-margin-lg);\\r\\n display: flex;\\r\\n flex-direction: column;\\r\\n overflow: auto;\\r\\n width: 100%;\\r\\n height: 100%;\\r\\n}\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".zeus-dialog-closer {\\n position: absolute;\\n right: -10px;\\n top: -5px;\\n z-index: 2;\\n}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/members/leads/dialogs/lead-card-dialog2.scss\"],\"names\":[],\"mappings\":\"AAAA;EACI,kBAAA;EACA,YAAA;EACA,SAAA;EACA,UAAA;AACJ\",\"sourcesContent\":[\".zeus-dialog-closer {\\r\\n position: absolute;\\r\\n right: -10px;\\r\\n top: -5px;\\r\\n z-index: 2;\\r\\n}\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"\", \"\",{\"version\":3,\"sources\":[],\"names\":[],\"mappings\":\"\",\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"lead-card2 {\\n height: 100%;\\n}\\n\\n.zeus-lead-card {\\n display: flex;\\n justify-content: space-between;\\n flex-direction: column;\\n height: 100%;\\n overflow: auto;\\n}\\n@media (min-width: 992px) {\\n .zeus-lead-card {\\n flex-direction: row;\\n overflow: hidden;\\n }\\n}\\n\\n/* LEFT COLUMN */\\n.zeus-lead-card-left {\\n display: flex;\\n flex-direction: column;\\n flex: 25%;\\n max-width: 100%;\\n height: 100%;\\n padding: 0 var(--zeus-space-sm);\\n}\\n@media (min-width: 992px) {\\n .zeus-lead-card-left {\\n max-width: 500px;\\n overflow: hidden;\\n }\\n}\\n\\n.zeus-lead-card-nav {\\n display: flex;\\n justify-content: space-between;\\n margin-bottom: var(--zeus-space);\\n}\\n@media (min-width: 768px) {\\n .zeus-lead-card-nav {\\n margin-bottom: var(--zeus-space-xl);\\n }\\n}\\n\\n.zeus-lead-card-call-status {\\n position: relative;\\n padding-right: 20px;\\n}\\n.zeus-lead-card-call-status .badge {\\n position: absolute;\\n right: 0;\\n top: 0;\\n}\\n.zeus-lead-card-call-status i {\\n color: var(--kt-info);\\n}\\n\\n.zeus-lead-card-name {\\n display: flex;\\n margin-bottom: var(--zeus-space-sm);\\n}\\n\\n.zeus-lead-card-contact {\\n display: flex;\\n flex-direction: column;\\n font-weight: 600;\\n color: var(--kt-text-muted);\\n margin-bottom: var(--zeus-space);\\n}\\n.zeus-lead-card-contact > * {\\n margin-bottom: var(--zeus-space-sm);\\n}\\n.zeus-lead-card-contact > * .svg-icon {\\n width: 25px;\\n}\\n\\n.zeus-lead-detail-buttons {\\n margin-bottom: var(--zeus-space);\\n}\\n\\n.zeus-lead-detail-container {\\n flex-grow: 2;\\n overflow: auto;\\n}\\n\\n/* CENTER COLUMN */\\n.zeus-lead-card-center {\\n display: flex;\\n flex-direction: column;\\n flex: 45%;\\n flex-grow: 1;\\n height: 100%;\\n padding: 0 var(--zeus-space-sm);\\n}\\n@media (min-width: 992px) {\\n .zeus-lead-card-center {\\n overflow: hidden;\\n }\\n}\\n\\n.zeus-lead-card-tabs {\\n display: flex;\\n justify-content: center;\\n padding-bottom: var(--zeus-space);\\n}\\n.zeus-lead-card-tabs > * {\\n margin: 0 var(--zeus-space-xs);\\n}\\n\\n.zeus-lead-card-tab-container {\\n flex-grow: 1;\\n}\\n.zeus-lead-card-tab-container .card-header {\\n display: flex;\\n justify-content: space-between;\\n}\\n.zeus-lead-card-tab-container .card-header > * {\\n display: flex;\\n flex: 50%;\\n text-align: center;\\n justify-content: center;\\n}\\n.zeus-lead-card-tab-container .card-header > *:first-child {\\n flex: 25%;\\n text-align: left;\\n justify-content: flex-start;\\n}\\n.zeus-lead-card-tab-container .card-header > *:last-child {\\n flex: 25%;\\n text-align: right;\\n justify-content: flex-end;\\n}\\n.zeus-lead-card-tab-container .card-header > .zeus-half {\\n flex: 50%;\\n}\\n@media (min-width: 768px) {\\n .zeus-lead-card-tab-container .card-header > * {\\n flex: 30%;\\n }\\n}\\n@media (min-width: 992px) {\\n .zeus-lead-card-tab-container {\\n overflow: auto;\\n }\\n}\\n\\n/* RIGHT COLUMN */\\n.zeus-lead-card-right {\\n display: flex;\\n flex-direction: column;\\n flex: 30%;\\n max-width: 100%;\\n height: 100%;\\n padding: 0 var(--zeus-space);\\n overflow: auto;\\n}\\n.zeus-lead-card-right .card {\\n width: 100%;\\n}\\n@media (min-width: 992px) {\\n .zeus-lead-card-right {\\n max-width: 700px;\\n overflow: hidden;\\n }\\n}\\n\\n.zeus-pdf-container {\\n min-height: 600px;\\n}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/members/leads/lead-card2.scss\"],\"names\":[],\"mappings\":\"AAEA;EACI,YAAA;AADJ;;AAIA;EACI,aAAA;EACA,8BAAA;EACA,sBAAA;EACA,YAAA;EACA,cAAA;AADJ;AAGI;EAPJ;IAQQ,mBAAA;IACA,gBAAA;EAAN;AACF;;AAGA,gBAAA;AACA;EACI,aAAA;EACA,sBAAA;EACA,SAAA;EACA,eAAA;EACA,YAAA;EACA,+BAAA;AAAJ;AAEI;EARJ;IASQ,gBAAA;IACA,gBAAA;EACN;AACF;;AAEA;EACI,aAAA;EACA,8BAAA;EACA,gCAAA;AACJ;AACI;EALJ;IAMQ,mCAAA;EAEN;AACF;;AACA;EACI,kBAAA;EACA,mBAAA;AAEJ;AADI;EACI,kBAAA;EACA,QAAA;EACA,MAAA;AAGR;AAAI;EACI,qBAAA;AAER;;AAEA;EACI,aAAA;EACA,mCAAA;AACJ;;AAEA;EACI,aAAA;EACA,sBAAA;EACA,gBAAA;EACA,2BAAA;EACA,gCAAA;AACJ;AACI;EACI,mCAAA;AACR;AACQ;EACI,WAAA;AACZ;;AAIA;EACI,gCAAA;AADJ;;AAIA;EACI,YAAA;EACA,cAAA;AADJ;;AAIA,kBAAA;AACA;EACI,aAAA;EACA,sBAAA;EACA,SAAA;EACA,YAAA;EACA,YAAA;EACA,+BAAA;AADJ;AAGI;EARJ;IASQ,gBAAA;EAAN;AACF;;AAGA;EACI,aAAA;EACA,uBAAA;EACA,iCAAA;AAAJ;AAEI;EACI,8BAAA;AAAR;;AAIA;EACI,YAAA;AADJ;AAGI;EACI,aAAA;EACA,8BAAA;AADR;AAGQ;EACI,aAAA;EACA,SAAA;EACA,kBAAA;EACA,uBAAA;AADZ;AAGQ;EACI,SAAA;EACA,gBAAA;EACA,2BAAA;AADZ;AAGQ;EACI,SAAA;EACA,iBAAA;EACA,yBAAA;AADZ;AAIQ;EACI,SAAA;AAFZ;AAKQ;EACI;IACI,SAAA;EAHd;AACF;AAOI;EAnCJ;IAoCQ,cAAA;EAJN;AACF;;AAOA,iBAAA;AACA;EACI,aAAA;EACA,sBAAA;EACA,SAAA;EACA,eAAA;EACA,YAAA;EACA,4BAAA;EACA,cAAA;AAJJ;AAMI;EACI,WAAA;AAJR;AAOI;EAbJ;IAcQ,gBAAA;IACA,gBAAA;EAJN;AACF;;AAOA;EACI,iBAAA;AAJJ\",\"sourcesContent\":[\"@import \\\"./../../styles/responsive.scss\\\";\\r\\n\\r\\nlead-card2 {\\r\\n height: 100%;\\r\\n}\\r\\n\\r\\n.zeus-lead-card {\\r\\n display: flex;\\r\\n justify-content: space-between;\\r\\n flex-direction: column;\\r\\n height: 100%;\\r\\n overflow: auto;\\r\\n\\r\\n @media (min-width: $zeus-screen-md-min) {\\r\\n flex-direction: row;\\r\\n overflow: hidden;\\r\\n }\\r\\n}\\r\\n\\r\\n/* LEFT COLUMN */\\r\\n.zeus-lead-card-left {\\r\\n display: flex;\\r\\n flex-direction: column;\\r\\n flex: 25%;\\r\\n max-width: 100%;\\r\\n height: 100%;\\r\\n padding: 0 var(--zeus-space-sm);\\r\\n\\r\\n @media (min-width: $zeus-screen-md-min) {\\r\\n max-width: 500px;\\r\\n overflow: hidden;\\r\\n }\\r\\n}\\r\\n\\r\\n.zeus-lead-card-nav {\\r\\n display: flex;\\r\\n justify-content: space-between;\\r\\n margin-bottom: var(--zeus-space);\\r\\n\\r\\n @media (min-width: $zeus-screen-sm-min) {\\r\\n margin-bottom: var(--zeus-space-xl);\\r\\n }\\r\\n}\\r\\n\\r\\n.zeus-lead-card-call-status {\\r\\n position: relative;\\r\\n padding-right: 20px;\\r\\n .badge {\\r\\n position: absolute;\\r\\n right: 0;\\r\\n top: 0;\\r\\n }\\r\\n\\r\\n i {\\r\\n color: var(--kt-info);\\r\\n }\\r\\n}\\r\\n\\r\\n.zeus-lead-card-name {\\r\\n display: flex;\\r\\n margin-bottom: var(--zeus-space-sm);\\r\\n}\\r\\n\\r\\n.zeus-lead-card-contact {\\r\\n display: flex;\\r\\n flex-direction: column;\\r\\n font-weight: 600;\\r\\n color: var(--kt-text-muted);\\r\\n margin-bottom: var(--zeus-space);\\r\\n\\r\\n > * {\\r\\n margin-bottom: var(--zeus-space-sm);\\r\\n\\r\\n .svg-icon {\\r\\n width: 25px;\\r\\n }\\r\\n }\\r\\n}\\r\\n\\r\\n.zeus-lead-detail-buttons {\\r\\n margin-bottom: var(--zeus-space);\\r\\n}\\r\\n\\r\\n.zeus-lead-detail-container {\\r\\n flex-grow: 2;\\r\\n overflow: auto;\\r\\n}\\r\\n\\r\\n/* CENTER COLUMN */\\r\\n.zeus-lead-card-center {\\r\\n display: flex;\\r\\n flex-direction: column;\\r\\n flex: 45%;\\r\\n flex-grow: 1;\\r\\n height: 100%;\\r\\n padding: 0 var(--zeus-space-sm);\\r\\n\\r\\n @media (min-width: $zeus-screen-md-min) {\\r\\n overflow: hidden;\\r\\n }\\r\\n}\\r\\n\\r\\n.zeus-lead-card-tabs {\\r\\n display: flex;\\r\\n justify-content: center;\\r\\n padding-bottom: var(--zeus-space);\\r\\n\\r\\n > * {\\r\\n margin: 0 var(--zeus-space-xs);\\r\\n }\\r\\n}\\r\\n\\r\\n.zeus-lead-card-tab-container {\\r\\n flex-grow: 1;\\r\\n\\r\\n .card-header {\\r\\n display: flex;\\r\\n justify-content: space-between;\\r\\n\\r\\n > * {\\r\\n display: flex;\\r\\n flex: 50%;\\r\\n text-align: center;\\r\\n justify-content: center;\\r\\n }\\r\\n > *:first-child {\\r\\n flex: 25%;\\r\\n text-align: left;\\r\\n justify-content: flex-start;\\r\\n }\\r\\n > *:last-child {\\r\\n flex: 25%;\\r\\n text-align: right;\\r\\n justify-content: flex-end;\\r\\n }\\r\\n\\r\\n > .zeus-half {\\r\\n flex: 50%;\\r\\n }\\r\\n\\r\\n @media (min-width: $zeus-screen-sm-min) {\\r\\n > * {\\r\\n flex: 30%;\\r\\n }\\r\\n }\\r\\n }\\r\\n\\r\\n @media (min-width: $zeus-screen-md-min) {\\r\\n overflow: auto;\\r\\n }\\r\\n}\\r\\n\\r\\n/* RIGHT COLUMN */\\r\\n.zeus-lead-card-right {\\r\\n display: flex;\\r\\n flex-direction: column;\\r\\n flex: 30%;\\r\\n max-width: 100%;\\r\\n height: 100%;\\r\\n padding: 0 var(--zeus-space);\\r\\n overflow: auto;\\r\\n\\r\\n .card {\\r\\n width: 100%;\\r\\n }\\r\\n\\r\\n @media (min-width: $zeus-screen-md-min) {\\r\\n max-width: 700px;\\r\\n overflow: hidden\\r\\n }\\r\\n}\\r\\n\\r\\n.zeus-pdf-container {\\r\\n min-height: 600px;\\r\\n}\\r\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".zeus-filter-row {\\n display: flex;\\n justify-content: space-between;\\n align-items: center;\\n}\\n.zeus-filter-row .zeus-filter-row-filters {\\n flex: 2;\\n flex-wrap: wrap;\\n display: flex;\\n justify-content: flex-end;\\n align-items: center;\\n}\\n\\n.zeus-lead-map {\\n border: 1px solid #ddd;\\n border-radius: var(--zeus-margin-lg);\\n height: 75vh;\\n width: 100%;\\n}\\n.zeus-lead-map .zeus-slippyMap {\\n border-radius: var(--zeus-margin-lg);\\n}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/members/leads/lead-list.scss\"],\"names\":[],\"mappings\":\"AAAA;EACI,aAAA;EACA,8BAAA;EACA,mBAAA;AACJ;AACI;EACI,OAAA;EACA,eAAA;EACA,aAAA;EACA,yBAAA;EACA,mBAAA;AACR;;AAGA;EACI,sBAAA;EACA,oCAAA;EACA,YAAA;EACA,WAAA;AAAJ;AAEI;EACI,oCAAA;AAAR\",\"sourcesContent\":[\".zeus-filter-row {\\r\\n display: flex;\\r\\n justify-content: space-between;\\r\\n align-items: center;\\r\\n\\r\\n .zeus-filter-row-filters {\\r\\n flex: 2;\\r\\n flex-wrap: wrap;\\r\\n display: flex;\\r\\n justify-content: flex-end;\\r\\n align-items: center;\\r\\n }\\r\\n}\\r\\n\\r\\n.zeus-lead-map {\\r\\n border: 1px solid #ddd;\\r\\n border-radius: var(--zeus-margin-lg);\\r\\n height: 75vh;\\r\\n width: 100%;\\r\\n\\r\\n .zeus-slippyMap {\\r\\n border-radius: var(--zeus-margin-lg);\\r\\n }\\r\\n}\\r\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Module\nvar code = \"\";\n// Exports\nexport default code;","// Module\nvar code = \"\";\n// Exports\nexport default code;","// Module\nvar code = \"\";\n// Exports\nexport default code;","// Module\nvar code = \"\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\";\n// Exports\nexport default code;","// Module\nvar code = \"\";\n// Exports\nexport default code;","// Module\nvar code = \"\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\";\n// Exports\nexport default code;"],"names":[],"sourceRoot":""}