{"version":3,"file":"app-c92480b7.83952295dd6a51410d9c.bundle.js","mappings":";;;;;;;;;;;;;AAAA;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;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACPA;AACA;AACA;AACA;;;;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACPA;AACA;AACA;AACA;;;;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;ACGA;AACA;AACA;AACA;AAEA;AAIA;AAkCA;AA1BA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AAqBA;AACA;AACA;AACA;AAtBA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;;;AAAA;AACA;AAAA;AACA;AACA;;;AAAA;AACA;AAAA;AACA;AACA;;;AAAA;AAYA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAGA;AAEA;AACA;AACA;AACA;AACA;AAEA;;;;;AACA;AACA;;AAAA;AACA;;AAAA;AACA;;AAAA;AACA;AACA;;;;;AACA;AAEA;AACA;AACA;AA3EA;AAFA;AACA;AAoCA;AACA;AACA;AArCA;AA4EA;AAAA;AA5EA;;;;;;;;;;;;;;;;;;;;;ACdA;AACA;AAEA;AACA;AAGA;AAQA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;;;;;AACA;AACA;AAEA;;AAAA;AACA;;AAAA;AACA;;;;;AACA;AAEA;AACA;AACA;AACA;AA7BA;AADA;AASA;AARA;AA8BA;AAAA;AA9BA;;;;;;;;;;;;;;;;;;;;;ACPA;AACA;AACA;AAEA;AAKA;AAcA;AALA;AACA;AAEA;AAGA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA;;;;AACA;AAEA;AACA;AACA;AAEA;;;;;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;;AAAA;AAEA;;AAAA;AAIA;;AAAA;AAEA;;;;;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AAAA;AACA;AArFA;AAFA;AACA;AAeA;AAdA;AAsFA;AAAA;AAtFA;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AAUA;AAMA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AAAA;AACA;AACA;AACA;AACA;AAEA;AAAA;AACA;AAEA;AAAA;AAEA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;;;AACA;;AAAA;AACA;;AAAA;AACA;;;;;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AA9EA;AADA;AAYA;AACA;AACA;AACA;AAdA;AA+EA;AAAA;AA/EA;;;;;;;;;;;;;;;;;;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AAGA;AAgBA;AAVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAEA;AAEA;AACA;AAEA;AAAA;AACA;AACA;AACA;AACA;AAEA;AAAA;AACA;AAEA;AAAA;AAEA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;;AACA;;;;AACA;AAEA;AACA;AACA;AAvEA;AADA;AAkBA;AACA;AACA;AAnBA;AAwEA;AAAA;AAxEA;;;;;;;;;;;;;;;;;;;;;;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAIA;AAwBA;AAZA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AASA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;;;;AACA;AACA;AACA;AACA;AACA;;;;AACA;AAEA;AACA;AACA;AACA;AAEA;AAAA;AACA;AAEA;AAAA;AAEA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;;;;AACA;AACA;AACA;AAEA;;AAAA;AACA;;AAAA;AAEA;;;;;AACA;AAEA;AACA;AACA;AAtFA;AAAA;;AAAA;AAIA;AAAA;;AAAA;AAZA;AAFA;AACA;AA0BA;AACA;AACA;AACA;AA5BA;AA+FA;AAAA;AA/FA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAKA;AAkEA;AA3DA;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;AAEA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AAGA;AAEA;AASA;AACA;AACA;AACA;AACA;AACA;AAEA;;;;;;AACA;AACA;AACA;AACA;;AAAA;;;;;AACA;AAEA;AACA;AACA;AACA;AAGA;AACA;AAEA;AACA;AAGA;AAEA;AAAA;AACA;AAEA;AAAA;AAEA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;;;;;AACA;AACA;AACA;AAAA;AACA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AAEA;AAEA;AAEA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAdA;AAgBA;;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;AACA;AAEA;;;;;;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAXA;;;;AAcA;;AAAA;AACA;AACA;AACA;;;;AAEA;;;;;;AAEA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AAEA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;;;;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;;AAHA;AAIA;AAEA;;;;;AACA;AAxTA;AAFA;AACA;AAoEA;AACA;AACA;AACA;AACA;AAvEA;AAyTA;AAAA;AAzTA;;;;;;;;;;;;;;;;;;;;;ACbA;AACA;AACA;AACA;AAGA;AAuBA;AAjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAOA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;;;AACA;;;;AACA;AAEA;;;;;;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AARA;;;;AAWA;;AAAA;;;;AAEA;;AAGA;;AAAA;AACA;;;;;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAxFA;AADA;AAyBA;AACA;AACA;AA1BA;AAyFA;AAAA;AAzFA;;;;;;;;;;;;;;;ACPA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AAOA;AAFA;AAOA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AAGA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AACA;AAAA;AACA;;;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AACA;AAAA;AACA;;;AACA;AACA;AACA;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;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AACA;AAAA;AACA;;;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AACA;AAAA;AACA;;;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAzJA;AAFA;AACA;AASA;AACA;AACA;AAVA;AA0JA;AAAA;AA1JA;;;;;;;;;;;;;;;;;;;;;;;;;;ACjBA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AAIA;AAUA;AAFA;AAQA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AACA;AACA;;AAAA;AACA;;AAAA;;;;;AAEA;AACA;AAEA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AACA;AACA;;AAAA;AACA;;AAAA;;;;;AAGA;AACA;AAlEA;AAFA;AACA;AAYA;AACA;AACA;AACA;AAdA;AAmEA;AAAA;AAnEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACbA;AACA;AAQA;AACA;AACA;AACA;AACA;AACA;AAIA;AAiCA;AAzBA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AAEA;AAAA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;;;;;;;AAEA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;;AAAA;AACA;AACA;;AAAA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AACA;AACA;;;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AACA;AAEA;AAAA;AACA;AAEA;AAAA;AAEA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AACA;AACA;;AAAA;AACA;AACA;;AAAA;AACA;;;;;AAEA;AACA;AAnLA;AAAA;AAAA;AAAA;AAFA;AAFA;AACA;AAkCA;AAjCA;AAsLA;AAAA;AAtLA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACbA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAIA;AA8CA;AAvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAEA;AASA;AAEA;AAIA;AAEA;AAEA;AACA;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AACA;AAEA;;;;;AACA;AACA;AACA;AACA;AACA;AACA;;AALA;AAOA;;AAAA;AAEA;;;;;AACA;AAEA;;;;;;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAZA;AAcA;;AAAA;AAEA;;;;;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AAEA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AAEA;AAAA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;;;;;;;AAGA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AANA;AAQA;;AAAA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAPA;AASA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AACA;AACA;;;AACA;AAEA;;;;;AACA;AAEA;AAAA;AACA;AAEA;AAAA;AAEA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA1QA;AAAA;;AAAA;AAlCA;AAFA;AACA;AAgDA;AACA;AACA;AACA;AAlDA;AA6SA;AAAA;AA7SA;;;;;;;;;;;;;;;;;;;;;;;;;AClBA;AACA;AAGA;AACA;AACA;AACA;AAEA;AACA;AAIA;AAUA;AAJA;AACA;AACA;AAOA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AACA;AACA;AACA;AACA;AACA;;AACA;AACA;AAAA;AACA;;;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AACA;AAAA;AACA;;;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAzEA;AAAA;;AAAA;AAPA;AAFA;AACA;AAYA;AACA;AACA;AAbA;AAiFA;AAAA;AAjFA;;;;;;;;;;;;;;;;;;;;;;;;;;ACdA;AACA;AAEA;AACA;AACA;AACA;AAGA;AACA;AAIA;AAyCA;AA5BA;AACA;AAEA;AAEA;AACA;AACA;AAEA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAOA;AACA;AACA;AACA;AAEA;AACA;AACA;AAIA;AAEA;AACA;AACA;AAGA;AACA;AACA;AAEA;;;AACA;AACA;AACA;AACA;;;;AACA;AACA;;;AACA;AACA;;;;AACA;AACA;AACA;AACA;AAEA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AACA;AACA;AAAA;AACA;;;AACA;AACA;AAEA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AACA;AAAA;AACA;;;AACA;AACA;AAEA;;;;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AARA;;;;AAWA;;AAAA;;;;;AAGA;;AAAA;;;;;AACA;AAEA;;;;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AACA;AACA;AACA;;AAAA;AACA;;AAAA;AACA;;;;;AAEA;;;;AACA;AAEA;AACA;AACA;AACA;;;;;AACA;AACA;;AAAA;AACA;AACA;;;;;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;;;;;AACA;AACA;;AAAA;AACA;AACA;;;;;AACA;AACA;AACA;AACA;AACA;AAEA;;;;;AACA;AACA;AACA;;AAAA;AACA;AACA;;AAAA;;;;;AACA;AAEA;AACA;AACA;AAEA;AACA;AAGA;AAjOA;AAFA;AACA;AA2CA;AACA;AACA;AA5CA;AAkOA;AAAA;AAlOA","sources":["webpack://ro-dental/./src/modals/buy-subscription.html","webpack://ro-dental/./src/modals/cancel-appointment.html","webpack://ro-dental/./src/modals/complete-member-appointment.html","webpack://ro-dental/./src/modals/edit-appointment.html","webpack://ro-dental/./src/modals/new-appointment-from-request.html","webpack://ro-dental/./src/modals/new-appointment.html","webpack://ro-dental/./src/modals/new-client.html","webpack://ro-dental/./src/modals/new-credit-card.html","webpack://ro-dental/./src/pages/account-confirmed.html","webpack://ro-dental/./src/pages/all-appointments.html","webpack://ro-dental/./src/pages/appointment-requests.html","webpack://ro-dental/./src/pages/appointments.html","webpack://ro-dental/./src/pages/book-now.html","webpack://ro-dental/./src/pages/clients.html","webpack://ro-dental/./src/pages/dashboard.html","webpack://ro-dental/./src/modals/buy-subscription.ts","webpack://ro-dental/./src/modals/cancel-appointment.ts","webpack://ro-dental/./src/modals/complete-member-appointment.ts","webpack://ro-dental/./src/modals/edit-appointment.ts","webpack://ro-dental/./src/modals/new-appointment-from-request.ts","webpack://ro-dental/./src/modals/new-appointment.ts","webpack://ro-dental/./src/modals/new-client.ts","webpack://ro-dental/./src/modals/new-credit-card.ts","webpack://ro-dental/./src/pages/account-confirmed.ts","webpack://ro-dental/./src/pages/all-appointments.ts","webpack://ro-dental/./src/pages/appointment-requests.ts","webpack://ro-dental/./src/pages/appointments.ts","webpack://ro-dental/./src/pages/book-now.ts","webpack://ro-dental/./src/pages/clients.ts","webpack://ro-dental/./src/pages/dashboard.ts"],"sourcesContent":["// Module\nvar code = \"\";\n// Exports\nexport default code;","// Module\nvar code = \"\";\n// Exports\nexport default code;","// Module\nvar code = \"\";\n// Exports\nexport default code;","// Module\nvar code = \"\";\n// Exports\nexport default code;","// Module\nvar code = \"\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\";\n// Exports\nexport default code;","// Module\nvar code = \"\";\n// Exports\nexport default code;","// Module\nvar code = \"\";\n// Exports\nexport default code;","// Imports\nimport ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \"../../node_modules/html-loader/dist/runtime/getUrl.js\";\nvar ___HTML_LOADER_IMPORT_0___ = new URL(\"/static/logo-black.png\", import.meta.url);\n// Module\nvar ___HTML_LOADER_REPLACEMENT_0___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_0___);\nvar code = \"\";\n// Exports\nexport default code;","// Module\nvar code = \"\";\n// Exports\nexport default code;","// Module\nvar code = \"\";\n// Exports\nexport default code;","// Module\nvar code = \"\";\n// Exports\nexport default code;","// Imports\nimport ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \"../../node_modules/html-loader/dist/runtime/getUrl.js\";\nvar ___HTML_LOADER_IMPORT_0___ = new URL(\"/static/logo-black.png\", import.meta.url);\n// Module\nvar ___HTML_LOADER_REPLACEMENT_0___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_0___);\nvar code = \"\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\";\n// Exports\nexport default code;","// Module\nvar code = \"\\n\";\n// Exports\nexport default code;","import {\n ICreditCard,\n IUser,\n ISubscription,\n ISubscriptionType,\n} from \"./../services/interfaces\";\nimport { autoinject } from \"aurelia-framework\";\nimport { DialogController } from \"aurelia-dialog\";\nimport { AuthenticationService } from \"services/authentication-service\";\nimport { connectTo } from \"aurelia-store\";\nimport { State } from \"services/state\";\nimport { StateManager } from \"services/state-manager\";\n\n@connectTo()\n@autoinject()\nexport class BuySubscriptionDialog {\n controller: DialogController;\n _authenticationService: AuthenticationService;\n _stateManager: StateManager;\n\n subscriptionType: ISubscriptionType;\n savedCreditCards: any[];\n user: IUser;\n purchasingSubscription: boolean = false;\n\n defaultCreditCard: ICreditCard;\n\n subscription: ISubscription = {\n subscriptionTypeId: \"\",\n userId: \"\",\n isAnnual: true,\n startDate: new Date(),\n isActive: false,\n };\n\n get subtotal() {\n if (this.subscription.isAnnual) {\n return this.subscriptionType.annualPrice;\n } else {\n return this.subscriptionType.monthlyPrice;\n }\n }\n get tax() {\n return this.subtotal * 0.05;\n }\n get total() {\n return this.subtotal + this.tax;\n }\n\n constructor(\n controller: DialogController,\n authenticationService: AuthenticationService,\n stateManager: StateManager\n ) {\n this.controller = controller;\n this._authenticationService = authenticationService;\n this._stateManager = stateManager;\n }\n\n activate(subscriptionType: ISubscriptionType) {\n this.subscriptionType = subscriptionType;\n this.subscription.subscriptionTypeId = subscriptionType.subscriptionTypeId;\n }\n\n stateChanged(state: State) {\n this.savedCreditCards = state.savedCreditCards;\n this.user = state.user;\n this.subscription.userId = this.user.userId;\n this.defaultCreditCard = this.savedCreditCards.find(\n (cc) => cc.isDefault === true\n );\n }\n\n attached() {\n if (this.savedCreditCards.length === 0) {\n this._stateManager.getSavedCreditCardsAsync();\n }\n }\n\n async purchase() {\n this.purchasingSubscription = true;\n await this._stateManager.postSubscriptionAsync(this.subscription);\n await this._stateManager.getSubscriptionAsync();\n await this._stateManager.getUserAsync();\n this.purchasingSubscription = false;\n this.controller.ok();\n }\n\n cancel() {\n this.controller.cancel();\n }\n}\n","import { IAppointment } from \"./../services/interfaces\";\nimport { autoinject } from \"aurelia-framework\";\nimport { DialogController, DialogService } from \"aurelia-dialog\";\n\nimport \"flatpickr/dist/flatpickr.css\";\nimport { StateManager } from \"services/state-manager\";\n\n@autoinject()\nexport class CancelAppointmentDialog {\n controller: DialogController;\n _dialogService: DialogService;\n _stateManager: StateManager;\n\n appointment: IAppointment;\n cancellationReason: string;\n\n constructor(controller: DialogController, stateManager: StateManager) {\n this.controller = controller;\n this._stateManager = stateManager;\n }\n\n activate(appointment: IAppointment) {\n this.appointment = appointment;\n }\n\n async save() {\n this.appointment.isCancelled = true;\n this.appointment.cancelledReason = this.cancellationReason;\n\n await this._stateManager.updateAppointmentAsync(this.appointment);\n await this._stateManager.getTodaysAppointments();\n this.controller.ok();\n }\n\n cancel() {\n this.appointment.isCancelled = false;\n this.controller.cancel();\n }\n}\n","import { IAppointment, IService } from \"../services/interfaces\";\nimport { autoinject } from \"aurelia-framework\";\nimport { DialogController } from \"aurelia-dialog\";\nimport { StateManager } from \"services/state-manager\";\nimport { State } from \"services/state\";\nimport { connectTo } from \"aurelia-store\";\nimport moment from \"moment-timezone\";\n\n@connectTo()\n@autoinject()\nexport class CompleteMemberAppointmentDialog {\n controller: DialogController;\n stateManager: StateManager;\n\n subscriptionTypeId: string;\n userId: string;\n\n appointment: IAppointment;\n services: IService[];\n completedServices: IService[] = [];\n subscriptionServiceList: any[] = [];\n\n dropdownExpanded: boolean = false;\n\n constructor(controller: DialogController, stateManager: StateManager) {\n this.controller = controller;\n this.stateManager = stateManager;\n }\n\n selectOption(service: IService) {\n if (this.completedServices.find((ss) => ss.serviceId == service.serviceId))\n return;\n\n service.isSelected = true;\n this.completedServices.push(service);\n }\n toggleDropdown() {\n this.dropdownExpanded = !this.dropdownExpanded;\n }\n activate(appointment: IAppointment) {\n this.appointment = appointment;\n this.subscriptionTypeId =\n appointment.user.activeSubscription.subscriptionTypeId;\n this.userId = appointment.user.userId;\n }\n async attached() {\n this.stateManager.getServicesAsync();\n }\n\n stateChanged(state: State) {\n this.services = state.services;\n }\n\n async save() {\n const userId = this.userId;\n const subscriptionTypeId = this.subscriptionTypeId;\n this.completedServices.forEach((service) => {\n this.subscriptionServiceList.push({\n subscriptionTypeId: subscriptionTypeId,\n userId: userId,\n serviceId: service.serviceId,\n });\n });\n\n this.appointment.isCompleted = true;\n\n await this.stateManager.updateAppointmentAsync(this.appointment);\n\n await this.stateManager.postSubscriptionServicesAsync(\n this.subscriptionServiceList\n );\n\n await this.stateManager.getAllAppointmentsAsync();\n\n this.controller.ok();\n }\n\n cancel() {\n this.controller.cancel();\n }\n\n isServiceInList(service) {\n if (this.completedServices.find((ss) => ss.serviceId == service.serviceId))\n return \"disabled\";\n\n return \"\";\n }\n removeService(service) {\n service.isSelected = false;\n this.completedServices = this.completedServices.filter(\n (ss) => ss.serviceId != service.serviceId\n );\n }\n getBadgeColor(subscriptionType) {\n if (subscriptionType == \"Founder\") return \"badge-ro-orange\";\n }\n}\n","import { IAppointment, IAppointmentRequest } from \"./../services/interfaces\";\nimport { autoinject, observable, TaskQueue } from \"aurelia-framework\";\nimport { DialogController, DialogService } from \"aurelia-dialog\";\nimport { AuthenticationService } from \"services/authentication-service\";\nimport * as FlatPickr from \"flatpickr\";\nimport \"flatpickr/dist/flatpickr.css\";\nimport { StateManager } from \"services/state-manager\";\nimport moment from \"moment-timezone\";\nimport Swal from \"sweetalert2\";\n\n@autoinject()\nexport class EditAppointmentDialog {\n controller: DialogController;\n _authenticationService: AuthenticationService;\n _dialogService: DialogService;\n _stateManager: StateManager;\n flatPickerObject: any;\n taskQueue: TaskQueue;\n\n appointment: IAppointment;\n\n constructor(\n controller: DialogController,\n authenticationService: AuthenticationService,\n taskQueue: TaskQueue,\n stateManager: StateManager\n ) {\n this.controller = controller;\n this._authenticationService = authenticationService;\n this.taskQueue = taskQueue;\n this._stateManager = stateManager;\n }\n\n activate(appointment: IAppointment) {\n this.appointment = appointment;\n }\n\n attached() {\n this.taskQueue.queueMicroTask(() => {\n this.createDatePicker();\n });\n }\n\n createDatePicker() {\n var htmlElement = document.getElementById(\"new-appointment-calendar\");\n\n if (htmlElement == null) return;\n\n if (this.flatPickerObject != null) return;\n\n this.flatPickerObject = new (FlatPickr)(htmlElement, {\n altInput: true,\n altFormat: \"F j, Y\",\n defaultDate: this.appointment.date,\n minDate: \"today\",\n enableTime: true,\n\n onChange: (date) => {\n this.appointment.date = moment(date[0])\n .tz(\"America/Edmonton\", true)\n .toDate();\n },\n });\n }\n\n async save() {\n await this._stateManager.updateAppointmentAsync(this.appointment);\n await this._stateManager.getAllAppointmentsAsync();\n this.controller.ok();\n }\n cancelAppointment() {\n Swal.fire({\n title: \"Are you sure?\",\n text: \"You are about to cancel this appointment!\",\n icon: \"warning\",\n showCancelButton: true,\n confirmButtonColor: \"#3085d6\",\n cancelButtonColor: \"#d33\",\n confirmButtonText: \"Yes, cancel it!\",\n }).then((result) => {\n if (result.isConfirmed) {\n this.appointment.isCancelled = true;\n this.save();\n }\n });\n }\n\n cancel() {\n this.controller.cancel();\n }\n}\n","import { IAppointment, IAppointmentRequest } from \"../services/interfaces\";\nimport { autoinject, observable, TaskQueue } from \"aurelia-framework\";\nimport { DialogController } from \"aurelia-dialog\";\nimport { AuthenticationService } from \"services/authentication-service\";\nimport * as FlatPickr from \"flatpickr\";\nimport \"flatpickr/dist/flatpickr.css\";\nimport moment from \"moment-timezone\";\n\n@autoinject()\nexport class NewAppointmentFromRequestDialog {\n controller: DialogController;\n _authenticationService: AuthenticationService;\n flatPickerObject: any;\n taskQueue: TaskQueue;\n\n newAppointment: IAppointment = {\n userId: \"\",\n appointmentTypeId: \"\",\n appointmentRequestId: \"\",\n date: new Date(),\n durationInMinutes: 0,\n services: [],\n };\n appointmentRequest: IAppointmentRequest;\n\n constructor(\n controller: DialogController,\n authenticationService: AuthenticationService,\n taskQueue: TaskQueue\n ) {\n this.controller = controller;\n this._authenticationService = authenticationService;\n this.taskQueue = taskQueue;\n }\n\n activate(appointmentRequest: IAppointmentRequest) {\n this.newAppointment.appointmentRequestId =\n appointmentRequest.appointmentRequestId;\n\n this.newAppointment.appointmentTypeId =\n appointmentRequest.appointmentType.appointmentTypeId;\n\n this.newAppointment.userId = appointmentRequest.user.userId;\n\n this.appointmentRequest = appointmentRequest;\n }\n\n attached() {\n this.taskQueue.queueMicroTask(() => {\n this.createDatePicker();\n });\n }\n\n createDatePicker() {\n var htmlElement = document.getElementById(\"new-appointment-calendar\");\n\n if (htmlElement == null) return;\n\n if (this.flatPickerObject != null) return;\n\n this.flatPickerObject = new (FlatPickr)(htmlElement, {\n altInput: true,\n altFormat: \"F j, Y\",\n inline: true,\n minDate: \"today\",\n enableTime: true,\n onChange: (date) => {\n this.newAppointment.date = moment(date[0])\n .tz(\"America/Edmonton\", true)\n .toDate();\n },\n });\n }\n\n async save() {\n this.controller.ok(this.newAppointment);\n }\n\n cancel() {\n this.controller.cancel();\n }\n}\n","import {\n IAppointment,\n IAppointmentRequest,\n IAppointmentType,\n IUser,\n} from \"../services/interfaces\";\nimport { autoinject, observable, TaskQueue } from \"aurelia-framework\";\nimport { DialogController } from \"aurelia-dialog\";\nimport { AuthenticationService } from \"services/authentication-service\";\nimport * as FlatPickr from \"flatpickr\";\nimport \"flatpickr/dist/flatpickr.css\";\nimport { StateManager } from \"services/state-manager\";\nimport { State } from \"services/state\";\nimport { connectTo } from \"aurelia-store\";\nimport moment from \"moment-timezone\";\n\n@connectTo()\n@autoinject()\nexport class NewAppointmentDialog {\n controller: DialogController;\n _authenticationService: AuthenticationService;\n flatPickerObject: any;\n taskQueue: TaskQueue;\n stateManager: StateManager;\n\n appointmentTypes: IAppointmentType[];\n @observable selectedAppointmentType: IAppointmentType;\n\n patients: IUser[];\n selectedPatient: IUser;\n @observable patientSearchTerm = \"\";\n\n newAppointment: IAppointment = {\n userId: \"\",\n appointmentTypeId: \"\",\n appointmentRequestId: null,\n date: new Date(),\n durationInMinutes: 0,\n services: [],\n };\n appointmentRequest: IAppointmentRequest;\n\n constructor(\n controller: DialogController,\n authenticationService: AuthenticationService,\n taskQueue: TaskQueue,\n stateManager: StateManager\n ) {\n this.controller = controller;\n this._authenticationService = authenticationService;\n this.taskQueue = taskQueue;\n this.stateManager = stateManager;\n }\n\n selectedAppointmentTypeChanged() {\n this.newAppointment.appointmentTypeId =\n this.selectedAppointmentType.appointmentTypeId;\n this.newAppointment.durationInMinutes =\n this.selectedAppointmentType.durationInMinutes;\n }\n\n patientSearchTermChanged() {\n if (this.stateManager)\n this.stateManager.getPatientsAsync(this.patientSearchTerm);\n }\n\n async attached() {\n this.taskQueue.queueMicroTask(() => {\n this.createDatePicker();\n });\n this.stateManager.getAppointmentTypesAsync();\n this.stateManager.getPatientsAsync(\"\");\n }\n\n stateChanged(state: State) {\n this.appointmentTypes = state.appointmentTypes;\n this.patients = state.patients;\n }\n\n createDatePicker() {\n var htmlElement = document.getElementById(\"new-appointment-calendar\");\n\n if (htmlElement == null) return;\n\n if (this.flatPickerObject != null) return;\n\n this.flatPickerObject = new (FlatPickr)(htmlElement, {\n altInput: true,\n altFormat: \"F j, Y\",\n minDate: \"today\",\n enableTime: true,\n onChange: (date) => {\n this.newAppointment.date = moment(date[0])\n .tz(\"America/Edmonton\", true)\n .toDate();\n },\n });\n }\n\n async save() {\n this.newAppointment.userId = this.selectedPatient.userId;\n this.newAppointment.appointmentTypeId =\n this.selectedAppointmentType.appointmentTypeId;\n\n await this.stateManager.postAppointmentAsync(this.newAppointment);\n await this.stateManager.getAllAppointmentsAsync();\n\n this.controller.ok();\n }\n\n cancel() {\n this.controller.cancel();\n }\n}\n","import { autoinject, TaskQueue } from \"aurelia-framework\";\nimport { Router } from \"aurelia-router\";\nimport { AuthenticationService } from \"services/authentication-service\";\nimport Swal from \"sweetalert2\";\nimport * as FlatPickr from \"flatpickr\";\nimport \"flatpickr/dist/flatpickr.css\";\nimport { DialogService } from \"aurelia-dialog\";\nimport { StateManager } from \"services/state-manager\";\nimport { ISubscription, ISubscriptionType, IUser } from \"services/interfaces\";\nimport { connectTo } from \"aurelia-store\";\nimport { State } from \"services/state\";\n\n@connectTo()\n@autoinject()\nexport class NewClientDialog {\n dialogService: DialogService;\n router: Router;\n private _authenticationService: AuthenticationService;\n taskQueue: TaskQueue;\n flatPickerObject: any;\n stateManager: StateManager;\n createdUser: IUser = null;\n newSavedCreditCard: any = null;\n currentView: string = \"addClient\";\n subscriptionTypes: any[] = [];\n displaySubscriptionType: ISubscription;\n subscription: ISubscription = {\n subscriptionTypeId: \"\",\n userId: \"\",\n isAnnual: true,\n startDate: new Date(),\n isActive: false,\n };\n\n newCreditCard: any = {\n cardNumber: \"\",\n creditCardType: \"\",\n yearExpiration: \"\",\n monthExpiration: \"\",\n cv2: \"\",\n billingContact: {\n firstName: \"\",\n lastName: \"\",\n email: \"\",\n phoneNumber: \"\",\n streetNumber: \"\",\n street: \"\",\n postalCode: \"\",\n },\n };\n\n showingRegisterErrors: boolean = false;\n showingCreditCardErrors: boolean = false;\n\n attemptingRegistration: boolean = false;\n addingNewCreditCard: boolean = false;\n purchasingSubscription: boolean = false;\n\n registerFirstName: string = \"\";\n firstNameError: string = \"\";\n\n registerLastName: string = \"\";\n lastNameError: string = \"\";\n\n registerEmail: string = \"\";\n emailError: string = \"\";\n\n registerPhoneNumber: string = \"\";\n phoneNumberError: string = \"\";\n\n registerWantsNewsletter: boolean = true;\n registerServerMessage: string = \"\";\n creditCardServerMessage: string = \"\";\n membershipServerMessage: string = \"\";\n\n birthday: Date;\n birthdayError: string = \"\";\n\n sendConfirmationEmailBool: boolean = false;\n\n constructor(\n authenticationService: AuthenticationService,\n router: Router,\n taskQueue: TaskQueue,\n dialogService: DialogService,\n stateManager: StateManager\n ) {\n this._authenticationService = authenticationService;\n this.router = router;\n this.taskQueue = taskQueue;\n this.dialogService = dialogService;\n this.stateManager = stateManager;\n }\n\n async attached() {\n this.taskQueue.queueMicroTask(() => {\n this.createDatePicker();\n });\n await this.stateManager.getSubscriptionTypesAsync();\n }\n\n stateChanged(state: State) {\n this.subscriptionTypes = state.subscriptionTypes;\n if (!this.displaySubscriptionType) {\n this.displaySubscriptionType = state.subscriptionTypes.find(\n (st) => st.name == \"Founder\"\n );\n }\n }\n\n selectSubscriptionType(nameString) {\n this.displaySubscriptionType = this.subscriptionTypes.find(\n (st) => st.name == nameString\n );\n }\n\n createDatePicker() {\n var htmlElement = document.getElementById(\"birthday-calendar\");\n\n if (htmlElement == null) return;\n\n if (this.flatPickerObject != null) return;\n\n this.flatPickerObject = new (FlatPickr)(htmlElement, {\n dateFormat: \"F d\",\n onChange: (date) => {\n this.birthday = date[0];\n },\n });\n }\n\n async registerNewUser() {\n if (!this.registerFirstName) {\n this.firstNameError = \"Please enter your first name\";\n } else {\n this.firstNameError = \"\";\n }\n\n if (!this.registerLastName) {\n this.lastNameError = \"Please enter your last name\";\n } else {\n this.lastNameError = \"\";\n }\n\n this.checkEmailAddress();\n\n this.checkPhoneNumber();\n\n if (\n this.firstNameError ||\n this.lastNameError ||\n this.emailError ||\n this.phoneNumberError\n ) {\n this.showingRegisterErrors = true;\n return;\n }\n\n this.attemptingRegistration = true;\n\n const returnedData = await fetch(\"ShallowRegister\", {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n Accept: \"application/json\",\n },\n body: JSON.stringify({\n email: this.registerEmail,\n phone: this.registerPhoneNumber,\n firstName: this.registerFirstName,\n lastName: this.registerLastName,\n birthday: this.birthday,\n sendConfirmationEmail: this.sendConfirmationEmailBool,\n }),\n });\n\n const registerResult = await returnedData.json();\n\n if (registerResult == \"Email Taken\") {\n this.registerServerMessage = \"Email already in use\";\n this.attemptingRegistration = false;\n return;\n }\n if (registerResult == \"Failed To Create User\") {\n this.registerServerMessage =\n \"Failed to create account. Please try again later\";\n this.attemptingRegistration = false;\n return;\n }\n\n if (registerResult == \"User Already Exists\") {\n this.registerServerMessage = \"That email is already in use.\";\n this.attemptingRegistration = false;\n return;\n }\n\n if (registerResult.userId != null) {\n this.createdUser = registerResult;\n this.registerServerMessage = \"Account Successfully Created!\";\n this.attemptingRegistration = false;\n this.stateManager.getPatientsAsync(null);\n }\n }\n\n async submitCardInfo() {\n this.addingNewCreditCard = true;\n this.newCreditCard.creditCardType = this.getCreditCardType(\n this.newCreditCard\n );\n const fetchUrl = `/patientcreditcards`;\n const returnedData = await fetch(fetchUrl, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n Accept: \"application/json\",\n Authorization: `Bearer ${this._authenticationService.session.token}`,\n },\n body: JSON.stringify({\n user: this.createdUser,\n creditCard: this.newCreditCard,\n }),\n });\n\n try {\n const data = await returnedData.json();\n this.newSavedCreditCard = data;\n console.log(\"Credit Card Returned Data\", data);\n this.addingNewCreditCard = false;\n } catch (exception) {\n console.log(\"Error\");\n }\n }\n\n toggleNewsletter() {\n this.registerWantsNewsletter = !this.registerWantsNewsletter;\n }\n\n checkPhoneNumber() {\n if (!this.registerPhoneNumber) {\n this.phoneNumberError = \"Please enter your phone number\";\n return;\n }\n\n var phoneRegex = /^[0-9]{10}$/;\n if (this.registerPhoneNumber.match(phoneRegex)) {\n this.phoneNumberError = \"\";\n } else {\n this.phoneNumberError = \"Please enter a valid 10-digit phone number\";\n }\n }\n\n checkEmailAddress() {\n if (!this.registerEmail) {\n this.emailError = \"Please enter your email address\";\n return;\n }\n\n if (\n this.registerEmail.includes(\"@\") === false ||\n this.registerEmail.includes(\".\") === false\n ) {\n this.emailError = \"Please enter a valid email address\";\n return;\n }\n this.emailError = \"\";\n }\n\n navigateToLoginPage() {\n this.router.navigateToRoute(\"login\");\n }\n\n getCreditCardType(creditCard) {\n switch (creditCard.cardNumber[0]) {\n case \"4\":\n return \"Visa\";\n case \"5\":\n return \"MasterCard\";\n case \"3\":\n return \"Amex\";\n default:\n return \"Unknown\";\n }\n }\n fillCardholderInformation() {\n this.newCreditCard.billingContact.firstName = this.createdUser.firstName;\n this.newCreditCard.billingContact.lastName = this.createdUser.lastName;\n this.newCreditCard.billingContact.email = this.createdUser.email;\n this.newCreditCard.billingContact.phoneNumber =\n this.createdUser.mobilePhone;\n }\n\n sendConfirmationEmail() {\n Swal.fire({\n title: \"Enter your Email Address\",\n input: \"email\",\n inputPlaceholder: \"janero@gmail.com\",\n confirmButtonColor: \"#40684e\",\n }).then((result) => {\n if (result.value) {\n this._authenticationService.sendConfirmationEmail(result.value);\n Swal.fire({\n title: \"Account Confirmation\",\n text: \"If that email has an account with us, you will receive a confirmation email shortly.\",\n icon: \"success\",\n iconColor: \"#40684e\",\n });\n }\n });\n }\n closeDialog() {\n this.dialogService.closeAll();\n }\n\n async purchase() {\n this.purchasingSubscription = true;\n this.subscription.userId = this.createdUser.userId;\n this.subscription.subscriptionTypeId =\n this.displaySubscriptionType.subscriptionTypeId;\n\n await this.stateManager.postSubscriptionAsync({\n subscription: this.subscription,\n user: this.createdUser,\n });\n this.purchasingSubscription = false;\n\n this.closeDialog();\n }\n}\n","import { ICreditCard, IUser } from \"./../services/interfaces\";\nimport { autoinject, TaskQueue } from \"aurelia-framework\";\nimport { DialogController } from \"aurelia-dialog\";\nimport { AuthenticationService } from \"services/authentication-service\";\nimport { StateManager } from \"services/state-manager\";\n\n@autoinject()\nexport class NewCreditCardDialog {\n controller: DialogController;\n _authenticationService: AuthenticationService;\n _stateManager: StateManager;\n user: IUser;\n\n newCreditCard: any = {\n cardNumber: \"\",\n creditCardType: \"\",\n yearExpiration: \"\",\n monthExpiration: \"\",\n cv2: \"\",\n billingContact: {\n firstName: \"\",\n lastName: \"\",\n email: \"\",\n phoneNumber: \"\",\n streetNumber: \"\",\n street: \"\",\n postalCode: \"\",\n },\n };\n\n constructor(\n controller: DialogController,\n authenticationService: AuthenticationService,\n stateManager: StateManager\n ) {\n this.controller = controller;\n this._authenticationService = authenticationService;\n this._stateManager = stateManager;\n }\n\n activate(user: IUser) {\n this.user = user;\n }\n\n fillCardholderInformation() {\n this.newCreditCard.billingContact.firstName = this.user.firstName;\n this.newCreditCard.billingContact.lastName = this.user.lastName;\n this.newCreditCard.billingContact.email = this.user.email;\n this.newCreditCard.billingContact.phoneNumber = this.user.mobilePhone;\n }\n\n async save() {\n this.controller.ok();\n }\n\n async submitCardInfo() {\n this.newCreditCard.creditCardType = this.getCreditCardType(\n this.newCreditCard\n );\n const fetchUrl = `/creditcards`;\n const returnedData = await fetch(fetchUrl, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n Accept: \"application/json\",\n Authorization: `Bearer ${this._authenticationService.session.token}`,\n },\n body: JSON.stringify(this.newCreditCard),\n });\n\n try {\n const data = await returnedData.json();\n } catch (exception) {\n console.log(\"Error\");\n }\n\n await this._stateManager.getSavedCreditCardsAsync();\n this.save();\n }\n\n cancel() {\n this.controller.cancel();\n }\n\n getCreditCardType(creditCard) {\n switch (creditCard.cardNumber[0]) {\n case \"4\":\n return \"Visa\";\n case \"5\":\n return \"MasterCard\";\n case \"3\":\n return \"Amex\";\n default:\n return \"Unknown\";\n }\n }\n}\n","export class AccountConfirmedPage {}\n","import { autoinject, TaskQueue, bindable } from \"aurelia-framework\";\nimport { connectTo } from \"aurelia-store\";\nimport { IAppointment, IUser } from \"services/interfaces\";\nimport { State } from \"services/state\";\nimport { StateManager } from \"services/state-manager\";\nimport \"flatpickr/dist/flatpickr.css\";\nimport { Router } from \"aurelia-router\";\nimport moment from \"moment\";\nimport { DialogService } from \"aurelia-dialog\";\nimport { EditAppointmentDialog } from \"modals/edit-appointment\";\nimport { NewAppointmentDialog } from \"modals/new-appointment\";\nimport { CompleteMemberAppointmentDialog } from \"modals/complete-member-appointment\";\nimport { CancelAppointmentDialog } from \"modals/cancel-appointment\";\nimport Swal from \"sweetalert2\";\n\n@connectTo()\n@autoinject()\nexport class PatientAppointments {\n _stateManager: StateManager;\n _router: Router;\n _dialogService: DialogService;\n appointments: IAppointment[];\n isLoadingTableData: boolean = false;\n\n constructor(\n stateManager: StateManager,\n router: Router,\n dialogService: DialogService\n ) {\n this._stateManager = stateManager;\n this._router = router;\n this._dialogService = dialogService;\n }\n\n stateChanged(state: State) {\n this.appointments = state.allAppointments;\n this.isLoadingTableData = false;\n }\n\n attached() {\n this.isLoadingTableData = true;\n this._stateManager.getAllAppointmentsAsync();\n }\n\n navigateToPatient(user: IUser) {\n this._router.navigateToRoute(\"patient\", { userId: user.userId });\n }\n\n generateComortPreferences(user: IUser) {\n var comfortPreferences = \"\";\n if (user.soundCancellingHeadphones)\n comfortPreferences += \"Sound Cancelling Headphones, \";\n if (user.netflix) comfortPreferences += \"Netflix, \";\n if (user.lemongrassDiffuser) comfortPreferences += \"Lemongrass Diffuser, \";\n if (user.weightedBlanket) comfortPreferences += \"Weighted Blanket, \";\n if (user.stressBalls) comfortPreferences += \"Stress Balls, \";\n if (user.heatedBlanket) comfortPreferences += \"Heated Blanket, \";\n if (user.latte) comfortPreferences += \"Latte, \";\n if (user.waterBottle) comfortPreferences += \"Water Bottle, \";\n if (user.eyeMask) comfortPreferences += \"Eye Mask, \";\n\n //remove last comma from the list if there is one.\n if (comfortPreferences.length > 0)\n comfortPreferences = comfortPreferences.slice(0, -2);\n\n return comfortPreferences;\n }\n\n appointmentIsToday(appointment) {\n var appointmentDate = moment.utc(appointment.date).local().date();\n var today = moment().date();\n\n return appointmentDate === today;\n }\n openEditAppointmentModal(appointment: IAppointment) {\n this._dialogService\n .open({\n viewModel: EditAppointmentDialog,\n model: appointment,\n })\n .whenClosed(async (response) => {\n if (!response.wasCancelled) {\n } else {\n }\n });\n }\n openNewAppointmentModal() {\n this._dialogService\n .open({\n viewModel: NewAppointmentDialog,\n model: {},\n })\n .whenClosed(async (response) => {\n if (!response.wasCancelled) {\n } else {\n }\n });\n }\n completeAppointment(appointment: IAppointment) {\n if (appointment.user.activeSubscription == null) {\n Swal.fire({\n title: \"Complete Appointment?\",\n text: \"Are you sure you want to complete this appointment?\",\n icon: \"success\",\n showDenyButton: true,\n showCancelButton: true,\n confirmButtonText: \"Mark Complete\",\n confirmButtonColor: \"#40684e\",\n denyButtonText: \"Mark No Show\",\n customClass: {\n actions: \"my-actions\",\n cancelButton: \"order-1 right-gap\",\n confirmButton: \"order-3\",\n denyButton: \"order-2\",\n },\n }).then((result) => {\n if (result.isConfirmed) {\n appointment.isCompleted = true;\n this._stateManager.updateAppointmentAsync(appointment);\n }\n if (result.isDenied) {\n appointment.isNoShow = true;\n this._stateManager.updateAppointmentAsync(appointment);\n }\n });\n } else {\n this._dialogService\n .open({\n viewModel: CompleteMemberAppointmentDialog,\n model: appointment,\n })\n .whenClosed(async (response) => {\n if (!response.wasCancelled) {\n } else {\n }\n });\n }\n }\n cancelAppointment(appointment) {\n this._dialogService\n .open({\n viewModel: CancelAppointmentDialog,\n model: appointment,\n lock: false,\n })\n .whenClosed(async (response) => {\n if (!response.wasCancelled) {\n } else {\n }\n });\n }\n\n appointmentInFuture(appointment) {\n var appointmentDate = moment.utc(appointment.date);\n var currentDate = moment.utc();\n if (appointmentDate.isAfter(currentDate)) {\n return true;\n } else {\n return false;\n }\n }\n\n appointmentInPast(appointment) {\n var appointmentDate = moment.utc(appointment.date);\n var currentDate = moment.utc();\n if (appointmentDate.isBefore(currentDate)) {\n return true;\n } else {\n return false;\n }\n }\n}\n","import { autoinject, TaskQueue, bindable } from \"aurelia-framework\";\nimport { connectTo } from \"aurelia-store\";\nimport { IAppointmentRequest, IUser } from \"services/interfaces\";\nimport { State } from \"services/state\";\nimport { StateManager } from \"services/state-manager\";\nimport \"flatpickr/dist/flatpickr.css\";\nimport { Router } from \"aurelia-router\";\nimport { DialogService } from \"aurelia-dialog\";\nimport { NewAppointmentFromRequestDialog } from \"modals/new-appointment-from-request\";\nimport Swal from \"sweetalert2\";\n\n@connectTo()\n@autoinject()\nexport class AppointmentRequests {\n _stateManager: StateManager;\n _router: Router;\n dialogService: DialogService;\n\n appointmentRequests: IAppointmentRequest[];\n user: IUser;\n\n isLoadingTableData: boolean = false;\n\n constructor(\n stateManager: StateManager,\n taskQueue: TaskQueue,\n dialogService: DialogService,\n router: Router\n ) {\n this._stateManager = stateManager;\n this.dialogService = dialogService;\n this._router = router;\n }\n\n stateChanged(state) {\n this.appointmentRequests = state.patientAppointmentRequests;\n this.isLoadingTableData = false;\n }\n\n attached() {\n this.isLoadingTableData = true;\n this._stateManager.getPatientAppointmentRequests();\n }\n\n navigateToPatient(user) {\n this._router.navigateToRoute(\"patient\", { userId: user.userId });\n }\n\n deleteAppointmentRequest(appointmentRequest: IAppointmentRequest) {\n Swal.fire({\n title: `Confirm Deletion`,\n text: `Are you sure you want to delete ${appointmentRequest.user.firstName}'s appointment request?`,\n showDenyButton: false,\n showCancelButton: true,\n showConfirmButton: true,\n confirmButtonText: `Yes, Delete`,\n confirmButtonColor: \"#40684e\",\n }).then(async (result) => {\n if (result.isConfirmed) {\n await this._stateManager.deleteAppointmentRequest(appointmentRequest);\n await this._stateManager.getPatientAppointmentRequests();\n }\n });\n }\n\n createAppointment(appointmentRequest: IAppointmentRequest) {\n this.dialogService\n .open({\n viewModel: NewAppointmentFromRequestDialog,\n model: appointmentRequest,\n lock: false,\n })\n .whenClosed(async (response) => {\n if (!response.wasCancelled) {\n await this._stateManager.postAppointmentAsync(response.output);\n await this._stateManager.getPatientAppointmentRequests();\n } else {\n }\n });\n }\n}\n","import { autoinject, TaskQueue, bindable } from \"aurelia-framework\";\nimport { connectTo } from \"aurelia-store\";\nimport {\n IAppointment,\n IAppointmentRequest,\n IAppointmentType,\n IUser,\n} from \"services/interfaces\";\nimport { State } from \"services/state\";\nimport { StateManager } from \"services/state-manager\";\nimport Swal from \"sweetalert2\";\nimport * as FlatPickr from \"flatpickr\";\nimport \"flatpickr/dist/flatpickr.css\";\nimport { Router } from \"aurelia-router\";\nimport moment from \"moment-timezone\";\n\n@connectTo()\n@autoinject()\nexport class Appointments {\n _stateManager: StateManager;\n @bindable _router: Router;\n\n appointmentRequests: IAppointmentRequest[];\n appointments: IAppointment[];\n user: IUser;\n\n isLoadingTableData: boolean = false;\n\n appointmentTypes: IAppointmentType[];\n appointmentRequest: IAppointmentRequest = {\n dateCreated: new Date(),\n appointmentType: null,\n requestedAppointmentDates: [],\n requestedAppointmentTimesOfDay: [],\n user: null,\n };\n submittingAppointmentRequest: boolean = false;\n\n taskQueue: TaskQueue;\n flatPickerObject: any;\n requestedAppointmentDates: Date[] = [];\n selectedAppointmentType: any;\n timeOfDaySelected: boolean = false;\n requestError: string = \"\";\n\n timesOfDay = [\n { id: 1, name: \"Mornings\", isSelected: false },\n { id: 2, name: \"Afternoons\", isSelected: false },\n { id: 3, name: \"Evenings\", isSelected: false },\n ];\n\n constructor(stateManager: StateManager, taskQueue: TaskQueue) {\n this._stateManager = stateManager;\n this.taskQueue = taskQueue;\n }\n\n stateChanged(state) {\n this.appointmentRequests = state.appointmentRequests;\n this.appointmentTypes = state.appointmentTypes;\n this.user = state.user;\n this.appointments = state.appointments;\n }\n\n activate(params, routeConfig, navigationInstruction) {\n console.log(\"Appointments Page Activated\");\n }\n\n bind(bindingContext: Object, overrideContext: Object) {\n console.log(\"Appointments Page Binded\");\n }\n\n attached() {\n console.log(\"Appointments Page Attached\");\n\n this._stateManager.getAppointmentRequests();\n this._stateManager.getAppointmentTypesAsync();\n this._stateManager.getAppointments();\n }\n\n selectAppointment(appointment) {\n this.selectedAppointmentType = null;\n\n if (this.flatPickerObject != null) {\n this.flatPickerObject.destroy();\n this.flatPickerObject = null;\n }\n\n this.appointmentTypes.forEach((a) => {\n a.isSelected = false;\n });\n\n appointment.isSelected = true;\n this.selectedAppointmentType = appointment;\n\n this.taskQueue.queueMicroTask(() => {\n this.createDatePicker();\n });\n }\n\n selectTimeOfDay(timeOfDay) {\n this.requestError = \"\";\n timeOfDay.isSelected = !timeOfDay.isSelected;\n this.timeOfDaySelected = this.timesOfDay.some((t) => t.isSelected == true);\n }\n\n async requestAppointment() {\n //if there is no time of day selected, return.\n const timeOfDay = this.timesOfDay.filter((t) => t.isSelected).length === 0;\n if (timeOfDay) {\n this.requestError = \"Please select a time of day.\";\n return;\n }\n\n this.requestError = \"\";\n\n this.appointmentRequest.user = this.user;\n this.appointmentRequest.requestedAppointmentDates =\n this.requestedAppointmentDates.map((date) => {\n return {\n date: moment(date).tz(\"America/Edmonton\", true).toDate(),\n };\n });\n\n this.appointmentRequest.appointmentType = this.selectedAppointmentType;\n this.appointmentRequest.requestedAppointmentTimesOfDay = this.timesOfDay\n .filter((t) => t.isSelected)\n .map((t) => {\n return { timeOfDay: t.name };\n });\n\n this.submittingAppointmentRequest = true;\n await this._stateManager.postAppointmentRequest(this.appointmentRequest);\n this.submittingAppointmentRequest = false;\n await this._stateManager.getAppointmentRequests();\n\n //Swal Fire Success Message.\n Swal.fire({\n title: `Request Submitted`,\n text: `Thank you for your request. We will reach out soon to book you in.`,\n showDenyButton: false,\n showCancelButton: true,\n showConfirmButton: true,\n confirmButtonText: `Great!`,\n confirmButtonColor: \"#40684e\",\n }).then(async (result) => {\n if (result.isConfirmed) {\n this._router.navigateToRoute(\"appointments\");\n }\n });\n\n this.requestedAppointmentDates = [];\n this.flatPickerObject.destroy();\n this.flatPickerObject = null;\n this.selectedAppointmentType = null;\n this.appointmentTypes.forEach((a) => {\n a.isSelected = false;\n });\n this.timesOfDay.forEach((t) => {\n t.isSelected = false;\n });\n }\n\n createDatePicker() {\n var htmlElement = document.getElementById(\"appointment-calendar\");\n\n if (htmlElement == null) return;\n\n if (this.flatPickerObject != null) return;\n\n this.flatPickerObject = new (FlatPickr)(htmlElement, {\n altInput: true,\n altFormat: \"F j, Y\",\n mode: \"multiple\",\n inline: true,\n minDate: \"today\",\n onChange: (newDates, dateStr, instance) => {\n this.requestedAppointmentDates = newDates;\n },\n });\n }\n\n deleteAppointmentRequest(appointmentRequest) {\n Swal.fire({\n title: `Would you like to delete this request?`,\n text: `This action cannot be undone.`,\n showDenyButton: true,\n showCancelButton: true,\n showConfirmButton: false,\n denyButtonText: `Yes, Delete`,\n cancelButtonText: \"Go Back\",\n confirmButtonColor: \"#40684e\",\n }).then(async (result) => {\n if (result.isDenied) {\n await this._stateManager.deleteAppointmentRequest(appointmentRequest);\n this.isLoadingTableData = true;\n await this._stateManager.getAppointmentRequests();\n this.isLoadingTableData = false;\n }\n });\n }\n}\n","import {\n IAppointmentRequest,\n IAppointmentType,\n IUser,\n} from \"./../services/interfaces\";\nimport { observable, autoinject, TaskQueue } from \"aurelia-framework\";\nimport { connectTo } from \"aurelia-store\";\nimport { AuthenticationService } from \"services/authentication-service\";\nimport { State } from \"services/state\";\nimport * as FlatPickr from \"flatpickr\";\nimport \"flatpickr/dist/flatpickr.css\";\nimport { StateManager } from \"services/state-manager\";\nimport moment from \"moment-timezone\";\nimport Swal from \"sweetalert2\";\nimport { Router } from \"aurelia-router\";\n\n@autoinject()\n@connectTo()\nexport class BookNowPage {\n _authenticationService: AuthenticationService;\n _stateManager: StateManager;\n _router: Router;\n\n createdAccount: IUser;\n appointmentTypes: IAppointmentType[];\n appointmentRequest: IAppointmentRequest = {\n dateCreated: new Date(),\n appointmentType: null,\n requestedAppointmentDates: [],\n requestedAppointmentTimesOfDay: [],\n user: null,\n };\n submittingAppointmentRequest: boolean = false;\n\n verificationEmailSent: boolean = false;\n\n previousButtonVisible: boolean = false;\n nextButtonVisible: boolean = false;\n\n currentView: string = \"userInfo\";\n\n firstName: string;\n lastName: string;\n phoneNumber: string;\n phoneError: string;\n\n taskQueue: TaskQueue;\n flatPickerObject: any;\n requestedAppointmentDates: Date[] = [];\n selectedAppointmentType: any;\n timeOfDaySelected: boolean = false;\n\n @observable emailAddress: string;\n emailError: string;\n emailVerified: boolean = false;\n\n requestError: string = \"\";\n\n timesOfDay = [\n { id: 1, name: \"Mornings\", isSelected: false },\n { id: 2, name: \"Afternoons\", isSelected: false },\n { id: 3, name: \"Evenings\", isSelected: false },\n ];\n\n constructor(\n authenticationService: AuthenticationService,\n taskQueue: TaskQueue,\n stateManager: StateManager,\n router: Router\n ) {\n this._authenticationService = authenticationService;\n this.taskQueue = taskQueue;\n this._stateManager = stateManager;\n this._router = router;\n }\n\n async attached() {\n const returnedData = await fetch(\"AppointmentTypes\", {\n headers: {\n \"Content-Type\": \"application/json\",\n Accept: \"application/json\",\n },\n });\n\n const jsonUnpackedData = await returnedData.json();\n\n this.appointmentTypes = jsonUnpackedData;\n }\n\n async confirmEmailAddress() {\n this.checkEmailAddress();\n this.checkPhoneNumber();\n\n this.verificationEmailSent = true;\n this.nextButtonVisible = true;\n\n const returnedData = await fetch(\"ShallowRegister\", {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n Accept: \"application/json\",\n },\n body: JSON.stringify({\n email: this.emailAddress,\n phone: this.phoneNumber,\n firstName: this.firstName,\n lastName: this.lastName,\n }),\n });\n\n const jsonUnpackedData = await returnedData.json();\n\n this.createdAccount = jsonUnpackedData;\n }\n\n checkPhoneNumber() {\n if (!this.phoneNumber) {\n this.phoneError = \"Please enter your phone number\";\n return;\n }\n\n var phoneRegex = /^[0-9]{10}$/;\n if (this.phoneNumber.match(phoneRegex)) {\n this.phoneError = \"\";\n } else {\n this.phoneError = \"Please enter a valid 10-digit phone number\";\n }\n\n this.phoneError = \"\";\n }\n\n checkEmailAddress() {\n if (!this.emailAddress) {\n this.emailError = \"Please enter your email address\";\n return;\n }\n\n if (\n this.emailAddress.includes(\"@\") === false ||\n this.emailAddress.includes(\".\") === false\n ) {\n this.emailError = \"Please enter a valid email address\";\n return;\n }\n this.emailError = \"\";\n }\n\n previous() {\n if (this.currentView === \"bookAppointment\") {\n this.currentView = \"userInfo\";\n this.previousButtonVisible = false;\n if (this.createdAccount) {\n this.emailAddress = this.createdAccount.email;\n this.firstName = this.createdAccount.firstName;\n this.lastName = this.createdAccount.lastName;\n this.phoneNumber = this.createdAccount.mobilePhone;\n this.nextButtonVisible = true;\n } else {\n this.nextButtonVisible = false;\n }\n }\n }\n\n next() {\n if (\n this.currentView === \"userInfo\" &&\n this.verificationEmailSent === true\n ) {\n this.currentView = \"bookAppointment\";\n this.previousButtonVisible = true;\n this.nextButtonVisible = false;\n }\n }\n\n selectAppointment(appointment) {\n this.selectedAppointmentType = null;\n\n if (this.flatPickerObject != null) {\n this.flatPickerObject.destroy();\n this.flatPickerObject = null;\n }\n\n this.appointmentTypes.forEach((a) => {\n a.isSelected = false;\n });\n\n appointment.isSelected = true;\n this.selectedAppointmentType = appointment;\n\n this.taskQueue.queueMicroTask(() => {\n this.createDatePicker();\n });\n }\n\n selectTimeOfDay(timeOfDay) {\n this.requestError = \"\";\n timeOfDay.isSelected = !timeOfDay.isSelected;\n this.timeOfDaySelected = this.timesOfDay.some((t) => t.isSelected == true);\n }\n\n async requestAppointment() {\n //Re Request the user. If the account isn't confirmed, block them.\n\n const url = `/ShallowRegister/${this.createdAccount.userId}`;\n\n const returnedUserData = await fetch(url, {\n method: \"GET\",\n headers: {\n \"Content-Type\": \"application/json\",\n Accept: \"application/json\",\n },\n });\n\n const jsonUnpackedUserData = await returnedUserData.json();\n\n if (jsonUnpackedUserData.emailConfirmed === false) {\n this.requestError =\n \"Please confirm your email address before booking an appointment.\";\n return;\n }\n\n const timeOfDay = this.timesOfDay.filter((t) => t.isSelected).length === 0;\n if (timeOfDay) {\n this.requestError = \"Please select a time of day.\";\n return;\n }\n\n this.requestError = \"\";\n\n this.appointmentRequest.user = this.createdAccount;\n this.appointmentRequest.requestedAppointmentDates =\n this.requestedAppointmentDates.map((date) => {\n return {\n date: moment(date).tz(\"America/Edmonton\", true).toDate(),\n };\n });\n\n this.appointmentRequest.appointmentType = this.selectedAppointmentType;\n this.appointmentRequest.requestedAppointmentTimesOfDay = this.timesOfDay\n .filter((t) => t.isSelected)\n .map((t) => {\n return { timeOfDay: t.name };\n });\n\n this.submittingAppointmentRequest = true;\n\n const returnedData = await fetch(\"ShallowAppointmentRequests\", {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n Accept: \"application/json\",\n },\n body: JSON.stringify(this.appointmentRequest),\n });\n\n this.submittingAppointmentRequest = false;\n\n //Swal Fire Success Message.\n Swal.fire({\n title: `Request Submitted`,\n text: `Thank you for your request. We will reach out soon to book you in.`,\n showDenyButton: false,\n showCancelButton: true,\n showConfirmButton: true,\n confirmButtonText: `Great!`,\n confirmButtonColor: \"#40684e\",\n }).then(async (result) => {\n if (result.isConfirmed) {\n this.resetPage();\n }\n });\n\n this._router.navigateToRoute(\"register\");\n }\n\n createDatePicker() {\n var htmlElement = document.getElementById(\"appointment-calendar\");\n\n if (htmlElement == null) return;\n\n if (this.flatPickerObject != null) return;\n\n this.flatPickerObject = new (FlatPickr)(htmlElement, {\n altInput: true,\n altFormat: \"F j, Y\",\n mode: \"multiple\",\n inline: true,\n minDate: \"today\",\n onChange: (newDates, dateStr, instance) => {\n this.requestedAppointmentDates = newDates;\n },\n });\n }\n resetPage() {\n this.currentView = \"userInfo\";\n this.previousButtonVisible = false;\n this.nextButtonVisible = false;\n this.verificationEmailSent = false;\n this.emailAddress = \"\";\n this.emailError = \"\";\n this.emailVerified = false;\n this.firstName = \"\";\n this.lastName = \"\";\n this.phoneNumber = \"\";\n this.phoneError = \"\";\n this.createdAccount = null;\n this.selectedAppointmentType = null;\n this.timeOfDaySelected = false;\n this.requestedAppointmentDates = [];\n this.flatPickerObject.destroy();\n this.flatPickerObject = null;\n this.appointmentRequest = {\n dateCreated: new Date(),\n appointmentType: null,\n requestedAppointmentDates: [],\n requestedAppointmentTimesOfDay: [],\n user: null,\n };\n }\n}\n","import { autoinject, observable } from \"aurelia-framework\";\nimport { connectTo } from \"aurelia-store\";\nimport { IAppointment, IUser } from \"services/interfaces\";\nimport { State } from \"services/state\";\nimport { StateManager } from \"services/state-manager\";\nimport \"flatpickr/dist/flatpickr.css\";\nimport { Router } from \"aurelia-router\";\nimport { DialogService } from \"aurelia-dialog\";\nimport { EditAppointmentDialog } from \"modals/edit-appointment\";\nimport { NewAppointmentDialog } from \"modals/new-appointment\";\nimport { NewClientDialog } from \"modals/new-client\";\n\n@connectTo()\n@autoinject()\nexport class Clients {\n _stateManager: StateManager;\n _router: Router;\n _dialogService: DialogService;\n patients: IUser[];\n displayPatients: IUser[];\n isLoadingTableData: boolean = false;\n @observable patientSearchTerm: string = \"\";\n isSearching: boolean = false;\n\n constructor(\n stateManager: StateManager,\n router: Router,\n dialogService: DialogService\n ) {\n this._stateManager = stateManager;\n this._router = router;\n this._dialogService = dialogService;\n }\n\n stateChanged(state: State) {\n this.patients = state.patients;\n this.displayPatients = this.patients;\n this.isSearching = false;\n this.isLoadingTableData = false;\n }\n\n attached() {\n this.isLoadingTableData = true;\n this._stateManager.getPatientsAsync(this.patientSearchTerm);\n }\n\n navigateToPatient(user: IUser) {\n this._router.navigateToRoute(\"patient\", { userId: user.userId });\n }\n\n patientSearchTermChanged() {\n this.isSearching = true;\n if (this._stateManager) {\n this._stateManager.getPatientsAsync(this.patientSearchTerm);\n }\n }\n\n openNewClientDialog() {\n this._dialogService\n .open({\n viewModel: NewClientDialog,\n })\n .whenClosed(async (response) => {\n if (!response.wasCancelled) {\n } else {\n }\n });\n }\n openNewAppointmentModal() {\n this._dialogService\n .open({\n viewModel: NewAppointmentDialog,\n model: {},\n })\n .whenClosed(async (response) => {\n if (!response.wasCancelled) {\n } else {\n }\n });\n }\n\n getBadgeColor(membershipString) {\n switch (membershipString) {\n case \"Founder\":\n return \"ro-orange\";\n case \"Gold\":\n return \"ro-gold\";\n case \"Silver\":\n return \"ro-green\";\n case \"Bronze\":\n return \"ro-blue\";\n default:\n return \"primary\";\n }\n }\n}\n","import { DialogService } from \"aurelia-dialog\";\nimport { autoinject } from \"aurelia-framework\";\nimport { ISubscription } from \"aurelia-router\";\nimport { connectTo } from \"aurelia-store\";\nimport { BuySubscriptionDialog } from \"modals/buy-subscription\";\nimport { NewCreditCardDialog } from \"modals/new-credit-card\";\nimport { AuthenticationService } from \"services/authentication-service\";\nimport { IUser } from \"services/interfaces\";\nimport { State } from \"services/state\";\nimport { StateManager } from \"services/state-manager\";\nimport Swal from \"sweetalert2\";\n\n@connectTo()\n@autoinject()\nexport class Dashboard {\n _dialogService: DialogService;\n _authenticationService: AuthenticationService;\n _stateManager: StateManager;\n\n stateUser: IUser;\n displayUser: IUser;\n\n savedCreditCards: any[];\n subscriptionTypes: any[];\n displaySubscriptionType: ISubscription;\n subscription: ISubscription;\n\n editingUserInfo: boolean = false;\n savingUserInfo: boolean = false;\n\n editingBillingInfo: boolean = false;\n\n showingCreditCardForm: boolean = false;\n updatingCreditCard: boolean = false;\n removingCreditCard: boolean = false;\n\n editingComfortPreferences: boolean = false;\n savingComfortPreferences: boolean = false;\n\n showingServices: boolean = true;\n\n comfortPreferences: any[] = [\n { name: \"Sound Cancelling Headphones\", isSelected: true },\n { name: \"Netflix\", isSelected: true },\n { name: \"Lemongrass Diffuser\", isSelected: false },\n { name: \"Weighted Blanket\", isSelected: true },\n { name: \"Stress Balls\", isSelected: false },\n { name: \"Warm, Heated Blanket\", isSelected: false },\n { name: \"Latte\", isSelected: true },\n { name: \"Bottle of Water\", isSelected: true },\n { name: \"Eye Mask\", isSelected: false },\n ];\n\n comfortNotes = \"Oat latte, please!\";\n\n constructor(\n authenticationService: AuthenticationService,\n stateManager: StateManager,\n dialogService: DialogService\n ) {\n this._authenticationService = authenticationService;\n this._stateManager = stateManager;\n this._dialogService = dialogService;\n }\n\n stateChanged(state: State) {\n this.stateUser = state.user;\n this.displayUser = structuredClone(state.user);\n\n // console.log(state.savedCreditCards);\n\n this.savedCreditCards = state.savedCreditCards;\n // console.log(\"SCC\", this.savedCreditCards);\n this.subscriptionTypes = state.subscriptionTypes;\n if (!this.displaySubscriptionType) {\n this.displaySubscriptionType = state.subscriptionTypes.find(\n (st) => st.name == \"Founder\"\n );\n }\n this.subscription = state.subscription;\n }\n\n async activate() {\n this._stateManager.getUserAsync();\n this._stateManager.getSavedCreditCardsAsync();\n this._stateManager.getSubscriptionTypesAsync();\n this._stateManager.getSubscriptionAsync();\n }\n async detached() {\n this.savedCreditCards = [];\n console.log(\"Dashboard detached\");\n }\n unbind() {\n console.log(\"Dashboard unbind\");\n }\n\n openNewCardModal() {\n this._dialogService\n .open({\n viewModel: NewCreditCardDialog,\n model: this.stateUser,\n lock: false,\n })\n .whenClosed(async (response) => {\n if (!response.wasCancelled) {\n this.editingBillingInfo = false;\n } else {\n }\n });\n }\n\n openPurchaseModal(subscriptionType) {\n if (this.savedCreditCards.length === 0) {\n Swal.fire({\n title: `No credit card on file`,\n text: `Please add a credit card before purchasing a subscription.`,\n showDenyButton: false,\n showCancelButton: false,\n showConfirmButton: true,\n confirmButtonText: `Got it!`,\n confirmButtonColor: \"#40684e\",\n }).then(async (result) => {});\n return;\n }\n this._dialogService\n .open({\n viewModel: BuySubscriptionDialog,\n model: subscriptionType,\n lock: false,\n })\n .whenClosed(async (response) => {\n if (!response.wasCancelled) {\n } else {\n }\n });\n }\n\n async submitCardInfo(newCreditCard) {\n const fetchUrl = `/creditcards`;\n const returnedData = await fetch(fetchUrl, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n Accept: \"application/json\",\n Authorization: `Bearer ${this._authenticationService.session.token}`,\n },\n body: JSON.stringify(newCreditCard),\n });\n\n try {\n const data = await returnedData.json();\n } catch (exception) {}\n\n await this._stateManager.getSavedCreditCardsAsync();\n }\n\n async removeCreditCard(creditCard) {\n if (\n this.savedCreditCards.length == 1 &&\n this.displayUser.activeSubscription != null\n ) {\n Swal.fire({\n title: `Card Removal Error`,\n text: `You must have at least one credit card on file while your subscription is active.`,\n showDenyButton: false,\n showCancelButton: false,\n showConfirmButton: true,\n confirmButtonText: `Got it!`,\n confirmButtonColor: \"#40684e\",\n });\n return;\n }\n Swal.fire({\n title: `Would you like to remove this credit card?`,\n text: `Removing card ending in ${creditCard.creditCardLast4Digits}`,\n showDenyButton: true,\n showCancelButton: true,\n showConfirmButton: false,\n denyButtonText: `Yes, Remove`,\n cancelButtonText: \"Go Back\",\n confirmButtonColor: \"#40684e\",\n }).then(async (result) => {\n if (result.isDenied) {\n this.removingCreditCard = true;\n await this._stateManager.removeSavedCreditCardAsync(creditCard);\n await this._stateManager.getSavedCreditCardsAsync();\n this.removingCreditCard = false;\n }\n });\n }\n\n editUserInfo() {\n this.editingUserInfo = true;\n }\n async saveUserInfo() {\n this.savingUserInfo = true;\n await this._stateManager.updateUserAsync(this.displayUser);\n this.editingUserInfo = false;\n this.savingUserInfo = false;\n }\n cancelUserSave() {\n this.displayUser = structuredClone(this.stateUser);\n this.editingUserInfo = false;\n }\n\n toggleBillingInfoEdit() {\n this.editingBillingInfo = !this.editingBillingInfo;\n }\n\n editPreferences() {\n this.editingComfortPreferences = true;\n }\n async savePreferences() {\n this.savingComfortPreferences = true;\n await this._stateManager.updateUserAsync(this.displayUser);\n this.editingComfortPreferences = false;\n this.savingComfortPreferences = false;\n }\n cancelPreferencesSave() {\n this.displayUser = structuredClone(this.stateUser);\n this.editingComfortPreferences = false;\n }\n\n async setDefaultCard(creditCard: any) {\n creditCard.isDefault = true;\n this.updatingCreditCard = true;\n await this._stateManager.updateSavedCreditCardAsync(creditCard);\n this.updatingCreditCard = false;\n await this._stateManager.getSavedCreditCardsAsync();\n }\n\n toggleComfortPreference(preference) {\n preference.isSelected = !preference.isSelected;\n }\n\n selectSubscriptionType(nameString) {\n this.displaySubscriptionType = this.subscriptionTypes.find(\n (st) => st.name == nameString\n );\n }\n}\n"],"names":[],"sourceRoot":""}