{"version":3,"file":"app-9908bfe4.9729664bca28a8e6916d.bundle.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAeA;AACA;AAAA;AAdA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAGA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AAAA;AAAA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAtUA;;;;;;;;;;;;;;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AAEA;AAMA;AAAA;AAHA;AAIA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAiBA;AAAA;AAfA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAEA;AAAA;AAAA;AAAA;AAKA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AApFA;;;;;;;;;;;;;;;;ACVA;AACA;AAEA;AAWA;AAAA;AATA;AACA;AAEA;AACA;AACA;AACA;AAIA;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;AA1CA;;;;;;;;;;;;;;;;ACHA;AACA;AAEA;AAWA;AAAA;AATA;AACA;AAEA;AACA;AACA;AACA;AAIA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAlCA;;;;;;;;;;;;;;;;;;ACHA;AACA;AACA;AACA;AAEA;AAOA;AAAA;AALA;AACA;AAKA;AACA;AACA;AAEA;AAGA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AA9BA;;;;;;;;;;;;;;;;;;ACLA;AACA;AACA;AACA;AAEA;AAOA;AAAA;AALA;AACA;AAKA;AACA;AACA;AAEA;AAGA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AA7BA;;;;;;;;;;;;;;;ACLA;AAEA;AAMA;AAAA;AAJA;AAKA;AACA;AAEA;AACA;AACA;AACA;AAbA;;;;;;;;;;;;;;;;ACFA;AACA;AAEA;AAQA;AAAA;AANA;AACA;AAEA;AAIA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AACA;AAjCA;;;;;;;;;;;;;;;;;ACHA;AACA;AAEA;AAWA;AAAA;AATA;AAEA;AACA;AAEA;AAAA;AAAA;AAAA;AACA;AAIA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAzCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAwDA;AAAA;AAtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAAA;AAIA;AACA;AACA;AAAA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAEA;AAEA;AACA;AAGA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAGA;AAAA;AAAA;AACA;AA+SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAjUA;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;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;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;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AACA;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;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AA0BA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AAAA;AAEA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAtiBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAcA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAmCA;AAAA;AAjCA;AACA;AACA;AACA;AACA;AACA;AAGA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAGA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAIA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;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;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAzLA;;;;;;;;;;;;;;;;;ACVA;AACA;AACA;AAEA;AAmBA;AAAA;AAjBA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AAAA;AAEA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAEA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;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;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAEA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAEA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAEA;AAAA;AAAA;AAAA;AAAA;AAEA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAEA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA7KA;;;;;;;;;;;;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAYA;AAAA;AAVA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAAA;AAGA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AA1EA;;;;;;;;;;;;;;;;;;;;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAcA;AAAA;AAZA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AApIA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;;ACrBA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AArCA;;;;;;;;;;;;;;;;;ACHA;AACA;AACA;AAEA;AAKA;AAAA;AAHA;AAIA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA5BA;;;;;;;;;;;;;;;ACJA;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","sources":["webpack://www.zeusteam.com/./src/admin/_index.js","webpack://www.zeusteam.com/./src/admin/approvals/pending-approvals.js","webpack://www.zeusteam.com/./src/admin/carrier/carrier-list.js","webpack://www.zeusteam.com/./src/admin/carrier/dialog/assign-product-alias.js","webpack://www.zeusteam.com/./src/admin/carrier/dialog/enter-agent-number.js","webpack://www.zeusteam.com/./src/admin/carrier/dialog/enter-split.js","webpack://www.zeusteam.com/./src/admin/carrier/dialog/enter-target-premium.js","webpack://www.zeusteam.com/./src/admin/carrier/dialog/policy-changelog.js","webpack://www.zeusteam.com/./src/admin/carrier/dialog/select-policy-status.js","webpack://www.zeusteam.com/./src/admin/carrier/file-imports.js","webpack://www.zeusteam.com/./src/admin/carrier/uploads.js","webpack://www.zeusteam.com/./src/admin/content/dialog/set-email-parameters.js","webpack://www.zeusteam.com/./src/admin/content/editor.js","webpack://www.zeusteam.com/./src/admin/content/emails.js","webpack://www.zeusteam.com/./src/admin/content/ui-terms.js","webpack://www.zeusteam.com/./src/admin/contests/list.js","webpack://www.zeusteam.com/./src/admin/dashboard.js","webpack://www.zeusteam.com/./src/admin/_index.scss","webpack://www.zeusteam.com/./src/admin/content/emails.scss","webpack://www.zeusteam.com/./src/admin/content/ui-terms.scss","webpack://www.zeusteam.com/./src/admin/_index.html","webpack://www.zeusteam.com/./src/admin/approvals/pending-approvals.html","webpack://www.zeusteam.com/./src/admin/carrier/carrier-list.html","webpack://www.zeusteam.com/./src/admin/carrier/dialog/assign-product-alias.html","webpack://www.zeusteam.com/./src/admin/carrier/dialog/enter-agent-number.html","webpack://www.zeusteam.com/./src/admin/carrier/dialog/enter-split.html","webpack://www.zeusteam.com/./src/admin/carrier/dialog/enter-target-premium.html","webpack://www.zeusteam.com/./src/admin/carrier/dialog/policy-changelog.html","webpack://www.zeusteam.com/./src/admin/carrier/dialog/select-policy-status.html","webpack://www.zeusteam.com/./src/admin/carrier/file-imports.html","webpack://www.zeusteam.com/./src/admin/carrier/uploads.html","webpack://www.zeusteam.com/./src/admin/content/dialog/set-email-parameters.html","webpack://www.zeusteam.com/./src/admin/content/editor.html","webpack://www.zeusteam.com/./src/admin/content/emails.html","webpack://www.zeusteam.com/./src/admin/content/ui-terms.html","webpack://www.zeusteam.com/./src/admin/contests/list.html","webpack://www.zeusteam.com/./src/admin/dashboard.html"],"sourcesContent":["import { PLATFORM } from 'aurelia-pal';\r\nimport { RouterEvent } from 'aurelia-router';\r\nimport { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { Security } from 'common/security';\r\nimport { Menus } from 'services/menus';\r\nimport { I18n } from 'common/i18n';\r\nimport { Notifier } from 'common/ui';\r\nimport { Sites } from 'services/sites';\r\nimport { DialogService } from 'aurelia-dialog';\r\nimport { Nylas } from 'services/nylas';\r\nimport { Dialer, DIALER_TEAM } from 'services/dialer';\r\nimport { Drawer } from 'common/drawer';\r\nimport { AgentCardDialog } from './../members/agents/dialogs/agent-card-dialog';\r\nimport { PolicyCardDialog } from './../members/policies/dialogs/policy-card-dialog';\r\nimport { LeadCardDialog2 } from './../members/leads/dialogs/lead-card-dialog2';\r\nimport { c } from 'common/common';\r\nimport { ROLE } from 'common/constants';\r\nimport { RouterConfigBase } from 'resources/base-classes/router-config-base';\r\nimport environment from '../../config/environment.json';\r\nPLATFORM.moduleName('./../members/agents/dialogs/agent-card-dialog');\r\nPLATFORM.moduleName('./../members/policies/dialogs/policy-card-dialog');\r\nPLATFORM.moduleName('./../members/leads/dialogs/lead-card-dialog2');\r\n\r\nexport class Admin extends RouterConfigBase {\r\n static inject = [EventAggregator, Security, Menus, I18n, Notifier, Sites, DialogService, Nylas, Dialer];\r\n _i18n;\r\n _notifier;\r\n _sites;\r\n _dialogService;\r\n _nylas;\r\n _dialer;\r\n\r\n pageTitle;\r\n pageDescription;\r\n\r\n adminToolsOn = false;\r\n _handlers = [];\r\n\r\n constructor(ea, security, menus, i18n, notifier, sites, dialogService, nylas, dialer) {\r\n super(ea, security, menus, 'admin', true)\r\n\t this._i18n = i18n;\r\n this._notifier = notifier;\r\n this._sites = sites;\r\n this._dialogService = dialogService;\r\n this._nylas = nylas;\r\n this._dialer = dialer;\r\n\t}\r\n\r\n async activate() {\r\n await this._i18n.loadNamespace(['admin', 'note', 'policy', 'client', 'audit-log', 'lead']);\r\n }\r\n \r\n configureRouter(config, router){\r\n config.title = 'Admin';\r\n config.auth = true;\r\n config.map([\r\n {\r\n route: '',\r\n moduleId: PLATFORM.moduleName('admin/dashboard'),\r\n nav: true,\r\n membersOnly: true,\r\n adminOnly: false,\r\n settings: { roles: this._security.accessAdminRoles(), title: 'Admin Dashboard', description: '' },\r\n },\r\n {\r\n route: ['team-members', 'agents'],\r\n name: 'admin-agents',\r\n moduleId: PLATFORM.moduleName('admin/team-members'),\r\n nav: true,\r\n membersOnly: true,\r\n adminOnly: false,\r\n settings: { roles: [ROLE.Admin, ROLE.AgentAdmin], title: 'Agent Search', description: 'Search for an agent to see agent details' },\r\n },\r\n {\r\n route: ['team-member/:id', 'agent/:id'],\r\n moduleId: PLATFORM.moduleName('admin/team-member'),\r\n nav: false,\r\n membersOnly: true,\r\n adminOnly: true,\r\n settings: { title: 'Agent', description: 'View and edit an agent' },\r\n },\r\n {\r\n route: ['team-member-hierarchy/:id', 'agent-hierarchy/:id'],\r\n moduleId: PLATFORM.moduleName('admin/team-member-hierarchy'),\r\n nav: false,\r\n membersOnly: true,\r\n adminOnly: true,\r\n settings: { title: 'Agent Hierarchy', description: 'View an agent upline and downline' },\r\n },\r\n {\r\n route: 'reports',\r\n moduleId: PLATFORM.moduleName('admin/reports/_index'),\r\n nav: true,\r\n membersOnly: true,\r\n adminOnly: true,\r\n settings: { title: 'Reports', description: 'Run reports for agents, agencies, level changes, policies and products' },\r\n },\r\n {\r\n route: 'policy/upload-files',\r\n moduleId: PLATFORM.moduleName('admin/policies/upload-files'),\r\n title: 'Upload Files',\r\n nav: false,\r\n membersOnly: true,\r\n adminOnly: true,\r\n settings: { title: 'Upload Policy Documents', description: 'Upload individual files or a zip with multiple. File name must be the policy number.' }\r\n },\r\n {\r\n route: ['policy/:id?'],\r\n moduleId: PLATFORM.moduleName('admin/policies/edit-policy'),\r\n title: 'Edit Policy',\r\n nav: false,\r\n membersOnly: true,\r\n adminOnly: true,\r\n settings: { title: 'Policy', description: 'Enter the policy number to view and edit a policy' }\r\n },\r\n {\r\n route: ['carrier/imports', 'carrier/imports/:fileName'],\r\n moduleId: PLATFORM.moduleName('admin/carrier/file-imports'),\r\n nav: true,\r\n membersOnly: true,\r\n adminOnly: true,\r\n settings: { title: 'Carrier Imports', description: 'View carrier file uploads and automatic data feeds' },\r\n },\r\n {\r\n route: ['carrier/uploads', 'carrier/uploads/:fileName', 'carrier/uploads/data-feed/:exceptionId'],\r\n moduleId: PLATFORM.moduleName('admin/carrier/uploads'),\r\n nav: true,\r\n membersOnly: true,\r\n adminOnly: false,\r\n settings: { roles: [ROLE.Admin, ROLE.PolicyReviewer, ROLE.PolicyAdmin], title: 'Carrier Uploads', description: 'Upload policy files and commission rates' },\r\n },\r\n {\r\n route: 'reports/policy/status-changes',\r\n moduleId: PLATFORM.moduleName('admin/policies/status-changes'),\r\n title: 'Status Changes',\r\n nav: true,\r\n membersOnly: true,\r\n adminOnly: false,\r\n settings: { roles: [ROLE.Admin, ROLE.PolicyAdmin], title: 'Policy Status Changes', description: 'Aggregation of all files processed during the selected day' }\r\n },\r\n {\r\n route: 'content',\r\n moduleId: PLATFORM.moduleName('admin/content/editor'),\r\n nav: true,\r\n membersOnly: true,\r\n adminOnly: true,\r\n settings: { title: 'Content', description: 'Manage content displayed on the site' },\r\n },\r\n {\r\n route: 'emails',\r\n moduleId: PLATFORM.moduleName('admin/content/emails'),\r\n nav: true,\r\n membersOnly: true,\r\n adminOnly: true,\r\n settings: { title: 'Emails', description: 'Manage emails sent by the site' },\r\n },\r\n {\r\n route: 'ui-terms',\r\n moduleId: PLATFORM.moduleName('admin/content/ui-terms'),\r\n nav: true,\r\n membersOnly: true,\r\n adminOnly: true,\r\n settings: { title: 'Terms', description: 'Manage terms displayed within the site' },\r\n },\r\n {\r\n route: 'approvals',\r\n moduleId: PLATFORM.moduleName('admin/approvals/pending-approvals'),\r\n nav: true,\r\n membersOnly: true,\r\n adminOnly: true,\r\n settings: { title: 'Pending Approvals', description: 'Approve or reject updates to agent site bios' },\r\n },\r\n {\r\n route: 'kpis',\r\n moduleId: PLATFORM.moduleName('admin/kpis/kpi-templates'),\r\n nav: true,\r\n membersOnly: true,\r\n adminOnly: true,\r\n settings: { title: 'KPI Templates', description: 'Manage key performance indicators' },\r\n },\r\n {\r\n route: 'carriers',\r\n moduleId: PLATFORM.moduleName('admin/carrier/carrier-list'),\r\n nav: true,\r\n membersOnly: true,\r\n adminOnly: true,\r\n settings: { title: 'Carriers', description: 'Manage carriers, products and statuses' },\r\n },\r\n {\r\n route: 'sites',\r\n moduleId: PLATFORM.moduleName('admin/site/site-list'),\r\n nav: true,\r\n membersOnly: true,\r\n adminOnly: true,\r\n settings: { title: 'Site Themes', description: 'Manage site themes' },\r\n },\r\n {\r\n route: 'landing-pages',\r\n moduleId: PLATFORM.moduleName('admin/landing-pages/list'),\r\n nav: true,\r\n membersOnly: true,\r\n adminOnly: true,\r\n settings: { title: 'Landing Pages', description: 'Manage landing pages' },\r\n },\r\n {\r\n route: 'answers',\r\n moduleId: PLATFORM.moduleName('admin/q-and-a/answers'),\r\n nav: true,\r\n membersOnly: true,\r\n adminOnly: true,\r\n settings: { title: 'Questions & Answers', description: 'Manage Q&A displayed on the personal agent sites' },\r\n },\r\n {\r\n route: 'answers/:slug',\r\n moduleId: PLATFORM.moduleName('admin/q-and-a/answer'),\r\n nav: false,\r\n membersOnly: true,\r\n adminOnly: true,\r\n settings: { title: 'Answers', description: 'Manage Q&A displayed on the personal agent sites' },\r\n },\r\n {\r\n route: 'contests',\r\n moduleId: PLATFORM.moduleName('admin/contests/list'),\r\n nav: false,\r\n membersOnly: true,\r\n adminOnly: true,\r\n settings: { title: 'Contests', description: 'Manage contests and assign points' },\r\n },\r\n {\r\n route: 'leads',\r\n moduleId: PLATFORM.moduleName('admin/leads/_index'),\r\n nav: false,\r\n membersOnly: true,\r\n adminOnly: true,\r\n settings: { title: 'Leads', description: 'Manage LPFN leads' },\r\n },\r\n {\r\n route: 'map',\r\n moduleId: PLATFORM.moduleName('admin/us-map'),\r\n nav: false,\r\n membersOnly: true,\r\n adminOnly: true,\r\n settings: { roles: [ROLE.Admin], title: 'Test Map', description: 'Test map functionality' },\r\n },\r\n ]);\r\n\r\n this.router = router;\r\n }\r\n\r\n attached() {\r\n this._attached();\r\n this._handlers.push(this._ea.subscribe(c.EventKeys.onboarding.completed, () => this._onboardingCompleted()));\r\n this._handlers.push(this._ea.subscribe(c.EventKeys.navigation.changing, () => this.closeMenu()));\r\n this.sidebarEl = document.getElementById('kt_app_sidebar');\r\n this._applyTheme();\r\n this.setMenu();\r\n this._initialize();\r\n }\r\n\r\n async _initialize() {\r\n this._handlers.push(this._ea.subscribe(RouterEvent.Complete, (event) => {\r\n this._resetLogoutTimer();\r\n }));\r\n this._handlers.push(this._ea.subscribe(c.EventKeys.site.openProfile, (data) => this._openProfile(data)));\r\n this._handlers.push(this._ea.subscribe(c.EventKeys.site.openPolicy, (data) => this._openPolicy(data)));\r\n this._handlers.push(this._ea.subscribe(c.EventKeys.site.openLead, (data) => this._openLead(data)));\r\n\r\n this.canAutoDial = await this._dialer.canDial(DIALER_TEAM.NoPrompt);\r\n\r\n this._resetLogoutTimer();\r\n this._nylas.loadScript();\r\n }\r\n\r\n detached() {\r\n this._detached();\r\n this._handlers.forEach(h => h.dispose());\r\n this._handlers = [];\r\n if (this._logoutTimer) window.clearTimeout(this._logoutTimer);\r\n this.closeMenu();\r\n }\r\n\r\n closeMenu() {\r\n if (this._sidebarDrawer) this._sidebarDrawer.hide();\r\n }\r\n\r\n _onboardingCompleted() {\r\n this.showSidebarMenu = true;\r\n this.showQuickActionsButton = true;\r\n this.showHeaderOptions = true;\r\n this._initialize();\r\n }\r\n\r\n async _applyTheme() {\r\n try {\r\n const theme = await this._sites.theme();\r\n this.lightLogo = `${environment.static}/${theme.light.logoPath}`;\r\n this.darkLogo = `${environment.static}/${theme.dark.logoPath}`;\r\n this.lightIcon = `${environment.static}/files/themes/${theme.key}/favicons/favicon-96x96.png`;\r\n this.darkIcon = `${environment.static}/files/themes/${theme.key}/favicons/favicon-96x96.png`;\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n _resetLogoutTimer() {\r\n if (this._logoutTimer) window.clearTimeout(this._logoutTimer);\r\n this._logoutTimer = window.setTimeout(() => {\r\n this._security.logout();\r\n this._notifier.info('inactivity-timeout-message', 'security-notice', true);\r\n this.router.navigate('#/');\r\n }, 4 * 60 * 60 * 1000); // 4 hrs = 4 * 60 * 60 * 1000\r\n }\r\n\r\n _openProfile(data) {\r\n const model = { id: data.member ? data.member.id : data.memberId };\r\n model.tab = data.tab;\r\n\t this._dialogService.open({ viewModel: AgentCardDialog, model, ignoreTransitions: true });\r\n }\r\n\r\n _openPolicy(data) {\r\n const model = { id: data.policyId };\r\n model.tab = data.tab;\r\n\t this._dialogService.open({ viewModel: PolicyCardDialog, model, ignoreTransitions: true });\r\n }\r\n\r\n _openLead(data) {\r\n const model = { id: data.lead ? data.lead.id : data.leadId };\r\n model.tab = data.tab;\r\n model.action = data.action;\r\n this._dialogService.open({ viewModel: LeadCardDialog2, model, ignoreTransitions: true });\r\n }\r\n\r\n openSidebar() {\r\n try {\r\n if (!this._sidebarDrawer) this._sidebarDrawer = new Drawer(this.sidebarEl);\r\n this._sidebarDrawer.show();\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n showNavigation(row) {\r\n if (!row.settings) return true;\r\n if (row.settings.adminOnly && !this.isAdmin) return false;\r\n if (row.settings.minimumLevel) {\r\n return this._security.isInMinimumLevel(row.settings.minimumLevel);\r\n }\r\n return true;\r\n }\r\n}\r\n","import {inject} from 'aurelia-framework';\r\nimport {EventAggregator} from 'aurelia-event-aggregator';\r\nimport {Security} from 'common/security';\r\nimport {Notifier, Page} from 'common/ui';\r\nimport {Api} from 'common/server';\r\nimport {I18n} from 'common/i18n';\r\n\r\n@inject(EventAggregator, Security, Notifier, Page, Api, I18n)\r\nexport class PendingApprovals {\r\n\r\n approvals = [];\r\n approvalOfImgSrc = '';\r\n\r\n constructor(eventAggregator, security, notifier, page, api, i18n) {\r\n this.eventAggregator = eventAggregator;\r\n this.security = security;\r\n this.notifier = notifier;\r\n this.page = page;\r\n this.api = api;\r\n this.i18n = i18n;\r\n\r\n this._loadApprovals();\r\n }\r\n\r\n _loadApprovals() {\r\n var me = this;\r\n\r\n me.api.getData('approval/pending').then(data => {\r\n me.approvals = data;\r\n }).catch(error => {\r\n me.notifier.generalError();\r\n });\r\n }\r\n\r\n approve(approval) {\r\n var me = this;\r\n me.api.postData(\"approval/\" + approval.id + \"/approve\", null).then(data => {\r\n me._loadApprovals();\r\n console.log(data);\r\n }).catch(error => {\r\n me.notifier.generalError();\r\n });\r\n }\r\n\r\n reject(approval) {\r\n var me = this;\r\n me.api.postData(\"approval/\" + approval.id + \"/reject\", { comments: approval.comments }).then(data => {\r\n me._loadApprovals();\r\n console.log(data);\r\n }).catch(error => {\r\n me.notifier.generalError();\r\n });\r\n }\r\n\r\n toggleApproval(id) {\r\n for (var i = 0; i < this.approvals.length; i++) {\r\n if (this.approvals[i].id !== id) continue;\r\n this.approvals[i].show = !this.approvals[i].show;\r\n break;\r\n }\r\n }\r\n}\r\n","import { PLATFORM } from 'aurelia-pal';\r\nimport { CarrierEditor } from './../../members/carriers/dialog/carrier-editor';\r\nimport { DialogService } from 'aurelia-dialog';\r\nimport { Carriers } from 'services/carriers';\r\nimport { Security } from 'common/security';\r\nimport { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { ROLE } from 'common/constants';\r\nimport { c } from 'common/common';\r\nPLATFORM.moduleName('./../../members/carriers/dialog/carrier-editor');\r\n\r\nexport class CarrierList {\r\n static inject = [Carriers, DialogService, Security, EventAggregator]\r\n _carriers;\r\n _dialogService;\r\n _security;\r\n _ea;\r\n _handlers = [];\r\n\r\n CarrierAdminRole = ROLE.CarrierAdmin;\r\n\r\n loading = false;\r\n canEdit = false;\r\n\r\n carrierFilters = [{ value: '', keys: ['name', 'code'] }];\r\n\r\n carriers = [];\r\n\r\n constructor(carriers, dialogService, security, eventAggregator) {\r\n this._carriers = carriers;\r\n this._dialogService = dialogService;\r\n this._security = security;\r\n this._ea = eventAggregator;\r\n }\r\n\r\n attached() {\r\n this.canEdit = this._security.isInRole(ROLE.CarrierAdmin);\r\n this._load();\r\n this._handlers.push(this._ea.subscribe('dnd:didEnd', async() => {\r\n window.setTimeout(() => this._saveCarrierOrdering(), 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 _saveCarrierOrdering() {\r\n if (!this.canEdit) return;\r\n try {\r\n const orderedIds = this.dgCarriers.map(x => x.id);\r\n await this._carriers.setOrdering(orderedIds);\r\n this.triggerMenuUpdate();\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n triggerMenuUpdate() {\r\n this._carriers.clear();\r\n this._ea.publish(c.EventKeys.menu.reset, { menu: 'members', fireEvent: true });\r\n }\r\n\r\n async _load() {\r\n try {\r\n this.loading = true;\r\n this.carriers = await this._carriers.all();\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 openEditor(carrier) {\r\n if (!this.canEdit) return;\r\n await this._dialogService.open({ viewModel: CarrierEditor, model: carrier, ignoreTransitions: true }).whenClosed(async(response) => {\r\n this.carriers = [];\r\n this.triggerMenuUpdate();\r\n await this._load();\r\n });\r\n return false;\r\n }\r\n\r\n async toggleCarrierActive(carrier) {\r\n try {\r\n if (!this.canEdit) return;\r\n carrier.isActive = !carrier.isActive;\r\n await this._carriers.setActive(carrier.id, carrier.isActive);\r\n this.triggerMenuUpdate();\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n}\r\n","import { DialogController } from 'aurelia-dialog';\r\nimport { Products } from 'services/products';\r\n\r\nexport class AssignProductAlias {\r\n static inject = [DialogController, Products];\r\n dialogController;\r\n _products;\r\n\r\n carrierId;\r\n carrierName;\r\n policyNumber;\r\n products;\r\n assignToProduct;\r\n\r\n constructor(dialogController, products) {\r\n this.dialogController = dialogController;\r\n this._products = products;\r\n }\r\n\r\n activate(model) {\r\n this.carrierId = model.carrier.id;\r\n this.carrierName = model.carrier.name;\r\n this.policyNumber = model.policyNumber;\r\n this.productName = model.productName;\r\n this.assignToProduct = undefined;\r\n this._load();\r\n }\r\n\r\n async _load() {\r\n try {\r\n this.products = await this._products.list(this.carrierId);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n \r\n async save() {\r\n try {\r\n if (!this.assignToProduct) return;\r\n const result = await this._products.addAlias(this.assignToProduct.id, this.productName);\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 { DialogController } from 'aurelia-dialog';\r\nimport { Members } from 'services/members';\r\n\r\nexport class EnterAgentNumber {\r\n static inject = [DialogController, Members];\r\n dialogController;\r\n _members;\r\n\r\n carrierId;\r\n carrierName;\r\n policyNumber;\r\n agentNumber;\r\n agent;\r\n\r\n constructor(dialogController, members) {\r\n this.dialogController = dialogController;\r\n this._members = members;\r\n }\r\n\r\n activate(model) {\r\n this.carrierId = model.carrierId;\r\n this.carrierName = model.carrierName;\r\n this.policyNumber = model.policyNumber;\r\n this.agentNumber = model.agentNumber;\r\n }\r\n\r\n async save() {\r\n try {\r\n if (!this.agent || !this.agentNumber) return;\r\n const response = await this._members.saveAgentNumber(this.agent.id, null, this.carrierId, this.agentNumber, null, true, null, null, null);\r\n console.log(response);\r\n\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 { 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 EnterSplit {\r\n static inject = [DialogController, NewInstance.of(ValidationController)];\r\n dialogController;\r\n _vc;\r\n\r\n split;\r\n\r\n constructor(dialogController, validationController) {\r\n this.dialogController = dialogController;\r\n this._vc = validationController;\r\n this._vc.addRenderer(new BootstrapFormValidationRenderer());\r\n\r\n ValidationRules\r\n .ensure('split').required().satisfiesRule('decimalRange', 0, 1)\r\n .on(this);\r\n }\r\n\r\n activate(model) {\r\n this.carrierName = model.carrierName;\r\n this.policyNumber = model.policyNumber;\r\n this.writingAgent = model.writingAgent;\r\n this.split = undefined;\r\n this._vc.reset();\r\n }\r\n \r\n async save() {\r\n const v = await this._vc.validate();\r\n if (!v.valid) return;\r\n this.dialogController.ok({ split: this.split });\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 EnterTargetPremium {\r\n static inject = [DialogController, NewInstance.of(ValidationController)];\r\n dialogController;\r\n _vc;\r\n\r\n targetPremium;\r\n\r\n constructor(dialogController, validationController) {\r\n this.dialogController = dialogController;\r\n this._vc = validationController;\r\n this._vc.addRenderer(new BootstrapFormValidationRenderer());\r\n\r\n ValidationRules\r\n .ensure('targetPremium').required().satisfiesRule('decimalRange', 0, 9999999)\r\n .on(this);\r\n }\r\n\r\n activate(model) {\r\n this.carrierName = model.carrierName;\r\n this.policyNumber = model.policyNumber;\r\n this.targetPremium = undefined;\r\n this._vc.reset();\r\n }\r\n \r\n async save() {\r\n const v = await this._vc.validate();\r\n if (!v.valid) return;\r\n this.dialogController.ok({ targetPremium: this.targetPremium });\r\n }\r\n} \r\n\r\n ","import { DialogController } from 'aurelia-dialog';\r\n\r\nexport class PolicyChangelog {\r\n static inject = [DialogController];\r\n dialogController;\r\n\r\n policy;\r\n\r\n constructor(dialogController) {\r\n this.dialogController = dialogController;\r\n }\r\n\r\n activate(model) {\r\n this.policy = model;\r\n }\r\n} \r\n\r\n ","import { DialogController } from 'aurelia-dialog';\r\nimport { ProductionService } from 'services/production-service';\r\n\r\nexport class SelectPolicyStatus {\r\n static inject = [DialogController, ProductionService];\r\n dialogController;\r\n _productionService;\r\n\r\n zeusStatuses;\r\n zeusStatus;\r\n\r\n constructor(dialogController, productionService) {\r\n this.dialogController = dialogController;\r\n this._productionService = productionService;\r\n }\r\n\r\n activate(model) {\r\n this.carrierName = model.carrierName;\r\n this.policyNumber = model.policyNumber;\r\n this.additionalData = model.additionalData;\r\n this.zeusStatus = undefined;\r\n this._load();\r\n }\r\n\r\n async _load() {\r\n try {\r\n this.zeusStatuses = await this._productionService.policyStatuses();\r\n this.zeusStatus = this.zeusStatuses[0];\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n \r\n async save() {\r\n this.dialogController.ok({ status: this.zeusStatus });\r\n }\r\n} \r\n\r\n ","import { Carriers } from 'services/carriers';\r\nimport moment from 'moment';\r\n\r\nexport class FileImports {\r\n static inject = [Carriers]\r\n _carriers;\r\n\r\n pageSize = 25;\r\n imports = [];\r\n\r\n importFilters = [{ value: '', keys: ['importFileName', 'carrier', 'fileSource'] }];\r\n startDate = moment().add(-5, 'days');\r\n endDate = null;\r\n\r\n constructor(carriers) {\r\n this._carriers = carriers;\r\n }\r\n\r\n attached() {\r\n this._load();\r\n }\r\n\r\n refreshData() {\r\n this._load();\r\n }\r\n\r\n async _load() {\r\n try {\r\n this.loading = true;\r\n this.imports = await this._carriers.imports(this.startDate, this.endDate);\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 downloadFile(i) {\r\n try {\r\n await this._carriers.downloadImportFile(i.importFileName);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n}\r\n","import { PLATFORM } from 'aurelia-pal';\r\nimport { observable } from 'aurelia-framework';\r\nimport { Router } from 'aurelia-router';\r\nimport { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { Security } from 'common/security';\r\nimport { Api } from 'common/server';\r\nimport { Notifier, Page } from 'common/ui';\r\nimport { I18n } from 'common/i18n';\r\nimport { Carriers } from 'services/carriers';\r\nimport { DialogService } from 'aurelia-dialog';\r\nimport { EditCarrierPolicyStatus } from 'members/carriers/dialog/edit-carrier-policy-status';\r\nimport { EditProduct } from 'members/carriers/dialog/edit-product';\r\nimport { SelectPolicyStatus } from './dialog/select-policy-status';\r\nimport { EnterTargetPremium } from './dialog/enter-target-premium';\r\nimport { EnterSplit } from './dialog/enter-split';\r\nimport { EnterAgentNumber } from './dialog/enter-agent-number';\r\nimport { AssignProductAlias } from './dialog/assign-product-alias';\r\nimport { PolicyChangelog } from './dialog/policy-changelog';\r\nimport Dropzone from 'dropzone';\r\nimport moment from 'moment';\r\nimport environment from '../../../config/environment.json';\r\nimport { c } from 'common/common';\r\nPLATFORM.moduleName('members/carriers/dialog/edit-carrier-policy-status');\r\nPLATFORM.moduleName('members/carriers/dialog/edit-product');\r\nPLATFORM.moduleName('./dialog/select-policy-status');\r\nPLATFORM.moduleName('./dialog/enter-target-premium');\r\nPLATFORM.moduleName('./dialog/enter-split');\r\nPLATFORM.moduleName('./dialog/enter-agent-number');\r\nPLATFORM.moduleName('./dialog/assign-product-alias');\r\nPLATFORM.moduleName('./dialog/policy-changelog');\r\n\r\nexport class CarrierUploads {\r\n static inject = [Router, EventAggregator, Security, Api, Notifier, Page, I18n, Carriers, DialogService];\r\n _router;\r\n _ea;\r\n _security;\r\n _api;\r\n _notifier;\r\n _page;\r\n _i18n;\r\n _carriers;\r\n _dialogService;\r\n\r\n errorDescription;\r\n\r\n commissionFileDropzone;\r\n dropzoneCommissionFileEl;\r\n formActionCommissionFile;\r\n\r\n policyImportDate = moment();\r\n policyFileDropzone;\r\n dropzonePolicyFileEl;\r\n formActionPolicyFile;\r\n @observable ignoreWarnings = false;\r\n\r\n @observable carrierImportDate = moment();\r\n carrierFileDropzone;\r\n dropzoneCarrierFileEl;\r\n formActionCarrierFile;\r\n @observable ignoreCarrierWarnings = false;\r\n carrierImportAdditionalData = { statuses: [], targetPremiums: [], writingAgentChanges: [], ignores: [], splits: [] };\r\n carrierImportAdditionalDataValue;\r\n\r\n BOX_MESSAGE = 'Drag-n-drop or click to select';\r\n\r\n caPageSize = 10;\r\n errPageSize = 10;\r\n\r\n policyFilters = [\r\n { value: '', keys: ['c.code', 'policyNumber', 'writingAgentMember.fullName', 'agency.fullName', 'statusValue', 'insuredFullName'] },\r\n { value: 'nucs', custom: this.policyChangeFilter },\r\n ];\r\n changedPolicyFilters = [{ value: '', keys: ['c.code', 'policyNumber', 'writingAgentMember.fullName', 'agency.fullName', 'statusValue', 'insuredFullName']}];\r\n @observable policyStatusN = true;\r\n @observable policyStatusU = true;\r\n @observable policyStatusC = true;\r\n @observable policyStatusS = true;\r\n\r\n warningFilters = [\r\n { value: '', keys: ['codeValue', 'message', 'policyNumber'] },\r\n { value: '', custom: this.warningTypeFilter },\r\n ];\r\n\r\n errorFilters = [\r\n { value: '', keys: ['row', 'message', 'policyNumber'] },\r\n ];\r\n\r\n constructor(router, ea, security, api, notifier, page, i18n, carriers, dialogService) {\r\n this._router = router;\r\n this._ea = ea;\r\n this._security = security;\r\n this._api = api;\r\n this._notifier = notifier;\r\n this._page = page;\r\n this._i18n = i18n;\r\n this._carriers = carriers;\r\n this._dialogService = dialogService;\r\n\r\n this._setPolicyUploadFormAction();\r\n this._setCarrierUploadFormAction();\r\n this.formActionCommissionFile = `${environment.api}/api/carrier/import-commission-rates`;\r\n\t}\r\n\r\n attached() {\r\n this._initializePolicyFileDropzone();\r\n this._initializeCarrierFileDropzone();\r\n this._initializeCommissionFileDropzone();\r\n }\r\n\r\n async activate(model) {\r\n this.showUploadBoxes = true;\r\n this.showBackToImports = model.fileName ? true : false;\r\n this.showBackToTasks = model.exceptionId ? true : false;\r\n if (model.fileName || model.exceptionId) this.showUploadBoxes = false;\r\n this.exportFileName = model.fileName || undefined;\r\n if (model.fileName) {\r\n const response = { inQueue: true, importFileName: model.fileName };\r\n this._loadReimport(model.fileName);\r\n this._startCheckingQueue(response);\r\n } else if (model.exceptionId) {\r\n const response = await this._loadException(model.exceptionId);\r\n this._startCheckingQueue(response);\r\n } else {\r\n this.policyStatus = undefined;\r\n this.closeUploadSession();\r\n }\r\n }\r\n\r\n detached() {\r\n this._stopCheckingQueue();\r\n }\r\n\r\n async _loadException(id) {\r\n try {\r\n const importStatus = await this._carriers.importException(id);\r\n this.showReimportButton = true;\r\n return importStatus;\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n async _loadReimport(fileName) {\r\n try {\r\n const importStatus = await this._carriers.importStatus(fileName);\r\n this.showReimportButton = importStatus.canReimport;\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n async reprocessFile() {\r\n try {\r\n this.processing = true;\r\n this.policyStatus = undefined;\r\n this.errorDescription = undefined;\r\n this._stopCheckingQueue();\r\n const response = await this._carriers.reprocessImport(this.importFileName, this.carrierImportAdditionalData);\r\n this._startCheckingQueue(response);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n policyStatusNChanged() {\r\n this._policyStatusChanged('n');\r\n }\r\n\r\n policyStatusUChanged() {\r\n this._policyStatusChanged('u');\r\n }\r\n\r\n policyStatusCChanged() {\r\n this._policyStatusChanged('c');\r\n }\r\n\r\n policyStatusSChanged() {\r\n this._policyStatusChanged('s');\r\n }\r\n\r\n _policyStatusChanged(policyChange) {\r\n if (this.policyFilters[1].value.indexOf(policyChange) >= 0) {\r\n this.policyFilters[1].value = this.policyFilters[1].value.replace(policyChange, '');\r\n } else {\r\n this.policyFilters[1].value += policyChange;\r\n }\r\n }\r\n\r\n policyChangeFilter(filterValue, row) {\r\n if (!filterValue) return false;\r\n if (filterValue.indexOf('n') >= 0 && row.isNewPolicy) return true;\r\n if (filterValue.indexOf('u') >= 0 && !row.isNewPolicy && row.isPolicyChanged) return true;\r\n if (filterValue.indexOf('c') >= 0 && !row.isPolicyChanged) return true;\r\n if (filterValue.indexOf('s') >= 0 && row.isSplit) return true;\r\n return false;\r\n }\r\n\r\n ignoreWarningsChanged() {\r\n this._setPolicyUploadFormAction();\r\n }\r\n\r\n warningTypeFilter(filterValue, row) {\r\n if (!filterValue) return true;\r\n return row.code === filterValue;\r\n }\r\n\r\n _setPolicyUploadFormAction() {\r\n this.formActionPolicyFile = `${environment.api}/api/production/import-policies?ignoreWarnings=${encodeURIComponent(this.ignoreWarnings)}`;\r\n if (this.policyFileDropzone) this.policyFileDropzone.options.url = this.formActionPolicyFile;\r\n }\r\n\r\n\t_initializePolicyFileDropzone() {\r\n\t\tconst me = this;\r\n\t\tconst d = new Date();\r\n\t\tconst timezoneOffset = d.getTimezoneOffset();\r\n\r\n\t\tconst myDropzone = new Dropzone(this.dropzonePolicyFileEl, {\r\n\t\t\tdictDefaultMessage: this.BOX_MESSAGE,\r\n\t\t\tparamName: 'file',\r\n\t\t\tmaxFilesize: 10, // MB\r\n\t\t\theaders: { 'Authorization': 'Bearer ' + this._security.token, 'X-LEGACY-TimezoneOffset': timezoneOffset },\r\n\t\t\tacceptedFiles: '.xlsx,.xls,.csv',\r\n\t\t\tmaxFiles: 1,\r\n timeout: 300000,\r\n\t\t\tinit: function () {\r\n\t\t\t\tthis.on('addedfile', function (file) {\r\n me.processing = true;\r\n me.policyStatus = undefined;\r\n me.errorDescription = undefined;\r\n\t\t\t\t\t//console.log(\"added file.\");\r\n\t\t\t\t});\r\n\t\t\t\tthis.on('success', function (file, response) {\r\n\t\t\t\t\tthis.removeFile(file);\r\n me.processing = false;\r\n me.policyStatus = response;\r\n\t\t\t\t});\r\n\t\t\t\tthis.on('error', function (file, error, x) {\r\n this.removeAllFiles();\r\n\t\t\t\t\tme._notifier.errorText('Error importing the policy file');\r\n me.errorDescription = error.message;\r\n me.processing = false;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tthis.policyFileDropzone = myDropzone;\r\n\t}\r\n\r\n carrierImportDateChanged() {\r\n this._setCarrierUploadFormAction();\r\n }\r\n\r\n ignoreCarrierWarningsChanged() {\r\n this._setCarrierUploadFormAction();\r\n }\r\n\r\n _setCarrierUploadFormAction() {\r\n this.formActionCarrierFile = `${environment.api}/api/carrier/import-file?ignoreWarnings=${encodeURIComponent(this.ignoreCarrierWarnings)}&asOfDate=${encodeURIComponent(this.carrierImportDate.format('l'))}&fileName=${this.importFileName ? encodeURIComponent(this.importFileName) : ''}`;\r\n if (this.carrierFileDropzone) this.carrierFileDropzone.options.url = this.formActionCarrierFile;\r\n }\r\n\r\n\t_initializeCarrierFileDropzone() {\r\n\t\tconst me = this;\r\n\t\tconst d = new Date();\r\n\t\tconst timezoneOffset = d.getTimezoneOffset();\r\n\r\n\t\tconst myDropzone = new Dropzone(this.dropzoneCarrierFileEl, {\r\n\t\t\tdictDefaultMessage: this.BOX_MESSAGE,\r\n\t\t\tparamName: 'file',\r\n\t\t\tmaxFilesize: 10, // MB\r\n\t\t\theaders: { 'Authorization': 'Bearer ' + this._security.token, 'X-LEGACY-TimezoneOffset': timezoneOffset },\r\n\t\t\tacceptedFiles: '.xlsx,.xls,.csv,.txt',\r\n\t\t\tmaxFiles: 1,\r\n timeout: 600000,\r\n\t\t\tinit: function () {\r\n\t\t\t\tthis.on('addedfile', function (file) {\r\n me.processing = true;\r\n me.policyStatus = undefined;\r\n me.errorDescription = undefined;\r\n me._stopCheckingQueue();\r\n\t\t\t\t});\r\n\t\t\t\tthis.on('success', function (file, response) {\r\n\t\t\t\t\tthis.removeFile(file);\r\n me.processing = false;\r\n if (response.fileDefinitionNotFound) {\r\n me._startDefiningImportFile(response.model);\r\n return;\r\n }\r\n me._startCheckingQueue(response);\r\n\t\t\t\t});\r\n\t\t\t\tthis.on('error', function (file, error, x) {\r\n this.removeAllFiles();\r\n console.log(error);\r\n\t\t\t\t\tme._notifier.errorText('Error importing the policy file');\r\n me.errorDescription = error.message;\r\n me.processing = false;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tthis.carrierFileDropzone = myDropzone;\r\n\t}\r\n\r\n _startDefiningImportFile(data) {\r\n this.showDefineFile = true;\r\n this.showUploadBoxes = false;\r\n this.defineFileData = { file: data };\r\n }\r\n\r\n onImportFileCancel() {\r\n this.showDefineFile = false;\r\n this.showUploadBoxes = true;\r\n this.defineFileData = undefined;\r\n }\r\n\r\n onImportFileDefined(data) {\r\n console.log('onImportFileDefined', data);\r\n this.onImportFileCancel();\r\n this._notifier.success('reimport-carrier-file');\r\n }\r\n\r\n\t_initializeCommissionFileDropzone() {\r\n\t\tconst me = this;\r\n\t\tconst d = new Date();\r\n\t\tconst timezoneOffset = d.getTimezoneOffset();\r\n\r\n\t\tconst myDropzone = new Dropzone(this.dropzoneCommissionFileEl, {\r\n\t\t\tdictDefaultMessage: this.BOX_MESSAGE,\r\n\t\t\tparamName: 'file',\r\n\t\t\tmaxFilesize: 6, // MB\r\n\t\t\theaders: { 'Authorization': 'Bearer ' + this._security.token, 'X-LEGACY-TimezoneOffset': timezoneOffset },\r\n\t\t\tacceptedFiles: '.xlsx,.xls',\r\n\t\t\tmaxFiles: 1,\r\n timeout: 180000,\r\n\t\t\tinit: function () {\r\n\t\t\t\tthis.on('addedfile', function (file) {\r\n me.processing = true;\r\n me.policyStatus = undefined;\r\n\t\t\t\t\t//console.log(\"added file.\");\r\n\t\t\t\t});\r\n\t\t\t\tthis.on('success', function (file, response) {\r\n\t\t\t\t\tthis.removeFile(file);\r\n me.processing = false;\r\n if (response && response.succeeded) {\r\n \t\t\t\t\tme._notifier.successText('Commission rate file imported');\r\n } else {\r\n me._notifier.errorText(response.error);\r\n }\r\n\t\t\t\t});\r\n\t\t\t\tthis.on('error', function (file, error, x) {\r\n this.removeAllFiles();\r\n\t\t\t\t\tme._notifier.errorText('Error importing the commission rate file.
' + error.message);\r\n me.processing = false;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tthis.commissionFileDropzone = myDropzone;\r\n\t}\r\n\r\n clearError() {\r\n this.errorDescription = undefined;\r\n }\r\n\r\n _startCheckingQueue(response) {\r\n try {\r\n this.checkingQueue = true;\r\n this.importFileName = response.importFileName;\r\n this._setCarrierUploadFormAction();\r\n if (!response.inQueue) {\r\n this._notifier.error('An error occurred processing the file.');\r\n return;\r\n }\r\n this._queueTimer = window.setInterval(this._checkQueueStatus, 2 * 1000);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n _stopCheckingQueue() {\r\n this.checkingQueue = false;\r\n this.processingStatus = undefined;\r\n if (!this._queueTimer) return;\r\n clearInterval(this._queueTimer);\r\n this._queueTimer = null;\r\n }\r\n\r\n _checkQueueStatus = async () => {\r\n try {\r\n const status = await this._carriers.checkImportStatus(this.importFileName);\r\n this.showCancelButton = status.inQueue === true && !status.pickedFromQueueDate;\r\n if (status.inQueue === true) {\r\n this.processingStatus = status.processingStatus;\r\n return;\r\n }\r\n if (status.inQueue === false) {\r\n if (status.canceled === true) {\r\n this._stopCheckingQueue();\r\n return;\r\n }\r\n throw new Error('The file was processed but no status was found');\r\n }\r\n // Have the status, display it\r\n this._displayPolicyStatus(status);\r\n } catch (err) {\r\n console.log(err);\r\n this._notifier.error('Unable to get the file status');\r\n this._stopCheckingQueue();\r\n }\r\n }\r\n\r\n warningPolicy(warning) {\r\n return {\r\n id: warning.policyId,\r\n policyNumber: warning.policyNumber\r\n };\r\n }\r\n\r\n async cancelUploadSession() {\r\n await this.cancelFileImport();\r\n this.closeUploadSession();\r\n this.policyStatus = undefined;\r\n if (this.showBackToImports) {\r\n this._router.navigate('#/admin/carrier/imports', true);\r\n } else if (this.showBackToTasks) {\r\n this._router.navigate('#/members/tasks', true);\r\n }\r\n }\r\n\r\n closeUploadSession() {\r\n this.importFileName = undefined;\r\n this._setCarrierUploadFormAction();\r\n }\r\n\r\n async cancelFileImport() {\r\n try {\r\n const response = await this._carriers.cancelImport(this.importFileName);\r\n this._stopCheckingQueue();\r\n } catch (err) {\r\n this._notifier.error(`The request was not canceled. ${err}`);\r\n console.log(err);\r\n }\r\n }\r\n\r\n _displayPolicyStatus(status) {\r\n try {\r\n this._stopCheckingQueue();\r\n this.warningTypes = [];\r\n if (status.warnings && status.warnings.length) {\r\n status.warnings.forEach(w => w.codeValue = this._i18n.tr(`carrier-import-warning-${w.code}`));\r\n const warningTypeCodes = status.warnings.map(r => r.code).filter((value, index, self) => self.indexOf(value) === index);\r\n warningTypeCodes.forEach(wtc => this.warningTypes.push({ code: wtc, value: this._i18n.tr(`carrier-import-warning-${wtc}`) }));\r\n }\r\n if (status.correctiveActions && status.correctiveActions.length) {\r\n status.correctiveActions.forEach(ca => ca.action.typeValue = this._i18n.tr(ca.action.type));\r\n }\r\n\r\n this.policyStatus = status;\r\n\r\n if (this.policyStatus.policies && this.policyStatus.policies.length) {\r\n // Import completed with the policies, clear out the old corrective action data\r\n this.exportFileName = this.importFileName;\r\n this.closeUploadSession();\r\n this.ignoreCarrierWarnings = false;\r\n this.carrierImportAdditionalData = { statuses: [], targetPremiums: [], writingAgentChanges: [], ignores: [], splits: [] };\r\n this.carrierImportAdditionalDataValue = JSON.stringify(this.carrierImportAdditionalData);\r\n this.showReimportButton = false;\r\n return;\r\n }\r\n if (this.policyStatus.correctiveActions && this.policyStatus.correctiveActions.length) {\r\n this.policyStatus.correctiveActions.forEach(ca => {\r\n if (ca.action.type === 'ca-manual-status-entry') {\r\n const existing = this.carrierImportAdditionalData.statuses.find(x => x.policyNumber === ca.action.metadata.policyNumber);\r\n if (existing) ca.alreadyCorrected = true; else ca.alreadyCorrected = false;\r\n }\r\n if (ca.action.type === 'ca-manual-target-premium-entry') {\r\n const existing = this.carrierImportAdditionalData.targetPremiums.find(x => x.policyNumber === ca.action.metadata.policyNumber);\r\n if (existing) ca.alreadyCorrected = true; else ca.alreadyCorrected = false;\r\n }\r\n });\r\n }\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n addPolicyStatus(ca) {\r\n const model = Object.assign(\r\n ca.metadata,\r\n { isNew: true },\r\n );\r\n this._dialogService.open({ viewModel: EditCarrierPolicyStatus, model, ignoreTransitions: true }).whenClosed(response => {\r\n if (response.wasCancelled) return;\r\n // Remove all the similar corrective actions\r\n this.policyStatus.correctiveActions.forEach(x => {\r\n if (x.alreadyCorrected) return;\r\n x.alreadyCorrected = x.action.type === ca.type && x.action.metadata.status === ca.metadata.status;\r\n });\r\n });\r\n }\r\n\r\n openPolicy(policyId) {\r\n this._ea.publish(c.EventKeys.site.openPolicy, { policyId: policyId });\r\n }\r\n\r\n showPolicyChanges(policy) {\r\n this._dialogService.open({ viewModel: PolicyChangelog, model: policy });\r\n }\r\n\r\n addProduct(ca) {\r\n const product = {\r\n carrier: { id: ca.metadata.carrierId, name: ca.metadata.carrierName },\r\n name: ca.metadata.product\r\n };\r\n this._dialogService.open({ viewModel: EditProduct, model: { product, products: [] } }).whenClosed(response => {\r\n if (response.wasCancelled) return;\r\n // Remove all the similar corrective actions\r\n this.policyStatus.correctiveActions.forEach(x => {\r\n if (x.alreadyCorrected) return;\r\n x.alreadyCorrected = x.action.type === ca.type && x.action.metadata.product === ca.metadata.product;\r\n });\r\n });\r\n }\r\n\r\n assignProductAlias(ca) {\r\n const product = {\r\n carrier: { id: ca.metadata.carrierId, name: ca.metadata.carrierName },\r\n productName: ca.metadata.product,\r\n policyNumber: ca.metadata.policyNumber\r\n };\r\n this._dialogService.open({ viewModel: AssignProductAlias, model: product}).whenClosed(response => {\r\n if (response.wasCancelled) return;\r\n // Remove all the similar corrective actions\r\n this.policyStatus.correctiveActions.forEach(x => {\r\n if (x.alreadyCorrected) return;\r\n x.alreadyCorrected = x.action.type === ca.type && x.action.metadata.product === ca.metadata.product;\r\n });\r\n });\r\n }\r\n\r\n selectPolicyStatus(ca) {\r\n this._dialogService.open({ viewModel: SelectPolicyStatus, model: ca.action.metadata }).whenClosed(response => {\r\n if (response.wasCancelled) return;\r\n const existing = this.carrierImportAdditionalData.statuses.findIndex(x => x.policyNumber === ca.action.metadata.policyNumber);\r\n if (existing >= 0) this.carrierImportAdditionalData.statuses.splice(existing, 1);\r\n this.carrierImportAdditionalData.statuses.push({ policyNumber: ca.action.metadata.policyNumber, status: response.output.status });\r\n this.carrierImportAdditionalDataValue = JSON.stringify(this.carrierImportAdditionalData);\r\n ca.alreadyCorrected = true;\r\n });\r\n }\r\n\r\n enterTargetPremium(ca) {\r\n this._dialogService.open({ viewModel: EnterTargetPremium, model: ca.action.metadata }).whenClosed(response => {\r\n if (response.wasCancelled) return;\r\n const existing = this.carrierImportAdditionalData.targetPremiums.findIndex(x => x.policyNumber === ca.action.metadata.policyNumber);\r\n if (existing >= 0) this.carrierImportAdditionalData.targetPremiums.splice(existing, 1);\r\n this.carrierImportAdditionalData.targetPremiums.push({ policyNumber: ca.action.metadata.policyNumber, targetPremium: response.output.targetPremium });\r\n this.carrierImportAdditionalDataValue = JSON.stringify(this.carrierImportAdditionalData);\r\n ca.alreadyCorrected = true;\r\n });\r\n }\r\n\r\n enterAgentNumber(ca) {\r\n this._dialogService.open({ viewModel: EnterAgentNumber, model: ca.action.metadata }).whenClosed(response => {\r\n if (response.wasCancelled) return;\r\n // Remove all the similar corrective actions for the same agent number\r\n this.policyStatus.correctiveActions.forEach(x => {\r\n if (x.alreadyCorrected) return;\r\n if (x.action.type !== ca.action.type) return;\r\n if (x.action.metadata.agentNumber !== ca.action.metadata.agentNumber) return;\r\n x.alreadyCorrected = true;\r\n });\r\n });\r\n }\r\n\r\n enterSplit(ca) {\r\n this._dialogService.open({ viewModel: EnterSplit, model: ca.action.metadata }).whenClosed(response => {\r\n if (response.wasCancelled) return;\r\n const existing = this.carrierImportAdditionalData.splits.findIndex(x => x.policyNumber === ca.action.metadata.policyNumber && x.row === ca.action.metadata.row);\r\n if (existing >= 0) this.carrierImportAdditionalData.splits.splice(existing, 1);\r\n this.carrierImportAdditionalData.splits.push({ policyNumber: ca.action.metadata.policyNumber, row: ca.action.metadata.row, split: response.output.split });\r\n this.carrierImportAdditionalDataValue = JSON.stringify(this.carrierImportAdditionalData);\r\n console.log(this.carrierImportAdditionalData);\r\n ca.alreadyCorrected = true;\r\n });\r\n }\r\n\r\n changeWritingAgent(ca) {\r\n this.carrierImportAdditionalData.writingAgentChanges.push({ policyNumber: ca.action.metadata.policyNumber, currentWritingAgentId: ca.action.metadata.currentWritingAgent.id });\r\n this.carrierImportAdditionalDataValue = JSON.stringify(this.carrierImportAdditionalData);\r\n ca.alreadyCorrected = true;\r\n }\r\n\r\n ignoreRow(ca) {\r\n this.carrierImportAdditionalData.ignores.push({ policyNumber: ca.action.metadata.policyNumber, row: ca.row, ignore: true });\r\n this.carrierImportAdditionalDataValue = JSON.stringify(this.carrierImportAdditionalData);\r\n ca.alreadyCorrected = true;\r\n }\r\n\r\n async exportStatusChanges() {\r\n const model = { format: 'commission', importFileName: this.exportFileName };\r\n await this._page.export(this._api, 'policy/export', model);\r\n }\r\n}\r\n","import { DialogController } from 'aurelia-dialog';\r\nimport { I18n } from 'common/i18n';\r\nimport { Content } from 'services/content';\r\nimport { Roles } from 'services/roles';\r\nimport { Notifier } from 'common/ui';\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 { c } from 'common/common';\r\n\r\nexport class SetEmailParameters {\r\n static inject = [DialogController, I18n, Content, Roles, Notifier, NewInstance.of(ValidationController)];\r\n dialogController;\r\n _i18n;\r\n _content;\r\n _roles;\r\n _notifier;\r\n _vc;\r\n\r\n singleEmailOptions = [\r\n { key: 'admin:email-type-agent', translation: '', value: 'Agent', type: 'Agent' },\r\n { key: 'admin:email-type-directupline', translation: '', value: 'DirectUpline', type: 'DirectUpline' },\r\n { key: 'admin:email-type-mentor', translation: '', value: 'Mentor', type: 'Mentor' },\r\n { key: 'admin:email-type-agency', translation: '', value: 'Agency', type: 'Agency' },\r\n { key: 'admin:email-type-booking-guest', translation: '', value: 'BookingGuest', type: 'BookingGuest' },\r\n { key: 'admin:email-type-other', translation: '', value: 'other', type: 'Email' },\r\n ];\r\n\r\n multipleEmailOptions = [\r\n { key: 'admin:email-type-agent', translation: '', value: 'Agent', type: 'Agent' },\r\n { key: 'admin:email-type-directupline', translation: '', value: 'DirectUpline', type: 'DirectUpline' },\r\n { key: 'admin:email-type-mentor', translation: '', value: 'Mentor', type: 'Mentor' },\r\n { key: 'admin:email-type-agency', translation: '', value: 'Agency', type: 'Agency' },\r\n { key: 'admin:email-type-entireupline', translation: '', value: 'EntireUpline', type: 'EntireUpline' },\r\n { key: 'admin:email-type-uplinetoagency', translation: '', value: 'UplineToAgency', type: 'UplineToAgency' },\r\n { key: 'admin:email-type-uplineagencies', translation: '', value: 'UplineAgencies', type: 'UplineAgencies' },\r\n ]\r\n\r\n emailFrom;\r\n emailTo;\r\n cc = [];\r\n bcc = [];\r\n ccTags = [];\r\n bccTags = [];\r\n\r\n constructor(dialogController, i18n, content, roles, notifier, validationController) {\r\n this.dialogController = dialogController;\r\n this._i18n = i18n;\r\n this._content = content;\r\n this._roles = roles;\r\n this._notifier = notifier;\r\n this._vc = validationController;\r\n this._vc.addRenderer(new BootstrapFormValidationRenderer());\r\n\r\n ValidationRules\r\n .ensure('emailFrom').required().email()\r\n .ensure('emailToEmail').required().when(m => m.emailTo === 'other')\r\n .on(this);\r\n }\r\n\r\n async activate(model) {\r\n try {\r\n this.uiWidgetKey = model.uiWidgetKey;\r\n this._emailParameters = model.emailParameters;\r\n await this._load();\r\n this._initialize();\r\n this._vc.reset();\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n async _load() {\r\n try {\r\n this.singleEmailOptions.forEach(eo => {\r\n eo.translation = this._i18n.tr(eo.key);\r\n });\r\n this.roles = await this._roles.all();\r\n this.roles.forEach(r => {\r\n this.multipleEmailOptions.push({ key: r, translation: `ROLE: ${this._i18n.tr(`roles-name-${r}`)}`, value: r, type: 'Role' });\r\n });\r\n this.multipleEmailTags = [];\r\n this.multipleEmailOptions.forEach(eo => {\r\n if (!eo.translation) eo.translation = this._i18n.tr(eo.key);\r\n this.multipleEmailTags.push(eo.translation);\r\n });\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n _initialize() {\r\n try {\r\n this.emailFrom = this._emailParameters.from.email;\r\n let emailTo = this._emailParameters.to ? this.singleEmailOptions.find(x => x.value === this._emailParameters.to.type) : undefined;\r\n let isToTaskAssignee = false;\r\n if (this._emailParameters.to) {\r\n isToTaskAssignee = this._emailParameters.to.type === 'TaskAssignee';\r\n }\r\n this.canEditTo = !isToTaskAssignee;\r\n if (!this.canEditTo) {\r\n this.emailTo = 'TaskAssignee';\r\n } else if (emailTo) {\r\n this.emailTo = emailTo.value;\r\n } else if (!this._emailParameters.to) {\r\n // select the other option\r\n this.emailTo = 'other';\r\n } else {\r\n this.emailTo = this._emailParameters.to.email;\r\n }\r\n\r\n this.cc = this._emailParameters.cc ?? [];\r\n if (this._emailParameters.cc && this._emailParameters.cc.length) {\r\n this._emailParameters.cc.forEach(cc => {\r\n let eo = this.singleEmailOptions.find(x => x.type === cc.type);\r\n if (!eo) eo = this.multipleEmailOptions.find(x => x.type === cc.type);\r\n if (cc.type === 'Email') {\r\n this.ccTags.push(cc.email);\r\n } else if (cc.type === 'Agent' || cc.type === 'Agency' || cc.type === 'DirectUpline' || cc.type === 'Mentor' || cc.type === 'EntireUpline' || cc.type === 'TaskAssignee' || cc.type === 'UplineToAgency' || cc.type === 'BookingGuest') {\r\n this.ccTags.push(eo?.translation ?? cc.type);\r\n } else if (cc.type === 'Role') {\r\n this.ccTags.push(cc.email);\r\n }\r\n });\r\n }\r\n this.bcc = this._emailParameters.bcc ?? [];\r\n if (this._emailParameters.bcc && this._emailParameters.bcc.length) {\r\n this._emailParameters.bcc.forEach(bcc => {\r\n let eo = this.singleEmailOptions.find(x => x.type === cc.type);\r\n if (!eo) eo = this.multipleEmailOptions.find(x => x.type === cc.type);\r\n if (bcc.type === 'Email') {\r\n this.bccTags.push(bcc.email);\r\n } else if (bcc.type === 'Agent' || bcc.type === 'Agency' || bcc.type === 'DirectUpline' || bcc.type === 'Mentor' || bcc.type === 'EntireUpline' || bcc.type === 'TaskAssignee' || bcc.type === 'UplineToAgency') {\r\n this.bccTags.push(eo?.translation ?? bcc.type);\r\n } else if (bcc.type === 'Role') {\r\n this.bccTags.push(bcc.email);\r\n }\r\n });\r\n }\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n ccEmailChanged(emails) {\r\n this.cc = this._validateEmails(emails);\r\n }\r\n\r\n bccEmailChanged(emails) {\r\n this.bcc = this._validateEmails(emails, true);\r\n }\r\n\r\n _validateEmails(emails, bcc = false) {\r\n const emailParameters = [];\r\n emails.forEach(e => {\r\n let inList = this.multipleEmailOptions.find(x => x.translation.toLowerCase() === e.toLowerCase());\r\n if (!inList) inList = this.multipleEmailOptions.find(x => x.type.toLowerCase() === e.toLowerCase());\r\n if (inList) {\r\n const emailParameter = { type: inList.type, bcc };\r\n emailParameter.email = emailParameter.type === 'Role' ? inList.value : '';\r\n emailParameters.push(emailParameter);\r\n return;\r\n }\r\n emailParameters.push({ type: 'Email', email: e, bcc });\r\n // See if it is a valid email address\r\n if (!c.RegEx.email.test(e)) {\r\n this._notifier.info('email-address-may-be-invalid', undefined, false, { email: e });\r\n }\r\n });\r\n return emailParameters;\r\n }\r\n\r\n async save() {\r\n try {\r\n const v = await this._vc.validate();\r\n if (!v.valid) return;\r\n const settings = {\r\n from: { type: 'Email', bcc: false, email: this.emailFrom },\r\n to: { bcc: false },\r\n cc: this.cc,\r\n bcc: this.bcc,\r\n };\r\n if (this.emailTo === 'other') {\r\n settings.to.type = 'Email';\r\n settings.to.email = this.emailToEmail;\r\n } else {\r\n settings.to.type = this.emailTo;\r\n settings.to.email = '';\r\n }\r\n await this._content.saveEmailSettings(this.uiWidgetKey, settings);\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 { I18n } from 'common/i18n';\r\nimport { Content } from 'services/content';\r\nimport { c } from 'common/common';\r\n\r\nexport class ContentEditor {\r\n static inject = [I18n, Content];\r\n _i18n;\r\n _content;\r\n\r\n title = '';\r\n content = [];\r\n links = [];\r\n _agentSite = [];\r\n _profile = [];\r\n _site = [];\r\n _registration = [];\r\n _signIn = [];\r\n _integrations = [];\r\n _onboarding = [];\r\n _dashboardWidgets = [];\r\n editContent = null;\r\n canAdd = false;\r\n\r\n constructor(i18n, content) {\r\n this._i18n = i18n;\r\n this._content = content;\r\n }\r\n\r\n attached() {\r\n this._load();\r\n this.setContent('site');\r\n }\r\n\r\n display(content) {\r\n this.editContent = content;\r\n }\r\n\r\n setContent(key) {\r\n this.tab = key;\r\n this.links = [];\r\n this.canAdd = false;\r\n this.type = null;\r\n switch (key) {\r\n case 'site':\r\n this.content = this._site;\r\n this.title = 'Site';\r\n break;\r\n case 'agent-site': \r\n this.content = this._agentSite; \r\n this.title = 'Agent Site Shared'; \r\n break;\r\n case 'profile': \r\n this.content = this._profile; \r\n this.title = 'Profile'; \r\n break;\r\n case 'registration': \r\n this.content = this._registration; \r\n this.title = 'Registration'; \r\n this.links.push({title:'Sign Up', href:'#/sign-up'});\r\n break;\r\n case 'sign-in': \r\n this.content = this._signIn; \r\n this.title = 'Sign In'; \r\n this.links.push({title:'Sign In', href:'#/'});\r\n this.links.push({title:'Reset Password', href:'#/reset-password'});\r\n break;\r\n case 'integrations':\r\n this.content = this._integrations;\r\n this.title = 'Integrations';\r\n break;\r\n case 'onboarding':\r\n this.content = this._onboarding;\r\n this.title = 'Onboarding';\r\n break;\r\n case 'dashboard-widgets':\r\n this.content = this._dashboardWidgets;\r\n this.title = 'Dashboard Widget';\r\n this.canAdd = true;\r\n this.type = 'DashboardWidget';\r\n break;\r\n }\r\n\r\n this.display(this.content[0]);\r\n }\r\n\r\n async _load() {\r\n this._site.push({ key: 'placement-percentage-explanation', title: 'Placement Percentage Explanation', type: null });\r\n\r\n this._agentSite.push({ key: 'agent-site-bio-default', title: 'Default Bio', type: 'AgentSite'});\r\n this._agentSite.push({ key: 'agent-site-about-us-company-overview', title: 'Company Overview', type: 'AgentSite' });\r\n this._agentSite.push({ key: 'agent-site-about-us-agent-overview', title: 'Agent Overview', type: 'AgentSite' });\r\n this._agentSite.push({ key: 'agent-site-about-us-why-choose', title: 'Why Choose LPFN', type: 'AgentSite' });\r\n\r\n this._profile.push({key: 'profile-validation-error', title: 'Profile - There is a validation error', type: null});\r\n this._profile.push({key: 'member-site-bio-editor', title: 'Member Site - Bio Editor instructions', type: null});\r\n this._profile.push({key: 'member-site-bio-has-pending-bio-approvals', title: 'Member Site - Bio Editor - there are pending bio approvals', type: null});\r\n this._profile.push({key: 'member-site-bio-start', title: 'Member Site - Bio Editor - instructions the first time a bio is created', type: null});\r\n this._profile.push({key: 'member-site-bio-write-my-own-instructions', title: 'Member Site - Bio Editor - instructions for writing your own bio', type: null});\r\n this._profile.push({key: 'member-site-first-bio-saved', title: 'Member Site - Bio Editor - first time write your own bio is saved and sent for approval', type: null});\r\n this._profile.push({key: 'profile-member-can-have-site-instructions', title: 'Profile - Instructions for a team member who does not have a personal site, but can', type: null});\r\n this._profile.push({key: 'profile-member-has-site-instructions', title: 'Profile - Instructions for team member who has created a personal site', type: null});\r\n // this._profile.push({key: 'member-site-bio-step-1-title', title: 'Member Site - Bio - Wizard - Question 1', type: null});\r\n // this._profile.push({key: 'member-site-bio-step-1-example', title: 'Member Site - Bio - Wizard - Question 1 Example', type: null});\r\n // this._profile.push({key: 'member-site-bio-step-2-title', title: 'Member Site - Bio - Wizard - Question 2', type: null});\r\n // this._profile.push({key: 'member-site-bio-step-2-example', title: 'Member Site - Bio - Wizard - Question 2 Example', type: null});\r\n // this._profile.push({key: 'member-site-bio-step-3-title', title: 'Member Site - Bio - Wizard - Question 3', type: null});\r\n // this._profile.push({key: 'member-site-bio-step-3-example', title: 'Member Site - Bio - Wizard - Question 3 Example', type: null});\r\n // this._profile.push({key: 'member-site-bio-step-4-title', title: 'Member Site - Bio - Wizard - Question 4', type: null});\r\n // this._profile.push({key: 'member-site-bio-step-4-example', title: 'Member Site - Bio - Wizard - Question 4 Example', type: null});\r\n // this._profile.push({key: 'member-site-bio-step-5-title', title: 'Member Site - Bio - Wizard - Question 5', type: null});\r\n // this._profile.push({key: 'member-site-bio-step-5-example', title: 'Member Site - Bio - Wizard - Question 5 Example', type: null});\r\n this._profile.push({key: 'national-producer-number-instructions', title: 'NPN Instructions', type: null});\r\n\r\n this._registration.push({key: 'sign-up-welcome', title: 'Registration - Welcome', type: null});\r\n this._registration.push({key: 'sign-up-welcome-with-direct-upline', title: 'Registration - Welcome - With Direct Upline', type: null});\r\n this._registration.push({key: 'sign-up-validation-errors', title: 'Registration - Validation Errors', type: null});\r\n this._registration.push({key: 'sign-up-sms-opt-in', title: 'Registration - SMS Opt-In', type: null});\r\n this._registration.push({key: 'sign-up-agreement-instructions', title: 'Registration - Writing Agent Agreement Instructions', type: null});\r\n this._registration.push({key: 'writing-agent-agreement', title: 'Writing Agent Agreement', type: null});\r\n this._registration.push({key: 'sign-up-agreement-agree', title: 'Registration - Agree to Terms Checkbox', type: null});\r\n this._registration.push({key: 'sign-up-agreement-view-terms', title: 'Registration - Writing Agent Agreement - View Terms', type: null});\r\n this._registration.push({key: 'sign-up-no-parent', title: 'Registration - Right box - No Direct Upline', type: null});\r\n this._registration.push({key: 'sign-up-set-direct-upline', title: 'Registration - Popup - No Direct Upline', type: null});\r\n this._registration.push({key: 'register-thank-you', title: 'Registration - Thank You', type: null});\r\n this._registration.push({key: 'register-thank-you-bottom', title: 'Registration - Thank You Bottom', type: null});\r\n this._registration.push({key: 'national-producer-number-instructions', title: 'NPN Instructions', type: null});\r\n\r\n this._signIn.push({key: 'reset-password', title: 'Reset Password - Instructions', type: null});\r\n this._signIn.push({key: 'reset-password-email-sent', title: 'Reset Password - Email has been sent message', type: null});\r\n this._signIn.push({key: 'reset-password-confirm', title: 'Reset Password - After clicking on link in email', type: null});\r\n this._signIn.push({key: 'reset-password-final', title: 'Reset Password - After resetting the password', type: null});\r\n this._signIn.push({key: 'login', title: 'Login - above form', type: null});\r\n this._signIn.push({key: 'login-invalid', title: 'Login is invalid', type: null});\r\n this._signIn.push({key: 'login-sidebar', title: 'Login - right sidebar', type: null});\r\n this._signIn.push({key: 'login-footer', title: 'Login - below login', type: null});\r\n\r\n this._integrations.push({key: 'surance-bay-sso-help', title: 'SuranceBay - waiting for SSO', type: null});\r\n\r\n this._onboarding.push({key: 'onboarding-welcome', title: 'Welcome', type: 'Onboarding'});\r\n this._onboarding.push({key: 'onboarding-add-profile-picture', title: 'Add Profile Picture (optional)', type: 'Onboarding'});\r\n this._onboarding.push({key: 'onboarding-have-license-life', title: 'LIFE: Have License?', type: 'Onboarding'});\r\n this._onboarding.push({key: 'onboarding-need-license-life', title: 'LIFE: Get Your License', type: 'Onboarding'});\r\n this._onboarding.push({key: 'onboarding-have-eo-life', title: 'LIFE: Have E&O?', type: 'Onboarding'});\r\n this._onboarding.push({key: 'onboarding-need-eo-life', title: 'LIFE: Get Your E&O', type: 'Onboarding'});\r\n this._onboarding.push({key: 'onboarding-upload-e-and-o-instructions', title: 'LIFE & ANNUITY: Upload E&O document', type: 'Onboarding'});\r\n this._onboarding.push({key: 'onboarding-enter-npn', title: 'LIFE & ANNUITY: Enter Your NPN', type: 'Onboarding'});\r\n this._onboarding.push({key: 'onboarding-access-surance-bay', title: 'LIFE & ANNUITY: Access SuranceBay to Get Contracted', type: 'Onboarding'});\r\n this._onboarding.push({key: 'onboarding-complete', title: 'Onboarding Complete', type: 'Onboarding'});\r\n\r\n try {\r\n const data = await this._content.allByType('DashboardWidget');\r\n data.forEach(d => {\r\n this._dashboardWidgets.push({ id: d.id, key: d.key, title: d.title || d.key, type: d.widgetType });\r\n });\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n addPage() {\r\n this.content.push({id: null, key: c.Helpers.uniqueId(), title: `New ${this.title}`, type: this.type});\r\n this.display(this.content[this.content.length - 1]);\r\n }\r\n\r\n async deletePage() {\r\n try {\r\n const idx = this.content.findIndex(x => x.key === this.editContent.key);\r\n if (idx < 0) return;\r\n if (this.editContent.id) {\r\n await this._content.delete(this.editContent.id);\r\n }\r\n this.content.splice(idx, 1);\r\n this.display(this.content[this.content.length - 1]);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n}\r\n","import { PLATFORM } from 'aurelia-pal';\r\nimport { I18n } from 'common/i18n';\r\nimport { DialogService } from 'aurelia-dialog';\r\nimport { Content } from 'services/content';\r\nimport { Notifier } from 'common/ui';\r\nimport { SetEmailParameters } from './dialog/set-email-parameters';\r\nPLATFORM.moduleName('./dialog/set-email-parameters');\r\n\r\nexport class Emails {\r\n static inject = [I18n, DialogService, Content, Notifier];\r\n _i18n;\r\n _dialogService;\r\n _content;\r\n _notifier;\r\n\r\n title = '';\r\n emails = [];\r\n editEmail = null;\r\n emailFilters = [{ value: '', keys: ['title'] }];\r\n\r\n constructor(i18n, dialogService, content, notifier) {\r\n this._i18n = i18n;\r\n this._dialogService = dialogService;\r\n this._content = content;\r\n this._notifier = notifier;\r\n }\r\n\r\n async attached() {\r\n await this._load();\r\n this.type = 'Email';\r\n }\r\n\r\n async display(email) {\r\n try {\r\n this.editEmail = email;\r\n this.focusFilter = false;\r\n this.emailParameters = await this._content.emailSettings(email.key);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n async _load() {\r\n try {\r\n this.emails = [];\r\n const data = await this._content.emailKeys();\r\n data.forEach(d => this.emails.push({ key: d.key, type: 'Email', title: this._i18n.tr(`admin:${d.key}`) }));\r\n this.emails.sort((a, b) => a.title.localeCompare(b.title));\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n focusSearch() {\r\n this.focusFilter = true;\r\n return false;\r\n }\r\n\r\n async sendTestEmail() {\r\n try {\r\n this.sending = true;\r\n await this._content.sendTestEmail(this.editEmail.key);\r\n this._notifier.success('admin:test-email-sent');\r\n } catch (err) {\r\n console.log(err);\r\n this._notifier.error('admin:test-email-send-error');\r\n } finally {\r\n this.sending = false;\r\n }\r\n }\r\n\r\n async openEditor() {\r\n const model = {\r\n uiWidgetKey: this.editEmail.key,\r\n emailParameters: this.emailParameters,\r\n };\r\n await this._dialogService.open({ viewModel: SetEmailParameters, model: model, ignoreTransitions: true }).whenClosed(async(response) => {\r\n await this._load();\r\n const displayEmail = this.emails.find(x => x.key === this.editEmail.key);\r\n this.display(displayEmail);\r\n });\r\n }\r\n}\r\n","/* eslint-disable require-atomic-updates */\r\nimport { observable, computedFrom } from 'aurelia-framework';\r\nimport { Api } from 'common/server';\r\nimport { Notifier } from 'common/ui';\r\nimport { I18n } from 'common/i18n';\r\nimport { Security } from 'common/security';\r\nimport { ROLE } from 'common/constants';\r\nimport moment from 'moment';\r\n\r\nexport class UiTerms {\r\n static inject = [Api, Notifier, I18n, Security];\r\n _api;\r\n _notifier;\r\n _i18n;\r\n security;\r\n\r\n view = 'untranslated';\r\n languages = [];\r\n selectedLanguage;\r\n atLeastOneTermChanged = false;\r\n\r\n @observable searchOn;\r\n\r\n constructor(api, notifier, i18n, security) {\r\n this._api = api;\r\n this._notifier = notifier;\r\n this._i18n = i18n;\r\n this.security = security;\r\n }\r\n\r\n async attached() {\r\n this.atLeastOneTermChanged = false;\r\n await this._load();\r\n }\r\n\r\n async detached() {\r\n if (!this.atLeastOneTermChanged) return;\r\n await this._i18n.reloadTranslations();\r\n this._notifier.success('You may need to refresh the browser to see the updated translations');\r\n }\r\n\r\n @computedFrom('selectedLanguage')\r\n get canEdit() {\r\n if (!this.selectedLanguage) return false;\r\n if (this.security.isInRole([ROLE.Admin, ROLE.WebsiteManager])) return true;\r\n if (this.security.isInRole(ROLE.Translator) && this.selectedLanguage.language !== 'en') return true;\r\n return false;\r\n }\r\n\r\n async _load() {\r\n try {\r\n this.languages = await this._api.get('content/ui-term');\r\n this.selectedLanguage = this.languages.find(x => x.isDefault);\r\n } catch (err) {\r\n this._notifier.error('An error occurred getting the terms');\r\n }\r\n }\r\n\r\n selectLanguage(language) {\r\n this.selectedLanguage = language;\r\n }\r\n\r\n isTermVisible(term) {\r\n if (this.view === 'all') return true;\r\n if (this.view === 'fuzzy' && term.isFuzzy) return true;\r\n if (this.view === 'untranslated' && term.isUntranslated) return true;\r\n return false;\r\n }\r\n\r\n searchOnChanged() {\r\n const searchOn = this.searchOn ? this.searchOn.toLowerCase() : undefined;\r\n this.selectedLanguage.terms.forEach(term => {\r\n let displayInList = false;\r\n if (searchOn) {\r\n if (term.code.toLowerCase().indexOf(searchOn) >= 0) displayInList = true;\r\n if (term && term.translation && term.translation.toLowerCase().indexOf(searchOn) >= 0) displayInList = true;\r\n }\r\n term.displayInList = displayInList;\r\n });\r\n }\r\n\r\n async onTranslationChanged(term) {\r\n try {\r\n term.isProcessing = true;\r\n this.atLeastOneTermChanged = true;\r\n await this._api.post('content/ui-term', term);\r\n this._notifier.success('Term updated');\r\n term.lastUpdated = moment().format();\r\n if (term.translation === '') {\r\n // removed translation\r\n term.isUntranslated = true;\r\n this.selectedLanguage.totalUntranslated += 1;\r\n this.selectedLanguage.totalTranslated -= 1;\r\n if (term.isFuzzy) this.selectedLanguage.totalFuzzy -= 1;\r\n term.isFuzzy = false;\r\n return;\r\n }\r\n // is translated\r\n if (term.isUntranslated) {\r\n this.selectedLanguage.totalTranslated += 1;\r\n this.selectedLanguage.totalUntranslated -= 1;\r\n }\r\n if (term.isFuzzy) this.selectedLanguage.totalFuzzy -= 1;\r\n term.isFuzzy = false;\r\n term.isUntranslated = false;\r\n } catch (err) {\r\n this._notifier.error('An error occurred saving the term');\r\n } finally {\r\n term.isProcessing = false;\r\n }\r\n }\r\n\r\n async notFuzzy(term) {\r\n try {\r\n term.isProcessing = true;\r\n await this._api.post('content/ui-term/not-fuzzy', term);\r\n this._notifier.success('Term marked as not fuzzy');\r\n term.isFuzzy = false;\r\n this.selectedLanguage.totalFuzzy -= 1;\r\n } catch (err) {\r\n this._notifier.error('An error occurred updating the term');\r\n } finally {\r\n term.isProcessing = false;\r\n }\r\n }\r\n\r\n showAddTerm(show) {\r\n this.showAdd = show;\r\n if (!this.showAdd) {\r\n this.newTranslation = '';\r\n this.newCode = '';\r\n }\r\n }\r\n\r\n async addTerm() {\r\n try {\r\n const exists = this.selectedLanguage.terms.find(x => x.code.toLowerCase() === this.newCode.toLowerCase());\r\n if (exists) {\r\n this._notifier.error('This code already exists');\r\n return;\r\n }\r\n const model = {\r\n code: this.newCode,\r\n translation: this.newTranslation,\r\n };\r\n await this._api.post('content/ui-term/add', model);\r\n await this._load();\r\n this.showAdd = false;\r\n this._notifier.success('Term added');\r\n } catch (err) {\r\n this._notifier.error('An error occurred adding the term');\r\n }\r\n }\r\n}\r\n","import { Contests } from 'services/contests';\r\nimport { Notifier } from 'common/ui';\r\n\r\nexport class List {\r\n static inject = [Contests, Notifier];\r\n _contests;\r\n _notifier;\r\n\r\n contests = [];\r\n\r\n\tconstructor(contests, notifier) {\r\n\t this._contests = contests;\r\n this._notifier = notifier;\r\n\t}\r\n\r\n attached() {\r\n this._load();\r\n }\r\n\r\n async _load() {\r\n try {\r\n this.contests = await this._contests.all();\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n\t}\r\n\r\n async awardPoints(contest) {\r\n try {\r\n const result = await this._contests.awardPoints(contest.code, contest.awardMember.id, contest.awardPointCode);\r\n if (result.succeeded) {\r\n this._notifier.success('contest-points-awarded');\r\n contest.awardMember = undefined;\r\n } else {\r\n this._notifier.error(result.message);\r\n }\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n}\r\n","import { Router } from 'aurelia-router';\r\nimport { Security } from 'common/security';\r\nimport { ROLE } from 'common/constants';\r\n\r\nexport class Dashboard {\r\n static inject = [Router, Security];\r\n _router;\r\n _security;\r\n\r\n constructor(router, security) {\r\n this._router = router;\r\n this._security = security;\r\n }\r\n\r\n attached() {\r\n try {\r\n const agentsRoute = this._router.routes.find(x => x.route === 'agents');\r\n if (!agentsRoute) return;\r\n if (this._security.isInRole(agentsRoute.settings.roles)) {\r\n this._router.navigate('#/admin/agents', true);\r\n return;\r\n }\r\n\r\n // Does not have access to manage agents, bring them to the correct page\r\n if (this._security.isInRole([ROLE.LeadManager])) {\r\n this._router.navigate('#/admin/leads', true);\r\n return;\r\n }\r\n } catch (err) {\r\n console.log(err);\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-mobile-logo img {\\n height: 40px;\\n}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/admin/_index.scss\"],\"names\":[],\"mappings\":\"AACI;EACI,YAAA;AAAR\",\"sourcesContent\":[\".zeus-mobile-logo {\\r\\n img {\\r\\n height: 40px;\\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-emails-content p {\\n margin: 0;\\n padding-top: 1rem;\\n padding-bottom: 1rem;\\n}\\n\\n.dropdown-item a {\\n display: flex;\\n}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/admin/content/emails.scss\"],\"names\":[],\"mappings\":\"AACI;EACI,SAAA;EACA,iBAAA;EACA,oBAAA;AAAR;;AAIA;EACI,aAAA;AADJ\",\"sourcesContent\":[\".zeus-emails-content {\\r\\n p {\\r\\n margin: 0;\\r\\n padding-top: 1rem;\\r\\n padding-bottom: 1rem;\\r\\n }\\r\\n}\\r\\n\\r\\n.dropdown-item a {\\r\\n display: flex;\\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-translation-term {\\n background-color: #efefef;\\n border-radius: 4px;\\n padding: 10px;\\n margin-bottom: 10px;\\n border: 1px solid #ccc;\\n position: relative;\\n}\\n\\n.zeus-language-selector {\\n display: inline-block;\\n margin-right: 25px;\\n border-radius: 4px;\\n border: 2px solid var(--kt-primary);\\n padding: 10px;\\n text-align: center;\\n}\\n.zeus-language-selector:hover, .zeus-language-selector.zeus-active {\\n cursor: pointer;\\n border: 2px solid var(--kt-primary);\\n background-color: var(--kt-primary);\\n color: white;\\n}\\n.zeus-language-selector div {\\n font-size: 1.2em;\\n font-weight: bold;\\n}\\n\\n.zeus-filters {\\n display: flex;\\n justify-content: space-between;\\n align-items: center;\\n margin-bottom: 10px;\\n}\\n\\n.zeus-search-on {\\n width: 250px;\\n}\\n\\n.zeus-fuzzy {\\n color: var(--kt-primary);\\n font-size: 1.75em;\\n}\\n\\n.zeus-translation-term-default {\\n font-weight: bold;\\n margin-bottom: 10px;\\n}\\n\\n.zeus-translation-term-lastUpdated {\\n text-align: right;\\n font-size: 0.8em;\\n font-style: italic;\\n}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/admin/content/ui-terms.scss\"],\"names\":[],\"mappings\":\"AAAA;EACI,yBAAA;EACA,kBAAA;EACA,aAAA;EACA,mBAAA;EACA,sBAAA;EACA,kBAAA;AACJ;;AAEE;EACI,qBAAA;EACA,kBAAA;EACA,kBAAA;EACA,mCAAA;EACA,aAAA;EACA,kBAAA;AACN;AACM;EACI,eAAA;EACA,mCAAA;EACA,mCAAA;EACA,YAAA;AACV;AAEM;EACI,gBAAA;EACA,iBAAA;AAAV;;AAIE;EACI,aAAA;EACA,8BAAA;EACA,mBAAA;EACA,mBAAA;AADN;;AAIE;EACI,YAAA;AADN;;AAIE;EACI,wBAAA;EACA,iBAAA;AADN;;AAIE;EACI,iBAAA;EACA,mBAAA;AADN;;AAOE;EACI,iBAAA;EACA,gBAAA;EACA,kBAAA;AAJN\",\"sourcesContent\":[\".zeus-translation-term {\\r\\n background-color: #efefef;\\r\\n border-radius: 4px;\\r\\n padding: 10px;\\r\\n margin-bottom: 10px;\\r\\n border: 1px solid #ccc;\\r\\n position: relative;\\r\\n }\\r\\n \\r\\n .zeus-language-selector {\\r\\n display: inline-block;\\r\\n margin-right: 25px;\\r\\n border-radius: 4px;\\r\\n border: 2px solid var(--kt-primary);\\r\\n padding: 10px;\\r\\n text-align: center;\\r\\n \\r\\n &:hover, &.zeus-active {\\r\\n cursor: pointer;\\r\\n border: 2px solid var(--kt-primary);\\r\\n background-color: var(--kt-primary);\\r\\n color: white;\\r\\n }\\r\\n \\r\\n div {\\r\\n font-size: 1.2em;\\r\\n font-weight: bold;\\r\\n }\\r\\n }\\r\\n \\r\\n .zeus-filters {\\r\\n display: flex;\\r\\n justify-content: space-between;\\r\\n align-items: center;\\r\\n margin-bottom: 10px;\\r\\n }\\r\\n \\r\\n .zeus-search-on {\\r\\n width: 250px;\\r\\n }\\r\\n \\r\\n .zeus-fuzzy {\\r\\n color: var(--kt-primary);\\r\\n font-size: 1.75em;\\r\\n }\\r\\n \\r\\n .zeus-translation-term-default {\\r\\n font-weight: bold;\\r\\n margin-bottom: 10px;\\r\\n }\\r\\n \\r\\n .zeus-translation-term-key {\\r\\n }\\r\\n \\r\\n .zeus-translation-term-lastUpdated {\\r\\n text-align: right;\\r\\n font-size: .8em;\\r\\n font-style: italic;\\r\\n }\\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 = \"\\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;"],"names":[],"sourceRoot":""}