{"version":3,"file":"app-2ad0908c.9729664bca28a8e6916d.bundle.js","mappings":";;;;;;;;;;;;;;;;AAAA;AACA;AACA;AAEA;AAKA;AAAA;AAHA;AAIA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAjCA;;;;;;;;;;;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AAEA;AAMA;AAAA;AAHA;AAIA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AA7BA;;;;;;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AAEA;AASA;AAAA;AANA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AA5DA;;;;;;;;;;;;;;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAMA;AAAA;AAHA;AAIA;AACA;AACA;AACA;AACA;AAEA;AAGA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAxCA;;;;;;;;;;;;;;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AAEA;AAOA;AAAA;AALA;AACA;AACA;AAIA;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;AAEA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAEA;AAjDA;;;;;;;;;;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AAEA;AAaA;AAAA;AAXA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAvEA;;;;;;;;;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AAEA;AASA;AAAA;AAPA;AACA;AACA;AAEA;AAIA;AACA;AACA;AACA;AACA;AAEA;AAGA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AArCA;;;;;;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AAEA;AAOA;AAAA;AALA;AACA;AAKA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAtCA;;;;;;;;;;;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAIA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAGA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AA1CA;;;;;;;;;;;;;;;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAQA;AAAA;AALA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AArFA;;;;;;;;;;;;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AAEA;AAGA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAGA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AA7EA;;;;;;;;;;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AAWA;AAAA;AATA;AACA;AACA;AACA;AAEA;AACA;AAIA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;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;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;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;AACA;AACA;AAEA;AACA;AACA;AAEA;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;AACA;AACA;AAEA;AACA;AACA;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAxYA;;;;;;;;;;;;;;;;ACTA;AACA;AAEA;AAKA;AAAA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAxBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAoBA;AAAA;AAlBA;AACA;AACA;AACA;AACA;AACA;AAAA;AAIA;AAEA;AACA;AAEA;AACA;AAIA;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;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;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;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;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;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;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;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAzSA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AAEA;AAWA;AAAA;AATA;AACA;AAEA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AAEA;AAGA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA9CA;;;;;;;;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AAEA;AAsBA;AAAA;AApBA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AAIA;AACA;AACA;AACA;AACA;AAEA;AASA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA7GA;;;;;;;;;;;;;;;;;;ACPA;AACA;AACA;AACA;AAEA;AASA;AAAA;AAPA;AACA;AAEA;AACA;AAIA;AACA;AACA;AACA;AAEA;AAGA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAxCA;;;;;;;;;;;;;;ACLA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AAuBA;AAAA;AArBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAEA;AACA;AACA;AAEA;AAEA;AAmQA;AACA;AAAA;AAkBA;AACA;AACA;AArRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAEA;AAEA;AACA;AAEA;AAEA;AACA;AAEA;AAEA;AACA;AAEA;AAEA;AACA;AAEA;AAEA;AACA;AACA;AAEA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;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;AAEA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;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;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAGA;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;AAEA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAMA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAOA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAneA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;;;AClCA;AACA;AACA;AAEA;AASA;AAAA;AAPA;AACA;AACA;AAEA;AAIA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;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;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAEA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;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;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;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;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AA5PA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AAmBA;AAAA;AAjBA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAGA;AAAA;AAAA;AAAA;AACA;AA4GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AASA;AACA;AACA;AACA;AACA;AACA;AAAA;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA/IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAEA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAaA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAUA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;AC3QA;AACA;AACA;AACA;AACA;AACA;AAEA;AAgBA;AAAA;AAdA;AACA;AAGA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AAKA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAtMA;;;;;;;;;;;;;;;;;;;ACPA;AACA;AACA;AACA;AAEA;AACA;AAEA;AAcA;AAAA;AAZA;AACA;AACA;AAGA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAKA;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;AAEA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AA3HA;;;;;;;;;;;;;;;ACRA;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;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA","sources":["webpack://www.zeusteam.com/./src/admin/dialogs/assign-roles.js","webpack://www.zeusteam.com/./src/admin/dialogs/change-parent.js","webpack://www.zeusteam.com/./src/admin/dialogs/inactivate-member.js","webpack://www.zeusteam.com/./src/admin/dialogs/reset-password-now.js","webpack://www.zeusteam.com/./src/admin/dialogs/set-level.js","webpack://www.zeusteam.com/./src/admin/dialogs/set-mentor.js","webpack://www.zeusteam.com/./src/admin/kpis/dialog/edit-kpi-template.js","webpack://www.zeusteam.com/./src/admin/kpis/kpi-templates.js","webpack://www.zeusteam.com/./src/admin/landing-pages/dialog/landing-page-editor.js","webpack://www.zeusteam.com/./src/admin/landing-pages/list.js","webpack://www.zeusteam.com/./src/admin/leads/_index.js","webpack://www.zeusteam.com/./src/admin/leads/auto-assign-filters.js","webpack://www.zeusteam.com/./src/admin/leads/dialogs/assign-lead.js","webpack://www.zeusteam.com/./src/admin/leads/dialogs/edit-script-dialog.js","webpack://www.zeusteam.com/./src/admin/leads/dialogs/edit-script-name-dialog.js","webpack://www.zeusteam.com/./src/admin/leads/dialogs/edit-source.js","webpack://www.zeusteam.com/./src/admin/leads/dialogs/script-option-dialog.js","webpack://www.zeusteam.com/./src/admin/leads/import-leads.js","webpack://www.zeusteam.com/./src/admin/leads/lead-pool-grid.js","webpack://www.zeusteam.com/./src/admin/leads/opportunities.js","webpack://www.zeusteam.com/./src/admin/leads/print-templates.js","webpack://www.zeusteam.com/./src/admin/leads/scripts.js","webpack://www.zeusteam.com/./src/admin/leads/sources.js","webpack://www.zeusteam.com/./src/admin/dialogs/assign-roles.scss","webpack://www.zeusteam.com/./src/admin/leads/dialogs/edit-script-dialog.scss","webpack://www.zeusteam.com/./src/admin/leads/print-templates.scss","webpack://www.zeusteam.com/./src/admin/leads/scripts.scss","webpack://www.zeusteam.com/./src/admin/dialogs/assign-roles.html","webpack://www.zeusteam.com/./src/admin/dialogs/change-parent.html","webpack://www.zeusteam.com/./src/admin/dialogs/inactivate-member.html","webpack://www.zeusteam.com/./src/admin/dialogs/reset-password-now.html","webpack://www.zeusteam.com/./src/admin/dialogs/set-level.html","webpack://www.zeusteam.com/./src/admin/dialogs/set-mentor.html","webpack://www.zeusteam.com/./src/admin/kpis/dialog/edit-kpi-template.html","webpack://www.zeusteam.com/./src/admin/kpis/kpi-templates.html","webpack://www.zeusteam.com/./src/admin/landing-pages/dialog/landing-page-editor.html","webpack://www.zeusteam.com/./src/admin/landing-pages/list.html","webpack://www.zeusteam.com/./src/admin/leads/_index.html","webpack://www.zeusteam.com/./src/admin/leads/auto-assign-filters.html","webpack://www.zeusteam.com/./src/admin/leads/dialogs/assign-lead.html","webpack://www.zeusteam.com/./src/admin/leads/dialogs/edit-script-dialog.html","webpack://www.zeusteam.com/./src/admin/leads/dialogs/edit-script-name-dialog.html","webpack://www.zeusteam.com/./src/admin/leads/dialogs/edit-source.html","webpack://www.zeusteam.com/./src/admin/leads/dialogs/script-option-dialog.html","webpack://www.zeusteam.com/./src/admin/leads/import-leads.html","webpack://www.zeusteam.com/./src/admin/leads/lead-pool-grid.html","webpack://www.zeusteam.com/./src/admin/leads/opportunities.html","webpack://www.zeusteam.com/./src/admin/leads/print-templates.html","webpack://www.zeusteam.com/./src/admin/leads/scripts.html","webpack://www.zeusteam.com/./src/admin/leads/sources.html"],"sourcesContent":["import { DialogController } from 'aurelia-dialog';\r\nimport { Notifier } from 'common/ui';\r\nimport { Api } from 'common/server';\r\n\r\nexport class AssignRoles {\r\n static inject = [DialogController, Notifier, Api];\r\n id;\r\n userRoles;\r\n\r\n constructor(dialogController, notifier, api) {\r\n this.dialogController = dialogController;\r\n this._notifier = notifier;\r\n this._api = api;\r\n }\r\n\r\n activate(model) {\r\n this.id = model.memberId;\r\n }\r\n\r\n async attached() {\r\n await this._load();\r\n }\r\n\r\n async _load() {\r\n this.userRoles = await this._api.get(`member/${encodeURIComponent(this.id)}/roles`);\r\n }\r\n\r\n async toggleUserRole(userRole) {\r\n try {\r\n const url = `member/${encodeURIComponent(this.id)}/${!userRole.isInRole ? 'assign-to-role' : 'remove-from-role'}/${encodeURIComponent(userRole.roleId)}`;\r\n await this._api.post(url);\r\n // userRole.isInRole = !userRole.isInRole;\r\n this._notifier.success('roles-assign-success');\r\n } catch (err) {\r\n this._notifier.generalError(); \r\n }\r\n }\r\n}\r\n","import { DialogController } from 'aurelia-dialog';\r\nimport { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { Api } from 'common/server';\r\nimport { Notifier } from 'common/ui';\r\nimport { c } from 'common/common';\r\n\r\nexport class ChangeParent {\r\n static inject = [DialogController, EventAggregator, Api, Notifier];\r\n\r\n\tmemberId = null;\r\n\tnewParentEmail = '';\r\n\r\n\tconstructor(dialogController, eventAggregator, api, notifier) {\r\n this.dialogController = dialogController;\r\n\t\tthis._ea = eventAggregator;\r\n\t\tthis.api = api;\r\n\t\tthis.notifier = notifier;\r\n\t}\r\n\r\n activate(model) {\r\n this.memberId = model.memberId;\r\n }\r\n\r\n\tasync activateMember() {\r\n\t\ttry {\r\n\t\t await this.api.get('admin/activate-member?id=' + encodeURIComponent(this.memberId) + '&newParentEmail=' + encodeURIComponent(this.newParentEmail));\r\n this.notifier.success(this.newParentEmail ? 'activate-agent-with-direct-upline-success' : 'activate-agent-success', { directUplineEmail: this.newParentEmail });\r\n this._ea.publish(c.EventKeys.memberUpdated, { memberId: this.memberId });\r\n this.dialogController.ok();\r\n } catch (err) {\r\n console.log(err);\r\n this.notifier.generalError();\r\n }\r\n\t}\r\n\r\n}\r\n","import { DialogController } from 'aurelia-dialog';\r\nimport {EventAggregator} from 'aurelia-event-aggregator';\r\nimport {Api} from 'common/server';\r\nimport {Notifier} from 'common/ui';\r\n\r\nexport class InactivateMember {\r\n static inject = [DialogController, EventAggregator, Api, Notifier];\r\n\r\n memberId = null;\r\n newParentEmail = '';\r\n reason = 'Inactive';\r\n sendEmail = false;\r\n requireNewDirectUpline = true;\r\n\r\n constructor(dialogController, eventAggregator, api, notifier) {\r\n this.dialogController = dialogController;\r\n this.eventAggregator = eventAggregator;\r\n this.api = api;\r\n this.notifier = notifier;\r\n }\r\n\r\n activate(model) {\r\n this.memberId = model.memberId;\r\n }\r\n\r\n async attached() {\r\n await this.loadMember();\r\n }\r\n\r\n async loadMember() {\r\n try {\r\n this.requireNewDirectUpline = false;\r\n const data = await this.api.getData('member/' + this.memberId);\r\n this.requireNewDirectUpline = data.numberOfFirstLineChildren > 0;\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n async tryInactivate() {\r\n if (this.requireNewDirectUpline && this.newParentEmail.length === 0) {\r\n this.notifier.error('profile-inactivate-no-direct-upline');\r\n return;\r\n }\r\n\r\n const model = {\r\n newDirectUplineEmail: this.newParentEmail,\r\n reason: this.reason,\r\n sendEmail: this.sendEmail\r\n };\r\n\r\n try {\r\n const data = await this.api.post('member/' + this.memberId + '/inactivate', model);\r\n if (!data.success) {\r\n this.notifier.errorText(data.failureReason);\r\n return;\r\n }\r\n this.notifier.successText('The user has been marked as ' + this.reason + ' and all first line team members have been assigned to ' + this.newParentEmail + '. Please Note: This process may take up to 15 minutes to complete. Refresh the page to see the updated status.');\r\n this.dialogController.ok();\r\n } catch (err) {\r\n console.log(err);\r\n this.notifier.generalError();\r\n }\r\n }\r\n\r\n}\r\n","import { DialogController } from 'aurelia-dialog';\r\nimport { Api } from 'common/server';\r\nimport { Notifier } from 'common/ui';\r\nimport { c } from 'common/common';\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 ResetPasswordNow {\r\n static inject = [DialogController, Api, Notifier, NewInstance.of(ValidationController)]\r\n\r\n\tmemberId = null;\r\n\tpassword = '';\r\n\r\n\tconstructor(dialogController, api, notifier, validationController) {\r\n this.dialogController = dialogController;\r\n\t\tthis.api = api;\r\n\t\tthis.notifier = notifier;\r\n\t\tthis.validationController = validationController;\r\n\t\tthis.validationController.addRenderer(new BootstrapFormValidationRenderer());\r\n\r\n\t\tValidationRules\r\n .ensure('password').required().minLength(6).matches(c.RegEx.strongPassword)\r\n .on(this);\r\n\t}\r\n\r\n\tactivate(model) {\r\n this.memberId = model.memberId;\r\n\t}\r\n\r\n async reset() {\r\n try {\r\n const v = await this.validationController.validate();\r\n if (!v.valid) return;\r\n\r\n const model = {\r\n id: this.memberId,\r\n password: this.password\r\n };\r\n await this.api.post('member/reset-password-now', model);\r\n this.notifier.success('login-reset-confirmation');\r\n this.dialogController.ok();\r\n } catch (err) {\r\n console.log(err);\r\n this.notifier.generalError();\r\n }\r\n\t}\r\n\r\n}\r\n","import { DialogController } from 'aurelia-dialog';\r\nimport { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { Api } from 'common/server';\r\nimport { Notifier } from 'common/ui';\r\nimport { Levels } from 'services/levels';\r\nimport { c } from 'common/common';\r\n\r\nexport class SetLevel {\r\n static inject = [DialogController, EventAggregator, Api, Notifier, Levels];\r\n _levels;\r\n memberId = null;\r\n member = null;\r\n levels = [];\r\n\r\n constructor(dialogController, eventAggregator, api, notifier, levels) {\r\n this.dialogController = dialogController;\r\n this._ea = eventAggregator;\r\n this.api = api;\r\n this.notifier = notifier;\r\n this._levels = levels;\r\n }\r\n\r\n activate(model) {\r\n this.memberId = model.memberId;\r\n }\r\n\r\n async attached() {\r\n try {\r\n this.member = await this.api.get('member/' + encodeURIComponent(this.memberId));\r\n const data = await this._levels.byType();\r\n this.lifeLevels = data.lifeLevels;\r\n this.annuityLevels = data.annuityLevels;\r\n this.hmaLevels = data.hmaLevels;\r\n } catch (err) {\r\n console.log(err);\r\n this.notifier.generalError();\r\n }\r\n }\r\n\r\n async trySetLevel(levelType, memberProperty) {\r\n const model = {\r\n id: this.memberId,\r\n levelType,\r\n level: this.member[memberProperty],\r\n };\r\n\r\n try {\r\n await this.api.post('admin/set-level', model);\r\n this.notifier.successText('The level has been set');\r\n this._ea.publish(c.EventKeys.memberUpdated, { memberId: this.memberId });\r\n } catch (err) {\r\n console.log(err);\r\n this.notifier.generalError();\r\n }\r\n }\r\n\r\n}\r\n","import { DialogController } from 'aurelia-dialog';\r\nimport { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { Mentors } from 'services/mentors';\r\nimport { Notifier } from 'common/ui';\r\nimport { ROLE } from 'common/constants';\r\nimport { c } from 'common/common';\r\n\r\nexport class SetMentor {\r\n static inject = [DialogController, EventAggregator, Mentors, Notifier];\r\n dialogController;\r\n _ea;\r\n _mentors;\r\n _notifier;\r\n\r\n memberId = null;\r\n mentor;\r\n deleteText = 'admin:remove-mentor';\r\n showDeleteConfirm = false;\r\n ROLE = ROLE;\r\n\r\n\tconstructor(dialogController, ea, mentors, notifier) {\r\n this.dialogController = dialogController;\r\n this._ea = ea;\r\n\t\tthis._mentors = mentors;\r\n\t\tthis._notifier = notifier;\r\n\t}\r\n\r\n activate(model) {\r\n this.memberId = model.memberId;\r\n this._load();\r\n }\r\n\r\n async _load() {\r\n try {\r\n this.currentMentor = await this._mentors.forAgent(this.memberId);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n\tasync setMentor() {\r\n\t\ttry {\r\n\t\t await this._mentors.assignMentor(this.memberId, this.mentor.id);\r\n this._ea.publish(c.EventKeys.mentor.assigned, { mentor: this.mentor });\r\n this._notifier.success('set-mentor-success');\r\n this.dialogController.ok();\r\n } catch (err) {\r\n console.log(err);\r\n this._notifier.generalError();\r\n }\r\n\t}\r\n\r\n resetDelete() {\r\n this.showDeleteConfirm = false;\r\n this.deleteText = 'admin:remove-mentor';\r\n }\r\n\r\n async deleteMentor() {\r\n if (!this.showDeleteConfirm) {\r\n this.showDeleteConfirm = true;\r\n this.deleteText = 'admin:remove-mentor-confirm';\r\n return;\r\n }\r\n\r\n this.showDeleteConfirm = false;\r\n if (this.deleting) return;\r\n try {\r\n this.deleting = true;\r\n await this._mentors.removeMentor(this.memberId);\r\n this._ea.publish(c.EventKeys.mentor.removed, {});\r\n this._notifier.success('admin:remove-mentor-success');\r\n this._load();\r\n } catch(err) {\r\n this.resetDelete();\r\n } finally {\r\n this.deleting = false;\r\n }\r\n }\r\n}\r\n","import { DialogController } from 'aurelia-dialog';\r\nimport { NewInstance } from 'aurelia-dependency-injection';\r\nimport { ValidationRules, ValidationController } from 'aurelia-validation';\r\nimport { BootstrapFormValidationRenderer } from 'validation/bootstrap-form-validation-renderer';\r\nimport { Kpis } from 'services/kpis';\r\n\r\nexport class EditKpiTemplate {\r\n static inject = [DialogController, NewInstance.of(ValidationController), Kpis]\r\n dialogController;\r\n _validationController;\r\n _kpis;\r\n\r\n kpi;\r\n kpiGoal;\r\n\r\n constructor(dialogController, validationController, kpis) {\r\n this.dialogController = dialogController;\r\n this.dialogController.settings.centerHorizontalOnly = true;\r\n this._validationController = validationController;\r\n this._validationController.addRenderer(new BootstrapFormValidationRenderer());\r\n this._kpis = kpis;\r\n\r\n ValidationRules\r\n .ensure(m => m.kpiGoal).required().satisfiesRule('integerRange', 1, 999999999)\r\n .on(this);\r\n }\r\n\r\n activate(model) {\r\n this.kpi = model;\r\n this.kpiGoal = model.kpiGoal;\r\n this._validationController.reset();\r\n }\r\n\r\n async save() {\r\n try {\r\n const v = await this._validationController.validate();\r\n if (!v.valid) return;\r\n await this._kpis.updateTemplate(this.kpi, Number(this.kpiGoal));\r\n this.dialogController.ok();\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n}\r\n","import { PLATFORM } from 'aurelia-pal';\r\nimport { Kpis } from 'services/kpis';\r\nimport { EditKpiTemplate } from './dialog/edit-kpi-template';\r\nimport { DialogService } from 'aurelia-dialog';\r\nPLATFORM.moduleName('./dialog/edit-kpi-template');\r\n\r\nexport class KpiTemplates {\r\n static inject = [Kpis, DialogService];\r\n _kpis;\r\n _dialogService;\r\n\r\n templates;\r\n\r\n constructor(kpis, dialogService) {\r\n this._kpis = kpis;\r\n\t\tthis._dialogService = dialogService;\r\n }\r\n\r\n attached() {\r\n this._load();\r\n }\r\n\r\n async _load() {\r\n try {\r\n this.templates = await this._kpis.templates();\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n async toggleKpiActive(kpi) {\r\n try {\r\n await this._kpis.activateTemplate(kpi, !kpi.isActive);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n openEditor(kpi) {\r\n\t this._dialogService.open({ viewModel: EditKpiTemplate, model: kpi }).whenClosed(response => {\r\n\t if (response.wasCancelled) return;\r\n this._load();\r\n\t });\r\n }\r\n}\r\n","import { DialogController } from 'aurelia-dialog';\r\nimport { NewInstance } from 'aurelia-dependency-injection';\r\nimport { ValidationRules, ValidationController } from 'aurelia-validation';\r\nimport { BootstrapFormValidationRenderer } from 'validation/bootstrap-form-validation-renderer';\r\nimport { I18n } from 'common/i18n';\r\nimport { Api } from 'common/server';\r\nimport { Notifier } from 'common/ui';\r\nimport { UiWidgets } from 'services/ui-widgets';\r\nimport { c } from 'common/common';\r\n\r\nexport class LandingPageEditor {\r\n static inject = [DialogController, NewInstance.of(ValidationController), I18n, Api, Notifier, UiWidgets];\r\n slug = '';\r\n\r\n constructor(dialogController, validationController, i18n, api, notifier, uiWidgets) {\r\n this.dialogController = dialogController;\r\n this.dialogController.settings.centerHorizontalOnly = true;\r\n this.validationController = validationController;\r\n this.validationController.addRenderer(new BootstrapFormValidationRenderer());\r\n this._i18n = i18n;\r\n this._api = api;\r\n this._notifier = notifier;\r\n this._uiWidgets = uiWidgets;\r\n\r\n ValidationRules\r\n .ensure('slug').required().matches(c.RegEx.slug)\r\n .on(this);\r\n }\r\n\r\n activate(model) {\r\n this.slug = '';\r\n this.landingPageType = model.type;\r\n this.validationController.reset();\r\n }\r\n\r\n async save() {\r\n try {\r\n const v = await this.validationController.validate();\r\n if (!v.valid) return;\r\n\r\n const saveModel = { key: this.slug, type: this.landingPageType };\r\n\r\n const data = await this._api.post('landing-page', saveModel);\r\n for (var w of data.uiWidgets) {\r\n this._uiWidgets.addToCache(w);\r\n }\r\n this._notifier.success(`Landing page ${this.slug} has been saved`);\r\n this.dialogController.ok({ key: this.slug });\r\n } catch (err) {\r\n this._notifier.error('An error occurred');\r\n }\r\n }\r\n}\r\n","import { PLATFORM } from 'aurelia-pal';\r\nimport { Notifier } from 'common/ui';\r\nimport { Api } from 'common/server';\r\nimport { I18n } from 'common/i18n';\r\nimport { LandingPageEditor } from './dialog/landing-page-editor';\r\nimport { DialogService } from 'aurelia-dialog';\r\nimport environment from '../../../config/environment.json';\r\nimport { ConfirmDialog } from 'common/dialogs/confirm/confirm-dialog';\r\nPLATFORM.moduleName('common/dialogs/confirm/confirm-dialog');\r\nPLATFORM.moduleName('./dialog/landing-page-editor');\r\n\r\nexport class LandingPageList {\r\n static inject = [Notifier, Api, I18n, DialogService];\r\n\r\n landingPageType = 'Webinar';\r\n landingPages = [];\r\n editLandingPage;\r\n _loadKey;\r\n\r\n constructor(notifier, api, i18n, dialogService) {\r\n this._notifier = notifier;\r\n this._api = api;\r\n this._i18n = i18n;\r\n this._dialogService = dialogService;\r\n }\r\n\r\n async attached() {\r\n try {\r\n const secretData = await this._api.get('landing-page-secret');\r\n this.secret = secretData.secret;\r\n this._load();\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n setType(type) {\r\n if (type === this.landingPageType) return;\r\n this.landingPageType = type;\r\n this._load();\r\n }\r\n\r\n async _load() {\r\n this.landingPages = [];\r\n\r\n try {\r\n this.landingPages = await this._api.get(`landing-page/${encodeURIComponent(this.landingPageType)}`);\r\n this.editLandingPage = undefined;\r\n if (!this.landingPages.length) return;\r\n this.landingPages = this.landingPages.sort((a,b) => a.key.localeCompare(b.key));\r\n if (!this._loadKey) this._loadKey = 'template';\r\n let found = false;\r\n for (let lp of this.landingPages) {\r\n if (this._loadKey !== lp.key) continue;\r\n this.display(lp);\r\n found = true;\r\n }\r\n if (!found) this.display(this.landingPages[0]);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n deleteLandingPage() {\r\n const model = { key: 'delete-landing-page', okButtonClass: 'btn-danger', messageObject: { name: this.editLandingPage.key } };\r\n\t this._dialogService.open({ viewModel: ConfirmDialog, model, ignoreTransitions: true }).whenClosed(async(response) => {\r\n\t if (response.wasCancelled) return;\r\n try {\r\n const deleteResponse = await this._api.delete(`landing-page/${encodeURIComponent(this.landingPageType)}/${encodeURIComponent(this.editLandingPage.key)}`);\r\n if (deleteResponse.succeeded) {\r\n await this._load();\r\n return;\r\n }\r\n this._notifier.error(deleteResponse.message);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n });\r\n }\r\n\r\n display(landingPage) {\r\n this.editLandingPage = landingPage;\r\n if (this.landingPageType === 'AppyPie') {\r\n this.landingPageUrl = `${environment.url}/appypie.html?lpfn=${this.secret}#/${encodeURIComponent(this.editLandingPage.key)}`;\r\n } else {\r\n this.landingPageUrl = `${environment.url}/landing.html#/${encodeURIComponent(this.landingPageType)}/${encodeURIComponent(this.editLandingPage.key)}`;\r\n }\r\n }\r\n\r\n addLandingPage() {\r\n this._dialogService.open({ viewModel: LandingPageEditor, model: { type: this.landingPageType }, ignoreTransitions: true }).whenClosed(response => {\r\n if (response.wasCancelled) return;\r\n this._loadKey = response.output.key;\r\n this._load();\r\n });\r\n }\r\n}\r\n","import { PLATFORM } from 'aurelia-pal';\r\nimport { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { Security } from 'common/security';\r\nimport { Menus } from 'services/menus';\r\nimport { RouterConfigBase } from 'resources/base-classes/router-config-base';\r\nimport { ROLE } from 'common/constants';\r\n\r\nexport class Index extends RouterConfigBase {\r\n\tstatic inject = [EventAggregator, Security, Menus];\r\n\r\n\tconstructor(ea, security, menus) {\r\n super(ea, security, menus, undefined, false);\r\n\t}\r\n\r\n\tconfigureRouter(config, router){\r\n\t\tconfig.map([\r\n {\r\n route: ['', 'pool'],\r\n moduleId: PLATFORM.moduleName('admin/leads/lead-pool-grid'),\r\n nav: true,\r\n membersOnly: true,\r\n adminOnly: false,\r\n settings: { roles: [ROLE.LeadManager], title: 'Lead Pool', description: 'Manage the lead pool' },\r\n },\r\n {\r\n route: 'auto-assign-filters',\r\n moduleId: PLATFORM.moduleName('admin/leads/auto-assign-filters'),\r\n nav: true,\r\n membersOnly: true,\r\n adminOnly: false,\r\n settings: { roles: [ROLE.LeadAdmin], title: 'Auto Assign Filters', description: 'Filters used to auto assign leads when received' },\r\n },\r\n {\r\n route: ['print-templates', 'print-templates/:printType'],\r\n moduleId: PLATFORM.moduleName('admin/leads/print-templates'),\r\n nav: true,\r\n membersOnly: true,\r\n adminOnly: false,\r\n settings: { roles: [ROLE.LeadAdmin], title: 'Lead Print Templates', description: 'Print templates to view and print leads' },\r\n },\r\n {\r\n route: 'sources',\r\n moduleId: PLATFORM.moduleName('admin/leads/sources'),\r\n nav: true,\r\n membersOnly: true,\r\n adminOnly: false,\r\n settings: { roles: [ROLE.LeadAdmin], title: 'Lead Sources', description: 'Manage lead sources' },\r\n },\r\n {\r\n route: 'scripts',\r\n moduleId: PLATFORM.moduleName('admin/leads/scripts'),\r\n nav: true,\r\n membersOnly: true,\r\n adminOnly: false,\r\n settings: { roles: [ROLE.LeadAdmin], title: 'Lead Scripts', description: 'Manage lead scripts' },\r\n },\r\n {\r\n route: 'import',\r\n moduleId: PLATFORM.moduleName('admin/leads/import-leads'),\r\n nav: true,\r\n membersOnly: true,\r\n adminOnly: false,\r\n settings: { roles: [ROLE.LeadManager], title: 'Import Leads', description: 'Import leads into the lead pool' },\r\n },\r\n {\r\n route: 'opportunities',\r\n moduleId: PLATFORM.moduleName('admin/leads/opportunities'),\r\n nav: true,\r\n membersOnly: true,\r\n adminOnly: false,\r\n settings: { roles: [ROLE.LeadAdmin], title: 'Opportunities', description: 'Incoming leads that were rejected' },\r\n },\r\n\t\t]);\r\n\r\n\t\tthis.router = router;\r\n\t}\r\n\r\n\tattached() {\r\n\t\tthis._attached();\r\n\t}\r\n\r\n\tdetached() {\r\n\t\tthis._detached();\r\n\t}\r\n}\r\n","import { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { DialogService } from 'aurelia-dialog';\r\nimport { Leads, LEAD_TYPE } from 'services/leads';\r\nimport { Geography } from 'services/geography';\r\nimport { c } from 'common/common';\r\nimport { ConfirmDialog } from 'common/dialogs/confirm/confirm-dialog';\r\n\r\nPLATFORM.moduleName('common/dialogs/confirm/confirm-dialog');\r\n\r\nexport class AutoAssignFilters {\r\n static inject = [DialogService, EventAggregator, Leads, Geography];\r\n _dialogService;\r\n _ea;\r\n _leads;\r\n _geograhy;\r\n\r\n filters = [];\r\n externalAssignmentTypes = ['lifeley'];\r\n _handlers = [];\r\n\r\n constructor(dialogService, ea, leads, geograhy) {\r\n this._dialogService = dialogService;\r\n this._ea = ea;\r\n this._leads = leads;\r\n this._geograhy = geograhy;\r\n }\r\n\r\n attached() {\r\n this._load();\r\n this._handlers.push(this._ea.subscribe('dnd:didEnd', async() => {\r\n window.setTimeout(() => this._saveOrdering(), 0);\r\n }));\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 async _load(expandFilterId) {\r\n try {\r\n this.usStates = c.Geography.usStates;\r\n this.leadTypes = LEAD_TYPE.all();\r\n this.filters = await this._leads.filters();\r\n this.filters.forEach(f => {\r\n f.assignmentType = f.sendTo ? 'external' : 'agents';\r\n f.actions = [\r\n { key: 'delete-filter', name: 'delete', icon: 'fa-duotone fa-trash-can' },\r\n ];\r\n });\r\n if (expandFilterId) {\r\n this.filters.find(x => x.id === expandFilterId).expanded = true;\r\n }\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n addFilter() {\r\n const model = { key: 'add-lead-auto-assign-filter', okButtonClass: 'btn-primary', inputLabel: 'name', expanded: true };\r\n this._dialogService.open({ viewModel: ConfirmDialog, model, ignoreTransitions: true }).whenClosed(async(response) => {\r\n if (response.wasCancelled || !response.output.value) return;\r\n const data = await this._leads.saveFilter(undefined, response.output.value);\r\n this._load(data.id);\r\n });\r\n }\r\n\r\n filterAction(key, f, index) {\r\n switch (key) {\r\n case 'delete-filter': this._deleteFilter(f, index); break;\r\n }\r\n }\r\n\r\n async _deleteFilter(f, index) {\r\n try {\r\n await this._leads.deleteFilter(f.id);\r\n this.filters.splice(index, 1);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n async _saveOrdering() {\r\n try {\r\n const orderedIds = [];\r\n this.filters.forEach(f => orderedIds.push(f.id));\r\n await this._leads.setAutoAssignOrdering(orderedIds);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n editName(f) {\r\n f.currentName = f.name;\r\n f.editingName = true;\r\n }\r\n\r\n cancelEditName(f) {\r\n f.name = f.currentName;\r\n f.currentName = undefined;\r\n f.editingName = false;\r\n }\r\n\r\n async saveName(f) {\r\n try {\r\n await this._leads.saveFilter(f.id, f.name);\r\n f.currentName = undefined;\r\n f.editingName = false;\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n async sendLeadToChanged(filter) {\r\n try {\r\n await this._leads.setSendTo(filter.id, filter.sendTo ?? null);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n async agentSelected(f, detail) {\r\n try {\r\n if (!detail) return;\r\n\r\n const model = { key: 'add-lead-auto-assign-agent', okButtonClass: 'btn-primary', inputLabel: 'lead-auto-assign-percentage', inputNumber: { min: 1, max: 100, step: 1 } };\r\n this._dialogService.open({ viewModel: ConfirmDialog, model, ignoreTransitions: true }).whenClosed(async(response) => {\r\n if (response.wasCancelled || !response.output.value) {\r\n return;\r\n }\r\n const percentage = Number(response.output.value);\r\n const data = await this._leads.assignAgentToFilter(f.id, detail.id, percentage);\r\n f.assignedAgents.push({ memberId: detail.id, agent: data, percentage: percentage });\r\n f.addAgent = undefined;\r\n f.sendTo = null;\r\n });\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n updateAssignedAgentPercentage(f, aa, index) {\r\n try {\r\n const model = {\r\n key: 'update-lead-auto-assign-agent',\r\n okButtonClass: 'btn-primary',\r\n inputLabel: 'lead-auto-assign-percentage',\r\n inputValue: aa.percentage,\r\n inputNumber: { min: 1, max: 100, step: 1 }\r\n };\r\n this._dialogService.open({ viewModel: ConfirmDialog, model, ignoreTransitions: true }).whenClosed(async(response) => {\r\n if (response.wasCancelled || !response.output.value) {\r\n return;\r\n }\r\n const percentage = Number(response.output.value);\r\n const data = await this._leads.assignAgentToFilter(f.id, aa.agent.id, percentage);\r\n f.assignedAgents[index].percentage = percentage;\r\n });\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n async removeAssignedAgent(f, aa, index) {\r\n try {\r\n f.assignedAgents.splice(index, 1);\r\n await this._leads.removeAgentFromFilter(f.id, aa.agent.id);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n async usStateSelected(f) {\r\n try {\r\n if (!f.states.includes(f.addUsState)) f.states.push(f.addUsState);\r\n await this._saveFilter(f);\r\n f.closeUsStatePopover = new Date().valueOf();\r\n f.addUsState = undefined;\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n async removeUsState(f, index) {\r\n try {\r\n f.states.splice(index, 1);\r\n await this._saveFilter(f);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n async usCountyStateSelected(f) {\r\n try {\r\n f.usCounties = await this._geograhy.usCounties(f.addUsCountyState);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n async usCountySelected(f) {\r\n try {\r\n const index = f.counties.findIndex(x => x.fips === f.addUsCounty.fips);\r\n if (index < 0) {\r\n f.addUsCounty.displayName = `${f.addUsCounty.name} (${f.addUsCounty.usStateFips})`;\r\n f.counties.push(f.addUsCounty);\r\n }\r\n await this._saveFilter(f);\r\n f.closeUsCountyPopover = new Date().valueOf();\r\n f.addUsCountyState = undefined;\r\n f.usCounties = undefined;\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n async removeUsCounty(f, index) {\r\n try {\r\n f.counties.splice(index, 1);\r\n await this._saveFilter(f);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n zipOpened(f) {\r\n f.focusZips = true;\r\n }\r\n\r\n zipClosed(f) {\r\n f.focusZips = false;\r\n }\r\n\r\n async zipEntered(f) {\r\n try {\r\n const zips = f.addZip.split(',');\r\n const addZips = JSON.parse(JSON.stringify(f.zipCodes));\r\n zips.forEach(z => {\r\n if (addZips.includes(z)) return;\r\n addZips.push(z);\r\n });\r\n f.zipCodes = addZips;\r\n await this._saveFilter(f);\r\n f.closeZipPopover = new Date().valueOf();\r\n f.addZip = undefined;\r\n f.focusZips = false;\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n async removeZip(f, index) {\r\n try {\r\n f.zipCodes.splice(index, 1);\r\n await this._saveFilter(f);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n async removeAllZips(f) {\r\n try {\r\n f.zipCodes = [];\r\n await this._saveFilter(f);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n publisherIDOpened(f) {\r\n f.focusPublisherIDs = true;\r\n }\r\n\r\n publisherIDClosed(f) {\r\n f.focusPublisherIDs = false;\r\n }\r\n\r\n async publisherIDEntered(f) {\r\n try {\r\n const publisherIDs = f.addPublisherID.split(',');\r\n const addPublisherIDs = JSON.parse(JSON.stringify(f.publisherIDs));\r\n publisherIDs.forEach(x => {\r\n if (addPublisherIDs.includes(x)) return;\r\n addPublisherIDs.push(x);\r\n });\r\n f.publisherIDs = addPublisherIDs;\r\n await this._saveFilter(f);\r\n f.closePublisherIDPopover = new Date().valueOf();\r\n f.addPublisherID = undefined;\r\n f.focusPublisherIDs = false;\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n async removePublisherID(f, index) {\r\n try {\r\n f.publisherIDs.splice(index, 1);\r\n await this._saveFilter(f);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n leadSourceOpened(f) {\r\n f.focusLeadSources = true;\r\n }\r\n\r\n leadSourceClosed(f) {\r\n f.focusLeadSources = false;\r\n }\r\n\r\n async leadSourceEntered(f) {\r\n try {\r\n const leadSources = f.addLeadSource.split(',');\r\n const addLeadSources = JSON.parse(JSON.stringify(f.leadSources));\r\n leadSources.forEach(x => {\r\n if (addLeadSources.includes(x)) return;\r\n addLeadSources.push(x);\r\n });\r\n f.leadSources = addLeadSources;\r\n await this._saveFilter(f);\r\n f.closeLeadSourcePopover = new Date().valueOf();\r\n f.addLeadSource = undefined;\r\n f.focusLeadSources = false;\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n async removeLeadSource(f, index) {\r\n try {\r\n f.leadSources.splice(index, 1);\r\n await this._saveFilter(f);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n leadSupplierOpened(f) {\r\n f.focusLeadSuppliers = true;\r\n }\r\n\r\n leadSupplierClosed(f) {\r\n f.focusLeadSuppliers = false;\r\n }\r\n\r\n async leadSupplierEntered(f) {\r\n try {\r\n const leadSuppliers = f.addLeadSupplier.split(',');\r\n const addLeadSuppliers = JSON.parse(JSON.stringify(f.leadSuppliers));\r\n leadSuppliers.forEach(x => {\r\n if (addLeadSuppliers.includes(x)) return;\r\n addLeadSuppliers.push(x);\r\n });\r\n f.leadSuppliers = addLeadSuppliers;\r\n await this._saveFilter(f);\r\n f.closeLeadSupplierPopover = new Date().valueOf();\r\n f.addLeadSupplier = undefined;\r\n f.focusLeadSuppliers = false;\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n async removeLeadSupplier(f, index) {\r\n try {\r\n f.leadSuppliers.splice(index, 1);\r\n await this._saveFilter(f);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n async leadTypeSelected(f) {\r\n try {\r\n if (!f.leadTypes.includes(f.addLeadType)) f.leadTypes.push(f.addLeadType);\r\n await this._saveFilter(f);\r\n f.closeLeadTypePopover = new Date().valueOf();\r\n f.addLeadType = undefined;\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n async removeLeadType(f, index) {\r\n try {\r\n f.leadTypes.splice(index, 1);\r\n await this._saveFilter(f);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n\r\n async _saveFilter(f) {\r\n const filters = { counties: f.counties, states: f.states, zipCodes: f.zipCodes, publisherIDs: f.publisherIDs, leadSources: f.leadSources, leadSuppliers: f.leadSuppliers, leadTypes: f.leadTypes };\r\n const updateFilters = JSON.parse(JSON.stringify(filters));\r\n updateFilters.counties = updateFilters.counties.map(x => x.fips);\r\n await this._leads.setFilters(f.id, updateFilters);\r\n }\r\n}","import { DialogController } from 'aurelia-dialog';\r\nimport { Leads } from 'services/leads';\r\n\r\nexport class AssignLead {\r\n static inject = [DialogController, Leads];\r\n\r\n includeHistory = false;\r\n\r\n constructor(dialogController, leads) {\r\n this.dialogController = dialogController;\r\n this._leads = leads;\r\n }\r\n\r\n activate(model) {\r\n this.leadIds = model.leadIds;\r\n this.assignToAgentId = model.assignToAgentId;\r\n }\r\n\r\n async assign() {\r\n try {\r\n await this._leads.assignLeads(this.assignToAgentId, this.leadIds, this.includeHistory);\r\n this.dialogController.ok();\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n}\r\n","import { observable } from 'aurelia-framework';\r\nimport { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { DialogController } from 'aurelia-dialog';\r\nimport { DialogService } from 'aurelia-dialog';\r\nimport { LeadScripts } from 'services/lead-scripts';\r\nimport { Leads } from 'services/leads';\r\nimport { NewInstance } from 'aurelia-dependency-injection';\r\nimport { ValidationController } from 'aurelia-validation';\r\nimport { BootstrapFormValidationRenderer } from 'validation/bootstrap-form-validation-renderer';\r\nimport { c } from 'common/common';\r\nimport { ScriptOptionDialog } from './script-option-dialog';\r\nPLATFORM.moduleName('./script-option-dialog');\r\n\r\nexport class EditScriptDialog {\r\n static inject = [EventAggregator, DialogController, DialogService, LeadScripts, Leads, NewInstance.of(ValidationController)];\r\n _ea;\r\n _dialogService;\r\n dialogController;\r\n _leadScripts;\r\n _leads;\r\n validationController;\r\n\r\n @observable searchOn;\r\n\r\n id;\r\n\r\n title = '';\r\n deleteTextKey = 'delete';\r\n\r\n scriptTypes = ['start', 'script', 'terminator'];\r\n _scriptNumber = 1;\r\n _handlers = [];\r\n\r\n constructor(ea, dialogController, dialogService, leadScripts, leads, validationController) {\r\n this._ea = ea;\r\n this.dialogController = dialogController;\r\n this.dialogController.settings.centerHorizontalOnly = true;\r\n this._dialogService = dialogService;\r\n this._leadScripts = leadScripts;\r\n this._leads = leads;\r\n this.validationController = validationController;\r\n this.validationController.addRenderer(new BootstrapFormValidationRenderer());\r\n }\r\n\r\n activate(model) {\r\n model = model ?? {};\r\n this.id = model.id;\r\n this.name = model.name ?? '';\r\n this.scriptType = model.scriptType;\r\n this.scriptPerson = model.scriptPerson;\r\n this.script = model.script ?? [];\r\n if (this.script.length === 0) {\r\n this.addScript('start', true);\r\n } else {\r\n this.script.forEach(s => {\r\n s.number = this._scriptNumber++;\r\n });\r\n this._setCurrentScript(0);\r\n }\r\n this.title = this.id ? 'lead:edit-script' : 'lead:add-script';\r\n this.validationController.reset();\r\n this._load();\r\n }\r\n\r\n attached() {\r\n this._handlers.push(this._ea.subscribe('dnd:didEnd', async() => {\r\n window.setTimeout(() => this.setCurrentScript(this.currentScript.id), 0);\r\n }));\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 async _load() {\r\n try {\r\n this.variables = this._leads.printTemplateVariables();\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n searchOnChanged() {\r\n try {\r\n this.searching = true;\r\n this.searchResults = [];\r\n this.showReturnToSearchResults = false;\r\n if (!this.searchOn) {\r\n this.showSearchResults = false;\r\n return;\r\n }\r\n this.showSearchResults = true;\r\n this.script.forEach(s => {\r\n const regex = RegExp(this.searchOn.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&'), 'i');\r\n const foundSearchValue = s.script.search(regex);\r\n if (foundSearchValue >= 0) this.searchResults.push(s);\r\n });\r\n } catch (err) {\r\n console.log(err);\r\n } finally {\r\n this.searching = false;\r\n }\r\n }\r\n\r\n _clearSearch() {\r\n this.showSearchResults = false;\r\n this.searchResults = [];\r\n this.searching = false;\r\n }\r\n\r\n returnToSearchResults() {\r\n this.searchOnChanged();\r\n }\r\n\r\n setCurrentScript(id) {\r\n if (this.showSearchResults) {\r\n this._clearSearch();\r\n this.showReturnToSearchResults = true;\r\n }\r\n const idx = this.script.findIndex(x => x.id === id);\r\n this._setCurrentScript(idx);\r\n }\r\n\r\n _setCurrentScript(index) {\r\n this.currentScript = this.script[index];\r\n this.resetScript = this.currentScript.script;\r\n this.resetProTip = this.currentScript.proTip;\r\n\r\n this.previousScripts = [];\r\n this.script.forEach(s => {\r\n if (s === this.currentScript.index) return;\r\n let optionIndex = 0;\r\n s.options.forEach(o => {\r\n if (o.toScriptId === this.currentScript.id) {\r\n this.previousScripts.push({ id: s.id, name: s.name, number: s.number, optionIndex: optionIndex, script: s.script, option: o });\r\n }\r\n optionIndex++;\r\n });\r\n });\r\n\r\n this.nextScripts = [];\r\n this.currentScript.options.forEach(o => {\r\n const ns = this.script.find(x => x.id === o.toScriptId);\r\n if (!ns) return;\r\n this.nextScripts.push({ id: ns.id, name: ns.name, number: ns.number, script: ns.script, option: o });\r\n });\r\n this.save(false);\r\n }\r\n\r\n addScript(type, editing = false) {\r\n const id = c.Helpers.uniqueId();\r\n const newScriptType = type ?? this.script.length === 0 ? 'start' : 'script';\r\n this.script.push({\r\n id,\r\n name: newScriptType === 'start' ? 'Intro' : '',\r\n number: this._scriptNumber++,\r\n type: newScriptType,\r\n script: '',\r\n options: [],\r\n editing,\r\n });\r\n this.setCurrentScript(id);\r\n }\r\n \r\n deleteScript() {\r\n try {\r\n const idx = this.script.findIndex(x => x.id === this.currentScript.id);\r\n // remove all options going to this script\r\n this.script.forEach(s => {\r\n const newOptions = [];\r\n s.options.forEach(o => {\r\n if (o.toScriptId === this.currentScript.id) return;\r\n newOptions.push(o);\r\n });\r\n s.options = newOptions;\r\n });\r\n this.script.splice(idx, 1);\r\n this._setCurrentScript(0);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n scriptNameBlur() {\r\n this.setCurrentScript(this.currentScript.id);\r\n }\r\n\r\n scriptChanged(detail) {\r\n if (!this.currentScript.editing) return;\r\n this.currentScript.script = detail.html;\r\n }\r\n\r\n proTipChanged(detail) {\r\n if (!this.currentScript.editing) return;\r\n this.currentScript.proTip = detail.html;\r\n }\r\n\r\n startEditingScript() {\r\n this.currentScript.editing = true;\r\n }\r\n\r\n stopEditingScript() {\r\n this.currentScript.editing = false;\r\n this.save(false);\r\n }\r\n\r\n toggleShowCalendar() {\r\n this.save(false);\r\n }\r\n\r\n async editScriptOption(index = undefined) {\r\n if (this.currentScript.editing) return;\r\n try {\r\n const option = index !== undefined ? this.currentScript.options[index] : {};\r\n const goToOptions = [];\r\n this.script.forEach(s => {\r\n if (s.id === this.currentScript.id) return;\r\n goToOptions.push({ id: s.id, name: s.name, number: s.number });\r\n });\r\n const goToOption = option.toScriptId ? goToOptions.find(x => x.id === option.toScriptId) : undefined;\r\n const model = { name: option.name, goToOption, goToOptions };\r\n this._dialogService.open({ viewModel: ScriptOptionDialog, model, ignoreTransitions: true }).whenClosed(async(response) => {\r\n if (response.wasCancelled) return;\r\n const optionName = response.output.name;\r\n const toScriptId = response.output.toScriptId;\r\n const newScriptName = `${this.currentScript.name} - ${optionName}`;\r\n const newScriptId = toScriptId ?? c.Helpers.uniqueId();\r\n if (option.toScriptId) {\r\n option.name = optionName;\r\n option.toScriptId = newScriptId;\r\n } else {\r\n this.currentScript.options.push({ toScriptId: newScriptId, name: optionName });\r\n }\r\n if (!toScriptId) {\r\n this.script.push({ id: newScriptId, name: newScriptName, number: this._scriptNumber++, type: 'script', script: '', options: [], editing: false });\r\n }\r\n\r\n this.setCurrentScript(this.currentScript.id);\r\n });\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n removeScriptOption(index, scriptId) {\r\n if (this.currentScript.editing) return;\r\n try {\r\n scriptId = scriptId ?? this.currentScript.id;\r\n const script = this.script.find(x => x.id === scriptId)\r\n const removeToScriptId = script.options[index].toScriptId;\r\n script.options.splice(index, 1);\r\n // Only remove the script if it is only referenced by one\r\n let hasAnotherReference = false;\r\n this.script.forEach(s => {\r\n if (!s.options.find(x => x.toScriptId === removeToScriptId)) return;\r\n hasAnotherReference = true;\r\n });\r\n if (hasAnotherReference) {\r\n this.setCurrentScript(this.currentScript.id);\r\n return; // there is another option referencing the script, cannot delete the other script\r\n }\r\n const removeScriptIndex = this.script.indexOf(x => x.id === removeToScriptId);\r\n this.script.splice(removeScriptIndex, 1);\r\n const setCurrentScriptId = removeToScriptId !== this.currentScript.id ? this.currentScript.id : script.id;\r\n this.setCurrentScript(setCurrentScriptId);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n async save(close = true) {\r\n if (this.saving) return;\r\n try {\r\n const v = await this.validationController.validate();\r\n if (!v.valid) return;\r\n this.saving = true;\r\n\r\n const payload = {\r\n id: this.id,\r\n name: this.name,\r\n scriptType: this.scriptType,\r\n scriptPerson: this.scriptPerson,\r\n script: this.script,\r\n };\r\n await this._leadScripts.save(payload);\r\n if (close) this.dialogController.ok();\r\n } catch (err) {\r\n console.log(err);\r\n } finally {\r\n this.saving = false;\r\n }\r\n }\r\n\r\n resetDelete() {\r\n this.showDeleteConfirm = false;\r\n this.deleteTextKey = 'delete';\r\n }\r\n\r\n async delete() {\r\n if (!this.showDeleteConfirm) {\r\n this.showDeleteConfirm = true;\r\n this.deleteTextKey = 'delete-confirm';\r\n return;\r\n }\r\n\r\n this.showDeleteConfirm = false;\r\n if (this.deleting) return;\r\n try {\r\n this.deleting = true;\r\n await this._leadScripts.delete(this.id);\r\n this.dialogController.ok();\r\n } catch(err) {\r\n this.resetDelete();\r\n console.log(err);\r\n } finally {\r\n this.deleting = false;\r\n }\r\n }\r\n}\r\n","import { DialogController } from 'aurelia-dialog';\r\nimport { NewInstance } from 'aurelia-dependency-injection';\r\nimport { ValidationRules, ValidationController } from 'aurelia-validation';\r\nimport { BootstrapFormValidationRenderer } from 'validation/bootstrap-form-validation-renderer';\r\nimport { LeadScripts, SCRIPT_TYPE, SCRIPT_PERSON } from 'services/lead-scripts';\r\n\r\nexport class EditScriptNameDialog {\r\n static inject = [DialogController, NewInstance.of(ValidationController), LeadScripts];\r\n dialogController;\r\n validationController;\r\n\r\n name;\r\n scriptType;\r\n scriptTypes = SCRIPT_TYPE.all();\r\n scriptPerson;\r\n scriptPersons = SCRIPT_PERSON.all();\r\n\r\n constructor(dialogController, validationController, leadScripts) {\r\n this.dialogController = dialogController;\r\n this.dialogController.settings.centerHorizontalOnly = true;\r\n this.validationController = validationController;\r\n this.validationController.addRenderer(new BootstrapFormValidationRenderer());\r\n this._leadScripts = leadScripts;\r\n\r\n\t\tValidationRules\r\n .ensure('name').required()\r\n .on(this);\r\n }\r\n\r\n activate(model) {\r\n model = model ?? {};\r\n this.id = model.id ?? null;\r\n this.name = model.name ?? '';\r\n this.scriptType = model.scriptType ?? SCRIPT_TYPE.Phone;\r\n this.scriptPerson = model.scriptPerson ?? SCRIPT_PERSON.First;\r\n this.script = model.script;\r\n this.titleKey = this.id ? 'lead:edit-script' : 'lead:add-lead-script-title';\r\n }\r\n\r\n async save() {\r\n if (this.saving) return;\r\n try {\r\n const v = await this.validationController.validate();\r\n if (!v.valid) return;\r\n const data = await this._leadScripts.save({ id: this.id, name: this.name, scriptType: this.scriptType, scriptPerson: this.scriptPerson, script: this.script });\r\n this.dialogController.ok(data);\r\n } catch (err) {\r\n console.log(err);\r\n } finally {\r\n this.saving = false;\r\n }\r\n }\r\n}\r\n","import { DialogController } from 'aurelia-dialog';\r\nimport { LEAD_TYPE, LEAD_AGE } from 'services/leads';\r\nimport { LeadSources } from 'services/lead-sources';\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 EditSource {\r\n static inject = [DialogController, LeadSources, NewInstance.of(ValidationController)];\r\n dialogController;\r\n _leadSources;\r\n validationController;\r\n\r\n id;\r\n name;\r\n supplier;\r\n campaignID;\r\n campaignName;\r\n cost;\r\n leadType;\r\n receivedAge;\r\n product;\r\n\r\n leadTypes = LEAD_TYPE.all();\r\n ages = LEAD_AGE.all();\r\n\r\n title = '';\r\n deleteTextKey = 'delete';\r\n\r\n constructor(dialogController, leadSources, validationController) {\r\n this.dialogController = dialogController;\r\n this.dialogController.settings.centerHorizontalOnly = true;\r\n this._leadSources = leadSources;\r\n this.validationController = validationController;\r\n this.validationController.addRenderer(new BootstrapFormValidationRenderer());\r\n\r\n ValidationRules\r\n .ensure('id').required()\r\n .ensure('name').required()\r\n .ensure('cost').required().satisfiesRule('decimalRange', 0, 9999999)\r\n .ensure('supplier').required()\r\n .ensure('leadType').required()\r\n .ensure('receivedAge').required()\r\n .ensure('product').required()\r\n .on(this);\r\n }\r\n\r\n activate(model) {\r\n model = model || {};\r\n this.leadSourceId = model.id;\r\n this.id = model.id;\r\n this.name = model.name;\r\n this.campaignID = model.campaignID;\r\n this.campaignName = model.campaignName;\r\n this.cost = model.cost;\r\n this.supplier = model.supplier;\r\n this.leadType = model.leadType;\r\n this.receivedAge = model.receivedAge;\r\n this.product = model.product;\r\n this.canDelete = model.canDelete;\r\n this.title = this.id ? 'lead:add-lead-source' : 'lead:edit-lead-source';\r\n this.validationController.reset();\r\n }\r\n\r\n async save() {\r\n if (this.saving) return;\r\n try {\r\n const v = await this.validationController.validate();\r\n if (!v.valid) return;\r\n this.saving = true;\r\n\r\n const payload = {\r\n id: this.id,\r\n name: this.name,\r\n cost: this.cost,\r\n supplier: this.supplier,\r\n product: this.product,\r\n receivedAge: this.receivedAge,\r\n leadType: this.leadType,\r\n campaignID: this.campaignID,\r\n campaignName: this.campaignName,\r\n };\r\n await this._leadSources.save(payload);\r\n this.dialogController.ok();\r\n } catch (err) {\r\n console.log(err);\r\n } finally {\r\n this.saving = false;\r\n }\r\n }\r\n\r\n resetDelete() {\r\n this.showDeleteConfirm = false;\r\n this.deleteTextKey = 'delete';\r\n }\r\n\r\n async delete() {\r\n if (!this.showDeleteConfirm) {\r\n this.showDeleteConfirm = true;\r\n this.deleteTextKey = 'delete-confirm';\r\n return;\r\n }\r\n\r\n this.showDeleteConfirm = false;\r\n if (this.deleting) return;\r\n try {\r\n this.deleting = true;\r\n await this._leadSources.delete(this.id);\r\n this.dialogController.ok();\r\n } catch(err) {\r\n this.resetDelete();\r\n console.log(err);\r\n } finally {\r\n this.deleting = false;\r\n }\r\n }\r\n}\r\n","import { DialogController } from 'aurelia-dialog';\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 ScriptOptionDialog {\r\n static inject = [DialogController, NewInstance.of(ValidationController)];\r\n dialogController;\r\n validationController;\r\n\r\n name;\r\n goToOption;\r\n goToOptions;\r\n\r\n constructor(dialogController, validationController) {\r\n this.dialogController = dialogController;\r\n this.dialogController.settings.centerHorizontalOnly = true;\r\n this.validationController = validationController;\r\n this.validationController.addRenderer(new BootstrapFormValidationRenderer());\r\n\r\n\t\tValidationRules\r\n .ensure('name').required()\r\n .on(this);\r\n }\r\n\r\n activate(model) {\r\n model = model ?? {};\r\n this.name = model.name ?? '';\r\n this.goToOption = model.goToOption;\r\n this.goToOptions = model.goToOptions;\r\n }\r\n\r\n async save() {\r\n if (this.saving) return;\r\n try {\r\n const v = await this.validationController.validate();\r\n if (!v.valid) return;\r\n const toScriptId = this.goToOption ? this.goToOption.id : undefined;\r\n this.dialogController.ok({ name: this.name, toScriptId });\r\n } catch (err) {\r\n console.log(err);\r\n } finally {\r\n this.saving = false;\r\n }\r\n }\r\n}\r\n","export class ImportLeads {\r\n}","import { PLATFORM } from 'aurelia-pal';\r\nimport { computedFrom, observable } from 'aurelia-framework';\r\nimport { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { Security } from 'common/security';\r\nimport { I18n } from 'common/i18n';\r\nimport { Leads } from 'services/leads';\r\nimport { DialogService } from 'aurelia-dialog';\r\nimport { AssignLead } from './dialogs/assign-lead';\r\nimport { FormatUrlValueConverter } from 'resources/value-converters/format-url';\r\nimport { TitleCaseValueConverter } from 'resources/value-converters/title-case';\r\nimport { Page } from 'common/ui';\r\nimport { Api } from 'common/server';\r\nimport { c } from 'common/common';\r\nimport { LinkCallbackRenderer, LinkCellRenderer, ButtonCallbackRenderer } from 'resources/elements/analytics/analytics-cell-renderers';\r\nimport { ROLE, ABOUT_TYPE } from 'common/constants';\r\nimport { formatAddress } from 'services/functions';\r\nimport environment from '../../../config/environment.json';\r\n\r\nPLATFORM.moduleName('./dialogs/assign-lead');\r\n\r\nexport class LeadPoolGrid {\r\n static inject = [EventAggregator, Security, I18n, Leads, DialogService, FormatUrlValueConverter, TitleCaseValueConverter, Page, Api];\r\n _ea;\r\n _security;\r\n _i18n;\r\n _leads;\r\n _dialogService;\r\n _formatUrlValueConverter;\r\n _titleCase;\r\n _page;\r\n _api;\r\n\r\n cols;\r\n leads;\r\n @observable assignToAgent;\r\n selectedIds = [];\r\n filteredIds = [];\r\n isViewingAgentAssignedLeads = false;\r\n\r\n view = 'list';\r\n\r\n _handlers = [];\r\n\r\n constructor(ea, security, i18n, leads, dialogService, formatUrlValueConverter, titleCase, page, api) {\r\n this._ea = ea;\r\n this._security = security;\r\n this._i18n = i18n;\r\n this._leads = leads;\r\n this._dialogService = dialogService;\r\n this._formatUrlValueConverter = formatUrlValueConverter;\r\n this._titleCase = titleCase;\r\n this._page = page;\r\n this._api = api;\r\n }\r\n\r\n activate() {\r\n this._initializeGrid();\r\n this._load();\r\n this._handlers.push(this._ea.subscribe(c.EventKeys.lead.profileUpdated, (data) => this._onLeadUpdated(data, true)));\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._page.appContentFullHeight();\r\n }\r\n\r\n detached() {\r\n this._page.appContentRegularHeight();\r\n }\r\n\r\n _onLeadUpdated(data) {\r\n this.data = undefined;\r\n this._load();\r\n }\r\n\r\n @computedFrom('assignToAgent', 'selectedIds', 'isViewingAgentAssignedLeads')\r\n get canAssign() {\r\n return this.assignToAgent && this.selectedIds.length && !this.isViewingAgentAssignedLeads;\r\n }\r\n\r\n @computedFrom('selectedIds', 'isViewingAgentAssignedLeads', 'isViewingAssignedLeadPool')\r\n get canUnassign() {\r\n return this.selectedIds.length && (this.isViewingAgentAssignedLeads || this.isViewingAssignedLeadPool);\r\n }\r\n\r\n @computedFrom('assignToAgent', 'isViewingAgentAssignedLeads')\r\n get canViewAssigned() {\r\n return this.assignToAgent && !this.isViewingAgentAssignedLeads;\r\n }\r\n\r\n @computedFrom('isViewingAgentAssignedLeads', 'isViewingAssignedLeadPool')\r\n get canViewPool() {\r\n return this.isViewingAgentAssignedLeads || this.isViewingAssignedLeadPool;\r\n }\r\n\r\n @computedFrom('assignToAgent', 'selectedIds', 'isViewingAgentAssignedLeads', 'isViewingAssignedLeadPool')\r\n get canViewAssignedLeadPool() {\r\n return !this.assignToAgent && !this.selectedIds.length && !this.isViewingAgentAssignedLeads && !this.isViewingAssignedLeadPool;\r\n }\r\n\r\n @computedFrom('selectedIds', 'isViewingAgentAssignedLeads', 'isViewingAssignedLeadPool', 'assignToAgent')\r\n get canDeleteSelected() {\r\n if (!this.selectedIds || !this.selectedIds.length) return false;\r\n return !this.isViewingAgentAssignedLeads && !this.isViewingAssignedLeadPool && !this.assignToAgent;\r\n }\r\n\r\n @computedFrom('selectedIds', 'isViewingAgentAssignedLeads', 'isViewingAssignedLeadPool', 'assignToAgent')\r\n get canSendSelected() {\r\n if (!this.selectedIds || !this.selectedIds.length) return false;\r\n return !this.isViewingAgentAssignedLeads && !this.isViewingAssignedLeadPool && !this.assignToAgent;\r\n }\r\n\r\n assignToAgentChanged() {\r\n if (!this.assignToAgent && this.isViewingAgentAssignedLeads) {\r\n this.viewLeadPool();\r\n }\r\n if (this.assignToAgent && this.isViewingAgentAssignedLeads) {\r\n this.viewAssignedLeads();\r\n }\r\n }\r\n\r\n showView(view) {\r\n if (view === 'map') {\r\n this._loadMap();\r\n }\r\n this.view = view;\r\n }\r\n\r\n onSelected(data) {\r\n this.selectedIds = data.ids;\r\n }\r\n\r\n async deleteLeads() {\r\n try {\r\n this.loading = true;\r\n const response = await this._leads.delete(this.selectedIds);\r\n this._load();\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 async sendLeads() {\r\n try {\r\n this.loading = true;\r\n await this._leads.sendTo(this.selectedIds, 'lifeley');\r\n this._load();\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 async assignLeads() {\r\n try {\r\n if (!this.canAssign) return;\r\n\r\n if (this.isViewingAssignedLeadPool) {\r\n const model = { leadIds: this.selectedIds, assignToAgentId: this.assignToAgent.id };\r\n this._dialogService.open({ viewModel: AssignLead, model, ignoreTransitions: true }).whenClosed(async(response) => {\r\n if (response.wasCancelled) return;\r\n this.leads = [];\r\n this._load();\r\n });\r\n return;\r\n } else {\r\n await this._leads.assignLeads(this.assignToAgent.id, this.selectedIds);\r\n this.leads = [];\r\n let preFilteredIds = this.filteredIds;\r\n await this._load();\r\n if (this.view === 'map') {\r\n // reload the map\r\n this.filteredIds = [];\r\n this.leads.forEach(x => {\r\n if (preFilteredIds.includes(x.id)) this.filteredIds.push(x.id);\r\n });\r\n this.showView(this.view);\r\n }\r\n }\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n async unassignLeads() {\r\n try {\r\n if (!this.canUnassign) return;\r\n await this._leads.unassignLeads(this.selectedIds);\r\n this.leads = [];\r\n this._load();\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n viewAssignedLeads() {\r\n if (!this.assignToAgent) return;\r\n this.isViewingAgentAssignedLeads = true;\r\n this._ea.publish(c.EventKeys.site.setPageTitle, { title: this._i18n.tr('lead:agent-lead-pool', { name: this.assignToAgent.fullName}) });\r\n this._load();\r\n }\r\n\r\n viewLeadPool() {\r\n this.isViewingAgentAssignedLeads = false;\r\n this.assignToAgent = undefined;\r\n this.isViewingAssignedLeadPool = false;\r\n this.groupByColumn = undefined;\r\n this._ea.publish(c.EventKeys.site.setPageTitle, { title: 'lead:lead-pool' });\r\n this._load();\r\n }\r\n\r\n viewAssignedLeadPool() {\r\n this.isViewingAssignedLeadPool = true;\r\n this.groupByColumn = 'assignedToAgent';\r\n this._load();\r\n }\r\n\r\n reload() {\r\n this._load();\r\n }\r\n\r\n async _load() {\r\n try {\r\n this.loading = true;\r\n this.leads = this.isViewingAgentAssignedLeads\r\n ? await this._leads.forAgent(this.assignToAgent.id)\r\n : await this._leads.pool(this.isViewingAssignedLeadPool);\r\n this.totalLeads = this.leads.length;\r\n this.leadCount = this.leads.length;\r\n this.leads.forEach(l => {\r\n l.fullName = this._titleCase.toView(l.fullName);\r\n l.typeValue = l.type ? this._i18n.tr(`lead:type-${l.type}`) : '';\r\n l.receivedAgeValue = l.receivedAge ? this._i18n.tr(`lead:age-${l.receivedAge}`) : '';\r\n l.statusValue = l.status ? this._i18n.tr(`lead-status-${l.status}`) : '';\r\n l.dispositionValue = l.disposition ? this._i18n.tr(`lead:disposition-${l.disposition}`) : '';\r\n l.formattedAddress = formatAddress(l);\r\n l.leadNameCallback = () => this._onNameClick(l.id);\r\n l.leadPdfCallback = () => this._onPdfClick(l.id);\r\n if (l.point) {\r\n l.marker = {\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 };\r\n }\r\n });\r\n this.selectedIds = [];\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 @computedFrom('leadCount', 'totalLeads')\r\n get isFiltered() {\r\n return this.leadCount !== this.totalLeads;\r\n }\r\n\r\n async exportLeads() {\r\n const model = { ids: this.selectedIds, exportType: null, assignedToAgentId: this.assignToAgent?.id };\r\n if (!this.selectedIds.length) {\r\n if (this.isViewingAssignedLeadPool) model.exportType = 'assigned-lead-pool';\r\n else model.exportType = 'lead-pool';\r\n }\r\n await this._page.export(this._api, 'leads/export/list', model);\r\n }\r\n\r\n async exportLeadSuppressionList() {\r\n const model = { ids: this.selectedIds };\r\n await this._page.export(this._api, 'leads/export/suppression-list', model);\r\n }\r\n\r\n _onNameClick(leadId) {\r\n this._ea.publish(c.EventKeys.site.openLead, { leadId });\r\n }\r\n\r\n _onPdfClick(leadId) {\r\n const qs = [];\r\n qs.push(`forType=${encodeURIComponent(ABOUT_TYPE.Lead)}`);\r\n qs.push(`forId=${encodeURIComponent(leadId)}`);\r\n qs.push(`fileType=${encodeURIComponent('lead-record')}`);\r\n this.pdfUploadUrl = `${environment.api}/api/file-for/upload?${qs.join('&')}`;\r\n this.openPdfUploader = new Date().valueOf();\r\n }\r\n\r\n pdfUploaded() {\r\n this.pdfUploadUrl = undefined;\r\n }\r\n\r\n _urlFormatter = (value) => {\r\n return this._formatUrlValueConverter.toView(value);\r\n }\r\n\r\n onFilterChanged(data) {\r\n this.leadCount = data.count;\r\n this.filteredIds = data.filteredIds ?? [];\r\n }\r\n\r\n _loadMap() {\r\n if (this.selectedIds.length) {\r\n this.markers = this.leads.filter(x => x.marker && this.selectedIds.includes(x.id))?.map(x => x.marker) ?? [];\r\n } else if (this.filteredIds.length) {\r\n this.markers = this.leads.filter(x => x.marker && this.filteredIds.includes(x.id))?.map(x => x.marker) ?? [];\r\n } else {\r\n this.markers = this.leads.filter(x => x.marker)?.map(x => x.marker) ?? [];\r\n }\r\n }\r\n\r\n getLeadContentForMap = async(id) => {\r\n const lead = this.leads.find(x => x.id === id);\r\n return this._leads.mapPopupContent(lead, false, false);\r\n }\r\n\r\n onMarkersSelected(detail) {\r\n this.selectedIds = detail.ids;\r\n }\r\n\r\n clearSelected() {\r\n this.clearSelectedFromMap = new Date().valueOf();\r\n }\r\n\r\n _initializeGrid() {\r\n this.cols = [\r\n {\r\n field: 'fullName',\r\n headerName: this._i18n.tr('name'),\r\n enableRowGroup: false,\r\n headerCheckboxSelection: true,\r\n headerCheckboxSelectionFilteredOnly: true,\r\n checkboxSelection: true,\r\n cellRenderer: LinkCallbackRenderer,\r\n cellRendererParams: { zeusCallback: 'leadNameCallback' },\r\n },\r\n {\r\n field: 'createdDate',\r\n type: 'dateColumn',\r\n headerName: this._i18n.tr('lead:added'),\r\n cellDataType: 'dateString',\r\n },\r\n {\r\n field: 'powerScore',\r\n type: 'numericColumn',\r\n headerName: this._i18n.tr('lead:power-score-abbr'),\r\n enableRowGroup: false,\r\n cellDataType: 'number'\r\n },\r\n {\r\n headerName: this._i18n.tr('file-for-type-lead-record'),\r\n cellRenderer: ButtonCallbackRenderer,\r\n cellRendererParams: { zeusCallback: 'leadPdfCallback', buttonText: this._i18n.tr('upload-lead-record') },\r\n },\r\n {\r\n field: 'assignedDate',\r\n type: 'dateColumn',\r\n headerName: this._i18n.tr('lead:assigned'),\r\n cellDataType: 'dateString',\r\n },\r\n {\r\n field: 'lastWorkedDate',\r\n type: 'dateColumn',\r\n headerName: this._i18n.tr('lead:last-worked-date'),\r\n cellDataType: 'dateString',\r\n },\r\n {\r\n field: 'assignedToAgent',\r\n headerName: this._i18n.tr('lead:assigned-to'),\r\n enableRowGroup: true,\r\n },\r\n {\r\n field: 'statusValue',\r\n headerName: this._i18n.tr('lead:status'),\r\n enableRowGroup: true,\r\n },\r\n {\r\n field: 'doNotCallDate',\r\n type: 'dateColumn',\r\n headerName: this._i18n.tr('lead:do-not-call'),\r\n cellDataType: 'dateString',\r\n enableRowGroup: true,\r\n },\r\n {\r\n field: 'dispositionValue',\r\n headerName: this._i18n.tr('lead:disposition'),\r\n enableRowGroup: true,\r\n },\r\n {\r\n field: 'source',\r\n headerName: this._i18n.tr('lead:source'),\r\n enableRowGroup: true,\r\n },\r\n {\r\n field: 'typeValue',\r\n headerName: this._i18n.tr('lead:type'),\r\n enableRowGroup: true,\r\n },\r\n {\r\n field: 'product',\r\n headerName: this._i18n.tr('lead:product'),\r\n enableRowGroup: true,\r\n },\r\n {\r\n field: 'receivedAgeValue',\r\n headerName: this._i18n.tr('lead:age'),\r\n enableRowGroup: true,\r\n },\r\n {\r\n field: 'address',\r\n headerName: this._i18n.tr('address'),\r\n enableRowGroup: false,\r\n },\r\n {\r\n field: 'city',\r\n headerName: this._i18n.tr('city'),\r\n enableRowGroup: true,\r\n },\r\n {\r\n field: 'state',\r\n headerName: this._i18n.tr('state'),\r\n enableRowGroup: true,\r\n },\r\n {\r\n field: 'county',\r\n headerName: this._i18n.tr('county'),\r\n enableRowGroup: true,\r\n },\r\n {\r\n field: 'zipCode',\r\n headerName: this._i18n.tr('zip'),\r\n enableRowGroup: true,\r\n },\r\n {\r\n field: 'email',\r\n headerName: this._i18n.tr('lead:email'),\r\n enableRowGroup: false,\r\n },\r\n {\r\n field: 'phone',\r\n headerName: this._i18n.tr('lead:phone'),\r\n enableRowGroup: false,\r\n },\r\n {\r\n field: 'coverageType',\r\n headerName: this._i18n.tr('lead:coverage-type'),\r\n enableRowGroup: true,\r\n },\r\n {\r\n field: 'coverageTerm',\r\n headerName: this._i18n.tr('lead:coverage-term'),\r\n enableRowGroup: false,\r\n },\r\n {\r\n field: 'coverageAmount',\r\n type: 'numericColumn',\r\n headerName: this._i18n.tr('lead:coverage-amount'),\r\n enableRowGroup: false,\r\n cellDataType: 'money',\r\n filter: 'agNumberColumnFilter'\r\n },\r\n {\r\n field: 'coverageRange',\r\n headerName: this._i18n.tr('lead:coverage-amount'),\r\n enableRowGroup: false,\r\n },\r\n {\r\n field: 'sourceMetadata.url',\r\n headerName: this._i18n.tr('lead:source'),\r\n enableRowGroup: true,\r\n cellRenderer: LinkCellRenderer,\r\n cellRendererParams: { urlFormatter: this._urlFormatter },\r\n },\r\n {\r\n field: 'sourceMetadata.publisherID',\r\n headerName: this._i18n.tr('lead:publisher-id'),\r\n enableRowGroup: true,\r\n },\r\n {\r\n field: 'sourceMetadata.subID',\r\n headerName: this._i18n.tr('lead:sub-id'),\r\n enableRowGroup: true,\r\n },\r\n {\r\n field: 'sourceMetadata.campaignID',\r\n headerName: this._i18n.tr('lead:campaign-id'),\r\n enableRowGroup: true,\r\n },\r\n {\r\n field: 'sourceMetadata.jornayaId',\r\n headerName: this._i18n.tr('lead:jornaya-lead-id'),\r\n enableRowGroup: false,\r\n },\r\n {\r\n field: 'sourceMetadata.trustedForm',\r\n headerName: this._i18n.tr('lead:trusted-form'),\r\n enableRowGroup: false,\r\n cellRenderer: LinkCellRenderer,\r\n cellRendererParams: { urlFormatter: this._urlFormatter },\r\n },\r\n ];\r\n\r\n if (this._security.isInRole(ROLE.LeadAdmin)) {\r\n this.cols.push({\r\n field: 'leadSupplier',\r\n headerName: this._i18n.tr('lead:supplier'),\r\n enableRowGroup: true,\r\n });\r\n }\r\n }\r\n}","import { Leads } from 'services/leads';\r\nimport { Geography } from 'services/geography';\r\nimport { I18n } from 'common/i18n';\r\n\r\nexport class Opportunities {\r\n static inject = [Leads, Geography, I18n];\r\n _leads;\r\n _geography;\r\n _i18n;\r\n\r\n view = 'opportunities';\r\n selectedUsCounties = [];\r\n\r\n constructor(leads, geography, i18n) {\r\n this._leads = leads;\r\n this._geography = geography;\r\n this._i18n = i18n;\r\n }\r\n\r\n async activate() {\r\n this._initializeGrid();\r\n await this._loadGeojson();\r\n }\r\n\r\n async _loadGeojson() {\r\n try {\r\n this.usStatesGeojson = await this._geography.geojson.usStates();\r\n this.usCountiesGeojson = await this._geography.geojson.usCounties();\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n attached() {\r\n this._load();\r\n }\r\n\r\n showView(view) {\r\n this.view = view;\r\n this._load();\r\n }\r\n\r\n async _load() {\r\n try {\r\n let data;\r\n if (this.view === 'inventory') {\r\n data = await this._leads.currentInventoryOpportunities();\r\n } else {\r\n data = await this._leads.opportunities();\r\n }\r\n this.opportunities = data.opportunities;\r\n this.leadTypes = [];\r\n data.leadTypes.forEach(lt => {\r\n if (!lt) return;\r\n this.leadTypes.push({ checked: true, key: lt });\r\n });\r\n this._loadHeatMapData();\r\n this._loadUsStates();\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n leadTypeSelected() {\r\n this._loadHeatMapData();\r\n this._loadLeadsForCounty(true);\r\n }\r\n\r\n _loadHeatMapData() {\r\n try {\r\n const selectedLeadTypes = this.leadTypes.filter(x => x.checked).map(x => x.key);\r\n const heatMapData = [];\r\n this.opportunities.forEach(o => {\r\n if (!o.point || !o.point.latitude || !o.point.longitude) return;\r\n if (!selectedLeadTypes.includes(o.leadType)) return;\r\n heatMapData.push([o.point.longitude, o.point.latitude]);\r\n });\r\n this.heatMapData = heatMapData;\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n _geojson(data) {\r\n return {\r\n id: 'us-states',\r\n data,\r\n style: {\r\n strokeColor: '#000',\r\n strokeOpacity: 1.0,\r\n strokeWeight: 1.0,\r\n fillColor: 'transparent',\r\n fillOpacity: 'transparent'\r\n },\r\n label: {\r\n cssClass: 'zeus-map-label',\r\n minZoom: 8,\r\n template: (geojsonFeature) => {\r\n return geojsonFeature.properties.name;\r\n }\r\n },\r\n mouseover: {\r\n setStyle: (feature) => {\r\n const fips = feature.getId();\r\n if (fips.length === 2) {\r\n // US State\r\n return { fillColor: 'black', fillOpacity: 0.25 };\r\n }\r\n // County, only set the style if it isn't already selected\r\n if (this.selectedUsCounties.find(x => x.fips === fips)) return;\r\n return { fillColor: 'white', fillOpacity: 0.25 };\r\n }\r\n },\r\n click: {\r\n setStyle: (feature) => {\r\n const fips = feature.getId();\r\n if (fips.length === 2) {\r\n // State, no style set on click\r\n } else {\r\n // County, set the style on click, the county will already be set from the click callback\r\n if (this.selectedUsCounties.find(x => x.fips === fips)) {\r\n return { fillColor: 'red', fillOpacity: 0.25 };\r\n }\r\n return null;\r\n }\r\n },\r\n zoomTo: true,\r\n callback: (feature) => {\r\n const fips = feature.getId();\r\n const name = feature.getProperty('name');\r\n if (fips.length === 2) {\r\n // This is a state\r\n this._loadUsCounties(fips, name);\r\n } else {\r\n // This is a county\r\n const idx = this.selectedUsCounties.findIndex(x => x.fips === fips);\r\n if (idx >= 0) this.selectedUsCounties.splice(idx, 1);\r\n else this.selectedUsCounties.push({ fips, name });\r\n this._loadLeadsForCounty();\r\n }\r\n }\r\n },\r\n };\r\n }\r\n\r\n async _loadUsStates() {\r\n try {\r\n this.geojson = this._geojson(this.usStatesGeojson);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n async _loadUsCounties(stateFips, stateName) {\r\n try {\r\n let usStateFeature;\r\n this.selectedState = stateName;\r\n if (this.selectedStateFips) {\r\n // need to add the state back into the map\r\n usStateFeature = this.usStatesGeojson.features.find(x => x.id === this.selectedStateFips);\r\n }\r\n let removeIds = [];\r\n if (this.stateCounties) {\r\n removeIds = this.stateCounties.map(x => x.fips);\r\n }\r\n this.selectedStateFips = stateFips;\r\n removeIds.push(stateFips);\r\n this.removeIds = removeIds;\r\n\r\n this.stateCounties = await this._geography.usCounties(stateName);\r\n const countyFips = this.stateCounties.map(x => x.fips);\r\n const data = JSON.parse(JSON.stringify(this.usCountiesGeojson));\r\n data.features = this.usCountiesGeojson.features.filter(x => countyFips.includes(x.id));\r\n if (usStateFeature) data.features.push(usStateFeature);\r\n this.geojson = this._geojson(data);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n async _loadLeadsForCounty(filterExisting = false) {\r\n try {\r\n this.loading = true;\r\n if (!filterExisting) {\r\n const selectedCountyNames = this.selectedUsCounties.map(x => x.name);\r\n this.selectedCounties = selectedCountyNames.join(', ');\r\n const counties = this.selectedUsCounties && this.selectedUsCounties.length ? this.selectedUsCounties.map(x => x.fips) : undefined;\r\n\r\n if (this.view === 'inventory') {\r\n this.countyLeadsData = await this._leads.currentInventoryOpportunities(counties);\r\n } else {\r\n this.countyLeadsData = await this._leads.opportunities(counties);\r\n }\r\n }\r\n const countyLeads = [];\r\n const selectedLeadTypes = this.leadTypes.filter(x => x.checked).map(x => x.key);\r\n this.countyLeadsData.opportunities.forEach(o => {\r\n if (!selectedLeadTypes.includes(o.leadType)) return;\r\n o.leadTypeName = this._i18n.tr(`lead:type-${o.leadType}`);\r\n countyLeads.push(o);\r\n });\r\n this.countyLeads = countyLeads;\r\n this._loadSelectedCountyZips();\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 async _loadSelectedCountyZips() {\r\n try {\r\n const selectedFips = this.selectedUsCounties.map(x => x.fips);\r\n this.zips = await this._geography.zips(selectedFips);\r\n this.selectedUsCountiesZips = this.zips.join(',');\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n _initializeGrid() {\r\n this.cols = [\r\n {\r\n field: 'receivedDate',\r\n type: 'dateColumn',\r\n headerName: this._i18n.tr('lead:added'),\r\n cellDataType: 'dateString',\r\n enableRowGroup: true,\r\n },\r\n {\r\n field: 'leadTypeName',\r\n headerName: this._i18n.tr('lead-type'),\r\n enableRowGroup: true,\r\n },\r\n {\r\n field: 'county',\r\n headerName: this._i18n.tr('county'),\r\n enableRowGroup: true,\r\n },\r\n {\r\n field: 'city',\r\n headerName: this._i18n.tr('city'),\r\n enableRowGroup: true,\r\n },\r\n {\r\n field: 'state',\r\n headerName: this._i18n.tr('state'),\r\n enableRowGroup: true,\r\n },\r\n {\r\n field: 'zip',\r\n headerName: this._i18n.tr('zip'),\r\n enableRowGroup: true,\r\n },\r\n ];\r\n }\r\n}\r\n","import { computedFrom } from 'aurelia-framework';\r\nimport { activationStrategy } from 'aurelia-router';\r\nimport { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { DialogService } from 'aurelia-dialog';\r\nimport { PrintTemplates as PrintTemplatesSvc } from 'services/print-templates';\r\nimport { Page } from 'common/ui';\r\nimport { Api } from 'common/server';\r\nimport { I18n } from 'common/i18n';\r\nimport { ConfirmDialog } from 'common/dialogs/confirm/confirm-dialog';\r\nimport { HtmlEditorDialog } from 'resources/elements/html-editor/html-editor-dialog';\r\nimport { UiTermEditorDialog } from 'resources/elements/ui-term/ui-term-editor-dialog';\r\nimport { ABOUT_TYPE } from 'common/constants';\r\nimport { Leads } from 'services/leads';\r\nimport { c } from 'common/common';\r\n\r\nPLATFORM.moduleName('common/dialogs/confirm/confirm-dialog');\r\nPLATFORM.moduleName('resources/elements/html-editor/html-editor-dialog');\r\nPLATFORM.moduleName('resources/elements/ui-term/ui-term-editor-dialog');\r\n\r\nexport class PrintTemplates {\r\n static inject = [DialogService, EventAggregator, PrintTemplatesSvc, Page, Api, I18n, Leads];\r\n _dialogService;\r\n _ea;\r\n _printTemplates;\r\n _page;\r\n _api;\r\n _i18n;\r\n _leads;\r\n\r\n _printType = 'pdf';\r\n\r\n leadSources = [];\r\n leadSuppliers = [];\r\n\r\n filters = [\r\n { key: 'search', value: '', keys: ['name'] },\r\n ];\r\n\r\n constructor(dialogService, ea, printTemplates, page, api, i18n, leads) {\r\n this._dialogService = dialogService;\r\n this._ea = ea;\r\n this._printTemplates = printTemplates;\r\n this._page = page;\r\n this._api = api;\r\n this._i18n = i18n;\r\n this._leads = leads;\r\n }\r\n\r\n determineActivationStrategy() {\r\n return activationStrategy.invokeLifecycle;\r\n }\r\n\r\n activate(model) {\r\n if (model && model.printType) this._printType = model.printType;\r\n this._load();\r\n this._setTitle();\r\n }\r\n\r\n attached() {\r\n this._setTitle();\r\n }\r\n\r\n _setTitle() {\r\n // Run after all other tasks have completed - the nav changed needs to run first\r\n window.setTimeout(() => this._ea.publish(c.EventKeys.site.setPageTitle, { title: this._i18n.tr(`lead-${this._printType}-templates`), description: this._i18n.tr(`lead-${this._printType}-templates-description`) }), 0);\r\n }\r\n\r\n @computedFrom('_printType')\r\n get showPdfOptions() {\r\n return this._printType === 'pdf';\r\n }\r\n\r\n async _load(expandId) {\r\n try {\r\n this.templates = await this._printTemplates.byAboutType(this._printType, ABOUT_TYPE.Lead);\r\n this.templates.forEach(t => {\r\n t.actions = [];\r\n if (this.showPdfOptions) t.actions.push({ key: 'sample-pdf', name: 'lead:download-sample-pdf', icon: 'fa-duotone fa-file-pdf' });\r\n t.actions.push({ key: 'edit-html', name: 'lead:edit-print-template-html', icon: 'fa-duotone fa-file-code' });\r\n t.actions.push({ key: 'copy-template', name: 'lead:copy-print-template', icon: 'fa-duotone fa-copy' });\r\n t.actions.push({ key: 'delete-template', name: 'delete', icon: 'fa-duotone fa-trash-can' });\r\n });\r\n if (expandId) {\r\n this.templates.find(x => x.id === expandId).expanded = true;\r\n }\r\n await this._loadFilterOptions();\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n async _loadFilterOptions() {\r\n try {\r\n this.filterOptions = await this._printTemplates.filterOptions(ABOUT_TYPE.Lead);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n addTemplate() {\r\n const model = { key: 'lead:add-lead-print-template', okButtonClass: 'btn-primary', inputLabel: 'name', expanded: true };\r\n this._dialogService.open({ viewModel: ConfirmDialog, model, ignoreTransitions: true }).whenClosed(async(response) => {\r\n if (response.wasCancelled || !response.output.value) return;\r\n const data = await this._printTemplates.save(undefined, this._printType, ABOUT_TYPE.Lead, response.output.value);\r\n this._load(data.id);\r\n });\r\n }\r\n\r\n templateAction(key, t, index) {\r\n switch (key) {\r\n case 'delete-template': this._deleteTemplate(t, index); break;\r\n case 'edit-html': this.editHtml(t); break;\r\n case 'sample-pdf': this._exportSamplePdf(t); break;\r\n case 'copy-template': this._copyTemplate(t); break;\r\n }\r\n }\r\n\r\n async _copyTemplate(t) {\r\n try {\r\n const data = await this._printTemplates.copy(t.id);\r\n this._load(data.id);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n async _exportSamplePdf(t) {\r\n const model = { ids: null, exportType: 'sample', printTemplateId: t.id, inline: true };\r\n await this._page.export(this._api, 'leads/export/pdf', model, true);\r\n }\r\n\r\n async editHeader() {\r\n const html = await this._printTemplates.getHtml('lead-print-template-header-html');\r\n const model = { title: 'lead:edit-lead-template-header', html, callback: { id: 'lead-print-template-header-html', fn: this._saveHeaderFooter }, variables: this._leads.printTemplateVariables(true) };\r\n this._dialogService.open({ viewModel: HtmlEditorDialog, model, ignoreTransitions: true });\r\n }\r\n\r\n async editFooter() {\r\n const html = await this._printTemplates.getHtml('lead-print-template-footer-html');\r\n const model = { title: 'lead:edit-lead-template-footer', html, callback: { id: 'lead-print-template-footer-html', fn: this._saveHeaderFooter }, variables: this._leads.printTemplateVariables(true) };\r\n this._dialogService.open({ viewModel: HtmlEditorDialog, model, ignoreTransitions: true });\r\n }\r\n\r\n _saveHeaderFooter = async(id, html) => {\r\n switch (id) {\r\n case 'lead-print-template-header-html':\r\n await this._printTemplates.saveHeaderFooterHtml('leads/export/pdf-header', html);\r\n break;\r\n case 'lead-print-template-footer-html':\r\n await this._printTemplates.saveHeaderFooterHtml('leads/export/pdf-footer', html);\r\n break;\r\n }\r\n }\r\n\r\n async editVariable(key) {\r\n const value = this._i18n.tr(`lead:${key}`);\r\n const model = { title: `lead:edit-${key}`, value, callback: { id: key, fn: this._saveVariable } };\r\n this._dialogService.open({ viewModel: UiTermEditorDialog, model, ignoreTransitions: true });\r\n }\r\n\r\n _saveVariable = async(id, value) => {\r\n try {\r\n await this._printTemplates.saveVariable('lead', id, value);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n editHtml(t) {\r\n const model = { title: t.name, html: t.html, callback: { id: t.id, fn: this._saveHtml }, variables: this._leads.printTemplateVariables() };\r\n this._dialogService.open({ viewModel: HtmlEditorDialog, model, ignoreTransitions: true });\r\n }\r\n\r\n _saveHtml = async(id, html) => {\r\n try {\r\n const response = await this._printTemplates.saveHtml(id, html);\r\n const pt = this.templates.find(x => x.id === id);\r\n pt.html = response.html;\r\n pt.loadedHtml = response.loadedHtml;\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n async _deleteTemplate(t, index) {\r\n try {\r\n await this._printTemplates.delete(t.id);\r\n this.templates.splice(index, 1);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n editName(t) {\r\n t.currentName = t.name;\r\n t.editingName = true;\r\n }\r\n\r\n cancelEditName(t) {\r\n t.name = t.currentName;\r\n t.currentName = undefined;\r\n t.editingName = false;\r\n }\r\n\r\n async saveName(t) {\r\n try {\r\n await this._printTemplates.save(t.id, this._printType, ABOUT_TYPE.Lead, t.name);\r\n t.currentName = undefined;\r\n t.editingName = false;\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n async setDefault(t) {\r\n try {\r\n await this._printTemplates.setDefault(this._printType, ABOUT_TYPE.Lead, t.id);\r\n this.templates.forEach(t => t.isDefault = false);\r\n t.isDefault = true;\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n async leadSourceSelected(t) {\r\n try {\r\n if (!t.filter.leadSources.includes(t.addLeadSource)) t.filter.leadSources.push(t.addLeadSource);\r\n await this._saveFilter(t);\r\n t.closeLeadSourcePopover = new Date().valueOf();\r\n t.addLeadSource = undefined;\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n async removeLeadSource(t, index) {\r\n try {\r\n t.filter.leadSources.splice(index, 1);\r\n await this._saveFilter(t);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n async leadSupplierSelected(t) {\r\n try {\r\n if (!t.filter.leadSuppliers.includes(t.addLeadSupplier)) t.filter.leadSuppliers.push(t.addLeadSupplier);\r\n await this._saveFilter(t);\r\n t.closeLeadSupplierPopover = new Date().valueOf();\r\n t.addLeadSupplier = undefined;\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n async removeLeadSupplier(t, index) {\r\n try {\r\n t.filter.leadSuppliers.splice(index, 1);\r\n await this._saveFilter(t);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n async _saveFilter(t) {\r\n await this._printTemplates.saveFilter(t.id, t.filter);\r\n }\r\n}","import { LeadScripts, SCRIPT_PERSON, SCRIPT_TYPE } from 'services/lead-scripts';\r\nimport { DialogService } from 'aurelia-dialog';\r\nimport { EditScriptDialog } from './dialogs/edit-script-dialog';\r\nimport { EditScriptNameDialog } from './dialogs/edit-script-name-dialog';\r\nPLATFORM.moduleName('./dialogs/edit-script-dialog');\r\nPLATFORM.moduleName('./dialogs/edit-script-name-dialog');\r\n\r\nexport class Scripts {\r\n static inject = [LeadScripts, DialogService];\r\n _leadScripts;\r\n _dialogService;\r\n\r\n filters = [\r\n { key: 'search', value: '', keys: ['name','scriptTypeName','scriptPersonName'] },\r\n { value: `${SCRIPT_TYPE.Phone},${SCRIPT_TYPE.InPerson}`, list: SCRIPT_TYPE.all(), custom: this.scriptTypeFilter },\r\n { value: `${SCRIPT_PERSON.First},${SCRIPT_PERSON.Third}`, list: SCRIPT_PERSON.all(), custom: this.scriptPersonFilter },\r\n ];\r\n\r\n scriptTypes = SCRIPT_TYPE.allWithIcons();\r\n scriptPersons = SCRIPT_PERSON.allWithIcons();\r\n\r\n _handlers = [];\r\n\r\n constructor(leadScripts, dialogService) {\r\n this._leadScripts = leadScripts;\r\n this._dialogService = dialogService;\r\n this.scriptTypes.forEach(st => st.checked = true);\r\n this.scriptPersons.forEach(sp => sp.checked = true);\r\n }\r\n\r\n attached() {\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 }\r\n\r\n toggleScriptFilter(index, toggleStatus) {\r\n const currentList = this.filters[index].value.split(',');\r\n const idx = currentList.findIndex(x => x === toggleStatus);\r\n if (idx >= 0) {\r\n currentList.splice(idx, 1);\r\n } else {\r\n currentList.push(toggleStatus);\r\n }\r\n this.filters[index].list = currentList;\r\n this.filters[index].value = currentList.join(',');\r\n }\r\n\r\n scriptTypeFilter(filterValue, row) {\r\n if (!filterValue) return false;\r\n const currentTypes = filterValue.split(',');\r\n if (currentTypes.includes(row.scriptType)) return true;\r\n return false;\r\n }\r\n\r\n scriptPersonFilter(filterValue, row) {\r\n if (!filterValue) return false;\r\n const currentPersons = filterValue.split(',');\r\n if (currentPersons.includes(row.scriptPerson)) return true;\r\n return false;\r\n }\r\n\r\n async _load(expandId, showLoader = true) {\r\n try {\r\n if (showLoader) this.showLoader = true;\r\n this.scripts = await this._leadScripts.all();\r\n this.scripts.forEach(s => {\r\n s.actions = [\r\n { key: 'edit', name: 'lead:edit-script', icon: 'fa-duotone fa-pencil-alt' },\r\n { key: 'copy', name: 'lead:copy-script', icon: 'fa-duotone fa-copy' },\r\n { key: 'delete', name: 'delete', icon: 'fa-duotone fa-trash-can' },\r\n ];\r\n });\r\n if (expandId) {\r\n this.scripts.find(x => x.id === expandId).expanded = true;\r\n }\r\n await this._loadFilterOptions();\r\n } catch (err) {\r\n console.log(err);\r\n } finally {\r\n if (showLoader) this.showLoader = false;\r\n }\r\n }\r\n\r\n async _loadFilterOptions() {\r\n try {\r\n this.filterOptions = await this._leadScripts.filterOptions();\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n editScript(script) {\r\n\t const model = script || {};\r\n\t this._dialogService.open({ viewModel: EditScriptNameDialog, model: model, ignoreTransitions: true }).whenClosed(async(response) => {\r\n if (response.wasCancelled) return;\r\n this._load(response.output.id);\r\n if (script) return;\r\n // Only open the editor when adding a new script\r\n this.openEditor(response.output);\r\n\t });\r\n }\r\n\r\n\topenEditor(leadScript) {\r\n\t const model = leadScript || {};\r\n\t this._dialogService.open({ viewModel: EditScriptDialog, model: model, ignoreTransitions: true }).whenClosed(response => {\r\n this._load(leadScript.id);\r\n\t });\r\n\t}\r\n\r\n scriptAction(key, s, index) {\r\n switch (key) {\r\n case 'delete': this._delete(s, index); break;\r\n case 'edit': this.openEditor(s); break;\r\n case 'copy': this._copy(s); break;\r\n }\r\n }\r\n\r\n async _copy(s) {\r\n try {\r\n this.showLoader = true;\r\n const data = await this._leadScripts.copy(s.id);\r\n await this._load(data.id, false);\r\n } catch (err) {\r\n console.log(err);\r\n } finally {\r\n this.showLoader = false;\r\n }\r\n }\r\n\r\n async _delete(s) {\r\n try {\r\n this.showLoader = true;\r\n await this._leadScripts.delete(s.id);\r\n await this._load(undefined, false);\r\n } catch (err) {\r\n console.log(err);\r\n } finally {\r\n this.showLoader = false;\r\n }\r\n }\r\n\r\n async setDefault(s) {\r\n try {\r\n this.showLoader = true;\r\n await this._leadScripts.setDefault(s.id);\r\n this.scripts.forEach(script => {\r\n // script defaults are per type\r\n if (s.scriptType != script.scriptType || s.scriptPerson != script.scriptPerson) return;\r\n script.isDefault = false;\r\n });\r\n s.isDefault = true;\r\n } catch (err) {\r\n console.log(err);\r\n } finally {\r\n this.showLoader = false;\r\n }\r\n }\r\n\r\n async leadSourceSelected(s) {\r\n try {\r\n if (!s.filter.leadSources.includes(s.addLeadSource)) s.filter.leadSources.push(s.addLeadSource);\r\n await this._saveFilter(s);\r\n s.closeLeadSourcePopover = new Date().valueOf();\r\n s.addLeadSource = undefined;\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n async removeLeadSource(s, index) {\r\n try {\r\n s.filter.leadSources.splice(index, 1);\r\n await this._saveFilter(s);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n async leadSupplierSelected(s) {\r\n try {\r\n if (!s.filter.leadSuppliers.includes(s.addLeadSupplier)) s.filter.leadSuppliers.push(s.addLeadSupplier);\r\n await this._saveFilter(s);\r\n s.closeLeadSupplierPopover = new Date().valueOf();\r\n s.addLeadSupplier = undefined;\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n async removeLeadSupplier(s, index) {\r\n try {\r\n s.filter.leadSuppliers.splice(index, 1);\r\n await this._saveFilter(s);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n async _saveFilter(s) {\r\n await this._leadScripts.saveFilter(s.id, s.filter);\r\n }\r\n}\r\n","import { I18n } from 'common/i18n';\r\nimport { LeadSources } from 'services/lead-sources';\r\nimport { DialogService } from 'aurelia-dialog';\r\nimport { LinkCallbackRenderer } from 'resources/elements/analytics/analytics-cell-renderers';\r\n\r\nimport { EditSource } from './dialogs/edit-source';\r\nPLATFORM.moduleName('./dialogs/edit-source');\r\n\r\nexport class Sources {\r\n static inject = [I18n, LeadSources, DialogService];\r\n _i18n;\r\n _leadSources;\r\n _dialogService;\r\n\r\n filters = [\r\n { key: 'search', value: '', keys: ['id', 'name', 'supplier', 'receivedAgeValue', 'leadTypeValue', 'product', 'campaignID', 'campaignName'] },\r\n ];\r\n filterColumns;\r\n pageSize = 25;\r\n\r\n _handlers = [];\r\n\r\n constructor(i18n, leadSources, dialogService) {\r\n this._i18n = i18n;\r\n this._leadSources = leadSources;\r\n this._dialogService = dialogService;\r\n }\r\n\r\n attached() {\r\n this._load();\r\n this._initializeGrid();\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 reload() {\r\n this._load();\r\n }\r\n\r\n async _load() {\r\n try {\r\n this.loading = true;\r\n this.sources = await this._leadSources.all();\r\n this.sources.forEach(s => {\r\n s.nameCallback = () => this.editSource(s);\r\n });\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 editSource(source) {\r\n this._dialogService.open({ viewModel: EditSource, model: source, ignoreTransitions: true }).whenClosed(async(response) => {\r\n if (response.wasCancelled) return;\r\n this._load();\r\n });\r\n }\r\n\r\n async save() {\r\n try {\r\n const payload = {\r\n id: this.id,\r\n name: this.name,\r\n supplier: this.supplier,\r\n product: this.product,\r\n receivedAge: this.receivedAge,\r\n leadType: this.leadType,\r\n ownerMemberId: this.ownerMemberId,\r\n };\r\n const response = await this._leadSources.save(payload);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n _initializeGrid() {\r\n this.cols = [\r\n {\r\n field: 'name',\r\n headerName: this._i18n.tr('name'),\r\n enableRowGroup: false,\r\n cellRenderer: LinkCallbackRenderer,\r\n cellRendererParams: { zeusCallback: 'nameCallback' },\r\n },\r\n {\r\n field: 'cost',\r\n headerName: this._i18n.tr('lead:cost'),\r\n cellDataType: 'number',\r\n },\r\n {\r\n field: 'supplier',\r\n headerName: this._i18n.tr('lead:supplier'),\r\n enableRowGroup: true,\r\n },\r\n {\r\n field: 'campaignID',\r\n headerName: this._i18n.tr('lead-campaign-id'),\r\n enableRowGroup: true,\r\n },\r\n {\r\n field: 'campaignName',\r\n headerName: this._i18n.tr('lead-campaign-name'),\r\n enableRowGroup: true,\r\n },\r\n {\r\n field: 'leadTypeValue',\r\n headerName: this._i18n.tr('lead:type'),\r\n enableRowGroup: true,\r\n },\r\n {\r\n field: 'product',\r\n headerName: this._i18n.tr('lead:product'),\r\n enableRowGroup: true,\r\n },\r\n {\r\n field: 'receivedAgeValue',\r\n headerName: this._i18n.tr('lead:age'),\r\n enableRowGroup: true,\r\n },\r\n {\r\n field: 'leadCount',\r\n headerName: this._i18n.tr('lead:count'),\r\n cellDataType: 'number',\r\n },\r\n ];\r\n }\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-user-role {\\n margin-bottom: var(--zeus-margin);\\n padding-bottom: var(--zeus-margin);\\n border-bottom: 1px solid #ccc;\\n}\\n.zeus-user-role:last-child {\\n border-bottom-width: 0;\\n}\\n\\n.zeus-user-role-container {\\n display: flex;\\n justify-content: space-between;\\n align-items: flex-start;\\n}\\n\\n.zeus-user-role-description {\\n margin-left: var(--zeus-margin);\\n font-style: italic;\\n}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/admin/dialogs/assign-roles.scss\"],\"names\":[],\"mappings\":\"AAAA;EACI,iCAAA;EACA,kCAAA;EACA,6BAAA;AACJ;AACI;EACI,sBAAA;AACR;;AAGA;EACI,aAAA;EACA,8BAAA;EACA,uBAAA;AAAJ;;AAGA;EACI,+BAAA;EACA,kBAAA;AAAJ\",\"sourcesContent\":[\".zeus-user-role {\\r\\n margin-bottom: var(--zeus-margin);\\r\\n padding-bottom: var(--zeus-margin);\\r\\n border-bottom: 1px solid #ccc;\\r\\n\\r\\n &:last-child {\\r\\n border-bottom-width: 0;\\r\\n }\\r\\n}\\r\\n\\r\\n.zeus-user-role-container {\\r\\n display: flex;\\r\\n justify-content: space-between;\\r\\n align-items: flex-start;\\r\\n}\\r\\n\\r\\n.zeus-user-role-description {\\r\\n margin-left: var(--zeus-margin);\\r\\n font-style: italic;\\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-script-card {\\n min-width: 500px;\\n}\\n.zeus-script-card .card-title {\\n font-size: 1em !important;\\n}\\n\\n.zeus-previous-script-arrow {\\n position: absolute;\\n bottom: -1.1em;\\n left: var(--zeus-margin-xl);\\n}\\n\\n.zeus-next-script-arrow {\\n position: absolute;\\n top: -1.1em;\\n left: var(--zeus-margin-xl);\\n}\\n\\n.zeus-previous-next-script {\\n min-width: 400px;\\n}\\n.zeus-previous-next-script .card-body {\\n font-size: 0.9em;\\n}\\n\\n.zeus-script-number {\\n width: 20px;\\n height: 20px;\\n font-size: 12px;\\n line-height: 20px;\\n border-radius: 50%;\\n display: inline-flex;\\n align-items: center;\\n justify-content: center;\\n background-color: var(--kt-primary);\\n color: var(--kt-primary-light);\\n margin-right: var(--zeus-margin-sm);\\n}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/admin/leads/dialogs/edit-script-dialog.scss\"],\"names\":[],\"mappings\":\"AAAA;EACI,gBAAA;AACJ;AACI;EACI,yBAAA;AACR;;AAGA;EACI,kBAAA;EACA,cAAA;EACA,2BAAA;AAAJ;;AAGA;EACI,kBAAA;EACA,WAAA;EACA,2BAAA;AAAJ;;AAGA;EACI,gBAAA;AAAJ;AAEI;EACI,gBAAA;AAAR;;AAIA;EACI,WAAA;EACA,YAAA;EACA,eAAA;EACA,iBAAA;EACA,kBAAA;EACA,oBAAA;EACA,mBAAA;EACA,uBAAA;EACA,mCAAA;EACA,8BAAA;EACA,mCAAA;AADJ\",\"sourcesContent\":[\".zeus-script-card {\\r\\n min-width: 500px;\\r\\n\\r\\n .card-title {\\r\\n font-size: 1em !important;\\r\\n }\\r\\n}\\r\\n\\r\\n.zeus-previous-script-arrow {\\r\\n position: absolute;\\r\\n bottom: -1.1em;\\r\\n left: var(--zeus-margin-xl);\\r\\n}\\r\\n\\r\\n.zeus-next-script-arrow {\\r\\n position: absolute;\\r\\n top: -1.1em;\\r\\n left: var(--zeus-margin-xl);\\r\\n}\\r\\n\\r\\n.zeus-previous-next-script {\\r\\n min-width: 400px;\\r\\n\\r\\n .card-body {\\r\\n font-size: 0.9em;\\r\\n }\\r\\n}\\r\\n\\r\\n.zeus-script-number {\\r\\n width: 20px;\\r\\n height: 20px;\\r\\n font-size: 12px;\\r\\n line-height: 20px;\\r\\n border-radius: 50%;\\r\\n display: inline-flex;\\r\\n align-items: center;\\r\\n justify-content: center;\\r\\n background-color: var(--kt-primary);\\r\\n color: var(--kt-primary-light);\\r\\n margin-right: var(--zeus-margin-sm);\\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, \".uas-print-template-preview {\\n width: 425px;\\n max-width: 100%;\\n height: 600px;\\n border: 1px solid gray;\\n padding: 15px;\\n font-size: 40%;\\n}\\n.uas-print-template-preview img {\\n max-width: 100%;\\n}\\n\\n.zeus-print-template-edit-button {\\n position: absolute;\\n top: -15px;\\n right: -15px;\\n height: 40px !important;\\n width: 40px !important;\\n}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/admin/leads/print-templates.scss\"],\"names\":[],\"mappings\":\"AAAA;EACI,YAAA;EACA,eAAA;EACA,aAAA;EACA,sBAAA;EACA,aAAA;EACA,cAAA;AACJ;AACI;EACI,eAAA;AACR;;AAGA;EACI,kBAAA;EACA,UAAA;EACA,YAAA;EACA,uBAAA;EACA,sBAAA;AAAJ\",\"sourcesContent\":[\".uas-print-template-preview {\\r\\n width: 425px;\\r\\n max-width: 100%;\\r\\n height: 600px;\\r\\n border: 1px solid gray;\\r\\n padding: 15px;\\r\\n font-size: 40%;\\r\\n\\r\\n img {\\r\\n max-width: 100%;\\r\\n }\\r\\n}\\r\\n\\r\\n.zeus-print-template-edit-button {\\r\\n position: absolute;\\r\\n top: -15px;\\r\\n right: -15px;\\r\\n height: 40px !important;\\r\\n width: 40px !important;\\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-script-edit-button {\\n position: absolute;\\n top: -15px;\\n right: -15px;\\n height: 40px !important;\\n width: 40px !important;\\n}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/admin/leads/scripts.scss\"],\"names\":[],\"mappings\":\"AAAA;EACI,kBAAA;EACA,UAAA;EACA,YAAA;EACA,uBAAA;EACA,sBAAA;AACJ\",\"sourcesContent\":[\".zeus-script-edit-button {\\r\\n position: absolute;\\r\\n top: -15px;\\r\\n right: -15px;\\r\\n height: 40px !important;\\r\\n width: 40px !important;\\r\\n}\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// 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 = \"\\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 = \"\\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 = \"\\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;"],"names":[],"sourceRoot":""}