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EAAoBnB,EAAEgnK,GAAYwD,EAAYxD,IAGhD,GAAGyD,EAAS,IAAI39J,EAAS29J,EAAQtpK,EAClC,CAEA,IADGopK,GAA4BA,EAA2BhhK,GACrDnG,EAAIikK,EAAS79J,OAAQpG,IACzB2kK,EAAUV,EAASjkK,GAChBjC,EAAoBC,EAAE+oK,EAAiBpC,IAAYoC,EAAgBpC,IACrEoC,EAAgBpC,GAAS,KAE1BoC,EAAgBpC,GAAW,EAE5B,OAAO5mK,EAAoBimK,EAAEt6J,EAAO,EAGjC49J,EAAqBtmC,KAAgC,0BAAIA,KAAgC,2BAAK,GAClGsmC,EAAmBv6J,QAAQm6J,EAAqBjzI,KAAK,KAAM,IAC3DqzI,EAAmBn5J,KAAO+4J,EAAqBjzI,KAAK,KAAMqzI,EAAmBn5J,KAAK8lB,KAAKqzI,G,KClFvF,IAAIC,EAAsBxpK,EAAoBimK,OAAEt+J,EAAW,CAAC,OAAO,IAAO3H,EAAoB,SAC9FwpK,EAAsBxpK,EAAoBimK,EAAEuD,E","sources":["webpack/runtime/chunk loaded","webpack/runtime/load script","../../../../../../@embroider/ext-cjs/@ember/-internals/metal","../../../../../../@embroider/ext-cjs/@ember/-internals/views","../../../../../../@embroider/ext-cjs/@ember/application/namespace","../../../../../../@embroider/ext-cjs/@ember/application","../../../../../../@embroider/ext-cjs/@ember/array/mutable","../../../../../../@embroider/ext-cjs/@ember/array/proxy","../../../../../../@embroider/ext-cjs/@ember/array","../../../../../../@embroider/ext-cjs/@ember/component/helper","../../../../../../@embroider/ext-cjs/@ember/component/template-only","../../../../../../@embroider/ext-cjs/@ember/component","../../../../../../@embroider/ext-cjs/@ember/controller","../../../../../../@embroider/ext-cjs/@ember/debug/container-debug-adapter","../../../../../../@embroider/ext-cjs/@ember/debug/data-adapter","../../../../../../@embroider/ext-cjs/@ember/debug","../../../../../../@embroider/ext-cjs/@ember/deprecated-features","../../../../../../@embroider/ext-cjs/@ember/destroyable","../../../../../../@embroider/ext-cjs/@ember/engine/instance","../../../../../../@embroider/ext-cjs/@ember/engine","../../../../../../@embroider/ext-cjs/@ember/error","../../../../../../@embroider/ext-cjs/@ember/helper","../../../../../../@embroider/ext-cjs/@ember/instrumentation","../../../../../../@embroider/ext-cjs/@ember/modifier","../../../../../../@embroider/ext-cjs/@ember/object/compat","../../../../../../@embroider/ext-cjs/@ember/object/computed","../../../../../../@embroider/ext-cjs/@ember/object/evented","../../../../../../@embroider/ext-cjs/@ember/object/events","../../../../../../@embroider/ext-cjs/@ember/object/internals","../../../../../../@embroider/ext-cjs/@ember/object/mixin","../../../../../../@embroider/ext-cjs/@ember/object/observers","../../../../../../@embroider/ext-cjs/@ember/object/promise-proxy-mixin","../../../../../../@embroider/ext-cjs/@ember/object/proxy","../../../../../../@embroider/ext-cjs/@ember/object","../../../../../../@embroider/ext-cjs/@ember/owner","../../../../../../@embroider/ext-cjs/@ember/routing/route","../../../../../../@embroider/ext-cjs/@ember/routing/router","../../../../../../@embroider/ext-cjs/@ember/routing","../../../../../../@embroider/ext-cjs/@ember/runloop","../../../../../../@embroider/ext-cjs/@ember/service","../../../../../../@embroider/ext-cjs/@ember/template","../../../../../../@embroider/ext-cjs/@ember/template-factory","../../../../../../@embroider/ext-cjs/@ember/test","../../../../../../@embroider/ext-cjs/@ember/utils","../../../../../../@embroider/ext-cjs/@ember-data/store","../../../../../../@embroider/ext-cjs/@glimmer/runtime","../../../../../../@embroider/ext-cjs/@glimmer/tracking","../../../../../../@embroider/ext-cjs/@glimmer/validator","../../../../../../@embroider/ext-cjs/ember","../../../../../../@embroider/ext-cjs/require","../../../../../../@embroider/ext-cjs/rsvp","../../../../../node_modules/.pnpm/ember-lifeline@7.0.0_@ember+test-helpers@3.1.0_@glint+template@1.4.0_ember-source@4.12.4_@bab_gwthlkopk5nm4tapzqbuz2i52i/node_modules/ember-lifeline/-embroider-implicit-modules.js","../../../../../addons/adc-ember-utils/package/-embroider-implicit-modules.js","../rewritten-packages/ember-cli-babel.a0ec7257/node_modules/ember-cli-babel/-embroider-implicit-modules.js","../rewritten-packages/@ember/test-waiters.d540532b/node_modules/@ember/test-waiters/-embroider-implicit-modules.js","../../../../../addons/adc-ajax/package/-embroider-implicit-modules.js","../rewritten-packages/@embroider/macros.0f79a350/node_modules/@embroider/macros/-embroider-implicit-modules.js","../rewritten-packages/ember-get-config.867fe42e/node_modules/ember-get-config/-embroider-implicit-modules.js","../rewritten-packages/ember-cli-typescript.5e9d2c26/node_modules/ember-cli-typescript/-embroider-implicit-modules.js","../rewritten-packages/ember-auto-import.2ef9e3f1/node_modules/ember-auto-import/-embroider-implicit-modules.js","../rewritten-packages/ember-intl.4169306b/node_modules/ember-intl/-embroider-implicit-modules.js","../../../../../addons/adc-i18n/package/-embroider-implicit-modules.js","../../../../../node_modules/.pnpm/ember-concurrency@4.0.2_@babel+core@7.24.9_@glimmer+tracking@1.1.2_@glint+template@1.4.0_embe_qr3ft4rl5d263ubatz6ugamhza/node_modules/ember-concurrency/-embroider-implicit-modules.js","../rewritten-packages/@ember/string.4a242b9a/node_modules/@ember/string/-embroider-implicit-modules.js","../rewritten-packages/@ember-data/canary-features.5e6ad5c4/node_modules/@ember-data/canary-features/-embroider-implicit-modules.js","../rewritten-packages/@ember-data/private-build-infra.e6066094/node_modules/@ember-data/private-build-infra/-embroider-implicit-modules.js","../rewritten-packages/@glimmer/tracking.0f52e106/node_modules/@glimmer/tracking/-embroider-implicit-modules.js","../rewritten-packages/ember-compatibility-helpers.77694edc/node_modules/ember-compatibility-helpers/-embroider-implicit-modules.js","../rewritten-packages/ember-cache-primitive-polyfill.3d3ca16b/node_modules/ember-cache-primitive-polyfill/-embroider-implicit-modules.js","../rewritten-packages/ember-cached-decorator-polyfill.9e7651c3/node_modules/ember-cached-decorator-polyfill/-embroider-implicit-modules.js","../rewritten-packages/@ember-data/store.d86a0ee2/node_modules/@ember-data/store/-embroider-implicit-modules.js","../rewritten-packages/@ember-data/adapter.8c6a2bf1/node_modules/@ember-data/adapter/-embroider-implicit-modules.js","../rewritten-packages/@ember-data/model.aebb5837/node_modules/@ember-data/model/-embroider-implicit-modules.js","../rewritten-packages/@ember-data/serializer.16f69675/node_modules/@ember-data/serializer/-embroider-implicit-modules.js","../rewritten-packages/ember-modifier-manager-polyfill.c1405200/node_modules/ember-modifier-manager-polyfill/-embroider-implicit-modules.js","../rewritten-packages/@ember/render-modifiers.436a303b/node_modules/@ember/render-modifiers/-embroider-implicit-modules.js","../rewritten-packages/ember-cli-htmlbars.d435b86a/node_modules/ember-cli-htmlbars/-embroider-implicit-modules.js","../rewritten-packages/@sentry/ember.1bea4619/node_modules/@sentry/ember/-embroider-implicit-modules.js","../rewritten-packages/ember-inflector.4956360c/node_modules/ember-inflector/-embroider-implicit-modules.js","../rewritten-packages/@ember-data/debug.d79ffbc1/node_modules/@ember-data/debug/-embroider-implicit-modules.js","../rewritten-packages/@ember-data/record-data.68d786d3/node_modules/@ember-data/record-data/-embroider-implicit-modules.js","../rewritten-packages/ember-data.8959dcf6/node_modules/ember-data/-embroider-implicit-modules.js","../../../../../addons/adc-app-infrastructure/package/-embroider-implicit-modules.js","../../../../../addons/adc-add-device-addon/package/-embroider-implicit-modules.js","../../../../../addons/adc-svg-system/package/-embroider-implicit-modules.js","../../../../../node_modules/.pnpm/ember-modifier@4.2.0_@babel+core@7.24.9_ember-source@4.12.4_@babel+core@7.24.9_@glimmer+compo_nbwgqamajkvwznyg3gl6jhs6uu/node_modules/ember-modifier/-embroider-implicit-modules.js","../rewritten-packages/ember-functions-as-helper-polyfill.9e3380ae/node_modules/ember-functions-as-helper-polyfill/-embroider-implicit-modules.js","../../../../../addons/adc-template-helpers/package/-embroider-implicit-modules.js","../../../../../node_modules/.pnpm/ember-focus-trap@1.1.1_ember-source@4.12.4_@babel+core@7.24.9_@glimmer+component@1.1.2_@babel_vvuia6snx5ae3hcxo6zlbkc3w4/node_modules/ember-focus-trap/-embroider-implicit-modules.js","../rewritten-packages/@embroider/util.9c5279df/node_modules/@embroider/util/-embroider-implicit-modules.js","../rewritten-packages/ember-cli-htmlbars.0983bcda/node_modules/ember-cli-htmlbars/-embroider-implicit-modules.js","../rewritten-packages/ember-modifier.9c93520b/node_modules/ember-modifier/-embroider-implicit-modules.js","../rewritten-packages/ember-click-outside.ccf54f40/node_modules/ember-click-outside/-embroider-implicit-modules.js","../rewritten-packages/ember-event-helpers.6762ce70/node_modules/ember-event-helpers/-embroider-implicit-modules.js","../rewritten-packages/ember-cli-htmlbars.984f77d8/node_modules/ember-cli-htmlbars/-embroider-implicit-modules.js","../rewritten-packages/ember-noop.ed8e325e/node_modules/ember-noop/-embroider-implicit-modules.js","../rewritten-packages/ember-promise-helpers.93906283/node_modules/ember-promise-helpers/-embroider-implicit-modules.js","../rewritten-packages/ember-responsive.2275ab5c/node_modules/ember-responsive/-embroider-implicit-modules.js","../../../../../addons/adc-ui-components/package/-embroider-implicit-modules.js","../../../../../addons/adc-common-models/package/-embroider-implicit-modules.js","../../../../../addons/adc-drag-drop/package/-embroider-implicit-modules.js","../../../../../addons/adc-list-view/package/-embroider-implicit-modules.js","../../../../../addons/adc-login-setup-addon/package/-embroider-implicit-modules.js","../../../../../addons/adc-network-config-addon/package/-embroider-implicit-modules.js","../rewritten-packages/ember-tracked-storage-polyfill.6202876e/node_modules/ember-tracked-storage-polyfill/-embroider-implicit-modules.js","../../../../../node_modules/.pnpm/tracked-built-ins@3.3.0/node_modules/tracked-built-ins/-embroider-implicit-modules.js","../../../../../addons/adc-video-player/package/-embroider-implicit-modules.js","../../../../../node_modules/.pnpm/ember-element-helper@0.8.6_@glint+environment-ember-loose@1.4.0_@glimmer+component@1.1.2_@bab_d7nhk47pnv4yarw6ykvuvt4qiu/node_modules/ember-element-helper/-embroider-implicit-modules.js","../../../../../addons/adc-wizard/package/-embroider-implicit-modules.js","../../../../../node_modules/.pnpm/@embroider+router@2.1.8_@embroider+core@3.4.20_@glint+template@1.4.0_bufferutil@4.0.8_utf-8-validate@5.0.10_/node_modules/@embroider/router/-embroider-implicit-modules.js","../rewritten-packages/ember-cli-mirage.0a927c21/node_modules/ember-cli-mirage/-embroider-implicit-modules.js","../../../../../node_modules/.pnpm/ember-inflector@5.0.1_@babel+core@7.24.9/node_modules/ember-inflector/-embroider-implicit-modules.js","../rewritten-packages/ember-percy.d42fdb8a/node_modules/ember-percy/-embroider-implicit-modules.js","../rewritten-packages/ember-cli-test-loader.7f1e58ac/node_modules/ember-cli-test-loader/-embroider-implicit-modules.js","../../../../../node_modules/.pnpm/ember-qunit@8.1.0_@ember+test-helpers@3.1.0_@glint+template@1.4.0_ember-source@4.12.4_@babel+_mcqj2pizuqktoz5iw4v5gibhii/node_modules/ember-qunit/-embroider-implicit-modules.js","../rewritten-packages/ember-cli-inject-live-reload.ff5f4946/node_modules/ember-cli-inject-live-reload/-embroider-implicit-modules.js","../rewritten-packages/ember-cli-string-helpers.7aab1772/node_modules/ember-cli-string-helpers/-embroider-implicit-modules.js","../rewritten-packages/ember-cli-typescript.c0ad820a/node_modules/ember-cli-typescript/-embroider-implicit-modules.js","../rewritten-packages/@ember/legacy-built-in-components.d8e9bb4a/node_modules/@ember/legacy-built-in-components/-embroider-implicit-modules.js","../rewritten-packages/@ember/optional-features.740bcec9/node_modules/@ember/optional-features/-embroider-implicit-modules.js","../rewritten-packages/@ember/test-helpers.8a927c47/node_modules/@ember/test-helpers/-embroider-implicit-modules.js","../rewritten-packages/ember-cli-typescript.52605166/node_modules/ember-cli-typescript/-embroider-implicit-modules.js","../rewritten-packages/@glimmer/component.b3400e67/node_modules/@glimmer/component/-embroider-implicit-modules.js","../rewritten-packages/ember-raf-scheduler.4fc2f97f/node_modules/ember-raf-scheduler/-embroider-implicit-modules.js","../rewritten-packages/@html-next/vertical-collection.5ca33b23/node_modules/@html-next/vertical-collection/-embroider-implicit-modules.js","../rewritten-packages/ember-destroyable-polyfill.1993b1b2/node_modules/ember-destroyable-polyfill/-embroider-implicit-modules.js","../rewritten-packages/ember-a11y-testing.22684946/node_modules/ember-a11y-testing/-embroider-implicit-modules.js","../rewritten-packages/ember-cached-decorator-polyfill.21490640/node_modules/ember-cached-decorator-polyfill/-embroider-implicit-modules.js","../rewritten-packages/ember-cli-code-coverage.ccb3d45a/node_modules/ember-cli-code-coverage/-embroider-implicit-modules.js","../rewritten-packages/ember-cli-app-version.924df200/node_modules/ember-cli-app-version/-embroider-implicit-modules.js","../rewritten-packages/ember-cli-dependency-checker.e999f866/node_modules/ember-cli-dependency-checker/-embroider-implicit-modules.js","../rewritten-packages/ember-test-selectors.9197fe57/node_modules/ember-test-selectors/-embroider-implicit-modules.js","../rewritten-packages/ember-cli-deprecation-workflow.b5f3c73a/node_modules/ember-cli-deprecation-workflow/-embroider-implicit-modules.js","../rewritten-packages/ember-cli-autoprefixer.a80e964f/node_modules/ember-cli-autoprefixer/-embroider-implicit-modules.js","../rewritten-packages/broccoli-asset-rev.f96faf3d/node_modules/broccoli-asset-rev/-embroider-implicit-modules.js","../rewritten-packages/ember-cli-terser.98ef37aa/node_modules/ember-cli-terser/-embroider-implicit-modules.js","../rewritten-packages/ember-cli-sri.fef9a42d/node_modules/ember-cli-sri/-embroider-implicit-modules.js","../rewritten-packages/ember-asset-loader.df43afff/node_modules/ember-asset-loader/-embroider-implicit-modules.js","../rewritten-packages/ember-engines.97ede049/node_modules/ember-engines/-embroider-implicit-modules.js","../rewritten-packages/ember-exam.689d313a/node_modules/ember-exam/-embroider-implicit-modules.js","../rewritten-packages/ember-fn-helper-polyfill.c80bbeb8/node_modules/ember-fn-helper-polyfill/-embroider-implicit-modules.js","../rewritten-packages/ember-href-to.757a6976/node_modules/ember-href-to/-embroider-implicit-modules.js","../rewritten-packages/ember-cli-typescript.ee258c64/node_modules/ember-cli-typescript/-embroider-implicit-modules.js","../rewritten-packages/ember-load-initializers.dd92ac3a/node_modules/ember-load-initializers/-embroider-implicit-modules.js","../rewritten-packages/ember-metrics.267359ad/node_modules/ember-metrics/-embroider-implicit-modules.js","../rewritten-packages/ember-page-title.f657d8fd/node_modules/ember-page-title/-embroider-implicit-modules.js","../rewritten-packages/ember-resolver.ee2dc081/node_modules/ember-resolver/-embroider-implicit-modules.js","../rewritten-packages/ember-source.d19c1bfb/node_modules/ember-source/-embroider-implicit-modules.js","../rewritten-packages/loader.js.69170ca1/node_modules/loader.js/-embroider-implicit-modules.js","../rewritten-packages/qunit-decorators.f416fee1/node_modules/qunit-decorators/-embroider-implicit-modules.js","../rewritten-packages/qunit-dom.edbcedce/node_modules/qunit-dom/-embroider-implicit-modules.js","./-embroider-implicit-modules.js","engines/add-device-engine/components/button-sign-in-google/template.hbs/..%2Fcomponent.js-embroider-pair-component","engines/login-setup-engine/components/recognized-device-list-item/template.hbs/..%2Fcomponent.js-embroider-pair-component","../../../../../node_modules/.pnpm/moment@2.30.1/node_modules/moment/locale/ sync ^/.//.*$","src/adapters/add-device-category.ts","src/adapters/add-device-resource.js","src/adapters/paired-device.ts","src/models/add-device-category.ts","src/models/add-device-resource.ts","src/models/paired-device.ts","src/adapters/base-add-device-adapter.ts","src/enums/AjaxResponseHttpCode.ts","src/services/adc-ajax.ts","src/utils/errors.ts","src/utils/status-codes.ts","src/utils/validation-error-processing.ts","src/components/last-render-mark.hbs","src/components/last-render-mark.ts","src/models/micro-api-data-item.ts","src/models/micro-api-endpoint.ts","src/routes/mixins/is-medium-width-page.js","src/services/browser.ts","src/services/env-settings.ts","src/services/locale.ts","src/enums/BluetoothPermissionCategory.ts","src/services/native-bridge.js","src/enums/NativeBridgeFeature.ts","src/websockets/messages/base.ts","src/websockets/messages/event.ts","src/websockets/messages/geofencecrossing.ts","src/websockets/messages/monitoringevent.ts","src/websockets/messages/propertychange.ts","src/websockets/messages/statusupdate.ts","src/websockets/messages/utils.ts","src/services/websocket.ts","src/enums/Websockets.ts","src/transforms/array.ts","src/transforms/nullable-boolean.ts","src/adapters/base-adapter.ts","src/adapters/base-json-api-content-adapter.ts","src/adapters/base-micro-api-adapter.ts","src/enums/ContextSwitchType.ts","src/enums/MicroApi.ts","src/enums/NativeView.ts","src/models/base-model.ts","src/models/locale.ts","src/routes/base-route.js","src/routes/utils.ts","src/serializers/base-serializer.ts","src/serializers/common-serializer.ts","src/serializers/polymorphic-serializer.js","../src/enums/RecognizedDeviceType.ts","../src/enums/TwoFactorAuthenticationType.ts","src/services/base-engine-config.ts","src/services/base-error-reporting.ts","src/services/context-manager.ts","../src/samesite-enum.ts","../src/cookie.ts","../src/essential-cookie.ts","../src/cookie-service.ts","src/services/cookie-manager.ts","src/utils/environment.ts","src/services/performance-monitor.ts","src/services/session-activity.ts","src/utils/error.ts","src/utils/pendo.ts","src/utils/sentry.ts","src/websockets/base-handler.ts","src/adapters/automation/rules/smart-arming.ts","src/adapters/base-model-adapter.ts","src/models/automation/rules/smart-arming.ts","src/services/dom.ts","src/constants/time.ts","src/utils/a11y.ts","src/utils/array.ts","src/utils/browser-helpers.ts","src/utils/date-time.ts","src/utils/debug.ts","src/utils/ember-helpers.ts","src/utils/event-listeners.ts","src/utils/general.ts","src/utils/html-dir-helpers.ts","src/utils/math.ts","src/utils/model-helper.ts","src/utils/rsvp.ts","src/utils/runloop.ts","src/helpers/format-date-tz.ts","src/helpers/tc.ts","../src/path.ts","src/utils/polyfills.ts","src/services/adc-intl.ts","src/utils/dates.ts","src/utils/get-translation.ts","src/adapters/agreements/agreements.ts","src/adapters/arming-reminder/arming-reminder.ts","src/adapters/arming-reminder/contact-address-simple.ts","src/adapters/communication-preferences/communication-method.ts","src/adapters/communication-preferences/marketing-category.ts","src/adapters/profile/profile.js","src/adapters/push-migration-tool/push-migration-prompt.ts","src/adapters/recognized-devices/recognized-device.ts","src/adapters/settings/account-management/system-information/system-information.ts","src/adapters/settings/business-hours/day/business-hour-day.ts","src/adapters/settings/monitoring-station/contacts/emergency-contact-list-collection.ts","src/adapters/settings/monitoring-station/contacts/emergency-contact-list-entry.ts","src/adapters/settings/monitoring-station/contacts/emergency-contact-list.ts","src/adapters/settings/monitoring-station/contacts/emergency-contact-phone.ts","src/adapters/settings/monitoring-station/contacts/emergency-contact.ts","src/adapters/settings/monitoring-station/contacts/settings/call-list-setting.ts","src/adapters/settings/monitoring-station/contacts/settings/contact-passcode-setting.ts","src/adapters/settings/monitoring-station/contacts/settings/emergency-contact-setting.ts","src/adapters/settings/monitoring-station/permit.ts","src/adapters/settings/monitoring-station/premise/passcode.ts","src/adapters/settings/monitoring-station/premise/permitted-action.ts","src/adapters/settings/monitoring-station/premise/phone-collection.ts","src/adapters/settings/monitoring-station/premise/phone.ts","src/adapters/settings/monitoring-station/premise/settings/premise-passcode-setting.ts","src/adapters/settings/monitoring-station/premise/settings/premise-phone-setting.ts","src/adapters/sms/country-mobile-carrier.ts","src/adapters/two-factor-authentication/two-factor-authentication.ts","src/models/agreements/agreement.ts","src/models/arming-reminder/arming-reminder.ts","src/models/arming-reminder/contact-address-simple.ts","src/models/communication-preferences/communication-method.ts","src/models/communication-preferences/communication-preference.ts","src/models/communication-preferences/marketing-category.ts","src/models/messages/message.ts","src/models/profile/profile.ts","src/models/push-migration-tool/push-migration-prompt.ts","src/models/recognized-devices/recognized-device.ts","src/models/settings/account-management/account-information/account-information.ts","src/models/settings/account-management/account-information/dtc-billing-information/dtc-billing-information.ts","src/models/settings/account-management/account-information/marketing-communication/marketing-communication.ts","src/models/settings/account-management/country-address-resource.ts","src/models/settings/account-management/property-information.ts","src/models/settings/account-management/system-information/system-information.ts","src/models/settings/business-hours/day/business-hour-day.ts","src/models/settings/business-hours/location-business-hour.ts","src/models/settings/monitoring-station/contacts/emergency-contact-list-collection.ts","src/models/settings/monitoring-station/contacts/emergency-contact-list-entry.ts","src/models/settings/monitoring-station/contacts/emergency-contact-list.ts","src/models/settings/monitoring-station/contacts/emergency-contact-phone.ts","src/models/settings/monitoring-station/contacts/emergency-contact.ts","src/models/settings/monitoring-station/contacts/settings/call-list-setting.ts","src/models/settings/monitoring-station/contacts/settings/contact-passcode-setting.ts","src/models/settings/monitoring-station/contacts/settings/emergency-contact-setting.ts","src/models/settings/monitoring-station/permit.ts","src/models/settings/monitoring-station/premise/passcode.ts","src/models/settings/monitoring-station/premise/permitted-action.ts","src/models/settings/monitoring-station/premise/phone-collection.ts","src/models/settings/monitoring-station/premise/phone.ts","src/models/settings/monitoring-station/premise/settings/premise-passcode-setting.ts","src/models/settings/monitoring-station/premise/settings/premise-phone-setting.ts","src/models/site-appearance/site-appearance.ts","src/models/sms/country-mobile-carrier.ts","src/models/support/support-option.ts","src/models/support/support-page.ts","src/models/two-factor-authentication/two-factor-authentication.ts","src/models/video/download-format.ts","src/serializers/arming-reminder/arming-reminder.js","src/serializers/communication-preferences/communication-preference.js","src/serializers/communication-preferences/marketing-category.js","src/serializers/settings/monitoring-station/contacts/emergency-contact-list-collection.js","src/serializers/settings/monitoring-station/contacts/emergency-contact-list-entry.js","src/serializers/settings/monitoring-station/contacts/emergency-contact-list.js","src/serializers/settings/monitoring-station/contacts/emergency-contact.js","src/serializers/settings/monitoring-station/premise/phone-collection.ts","src/adapters/base-login-setup-adapter.ts","src/components/modals/recognized-devices/edit-device.hbs","src/components/modals/recognized-devices/edit-device.ts","src/components/modals/recognized-devices/forget-device.hbs","src/components/modals/recognized-devices/forget-device.ts","src/components/modals/recognized-devices/trust-device.hbs","src/components/modals/recognized-devices/trust-device.ts","src/components/settings/business-hours/edit-business-hours-timetable.hbs","src/components/settings/business-hours/edit-business-hours-timetable.ts","src/enums/AlarmPermitAuthority.ts","src/enums/ContactType.ts","src/enums/CsContactPhoneNumberType.ts","src/adapters/video/permissions/ble-wifi-config-permission.ts","src/adapters/video/wifi-config.ts","src/adapters/video/wifi-info-item.ts","src/enums/FrequencyBand.ts","src/enums/SignalStrength.ts","src/enums/WiFiEncryptionAlgorithm.ts","src/enums/WiFiEncryptionType.ts","src/models/video/permissions/ble-wifi-config-permission.ts","src/models/video/wifi-config.ts","src/models/video/wifi-info-item.ts","src/adapters/base-network-config-adapter.ts","src/enums/WirelessConnectionInstructionsType.ts","src/components/svg-symbol.hbs","src/components/svg-symbol.ts","src/components/svg-sprite-loader.hbs","src/components/svg-sprite-loader.ts","src/components/empty-container.hbs","src/components/empty-container.ts","src/helpers/and.ts","src/helpers/guid-for.ts","src/helpers/is-present.ts","src/helpers/not.ts","src/helpers/promise-hash-tracked.ts","src/helpers/resolve-model.ts","src/helpers/safe-html.ts","src/modifiers/add-delayed-css.ts","src/modifiers/auto-focus.ts","src/modifiers/did-resize.ts","src/helpers/coalesce.ts","src/helpers/eq.ts","src/helpers/math.ts","src/helpers/or.ts","src/helpers/to-boolean.ts","src/helpers/to-string.ts","src/helpers/validation-error.ts","src/components/action-buttons.hbs","src/components/action-buttons.ts","src/components/action-sheet-host.hbs","src/components/action-sheet-host.ts","src/components/async-loader.hbs","src/components/async-loader.ts","../src/templates/components/base-dropdown/wrapper.hbs","src/components/base-dropdown/wrapper.js","src/components/button/async-button-icon.hbs","src/components/button/async-button-icon.ts","src/components/button/icon.hbs","src/components/button/icon.ts","src/components/button/native.hbs","src/components/button/native.ts","src/components/button/selected.hbs","src/components/button/selected.ts","src/components/change-password.hbs","src/components/change-password.ts","src/components/checkbox-tree/all-none-selector.hbs","src/components/checkbox-tree/all-none-selector.ts","src/components/circle-icon.hbs","src/components/circle-icon.ts","src/components/date-range-picker.hbs","src/components/date-range-picker.ts","src/components/drill-through-item.hbs","src/components/drill-through-item.ts","src/components/dropdown-actions/responsive-header.hbs","src/components/dropdown-actions/responsive-header.ts","src/components/dropdown-actions/list-item.hbs","src/components/dropdown-actions/list-item.ts","src/components/dropdown-actions/items-list.hbs","src/components/dropdown-actions/items-list.ts","src/components/dropdown-actions.hbs","src/components/dropdown-actions.ts","src/components/dropdown-select/multi-select/toolbar.hbs","src/components/dropdown-select/multi-select/toolbar.ts","src/components/dropdown-select/multi-select/tree-wrapper.hbs","src/components/dropdown-select/multi-select/tree-wrapper.ts","src/components/dropdown-select/multi-select.hbs","src/components/dropdown-select/multi-select.ts","src/components/dropdown-select/single-select.hbs","src/components/dropdown-select/single-select.ts","src/components/expand-button.hbs","src/components/expand-button.ts","src/components/fieldset-header.hbs","src/components/fieldset-header.ts","src/components/form-group.hbs","src/components/form-group.ts","src/components/inline-alert/danger.hbs","src/components/inline-alert/danger.ts","src/components/inline-alert/info.hbs","src/components/inline-alert/info.ts","src/components/inline-alert/success.hbs","src/components/inline-alert/success.ts","src/components/inline-alert/warning.hbs","src/components/inline-alert/warning.ts","src/components/inline-alert.hbs","src/components/inline-alert.ts","src/components/inset-group.hbs","src/components/inset-group.ts","src/components/keyword-search.hbs","src/components/keyword-search.ts","../src/templates/components/list-row-item.hbs","src/components/list-row-item.js","src/components/modals-host.hbs","src/components/modals-host.ts","src/components/modals/base/header/modal-header.hbs","src/components/modals/base/header/modal-header.ts","src/components/modals/base/base-modal.hbs","src/components/modals/base/base-modal.ts","src/components/modals/confirmations/edit/edit-confirmations.hbs","src/components/modals/confirmations/edit/edit-confirmations.ts","src/components/modals/dialog-modals/simple/simple-dialog.hbs","src/components/modals/dialog-modals/simple/simple-dialog.ts","src/components/multiline-text-input.hbs","src/components/multiline-text-input.ts","src/components/notification-manager/app-notification.hbs","src/components/notification-manager/app-notification.ts","src/components/notification-manager.hbs","src/components/notification-manager.ts","src/components/page-view/edit.hbs","src/components/page-view/edit.ts","src/components/page-view/list.hbs","src/components/page-view/list.ts","src/components/password-input.hbs","src/components/password-input.ts","src/components/pikaday-input.hbs","src/components/pikaday-input.js","src/components/pin-input.hbs","src/components/pin-input.ts","src/components/qr-code.hbs","src/components/qr-code.ts","src/components/route-view/content/delete-model.hbs","src/components/route-view/content/delete-model.ts","src/components/route-view/content/error-content.hbs","src/components/route-view/content/error-content.ts","src/components/route-view/content/pending-content.hbs","src/components/route-view/content/pending-content.ts","src/components/route-view/edit-view.hbs","src/components/route-view/edit-view.js","src/components/web-api-promise.ts","src/components/route-view/view-container/view-content.hbs","src/components/route-view/view-container/view-content.js","src/components/route-view/view-container/header-content.hbs","src/components/route-view/view-container/header-content.ts","src/components/route-view/view-container.hbs","src/components/route-view/view-container.js","src/components/route-view/view-container/no-results-content.hbs","src/components/route-view/view-container/no-results-content.ts","src/components/schedule-picker.hbs","src/components/schedule-picker.ts","src/components/schedule-type-view.hbs","src/components/schedule-type-view.ts","src/components/schedule-view-compact.hbs","src/components/schedule-view-compact.ts","src/components/scroll-container.hbs","src/components/scroll-container.ts","src/components/search-input.hbs","src/components/search-input.ts","src/components/search-toolbar.ts","src/components/simple-binary.hbs","src/components/simple-binary.ts","src/components/simple-binary/button.hbs","src/components/simple-binary/button.ts","src/components/simple-binary/button-list.hbs","src/components/simple-binary/button-list.ts","src/components/simple-binary/label.hbs","src/components/simple-binary/label.ts","src/components/simple-list.hbs","src/components/simple-list.ts","src/components/simple-list/chevron-value.hbs","src/components/simple-list/chevron-value.ts","src/components/simple-list/details.hbs","src/components/simple-list/details.ts","src/components/simple-list/item.hbs","src/components/simple-list/item.ts","src/utils/select-item.ts","src/components/single-select.hbs","src/components/single-select.ts","src/components/smart-date-range.hbs","src/components/smart-date-range.ts","src/components/smart-date.hbs","src/components/smart-date.ts","src/components/smart-time.hbs","src/components/smart-time.ts","src/components/spinner-svg.hbs","src/components/spinner-svg.ts","src/components/status-toggle.hbs","src/components/status-toggle.ts","src/components/text-input.hbs","src/components/text-input.ts","src/components/tool-tip.js","src/components/zoom-pan-overlay.hbs","src/components/zoom-pan-overlay.ts","src/helpers/get-modal-button.ts","src/helpers/handle-binary-change.ts","src/helpers/icon-fill.ts","src/helpers/show-confirmation-modal.ts","src/initializers/setup-ui-components.js","src/services/accessibility.ts","src/components/modals/confirmations/delete/confirm-delete.hbs","src/components/modals/confirmations/delete/confirm-delete.ts","src/components/modals/confirmations/rename/rename-dialog.hbs","src/components/modals/confirmations/rename/rename-dialog.ts","src/components/modals/dialog-modals/confirm/confirmation-dialog.hbs","src/components/modals/dialog-modals/confirm/confirmation-dialog.ts","src/components/modals/dialog-modals/info/info-dialog.hbs","src/components/modals/dialog-modals/info/info-dialog.ts","src/services/modals.ts","src/services/notification-manager.ts","src/components/base-time-control.ts","src/components/base-timezone-control.ts","src/components/button/async.hbs","src/components/button/async.ts","src/components/button/simple.hbs","src/components/button/simple.ts","src/components/checkbox-tree/detailed-checkbox/content.hbs","src/components/checkbox-tree/detailed-checkbox/content.ts","src/components/checkbox-tree/detailed-checkbox/checkbox.hbs","src/components/checkbox-tree/detailed-checkbox/checkbox.ts","src/components/checkbox-tree/tree-item.hbs","src/components/checkbox-tree/tree-item.ts","src/components/checkbox-tree.hbs","src/components/checkbox-tree.ts","src/components/common/base-input.js","src/components/date-time-picker/base-pikaday.js","src/utils/generate-popper.js","src/components/error-tooltip.hbs","src/components/error-tooltip.ts","src/components/modals/base/footer/modal-footer.hbs","src/components/modals/base/footer/modal-footer.ts","src/components/modals/dialog-modals/nav/nav-dialog.hbs","src/components/modals/dialog-modals/nav/nav-dialog.ts","src/components/modals/dialog-modals/promise/promise-dialog.hbs","src/components/modals/dialog-modals/promise/promise-dialog.ts","src/components/modals/loading/loading-spinner.hbs","src/components/modals/loading/loading-spinner.ts","src/components/page-view/container.hbs","src/components/page-view/container.ts","src/components/native-bridge.hbs","src/components/native-bridge.ts","src/components/page-view.hbs","src/components/page-view.ts","src/components/popover/popover-wrapper.hbs","src/components/popover/popover-wrapper.js","src/components/popover/popover-header.hbs","src/components/popover/popover-header.ts","src/components/popover/popover-body.hbs","src/components/popover/popover-body.ts","src/components/popover/popover-footer.hbs","src/components/popover/popover-footer.ts","src/components/popover-menu.hbs","src/components/popover-menu.js","src/components/content-layer/base-content-layer-component.js","src/components/search-toolbar.js","src/components/route-view.hbs","src/components/route-view.js","src/components/route-view/content/fulfilled-content.hbs","src/components/route-view/content/fulfilled-content.ts","src/components/schedule-hour-labels.hbs","src/components/schedule-hour-labels.ts","src/components/simple-binary/list.hbs","src/components/simple-binary/list.ts","src/components/simple-list/list-item.ts","src/components/system-select/list-item.hbs","src/components/system-select/list-item.ts","src/components/system-select/items-list.hbs","src/components/system-select/items-list.ts","src/components/system-select.hbs","src/components/system-select.ts","src/components/views/base-schedule.ts","src/components/views/base-view.ts","src/components/week-view-time-block.hbs","src/components/week-view-time-block.ts","src/components/week-view.hbs","src/components/week-view.ts","src/initializers/setup-pikaday.js","src/initializers/setup-route-view.js","../src/components/search-toolbar.hbs","src/utils/action-item.js","src/utils/animations.ts","src/utils/binary-input.js","src/utils/checkbox-tree-item.js","src/utils/common.ts","src/utils/color-pickers/color.ts","src/utils/dimmer-switch.ts","src/utils/download-file.ts","src/utils/dropdown-action-item.js","src/utils/time.ts","src/vendor/qrcode.js","src/components/oesp-ptz/ui.hbs","src/components/oesp-ptz/ui.ts","src/components/oesp-ptz/overlay.hbs","src/components/oesp-ptz/overlay.ts","src/classes/state-controllers/base-state-controller.ts","src/classes/state-controllers/oesp-playback-state-controller.ts","src/classes/state-controllers/webrtc-end-to-end-state-controller.ts","src/classes/state-controllers/webrtc-proxy-playback-state-controller.ts","src/classes/webrtc/base-rtc-player.ts","src/enums/WebrtcPreloadingSupport.ts","src/classes/webrtc/end-to-end-rtc-player.ts","src/classes/webrtc/webrtc-stream-recorder.ts","src/components/base-player.ts","src/components/mjpeg-player.hbs","src/components/mjpeg-player.ts","src/components/live-video-player.hbs","src/components/live-video-player.ts","src/components/openeye-player.hbs","src/components/openeye-player.ts","src/utils/minijanus.ts","src/classes/webrtc/proxy-rtc-player.ts","src/components/webrtc-player.hbs","src/components/webrtc-player.ts","src/constants/disconnection-reasons.ts","src/constants/generic.ts","src/constants/player-messages.ts","src/constants/wavefront.ts","src/enums/DataUsageModeEnum.ts","src/enums/WebrtcAudioUsage.ts","src/utils/fisheye-utils.ts","src/utils/osd-utils.ts","src/utils/stream-load-times.ts","src/utils/wavefront.ts","src/utils/webrtc-utils.ts","src/services/local-state.ts","src/services/placeholder.ts","../../../../../modules/adc-a11y/build/dark-mode-listener.js","webpack/bootstrap","webpack/runtime/compat get default export","webpack/runtime/define property getters","webpack/runtime/ensure chunk","webpack/runtime/get javascript chunk filename","webpack/runtime/get mini-css chunk filename","webpack/runtime/global","webpack/runtime/hasOwnProperty shorthand","webpack/runtime/make namespace object","webpack/runtime/node module decorator","webpack/runtime/publicPath","webpack/runtime/css loading","webpack/runtime/jsonp chunk loading","webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var inProgress = {};\nvar dataWebpackPrefix = \"customer-site:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","\nconst m = window.require(\"@ember/-internals/metal\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/-internals/views\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/application/namespace\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/application\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/array/mutable\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/array/proxy\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/array\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/component/helper\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/component/template-only\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/component\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/controller\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/debug/container-debug-adapter\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/debug/data-adapter\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/debug\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/deprecated-features\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/destroyable\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/engine/instance\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/engine\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/error\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/helper\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/instrumentation\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/modifier\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/object/compat\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/object/computed\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/object/evented\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/object/events\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/object/internals\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/object/mixin\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/object/observers\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/object/promise-proxy-mixin\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/object/proxy\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/object\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/owner\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/routing/route\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/routing/router\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/routing\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/runloop\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/service\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/template\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/template-factory\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/test\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/utils\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember-data/store\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@glimmer/runtime\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@glimmer/tracking\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@glimmer/validator\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"ember\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.requirejs;\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"rsvp\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-lifeline/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"@adc/ember-utils/-embroider-implicit-modules.js\";\nimport \"@ember/test-waiters/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"@embroider/macros/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"@embroider/macros/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"ember-cli-typescript/-embroider-implicit-modules.js\";\nimport \"ember-auto-import/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"@adc/ember-utils/-embroider-implicit-modules.js\";\nimport \"ember-get-config/-embroider-implicit-modules.js\";\nimport \"ember-intl/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"ember-cli-typescript/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"ember-cli-typescript/-embroider-implicit-modules.js\";\nimport \"@ember-data/canary-features/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"ember-compatibility-helpers/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"@glimmer/tracking/-embroider-implicit-modules.js\";\nimport \"ember-cache-primitive-polyfill/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"@embroider/macros/-embroider-implicit-modules.js\";\nimport \"ember-cli-typescript/-embroider-implicit-modules.js\";\nimport \"ember-auto-import/-embroider-implicit-modules.js\";\nimport \"@ember/string/-embroider-implicit-modules.js\";\nimport \"@ember-data/canary-features/-embroider-implicit-modules.js\";\nimport \"@glimmer/tracking/-embroider-implicit-modules.js\";\nimport \"ember-cached-decorator-polyfill/-embroider-implicit-modules.js\";\nimport \"@ember-data/private-build-infra/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nd(\"@ember-data/store/index\", function(){ return i(\"@ember-data/store/index.js\");});\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"ember-cli-typescript/-embroider-implicit-modules.js\";\nimport \"ember-auto-import/-embroider-implicit-modules.js\";\nimport \"@ember/string/-embroider-implicit-modules.js\";\nimport \"@ember-data/private-build-infra/-embroider-implicit-modules.js\";\nimport \"@ember-data/store/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nd(\"@ember-data/store/index\", function(){ return i(\"@ember-data/store/index.js\");});\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"@embroider/macros/-embroider-implicit-modules.js\";\nimport \"ember-cli-typescript/-embroider-implicit-modules.js\";\nimport \"ember-auto-import/-embroider-implicit-modules.js\";\nimport \"@ember/string/-embroider-implicit-modules.js\";\nimport \"@ember-data/canary-features/-embroider-implicit-modules.js\";\nimport \"ember-compatibility-helpers/-embroider-implicit-modules.js\";\nimport \"ember-cached-decorator-polyfill/-embroider-implicit-modules.js\";\nimport \"@ember-data/private-build-infra/-embroider-implicit-modules.js\";\nimport \"@ember-data/store/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nd(\"@ember-data/store/index\", function(){ return i(\"@ember-data/store/index.js\");});\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"ember-cli-typescript/-embroider-implicit-modules.js\";\nimport \"ember-auto-import/-embroider-implicit-modules.js\";\nimport \"@ember-data/private-build-infra/-embroider-implicit-modules.js\";\nimport \"@ember-data/store/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"ember-compatibility-helpers/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"@embroider/macros/-embroider-implicit-modules.js\";\nimport \"ember-modifier-manager-polyfill/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"@embroider/macros/-embroider-implicit-modules.js\";\nimport \"ember-cli-typescript/-embroider-implicit-modules.js\";\nimport \"ember-auto-import/-embroider-implicit-modules.js\";\nimport \"ember-cli-htmlbars/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"ember-cli-typescript/-embroider-implicit-modules.js\";\nimport \"ember-auto-import/-embroider-implicit-modules.js\";\nimport \"@ember/string/-embroider-implicit-modules.js\";\nimport \"@ember-data/private-build-infra/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nd(\"@ember-data/store/index\", function(){ return i(\"@ember-data/store/index.js\");});\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"ember-cli-typescript/-embroider-implicit-modules.js\";\nimport \"ember-auto-import/-embroider-implicit-modules.js\";\nimport \"@ember-data/canary-features/-embroider-implicit-modules.js\";\nimport \"@ember-data/private-build-infra/-embroider-implicit-modules.js\";\nimport \"@ember-data/store/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nd(\"@ember-data/store/index\", function(){ return i(\"@ember-data/store/index.js\");});\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"@embroider/macros/-embroider-implicit-modules.js\";\nimport \"ember-cli-typescript/-embroider-implicit-modules.js\";\nimport \"ember-auto-import/-embroider-implicit-modules.js\";\nimport \"@ember/string/-embroider-implicit-modules.js\";\nimport \"@ember-data/adapter/-embroider-implicit-modules.js\";\nimport \"@ember-data/model/-embroider-implicit-modules.js\";\nimport \"@ember-data/serializer/-embroider-implicit-modules.js\";\nimport \"@ember-data/debug/-embroider-implicit-modules.js\";\nimport \"@ember-data/private-build-infra/-embroider-implicit-modules.js\";\nimport \"@ember-data/record-data/-embroider-implicit-modules.js\";\nimport \"@ember-data/store/-embroider-implicit-modules.js\";\nimport \"ember-inflector/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"@adc/ajax/-embroider-implicit-modules.js\";\nimport \"@adc/ember-utils/-embroider-implicit-modules.js\";\nimport \"@adc/i18n/-embroider-implicit-modules.js\";\nimport \"ember-concurrency/-embroider-implicit-modules.js\";\nimport \"ember-lifeline/-embroider-implicit-modules.js\";\nimport \"@ember-data/adapter/-embroider-implicit-modules.js\";\nimport \"@ember-data/model/-embroider-implicit-modules.js\";\nimport \"@ember-data/serializer/-embroider-implicit-modules.js\";\nimport \"@ember/render-modifiers/-embroider-implicit-modules.js\";\nimport \"@sentry/ember/-embroider-implicit-modules.js\";\nimport \"ember-inflector/-embroider-implicit-modules.js\";\nimport \"ember-data/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"@adc/ajax/-embroider-implicit-modules.js\";\nimport \"@adc/app-infrastructure/-embroider-implicit-modules.js\";\nimport \"@adc/ember-utils/-embroider-implicit-modules.js\";\nimport \"ember-concurrency/-embroider-implicit-modules.js\";\nimport \"@adc/app-infrastructure/-embroider-implicit-modules.js\";\nimport \"@ember-data/model/-embroider-implicit-modules.js\";\nimport \"ember-data/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-concurrency/-embroider-implicit-modules.js\";\nimport \"ember-get-config/-embroider-implicit-modules.js\";\nimport \"@ember/render-modifiers/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"ember-cli-typescript/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-lifeline/-embroider-implicit-modules.js\";\nimport \"ember-modifier/-embroider-implicit-modules.js\";\nimport \"ember-functions-as-helper-polyfill/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"@embroider/macros/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"ember-cli-typescript/-embroider-implicit-modules.js\";\nimport \"ember-compatibility-helpers/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"ember-cli-htmlbars/-embroider-implicit-modules.js\";\nimport \"ember-modifier/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"ember-cli-htmlbars/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"ember-cli-htmlbars/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"@adc/ajax/-embroider-implicit-modules.js\";\nimport \"@adc/app-infrastructure/-embroider-implicit-modules.js\";\nimport \"@adc/ember-utils/-embroider-implicit-modules.js\";\nimport \"@adc/i18n/-embroider-implicit-modules.js\";\nimport \"@adc/svg-system/-embroider-implicit-modules.js\";\nimport \"@adc/template-helpers/-embroider-implicit-modules.js\";\nimport \"ember-concurrency/-embroider-implicit-modules.js\";\nimport \"ember-focus-trap/-embroider-implicit-modules.js\";\nimport \"ember-lifeline/-embroider-implicit-modules.js\";\nimport \"ember-modifier/-embroider-implicit-modules.js\";\nimport \"@adc/app-infrastructure/-embroider-implicit-modules.js\";\nimport \"@adc/svg-system/-embroider-implicit-modules.js\";\nimport \"@adc/template-helpers/-embroider-implicit-modules.js\";\nimport \"@ember/render-modifiers/-embroider-implicit-modules.js\";\nimport \"ember-data/-embroider-implicit-modules.js\";\nimport \"ember-functions-as-helper-polyfill/-embroider-implicit-modules.js\";\nimport \"@embroider/util/-embroider-implicit-modules.js\";\nimport \"ember-click-outside/-embroider-implicit-modules.js\";\nimport \"ember-event-helpers/-embroider-implicit-modules.js\";\nimport \"ember-noop/-embroider-implicit-modules.js\";\nimport \"ember-promise-helpers/-embroider-implicit-modules.js\";\nimport \"ember-responsive/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"@adc/ajax/-embroider-implicit-modules.js\";\nimport \"@adc/app-infrastructure/-embroider-implicit-modules.js\";\nimport \"@adc/i18n/-embroider-implicit-modules.js\";\nimport \"@adc/ui-components/-embroider-implicit-modules.js\";\nimport \"@ember-data/adapter/-embroider-implicit-modules.js\";\nimport \"@ember-data/model/-embroider-implicit-modules.js\";\nimport \"@ember-data/serializer/-embroider-implicit-modules.js\";\nimport \"ember-inflector/-embroider-implicit-modules.js\";\nimport \"ember-data/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"@ember/render-modifiers/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-concurrency/-embroider-implicit-modules.js\";\nimport \"ember-lifeline/-embroider-implicit-modules.js\";\nimport \"@ember/render-modifiers/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"@adc/ajax/-embroider-implicit-modules.js\";\nimport \"@adc/app-infrastructure/-embroider-implicit-modules.js\";\nimport \"@adc/common-models/-embroider-implicit-modules.js\";\nimport \"@adc/ember-utils/-embroider-implicit-modules.js\";\nimport \"@adc/i18n/-embroider-implicit-modules.js\";\nimport \"@adc/ui-components/-embroider-implicit-modules.js\";\nimport \"ember-concurrency/-embroider-implicit-modules.js\";\nimport \"@adc/app-infrastructure/-embroider-implicit-modules.js\";\nimport \"@adc/ui-components/-embroider-implicit-modules.js\";\nimport \"@ember-data/model/-embroider-implicit-modules.js\";\nimport \"@ember-data/serializer/-embroider-implicit-modules.js\";\nimport \"ember-data/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"@adc/ajax/-embroider-implicit-modules.js\";\nimport \"@adc/app-infrastructure/-embroider-implicit-modules.js\";\nimport \"@adc/common-models/-embroider-implicit-modules.js\";\nimport \"@adc/i18n/-embroider-implicit-modules.js\";\nimport \"@adc/ui-components/-embroider-implicit-modules.js\";\nimport \"@ember-data/model/-embroider-implicit-modules.js\";\nimport \"@ember-data/serializer/-embroider-implicit-modules.js\";\nimport \"ember-data/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"ember-cli-htmlbars/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-tracked-storage-polyfill/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"@adc/ajax/-embroider-implicit-modules.js\";\nimport \"@adc/app-infrastructure/-embroider-implicit-modules.js\";\nimport \"@adc/ember-utils/-embroider-implicit-modules.js\";\nimport \"@adc/i18n/-embroider-implicit-modules.js\";\nimport \"@adc/svg-system/-embroider-implicit-modules.js\";\nimport \"@adc/template-helpers/-embroider-implicit-modules.js\";\nimport \"@adc/ui-components/-embroider-implicit-modules.js\";\nimport \"ember-concurrency/-embroider-implicit-modules.js\";\nimport \"ember-lifeline/-embroider-implicit-modules.js\";\nimport \"tracked-built-ins/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"@embroider/util/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"@adc/ajax/-embroider-implicit-modules.js\";\nimport \"@adc/app-infrastructure/-embroider-implicit-modules.js\";\nimport \"@adc/ember-utils/-embroider-implicit-modules.js\";\nimport \"@adc/i18n/-embroider-implicit-modules.js\";\nimport \"@adc/svg-system/-embroider-implicit-modules.js\";\nimport \"@adc/template-helpers/-embroider-implicit-modules.js\";\nimport \"@adc/ui-components/-embroider-implicit-modules.js\";\nimport \"ember-concurrency/-embroider-implicit-modules.js\";\nimport \"ember-element-helper/-embroider-implicit-modules.js\";\nimport \"ember-lifeline/-embroider-implicit-modules.js\";\nimport \"ember-modifier/-embroider-implicit-modules.js\";\nimport \"@adc/app-infrastructure/-embroider-implicit-modules.js\";\nimport \"@adc/svg-system/-embroider-implicit-modules.js\";\nimport \"@adc/template-helpers/-embroider-implicit-modules.js\";\nimport \"@adc/ui-components/-embroider-implicit-modules.js\";\nimport \"@embroider/macros/-embroider-implicit-modules.js\";\nimport \"@ember/render-modifiers/-embroider-implicit-modules.js\";\nimport \"@embroider/util/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"@ember/test-waiters/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"@embroider/macros/-embroider-implicit-modules.js\";\nimport \"ember-get-config/-embroider-implicit-modules.js\";\nimport \"ember-auto-import/-embroider-implicit-modules.js\";\nimport \"ember-inflector/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"@embroider/macros/-embroider-implicit-modules.js\";\nimport \"ember-cli-test-loader/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"@embroider/macros/-embroider-implicit-modules.js\";\nimport \"ember-cli-htmlbars/-embroider-implicit-modules.js\";\nimport \"ember-cli-typescript/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"@ember/test-waiters/-embroider-implicit-modules.js\";\nimport \"@embroider/macros/-embroider-implicit-modules.js\";\nimport \"ember-auto-import/-embroider-implicit-modules.js\";\nimport \"ember-cli-htmlbars/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"ember-compatibility-helpers/-embroider-implicit-modules.js\";\nimport \"ember-cli-typescript/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"ember-cli-htmlbars/-embroider-implicit-modules.js\";\nimport \"ember-raf-scheduler/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"ember-compatibility-helpers/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"@ember/test-waiters/-embroider-implicit-modules.js\";\nimport \"ember-auto-import/-embroider-implicit-modules.js\";\nimport \"ember-cli-typescript/-embroider-implicit-modules.js\";\nimport \"ember-destroyable-polyfill/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"@embroider/macros/-embroider-implicit-modules.js\";\nimport \"@glimmer/tracking/-embroider-implicit-modules.js\";\nimport \"ember-cache-primitive-polyfill/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-htmlbars/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-htmlbars/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"@embroider/macros/-embroider-implicit-modules.js\";\nimport \"ember-asset-loader/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"@embroider/macros/-embroider-implicit-modules.js\";\nimport \"ember-auto-import/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"ember-cli-typescript/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"ember-cli-typescript/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"ember-auto-import/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nd(\"@adc/add-device-engine/routes\", function(){ return i(\"@adc/add-device-engine/routes.js\");});\nd(\"@adc/customer-wizard-engine/routes\", function(){ return i(\"@adc/customer-wizard-engine/routes.js\");});\nd(\"@adc/login-setup-engine/routes\", function(){ return i(\"@adc/login-setup-engine/routes.js\");});\nd(\"@adc/network-config-engine/routes\", function(){ return i(\"@adc/network-config-engine/routes.js\");});\nimport \"@adc/add-device-addon/-embroider-implicit-modules.js\";\nimport \"@adc/ajax/-embroider-implicit-modules.js\";\nimport \"@adc/app-infrastructure/-embroider-implicit-modules.js\";\nimport \"@adc/common-models/-embroider-implicit-modules.js\";\nimport \"@adc/drag-drop/-embroider-implicit-modules.js\";\nimport \"@adc/ember-utils/-embroider-implicit-modules.js\";\nimport \"@adc/i18n/-embroider-implicit-modules.js\";\nimport \"@adc/list-view/-embroider-implicit-modules.js\";\nimport \"@adc/login-setup-addon/-embroider-implicit-modules.js\";\nimport \"@adc/network-config-addon/-embroider-implicit-modules.js\";\nimport \"@adc/svg-system/-embroider-implicit-modules.js\";\nimport \"@adc/template-helpers/-embroider-implicit-modules.js\";\nimport \"@adc/ui-components/-embroider-implicit-modules.js\";\nimport \"@adc/video-player/-embroider-implicit-modules.js\";\nimport \"@adc/wizard/-embroider-implicit-modules.js\";\nimport \"@embroider/router/-embroider-implicit-modules.js\";\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"ember-cli-mirage/-embroider-implicit-modules.js\";\nimport \"ember-concurrency/-embroider-implicit-modules.js\";\nimport \"ember-focus-trap/-embroider-implicit-modules.js\";\nimport \"ember-inflector/-embroider-implicit-modules.js\";\nimport \"ember-lifeline/-embroider-implicit-modules.js\";\nimport \"ember-modifier/-embroider-implicit-modules.js\";\nimport \"ember-percy/-embroider-implicit-modules.js\";\nimport \"ember-qunit/-embroider-implicit-modules.js\";\nimport \"tracked-built-ins/-embroider-implicit-modules.js\";\nimport \"ember-cli-inject-live-reload/-embroider-implicit-modules.js\";\nimport \"ember-auto-import/-embroider-implicit-modules.js\";\nimport \"@ember/string/-embroider-implicit-modules.js\";\nimport \"@glimmer/tracking/-embroider-implicit-modules.js\";\nimport \"@ember/render-modifiers/-embroider-implicit-modules.js\";\nimport \"ember-cli-htmlbars/-embroider-implicit-modules.js\";\nimport \"@sentry/ember/-embroider-implicit-modules.js\";\nimport \"ember-data/-embroider-implicit-modules.js\";\nimport \"ember-click-outside/-embroider-implicit-modules.js\";\nimport \"ember-event-helpers/-embroider-implicit-modules.js\";\nimport \"ember-noop/-embroider-implicit-modules.js\";\nimport \"ember-promise-helpers/-embroider-implicit-modules.js\";\nimport \"ember-responsive/-embroider-implicit-modules.js\";\nimport \"ember-cli-string-helpers/-embroider-implicit-modules.js\";\nimport \"@ember/legacy-built-in-components/-embroider-implicit-modules.js\";\nimport \"@ember/optional-features/-embroider-implicit-modules.js\";\nimport \"@ember/test-helpers/-embroider-implicit-modules.js\";\nimport \"@glimmer/component/-embroider-implicit-modules.js\";\nimport \"@html-next/vertical-collection/-embroider-implicit-modules.js\";\nimport \"ember-a11y-testing/-embroider-implicit-modules.js\";\nimport \"ember-cached-decorator-polyfill/-embroider-implicit-modules.js\";\nimport \"ember-cli-code-coverage/-embroider-implicit-modules.js\";\nimport \"ember-cli-app-version/-embroider-implicit-modules.js\";\nimport \"ember-cli-dependency-checker/-embroider-implicit-modules.js\";\nimport \"ember-test-selectors/-embroider-implicit-modules.js\";\nimport \"ember-cli-deprecation-workflow/-embroider-implicit-modules.js\";\nimport \"ember-cli-autoprefixer/-embroider-implicit-modules.js\";\nimport \"broccoli-asset-rev/-embroider-implicit-modules.js\";\nimport \"ember-cli-terser/-embroider-implicit-modules.js\";\nimport \"ember-cli-sri/-embroider-implicit-modules.js\";\nimport \"ember-engines/-embroider-implicit-modules.js\";\nimport \"ember-exam/-embroider-implicit-modules.js\";\nimport \"ember-fn-helper-polyfill/-embroider-implicit-modules.js\";\nimport \"ember-href-to/-embroider-implicit-modules.js\";\nimport \"ember-load-initializers/-embroider-implicit-modules.js\";\nimport \"ember-metrics/-embroider-implicit-modules.js\";\nimport \"ember-page-title/-embroider-implicit-modules.js\";\nimport \"ember-resolver/-embroider-implicit-modules.js\";\nimport \"ember-source/-embroider-implicit-modules.js\";\nimport \"loader.js/-embroider-implicit-modules.js\";\nimport \"qunit-decorators/-embroider-implicit-modules.js\";\nimport \"qunit-dom/-embroider-implicit-modules.js\";\n","\nimport { setComponentTemplate } from \"@ember/component\";\nimport template from \"../template.hbs\";\nimport { deprecate } from \"@ember/debug\";\n\n\ndeprecate(\"Components with separately resolved templates are deprecated. Migrate to either co-located js/ts + hbs files or to gjs/gts. Tried to lookup 'template'.\",\n false, {\n id: 'component-template-resolving',\n url: 'https://deprecations.emberjs.com/id/component-template-resolving',\n until: '6.0.0',\n for: 'ember-source',\n since: {\n available: '5.10.0',\n enabled: '5.10.0',\n },\n }\n);\n\nimport component from \"../component.js\";\nexport default setComponentTemplate(template, component);\n","\nimport { setComponentTemplate } from \"@ember/component\";\nimport template from \"../template.hbs\";\nimport { deprecate } from \"@ember/debug\";\n\n\ndeprecate(\"Components with separately resolved templates are deprecated. Migrate to either co-located js/ts + hbs files or to gjs/gts. Tried to lookup 'template'.\",\n false, {\n id: 'component-template-resolving',\n url: 'https://deprecations.emberjs.com/id/component-template-resolving',\n until: '6.0.0',\n for: 'ember-source',\n since: {\n available: '5.10.0',\n enabled: '5.10.0',\n },\n }\n);\n\nimport component from \"../component.js\";\nexport default setComponentTemplate(template, component);\n","var map = {\n\t\"./af\": 43585,\n\t\"./af.js\": 43585,\n\t\"./ar\": 1101,\n\t\"./ar-dz\": 80072,\n\t\"./ar-dz.js\": 80072,\n\t\"./ar-kw\": 41260,\n\t\"./ar-kw.js\": 41260,\n\t\"./ar-ly\": 11289,\n\t\"./ar-ly.js\": 11289,\n\t\"./ar-ma\": 1608,\n\t\"./ar-ma.js\": 1608,\n\t\"./ar-ps\": 32491,\n\t\"./ar-ps.js\": 32491,\n\t\"./ar-sa\": 42306,\n\t\"./ar-sa.js\": 42306,\n\t\"./ar-tn\": 28628,\n\t\"./ar-tn.js\": 28628,\n\t\"./ar.js\": 1101,\n\t\"./az\": 89861,\n\t\"./az.js\": 89861,\n\t\"./be\": 58279,\n\t\"./be.js\": 58279,\n\t\"./bg\": 1769,\n\t\"./bg.js\": 1769,\n\t\"./bm\": 79951,\n\t\"./bm.js\": 79951,\n\t\"./bn\": 66114,\n\t\"./bn-bd\": 87589,\n\t\"./bn-bd.js\": 87589,\n\t\"./bn.js\": 66114,\n\t\"./bo\": 34001,\n\t\"./bo.js\": 34001,\n\t\"./br\": 52662,\n\t\"./br.js\": 52662,\n\t\"./bs\": 44725,\n\t\"./bs.js\": 44725,\n\t\"./ca\": 82130,\n\t\"./ca.js\": 82130,\n\t\"./cs\": 66424,\n\t\"./cs.js\": 66424,\n\t\"./cv\": 56299,\n\t\"./cv.js\": 56299,\n\t\"./cy\": 61658,\n\t\"./cy.js\": 61658,\n\t\"./da\": 7945,\n\t\"./da.js\": 7945,\n\t\"./de\": 47205,\n\t\"./de-at\": 6215,\n\t\"./de-at.js\": 6215,\n\t\"./de-ch\": 48865,\n\t\"./de-ch.js\": 48865,\n\t\"./de.js\": 47205,\n\t\"./dv\": 86732,\n\t\"./dv.js\": 86732,\n\t\"./el\": 68027,\n\t\"./el.js\": 68027,\n\t\"./en-au\": 84456,\n\t\"./en-au.js\": 84456,\n\t\"./en-ca\": 63586,\n\t\"./en-ca.js\": 63586,\n\t\"./en-gb\": 34171,\n\t\"./en-gb.js\": 34171,\n\t\"./en-ie\": 35968,\n\t\"./en-ie.js\": 35968,\n\t\"./en-il\": 31551,\n\t\"./en-il.js\": 31551,\n\t\"./en-in\": 92385,\n\t\"./en-in.js\": 92385,\n\t\"./en-nz\": 84674,\n\t\"./en-nz.js\": 84674,\n\t\"./en-sg\": 68916,\n\t\"./en-sg.js\": 68916,\n\t\"./eo\": 48190,\n\t\"./eo.js\": 48190,\n\t\"./es\": 42170,\n\t\"./es-do\": 68222,\n\t\"./es-do.js\": 68222,\n\t\"./es-mx\": 30602,\n\t\"./es-mx.js\": 30602,\n\t\"./es-us\": 77767,\n\t\"./es-us.js\": 77767,\n\t\"./es.js\": 42170,\n\t\"./et\": 3331,\n\t\"./et.js\": 3331,\n\t\"./eu\": 64220,\n\t\"./eu.js\": 64220,\n\t\"./fa\": 53567,\n\t\"./fa.js\": 53567,\n\t\"./fi\": 64055,\n\t\"./fi.js\": 64055,\n\t\"./fil\": 61491,\n\t\"./fil.js\": 61491,\n\t\"./fo\": 98133,\n\t\"./fo.js\": 98133,\n\t\"./fr\": 35874,\n\t\"./fr-ca\": 39563,\n\t\"./fr-ca.js\": 39563,\n\t\"./fr-ch\": 7548,\n\t\"./fr-ch.js\": 7548,\n\t\"./fr.js\": 35874,\n\t\"./fy\": 52263,\n\t\"./fy.js\": 52263,\n\t\"./ga\": 10766,\n\t\"./ga.js\": 10766,\n\t\"./gd\": 19025,\n\t\"./gd.js\": 19025,\n\t\"./gl\": 70441,\n\t\"./gl.js\": 70441,\n\t\"./gom-deva\": 2292,\n\t\"./gom-deva.js\": 2292,\n\t\"./gom-latn\": 1471,\n\t\"./gom-latn.js\": 1471,\n\t\"./gu\": 69874,\n\t\"./gu.js\": 69874,\n\t\"./he\": 72793,\n\t\"./he.js\": 72793,\n\t\"./hi\": 73277,\n\t\"./hi.js\": 73277,\n\t\"./hr\": 44700,\n\t\"./hr.js\": 44700,\n\t\"./hu\": 19337,\n\t\"./hu.js\": 19337,\n\t\"./hy-am\": 21856,\n\t\"./hy-am.js\": 21856,\n\t\"./id\": 21863,\n\t\"./id.js\": 21863,\n\t\"./is\": 58774,\n\t\"./is.js\": 58774,\n\t\"./it\": 17303,\n\t\"./it-ch\": 71563,\n\t\"./it-ch.js\": 71563,\n\t\"./it.js\": 17303,\n\t\"./ja\": 67051,\n\t\"./ja.js\": 67051,\n\t\"./jv\": 27570,\n\t\"./jv.js\": 27570,\n\t\"./ka\": 18426,\n\t\"./ka.js\": 18426,\n\t\"./kk\": 23192,\n\t\"./kk.js\": 23192,\n\t\"./km\": 89614,\n\t\"./km.js\": 89614,\n\t\"./kn\": 96715,\n\t\"./kn.js\": 96715,\n\t\"./ko\": 91044,\n\t\"./ko.js\": 91044,\n\t\"./ku\": 39830,\n\t\"./ku-kmr\": 67917,\n\t\"./ku-kmr.js\": 67917,\n\t\"./ku.js\": 39830,\n\t\"./ky\": 22546,\n\t\"./ky.js\": 22546,\n\t\"./lb\": 15160,\n\t\"./lb.js\": 15160,\n\t\"./lo\": 30435,\n\t\"./lo.js\": 30435,\n\t\"./lt\": 44158,\n\t\"./lt.js\": 44158,\n\t\"./lv\": 55956,\n\t\"./lv.js\": 55956,\n\t\"./me\": 86356,\n\t\"./me.js\": 86356,\n\t\"./mi\": 72992,\n\t\"./mi.js\": 72992,\n\t\"./mk\": 71210,\n\t\"./mk.js\": 71210,\n\t\"./ml\": 74899,\n\t\"./ml.js\": 74899,\n\t\"./mn\": 89845,\n\t\"./mn.js\": 89845,\n\t\"./mr\": 36593,\n\t\"./mr.js\": 36593,\n\t\"./ms\": 34530,\n\t\"./ms-my\": 43233,\n\t\"./ms-my.js\": 43233,\n\t\"./ms.js\": 34530,\n\t\"./mt\": 77963,\n\t\"./mt.js\": 77963,\n\t\"./my\": 3472,\n\t\"./my.js\": 3472,\n\t\"./nb\": 5306,\n\t\"./nb.js\": 5306,\n\t\"./ne\": 85699,\n\t\"./ne.js\": 85699,\n\t\"./nl\": 98071,\n\t\"./nl-be\": 79088,\n\t\"./nl-be.js\": 79088,\n\t\"./nl.js\": 98071,\n\t\"./nn\": 18510,\n\t\"./nn.js\": 18510,\n\t\"./oc-lnc\": 20410,\n\t\"./oc-lnc.js\": 20410,\n\t\"./pa-in\": 27297,\n\t\"./pa-in.js\": 27297,\n\t\"./pl\": 618,\n\t\"./pl.js\": 618,\n\t\"./pt\": 15010,\n\t\"./pt-br\": 93431,\n\t\"./pt-br.js\": 93431,\n\t\"./pt.js\": 15010,\n\t\"./ro\": 44865,\n\t\"./ro.js\": 44865,\n\t\"./ru\": 48039,\n\t\"./ru.js\": 48039,\n\t\"./sd\": 13709,\n\t\"./sd.js\": 13709,\n\t\"./se\": 53006,\n\t\"./se.js\": 53006,\n\t\"./si\": 16506,\n\t\"./si.js\": 16506,\n\t\"./sk\": 79728,\n\t\"./sk.js\": 79728,\n\t\"./sl\": 68293,\n\t\"./sl.js\": 68293,\n\t\"./sq\": 14738,\n\t\"./sq.js\": 14738,\n\t\"./sr\": 21535,\n\t\"./sr-cyrl\": 13826,\n\t\"./sr-cyrl.js\": 13826,\n\t\"./sr.js\": 21535,\n\t\"./ss\": 86920,\n\t\"./ss.js\": 86920,\n\t\"./sv\": 42363,\n\t\"./sv.js\": 42363,\n\t\"./sw\": 78068,\n\t\"./sw.js\": 78068,\n\t\"./ta\": 49721,\n\t\"./ta.js\": 49721,\n\t\"./te\": 72469,\n\t\"./te.js\": 72469,\n\t\"./tet\": 4533,\n\t\"./tet.js\": 4533,\n\t\"./tg\": 56979,\n\t\"./tg.js\": 56979,\n\t\"./th\": 21106,\n\t\"./th.js\": 21106,\n\t\"./tk\": 27903,\n\t\"./tk.js\": 27903,\n\t\"./tl-ph\": 11607,\n\t\"./tl-ph.js\": 11607,\n\t\"./tlh\": 40388,\n\t\"./tlh.js\": 40388,\n\t\"./tr\": 2448,\n\t\"./tr.js\": 2448,\n\t\"./tzl\": 10046,\n\t\"./tzl.js\": 10046,\n\t\"./tzm\": 19965,\n\t\"./tzm-latn\": 34503,\n\t\"./tzm-latn.js\": 34503,\n\t\"./tzm.js\": 19965,\n\t\"./ug-cn\": 6006,\n\t\"./ug-cn.js\": 6006,\n\t\"./uk\": 74946,\n\t\"./uk.js\": 74946,\n\t\"./ur\": 24409,\n\t\"./ur.js\": 24409,\n\t\"./uz\": 98113,\n\t\"./uz-latn\": 57299,\n\t\"./uz-latn.js\": 57299,\n\t\"./uz.js\": 98113,\n\t\"./vi\": 50183,\n\t\"./vi.js\": 50183,\n\t\"./x-pseudo\": 46123,\n\t\"./x-pseudo.js\": 46123,\n\t\"./yo\": 48658,\n\t\"./yo.js\": 48658,\n\t\"./zh-cn\": 40563,\n\t\"./zh-cn.js\": 40563,\n\t\"./zh-hk\": 42120,\n\t\"./zh-hk.js\": 42120,\n\t\"./zh-mo\": 88413,\n\t\"./zh-mo.js\": 88413,\n\t\"./zh-tw\": 33864,\n\t\"./zh-tw.js\": 33864\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 37098;","import BaseAddDeviceAdapter from './base-add-device-adapter.ts';\n\nexport default class AddDeviceCategoryAdapter extends BaseAddDeviceAdapter {}\n","import BaseAddDeviceAdapter from './base-add-device-adapter.ts';\n\n/**\n * @classdesc\n * Sets up properties for communicating with the backend for add device resources\n */\nexport default class AddDeviceResourceAdapter extends BaseAddDeviceAdapter {\n // TODO: Convert this to TS\n /** @override */\n urlForDeleteRecord(id, modelname, { adapterOptions: { categoryId } }) {\n const queryString = categoryId ? `?categoryId=${categoryId}` : '';\n return super.urlForDeleteRecord(...arguments) + queryString;\n }\n}\n","import BaseAddDeviceAdapter from './base-add-device-adapter.ts';\n\nexport default class PairedDeviceAdapter extends BaseAddDeviceAdapter {}\n","import { hasMany, attr } from '@ember-data/model';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\n\nimport type AddDeviceResourceModel from './add-device-resource.ts';\n\n/**\n * @classdesc\n * Add Device Category class that represents a category option.\n */\nexport default class AddDeviceCategoryModel extends BaseModel {\n /**\n * The name of the category.\n *\n */\n @attr('string', { defaultValue: '' })\n declare name: string;\n\n /**\n * The name of the icon that is displayed for the category.\n *\n */\n @attr('string', { defaultValue: '' })\n declare icon: string;\n\n /**\n * The devices included in the category.\n *\n */\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/require-async-inverse-relationship\n @hasMany('add-device-resource', { inverse: 'category' })\n declare devices: AddDeviceResourceModel[];\n\n /**\n * Is this a video category?\n *\n */\n @attr('boolean', { defaultValue: false })\n declare isVideoCategory: boolean;\n\n /**\n * Is this a doorbell camera category?\n *\n */\n @attr('boolean', { defaultValue: false })\n declare isDoorbellCameraCategory: boolean;\n\n /**\n * Is this the Google Nest category?\n *\n */\n @attr('boolean', { defaultValue: false })\n declare isGoogleNestCategory: boolean;\n\n /**\n * Is this the Matter category?\n *\n */\n @attr('boolean', { defaultValue: false })\n declare isMatterCategory: boolean;\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'add-device-category': AddDeviceCategoryModel;\n }\n}\n","import { belongsTo, attr } from '@ember-data/model';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\n\nimport type AddDeviceCategoryModel from './add-device-category.ts';\n\n/**\n * @classdesc\n * Add Device Resource class that represents a device resource for Add Device.\n */\nexport default class AddDeviceResourceModel extends BaseModel {\n /**\n * Category for the device resource.\n *\n */\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/require-async-inverse-relationship\n @belongsTo('add-device-category', { inverse: 'devices' })\n declare category: AddDeviceCategoryModel;\n\n /**\n * The name that will be displayed.\n *\n */\n @attr('string', { defaultValue: '' })\n declare displayName: string;\n\n /**\n * The detailed name of the resource.\n *\n */\n @attr('string', { defaultValue: '' })\n declare longName: string;\n\n /**\n * The manufacturer of the device.\n *\n */\n @attr('string', { defaultValue: '' })\n declare manufacturerName: string;\n\n /**\n * The image for the device.\n *\n */\n @attr('string', { defaultValue: '' })\n declare image: string;\n\n /**\n * Alternative image for the device.\n *\n */\n @attr('string', { defaultValue: '' })\n declare additionalImage: string;\n\n /**\n * The corresponding installation wizard.\n *\n */\n @attr('number')\n declare installWizardEnum: number;\n\n /**\n * The corresponding energy account ID for the device if it exists.\n *\n */\n @attr('number')\n declare energyAccountId: number;\n\n /**\n * The wizard reference type for a device.\n */\n @attr('string', { defaultValue: '' })\n declare referenceType: string;\n\n /**\n * The wizard reference value for a device.\n */\n @attr('string', { defaultValue: '' })\n declare referenceValue: string;\n\n /**\n * Is the device a repeater?\n *\n */\n @attr('boolean', { defaultValue: false })\n declare isRepeaterDevice: boolean;\n\n /**\n * An example description (aka name) for this type of device.\n *\n */\n @attr('string', { defaultValue: '' })\n declare exampleDescription: string;\n\n /**\n * Is the device added to the account via OAuth?\n *\n */\n @attr('boolean', { defaultValue: false })\n declare isOAuthDevice: boolean;\n\n /**\n * Is the device added to the account via z-wave?\n *\n */\n @attr('boolean', { defaultValue: false })\n declare isZWaveDevice: boolean;\n\n /**\n * Does the device need to be named during the Add Device flow?\n *\n */\n @attr('boolean', { defaultValue: true })\n declare isNamingNeeded: boolean;\n\n /**\n * Should the device be mounted before the installation wizard is started?\n *\n */\n @attr('boolean', { defaultValue: false })\n declare isMountedBeforeWizard: boolean;\n\n /**\n * Should starting an installation wizard be disabled?\n *\n */\n @attr('boolean', { defaultValue: false })\n declare disableStartInstallationWizard: boolean;\n\n /**\n * Is the device able to be unlinked from its account by a user?\n *\n */\n @attr('boolean', { defaultValue: false })\n declare canBeUnlinkedByUser: boolean;\n\n /**\n * Is the device added to the account via RF?\n *\n */\n @attr('boolean', { defaultValue: false })\n declare isRFDevice: boolean;\n\n /**\n * True if we are using an installer-led specific wizard for this device.\n *\n */\n @attr('boolean', { defaultValue: false })\n declare isUsingInstallerLedFlow: boolean;\n\n /**\n * True if we are using a DIY installer flow.\n *\n */\n @attr('boolean', { defaultValue: false })\n declare isUsingDiyFlow: boolean;\n\n /**\n * The wizard reference value for a device for an install-led flow.\n *\n */\n @attr('string', { defaultValue: '' })\n declare repReferenceValue: string;\n\n /**\n * The message to display once the installation is completed for the device.\n *\n */\n @attr('string', { defaultValue: '' })\n declare completeInstallationMessage: string;\n\n /**\n * Should the device be near it's install location before the installation wizard is started?\n *\n */\n @attr('boolean', { defaultValue: false })\n declare isNearInstallLocationBeforeWizard: boolean;\n\n /**\n * Is this a matter device?\n *\n */\n @attr('boolean', { defaultValue: false })\n declare isMatterDevice: boolean;\n\n /**\n * The url for linking devices, if one exists.\n */\n @attr('string', { allowNull: true, defaultValue: null })\n declare linkDevicesUrl: string | null;\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'add-device-resource': AddDeviceResourceModel;\n }\n}\n","import { attr } from '@ember-data/model';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\n\n/**\n * @classdesc\n * Pre-Paired Device class that represents a device that has been partially set up before the user receives it.\n */\nexport default class PairedDeviceModel extends BaseModel {\n /**\n * The name of the device.\n */\n @attr('string', { defaultValue: '' })\n declare deviceName: string;\n\n /**\n * Bool representing if this device has completed the setup.\n */\n @attr('boolean', { defaultValue: false })\n declare setUpCompleted: boolean;\n\n /**\n * Dl Code for the device.\n */\n @attr('string', { defaultValue: '' })\n declare dlCode: string;\n\n /**\n * AddDeviceCategoryEnum for the device.\n */\n @attr('number', { defaultValue: -1 })\n declare categoryEnum: number;\n\n /**\n * AddDeviceResourceEnum for the device.\n */\n @attr('number', { defaultValue: -1 })\n declare resourceEnum: number;\n\n /**\n * The enum of prepaired device.\n */\n @attr('number', { defaultValue: 0 })\n declare deviceTypeQolsys: number;\n\n /**\n * The type of prepaired device.\n */\n @attr('string', { defaultValue: 'Default' })\n declare deviceTypeSubDescription: string;\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'paired-device': PairedDeviceModel;\n }\n}\n","import { inject as service } from '@ember/service';\nimport BaseAdapter from '@adc/app-infrastructure/adapters/base-adapter';\n\nimport type EnvSettingsService from '@adc/app-infrastructure/services/env-settings';\n\n/**\n * @classdesc\n * Sets up properties for communicating with the backend.\n */\nexport default class BaseAddDeviceAdapter extends BaseAdapter {\n @service declare envSettings: EnvSettingsService;\n\n /** @override */\n get namespace() {\n // Namespace sets the paths for communication with backend.\n const { addDeviceEngine = {} } = this.envSettings.getEnvironment() || {},\n { engineApiPrefix } = addDeviceEngine;\n\n return `${engineApiPrefix}/api/engines`;\n }\n}\n","/**\n * This enum is a TS representation of NJsonApi.Common.AjaxResponseHttpCodeEnum and it must be manually kept in sync w/ the C# version.\n *\n * @module\n */\n\nexport const NotLoggedIn = 401;\n\nexport const InvalidAntiForgeryToken = 403;\n\nexport const NoPermissionForEmber = 406;\n\nexport const TwoFactorAuthenticationRequired = 409;\n\nexport const ValidationError = 422;\n\nexport const ProcessingError = 423;\n\nexport const ServerProcessingError = 500;\n\nexport const ServiceUnavailable = 503;\n","import { getCookie } from '@adc/ember-utils/utils/browser-helpers';\nimport Error from '@ember/error';\nimport { computed } from '@ember/object';\nimport { getOwner } from '@ember/owner';\nimport Service from '@ember/service';\nimport isBefore from 'date-fns/isBefore';\nimport { TwoFactorAuthenticationRequired } from '../enums/AjaxResponseHttpCode.ts';\nimport { getErrorWithStatusCode, isNoNetworkError } from '../utils/errors.ts';\n\nimport type { InternalOwner } from '@ember/-internals/owner';\n\n// #region Content Constants\n\nconst APPLICATION_JSON = 'application/json;charset=utf-8';\nconst APPLICATION_JSONAPI = 'application/vnd.api+json;charset=utf-8';\nconst APPLICATION_FORM = 'application/x-www-form-urlencoded;charset=utf-8';\n\n// #endregion\n\n// #region httpVerbs\n\n/**\n * POST httpVerb enum for using in requests.\n *\n * @memberof AdcAjaxService\n */\nexport const POST = 'POST';\n\n/**\n * POST httpVerb enum for using in requests.\n *\n * @memberof AdcAjaxService\n */\nexport const PUT = 'PUT';\n\n/**\n * GET httpVerb enum for using in requests.\n *\n * @memberof AdcAjaxService\n */\nexport const GET = 'GET';\n\n// #endregion\n\ninterface AppConfig {\n apiBaseUrl: string;\n antiForgeryCookieName: string;\n requestJsonApiResponse: boolean;\n}\n\ninterface AjaxHeaders {\n 'content-type': string;\n accept?: string;\n ajaxrequestuniquekey?: string;\n cookie?: string;\n}\n\ninterface ApiErrorSource {\n pointer: string;\n}\n\ninterface MicroApiData {\n included: MicroApiEndpointData[];\n data: {\n attributes: {\n microApiTokenVer: string;\n };\n }[];\n}\n\ninterface MicroApiEndpointData {\n id: number;\n attributes: {\n baseApiEndpoint: string;\n encodedJwtToken: string;\n jwtExpirationDate: string;\n };\n}\n\nexport interface ApiError {\n code: number;\n detail: string;\n source: ApiErrorSource;\n}\n\ninterface SerializableObject {\n serialize(options?: { includeId?: boolean | undefined }): object;\n}\n\nexport type AjaxRequestBody = BodyInit | Record | SerializableObject | unknown[] | null;\n\n// #region data and content types\n\n/**\n * Type enum for JSONAPI request.\n *\n * @memberof AdcAjaxService\n */\nexport const JSONAPI_REQUEST: Partial = {\n headers: {\n 'content-type': APPLICATION_JSON,\n accept: APPLICATION_JSONAPI\n }\n};\n\n/**\n * Type enum for JSON_REQUEST request.\n *\n * @memberof AdcAjaxService\n */\nexport const JSON_REQUEST: Partial = {\n headers: {\n 'content-type': APPLICATION_JSON,\n accept: APPLICATION_JSON\n }\n};\n\n/**\n * Type enum for URL_ENCODED request.\n *\n * @memberof AdcAjaxService\n */\nexport const URL_ENCODED: Partial = {\n headers: {\n 'content-type': APPLICATION_FORM,\n accept: APPLICATION_JSON\n }\n};\n\n/**\n * Type enum for a plain text request.\n *\n * @memberof AdcAjaxService\n */\nexport const CONTENT_TYPE_PLAIN: Partial = {\n headers: {\n 'content-type': 'text/plain;charset=utf-8'\n }\n};\n\n// #endregion\n\nclass EmberAjaxError extends Error {\n code: number;\n type: string;\n name: string;\n errors: ApiError[];\n\n constructor(message: string, code: number, type: string, errors: ApiError[]) {\n super(message);\n\n this.code = code;\n this.type = this.name = type;\n this.errors = errors;\n }\n}\n\nexport type TEmberAjaxError = InstanceType;\n\n/**\n * Gets data from fetch response.\n */\nasync function parseResponse(response: Response, method: string): Promise> {\n let data = await response.text();\n\n try {\n data = JSON.parse(data);\n } catch (error) {\n if (!(error instanceof SyntaxError)) {\n throw error;\n }\n\n const { ok, status } = response;\n\n if (ok && (status === 204 || status === 205 || method === 'HEAD')) {\n return { data: null };\n }\n }\n\n return data as unknown as Record;\n}\n\n/**\n * @classdesc\n * The Ajax service configured to work with the CustomerDotNet/WebApi project.\n */\nexport default class AdcAjaxService extends Service {\n /**\n * Cached list of MicroApi endpoints and the token version\n */\n microApiData?: MicroApiData;\n\n /**\n * The Ember app environment config.\n */\n get environmentConfig(): AppConfig {\n const owner = getOwner(this);\n // We provide a default value because unit tests do not have a config.\n return (owner ? (owner as InternalOwner).resolveRegistration('config:environment') : {}) as AppConfig;\n }\n\n // #region Ajax Config Params\n\n /**\n * Defines headers for all requests. This includes the authenticationHeaders\n */\n get defaultHeaders(): Partial {\n // The cookie name set in the env config.\n const envAntiForgeryCookieName = this.environmentConfig.antiForgeryCookieName,\n /* The cookie name we will actually use. If the env cookie was set to an empty string, we do not include an anti forgery cookie */\n antiForgeryCookieName = envAntiForgeryCookieName === '' ? undefined : envAntiForgeryCookieName || 'afg';\n\n // Default accept headers to fix issues with older Firefox. We explicitly set the content-type to match the `fetch` default to avoid any ambiguity or breaking changes\n // when we leave fetch for the next great thing.\n const headers = {\n ...{ accept: '*/*' },\n ...CONTENT_TYPE_PLAIN.headers\n } as AjaxHeaders;\n\n // Add anti-forgery token if it was defined in application settings.\n if (antiForgeryCookieName) {\n // We use all lower case since this is how it ends up hitting the server anyway.\n headers.ajaxrequestuniquekey = getCookie(antiForgeryCookieName);\n }\n\n return headers;\n }\n\n /**\n * The base URL that should be included on all calls to apiRequest.\n */\n @computed('environmentConfig.apiBaseUrl')\n get apiBaseUrl(): string {\n // Get the host App's config environment variable.\n return this.environmentConfig.apiBaseUrl ?? '';\n }\n\n // #endregion\n\n /**\n * Send request to a WebApi endpoint.\n */\n async apiRequest(\n apiEndpoint: string,\n optionsOrType: RequestInit = {},\n data?: AjaxRequestBody,\n httpVerb = GET,\n useJsonApiFormat?: boolean\n ): Promise {\n // We use a copy of the options passed in. Otherwise we would be mutating the original options, which could be one of our enums like JSON_REQUEST.\n const newOptions = { ...optionsOrType };\n\n // The following block's logic is a little hard to digest. Our intended outcome is:\n // If a user has no ENV setting and does not provide useJsonApiFormat, it will default to true and use JSON API.\n // If a user has an ENV setting and does not provide useJsonApiFormat, it will use the ENV setting.\n // If a user provides a useJsonApiFormat value, it will use that no matter what the ENV setting is.\n const envUseJsonApi = this.environmentConfig.requestJsonApiResponse ?? true;\n\n // These are the headers that this method sets.\n const defaultHeaders = {\n ...this.defaultHeaders,\n ...(useJsonApiFormat ?? envUseJsonApi ? JSONAPI_REQUEST.headers : {})\n };\n\n // We then merge defaultHeaders in with any headers provided by the caller.\n newOptions.headers = {\n ...defaultHeaders,\n ...newOptions.headers\n };\n\n // Allow cookie to pass through to handle auth to API\n if (defaultHeaders.ajaxrequestuniquekey) {\n newOptions.credentials = 'same-origin';\n }\n\n // If apiEndpoint has a leading '/', we don't want to add our own.\n const joinChar = apiEndpoint[0] === '/' ? '' : '/';\n\n return this.request(`${this.apiBaseUrl}${joinChar}${apiEndpoint}`, newOptions, data, httpVerb, true);\n }\n\n /**\n * Send a request to a MicroApi endpoint given the endpoint enum & path.\n */\n async microApiRequest(\n microApiEnum: number,\n apiEndpoint: string,\n data?: AjaxRequestBody,\n httpVerb = GET\n ): Promise {\n if (!this.microApiData) {\n const microApiDataRaw = await this.apiRequest('microApiDataItems', {}, null, GET, true);\n this.microApiData = microApiDataRaw;\n }\n\n const endpointData = this.microApiData?.included.find(\n (item: MicroApiEndpointData) => Number(item.id) === microApiEnum\n )?.attributes;\n\n if (!endpointData) {\n throw 'Micro API endpoint not found';\n }\n\n const now = new Date();\n // We want to give 60 seconds of padding before expiration time to not hit any race conditions\n if (isBefore(new Date(endpointData.jwtExpirationDate), now.setSeconds(now.getSeconds() - 60))) {\n this.microApiData = undefined;\n return await this.microApiRequest(microApiEnum, apiEndpoint, data, httpVerb);\n }\n\n const { pathname, search } = window.location,\n headers = {\n Accept: 'application/vnd.api+json',\n Authorization: `Bearer ${endpointData.encodedJwtToken}`,\n SourcePath: pathname,\n SourceQueryParams: search,\n TokenVersion: this.microApiData?.data?.[0]?.attributes?.microApiTokenVer ?? '',\n 'content-type': 'application/vnd.api+json'\n };\n\n // Avoid automatic route prefixing\n const subEndpoint = `${endpointData.baseApiEndpoint}/${apiEndpoint}`,\n finalEndpoint = subEndpoint.startsWith('https://') ? subEndpoint : `https://${subEndpoint}`;\n\n return this.request(finalEndpoint, { headers }, data, httpVerb, false);\n }\n\n /**\n * Serializes the passed request body.\n */\n private serializeBody(data: AjaxRequestBody): BodyInit | null | undefined {\n if (data === null || typeof data !== 'object') {\n return data;\n }\n\n if ('serialize' in data && typeof data.serialize === 'function') {\n data = data.serialize();\n }\n\n return JSON.stringify(data);\n }\n\n /**\n * Ajax Request method to be used when not accessing api resources.\n */\n async request(\n url: string,\n optionsOrType: RequestInit = {},\n data?: AjaxRequestBody,\n httpVerb = GET,\n includeHeaders = true\n ): Promise {\n try {\n // We use a copy of the options passed in. Otherwise we would be mutating the original options, which could be one of our enums like JSON_REQUEST.\n const newOptions = { ...optionsOrType },\n defaultHeaders = includeHeaders ? this.defaultHeaders : {};\n\n // Build the options. Note that user provided options take priority over others.\n newOptions.headers = {\n ...defaultHeaders,\n ...newOptions.headers\n };\n\n // if the user passed in the method in the option object, we give that priority over the function parameter.\n newOptions.method = newOptions.method || httpVerb;\n\n if (data) {\n newOptions.body = this.serializeBody(data);\n }\n\n const response = await fetch(url, newOptions);\n\n const { status } = response,\n { method } = newOptions,\n result = await parseResponse(response, method);\n\n // If everything was ok or 2FA is required, just resolve the result and return.\n if (response.ok || status == TwoFactorAuthenticationRequired) {\n return result as unknown as T;\n }\n\n // Things went bad, create an Error and throw it.\n const errorData = getErrorWithStatusCode(status);\n\n if (!errorData) {\n throw new Error(`Unhandled HTTP Error Code: ${status}`);\n }\n\n const { code, message, type, title } = errorData;\n throw new EmberAjaxError(\n `${message || title}, url: ${decodeURIComponent(url)}, method: ${method}`,\n code,\n type,\n (result.errors || []) as ApiError[]\n );\n } catch (e) {\n // We don't want to throw error to sentry if it's just no network connection issue.\n if (!this.processNoNetworkError()) {\n throw e;\n }\n\n return {\n data: null\n } as unknown as T;\n }\n }\n\n /**\n * Simple request method which attempts to nullify most of our customization on the request method.\n */\n async simpleRequest(\n url: string,\n optionsOrType?: RequestInit,\n data?: AjaxRequestBody,\n httpVerb?: string\n ): Promise {\n return this.request(url, optionsOrType, data, httpVerb, false);\n }\n\n /**\n * This logic is extracted for testing purposes. To my knowledge, there is currently not a way to mock a network error.\n */\n processNoNetworkError(): boolean {\n if (isNoNetworkError()) {\n this.noInternetConnection();\n return true;\n }\n\n return false;\n }\n\n /**\n * This method is used to indicate when there is a network connection error. It can be overridden in your project to handle this error however you wish.\n */\n noInternetConnection(): unknown | void {\n return null;\n }\n}\n","import {\n NotLoggedIn,\n InvalidAntiForgeryToken,\n ValidationError,\n ProcessingError,\n NoPermissionForEmber,\n ServerProcessingError,\n ServiceUnavailable\n} from '../enums/AjaxResponseHttpCode.ts';\n\nconst NotFound = 404;\n\nexport class AjaxError {\n code: number;\n type: string;\n name: string;\n title: string;\n message: string;\n shouldBeLogged: boolean;\n isUnauthorizedAccess: boolean;\n isValidationError: boolean;\n isProcessingError: boolean;\n isIncorrectSite: boolean;\n\n constructor(\n code: number,\n type: string,\n title = '',\n message = '',\n shouldBeLogged = false,\n isUnauthorizedAccess = false,\n isValidationError = false,\n isProcessingError = false,\n isIncorrectSite = false\n ) {\n this.code = code;\n this.type = type;\n // Name is the same as type, but some places use type and some use name. This simplifies logic in those instances.\n this.name = type;\n this.title = title;\n this.message = message;\n this.shouldBeLogged = shouldBeLogged;\n this.isUnauthorizedAccess = isUnauthorizedAccess;\n this.isValidationError = isValidationError;\n this.isProcessingError = isProcessingError;\n this.isIncorrectSite = isIncorrectSite;\n }\n}\n\nfunction getErrorDetails(): Array<\n [number, string, string?, string?, boolean?, boolean?, boolean?, boolean?, boolean?]\n> {\n return [\n [NotLoggedIn, 'NotLoggedIn', 'User was not logged in.', 'Unauthorized access', false, true],\n [\n InvalidAntiForgeryToken,\n 'InvalidAntiForgeryToken',\n 'Attempted access with invalid token.',\n 'Unauthorized access',\n false,\n true\n ],\n [NotFound, 'NotFound', 'WebApi Controller endpoint not found.', undefined, true],\n [ValidationError, 'ValidationError', undefined, 'Validation error', false, false, true],\n [ProcessingError, 'ProcessingError', undefined, 'Processing error', false, false, false, true],\n [\n NoPermissionForEmber,\n 'NoPermissionForEmber',\n 'No access for site version.',\n 'Incorrect access',\n false,\n false,\n false,\n false,\n true\n ],\n [ServerProcessingError, 'ServerProcessingError', undefined, 'Server processing error'],\n [ServiceUnavailable, 'ServiceUnvailable', undefined, 'Service Unvailable']\n ];\n}\n\n/**\n * Returns error with the specified error status code.\n */\nexport function getErrorWithStatusCode(statusCode: number): AjaxError | undefined {\n const args = getErrorDetails().find((args) => args[0] === statusCode);\n return args && new AjaxError(...args);\n}\n\n/**\n * Returns error status code for specified error type.\n */\nfunction getStatusCodeForErrorType(errorType: string): number | undefined {\n return getErrorDetails().find((args) => args[1] === errorType)?.[0];\n}\n\n/**\n * Should an error with the specified status code not be logged by client side error logging?\n */\nexport function shouldNotLogErrorWithStatusCode(statusCode: number): boolean {\n const error = getErrorWithStatusCode(statusCode);\n\n // Error should not be logged if the error is in the collection and it is marked as not to be logged.\n return !!(error && !error.shouldBeLogged);\n}\n\n/**\n * Should an error with the specified errorType not be logged by client side error logging?\n */\nexport function shouldNotLogErrorWithType(errorType: string): boolean {\n return shouldNotLogErrorWithStatusCode(getStatusCodeForErrorType(errorType) as number);\n}\n\n/**\n * Checks to see if Error is a no network error\n */\nexport function isNoNetworkError(): boolean {\n return !window.navigator.onLine;\n}\n","import {\n NotLoggedIn,\n InvalidAntiForgeryToken,\n ProcessingError,\n ServerProcessingError,\n NoPermissionForEmber,\n ValidationError\n} from '../enums/AjaxResponseHttpCode.ts';\n\ntype ErrorResponse = {\n errors: string | { status: string }[];\n};\n\n/**\n * Ensures that status code is a number.\n */\nfunction getStatusCodeAsNumber(status: string | number): number {\n return parseInt(status as string, 10);\n}\n\n/**\n * Gets error status code that represents a processing error.\n */\nexport function getProcessingErrorStatusCode(): number {\n return ProcessingError;\n}\n\n/**\n * Gets error status code that represents a server processing error.\n */\nexport function getServerProcessingErrorStatusCode(): number {\n return ServerProcessingError;\n}\n\n/**\n * Is the passed in http status code a processing error status?\n */\nexport function isValidationErrorStatusCode(status: string | number): boolean {\n return getStatusCodeAsNumber(status) === ValidationError;\n}\n\n/**\n * Is the passed in http status code a processing error status?\n */\nexport function isProcessingErrorStatusCode(status: string | number): boolean {\n return getStatusCodeAsNumber(status) === ProcessingError;\n}\n\n/**\n * Is the passed in http status code a server processing error status?\n */\nexport function isServerProcessingErrorStatusCode(status: string | number): boolean {\n return getStatusCodeAsNumber(status) === ServerProcessingError;\n}\n\n/**\n * Is the status code an error due to invalid session?\n *\n * @note This would be either the user is not logged in, or the anti forgery token was invalid.\n */\nexport function isInvalidSessionStatusCode(status: string | number): boolean {\n status = getStatusCodeAsNumber(status);\n\n return status === NotLoggedIn || status === InvalidAntiForgeryToken;\n}\n\n/**\n * Is the status code due to logged in context not having permissions for the application version?\n *\n * @note This one will probably go away.\n */\nexport function isNoPermissionsForApplicationStatusCode(status: string | number): boolean {\n return getStatusCodeAsNumber(status) === NoPermissionForEmber;\n}\n\n/**\n * Are any of the errors due to invalid session state?\n */\nexport function isInvalidSessionError(response: ErrorResponse): boolean {\n const errors = response?.errors ?? [];\n return (\n errors instanceof Array && errors.length > 0 && errors.some(({ status }) => isInvalidSessionStatusCode(status))\n );\n}\n\n/**\n * Are all of the adapter errors Processing errors?\n */\nexport function isAdapterErrorProcessingError(response: ErrorResponse): boolean {\n const errors = response?.errors ?? [];\n\n if (errors instanceof String || typeof errors === 'string') {\n return String(errors).toLowerCase() == 'processing error';\n } else if (errors instanceof Array) {\n return errors.length > 0 && errors.every(({ status }) => isProcessingErrorStatusCode(status));\n }\n return false;\n}\n","import { A } from '@ember/array';\nimport { set } from '@ember/object';\nimport { ValidationError } from '../enums/AjaxResponseHttpCode.ts';\n\ntype ErrorHost = {\n [key: string]: any;\n validationErrorKeys?: string[];\n};\n\ntype ValidationErrorsType = {\n [key: string]: string;\n};\n\ninterface ApiError {\n code: number;\n detail: string;\n source: {\n pointer: string;\n };\n}\n\ninterface ErrorsDictionary {\n errors: ApiError[];\n}\n\n/**\n * Utility helper module for validation errors.\n *\n * @module\n */\n\n/**\n * Adds a validation errors from a given response to the appropriate property on the calling class.\n *\n * @example\n * The server might add a validation error: `response.AddValidationError(\"twoFactorCodeInput\", \"An error occurred.\");`\n *\n * This code will set the error message (e.g. \"An error occurred.\") in a property named \"twoFactorCodeInput\".\n *\n * The template of the initial-setup step should bind the error message to the appropriate input:\n * ``\n */\nexport function processValidationErrorsFromResponse(\n this: ErrorHost,\n response: { errors: ApiError[] | ErrorsDictionary }\n): void {\n processValidationErrors.call(this, getValidationErrorsFromResponse(response));\n}\n\n/**\n * Adds a validation errors from a given object to the appropriate property on the calling class.\n *\n * @example\n * The server might add a validation error: `response.AddValidationError(\"twoFactorCodeInput\", \"An error occurred.\")`;\n *\n * This code will set the error message (e.g. \"An error occurred.\") in a property named \"twoFactorCodeInput\".\n *\n * The template of the initial-setup step should bind the error message to the appropriate input:\n * ``\n */\nexport function processValidationErrors(this: ErrorHost, validationErrors: ValidationErrorsType): void {\n Object.keys(validationErrors).forEach((key) => processError.call(this, key, validationErrors[key]));\n}\n\n/**\n * Extracts validation errors from a given response and returns them as a single object.\n */\nexport function getValidationErrorsFromResponse(response: {\n errors: ApiError[] | ErrorsDictionary | undefined;\n}): ValidationErrorsType {\n const { errors } = response,\n responseErrors = ((errors)?.errors ?? errors) as ApiError[];\n\n if (!responseErrors) {\n return {};\n }\n\n return A(A(responseErrors).compact() as ApiError[])\n .filterBy('code', ValidationError)\n .reduce((map: ValidationErrorsType, error: ApiError) => {\n const key = getValidationErrorKey(error);\n if (key) {\n map[key] = error.detail;\n }\n\n return map;\n }, {});\n}\n\n/**\n * Clears any validation error messages that may exist.\n */\nexport function clearValidationErrors(this: ErrorHost): void {\n if (this.validationErrorKeys) {\n this.validationErrorKeys.forEach((key) => set(this, key, undefined));\n this.validationErrorKeys = [];\n }\n}\n\n/**\n * Takes an error and creates named property containing the error detail within the given context.\n */\nfunction processError(this: ErrorHost, key: string, error: string): void {\n if (this.validationErrorKeys === undefined) {\n this.validationErrorKeys = [];\n }\n\n this.validationErrorKeys.push(key);\n set(this, key, error);\n}\n\n/**\n * Returns the server-provided key that tells us which property to set in order for the correct input to get the errorMessage.\n *\n * @note If using `response.AddValidationError(\"keyName\", \"Error message.\")` on the server, this will return \"keyName\".\n */\nfunction getValidationErrorKey(error?: ApiError): string | undefined {\n // Note: The path should be \"data/attributes/keyName\", and we want to return \"keyName\".\n const pathMatch = (error?.source?.pointer ?? '').match(/^data\\/attributes\\/(.*)/);\n return pathMatch ? pathMatch[1] : undefined;\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\")","import Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { service } from '@ember/service';\n\nimport type PerformanceMonitorService from '../services/performance-monitor.ts';\n\ninterface LastRenderMarkSignature {\n Args: {\n /** Triggered in the markEndOfRendering action of this component.\n * It allows us to run a separate process for marking the end of\n * rendering for a route.\n */\n markEndOfRendering?: () => void;\n };\n}\n\nexport default class LastRenderMark extends Component {\n @service declare performanceMonitor: PerformanceMonitorService;\n\n @action\n markEndOfRendering(): void {\n // If there isn't a markEndOfRendering function passed in, then we will call markLastRender here.\n (this.args.markEndOfRendering ?? this.performanceMonitor.markLastRender)();\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n LastRenderMark: typeof LastRenderMark;\n }\n}\n","import { attr, hasMany } from '@ember-data/model';\nimport BaseModel from './base-model.ts';\n\nimport type MicroApiEndpoint from './micro-api-endpoint.ts';\n\n/**\n * @classdesc\n * Holds Micro API endpoint data items and token version\n */\nexport default class MicroApiDataItem extends BaseModel {\n /**\n * List of avialable MicroAPI endpoints\n */\n @hasMany('micro-api-endpoint', { async: false, inverse: null })\n declare microApiEndpoints: MicroApiEndpoint[];\n\n /**\n * The version of the MicroAPI token being used\n */\n @attr('string')\n declare microApiTokenVer: string;\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'micro-api-data-item': MicroApiDataItem;\n }\n}\n","import { attr } from '@ember-data/model';\nimport BaseModel from './base-model.ts';\n\n/**\n * @classdesc\n * Endpoint and info for MicroAPI service\n */\nexport default class MicroApiEndpoint extends BaseModel {\n /**\n * URL for the base endpoint\n */\n @attr('string', { defaultValue: '' })\n declare baseApiEndpoint: string;\n\n /**\n * Namespace for the API call\n */\n @attr('string', { defaultValue: '' })\n declare namespace: string;\n\n /**\n * JWT used for authenticating to the MicroAPI service\n */\n @attr('string')\n declare encodedJwtToken: string;\n\n /**\n * JWT expiration datetime\n */\n @attr('date')\n declare jwtExpirationDate: Date;\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'micro-api-endpoint': MicroApiEndpoint;\n }\n}\n","import Mixin from '@ember/object/mixin';\nimport { PAGE_MAX_WIDTH_MEDIUM } from '../utils.ts';\n\n/**\n * @classdesc\n *\n * Sets medium width for page rendering.\n *\n * @mixin IsMediumWidthPage\n * @extends Mixin\n * @memberof routes.mixins\n */\n// TODO: This ignore is an existing deprecation that must be refactored, do not copy this usage\n// eslint-disable-next-line ember/no-new-mixins\nconst IsMediumWidthPage = Mixin.create(\n /** @lends routes.mixins.IsMediumWidthPage# */ {\n /**\n * @override\n */\n pageMaxWidth: PAGE_MAX_WIDTH_MEDIUM\n }\n);\n\nexport default IsMediumWidthPage;\n","import Service from '@ember/service';\nimport { inject as service } from '@ember/service';\n\nimport type NativeBridgeService from './native-bridge';\n\nexport default class BrowserService extends Service {\n @service declare nativeBridge: NativeBridgeService;\n\n /**\n * Copies the given message to the clipboard.\n */\n async copyToClipboard(message: string): Promise {\n // Create a DOM element, add the text, copy it to clipboard, then remove it\n const textArea = document.createElement('textarea');\n textArea.style.visibility = 'hidden';\n if (!message) {\n return false;\n }\n\n textArea.value = message;\n\n document.body.appendChild(textArea);\n textArea.select();\n\n try {\n await navigator.clipboard.writeText(message);\n document.body.removeChild(textArea);\n return true;\n } catch {\n return false;\n }\n }\n\n /**\n * Correctly copies to clipboard depending\n * on what device/platform is in use.\n */\n async universalCopyToClipboard(subject: string, anchorElement: HTMLElement, message: string): Promise {\n // Mainly for iOS.\n // doesSupportLaunchShareActionDialog fulfills the check for isMobileApp.\n if (this.nativeBridge.doesSupportLaunchShareActionDialog) {\n try {\n await this.nativeBridge.launchShareActionDialog(subject, message, anchorElement);\n return true;\n } catch {\n return false;\n }\n }\n\n // Desktop only.\n return (async () => {\n return this.copyToClipboard(message);\n })();\n }\n}\n","import Service from '@ember/service';\n\nexport interface AppEnvironment {\n environment: string;\n modulePrefix: string;\n podModulePrefix: string;\n locationType: string;\n rootURL: string;\n APP: Record;\n}\n\n/**\n * @classdesc\n * A service for storing/accessing the environment variable.\n */\nexport default class EnvSettingsService extends Service {\n private envSettings?: AppEnvironment;\n\n /**\n * Sets the environment.\n */\n setEnvironment(env: T): void {\n if (!this.envSettings) {\n this.envSettings = env;\n }\n }\n\n /**\n * Returns the environment.\n */\n getEnvironment(): T | undefined {\n if (!this.envSettings) {\n console.error('[@adc/app-infrastructure] Cannot retrieve the environment variable because it was not set.');\n return;\n }\n\n return this.envSettings as T;\n }\n\n /**\n * Helper function for checking if environment is of a specific type.\n */\n private isEnvironmentOfType(value: string): boolean {\n if (!this.envSettings) {\n console.error(\n '[@adc/app-infrastructure] Cannot specify the environment type because the environment variable was not set.'\n );\n }\n\n return this.envSettings?.environment === value ?? false;\n }\n\n /**\n * Determines if the application is running in the development environment.\n */\n isDevelopmentEnvironment(): boolean {\n return this.isEnvironmentOfType('development');\n }\n\n /**\n * Determines if the application is running in the test environment.\n */\n isTestEnvironment(): boolean {\n return this.isEnvironmentOfType('test');\n }\n\n /**\n * Determines if the application is running in the production environment.\n */\n isProductionEnvironment(): boolean {\n return this.isEnvironmentOfType('production');\n }\n}\n","import { loadScript } from '@adc/ember-utils/utils/browser-helpers';\nimport { isRtl } from '@adc/ember-utils/utils/html-dir-helpers';\nimport { computed, set } from '@ember/object';\nimport { alias } from '@ember/object/computed';\nimport { getOwner } from '@ember/owner';\nimport Service, { inject as service } from '@ember/service';\nimport { GET } from '@adc/ajax/services/adc-ajax';\nimport setDay from 'date-fns/setDay';\nimport setHours from 'date-fns/setHours';\nimport setMonth from 'date-fns/setMonth';\nimport startOfHour from 'date-fns/startOfHour';\nimport { defaultIsoCode } from '../models/locale.ts';\n\nimport type AdcAjaxService from '@adc/ajax/services/adc-ajax';\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type EmberObject from '@ember/object';\nimport type LocaleModel from '../models/locale.ts';\nimport type ContextManager from './context-manager.ts';\nimport type EnvSettingsService from './env-settings.ts';\n\nconst MONTHS = Array.from({ length: 12 }, (_, idx) => startOfHour(setHours(setMonth(new Date(), idx), 12)));\n\ntype TranslationsPayload = {\n language: string;\n translations: Record;\n};\n\n/**\n * Returns promise that resolves as translations collection, from cache if available, based on the passed culture ID.\n *\n * @private\n */\nfunction getTranslations(\n this: LocaleService,\n cultureId: string,\n translations?: Record\n): Promise {\n if (translations) {\n return Promise.resolve({\n language: cultureId,\n translations\n });\n }\n\n return this.ajax.apiRequest(\n `translations/${cultureId}/${this.envSettings.isDevelopmentEnvironment()}`,\n undefined,\n null,\n GET,\n false\n );\n}\n\n/**\n * @classdesc\n * A service for retrieving locale translations.\n */\nexport default class LocaleService extends Service {\n @service declare ajax: AdcAjaxService;\n @service declare intl: ADCIntlService;\n @service declare envSettings: EnvSettingsService;\n @service declare contextManager: ContextManager;\n\n /**\n * Is the site being displayed RTL?\n */\n @computed('selectedLocale')\n get isRtl(): boolean {\n return isRtl();\n }\n\n /**\n * The current system time zone.\n */\n @alias('contextManager.identityModel.timezone')\n declare timeZone: string;\n\n /**\n * Does the week start on sunday for the current Locale?\n */\n weekStartsOnSunday = true;\n\n /**\n * Refreshes the application in order to refresh the culture.\n *\n * @TODO: Make this happen automatically whenever the culture is changed.\n */\n refreshCulture(): void {\n this.contextManager.transitionToUrl('');\n }\n\n /**\n * Updates the application locale and downloads required translations.\n *\n * @note If no translations are found on the server, english (en) translations are loaded as a fallback.\n */\n async changeLocale(locale: Pick): Promise {\n // Get required services.\n const { intl } = this,\n owner = getOwner(this) as ReturnType & {\n translations: Record>;\n },\n cache = ((app) => (app.translations = app.translations ?? {}))(owner),\n { cultureId, isoCode, weekStartsOnSunday } = locale;\n\n this.weekStartsOnSunday = weekStartsOnSunday;\n\n // Predefine language and translations.\n let language = defaultIsoCode,\n translations;\n\n try {\n // Combine requests into one promise.\n const [data] = await Promise.all([\n // Get translations.\n getTranslations.call(this, String(cultureId), cache[cultureId]),\n\n // Request Intl polyfill script if necessary.\n // All of the other polyfills are loaded from index.html so that they are ready before any code is executed.\n window.Intl\n ? Promise.resolve()\n : loadScript(\n `https://cdnjs.cloudflare.com/polyfill/v3/polyfill.min.js?version=3.25.1&features=Intl.~locale.${isoCode}`\n )\n ]);\n\n // Have to put parentheses around this statement for it to build.\n ({ language, translations } = data);\n\n if (translations) {\n // Did we NOT get the requested locale back?\n if (language !== isoCode) {\n // Log failure.\n console.warn(`Did not find translations for ${isoCode}; falling back to ${language}`);\n }\n\n // Cache language\n cache[language] = translations;\n }\n } catch (e) {\n // Do nothing. We are driving throwing of error of of null translations variable.\n }\n\n // Update application translations and locale.\n intl.addTranslations(language, translations || {});\n intl.setLocale(language);\n\n // Update intl service with timezone for date formatting.\n const { timeZone } = this;\n\n // Using set here to prevent an exception from intl.timeZone not being\n // marked as 'tracked' when coming from certain routes.\n set(intl, 'timeZone', timeZone);\n\n // Update timeZone for ui-components.\n const uiComponents = owner.lookup('@adc/ui-components:appValues') as { timeZone: string };\n if (uiComponents) {\n uiComponents.timeZone = timeZone;\n }\n\n // Is there a \"defaults\" object for this addon?\n const defaults = owner.lookup('pikaday:main') as EmberObject;\n if (defaults) {\n // Always include time zone.\n const props: {\n timeZone: string;\n firstDay: number;\n i18n?: Record;\n } = {\n timeZone,\n firstDay: weekStartsOnSunday ? 0 : 1\n };\n\n const WEEKDAYS = Array.from({ length: 7 }, (_, idx) => setDay(new Date(), idx));\n\n // Add translated descriptions.\n props.i18n = {\n previousMonth: intl.t('generic.calendar.previousMonth'),\n nextMonth: intl.t('generic.calendar.nextMonth'),\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line @adc/ember/require-tz-functions\n months: MONTHS.map((d) => intl.formatDate(d, { month: 'long' })),\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line @adc/ember/require-tz-functions\n weekdays: WEEKDAYS.map((d) => intl.formatDate(d, { weekday: 'long' })),\n weekdaysShort: WEEKDAYS.map((d) =>\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line @adc/ember/require-tz-functions\n intl.formatDate(d, { weekday: language === 'he-IL' ? 'narrow' : 'short' })\n )\n };\n\n // Pass defaults.\n defaults.setProperties(props);\n }\n\n // If we did not get translations then throw an error.\n if (translations === null) {\n throw new Error('Getting translations failed.');\n }\n }\n}\n","export enum BluetoothPermissionEnum {\n Advertising = 1\n}\n","import { addWeakListener } from '@adc/ember-utils/utils/event-listeners';\nimport { RSVPPromise, RSVPReject } from '@adc/ember-utils/utils/rsvp';\nimport { A } from '@ember/array';\nimport { computed } from '@ember/object';\nimport { guidFor } from '@ember/object/internals';\nimport { later, cancel } from '@ember/runloop';\nimport Service from '@ember/service';\nimport { inject as service } from '@ember/service';\nimport { isEmpty } from '@ember/utils';\nimport { BluetoothPermissionEnum } from '../enums/BluetoothPermissionCategory.ts';\nimport { None } from '../enums/ContextSwitchType.ts';\nimport {\n Initialize,\n SetTitle,\n SetToolbarButtons,\n ShowConfirmationDialog,\n GoBack,\n HandleApplicationError,\n RefreshWebView,\n ReloadAssociatedSystems,\n LaunchShareActionDialog,\n TransitionToNativeView,\n CloseWebView,\n LaunchImportContact,\n LaunchBrowser,\n CloseWebViewV2,\n TerminateAppSession,\n LaunchNewContext,\n PersistAppSession,\n EnablePushNotifications,\n EnableBluetooth,\n CheckBluetoothPermissions,\n StartBleAdvertising,\n StopBleAdvertising\n} from '../enums/NativeBridgeFeature.ts';\nimport { sentryWithScopeAndError } from '../utils/sentry.ts';\n\n// region Constants.\n\n/**\n * Type for button that should transition the view back.\n *\n * @private\n * @static\n * @memberof services.NativeBridge\n *\n * @type {string}\n */\nexport const BUTTON_TYPE_BACK = 'back';\n\n/**\n * Type for button that cancels an action, but does not go back to a previous route.\n *\n * @private\n * @static\n * @memberof services.NativeBridge\n *\n * @type {string}\n */\nexport const BUTTON_TYPE_CANCEL = 'cancel';\n\n/**\n * Type for button that confirms an action or saves a form.\n *\n * @private\n * @static\n * @memberof services.NativeBridge\n *\n * @type {string}\n */\nexport const BUTTON_TYPE_CONFIRM = 'confirm';\n\n/**\n * Type for button that triggers a screen to add an item.\n *\n * @private\n * @static\n * @memberof services.NativeBridge\n *\n * @type {string}\n */\nconst BUTTON_TYPE_ADD = 'add';\n/**\n * Key representing the toolbar button action.\n *\n * @ignore\n * @private\n * @static\n * @memberof services.NativeBridge\n *\n * @type {string}\n */\nexport const RUN_TOOLBAR_BUTTON_ACTION_NAME = 'runToolbarButtonAction';\n\n/**\n * Key representing the modal button action.\n *\n * @ignore\n * @private\n * @static\n * @memberof services.NativeBridge\n *\n * @type {string}\n */\nconst RUN_MODAL_BUTTON_ACTION_NAME = 'runModalButtonAction';\n\n/**\n * Key representing function for resolving promise.\n *\n * @ignore\n * @private\n * @static\n * @memberof services.NativeBridge\n *\n * @type {string}\n */\nconst RUN_RESOLVE_PROMISE_ACTION = 'resolvePromise';\n\n// endregion\n// region Helper methods.\n\n/**\n * Executes method on the native bridge.\n *\n * @private\n * @instance\n * @memberof services.NativeBridge\n *\n * @param {Number} featureEnum\n * @param {Object} data\n * @returns {Promise<*>}\n */\nfunction runMethod(featureEnum, data) {\n if (!this.isEnabled) {\n return RSVPReject();\n }\n\n if (!doesSupportFeature.call(this, featureEnum)) {\n return RSVPReject();\n }\n\n // Define new RSVPPromise that we will store in cache.\n const promise = RSVPPromise(),\n // Create id for the new promise.\n returnPromiseId = guidFor(promise);\n\n // Store promise in the cache.\n this.promiseCache[returnPromiseId] = promise;\n\n let content = {\n feature: featureEnum\n };\n\n if (data) {\n content.data = data;\n }\n\n if (returnPromiseId) {\n content.returnPromiseId = returnPromiseId;\n }\n\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n later(() => {\n // Pass data to native bridge.\n this.bridge?.postMessage.call(this.bridge, JSON.stringify(content));\n }, 1);\n\n return promise.promise;\n}\n\n/**\n * Returns toolbar button collection with the specified id.\n *\n * @private\n * @instance\n * @memberof services.NativeBridge\n *\n * @param {String} id\n * @returns {NativeToolbarType}\n */\nfunction getButtonCollectionWithId(id) {\n return getCollectionWithId.call(this, 'toolbarsStack', id);\n}\n\n/**\n * Returns collection with collection name and id.\n *\n * @private\n * @instance\n * @memberof services.NativeBridge\n *\n * @param {String} collectionName\n * @param {String} id\n * @returns {*}\n */\nfunction getCollectionWithId(collectionName, id) {\n return this.get(collectionName).findBy('id', id);\n}\n\n/**\n * Returns instance of the native bridge that provides communication between Ember and an app.\n *\n * @private\n * @instance\n * @memberof services.NativeBridge\n *\n * @returns {Object|undefined}\n */\nfunction getBridge() {\n const { bridgeName } = this;\n let bridge = (window[bridgeName] = window[bridgeName] || ((window.webkit || {}).messageHandlers || {})[bridgeName]);\n\n if (!bridge?.postMessage) {\n bridge = window.NativeBridge = undefined;\n }\n\n return bridge;\n}\n\n/**\n * Does the native application have support for the specified feature?\n *\n * @private\n * @instance\n * @memberof services.NativeBridge\n *\n * @param {Number} featureEnum Feature to check support for.\n * @returns {boolean}\n */\nfunction doesSupportFeature(featureEnum) {\n return this.isEnabled && (this.supportedNativeBridgeFeatures || []).includes(featureEnum);\n}\n\n/**\n * Does the native application have support for transitioning to the specified view?\n *\n * @private\n * @instance\n * @memberof services.NativeBridge\n *\n * @param {Number} viewEnum View to check support for.\n * @returns {boolean}\n */\nfunction doesSupportNativeView(viewEnum) {\n return (this.supportedNativeViews || []).includes(viewEnum);\n}\n\n/**\n * Creates a copy of an object with id property.\n *\n * @private\n * @static\n * @memberof services.NativeBridge\n *\n * @param {Object} object\n * @returns {Object}\n */\nfunction getObjectWithoutId(object) {\n // eslint-disable-next-line no-unused-vars\n let { id, ...newObject } = object;\n\n return newObject;\n}\n\n// endregion\n\n// region Bridge interface extensions.\n\n/**\n * Sets up all button actions that will handle clicks of the native buttons.\n *\n * @private\n * @instance\n * @memberof services.NativeBridge\n */\nfunction setupActionsOnBridge() {\n const { bridge } = this;\n\n // Define how to execute a toolbar button function.\n bridge[RUN_TOOLBAR_BUTTON_ACTION_NAME] = (toolbarId, buttonPath, index) => {\n const toolbar = getButtonCollectionWithId.call(this, toolbarId);\n\n if (!toolbar) {\n console.error(`Tried to access non existing native buttons toolbar, toolbarId=${toolbarId}`);\n return;\n }\n\n const buttons = toolbar[buttonPath];\n\n if (!buttons) {\n console.error(\n `Tried to access non existing buttonPath in a toolbar, toolbarId=${toolbarId}, buttonPath=${buttonPath}`\n );\n return;\n }\n\n const button = buttons[index];\n\n if (!button) {\n console.error(\n `Tried to access non existing button in a toolbar, toolbarId=${toolbarId}, buttonPath=${buttonPath}, index=${index}`\n );\n return;\n }\n\n const action = button.action;\n\n // This should never happen.\n if (!action) {\n console.error(\n `Button does not have an action defined, toolbarId=${toolbarId}, buttonPath=${buttonPath}, index=${index}`\n );\n return;\n }\n\n // Finally run the button action.\n return action();\n };\n\n // Define modal actions.\n // This is much simpler because there is always at most one modal open.\n bridge[RUN_MODAL_BUTTON_ACTION_NAME] = (buttonIndex) => {\n const button = (this.modalButtons || []).objectAt(buttonIndex);\n\n if (!button) {\n console.error(`Tried to access non existing modal button, index=${buttonIndex}`);\n return;\n }\n\n const { action } = button;\n\n // This should never happen.\n if (!action) {\n console.error(`Modal button does not have an action, index=${buttonIndex}`);\n }\n\n // Run button action.\n return action();\n };\n\n // Define method for resolving promises.\n bridge[RUN_RESOLVE_PROMISE_ACTION] = ({ promiseId, data, error } = {}) => {\n if (!promiseId) {\n console.error('No promise id defined when resolving promise from App.');\n return;\n }\n\n // Get promise.\n const promise = this.promiseCache[promiseId];\n\n if (!promise) {\n // Log an error to sentry. Send extra data to help better track the problem.\n const wasPreviouslyResolved = promiseId in this.previouslyResolvedPromiseIds,\n sentryExtras = {\n promiseId,\n wasPreviouslyResolved,\n latestResolvedTime: this.previouslyResolvedPromiseIds[promiseId] ?? '',\n data,\n error\n },\n sentryTags = { wasPreviouslyResolved };\n\n sentryWithScopeAndError(\n 'native-bridge: No promise found when resolving action from App',\n sentryExtras,\n sentryTags\n );\n\n return;\n }\n\n // Resolve or reject promise.\n if (error) {\n console.error(error);\n promise.reject(error);\n } else {\n // If data was not undefined, it should have come as a stringified object.\n // Therefore, try to deserialize it and return as a result of the promise.\n if (data !== undefined) {\n try {\n data = JSON.parse(data);\n } catch (e) {\n // Do nothing; we will just use data as it came in, but log an error so that we can look at it.\n // The reason for logging error is that we expect data to be returned serialized.\n console.error(`Could not deserialize data returned from NativeBridge method, data=${data}`);\n }\n }\n\n promise.resolve(data);\n }\n\n // Remove promise from cache.\n this.previouslyResolvedPromiseIds[promiseId] = new Date().toISOString();\n delete this.promiseCache[promiseId];\n };\n}\n\n// endregion\n\n// region Title processing.\n\n/**\n * Sends the current title to the app.\n *\n * @private\n * @instance\n * @memberof services.NativeBridge\n */\nfunction sendTitleToApp() {\n (async () => runMethod.call(this, SetTitle, getObjectWithoutId(this.titleStack?.lastObject || {})))();\n}\n\n// endregion\n\n// region Buttons processing.\n\n/**\n * Transforms button into a button object that can be passed to the native app.\n *\n * @private\n * @instance\n * @memberof services.NativeBridge\n *\n * @param {NativeButtonType} buttonObject\n * @param {Function} bridgeMethodKey Method to run on the bridge when a native button is clicked.\n * @param {Array} params Array of arguments that should be passed into the bridge method to be executed.\n * @returns {{text: String, description: String=, icon: String=, type: String=, promisePending: boolean, actionPath: String}}\n */\nfunction transformButtonObject(buttonObject, bridgeMethodKey, ...params) {\n let { text, description, icon, type, isPromisePending } = buttonObject;\n\n // Predefine params string that will be used for method eval.\n let paramsString = '';\n\n // If we got params then put them in a format consumable by eval.\n if (!isEmpty(params)) {\n paramsString = `'${params.join(\"','\")}'`;\n }\n\n isPromisePending = isPromisePending ? isPromisePending.toString() : 'false';\n\n return {\n text,\n description,\n icon,\n type,\n isPromisePending,\n actionPath: wrapJsInTryCatch(`window.${this.bridgeName}.${bridgeMethodKey}(${paramsString})`)\n };\n}\n\n/**\n * Translates NativeToolbarType to something that is consumable by the native app.\n *\n * @private\n * @instance\n * @memberof services.NativeBridge\n *\n * @param toolbar\n * @returns {*}\n */\nfunction translateToolbarButtons(toolbar) {\n if (!toolbar) {\n return null;\n }\n\n const { id } = toolbar;\n\n // Create object for toolbar buttons that we will be using to communicate to the app.\n const data = {\n id,\n backButtons: [],\n contextButtons: []\n };\n\n // Transform buttons.\n ['backButtons', 'contextButtons'].forEach((buttonPath) => {\n (toolbar[buttonPath] || []).forEach((button, index) => {\n // Skip a button if it does not have an action. This should not happen.\n if (!button.action) {\n console.error(\n `Skipping a button, because it does not have an action. buttonPath=${buttonPath}, index=${index}`\n );\n return;\n }\n\n data[buttonPath].push(\n transformButtonObject.call(this, button, RUN_TOOLBAR_BUTTON_ACTION_NAME, id, buttonPath, index)\n );\n });\n });\n\n return data;\n}\n\n/**\n * Sends the current toolbar button interface to the app.\n *\n * @private\n * @instance\n * @memberof services.NativeBridge\n */\nfunction sendToolbarButtonsToApp() {\n (async () =>\n runMethod.call(\n this,\n SetToolbarButtons,\n getObjectWithoutId(translateToolbarButtons.call(this, this.toolbarsStack?.lastObject || {}))\n ))();\n}\n\n// endregion\n\n// region Processing collections.\n\n/**\n * Processes update of collection.\n *\n * @private\n * @instance\n * @memberof services.NativeBridge\n *\n * @param {String} stackType Key for the stack name.\n * @param {Object} newCollection Collection to be updated.\n * @param {Function} updateAction Function to be executed to send data to the app.\n * @param {Number} featureEnum Key for checking support for this feature.\n */\nfunction processCollectionUpdate(stackType, newCollection, updateAction, featureEnum) {\n if (!doesSupportFeature.call(this, featureEnum)) {\n return;\n }\n\n if (!newCollection) {\n return;\n }\n\n const { id } = newCollection,\n existingCollection = getCollectionWithId.call(this, stackType, id),\n stack = this.get(stackType);\n\n // Now figure out if we need to push the toolbar to the app or not.\n if (existingCollection) {\n const indexOfExisting = stack.indexOf(existingCollection);\n\n // If the existing collection is the last one, pop it so that it can be re-added.\n // In this case we need to send update.\n if (indexOfExisting === stack.get('length') - 1) {\n stack.popObject();\n } else {\n // Update the object at the index. No update is necessary.\n stack[indexOfExisting] = newCollection;\n\n return;\n }\n }\n\n // Push new set to the stack.\n stack.pushObject(newCollection);\n\n // Send stuff to app.\n updateAction.call(this);\n}\n\n/**\n * Processes disposal of property when it is removed from the view.\n *\n * @private\n * @instance\n * @memberof services.NativeBridge\n *\n * @param {String} stackType Key for the stack name.\n * @param {String} id Id of the collection to be disposed.\n * @param {Function} updateAction Function to be executed to send data to the app.\n * @param {Number} featureEnum Key for checking support for this feature.\n */\nfunction processCollectionDispose(stackType, id, updateAction, featureEnum) {\n if (!doesSupportFeature.call(this, featureEnum)) {\n return;\n }\n\n const existingCollection = getCollectionWithId.call(this, stackType, id),\n stack = this.get(stackType);\n\n // If this is the last update, then need to update the collection in the app.\n const needsUpdate = stack.get('lastObject') === existingCollection;\n\n stack.removeObject(existingCollection);\n\n if (needsUpdate) {\n updateAction.call(this);\n }\n}\n\n// endregion\n\n// region Initialization.\n\n/**\n * Threshold for logging initialization duration as warning.\n *\n * @ignore\n * @private\n * @instance\n * @memberof services.NativeBridge\n *\n * @type {number}\n */\nconst INITIALIZATION_WARN_THRESHOLD = 500;\n\n/**\n * Threshold for logging initialization error and stopping the initialization process.\n *\n * @ignore\n * @private\n * @instance\n * @memberof services.NativeBridge\n *\n * @type {number}\n */\nconst INITIALIZATION_ERROR_THRESHOLD_MS = 5000;\n\n/**\n * Initializes bridge and its properties.\n *\n * @private\n * @instance\n * @memberof services.NativeBridge\n *\n * @returns {Promise}\n */\nasync function initializeBridge() {\n const promiseResolveDataReplaceTemplate = '{data}',\n startTime = new Date();\n\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n const initializationFailSafe = later(() => {\n console.error(\n `NativeBridge initialization took longer than ${INITIALIZATION_ERROR_THRESHOLD_MS}ms, marking as initialized and disabled as fail safe.`\n );\n\n // Only resolve if this is not dev so that we can catch issues.\n if (!this.envSettings.isDevelopmentEnvironment()) {\n this.set('isEnabled', false);\n }\n }, INITIALIZATION_ERROR_THRESHOLD_MS);\n\n try {\n // Start setup. Need to make sure that this completes before anything else.\n await runMethod.call(\n this,\n Initialize,\n {\n promiseResolvePath: wrapJsInTryCatch(\n `window.${this.bridgeName}.${RUN_RESOLVE_PROMISE_ACTION}(${promiseResolveDataReplaceTemplate});`\n ),\n promiseResolveDataReplaceTemplate\n },\n true\n );\n\n // Cancel fail safe because everything went well.\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n cancel(initializationFailSafe);\n\n const endTime = new Date(),\n duration = endTime.getTime() - startTime.getTime();\n\n // Log if time was less than a threshold, warn if more.\n (duration > INITIALIZATION_WARN_THRESHOLD ? console.warn : console.log)(\n `NativeBridge initialization took ${duration}ms`\n );\n } catch (e) {\n console.error(e);\n\n this.set('isEnabled', false);\n }\n}\n\n// endregion\n\n/**\n * @classdesc\n *\n * Native bridge functionality between the Ember application and a Native application.\n *\n * @class NativeBridge\n * @extends Service\n * @memberof services\n */\n// TODO: This ignore is an existing deprecation that must be refactored, do not copy this usage\n// eslint-disable-next-line ember/no-classic-classes\nexport default Service.extend(\n /** @lends services.NativeBridge */ {\n envSettings: service(),\n\n /**\n * Name of the bridge.\n *\n * @type {String}\n */\n bridgeName: 'NativeBridge',\n\n /**\n * Variable to hold a cache of promises that will be resolved by the native application.\n *\n * @type {Array}\n */\n promiseCache: (() => [])(),\n\n /**\n * Is the bridge enabled and usable?\n *\n * @type {boolean}\n */\n isEnabled: false,\n\n /**\n * A list of IDs of previously resolved promises.\n *\n * @note Using this to help debug a Sentry error where the promiseId from the app\n * is not within the promiseCache.\n *\n * @type {{ [ id: string ]: timestamp: string }}\n */\n previouslyResolvedPromiseIds: null,\n\n /**\n * Initializes native bridge service with the supported features.\n *\n * @param {Array} supportedNativeBridgeFeatures\n * @param {Array} supportedNativeViews\n * @returns {Promise}\n */\n async initialize(supportedNativeBridgeFeatures, supportedNativeViews) {\n const bridge = getBridge.call(this);\n const isEnabled = bridge && !isEmpty(supportedNativeBridgeFeatures);\n\n this.setProperties({\n isEnabled,\n bridge,\n supportedNativeBridgeFeatures,\n supportedNativeViews,\n previouslyResolvedPromiseIds: {}\n });\n\n if (!isEnabled) {\n // Nothing to initialize, so resolve initialization.\n return;\n }\n\n // Need to setup actions on bridge before we attempt any communication.\n setupActionsOnBridge.call(this);\n\n // Initialize bridge communication.\n await initializeBridge.call(this);\n\n // Make sure that the toolbar gets reset if the page gets unloaded.\n addWeakListener(this, window, 'beforeunload', () => this.resetToolbarButtons());\n },\n\n // region Feature supports.\n\n /**\n * Does the app support changing of the header title?\n *\n * @function\n * @returns {boolean}\n */\n doesSupportTitle: computed(function () {\n return doesSupportFeature.call(this, SetTitle);\n }),\n\n /**\n * Does the app support creation of action buttons?\n *\n * @function\n * @returns {boolean}\n */\n doesSupportToolbarButtons: computed(function () {\n return doesSupportFeature.call(this, SetToolbarButtons);\n }),\n\n /**\n * Does the app support showing a confirmation dialog?\n *\n * @function\n * @returns {boolean}\n */\n doesSupportConfirmationDialog: computed(function () {\n return doesSupportFeature.call(this, ShowConfirmationDialog);\n }),\n\n /**\n * Does the app support telling the app to go back in the App's view stack?\n *\n * @function\n * @returns {boolean}\n */\n doesSupportGoBack: computed(function () {\n return doesSupportFeature.call(this, GoBack);\n }),\n\n /**\n * Does the app support refreshing of the WebView?\n *\n * @function\n * @returns {boolean}\n */\n doesSupportRefreshWebView: computed(function () {\n return doesSupportFeature.call(this, RefreshWebView);\n }),\n\n /**\n * Does the app support refreshing Available Systems?\n *\n * @function\n * @returns {boolean}\n */\n doesSupportReloadAssociatedSystems: computed(function () {\n return doesSupportFeature.call(this, ReloadAssociatedSystems);\n }),\n\n /**\n * Does the app support launching share dialog?\n *\n * @function\n * @returns {boolean}\n */\n doesSupportLaunchShareActionDialog: computed(function () {\n return doesSupportFeature.call(this, LaunchShareActionDialog);\n }),\n\n /**\n * Does the app support transitioning to a native view?\n *\n * NOTE: Consider using doesSupportTransitionToNativeViewWithId instead.\n *\n * @function\n * @returns {boolean}\n */\n doesSupportTransitionToNativeView: computed(function () {\n return doesSupportFeature.call(this, TransitionToNativeView);\n }),\n\n /**\n * Does the app support transitioning to native view with specified id?\n *\n * @function\n * @param viewEnum NativeView to transition to\n * @returns {boolean}\n */\n doesSupportTransitionToNativeViewWithId: function (viewEnum) {\n return doesSupportFeature.call(this, TransitionToNativeView) && doesSupportNativeView.call(this, viewEnum);\n },\n\n /**\n * Does the app support closing the current web view?\n *\n * @function\n * @returns {boolean}\n *\n * @deprecated Use CloseWebViewV2 instead.\n */\n doesSupportCloseWebView: computed(function () {\n return doesSupportFeature.call(this, CloseWebView);\n }),\n\n /**\n * Does the app support importing a contact?\n *\n * @function\n * @returns {boolean}\n */\n doesSupportLaunchImportContact: computed(function () {\n return doesSupportFeature.call(this, LaunchImportContact);\n }),\n\n /**\n * Does the app support launching an external browser?\n *\n * @function\n * @returns {boolean}\n */\n doesSupportLaunchBrowser: computed(function () {\n return doesSupportFeature.call(this, LaunchBrowser);\n }),\n\n /**\n * Does the app support version 2 of closing a webview?\n *\n * CloseWebViewV2 contains a bug fix for CloseWebView.\n *\n * @function\n * @returns {boolean}\n */\n doesSupportCloseWebViewV2: computed(function () {\n return doesSupportFeature.call(this, CloseWebViewV2);\n }),\n\n /**\n * Does the app support terminating a user's session?\n *\n * @function\n * @returns {boolean}\n */\n doesSupportTerminateAppSession: computed(function () {\n return doesSupportFeature.call(this, TerminateAppSession);\n }),\n\n /**\n * Does the app support launching passed content a new fragment (Android) or modal (iOS)?\n *\n * @function\n * @returns {boolean}\n */\n doesSupportLaunchNewContext: computed(function () {\n return doesSupportFeature.call(this, LaunchNewContext);\n }),\n\n /**\n * Does the app support persisting the session?\n *\n * @function\n * @returns {boolean}\n */\n doesSupportPersistAppSession: computed(function () {\n return doesSupportFeature.call(this, PersistAppSession);\n }),\n\n /**\n * Does the app support enabling push notifications on the device?\n *\n * @function\n * @returns {boolean}\n */\n doesSupportEnablePushNotifications: computed(function () {\n return doesSupportFeature.call(this, EnablePushNotifications);\n }),\n\n /**\n * Does the app support enabling bluetooth?\n *\n * @function\n * @returns {boolean}\n */\n doesSupportEnableBluetooth: computed(function () {\n return doesSupportFeature.call(this, EnableBluetooth);\n }),\n\n /**\n * Does the app support checking bluetooth permissions?\n *\n * @function\n * @returns {boolean}\n */\n doesSupportCheckBluetoothPermissions: computed(function () {\n return doesSupportFeature.call(this, CheckBluetoothPermissions);\n }),\n\n /**\n * Does the app support start BLE advertising?\n *\n * @function\n * @returns {boolean}\n */\n doesSupportStartBleAdvertising: computed(function () {\n return doesSupportFeature.call(this, StartBleAdvertising);\n }),\n\n /**\n * Does the app support stop BLE advertising?\n *\n * @function\n * @returns {boolean}\n */\n doesSupportStopBleAdvertising: computed(function () {\n return doesSupportFeature.call(this, StopBleAdvertising);\n }),\n\n // endregion\n\n // region Title.\n\n /**\n * Stack of title that correspond to an id that wants them to be shown.\n *\n * @function\n * @returns {Array}\n */\n titleStack: computed(function () {\n return A();\n }),\n\n /**\n * Sets header title in the app.\n *\n * @param {NativeTitleType} titleCollection\n */\n setTitle(titleCollection) {\n processCollectionUpdate.call(this, 'titleStack', titleCollection, sendTitleToApp, SetTitle);\n },\n\n /**\n * Removes title with the specified id.\n *\n * @param {String} id\n */\n removeTitle(id) {\n processCollectionDispose.call(this, 'titleStack', id, sendTitleToApp, SetTitle);\n },\n\n // endregion\n\n // region Toolbar buttons.\n\n /**\n * Stack of toolbar buttons.\n *\n * @function\n * @returns {Array<{NativeToolbarType}>}\n */\n toolbarsStack: computed(function () {\n return A();\n }),\n\n /**\n * Sets toolbar buttons in the app.\n *\n * @param {NativeToolbarType} toolbar\n */\n setToolbarButtons(toolbar) {\n processCollectionUpdate.call(this, 'toolbarsStack', toolbar, sendToolbarButtonsToApp, SetToolbarButtons);\n },\n\n /**\n * Removes toolbar buttons with the specified component id.\n *\n * @param {String} id\n */\n removeToolbarButtons(id) {\n processCollectionDispose.call(this, 'toolbarsStack', id, sendToolbarButtonsToApp, SetToolbarButtons);\n },\n\n /**\n * Resets all toolbar buttons.\n *\n * This can happen when the Ember application is completely unloaded so that artifacts don't remain on the screen/\n */\n resetToolbarButtons() {\n if (!this.doesSupportToolbarButtons) {\n return;\n }\n\n this.toolbarsStack.clear();\n\n sendToolbarButtonsToApp.call(this);\n },\n\n // endregion\n\n // region Button Type.\n // NOTE: The following getters are used by addons that depend on an injected native bridge service.\n\n /**\n * Returns the back button type.\n */\n getButtonTypeBack() {\n return BUTTON_TYPE_BACK;\n },\n\n /**\n * Returns the cancel button type.\n */\n getButtonTypeCancel() {\n return BUTTON_TYPE_CANCEL;\n },\n\n /**\n * Returns the confirm button type.\n */\n getButtonTypeConfirm() {\n return BUTTON_TYPE_CONFIRM;\n },\n\n /**\n * Returns the add button type.\n */\n getButtonTypeAdd() {\n return BUTTON_TYPE_ADD;\n },\n\n // endregion\n\n // region Confirmation dialog.\n\n /**\n * Shows native confirmation dialog.\n *\n * @param {String} title\n * @param {String} message\n * @param {Array} buttons\n * @returns {Promise}\n */\n async showConfirmationDialog(title, message, buttons) {\n this.set('modalButtons', buttons);\n\n if (isEmpty(buttons)) {\n console.error('No buttons defined for confirmation modal.');\n return;\n }\n\n // Return the promise so that the caller can know whether the modal opening succeeded or not.\n return runMethod.call(this, ShowConfirmationDialog, {\n title,\n message,\n buttons: buttons.map((button, index) =>\n transformButtonObject.call(this, button, RUN_MODAL_BUTTON_ACTION_NAME, index)\n )\n });\n },\n\n /**\n * Shows native share dialog.\n *\n * @param {String} subject\n * @param {String} message\n * @param {HTMLElement} anchorElement - The anchor element where the popover should be positioned. (iPad uses a popover)\n * @returns {Promise}\n */\n async launchShareActionDialog(subject, message, anchorElement) {\n const rect = anchorElement.getBoundingClientRect(),\n buttonWidth = rect.right - rect.left;\n\n return runMethod.call(this, LaunchShareActionDialog, {\n subject,\n message,\n xCoordinate: rect.left + buttonWidth / 2,\n yCoordinate: rect.top\n });\n },\n\n // endregion\n\n // region Import contact alert\n\n /**\n * Launches import contact dialog and recieves contact information when client resolves promise.\n *\n * @returns {Promise<*>}\n */\n async launchImportContact() {\n return runMethod.call(this, LaunchImportContact);\n },\n\n // endregion\n\n // region Application transition.\n\n /**\n * Tells the native application to go back.\n *\n * @returns {Promise}\n */\n async goBack() {\n return runMethod.call(this, GoBack);\n },\n\n /**\n * Tells the native application to handle Ember error.\n *\n * @returns {Promise<*>}\n */\n async handleError() {\n return runMethod.call(this, HandleApplicationError);\n },\n\n /**\n * Tells the native application to refresh the whole WebView.\n *\n * @returns {Promise<*>}\n */\n refreshWebView() {\n return runMethod.call(this, RefreshWebView);\n },\n\n // endregion\n\n // region Reload Associated Systems.\n\n /**\n * Tells the native application to reload the list of associated systems.\n *\n * @returns {Promise<*>}\n */\n reloadAssociatedSystems() {\n return runMethod.call(this, ReloadAssociatedSystems);\n },\n\n // endregion\n\n // region Transition to Native View.\n\n /**\n * Tells the native application to transition to the requested native view.\n *\n * @param nativeViewId {Number} The id of the native view to which we will transition.\n * @param transitionData {NativeViewTransitionDataType} Contains extra data used in determining how to handle the transition.\n *\n * @returns {Promise<*>}\n */\n transitionToNativeView(nativeViewId, transitionData = {}) {\n if (isEmpty(nativeViewId)) {\n console.error(`Could not transition to NativeView, nativeViewId: ${nativeViewId}`);\n return;\n }\n\n return runMethod.call(this, TransitionToNativeView, {\n nativeViewId,\n shouldAvoidReloadingWebView: false,\n deviceID: null,\n macAddress: null,\n showBackArrow: true,\n returnToWebView: true,\n contextSwitchType: None,\n customerId: null,\n groupId: null,\n ...transitionData\n });\n },\n\n // endregion\n\n /**\n * Tells the native application to close the whole WebView.\n *\n * @returns {Promise<*>}\n *\n * @deprecated Use CloseWebViewV2 instead.\n */\n closeWebView() {\n return runMethod.call(this, CloseWebView);\n },\n\n /**\n * Tells the native application to open an external browser with the given url.\n *\n * @param url {String} The url to load.\n * @param isForSso {String} Will this be used for SSO?\n *\n * @returns {Promise<*>}\n */\n launchBrowser(url, isForSso = false) {\n return runMethod.call(this, LaunchBrowser, {\n url,\n isForSso\n });\n },\n\n /**\n * Tells the native application to close the whole WebView.\n * CloseWebViewV2 contains a bug fix from the original CloseWebView and should be used instead.\n *\n * @returns {Promise<*>}\n */\n closeWebViewV2() {\n return runMethod.call(this, CloseWebViewV2);\n },\n\n /**\n * Tells the native application to terminate the user's session and return to the login screen\n *\n * @returns {Promise<*>}\n */\n terminateAppSession() {\n return runMethod.call(this, TerminateAppSession);\n },\n\n /**\n * Tells the native application to open a webView in a new fragment (Android) or modal (iOS)\n *\n * @param emberId {Number} The specific Ember webpage ID to load in the mobile app, takes precedence over URL if set.\n * @param url {String} The hard-coded URL to load in the event we are not loading an Ember page in the new context.\n *\n * @returns {Promise<*>}\n */\n launchNewContext(emberId, url) {\n return runMethod.call(this, LaunchNewContext, { emberId, url });\n },\n\n /**\n * Tells the native application to keep the session alive and terminates all other sessions.\n *\n * @returns {Promise<*>}\n */\n persistAppSession() {\n return runMethod.call(this, PersistAppSession);\n },\n\n /**\n * Tells the native application to prompt the user to enable push notifications.\n * If notification types are provided, save notifications of that type.\n *\n * @param {Number[]} notificationTypes The notification types from CustomerNotificationTypeEnum to save as push notifications.\n *\n * @returns {Promise<{enabled: boolean} | void>}\n */\n enablePushNotifications(notificationTypes) {\n return runMethod.call(this, EnablePushNotifications, { notificationTypes });\n },\n\n /**\n * Tells the native application to enable bluetooth\n *\n * @returns {Promise}\n */\n enableBluetooth() {\n return runMethod.call(this, EnableBluetooth);\n },\n\n /**\n * Tells the native application to check bluetooth permissions\n *\n * @param {number} permissionToCheck The numerical value of BluetoothPermissionCategory, for the permission to check\n *\n * @returns {Promise}\n */\n checkBluetoothPermissions(permissionToCheck) {\n if (!Object.values(BluetoothPermissionEnum).includes(permissionToCheck)) return null;\n return runMethod.call(this, CheckBluetoothPermissions, { permissionToCheck });\n },\n\n /**\n * Tells the native application to start BLE advertising\n *\n * @returns {Promise}\n */\n startBleAdvertising() {\n return runMethod.call(this, StartBleAdvertising);\n },\n\n /**\n * Tells the native application to stop BLE advertising\n *\n * @returns {Promise}\n */\n stopBleAdvertising() {\n return runMethod.call(this, StopBleAdvertising);\n },\n\n willDestroy() {\n this._super();\n\n delete this.bridge;\n delete window.NativeBridge;\n }\n }\n);\n\n/**\n * Wraps javascript in a try/catch block.\n *\n * @param {string} jsString\n */\nexport function wrapJsInTryCatch(jsString) {\n return `try { ${jsString} } catch (e) { console.error(e); }`;\n}\n\n// region Type definitions.\n\n/**\n * Type definition for constructing a native button in App that runs Ember as a WebView.\n *\n * @typedef {{\n * text: String,\n * description: String,\n * icon: String,\n * isPromisePending: boolean,\n * action: Function\n * }} NativeButtonType\n *\n * @property {String} text The text of the button.\n * @property {String=} description Description of the button.\n * @property {String=} icon Icon name that should be rendered in the native app.\n * @property {boolean} isPromisePending Indicates if the button has a promise pending for its action.\n * @property {Function} action Action to be called when button is pressed.\n *\n * @memberof services.NativeBridge\n */\n\n/**\n * Type definition for constructing a native toolbar in App that runs Ember as a WebView.\n *\n * @typedef {{\n * id: String,\n * backButtons: Array,\n * contextButtons: Array\n * }} NativeToolbarType\n *\n * @property {String} id Uniquely identifies this button collection.\n * @property {Array=} backButtons Definition for a button that will be providing a \"cancel\" functionality, or simply going \"back\" functionality. This is defined as a list, but it really should only contain one item at all times.\n * @property {Array=} contextButtons List of context buttons that can trigger a functionality. These are on the right side.\n *\n * @memberof services.NativeBridge\n */\n\n/**\n * Type definition for constructing a native title text in App that runs Ember as WebView.\n *\n * @typedef {{\n * id: String,\n * title: String\n * }} NativeTitleType\n *\n * @property {String} id Uniquely identifies this title collection. Usually a component id.\n * @property {String} title Title to be shown in the App's header.\n *\n * @memberof services.NativeBridge\n */\n\n/**\n * Data to be sent with the TransitionToNativeView feature.\n *\n * @note Updating this Type will require an APP change in order to know what to do with the data.\n *\n * @typedef {{\n * shouldAvoidReloadingWebView: boolean,\n * deviceID: String,\n * macAddress: String,\n * showBackArrow: boolean,\n * returnToWebView: boolean,\n * contextSwitchType: Number,\n * customerId: Number\n * }} NativeViewTransitionDataType\n *\n * @property {boolean} shouldAvoidReloadingWebView - Should the WebView avoid reloading itself if the native view transitions back to the WebView? NOTE: This only affects iOS currently.\n * @property {String} deviceID - The device ID of a Managed Device. The device ID is expected to be split at the '-'.\n * @property {String} macAddress - The MAC address of a Managed Device.\n * @property {boolean} showBackArrow - Should the back arrow be shown on the native view. Used for CarSettingsV2.\n * @property {boolean} returnToWebView - Should the back arrow return the user to the original webview. Used for CarSettingsV2.\n * @property {Number} contextSwitchType - The enum representing the direction of the context switch (e.g. enterprise to single-system).\n * @property {Number} customerId - The ID of the customer we are transitioning to.\n *\n * @memberof services.NativeBridge\n */\n\n// endregion\n","/**\n * @module\n */\n/**\n * @enum {number}\n */\nexport const Initialize = 1;\n/**\n * @enum {number}\n */\nexport const SetTitle = 2;\n/**\n * @enum {number}\n */\nexport const SetToolbarButtons = 3;\n/**\n * @enum {number}\n */\nexport const ShowConfirmationDialog = 4;\n/**\n * @enum {number}\n */\nexport const GoBack = 5;\n/**\n * @enum {number}\n */\nexport const HandleApplicationError = 6;\n/**\n * @enum {number}\n */\nexport const RefreshWebView = 7;\n/**\n * @enum {number}\n */\nexport const ReloadAssociatedSystems = 8;\n/**\n * @enum {number}\n */\nexport const LaunchShareActionDialog = 9;\n/**\n * @enum {number}\n */\nexport const TransitionToNativeView = 10;\n/**\n * @enum {number}\n *\n * @deprecated Use CloseWebViewV2 instead.\n */\nexport const CloseWebView = 11;\n/**\n * @enum {number}\n */\nexport const LaunchImportContact = 12;\n/**\n * @enum {number}\n */\nexport const LaunchBrowser = 13;\n/**\n * @enum {number}\n */\nexport const CloseWebViewV2 = 14;\n/**\n * @enum {number}\n */\nexport const TerminateAppSession = 15;\n/**\n * @enum {number}\n */\nexport const LaunchNewContext = 16;\n/**\n * @enum {number}\n */\nexport const PersistAppSession = 17;\n/**\n * @enum {number}\n */\nexport const EnablePushNotifications = 18;\n/**\n * @enum {number}\n */\nexport const EnableBluetooth = 19;\n/**\n * @enum {number}\n */\nexport const CheckBluetoothPermissions = 20;\n/**\n * @enum {number}\n */\nexport const StartBleAdvertising = 21;\n/**\n * @enum {number}\n */\nexport const StopBleAdvertising = 22;\n","export enum WebsocketMessageType {\n event = 'event',\n monitoringEvent = 'monitoringEvent',\n propertyChange = 'propertyChange',\n geofenceCrossing = 'geofenceCrossing',\n statusUpdate = 'statusUpdate'\n}\n\n/**\n * @classdesc\n * Base message class for websockets\n * Base abstract for containing message data to be processed by message handlers\n */\nexport default abstract class BaseWebsocketMessage {\n constructor(unitId: string, deviceId: string) {\n this.unitId = unitId;\n this.deviceId = deviceId;\n }\n\n /**\n * The Unit ID that the message applies to.\n */\n unitId: string;\n\n /**\n * The Device ID that the message applies to.\n */\n deviceId: string;\n\n /**\n * The message type.\n */\n abstract type: string;\n\n /**\n * The message subtype.\n */\n subtype = '';\n\n /**\n * The message value.\n */\n value?: string;\n\n /**\n * Additional message data.\n */\n subvalue?: string;\n}\n","import BaseWebsocketMessage, { WebsocketMessageType } from './base.ts';\n\n/**\n * @classdesc\n * Message class for SerializedEvent websocket message\n */\nexport default class EventWebsocketMessage extends BaseWebsocketMessage {\n constructor(\n unitId: string,\n deviceId: string,\n eventType: string,\n eventValue: string,\n qStringForExtraData: string,\n eventDateUtc: string\n ) {\n super(unitId, deviceId);\n\n Object.assign(this, {\n subtype: eventType,\n value: eventValue,\n subvalue: qStringForExtraData,\n eventDateUtc\n });\n }\n\n type = WebsocketMessageType.event;\n\n /**\n * The timestamp of the event.\n */\n declare eventDateUtc: string;\n}\n","import BaseWebsocketMessage, { WebsocketMessageType } from './base.ts';\n\n/**\n * @classdesc\n * Message class for SerializedGeofenceCrossing websocket message\n */\nexport default class GeofenceCrossingWebsocketMessage extends BaseWebsocketMessage {\n constructor(unitId: string, deviceId: string, fenceId: string, isInsideNow: string) {\n super(unitId, deviceId);\n\n Object.assign(this, {\n value: fenceId,\n subvalue: isInsideNow\n });\n }\n\n type = WebsocketMessageType.geofenceCrossing;\n}\n","import BaseWebsocketMessage, { WebsocketMessageType } from './base.ts';\n\n/**\n * @classdesc\n * Message class for SerializedMonitoringEvent websocket message\n */\nexport default class MonitoringEventWebsocketMessage extends BaseWebsocketMessage {\n constructor(unitId: string, deviceId: string, eventType: string, correlatedEventId: string) {\n super(unitId, deviceId);\n\n Object.assign(this, {\n subtype: eventType,\n subvalue: correlatedEventId\n });\n }\n\n type = WebsocketMessageType.monitoringEvent;\n}\n","import BaseWebsocketMessage, { WebsocketMessageType } from './base.ts';\n\n/**\n * @classdesc\n * Message class for SerializedPropertyChange websocket message\n */\nexport default class PropertyChangeWebsocketMessage extends BaseWebsocketMessage {\n constructor(unitId: string, deviceId: string, property: string, propertyValue: string) {\n super(unitId, deviceId);\n\n Object.assign(this, {\n subtype: property,\n value: propertyValue\n });\n }\n\n type = WebsocketMessageType.propertyChange;\n}\n","import BaseWebsocketMessage, { WebsocketMessageType } from './base.ts';\n\n/**\n * @classdesc\n * Message class for SerializedStatusUpdate websocket message\n */\nexport default class StatusUpdateWebsocketMessage extends BaseWebsocketMessage {\n constructor(unitId: string, deviceId: string, newState: string, flagMask: string) {\n super(unitId, deviceId);\n\n Object.assign(this, {\n value: newState,\n subvalue: flagMask\n });\n }\n\n type = WebsocketMessageType.statusUpdate;\n}\n","import { isPresent } from '@ember/utils';\nimport EventWebsocketMessage from './event.ts';\nimport GeofenceCrossingWebsocketMessage from './geofencecrossing.ts';\nimport MonitoringEventWebsocketMessage from './monitoringevent.ts';\nimport PropertyChangeWebsocketMessage from './propertychange.ts';\nimport StatusUpdateWebsocketMessage from './statusupdate.ts';\n\nimport type { IncomingMessage } from '../../services/websocket.ts';\nimport type BaseWebsocketMessage from './base.ts';\n\n/**\n * Helper function for Ember.NativeArray to determine if a variable's type is not undefined.\n * Differs from isPresent in that it returns true for empty strings, boolean false, etc.\n */\nfunction isDefined(variable: string | undefined): boolean {\n return variable !== undefined;\n}\n\n/**\n * Websocket message factory function.\n * Takes raw websocket data and outputs an internal websocket message object\n */\nexport function getWebsocketMessage(data: IncomingMessage): BaseWebsocketMessage | undefined {\n const { UnitId: unitId } = data,\n deviceId = unitId + '-' + data.DeviceId;\n\n if ([unitId, deviceId].every(isPresent)) {\n const {\n EventType: eventType,\n EventValue: eventValue,\n EventDateUtc: eventDateUtc,\n QstringForExtraData: qStringForExtraData,\n CorrelatedEventId: correlatedEventId,\n Property: property,\n PropertyValue: propertyValue,\n FenceId: fenceId,\n IsInsideNow: isInsideNow,\n NewState: newState,\n FlagMask: flagMask\n } = data;\n\n if ([eventType, eventValue, qStringForExtraData, eventDateUtc].every(isDefined)) {\n return new EventWebsocketMessage(\n unitId,\n deviceId,\n eventType,\n eventValue,\n qStringForExtraData,\n eventDateUtc\n );\n }\n\n if ([eventType, correlatedEventId].every(isDefined)) {\n return new MonitoringEventWebsocketMessage(unitId, deviceId, eventType, correlatedEventId);\n }\n\n if ([property, propertyValue].every(isDefined)) {\n return new PropertyChangeWebsocketMessage(unitId, deviceId, property, propertyValue);\n }\n\n if ([fenceId, isInsideNow].every(isDefined)) {\n return new GeofenceCrossingWebsocketMessage(unitId, deviceId, fenceId, isInsideNow);\n }\n\n if ([newState, flagMask].every(isDefined)) {\n return new StatusUpdateWebsocketMessage(unitId, deviceId, newState, flagMask);\n }\n\n return undefined;\n }\n\n return undefined;\n}\n","import { A } from '@ember/array';\nimport { later } from '@ember/runloop';\nimport Service, { inject as service } from '@ember/service';\nimport { GET } from '@adc/ajax/services/adc-ajax';\nimport {\n NormalClosure,\n EndpointUnavailable as Establish,\n PolicyViolation as RejectedToken\n} from '../enums/Websockets.ts';\nimport { getWebsocketMessage } from '../websockets/messages/utils.ts';\n\nimport type { Registry as ServiceRegistry } from '@ember/service';\nimport type BaseWebsocketMessageHandler from '../websockets/base-handler.ts';\n\nexport interface IncomingMessage {\n UnitId: string;\n DeviceId: string;\n [key: string]: string;\n}\n\n/**\n * Event Code for mock-socket stopping\n */\nconst TestClosure = 0;\n\n/**\n * @classdesc\n *\n * Websocket service for Real Time Updates\n * Handles relaying websocket messages to message handlers for updating device state in data stores\n */\nexport default class WebsocketService extends Service {\n @service declare store: ServiceRegistry['store'];\n @service declare ajax: ServiceRegistry['adc-ajax'];\n @service declare envSettings: ServiceRegistry['env-settings'];\n\n /**\n * A websocket instance used for connecting to the server\n */\n socket?: WebSocket;\n\n /**\n * Endpoint address for websocket service\n */\n endpoint?: string;\n\n /**\n * Authentication token for websocket service\n */\n authToken?: string;\n\n /**\n * Keeps track of the number of reconnection attempts so the reconnection timeout can be delayed\n * exponentially the longer the websocket server is offline.\n */\n reconnectionAttempts = 0;\n\n /**\n * A list of message handlers that will be passed messages as they are received.\n */\n messageHandlers: BaseWebsocketMessageHandler[] = [];\n\n /**\n * Exponential Backoff Delay\n *\n * Implements exponential backoff delay to randomly space out reconnection attempts between many connected clients\n * so that they don't all hammer the server by using the same predefined set of timeouts.\n */\n static getReconnectionTimeout(attempts: number): number {\n const ceiling = 50,\n initialMax = 10,\n exponentialBase = 1.5,\n exponentialDelay = 5,\n max = Math.min(Math.pow(exponentialBase, attempts - exponentialDelay) + initialMax, ceiling),\n min = 5,\n range = max - min;\n\n // Max here so that we always stay at least above minimum timeout, if somehow the exponential results below that.\n return Math.floor(Math.max(Math.random() * range + min, min) * 1000);\n }\n\n /**\n * Called to start the websocket service.\n */\n async start(messageHandlers: { new (owner: WebsocketService): BaseWebsocketMessageHandler }[]): Promise {\n // Verify that websockets are supported by browser\n if (!window.WebSocket) {\n return;\n }\n\n this.messageHandlers = messageHandlers.map((C) => new C(this));\n // Open Websocket Connection\n await this.establishConnection(Establish);\n }\n\n /**\n * In event of abrupt closure attempt to reconnect the websocket every 15 seconds until limit extends time or\n * websocket connection is re-established\n */\n async establishConnection(eventCode: number): Promise {\n // Destroy websocket object to prevent collecting multiple websockets in memory\n if (this.socket) {\n this.socket.close(NormalClosure);\n }\n\n // Clean close, stop trying to connect\n if (eventCode === NormalClosure || eventCode === TestClosure) {\n return;\n }\n\n // Get a new token if rejected with code 1008\n if (eventCode === RejectedToken) {\n this.authToken = undefined;\n }\n\n await this.socketConnect();\n }\n\n /**\n * Connect the socket and if connection is valid, assign message and onclose handlers\n */\n async socketConnect(): Promise {\n // Make sure we have a valid token\n if (!this.authToken) {\n if (!(await this.retrieveToken())) {\n return;\n }\n }\n\n this.socket = new WebSocket(this.endpoint + '?f=1&auth=' + this.authToken);\n\n this.socket.addEventListener('open', () => {\n this.reconnectionAttempts = 0;\n });\n\n this.socket.addEventListener('close', (event) => {\n this.reconnectionAttempts++;\n\n const delay = WebsocketService.getReconnectionTimeout(this.reconnectionAttempts);\n\n // This is breaking unit tests for some reason without the try catch...\n try {\n if (!this.envSettings.isTestEnvironment()) {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n later(this, this.establishConnection, event.code, delay);\n }\n // eslint-disable-next-line no-empty\n } catch {}\n });\n\n this.socket.addEventListener('message', (event) => {\n this.handleMessage(event);\n });\n }\n\n /**\n * Retrieves JWT token to authenticate against Websocket Server\n */\n private async retrieveToken(): Promise {\n try {\n const tokenResponse = await this.ajax.apiRequest<{\n value: string;\n metaData: {\n endpoint: string;\n };\n }>('websockets/token', undefined, null, GET);\n\n this.authToken = tokenResponse.value;\n this.endpoint = tokenResponse.metaData.endpoint;\n } catch {\n return false;\n }\n\n return this.authToken?.length !== 0 && this.endpoint?.length !== 0;\n }\n\n /**\n * Translates raw data into an internal websocket message, hands message to message handlers\n */\n handleMessage(event: MessageEvent): void {\n let data: IncomingMessage = { UnitId: '', DeviceId: '' };\n\n // Parse JSON data packet, don't explode for malformed JSON\n try {\n data = JSON.parse(event.data);\n } catch {\n // Do nothing, malformed JSON\n return;\n }\n\n /**\n * Internal websocket message format for message handlers\n */\n const message = getWebsocketMessage(data);\n\n if (message) {\n const handlers = A(this.messageHandlers.filter((handler) => handler.willHandle(message)));\n\n // Let each message handler attempt to process the message.\n handlers.invoke('process', message);\n }\n }\n}\n","/**\n * This enum is a TS representation of WebsocketCloseStatusEnum and it must be manually kept in sync w/ the C# version.\n *\n * @module\n */\n\nexport const NormalClosure = 1000;\n\nexport const EndpointUnavailable = 1001;\n\nexport const PolicyViolation = 1008;\n","import Transform from '@ember-data/serializer/transform';\nimport { A } from '@ember/array';\n\n/**\n * @classdesc\n *\n * A transform that allows specifying type 'array' for use with Ember Data.\n */\nexport default class ArrayTransform extends Transform {\n /**\n * Converts the deserialized data to an array.\n */\n serialize(deserialized: ReturnType['deserialize']> | null): T[] | null {\n return deserialized ? deserialized.toArray() : null;\n }\n\n /**\n * Converts an array from a server side response into an {@link Ember.Array}.\n */\n deserialize(array: T[]): ReturnType> {\n return A(array);\n }\n}\n","// eslint-disable-next-line ember/use-ember-data-rfc-395-imports\nimport DS from 'ember-data';\n\n/**\n * @classdesc\n *\n * A transform that allows boolean to have null values.\n */\nexport default class NullableBoolean extends DS.BooleanTransform {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n deserialize(serialized: boolean | null): boolean | null {\n // If the serialized value is null, then deserialize as null.\n if (serialized === null) {\n return null;\n }\n\n // Else wise deserialize it like a normal boolean.\n return super.deserialize(serialized, {});\n }\n\n serialize(deserialized: boolean | null): boolean | null {\n // If the deserialize value is null, then serialize as null.\n if (deserialized === null) {\n return null;\n }\n\n // Else wise serialize it like a normal boolean.\n return super.serialize(deserialized, {});\n }\n}\n","import { getCookie } from '@adc/ember-utils/utils/browser-helpers';\nimport AdapterError, { InvalidError } from '@ember-data/adapter/error';\nimport RESTAdapter from '@ember-data/adapter/rest';\nimport { typeOf } from '@ember/utils';\nimport { ValidationError } from '@adc/ajax/enums/AjaxResponseHttpCode';\nimport { getErrorWithStatusCode } from '@adc/ajax/utils/errors';\n\nimport type BaseModel from '../models/base-model.ts';\n\ninterface HeaderProps {\n Accept: string;\n SourcePath: string;\n SourceQueryParams: string;\n [key: string]: any;\n}\n\n/**\n * @classdesc\n * Alarm.com's base adapter implementation.\n */\nexport default class BaseAdapter extends RESTAdapter {\n // region adapter options for retrieving lists of models\n\n // Tells the adapter that it can bundle up ids in one request, as necessary.\n coalesceFindRequests = true;\n\n // endregion\n\n /**\n * Request headers appended to each request.\n */\n get headers(): HeaderProps {\n const { pathname, search } = window.location;\n\n return {\n Accept: 'application/vnd.api+json',\n AjaxRequestUniqueKey: getCookie('afg'),\n SourcePath: pathname,\n SourceQueryParams: search\n };\n }\n\n /** @override */\n handleResponse(status: number, headers: any, payload: any, requestData: any): any {\n let jsonPayload;\n\n try {\n // Make sure payload is an object (likely remove once https://github.com/emberjs/data/issues/6936 is fixed).\n jsonPayload = typeOf(payload) === 'string' ? JSON.parse(payload) : payload;\n } catch (ex) {\n jsonPayload = payload;\n }\n\n const response = super.handleResponse(status, headers, jsonPayload, requestData) as any;\n\n // Is this an error?\n if (response && response.isAdapterError) {\n const { errors } = jsonPayload;\n\n // Is this a validation error?\n if (status === ValidationError) {\n return new InvalidError(errors);\n }\n\n // Do we care about this error?\n const statusData = getErrorWithStatusCode(status);\n if (statusData) {\n const {\n code = status,\n name = response.name,\n message = response.message,\n title = response.description\n } = statusData;\n\n // Return adapter error with our custom values.\n return Object.assign(\n {\n number: code,\n description: title,\n name,\n errors\n },\n new AdapterError(message)\n );\n }\n }\n\n return response;\n }\n\n /**\n * This method is used to indicate when there is a network connection error. It can be overridden in your project to handle this error however you wish.\n */\n noInternetConnection(): any {\n return null;\n }\n\n /**\n * Submits custom api call that is not the standard REST verb.\n *\n * This serializes `rawData` into JSON, so do not pass in a JSON string for `rawData` or else it will be doubly serialized.\n * Instead, just pass in the un-serialized object itself.\n */\n submitCustomApiCall(model: BaseModel, verb: string, method = 'POST', rawData: any): Promise {\n // Does the raw data have a serialize method?\n if (\n rawData !== null &&\n typeof rawData === 'object' &&\n 'serialize' in rawData &&\n typeof rawData.serialize === 'function'\n ) {\n rawData = rawData.serialize();\n }\n\n // For GET methods, the data gets appended to the URI query string. We don't want JSON there, so just leave the data as is.\n return this.ajax(\n // This is how we fetch the modelName, but we need to cast it due to ember-data type support being far behind\n `${this.buildURL((model.constructor as unknown as { modelName: string }).modelName, model.id)}/${verb}`,\n method,\n rawData !== undefined ? { data: rawData } : undefined\n );\n }\n}\n","import BaseAdapter from './base-adapter.ts';\n\n/**\n * @class adapters.JsonApiContentAdapter\n */\nexport default class BaseJsonApiContentAdapter extends BaseAdapter {\n /** @override */\n get headers() {\n return {\n ...super.headers,\n 'content-type': 'application/vnd.api+json'\n };\n }\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your adapters.\ndeclare module 'ember-data/types/registries/adapter' {\n export default interface AdapterRegistry {\n 'base-json-api-content-adapter': BaseJsonApiContentAdapter;\n }\n}\n","import { tracked } from '@glimmer/tracking';\nimport { computed } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport isBefore from 'date-fns/isBefore';\nimport RSVP from 'rsvp';\nimport { NotSet } from '../enums/MicroApi.ts';\nimport BaseJsonApiContentAdapter from './base-json-api-content-adapter.ts';\n\nimport type Store from '@ember-data/store';\n// eslint-disable-next-line ember/use-ember-data-rfc-395-imports\nimport type DS from 'ember-data';\nimport type ModelRegistry from 'ember-data/types/registries/model';\nimport type BaseModel from '../models/base-model';\nimport type MicroApiEndpoint from '../models/micro-api-endpoint';\nimport type ContextManager from '../services/context-manager';\n\ninterface HeaderProps {\n Accept: string;\n Authorization: string;\n SourcePath: string;\n SourceQueryParams: string;\n TokenVersion: string;\n 'content-type': string;\n}\n\n/**\n * @classdesc\n * Custom Adapter for Micro API services\n */\nexport default class BaseMicroApiAdapter extends BaseJsonApiContentAdapter {\n @service declare contextManager: ContextManager;\n @service declare store: Store;\n\n /**\n * An endpoint item is selected per adapter based on this value\n */\n microApiEnum = NotSet;\n\n /**\n * The MicroApi endpoint path name\n */\n microApiEndpointPath = '';\n\n /**\n * Get the data for this endpoint\n */\n @tracked\n endpointData?: MicroApiEndpoint;\n\n /**\n * The token version\n */\n @tracked\n tokenVer?: string;\n\n /** @override */\n namespace = '';\n\n /** @override */\n host = '';\n\n /** @override */\n @computed('endpointData.encodedJwtToken', 'tokenVer')\n get headers(): HeaderProps {\n return this.buildHeaderProps(this.endpointData?.encodedJwtToken ?? '');\n }\n\n /** @override */\n findAll(\n store: Store,\n type: ModelRegistry[K],\n sinceToken: string,\n snapshot: DS.SnapshotRecordArray\n ): RSVP.Promise {\n return new RSVP.Promise((resolve, reject) => {\n this.ensureEndpointAndToken()\n .then(() => super.findAll(store, type, sinceToken, snapshot))\n .then(resolve)\n .catch(reject);\n });\n }\n\n /** @override */\n findRecord(\n store: Store,\n type: ModelRegistry[K],\n id: string,\n snapshot: DS.Snapshot\n ): RSVP.Promise {\n return new RSVP.Promise((resolve, reject) => {\n this.ensureEndpointAndToken()\n .then(() => super.findRecord(store, type, id, snapshot))\n .then(resolve)\n .catch(reject);\n });\n }\n\n /** @override */\n query(\n store: Store,\n type: ModelRegistry[K],\n query: Record\n ): RSVP.Promise {\n return new RSVP.Promise((resolve, reject) => {\n this.ensureEndpointAndToken()\n .then(() => super.query(store, type, query))\n .then(resolve)\n .catch(reject);\n });\n }\n\n /** @override */\n queryRecord(\n store: Store,\n type: ModelRegistry[K],\n query: Record\n ): RSVP.Promise {\n return new RSVP.Promise((resolve, reject) => {\n this.ensureEndpointAndToken()\n .then(() => super.queryRecord(store, type, query))\n .then(resolve)\n .catch(reject);\n });\n }\n\n /** @override */\n updateRecord(\n store: Store,\n type: ModelRegistry[K],\n snapshot: DS.Snapshot\n ): RSVP.Promise {\n return new RSVP.Promise((resolve, reject) => {\n this.ensureEndpointAndToken()\n .then(() => super.updateRecord(store, type, snapshot))\n .then(resolve)\n .catch(reject);\n });\n }\n\n /** @override */\n createRecord(\n store: Store,\n type: ModelRegistry[K],\n snapshot: DS.Snapshot\n ): RSVP.Promise {\n return new RSVP.Promise((resolve, reject) => {\n this.ensureEndpointAndToken()\n .then(() => super.createRecord(store, type, snapshot))\n .then(resolve)\n .catch(reject);\n });\n }\n\n /** @override */\n deleteRecord(\n store: Store,\n type: ModelRegistry[K],\n snapshot: DS.Snapshot\n ): RSVP.Promise {\n return new RSVP.Promise((resolve, reject) => {\n this.ensureEndpointAndToken()\n .then(() => super.deleteRecord(store, type, snapshot))\n .then(resolve)\n .catch(reject);\n });\n }\n\n /** @override */\n submitCustomApiCall(model: BaseModel, verb: string, method = 'POST', rawData: any): Promise {\n return new RSVP.Promise((resolve, reject) => {\n this.ensureEndpointAndToken()\n .then(() => {\n super\n .submitCustomApiCall(model, verb, method, rawData)\n .then((value) => resolve(value))\n .catch(() => reject());\n })\n .catch(() => reject());\n });\n }\n\n /** @override */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n pathForType(_modelName: K): string {\n return this.microApiEndpointPath;\n }\n\n /**\n * Check that we have a valid endpoint and token, get them if we don't\n */\n protected async ensureEndpointAndToken(): Promise {\n if (!this.endpointData || !this.tokenVer) {\n const microApiData =\n this.store.peekAll('micro-api-data-item').firstObject ??\n (await this.store.findAll('micro-api-data-item')).firstObject,\n endpointData = microApiData?.microApiEndpoints.find(\n (endpoint: MicroApiEndpoint) => endpoint.id === String(this.microApiEnum)\n );\n\n Object.assign(this, {\n endpointData,\n namespace: this.buildNamespace(endpointData?.namespace ?? ''),\n host: this.buildHost(endpointData?.baseApiEndpoint ?? ''),\n tokenVer: microApiData?.microApiTokenVer\n });\n }\n\n const now = new Date();\n // We want to give 60 seconds of padding before expiration time to not hit any race conditions\n if (this.endpointData && isBefore(this.endpointData.jwtExpirationDate, now.setSeconds(now.getSeconds() - 60))) {\n await this.endpointData.reload();\n }\n }\n\n /**\n * Build the properties for the headers\n */\n private buildHeaderProps(token: string): HeaderProps {\n const { pathname, search } = window.location;\n\n return {\n Accept: 'application/vnd.api+json',\n Authorization: `Bearer ${token}`,\n SourcePath: pathname,\n SourceQueryParams: search,\n TokenVersion: this.tokenVer ?? '',\n 'content-type': 'application/vnd.api+json'\n };\n }\n\n /**\n * Determine the namespace based on if versioning is provided from the endpoint data or overridden manually\n * in the adapter.\n */\n protected buildNamespace(namespaceData: string): string {\n return namespaceData || this.namespace;\n }\n\n /**\n * Determine the host url. Must start with 'https://' to avoid automatic CustomerDotNet route prefixing.\n */\n protected buildHost(hostData: string): string {\n return hostData && !hostData.startsWith('https://') ? `https://${hostData}` : hostData;\n }\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your adapters.\ndeclare module 'ember-data/types/registries/adapter' {\n export default interface AdapterRegistry {\n 'base-micro-api-adapter': BaseMicroApiAdapter;\n }\n}\n","/**\n * @module\n */\n/**\n * @enum {number}\n */\nexport const None = 0;\n/**\n * @enum {number}\n */\nexport const EnterpriseToSingleSystem = 1;\n/**\n * @enum {number}\n */\nexport const SingleSystemToEnterprise = 2;\n/**\n * @enum {number}\n */\nexport const EnterpriseToGroup = 3;\n/**\n * @enum {number}\n */\nexport const GroupToEnterprise = 4;\n","/**\n * @module\n */\n/**\n * @enum {number}\n */\nexport const PresenceStateApi = 1;\n/**\n * @enum {number}\n */\nexport const DiscoverApi = 7;\n/**\n * @enum {number}\n */\nexport const NotSet = -1;\n/**\n * @enum {number}\n */\nexport const IntercomApi = 11;\n/**\n * @enum {number}\n */\nexport const PointCentralCommunityApi = 16;\n\n/**\n * @enum {number}\n */\nexport const MassNotificationsApi = 17;\n","/**\n * @module\n *\n * Corresponds to an enum in the mobile code that dictates which native app pages can be\n * transitioned to from Ember WebViews.\n *\n * WARNING: This MUST be kept in sync with the copy in the mobile app code.\n *\n * When editing this, update this Confluence page:\n * https://confluence.corp.adcinternal.com/display/SE/Supported+Native+Bridge+Features\n */\n\n/**\n * @enum {number}\n */\nexport const Unknown = 0;\n\n/**\n * @enum {number}\n */\nexport const Home = 1;\n\n/**\n * @enum {number}\n */\nexport const DoorbellCameraInstall = 2;\n\n/**\n * @enum {number}\n */\nexport const VideoCameraInstall = 3;\n\n/**\n * @enum {number}\n */\nexport const Thermostats = 4;\n\n/**\n * @enum {number}\n */\nexport const PanelSettings = 5;\n\n/**\n * @enum {number}\n */\nexport const ThermostatSettings = 6;\n\n/**\n * @enum {number}\n */\nexport const GeoServicesSettings = 7;\n\n/**\n * @enum {number}\n */\nexport const VideoSettings = 8;\n\n/**\n * @enum {number}\n */\nexport const DoorbellSettings = 9;\n\n/**\n * @enum {number}\n */\nexport const AudioSettings = 10;\n\n/**\n * @enum {number}\n * @deprecated Use CarSettingsV2.\n */\nexport const CarSettings = 11;\n\n/**\n * @enum {number}\n */\nexport const Video = 12;\n\n/**\n * @enum {number}\n */\nexport const CarSettingsV2 = 13;\n\n/**\n * @enum {number}\n */\nexport const NestVideoSettings = 14;\n\n/**\n * @enum {number}\n */\nexport const Fleet = 15;\n\n/**\n * @enum {number}\n */\nexport const Ambient = 16;\n\n/**\n * @enum {number}\n */\nexport const AppearanceSettings = 17;\n\n/**\n * @enum {number}\n */\nexport const Shortcuts = 18;\n\n/**\n * @enum {number}\n */\nexport const Scenes = 19;\n\n/**\n * @enum {number}\n */\nexport const SmartArming = 20;\n\n/**\n * @enum {number}\n */\nexport const Places = 21;\n\n/**\n * @enum {number}\n */\nexport const ActivityHistory = 22;\n\n/**\n * @enum {number}\n */\nexport const MatterInstall = 23;\n\n/**\n * @enum {number}\n */\nexport const SalesforceChat = 24;\n\n/**\n * @enum {number}\n */\nexport const DeviceNotifications = 25;\n\n/**\n * @enum {number}\n */\nexport const NamiInstall = 26;\n\n/**\n * @enum {number}\n */\nexport const FixDeviceMispositioned = 27;\n\n/**\n * @enum {number}\n */\nexport const EnableIntercomNotifications = 28;\n","import Model from '@ember-data/model';\nimport { get } from '@ember/object';\nimport { pluralize } from 'ember-inflector';\nimport RSVP from 'rsvp';\n\nimport type AjaxService from '@adc/ajax/services/adc-ajax';\nimport type Store from '@ember-data/store';\n// eslint-disable-next-line ember/use-ember-data-rfc-395-imports\nimport type AdapterRegistry from 'ember-data/types/registries/adapter';\n// eslint-disable-next-line ember/use-ember-data-rfc-395-imports\nimport type ModelRegistry from 'ember-data/types/registries/model';\nimport type BaseAdapter from '../adapters/base-adapter.ts';\n\ninterface RelationshipInfo {\n kind: 'belongsTo' | 'hasMany';\n}\n\n/**\n * Creates new model with defaults provided by the server. If a modelId is specified, then that will be the ID used for the new model.\n *\n * @param ajax The ADC Ajax service.\n * @param store The ember-data store.\n * @param modelName The name of the model to create.\n * @param [params] Parameters passed to the server.\n * @param [modelId] id of the newly created model if we want to specify it.\n * @param [defaultProperties] properties we want the new model to be initialized with.\n */\nexport async function createRecordWithServerDefaults(\n ajax: AjaxService,\n store: Store,\n modelName: keyof ModelRegistry,\n params: Record = {},\n modelId: number | string = -1,\n defaultProperties: Partial = {}\n): Promise {\n const defaultModel = await ajax.apiRequest<{\n data: {\n attributes: Partial;\n };\n }>(`${pluralize(String(modelName))}/getModelDefaultData`, undefined, params, 'POST');\n\n return store.createRecord(modelName, {\n ...(modelId === -1 ? {} : { id: modelId }),\n ...(defaultModel.data?.attributes ?? {}),\n ...defaultProperties\n });\n}\n\n/**\n * @classdesc\n * BaseModel class with some functionality that can be overridden.\n */\nexport default class BaseModel extends Model {\n /**\n * Should we attempt to rollback relationships on the model when rollbackAttributes() is called?\n */\n get shouldRollbackRelationships(): boolean {\n return false;\n }\n\n /**\n * Can this model be rolled back?\n */\n canBeRolledBack(): boolean {\n // Model cannot be rolled back if it is already destroyed.\n // eslint-disable-next-line @adc/ember/no-is-destroyed\n return !(this.isDestroyed || this.isDestroying);\n }\n\n /** @override */\n reload(options?: { adapterOptions?: object | undefined }): RSVP.Promise {\n // Attempting to reload the record while it is in an empty state will trigger an error in Ember.data.\n // eslint-disable-next-line ember/no-get\n if (get(this, 'isEmpty')) {\n console.warn('Record will not be reloaded while in state root.empty.');\n return RSVP.reject();\n }\n\n // Defer to base.\n return super.reload(options);\n }\n\n /**\n * Rolls back the model.\n *\n * For more complex models, this should be overridden to also roll back child models.\n *\n * @warning If you are overriding this method, you MUST make sure you first check whether the model canBeRolledBack.\n */\n rollback(): void {\n if (this.canBeRolledBack()) {\n this.rollbackAttributes();\n }\n }\n\n /**\n * Returns the model name of this model.\n */\n getModelName(): keyof ModelRegistry {\n return String(this).match(/@model:(.*)::/)?.[1] ?? '';\n }\n\n /**\n * Submits custom api call.\n *\n * @param apiMethod - Method name to call on the controller.\n * @param [httpVerb=POST] - HTTP verb to use for the api call.\n * @param [data] - Additional data to pass in the post request.\n */\n submitCustomApiCall(apiMethod: string, httpVerb = 'POST', data?: any): Promise {\n return (\n this.store.adapterFor(this.getModelName() as keyof AdapterRegistry) as unknown as BaseAdapter\n ).submitCustomApiCall(this, apiMethod, httpVerb, data);\n }\n\n /**\n * Overrides native function to include rollback of relationships\n *\n * @override\n */\n rollbackAttributes() {\n super.rollbackAttributes();\n\n if (this.shouldRollbackRelationships) {\n this.rollbackRelationships();\n }\n }\n\n /**\n * Returns the list of records for a specified relationship property on this model.\n */\n private getRelationshipRecords(name: Exclude, { kind }: RelationshipInfo): Model[] {\n if (kind === 'belongsTo') {\n const value = this.belongsTo(name).value();\n return value ? [value] : [];\n }\n\n return (this.hasMany(name).value() ?? []) as Model[];\n }\n\n /**\n * Rollbacks all the record of the specified relationship property of this model.\n */\n private rollbackRelationship(name: Exclude, relDescriptor: RelationshipInfo): void {\n this.getRelationshipRecords(name, relDescriptor).forEach((record) => {\n // Call rollback for the records which inherit from base-model class.\n if (record instanceof BaseModel) {\n record.rollback();\n return;\n }\n\n // Call rollbackAttributes from the ember model class otherwise.\n record.rollbackAttributes();\n });\n }\n\n /**\n * Rolls back all the fetched relationships on this model.\n */\n rollbackRelationships(): void {\n this.eachRelationship(this.rollbackRelationship, this);\n }\n}\n","import Model from '@ember-data/model';\nimport { attr } from '@ember-data/model';\nimport { computed } from '@ember/object';\n\n/**\n * The default ISO locale code (en-US).\n */\nexport const defaultIsoCode = 'en-US';\n\n/**\n * Notes:\n *
    \n *
  • The id here translates to CultureEnum on the backend, and so does the cultureId
  • \n *
  • Default values are for english culture, so that if something goes terribly wrong, things do not just crap out
  • \n *
\n */\nexport default class LocaleModel extends Model {\n /**\n * CultureId corresponds to CultureEnum on the backend\n */\n @computed('id')\n get cultureId(): string | number {\n return this.id || 1;\n }\n\n /**\n * Name for displaying for this culture\n */\n @attr('string', { defaultValue: 'English' })\n declare displayName: string;\n\n /**\n * ISO code for the locale\n */\n @attr('string', { defaultValue: defaultIsoCode })\n declare isoCode: string;\n\n /**\n * Language for this culture\n */\n @attr('string', { defaultValue: 'en' })\n declare language: string;\n\n /**\n * Does the week start on Sunday for this locale?\n */\n @attr('boolean', { defaultValue: true })\n declare weekStartsOnSunday: boolean;\n}\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n locale: LocaleModel;\n }\n}\n","import { computed } from '@ember/object';\nimport EmberRoute from '@ember/routing/route';\nimport { once } from '@ember/runloop';\nimport { inject as service } from '@ember/service';\n\n/**\n * Updates the titles for the current route.\n *\n * @private\n * @instance\n * @memberof routes.AdcBaseRoute\n */\nexport function updateRouteInfo() {\n // Assume there is no parent route path.\n let { queryParams, routeItem, routeName, fullRouteName } = this;\n\n // If the routeName is undefined, use the fullRouteName.\n if (routeName !== fullRouteName) {\n routeName = fullRouteName;\n }\n\n // Push new route data to the service.\n this.contextManager.setCurrentRouteData(\n {\n routeItem,\n routeName,\n queryParams,\n route: this,\n pageTitle: this.getRouteItemTitle()\n },\n this.wasReplaceTransition\n );\n}\n\n/**\n * Classes to define the max width of the content on a page.\n *\n * @static\n *\n * @type {string}\n */\nexport const PAGE_MAX_WIDTH_MEDIUM = 'page-max-width-md';\n\n/**\n * Returns a query parameter configuration object.\n *\n * @param {String} [type='number'] Optional query parameter type.\n *\n * @returns {{refreshModel: boolean, replace: boolean, type: String}}\n *\n * @memberof @adc/app-infrastructure/routes/base-route\n */\nexport function getQueryParam(type = 'number') {\n return {\n refreshModel: true,\n replace: true,\n type\n };\n}\n\n/**\n * @classdesc\n * Base route class that every route should extend from.\n *\n * @abstract\n * @class routes.AdcBaseRoute\n * @extends Ember.Route\n */\n// Do not copy this deprecated usage. If you see this, please fix it\n// eslint-disable-next-line ember/no-classic-classes\nexport default EmberRoute.extend(\n /** @lends routes.AdcBaseRoute */ {\n // region Services\n\n contextManager: service(),\n performanceMonitor: service(),\n intl: service(),\n\n // endregion\n\n // region Route Info\n\n /**\n * Defines the id of this route. When defined, the routes.AdcBaseRoute can do a lot of work behind the scenes.\n * However, for some routes this won't be relevant or possible. For those, the canUserAccess function must be overridden.\n *\n * Note: This value corresponds to the CustomerPageUrlEnum.\n *\n * @type {number|undefined}\n */\n routeId: undefined,\n\n /**\n * RouteItem associated with this route.\n *\n * @type {Model}\n */\n get routeItem() {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line @adc/ember/no-context-manager-get-route\n return this._routeItem ?? this.contextManager.getRouteItem(this.routeId);\n },\n\n set routeItem(value) {\n this._routeItem = value;\n },\n\n /**\n * Returns the route item title.\n *\n * @returns {String}\n */\n getRouteItemTitle() {\n // Use static page title from i18n.\n return this.routeItem?.pageTitle || this.intl.tc(this, 'pageTitle');\n },\n\n /**\n * Sends information about the current route to the application route.\n */\n sendRouteInfoToApp() {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n once(this, updateRouteInfo);\n },\n\n // endregion\n\n // region Query Parameter serialization\n\n /** @override */\n serializeQueryParam(value, urlKey, defaultValueType) {\n if (defaultValueType === 'date' && value && value instanceof Date) {\n return value.toISOString();\n }\n\n return this._super(...arguments);\n },\n\n /** @override */\n deserializeQueryParam(value, urlKey, defaultValueType) {\n if (defaultValueType === 'date' && value && !(value instanceof Date)) {\n return new Date(value);\n }\n\n return this._super(...arguments);\n },\n\n // endregion\n\n // region Page Width\n\n /**\n * The name of the class to be added in order to define the max width of the content on a page.\n *\n * @function\n * @type {string}\n */\n pageMaxWidth: computed('isMediumWidthPage', function () {\n return this.isMediumWidthPage ? PAGE_MAX_WIDTH_MEDIUM : '';\n }),\n\n /**\n * Flag indicating whether or not the page content max width class should be added.\n *\n * @type {boolean}\n */\n isMediumWidthPage: false,\n\n // endregion\n\n // region Hooks\n\n beforeModel(transition) {\n // We use transition.targetName because we are not yet in the destination route. Also the router service does not yet have the routeName defined.\n this.performanceMonitor.markRouteInitialized(transition.targetName, transition);\n\n // We shouldn't use kpi threshold metrics unless we separately activate it for a route.\n this.performanceMonitor.setUseKpiThresholdMetrics(false);\n },\n\n // endregion\n\n // region Actions\n\n /** @ignore */\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-actions-hash\n actions: /** @lends BaseRoute# */ {\n didTransition() {\n // Update application router with route information.\n this.sendRouteInfoToApp();\n }\n }\n\n // endregion\n }\n);\n","/**\n * Route name for the legacy page.\n * @note Making it a constant, because we use it in a bunch of places.\n */\nexport const LEGACY_PAGE_ROUTE_NAME = 'legacy-page';\n\n/**\n * Classes to define the max width of the content on a page.\n */\nexport const PAGE_MAX_WIDTH_MEDIUM = 'page-max-width-md';\n\n/**\n * Parses url into segments.\n *\n * @note Returns undefined if URL was not well formed.\n */\nexport function parseUrl(fullUrl: string): { url: string; search?: string; hash?: string } | undefined {\n // Parse URL into segments.\n const [match, url, search, hash] = fullUrl.match(new RegExp('^(.[^?#]+)([?].[^#]*)?(#.*)?')) || [];\n\n // Is URL malformed?\n if (!match) {\n return undefined;\n }\n\n return {\n url,\n search,\n hash\n };\n}\n","import CommonSerializer from './common-serializer.ts';\n\n/* eslint-disable ember/use-ember-data-rfc-395-imports */\nimport type DS from 'ember-data';\nimport type ModelRegistry from 'ember-data/types/registries/model';\n\ninterface PayloadData {\n id: string;\n type: string;\n attributes?: Record;\n relationships?: Record;\n}\n\n/**\n * @classdesc\n * Alarm.com's base serializer implementation to move attributes and relationships to the root node.\n *\n * @note We should change the backend to accept true JSONApi payload so we don't need to do this.\n * We are currently dropping type attribute values because type can't coexist with the model type (which is required).\n */\nexport default class BaseSerializer extends CommonSerializer {\n serialize(snapshot: DS.Snapshot, options = {}): object {\n // Extract data from payload.\n const json = (\n super.serialize(snapshot, Object.assign({}, options, { includeId: true })) as { data: PayloadData }\n ).data,\n { attributes = {}, relationships = {} } = json;\n\n // Blow away a type attribute (if present) because it will override the model type (this demonstrates why our serialization is actually broken).\n delete attributes.type;\n\n // Move attributes to the main node.\n delete json.attributes;\n Object.assign(json, attributes);\n\n // Move relationships to the main node.\n delete json.relationships;\n Object.assign(json, Object.fromEntries(Object.entries(relationships).map(([key, value]) => [key, value.data])));\n\n return json;\n }\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your serializers.\ndeclare module 'ember-data/types/registries/serializer' {\n export default interface SerializerRegistry {\n 'base-serializer': BaseSerializer;\n }\n}\n","import JSONAPISerializer from '@ember-data/serializer/json-api';\n\n/**\n * Common serializer attributes to share between ADC's serializer implementations.\n */\nexport default class CommonSerializer extends JSONAPISerializer {\n /** @override **/\n keyForAttribute(key: string): string {\n // Return non-dasherized key.\n return key;\n }\n\n /** @override **/\n keyForRelationship(key: string): string {\n return key;\n }\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your serializers.\ndeclare module 'ember-data/types/registries/serializer' {\n export default interface SerializerRegistry {\n 'common-serializer': CommonSerializer;\n }\n}\n","import { EmbeddedRecordsMixin } from '@ember-data/serializer/rest';\nimport { singularize } from 'ember-inflector';\nimport CommonSerializer from './common-serializer.ts';\n\n/**\n * For classes that have properties that are abstract types that need to be deserialized as polymorphic,\n * this serializer will include those properties using the relations as \"data\" implementation mentioned here:\n * https://www.mediasuite.co.nz/blog/managing-relations-ember-data-json-api/\n *\n * @class serializers.PolymorphicSerializer\n * @extends serializers.CommonSerializer\n * @mixes DS.EmbeddedRecordsMixin\n */\nexport default CommonSerializer.extend(\n EmbeddedRecordsMixin,\n /** @lends serializers.PolymorphicSerializer# */ {\n isEmbeddedRecordsMixinCompatible: true,\n\n /** @override */\n payloadKeyFromModelName(modelName) {\n return singularize(modelName);\n },\n\n /** @override **/\n serialize(snapshot, options = {}) {\n // Make sure ID is included.\n options.includeId = true;\n\n const json = this._super(snapshot, options).data;\n\n // Following the data implementation specified here: https://www.mediasuite.co.nz/blog/managing-relations-ember-data-json-api/\n json.relationships = {};\n\n snapshot.eachRelationship((key) => {\n let relationship = (json.relationships[key] = {});\n relationship.data = json[key];\n });\n\n return json;\n }\n }\n);\n","/**\n * @module\n */\n/**\n * @enum {number}\n */\nexport const Other = 0;\n/**\n * @enum {number}\n */\nexport const DesktopWeb = 1;\n/**\n * @enum {number}\n */\nexport const MobileWeb = 2;\n/**\n * @enum {number}\n */\nexport const MobileApp = 3;\n/**\n * @enum {number}\n */\nexport const SmartTV = 4;\n/**\n * @enum {number}\n */\nexport const VoiceDevice = 5;\n/**\n * @enum {number}\n */\nexport const Tablet = 6;\n","/**\n * @module\n */\n/**\n * @enum {number}\n */\nexport const NotEnabled = 0;\n/**\n * @enum {number}\n */\nexport const Authenticator = 1;\n/**\n * @enum {number}\n */\nexport const SMS = 2;\n/**\n * @enum {number}\n */\nexport const Email = 4;\n","import Service from '@ember/service';\nimport * as RECOGNIZED_DEVICE_TYPES from '../enums/RecognizedDeviceType.ts';\nimport * as TWO_FACTOR_AUTHENTICATION_TYPES from '../enums/TwoFactorAuthenticationType.ts';\n\n/**\n * @classdesc\n * The base engine config service which can be inherited and extended by consuming applications.\n */\nexport default abstract class BaseEngineConfig extends Service {\n /**\n * A mapping of string keys to the actual route enum values\n */\n abstract customerPageUrlEnums: Record;\n\n /**\n * Returns the enum values for all \"types\" of 2FA authentication (e.g. SMS).\n */\n get twoFactorAuthenticationTypes(): Record {\n return TWO_FACTOR_AUTHENTICATION_TYPES;\n }\n\n /**\n * Returns the enum values for all recognized device types.\n */\n get recognizedDeviceTypes(): Record {\n return RECOGNIZED_DEVICE_TYPES;\n }\n\n /**\n * Given the route name, returns the numerical enum value of the route ID.\n *\n * @note If the value does not exist, it needs to be added to the CustomerPageUrl enum\n *\n * @param key - The name of the route we want the numerical enum value for.\n */\n getRouteIdFromRouteName(key: string): number {\n return this.customerPageUrlEnums[key];\n }\n}\n","import { addWeakListener } from '@adc/ember-utils/utils/event-listeners';\nimport { set } from '@ember/object';\nimport Service from '@ember/service';\nimport { init as initSentry, configureScope } from '@sentry/ember';\nimport {\n InvalidAntiForgeryToken,\n ValidationError,\n ProcessingError,\n ServerProcessingError,\n TwoFactorAuthenticationRequired\n} from '@adc/ajax/enums/AjaxResponseHttpCode';\nimport { CaptureConsole } from '@sentry/integrations';\n\nimport type { TEmberAjaxError } from '@adc/ajax/services/adc-ajax';\nimport type { BrowserOptions } from '@sentry/ember';\nimport type {\n Event as SentryEvent,\n EventHint,\n Breadcrumb,\n BreadcrumbHint,\n Extras,\n Primitive,\n SeverityLevel\n} from '@sentry/types';\n\ntype SentryTags = {\n [key: string]: Primitive;\n};\n\ntype ADCException =\n | TEmberAjaxError\n | {\n errors: TEmberAjaxError;\n };\n\nexport type ADCEventHint = EventHint & {\n originalException?: ADCException;\n};\n\ninterface ErrorReportingConfig extends BrowserOptions {\n serverName: string;\n showDebugInfo: boolean;\n}\n\nexport interface ErrorsToIgnore {\n propertyType: string;\n value: string;\n}\n\ninterface ErrorReportingContext {\n user: {\n id: string;\n userName?: string;\n email?: string;\n ip_address?: string;\n };\n tags: SentryTags;\n extra?: Extras;\n fingerprint?: string[];\n}\n\nexport interface ErrorReportingConfiguration {\n apiKey: string | null;\n environment: 'dev' | 'test' | 'prod';\n isEnabled: boolean;\n logErrorsToConsole: boolean;\n machineName: string;\n providerName: string;\n redirectToErrorRouteOnUnhandledError: boolean;\n scriptUrl: string | null;\n showNotificationOnError: boolean;\n}\n\ntype FakeConsole = Pick;\n\n/**\n * @note I am on purpose assigning the texts in case the levels will change.\n */\nconst LEVEL_TO_CONSOLE_FN_MAP: Record = {\n fatal: 'error',\n error: 'error',\n warning: 'warn',\n info: 'info',\n debug: 'debug',\n log: 'log'\n};\n\n/**\n * Default config options.\n */\nconst DEFAULT_CONFIG = {\n attachStacktrace: true,\n environment: 'unset',\n serverName: window.location.hostname,\n release: 'untagged'\n};\n\n/**\n * Is this a recognized server error that we should ignore sending to Sentry?\n */\nfunction isRecognizedServerError(this: BaseErrorReporting, hint: ADCEventHint): boolean {\n const code = getErrorCodeFromHint.call(this, hint);\n\n if (!code || isNaN(code)) {\n return false;\n }\n\n return [\n InvalidAntiForgeryToken,\n ValidationError,\n ProcessingError,\n ServerProcessingError,\n TwoFactorAuthenticationRequired\n ].some((errorCode) => errorCode === parseInt(String(code), 10));\n}\n\n/**\n * Attempts to get the HTTP error code from the hint object.\n */\nfunction getErrorCodeFromHint(this: BaseErrorReporting, hint: ADCEventHint): number | undefined {\n const fnLog = (text: string) =>\n logMessage.call(this, `[@adc/app-infrastructure::getErrorCodeFromHint] ${text}.`, hint);\n\n const { originalException } = hint;\n if (!originalException) {\n return;\n }\n\n let { errors } = originalException;\n if (!errors) {\n fnLog('Original exception errors do not exist');\n return;\n }\n if (errors instanceof String || typeof errors === 'string') {\n fnLog(`Original exception errors is a string: ${errors}`);\n return;\n }\n if (!Array.isArray(errors)) {\n if (!('errors' in errors)) {\n fnLog('Original exception errors is not array and does not contain errors collection.');\n return;\n }\n\n errors = errors.errors;\n }\n\n return Array.isArray(errors) && errors.length > 0 ? errors[0].code : undefined;\n}\n\n/**\n * Checks whether a specific event should be ignored or not.\n */\nfunction shouldEventBeIgnored(this: BaseErrorReporting, hint: ADCEventHint): boolean {\n return this.errorsToIgnore.some((errorToIgnore) =>\n this.getExceptionStringValue(hint, errorToIgnore.propertyType)\n .toLowerCase()\n .includes(errorToIgnore.value.toLowerCase())\n );\n}\n\n/**\n * Sets up configuration object for Sentry.\n */\nfunction getConfiguration(\n this: BaseErrorReporting,\n errorReportingConfiguration: ErrorReportingConfig\n): ErrorReportingConfig {\n return Object.assign(DEFAULT_CONFIG, errorReportingConfiguration, {\n debug: false,\n beforeSend: this.beforeSend.bind(this),\n beforeBreadcrumb: this.beforeBreadcrumb.bind(this),\n integrations: [\n new CaptureConsole({\n levels: ['warn', 'error']\n })\n ],\n ignoreErrors: [\n // Random plugins/extensions\n 'top.GLOBALS',\n // See: http://blog.errorception.com/2012/03/tale-of-unfindable-js-error.html\n 'originalCreateNotification',\n 'canvas.contentDocument',\n 'MyApp_RemoveAllHighlights',\n 'http://tt.epicplay.com',\n \"Can't find variable: ZiteReader\",\n 'jigsaw is not defined',\n 'ComboSearch is not defined',\n 'http://loading.retry.widdit.com/',\n 'atomicFindClose',\n // Facebook borked\n 'fb_xd_fragment',\n // ISP \"optimizing\" proxy - `Cache-Control: no-transform` seems to\n // reduce this. (thanks @acdha)\n // See http://stackoverflow.com/questions/4113268\n 'bmi_SafeAddOnload',\n 'EBCallBackMessageReceived',\n // See http://toolbar.conduit.com/Developer/HtmlAndGadget/Methods/JSInjection.aspx\n 'conduitPage',\n // https://forum.sentry.io/t/resizeobserver-loop-limit-exceeded/8402\n 'ResizeObserver loop limit exceeded',\n // https://stackoverflow.com/questions/49384120/resizeobserver-loop-limit-exceeded/50387233#50387233\n 'ResizeObserver loop completed with undelivered notifications'\n ],\n denyUrls: [\n // Facebook flakiness\n /graph\\.facebook\\.com/i,\n // Facebook blocked\n /connect\\.facebook\\.net\\/en_US\\/all\\.js/i,\n // Woopra flakiness\n /eatdifferent\\.com\\.woopra-ns\\.com/i,\n /static\\.woopra\\.com\\/js\\/woopra\\.js/i,\n // Chrome extensions\n /extensions\\//i,\n /^chrome:\\/\\//i,\n // Other plugins\n /127\\.0\\.0\\.1:4001\\/isrunning/i, // Cacaoweb\n /webappstoolbarba\\.texthelp\\.com\\//i,\n /metrics\\.itunes\\.apple\\.com\\.edgesuite\\.net\\//i\n ]\n });\n}\n\n/**\n * Logs Sentry message to console.\n */\nfunction logMessage(this: BaseErrorReporting, ...args: any[]): void {\n if (this.configuration?.showDebugInfo) {\n console.debug('Sentry:', ...args);\n }\n}\n\n// #endregion\n\n/**\n * @classdesc\n * Client side error reporting service.\n */\nexport default class BaseErrorReporting extends Service {\n console?: FakeConsole;\n\n /**\n * Holds Sentry configuration.\n */\n configuration?: ErrorReportingConfig;\n\n /**\n * Holds current Sentry context setup.\n */\n context?: ErrorReportingContext;\n\n constructor(owner?: object) {\n super(owner);\n\n // For some reason sentry is not catching and logging unhandled promises on its own. So we setup logging for them here.\n // We should probably upgrade Sentry and try to get it to do this on its own.\n addWeakListener(this, window, 'unhandledrejection', (evt: Event) => {\n // Not sure that we should stop propagation, but this is pre-existing behavior that I was scared to change.\n // Again, the best course of action is likely for us to try and remove this entirely and get Sentry to take care of it.\n evt.preventDefault();\n evt.stopPropagation();\n evt.stopImmediatePropagation();\n });\n }\n\n /**\n * Helper method to generate a single \"error to ignore\" configuration.\n */\n protected getETI(value: string, propertyType = 'message'): ErrorsToIgnore {\n return { propertyType, value };\n }\n\n /**\n * List of errors to ignore when processing events.\n */\n get errorsToIgnore(): ErrorsToIgnore[] {\n return [\n this.getETI('NS_ERROR_NOT_INITIALIZED', 'name'),\n this.getETI('AbortError', 'name'),\n this.getETI('The adapter operation was aborted'),\n this.getETI('The Ajax operation was aborted'),\n this.getETI('InvalidAntiForgeryToken'),\n this.getETI('Network request failed'),\n this.getETI(\"Can't execute code from a freed script\"),\n this.getETI('Permission denied'),\n // This happens when there are too many observations occurring in a single animation frame. Note: the website will not break }.\n // Some version of Chrome (i.e. 68) will throw this on the saved clips hero card when playing a saved clip }.\n // More info: https://stackoverflow.com/questions/49384120/resizeobserver-loop-limit-exceeded }\n this.getETI('ResizeObserver loop limit exceeded'),\n this.getETI('Error when processing route:'),\n // We don't care about any Chrome extension errors. There was one in particular causing lots of errors for a very small number of users:\n // https://sentry.io/organizations/alarmcom-zc/issues/887082368/?project=1377221&query=is%3Aunresolved&sort=freq&statsPeriod=14d\n this.getETI('chrome-extension://', 'stack')\n ];\n }\n\n /**\n * List of xhr requests that we do not want to send breadcrumbs to Sentry.\n *\n * This would include things like keep alive, performance monitoring, etc.\n */\n get xhrRequestsToIgnoreInBreadcrumbs(): string[] {\n return [];\n }\n\n /**\n * Gets the specified string value from the original exception as a lower case string.\n */\n getExceptionStringValue(hint: ADCEventHint = {}, propertyType: string): string {\n const { originalException, data } = hint;\n\n // NOTE: Some \"hints\" (i.e. original error objects) don't contain an originalException.\n // Instead, they have a data object containing a stack that contains the error data.\n const errorData = originalException || (data || {}).stack;\n\n if (!errorData) {\n return '';\n }\n\n // If original exception is a string itself, just return it.\n if (typeof errorData === 'string') {\n return errorData;\n }\n\n return typeof errorData[propertyType] === 'string' ? errorData[propertyType] : '';\n }\n\n /**\n * Configures the error reporting session.\n */\n configure(errorReportingConfiguration: Partial): void {\n if (this.configuration) {\n logMessage.call(this, 'Service was already initialized, skipping duplicate initialization.');\n return;\n }\n\n // Make sure that we are logging messages from the console.\n // Note: We cannot use the Debug integration because I could not figure out how to override Sentry's Logger class so\n // that it does not use console's methods because those get pushed to Sentry.\n // mockErrorReportingForConsole.call(this);\n\n const configuration = getConfiguration.call(this, errorReportingConfiguration);\n\n // Initialize service.\n initSentry(configuration);\n\n set(this, 'configuration', configuration);\n\n logMessage.call(this, 'Configured.', configuration);\n }\n\n /**\n * Set Sentry scope context.\n */\n setContext(context: ErrorReportingContext): void {\n if (!this.configuration) {\n console.error(\n \"Sentry: Service cannot set context because it was not configured yet. Please call 'configure' first.\"\n );\n return;\n }\n\n const { user, tags, extra, fingerprint } = context;\n\n // Configure Sentry scope with attributes.\n configureScope((scope) => {\n // Set default level.\n scope.setLevel('fatal');\n\n // Set user data.\n scope.setUser(user || {});\n\n // Set tags.\n if (tags) {\n scope.setTags(tags);\n }\n\n if (extra) {\n scope.setExtras(extra);\n }\n\n if (fingerprint) {\n scope.setFingerprint(fingerprint);\n }\n });\n\n set(this, 'context', context);\n\n logMessage.call(this, 'Scope context was configured', context);\n }\n\n /**\n * Method called before sending an event to Sentry.\n *\n * @param event - Sentry error event.\n * @param hint - Includes original event that caused the Sentry event.\n *\n * @returns Must return either the original Event or null. If null is returned the event is not sent to Sentry.\n */\n beforeSend(event: SentryEvent, hint: ADCEventHint = {}): SentryEvent | null {\n if (!event) {\n return null;\n }\n\n if (isRecognizedServerError.call(this, hint)) {\n logMessage.call(this, 'Dropping event because it is a processing or validation error.', event, hint);\n return null;\n }\n\n if (shouldEventBeIgnored.call(this, hint)) {\n logMessage.call(this, 'Dropping event because it should be ignored.', event, hint);\n return null;\n }\n\n // If we want to show debug info then log the original error to the console.\n if (this.configuration?.showDebugInfo) {\n logMessage.call(this, event, hint);\n\n const { level } = event;\n if (level) {\n this.console?.[LEVEL_TO_CONSOLE_FN_MAP[level]](hint.originalException);\n }\n }\n\n return event;\n }\n\n /**\n * Method called before Sentry breadcrumb is constructed.\n *\n * @param breadcrumb - Sentry breadcrumb.\n * @param hint - Includes original event that caused the Sentry event.\n *\n * @returns Must return either the original Breadcrumb or null. If null is returned the breadcrumb is not sent to Sentry.\n */\n beforeBreadcrumb(breadcrumb: Breadcrumb, hint: BreadcrumbHint): Breadcrumb | null {\n // Do not log breadcrumbs for some XHR requests.\n if (breadcrumb.category === 'xhr') {\n const url = (breadcrumb.data?.url ?? '').toLowerCase();\n\n if (this.xhrRequestsToIgnoreInBreadcrumbs.some((r) => url.includes(r))) {\n logMessage.call(this, 'Dropping breadcrumb because XHR should be ignored.', breadcrumb);\n\n return null;\n }\n }\n\n // Massage clicked ui elements so that we get better info from them for debugging.\n if (breadcrumb.category === 'ui.click') {\n const { target } = hint.event || {};\n\n if (target) {\n // The original message is a path to the element.\n const path = breadcrumb.message;\n\n const values: string[] = [];\n\n // Try to extract some data.\n [['id'], ['innerText', 'text'], ['title'], ['ariaLabel'], ['className']].forEach(([key, targetKey]) => {\n targetKey = targetKey || key;\n\n const value = target[key];\n\n if (value) {\n values.push(`${targetKey}: ${value}`);\n }\n });\n\n breadcrumb.message = `Clicked: ${target.tagName.toLowerCase()}(${values.join(', ')}) | path: ${path}`;\n }\n }\n\n return breadcrumb;\n }\n}\n","import { logMissingAbstractMember } from '@adc/ember-utils/utils/debug';\nimport Service from '@ember/service';\nimport { inject as service } from '@ember/service';\n\nimport type RouterService from '@ember/routing/router-service';\nimport type BaseRoute from '../routes/base-route';\nimport type EnvSettingsService from './env-settings.ts';\n\nexport interface RouteItem {\n pageTitle: string;\n url: string;\n isNative: boolean;\n color: string;\n icon: string;\n isNavigationItem: boolean;\n isHiddenFromNavigation: boolean;\n showOnlyIfChildRoutesExist: boolean;\n}\n\nexport interface RouteData {\n routeItem: RouteItem;\n routeName: string;\n queryParams?: Record;\n route?: BaseRoute;\n pageTitle: string;\n isWizard?: boolean;\n}\n\n/**\n * @classdesc\n * The base context manager service which can be inherited and extended by consuming applications.\n *\n * @abstract\n */\nexport default class ContextManager extends Service {\n @service declare router: RouterService;\n @service declare envSettings: EnvSettingsService;\n\n declare isAdcInternalDevDealer: boolean;\n\n /**\n * Sets the new route data for a transition.\n */ // eslint-disable-next-line @typescript-eslint/no-unused-vars\n setCurrentRouteData(_routeData: RouteData, _wasReplaceTransition: boolean): void {\n logMissingAbstractMember(this, 'setCurrentRouteData');\n }\n\n /**\n * Sets whether the current route is currently loading data.\n */ // eslint-disable-next-line @typescript-eslint/no-unused-vars\n setIsLoading(_isLoading: boolean): void {\n logMissingAbstractMember(this, 'setIsLoading');\n }\n\n /**\n * Logout logged in user from the current session.\n *\n * @param {Boolean} useReturnUrl\n */ // eslint-disable-next-line @typescript-eslint/no-unused-vars\n logout(_useReturnUrl: boolean): void {\n logMissingAbstractMember(this, 'logout');\n }\n\n /**\n * Returns the route item matching the specified routeId, or undefined if not found.\n */ // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getRouteItem(_routeId: number): RouteItem {\n logMissingAbstractMember(this, 'getRouteItem');\n return {} as RouteItem;\n }\n\n /**\n * Redirect to an external URL.\n */ // eslint-disable-next-line @typescript-eslint/no-unused-vars\n transitionToUrl(_url: string, _replaceUrl = false): void {\n logMissingAbstractMember(this, 'transitionToUrl');\n }\n\n /**\n * Resets the visited routes stack.\n */\n resetVisitedRoutesStack(): RouteItem[] {\n return [] as RouteItem[];\n }\n\n /**\n * Transitions to the previous route on the stack. Functions as the \"Back\" button.\n *\n */ // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function\n transitionToPreviousRoute(_defaultPageIfStackIsEmpty?: number): void {}\n\n /**\n * Gets the length of the visited routes array.\n */\n getVisitedRoutesStackLength(): number {\n return -1;\n }\n\n isSystemInstall(): boolean {\n return this.envSettings.isTestEnvironment()\n ? !(\n this.router.currentURL.includes('login-information') ||\n this.router.currentURL.includes('account-management/login-setup')\n )\n : this.router.rootURL.includes('system-install');\n }\n}\n","enum SameSite {\n Lax,\n Strict,\n None\n}\n\nexport default SameSite;\n","import SameSite from './samesite-enum';\n\nexport default abstract class Cookie {\n name: string | undefined;\n\n value: string | undefined;\n\n expirationDate: Date | undefined;\n\n domain: string | undefined;\n\n sameSite: SameSite | undefined;\n\n /**\n * Is the cookie secure?\n */\n isSecure(): boolean {\n return this.sameSite === SameSite.None;\n }\n\n /**\n * Is user accepting cookies?\n */\n abstract isAllowed(consentCookieValue: string | null): boolean;\n\n protected constructor(\n namePrefix: string,\n name: string,\n value?: string,\n expirationDate?: Date,\n sameSite?: SameSite,\n domain?: string\n ) {\n if (name && name.trim() !== '') {\n this.name = `${namePrefix}_${name.trim()}`;\n\n this.value = value;\n this.expirationDate = expirationDate;\n this.sameSite = sameSite ? sameSite : SameSite.Strict;\n this.domain = domain;\n }\n }\n}\n","import Cookie from './cookie';\nimport SameSite from './samesite-enum';\n\nexport default class EssentialCookie extends Cookie {\n constructor(name: string, value?: string, expirationDate?: Date, sameSite?: SameSite, domain?: string) {\n super('adc_e', name, value, expirationDate, sameSite, domain);\n }\n\n /**\n * Is user accepting cookies?\n */\n isAllowed(): boolean {\n return true;\n }\n}\n","import Cookie from './cookie';\nimport EssentialCookie from './essential-cookie';\nimport SameSite from './samesite-enum';\n\n/**\n * The name of the consent cookie.\n */\nexport const DO_NOT_TRACK_COOKIE = 'donottrack';\n\n/**\n * Sets a cookie.\n */\nfunction setCookie(\n this: CookieService,\n cookieName: string,\n value: string,\n expirationDate?: Date,\n isSecure = false,\n sameSite?: SameSite,\n domain?: string\n): void {\n document.cookie = `${cookieName}=${value}; ${sameSite ? ' SameSite=' + SameSite[sameSite] + ';' : ''} ${\n isSecure ? ' Secure;' : ''\n } ${expirationDate ? ' expires=' + expirationDate.toUTCString() + ';' : ''} path=/; ${\n 'domain=' + domain ? domain : this.getCookieDomain()\n }`;\n}\n\n/**\n * Validates a cookie.\n *\n * @param cookie The cookie.\n *\n * @returns {boolean} Is the cookie valid?\n */\nfunction validateCookie(cookie: Cookie) {\n if (!cookie || !cookie.name || cookie.name?.trim() === '') {\n console.warn('Cookie was not set due to invalid cookie or cookie name.');\n\n return false;\n }\n\n return true;\n}\n\n/**\n * Gets the date for cookie invalidation.\n *\n * @returns {DateTime} The date.\n */\nfunction getCookieInvalidationDate() {\n const expirationDate = new Date();\n expirationDate.setTime(expirationDate.getTime() + -1 * 24 * 60 * 60 * 1000);\n\n return expirationDate;\n}\n\n/**\n * Gets the old, non-prefixed cookie name.\n *\n * @param cookieName The name of the new cookie (with prefix).\n *\n * @returns {string | undefined} The name of the old cookie (without prefix).\n */\nfunction getNonPrefixedCookieName(cookieName: string | undefined): string | undefined {\n if (!cookieName || cookieName?.trim() === '') {\n return undefined;\n }\n\n return cookieName.substring(6);\n}\n\n/**\n * Gets the value of a cookie.\n *\n * @param cookieName The name of the cookie.\n *\n * @returns {string | null} The value of the cookies.\n */\nfunction getCookieValue(cookieName: string | undefined) {\n if (!cookieName || cookieName?.trim() === '') {\n return null;\n }\n\n return (document.cookie || '').split('; ').reduce((value, cookie) => {\n // Extract name and all values (since value may contain equals signs).\n const [name, ...cookieValue] = cookie.split('=');\n\n // Return cookie value\n return name === cookieName ? cookieValue.join('=') : value;\n }, null);\n}\n\nexport default class CookieService {\n /**\n * Returns the value of the cookie.\n *\n * @param cookie The cookie.\n *\n * @returns {string | null} The value of the cookie.\n */\n getCookie(cookie: Cookie): string | null {\n if (!validateCookie(cookie)) {\n return null;\n }\n\n let value = getCookieValue(cookie.name);\n\n // TODO: Remove this code with WEB-11431.\n if (!value) {\n value = getCookieValue(getNonPrefixedCookieName(cookie.name));\n }\n\n return value;\n }\n\n /**\n * Updates / Sets a cookie\n *\n * @param cookie The cookie.\n *\n * @returns {boolean} Was the cookie updated/set?\n */\n setCookie(cookie: Cookie): boolean {\n if (validateCookie(cookie)) {\n // TODO: Remove this code with WEB-11431.\n const trimmedCookie = getNonPrefixedCookieName(cookie.name);\n\n if (trimmedCookie) {\n setCookie.call(this, trimmedCookie, '', getCookieInvalidationDate());\n\n const consentCookieValue = this.getCookie(new EssentialCookie(DO_NOT_TRACK_COOKIE));\n if (cookie.isAllowed(consentCookieValue)) {\n setCookie.call(\n this,\n cookie.name,\n cookie.value,\n cookie.expirationDate,\n cookie.isSecure(),\n cookie.sameSite,\n cookie.domain\n );\n\n return true;\n }\n }\n }\n\n return false;\n }\n\n /**\n * Invalidates a cookie.\n *\n * @param cookie The cookie.\n *\n * @returns {boolean} Was the cookie invalidated?\n */\n deleteCookie(cookie: Cookie): boolean {\n if (validateCookie(cookie)) {\n if (this.getCookie(cookie) != null) {\n setCookie.call(this, cookie.name, '', getCookieInvalidationDate());\n\n return true;\n }\n }\n\n return false;\n }\n\n /**\n * Checks the truthy/falsy state for a cookie.\n *\n * @param cookie The cookie.\n *\n * @returns {boolean} The truthy/falsy value of the cookie.\n */\n hasTruthyCookieValue(cookie: Cookie): boolean {\n const cookieValue = this.getCookie(cookie);\n\n return !(\n cookieValue === '0' ||\n cookieValue === 'false' ||\n cookieValue === null ||\n cookieValue === 'null' ||\n cookieValue === 'undefined'\n );\n }\n\n /**\n * Checks the domain of a cookie.\n *\n * @returns {string} The value of the domain.\n */\n getCookieDomain(): string {\n const domain = location.hostname;\n\n if (domain.includes('.alarm.com')) {\n return '.alarm.com';\n }\n\n if (domain.includes('.adcinternal.com')) {\n return '.adcinternal.com';\n }\n\n return domain;\n }\n}\n","import Service from '@ember/service';\nimport CookieService from '@adc/cookie-manager/build/cookie-service';\nimport EssentialCookie from '@adc/cookie-manager/build/essential-cookie';\n\nimport type Cookie from '@adc/cookie-manager/build/cookie';\n\nexport default class CookieManager extends Service {\n /**\n * Base cookie service.\n */\n cookieService: CookieService;\n\n constructor() {\n super();\n\n this.cookieService = new CookieService();\n }\n\n /**\n * Gets the cookie value.\n */\n getCookie(cookie: Cookie): string | null {\n return this.cookieService.getCookie(cookie);\n }\n\n /**\n * Updates / Sets a cookie.\n */\n setCookie(cookie: Cookie): boolean {\n return this.cookieService.setCookie(cookie);\n }\n\n /**\n * Deletes a cookie.\n */\n deleteCookie(cookie: Cookie): boolean {\n return this.cookieService.deleteCookie(cookie);\n }\n\n /**\n * Check the truthy/falsy state for a cookie.\n */\n hasTruthyCookieValue(cookie: Cookie): boolean {\n return this.cookieService.hasTruthyCookieValue(cookie);\n }\n\n /**\n * Gets the essential cookie value.\n */\n getEssentialCookie(cookieName: string): string | null {\n return this.cookieService.getCookie(new EssentialCookie(cookieName));\n }\n\n /**\n * Check the truthy/falsy state for an essential cookie.\n */\n hasEssentialCookieTruthyValue(cookieName: string): boolean {\n return this.cookieService.hasTruthyCookieValue(new EssentialCookie(cookieName));\n }\n\n /**\n * Deletes the essential cookie.\n */\n deleteEssentialCookie(cookieName: string): boolean {\n return this.cookieService.deleteCookie(new EssentialCookie(cookieName));\n }\n\n /**\n * Updates / Sets an essential cookie.\n *\n * @param cookieName The name of the essential cookie.\n * @param cookieValue The value of the essential cookie.\n * @param expirationDate The expiration date of the essential cookie. If undefined, the cookie will expire at the\n * end of the session.\n */\n setEssentialCookie(cookieName: string, cookieValue: string, expirationDate?: Date | undefined): boolean {\n return this.cookieService.setCookie(new EssentialCookie(cookieName, cookieValue, expirationDate));\n }\n}\n","import { getOwner } from '@ember/owner';\n\nimport type { InternalOwner } from '@ember/-internals/owner';\n\nexport function isTestEnvironment(this: object): boolean {\n const owner = getOwner(this),\n env = owner ? (owner as InternalOwner).resolveRegistration('config:environment') : {};\n\n return (env && 'environment' in env && env.environment === 'test') || false;\n}\n","import { A } from '@ember/array';\nimport { registerDestructor } from '@ember/destroyable';\nimport { action, computed } from '@ember/object';\nimport { service } from '@ember/service';\nimport Service from '@ember/service';\nimport { task, timeout } from 'ember-concurrency';\nimport { isTestEnvironment } from '../utils/environment.ts';\n\nimport type AdcAjaxService from '@adc/ajax/services/adc-ajax';\nimport type RouterService from '@ember/routing/router-service';\nimport type Transition from '@ember/routing/transition';\nimport type { Task } from 'ember-concurrency';\nimport type ContextManager from './context-manager.ts';\n\n// Mark Names\nconst CSS_PARSE_START = 'CSSParseStart';\nconst CSS_PARSE_END = 'CSSParseEnd';\nconst JS_PARSE_START = 'JSParseStart';\nconst JS_PARSE_END = 'JSParseEnd';\nconst TTI_END = 'TTIEnd';\nconst ROUTE_INITIALIZED = 'RouteInitialized';\nconst LAST_RENDER_MARK_RENDERED = 'LastRenderMarkRendered';\nconst CONTEXT_SWITCH_INITIALIZED = 'ContextSwitchInitialized';\nconst CONTEXT_SWITCH_RESOLVED = 'ContextSwitchResolved';\n\n// Measurement Names\nconst TIME_TO_INTERACTIVE = 'TimeToInteractive';\nconst CSS_PARSE_TIME = 'CSSParseTime';\nconst JS_PARSE_TIME = 'JSParseTime';\nconst ROUTE_VIEW_RENDERED = 'RouteViewRendered';\nconst MODEL_RESOLVED = 'ModelResolved';\nconst CONTEXT_SWITCH_TIME = 'ContextSwitchTime';\n\n// KPI Metric Contstants\nconst DEFAULT_KPI_THRESHOLD = 15000;\nconst KPI_API_ENDPOINT = 'swa/performance/metrics/recordKpiThresholdExceeded';\n\n// Telling typescript that the isDisabled boolean might exist on Performance.\ndeclare global {\n interface Performance {\n isDisabled?: boolean;\n }\n}\n\n/**\n * Wrapper for creating a browser performance measurement.\n */\nexport function createMeasurement(measurementName: string, startMark: string, endMark: string): void {\n if (!doAllMarksExist([startMark, endMark])) {\n console.info(`Route potentially has view-container and no route-view. Route=${window.location.pathname}`);\n return;\n }\n\n window.performance.measure(measurementName, startMark, endMark);\n}\n\n/**\n * returns true if all the marks exist in window performance array\n */\nfunction doAllMarksExist(markNames: string[]): boolean {\n // metrics like 'requestStart' are valid and come from the performance timing api\n const browserReadOnlyTimes = getPerformanceTimingApiDefinedEntries(),\n allRecordedMarkNames = A(window.performance.getEntriesByType('mark')).mapBy('name'),\n allPossibleMarks = A(browserReadOnlyTimes.concat(allRecordedMarkNames));\n return markNames.every((markName) => allPossibleMarks.includes(markName));\n}\n\n/**\n * filters all the mark names and returns only the marks that have been created\n */\nfunction filteredMarkNamesByCreated(markNames: string[]): string[] {\n const allRecordedMarkNames = A(window.performance.getEntriesByType('mark')).mapBy('name');\n return markNames.filter((markName) => allRecordedMarkNames.includes(markName));\n}\n\n/**\n * Gets all of the performance timing api defined metrics\n */\nfunction getPerformanceTimingApiDefinedEntries(): string[] {\n // performance.timing generates an object that is not iterable\n // wrapping it in JSON.parse(JSON.stringify() ) makes the object iterable\n return Object.keys(JSON.parse(JSON.stringify(window.performance.timing)));\n}\n\n/**\n * Wrapper for creating a browser performance mark.\n */\nexport function createMark(markName: string): PerformanceMark {\n return window.performance.mark(markName);\n}\n\n/**\n * Clear performance marks for route view.\n */\nfunction clearRouteViewMarks(routeName: string): void {\n clearMarks(\n `${ROUTE_INITIALIZED}-${routeName}`,\n `${ROUTE_VIEW_RENDERED}-${routeName}`,\n `${MODEL_RESOLVED}-${routeName}`,\n `${LAST_RENDER_MARK_RENDERED}-${routeName}`\n );\n}\n\n/**\n * Clear performance marks for context switches.\n */\nfunction clearContextSwitchMarks(): void {\n clearMarks(CONTEXT_SWITCH_INITIALIZED, CONTEXT_SWITCH_RESOLVED);\n}\n\n/**\n * Clear performance marks for the given mark names.\n */\nfunction clearMarks(...markNames: string[]): void {\n // Filter first to make sure mark exists before clearing\n const filtered = filteredMarkNamesByCreated(markNames);\n filtered.forEach((mark) => window.performance.clearMarks(mark));\n}\n\n/**\n * Returns a dictionary of the requested measurements. Clears any measurements that are returned.\n * The value of the dictionary is the measurement value.\n */\nexport function getMeasurements(...measurementNames: string[]): Record {\n const resultDictionary: Record = {};\n window.performance\n .getEntriesByType('measure')\n .filter((performanceEntry) => measurementNames.includes(performanceEntry.name))\n .forEach((performanceEntry) => {\n resultDictionary[performanceEntry.name] = performanceEntry.duration;\n window.performance.clearMeasures(performanceEntry.name);\n });\n\n return resultDictionary;\n}\n\n/**\n * This function accepts a routeName (such as 'access-control.index') and converts it into a path format ('access-control/index').\n */\nfunction convertRouteNameToPath(routeName: string): string {\n // We replace the '.' delimitter w/ '/' because '.' is used as the separator for different pieces of the metric description and we wouldn't be able to tell when the\n // route name started on ended. We can't use '-' because it appears within the route.\n return routeName.replace(/[.]/g, '/');\n}\n\n/**\n * @classdesc A service for managing performance metrics\n * A standard javascript API is used in this class called Performance API including methods mark and measure.\n * Documentation of this API: https://developer.mozilla.org/en-US/docs/Web/API/Performance\n */\nexport default class PerformanceMonitorService extends Service {\n @service declare ajax: AdcAjaxService;\n @service declare contextManager: ContextManager;\n @service declare router: RouterService;\n\n constructor(...args: any[]) {\n super(...args);\n\n // We don't want this to run for every test. For now, it will only operate in non-test enviornments.\n if (!isTestEnvironment.call(this)) {\n this.router.on('routeDidChange', this.startKpiThresholdTask);\n registerDestructor(this, () => {\n this.router.off('routeDidChange', this.startKpiThresholdTask);\n });\n }\n }\n\n /**\n * Should the performance monitor send metrics to the server?\n * NOTE: often used to disable the service during integration tests.\n */\n @computed()\n get enabled(): boolean {\n // If window.performance doesn't have the methods we need, we add isDisabled=true in index.html.\n return !window.performance.isDisabled;\n }\n\n /**\n * Dictionary that tracks what route was active when a given metric was reported.\n * The key is the metric name and the value is the route.\n */\n routeViewMetricPathDictionary: Record = {} as Record;\n\n /**\n * Determines if we are going to use the kpi threshold metric tracking.\n * Should be determined on a route by route basis.\n */\n useKpiThresholdMetrics = false;\n\n /**\n * Holds the id of the context from which the context switch was initiated.\n */\n private contextSwitchPreviousId = '';\n\n /**\n * This task is triggered by a listener on routeDidChange.\n * If the task wakes up before the last component render mark is made,\n * we will log a count for that route, indicating that it took longer than\n * the threshold to load.\n * If the kpiThreshold argument is the default value of 15000ms,\n * we will want to record any routes that take longer than 5000ms, 10000ms, and 15000ms\n * without duplicating records.\n * A kpiThreshold can be set for testing purposes\n */\n kpiThresholdTask: Task = task({ restartable: true }, async (kpiThreshold: number) => {\n let exceededThreshold = 0;\n const thresholdIncrement = kpiThreshold === 1 ? 1 : Math.floor(kpiThreshold / 3);\n\n for (let threshold = thresholdIncrement; threshold <= kpiThreshold; threshold += thresholdIncrement) {\n await timeout(thresholdIncrement);\n\n // If the last component has been rendered, do nothing.\n if (\n !this.useKpiThresholdMetrics ||\n doAllMarksExist([`${LAST_RENDER_MARK_RENDERED}-${this.router.currentRouteName}`])\n ) {\n break;\n }\n\n exceededThreshold = threshold;\n }\n\n // If an exceeded threshold was detected, send the request.\n if (exceededThreshold > 0) {\n const data = {\n routePath: convertRouteNameToPath(this.router.currentRouteName),\n kpiThreshold: exceededThreshold\n };\n\n this.ajax.apiRequest(KPI_API_ENDPOINT, {}, JSON.stringify(data), 'POST');\n }\n });\n\n /**\n * Send metrics in milliseconds of initial page rendering to server\n */\n private sendInitialMetricsToServer(source = ''): Promise {\n if (!this.enabled) {\n return Promise.resolve('');\n }\n\n createMeasurement(CSS_PARSE_TIME, CSS_PARSE_START, CSS_PARSE_END);\n createMeasurement(JS_PARSE_TIME, JS_PARSE_START, JS_PARSE_END);\n // requestStart is a predefined browser mark.\n createMeasurement(TIME_TO_INTERACTIVE, 'requestStart', TTI_END);\n\n // We intentionally do not clear the marks here, as we only expect them to be created once during the entire app/page lifecycle.\n\n const data: Record = getMeasurements(\n CSS_PARSE_TIME,\n JS_PARSE_TIME,\n TIME_TO_INTERACTIVE\n );\n data['source'] = source;\n\n return this.ajax.apiRequest('swa/performance/metrics/recordInitialLoad', {}, JSON.stringify(data), 'POST');\n }\n\n /**\n * Send metrics in milliseconds of routes that use route view to server\n * Only send metrics to server if routeView metrics come from same route. Returns true if successful and false if the route data was bad.\n */\n private sendRouteViewMetricsToServer(routeName = ''): Promise {\n if (!this.enabled) {\n return Promise.resolve(true);\n }\n\n // Grab the metrics which match the path for the routeInitialized metric.\n // In the case where multiple paths use the same route-view component (e.g. locations dashboards), it won't be rerendered,\n // so routeViewRendered will remain set to the previous route path. In that case, we won't record the routeViewRendered time.\n const validMetrics = [ROUTE_VIEW_RENDERED, MODEL_RESOLVED].filter(\n (metricName) =>\n this.routeViewMetricPathDictionary[metricName] === this.routeViewMetricPathDictionary[ROUTE_INITIALIZED]\n );\n let data;\n try {\n if (!validMetrics.length) {\n clearRouteViewMarks(routeName);\n return Promise.resolve(false);\n }\n\n // Record the routePath in our request body.\n const routePath = convertRouteNameToPath(this.routeViewMetricPathDictionary[ROUTE_INITIALIZED]);\n validMetrics.forEach((metricName) =>\n createMeasurement(metricName, `${ROUTE_INITIALIZED}-${routeName}`, `${metricName}-${routeName}`)\n );\n\n data = {\n ...getMeasurements(ROUTE_VIEW_RENDERED, MODEL_RESOLVED),\n routePath\n };\n } catch (err) {\n console.error('Error logging performance metrics.', err);\n return Promise.resolve(false);\n }\n\n // TODO JB: Update to get from the ENV config\n return this.ajax\n .apiRequest('swa/performance/metrics/recordRouteView', {}, JSON.stringify(data), 'POST')\n .then(() => true);\n }\n\n /**\n * Marks the point in which JS finishes parsing by creating a time stamp\n */\n markJSEnd(): void {\n createMark(JS_PARSE_END);\n }\n\n /**\n * Marks the point in which the page becomes interactive by creating a time stamp.\n * Also - flushes the initial load metrics to the server. Resolves after the metrics are sent to the server.\n */\n markTTIEnd(source = ''): Promise {\n createMark(TTI_END);\n return this.sendInitialMetricsToServer(source);\n }\n\n /**\n * Marks the point in which the route is initialized by creating a time stamp\n */\n markRouteInitialized(routeName: string, transition: Transition): void {\n // This could get called for every route along the path and we only want to mark the route once (as early as possible.).\n // For example, with /users/1/contact-information/345, this will get called for users and users.contact-information.\n if (transition.data.routeMarkedAsInitialized) {\n return;\n }\n\n createMark(`${ROUTE_INITIALIZED}-${routeName}`);\n this.routeViewMetricPathDictionary[ROUTE_INITIALIZED] = routeName;\n\n transition.data.routeMarkedAsInitialized = true;\n }\n\n /**\n * Marks the point in which route view renders\n */\n markRouteViewRendered(routeName: string): void {\n createMark(`${ROUTE_VIEW_RENDERED}-${routeName}`);\n this.routeViewMetricPathDictionary[ROUTE_VIEW_RENDERED] = routeName;\n }\n\n /**\n * Marks the point in which the model resolves. Also flushes the route metrics to the server.\n * Resolves when the request is finished.\n */\n markModelResolved(routeName: string): Promise {\n createMark(`${MODEL_RESOLVED}-${routeName}`);\n this.routeViewMetricPathDictionary[MODEL_RESOLVED] = routeName;\n\n return this.sendRouteViewMetricsToServer(routeName);\n }\n\n /**\n * Marks that the LastRenderMark component has rendered. Which should be the last item to render on a route\n */\n @action\n markLastRender(): void {\n createMark(`${LAST_RENDER_MARK_RENDERED}-${this.router.currentRouteName}`);\n }\n\n /**\n * Marks the point in which we initialized the process for switching the current context.\n */\n markContextSwitchInitialized(contextId: string): void {\n createMark(CONTEXT_SWITCH_INITIALIZED);\n this.contextSwitchPreviousId = contextId;\n }\n\n /**\n * Marks the point in which we resolved the context switch.\n */\n async markContextSwitchResolved(contextId: string): Promise {\n createMark(CONTEXT_SWITCH_RESOLVED);\n\n if (!this.enabled) {\n clearContextSwitchMarks();\n return false;\n }\n\n createMeasurement(CONTEXT_SWITCH_TIME, CONTEXT_SWITCH_INITIALIZED, CONTEXT_SWITCH_RESOLVED);\n const data = getMeasurements(CONTEXT_SWITCH_TIME);\n if (Object.keys(data).length === 0) {\n clearContextSwitchMarks();\n return false;\n }\n\n data.originalContextId = this.contextSwitchPreviousId;\n data.newContextId = contextId;\n clearContextSwitchMarks();\n await this.ajax.apiRequest('swa/performance/metrics/recordContextSwitch', {}, JSON.stringify(data), 'POST');\n return true;\n }\n\n /**\n * Sets a boolean indicating if we want to use the kpi threshold metrics.\n */\n setUseKpiThresholdMetrics(value: boolean): void {\n this.useKpiThresholdMetrics = value;\n }\n\n /**\n * This exists for the purpose of testing the KPI threshold metrics.\n */\n private getKpiThreshold(): number {\n const currentURL = this.router.currentURL,\n queryParams = new URL(currentURL, window.location.origin).searchParams,\n kpiThresholdParam = queryParams.get('kpiThreshold');\n let kpiThreshold = Number(kpiThresholdParam);\n\n // If kpiThreshold is not a number or doesn't exist, default to 15 seconds\n if (isNaN(kpiThreshold) || kpiThreshold <= 0) {\n kpiThreshold = DEFAULT_KPI_THRESHOLD;\n }\n\n return kpiThreshold;\n }\n\n /**\n * Starts the kpi threshold task and passes in the threshold.\n */\n @action\n private startKpiThresholdTask(): void {\n const routePath = this.router.currentRouteName,\n kpiThreshold = this.getKpiThreshold();\n\n // first we need to make sure we've cleared all previous marks for this route.\n window.performance.clearMarks(`${LAST_RENDER_MARK_RENDERED}-${routePath}`);\n\n this.kpiThresholdTask.perform(kpiThreshold);\n }\n}\n","import { tracked } from '@glimmer/tracking';\nimport { logMissingAbstractMember } from '@adc/ember-utils/utils/debug';\nimport { addWeakListener, removeListener } from '@adc/ember-utils/utils/event-listeners';\nimport { A } from '@ember/array';\nimport { set, setProperties } from '@ember/object';\nimport { cancel, debounce, later } from '@ember/runloop';\nimport Service from '@ember/service';\n\nimport type { EmberRunTimer } from '@ember/runloop/types';\n\nexport interface SessionActivityArgs {\n shouldTimeout: boolean;\n logoutTimeoutMs: number;\n enableKeepAlive: boolean;\n inactivityWarningTimeoutMs?: number;\n keepAliveUrl?: string;\n}\n\n/**\n * Default logout timeout (ms).\n *\n * @private\n */\nconst DEFAULT_LOGOUT_TIMEOUT = 5 * 60 * 1000;\n\n/**\n * Number of consecutive times keepAlive has failed.\n *\n * @private\n */\nlet keepAliveFailures = 0;\n\n/**\n * Number of times keepAlive can fail before we trigger logout.\n *\n * @private\n */\nconst maxKeepAliveFailures = 10;\n\n/**\n * Triggers logout event.\n *\n * @private\n */\nfunction triggerLogoutTimeout(this: SessionActivity): void {\n // Force route transition timeout no matter what the case is.\n this.forceLogoutOnNextTransition = true;\n\n // Trigger log out event only if the route/page allows it.\n if (!this.routeIgnoresSessionTimeout) {\n this.baseLogout();\n }\n}\n\n/**\n * Triggers inactive event.\n *\n * @private\n */\nfunction triggerInactivityWarningTimeout(this: SessionActivity): void {\n // Trigger inactivity warning event only if the route/page allows it.\n if (!this.routeIgnoresSessionTimeout) {\n // Set a flag that the user is inactive.\n this.inactive = true;\n this.triggerInactivityWarning();\n }\n}\n\n/**\n * Cancels passed run timers.\n *\n * @private\n */\nfunction cancelTimers(...timers: Array) {\n // Cancel any running timeouts.\n A(timers)\n .compact()\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n .forEach((timeout) => cancel(timeout));\n}\n\n/**\n * Cancels running logout timeouts.\n *\n * @private\n */\nfunction cancelLogoutTimeouts(this: SessionActivity): void {\n // Cancel any running timeouts.\n cancelTimers(this.logoutTimeoutEvent, this.inactivityWarningTimeoutEvent);\n}\n\n/**\n * Trigger keep-alive sequence.\n *\n * @private\n */\nasync function keepAlive(this: SessionActivity): Promise {\n // If the session is not currently active, we don't want to reactivate it.\n // It must be reactivated deliberately.\n if (this.inactive || !this.enableKeepAlive) {\n return;\n }\n\n try {\n // Run an ajax to ping the session to tell it that the user is still active.\n const stillAlive = await this.keepSessionActive();\n\n // If keepAlive doesn't throw, we reset the counter.\n keepAliveFailures = 0;\n\n if (!stillAlive) {\n this.logout(true);\n }\n } catch (err) {\n console.error(err);\n\n // We keep track of keepAlive failures and trigger a logout if the limit is reached.\n // If keepAlive continuously fails, we're assuming something is messed up w/ the session\n // and log the user out to force a cleanup.\n keepAliveFailures++;\n\n if (keepAliveFailures > maxKeepAliveFailures) {\n keepAliveFailures = 0;\n console.error('KeepAlive reached maximum number of failures. Logging out.');\n\n this.baseLogout();\n return;\n }\n }\n\n cancelTimers(this.keepAliveTimeout);\n\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n this.keepAliveTimeout = debounce(this, keepAlive, this.keepAliveFrequencyMs);\n}\n\n/**\n * Handles user activity event.\n *\n * @private\n */\nfunction handleUserActivityEvent(this: SessionActivity) {\n const { inactive, doNotTimeoutSession, logoutTimeoutMs, inactivityWarningTimeoutMs } = this;\n\n if (doNotTimeoutSession || inactive) {\n return;\n }\n\n // Clear timeouts.\n cancelLogoutTimeouts.call(this);\n\n // There will always be logout timeout.\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n this.logoutTimeoutEvent = later(this, triggerLogoutTimeout, logoutTimeoutMs as number);\n\n // Set inactivity warning timeout if it exists.\n if (inactivityWarningTimeoutMs) {\n set(\n this,\n 'inactivityWarningTimeoutEvent',\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n later(this, triggerInactivityWarningTimeout, inactivityWarningTimeoutMs)\n );\n }\n}\n\n/**\n * Remove all event listeners.\n *\n * @private\n */\nfunction removeAllListeners(this: SessionActivity) {\n this.listenerIds.forEach((listenerId) => removeListener(listenerId));\n\n // Clear the listener ids.\n this.listenerIds = [];\n}\n\n/**\n * @classdesc\n * Service that handles triggering events based on inactivity timeouts.\n */\nexport default class SessionActivity extends Service {\n /**\n * Is the user inactive? (No action has been triggered within the inactivityWarningTimeoutMs).\n */\n @tracked inactive = false;\n\n /**\n * Does this current route/page ignore the session time out?\n */\n @tracked routeIgnoresSessionTimeout = false;\n\n /**\n * Should we run the Keep Alive process?\n */\n @tracked enableKeepAlive = false;\n\n /**\n * URL to ping if there is a keep alive\n */\n @tracked keepAliveUrl?: string;\n\n /**\n * Force session timeout as soon as the user transitions out of the current route/page.\n */\n @tracked forceLogoutOnNextTransition = false;\n\n /**\n * Timeout to triggering logout event (ms).\n */\n logoutTimeoutMs?: number;\n\n /**\n * Timeout to triggering inactivity warning event (ms).\n */\n inactivityWarningTimeoutMs?: number;\n\n /**\n * Whether to never time out session and keep it alive forever.\n */\n doNotTimeoutSession = false;\n\n /**\n * Time that we should wait between keepAlive pings (in ms).\n */\n keepAliveFrequencyMs = 60000;\n\n listenerIds: string[] = [];\n keepAliveTimeout?: EmberRunTimer;\n logoutTimeoutEvent?: EmberRunTimer;\n inactivityWarningTimeoutEvent?: EmberRunTimer;\n\n /**\n * Cleanup.\n */\n willDestroy(): void {\n super.willDestroy();\n\n removeAllListeners.call(this);\n cancelTimers(this.keepAliveTimeout, this.logoutTimeoutEvent, this.inactivityWarningTimeoutEvent);\n }\n\n /**\n * Sets logout and inactivity timeouts.\n */\n initialize(applicationSessionProperties: SessionActivityArgs): void {\n cancelLogoutTimeouts.call(this);\n removeAllListeners.call(this);\n\n const { shouldTimeout, enableKeepAlive, keepAliveUrl } = applicationSessionProperties,\n doNotTimeoutSession = !shouldTimeout;\n\n let { logoutTimeoutMs, inactivityWarningTimeoutMs } = applicationSessionProperties;\n\n if (doNotTimeoutSession) {\n console.info('Never time out session enabled, continuous keepalive triggered');\n } else {\n if (!logoutTimeoutMs || logoutTimeoutMs < 0) {\n logoutTimeoutMs = DEFAULT_LOGOUT_TIMEOUT;\n console.error(\n 'No timeout provided for session that should timeout, setting to default.',\n logoutTimeoutMs\n );\n }\n\n if (\n inactivityWarningTimeoutMs &&\n (inactivityWarningTimeoutMs > logoutTimeoutMs || inactivityWarningTimeoutMs < 0)\n ) {\n inactivityWarningTimeoutMs = undefined;\n console.error('Inactivity warning timeout not set properly, no warning will be shown.');\n }\n }\n\n setProperties(this, {\n enableKeepAlive,\n doNotTimeoutSession,\n logoutTimeoutMs,\n inactivityWarningTimeoutMs,\n keepAliveUrl\n });\n\n // Set event handler for each event to update the timeouts for logout and inactivity warnings.\n ['keydown', 'mousedown', 'scroll', 'touchstart'].forEach((event) => {\n // Add event listener unless the session should never timeout.\n if (!doNotTimeoutSession) {\n this.listenerIds.push(\n addWeakListener(this, window, event, handleUserActivityEvent.bind(this), false, true, true)\n );\n }\n });\n\n // Start keepAlive.\n (() => keepAlive.call(this))();\n\n // Start activity timeouts.\n handleUserActivityEvent.call(this);\n }\n\n /**\n * Returns the duration between inactivity is detected and logout is triggered.\n */\n getInactivityWarningDuration(): number {\n const { logoutTimeoutMs = -1, inactivityWarningTimeoutMs = -1 } = this;\n if (logoutTimeoutMs === -1 || inactivityWarningTimeoutMs === -1) {\n return 0;\n }\n\n return (logoutTimeoutMs - inactivityWarningTimeoutMs) / 1000;\n }\n\n /**\n * Clears inactive status of the session.\n */\n clearInactiveStatus(): void {\n this.inactive = false;\n\n this.refreshApplication();\n\n (() => keepAlive.call(this))();\n handleUserActivityEvent.call(this);\n }\n\n /**\n * Update session timeout flag.\n */\n updateSessionTimeout(doNotTimeOut: boolean): void {\n // Do we need to force a session time out now due to a page being alive for too long?\n if (this.forceLogout()) {\n this.baseLogout();\n }\n\n // Let the user activity know to turn on/off the session time out event based on this route.\n this.routeIgnoresSessionTimeout = doNotTimeOut;\n }\n\n /**\n * Should we force logout on the next route/page transition?\n */\n forceLogout(): boolean {\n return this.forceLogoutOnNextTransition;\n }\n\n /**\n * Internal logout function. We don't want consumers to need to call super so all internal state keeping should be done here.\n *\n * @private\n */\n baseLogout(): void {\n // We cancel any outstanding timers and set the state to inactive to make sure the service does not make any further state changes.\n this.inactive = true;\n cancelLogoutTimeouts.apply(this);\n this.logout(true);\n }\n /**\n * Handler to trigger any actions that should take place when the user is forced to logout.\n *\n * @abstract\n */ // eslint-disable-next-line @typescript-eslint/no-unused-vars\n logout(_useReturnUrl?: boolean): void {\n logMissingAbstractMember(this, 'logout');\n }\n\n /**\n * Handler to trigger any actions that should take place when the user has gone idle and is near being logged out.\n *\n * @abstract\n */\n triggerInactivityWarning(): void {\n logMissingAbstractMember(this, 'triggerInactivityWarning');\n }\n\n /**\n * Handler called when activity is restored by calling clearInactiveStatus.\n *\n * @abstract\n */\n refreshApplication(): void {\n logMissingAbstractMember(this, 'refreshApplication');\n }\n\n /**\n * Handler called to keep te server session alive.\n *\n * @abstract\n */\n async keepSessionActive(): Promise {\n logMissingAbstractMember(this, 'keepSessionActive');\n return true;\n }\n}\n","export interface Error {\n code: number;\n detail: string;\n status?: string;\n}\n\nexport interface ErrorPayload {\n message?: string;\n errors?: {\n detail: string;\n }[];\n}\n\n/**\n * Extracts error message from returned API errors.\n */\nexport function getErrorText(error: ErrorPayload): string | undefined {\n const { message, errors } = error,\n [firstError] = errors ?? [];\n\n return firstError?.detail ?? message;\n}\n","import type { AppEnvironment } from '../services/env-settings';\n\n/**\n * If Pendo should be enabled, this activates the Pendo metrics adapter and identifies the logged-in user.\n */\nexport function initializePendoMetrics(\n pendoConfiguration: PendoConfiguration,\n config: AppEnvironment,\n metrics: MetricsService\n) {\n // Only enable metrics in production builds.\n if (config.environment !== 'production') {\n return;\n }\n\n // Leave disabled if they have the \"donottrack\" cookie present.\n // The server technically does this check as well, but doesn't hurt to have this here.\n const doNotTrackCookie = (document.cookie.match('(^|;)\\\\s*' + 'adc_e_donottrack' + '\\\\s*=\\\\s*([^;]+)') || []).pop();\n if (doNotTrackCookie == 'true') {\n return;\n }\n\n // NOTE: This enables/disables sending of metrics - based on the server configuration - to all platforms, not just Pendo.\n // We only use Pendo at the moment, so this felt safer to do than not do.\n metrics.enabled = !!pendoConfiguration?.isEnabled;\n if (!metrics.enabled) {\n return;\n }\n\n metrics.activateAdapters([\n {\n name: 'Pendo',\n environments: ['production'],\n config: {\n apiKey: pendoConfiguration.apiKey\n }\n }\n ]);\n\n metrics.identify('Pendo', {\n visitor: {\n id: pendoConfiguration.visitorId ?? '',\n customerId: pendoConfiguration.customerId ?? '',\n systemGroupId: pendoConfiguration.systemGroupId ?? '',\n state: pendoConfiguration.state ?? '',\n country: pendoConfiguration.country ?? ''\n },\n account: { id: pendoConfiguration.accountId ?? '' }\n });\n}\n","/**\n * Utility helper module for sentry related methods\n * @module\n */\n\nimport { withScope } from '@sentry/ember';\n\nimport type { Extras, Primitive } from '@sentry/types';\n\ntype SentryTags = {\n [key: string]: Primitive;\n};\n\n/**\n * Does a sentry log as a warning.\n *\n * @param warningMessage The warning message to log to sentry\n * @param extras Optional extras to append to the sentry log\n * @param tags Optional tags to append to the sentry log\n */\nexport function sentryWithScopeAndWarn(warningMessage: string, extras?: Extras, tags?: SentryTags): void {\n sentryWithScopeAndErrorOrWarn(warningMessage, extras, tags, false);\n}\n\n/**\n * Does a sentry log as an error.\n *\n * @param errorMessage The warning message to log to sentry\n * @param extras Optional extras to append to the sentry log\n * @param tags Optional tags to append to the sentry log\n */\nexport function sentryWithScopeAndError(errorMessage: string, extras?: Extras, tags?: SentryTags): void {\n sentryWithScopeAndErrorOrWarn(errorMessage, extras, tags, true);\n}\n\n/**\n * Does a sentry log with the passed in message, extras (if provided), tags (if provided).\n *\n * @param message The message to log to sentry\n * @param extras Optional extras to append to the sentry log\n * @param tags Optional tags to append to the sentry log\n * @param isError if we are reporting it as an error, otherwise reporting it as warning\n */\nfunction sentryWithScopeAndErrorOrWarn(message: string, extras?: Extras, tags?: SentryTags, isError?: boolean) {\n withScope((scope) => {\n if (extras) {\n scope.setExtras(extras);\n }\n\n if (tags) {\n scope.setTags(tags);\n }\n\n if (isError) {\n console.error(message);\n } else {\n console.warn(message);\n }\n });\n}\n","import { assert } from '@ember/debug';\nimport { getOwner, setOwner } from '@ember/owner';\nimport { inject as service } from '@ember/service';\n\nimport type Model from '@ember-data/model';\nimport type { Registry as ServiceRegistry } from '@ember/service';\nimport type BaseWebsocketMessage from './messages/base.ts';\n\nexport interface Payload {\n id: string;\n type: string;\n attributes: Record;\n relationships?: Record;\n}\n\n/**\n * Helper to turn query string from kafka into a JSON object\n */\nexport function parseQueryString(queryString: string): { [key: string]: any } {\n const pairs = queryString.split('&'),\n result: { [key: string]: any } = {};\n\n pairs.forEach((pair) => {\n const [key, value] = pair.split('='),\n decodedKey = decodeURIComponent(key),\n decodedValue = decodeURIComponent(value);\n\n // Check if the key is 'body' and parse it as JSON if necessary\n // This is specific to DeviceLifeCycleManagement Provisioning Events\n if (decodedKey === 'body') {\n result[decodedKey] = JSON.parse(decodedValue);\n } else {\n result[decodedKey] = decodedValue;\n }\n });\n\n return result;\n}\n\n/**\n * @classdesc\n *\n * Base message handler class for websockets\n * Base functionality for taking messages and updating device data stores, if applicable\n */\nexport default abstract class BaseWebsocketMessageHandler {\n @service declare store: ServiceRegistry['store'];\n @service declare websocket: ServiceRegistry['websocket'];\n\n constructor(host: ServiceRegistry['websocket']) {\n const owner = getOwner(host);\n assert('Websocket Handler requires owner', owner);\n setOwner(this, owner);\n }\n\n /**\n * The model type in the data store that this message handler updates when receiving messages.\n */\n abstract get modelName(): string;\n\n /**\n * The event types handled by this message handler.\n */\n get handlesEventTypes(): number[] {\n return [];\n }\n\n /**\n * Which monitoring event types does this message handler handle?\n */\n handlesMonitoringEventTypes: number[] = [];\n\n /**\n * Which property types does this message handler handle?\n */\n handlesPropertyTypes: number[] = [];\n\n /**\n * Does this message handler care about status updates?\n */\n handlesStatusUpdates = false;\n\n /**\n * Does this message handler care about geofence crossings?\n */\n handlesGeofenceCrossings = false;\n\n /**\n * Should we refresh the device?\n */\n shouldReloadModel = false;\n\n /**\n * Should we refresh the whole model store?\n *\n * This setting will ignore payloads and just refresh the whole store when a message arrives.\n */\n shouldReloadStore = false;\n\n /**\n * Should we create a new model if it's not currently present?\n */\n shouldCreateNewModel = false;\n\n /**\n * Does the handler have an additional payload to apply outside of the model record?\n */\n get hasAdditionalPayload(): boolean {\n return false;\n }\n\n /**\n * Overridable method for optional arbitrary handler action\n */\n handleMessage(): void {\n return;\n }\n\n /**\n * Processes messages\n */\n process(message: BaseWebsocketMessage): boolean {\n const { store } = this;\n if (!this.willHandle(message)) {\n return false;\n }\n\n // Call optional handler-specific logic\n this.handleMessage();\n\n // Hit the API and get new data.\n if (this.shouldReloadStore && store.peekAll(this.modelName).toArray().length > 0) {\n store.findAll(this.modelName);\n return false;\n }\n\n // Does the device exist?\n const model = store.peekRecord(this.modelName, message.deviceId);\n if (!this.shouldCreateNewModel && !model) {\n return false;\n }\n\n // Get the partial update object for what the message is trying to change\n const payload = this.getPayload(model, message);\n\n if (this.shouldReloadModel || (!payload && !this.hasAdditionalPayload)) {\n // If message handling fails, refresh the device model\n model.reload();\n return false;\n }\n\n if (payload) {\n // Push partial update to store\n store.push({ data: payload });\n }\n\n return true;\n }\n\n /**\n * Process the message and return a payload to push to the ember store\n */\n abstract getPayload(model: Model, message: BaseWebsocketMessage): Payload | undefined;\n\n /**\n * Return the model id and type\n */\n getIdType(model: Model): { id: string; type: string } {\n return {\n id: model.id,\n type: this.modelName ?? ''\n };\n }\n\n /**\n * Indicates whether this handler applies to the passed message.\n */\n willHandle(message: BaseWebsocketMessage): boolean {\n const { type, subtype } = message,\n isValidEvent = type === 'event' && this.handlesEventTypes.includes(Number(subtype)),\n isValidMonitoringEvent =\n type === 'monitoringEvent' && this.handlesMonitoringEventTypes.includes(Number(subtype)),\n isValidProperty = type === 'propertyChange' && this.handlesPropertyTypes.includes(Number(subtype)),\n isValidStatusUpdate = type === 'statusUpdate' && this.handlesStatusUpdates,\n isValidGeofenceCrossing = type === 'geofenceCrossing' && this.handlesGeofenceCrossings;\n\n return (\n isValidEvent || isValidMonitoringEvent || isValidProperty || isValidStatusUpdate || isValidGeofenceCrossing\n );\n }\n}\n","import { inject as service } from '@ember/service';\nimport { camelize } from '@ember/string';\nimport { pluralize } from 'ember-inflector';\nimport BaseModelAdapter from '../../base-model-adapter.ts';\n\nimport type EnvSettingsService from '@adc/app-infrastructure/services/env-settings';\nimport type ModelRegistry from 'ember-data/types/registries/model';\n\nexport default class SmartArmingRulesAdapter extends BaseModelAdapter {\n @service declare envSettings: EnvSettingsService;\n\n /**\n * The namespace is overriden here since the smart arming rule backend controller\n * was moved into the SharedWebApi project to be used by both the customer site\n * and mobile tech.\n *\n * @override\n */\n get namespace(): string {\n const { sitePrefix } = this.envSettings.getEnvironment() || {};\n return `${sitePrefix ?? '/web'}/api/swa`;\n }\n\n /**\n * @override\n */\n pathForType(modelName: K): string {\n return pluralize(camelize(modelName as string));\n }\n}\n","import { service } from '@ember/service';\nimport {\n isProcessingErrorStatusCode,\n isServerProcessingErrorStatusCode,\n getProcessingErrorStatusCode,\n getServerProcessingErrorStatusCode\n} from '@adc/ajax/utils/status-codes';\nimport BaseAdapter from '@adc/app-infrastructure/adapters/base-adapter';\n\nimport type { Error } from '@adc/app-infrastructure/utils/error';\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type NotificationManager from '@adc/ui-components/services/notification-manager';\n\nexport default class BaseModelAdapter extends BaseAdapter {\n @service declare intl: ADCIntlService;\n @service declare notificationManager: NotificationManager;\n\n /**\n * Normalize the error response.\n */\n normalizeErrorResponse(\n status: number,\n _headers: object,\n payload: { Message: string; errors: Error[] }\n ): Error[] | null {\n payload = payload || {};\n\n const errors: Error[] = payload.errors || [];\n\n // Is this a processing/server processing error?\n if (isProcessingErrorStatusCode(status) || isServerProcessingErrorStatusCode(status)) {\n const codes = [getProcessingErrorStatusCode(), getServerProcessingErrorStatusCode()],\n defaultText = this.intl.t('generic.processingError');\n\n if (!errors.length) {\n errors.push({\n detail: defaultText,\n code: codes[0]\n });\n }\n\n // Make sure that all errors have details text.\n errors.forEach((error) => (error.detail = error.detail || defaultText));\n\n // Add processing errors to notification manager.\n errors\n .filter(({ code }) => codes.includes(code))\n .forEach(({ detail }) => this.notificationManager.addError(detail));\n\n return errors;\n }\n\n return errors.length ? errors : null;\n }\n}\n","import { attr } from '@ember-data/model';\nimport { computed, action } from '@ember/object';\nimport { service } from '@ember/service';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\n\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type { SegmentedTimeModel } from '@adc/ui-components/components/segmented-time-picker';\n\n/**\n * A helper function to parse the smart arming time into a date object\n */\nexport function getDateForTime(time: number): Date {\n const hours = Math.floor(time / 60),\n minutes = time % 60;\n\n const date = new Date();\n date.setHours(hours, minutes, 0, 0);\n return date;\n}\n\n/**\n * A smart arming rule that can be either a simple schedule or sensor based\n *\n * @classdesc\n */\nexport default class SmartArming extends BaseModel {\n @service declare intl: ADCIntlService;\n\n /**\n * Is this smart arming rule triggered by sensors?\n */\n @attr('boolean')\n declare isSensorBased: boolean;\n\n /**\n * Is this rule for disarming?\n */\n @attr('boolean')\n declare isDisarm: boolean;\n\n /**\n * Time to start this rule\n */\n @attr('number')\n declare startTime: number;\n\n /**\n * End time for this rule\n */\n @attr('number')\n declare endTime: number;\n\n /**\n * Whether or not to trigger a cutoff time to disarm the system by\n */\n @attr('boolean')\n declare cutoffTime: boolean;\n\n /**\n * How long do we listen for sensor activity?\n */\n @attr('number')\n declare duration: number;\n\n /**\n * Is this rule enabled?\n */\n @attr('boolean')\n declare isEnabled: boolean;\n\n /**\n * Device IDs of sensors we use as triggers for this rule\n */\n @attr('array')\n declare triggers: number[];\n\n /**\n * Is this the default configuration?\n */\n @attr('boolean', { defaultValue: false })\n declare isDefault: boolean;\n\n @computed('startTime')\n get localizedStartTime(): string {\n return this.parseTime(this.startTime);\n }\n\n @computed('endTime')\n get localizedEndTime(): string {\n return this.parseTime(this.endTime);\n }\n\n @computed('startTime')\n get segmentedStartTime(): SegmentedTimeModel {\n return this.getTimeModelFromRule(this.startTime);\n }\n\n @computed('endTime')\n get segmentedEndTime(): SegmentedTimeModel {\n return this.getTimeModelFromRule(this.endTime);\n }\n\n @computed('duration')\n get localizedDuration(): string {\n return this.parseDuration(this.duration);\n }\n\n /**\n * Is used to check if the proposed schedule is valid without saving it. In MT,\n * the editing and saving a rule is done on a separate page, and we need to validate\n * without actually saving the rule.\n */\n async isScheduleValid(existingRules: SmartArming[]): Promise {\n return (\n (\n await this.submitCustomApiCall<{ value?: { isValid: boolean } }>('isScheduleValid', 'POST', {\n serialize: () => ({\n modifiedRule: this.serialize(),\n existingRules: existingRules.map((rule) => rule.serialize())\n })\n })\n ).value?.isValid ?? false\n );\n }\n\n // #region Helper Functions\n\n /**\n * A helper function to parse a smart arming time into a readable time\n * as time is sent to client in minutes since midnight\n */\n private parseTime(time: number): string {\n const newTime = getDateForTime(time);\n\n return this.intl.formatDate(newTime, {\n hour: 'numeric',\n minute: 'numeric'\n });\n }\n\n /**\n * Get the segmented time picker model for a given rule time\n */\n private getTimeModelFromRule(ruleTime: number): SegmentedTimeModel {\n const timeDate = getDateForTime(ruleTime);\n\n return {\n hour: timeDate.getHours(),\n min: timeDate.getMinutes()\n };\n }\n /**\n * Parses the duration of minutes into translated Hours / Minute format\n */\n @action\n parseDuration(timeInt: number): string {\n const hours = Math.floor(Number(timeInt) / 60),\n minutes = Number(timeInt) % 60,\n { intl } = this;\n if (hours > 0 && minutes > 0) {\n return intl.t('generic.hourMinute', { hours, minutes });\n }\n\n return hours === 0 ? intl.t('generic.minutes', { num: minutes }) : intl.t('generic.hours', { num: hours });\n }\n\n // #endregion\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'automation/rules/smart-arming': SmartArming;\n }\n}\n","import { A } from '@ember/array';\nimport { registerDestructor } from '@ember/destroyable';\nimport Service from '@ember/service';\nimport { addWeakListener, removeListener } from '../utils/event-listeners.ts';\n\nconst CACHE_NAME = '_adcDomListeners',\n ON_CLOSE_CLICK_LISTENER_KEY = '_adcCloseOnClickListenerId';\n\n/**\n * @classdesc\n * A service for adding/removing/maintaining DOM listeners.\n */\nexport default class DomService extends Service {\n /**\n * Adds new event listener and caches for automatic clearing during tear down.\n *\n * @param destroyable - The object that requested the listener.\n * @param element - The element to attach the listener to.\n * @param event - Event which should trigger function.\n * @param fn - Function to call when event triggers.\n * @param isOnce - Should the event be triggered at most once?\n * @param capture - Should capture method be used?\n * @param passive - Should the event be captured passively?\n */\n addListener(\n destroyable: any,\n element: Node | Window | Document,\n event: string,\n fn: (evt: Event) => void,\n isOnce?: boolean,\n capture?: boolean,\n passive?: boolean\n ): string {\n destroyable[CACHE_NAME] = destroyable[CACHE_NAME] ?? A([]);\n const id = destroyable[CACHE_NAME].pushObject(\n addWeakListener(destroyable, element, event, fn, isOnce, capture, passive)\n );\n\n // Listen for destroy.\n registerDestructor(destroyable, () => this.removeListener(destroyable, id));\n\n return id;\n }\n\n /**\n * Removes listener with specified id.\n *\n * @param destroyable - The object that requested the listener.\n * @param id The ID of the listener to remove.\n */\n removeListener(destroyable: any, id: string): void {\n // Remove the registered listener.\n removeListener(id);\n\n // Remove the id from the local listeners holder.\n destroyable[CACHE_NAME]?.removeObject(id);\n }\n\n /**\n * Cleans up all listeners.\n *\n * @param destroyable - The object that requested the listeners.\n */\n removeAllListeners(destroyable: any): void {\n const domListeners = destroyable[CACHE_NAME];\n\n if (domListeners) {\n // Clear DOM listeners.\n domListeners.forEach(removeListener);\n\n // Clear the listeners array.\n domListeners.clear();\n destroyable[CACHE_NAME] = undefined;\n }\n }\n\n /**\n * Clears the close listener event handler (if it exists).\n *\n * @param destroyable - The object that requested the listener.\n */\n clearCloseClickListener(destroyable: any): void {\n const id = destroyable[ON_CLOSE_CLICK_LISTENER_KEY];\n if (id) {\n // Clear the listener id so that we know if we need to reattach it again.\n this.removeListener(destroyable, id);\n delete destroyable[ON_CLOSE_CLICK_LISTENER_KEY];\n }\n }\n\n /**\n * Attaches a click event listener to the entire document which calls the passed function on execution.\n *\n * @param destroyable - The object that requested the listener.\n * @param fnClose A handler for when the element should be closed.\n * @param fnTestElement An optional function for testing if the close action should proceed.\n */\n attachCloseHandler(destroyable: any, fnClose: () => void, fnTestElement?: (evt: Event) => boolean): void {\n // Does the listener already exist?\n if (destroyable[ON_CLOSE_CLICK_LISTENER_KEY]) {\n // Nothing to do.\n return;\n }\n\n // Create click handler.\n const fnClick = (evt: Event) => {\n // Is there a test function AND does it indicate this should be ignored?\n if (fnTestElement && fnTestElement(evt)) {\n // Ignore this click.\n return;\n }\n\n // Remove event listener (fires one time only).\n this.clearCloseClickListener(destroyable);\n\n // Execute close function.\n fnClose();\n };\n\n // Attach event listener and clear on destroy.\n destroyable[ON_CLOSE_CLICK_LISTENER_KEY] = this.addListener(\n destroyable,\n document,\n 'click',\n fnClick,\n false,\n true\n );\n registerDestructor(destroyable, this.clearCloseClickListener.bind(this, destroyable));\n }\n\n /**\n * Determines if an event occurred within the passed element.\n *\n * @param element The element to test.\n * @param evt The click event.\n * @param selector A CSS selector for the element to test.\n */\n verifyCloseTarget(element: HTMLElement, evt: Event, selector: string): boolean {\n const parent = element.querySelector(selector);\n return parent?.contains((evt.target || evt.srcElement) as Node) ?? false;\n }\n}\n","/**\n * General constants related to time.\n */\nexport const MINUTES_IN_HOUR = 60,\n MINUTES_IN_HALF_HOUR = MINUTES_IN_HOUR / 2,\n HOURS_IN_DAY = 24,\n DAYS_IN_WEEK = 7,\n MINUTES_IN_DAY = MINUTES_IN_HOUR * HOURS_IN_DAY,\n MINUTES_IN_WEEK = MINUTES_IN_DAY * DAYS_IN_WEEK,\n MAX_END_TIME = MINUTES_IN_DAY - 1;\n","import { schedule } from '@ember/runloop';\nimport { isDestroyed } from './ember-helpers.ts';\nimport { addWeakListener, removeListener } from './event-listeners.ts';\nimport { isFunction } from './general.ts';\n\n/**\n * Utility module for accessibility code.\n *\n * @module\n */\n\nexport interface FocusSettings {\n scopeSelector: string;\n escapeCallback: () => void;\n treatArrowsAsTabEvents: boolean;\n oldListenerId: string;\n}\n\n// region Key Codes\n\n/**\n * The key code for the shift key.\n */\nexport const SHIFT_KEY = 16;\n\n/**\n * The code for the left shift key.\n */\nexport const SHIFT_LEFT_CODE = 'ShiftLeft';\n\n/**\n * The code for the right shift key.\n */\nexport const SHIFT_RIGHT_CODE = 'ShiftRight';\n\n/**\n * The key code for the control key.\n */\nexport const CONTROL_KEY = 17;\n\n/**\n * The code for the left control key.\n */\nexport const CONTROL_LEFT_CODE = 'ControlLeft';\n\n/**\n * The code for the right control key.\n */\nexport const CONTROL_RIGHT_CODE = 'ControlRight';\n\n/**\n * The key code for the space key.\n */\nexport const SPACE_KEY = 32;\n\n/**\n * The code for the space key.\n */\nexport const SPACE_CODE = 'Space';\n\n/**\n * The key code for the enter key.\n */\nexport const ENTER_KEY = 13;\n\n/**\n * The code for the enter key.\n */\nexport const ENTER_CODE = 'Enter';\n\n/**\n * The code for the numpad enter key.\n */\nexport const NUMPAD_ENTER_CODE = 'NumpadEnter';\n\n/**\n * The key code for the escape key.\n */\nexport const ESCAPE_KEY = 27;\n\n/**\n * The code for the escape key.\n */\nexport const ESCAPE_CODE = 'Escape';\n\n/**\n * The key code for the tab key.\n */\nexport const TAB_KEY = 9;\n\n/**\n * The code for the tab key.\n */\nexport const TAB_CODE = 'Tab';\n\n/**\n * The key code for the down-arrow key.\n */\nexport const DOWN_ARROW_KEY = 40;\n\n/**\n * The code for the down-arrow key.\n */\nexport const ARROW_DOWN_CODE = 'ArrowDown';\n\n/**\n * The key code for the up-arrow key.\n */\nexport const UP_ARROW_KEY = 38;\n\n/**\n * The code for the up-arrow key.\n */\nexport const ARROW_UP_CODE = 'ArrowUp';\n\n/**\n * The key code for the left-arrow key.\n */\nexport const LEFT_ARROW_KEY = 37;\n\n/**\n * The code for the left-arrow key.\n */\nexport const ARROW_LEFT_CODE = 'ArrowLeft';\n\n/**\n * The key code for the right-arrow key.\n */\nexport const RIGHT_ARROW_KEY = 39;\n\n/**\n * The code for the right-arrow key.\n */\nexport const ARROW_RIGHT_CODE = 'ArrowRight';\n\n/**\n * The key code for the Home key.\n */\nexport const HOME_KEY = 36;\n\n/**\n * The code for the Home key.\n */\nexport const HOME_CODE = 'Home';\n\n/**\n * The key code for the End key.\n */\nexport const END_KEY = 35;\n\n/**\n * The code for the End key.\n */\nexport const END_CODE = 'End';\n\n/**\n * The key code for the Backspace key.\n */\nexport const BACKSPACE_KEY = 8;\n\n/**\n * The code for the Backspace key.\n */\nexport const BACKSPACE_CODE = 'Backspace';\n\n/**\n * The key code for the Equals key.\n */\nexport const EQUALS_KEY = 187;\n\n/**\n * The code for the Equals key.\n */\nexport const EQUAL_CODE = 'Equal';\n\n/**\n * The key code for the left-bracket key.\n */\nexport const LEFT_BRACKET_KEY = 219;\n\n/**\n * The code for the left-bracket key.\n */\nexport const BRACKET_LEFT_CODE = 'BracketLeft';\n\n/**\n * The key code for the right-bracket key.\n */\nexport const RIGHT_BRACKET_KEY = 221;\n\n/**\n * The code for the right-bracket key.\n */\nexport const BRACKET_RIGHT_CODE = 'BracketRight';\n\n/**\n * The key code for the b key.\n */\nexport const B_KEY = 66;\n\n/**\n * The code for the b key.\n */\nexport const B_CODE = 'KeyB';\n\n/**\n * The key code for the c key.\n */\nexport const C_KEY = 67;\n\n/**\n * The code for the c key.\n */\nexport const C_CODE = 'KeyC';\n\n/**\n * The key code for the d key.\n */\nexport const D_KEY = 68;\n\n/**\n * The code for the d key.\n */\nexport const D_CODE = 'KeyD';\n\n/**\n * The key code for the e key.\n */\nexport const E_KEY = 69;\n\n/**\n * The code for the e key.\n */\nexport const E_CODE = 'KeyE';\n\n/**\n * The key code for the f key.\n */\nexport const F_KEY = 70;\n\n/**\n * The code for the f key.\n */\nexport const F_CODE = 'KeyF';\n\n/**\n * The key code for the n key.\n */\nexport const N_KEY = 78;\n\n/**\n * The code for the n key.\n */\nexport const N_CODE = 'KeyN';\n\n/**\n * The key code for the s key.\n */\nexport const S_KEY = 83;\n\n/**\n * The code for the s key.\n */\nexport const S_CODE = 'KeyS';\n\n/**\n * The key code for the t key.\n */\nexport const T_KEY = 84;\n\n/**\n * The code for the t key.\n */\nexport const T_CODE = 'KeyT';\n\n// endregion\n\n// region Utility Functions\n\n/**\n * Checks if the given key code is for Enter or Space\n *\n * @param code - the code of the key\n */\nexport function isEnterOrSpaceCode(code: string): boolean {\n return code === ENTER_CODE || code === SPACE_CODE || code === NUMPAD_ENTER_CODE;\n}\n\n/**\n * Checks if the given key code is for arrow right.\n *\n * @param code - the code of the key\n */\nexport function isArrowRightCode(code: string): boolean {\n return code === ARROW_RIGHT_CODE;\n}\n\n/**\n * Checks if the given key code is for arrow left.\n *\n * @param code - the code of the key\n */\nexport function isArrowLeftCode(code: string): boolean {\n return code === ARROW_LEFT_CODE;\n}\n\n/**\n * Checks if the given key code is for arrow down.\n *\n * @param code - the code of the key\n */\nexport function isArrowDownCode(code: string): boolean {\n return code === ARROW_DOWN_CODE;\n}\n\n/**\n * Checks if the given key code is for arrow up.\n *\n * @param code - the code of the key\n */\nexport function isArrowUpCode(code: string): boolean {\n return code === ARROW_UP_CODE;\n}\n\n/**\n * Checks if the given key code is for arrows.\n *\n * @param code - the code of the key\n */\nexport function isArrowCode(code: string): boolean {\n return isArrowDownCode(code) || isArrowUpCode(code) || isArrowLeftCode(code) || isArrowRightCode(code);\n}\n\n/**\n * Checks if the given key code is for tab.\n *\n * @param code - the code of the key\n */\nexport function isTabCode(code: string): boolean {\n return code === TAB_CODE;\n}\n\n/**\n * Checks if the given key code is for enter.\n *\n * @param code - the code of the key\n */\nexport function isEnterCode(code: string): boolean {\n return code === ENTER_CODE || code === NUMPAD_ENTER_CODE;\n}\n\n/**\n * Checks if the given key code is for space.\n *\n * @param code - the code of the key\n */\nexport function isSpaceCode(code: string): boolean {\n return code === SPACE_CODE;\n}\n\n/**\n * Checks if the given key code is for escape.\n *\n * @param code - the code of the key\n */\nexport function isEscapeCode(code: string): boolean {\n return code === ESCAPE_CODE;\n}\n\n/**\n * Checks if the given key code is for home.\n *\n * @param code - the code of the key\n */\nexport function isHomeCode(code: string): boolean {\n return code === HOME_CODE;\n}\n\n/**\n * Checks if the given key code is for backspace.\n *\n * @param code - the code of the key\n */\nexport function isBackspaceCode(code: string): boolean {\n return code === BACKSPACE_CODE;\n}\n\n/**\n * Returns if the node handles some keyboard input by default.\n */\nexport function nodeHandlesKeyboardInput(node: Node): boolean {\n return ['INPUT', 'TEXTAREA', 'SELECT'].includes(node.nodeName);\n}\n\n/**\n * Returns if the node handles some space or enter input by default.\n */\nexport function nodeHandlesSpaceOrEnterInput(node: Node): boolean {\n return ['A', 'BUTTON', 'INPUT', 'TEXTAREA', 'VIDEO', 'SELECT'].includes(node.nodeName);\n}\n\n// endregion\n\n// region Trap Focus Listener\n\n/**\n * Creates a key listener to only tab between elements that live within the given DOM scope, which will be destroyed when the passed context is destroyed.\n *\n * @param scopeSelector - The CSS selector that scopes which elements can be focused.\n * @param escapeCallback - A callback method to call if the escape key is pressed.\n * @param treatArrowsAsTabEvents - Should the up/down arrow keys be treated as tab/shift+tab events?\n * @param oldListenerId - An optional listener ID to remove if we are creating a new one.\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function addWeakTrapFocusListener(\n destroyable: any,\n { scopeSelector, escapeCallback, treatArrowsAsTabEvents, oldListenerId }: FocusSettings\n): string | undefined {\n if (isDestroyed(destroyable)) {\n return undefined;\n }\n\n const element = document.querySelector(scopeSelector);\n\n if (oldListenerId) {\n removeListener(oldListenerId);\n }\n\n return addWeakListener(destroyable, element ?? window, 'keydown', (event: KeyboardEvent) =>\n trapFocus(event, scopeSelector, escapeCallback, treatArrowsAsTabEvents)\n );\n}\n\n/**\n * First tab is set to TRUE until the second TAB key is pressed\n */\nlet isFirstTabPressInTrapFocusListener = true;\n\n/**\n * Removes the listener with the given ID.\n */\nexport function removeTrapFocusListener(listenerId: string): void {\n removeListener(listenerId);\n isFirstTabPressInTrapFocusListener = true;\n}\n\n/**\n * Ensures only the elements within the scopeSelector can be tabbed between.\n *\n * @param event - The keyboard event to evaluate.\n * @param scopeSelector - The CSS selector that scopes which elements can be accessed by the tab key.\n * @param escapeCallback - A callback method to call if the escape key is pressed.\n * @param treatArrowsAsTabEvents - Should the up/down arrow keys be treated as tab/shift+tab events?\n */\nfunction trapFocus(\n event: KeyboardEvent,\n scopeSelector: string,\n escapeCallback: () => any,\n treatArrowsAsTabEvents: boolean\n) {\n // window.event is available on Firefox from version 63, in previous versions it is not supported.\n // In other browsers and higher versions on Firefox the default window.event is taken and that's why for the Firefox versions where is not supported we need to pass the event.\n\n if (event.code === TAB_CODE) {\n changeElementInFocus(scopeSelector, event.shiftKey, event);\n return;\n }\n\n if (treatArrowsAsTabEvents && [ARROW_UP_CODE, ARROW_DOWN_CODE].includes(event.code)) {\n changeElementInFocus(scopeSelector, event.code === ARROW_UP_CODE, event);\n return;\n }\n\n if (event.code === ESCAPE_CODE && isFunction(escapeCallback)) {\n escapeCallback();\n }\n}\n\n/**\n * Check if element is visible or not (hidden from css)\n *\n * @public\n *\n * @param el - element that needs to be checked\n */\nexport function isVisible(el: Element): boolean {\n const { width, height } = el.getBoundingClientRect();\n\n return width !== 0 && height !== 0;\n}\n\n/**\n * Get all focusable elements from a specific container\n */\nexport function getFocusableElements(baseElement: Element): Element[] {\n return Array.from(baseElement.querySelectorAll('a, button, object, input, iframe, select, [tabindex]')).filter(\n (item) => item.getAttribute('tabindex') !== '-1' && isVisible(item)\n );\n}\n\n/**\n * Cycles through the tabbed elements and selects the next/previous one based on the keyboard event.\n *\n * @param {Object} focusSettings - The settings used to determine which element to focus.\n * @param {String} focusSettings.scopeSelector - The CSS selector that scopes which elements can be focused.\n * @param {String} focusSettings.shouldFocusPreviousElement - Determines the direction for the newly focused item (next or previous).\n *\n * @public\n */\nfunction changeElementInFocus(scopeSelector: string, shouldFocusPreviousElement: boolean, event: KeyboardEvent) {\n const { code } = event,\n baseElement = window.document.body.querySelector(scopeSelector),\n // Some of the elements might have tabindex=\"-1\" and we need to remove these from the list\n focusElements = getFocusableElements(baseElement as Element),\n currentIndex = Array.prototype.indexOf.call(focusElements, document.activeElement),\n elementCount = focusElements.length,\n lastElementIndex = elementCount - 1,\n listContainer = baseElement?.querySelector('ul, ol, [role=\"list\"]');\n\n let listItems;\n\n if (listContainer) {\n listItems = getFocusableElements(listContainer);\n }\n\n if (elementCount) {\n let newIndex = currentIndex + (shouldFocusPreviousElement ? -1 : 1);\n\n // Ensure the edge cases wrap back around to focus the correct element.\n if (shouldFocusPreviousElement) {\n if (currentIndex === 0) {\n newIndex = lastElementIndex;\n }\n } else if (currentIndex === lastElementIndex) {\n newIndex = 0;\n }\n\n // If TAB is pressed for the first time we need to focus the element with aria-selected=\"true\".\n if (isFirstTabPressInTrapFocusListener) {\n for (let i = 0; i < elementCount; i++) {\n if (focusElements[i].getAttribute('aria-selected') === 'true') {\n newIndex = i;\n break;\n }\n }\n\n if (focusElements[newIndex]) {\n if (\n focusElements[newIndex].getAttribute('aria-selected') === 'true' &&\n focusElements[newIndex] === document.activeElement\n ) {\n const step = newIndex + (shouldFocusPreviousElement ? -1 : 1);\n\n newIndex = newIndex === lastElementIndex ? 0 : step;\n }\n }\n }\n\n isFirstTabPressInTrapFocusListener = false;\n\n if (listItems && isArrowCode(code)) {\n const listItemsLastIndex = listItems.length - 1;\n\n if (isArrowDownCode(code) && listItems.indexOf(focusElements[currentIndex]) === listItemsLastIndex) {\n newIndex = focusElements.indexOf(listItems[0]);\n }\n\n if (isArrowUpCode(code)) {\n newIndex = currentIndex - 1;\n\n if (listItems.indexOf(focusElements[currentIndex]) === 0) {\n newIndex = focusElements.indexOf(listItems[listItemsLastIndex]);\n }\n }\n }\n\n if (focusElements[newIndex]) {\n (focusElements[newIndex] as HTMLInputElement).focus();\n }\n\n event.preventDefault();\n }\n}\n\n/**\n * Used for activating a focus trap -- typically used when tab indices are set to -1\n * initially, and the focus trap must be activated for elements to be tabbable.\n *\n * @param targetClass - contains the class for whichever section is controlled by the focus trap.\n * @param updateTrapFocusHandler - should update the trap focus property on the caller and schedule focus on first focusable element in target if needed.\n * @param getElementToFocus - gets the HTML Element to focus on after activating focus trap.\n */\nexport function activateFocusTrap(\n event: KeyboardEvent,\n target: HTMLElement,\n targetClass: string,\n updateTrapFocusHandler: (state: boolean) => void,\n getElementToFocus: () => HTMLElement | null\n): void {\n if (target.classList.contains(targetClass)) {\n event.preventDefault();\n event.stopPropagation();\n\n const { code } = event;\n\n if (isEnterOrSpaceCode(code)) {\n updateTrapFocusHandler(true);\n\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n schedule('afterRender', () => {\n const focusTarget = getElementToFocus();\n if (focusTarget) {\n const [firstElement] = getFocusableElements(focusTarget);\n (firstElement as HTMLElement)?.focus();\n }\n });\n } else if (isEscapeCode(code)) {\n updateTrapFocusHandler(false);\n }\n }\n}\n\n// endregion\n","/**\n * Utility helper module for array related code.\n *\n * @module\n */\n\n/**\n * Compares the equality of arrays based on their contents\n */\nexport function areArraysSame(first: T[], second: T[]): boolean {\n return first && second && first.length === second.length && first.every((item, index) => item === second[index]);\n}\n","/**\n * Utility helper module for browser related code.\n * @module\n */\n\nimport { Promise as EmberPromise } from 'rsvp';\n\n// region Cookies\n\n/**\n * Expire cookie based on the cookie name.\n *\n * @param name The name of the cookie that will be changed.\n */\nexport function expireCookie(name: string): void {\n const date = new Date();\n date.setTime(date.getTime() + -1 * 24 * 60 * 60 * 1000);\n\n document.cookie = `${name}=''; expires=${date.toUTCString()}; path=/`;\n}\n\n/**\n * Returns a single cookie value.\n *\n * @param cookieName The name of the cookie value to retrieve.\n */\nexport function getCookie(cookieName: string): string {\n return (document.cookie || '').split('; ').reduce((value, cookie) => {\n // Extract name and all values (since value may contain equals signs).\n const [name, ...cookieValue] = cookie.split('=');\n\n // Return cookie values if this is the anti-forgery token.\n return name === cookieName ? cookieValue.join('=') : value;\n }, '');\n}\n\n// endregion\n\n// region DOM Helpers\n\n/**\n * Add or remove specified class from the body element.\n *\n * @param className\n * @param add - When true, the class will be added, when false the class will be removed.\n */\nexport function toggleClassOnBody(className: string, add: boolean): void {\n toggleClassOnElement(document.body, className, add);\n}\n\n/**\n * Add or remove specified class from a specific element.\n *\n * @param element\n * @param className\n * @param add - When true, the class will be added, when false the class will be removed.\n */\nexport function toggleClassOnElement(element: HTMLElement, className: string, add: boolean): void {\n // Cannot use toggle with a forced value, because IE does not support forced value.\n element.classList[add ? 'add' : 'remove'](className);\n}\n\n// endregion\n\ninterface ScrollIntoViewIfNeededOptions {\n centerIfNeeded?: boolean;\n padding?: number;\n animate?: boolean;\n}\n\ntype Area = {\n left: number;\n top: number;\n width: number;\n height: number;\n right: number;\n bottom: number;\n translate(x: number, y: number): Area;\n relativeFromTo(lhs: HTMLElement, rhs: HTMLElement): Area;\n};\n\n/**\n * Scrolls an element into view if it is not in the current viewport.\n *\n * @note Taken from https://github.com/stipsan/scroll-into-view-if-needed . I did not want to just import it because I wanted to modify it a little.\n *\n * @param elem\n * @param [options={}]\n * @param finalElement - Used for stopping recursion.\n */\nexport function scrollIntoViewIfNeeded(\n elem: HTMLElement & {\n scrollIntoViewIfNeeded?: (centerIfNeeded?: boolean) => void;\n },\n options: ScrollIntoViewIfNeededOptions = {},\n finalElement?: HTMLElement\n): void {\n // Webkit has this implemented natively, so use that function it if it available.\n if (elem.scrollIntoViewIfNeeded) {\n elem.scrollIntoViewIfNeeded(options.centerIfNeeded);\n\n return;\n }\n\n const { centerIfNeeded, padding = 0, animate } = options;\n\n if (!elem) {\n throw new Error('Element is required in scrollIntoViewIfNeeded');\n }\n\n function withinBounds(value: number, min: number, max: number, extent: number): number {\n if (false === centerIfNeeded || (max <= value + extent && value <= min + extent)) {\n return Math.min(max, Math.max(min, value));\n }\n\n return (min + max) / 2;\n }\n\n function makeArea(left: number, top: number, width: number, height: number): Area {\n return {\n left,\n top,\n width,\n height,\n right: left + width,\n bottom: top + height,\n translate(x: number, y: number): Area {\n return makeArea(x + left, y + top, width, height);\n },\n relativeFromTo(lhs: HTMLElement, rhs: HTMLElement): Area {\n let newLeft = left,\n newTop = top;\n\n let tempLHS = lhs.offsetParent as HTMLElement,\n tempRHS = rhs.offsetParent as HTMLElement;\n\n if (tempLHS === tempRHS) {\n return area;\n }\n\n for (; tempLHS; tempLHS = tempLHS.offsetParent as HTMLElement) {\n newLeft += tempLHS.offsetLeft + tempLHS.clientLeft;\n newTop += tempLHS.offsetTop + tempLHS.clientTop;\n }\n\n for (; tempRHS; tempRHS = tempRHS.offsetParent as HTMLElement) {\n newLeft -= tempRHS.offsetLeft + tempRHS.clientLeft;\n newTop -= tempRHS.offsetTop + tempRHS.clientTop;\n }\n\n return makeArea(newLeft, newTop, width, height);\n }\n };\n }\n\n const { offsetLeft, offsetTop, offsetWidth, offsetHeight } = elem;\n\n let parent,\n area = makeArea(\n offsetLeft - padding,\n offsetTop - padding,\n offsetWidth + padding * 2,\n offsetHeight + padding * 2\n );\n\n while ((parent = elem.parentNode) instanceof HTMLElement && elem !== finalElement) {\n const clientLeft = parent.offsetLeft + parent.clientLeft;\n const clientTop = parent.offsetTop + parent.clientTop;\n\n // Make area relative to parent's client area.\n area = area.relativeFromTo(elem, parent).translate(-clientLeft, -clientTop);\n\n const scrollLeft = withinBounds(\n parent.scrollLeft,\n area.right - parent.clientWidth,\n area.left,\n parent.clientWidth\n );\n\n const scrollTop = withinBounds(\n parent.scrollTop,\n area.bottom - parent.clientHeight,\n area.top,\n parent.clientHeight\n );\n\n if (animate) {\n // TODO: Figure out how to animate things.\n // animate(parent, {\n // scrollLeft: scrollLeft,\n // scrollTop: scrollTop\n // }, options)\n } else {\n parent.scrollLeft = scrollLeft;\n parent.scrollTop = scrollTop;\n }\n\n // Determine actual scroll amount by reading back scroll properties.\n area = area.translate(clientLeft - parent.scrollLeft, clientTop - parent.scrollTop);\n elem = parent;\n }\n}\n\n/**\n * Loads script that gets immediately executed. Resolves once script has been loaded.\n */\nexport function loadScript(scriptUrl: string): Promise {\n return new EmberPromise((resolve, reject) => {\n const scriptEl = document.createElement('script');\n\n scriptEl.src = scriptUrl;\n\n scriptEl.onload = () => {\n // Remove script element from the body.\n scriptEl.parentNode?.removeChild(scriptEl);\n\n // Resolve promise.\n resolve();\n };\n\n scriptEl.onerror = reject;\n\n // Finally add the script to the body so that it can get loaded up.\n document.body.appendChild(scriptEl);\n });\n}\n\n/**\n * Determines if the browser is running on a mobile device.\n */\nexport function isMobileBrowser(): boolean {\n const userAgent = navigator.userAgent;\n\n /*\n iPad outputs same platform type as a macbook since iOS 13.\n Thus, we now have a secondary check where we confirm that it is MacIntel with multiple touch point since\n iPad is touchscreen whereas a macbook is not.\n https://stackoverflow.com/questions/58019463/how-to-detect-device-name-in-safari-on-ios-13-while-it-doesnt-show-the-correct/58064481#58064481\n */\n return (\n ((/ipad|iphone|ipod/i.test(userAgent) || (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1)) &&\n (!('MSStream' in window) || !window.MSStream)) ||\n /android|webos|blackberry|iemobile|mpera mini/i.test(userAgent)\n );\n}\n","import { MINUTES_IN_DAY } from '../constants/time.ts';\n\n/**\n * Utility helper module for date-time-related code.\n *\n * @module\n */\n\n/**\n * Returns a new Date object, using the optional base time, hours and minutes.\n *\n * @static\n */\nexport function newDate(hours = 0, minutes = 0, base: number | Date = Date.now()): Date {\n base = new Date(base);\n return new Date(base.setHours(hours, minutes, 0, 0));\n}\n\n/**\n * Returns a new Date object representing a given number of days in the future, rounded down\n * (backwards) to the nearest minute.\n */\nexport function nowPlusDays(days: number): Date {\n const date = new Date();\n date.setUTCSeconds(0);\n date.setUTCMilliseconds(0);\n date.setDate(date.getDate() + days);\n return date;\n}\n\n/**\n * Returns the duration in minutes of a daily schedule. It ranges between 0 and 1440 (24hrs).\n */\nexport function getDayScheduleDuration(beginTime = 0, endTime = 0): number {\n let difference = endTime - beginTime;\n\n if (difference === 0) {\n difference = MINUTES_IN_DAY;\n } else if (difference < 0) {\n difference += MINUTES_IN_DAY;\n }\n\n return Math.min(++difference, MINUTES_IN_DAY);\n}\n","/**\n * Utility helper module for debugging.\n *\n * @module\n */\n\n/**\n * Logs an error indicating that the supplied context Object must implement the supplied member.\n *\n * @param context The Ember object (route, controller, component, etc) that should implement the abstract member.\n * @param memberName The name of the missing abstract member.\n *\n * @deprecated Please use TypeScript and make methods abstract instead.\n */\nexport function logMissingAbstractMember(context: { toString(): string }, memberName: string): void {\n console.error(`${context.toString()} must implement ${memberName}.`);\n}\n","/**\n * Ember related helpers.\n *\n * @module\n */\n\nimport { get } from '@ember/object';\n\n/**\n * Tests the passed Ember.Object to see if it has been destroyed, or is in the process of being destroyed.\n */\nexport function isDestroyed(object: unknown): boolean {\n return ['isDestroyed', 'isDestroying'].some((name) => get(object || [], name as keyof typeof object));\n}\n\n/**\n * Extracts properties from the passed object and returns their values in an array.\n */\nexport function getObjProperties(obj: T, ...names: K[]): T[K][] {\n return names.map((name) => get(obj, name) as T[K]);\n}\n\n/**\n * Takes a list of [ testCase, className ] pairs and returns a string of all classNames where the testCase passed.\n *\n * @param {Array<{testCase: boolean, String:className}>} classList - An array of testCase/className pairs.\n *\n * @returns {String}\n */\nexport function buildClassListString(classList: (boolean | string)[][]): string {\n const classes = classList.reduce((appliedClasses, [shouldAddClass, className]) => {\n if (shouldAddClass) {\n appliedClasses.push(className);\n }\n\n return appliedClasses;\n }, []);\n\n return classes.join(' ');\n}\n","import { registerDestructor } from '@ember/destroyable';\n\nconst listenerCache = 'appEventListeners';\n\ntype ListenerConfig = {\n id: string;\n element?: Node | Window | Document;\n event: string;\n fnEvent?: EventListener;\n eventOptions: AddEventListenerOptions;\n initialized: number;\n};\n\ndeclare global {\n interface Window {\n [listenerCache]: Record;\n }\n}\n\n/**\n * Returns unix timestamp in seconds. Don't care about the timezone here so this is ok.\n */\nfunction getTimestamp(): number {\n return Math.round(new Date().getTime() / 1000);\n}\n\n/**\n * Schedules garbage collection run.\n */\nfunction runGarbageCollection(): void {\n // Run GC in 20 seconds.\n setTimeout(() => {\n const callback = window.requestIdleCallback || window.requestAnimationFrame;\n\n callback(() => {\n const listeners = getEventListenersObject(),\n keys = Object.keys(listeners),\n count = keys.length,\n timestamp = getTimestamp();\n\n for (let i = 0; i < count; i++) {\n const { id, element, initialized } = listeners[keys[i]];\n\n // Do not check the listener if it was initialized less than 30 seconds ago.\n if (!initialized || timestamp < initialized + 30) {\n continue;\n }\n\n if (!element || element === window || element === document) {\n // Do nothing if the element is window or document, because we cannot collect those.\n continue;\n }\n\n // If the element is still in the DOM, it is all good.\n if (document.body.contains(element as Node)) {\n continue;\n }\n\n // We should garbage collect, remove listener.\n console.warn('Garbage collecting listener for element no longer in DOM', element);\n\n removeListener(id);\n }\n\n // Call yourself again.\n runGarbageCollection();\n });\n }, 20000);\n}\n\n/**\n * Gets event listeners object.\n */\nfunction getEventListenersObject(): Record {\n // Ensure that event listeners object is instantiated.\n if (!window[listenerCache]) {\n window[listenerCache] = {} as Record;\n\n // Initialize garbage collection in case we mess stuff up.\n runGarbageCollection();\n }\n\n return window[listenerCache];\n}\n\n/**\n * Returns a unique id for a new event.\n */\nfunction generateEventId(): string {\n const { crypto } = window,\n values = new Uint32Array(4);\n\n crypto.getRandomValues(values);\n\n const id = Array.from(values).join('-');\n\n // Sanity check to make sure that the id is ok.\n // Not including a stop clause, because the probability of us not getting it right on one or two tries is very low.\n if (getEventListenersObject()[id]) {\n return generateEventId();\n }\n\n return id;\n}\n\n/**\n * Adds new event listener to element with specified properties, that will be destroyed automatically when the passed context is destroyed.\n *\n * @param element\n * @param event - Event which should trigger function.\n * @param fn - Function to call when event triggers.\n * @param isOnce - Should the event be triggered at most once?\n * @param capture - Should capture method be used?\n * @param passive - Should the event be captured passively?\n *\n * @returns The id of the event so that it can be referenced for removal.\n */\nexport function addWeakListener(\n destroyable: any,\n element: Node | Window | Document,\n event: string,\n fn: EventListener,\n isOnce = false,\n capture = false,\n passive?: boolean\n): string {\n // Passive events should be captured passively, if possible.\n if (passive === undefined && ['scroll', 'touchmove', 'touchstart', 'touchend', 'resize'].includes(event)) {\n passive = true;\n }\n\n // Generate id for this listener.\n const id = generateEventId();\n\n // Create options for the event listener.\n const eventOptions: AddEventListenerOptions = {\n capture,\n passive\n };\n\n if (isOnce) {\n eventOptions.once = true;\n }\n\n // If the event should be handled only once, we need to alter the calling function a bit so that we can remove the even after it was called once.\n const fnEvent = isOnce\n ? (evt: Event) => {\n // Remove listener.\n removeListener(id);\n\n // Call original function.\n return fn(evt);\n }\n : fn;\n\n // Add listener to the element.\n element.addEventListener(event, fnEvent, eventOptions);\n\n // Add everything to the events cache.\n getEventListenersObject()[id] = {\n id,\n element,\n event,\n fnEvent,\n eventOptions,\n initialized: getTimestamp()\n };\n\n // Register destructor so listener is removed when context is destroyed.\n registerDestructor(destroyable, () => removeListener(id));\n\n return id;\n}\n\n/**\n * Removes event listener associated with the specified id.\n */\nexport function removeListener(id: string): void {\n let data = getEventListenersObject()[id];\n if (!data) {\n // Listener was probably already removed.\n return;\n }\n\n // Remove listener.\n data.element?.removeEventListener(data.event, data.fnEvent as EventListener, data.eventOptions);\n\n // Clean up.\n delete data.element;\n delete data.fnEvent;\n data = {} as ListenerConfig;\n\n delete getEventListenersObject()[id];\n}\n","/**\n * Utility module for general JS related code.\n * @module\n */\n\n/**\n * Returns true if the given variable is a function.\n *\n * @param functionToCheck - The variable to check is a function.\n *\n * @deprecated Use `typeof functionToCheck === 'function'` instead.\n */\nexport function isFunction(functionToCheck: () => any): boolean {\n return functionToCheck && typeof functionToCheck === 'function';\n}\n","/**\n * Utility helper module for HTML direction attribute related code.\n * @module\n */\n\n// region Constants\n\n/**\n * The attribute value used for indicating an RTL language.\n */\nexport const RTL_STRING = 'rtl';\n\n/**\n * The name of our custom event that is fired whenever the HTML element's \"dir\" attribute changes.\n */\nexport const DIR_CHANGED_EVENT_KEY = 'htmlDirChanged';\n\n// endregion\n\n// region DOM Helpers\n\n/**\n * Is the page displayed using a RTL language format?\n *\n * @note By default, we assume the browser is LTR, unless a dir='rtl' attribute exists on the HTML element.\n */\nexport function isRtl(): boolean {\n return document.documentElement.attributes.getNamedItem('dir')?.value === RTL_STRING;\n}\n\n// endregion\n\n// region Mutation Observer\n\n/**\n * Creates the mutation observer that watches for any changes to the HTML element's \"dir\" attribute.\n *\n * @note We start the observer immediately, even though nothing is subscribed to it yet.\n * This should be low impact in terms of performance.\n */\n(function createHtmlDirectionObserver(): void {\n const directionChangedEvent = document.createEvent('Event');\n\n directionChangedEvent.initEvent(DIR_CHANGED_EVENT_KEY, true, true);\n\n const directionObserver = new MutationObserver((mutations) => {\n if (mutations.some((mutation) => mutation.attributeName === 'dir')) {\n document.dispatchEvent(directionChangedEvent);\n }\n });\n\n directionObserver.observe(document.documentElement, { attributes: true });\n})();\n\n// endregion\n","/**\n * Utility helper module for math- or number-related code.\n *\n * @module\n */\n\n/**\n * Force number to be within a range.\n *\n * @param n Number to be put into a range.\n * @param min Minimum value n can be.\n * @param max Maximum value n can be.\n *\n * @returns n if between min and max, min if n < min, max if n > max.\n */\nexport function constrainRange(n: number, min: number, max: number): number {\n return Math.min(Math.max(n, min), max);\n}\n\n/**\n * Determines if z exists between a and b.\n * Also allows for an epsilon buffer value, helpful when comparing floating-point values. Eps is by default 0.\n *\n * @param z Number to be checked.\n * @param a First range value.\n * @param b Second range value.\n * @param eps Small epsilon buffer value used when comparing values with < and >.\n *\n * @returns True if z is between a and b with a buffer, false otherwise.\n */\nexport function isBetween(z: number, a: number, b: number, eps = 0): boolean {\n const [left, right] = [a, b].sort((a, b) => a - b);\n return left - eps <= z && z <= right + eps;\n}\n","/**\n * Utility helper module for models.\n * @module\n */\n\n/**\n * Returns default attribute value.\n *\n * @deprecated Please use the object directly instead.\n */\nexport function defaultEmbeddedRecordSerializerAttribute(): { serialize: 'records' } {\n return {\n serialize: 'records'\n };\n}\n","/**\n * Utility helper module for RSVP shortcuts and objects.\n *\n * @module\n */\n\nimport { Promise as EmberPromise } from 'rsvp';\n\n/**\n * Returns a promise that will be resolved with the given data object.\n *\n * @deprecated Please use the native Promise.resolve() instead.\n */\nexport function RSVPResolve(data: T): ReturnType> {\n return EmberPromise.resolve(data);\n}\n\n/**\n * Returns a promise that will be rejected with the given error object.\n *\n * @deprecated Please use the native Promise.reject() instead.\n */\nexport function RSVPReject(error: T): EmberPromise {\n return EmberPromise.reject(error);\n}\n\n/**\n * Creates a compound RSVPPromiseType object that contains the promise itself and shortcuts to resolve and reject the promise.\n *\n * @deprecated This is hacky, and nobody understands it, please use the native Promise instead.\n */\nexport function RSVPPromise(): {\n promise: EmberPromise;\n resolve: (value?: T) => void;\n reject: (reason?: any) => void;\n} {\n const fn = () => {};\n let resolve: (value?: T) => void = fn,\n reject: (reason?: any) => void = fn;\n\n const promise = new EmberPromise((fnResolve, fnReject) => {\n resolve = fnResolve;\n reject = fnReject;\n });\n\n return {\n promise,\n resolve,\n reject\n };\n}\n\n/**\n * Checks if the passed in object is a promise.\n *\n * @deprecated This is a pretty naive test and just checks if the object has a .then property.\n */\nexport function isPromise(object?: any): boolean {\n return !!object?.then;\n}\n","/**\n * Helpers for awaiting Ember run cycles.\n * @module\n */\n\nimport {\n run as runEmber,\n next as nextEmber,\n cancel as cancelEmber,\n later as laterEmber,\n schedule as scheduleEmber\n} from '@ember/runloop';\nimport { RSVPPromise } from './rsvp.ts';\n\nimport type { EmberRunTimer } from '@ember/runloop/types';\n\ntype BasePromise = ReturnType>;\ntype TypedPromise = BasePromise & {\n promise: BasePromise['promise'] & {\n resolve: BasePromise['resolve'];\n cancelationToken?: EmberRunTimer;\n wasCancelled?: boolean;\n };\n};\ntype RunLoopReturnType = TypedPromise['promise'];\n\n// region Helpers.\n\nfunction getPromiseAndFn(\n method: (...args: any[]) => T,\n args: any[],\n context?: unknown\n): { rsvpPromise: TypedPromise; fn: () => Promise } {\n const rsvpPromise = RSVPPromise() as TypedPromise;\n\n // Cache resolve so that it can be resolved just by accessing the promise.\n rsvpPromise.promise.resolve = rsvpPromise.resolve;\n\n return {\n rsvpPromise,\n fn: async () => {\n // Call the method with specified arguments.\n const result = await (context ? method.call(context, ...args) : method(...args));\n\n // Resolve the promise.\n rsvpPromise.resolve(result);\n }\n };\n}\n\n// endregion.\n\n// region Simple run methods.\n\n/**\n * Executes method in Ember.run. Returns a promise that gets resolved after the method has completed inside of the run cycle.\n *\n * @param method - Method to call inside of Ember.run.\n * @param [context] - If defined, method will be bound to this context.\n * @param [args=[]] - Arguments to be passed to method.\n *\n * @deprecated Please use the ember `run` function directly instead.\n */\nexport function run(\n method: Parameters>[0],\n context?: unknown,\n args: any[] = []\n): RunLoopReturnType {\n const { rsvpPromise, fn } = getPromiseAndFn(method, args, context);\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n runEmber(fn);\n return rsvpPromise.promise;\n}\n\n/**\n * Executes method in Ember.run.next. Returns a promise that gets resolved after the method has completed inside of the run cycle.\n *\n * @param method - Method to call inside of Ember.run.next.\n * @param [context] - If defined, method will be bound to this context.\n * @param [args=[]] - Arguments to be passed to method.\n *\n * @deprecated Please use the ember `next` function directly instead.\n */\nexport function next(\n method: Parameters>[0],\n context?: unknown,\n args: any[] = []\n): RunLoopReturnType {\n const { rsvpPromise, fn } = getPromiseAndFn(method, args, context),\n { promise } = rsvpPromise;\n\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n promise.cancelationToken = nextEmber(fn);\n return promise;\n}\n\n// endregion.\n\n// region Cancellable run methods.\n\n/**\n * Cancels execution or a run promise.\n *\n * @param runPromise - Promise with a cancellation token.\n *\n * @returns Whether the process was successfully cancelled or not.\n *\n * @deprecated Please use ember-concurrency instead.\n */\nexport function cancel(runPromise: TypedPromise['promise']): boolean {\n if (!runPromise || !runPromise.cancelationToken) {\n return false;\n }\n\n // Cancel execution.\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n const result = cancelEmber(runPromise.cancelationToken);\n if (!result) {\n return false;\n }\n\n // Resolve promise with a cancelled token.\n // I tried using reject, but that kinda blew up the whole run cycle, so I figured this was better.\n runPromise.wasCancelled = true;\n runPromise.resolve(null);\n\n return true;\n}\n\n/**\n * Executes method after delay (ms) and resolves when the method resolves.\n *\n * @note Can be cancelled with the cancel function.\n *\n * @param method - Method to run after specified delay.\n * @param delay - Number of milliseconds after which run method.\n * @param context - If defined, method will be bound to this context.\n * @param [args=[]] - Arguments to be passed to method.\n *\n * @deprecated Please use the ember `later` function directly instead.\n */\nexport function later(\n method: Parameters>[0],\n delay: number,\n context?: unknown,\n args: any[] = []\n): RunLoopReturnType {\n const { rsvpPromise, fn } = getPromiseAndFn(method, args, context),\n { promise } = rsvpPromise;\n\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n promise.cancelationToken = laterEmber(fn, delay);\n return promise;\n}\n\n/**\n * Schedules method to be executed next time the queue is executing in Ember run cycle.\n *\n * @param queue\n * @param method - Method to run.\n * @param context - If defined, method will be bound to this context.\n * @param [args=[]] - Arguments to be passed to method.\n *\n * @deprecated Please use the ember `schedule` function directly instead.\n */\nexport function schedule(\n queue: Parameters[0],\n method: Parameters>[0],\n context?: unknown,\n args: any[] = []\n) {\n const { rsvpPromise, fn } = getPromiseAndFn(method, args, context),\n { promise } = rsvpPromise;\n\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n promise.cancelationToken = scheduleEmber(queue, fn);\n return promise;\n}\n\n// endregion.\n","import Helper from '@ember/component/helper';\nimport { inject as service } from '@ember/service';\nimport { formatDateTz } from '../utils/dates.ts';\n\nimport type ADCIntlService from '../services/adc-intl.ts';\n\ntype FormatDateTzArgs = Parameters;\ntype FormatDateTzValue = FormatDateTzArgs[1];\ntype FormatDateTzOptions = FormatDateTzArgs[2];\n\nexport interface FormatDateTzSignature {\n Args: {\n Positional: [FormatDateTzValue];\n Named: FormatDateTzOptions;\n };\n Return: string;\n}\n\n/**\n * @classdesc\n * Format a date, using the intl service global timezone if no explicit timezone is passed.\n */\nexport default class FormatDateTzHelper extends Helper {\n @service declare intl: ADCIntlService;\n\n compute([value]: [FormatDateTzValue], options: FormatDateTzOptions): ReturnType {\n return formatDateTz(this.intl, value, options);\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n /**\n * Returns the date formatted to the specified options, using the globally specified timezone value.\n */\n 'format-date-tz': typeof FormatDateTzHelper;\n }\n}\n","import Helper from '@ember/component/helper';\nimport { inject as service } from '@ember/service';\nimport getTranslation from '../utils/get-translation.ts';\n\nimport type ADCIntlService from '../services/adc-intl.ts';\nimport type { IntlContext, IntlTextOptions } from '../utils/get-translation.ts';\n\nexport interface TcSignature {\n Args: {\n Positional: [IntlContext, string];\n Named?: IntlTextOptions;\n };\n Return: ReturnType;\n}\n\n/**\n * @classdesc\n * Translation helper that allows specifying context.\n * More sophisticated version of the translation lookup, allows passing in context.\n * The benefit is that if the context is passed in, then the namespace of the context is used to prepend before key.\n */\nexport default class TcHelper extends Helper {\n @service declare intl: ADCIntlService;\n\n constructor(properties?: object) {\n super(properties);\n\n // @ts-expect-error: Property 'onLocaleChanged' is private and only accessible within class 'IntlService'. This is how the native `t` helper works as well.\n this.intl.onLocaleChanged(this.recompute, this);\n }\n\n compute([context, key]: [IntlContext, string], named?: IntlTextOptions): ReturnType {\n return getTranslation(this.intl, context, key, named);\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n /**\n * Returns the translation at the provided key, relative to the passed context.\n */\n tc: typeof TcHelper;\n }\n}\n","import Component from '@glimmer/component';\n// eslint-disable-next-line ember/no-classic-components\nimport EmberComponent from '@ember/component';\nimport { assert } from '@ember/debug';\nimport { guidFor } from '@ember/object/internals';\nimport { isPresent } from '@ember/utils';\nimport config from 'ember-get-config';\n\n// eslint-disable-next-line @typescript-eslint/ban-types\ntype i18nContextConstructor = new (...args: any[]) => T;\n\nconst PATH_REG_EXP = new RegExp('^<(?:[^:]+)@(.*)>$');\n\nfunction resolvePath(context: T, path?: string): string {\n // Checking deprecated Ember components until all are removed\n if (context instanceof Component || context instanceof EmberComponent) {\n assert(\n '[@adc/i18n] Use of the @intlPath decorator on a glimmer component requires that the path parameter be passed',\n isPresent(path)\n );\n\n return `component:${path}::${guidFor(context)}`;\n }\n\n const value = String(context),\n m = value.match(PATH_REG_EXP);\n\n assert(`[@adc/i18n] Unable to calculate intl path from context toString value (${value})`, !!m);\n\n return (m && m[1]) ?? '';\n}\n\n/**\n * Class decorator for adding support for `tc` method/helper in glimmer components and addons/engines.\n *\n * @example\n * import Component from '@glimmer/component';\n * import { intlPath } from '@adc/i18n/path';\n *\n * ‎@intlPath({ module: '@adc/ui-components' path: 'path/to/component/foo' })\n * export default class Foo extends Component {\n * ...\n * }\n */\nexport function intlPath({\n module,\n path\n}: {\n path?: string;\n module?: string;\n}): (context: i18nContextConstructor) => void {\n const { modulePrefix } = config;\n\n assert(\n `[@adc/i18n] The module value passed to the @intlPath decorator is identical to the application module prefix (${modulePrefix})`,\n module !== modulePrefix\n );\n\n return function (context: i18nContextConstructor): void {\n context.prototype.getIntlPath = function () {\n return `<${module ?? modulePrefix}@${resolvePath(this, path)}>`;\n };\n };\n}\n","import { loadScript } from '@adc/ember-utils/utils/browser-helpers';\nimport { detect } from 'detect-browser';\n\nimport type { BrowserInfo } from 'detect-browser';\n\n/**\n * Map current locale to the correct code for the polyfill link\n */\nfunction getPolyfillCode(locale: string, codes: string[], defaultCode: string): string {\n if (codes.includes(locale)) {\n return locale;\n }\n\n const codePart = locale.split('-')[0];\n if (codePart && codes.includes(codePart)) {\n return codePart;\n }\n\n return defaultCode;\n}\n\n/**\n * Loads the IntlPluralRules & IntlRelativeTimeFormat polyfills if the browser needs it\n */\nexport function loadIntlPolyfills(locale: string | string[]): void {\n // The site initially loads with an array of one default, and then hits this with a string of the actual locale\n if (typeof locale !== 'string') {\n return;\n }\n\n const browser = detect();\n if (!browser) {\n return;\n }\n\n const { name, version } = browser as BrowserInfo,\n versionNumber = parseInt(version, 10),\n needsPluralRules = !Object.entries({\n chrome: 63,\n firefox: 58,\n safari: 13,\n edge: 79,\n opera: 50\n }).find(([key, value]) => name === key && versionNumber >= value),\n needsRelativeTimeFormat = !Object.entries({\n chrome: 71,\n firefox: 65,\n safari: 14,\n edge: 79,\n opera: 58\n }).find(([key, value]) => name === key && versionNumber >= value);\n\n if (needsPluralRules) {\n loadScript('https://unpkg.com/@formatjs/intl-pluralrules@3.4.7/polyfill.umd.min.js');\n const localeCode = getPolyfillCode(\n locale,\n ['en', 'es', 'fi', 'fr', 'he', 'is', 'it', 'ja', 'nb', 'nl', 'pt', 'pt-PT', 'sv', 'th', 'tr'],\n 'en'\n );\n loadScript(`https://unpkg.com/@formatjs/intl-pluralrules@3.4.7/locale-data/${localeCode}.js`);\n }\n\n if (needsRelativeTimeFormat) {\n loadScript('https://unpkg.com/@formatjs/intl-relativetimeformat@7.2.7/polyfill.umd.min.js');\n const localeCode =\n locale === 'en-GB'\n ? 'en-GB'\n : getPolyfillCode(\n locale,\n [\n 'en-US',\n 'en',\n 'es-419',\n 'es',\n 'fi',\n 'fr',\n 'fr-CA',\n 'he',\n 'is',\n 'it',\n 'ja',\n 'nb',\n 'nl',\n 'pt-PT',\n 'pt',\n 'sv',\n 'th',\n 'tr'\n ],\n 'en-US'\n );\n loadScript(`https://unpkg.com/@formatjs/intl-relativetimeformat@7.2.7/locale-data/${localeCode}.js`);\n }\n}\n","import { tracked } from '@glimmer/tracking';\nimport IntlService from 'ember-intl/services/intl';\nimport { IntlErrorCode } from '@formatjs/intl';\nimport { formatDateTz, formatTimeTz, isSameDayTz } from '../utils/dates.ts';\nimport getTranslation from '../utils/get-translation.ts';\nimport { loadIntlPolyfills } from '../utils/polyfills.ts';\n\nimport type { IntlContext } from '../utils/get-translation';\n\ntype BaseArgs = Parameters;\n\nconst STYLESHEET_SELECTOR = 'link[rel=\"stylesheet\"]';\nconst RTL_DIR = 'rtl';\nconst LTR_DIR = 'ltr';\n\n/**\n * Swaps the LTR stylesheet with the RTL stylesheet on a given element\n */\nfunction swapRtlStylesheets(element: HTMLElement, link: HTMLLinkElement): void {\n const href = link.getAttribute('href');\n if (!href || !href.includes('chunk')) {\n return;\n }\n\n element.removeChild(link);\n const newHref = href?.replace('chunk', 'rtl-styling');\n\n if (newHref) {\n link.setAttribute('href', newHref);\n }\n\n element.appendChild(link);\n}\n\n/**\n * Loads the Crowdin scripts for the eu-es (which we use for Crowdin) locale\n */\nfunction loadCrowdinScripts(locale: string | string[]): void {\n if (!locale) {\n return;\n }\n\n if (typeof locale === 'string') {\n if (locale.toLowerCase() !== 'eu-es') {\n return;\n }\n } else if (Array.isArray(locale)) {\n if (locale[0]?.toLowerCase() !== 'eu-es') {\n return;\n }\n }\n\n const crowdinConfig = document.createElement('script'),\n crowdinSrc = document.createElement('script');\n crowdinConfig.type = 'text/javascript';\n crowdinConfig.text = `\n var _jipt = [];\n _jipt.push(['project', '830cb6b2f44003fde607db9df8b21804']);\n _jipt.push(['domain', 'adc']);\n `;\n\n crowdinSrc.type = 'text/javascript';\n crowdinSrc.src = 'https://cdn.crowdin.com/jipt/jipt.js';\n\n document.body.appendChild(crowdinConfig);\n document.body.appendChild(crowdinSrc);\n}\n\nexport default class ADCIntlService extends IntlService {\n /**\n * Shortcut for settings locale, translations, and timezone.\n */\n initialize(locale: BaseArgs[0], translations?: BaseArgs[1], timeZone?: string): void {\n this.setLocale(locale);\n\n if (translations) {\n this.addTranslations(locale, translations);\n }\n\n if (timeZone) {\n this.timeZone = timeZone;\n }\n }\n\n /** @override */\n setLocale(locale: string | string[]): void {\n super.setLocale(locale);\n\n document.documentElement.setAttribute('dir', this.direction);\n this.reloadStylesheets();\n\n loadCrowdinScripts(locale);\n loadIntlPolyfills(locale);\n }\n\n /**\n * An optional global timezone.\n */\n @tracked timeZone = '';\n\n /** @override */\n onIntlError(error: Error & { code: string }): void {\n // We ignore MISSING_DATA due to lack of support for eu-es & is-is in Chromium browsers\n // We ignore MISSING_TRANSLATION to maintain functionality with the original service method as it is handled elsewhere\n if (error.code === IntlErrorCode.MISSING_DATA || error.code === IntlErrorCode.MISSING_TRANSLATION) {\n return;\n }\n\n throw error;\n }\n\n /**\n * Formats a date/time, using the optional global timezone if no timezone was supplied in the options.\n */\n formatDateTz(\n value: Parameters[1],\n options: Parameters[2]\n ): ReturnType {\n return formatDateTz(this, value, options);\n }\n\n /**\n * Formats a date/time, using the optional global timezone if no timezone was supplied in the options.\n */\n formatTimeTz(\n value: Parameters[1],\n options: Parameters[2]\n ): ReturnType {\n return formatTimeTz(this, value, options);\n }\n\n /**\n * Returns the translation at the key value, relative to the passed context.\n *\n * @example\n * // en-US.yml\n * components:\n * \"my-component\":\n * successMessage: \"It worked!\"\n * confirmDelete: \"Are you sure you want to delete \\\"{item}\\\"?\"\n *\n * // components/my-component/component.js\n * this.intl.tc(this, 'successMessage');\n *\n * this.intl.tc(this, 'confirmDelete', {\n * item: 'My Item'\n * });\n */\n tc(\n context: IntlContext,\n key: string,\n options?: Parameters[3]\n ): ReturnType {\n return getTranslation(this, context, key, options);\n }\n\n /**\n * Checks if the two dates are the same day in the timezone set for this service\n * @param date1\n * @param date2\n * @returns True if the two dates are on the same day in the timezone set for this service; otherwise, false\n */\n isSameDay(date1: Parameters[1], date2: Parameters[2]): boolean {\n return isSameDayTz(this, date1, date2);\n }\n\n /**\n * Checks if the date is tomorrow in the timezone set for this service\n * @param date The date that you want to check is tomorrow\n * @returns True if the date is tomorrow in the timezone set for this service, otherwise, false\n */\n isTomorrow(date: Parameters[1]): boolean {\n const today = new Date(),\n oneDayAhead = today.setDate(today.getDate() + 1);\n return isSameDayTz(this, date, oneDayAhead);\n }\n\n /**\n * Checks if the date is today in the timezone set for this service\n * @param date The date that you want to check is today\n * @returns True if the date is today in the timezone set for this service, otherwise, false\n */\n isToday(date: Parameters[1]): boolean {\n return isSameDayTz(this, date, new Date());\n }\n\n /**\n * Checks if the date is today in the timezone set for this service\n * @param date The date that you want to check is yesterday\n * @returns True if the date is yesterday in the timezone set for this service, otherwise, false\n */\n isYesterday(date: Parameters[1]): boolean {\n const today = new Date(),\n oneDayBehind = today.setDate(today.getDate() - 1);\n return isSameDayTz(this, date, oneDayBehind);\n }\n\n /**\n * Get the site direction based on locale\n */\n get direction(): typeof RTL_DIR | typeof LTR_DIR {\n switch (this.locale[0]) {\n case 'ar':\n case 'he-il':\n return RTL_DIR;\n default:\n return LTR_DIR;\n }\n }\n\n /**\n * Loads the RTL stylesheets if the dir is RTL\n */\n private reloadStylesheets(): void {\n const { direction } = this;\n\n if (direction === LTR_DIR) {\n // The index.html will load LTR stylesheets by default\n return;\n }\n\n // Stylesheet links can be attached both to head and body > root\n document.head.querySelectorAll(STYLESHEET_SELECTOR).forEach((link: HTMLLinkElement) => {\n swapRtlStylesheets(document.head, link);\n });\n const bodyRoot = document.querySelector('body > root');\n bodyRoot?.querySelectorAll(STYLESHEET_SELECTOR).forEach((link: HTMLLinkElement) => {\n swapRtlStylesheets(bodyRoot, link);\n });\n }\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your services.\ndeclare module '@ember/service' {\n interface Registry {\n 'adc-intl': ADCIntlService;\n }\n}\n","import type ADCIntlService from '../services/adc-intl.ts';\n\n/** @module dates */\n\ntype DateFormattingOptions = Intl.DateTimeFormatOptions & { format?: string };\n\n/**\n * Adds the global time zone (if defined) to the passed formatting options, if time zone is not already present.\n *\n * @private\n */\nfunction getFormattingOptions(options: DateFormattingOptions = {}, timeZone = ''): DateFormattingOptions {\n // Is there a global timezone AND NO passed timezone?\n if (timeZone && !options.timeZone) {\n // Add global timezone.\n return {\n timeZone,\n ...options\n };\n }\n\n return options;\n}\n\n/**\n * Formats a date, using the optional global timezone if no timezone was supplied in the options.\n */\nexport function formatDateTz(\n intl: ADCIntlService,\n value: Parameters[0],\n options: DateFormattingOptions\n): ReturnType {\n return intl.formatDate(value, getFormattingOptions(options, intl.timeZone));\n}\n\n/**\n * Formats a date, using the optional global timezone if no timezone was supplied in the options.\n */\nexport function formatTimeTz(\n intl: ADCIntlService,\n value: Parameters[0],\n options: DateFormattingOptions\n): ReturnType {\n return intl.formatTime(value, getFormattingOptions(options, intl.timeZone));\n}\n\n/**\n * Checks if the two dates are the same day in the timezone set for @see ADCIntlService\n * @param intl\n * @param date1\n * @param date2\n * @returns True if the two dates are on the same day; otherwise, false\n */\nexport function isSameDayTz(\n intl: ADCIntlService,\n date1: Parameters[0],\n date2: Parameters[0]\n): boolean {\n // using the ADCIntlService, we can determine if the days match\n // for the current user's\n return computeDayKeyTz(intl, date1) === computeDayKeyTz(intl, date2);\n}\n\n/**\n * Converts a date to a key that can be used to match another date\n * in the timezone set for @see ADCIntlService\n * @param intl\n * @param date\n * @returns\n */\nfunction computeDayKeyTz(\n intl: ADCIntlService,\n date: Parameters[0]\n): ReturnType {\n // only need day, month, and year; time doesn't matter for this key\n return formatDateTz(intl, date, {\n month: 'short',\n day: 'numeric',\n year: 'numeric'\n });\n}\n","import { assert } from '@ember/debug';\nimport { isNone } from '@ember/utils';\nimport config from 'ember-get-config';\n\nimport type EmberObject from '@ember/object';\nimport type Component from '@glimmer/component';\nimport type { TOptions } from 'ember-intl/services/intl';\nimport type ADCIntlService from '../services/adc-intl';\n\n/** @module GetTranslation */\n\n/**\n * Regex for extracting the module, path, and type from the custom `getIntlPath()` context method.\n *\n * @private\n * @ignore\n */\nconst CUSTOM_TRANSLATION_CONTEXT_REGEX = new RegExp(\n '^<([^:]+)\\\\@(component|controller|route|model|service){1}:([^:]+)(::)'\n);\n\n/**\n * Regex for extracting the path and type from a concrete context object.\n *\n * @private\n * @ignore\n */\nconst TRANSLATION_CONTEXT_REGEX = new RegExp('^<(?:[^:]+)\\\\@(component|controller|route|model|service){1}:([^:]+)(::)');\n\n/**\n * Regex for extracting the path and type from a generated context object.\n *\n * @private\n * @ignore\n */\nconst GENERATED_CONTEXT_REGEX = new RegExp('^\\\\(generated ([^\\\\s]+) ([^\\\\s]+)\\\\)$');\n\n/**\n * These types need to have their type prefixed in the path for translation when using them as context.\n *\n * @private\n * @ignore\n */\nconst TYPES_WITH_PREFIX = ['component', 'model', 'service'];\n\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport type IntlContext = Component | Component<{ Args: { Named: {}; Positional: [] } }> | EmberObject;\n\nexport interface IntlTextOptions extends TOptions {\n links?: string[];\n}\n\ntype IntlPathInfo = {\n path: string[];\n type: string;\n module?: string;\n};\n\n/**\n * Tries to extract the module, path, and type from the context, using known patterns to match against, returning null if unable to extract.\n *\n * @private\n */\nfunction getCustomPath(context: IntlContext): IntlPathInfo | null {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const text = context.getIntlPath?.();\n if (!text) {\n return null;\n }\n\n const concreteMatch = text.match(CUSTOM_TRANSLATION_CONTEXT_REGEX);\n if (!concreteMatch) {\n return null;\n }\n\n const module = concreteMatch[1];\n\n // Return match.\n return {\n module: module !== config.modulePrefix ? module : undefined,\n path: concreteMatch[3].split('/'),\n type: concreteMatch[2]\n };\n}\n\n/**\n * Tries to extract the path and type from the context, using known patterns to match against, returning null if unable to extract.\n *\n * @private\n */\nfunction getStandardPath(context: IntlContext): IntlPathInfo | null {\n // Match against both patterns.\n const text = context.toString?.();\n if (!text) {\n return null;\n }\n\n const concreteMatch = text.match(TRANSLATION_CONTEXT_REGEX),\n generatedMatch = text.match(GENERATED_CONTEXT_REGEX),\n fnCreateResponse = (path: string, type: string) => ({\n path: path.split('/'),\n type\n });\n\n // Is there a concrete match?\n if (concreteMatch) {\n // Return match.\n return fnCreateResponse(concreteMatch[2], concreteMatch[1]);\n }\n\n // Is there a generated match?\n if (generatedMatch) {\n // Return match.\n return fnCreateResponse(generatedMatch[1], generatedMatch[2]);\n }\n\n // No match found 😞.\n return null;\n}\n\n/**\n * Returns dot delimited translation path for Ember class.\n *\n * @private\n */\nfunction getTranslationPathFromContext(context?: IntlContext): string {\n // Was no context supplied?\n if (!context) {\n return '';\n }\n\n // Can we NOT determine the context path and type?\n const contextPath = getCustomPath(context) ?? getStandardPath(context),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n value = context.getIntlPath?.() ?? context.toString?.() ?? '';\n\n assert(\n `[@adc/i18n] The returned i18n context path of the object passed to the intl service tc method (or template helper) does not return a usable value: \"${value}\"`,\n contextPath\n );\n\n const { path, type, module } = contextPath;\n\n // If this is a type that need to be prefixed, add the prefix to the path.\n if (TYPES_WITH_PREFIX.includes(type)) {\n path.unshift(`${type}s`);\n }\n\n // Is there a custom module?\n if (module) {\n // Add custom module to beginning of path.\n path.unshift(module);\n }\n\n // Add element (to get trailing dot).\n path.push('');\n\n // Join and return.\n return path.join('.');\n}\n\n/**\n * Gets the translation key and replacement tokens for the arguments passed into the function.\n *\n * @private\n */\nfunction getTranslationKeyAndTokens(\n contextOrKey: IntlContext | string,\n keyOrReplaceTokens?: string | IntlTextOptions,\n replaceTokensOnly?: IntlTextOptions\n): {\n key: string;\n replaceTokens?: IntlTextOptions;\n} {\n const hasContext = typeof contextOrKey !== 'string',\n context = hasContext ? (contextOrKey as IntlContext) : undefined;\n\n assert(\n '[@adc/i18n] No context was passed to the intl service tc method (or template helper)',\n !hasContext || context\n );\n\n const key = (hasContext ? keyOrReplaceTokens : contextOrKey) as string,\n replaceTokens = (hasContext ? replaceTokensOnly : keyOrReplaceTokens) as IntlTextOptions | undefined;\n\n assert('[@adc/i18n] The passed translation key was empty', key);\n\n return {\n key: `${getTranslationPathFromContext(context)}${key}`,\n replaceTokens\n };\n}\n\n/**\n * Returns the translated string for the context, translation key and replace tokens\n *\n * @example\n * import getTranslation from '@adc/i18n/utils/get-translation';\n *\n * getTranslation(intl, 'home.locks.accessTime', {\n * dateTime: '12:54 PM'\n * }); // \"at 12:54 PM\"\n *\n * @example\n * // If calling this from the home/locks route:\n * import getTranslation from '@adc/i18n/utils/get-translation';\n *\n * getTranslation(this, 'accessTime', {\n * dateTime: '12:54 PM'\n * }); // \"at 12:54 PM\"\n */\nexport default function getTranslation(\n intl: ADCIntlService,\n contextOrKey: IntlContext | string,\n keyOrReplaceTokens?: string | IntlTextOptions,\n replaceTokensOnly?: IntlTextOptions\n): string {\n // Get the full translation key and correct replaceTokens.\n const { key, replaceTokens = {} } = getTranslationKeyAndTokens(contextOrKey, keyOrReplaceTokens, replaceTokensOnly);\n\n // Get translation.\n let text = intl.lookup(key);\n\n const optionKeys = Object.keys(replaceTokens);\n\n // Were replacement tokens passed?\n if (text && optionKeys.length) {\n const options: Record = { ...replaceTokens };\n optionKeys.forEach((k) => {\n if (!['links', 'default', 'htmlSafe', 'locale'].includes(k)) {\n const v = options[k];\n options[k] = String(isNone(v) ? '' : v);\n }\n });\n\n // Replace tokens.\n text = intl.formatMessage(text, options);\n }\n\n return text as string;\n}\n","import BaseLoginSetupAdapter from '../base-login-setup-adapter.ts';\n\nexport default class AgreementsAdapter extends BaseLoginSetupAdapter {}\n","import BaseLoginSetupAdapter from '../base-login-setup-adapter.ts';\n\nexport default class ArmingReminderAdapter extends BaseLoginSetupAdapter {}\n","import BaseLoginSetupAdapter from '../base-login-setup-adapter.ts';\n\nexport default class ContactAddressAdapter extends BaseLoginSetupAdapter {}\n","import BaseLoginSetupAdapter from '../base-login-setup-adapter.ts';\n\nexport default class CommMethodAdapter extends BaseLoginSetupAdapter {}\n","import BaseLoginSetupAdapter from '../base-login-setup-adapter.ts';\n\nexport default class MarketingCategoryAdapter extends BaseLoginSetupAdapter {}\n","import BaseLoginSetupAdapter from '../base-login-setup-adapter.ts';\n\n/**\n * @classdesc\n * Custom Adapter for profile model\n */\nexport default class ProfileAdapter extends BaseLoginSetupAdapter {\n /** @override */\n namespace = 'web/api';\n\n /**\n * Overriding the updateRecord behavior for profile model to include extra parameters if given.\n * @override\n */\n updateRecord(store, type, snapshot) {\n const { id, adapterOptions } = snapshot,\n profileModel = {},\n serializer = store.serializerFor(type.modelName);\n serializer.serializeIntoHash(profileModel, type, snapshot);\n\n const data = { model: profileModel };\n if (adapterOptions) {\n data.currentPassword = adapterOptions.currentPassword;\n }\n\n // NOTE: it is IMPERATIVE that the data that we send is an object with a property 'data' { data: STUFF}\n return this.ajax(this.buildURL(type.modelName, id, snapshot, 'updateRecord'), 'PUT', { data });\n }\n}\n","import BaseLoginSetupAdapter from '../base-login-setup-adapter.ts';\n\nexport default class PushMigrationPromptAdapter extends BaseLoginSetupAdapter {}\n","import BaseLoginSetupAdapter from '../base-login-setup-adapter.ts';\n\nexport default class RecognizedDeviceAdapter extends BaseLoginSetupAdapter {}\n","import BaseLoginSetupAdapter from '../../../base-login-setup-adapter.ts';\n\nexport default class SystemInformationAdapter extends BaseLoginSetupAdapter {}\n","import BaseLoginSetupAdapter from '../../../base-login-setup-adapter.ts';\n\nexport default class BusinessHourDayAdapter extends BaseLoginSetupAdapter {}\n","import BaseLoginSetupAdapter from '../../../base-login-setup-adapter.ts';\n\nexport default class EmergencyContactListCollectionAdapter extends BaseLoginSetupAdapter {}\n","import BaseLoginSetupAdapter from '../../../base-login-setup-adapter.ts';\n\nexport default class EmergencyContactListEntryAdapter extends BaseLoginSetupAdapter {}\n","import BaseLoginSetupAdapter from '../../../base-login-setup-adapter.ts';\n\nexport default class EmergencyContactListAdapter extends BaseLoginSetupAdapter {}\n","import BaseLoginSetupAdapter from '../../../base-login-setup-adapter.ts';\n\nexport default class EmergencyContactPhoneAdapter extends BaseLoginSetupAdapter {}\n","import BaseLoginSetupAdapter from '../../../base-login-setup-adapter.ts';\n\nexport default class EmergencyContactAdapter extends BaseLoginSetupAdapter {}\n","import BaseLoginSetupAdapter from '../../../../base-login-setup-adapter.ts';\n\nexport default class CallListSettingAdapter extends BaseLoginSetupAdapter {}\n","import BaseLoginSetupAdapter from '../../../../base-login-setup-adapter.ts';\n\nexport default class ContactPasscodeSettingAdapter extends BaseLoginSetupAdapter {}\n","import BaseLoginSetupAdapter from '../../../../base-login-setup-adapter.ts';\n\nexport default class EmergencyContactSettingAdapter extends BaseLoginSetupAdapter {}\n","import BaseLoginSetupAdapter from '../../base-login-setup-adapter.ts';\n\nexport default class PermitAdapter extends BaseLoginSetupAdapter {}\n","import BaseLoginSetupAdapter from '../../../base-login-setup-adapter.ts';\n\nexport default class PasscodeAdapter extends BaseLoginSetupAdapter {}\n","import BaseLoginSetupAdapter from '../../../base-login-setup-adapter.ts';\n\nexport default class PermittedActionAdapter extends BaseLoginSetupAdapter {}\n","import BaseLoginSetupAdapter from '../../../base-login-setup-adapter.ts';\n\nexport default class PhoneCollectionAdapter extends BaseLoginSetupAdapter {}\n","import BaseLoginSetupAdapter from '../../../base-login-setup-adapter.ts';\n\nexport default class PremisePhoneAdapter extends BaseLoginSetupAdapter {}\n","import BaseLoginSetupAdapter from '../../../../base-login-setup-adapter.ts';\n\nexport default class PremisePasscodeSettingAdapter extends BaseLoginSetupAdapter {}\n","import BaseLoginSetupAdapter from '../../../../base-login-setup-adapter.ts';\n\nexport default class PremisePhoneSettingAdapter extends BaseLoginSetupAdapter {}\n","import BaseLoginSetupAdapter from '../base-login-setup-adapter.ts';\n\nexport default class CountryMobileCarrierAdapter extends BaseLoginSetupAdapter {}\n","import BaseLoginSetupAdapter from '../base-login-setup-adapter.ts';\n\nexport default class TwoFactorAuthAdapter extends BaseLoginSetupAdapter {}\n","import { attr } from '@ember-data/model';\nimport { getProperties } from '@ember/object';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\n\n/**\n * @classdesc\n * The model that contains information for an agreement.\n */\nexport default class Agreement extends BaseModel {\n /**\n * The enum value of the agreement.\n */\n @attr('number')\n declare type: number;\n\n /**\n * The version number of the agreement.\n */\n @attr('number')\n declare version: number;\n\n /**\n * The language to display the agreement in.\n */\n @attr('number')\n declare cultureId: number;\n\n /**\n * Does the agreement contain HTML?\n */\n @attr('boolean')\n declare isHtml: boolean;\n\n /**\n * The name of the agreement.\n */\n @attr('string', { defaultValue: '' })\n declare name: string;\n\n /**\n * The legal text of the agreement.\n */\n @attr('string', { defaultValue: '' })\n declare text: string;\n\n /**\n * The header text for the agreement.\n */\n @attr('string', { defaultValue: '' })\n declare headerText: string;\n\n /**\n * The footer text for the agreement.\n */\n @attr('string', { defaultValue: '' })\n declare footerText: string;\n\n /**\n * The text to use next to a checkbox that must be selected to agree to the agreement.\n */\n @attr('string')\n declare additionalCheckboxText: string;\n\n /**\n * The URL to download a text version of the agreement.\n */\n @attr('string')\n declare downloadUrl: string;\n\n /**\n * The URL to download a text version of the agreement.\n */\n @attr('boolean')\n declare isDeclinable: boolean;\n\n /**\n * Holds the message displayed on the warning modal displayed when a clicks \"I Do Not Agree\".\n */\n @attr('string')\n declare warningModalMessage: string;\n\n /**\n * Is the agreement a EULA or subscription?\n */\n @attr('boolean')\n declare isEula: boolean;\n\n /**\n * Text to be displayed on the agree button for the modal.\n */\n @attr('string')\n declare agreeButtonText: string;\n\n /**\n * Text to be displayed on the disagree button for the modal.\n */\n @attr('string')\n declare disagreeButtonText: string;\n\n // region API Methods\n\n /**\n * Shared logic for agreeToAgreement and declineAgreement.\n */\n private updateAgreement(isAgree: boolean, additionalCheckboxValue: boolean): Promise {\n return this.submitCustomApiCall(isAgree ? 'agreeToAgreement' : 'declineAgreement', 'POST', {\n ...getProperties(this, 'type', 'cultureId', 'version'),\n additionalCheckboxValue\n });\n }\n\n /**\n * Agrees to the agreement with the corresponding enum value.\n */\n agreeToAgreement(additionalCheckboxValue: boolean): Promise {\n return this.updateAgreement(true, additionalCheckboxValue);\n }\n\n /**\n * Declines the agreement with the corresponding enum value.\n */\n declineAgreement(additionalCheckboxValue: boolean): Promise {\n return this.updateAgreement(false, additionalCheckboxValue);\n }\n\n /**\n * Emails the agreement to the provided email address.\n */\n emailAgreement(emailAddress: string): Promise {\n return this.submitCustomApiCall('emailAgreement', 'PUT', {\n ...getProperties(this, 'type', 'cultureId'),\n emailAddress\n });\n }\n\n // endregion\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'agreements/agreement': Agreement;\n }\n}\n","import { attr, hasMany } from '@ember-data/model';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\n\nimport type { SyncHasMany } from '@ember-data/model';\nimport type ContactAddressSimple from './contact-address-simple';\n\n/**\n * @classdesc\n * The model that represents the arming reminder page for the account setup wizard.\n */\nexport default class ArmingReminder extends BaseModel {\n @attr('boolean')\n declare pauseNotification: boolean;\n\n @attr('string')\n declare notificationName: string;\n\n @attr('number')\n declare startTime: number;\n\n @attr('array')\n declare selectedDays: Array;\n\n @hasMany('arming-reminder/contact-address-simple', { async: false, inverse: null })\n declare recipients: SyncHasMany;\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'arming-reminder/arming-reminder': ArmingReminder;\n }\n}\n","import { attr } from '@ember-data/model';\nimport { computed } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\nimport ContactTypeEnum from '../../enums/ContactType.ts';\n\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\n\n/**\n * @abstract\n * @class ContactAddress\n */\nexport default class ContactAddressSimple extends BaseModel {\n @service declare intl: ADCIntlService;\n\n @attr('string', { defaultValue: '' })\n declare address: string;\n\n /**\n * Type of the contact address.\n */\n @attr('number', { defaultValue: ContactTypeEnum.Unknown })\n declare addressType: number;\n\n @attr('boolean')\n declare selected: boolean;\n\n /**\n * The type of address (eg. Mobile, Phone, Email)\n */\n @computed('addressType')\n get addressTypeDesc(): string {\n return this.intl.t(\n `@adc/login-setup-engine.arming-reminder.${\n (\n {\n [ContactTypeEnum.Email]: 'email',\n [ContactTypeEnum.Phone]: 'voice',\n [ContactTypeEnum.Mobile]: 'mobile',\n [ContactTypeEnum.IPhonePush]: 'push'\n } as Record\n )[this.addressType] || 'unknown'\n }`\n );\n }\n\n /**\n * Icon for displaying this address\n */\n @computed('addressType')\n get icon(): string {\n switch (this.addressType) {\n case ContactTypeEnum.Email:\n return 'email';\n case ContactTypeEnum.Phone:\n return 'phone';\n case ContactTypeEnum.Mobile:\n return 'mobile';\n case ContactTypeEnum.IPhonePush:\n return 'mobile';\n default:\n return 'user';\n }\n }\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'arming-reminder/contact-address-simple': ContactAddressSimple;\n }\n}\n","import { attr } from '@ember-data/model';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\n\n/**\n * @classdesc\n *\n * A model for storing the communication method data for the current login.\n */\nexport default class CommunicationMethod extends BaseModel {\n /**\n * Communication method name.\n */\n @attr('string')\n declare communicationMethodName: string;\n\n /**\n * Is Communication method enabled?\n */\n @attr('boolean')\n declare isEnabled: boolean;\n\n /**\n * Is Communication method visible to customer?\n */\n @attr('boolean')\n declare isVisible: boolean;\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'communication-preferences/communication-method': CommunicationMethod;\n }\n}\n","import { hasMany } from '@ember-data/model';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\n\nimport type { AsyncHasMany } from '@ember-data/model';\nimport type MarketingCategory from './marketing-category';\n\n/**\n * @classdesc\n *\n * A model for storing the marketing communication preferences for the current login.\n */\nexport default class CommunicationPreference extends BaseModel {\n /** @override */\n get shouldRollbackRelationships(): boolean {\n return true;\n }\n\n /**\n * List of Marketing communication methods\n */\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/require-async-inverse-relationship\n @hasMany('communication-preferences/marketing-category', { async: true })\n declare categoryPreferences: AsyncHasMany;\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'communication-preferences/communication-preference': CommunicationPreference;\n }\n}\n","import { attr, hasMany } from '@ember-data/model';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\n\nimport type { AsyncHasMany } from '@ember-data/model';\nimport type CommunicationMethod from './communication-method.ts';\n\n/**\n * @classdesc\n *\n * A model for storing the marketing category data for the current login.\n */\nexport default class MarketingCategory extends BaseModel {\n /** @override */\n get shouldRollbackRelationships(): boolean {\n return true;\n }\n\n /**\n * Marketing category name.\n */\n @attr('string')\n declare categoryName: string;\n\n /**\n * List of communication methods.\n */\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/require-async-inverse-relationship\n @hasMany('communication-preferences/communication-method', { async: true })\n declare communicationMethods: AsyncHasMany;\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'communication-preferences/marketing-category': MarketingCategory;\n }\n}\n","import { attr } from '@ember-data/model';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\n\nexport default class Message extends BaseModel {\n /**\n * The text for the message.\n */\n @attr('string')\n declare text: string;\n\n /**\n * Can the message be cleared?\n */\n @attr('boolean')\n declare canBeCleared: boolean;\n}\n","import { attr, hasMany, belongsTo } from '@ember-data/model';\nimport { computed } from '@ember/object';\nimport { GET, POST } from '@adc/ajax/services/adc-ajax';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\n\nimport type LocaleModel from '@adc/app-infrastructure/models/locale';\nimport type { SyncHasMany, AsyncBelongsTo } from '@ember-data/model';\nimport type CommunicationPreference from '../communication-preferences/communication-preference.ts';\nimport type SiteAppearance from '../site-appearance/site-appearance.ts';\nimport type SupportOption from '../support/support-option.ts';\nimport type DownloadFormat from '../video/download-format.ts';\n\n/**\n * @classdesc\n * Contains information relevant to the currently logged-in user's profile.\n */\nexport default class Profile extends BaseModel {\n // region Basic Information\n\n @computed()\n get shouldRollbackRelationships(): boolean {\n return true;\n }\n\n /**\n * The name of the currently logged-in user.\n */\n @attr('string')\n declare loginName: string;\n\n /**\n * The initials of the currently logged-in user.\n */\n @attr('string')\n declare loginInitials: string;\n\n /**\n * The primary email address for the customer linked to current Login.\n */\n @attr('string')\n declare primaryEmailAddress: string;\n\n /**\n * The email address for the current Login.\n */\n @attr('string')\n declare loginEmailAddress: string;\n\n /**\n * The ID of the security question chosen during the security question setup process.\n */\n @attr('number')\n declare securityQuestionId: number;\n\n /**\n * Dictionary of login flags.\n */\n @attr()\n declare loginFlags: Record;\n\n /**\n * Can the current login logout all other logins when updating their password in the current session?\n */\n @attr('boolean')\n declare canLogoutAllLoginsOnPasswordUpdate: boolean;\n\n /**\n * Do we send new device alerts for this login?\n */\n @attr('boolean')\n declare shouldSendNewDeviceAlerts: boolean;\n\n // endregion\n\n // region Locale (a.k.a. Culture)\n\n /**\n * The selected {@link models.Locale} for the login.\n */\n @belongsTo('locale', { async: false, inverse: null })\n declare locale: LocaleModel;\n\n /**\n * List of all available locales.\n */\n @hasMany('locale', { async: false, inverse: null })\n declare availableLocales: SyncHasMany;\n\n /**\n * The selected {@link models.support.SupportOption} for the login.\n */\n @belongsTo('support/support-option', { async: true, inverse: null })\n declare supportOption: AsyncBelongsTo;\n\n /**\n * The site appearance preferences.\n */\n @belongsTo('site-appearance/site-appearance', { async: false, inverse: null })\n declare siteAppearance: SiteAppearance;\n\n /**\n * The marketing communication preferences.\n */\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/require-async-inverse-relationship\n @belongsTo('communication-preferences/communication-preference', { async: true })\n declare communicationPreference: AsyncBelongsTo;\n\n /**\n * The user selected video format.\n */\n @belongsTo('video/download-format', { async: true, inverse: null })\n declare videoDownloadFormat: AsyncBelongsTo;\n\n // endregion\n\n // region API Methods.\n\n /**\n * Sends the verification email to the corresponding primary email address.\n */\n sendVerificationEmail(primaryEmail: string): Promise {\n return this.submitCustomApiCall('sendVerificationEmail', POST, primaryEmail);\n }\n\n /**\n * Gets the available security questions the login can use.\n */\n getSecurityQuestions(): Promise<{ value: Record }> {\n return this.submitCustomApiCall<{ value: Record }>('getSecurityQuestions', GET);\n }\n\n /**\n * Sets the security question and answer for the login.\n *\n * @note The parameter names here must correspond to the server constants for retrieving the data.\n */\n setSecurityQuestion(\n securityQuestionId: number,\n securityQuestionAnswer: string,\n currentPassword?: string\n ): Promise {\n return this.submitCustomApiCall('setSecurityQuestion', POST, {\n securityQuestionId,\n securityQuestionAnswer,\n currentPassword\n });\n }\n\n /**\n * Updates the password for the login.\n *\n * @note The parameter names here must correspond to the server constants for retrieving the data.\n */\n updatePassword(\n newPassword: string,\n confirmationPassword: string,\n shouldLogOutAllDevices = false,\n shouldLogOutSmartDevices = false,\n currentPassword?: string,\n logoutDeviceIds?: string[]\n ): Promise {\n return this.submitCustomApiCall('updatePassword', POST, {\n newPassword,\n confirmationPassword,\n shouldLogOutAllDevices,\n shouldLogOutSmartDevices,\n currentPassword,\n logoutDeviceIds\n });\n }\n\n /**\n * Updates the name for the login.\n *\n * @note The parameter names here must correspond to the server constants for retrieving the data.\n */\n async updateLoginName(loginName: string, currentPassword?: string, saveModel = true): Promise {\n await this.submitCustomApiCall('updateLoginName', POST, { loginName, currentPassword });\n\n // CX-50029 - I added this check to avoid saving the model when on the Login Name Confirmation page within\n // Account Setup for B36 customers. If the model is saved for B36, this could result in an email validation\n // error since some accounts don't have a primary email address yet during the account creation or setup process.\n // Their primary email gets set on the Email Verification page, which appears later in the flow.\n if (saveModel) {\n // This is a wasted request. However, it will make the model as clean.\n // In the future, we should add a header to send the current password and process this in the save method.\n return this.save();\n }\n }\n\n /**\n * Sets a new default system for the user. Does not change the selected customer.\n */\n setDefaultSystem(customerId: number): Promise {\n return this.submitCustomApiCall('changeDefaultSystem', POST, { customerId });\n }\n\n /**\n * Given a set of credentials this returns the list of systems that could be added via MSA.\n */\n findSystemsForLogin(\n loginName: string,\n password: string\n ): Promise<{ systems: string[]; cannotDeleteSourceLogin: boolean }> {\n return this.submitCustomApiCall<{ systems: string[]; cannotDeleteSourceLogin: boolean }>(\n 'findSystemsForLogin',\n POST,\n { loginName, password }\n );\n }\n\n /**\n * Adds the systems to the login.\n * NOTE: This requires that findSystemsForLogin be called first. This method then acts as a confirmation\n * to add the systems from that call.\n */\n addSystemsForLogin(deleteSourceLogin: boolean): Promise {\n return this.submitCustomApiCall('addSystemsForLogin', POST, { deleteSourceLogin });\n }\n\n /**\n * Updates the new device alert preference for the login.\n *\n * @note The parameter names here must correspond to the server constants for retrieving the data.\n */\n async setSendNewDeviceAlerts(shouldSendNewDeviceAlerts: boolean): Promise {\n await this.submitCustomApiCall('updateSendNewDeviceAlerts', POST, { shouldSendNewDeviceAlerts });\n\n // This is a wasted request. However, it will make the model as clean.\n // In the future, we should add a header to send the current password and process this in the save method.\n return this.save();\n }\n\n // endregion\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'profile/profile': Profile;\n }\n}\n","import { attr } from '@ember-data/model';\nimport { getProperties } from '@ember/object';\nimport { POST } from '@adc/ajax/services/adc-ajax';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\n\nexport default class PushMigrationToolPushMigrationPrompt extends BaseModel {\n /**\n * The phone number of the SMS contact address to migrate\n */\n @attr('string')\n declare phoneNumber: string;\n\n /**\n * The SMS contact address ID of the phone number to migrate\n */\n @attr('number')\n declare sMSContactAddressId: number;\n\n /**\n * The push contact address ID of the device to migrate\n */\n @attr('number')\n declare pushContactAddressId: number;\n\n /**\n * The push device name to migrate to\n */\n @attr('string')\n declare pushDeviceName: string;\n\n /**\n * The push device ID of the device to migrate\n */\n @attr('string')\n declare pushDeviceId: string;\n\n /**\n * Should we show the remind me later button?\n */\n @attr('boolean')\n declare showRemindMeLater: boolean;\n\n /**\n * Migrates the prompt's sms contact address to push contact address recipient on notifications and rules.\n */\n migrate(): Promise {\n return this.submitCustomApiCall(\n 'migrate',\n POST,\n getProperties(this, 'sMSContactAddressId', 'pushContactAddressId', 'pushDeviceId')\n );\n }\n\n /**\n * Sets the migration status to remind later for the prompt SMS contact address ID and push device ID\n */\n remindLater(): Promise {\n return this.submitCustomApiCall(\n 'remindLater',\n POST,\n getProperties(this, 'sMSContactAddressId', 'pushDeviceId')\n );\n }\n\n /**\n * Sets the migration status to do not remind again for the prompt SMS contact address ID and push device ID\n */\n doNotRemindAgain(): Promise {\n return this.submitCustomApiCall(\n 'doNotRemindAgain',\n POST,\n getProperties(this, 'sMSContactAddressId', 'pushDeviceId')\n );\n }\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'push-migration-tool/push-migration-prompt': PushMigrationToolPushMigrationPrompt;\n }\n}\n","import { attr } from '@ember-data/model';\nimport { inject as service } from '@ember/service';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\nimport differenceInHours from 'date-fns/differenceInHours';\nimport differenceInMinutes from 'date-fns/differenceInMinutes';\n\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\n\n/**\n * @classdesc\n * The model that represents a device that has logged into a user's system.\n */\nexport default class RecognizedDevice extends BaseModel {\n @service declare intl: ADCIntlService;\n\n /**\n * Name of the device generated from the user agent (ie. iPhone, Mac).\n */\n @attr('string')\n declare name: string;\n\n /**\n * Name of the device chosen by the user.\n */\n @attr('string')\n declare customDeviceName: string;\n\n /**\n * Location of the device that accessed the user's system.\n */\n @attr('string')\n declare location: string;\n\n /**\n * Date in which device last got access to the system.\n */\n @attr('date')\n declare lastSuccessfulLoginDateTime: Date;\n\n /**\n * Date in which device first got access to the system.\n */\n @attr('date')\n declare firstSuccessfulLoginDateTime: Date;\n\n /**\n * Whether the device is a two factor authentication trusted device.\n */\n @attr('boolean')\n declare isTrustedDevice: boolean;\n\n /**\n * Whether the device has a seamless login token.\n */\n @attr('boolean')\n declare isSavedLogin: boolean;\n\n /**\n * Whether the device is being used in the current session.\n */\n @attr('boolean')\n declare isCurrentDevice: boolean;\n\n /**\n * Whether the device is a voice device.\n */\n @attr('boolean')\n declare isVoiceDevice: boolean;\n\n /**\n * Type of device.\n */\n @attr('string')\n declare deviceType: string;\n\n /**\n * Icon to be displayed for device type.\n */\n @attr('string')\n declare icon: string;\n\n /**\n * Format the last successful login datetime.\n */\n get formattedLastDateTime(): string {\n return this.getFormattedDateTime(this.lastSuccessfulLoginDateTime);\n }\n\n /**\n * Format the first successful login datetime.\n */\n get formattedFirstDateTime(): string {\n return this.getFormattedDateTime(this.firstSuccessfulLoginDateTime);\n }\n\n /**\n * Format the dateTime to display in two different formats. If less than an hour ago, display \"X minutes ago\".\n * Otherwise, use the date (i.e. Jan 01, 2020).\n */\n getFormattedDateTime(dateTime: Date): string {\n const now = new Date(),\n { intl } = this;\n\n return differenceInHours(now, dateTime) < 1\n ? intl.formatRelative(-differenceInMinutes(now, dateTime), {\n unit: 'minute',\n numeric: 'auto'\n })\n : // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line @adc/ember/require-tz-functions\n intl.formatDate(dateTime, {\n day: '2-digit',\n month: 'short',\n year: 'numeric'\n });\n }\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'recognized-devices/recognized-device': RecognizedDevice;\n }\n}\n","import { attr } from '@ember-data/model';\nimport { belongsTo, hasMany } from '@ember-data/model';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\n\nimport type { AsyncHasMany, AsyncBelongsTo } from '@ember-data/model';\nimport type DTCBillingInformation from './dtc-billing-information/dtc-billing-information.ts';\nimport type MarketingCommunication from './marketing-communication/marketing-communication.ts';\n\ninterface Message {\n id: number;\n message: string;\n canBeCleared: boolean;\n}\n\n/**\n * @classdesc\n * A class that holds the the customer account information.\n */\nexport default class AccountInformation extends BaseModel {\n /**\n * The billing information model for a customer's account.\n */\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/require-async-inverse-relationship\n @belongsTo('settings/account-management/account-information/dtc-billing-information/dtc-billing-information', {\n async: true\n })\n declare billingInformation: AsyncBelongsTo;\n\n /**\n * The marketing communications model for a customers email\n */\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/require-async-inverse-relationship\n @hasMany('settings/account-management/account-information/marketing-communication/marketing-communication', {\n async: true\n })\n declare marketingCommunication: AsyncHasMany;\n\n /**\n * Returns the next uncleared message. If there is none returns no data.\n */\n getNextMessage(): Promise {\n return this.submitCustomApiCall('getMessages', 'GET');\n }\n\n /**\n * Clears message with the specified id.\n */\n clearMessage(messageId: number): Promise {\n return this.submitCustomApiCall('clearMessage', 'POST', messageId);\n }\n\n /**\n * The customer's first name.\n */\n @attr('string')\n declare firstName: string;\n\n /**\n * The customer's last name.\n */\n @attr('string')\n declare lastName: string;\n\n /**\n * The customer's title.\n */\n @attr('string')\n declare title: string;\n\n /**\n * The customer's email address.\n */\n @attr('string')\n declare emailAddress: string;\n\n /**\n * Can the user edit the email address.\n */\n @attr('boolean')\n declare canEditEmailAddress: boolean;\n\n /**\n * The customer's phone number.\n */\n @attr('string')\n declare phoneNumber: string;\n\n /**\n * The customer's country.\n */\n @attr('number')\n declare country: number;\n\n /**\n * The customer's address 1.\n */\n @attr('string')\n declare address1: string;\n\n /**\n * The customer's address 2.\n */\n @attr('string')\n declare address2: string;\n\n /**\n * The customer's city.\n */\n @attr('string')\n declare city: string;\n\n /**\n * The customer's sub-city.\n */\n @attr('string')\n declare subCity: string;\n\n /**\n * The customer's state.\n */\n @attr('string')\n declare state: string;\n\n /**\n * The customer's sub-state.\n */\n @attr('string')\n declare subState: string;\n\n /**\n * The customer's postal code.\n */\n @attr('string')\n declare postalCode: string;\n\n /**\n * Can the customer edit their address?\n */\n @attr('boolean')\n declare canEditAddress: boolean;\n\n /**\n * Is the account a business account?\n */\n @attr('boolean')\n declare isBusiness: boolean;\n\n /**\n * The business's name - if avilable.\n */\n @attr('string')\n declare businessName: string;\n\n /**\n * The maximum length of the company name.\n */\n @attr('number')\n declare businessNameMaxLength: number;\n\n /**\n * Can the user edit the business name?\n */\n @attr('boolean')\n declare canEditBusinessName: boolean;\n\n /**\n * Can the user edit their account information?\n */\n @attr('boolean')\n declare canEditAccountInformation: boolean;\n\n /**\n * Can the user edit their email preferences?\n */\n @attr('boolean')\n declare canEditEmailPreferences: boolean;\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'settings/account-management/account-information/account-information': AccountInformation;\n }\n}\n","import { attr } from '@ember-data/model';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\n\n/**\n * @classdesc\n * The model that contains billing address for a customer.\n */\nexport default class DTCBillingInformation extends BaseModel {\n /**\n * Error message to explain why the user was prompted for billing information.\n */\n @attr()\n declare errorMessages: string[];\n\n /**\n * Does the customer need to supply new credit card information?\n */\n @attr('boolean')\n declare isCreditCardNeeded: boolean;\n\n /**\n * Converge URL used for loading the lightbox script.\n */\n @attr('string')\n declare convergeUrl: string;\n\n /**\n * First name used for billing address.\n */\n @attr('string', { defaultValue: '' })\n declare firstName: string;\n\n /**\n * Last name used for billing address.\n */\n @attr('string', { defaultValue: '' })\n declare lastName: string;\n\n /**\n * Country for billing address.\n */\n @attr('number')\n declare country: number;\n\n /**\n * First address line for billing address.\n */\n @attr('string', { defaultValue: '' })\n declare address1: string;\n\n /**\n * Second address line for billing address.\n */\n @attr('string', { defaultValue: '' })\n declare address2: string;\n\n /**\n * Sub-city for billing address.\n */\n @attr('string', { defaultValue: '' })\n declare subCity: string;\n\n /**\n * Available states for dropdown list.\n */\n @attr()\n declare availableStates: Record;\n\n /**\n * City for billing address.\n */\n @attr('string', { defaultValue: '' })\n declare city: string;\n\n /**\n * Sub-state for billing address.\n */\n @attr('string', { defaultValue: '' })\n declare subState: string;\n\n /**\n * State for billing address.\n */\n @attr('string', { defaultValue: '' })\n declare state: string;\n\n /**\n * Postal code for billing address.\n */\n @attr('string', { defaultValue: '' })\n declare postalCode: string;\n\n /**\n * Available credit card types for dropdown list.\n */\n @attr()\n declare availableCreditCardTypes: Record;\n\n /**\n * Credit card type enum.\n */\n @attr('number')\n declare creditCardType: number;\n\n /**\n * Credit card number.\n */\n @attr('string', { defaultValue: '' })\n declare creditCardNumber: string;\n\n /**\n * Credit card expiration day.\n */\n @attr('number')\n declare expirationMonth: number;\n\n /**\n * Credit card expiration month.\n */\n @attr('number')\n declare expirationYear: number;\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'settings/account-management/account-information/dtc-billing-information/dtc-billing-information': DTCBillingInformation;\n }\n}\n","import { attr } from '@ember-data/model';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\n\nexport default class MarketingCommunication extends BaseModel {\n @attr('boolean', { defaultValue: false })\n declare isChecked: boolean;\n\n @attr('string', { defaultValue: '' })\n declare name: string;\n\n @attr('string', { defaultValue: '' })\n declare description: string;\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'settings/account-management/account-information/marketing-communication/marketing-communication': MarketingCommunication;\n }\n}\n","import { attr } from '@ember-data/model';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\n\nexport default class CountryAddressResource extends BaseModel {\n /**\n * The first street.\n */\n @attr('string')\n declare street1: string;\n\n /**\n * The street 1 resource label.\n */\n @attr('string')\n declare street1ResourceLabel: string;\n\n /**\n * Is street 1 required?\n */\n @attr('boolean')\n declare isStreet1Required: boolean;\n\n /**\n * Should street 1 be displayed?\n */\n @attr('boolean')\n declare shouldShowStreet1: boolean;\n\n /**\n * The second street.\n */\n @attr('string')\n declare street2: string;\n\n /**\n * The street 2 resource label.\n */\n @attr('string')\n declare street2ResourceLabel: string;\n\n /**\n * Is street 2 required?\n */\n @attr('boolean')\n declare isStreet2Required: boolean;\n\n /**\n * Should street 2 be displayed?\n */\n @attr('boolean')\n declare shouldShowStreet2: boolean;\n\n /**\n * The city.\n */\n @attr('string')\n declare city: string;\n\n /**\n * The city resource label.\n */\n @attr('string')\n declare cityResourceLabel: string;\n\n /**\n * Is city required?\n */\n @attr('boolean')\n declare isCityRequired: boolean;\n\n /**\n * Should city be displayed?\n */\n @attr('boolean')\n declare shouldShowCity: boolean;\n\n /**\n * The sub city.\n */\n @attr('string')\n declare subCity: string;\n\n /**\n * The sub city resource label.\n */\n @attr('string')\n declare subCityResourceLabel: string;\n\n /**\n * Is sub city required?\n */\n @attr('boolean')\n declare isSubCityRequired: boolean;\n\n /**\n * Should sub city be displayed?\n */\n @attr('boolean')\n declare shouldShowSubCity: boolean;\n\n /**\n * The region.\n */\n @attr('string')\n declare region: string;\n\n /**\n * The region resource label.\n */\n @attr('string')\n declare regionResourceLabel: string;\n\n /**\n * Is region required?\n */\n @attr('boolean')\n declare isRegionRequired: boolean;\n\n /**\n * Should region be displayed?\n */\n @attr('boolean')\n declare shouldShowRegion: boolean;\n\n /**\n * The sub region.\n */\n @attr('string')\n declare subRegion: string;\n\n /**\n * The sub region resource label.\n */\n @attr('string')\n declare subRegionResourceLabel: string;\n\n /**\n * Is sub region required?\n */\n @attr('boolean')\n declare isSubRegionRequired: boolean;\n\n /**\n * Should sub region be displayed?\n */\n @attr('boolean')\n declare shouldShowSubRegion: boolean;\n\n /**\n * The postal code.\n */\n @attr('string')\n declare postalCode: string;\n\n /**\n * The postal code resource label.\n */\n @attr('string')\n declare postalCodeResourceLabel: string;\n\n /**\n * Is postal code required?\n */\n @attr('boolean')\n declare isPostalCodeRequired: boolean;\n\n /**\n * Should postal code be displayed?\n */\n @attr('boolean')\n declare shouldShowPostalCode: boolean;\n\n /**\n * The country.\n */\n @attr('number')\n declare countryEnum: number;\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'settings/account-management/country-address-resource': CountryAddressResource;\n }\n}\n","import { attr } from '@ember-data/model';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\n\n/**\n * @classdesc\n * A class that holds the property data information.\n */\nexport default class PropertyInformation extends BaseModel {\n /**\n * The type of property the customer has.\n */\n @attr('number')\n declare propertyType: number;\n\n /**\n * The business/company name.\n */\n @attr('string')\n declare companyName: string;\n\n @attr('number')\n declare companyNameMaxLength: number;\n\n /**\n * Is the residence the primary residence?\n */\n @attr('boolean', { allowNull: true, defaultValue: null })\n declare isPrimaryResidence: boolean | null;\n\n /**\n * How many adults live at the residence?\n * This information is stored in the database\n * as occupancy_adults for both business and residential\n * but shows on the frontend as:\n * residential => # of adult occupants\n * business => # of employees\n */\n @attr('number')\n declare occupancyAdults: number;\n\n /**\n * How many children live at the residence?\n */\n @attr('number')\n declare occupancyChildren: number;\n\n /**\n * How many pets live at the residence?\n */\n @attr('number')\n declare occupancyPets: number;\n\n /**\n * What is the property area of the residence?\n */\n @attr('number')\n declare propertyArea: number;\n\n /**\n * The id of the electricity provider at the residence.\n */\n @attr('number')\n declare electricityProviderId: number;\n\n /**\n * Can the property information be edited?\n */\n @attr('boolean')\n declare canEditPropertyInformation: boolean;\n\n /**\n * Can the company name be edited?\n */\n @attr('boolean')\n declare canEditCompanyName: boolean;\n\n /**\n * What is the general type of business?\n */\n @attr('number')\n declare businessType: number;\n\n /**\n * What is the subtype of the business?\n */\n @attr('number')\n declare businessSubtype: number;\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'settings/account-management/property-information': PropertyInformation;\n }\n}\n","import { attr } from '@ember-data/model';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\n\ninterface AddressModel {\n street1: string;\n street2: string;\n city: string;\n subCity: string;\n region: string;\n subRegion: string;\n postalCode: string;\n countryEnum: number;\n}\n\n/**\n * @classdesc\n * A class that holds the system information.\n */\n\nexport default class SystemInformation extends BaseModel {\n /**\n * The temperature unit.\n */\n @attr('string')\n declare temperature: string;\n\n /**\n * The volume unit\n */\n @attr('string')\n declare volume: string;\n\n /**\n * System Name\n */\n @attr('string')\n declare systemName: string;\n\n /**\n * System Name\n */\n @attr('number')\n declare timezone: number;\n\n /**\n * Has permission to update the address\n */\n @attr('boolean')\n declare hasAddressWritePermission: boolean;\n\n /**\n * System Address\n */\n @attr()\n declare address: AddressModel;\n\n /**\n * Dealer Name for Customer\n */\n @attr('string')\n declare dealerName: string;\n\n /**\n * Dealer's phone number\n */\n @attr('string')\n declare phoneNumber: string;\n\n /**\n * Do they have write permission to update system information?\n */\n @attr('boolean')\n declare canUpdateSystemInformation: boolean;\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'settings/account-management/system-information/system-information': SystemInformation;\n }\n}\n","import { attr } from '@ember-data/model';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\n\nexport const DEFAULT_ARRIVAL_START_TIME = 360,\n DEFAULT_ARRIVAL_END_TIME = 420,\n DEFAULT_BUSINESS_START_TIME = 420,\n DEFAULT_BUSINESS_END_TIME = 1140,\n DEFAULT_DEPARTURE_START_TIME = 1140,\n DEFAULT_DEPARTURE_END_TIME = 1200;\n\n/**\n * @classdesc\n *\n * Data model for holding the business hours data for a single system\n */\nexport default class BusinessHourDay extends BaseModel {\n /**\n * The current day of the week\n */\n @attr('string', { defaultValue: '0' })\n declare day: string;\n\n /**\n * The saved open/close status for the location for this day\n */\n @attr('boolean', { defaultValue: true })\n declare locationOpenForBusiness: boolean;\n\n /**\n * The start and end time for each type of business hours for this day. All or none of them should be defined.\n */\n @attr({\n // Define default values for the hours object\n defaultValue() {\n return {\n EmployeeArrival: {\n StartTime: DEFAULT_ARRIVAL_START_TIME,\n EndTime: DEFAULT_ARRIVAL_END_TIME\n },\n OpenForBusiness: {\n StartTime: DEFAULT_BUSINESS_START_TIME,\n EndTime: DEFAULT_BUSINESS_END_TIME\n },\n EmployeeDeparture: {\n StartTime: DEFAULT_DEPARTURE_START_TIME,\n EndTime: DEFAULT_DEPARTURE_END_TIME\n }\n };\n }\n })\n declare hours: Record;\n\n /**\n * This model is calling the old toJSON method for some reason, so override it with the new implementation.\n * TODO: Remove this once the deprecation is updated.\n * @override\n */\n toJSON(options?: { includeId?: boolean }): object {\n return this.serialize(options);\n }\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'settings/business-hours/day/business-hour-day': BusinessHourDay;\n }\n}\n","import { attr } from '@ember-data/model';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\n\nimport type BusinessHourDay from './day/business-hour-day.ts';\n\n// This interface is setup to mock the 'customer-site/models/devices/partition' model\n// In the context of Business Hours, we only use the id and description from the PartitionModel\nexport interface MockPartitionModel {\n id: string;\n description: string;\n}\n\n/**\n * @classdesc\n *\n * Data model for holding the business hours data for a single system\n */\nexport default class LocationBusinessHour extends BaseModel {\n /**\n * Whether or not business hours are enabled for this location\n */\n @attr('boolean')\n declare enabled: boolean;\n\n /**\n * Is the current context restricted from modifying these business hours?\n */\n @attr('boolean')\n declare isReadOnly: boolean;\n\n /**\n * Business hour data for each day of the week for the current system\n */\n @attr('array')\n declare businessHourDays: BusinessHourDay[];\n\n /**\n * Unit ID for the currently selected unit\n */\n @attr('number')\n declare unitId: number;\n\n /**\n * All of the partitions for the given unit\n */\n @attr('array')\n declare unitPartitions: MockPartitionModel[];\n\n /**\n * IDs of the partitions that these business hours should apply to\n */\n @attr('array')\n declare allowedPartitions: number[];\n\n /**\n * Whether or not the customer has access to edit legacy business hours\n */\n @attr('boolean', { defaultValue: false })\n declare canEditLegacyBusinessHours: boolean;\n\n /**\n * Whether or not the customer has access to edit ember business hours\n */\n @attr('boolean', { defaultValue: false })\n declare canEditEmberBusinessHours: boolean;\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'settings/business-hours/location-business-hour': LocationBusinessHour;\n }\n}\n","import { hasMany } from '@ember-data/model';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\n\nimport type EmergencyContactList from './emergency-contact-list';\n\nexport default class SettingsMonitoringStationContactsEmergencyContactListCollection extends BaseModel {\n get shouldRollbackRelationships(): boolean {\n return true;\n }\n\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/require-async-inverse-relationship\n @hasMany('settings/monitoring-station/contacts/emergency-contact-list', { async: false })\n declare callLists: EmergencyContactList[];\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'settings/monitoring-station/contacts/emergency-contact-list-collection': SettingsMonitoringStationContactsEmergencyContactListCollection;\n }\n}\n","import { attr, belongsTo } from '@ember-data/model';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\n\nimport type EmergencyContact from './emergency-contact';\nimport type EmergencyContactList from './emergency-contact-list';\n\nexport default class SettingsMonitoringStationContactsEmergencyContactListEntry extends BaseModel {\n @attr('number')\n declare order: number;\n\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/require-async-inverse-relationship\n @belongsTo('settings/monitoring-station/contacts/emergency-contact', { async: false })\n declare contact: EmergencyContact;\n\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/require-async-inverse-relationship\n @belongsTo('settings/monitoring-station/contacts/emergency-contact-list', { async: false })\n declare list: EmergencyContactList;\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'settings/monitoring-station/contacts/emergency-contact-list-entry': SettingsMonitoringStationContactsEmergencyContactListEntry;\n }\n}\n","import { hasMany } from '@ember-data/model';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\n\nimport type ListEntry from './emergency-contact-list-entry';\n\nexport default class SettingsMonitoringStationContactsEmergencyContactList extends BaseModel {\n get shouldRollbackRelationships(): boolean {\n return true;\n }\n\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/require-async-inverse-relationship\n @hasMany('settings/monitoring-station/contacts/emergency-contact-list-entry', { async: false })\n declare entries: ListEntry[];\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'settings/monitoring-station/contacts/emergency-contact-list': SettingsMonitoringStationContactsEmergencyContactList;\n }\n}\n","import { attr, belongsTo } from '@ember-data/model';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\n\nimport type CsContactPhoneNumberTypeEnum from '../../../../enums/CsContactPhoneNumberType.ts';\nimport type EmergencyContact from './emergency-contact.ts';\n\nexport default class SettingsMonitoringStationContactsEmergencyContactPhone extends BaseModel {\n @attr('number')\n declare order: number;\n\n @attr('string')\n declare phoneNumber: string;\n\n @attr('boolean')\n declare chatEnabled: boolean;\n\n @attr('number')\n declare phoneType: CsContactPhoneNumberTypeEnum;\n\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/require-async-inverse-relationship\n @belongsTo('settings/monitoring-station/contacts/emergency-contact', { async: false })\n declare contact: EmergencyContact;\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'settings/monitoring-station/contacts/emergency-contact-phone': SettingsMonitoringStationContactsEmergencyContactPhone;\n }\n}\n","import { attr, hasMany } from '@ember-data/model';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\n\nimport type EmergencyContactListEntry from './emergency-contact-list-entry.ts';\nimport type EmergencyContactPhone from './emergency-contact-phone.ts';\n\nexport default class SettingsMonitoringStationContactsEmergencyContact extends BaseModel {\n @attr('string')\n declare name: string;\n\n @attr('string')\n declare passcode: string;\n\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/require-async-inverse-relationship\n @hasMany('settings/monitoring-station/contacts/emergency-contact-phone', { async: false })\n declare phoneNumbers: EmergencyContactPhone[];\n\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/require-async-inverse-relationship\n @hasMany('settings/monitoring-station/contacts/emergency-contact-list-entry', { async: false })\n declare listEntries: EmergencyContactListEntry[];\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'settings/monitoring-station/contacts/emergency-contact': SettingsMonitoringStationContactsEmergencyContact;\n }\n}\n","import { attr } from '@ember-data/model';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\n\nexport default class SettingsMonitoringStationContactsSettingsCallListSetting extends BaseModel {\n @attr('number')\n declare minContacts: number;\n @attr('number')\n declare maxContacts: number;\n @attr('number')\n declare maxTotalContacts: number;\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'settings/monitoring-station/contacts/settings/call-list-setting': SettingsMonitoringStationContactsSettingsCallListSetting;\n }\n}\n","import { attr } from '@ember-data/model';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\n\nexport interface SettingsMonitoringStationContactsSettingsVerbalPasscodeSetting {\n required: boolean;\n usePanelCode: boolean;\n minPasscodeLength: number;\n maxPasscodeLength: number;\n useNumericPasscodes: boolean;\n useUniquePasscodes: boolean;\n disallowSpecialCharacters: boolean;\n disallowSpaces: boolean;\n}\n\nexport default class SettingsMonitoringStationContactsSettingsContactPasscodeSetting\n extends BaseModel\n implements SettingsMonitoringStationContactsSettingsVerbalPasscodeSetting\n{\n @attr('boolean')\n declare required: boolean;\n @attr('boolean')\n declare useUniquePasscodes: boolean; // TODO: Need to consider how/if this can be enforced from UI\n\n @attr('boolean')\n declare usePanelCode: boolean;\n @attr('number')\n declare minPasscodeLength: number;\n @attr('number')\n declare maxPasscodeLength: number;\n @attr('boolean')\n declare useNumericPasscodes: boolean;\n @attr('boolean')\n declare disallowSpecialCharacters: boolean;\n @attr('boolean')\n declare disallowSpaces: boolean;\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'settings/monitoring-station/contacts/settings/contact-passcode-setting': SettingsMonitoringStationContactsSettingsContactPasscodeSetting;\n }\n}\n","import { attr, belongsTo } from '@ember-data/model';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\n\nimport type CsContactPhoneNumberTypeEnum from '../../../../../enums/CsContactPhoneNumberType.ts';\nimport type ContactPasscodeSettings from './contact-passcode-setting';\n\nexport default class SettingsMonitoringStationContactsSettingsEmergencyContactSetting extends BaseModel {\n @attr('boolean')\n declare optionalContactLastNames: boolean;\n @attr('boolean')\n declare disallowSpecialCharactersInName: boolean;\n @attr('boolean')\n declare allowPhoneChat: boolean;\n @attr('number')\n declare maxPhones: number;\n @belongsTo('settings/monitoring-station/contacts/settings/contact-passcode-setting', {\n inverse: null,\n async: false\n })\n declare passcodeSettings?: ContactPasscodeSettings;\n @attr('array')\n declare availablePhoneTypes: CsContactPhoneNumberTypeEnum[];\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'settings/monitoring-station/contacts/settings/emergency-contact-setting': SettingsMonitoringStationContactsSettingsEmergencyContactSetting;\n }\n}\n","import { attr } from '@ember-data/model';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\nimport AlarmPermitAuthorityEnum from '../../../enums/AlarmPermitAuthority.ts';\n\nexport default class SettingsMonitoringStationPremisePermit extends BaseModel {\n @attr('string')\n declare permitNumber: string;\n @attr('date')\n declare expiration?: Date;\n @attr('number', { defaultValue: AlarmPermitAuthorityEnum.None })\n declare authority: AlarmPermitAuthorityEnum;\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'settings/monitoring-station/permit': SettingsMonitoringStationPremisePermit;\n }\n}\n","import { attr } from '@ember-data/model';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\n\nexport default class SettingsMonitoringStationPremisePasscode extends BaseModel {\n @attr('string')\n declare passcode: string;\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'settings/monitoring-station/premise/passcode': SettingsMonitoringStationPremisePasscode;\n }\n}\n","import { attr } from '@ember-data/model';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\n\n// Concept is from MobileTech's Protected Actions.\nexport default class SettingsMonitoringStationPremisePermittedAction extends BaseModel {\n @attr('boolean')\n declare managePhones: boolean;\n @attr('boolean')\n declare managePasscodes: boolean;\n @attr('boolean')\n declare managePermits: boolean;\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'settings/monitoring-station/premise/permitted-action': SettingsMonitoringStationPremisePermittedAction;\n }\n}\n","import { hasMany } from '@ember-data/model';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\n\nimport type PremisePhone from './phone.ts';\n\nexport default class SettingsMonitoringStationPremisePhoneCollection extends BaseModel {\n get shouldRollbackRelationships(): boolean {\n return true;\n }\n\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/require-async-inverse-relationship\n @hasMany('settings/monitoring-station/premise/phone', { async: false })\n declare phones: PremisePhone[];\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'settings/monitoring-station/premise/phone-collection': SettingsMonitoringStationPremisePhoneCollection;\n }\n}\n","import { attr } from '@ember-data/model';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\n\nexport default class SettingsMonitoringStationPremisePhone extends BaseModel {\n @attr('number')\n declare order: number;\n @attr('string')\n declare phoneNumber: string;\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'settings/monitoring-station/premise/phone': SettingsMonitoringStationPremisePhone;\n }\n}\n","import { attr } from '@ember-data/model';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\n\nimport type { SettingsMonitoringStationContactsSettingsVerbalPasscodeSetting } from '../../contacts/settings/contact-passcode-setting.ts';\n\nexport default class SettingsMonitoringStationContactsSettingsPremisePasscodeSetting\n extends BaseModel\n implements SettingsMonitoringStationContactsSettingsVerbalPasscodeSetting\n{\n @attr('boolean')\n declare required: boolean;\n @attr('boolean')\n declare useUniquePasscodes: boolean; // TODO: Need to consider how/if this can be enforced from UI\n\n @attr('boolean')\n declare usePanelCode: boolean;\n @attr('number')\n declare minPasscodeLength: number;\n @attr('number')\n declare maxPasscodeLength: number;\n @attr('boolean')\n declare useNumericPasscodes: boolean;\n @attr('boolean')\n declare disallowSpecialCharacters: boolean;\n @attr('boolean')\n declare disallowSpaces: boolean;\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'settings/monitoring-station/contacts/settings/premise-passcode-setting': SettingsMonitoringStationContactsSettingsPremisePasscodeSetting;\n }\n}\n","import { attr } from '@ember-data/model';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\n\nexport default class SettingsMonitoringStationContactsSettingsPremisePhoneSetting extends BaseModel {\n @attr('boolean')\n declare optional: boolean;\n @attr('number')\n declare min: number;\n @attr('number')\n declare max: number;\n @attr('boolean')\n declare requireUnique: boolean;\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'settings/monitoring-station/contacts/settings/premise-phone-setting': SettingsMonitoringStationContactsSettingsPremisePhoneSetting;\n }\n}\n","import { attr } from '@ember-data/model';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\n\n/**\n * @classdesc\n *\n * A model for storing the site-appearance preferences for the Login.\n */\nexport default class SiteAppearance extends BaseModel {\n /**\n * List of supported Display Mode features.\n */\n @attr()\n declare supportedDisplayModeFeatures: number[];\n\n /**\n * Is Dark Mode enabled?\n */\n @attr('boolean', { defaultValue: false })\n declare isDarkModeEnabled: boolean;\n\n /**\n * Is High Contrast Mode enabled?\n */\n @attr('boolean', { defaultValue: false })\n declare isHighContrastModeEnabled: boolean;\n\n /**\n * True if dark mode is enabled but the dealer hasn't provided a dark mode logo.\n */\n @attr('boolean', { defaultValue: false })\n declare isDarkModeDealerLogoMissing: boolean;\n\n /**\n * True if dark mode is enabled but the dealer hasn't provided a dark mode footer logo.\n */\n @attr('boolean', { defaultValue: false })\n declare isDarkModeDealerFooterLogoMissing: boolean;\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'site-appearance/site-appearance': SiteAppearance;\n }\n}\n","import { attr } from '@ember-data/model';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\n\nexport default class CountryMobileCarrier extends BaseModel {\n /**\n * Name of the country for mobile carriers.\n */\n @attr('string')\n declare countryName: string;\n\n /**\n * List of carriers for this specific country that are available for selection by the customer.\n */\n @attr()\n declare carriers: Record;\n}\n","import { attr, hasMany } from '@ember-data/model';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\n\nimport type { AsyncHasMany } from '@ember-data/model';\nimport type SupportPage from './support-page.ts';\n\n/**\n * @classdesc\n *\n * Model used to display proper Support setting options.\n */\nexport default class SupportOption extends BaseModel {\n /**\n *\tThe Id for the logged-in login.\n */\n @attr('number')\n declare loginId: number;\n\n /**\n *\tValue for Phone Number, if it exists.\n */\n @attr('string')\n declare phoneNumber: string;\n\n /**\n *\tValue for Support Website, if it exists.\n */\n @attr('string')\n declare supportWebsiteUrl: string;\n\n /**\n *\tValue for Help Documentation, if it exists.\n */\n @attr('boolean')\n declare canViewHelpDocumentation: boolean;\n\n /**\n *\tIndicates whether or not we should show the tour feature under the support route.\n */\n @attr('boolean')\n declare canLaunchHelpTour: boolean;\n\n /**\n *\tIndicates whether or not we should show the tour feature under the support route.\n */\n @attr('boolean')\n declare canAccessPointCentralUniversity: boolean;\n\n /**\n *\tIndicates whether or not we should show the live chat feature under the support route.\n */\n @attr('boolean')\n declare canAccessLiveChat: boolean;\n\n /**\n *\tValue for Email Address, if it exists.\n */\n @attr('string')\n declare emailAddress: string;\n\n /**\n * Value for the url that contains the create support issue form.\n */\n @attr('string')\n declare createIssueFrameUrl: string;\n\n /**\n * List of all support pages.\n */\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/require-async-inverse-relationship\n @hasMany('support/support-page', { async: true })\n declare supportPages: AsyncHasMany;\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'support/support-option': SupportOption;\n }\n}\n","import { attr } from '@ember-data/model';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\n\n/**\n * @classdesc\n *\n * A class that holds Support Option information.\n */\nexport default class SupportPage extends BaseModel {\n /**\n *\tValue for Icon, if it exists.\n */\n @attr('string')\n declare icon: string;\n\n /**\n *\tValue for Title, if it exists.\n */\n @attr('string')\n declare title: string;\n\n /**\n *\tValue for Description, if it exists.\n */\n @attr('string')\n declare description: string;\n\n /**\n *\tValue for Route Enum, if it exists.\n */\n @attr('number')\n declare routeEnum: number;\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'support/support-page': SupportPage;\n }\n}\n","import { attr } from '@ember-data/model';\nimport { alias } from '@ember/object/computed';\nimport { inject as service } from '@ember/service';\nimport { GET, POST } from '@adc/ajax/services/adc-ajax';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\n\nimport type AdcAjaxService from '@adc/ajax/services/adc-ajax';\nimport type BaseEngineConfig from '@adc/app-infrastructure/services/base-engine-config';\n\nconst TWO_FACTOR_BASE_API_ROUTE = 'engines/twoFactorAuthentication/twoFactorAuthentications';\n\n/**\n * @classdesc The model that contains information relevant to two-factor authentication.\n */\nexport default class TwoFactorAuthentication extends BaseModel {\n @service declare engineConfig: BaseEngineConfig;\n @service declare ajax: AdcAjaxService;\n\n /**\n * The enum value for \"authenticator\" two-factor type.\n *\n */\n @alias('engineConfig.twoFactorAuthenticationTypes.Authenticator')\n declare AUTHENTICATOR: number;\n\n /**\n * The enum value for \"sms\" two-factor type.\n *\n */\n @alias('engineConfig.twoFactorAuthenticationTypes.SMS')\n declare SMS: number;\n\n /**\n * The enum value for \"email\" two-factor type.\n *\n */\n @alias('engineConfig.twoFactorAuthenticationTypes.Email')\n declare EMAIL: number;\n\n /**\n * The type of 2FA currently selected by the user.\n */\n @attr('number')\n declare selected2FAType: number;\n\n /**\n * All sms data (number, country, provider) used for two-factor authentication.\n */\n @attr()\n declare smsMobileNumber: Record;\n\n /**\n * The email address where the 2fa codes are sent.\n */\n @attr('string', { defaultValue: '' })\n declare email: string;\n\n /**\n * Bitmask value denoting the types of two-factor authentication for setup. Can be 0, 1, 2, 3, 5, 7.\n */\n @attr('number')\n declare enabledTwoFactorTypes: number;\n\n /**\n * Array denoting which 2FA methods the customer can use.\n */\n @attr()\n declare valid2FAPermissions: number[];\n\n /**\n * Does the user have Reset 2FA permission?\n */\n @attr('boolean', { defaultValue: false })\n declare canReset2FA: boolean;\n\n /**\n * Is the Login required to setup 2FA on log-in?\n */\n @attr('boolean')\n declare showSuggestedSetup: boolean;\n\n /**\n * Can the Login skip the required setup?\n */\n @attr('boolean')\n declare canSkipSuggestedSetup: boolean;\n\n /**\n * Name of the currently logged-in device.\n */\n @attr('string', { defaultValue: '' })\n declare currentDeviceName: string;\n\n /**\n * Is the current device trusted?\n */\n @attr('boolean', { defaultValue: false })\n declare isCurrentDeviceTrusted: boolean;\n\n /**\n * @returns true if any 2FA method is enabled.\n */\n is2FAEnabled(): boolean {\n return this.enabledTwoFactorTypes > 0;\n }\n\n /**\n * @returns true if more than one 2FA method is enabled.\n *\n * Because \"enabledTwoFactorTypes\" is a bitmask, we\n * just need to make sure the value is a power of 2.\n */\n areMultiple2FAMethodsEnabled(): boolean {\n const bitmask = this.enabledTwoFactorTypes;\n\n return bitmask > 0 && (bitmask & (bitmask - 1)) !== 0;\n }\n\n /**\n * @returns true if the passed-in twoFactorType is enabled.\n */\n isTwoFactorTypeEnabled(twoFactorType: number): boolean {\n return Boolean(this.enabledTwoFactorTypes & twoFactorType);\n }\n\n /**\n * @returns true if Authenticator 2FA is enabled.\n */\n isAuthenticatorEnabled(): boolean {\n return Boolean(this.enabledTwoFactorTypes & this.AUTHENTICATOR);\n }\n\n /**\n * @returns true if SMS 2FA is enabled.\n */\n isSMSEnabled(): boolean {\n return Boolean(this.enabledTwoFactorTypes & this.SMS);\n }\n\n /**\n * @returns true if Email 2FA is enabled.\n */\n isEmailEnabled(): boolean {\n return Boolean(this.enabledTwoFactorTypes & this.EMAIL);\n }\n\n /**\n * @returns true if the 2fa method is allowed.\n */\n isTwoFactorTypeAllowed(twoFactorType: number): boolean {\n return this.valid2FAPermissions.includes(twoFactorType);\n }\n\n /**\n * Does the current login have authenticator 2FA permissions?\n */\n hasAuthenticatorPermission() {\n return this.valid2FAPermissions.includes(this.AUTHENTICATOR);\n }\n\n /**\n * Does the current login have SMS 2FA permissions?\n */\n hasSmsPermission() {\n return this.valid2FAPermissions.includes(this.SMS);\n }\n\n /**\n * Does the current login have authenticator 2FA permissions?\n */\n hasEmailPermission() {\n return this.valid2FAPermissions.includes(this.EMAIL);\n }\n\n /**\n * @returns The last four digits of the user's phone number.\n */\n lastFourPhoneDigits(): string {\n return (this.smsMobileNumber.mobileNumber as string).slice(-4);\n }\n\n /**\n * @returns The obfuscated mobile number.\n */\n formattedMobileNumber(): string {\n if (!this.smsMobileNumber.mobileNumber) {\n return '';\n }\n\n const firstHalf = (this.smsMobileNumber.mobileNumber as string).slice(0, -4);\n\n return firstHalf.replace(/[0-9]/g, 'X') + this.lastFourPhoneDigits();\n }\n\n /**\n * @returns The user's obfuscated email address.\n */\n obfuscatedEmailAddress(): string {\n /**\n * match - if the regex successfully matches. If not, it's due to the address being shorter than 3 characters (xy@test.com)\n * startShow - (^[^@]{3}) - First three characters as long as @ doesn't exist (this will break on above example)\n * startHide - (.+) - Any character. Used for determining length in *s\n * middleShow - (.) - First character after @ symbol\n * middleHide - (.+) - All characters remaining before first .\n * end - (\\..+) - Domain name\n */\n return this.email.replace(\n /(^[^@]{3})(.+)@(.)(.+)(\\..+)/i,\n function (\n _match: string,\n startShow: string,\n startHide: string,\n middleShow: string,\n middleHide: string,\n end: string\n ) {\n return (\n startShow + '*'.repeat(startHide.length) + '@' + middleShow + '*'.repeat(middleHide.length) + end\n );\n }\n );\n }\n\n /**\n * Send 2FA authentication code to the device on file based on the passed-in 2FA type.\n * Contains optional flag for whether the code is being re-sent or not.\n */\n sendTwoFactorAuthenticationCode(twoFactorType: number, isResend = false, loginId?: number): Promise {\n return twoFactorType === this.SMS\n ? this.sendTwoFactorAuthenticationCodeViaSms(isResend, loginId)\n : this.sendTwoFactorAuthenticationCodeViaEmail(isResend, loginId);\n }\n\n /**\n * Send 2FA authentication code to device given by user.\n */\n sendTwoFactorAuthenticationCodeViaSms(isResend = false, loginId?: number): Promise {\n const apiEndpointName = 'sendTwoFactorAuthenticationCodeViaSms';\n if (loginId) {\n return this.ajax.apiRequest(\n `${TWO_FACTOR_BASE_API_ROUTE}/${loginId}/${apiEndpointName}`,\n undefined,\n { isResend },\n POST\n );\n }\n\n return this.submitCustomApiCall(apiEndpointName, POST, {\n isResend\n });\n }\n\n /**\n * Send 2FA authentication code to device given by user.\n */\n sendTwoFactorAuthenticationCodeViaEmail(isResend = false, loginId?: number): Promise {\n const apiEndpointName = 'sendTwoFactorAuthenticationCodeViaEmail';\n if (loginId) {\n return this.ajax.apiRequest(\n `${TWO_FACTOR_BASE_API_ROUTE}/${loginId}/${apiEndpointName}`,\n undefined,\n { isResend },\n POST\n );\n }\n\n return this.submitCustomApiCall(apiEndpointName, POST, {\n isResend\n });\n }\n\n /**\n * Verifies if the provided authentication code for the appropriate type of 2FA.\n */\n verifyTwoFactorCode(code: string, typeOf2FA: number, loginId?: number): Promise {\n const apiEndpointName = 'verifyTwoFactorCode';\n if (loginId) {\n return this.ajax.apiRequest(\n `${TWO_FACTOR_BASE_API_ROUTE}/${loginId}/${apiEndpointName}`,\n undefined,\n { code, typeOf2FA },\n POST\n );\n }\n return this.submitCustomApiCall(apiEndpointName, POST, {\n code,\n typeOf2FA\n });\n }\n\n /**\n * Adds the current device as a trusted device.\n */\n trustTwoFactorDevice(deviceName: string, loginId?: number): Promise {\n const apiEndpointName = 'trustTwoFactorDevice';\n if (loginId) {\n return this.ajax.apiRequest(\n `${TWO_FACTOR_BASE_API_ROUTE}/${loginId}/${apiEndpointName}`,\n undefined,\n { deviceName },\n POST\n );\n }\n return this.submitCustomApiCall(apiEndpointName, POST, { deviceName });\n }\n\n /**\n * Resets 2FA for the given login.\n */\n reset2FA(loginId?: number): Promise {\n const apiEndpointName = 'reset2FA';\n if (loginId) {\n return this.ajax.apiRequest(\n `${TWO_FACTOR_BASE_API_ROUTE}/${loginId}/${apiEndpointName}`,\n undefined,\n undefined,\n POST\n );\n }\n return this.submitCustomApiCall(apiEndpointName, POST);\n }\n\n /**\n * Disable 2FA for current login.\n */\n disableTwoFactorAuthentication(typeOf2FA: number): Promise {\n return this.submitCustomApiCall('disableTwoFactorAuthentication', POST, { typeOf2FA });\n }\n\n /**\n * Validate the 2FA mobile number provided by the user.\n */\n validateSmsMobileNumber(): Promise {\n return this.submitCustomApiCall('validateSmsMobileNumber', POST, this.smsMobileNumber);\n }\n\n /**\n * Verifies if the provided authentication code for the appropriate type of 2FA.\n */\n verifyCodeAndEnable2FA(code: string, typeOf2FA: number): Promise | undefined {\n const verificationMethod = {\n [this.AUTHENTICATOR]: 'verifyCodeAndEnable2FAWithAuthenticator',\n [this.SMS]: 'verifyCodeAndEnable2FAWithSms',\n [this.EMAIL]: 'verifyCodeAndEnable2FAWithEmail'\n }[typeOf2FA];\n\n return verificationMethod ? this.submitCustomApiCall(verificationMethod, POST, { code }) : undefined;\n }\n\n /**\n * Gets the data for the QR code (which contains the TOTP secret).\n */\n getAuthenticatorSecretData(): Promise<{ value: { qrCodeData: string; secretString: string } }> {\n return this.submitCustomApiCall<{ value: { qrCodeData: string; secretString: string } }>(\n 'getAuthenticatorSecretData',\n GET\n );\n }\n\n /**\n * Sets a flag to skip 2FA setup for the session.\n */\n skipTwoFactorSetup(loginId?: number): Promise {\n const apiEndpointName = 'skipTwoFactorSetup';\n if (loginId) {\n return this.ajax.apiRequest(\n `${TWO_FACTOR_BASE_API_ROUTE}/${loginId}/${apiEndpointName}`,\n undefined,\n null,\n POST\n );\n }\n return this.submitCustomApiCall(apiEndpointName, POST);\n }\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'two-factor-authentication/two-factor-authentication': TwoFactorAuthentication;\n }\n}\n","import { attr } from '@ember-data/model';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\n\n/**\n * @classdesc\n * The model that defines an Alarm.com video event.\n */\nexport default class DownloadFormat extends BaseModel {\n /**\n * The format description.\n */\n @attr('string')\n declare description: string;\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'video/download-format': DownloadFormat;\n }\n}\n","import { EmbeddedRecordsMixin } from '@ember-data/serializer/rest';\nimport BaseSerializer from '@adc/app-infrastructure/serializers/base-serializer';\n\n/**\n * @classdesc Serializer for the arming-reminder model.\n */\nexport default class ArmingReminderSerializer extends BaseSerializer.extend(EmbeddedRecordsMixin) {\n isEmbeddedRecordsMixinCompatible = true;\n\n attrs = {\n recipients: {\n serialize: 'records'\n }\n };\n}\n","import { EmbeddedRecordsMixin } from '@ember-data/serializer/rest';\nimport BaseSerializer from '@adc/app-infrastructure/serializers/base-serializer';\n\n/**\n * @classdesc Serializer for the communication-preference model.\n */\nexport default class CommunicationPreferenceSerializer extends BaseSerializer.extend(EmbeddedRecordsMixin) {\n isEmbeddedRecordsMixinCompatible = true;\n\n attrs = {\n categoryPreferences: {\n serialize: 'records'\n }\n };\n}\n","import { EmbeddedRecordsMixin } from '@ember-data/serializer/rest';\nimport BaseSerializer from '@adc/app-infrastructure/serializers/base-serializer';\n\n/**\n * @classdesc Serializer for the communication-preference model.\n */\nexport default class MarketingCategorySerializer extends BaseSerializer.extend(EmbeddedRecordsMixin) {\n isEmbeddedRecordsMixinCompatible = true;\n\n attrs = {\n communicationMethods: {\n serialize: 'records'\n }\n };\n}\n","import { EmbeddedRecordsMixin } from '@ember-data/serializer/rest';\nimport BaseSerializer from '@adc/app-infrastructure/serializers/base-serializer';\n\nexport default class SettingsMonitoringStationContactsEmergencyContactListCollection extends BaseSerializer.extend(\n // @ts-expect-error: @ember-data/types appears to be incorrect\n EmbeddedRecordsMixin\n) {\n isEmbeddedRecordsMixinCompatible = true;\n\n attrs = {\n callLists: {\n serialize: 'records'\n }\n };\n}\n","import { EmbeddedRecordsMixin } from '@ember-data/serializer/rest';\nimport BaseSerializer from '@adc/app-infrastructure/serializers/base-serializer';\n\nexport default class SettingsMonitoringStationContactsEmergencyContactListEntry extends BaseSerializer.extend(\n // @ts-expect-error: @ember-data/types appears to be incorrect\n EmbeddedRecordsMixin\n) {\n isEmbeddedRecordsMixinCompatible = true;\n\n attrs = {\n contact: {\n serialize: 'records'\n }\n };\n}\n","import { EmbeddedRecordsMixin } from '@ember-data/serializer/rest';\nimport BaseSerializer from '@adc/app-infrastructure/serializers/base-serializer';\n\nexport default class SettingsMonitoringStationContactsEmergencyContactList extends BaseSerializer.extend(\n // @ts-expect-error: @ember-data/types appears to be incorrect\n EmbeddedRecordsMixin\n) {\n isEmbeddedRecordsMixinCompatible = true;\n\n attrs = {\n entries: {\n serialize: 'records'\n }\n };\n}\n","import { EmbeddedRecordsMixin } from '@ember-data/serializer/rest';\nimport BaseSerializer from '@adc/app-infrastructure/serializers/base-serializer';\n\nexport default class SettingsMonitoringStationContactsEmergencyContact extends BaseSerializer.extend(\n // @ts-expect-error: @ember-data/types appears to be incorrect\n EmbeddedRecordsMixin\n) {\n isEmbeddedRecordsMixinCompatible = true;\n\n attrs = {\n phoneNumbers: {\n serialize: 'records'\n }\n };\n}\n","import { EmbeddedRecordsMixin } from '@ember-data/serializer/rest';\nimport BaseSerializer from '@adc/app-infrastructure/serializers/base-serializer';\n\nexport default class SettingsMonitoringStationPremisePhoneCollection extends BaseSerializer.extend(\n // @ts-expect-error EmbeddedRecordsMixin type is incorrect.\n EmbeddedRecordsMixin\n) {\n isEmbeddedRecordsMixinCompatible = true;\n\n attrs = {\n phones: {\n serialize: 'records'\n }\n };\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your serializers.\ndeclare module 'ember-data/types/registries/serializer' {\n export default interface SerializerRegistry {\n 'settings/monitoring-station/premise/phone-collection': SettingsMonitoringStationPremisePhoneCollection;\n }\n}\n","import { inject as service } from '@ember/service';\nimport BaseModelAdapter from '@adc/common-models/adapters/base-model-adapter';\n\nimport type EnvSettingsService from '@adc/app-infrastructure/services/env-settings';\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type NotificationManager from '@adc/ui-components/services/notification-manager';\n\nexport default class BaseLoginSetupAdapter extends BaseModelAdapter {\n @service declare envSettings: EnvSettingsService;\n @service declare notificationManager: NotificationManager;\n @service declare intl: ADCIntlService;\n\n /** @override */\n get namespace(): string {\n // Namespace sets the paths for communication with backend.\n return `${this.envSettings.getEnvironment()?.loginSetupEngine?.engineApiPrefix || ''}/api/engines`;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n
\\n

\\n {{tc this \\\"deviceNameLabel\\\"}}\\n

\\n\\n \\n
\\n\")","import Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { action } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport { getValidationErrorsFromResponse } from '@adc/ajax/utils/validation-error-processing';\nimport { intlPath } from '@adc/i18n/path';\n\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type { SimpleDialogSignature } from '@adc/ui-components/components/modals/dialog-modals/simple/simple-dialog';\nimport type NotificationManager from '@adc/ui-components/services/notification-manager';\nimport type RecognizedDevice from '../../../models/recognized-devices/recognized-device.ts';\n\nexport interface EditDeviceSignature {\n Element: SimpleDialogSignature['Element'];\n Args: {\n model: {\n device: RecognizedDevice;\n };\n };\n}\n\n/**\n * @clasdesc\n * This modal allows users to edit a trusted device name.\n */\n@intlPath({ module: '@adc/login-setup-addon', path: 'modals/recognized-devices/edit-device' })\nexport default class EditDeviceModal extends Component {\n @service declare intl: ADCIntlService;\n @service declare notificationManager: NotificationManager;\n\n /**\n * Message to display to user if an error is encountered during operation.\n */\n @tracked errorMessage = '';\n\n get deviceName(): string {\n const { device } = this.args.model;\n return device.customDeviceName ?? device.name;\n }\n\n /** @override */\n willDestroy(): void {\n super.willDestroy();\n return this.args.model.device.rollback();\n }\n\n protected async saveDevice(successMsg: string): Promise {\n this.errorMessage = '';\n\n try {\n await this.args.model.device.save();\n this.notificationManager.addSuccess(successMsg);\n return true;\n } catch (ex) {\n const nameError = getValidationErrorsFromResponse(ex)['deviceNameError'];\n if (nameError) {\n this.errorMessage = nameError;\n }\n\n return Promise.reject(ex);\n }\n }\n\n /**\n * Button action of editing the selected device.\n */\n @action\n async editDevice(): Promise {\n return this.saveDevice(this.intl.tc(this, 'successNotificationText'));\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'Modals::RecognizedDevices:EditDevice': typeof EditDeviceModal;\n 'modals/recognized-device/edit-device': typeof EditDeviceModal;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n
\\n

{{tc this \\\"modalBody\\\"}}

\\n
\\n\")","import Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport { intlPath } from '@adc/i18n/path';\n\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type { SimpleDialogSignature } from '@adc/ui-components/components/modals/dialog-modals/simple/simple-dialog';\nimport type NotificationManager from '@adc/ui-components/services/notification-manager';\nimport type RecognizedDevice from '../../../models/recognized-devices/recognized-device.ts';\n\nexport interface ForgetDeviceSignature {\n Element: SimpleDialogSignature['Element'];\n Args: {\n model: {\n device: RecognizedDevice;\n };\n };\n}\n\n/**\n * @clasdesc\n * This modal allows users to forget a linked device.\n */\n@intlPath({ module: '@adc/login-setup-addon', path: 'modals/recognized-devices/forget-device' })\nexport default class ForgetDeviceModal extends Component {\n @service declare intl: ADCIntlService;\n @service declare notificationManager: NotificationManager;\n\n /**\n * Button action of forgetting the selected device.\n */\n @action\n async forgetDevice(): Promise {\n const { device } = this.args.model;\n\n Object.assign(device, {\n isTrustedDevice: false,\n customDeviceName: null\n });\n\n await device.save();\n this.notificationManager.addSuccess(this.intl.tc(this, 'successNotificationText'));\n\n return true;\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'Modals::RecognizedDevices:ForgetDevice': typeof ForgetDeviceModal;\n 'modals/recognized-device/forget-device': typeof ForgetDeviceModal;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n
\\n
\\n

{{tc this \\\"modalBody\\\"}}

\\n
\\n\\n
\\n {{tc this \\\"deviceNameLabel\\\"}}\\n
\\n\\n \\n
\\n\")","import { action } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport { intlPath } from '@adc/i18n/path';\nimport EditDeviceModal from './edit-device.ts';\n\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\n\n/**\n * @clasdesc\n * This modal allows users to trust a linked device and label the device with a custom name.\n */\n@intlPath({ module: '@adc/login-setup-addon', path: 'modals/recognized-devices/trust-device' })\nexport default class TrustDeviceModal extends EditDeviceModal {\n @service declare intl: ADCIntlService;\n\n /**\n * Button action of trusting the selected device.\n */\n @action\n trustDevice(): Promise {\n this.args.model.device.isTrustedDevice = true;\n return this.saveDevice(this.intl.tc(this, 'successNotificationText'));\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'Modals::RecognizedDevices:TrustDevice': typeof TrustDeviceModal;\n 'modals/recognized-device/trust-device': typeof TrustDeviceModal;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n
\\n {{#each (array 1 2 3 4 5 6 0) as |day|}}\\n
\\n {{/each}}\\n
\\n\\n \\n
\\n
\\n
\\n {{tc this \\\"employeeArrival\\\"}}\\n
\\n
\\n
\\n {{tc this \\\"businessHours\\\"}}\\n
\\n
\\n
\\n {{tc this \\\"employeeDeparture\\\"}}\\n
\\n
\\n\\n \\n\\n

{{this.currentSelectedDay}}

\\n
\\n \\n \\n
\\n
\\n
\\n

{{tc this \\\"employeeArrival\\\"}}

\\n
\\n \\n \\n
\\n
\\n
\\n

{{tc this \\\"businessHours\\\"}}

\\n
\\n \\n \\n
\\n
\\n
\\n

{{tc this \\\"employeeDeparture\\\"}}

\\n
\\n \\n \\n
\\n
\\n {{#if this.hasConflicts}}\\n
{{tc this \\\"conflictMessage\\\"}}
\\n {{/if}}\\n
\\n \\n \\n

{{this.copyHoursText}}

\\n
\\n \\n \\n\\n \\n
\")","import Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { DAYS_IN_WEEK, MINUTES_IN_DAY, MINUTES_IN_WEEK } from '@adc/ember-utils/constants/time';\nimport { action, computed, setProperties } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport { htmlSafe } from '@ember/template';\nimport { intlPath } from '@adc/i18n/path';\nimport CheckboxTreeItem, { SELECTED } from '@adc/ui-components/utils/checkbox-tree-item';\nimport DropdownSelectItem from '@adc/ui-components/utils/dropdown-select-item';\nimport { utcToZonedTime } from 'date-fns-tz';\nimport setDay from 'date-fns/setDay';\n\nimport type LocaleService from '@adc/app-infrastructure/services/locale';\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type { TimeBlock } from '@adc/ui-components/components/views/types';\nimport type AccessibilityService from '@adc/ui-components/services/accessibility';\nimport type BusinessHourDay from '../../../models/settings/business-hours/day/business-hour-day.ts';\nimport type LocationBusinessHour from '../../../models/settings/business-hours/location-business-hour.ts';\n\nexport const DEFAULT_ARRIVAL_START_TIME = 360,\n DEFAULT_ARRIVAL_END_TIME = 420,\n DEFAULT_BUSINESS_START_TIME = 420,\n DEFAULT_BUSINESS_END_TIME = 1140,\n DEFAULT_DEPARTURE_START_TIME = 1140,\n DEFAULT_DEPARTURE_END_TIME = 1200;\n\ninterface EditBusinessHoursTimetableSignature {\n Args: {\n updatePreview: (day: string) => void;\n initialOpenForBusinessStates: boolean[];\n selectedPreviewDay: BusinessHourDay;\n setHasConflict: (value: boolean) => void;\n\n model: {\n locationBusinessHours: LocationBusinessHour;\n };\n };\n}\n\nenum TimeSelectionsEnum {\n arrivalStart,\n arrivalEnd,\n businessHoursStart,\n businessHoursEnd,\n departureStart,\n departureEnd\n}\n\n/**\n * Convert the day minutes (0 - 2160) to a localized time string. If greater than 1440,\n * it indicates that it takes place in the next day.\n *\n * @param dayMinutes - Number of elapsed minutes from the beginning of day.\n * @param intl Dependency inject ADCIntlService.\n */\nexport function dayMinutesToTimeString(dayMinutes: number, intl: ADCIntlService): string {\n // If we recieve an undefined value, default to a blank time.\n if (!dayMinutes && dayMinutes != 0) {\n return '--:--';\n }\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line @adc/ember/require-tz-functions\n return intl.formatDate(new Date(0, 0, 2, 0, dayMinutes), {\n hour: 'numeric',\n minute: 'numeric'\n });\n}\n\n/**\n * Displays the business hours as a weekly view.\n *\n * @class EditBusinessHoursTimetable\n * @extends Component\n *\n * @param {NativeArray}\n */\n@intlPath({ module: '@adc/login-setup-addon', path: 'settings/business-hours/edit-business-hours-timetable' })\nexport default class EditBusinessHoursTimetable extends Component {\n @service declare intl: ADCIntlService;\n @service declare accessibility: AccessibilityService;\n @service declare locale: LocaleService;\n\n // CSS Timeblock Class Names\n ARRIVAL_CLASS = ' arrival';\n BUSINESS_HOURS_CLASS = ' business';\n DEPARTURE_CLASS = ' departure';\n HIDDEN_CLASS = ' hidden';\n CONFLICT_CLASS = ' conflict';\n HIDELABEL_CLASS = ' hide-label';\n\n /**\n * Used as a pseudo-computed property so that we can update the schedule\n * when it's hours have been updated.\n */\n @tracked\n didUpdateHours = false;\n\n @tracked\n showEditTimeblockPopover = false;\n\n @tracked\n showCopyTimeblockPopover = false;\n\n /**\n * Should we show the time block popover?\n */\n @tracked showTimeblockPopover = false;\n\n /**\n * The value of the currently selected day\n */\n @tracked\n selectedDay = 0;\n\n /**\n * The ID of the currently selected time block\n */\n @tracked\n selectedTimeBlockId?: number;\n\n /**\n * List of the days to copy to when the copyBusinessHours action executes\n */\n @tracked\n daysToCopyTo: number[] = [];\n\n get locationBusinessHours(): LocationBusinessHour {\n return this.args.model.locationBusinessHours;\n }\n\n /**\n * Tracked property of the LocationBusinessHour model passed to this component\n */\n @tracked\n businessHourData = this.locationBusinessHours;\n\n // TODO: Update intervals to dynamically respond to each other and prevent overlap\n @tracked\n dropdownArrivalStartIntervals = this.getTimes(TimeSelectionsEnum.arrivalStart);\n\n @tracked\n dropdownArrivalEndIntervals = this.getTimes(TimeSelectionsEnum.arrivalEnd);\n\n @tracked\n dropdownBusinessStartIntervals = this.getTimes(TimeSelectionsEnum.businessHoursStart);\n\n @tracked\n dropdownBusinessEndIntervals = this.getTimes(TimeSelectionsEnum.businessHoursEnd);\n\n @tracked\n dropdownDepartureStartIntervals = this.getTimes(TimeSelectionsEnum.departureStart);\n\n @tracked\n dropdownDepartureEndIntervals = this.getTimes(TimeSelectionsEnum.departureEnd);\n\n @tracked\n declare arrivalStartHasConflicts: boolean;\n\n @tracked\n declare arrivalEndHasConflicts: boolean;\n\n @tracked\n declare businessHoursStartHasConflicts: boolean;\n\n @tracked\n declare businessHoursEndHasConflicts: boolean;\n\n @tracked\n declare departureStartHasConflicts: boolean;\n\n @tracked\n declare departureEndHasConflicts: boolean;\n\n /**\n * Update the daysToCopyTo property each time a box in the Copy popover is checked or unchecked\n */\n @action\n async selectionChanged(checkboxTree: Array): Promise {\n this.daysToCopyTo = checkboxTree\n .flatMap((parent) => parent.subitems)\n .filter((item) => item.state === SELECTED)\n .map((item) => parseInt(item.value));\n }\n\n /**\n * Checks if there is a mismatch between the browser timezone and locale timezone\n * which may affect how days get formatted.\n */\n @computed('locale.timeZone')\n get weekdaysOffset(): number {\n const now = new Date(),\n zonedNow = utcToZonedTime(new Date(), this.locale.timeZone);\n\n if (zonedNow.getDay() > now.getDay()) {\n return 0;\n }\n\n return zonedNow.getDay() < now.getDay() ? 2 : 1;\n }\n\n /**\n * List of options in copy modal.\n */\n @computed('selectedDay', 'weekdaysOffset')\n get copyTimeblockDayOptions(): CheckboxTreeItem[] {\n const weekdaysOffset = this.weekdaysOffset;\n // Get all of the weekdays, starting from Monday\n const WEEKDAYS = Array.from({ length: 7 }, (_, idx) => setDay(new Date(), (idx + weekdaysOffset) % 7));\n\n return [\n CheckboxTreeItem.create({\n name: this.intl.tc(this, 'pleaseSelect'),\n isSelectable: false,\n showAllNoneSelectors: true,\n subitems: WEEKDAYS.map((key, idx) => {\n const day = idx === 6 ? 0 : idx + 1;\n\n return CheckboxTreeItem.create({\n name: this.intl.formatDateTz(key, { weekday: 'long' }),\n value: String(day),\n isSelectable: true,\n disabled: this.selectedDay === day\n });\n })\n })\n ];\n }\n\n /**\n * The BusinessHourDay object associated with the currently selected day\n */\n @computed('selectedDay', 'businessHourData.businessHourDays')\n get currentBusinessHourDay(): BusinessHourDay {\n return this.businessHourData.businessHourDays[this.selectedDay];\n }\n\n /**\n * Return the currently selected day as the translated string\n */\n @computed('selectedDay')\n get currentSelectedDay(): string {\n const weekArray = [\n 'sundayHeader',\n 'mondayHeader',\n 'tuesdayHeader',\n 'wednesdayHeader',\n 'thursdayHeader',\n 'fridayHeader',\n 'saturdayHeader'\n ];\n return this.intl.tc(this, weekArray[this.selectedDay]);\n }\n /**\n * Schedule to be rendered into the grid\n */\n @computed(\n 'businessHourData.{businessHourDays.@each.locationOpenForBusiness,enabled}',\n 'didUpdateHours',\n 'args.initialOpenForBusinessStates',\n 'ARRIVAL_CLASS',\n 'BUSINESS_HOURS_CLASS',\n 'DEPARTURE_CLASS',\n 'HIDDEN_CLASS',\n 'CONFLICT_CLASS',\n 'HIDELABEL_CLASS'\n )\n get scheduleElements(): TimeBlock[] {\n const timeblocks: TimeBlock[] = this.businessHourData.businessHourDays\n .filter((businessHourDay) => businessHourDay.locationOpenForBusiness)\n .flatMap((businessHourDay: BusinessHourDay) => {\n const day = parseInt(businessHourDay.day),\n arrivalStartTime = businessHourDay.hours['EmployeeArrival'].StartTime,\n arrivalEndTime = businessHourDay.hours['EmployeeArrival'].EndTime,\n businessStartTime = businessHourDay.hours['OpenForBusiness'].StartTime,\n businessEndTime = businessHourDay.hours['OpenForBusiness'].EndTime,\n departureStartTime = businessHourDay.hours['EmployeeDeparture'].StartTime,\n departureEndTime = businessHourDay.hours['EmployeeDeparture'].EndTime;\n\n // Initialize standard timeblocks and hide those that are not valid.\n return [\n {\n id: arrivalStartTime + MINUTES_IN_DAY * day,\n classes:\n (arrivalStartTime < arrivalEndTime ? this.ARRIVAL_CLASS : this.HIDDEN_CLASS) +\n (arrivalEndTime - arrivalStartTime < 60 ? this.HIDELABEL_CLASS : ''),\n day: day,\n startMinutesLocal: arrivalStartTime + MINUTES_IN_DAY * day,\n endMinutesLocal: arrivalEndTime + MINUTES_IN_DAY * day\n },\n {\n id: businessStartTime + MINUTES_IN_DAY * day,\n classes:\n (businessStartTime < businessEndTime ? this.BUSINESS_HOURS_CLASS : this.HIDDEN_CLASS) +\n (businessEndTime - businessStartTime < 60 ? this.HIDELABEL_CLASS : ''),\n day: day,\n startMinutesLocal: businessStartTime + MINUTES_IN_DAY * day,\n endMinutesLocal: businessEndTime + MINUTES_IN_DAY * day\n },\n {\n id: departureStartTime + MINUTES_IN_DAY * day,\n classes:\n (departureStartTime < departureEndTime ? this.DEPARTURE_CLASS : this.HIDDEN_CLASS) +\n (departureEndTime - departureStartTime < 60 ? this.HIDELABEL_CLASS : ''),\n day: day,\n startMinutesLocal: departureStartTime + MINUTES_IN_DAY * day,\n endMinutesLocal: departureEndTime + MINUTES_IN_DAY * day\n }\n ];\n });\n\n const conflictTimeblocks = [];\n const times = timeblocks.flatMap((x) => [x.startMinutesLocal, x.endMinutesLocal]);\n\n const HALF_DAY = MINUTES_IN_DAY * 0.5 + 20;\n\n // To handle conflicts between Saturday timeblocks and Sunday timeblocks,\n // add MINUTES_IN_WEEK to each time from sunday and append it to a separate list of times.\n const timesPlusSunday = [...times],\n sundayTimes = times.filter((time) => time < HALF_DAY).map((time) => time + MINUTES_IN_WEEK);\n timesPlusSunday.push(...sundayTimes);\n\n // Draw a red timeblock everywhere where one time is greater than its next x times.\n for (let i = 0; i < times.length; i++) {\n const day = Math.floor(times[i] / MINUTES_IN_DAY);\n // Conflicts are only possible til 12:20pm the next day.\n const conflictDelta = day * MINUTES_IN_DAY + MINUTES_IN_DAY + HALF_DAY;\n\n // Variable to store the start time for conflict timeblocks\n // occurring between day 0 (Sunday) and day 6 (Saturday)\n let start;\n const end = times[i];\n\n // Find start and end of red boxes.\n for (let j = i; j < timesPlusSunday.length; j++) {\n if (timesPlusSunday[j] < times[i] || this.startTimeEqualsEndTime(i, j, times)) {\n // If there is a conflict, update start.\n // If start is not set, we now know where the red box begins.\n // Otherwise, check if the red box should be expanded to an earlier time.\n start = start ? Math.min(start, timesPlusSunday[j]) : timesPlusSunday[j];\n\n // Continue through all j because we can't prove that future values in the collidable set are not going to conflict without comparing them.\n } else if (timesPlusSunday[j] > conflictDelta) {\n break;\n }\n }\n\n if (start != undefined && end != undefined) {\n conflictTimeblocks.push({\n id: start,\n classes: this.CONFLICT_CLASS,\n day: day % DAYS_IN_WEEK,\n startMinutesLocal: start,\n endMinutesLocal: end\n });\n start = undefined;\n }\n }\n\n this.args.setHasConflict(conflictTimeblocks.length > 0);\n return timeblocks.concat(conflictTimeblocks);\n }\n\n /**\n * Format copy modal header\n */\n get copyHoursText(): ReturnType {\n return htmlSafe(\n this.intl.tc(this, 'copyHoursDesc', {\n dayOfWeek: this.currentSelectedDay\n })\n );\n }\n\n /**\n * Returns focus to the edit popover after closing the copy popover.\n */\n @action closeCopyPopover() {\n if (this.showEditTimeblockPopover) {\n const element: HTMLElement | null = document.querySelector('.edit-business-hours-timeblock-popover');\n if (element) {\n element.focus();\n return;\n }\n }\n\n this.accessibility.restoreFocus();\n }\n\n /**\n * Create a new time block on the specified day at the specified time. Then trigger the selectTimeBlock action.\n *\n * @param {number} dayNum - Day number of the week that was clicked.\n */\n @action\n createTimeBlock(dayNum: number): void {\n if (this.businessHourData.enabled && !this.args.model.locationBusinessHours.isReadOnly) {\n const day = this.businessHourData.businessHourDays[dayNum],\n useDefaultValues = day.hours['OpenForBusiness'].StartTime == undefined;\n\n setProperties(day, {\n locationOpenForBusiness: true,\n hours: {\n EmployeeArrival: {\n StartTime: useDefaultValues\n ? DEFAULT_ARRIVAL_START_TIME\n : day.hours['EmployeeArrival'].StartTime,\n EndTime: useDefaultValues ? DEFAULT_ARRIVAL_END_TIME : day.hours['EmployeeArrival'].EndTime\n },\n OpenForBusiness: {\n StartTime: useDefaultValues\n ? DEFAULT_BUSINESS_START_TIME\n : day.hours['OpenForBusiness'].StartTime,\n EndTime: useDefaultValues ? DEFAULT_BUSINESS_END_TIME : day.hours['OpenForBusiness'].EndTime\n },\n EmployeeDeparture: {\n StartTime: useDefaultValues\n ? DEFAULT_DEPARTURE_START_TIME\n : day.hours['EmployeeDeparture'].StartTime,\n EndTime: useDefaultValues ? DEFAULT_DEPARTURE_END_TIME : day.hours['EmployeeDeparture'].EndTime\n }\n }\n });\n\n this.selectTimeBlock.call(this, day.hours['OpenForBusiness'].StartTime + MINUTES_IN_DAY * dayNum);\n\n this.args.updatePreview(this.args.selectedPreviewDay.day);\n }\n }\n\n /**\n * Show / hide the Copy Business Hours popover\n */\n @action\n toggleCopyTimeblockPopover(): void {\n this.showCopyTimeblockPopover = !this.showCopyTimeblockPopover;\n }\n\n /**\n * Sets the given day's business hours to \"Closed for Business\"\n * and removes that day's timeblocks from the schedule component\n */\n @action\n closeBusinessOnDay(): void {\n setProperties(this.businessHourData.businessHourDays[this.selectedDay], {\n locationOpenForBusiness: false\n });\n\n this.showEditTimeblockPopover = !this.showEditTimeblockPopover;\n this.args.updatePreview(this.args.selectedPreviewDay.day);\n }\n\n /**\n * Propagate the click action up to the parent.\n */\n @action\n timeBlockClicked(timeBlockId: number): void {\n this.selectTimeBlock.call(this, timeBlockId);\n }\n\n /**\n * Update the schedule component in response to a change in the Arrival Start Time dropdown\n */\n @action\n selectedArrivalStartTimeChanged(time: string) {\n setProperties(this.businessHourData.businessHourDays[this.selectedDay].hours['EmployeeArrival'], {\n StartTime: Number(time)\n });\n\n this.didUpdateHours = !this.didUpdateHours;\n this.updateConflictsForCurrentBusinessDay();\n this.args.updatePreview(this.args.selectedPreviewDay.day);\n }\n\n /**\n * Update the schedule component in response to a change in the Arrival End Time dropdown\n */\n @action\n selectedArrivalEndTimeChanged(time: string) {\n setProperties(this.businessHourData.businessHourDays[this.selectedDay].hours['EmployeeArrival'], {\n EndTime: Number(time)\n });\n\n this.didUpdateHours = !this.didUpdateHours;\n this.updateConflictsForCurrentBusinessDay();\n this.args.updatePreview(this.args.selectedPreviewDay.day);\n }\n\n /**\n * Update the schedule component in response to a change in the Business Start Time dropdown\n */\n @action\n selectedBusinessStartTimeChanged(time: string) {\n setProperties(this.businessHourData.businessHourDays[this.selectedDay].hours['OpenForBusiness'], {\n StartTime: Number(time)\n });\n\n this.didUpdateHours = !this.didUpdateHours;\n this.updateConflictsForCurrentBusinessDay();\n this.args.updatePreview(this.args.selectedPreviewDay.day);\n }\n\n /**\n * Update the schedule component in response to a change in the Business End Time dropdown\n */\n @action\n selectedBusinessEndTimeChanged(time: string) {\n setProperties(this.businessHourData.businessHourDays[this.selectedDay].hours['OpenForBusiness'], {\n EndTime: Number(time)\n });\n\n this.didUpdateHours = !this.didUpdateHours;\n this.updateConflictsForCurrentBusinessDay();\n this.args.updatePreview(this.args.selectedPreviewDay.day);\n }\n\n /**\n * Update the schedule component in response to a change in the Departure Start Time dropdown\n */\n @action\n selectedDepartureStartTimeChanged(time: string) {\n setProperties(this.businessHourData.businessHourDays[this.selectedDay].hours['EmployeeDeparture'], {\n StartTime: Number(time)\n });\n\n this.didUpdateHours = !this.didUpdateHours;\n this.updateConflictsForCurrentBusinessDay();\n this.args.updatePreview(this.args.selectedPreviewDay.day);\n }\n\n /**\n * Update the schedule component in response to a change in the Departure End Time dropdown\n */\n @action\n selectedDepartureEndTimeChanged(time: string) {\n setProperties(this.businessHourData.businessHourDays[this.selectedDay].hours['EmployeeDeparture'], {\n EndTime: Number(time)\n });\n\n this.didUpdateHours = !this.didUpdateHours;\n this.updateConflictsForCurrentBusinessDay();\n this.args.updatePreview(this.args.selectedPreviewDay.day);\n }\n\n /**\n * Apply the current day's timeblocks to each day selected in the Copy popover\n */\n @action\n copyBusinessHours(): void {\n const { businessHourDays } = this.businessHourData,\n dayToCopy = businessHourDays[this.selectedDay];\n\n this.daysToCopyTo.forEach((element) => {\n setProperties(businessHourDays[element], {\n hours: JSON.parse(JSON.stringify(dayToCopy.hours)),\n locationOpenForBusiness: dayToCopy.locationOpenForBusiness\n });\n });\n\n this.didUpdateHours = !this.didUpdateHours;\n this.toggleCopyTimeblockPopover();\n this.daysToCopyTo = [];\n this.args.updatePreview(this.args.selectedPreviewDay.day);\n this.showEditTimeblockPopover = false;\n }\n\n /**\n * Select a time block so the user is presented with the time block popover.\n */\n private selectTimeBlock(timeBlockId: number): void {\n const scheduleElements = this.scheduleElements,\n selectedTimeBlock = scheduleElements?.find((element) => element.startMinutesLocal === timeBlockId);\n\n // If there is no time block to select or business hours are disabled, return\n if (!selectedTimeBlock || !this.businessHourData.enabled) {\n return;\n }\n\n const { startMinutesLocal, day = 0 } = selectedTimeBlock;\n\n setProperties(this, {\n selectedDay: day,\n selectedTimeBlockId: startMinutesLocal,\n showEditTimeblockPopover: true\n });\n this.updateConflictsForCurrentBusinessDay();\n }\n\n /**\n * Get times from 12:00 AM to 12PM the next day in ten minute increments.\n */\n private getTimes(time: TimeSelectionsEnum): DropdownSelectItem[] {\n const minuteValues = [];\n let offset = 0;\n\n for (let i = 0; i <= MINUTES_IN_DAY * 1.5 + 30; i = i + 10) {\n // Adjust range per timespan.\n switch (time) {\n case TimeSelectionsEnum.arrivalStart: {\n if (i > MINUTES_IN_DAY - 50) {\n continue;\n }\n break;\n }\n case TimeSelectionsEnum.arrivalEnd:\n case TimeSelectionsEnum.businessHoursStart: {\n offset = 10;\n if (i == 0 || i > MINUTES_IN_DAY - 40) {\n continue;\n }\n break;\n }\n case TimeSelectionsEnum.businessHoursEnd:\n case TimeSelectionsEnum.departureStart: {\n offset = 20;\n if (i < offset || i > MINUTES_IN_DAY * 1.5 + 10) {\n continue;\n }\n break;\n }\n case TimeSelectionsEnum.departureEnd: {\n offset = 30;\n if (i < offset || i > MINUTES_IN_DAY * 1.5 + 20) {\n continue;\n }\n break;\n }\n }\n\n // Push time into dropdown list.\n if (i >= MINUTES_IN_DAY) {\n minuteValues.push(\n this.intl.tc(this, 'theNextDay', {\n timeOfDay: dayMinutesToTimeString(i, this.intl)\n })\n );\n } else {\n minuteValues.push(dayMinutesToTimeString(i, this.intl));\n }\n }\n\n return minuteValues.map((name, idx) =>\n DropdownSelectItem.create({\n name,\n value: String(idx * 10 + offset)\n })\n );\n }\n\n /**\n * Returns a day's times as an array which can be iterated through.\n * @param day The number of the day. Supports any amount of wraparound.\n */\n private getArrayOfDaysTimes(day: number) {\n // Convert any given day number into the proper range (0-6) using modulus.\n const businessHourDay = this.businessHourData.businessHourDays[((day % 7) + 7) % 7];\n if (businessHourDay?.locationOpenForBusiness) {\n return [\n businessHourDay.hours['EmployeeArrival'].StartTime,\n businessHourDay.hours['EmployeeArrival'].EndTime,\n businessHourDay.hours['OpenForBusiness'].StartTime,\n businessHourDay.hours['OpenForBusiness'].EndTime,\n businessHourDay.hours['EmployeeDeparture'].StartTime,\n businessHourDay.hours['EmployeeDeparture'].EndTime\n ];\n }\n\n return [];\n }\n\n @computed(\n 'arrivalStartHasConflicts',\n 'arrivalEndHasConflicts',\n 'businessHoursStartHasConflicts',\n 'businessHoursEndHasConflicts',\n 'departureStartHasConflicts',\n 'departureEndHasConflicts'\n )\n get hasConflicts(): boolean {\n return (\n this.arrivalStartHasConflicts ||\n this.arrivalEndHasConflicts ||\n this.businessHoursStartHasConflicts ||\n this.businessHoursEndHasConflicts ||\n this.departureStartHasConflicts ||\n this.departureEndHasConflicts\n );\n }\n\n private resetConflicts() {\n // Prepare to recalculate conflicts.\n this.arrivalStartHasConflicts = false;\n this.arrivalEndHasConflicts = false;\n this.businessHoursStartHasConflicts = false;\n this.businessHoursEndHasConflicts = false;\n this.departureStartHasConflicts = false;\n this.departureEndHasConflicts = false;\n }\n\n /**\n * Update time selection conflicts for a given business day.\n * @remarks The computed properties are not working on business-hour-day so we're doing it here.\n * @param day The number of the day; 0-6; Monday-Sunday\n */\n private updateConflictsForCurrentBusinessDay() {\n // Must recalculate conflicts.\n this.resetConflicts();\n\n // Extract what we need from business hour days. Load previous and next days.\n const currentDayTimes = this.getArrayOfDaysTimes(this.selectedDay);\n const previousDayTimes = this.getArrayOfDaysTimes(this.selectedDay - 1);\n const nextDayTimes = this.getArrayOfDaysTimes(this.selectedDay + 1);\n\n // Iterate through six timespans for the day, comparing to self, previous day, and next day.\n for (let i = 0; i < currentDayTimes.length; i++) {\n for (let j = 0; j < currentDayTimes.length; j++) {\n // Check against times from previous day.\n if (\n j < previousDayTimes.length &&\n previousDayTimes[j] > MINUTES_IN_DAY &&\n previousDayTimes[j] % MINUTES_IN_DAY > currentDayTimes[i]\n ) {\n this.enableTimeConflict(i);\n }\n\n // Check against times within this day.\n if (\n i < j &&\n (currentDayTimes[i] > currentDayTimes[j] || this.startTimeEqualsEndTime(i, j, currentDayTimes))\n ) {\n this.enableTimeConflict(i);\n this.enableTimeConflict(j);\n }\n\n // Check against times from next day.\n if (\n j < nextDayTimes.length &&\n currentDayTimes[i] > MINUTES_IN_DAY &&\n currentDayTimes[i] % MINUTES_IN_DAY > nextDayTimes[j]\n ) {\n this.enableTimeConflict(i);\n }\n }\n }\n }\n\n /**\n * Somewhat like the inverse of getArrayOfDayTimes. Converts index back to time selection and sets the boolean value.\n * @param index The index of the time (from getArrayOfDayTimes)\n */\n private enableTimeConflict(index: number) {\n switch (index) {\n case 0:\n this.arrivalStartHasConflicts = true;\n break;\n case 1:\n this.arrivalEndHasConflicts = true;\n break;\n case 2:\n this.businessHoursStartHasConflicts = true;\n break;\n case 3:\n this.businessHoursEndHasConflicts = true;\n break;\n case 4:\n this.departureStartHasConflicts = true;\n break;\n case 5:\n this.departureEndHasConflicts = true;\n break;\n }\n }\n\n /**\n * Determines if we have encountered start and end times of a single timeblock\n * that are equal to each other.\n * @param startIndex The index of the begining of the passed in timeframe\n * @param endIndex The index of the end of the passed in timeframe\n * @param times Array of time values (in minutes)\n */\n private startTimeEqualsEndTime(startIndex: number, endIndex: number, times: number[]) {\n return endIndex == startIndex + 1 && startIndex % 2 == 0 && times[startIndex] == times[endIndex];\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'Settings::BusinessHours::EditBusinessHoursTimetable': typeof EditBusinessHoursTimetable;\n }\n}\n","enum AlarmPermitAuthorityEnum {\n None = 0,\n Police = 1,\n Fire = 2,\n Medical = 3\n}\nexport default AlarmPermitAuthorityEnum;\n","enum ContactTypeEnum {\n Unknown = 0,\n Phone = 1,\n Email = 2,\n IPhonePush = 16,\n Mobile = 32,\n ThirdParty = 64,\n MonitoringStation = 65,\n Panel = 66\n}\n\nexport default ContactTypeEnum;\n","enum CsContactPhoneNumberTypeEnum {\n Unknown = 0,\n Location = 1,\n Mobile = 2,\n Home = 3,\n Business = 4,\n Pager = 5,\n VacationHome = 6,\n SMS = 7,\n AnsweringService = 8,\n Caseworker = 9,\n Fax = 10,\n GuardPatrol = 11,\n Medical = 12,\n SecurityOffice = 13,\n Office = 14\n}\nexport default CsContactPhoneNumberTypeEnum;\n","import NetworkConfigAdapter from '../../base-network-config-adapter.ts';\n\n/**\n * Adapter for the ble-wifi-config-permission model.\n */\nexport default class BleWifiConfigPermissionAdapter extends NetworkConfigAdapter {}\n","import NetworkConfigAdapter from '../base-network-config-adapter.ts';\n\n/**\n * Adapter for the wifi-config model.\n */\nexport default class WifiConfigAdapter extends NetworkConfigAdapter {}\n","import NetworkConfigAdapter from '../base-network-config-adapter.ts';\n\n/**\n * Adapter for the wifi-info-item model.\n */\nexport default class WifiInfoItemAdapter extends NetworkConfigAdapter {}\n","/**\n * @module FrequencyBandEnum An enum for frequency bands.\n */\nenum FrequencyBandEnum {\n None = 0,\n TwoPointFourGHz = 1,\n FiveGHz = 2\n}\n\nexport default FrequencyBandEnum;\n","/**\n * @module SignalStrengthEnum An enum for signal strengths.\n */\nenum SignalStrengthEnum {\n Unknown = 0,\n NoSignal = 1,\n Poor = 2,\n Good = 3,\n Excellent = 4\n}\n\nexport default SignalStrengthEnum;\n","/**\n * @module\n */\nenum WiFiEncryptionAlgorithmEnum {\n None = 0,\n Tkip = 1,\n Aes = 2,\n Open = 3,\n Shared = 4,\n AmbiguousOpenShared = 5,\n Ccmp = 6,\n TkipCcmp = 7,\n WepAlgorithm = 8,\n TkipAes = 9,\n Unknown = 10\n}\n\nexport default WiFiEncryptionAlgorithmEnum;\n","/**\n * @module\n */\nenum WiFiEncryptionTypeEnum {\n None = 0,\n Wep = 1,\n Wpa = 2,\n Wpa2 = 3,\n Wpa2Enterprise = 4,\n WpaWPa2 = 5,\n Wps = 6,\n Unknown = 7,\n Wpa2Wpa3 = 8,\n Eap = 9,\n Wpa3 = 11\n}\n\nexport default WiFiEncryptionTypeEnum;\n","import { attr } from '@ember-data/model';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\n\n/**\n * @classdesc\n * Wifi Config Permissions Model\n */\nexport default class BleWifiConfigPermission extends BaseModel {\n /**\n * Whether this user has the BleCameraInstallationModeMobileTech feature toggle and Internal Beta enabled.\n */\n @attr('boolean')\n declare hasWifiConfigPermission: boolean;\n\n /**\n * Is the specific camera using BLE Camera Enrollment\n */\n @attr('boolean')\n declare isUsingBleEnrollmentInstallation: boolean;\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'video/permissions/ble-wifi-config-permission': BleWifiConfigPermission;\n }\n}\n","import { hasMany, attr } from '@ember-data/model';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\nimport WirelessConnectionInstructionsTypeEnum from '../../enums/WirelessConnectionInstructionsType.ts';\n\nimport type ArrayProxy from '@ember/array/proxy';\nimport type WiFiEncryptionAlgorithmEnum from '../../enums/WiFiEncryptionAlgorithm.ts';\nimport type WiFiEncryptionTypeEnum from '../../enums/WiFiEncryptionType.ts';\nimport type WifiInfoItem from './wifi-info-item.ts';\n\n/**\n * @classdesc\n * Class for network configs\n */\nexport default class WifiConfig extends BaseModel {\n /**\n * The list of saved wifi networks (previously connected wifi networks on the account).\n */\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/require-async-inverse-relationship\n @hasMany('video/wifi-info-item', { async: false })\n declare myWifiNetworks: ArrayProxy;\n\n /**\n * The list of unsaved wifi networks (networks detected by your video device that are not currently associated with your account).\n */\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/require-async-inverse-relationship\n @hasMany('video/wifi-info-item', { async: false })\n declare otherWifiNetworks: ArrayProxy;\n\n /**\n * The encryption type options.\n */\n @attr('array')\n declare encryptionTypeOptions: WiFiEncryptionTypeEnum[];\n\n /**\n * The security type options.\n */\n @attr('array')\n declare securityTypeOptions: WiFiEncryptionAlgorithmEnum[];\n\n /**\n * The selected network SSID.\n */\n @attr('string')\n declare selectedNetworkSSID: string;\n\n /**\n * The selected password.\n */\n @attr('string')\n declare selectedPassword: string;\n\n /**\n * The selected security type.\n */\n @attr('number')\n declare selectedSecurityType: WiFiEncryptionAlgorithmEnum;\n\n /**\n * The selected encryption type.\n */\n @attr('number')\n declare selectedEncryptionType: WiFiEncryptionTypeEnum;\n\n /**\n * A list of disallowed SSID or password characters (varies based on camera model).\n */\n @attr('array')\n declare disallowedSsidOrPasswordCharactersList: string[];\n\n /**\n * The wireless connection instructions to display.\n */\n @attr('number', { defaultValue: WirelessConnectionInstructionsTypeEnum.None })\n declare wirelessConnectionInstructionsToDisplay: WirelessConnectionInstructionsTypeEnum;\n\n /**\n * Are we currently copying a network?\n */\n @attr('boolean', { defaultValue: false })\n declare isCopyingNetwork: boolean;\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'video/wifi-config': WifiConfig;\n }\n}\n","import { attr } from '@ember-data/model';\nimport BaseModel from '@adc/app-infrastructure/models/base-model';\n\n/**\n * @classdesc\n * Model for wifi configuration information\n */\nexport default class WifiInfoItem extends BaseModel {\n /**\n * The current network name (SSID) of the device.\n */\n @attr('string')\n declare networkSSID: string;\n\n /**\n * Is the network item password protected?\n */\n @attr('boolean')\n declare isEncrypted: boolean;\n\n /**\n * Is the selected device currently connected to this network?\n */\n @attr('boolean')\n declare isDeviceConnected: boolean;\n\n /**\n * Is the device's connection to this network currently in progress?\n */\n @attr('boolean')\n declare isDeviceConnectionInProgress: boolean;\n\n /**\n * The number of devices connected to the network\n */\n @attr('number')\n declare numberOfConnectedDevices: number;\n\n /**\n * The encryption type of the wifi\n */\n @attr('number')\n declare encryptionType: number;\n\n /**\n * The algorithm type of the wifi\n */\n @attr('number')\n declare algorithm: number;\n\n /**\n * The frequency of the device\n */\n @attr('number')\n declare frequencyBand: number;\n\n /**\n * The signal strength of the device\n */\n @attr('number')\n declare signalStrengthEnum: number;\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'video/wifi-info-item': WifiInfoItem;\n }\n}\n","import { inject as service } from '@ember/service';\nimport BaseModelAdapter from '@adc/common-models/adapters/base-model-adapter';\n\nimport type EnvSettingsService from '@adc/app-infrastructure/services/env-settings';\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type NotificationManager from '@adc/ui-components/services/notification-manager';\n\n/**\n * Sets up properties for communicating with the backend.\n */\nexport default class NetworkConfigAdapter extends BaseModelAdapter {\n @service declare envSettings: EnvSettingsService;\n @service declare intl: ADCIntlService;\n @service declare notificationManager: NotificationManager;\n\n /** @override */\n get namespace(): string {\n // Namespace sets the paths for communication with backend.\n const { networkConfigEngine = {} } = this.envSettings.getEnvironment() || {},\n { engineApiPrefix } = networkConfigEngine;\n\n return `${engineApiPrefix}/api/engines`;\n }\n}\n","/**\n * @module\n * The type of instructions we are displaying on the wireless connection instructions action sheet.\n */\nenum WirelessConnectionInstructionsTypeEnum {\n None = 0,\n PowerOffDoorbellCamera = 1,\n PowerOff = 2,\n PowerOffEthernet = 3,\n NoPowerOff = 4,\n WirelessConnectionFailed = 5\n}\n\nexport default WirelessConnectionInstructionsTypeEnum;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n {{#if @title}}{{@title}}{{/if}}\\n {{#if @desc}}{{@desc}}{{/if}}\\n {{! Safari does not render the defs from an svg file when using a tag so we have to copy it here at the root}}\\n {{#if this.hasSvgDefs}}\\n \\n {{/if}}\\n {{! NOTE: Safari still does not support the new href attribute so xlink is required }}\\n \\n\")","import Component from '@glimmer/component';\nimport { action, computed } from '@ember/object';\nimport { isEmpty, isNone } from '@ember/utils';\nimport config from 'ember-get-config';\nimport { getSpriteSelector } from './svg-sprite-loader.ts';\n\nimport '../styles/svg.css';\n\nexport interface SvgSymbolSignature {\n Element: SVGElement;\n Args: {\n /** The name of the icon to render (minus the \"icn-\" prefix). */\n icon: string;\n /** An optional title for the icon, rendered in a `` element. */\n title?: string;\n /** An optional description for the icon, rendered in a `<desc />` element. */\n desc?: string;\n /** Indicates whether the icon can receive focus (this is likely a mistake). */\n isFocusable?: boolean;\n /** Indicates the icon should be hidden from screen readers (defaults to `true` unless `title` or `description` are passed). */\n isHiddenForAccessibility?: boolean;\n /** An optional icon fill color (defaults to gray-80). */\n fillColor?:\n | 'red'\n | 'orange'\n | 'yellow'\n | 'lime'\n | 'green'\n | 'greenblue'\n | 'greencyan'\n | 'cyanblue'\n | 'blue'\n | 'navy'\n | 'purple'\n | 'pink'\n | 'gray-100'\n | 'gray-80'\n | 'gray-60'\n | 'gray-40'\n | 'gray-20'\n | 'gray-10'\n | 'gray-0';\n /** An optional path to the icon SVG sprite (unlikely to be used). */\n path?: string;\n /**\n * Please don't make SVG element clickable, use a button instead.\n * @deprecated\n */\n 'on-click'?: () => void;\n };\n}\n\n/**\n * @classdesc\n * A simple component for showing SVG symbols from global SVG sprites.\n */\nexport default class SvgSymbol extends Component<SvgSymbolSignature> {\n /**\n * Called when the user clicks the SVG.\n */\n get clickHandler(): () => void {\n return this.args['on-click'] ?? (() => {});\n }\n\n /**\n * The path to the SVG sprite as indicated in the application configuration. If path is not present in application configuration\n * it will be assumed that the sprite will be present in the application DOM.\n */\n @computed('args.path')\n get iconPath(): string {\n const { path } = this.args;\n\n if (path) {\n return path;\n }\n\n if (config) {\n return (config as { 'adc-svg-system'?: { path?: string } })['adc-svg-system']?.path ?? '';\n }\n\n return '';\n }\n\n /**\n * The aria-label of the icon, if has one.\n */\n @computed('args.{title,desc}')\n get ariaLabel(): string | undefined {\n const labelText = [this.args.title, this.args.desc].filter((el) => !!el).join(' ');\n return isEmpty(labelText) ? undefined : labelText;\n }\n\n /**\n * Indicate the svg icon should have aria-hidden equal to true.\n */\n @computed('ariaLabel', 'args.isHiddenForAccessibility')\n get hideForAccessibility(): string | undefined {\n return this.args.isHiddenForAccessibility || isEmpty(this.ariaLabel) ? 'true' : undefined;\n }\n\n /**\n * Indicates the icon is interactive.\n */\n @computed('hideForAccessibility', 'args.{isFocusable,on-click}')\n get isInteractive(): boolean {\n const { args } = this;\n return !isEmpty(args['on-click']) || (!!args.isFocusable && isNone(this.hideForAccessibility));\n }\n\n /**\n * A computed CSS class based on icon name and color.\n */\n @computed('args.{icon,fillColor}')\n get iconCss(): string {\n const { icon, fillColor = 'gray-80' } = this.args;\n return [`svg-${icon}`, `adc-${fillColor}-fill`].join(' ');\n }\n\n /**\n * Fix to support safari svg sprite icons.\n * When we use svg icons with a <def> tag they do not render in\n * safari or ios webviews when used with a <use> tag. This method\n * copies the content inside <symbol><defs></defs></symbol> onto\n * the root of the <svg> so that safari can render it properly.\n * @param element The <def> element\n */\n @action\n loadSvgDefs(element: SVGDefsElement): void {\n const { icon } = this.args;\n if (icon) {\n const defsElement = document.querySelector(`svg[id=${getSpriteSelector}] > symbol#icn-${icon} > defs`);\n if (defsElement) {\n element?.replaceWith(defsElement.cloneNode(true));\n }\n }\n }\n\n @computed('args.icon')\n get hasSvgDefs(): boolean {\n // try catch is necessary if query selector doesn't exist in the DOM such as when running the unit tests. Selector should exist in the customer site.\n try {\n const icon = this.args.icon;\n if (icon) {\n const defsElement = document.querySelector(`svg[id=${getSpriteSelector}] > symbol#icn-${icon} > defs`);\n return !!defsElement;\n }\n } catch (_) {\n // do nothing\n }\n return false;\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n /**\n * A simple component for showing SVG symbols from global SVG sprites.\n */\n SvgSymbol: typeof SvgSymbol;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!template-lint-disable no-inline-styles}}\\n<div\\n style=\\\"display:none;\\\"\\n {{did-insert this.loadSprites.perform}}\\n {{did-update this.loadSprites.perform @spriteRootPath}}\\n {{did-update this.loadSprites.perform @spritePaths}}\\n ...attributes\\n>\\n {{#each this.spriteMarkup as |sprite|}}\\n {{sprite}}\\n {{/each}}\\n</div>\")","import Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { assert } from '@ember/debug';\nimport { htmlSafe } from '@ember/template';\nimport { task } from 'ember-concurrency';\n\nimport type { Task } from 'ember-concurrency';\n\n/**\n * A helper function for getting a CSS selector for the card that represents the given card Id.\n */\nexport const getSpriteSelector = 'svg-sprite-id';\n\nexport interface SvgSpriteLoaderSignature {\n Element: HTMLDivElement;\n Args: {\n /** The path the server folder that hosts that sprites. */\n spriteRootPath: string;\n /** The collection of sprites to load. */\n spritePaths?: string[];\n };\n}\n\n/**\n * @classdesc\n * A component for requesting and rendering a collection of SVG sprites.\n */\nexport default class SvgSpriteLoader extends Component<SvgSpriteLoaderSignature> {\n /**\n * The retrieved sprite markup.\n */\n @tracked spriteMarkup: ReturnType<typeof htmlSafe>[] = [];\n\n /**\n * Requests required SVG sprites during initialization.\n */\n loadSprites: Task<void, never> = task({ drop: true }, async () => {\n // Initialize SVG sprite collection.\n const { spriteRootPath, spritePaths } = this.args;\n\n assert('[@adc/svg-system] The spriteRootPath must be specified.', spriteRootPath);\n\n // Are there any sprite paths.\n if (spritePaths?.length) {\n // Request all sprites.\n const spritesData: string[] = await Promise.all(\n spritePaths.map(async (name) => {\n const spriteUrl = `${spriteRootPath}/${name}.xml`;\n\n try {\n const response = await window.fetch(spriteUrl, {\n headers: {\n 'Content-Type': 'xml',\n Accept: 'text/xml'\n },\n cache: 'force-cache'\n }),\n text = await response.text();\n\n // filter out the undefined data and strip the xml tags.\n return (text?.replace(/<\\?xml[\\s\\S]*?\\?>/, '') ?? '').replace(\n /{{svg-sprites-id}}/,\n getSpriteSelector\n );\n } catch (err: any) {\n console.error(`Error fetching SVG sprite from ${spriteUrl}. ${err.code} - ${err.message}`);\n return '';\n }\n })\n );\n this.spriteMarkup = spritesData.filter((d) => !!d).map((d) => htmlSafe(d));\n }\n });\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n /**\n * A component for requesting and rendering a collection of SVG sprites.\n */\n SvgSpriteLoader: typeof SvgSpriteLoader;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{! @glint-nocheck }}\\n{{! template-lint-disable no-yield-only }}\\n{{yield}}\")","import templateOnlyComponent from '@ember/component/template-only';\n\nconst EmptyContainer = templateOnlyComponent();\n\nexport default EmptyContainer;\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n EmptyContainer: typeof EmptyContainer;\n 'empty-container': typeof EmptyContainer;\n }\n}\n","import Helper from '@ember/component/helper';\n\nexport interface AddSignature {\n Args: {\n Positional: any[];\n };\n Return: boolean;\n}\n\n/**\n * Accepts any number of values and return true if all of them are \"truthy\".\n */\nexport default class AndHelper extends Helper<AddSignature> {\n compute(params: any[]): boolean {\n return params.every((p) => !!p);\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n /**\n * Returns a boolean indicating whether all of the passed values are \"truthy\".\n *\n * @example <div aria-selected={{and @isSelected @showSelection}}>\n */\n and: typeof AndHelper;\n }\n}\n","import { guidFor } from '@ember/object/internals';\n\nexport default function guidForFn(context: any): string {\n return guidFor(context);\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n /**\n * Returns a unique ID for tied to the passed instance.\n *\n * @example <dd>{{guid-for this}}</dd>\n */\n 'guid-for': typeof guidForFn;\n }\n}\n","import { isPresent } from '@ember/utils';\n\nexport default function isPresentHelper(...args: any[]): boolean {\n return args.every((v) => isPresent(v));\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n /**\n * Returns a boolean indicating if all of the passed values are considered present by ember.\n *\n * @link https://api.emberjs.com/ember/3.28/functions/@ember%2Futils/isPresent\n * @example {{#if (is-present @item.details)}}\n */\n 'is-present': typeof isPresentHelper;\n }\n}\n","import { isArray } from '@ember/array';\n\n/**\n * Converts the value to boolean.\n */\nfunction truthConvert(value: any): boolean {\n const truthy = value?.isTruthy;\n\n if (typeof truthy === 'boolean') {\n return truthy;\n }\n\n if (isArray(value)) {\n return value.length !== 0;\n }\n\n return !!value;\n}\n\nexport default function not(...args: any[]): boolean {\n for (let i = 0, len = args.length; i < len; i++) {\n if (truthConvert(args[i]) === true) {\n return false;\n }\n }\n\n return true;\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n /**\n * Returns a boolean indicating if all of the passed values are \"falsey\".\n *\n * @example disabled={{not @canChangeUserCode}}\n */\n not: typeof not;\n }\n}\n","import Helper from '@ember/component/helper';\nimport { hash } from 'rsvp';\n\ntype AwaitedObject<T> = {\n [K in keyof T]: Awaited<T[K]>;\n};\n\ninterface PromiseHashTrackedSignature<T> {\n Args: {\n Named: T;\n };\n Return: Promise<AwaitedObject<T>>;\n}\n\nexport default class PromiseHashTrackedHelper<\n T extends Record<string, Promise<any> | any>\n> extends Helper<PromiseHashTrackedSignature<T>> {\n compute(_: never[], obj: T): Promise<AwaitedObject<T>> {\n // Hack to fix https://github.com/emberjs/ember.js/issues/19277.\n Object.keys(obj).forEach((k) => obj[k]);\n return hash<AwaitedObject<T>>(obj);\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n /**\n * Accepts any number of named promises, and returns a single promise that resolved into an object with all of those resolved promises as properties.\n *\n * @example @model={{promise-hash-tracked rule=@model.rule extraRuleOption=@model.extraRuleOption}}\n */\n 'promise-hash-tracked': typeof PromiseHashTrackedHelper;\n }\n}\n","import Helper from '@ember/component/helper';\nimport { hash } from 'rsvp';\n\ntype Resolved<P> = P extends Promise<infer T> ? T : P;\n\ntype AwaitedObject<T> = {\n [K in keyof T]: Resolved<T[K]>;\n};\n\ninterface ResolveModelSignature<T> {\n Args: {\n Positional: [T];\n };\n Return: Promise<AwaitedObject<T>>;\n}\n\nexport default class ResolveModelHelper<\n T extends Record<string, Promise<any> | any>\n> extends Helper<ResolveModelSignature<T>> {\n compute([obj]: [T]): ResolveModelSignature<T>['Return'] {\n // Hack to fix https://github.com/emberjs/ember.js/issues/19277.\n Object.keys(obj).forEach((k) => obj[k]);\n const foo = hash<AwaitedObject<T>>(obj);\n return foo;\n }\n}\n","import { htmlSafe } from '@ember/template';\nimport { isHTMLSafe } from '@ember/template';\n\nimport type { SafeString } from '@ember/template';\n\nexport default function safeHtml(\n value: string | SafeString = ''\n): ReturnType<typeof htmlSafe> {\n if (isHTMLSafe(value)) {\n return value;\n }\n\n return htmlSafe(value);\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n /**\n * Returns a HTML safe version of the passed string.\n *\n * @example <p>{{safe-html @model.info}}</p>\n */\n 'safe-html': typeof safeHtml;\n }\n}\n","import { assert } from '@ember/debug';\nimport { later } from '@ember/runloop';\nimport { modifier } from 'ember-modifier';\n\nexport interface AddDelayedCssSignature {\n Element: HTMLElement;\n Args: {\n Positional: [string, number?];\n };\n}\n\n/**\n * Adds the passed CSS class to the passed HTML element (with optional delay) after element is rendered. Useful for animation after rendering.\n */\nconst addDelayedCssSignature: ReturnType<\n typeof modifier<AddDelayedCssSignature>\n> = modifier<AddDelayedCssSignature>(function addDelayedCss(\n element: HTMLElement,\n [css, delay = 0]: [css: string, delay: number]\n): void {\n assert(\n '[@adc/template-helpers] The add-delayed-css modifier expects a CSS class to apply',\n css\n );\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n later(() => element.classList.add(css), delay);\n});\nexport default addDelayedCssSignature;\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n /**\n * Adds the passes CSS class to the modified element, after render (and using the delay value if passed).\n *\n * @example <div {{add-delayed-css \"is-open\"}} />\n */\n 'add-delayed-css': typeof addDelayedCssSignature;\n }\n}\n","import { assert } from '@ember/debug';\nimport { runTask } from 'ember-lifeline';\nimport Modifier from 'ember-modifier';\n\nexport interface AutoFocusSignature {\n Element: HTMLElement;\n Args: {\n Positional: [string?];\n };\n}\n\n/**\n * @classdesc A template modifier for setting focus on the passed element.\n * @note If setting focus fails an assert will be raised.\n *\n * Usage: {{auto-focus}} or {{auto-focus '.my-focused-element'}}\n */\n\nexport default class AutoFocusModifier extends Modifier<AutoFocusSignature> {\n modify(element: HTMLElement, [selector]: [string]) {\n const elementToFocus = selector\n ? element.querySelector(selector)\n : element;\n runTask(\n this,\n () => {\n if (elementToFocus) {\n if (elementToFocus.hasAttribute('disabled')) {\n return;\n }\n (elementToFocus as HTMLElement).focus();\n }\n\n assert(\n `The auto-focus template modifier failed, perhaps the passed element is not focusable ${elementToFocus}`,\n document.activeElement === elementToFocus\n );\n },\n 0\n );\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n /**\n * Focuses on the modified element, or a child element if a selector is passed.\n *\n * @example <Button::Simple @text={{t 'generic.ok'}} {{auto-focus}} />\n */\n 'auto-focus': typeof AutoFocusModifier;\n }\n}\n","import { registerDestructor } from '@ember/destroyable';\nimport { debounce as runloopDebounce, cancel } from '@ember/runloop';\nimport Modifier from 'ember-modifier';\n\nimport type { EmberRunTimer } from '@ember/runloop/types';\nimport type { ArgsFor } from 'ember-modifier';\n\ntype DOMElement = Element | SVGElement;\n\ntype Handler = (el: Element, observer: ResizeObserver) => void;\n\ntype Options = {\n box: 'content-box' | 'device-pixel-content-box' | 'border-box';\n};\n\ninterface DidResizeModifierSignature {\n Element: DOMElement;\n Args: {\n Positional: [Handler];\n Named: {\n debounce?: number;\n options?: Options;\n };\n };\n}\n\nexport default class DidResizeModifier extends Modifier<DidResizeModifierSignature> {\n // Public API\n declare domElement?: DOMElement;\n declare handler: Handler;\n declare options: Options;\n debounce = 0;\n debounceId?: EmberRunTimer;\n\n // Private API\n declare static observer: ResizeObserver;\n declare static handlers: WeakMap<DOMElement, Handler>;\n\n constructor(owner: any, args: ArgsFor<DidResizeModifierSignature>) {\n super(owner, args);\n\n if (!('ResizeObserver' in window)) {\n return;\n }\n\n if (!DidResizeModifier.observer) {\n DidResizeModifier.handlers = new WeakMap<DOMElement, Handler>();\n DidResizeModifier.observer = new ResizeObserver(\n (entries, observer) => {\n window.requestAnimationFrame(() => {\n for (const entry of entries) {\n const handler = DidResizeModifier.handlers.get(\n entry.target\n );\n handler?.(entry.target, observer);\n }\n });\n }\n );\n }\n\n registerDestructor(this, unobserve);\n }\n\n modify(\n element: DOMElement,\n [handler, options]: [Handler, Options?],\n { debounce }: { debounce?: number }\n ) {\n unobserve(this);\n this.domElement = element;\n this.debounce = debounce ?? 0;\n\n // Save arguments for when we need them.\n this.handler = handler;\n this.options = options ?? this.options;\n\n this.observe(element);\n }\n\n observe(element: DOMElement) {\n if (DidResizeModifier.observer) {\n this.addHandler(element);\n DidResizeModifier.observer.observe(element, this.options);\n }\n }\n\n addHandler(element: DOMElement) {\n DidResizeModifier.handlers.set(\n element,\n (el: Element, observer: ResizeObserver) => {\n if (this.debounce !== 0) {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n this.debounceId = runloopDebounce(\n element,\n this.handler,\n el,\n observer,\n this.debounce\n );\n } else {\n this.handler(el, observer);\n }\n }\n );\n }\n\n removeHandler(element: DOMElement) {\n DidResizeModifier.handlers.delete(element);\n }\n}\n\n/**\n *\n * @param {DidResizeModifier} instance\n */\nfunction unobserve(instance: DidResizeModifier) {\n if (instance.domElement && DidResizeModifier.observer) {\n if (instance.debounceId) {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n cancel(instance.debounceId);\n }\n DidResizeModifier.observer.unobserve(instance.domElement);\n instance.removeHandler(instance.domElement);\n delete instance.domElement;\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n /**\n * Calls the passed function whenever the modified element is resized, using debounce if a debounce period is supplied.\n * @note Uses a global instance of ResizeObserver.\n *\n * @example {{did-resize this.onResizeFunction}}\n */\n 'did-resize': typeof DidResizeModifier;\n }\n}\n","export default function coalesce(...args: any[]): any | undefined {\n return args.reduce((value, p) => value || p, undefined);\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n /**\n * Returns the first \"truthy\" value.\n *\n * @example <p>{{coalesce @text (t 'text')}}</p>\n */\n coalesce: typeof coalesce;\n }\n}\n","export default function eq(first: any, second: any): boolean {\n return first === second;\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n /**\n * Returns a boolean indicating if the two passed values are exactly equal.\n *\n * @example <input checked={{eq @checked true}} />\n */\n eq: typeof eq;\n }\n}\n","export default function math(\n op: '+' | '-' | '*' | '/' | 'max' | 'min',\n ...args: number[]\n): number;\nexport default function math(op: 'abs', ...args: [number]): number;\nexport default function math(\n op: 'gt' | 'lt',\n ...args: [number, number]\n): boolean;\nexport default function math(\n op: '+' | '-' | '*' | '/' | 'abs' | 'max' | 'min' | 'gt' | 'lt',\n ...args: number[]\n): number | boolean | undefined {\n return {\n '+': args.reduce((a, b) => a + b),\n '-': args.reduce((a, b) => a - b),\n '*': args.reduce((a, b) => a * b),\n '/': args.reduce((a, b) => a / b),\n abs: Math.abs(args[0]),\n max: Math.max(...args),\n min: Math.min(...args),\n gt: !!(args[0] > args[1]),\n lt: !!(args[0] < args[1])\n }[op];\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n /**\n * Performs a number of math operations, including '+', '-', '*', '/', 'abs', 'max', 'min', 'gt' or 'lt'.\n *\n * @example <p>{{math '+' @homeTemp @value}}</p>\n */\n math: typeof math;\n }\n}\n","export default function or(...args: any[]): boolean {\n return args.some((p) => !!p);\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n /**\n * Returns a boolean indicating if any of the passed values are \"truthy\".\n *\n * @example @iconOnly={{or (media 'isMobile') (media 'isTabletPortrait')}}\n */\n or: typeof or;\n }\n}\n","export default function toBoolean(v: any): boolean {\n return !!v;\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n /**\n * Converts the passed value to true or false.\n */\n 'to-boolean': typeof toBoolean;\n }\n}\n","export default function toString(v: any): string {\n return String(v);\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n /**\n * Converts the passed value to a string.\n */\n 'to-string': typeof toString;\n }\n}\n","export interface ErrorPayload {\n firstObject?: {\n message?: string;\n };\n}\n\nexport default function validationErrorHelper(\n propertyError?: ErrorPayload\n): undefined | string {\n if (propertyError && typeof propertyError === 'object') {\n // Get the first error object and return the message\n return propertyError.firstObject?.message;\n }\n\n return undefined;\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n /**\n * Accepts an ADC api error payload and return the first error message.\n *\n * @example @errorMessage={{validation-error this.resolvedModel.errors.address}}\n */\n 'validation-error': typeof validationErrorHelper;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div class=\\\"action-buttons {{if this.shouldHide \\'hidden\\'}}\\\" ...attributes>\\n <div class=\\\"control cancel\\\">\\n {{#if this.cancelButtonVisible}}\\n <Button::Native\\n @text={{coalesce @cancelButtonText (t \\\"generic.cancel\\\")}}\\n @disabled={{@cancelButtonDisabled}}\\n @buttonAction={{this.cancelAction}}\\n @updateNativeToolbarButtons={{@updateNativeToolbarButtons}}\\n @disposeNativeButtons={{@disposeNativeButtons}}\\n @nativeType={{this.cancelButtonNativeType}}\\n data-test-action-button-cancel\\n />\\n {{/if}}\\n </div>\\n <div class=\\\"control confirm\\\">\\n {{#if this.confirmButtonVisible}}\\n <Button::Native\\n @buttonColor=\\\"primary\\\"\\n @text={{coalesce @confirmButtonText (t \\\"generic.ok\\\")}}\\n @disabled={{@confirmButtonDisabled}}\\n @buttonAction={{this.confirmAction}}\\n @updateNativeToolbarButtons={{@updateNativeToolbarButtons}}\\n @disposeNativeButtons={{@disposeNativeButtons}}\\n @nativeType={{this.confirmButtonNativeType}}\\n data-test-action-button-confirm\\n />\\n {{/if}}\\n </div>\\n</div>\")","import Component from '@glimmer/component';\nimport { action, computed } from '@ember/object';\nimport { alias } from '@ember/object/computed';\nimport { getOwner } from '@ember/owner';\nimport { inject as service } from '@ember/service';\n\nimport type NativeBridgeService from '@adc/app-infrastructure/services/native-bridge';\nimport type { NativeButton } from '@adc/app-infrastructure/services/native-bridge';\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type { ButtonNativeSignature } from './button/native';\n\ntype NativeButtonArgs = ButtonNativeSignature['Args'];\n\nexport interface ActionButtonsSignature {\n Element: HTMLDivElement;\n Args: Pick<NativeButtonArgs, 'updateNativeToolbarButtons' | 'disposeNativeButtons'> & {\n /** Optional confirm button text (defaults to \"OK\"). */\n confirmButtonText?: NativeButtonArgs['text'];\n /** Indicates the confirm button is visible (defaults to `true`). */\n confirmButtonVisible?: boolean;\n /** Indicates the confirm button should be disabled. */\n confirmButtonDisabled?: boolean;\n /** Optional cancel button text (defaults to \"CANCEL\"). */\n cancelButtonText?: NativeButtonArgs['text'];\n /** Indicates the cancel button is visible (defaults to `true`). */\n cancelButtonVisible?: boolean;\n /** Indicates the cancel button should be disabled. */\n cancelButtonDisabled?: boolean;\n /** Indicates application should be redirected to the previous route after use clicks on either of the buttons */\n shouldGoBackAfterAction?: boolean;\n /** Triggered when the user interacts with the confirm button. */\n 'confirm-action'?: NativeButtonArgs['buttonAction'];\n /** Triggered when the user interacts with the cancel button. */\n 'cancel-action'?: NativeButtonArgs['buttonAction'];\n };\n}\n\n/**\n * @classdesc\n *\n * Component for displaying Cancel and Confirm buttons in a controlled and unified way.\n */\nexport default class ActionButtons extends Component<ActionButtonsSignature> {\n @service declare nativeBridge: NativeBridgeService;\n @service declare intl: ADCIntlService;\n\n // region Confirm button.\n /**\n * Should confirm button be visible?\n */\n @computed('args.confirmButtonVisible')\n get confirmButtonVisible(): boolean {\n return this.args.confirmButtonVisible ?? true;\n }\n\n /**\n * Native type for the confirm button.\n */\n get confirmButtonNativeType(): NativeButton['type'] {\n return this.nativeBridge.getButtonTypeConfirm();\n }\n\n // endregion\n\n // region Cancel button.\n\n /**\n * Should cancel button be visible?\n */\n @computed('args.cancelButtonVisible')\n get cancelButtonVisible(): boolean {\n return this.args.cancelButtonVisible ?? true;\n }\n\n /**\n * Native type for the cancel button.\n */\n @computed('args.shouldGoBackAfterAction')\n get cancelButtonNativeType(): NativeButton['type'] {\n const { nativeBridge } = this;\n return this.args.shouldGoBackAfterAction\n ? nativeBridge.getButtonTypeBack()\n : nativeBridge.getButtonTypeCancel();\n }\n\n // endregion\n\n /**\n * Action that is triggered when the cancel button is clicked.\n */\n @alias('nativeBridge.doesSupportToolbarButtons')\n declare shouldHide: boolean;\n\n /**\n * Action that is triggered when the confirm button is clicked.\n */\n @action\n confirmAction(buttonAnimation: Promise<boolean>, evt: Event): ReturnType<ActionButtons['callAction']> {\n return this.callAction('confirm-action', buttonAnimation, evt);\n }\n\n /**\n * Action that is triggered when the cancel button is clicked.\n */\n @action\n cancelAction(buttonAnimation: Promise<boolean>, evt: Event): ReturnType<ActionButtons['callAction']> {\n return this.callAction('cancel-action', buttonAnimation, evt);\n }\n\n /**\n * Calls the specified action and returns its result.\n */\n private callAction(\n actionName: 'cancel-action' | 'confirm-action',\n buttonAnimation: Promise<boolean>,\n evt: Event\n ): void | Promise<any> {\n const { [actionName]: action, shouldGoBackAfterAction } = this.args,\n result = action?.(buttonAnimation, evt);\n\n if (shouldGoBackAfterAction) {\n const owner = getOwner(this);\n if (!owner) {\n return;\n }\n\n (async () => {\n try {\n // Await button animation only if action was actually defined.\n if (action) {\n if ((await buttonAnimation) === false) {\n // Animation promise returned false, which means the async request failed, so exit.\n return;\n }\n } else {\n // Await the result of the action.\n await result;\n }\n\n const api = (owner.lookup('@adc/ui-components:appValues') ?? {}) as {\n navigationApi?: { transitionToPreviousRoute: VoidFunction };\n };\n api.navigationApi?.transitionToPreviousRoute?.();\n } catch (e) {\n // Assume failure will be handled elsewhere.\n }\n })();\n }\n\n return result;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div class=\\\"action-sheet-host\\\">\\n <div class=\\\"curtain\\\"></div>\\n <div id=\\\"action-sheet-host\\\"></div>\\n</div>\")","import templateOnlyComponent from '@ember/component/template-only';\n\nconst ActionSheetHost = templateOnlyComponent();\nexport default ActionSheetHost;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{#if (is-pending @promise)}}\\n <div class=\\\"async-loader {{if (has-block \\'skeleton-loading\\') \\'skeleton\\'}}\\\" ...attributes>\\n {{#if (has-block \\\"skeleton-loading\\\")}}\\n {{yield to=\\\"skeleton-loading\\\"}}\\n {{else}}\\n <SpinnerSvg @size={{coalesce @spinnerSize \\\"small\\\"}} @spinning={{true}} />\\n {{#if @showText}}\\n <p>{{t \\\"@adc/ui-components.loading\\\"}}</p>\\n {{/if}}\\n {{/if}}\\n </div>\\n{{else}}\\n {{yield (await @promise)}}\\n{{/if}}\")","import Component from '@glimmer/component';\n\nimport type { SpinnerSvgSignature } from './spinner-svg.ts';\n\nexport interface AsyncLoaderSignature<T> {\n Element: HTMLDivElement;\n Args: {\n /** The promise to resolve. */\n promise: Promise<T> | T;\n /** The spinner size to show (defaults to \"small\"). */\n spinnerSize?: SpinnerSvgSignature['Args']['size'];\n /** Indicates whether to show \"Loading...\" text with the spinner. */\n showText?: boolean;\n };\n Blocks: {\n default: [T];\n 'skeleton-loading': [];\n };\n}\n\n// eslint-disable-next-line ember/no-empty-glimmer-component-classes\nexport default class AsyncLoader<T> extends Component<AsyncLoaderSignature<T>> {}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<PopoverMenu\\n @id={{this.contentId}}\\n @isOpen={{this.isOpen}}\\n @anchorSelector={{this.anchorSelectorForPopover}}\\n @boundariesElement={{this.boundariesElement}}\\n @boundariesPadding={{this.boundariesPadding}}\\n @popoverClass={{this.popoverClasses}}\\n @placement={{this.placement}}\\n @focusSelector={{this.focusSelector}}\\n @maxHeight={{this.popoverMaxHeight}}\\n @isFocusable={{this.popoverIsFocusable}}\\n @maxWidth={{this.popoverMaxWidth}}\\n @minWidth={{this.popoverMinWidth}}\\n @preventScroll={{@preventScroll}}\\n @width={{this.popoverWidth}}\\n @fullScreenOnMobile={{this.fullScreenOnMobile}}\\n @useImprovedCloseOnClick={{true}}\\n @on-open={{coalesce @on-dropdown-open (noop)}}\\n @on-close={{coalesce @on-dropdown-close (noop)}}\\n as |popover|\\n>\\n <div class={{if @isLoading \\\"loading\\\"}}>\\n {{#if @isLoading}}\\n <SpinnerSvg @spinning={{true}} @size=\\\"small\\\" />\\n {{else}}\\n {{yield (hash popover=popover)}}\\n {{/if}}\\n </div>\\n</PopoverMenu>\")","// Do not copy this deprecated usage. If you see this, please fix it\n// eslint-disable-next-line ember/no-classic-components\n\nimport { buildClassListString, isDestroyed } from '@adc/ember-utils/utils/ember-helpers';\nimport Component from '@ember/component';\nimport { computed, observer } from '@ember/object';\nimport { or } from '@ember/object/computed';\nimport { debounce, once } from '@ember/runloop';\nimport { inject as service } from '@ember/service';\nimport layout from '../../templates/components/base-dropdown/wrapper.hbs';\n\n// region Component\n\n/**\n * @classdesc\n *\n * Wraps the dropdown content in a popover on large screens and a full-screen div on small screens.\n *\n * @class Wrapper\n * @extends Ember.Component\n * @memberof components.base-dropdown\n */\n// Do not copy this deprecated usage. If you see this, please fix it\n// eslint-disable-next-line ember/no-classic-classes, ember/require-tagless-components\nexport default Component.extend(\n /** @lends components.base-dropdown.Wrapper# */ {\n // region Property Overrides\n dom: service(),\n\n /** @override */\n layout,\n\n /** @override */\n classNames: ['dropdown-wrapper'],\n\n /** @override */\n classNameBindings: ['isOpen:open'],\n\n // endregion\n\n // region Internal Properties\n\n /**\n * Whether or not the popover wrapper should adapt to match the the trigger element's width.\n *\n * @type {boolean}\n */\n matchTriggerElementWidth: true,\n\n /**\n * Should the popover be focusable?\n *\n * @type {boolean}\n */\n popoverIsFocusable: true,\n\n /**\n * The selector of the element to be focused.\n *\n * @type {String}\n */\n focusSelector: '',\n\n // endregion\n\n // region Hooks\n\n /** @override */\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-component-lifecycle-hooks\n didInsertElement() {\n this._super(...arguments);\n\n // Listen for window size changes to adapt popover width accordingly\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n this.dom.addListener(this, window, 'resize', () => debounce(this, setPopoverWidth, 200));\n\n setPopoverWidth.call(this);\n },\n\n // endregion\n\n // region Computed Properties\n\n /**\n * The CSS selector that matches the dropdown's trigger element.\n *\n * @note Used as the popover's default anchor.\n *\n * @ignore\n * @function\n * @returns {String}\n */\n triggerSelector: computed('triggerId', function () {\n return `#${this.triggerId}`;\n }),\n\n /**\n * The popover's CSS selector used to find the element to anchor to.\n *\n * @ignore\n * @function\n * @returns {String}\n */\n anchorSelectorForPopover: or('popoverAnchor', 'triggerSelector'),\n\n /**\n * Is the popover's anchor selector the same as the default?\n *\n * @ignore\n * @function\n * @returns {boolean}\n */\n isDefaultAnchorSelector: computed('anchorSelectorForPopover', 'triggerSelector', function () {\n return this.anchorSelectorForPopover === this.triggerSelector;\n }),\n\n /**\n * Requests a popover width update when the matchTriggerElementWidth flag changes.\n *\n * @ignore\n * @function\n */\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-observers\n matchTriggerElementWidthObserver: observer('matchTriggerElementWidth', function () {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n once(this, setPopoverWidth);\n }),\n\n // endregion\n\n // region @adc/popover Properties\n\n /**\n * A HtmlElement or document.querySelectorAll selector for finding the element that anchors this popover.\n *\n * @see @adc/popover\n *\n * @type {String|HTMLElement}\n */\n popoverAnchor: '',\n\n /**\n * Returns the classes that will be applied to the popover.\n * Always includes 'dropdown-content', as well as any classes provided in popoverClass.\n *\n * @see @adc/popover\n *\n * @function\n * @returns {String}\n */\n popoverClasses: computed('popoverClass', function () {\n return buildClassListString([\n [true, 'dropdown-content'],\n [!!this.popoverClass, this.popoverClass]\n ]);\n }),\n\n /**\n * The placement of the popover.\n *\n * @see @adc/popover\n *\n * @function\n * @returns {String}\n */\n placement: computed('popoverPlacement', function () {\n return this.popoverPlacement || 'bottom-start';\n }),\n\n /**\n * The element which will define the boundaries of the popover position.\n * The popover will never be placed outside of the defined boundaries.\n *\n * @see @adc/popover\n *\n * @type {String|HTMLElement}\n */\n boundariesElement: 'viewport',\n\n /**\n * Additional padding for the popover boundaries.\n *\n * @see @adc/popover\n *\n * @type {number}\n */\n boundariesPadding: 8,\n\n /**\n * Is the popover currently open?\n *\n * @see @adc/popover\n *\n * @ignore\n * @type {boolean}\n */\n isOpen: false,\n\n /**\n * The width of the popover.\n *\n * @see @adc/popover\n *\n * @type {undefined|number}\n */\n popoverWidth: undefined,\n\n /**\n * The maximum width of the popover.\n *\n * @see @adc/popover\n *\n * @type {undefined|number}\n */\n popoverMaxWidth: undefined,\n\n /**\n * The maximum height of the popover.\n *\n * @see @adc/popover\n *\n * @type {undefined|number}\n */\n popoverMaxHeight: undefined,\n\n /**\n * When the popover for this is rendered, we trigger a focus event on the popover. Should we prevent the page from scrolling when this focus is triggered.\n *\n * @see @adc/popover\n *\n * @type {boolean}\n */\n preventScroll: false,\n\n /**\n * Whether or not the popover should stretch on the entire screen when on mobile.\n *\n * @see @adc/popover\n *\n * @type {boolean}\n */\n fullScreenOnMobile: true\n\n // endregion\n }\n);\n\n// endregion\n\n// region Popover Width\n\n/**\n * Sets the dimensions of the dropdown's popover to be the correct width for the screen size.\n *\n * @private\n * @instance\n * @memberof components.base-dropdown.Wrapper\n */\nfunction setPopoverWidth() {\n // Do not try to set value if the component is already destroyed. This is necessary because we are calling this function using debounce.\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line @adc/ember/no-is-destroyed\n if (isDestroyed(this)) {\n return;\n }\n\n if (!this.matchTriggerElementWidth) {\n // At this point, the existing matchTriggerElementWidth value is not wanted anymore.\n this.set('popoverWidth', undefined);\n\n return;\n }\n\n const triggerElement = window.document.querySelector(this.triggerSelector);\n\n if (!triggerElement) {\n return;\n }\n\n // This width is ignored by popover while on mobile screens.\n this.set('popoverWidth', triggerElement.getBoundingClientRect().width);\n}\n\n// endregion\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div ...attributes>\\n <svg\\n class=\\\"svg-{{@icon}} btn-async-icon {{@iconCss}}\\\"\\n role=\\\"img\\\"\\n viewBox=\\\"0 0 24 24\\\"\\n xmlns=\\\"http://www.w3.org/2000/svg\\\"\\n >\\n <title>{{coalesce @title (t (concat \\\"@adc/ui-components.\\\" @icon))}}\\n \\n \\n
\")","import Component from '@glimmer/component';\n\nimport type { SafeString } from 'handlebars';\n\nexport interface AsyncButtonIconSignature {\n Element: HTMLDivElement;\n Args: {\n /** Whether to show \"success\" or \"warning\" (all other values ignored). */\n icon: 'success' | 'warning' | string;\n /** Optional CSS class for the SVG element. */\n iconCss?: string;\n /** Optional title rendered into the SVG `` element. */\n title?: string | SafeString;\n };\n}\n\n/**\n * @classdesc\n * A component to provide hardcoded svg icons for `<Button::Async />`.\n */\nexport default class AsyncButtonIcon extends Component<AsyncButtonIconSignature> {\n get d(): string {\n const { icon } = this.args;\n if (icon === 'success') {\n return 'M19.776 5L8.84 15.935l-5.426-5.424L2 11.925l6.84 6.84.707-.709.707-.705L21.19 6.413z';\n }\n\n if (icon === 'warning') {\n return 'M11 15h2V5h-2v10zm0 4h2v-2h-2v2zm1-17C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2z';\n }\n\n return '';\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<Button::Simple\\n @type={{@type}}\\n @buttonColor={{@buttonColor}}\\n @buttonStyle={{this.simpleButtonStyle}}\\n @buttonAction={{@buttonAction}}\\n class=\\\"is-icon {{if @iconOnly \\'icon-only\\'}} {{this.reversedCss}}\\\"\\n aria-label={{this.buttonText}}\\n ...attributes\\n>\\n <SvgSymbol @icon={{@icon}} @title={{if @iconOnly @text}} class=\\\"icon-btn\\\" aria-hidden=\\\"true\\\" focusable=\\\"false\\\" />\\n <span class=\\\"btn-text\\\">\\n {{this.buttonText}}\\n </span>\\n {{yield}}\\n</Button::Simple>\")","import Component from '@glimmer/component';\nimport { assert } from '@ember/debug';\nimport { computed } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport { isPresent } from '@ember/utils';\nimport { getAnyButtonStyle, getSimpleButtonStyle } from './simple.ts';\n\nimport type { SvgSymbolSignature } from '@adc/svg-system/components/svg-symbol';\nimport type { ButtonSimpleSignature } from './simple';\n\nexport interface ButtonIconSignature {\n Element: ButtonSimpleSignature['Element'];\n Args: Omit<ButtonSimpleSignature['Args'], 'text' | 'buttonStyle'> & {\n /** Buttons text (required for icon buttons). */\n text: string;\n /** The name of the icon to render (minus the \"icn-\" prefix). */\n icon: SvgSymbolSignature['Args']['icon'];\n /** Indicates if only the icon should be visible in the button. */\n iconOnly?: boolean;\n /** Optional button style. */\n buttonStyle?: 'link' | 'small' | 'reversed' | 'inverted';\n };\n Blocks: ButtonSimpleSignature['Blocks'];\n}\n\n/**\n * A button that includes an icon with the text.\n */\nexport default class ButtonIcon extends Component<ButtonIconSignature> {\n @service declare media: { isMobile: true };\n\n constructor(owner: unknown, args: ButtonIconSignature['Args']) {\n super(owner, args);\n\n ['text', 'icon'].forEach((name: 'text' | 'icon') => {\n assert(\n `[@adc/ui-components] The \"@${name}\" argument is required by the <Button::Icon /> component`,\n isPresent(this.args[name])\n );\n });\n }\n\n /**\n * Removes icon buttons styles.\n */\n get simpleButtonStyle(): ReturnType<typeof getSimpleButtonStyle> {\n return getSimpleButtonStyle(this.args.buttonStyle);\n }\n\n /**\n * Returns the icon \"reversed\" button style if present.\n */\n get reversedCss(): string {\n return (this.args.buttonStyle?.includes('reversed') && getAnyButtonStyle('reversed')) || '';\n }\n\n /**\n * The text to display in the button (varies based on responsiveness).\n */\n @computed('args.{text,responsiveText}', 'media.isMobile')\n get buttonText(): string {\n const { text, responsiveText } = this.args;\n return (responsiveText !== undefined && this.media.isMobile ? responsiveText : text) ?? '';\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{#if @icon}}\\n <Button::Async\\n id={{this.elementId}}\\n @buttonAction={{@buttonAction}}\\n @buttonColor={{@buttonColor}}\\n @icon={{@icon}}\\n @iconOnly={{@iconOnly}}\\n @responsiveText={{@responsiveText}}\\n @text={{@text}}\\n @updateAsyncState={{this.updateAsyncState}}\\n hidden={{if this.isRenderedNative true}}\\n disabled={{@disabled}}\\n nativeType={{@nativeType}}\\n class=\\\"native\\\"\\n ...attributes\\n {{did-insert this.propertiesChanged}}\\n {{did-update\\n this.propertiesChanged\\n (and this.isRenderedNative @disabled @text @responsiveText @nativeType @buttonAction this.isPending)\\n }}\\n />\\n{{else}}\\n <Button::Async\\n id={{this.elementId}}\\n @buttonAction={{@buttonAction}}\\n @buttonColor={{@buttonColor}}\\n @responsiveText={{@responsiveText}}\\n @text={{@text}}\\n @updateAsyncState={{this.updateAsyncState}}\\n hidden={{if this.isRenderedNative true}}\\n disabled={{@disabled}}\\n nativeType={{@nativeType}}\\n class=\\\"native\\\"\\n ...attributes\\n {{did-insert this.propertiesChanged}}\\n {{did-update\\n this.propertiesChanged\\n (and this.isRenderedNative @disabled @text @responsiveText @nativeType @buttonAction this.isPending)\\n }}\\n />\\n{{/if}}\")","import Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { assert } from '@ember/debug';\nimport { computed, action } from '@ember/object';\nimport { alias, equal } from '@ember/object/computed';\nimport { guidFor } from '@ember/object/internals';\nimport { once } from '@ember/runloop';\nimport { inject as service } from '@ember/service';\nimport { EnumAsyncState } from './async.ts';\n\nimport type NativeBridgeService from '@adc/app-infrastructure/services/native-bridge';\nimport type { NativeButton as BridgeButton } from '@adc/app-infrastructure/services/native-bridge';\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type { ButtonAsyncSignature } from './async';\n\nexport type NativeButtonType = Omit<BridgeButton, 'type'> & {\n componentId: string;\n type: BridgeButton['type'] | '';\n};\n\n/**\n * Publishes the native button if the functionality is available.\n */\nfunction publishNativeButton(this: NativeButton): void {\n if (!this.isRenderedNative) {\n return;\n }\n\n // Get button's properties.\n const { text, disabled, icon, responsiveText, nativeType, updateNativeToolbarButtons, buttonAction } = this.args;\n\n if (disabled || !buttonAction) {\n disposeNativeButton.call(this);\n return;\n }\n\n assert('updateNativeToolbarButtons action not defined on NativeButtons component.', updateNativeToolbarButtons);\n\n // Publish button.\n updateNativeToolbarButtons([\n {\n componentId: this.elementId,\n // For text always use responsive text; if this is an add button then use \"Add\" text over text property.\n text: responsiveText || (nativeType == 'add' ? this.intl.t('@adc/ui-components.add') : text),\n icon,\n type: nativeType || '',\n isPromisePending: this.isPending,\n // We are just clicking the button because that will emulate how the whole button behaves.\n // This provides consistent behavior between web and native.\n action: () => {\n (document.querySelector(`button[id=\"${this.elementId}\"]`) as HTMLElement).click();\n }\n }\n ]);\n}\n\n/**\n * Disposes this button from the native button collection.\n */\nfunction disposeNativeButton(this: NativeButton): void {\n if (!this.isRenderedNative) {\n return;\n }\n const disposeNativeButtons = this.args.disposeNativeButtons;\n\n assert('disposeNativeButtons action not defined on NativeButton component', disposeNativeButtons);\n\n disposeNativeButtons([this.elementId]);\n}\n\nexport interface ButtonNativeSignature {\n Element: ButtonAsyncSignature['Element'];\n Args: Omit<ButtonAsyncSignature['Args'], 'buttonAction' | 'type' | 'updateAsyncState' | 'text'> & {\n /** Required text to appear in the button. */\n text: string;\n /** Optional ID for the button element. */\n id?: string;\n /** Indicates the button should be disabled. */\n disabled?: boolean;\n /** The type of native button */\n nativeType?: BridgeButton['type'];\n /** A function called when the button is clicked. */\n buttonAction: (...params: any[] | never[]) => void | any | Promise<any>;\n /** Called to dispose of mobile app native buttons. */\n disposeNativeButtons?: (buttons: string[]) => void;\n /** Called to update mobile app native buttons. */\n updateNativeToolbarButtons?: (buttons: NativeButtonType[]) => void;\n };\n Blocks: ButtonAsyncSignature['Blocks'];\n}\n\n/**\n * Button that will be displayed as native button if the native bridge supports it.\n */\nexport default class NativeButton extends Component<ButtonNativeSignature> {\n @service declare nativeBridge: NativeBridgeService;\n @service declare intl: ADCIntlService;\n\n @tracked asyncState = EnumAsyncState.idle;\n\n @equal('asyncState', EnumAsyncState.pending)\n declare isPending: boolean;\n\n /**\n * Is the button actually rendered natively?\n */\n @alias('nativeBridge.doesSupportToolbarButtons')\n declare isRenderedNative: boolean;\n\n @computed('args.id')\n get elementId(): string {\n return this.args.id ?? guidFor(this);\n }\n\n /** @override */\n @computed('args.noDelay', 'isRenderedNative')\n get noDelay(): boolean {\n // If button is not rendered native just default to base, otherwise make sure there is no delay.\n //Not sure if this is correct\n return !!(this.isRenderedNative || this.args.noDelay);\n }\n\n /**\n * Triggered when any of the properties changes that would change a native button.\n */\n @action propertiesChanged(): void {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n once<NativeButton, typeof publishNativeButton>(this, publishNativeButton);\n }\n\n /** @override */\n willDestroy(): void {\n disposeNativeButton.call(this);\n super.willDestroy();\n }\n\n @action updateAsyncState(value: EnumAsyncState): void {\n this.asyncState = value;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{#if @icon}}\\n <Button::Icon\\n class=\\\"selection-btn {{if @isSelected \\'selection-btn-selected\\'}}\\\"\\n @icon={{@icon}}\\n @iconOnly={{@iconOnly}}\\n @text={{@text}}\\n @responsiveText={{@responsiveText}}\\n @type={{@type}}\\n @buttonColor={{@buttonColor}}\\n @buttonStyle={{@buttonStyle}}\\n @buttonAction={{@buttonAction}}\\n ...attributes\\n >\\n {{yield}}\\n\\n {{#if @isSelected}}\\n <Button::AsyncButtonIcon @icon=\\\"success\\\" class=\\\"btn-selected-icon\\\" />\\n {{/if}}\\n </Button::Icon>\\n{{else}}\\n <Button::Simple\\n class=\\\"selection-btn {{if @isSelected \\'selection-btn-selected\\'}}\\\"\\n @responsiveText={{@responsiveText}}\\n @type={{@type}}\\n @buttonColor={{@buttonColor}}\\n @buttonStyle={{this.simpleButtonStyle}}\\n @buttonAction={{@buttonAction}}\\n ...attributes\\n >\\n {{#if @text}}\\n <span>\\n {{~@text~}}\\n </span>\\n {{else}}\\n {{~yield~}}\\n {{/if}}\\n\\n {{#if @isSelected}}\\n <Button::AsyncButtonIcon @icon=\\\"success\\\" class=\\\"btn-selected-icon\\\" />\\n {{/if}}\\n </Button::Simple>\\n{{/if}}\")","import Component from '@glimmer/component';\nimport { assert } from '@ember/debug';\nimport { getSimpleButtonStyle } from './simple.ts';\n\nimport type { ButtonIconSignature } from './icon';\nimport type { ButtonSimpleSignature } from './simple';\n\ntype ButtonSimpleSignatureArgs = ButtonSimpleSignature['Args'];\ntype ButtonIconSignatureArgs = ButtonIconSignature['Args'];\n\ninterface ButtonSelectedSimpleArgs extends ButtonSimpleSignatureArgs {\n /** Indicates the button should show it's selected state. */\n isSelected: boolean;\n icon?: undefined;\n iconOnly?: undefined;\n}\n\ninterface ButtonSelectedIconArgs extends ButtonIconSignatureArgs {\n /** Indicates the button should show it's selected state. */\n isSelected: boolean;\n}\n\nexport interface ButtonSelectedSignature {\n Element: ButtonSimpleSignature['Element'];\n Args: ButtonSelectedIconArgs | ButtonSelectedSimpleArgs;\n Blocks: {\n default: [];\n };\n}\n\nexport default class ButtonSelected extends Component<ButtonSelectedSignature> {\n constructor(owner: unknown, args: ButtonSelectedSignature['Args']) {\n super(owner, args);\n\n const fnTestArg = (type: string, value: string, src = '') => {\n assert(\n `[@adc/ui-components] The ${type} is not supported by the <Button::Selected /> component`,\n !src.split(' ').includes(value)\n );\n };\n\n fnTestArg('\"link\" @buttonStyle', 'link', this.args.buttonStyle);\n fnTestArg('\"stealth\" @buttonColor', 'stealth', this.args.buttonColor);\n }\n\n /**\n * Removes non-selected buttons styles.\n */\n get simpleButtonStyle(): ReturnType<typeof getSimpleButtonStyle> {\n return getSimpleButtonStyle(this.args.buttonStyle);\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<section\\n class=\\\"change-password\\\"\\n ...attributes\\n {{did-update (fn this.updateField \\\"newPassword\\\") @newPassword}}\\n {{did-update (fn this.updateField \\\"currentPassword\\\") @currentPassword}}\\n {{did-update (fn this.updateField \\\"passwordConfirmation\\\") @passwordConfirmation}}\\n>\\n {{#if @isCurrentPasswordRequired}}\\n <FormGroup @label={{t \\\"@adc/ui-components.currentPasswordLabel\\\"}} @formElementId=\\\"current-password-input-field\\\">\\n <PasswordInput\\n id=\\\"current-password-input-field\\\"\\n @value={{this.currentPassword}}\\n @value-change={{@onCurrentPasswordChange}}\\n @errorMessage={{@currentPasswordError}}\\n data-test-password-input=\\\"current\\\"\\n />\\n </FormGroup>\\n {{/if}}\\n\\n <FormGroup @label={{t \\\"@adc/ui-components.newPasswordLabel\\\"}} @formElementId=\\\"new-password-input-field\\\">\\n <PasswordInput\\n id=\\\"new-password-input-field\\\"\\n @value={{this.newPassword}}\\n @value-change={{this.updateNewPassword}}\\n @errorMessage={{@newPasswordError}}\\n data-test-password-input=\\\"new\\\"\\n />\\n </FormGroup>\\n\\n <FormGroup @label={{t \\\"@adc/ui-components.confirmPasswordLabel\\\"}} @formElementId=\\\"confirm-password-input-field\\\">\\n <PasswordInput\\n id=\\\"confirm-password-input-field\\\"\\n @value={{this.passwordConfirmation}}\\n @errorMessage={{unless\\n (is-pending @passwordStrengthData)\\n this.passwordConfirmationError\\n this.internalPasswordError\\n }}\\n @value-change={{this.updateConfirmPassword}}\\n data-test-password-input=\\\"confirmation\\\"\\n data-test-password-input-error={{this.passwordConfirmationError}}\\n @showErrorIcon={{@showErrorIcon}}\\n />\\n </FormGroup>\\n\\n <section class=\\\"password-requirements\\\">\\n <label class=\\\"strength-indicator\\\">\\n <span class=\\\"label\\\">\\n {{t \\\"@adc/ui-components.passwordStrengthLabel\\\"}}:\\n </span>\\n <span class=\\\"text\\\">\\n {{#if (is-pending @passwordStrengthData)}}\\n <SpinnerSvg @spinning={{true}} class=\\\"password-strength-spinner\\\" />\\n {{else}}\\n <span\\n class={{await this.passwordStrengthKey}}\\n data-test-password-strength={{await this.passwordStrengthKey}}\\n >\\n {{await this.passwordStrengthTranslated}}\\n </span>\\n {{/if}}\\n </span>\\n </label>\\n\\n <div class=\\\"strength-bar\\\">\\n {{#each (await this.strengthBarBoxes) as |strengthBar|}}\\n <div class={{strengthBar.class}}></div>\\n {{/each}}\\n </div>\\n\\n <details\\n class=\\\"suggestions-dropdown\\\"\\n {{on \\\"click\\\" (fn (mut this.isSuggestionsDropdownExpanded) (not this.isSuggestionsDropdownExpanded))}}\\n >\\n <summary aria-expanded={{this.isSuggestionsDropdownExpanded}}>\\n {{t \\\"@adc/ui-components.passwordTipsLabel\\\"}}\\n <SvgSymbol @icon=\\\"dropdown-arrow\\\" />\\n </summary>\\n\\n <AsyncLoader @promise={{@passwordStrengthData}} as |data|>\\n {{#let (if data.suggestions data.suggestions @mostCommonPasswordTips) as |tips|}}\\n {{#if tips}}\\n <ul class=\\\"suggestions\\\">\\n {{#each tips as |tip|}}\\n <li>{{tip}}</li>\\n {{/each}}\\n </ul>\\n {{/if}}\\n {{/let}}\\n </AsyncLoader>\\n </details>\\n\\n <label class=\\\"requirements-label\\\">\\n {{t \\\"@adc/ui-components.requirementLabel\\\"}}:\\n </label>\\n\\n {{! Disabling linting in this code block because screenreaders aren\\'t correctly interpreting list structure unless add explicit roles}}\\n {{! template-lint-disable no-redundant-role}}\\n <ul role=\\\"list\\\" class=\\\"requirements\\\">\\n {{#each this.requirements as |requirement|}}\\n {{! template-lint-disable no-redundant-role}}\\n <li role=\\\"listitem\\\" data-test-requirement={{requirement.key}}>\\n <SvgSymbol\\n @icon={{if requirement.isMet \\\"circle-check\\\" \\\"circle-x\\\"}}\\n @isHiddenForAccessibility={{false}}\\n />\\n <span>\\n {{t (concat \\\"@adc/ui-components.\\\" requirement.key) count=requirement.minimumCount}}\\n </span>\\n </li>\\n {{/each}}\\n </ul>\\n </section>\\n</section>\")","import Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { action, computed } from '@ember/object';\nimport { inject as service } from '@ember/service';\n\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type { PasswordInputSignature } from './password-input';\n\ntype PasswordInputSignatureArgs = PasswordInputSignature['Args'];\n\ntype PasswordStrengthData = {\n strength: number;\n suggestions: string[];\n};\n\nenum PasswordStrengthPrefixes {\n weak = 1,\n fair,\n good,\n strong\n}\n\nexport interface ChangePasswordSignature {\n Element: HTMLElement;\n Args: Pick<PasswordInputSignatureArgs, 'showErrorIcon'> & {\n /** Text to update the new password field. */\n newPassword?: string;\n /** The error tooltip text for the new password. */\n newPasswordError?: PasswordInputSignatureArgs['errorMessage'];\n /** Text to update the current password field. */\n currentPassword?: string;\n /** The error tooltip text for the current password. */\n currentPasswordError?: PasswordInputSignatureArgs['errorMessage'];\n /** The error tooltip text for the confirmation password. If not supplied, the default passwordConfirmationError message will be used. */\n confirmationPasswordError?: PasswordInputSignatureArgs['errorMessage'];\n /** Indicates the current password needs to be entered before changing it will be allowed. */\n isCurrentPasswordRequired?: boolean;\n /** The password confirmation text. */\n passwordConfirmation?: string;\n /** The required length of any new password. */\n requiredLength?: number;\n /** Number of numeric characters required for password. */\n numbersRequired: number;\n /** Number of special characters required for password. */\n symbolsRequired: number;\n /** Number of standard characters required for password. */\n lettersRequired: number;\n /** Data about password strength and suggestions. */\n passwordStrengthData?: Promise<PasswordStrengthData> | PasswordStrengthData;\n /** An array of strings that contain the default password tips that should be shown if no suggestions pertaining to the new password are available. */\n mostCommonPasswordTips?: string[];\n /** Triggered when user enters new password. */\n onChangeNewPassword: (val: string) => void;\n /** Triggered when user enters new password confirmation. */\n onChangePasswordConfirmation: (val: string) => void;\n /** An action defined by the consumer to retrieve the password strength for the server to be sent to the change password component. */\n getPasswordStrengthAction?: (val: string) => void;\n /** Triggered when users enters current password. */\n onCurrentPasswordChange: PasswordInputSignatureArgs['value-change'];\n };\n}\n\n/**\n * @classdesc\n * Component can be used for changing passwords.\n */\nexport default class ChangePassword extends Component<ChangePasswordSignature> {\n @service declare intl: ADCIntlService;\n\n /**\n * The value for the current password needed for change authorization.\n */\n @tracked _pwd = '';\n get currentPassword(): string {\n return this._pwd;\n }\n set currentPassword(v: string) {\n this._pwd = v;\n }\n\n /**\n * The value for the new password being saved.\n */\n @tracked _newPwd = '';\n get newPassword(): string {\n return this._newPwd;\n }\n set newPassword(v: string) {\n this._newPwd = v;\n }\n\n /**\n * The value for the confirming the new password being saved.\n */\n @tracked _pwdConf = '';\n get passwordConfirmation(): string {\n return this._pwdConf;\n }\n set passwordConfirmation(v: string) {\n this._pwdConf = v;\n }\n\n /**\n * Is used to keep track of the open state of the password suggestions\n * dropdown for the aria-expanded attribute.\n */\n @tracked\n isSuggestionsDropdownExpanded = false;\n\n /**\n * The number of characters total required for the password.\n */\n @computed('args.requiredLength')\n get requiredLength(): number {\n return this.args.requiredLength ?? 7;\n }\n\n /**\n * Error message shown over the password confirmation if it doesn't match the new password value.\n */\n get passwordConfirmationError(): string {\n const { newPassword, passwordConfirmation } = this,\n { confirmationPasswordError } = this.args;\n\n return (\n confirmationPasswordError ??\n (newPassword && passwordConfirmation && newPassword !== passwordConfirmation\n ? this.intl.t('@adc/ui-components.passwordConfirmationError')\n : this.internalPasswordError)\n );\n }\n\n /**\n * Set the internal password confirmation error tooltip\n */\n set passwordConfirmationError(error: string) {\n this.internalPasswordError = error;\n }\n\n /**\n * Internal password confirmation error tooltip\n */\n private internalPasswordError = '';\n\n /**\n * Returns a string indicating the password strength key.\n */\n @computed('passwordStrengthInt')\n get passwordStrengthKey(): Promise<string> {\n return (async () => {\n const passwordStrengthInt = await this.passwordStrengthInt;\n return passwordStrengthInt ? PasswordStrengthPrefixes[passwordStrengthInt] : 'empty';\n })();\n }\n\n /**\n * Returns the integer corresponding to how strong the\n * potential password is.\n */\n @computed('args.passwordStrengthData')\n get passwordStrengthInt(): Promise<number | undefined> {\n return (async () => {\n const passwordStrength = (await (this.args.passwordStrengthData ?? ({} as PasswordStrengthData))).strength;\n return isNaN(passwordStrength) ? undefined : passwordStrength;\n })();\n }\n\n /**\n * The key used to get the correct password strength for concat.\n */\n @computed('passwordStrengthKey', 'args.passwordStrengthData')\n get passwordStrengthTranslated(): Promise<string> {\n return (async () => {\n const key = await this.passwordStrengthKey;\n return key !== 'empty' ? this.intl.t(`@adc/ui-components.${key}PasswordStrengthText`) : '';\n })();\n }\n\n /**\n * Returns the visual password strength boxes class names to\n * use for each box depending on the strength level of the current\n * password attempting to be updated.\n */\n @computed('passwordStrengthInt')\n get strengthBarBoxes(): Promise<\n Array<{\n class: string;\n }>\n > {\n return (async () => {\n const strengthBoxes = [];\n const passwordStrengthInt = await this.passwordStrengthInt;\n\n for (let i = 0; i < 4; i++) {\n strengthBoxes.push({\n class:\n // Maps the password strength integer to the enum to figure out\n // which css class should be used to give the strength box's their\n // color (weak, fair, good or strong).\n i < (passwordStrengthInt ?? 0)\n ? `strength-bar-cell ${\n passwordStrengthInt ? PasswordStrengthPrefixes[passwordStrengthInt] : ''\n }`\n : 'strength-bar-cell'\n });\n }\n\n return strengthBoxes;\n })();\n }\n\n /**\n * Returns a list of current password requirements and whether the have been met or not.\n */\n get requirements(): {\n key: string;\n isMet: boolean;\n minimumCount: number;\n }[] {\n const password = this.newPassword || '';\n const numberMatches = password.match(/\\d/g);\n const symbolMatches = password.match(/[-!@#$%^&*()_+|~=`{}[\\]:\";'<>?,.\\\\/]/g);\n const letterMatches = password.match(/[a-zA-Z]/g);\n\n return [\n ['numbersRequired', (numberMatches ?? []).length, this.args.numbersRequired],\n ['symbolsRequired', (symbolMatches ?? []).length, this.args.symbolsRequired],\n ['lettersRequired', (letterMatches ?? []).length, this.args.lettersRequired],\n ['requiredLength', password.length, this.requiredLength]\n ]\n .map(([key, lengthCriteria, minimumCount]) => ({\n key: String(key),\n isMet: lengthCriteria >= minimumCount,\n minimumCount: Number(minimumCount)\n }))\n .filter((requirement) => requirement.minimumCount > 0);\n }\n\n /**\n * Uses the getPasswordStrengthAction passed by the consumer of the component to determine the strength of the new password value.\n */\n @action updateNewPassword(passwordValue: string): void {\n this.newPassword = passwordValue;\n this.args.onChangeNewPassword(passwordValue);\n\n if (this.args.getPasswordStrengthAction) {\n this.args.getPasswordStrengthAction(passwordValue);\n }\n }\n\n /**\n * Updates the local and consumer's passwordConfirmation\n */\n @action updateConfirmPassword(passwordValue: string): void {\n this.passwordConfirmation = passwordValue;\n this.args.onChangePasswordConfirmation(passwordValue);\n }\n\n /**\n * Update a given password field value\n */\n @action updateField(fieldKey: 'newPassword' | 'currentPassword' | 'passwordConfirmation'): void {\n this[fieldKey] = this.args[fieldKey] ?? '';\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div class=\\\"all-none-container\\\">\\n <button type=\\\"button\\\" data-id=\\\"all-{{@index}}\\\" {{on \\\"click\\\" @selectAll}}>\\n {{t \\\"@adc/ui-components.all\\\"}}\\n </button>\\n <p class=\\\"divider\\\"></p>\\n <button type=\\\"button\\\" data-id=\\\"none-{{@index}}\\\" {{on \\\"click\\\" @selectNone}}>\\n {{t \\\"@adc/ui-components.none\\\"}}\\n </button>\\n</div>\")","import templateOnlyComponent from '@ember/component/template-only';\n\nexport interface CheckboxTreeAllNoneSelectorSignature {\n Element: HTMLDivElement;\n Args: {\n /** Unique identifier passed to the `data-id` attribute. */\n index: number | string;\n /** Triggered when user selected \"All\". */\n selectAll: (evt: Event) => unknown;\n /** Triggered when user selected \"None\". */\n selectNone: (evt: Event) => unknown;\n };\n}\nconst CheckboxTreeAllNoneSelector = templateOnlyComponent<CheckboxTreeAllNoneSelectorSignature>();\nexport default CheckboxTreeAllNoneSelector;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div class=\\\"icon-circle\\\" ...attributes>\\n <div\\n class=\\\"icon {{this.animationCSS}}\\\"\\n style={{this.iconStyle}}\\n data-icon-id={{@iconId}}\\n aria-hidden={{@isHiddenForAccessibility}}\\n title={{@title}}\\n >\\n <svg class=\\\"circular\\\" height=\\\"100%\\\" width=\\\"100%\\\" viewBox=\\\"0 0 100 100\\\" focusable=\\\"false\\\">\\n <circle\\n class=\\\"path\\\"\\n cx=\\\"50\\\"\\n cy=\\\"50\\\"\\n r=\\\"48\\\"\\n fill=\\\"none\\\"\\n stroke-miterlimit=\\\"10\\\"\\n vector-effect=\\\"non-scaling-stroke\\\"\\n ></circle>\\n </svg>\\n {{#if @iconName}}\\n <SvgSymbol\\n @icon={{@iconName}}\\n @title={{coalesce @iconTitle @title}}\\n @isHiddenForAccessibility={{@isHiddenForAccessibility}}\\n role={{@role}}\\n class=\\\"icon-svg\\\"\\n />\\n {{/if}}\\n {{yield}}\\n </div>\\n</div>\")","import Component from '@glimmer/component';\nimport { computed } from '@ember/object';\nimport { htmlSafe } from '@ember/template';\nimport { isEmpty } from '@ember/utils';\nimport { NONE, getAnimationCSS } from '../utils/animations.ts';\n\nimport type { SENDING, WAITING, COMPLETE } from '../utils/animations.ts';\n\nexport interface CircleIconSignature {\n Element: HTMLDivElement;\n Args: {\n /** Icon size factor. */\n iconSize?: number;\n /** The current animation state. */\n animationState?: typeof NONE | typeof SENDING | typeof WAITING | typeof COMPLETE;\n /** Optional tooltip title for this icon. */\n title?: string | ReturnType<typeof htmlSafe>;\n /** Should the element be hidden for screen readers? */\n isHiddenForAccessibility?: boolean;\n /** Optional data ID for this icon. */\n iconId?: string;\n /** Name of the inline-svg icon to render. */\n iconName?: string;\n /** Icon title. */\n iconTitle?: string;\n /** The role of the icon. */\n role?: string;\n };\n Blocks: {\n default: [];\n };\n}\n\nexport default class CircleIcon extends Component<CircleIconSignature> {\n /**\n * Returns the computed style for the icon.\n */\n @computed('args.iconSize')\n get iconStyle(): ReturnType<typeof htmlSafe> {\n const { iconSize } = this.args;\n return htmlSafe(isEmpty(iconSize) ? '' : `height:${iconSize}em;width:${iconSize}em;`);\n }\n\n /**\n * The animation CSS class to show.\n */\n @computed('args.animationState')\n get animationCSS(): ReturnType<typeof getAnimationCSS> {\n return getAnimationCSS(this.args.animationState ?? NONE);\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'Icons::Circles::CircleIcon': typeof CircleIcon;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div\\n class=\\\"ui-date-range-picker\\\"\\n id={{guid-for this}}\\n {{did-insert this.configurePicker}}\\n {{did-update this.configurePicker @startDate}}\\n {{did-update this.configurePicker @endDate}}\\n {{did-update this.configurePicker @timeZone}}\\n>\\n <Button::Icon\\n @icon=\\\"date\\\"\\n @text={{this.displayText}}\\n class=\\\"btn-summary\\\"\\n ...attributes\\n {{on \\\"click\\\" this.togglePicker}}\\n />\\n\\n <PopoverMenu\\n @anchorSelector=\\\"#{{guid-for this}} .btn-summary\\\"\\n @isOpen={{this.isOpen}}\\n @isFocusable={{true}}\\n @popoverClass=\\\"ui-date-range-popup\\\"\\n @on-backdrop-click={{this.togglePicker}}\\n @closeOnBackdropClick={{false}}\\n >\\n {{yield}}\\n <SimpleBinary::List @type=\\\"radio\\\" @items={{this.options}} @onchange={{this.switchType}}>\\n <:content as |item|>\\n <SmartDateRange\\n @showMultiDayRange={{item.props.isRange}}\\n @startDate={{if item.props.isRange this.startRange this.startSingle}}\\n @endDate={{if item.props.isRange this.endRange this.endSingle}}\\n @minDate={{@minDate}}\\n @maxDate={{@maxDate}}\\n @showSeconds={{@showSeconds}}\\n @timeZone={{@timeZone}}\\n @onchange={{this.changeTimeValues}}\\n id=\\\"{{guid-for this}}_{{if item.props.isRange \\'range\\' \\'single\\'}}\\\"\\n />\\n </:content>\\n </SimpleBinary::List>\\n\\n <div class=\\\"button-bar\\\">\\n <Button::Simple @text={{t \\\"@adc/ui-components.cancel\\\"}} {{on \\\"click\\\" this.cancelPicker}} />\\n <Button::Simple\\n @text={{t \\\"@adc/ui-components.apply\\\"}}\\n @buttonColor=\\\"primary\\\"\\n disabled={{if this.invalidDateRange true}}\\n {{on \\\"click\\\" this.selectRange}}\\n />\\n </div>\\n </PopoverMenu>\\n</div>\")","import { tracked } from '@glimmer/tracking';\nimport { A } from '@ember/array';\nimport { action, computed, setProperties } from '@ember/object';\nimport { equal } from '@ember/object/computed';\nimport { guidFor } from '@ember/object/internals';\nimport { inject as service } from '@ember/service';\nimport { intlPath } from '@adc/i18n/path';\nimport endOfDay from 'date-fns/endOfDay';\nimport isEqual from 'date-fns/isEqual';\nimport isSameDay from 'date-fns/isSameDay';\nimport max from 'date-fns/max';\nimport min from 'date-fns/min';\nimport startOfDay from 'date-fns/startOfDay';\nimport subMinutes from 'date-fns/subMinutes';\nimport BaseTimezoneControl from './base-timezone-control.ts';\nimport { VALUE_CHANGE_ACTION } from './common/base-input.js';\nimport { BinaryListItem } from './simple-binary/list.ts';\n\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type { BaseTimezoneControlSignature } from './base-timezone-control';\nimport type { ButtonIconSignature } from './button/icon';\nimport type { DateChangePayload } from './smart-date-range';\n\nconst DATE_SINGLE = 'single',\n DATE_RANGE = 'range';\n\ntype DatePropName = 'startSingle' | 'endSingle' | 'startRange' | 'endRange';\n\nexport interface DateRangePickerComponentSignature extends BaseTimezoneControlSignature {\n Element: ButtonIconSignature['Element'];\n Args: BaseTimezoneControlSignature['Args'] & {\n /** The range start date. */\n startDate: Date;\n /** The range end date. */\n endDate: Date;\n /** Triggered when the user changes the date range. */\n 'value-change': (dates: DateChangePayload) => void;\n /** Optional minimum date range value. */\n minDate?: Date;\n /** Optional maximum date range value. */\n maxDate?: Date;\n /** Indicates we should show seconds in the date range time pickers. */\n showSeconds?: boolean;\n /** Called to validate selected dates, disabled the \"Apply\" button when it returns `false`. */\n validationFn?: (startDate: Date, endDate: Date) => boolean;\n /** Date formatting options for the button text. */\n formats?: {\n date?: Intl.DateTimeFormatOptions;\n time?: Intl.DateTimeFormatOptions;\n };\n };\n Blocks: {\n default: [];\n };\n}\n\n/**\n * Returns the currently selected dates (single or range).\n *\n * @private\n */\nfunction getSelectedDates(this: DateRangePickerComponent): DateChangePayload {\n const type = this.isRangeSelected ? 'Range' : 'Single',\n [startDate, endDate] = ['start', 'end'].map((p) => this[`${p}${type}` as DatePropName]);\n\n return { startDate, endDate };\n}\n\ntype OptionItemProps = {\n id: string;\n isRange: boolean;\n};\n\n/**\n * @classdesc\n * A button, that when clicked, opens a popup with options for choosing a date/time range.\n */\n@intlPath({ module: '@adc/ui-components', path: 'date-range-picker' })\nexport default class DateRangePickerComponent extends BaseTimezoneControl<DateRangePickerComponentSignature> {\n @service declare intl: ADCIntlService;\n\n // region Component state.\n\n /**\n * Indicates the date range picker popup is open.\n */\n @tracked isOpen = false;\n\n /**\n * The internal value used to track the start date for a single day range.\n */\n @tracked startSingle = new Date();\n\n /**\n * The internal value used to track the end date for a single day range.\n */\n @tracked endSingle = new Date();\n\n /**\n * The internal value used to track the start date for a multi-day range.\n */\n @tracked startRange = new Date();\n\n /**\n * The internal value used to track the end date for a multi-day range.\n */\n @tracked endRange = new Date();\n\n /**\n * The currently select range type, single day or multi-day.\n */\n @tracked selectedType = DATE_RANGE;\n\n /**\n * Indicates a multi-day range is currently selected.\n */\n @equal('selectedType', DATE_RANGE)\n declare isRangeSelected: boolean;\n\n /**\n * The computed time format.\n */\n get timeFormat(): Intl.DateTimeFormatOptions {\n let { time } = this.args.formats ?? {};\n if (time) {\n return {\n ...time\n };\n }\n\n time = {\n hour: 'numeric',\n minute: '2-digit'\n };\n\n if (this.args.showSeconds) {\n time.second = '2-digit';\n }\n\n return time;\n }\n\n /**\n * The computed date range string.\n */\n get displayText(): string {\n const { args, zone } = this,\n dates = [args.startDate, args.endDate],\n fnFormat = (dates: Date[], options: Partial<Intl.DateTimeFormatOptions>): string[] => {\n if (zone) {\n options.timeZone = zone;\n }\n\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line @adc/ember/require-tz-functions\n return dates.map((d) => this.intl.formatDate(d, options));\n },\n [startDate, endDate] = fnFormat(dates, {\n ...(args.formats?.date ?? {\n day: 'numeric',\n month: 'numeric',\n year: 'numeric'\n })\n }),\n [startTime, endTime] = fnFormat(dates, this.timeFormat);\n\n // Is this a single date range?\n if (startDate === endDate) {\n return `${startDate}, ${startTime} - ${endTime}`;\n }\n\n return `${startDate} ${startTime} - ${endDate} ${endTime}`;\n }\n\n /**\n * The date range options to show (single versus multi).\n */\n @computed('selectedType')\n get options(): BinaryListItem<OptionItemProps>[] {\n return [DATE_SINGLE, DATE_RANGE].map(\n (id) =>\n new BinaryListItem<OptionItemProps>({\n label: this.intl.tc(this, id === DATE_RANGE ? 'selectDateRange' : 'selectDate'),\n state: id === this.selectedType,\n props: {\n id,\n isRange: id === DATE_RANGE\n }\n })\n );\n }\n\n /**\n * Indicates the currently selected date range is invalid.\n */\n @computed('startSingle', 'endSingle', 'startRange', 'endRange', 'selectedType', 'args.validationFn')\n get invalidDateRange(): boolean {\n const { validationFn } = this.args,\n { startDate, endDate } = getSelectedDates.call(this);\n\n return !!(startDate > endDate || (validationFn && !validationFn(startDate, endDate)));\n }\n\n // endregion\n\n // region Actions\n\n /**\n * Updates the internal picker date values for the passed start and end date.\n */\n @action configurePicker(): void {\n const seed = new Date(),\n { endDate = new Date(seed), startDate = subMinutes(seed, 1000), minDate, maxDate } = this.args,\n props = {} as Pick<Pick<this, keyof this>, keyof this>,\n fnAddDate = (name: DatePropName, value: Date): void => {\n if (!isEqual(value, this[name])) {\n props[name] = new Date(value);\n }\n };\n\n if (isSameDay(this.getZonedDate(startDate), this.getZonedDate(endDate))) {\n props.selectedType = DATE_SINGLE;\n\n fnAddDate('startSingle', startDate);\n fnAddDate('endSingle', endDate);\n } else {\n props.selectedType = DATE_RANGE;\n\n // Calculate start and end of today (or nearest day within range) for unselected single day range.\n const fn = (v: Date, fn: (datesArray: (Date | number)[]) => Date, c?: Date): Date => (c ? fn([v, c]) : v),\n singleDate = fn(fn(seed, min, maxDate), max, minDate),\n startSingle = this.getUtcDateFromZone(startOfDay(this.getZonedDate(singleDate))),\n endSingle = this.getUtcDateFromZone(endOfDay(this.getZonedDate(singleDate)));\n\n fnAddDate('startSingle', minDate ? max([minDate, startSingle]) : startSingle);\n fnAddDate('endSingle', maxDate ? min([endSingle, maxDate]) : endSingle);\n }\n\n fnAddDate('startRange', startDate);\n fnAddDate('endRange', endDate);\n\n setProperties(this, props);\n }\n\n /**\n * Change the currently selected range type.\n */\n @action switchType(items: DateRangePickerComponent['options']): void {\n this.selectedType = A(items).findBy('state')?.props.id === DATE_RANGE ? DATE_RANGE : DATE_SINGLE;\n }\n\n /**\n * Toggles the date range picker popup opened or closed.\n */\n @action togglePicker(): void {\n this.isOpen = !this.isOpen;\n }\n\n /**\n * Cancels any changes and closes picker.\n */\n @action cancelPicker(): void {\n this.togglePicker();\n this.configurePicker();\n }\n\n /**\n * Called when one set of date range values has changed.\n *\n * @param dates An object with the date value(s) that have changed.\n * @param isRange Indicates if the selection was made from a date range selector, or the single day selector.\n */\n @action changeTimeValues(dates: Partial<DateChangePayload>, isRange: boolean): void {\n setProperties(\n this,\n Object.keys(dates).reduce(\n (props, key) => ({\n ...props,\n [key.replace('Date', isRange ? 'Range' : 'Single')]: dates[key]\n }),\n {\n // Add selected type in case it changed via user date/time change.\n selectedType: isRange ? DATE_RANGE : DATE_SINGLE\n }\n )\n );\n }\n\n /**\n * Validates days for selected range and then notifies consumer of newly selected date range.\n */\n @action selectRange(): void {\n // Grab form for currently selected range type.\n const form = document.querySelector(\n `#${guidFor(this)}_${this.isRangeSelected ? 'range' : 'single'}`\n ) as HTMLFormElement;\n\n // Are form inputs valid?\n if (form.reportValidity()) {\n // Close picker.\n this.togglePicker();\n\n // Get new start and end dates, and notify consumers.\n this.args[VALUE_CHANGE_ACTION](getSelectedDates.call(this));\n }\n }\n\n // endregion\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<button\\n type=\\\"button\\\"\\n aria-live=\\\"polite\\\"\\n class=\\\"drill-through-item {{if this.borderBottom \\'border-bottom\\'}}\\\"\\n {{on \\\"click\\\" (coalesce @on-click (noop))}}\\n ...attributes\\n>\\n <div class=\\\"content adc-text\\\">\\n {{#if @title}}\\n {{#if @icon}}\\n <SvgSymbol\\n @icon={{@icon}}\\n @title={{@iconTitle}}\\n @desc={{@iconDesc}}\\n @isHiddenForAccessibility={{@iconIsHiddenForAccessibility}}\\n class=\\\"item-icon\\\"\\n />\\n {{/if}}\\n\\n <div class=\\\"center-region\\\">\\n {{#if @title}}\\n <header>{{@title}}</header>\\n {{/if}}\\n {{#if @subdescription}}\\n <p class=\\\"sub-description adc-text-secondary\\\" dir={{if this.forceLtrForSubDescription \\\"ltr\\\"}}>\\n {{@subdescription}}\\n </p>\\n {{/if}}\\n </div>\\n\\n {{#if @descriptionRight}}\\n <p class=\\\"description-right\\\">{{@descriptionRight}}</p>\\n {{/if}}\\n {{else}}\\n {{yield to=\\\"content\\\"}}\\n {{/if}}\\n\\n {{#unless @hideDrillIcon}}\\n <SvgSymbol\\n @icon={{coalesce @drillIcon \\\"chevron-right\\\"}}\\n @title={{t \\\"@adc/ui-components.viewMore\\\"}}\\n class=\\\"drill-icon\\\"\\n />\\n {{/unless}}\\n </div>\\n\\n {{#if (has-block \\\"footer\\\")}}\\n <div class=\\\"footer\\\">\\n {{yield to=\\\"footer\\\"}}\\n </div>\\n {{/if}}\\n</button>\")","import Component from '@glimmer/component';\n\nexport interface DrillThroughItemSignature {\n Element: HTMLButtonElement;\n Args: {\n /** Optional icon rendered in left of title. */\n icon?: string;\n /** Optional icon rendered in right of title (defaults to \"chevron-right\"). */\n drillIcon?: string;\n /** Hide optional drill icon on the right of title (defaults to false). */\n hideDrillIcon?: boolean;\n /** Optional title icon title. */\n iconTitle?: string;\n /** Optional title icon description. */\n iconDesc?: string;\n /** Indicates the title icon is hidden from a11y. */\n iconIsHiddenForAccessibility?: boolean;\n /*** Optional title text. */\n title?: string;\n /** Optional sub description rendered below title. */\n subdescription?: string;\n /** The item description to be rendered on the right, close to the drill icon. */\n descriptionRight?: string;\n /** Indicates this item should have a light gray border at the bottom. */\n borderBottom?: boolean;\n /** Triggered when the user interacts with the drill button. */\n 'on-click'?: () => any;\n };\n Blocks: {\n /** The main content of the drill through component, but ignored if the `@title` was supplied. */\n content: [];\n /** The footer of the drill through component. */\n footer: [];\n };\n}\n\n/**\n * @classdesc\n * This is a contextual component with two different sections: content and footer. It helps arrange the content according to the \"drill through\" design requirements.\n */\nexport default class DrillThroughItem extends Component<DrillThroughItemSignature> {\n /**\n * Should the component render a light gray border at the bottom?\n */\n get borderBottom(): boolean {\n return this.args.borderBottom ?? true;\n }\n\n /**\n * Returns True if we should force ltr direction for subdescription. The criteria is that the content is a phone number.\n */\n get forceLtrForSubDescription(): boolean {\n return /^[-()+ .]?(?:[0-9]+[-()+ .]+)+[0-9]+$/.test(this.args.subdescription ?? '');\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{#if (media \\\"isMobile\\\")}}\\n <@dropdownWrapper.popover.header\\n @title={{unless (has-block) (coalesce @title \\\"\\\")}}\\n class=\\\"responsive-header clickable {{unless @title \\'without-title\\'}}\\\"\\n >\\n {{#if (has-block)}}\\n <div class=\\\"content\\\">\\n {{yield}}\\n </div>\\n {{/if}}\\n\\n <Button::Icon\\n @icon={{if @icon @icon \\\"close\\\"}}\\n @text={{coalesce @iconTitle (t \\\"@adc/ui-components.close\\\")}}\\n @iconOnly={{true}}\\n @buttonColor=\\\"stealth\\\"\\n @buttonAction={{coalesce @on-click (noop)}}\\n />\\n </@dropdownWrapper.popover.header>\\n{{/if}}\")","import templateOnlyComponent from '@ember/component/template-only';\n\nexport interface DropdownActionsResponsiveHeaderSignature {\n Args: {\n /** The default yield from the popover menu (header, body, footer). */\n dropdownWrapper: any;\n /** The popover menu header text. */\n title?: string;\n /** Triggers when the popover header is clicked. */\n 'on-click': VoidFunction;\n /** The icon to show in popover header (defaults to \"close\"). */\n icon?: string;\n /** The icon title. */\n iconTitle?: string;\n /** The icon description. */\n iconDesc?: string;\n /** Indicates the icon is hidden for a11y purposes. */\n iconIsHiddenForAccessibility?: boolean;\n };\n Blocks: {\n default: [];\n };\n}\n\nconst DropdownActionsResponsiveHeader = templateOnlyComponent<DropdownActionsResponsiveHeaderSignature>();\nexport default DropdownActionsResponsiveHeader;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<li\\n class=\\\"list-item-flex-wrap\\n {{if @item.disabled \\'disabled\\'}}\\n {{if @item.action \\'action\\'}}\\n {{if @item.selected \\'selected\\'}}\\\"\\n ...attributes\\n>\\n <a\\n href=\\\"javascript:void(0)\\\"\\n aria-disabled={{if @item.disabled \\\"true\\\"}}\\n tabindex={{if @item.disabled -1 0}}\\n class={{@item.className}}\\n aria-label=\\\"{{@item.name}} {{@item.description}}\\\"\\n data-index={{@index}}\\n {{on \\\"click\\\" (fn @on-item-click @item)}}\\n {{on \\\"keyup\\\" (fn this.onKeyUp @item)}}\\n >\\n\\n {{#if @item.icon}}\\n <SvgSymbol @icon={{@item.icon}} @title={{@item.iconTitle}} @desc={{@item.iconDesc}} />\\n {{/if}}\\n <span class=\\\"name fs-unmask\\\" title={{@item.tooltipText}}>{{@item.name}}</span>\\n {{#if @item.description}}\\n <span class=\\\"description\\\">{{@item.description}}</span>\\n {{/if}}\\n </a>\\n</li>\")","import Component from '@glimmer/component';\nimport { isEnterOrSpaceCode } from '@adc/ember-utils/utils/a11y';\nimport { action } from '@ember/object';\n\nimport type DropdownActionItem from '../../utils/dropdown-action-item.ts';\n\nexport interface DropdownActionsListItemSignature {\n Element: HTMLLIElement;\n Args: {\n /** The drop down action to render. */\n item: DropdownActionItem;\n /** Triggered when the action item is clicked. */\n 'on-item-click': (item: DropdownActionItem) => void;\n /** The index of this item. */\n index: number;\n };\n}\n\n/**\n * @classdesc\n * A list item component to be used inside an items list.\n */\nexport default class ListItemComponent extends Component<DropdownActionsListItemSignature> {\n /**\n * Executes action on 'enter' or 'space'.\n */\n @action onKeyUp(item: DropdownActionItem, e: KeyboardEvent): void {\n if (isEnterOrSpaceCode(e.code)) {\n e.preventDefault();\n\n this.args['on-item-click'](item);\n }\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<ul class=\\\"items-list\\\" ...attributes>\\n {{#each @items as |item index|}}\\n <DropdownActions::ListItem @item={{item}} @index={{index}} @on-item-click={{@on-item-click}} />\\n {{/each}}\\n</ul>\")","import templateOnlyComponent from '@ember/component/template-only';\n\nimport type DropdownActionItem from '../../utils/dropdown-action-item.ts';\nimport type { DropdownActionsListItemSignature } from './list-item';\n\nexport interface DropdownActionsItemsListSignature {\n Element: HTMLUListElement;\n Args: Pick<DropdownActionsListItemSignature['Args'], 'on-item-click'> & {\n /** The drop down action items to render. */\n items: DropdownActionItem[] | null;\n };\n}\n\nconst ItemsListComponent = templateOnlyComponent<DropdownActionsItemsListSignature>();\nexport default ItemsListComponent;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div\\n class=\\\"dropdown-actions\\\"\\n ...attributes\\n {{did-insert this.initializeItems}}\\n {{did-update this.initializeItems @items}}\\n {{will-destroy this.clearTriggerListener}}\\n>\\n <div class=\\\"dropdown-trigger wrapper remote\\\">\\n {{#if (and this.isLoading @replaceTriggerWithLoadingSpinner)}}\\n <SpinnerSvg @spinning={{true}} @size=\\\"small\\\" class=\\\"trigger-spinner\\\" />\\n {{else}}\\n {{yield this.trigger}}\\n {{/if}}\\n </div>\\n\\n <BaseDropdown::Wrapper\\n @isLoading={{this.isLoading}}\\n @isOpen={{this.isOpen}}\\n @triggerId={{this.triggerId}}\\n @popoverPlacement={{coalesce @placement \\\"bottom\\\"}}\\n @popoverClass=\\\"dropdown-actions {{coalesce @dropdownActionsClass \\'\\'}}\\\"\\n @popoverMinWidth={{@minWidth}}\\n @popoverMaxWidth={{@maxWidth}}\\n @popoverIsFocusable={{true}}\\n @fullScreenOnMobile={{false}}\\n @matchTriggerElementWidth={{@matchTriggerElementWidth}}\\n @on-dropdown-close={{coalesce @on-dropdown-close (noop)}}\\n as |dropdownWrapper|\\n >\\n {{#if @title}}\\n <DropdownActions::ResponsiveHeader\\n @title={{@title}}\\n @dropdownWrapper={{dropdownWrapper}}\\n @on-click={{this.toggleDropdown}}\\n />\\n {{else}}\\n {{yield\\n (component\\n \\\"dropdown-actions/responsive-header\\\" dropdownWrapper=dropdownWrapper on-click=this.toggleDropdown\\n )\\n to=\\\"responsive-header\\\"\\n }}\\n {{/if}}\\n\\n <DropdownActions::ItemsList @items={{this.itemsInternal}} @on-item-click={{this.itemClicked.perform}} />\\n </BaseDropdown::Wrapper>\\n</div>\")","import Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { addWeakListener, removeListener } from '@adc/ember-utils/utils/event-listeners';\nimport { isPromise } from '@adc/ember-utils/utils/rsvp';\nimport { action } from '@ember/object';\nimport { or } from '@ember/object/computed';\nimport { guidFor } from '@ember/object/internals';\nimport { once } from '@ember/runloop';\nimport { task } from 'ember-concurrency';\nimport { modifier } from 'ember-modifier';\nimport DropdownActionItem from '../utils/dropdown-action-item.js';\n\nimport type { ComponentLike, WithBoundArgs } from '@glint/template';\nimport type { Task } from 'ember-concurrency';\nimport type { BaseDropDownWrapperSignature } from './base-dropdown/wrapper';\nimport type { DropdownActionsResponsiveHeaderSignature } from './dropdown-actions/responsive-header';\n\ntype BaseDropDownWrapperSignatureArgs = BaseDropDownWrapperSignature['Args'];\n\n/**\n * Turns the items array/promise into component internal items. If an items promise is received it activated the dropdown loading state until the items are resolved and saved internally.\n */\nfunction initializeInternalItems(this: DropdownActions): void {\n const { items = [] } = this.args;\n\n if (items) {\n // Is items not a promise?\n if (!isPromise(items)) {\n // No promise, so update immediately.\n return updateInternalItems.call(this, items);\n }\n\n this._isLoading = true;\n (items as Promise<DropdownActionItem[]>).then(updateInternalItems.bind(this));\n }\n}\n\n/**\n * Handles the internal items conversion and loading of the provided items. Makes sure items are instances of DropdownActionItem.\n */\nfunction updateInternalItems(this: DropdownActions, items: DropdownActionItem[]): void {\n // Make sure all items are Ember objects instances of DropdownActionItem\n const itemsInternal = items.map((item) => {\n if (item instanceof DropdownActionItem) {\n return item;\n }\n\n return DropdownActionItem.create(item);\n });\n\n this.itemsInternal = itemsInternal;\n this._isLoading = false;\n}\n\nexport interface DropdownActionsSignature {\n Element: HTMLDivElement;\n Args: Pick<BaseDropDownWrapperSignatureArgs, 'matchTriggerElementWidth' | 'on-dropdown-close'> &\n Pick<DropdownActionsResponsiveHeaderSignature['Args'], 'title'> & {\n /** The action items to render. */\n items?: DropdownActionItem[] | Promise<DropdownActionItem[]>;\n /** Called when the trigger is clicked, explicitly return false if the menu should not open. */\n validateOpen?: () => Promise<boolean> | boolean;\n /** Indicates we should show a spinner instead of the trigger. */\n replaceTriggerWithLoadingSpinner?: boolean;\n /** Indicates we should not close the popup when an item is selected. */\n keepOpenAfterItemTriggered?: boolean;\n /** Optional CSS class added to the popover element. */\n dropdownActionsClass?: BaseDropDownWrapperSignatureArgs['popoverClass'];\n /** The popper placement value. */\n placement?: BaseDropDownWrapperSignatureArgs['popoverPlacement'];\n /** The popover minimum width, in pixels. */\n minWidth?: BaseDropDownWrapperSignatureArgs['popoverMinWidth'];\n /** The popover max width, in pixels. */\n maxWidth?: BaseDropDownWrapperSignatureArgs['popoverMaxWidth'];\n };\n Blocks: {\n default: [DropdownActions['trigger']];\n 'responsive-header'?: [\n WithBoundArgs<ComponentLike<DropdownActionsResponsiveHeaderSignature>, 'dropdownWrapper' | 'on-click'>\n ];\n };\n}\n\n/**\n * @classdesc\n * Displays dropdown list of \"action items\" that can be clicked to trigger specified actions.\n */\nexport default class DropdownActions extends Component<DropdownActionsSignature> {\n listenerId?: string;\n\n /**\n * Indicates whether or not the dropdown is open.\n */\n @tracked declare _isOpen: boolean;\n set isOpen(v: boolean) {\n this._isOpen = v;\n }\n get isOpen(): boolean {\n return this._isOpen ?? false;\n }\n\n /**\n * Used internally to indicate that the dropdown items can't be shown at the moment but they are getting prepared. If true, the\n * dropdown shows a temporary loading spinner.\n */\n @tracked _isLoading = false;\n\n @or('_isLoading', 'itemClicked.isRunning')\n declare isLoading: boolean;\n\n /**\n * Array that holds the resolved items to be rendered in the dropdown body.\n */\n @tracked _itemsInternal: DropdownActionItem[] | null = null;\n set itemsInternal(v: DropdownActionItem[] | null) {\n this._itemsInternal = v;\n }\n get itemsInternal(): DropdownActionItem[] | null {\n return this._itemsInternal;\n }\n\n triggerId = `dropdown-actions-trigger-${guidFor(this)}`;\n\n /**\n * Modifier attached to the trigger to open the dropdown actions (onclick).\n */\n trigger = modifier<{ Element: Element }>((element: HTMLElement) => {\n element.setAttribute('id', this.triggerId);\n element.setAttribute('has-popup', 'true');\n\n const id = (this.listenerId = addWeakListener(this, element, 'click', async (evt: Event) => {\n evt.stopPropagation();\n\n if (!this.isOpen) {\n if ((await this.args.validateOpen?.()) === false) {\n return;\n }\n }\n\n this.toggleDropdown();\n }));\n\n return () => removeListener(id);\n });\n\n /**\n * Handles action list item click, by sending the associated action together with its arguments, up the DOM tree.\n */\n itemClicked: Task<void, [DropdownActionItem]> = task(async (item: DropdownActionItem) => {\n const { disabled, action, actionArguments } = item;\n\n if (disabled || !action) {\n return;\n }\n\n if (typeof action !== 'function') {\n console.error(`Action '${action}' is not a function.`);\n return;\n }\n\n const result = action(...(actionArguments || []));\n\n // Close the dropdown if the action does not return a promise and it shouldn't be kept open after the action is triggered or\n // when the action returns a promise but the loading spinner should replace the trigger button and should not appear in the dropdown.\n if (\n (!this.args.keepOpenAfterItemTriggered && !isPromise(result)) ||\n (isPromise(result) && this.args.replaceTriggerWithLoadingSpinner)\n ) {\n this.isOpen = false;\n }\n\n await result;\n });\n\n /**\n * Toggles between dropdown open/close states.\n *\n * @note Triggered when the dropdown header is clicked.\n */\n @action toggleDropdown(): void {\n this.isOpen = !this.isOpen;\n }\n\n /**\n * Sets up internal items based on whether items passed in is a promise or not.\n */\n @action initializeItems(): void {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n once<DropdownActions, typeof initializeInternalItems>(this, initializeInternalItems);\n }\n\n /**\n * Clears trigger listener.\n */\n @action clearTriggerListener(): void {\n const { listenerId } = this;\n if (listenerId) {\n removeListener(listenerId);\n }\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div class=\\\"toolbar\\\" ...attributes>\\n {{#if (media \\\"isMobile\\\")}}\\n <div class=\\\"label-container\\\">\\n {{#if @placeholder}}\\n <h3>\\n {{@placeholder}}\\n </h3>\\n {{/if}}\\n\\n <Button::Icon\\n @text={{t \\\"@adc/ui-components.close\\\"}}\\n @icon=\\\"close\\\"\\n @iconOnly={{true}}\\n @buttonColor=\\\"stealth\\\"\\n class=\\\"btn-close\\\"\\n {{on \\\"click\\\" @closeDropdown}}\\n />\\n </div>\\n {{/if}}\\n\\n {{#if @hasSearch}}\\n <SearchToolbar\\n placeholder={{t \\\"@adc/ui-components.search\\\"}}\\n @searchString={{@searchString}}\\n @searchValueChange={{@search}}\\n />\\n {{/if}}\\n</div>\")","import templateOnlyComponent from '@ember/component/template-only';\n\nimport type { SearchToolbarSignature } from '../../search-toolbar';\n\ntype SearchToolbarSignatureArgs = SearchToolbarSignature['Args'];\n\nexport interface DropdownMultiSelectToolbarSignature {\n Element: HTMLDivElement;\n Args: Pick<SearchToolbarSignatureArgs, 'searchString'> & {\n /** Optional title for the mobile only view. */\n placeholder?: string;\n /** Trigger when the close button is interacted with. */\n closeDropdown: VoidFunction;\n /** Indicates to show the search toolbar. */\n hasSearch?: boolean;\n search: SearchToolbarSignatureArgs['searchValueChange'];\n };\n}\nconst DropdownMultiSelectToolbar = templateOnlyComponent<DropdownMultiSelectToolbarSignature>();\nexport default DropdownMultiSelectToolbar;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<section class=\\\"dropdown-tree-wrapper\\\" ...attributes>\\n {{#if @tree.showHeader}}\\n <div class=\\\"header\\\">\\n <p>{{@tree.title}}</p>\\n\\n {{#if @tree.showAllNoneSelectors}}\\n <CheckboxTree::AllNoneSelector\\n @index=\\\"selected\\\"\\n @selectAll={{@tree.selectAll}}\\n @selectNone={{@tree.selectNone}}\\n />\\n {{/if}}\\n </div>\\n {{/if}}\\n\\n {{yield}}\\n\\n {{#if @tree.additionalItemCount}}\\n <p class=\\\"limit-results\\\">{{t \\\"@adc/ui-components.additionalResults\\\" count=@tree.additionalItemCount}}</p>\\n {{/if}}\\n\\n {{#if @tree.noResults}}\\n <p class=\\\"no-results\\\">{{t \\\"@adc/ui-components.noSearchResults\\\"}}</p>\\n {{/if}}\\n</section>\")","import templateOnlyComponent from '@ember/component/template-only';\n\nimport type { ChecklistTreeInfo } from '../multi-select';\n\nexport interface DropdownMultiSelectTreeWrapperSignature {\n Element: HTMLElement;\n Args: {\n /** Information about the rendered tree. */\n tree: ChecklistTreeInfo;\n };\n Blocks: {\n default: [];\n };\n}\nconst DropdownMultiSelectTreeWrapper = templateOnlyComponent<DropdownMultiSelectTreeWrapperSignature>();\nexport default DropdownMultiSelectTreeWrapper;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div\\n class=\\\"dropdown-select multiselect\\n {{if this.isEmpty \\'empty\\'}}\\n {{if this.isPlaceholderShown \\'placeholder\\'}}\\n {{if @hasCustomTrigger \\'external-trigger\\'}}\\n {{if @errorMessage \\'error\\'}}\\\"\\n ...attributes\\n {{did-update this.updateFocusSelector this.searchString}}\\n {{did-update this.updateFocusSelector this.isOpen}}\\n {{did-update this.updateFocusSelector this.showSearch}}\\n {{did-insert this.resolveItems.perform}}\\n {{did-update this.resolveItems.perform @items}}\\n>\\n {{#if @hasCustomTrigger}}\\n {{yield\\n (concat \\\"dropdown-trigger-\\\" (guid-for this))\\n (concat \\\"dropdown-trigger wrapper\\\" (if this.isPlaceholderShown \\\" placeholder\\\"))\\n this.togglePopoverVisibility\\n }}\\n {{else}}\\n <Button::Simple\\n @buttonAction={{this.togglePopoverVisibility}}\\n id=\\\"dropdown-trigger-{{guid-for this}}\\\"\\n aria-owns={{this.contentId}}\\n aria-haspopup=\\\"true\\\"\\n aria-live=\\\"polite\\\"\\n aria-label={{coalesce @label (t \\\"@adc/ui-components.triggerDropdown\\\")}}\\n tabindex={{if @tabindex \\\"-1\\\" \\\"0\\\"}}\\n class=\\\"dropdown-trigger wrapper btn-select {{if this.isPlaceholderShown \\'placeholder\\'}}\\\"\\n disabled={{@disabled}}\\n {{did-resize this.triggerResized debounce=200}}\\n {{did-update this.triggerTextChanged this.triggerTextHtml}}\\n >\\n {{this.triggerTextHtml}}\\n </Button::Simple>\\n {{/if}}\\n <BaseDropdown::Wrapper\\n @id={{this.contentId}}\\n @isLoading={{this.resolveItems.isRunning}}\\n @isOpen={{this.isOpen}}\\n @focusSelector={{this.focusSelector}}\\n @popoverIsFocusable={{true}}\\n @triggerId={{this.triggerId}}\\n @contentId={{this.contentId}}\\n @popoverPlacement={{coalesce @popoverPlacement \\\"bottom\\\"}}\\n @popoverClass={{@popoverClass}}\\n @popoverMaxHeight={{@popoverMaxHeight}}\\n @popoverMaxWidth={{@popoverMaxWidth}}\\n @popoverMinWidth={{@popoverMinWidth}}\\n @preventScroll={{@preventScroll}}\\n @matchTriggerElementWidth={{@matchTriggerElementWidth}}\\n @on-dropdown-open={{this.onDropdownOpen}}\\n @on-dropdown-close={{this.onDropdownClose}}\\n >\\n <DropdownSelect::MultiSelect::Toolbar\\n @hasSearch={{this.showSearch}}\\n @searchString={{this.searchString}}\\n @placeholder={{@placeholder}}\\n @search={{fn (mut this.searchString)}}\\n @closeDropdown={{this.onDropdownClose}}\\n data-dropdown-id={{guid-for this}}\\n />\\n\\n <div class=\\\"dropdown-body\\\" tabindex=\\\"-1\\\" data-dropdown-id={{guid-for this}}>\\n {{#if this.selectedTree.show}}\\n <DropdownSelect::MultiSelect::TreeWrapper @tree={{this.selectedTree}} class=\\\"selected\\\">\\n <CheckboxTree\\n @items={{this.selectedTree.displayItems}}\\n @idPrefix=\\\"selected\\\"\\n @on-action-execute={{this.updateFocusSelectorForElement}}\\n @isFocusable={{false}}\\n class=\\\"selected-items\\\"\\n />\\n </DropdownSelect::MultiSelect::TreeWrapper>\\n\\n {{#if this.unselectedTree.show}}\\n <div class=\\\"selections-divider\\\"></div>\\n {{/if}}\\n {{/if}}\\n\\n {{#if this.unselectedTree.show}}\\n <DropdownSelect::MultiSelect::TreeWrapper @tree={{this.unselectedTree}} class=\\\"unselected\\\">\\n <CheckboxTree\\n @items={{this.unselectedTree.displayItems}}\\n @showGroupSeparator={{true}}\\n @on-action-execute={{this.updateFocusSelectorForElement}}\\n @isFocusable={{@isFocusable}}\\n />\\n </DropdownSelect::MultiSelect::TreeWrapper>\\n {{/if}}\\n </div>\\n </BaseDropdown::Wrapper>\\n\\n <ErrorTooltip\\n @text={{@errorMessage}}\\n @placement={{@errorTooltipPlace}}\\n @duration={{@errorDuration}}\\n @selector=\\\".dropdown-trigger\\\"\\n @selectorDirection=\\\"sibling\\\"\\n />\\n</div>\")","import { tracked } from '@glimmer/tracking';\nimport { A } from '@ember/array';\nimport Component from '@ember/component';\nimport { computed, action, set, getProperties, setProperties } from '@ember/object';\nimport { bool, or, empty } from '@ember/object/computed';\nimport { guidFor } from '@ember/object/internals';\nimport { once, scheduleOnce } from '@ember/runloop';\nimport { inject as service } from '@ember/service';\nimport { htmlSafe } from '@ember/template';\nimport { isEmpty } from '@ember/utils';\nimport { task } from 'ember-concurrency';\nimport CheckboxTreeItem, { SELECTED, UNSELECTED, getAllSelectedItems } from '../../utils/dropdown-select-item.js';\n\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type { Task } from 'ember-concurrency';\nimport type { SafeString } from 'handlebars';\nimport type { BaseDropDownWrapperSignature } from '../base-dropdown/wrapper';\nimport type { CheckboxTreeSignature } from '../checkbox-tree';\nimport type { CommonInputErrorTooltipArgs } from '../error-tooltip';\nimport type { DropdownMultiSelectToolbarSignature } from './multi-select/toolbar';\n\ntype BaseDropDownWrapperSignatureArgs = BaseDropDownWrapperSignature['Args'];\ntype DropdownMultiSelectToolbarSignatureArgs = DropdownMultiSelectToolbarSignature['Args'];\n\nexport class ChecklistTreeInfo {\n title: string;\n items: CheckboxTreeItem[];\n maxItemCount: number;\n additionalItemCount: number;\n show: boolean;\n noResults: boolean;\n showHeader: boolean;\n showAllNoneSelectors: boolean;\n\n constructor(props: Partial<ChecklistTreeInfo> = {}) {\n this.title = props.title ?? '';\n this.items = props.items ?? [];\n this.maxItemCount = props.maxItemCount ?? 0;\n this.additionalItemCount = props.additionalItemCount ?? 0;\n this.show = props.show ?? true;\n this.noResults = props.noResults ?? false;\n this.showHeader = props.showHeader ?? false;\n this.showAllNoneSelectors = props.showAllNoneSelectors ?? false;\n }\n\n get displayItems(): CheckboxTreeItem[] {\n const { maxItemCount, items } = this;\n return maxItemCount > 0 ? items.slice(0, maxItemCount) : items;\n }\n\n private updateItemState(state: number): void {\n A(this.items.filter((item) => item.isSelectable && !item.disabled)).setEach('state', state);\n }\n\n @action selectAll(): void {\n this.updateItemState(SELECTED);\n }\n\n @action selectNone(): void {\n this.updateItemState(UNSELECTED);\n }\n}\n\nconst VALUE_CHANGE_ACTION = 'value-change';\n\n/**\n * Sets the selector of the focusable element.\n */\nfunction setFocusSelector(this: MultiSelectComponent, elementId?: string): void {\n const fnUpdateFocusSelector = (s = ''): void => {\n set(this, 'focusSelector', `.dropdown-content div[data-dropdown-id='${guidFor(this)}']${s}`);\n };\n\n if (elementId) {\n return fnUpdateFocusSelector(`.dropdown-body input[id='${elementId}']`);\n }\n\n if (this.showSearch) {\n return fnUpdateFocusSelector('.toolbar input[type=\"search\"]');\n }\n\n return fnUpdateFocusSelector();\n}\n\n/**\n * Sets focus back to the trigger of the dropdown if it is closed.\n */\nfunction setFocusBackToTrigger(this: MultiSelectComponent) {\n const triggerElement = (\n this.hasCustomTrigger\n ? document.querySelector(\n `.external-trigger .dropdown-select button[id='${this.triggerId}'].dropdown-trigger div`\n )?.firstElementChild\n : document.querySelector(`.dropdown-select button[aria-owns='${this.contentId}'].btn-select`)\n ) as HTMLElement;\n\n if (!this.isOpen && triggerElement) {\n triggerElement.focus();\n }\n}\n\n/**\n * Schedules clearing of error message\n */\nfunction clearErrorMessageTrigger(this: MultiSelectComponent): void {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n scheduleOnce('afterRender', this, 'clearErrorMessage');\n}\n\n/**\n * Clones the passed items.\n *\n * @param items The items to clone.\n * @param [flatten=false] If true, subitems will be flattened into the same array as their parent.\n */\nfunction cloneItems(items: CheckboxTreeItem[] = [], flatten = false): CheckboxTreeItem[] {\n return items.reduce((items, src) => {\n const subItems = cloneItems(src.subitems, flatten),\n { parent, description } = src;\n\n return [\n ...items,\n CheckboxTreeItem.create({\n ...getProperties(\n src,\n 'name',\n 'value',\n 'disabled',\n 'icon',\n 'state',\n 'action',\n 'isSelectable',\n 'isCollapsible',\n 'showAllNoneSelectors'\n ),\n description: parent ? `(${parent.name}) ${description}` : description,\n subitems: flatten ? [] : subItems,\n src\n })\n ];\n }, []);\n}\n\n/**\n * Synchronizes cloned items with their source item.\n *\n * @param clones The cloned items to synchronize.\n */\nfunction synchronizeItems(clones: CheckboxTreeItem[]) {\n // Iterate clones.\n clones.forEach((clone) => {\n const { src } = clone;\n\n // Is there a source for this clone?\n if (src) {\n // Update state and synchronize subitems.\n src.set('state', clone.state);\n synchronizeItems(clone.subitems);\n }\n });\n}\n\n/**\n * Returns a flattened array of items that match the provided search text.\n *\n * @param items - The items we are matching the search text against.\n * @param searchString - The search string.\n */\nfunction getFilteredItems(items: CheckboxTreeItem[], searchString: string): CheckboxTreeItem[] {\n if (!searchString) {\n return items;\n }\n\n return items.reduce(\n (filteredItems, item) => [\n ...filteredItems,\n ...(item.hasSubitems ? getFilteredItems(item.subitems, searchString) : [])\n ],\n items.filter(doesItemMatchSearch.bind(null, searchString))\n );\n}\n\n/**\n * Returns true if the item's properties contain the searchString.\n *\n * @param searchString - The text we are searching for.\n * @param item - The item we are testing the search text against.\n */\nfunction doesItemMatchSearch(searchString: string, item: CheckboxTreeItem): boolean {\n return ['name', 'description', 'secondaryDescription'].some((property) =>\n (item[property] || '').toLowerCase().includes(searchString.toLowerCase())\n );\n}\n\ntype ItemsCollection = {\n limit: number;\n items: CheckboxTreeItem[];\n};\n\nexport interface MultiSelectSignature {\n Element: HTMLDivElement;\n Args: CommonInputErrorTooltipArgs &\n Pick<\n BaseDropDownWrapperSignatureArgs,\n | 'popoverPlacement'\n | 'popoverClass'\n | 'preventScroll'\n | 'popoverMaxHeight'\n | 'popoverMaxWidth'\n | 'popoverMinWidth'\n | 'matchTriggerElementWidth'\n > &\n Pick<DropdownMultiSelectToolbarSignatureArgs, 'placeholder'> &\n Pick<CheckboxTreeSignature['Args'], 'isFocusable'> & {\n /** The items to render. */\n items: CheckboxTreeItem[] | Promise<CheckboxTreeItem[]>;\n /** Describes the type of items displayed. */\n itemsText?: string;\n /** Indicates we should use the `{{yield}}` template helper to render a custom trigger for this dropdown. */\n hasCustomTrigger?: boolean;\n /** Indicates the dropdown is open. */\n isOpen?: boolean;\n /** Indicates the dropdown search box should be shown, regardless of the number of items present. */\n hasSearch?: boolean;\n /** Indicates the maximum number of items to display before showing search box. */\n maxItemCount?: number;\n /** Always show the \"Please Select All | None\" header, even when items are not limited via maxItemCount. */\n alwaysShowHeaders?: boolean;\n /** The search text. */\n searchString?: string;\n /** Triggered when the user chooses a new value for the drop down. */\n 'value-change'?: (items: CheckboxTreeItem[]) => void;\n /** The aria-label value for the trigger */\n label?: string;\n /** `-1` to indicate non-custom trigger is keyboard accessible. */\n tabindex?: number;\n /** Indicates the non-custom trigger should be disabled. */\n disabled?: boolean;\n };\n Blocks: {\n /** When `@hasCustomTrigger` is `true` this will yield the `id` and CSS classes for the customer trigger, as well as an action for toggling the drop down open/closed. */\n default: [string, string, (event: Event) => void];\n };\n}\n\n/**\n * @classdesc\n * A custom dropdown (i.e. \"select\") allowing multiple items to be selected.\n *\n * @note This component should not be directly rendered in a template. Use dropdown-select\n * with the \"multiselect\" property set to true in order to use this.\n */\nexport default class MultiSelectComponent extends Component<MultiSelectSignature> {\n tagName = '';\n\n @service declare intl: ADCIntlService;\n\n constructor(...args: any[]) {\n super(...args);\n\n this.updateFocusSelector();\n }\n\n /**\n * The passed dropdown items.\n */\n items: CheckboxTreeItem[] | Promise<CheckboxTreeItem[]> = [];\n\n /**\n * The number of items shown before we begin hiding items and force a search to narrow results. Any value less than 1 means we will\n * show all items with no search functionality.\n */\n maxItemCount = -1;\n\n /**\n * Indicates we should always show the \"Please Select All | None\" header, even when items are not limited via `maxItemCount`.\n */\n alwaysShowHeaders = false;\n\n /**\n * Searching is enabled automatically if max item count is exceeded, but if this property is true the search will\n * be displayed even if there aren't too many items.\n */\n hasSearch = false;\n\n /**\n * The dropdown select placeholder.\n */\n placeholder = '';\n\n /**\n * The text to show in the search box.\n */\n searchString = '';\n\n /**\n * Used to describe the items display in the select box.\n */\n itemsText = '';\n\n /**\n * Indicates we should use the yield helper to display a custom trigger.\n */\n hasCustomTrigger = false;\n\n /**\n * When the popover for this is rendered, we trigger a focus event on the popover. Should we prevent the page from scrolling when this focus is triggered.\n */\n preventScroll = false;\n\n /**\n * A copy of the last selected items.\n */\n cachedSelections: CheckboxTreeItem[] = [];\n\n /**\n * A closure function to call when the selected item changes.\n */\n [VALUE_CHANGE_ACTION]?: (value: CheckboxTreeItem[]) => void;\n\n /**\n * Specifies error message to be displayed as a tooltip on the input.\n */\n errorMessage: string | undefined;\n\n /**\n * Indicates the dropdown is open.\n */\n @tracked isOpen = false;\n\n /**\n * The selector of the element which should receive focus after the dropdown opens.\n */\n focusSelector = '';\n\n /**\n * The checkbox items to render (after promise is resolved).\n */\n @tracked resolvedItems: CheckboxTreeItem[] = [];\n\n /**\n * A task for resolving promise items.\n */\n resolveItems: Task<void, never> = task({ restartable: true }, async () => {\n const items = await this.items;\n this.resolvedItems = items ? [...items] : [];\n });\n\n @empty('resolvedItems')\n declare isEmpty: boolean;\n\n /**\n * Indicates we should show the checklist header with title and all/none selectors.\n */\n @computed('resolvedItems.@each.{isSelectable,isCollapsible}')\n get isSimpleList(): boolean {\n const resolvedItems = A(this.resolvedItems);\n return resolvedItems.isEvery('isSelectable', true) && resolvedItems.isEvery('isCollapsible', false);\n }\n\n /**\n * Indicates whether we should limit the displayed items and show search/selected items.\n */\n @computed('resolvedItems.[]', 'maxItemCount')\n get limitItems(): boolean {\n const { maxItemCount } = this;\n return maxItemCount > 0 && this.resolvedItems.length > maxItemCount;\n }\n\n /**\n * Indicates the search box should be visible.\n */\n @or('limitItems', 'hasSearch')\n showSearch!: boolean;\n\n /**\n * Are we displaying a subset of items because of the search string filter?\n */\n @bool('searchString')\n isFiltered!: boolean;\n\n /**\n * The raw items that are currently selected.\n */\n @computed('resolvedItems.@each.{state,isFullySelected,isPartiallySelected,isNotSelected}')\n get selectedItems(): CheckboxTreeItem[] {\n return getAllSelectedItems(this.resolvedItems);\n }\n\n /**\n * The raw items that are currently not selected.\n */\n @computed('resolvedItems.@each.state')\n get unselectedItems(): CheckboxTreeItem[] {\n return A(this.resolvedItems).rejectBy('state', SELECTED);\n }\n\n /**\n * Information about selected and unselected items, including computed limits for each.\n */\n @computed('isSimpleList', 'maxItemCount', 'resolvedItems.length', 'selectedItems.length', 'unselectedItems.length')\n get itemCollections(): {\n selected: ItemsCollection;\n unselected: ItemsCollection;\n } {\n const maxItemCount = Number(this.maxItemCount),\n { selectedItems, unselectedItems, resolvedItems, isSimpleList } = this,\n selected = {\n limit: 0,\n items: cloneItems(selectedItems, true)\n },\n unselected = {\n limit: 0,\n items: cloneItems(unselectedItems, false)\n };\n\n // Do we need to limit items?\n if (isSimpleList && maxItemCount > 0 && resolvedItems.length > maxItemCount) {\n const selectedCount = selectedItems.length,\n unselectedCount = unselectedItems.length;\n\n if (!selectedCount) {\n unselected.limit = maxItemCount;\n } else if (!unselectedCount) {\n selected.limit = maxItemCount;\n } else {\n const selectedMax = Math.floor(maxItemCount / 2);\n\n if (unselectedCount <= selectedMax) {\n selected.limit = maxItemCount - unselectedCount;\n unselected.limit = unselectedCount;\n } else if (selectedCount <= selectedMax) {\n selected.limit = selectedCount;\n unselected.limit = maxItemCount - selectedCount;\n } else {\n selected.limit = selectedMax;\n unselected.limit = maxItemCount - selectedMax;\n }\n }\n }\n\n // Are there no limits to the number of items shown.\n if (!isSimpleList || (selected.limit === 0 && unselected.limit === 0)) {\n // Don't use clones and don't show selected items.\n selected.items = [];\n unselected.items = resolvedItems;\n }\n\n return { selected, unselected };\n }\n\n /**\n * Creates and returns an array of CheckboxTreeItem for the passed items.\n */\n private getCheckList(title: string, itemCollection: ItemsCollection): ChecklistTreeInfo {\n const { items, limit } = itemCollection;\n\n if (isEmpty(items)) {\n // Return empty results.\n return new ChecklistTreeInfo({\n show: false\n });\n }\n\n const { searchString } = this,\n filteredItems = this.showSearch ? getFilteredItems.call(this, items, searchString) : items;\n\n // Are results filtered AND were none found?\n if (searchString && isEmpty(filteredItems)) {\n // Return no results.\n return new ChecklistTreeInfo({\n title,\n showHeader: true,\n noResults: true\n });\n }\n\n return new ChecklistTreeInfo({\n title,\n items: filteredItems,\n maxItemCount: limit,\n additionalItemCount: limit && filteredItems.length > limit ? filteredItems.length - limit : 0,\n showHeader: this.isSimpleList && (this.limitItems || this.alwaysShowHeaders),\n showAllNoneSelectors: true\n });\n }\n\n /**\n * The checklist tree that represents the currently selected items.\n */\n @computed('itemCollections.selected', 'itemsText', 'searchString', 'showSearch')\n get selectedTree(): ChecklistTreeInfo {\n return this.getCheckList(\n this.intl.t('@adc/ui-components.selectedItems', {\n itemsText: this.itemsText\n }),\n this.itemCollections.selected\n );\n }\n\n /**\n * The checklist tree that represents the currently unselected items.\n */\n @computed('itemCollections.unselected', 'searchString', 'showSearch')\n get unselectedTree(): ChecklistTreeInfo {\n return this.getCheckList(this.intl.t('@adc/ui-components.pleaseSelect'), this.itemCollections.unselected);\n }\n\n /**\n * A unique ID for the dropdown trigger to correspond to the content (for ARIA purposes).\n */\n @computed()\n get triggerId(): string {\n return `dropdown-trigger-${guidFor(this)}`;\n }\n\n /**\n * A unique ID so the dropdown trigger can correspond to the content (for ARIA purposes).\n */\n @computed()\n get contentId(): string {\n return `dropdown-content-${guidFor(this)}`;\n }\n\n /**\n * The computed text for the trigger.\n */\n @computed('selectedItems', 'placeholder')\n get triggerText(): string {\n return (\n this.selectedItems\n .map(({ isFullySelected, hasSubitems, name }) =>\n isFullySelected && hasSubitems\n ? this.intl.t('@adc/ui-components.allItems', {\n items: name\n })\n : name\n )\n .join(', ') || this.placeholder\n );\n }\n\n /**\n * The computed text to show in the dropdown trigger.\n */\n @computed('triggerText')\n get triggerTextHtml(): SafeString {\n // Return within a span element so we can manipulate it (if too long) and not break the binding.\n return htmlSafe(`<span>${this.triggerText}</span>`);\n }\n\n /**\n * Is the placeholder currently shown as the trigger text?\n *\n * @note Conditionally adds the \"placeholder\" class so the CSS can modify the placeholder text color.\n *\n * @ignore\n */\n @empty('selectedItems')\n isPlaceholderShown!: boolean;\n\n /**\n * Determines if the selected items have changed.\n */\n hasSelectionChanged(currentSelections: CheckboxTreeItem[], previousSelections: CheckboxTreeItem[]): boolean {\n return (\n currentSelections.length !== previousSelections.length ||\n currentSelections.some(({ value, state, hasSubitems, subitems }) => {\n // Was this item not present in previous selections?\n const previousItem = A(previousSelections).findBy('value', value);\n if (!previousItem) {\n // Selection changed.\n return true;\n }\n\n // Are there sub items?\n if (hasSubitems) {\n // Compare subitems.\n return this.hasSelectionChanged(subitems, previousItem.subitems);\n }\n\n // Compare items.\n return previousItem.state !== state;\n })\n );\n }\n\n /**\n * Updates the calling instance via the change action function , if the selected values have changed.\n */\n saveSelectionChange(\n currentValue: CheckboxTreeItem[],\n previousValue: CheckboxTreeItem[],\n valueChangeParameter: CheckboxTreeItem[] = currentValue\n ): void {\n if (this.hasSelectionChanged(currentValue, previousValue)) {\n clearErrorMessageTrigger.call(this);\n\n const valueChangeAction = this[VALUE_CHANGE_ACTION];\n if (valueChangeAction) {\n valueChangeAction(valueChangeParameter);\n }\n }\n }\n\n /**\n * Called when the dropdown trigger element changes size.\n */\n @action triggerResized(button: HTMLButtonElement): void {\n this.triggerTextChanged(button);\n }\n\n /**\n * Called when the text with the dropdown trigger element changes.\n * Modifies the trigger text to ensure it fits within the trigger.\n */\n @action triggerTextChanged(button: HTMLButtonElement): void {\n const label = button.querySelector('span');\n\n // Is label missing or empty?\n if (!label || isEmpty(label.innerText)) {\n // Nothing to do.\n return;\n }\n\n // Is the label span larger than the parent span (minus 60px for arrow)?\n // This updates the trigger aria-label, also\n if (\n label.getBoundingClientRect().width >=\n (button.parentNode as HTMLElement).getBoundingClientRect().width - 60 &&\n !(this.isDestroyed || this.isDestroying)\n ) {\n label.innerText = `${this.selectedItems.length} ${this.itemsText || this.placeholder}`;\n button.setAttribute('aria-label', label.innerText);\n }\n }\n\n /**\n * Updates the focus selector.\n */\n @action updateFocusSelector(): void {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n once<MultiSelectComponent, typeof setFocusSelector>(this, setFocusSelector, undefined);\n }\n\n /**\n * Updates the focus selector to select the active element.\n */\n @action updateFocusSelectorForElement(): void {\n const activeElement = document.activeElement as HTMLElement;\n if (activeElement?.dataset) {\n setFocusSelector.call(this, activeElement.id);\n }\n }\n\n /**\n * Caches the selected items when the drop down opens.\n */\n @action onDropdownOpen(): void {\n // Cache the items selected at time of open.\n this.cachedSelections = cloneItems(this.selectedItems, true);\n }\n\n /**\n * Called when the multiselect dropdown closes, to update selected items.\n */\n @action onDropdownClose(): void {\n // Synchronize items.\n [this.selectedTree, this.unselectedTree].forEach((tree) => synchronizeItems(tree.items));\n\n this.saveSelectionChange(this.selectedItems, this.cachedSelections, this.resolvedItems);\n\n // Reset.\n setProperties(this, {\n isOpen: false,\n searchString: ''\n });\n\n setFocusBackToTrigger.call(this);\n }\n\n @action clearErrorMessage(): void {\n set(this, 'errorMessage', undefined);\n }\n\n @action togglePopoverVisibility(event: Event): void {\n this.isOpen = !this.isOpen;\n event.stopPropagation();\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div\\n class=\\\"dropdown-select {{if this.isEmpty \\'empty\\'}} {{if this.resolvedErrorMessage \\'error\\'}}\\\"\\n {{did-update this.onErrorMessageChange @errorMessage}}\\n {{did-insert this.resolveItems.perform}}\\n {{did-update this.resolveItems.perform @items}}\\n>\\n <div class=\\\"dropdown-single-select\\\">\\n <select\\n id={{@selectId}}\\n disabled={{@disabled}}\\n required={{@required}}\\n aria-live=\\\"polite\\\"\\n aria-label={{this.label}}\\n ...attributes\\n {{on \\\"change\\\" this.itemClicked}}\\n {{did-insert this.synchronizeSelectedItem}}\\n {{did-update this.synchronizeSelectedItem @value}}\\n {{did-update this.synchronizeSelectedItem this.resolvedItems}}\\n >\\n {{#if @placeholder}}\\n {{! If there are no selected items, mark the placeholder as selected. }}\\n {{#if (eq this.selectedItems.length 0)}}\\n <option selected disabled value=\\\"\\\">\\n {{@placeholder}}\\n </option>\\n {{else}}\\n {{! Do not mark the placeholder as selected to avoid multiple selected options. }}\\n <option disabled value=\\\"\\\">\\n {{@placeholder}}\\n </option>\\n {{/if}}\\n {{/if}}\\n\\n {{#each this.resolvedItems as |item|}}\\n {{#if item.hasSubitems}}\\n <optgroup label={{item.name}}>\\n {{#each item.subitems as |subitem|}}\\n <option\\n value={{subitem.value}}\\n disabled={{subitem.disabled}}\\n selected=\\\"{{if (eq item.state this.dropdownSelectItemEnumSelected) \\'selected\\'}}\\\"\\n {{did-insert (fn this.updateOption subitem)}}\\n {{did-update (fn this.updateOption subitem) subitem.state}}\\n >\\n {{subitem.name}}\\n </option>\\n {{/each}}\\n </optgroup>\\n {{else}}\\n <option\\n value={{item.value}}\\n disabled={{item.disabled}}\\n selected=\\\"{{if (eq item.state this.dropdownSelectItemEnumSelected) \\'selected\\'}}\\\"\\n {{did-insert (fn this.updateOption item)}}\\n {{did-update (fn this.updateOption item) item.state}}\\n >\\n {{item.name}}\\n </option>\\n {{/if}}\\n {{/each}}\\n </select>\\n <svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 24 24\\\">\\n <polygon\\n fill-rule=\\\"evenodd\\\"\\n points=\\\"11.95 16.364 6.293 10.707 7.707 9.293 11.95 13.536 16.193 9.293 17.607 10.707\\\"\\n ></polygon>\\n </svg>\\n </div>\\n <ErrorTooltip\\n @text={{this.resolvedErrorMessage}}\\n @placement={{@errorTooltipPlace}}\\n @duration={{@errorDuration}}\\n @selector=\\\"select\\\"\\n @selectorDirection=\\\"sibling\\\"\\n />\\n</div>\")","import Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { isDestroyed } from '@adc/ember-utils/utils/ember-helpers';\nimport { A } from '@ember/array';\nimport { action, set } from '@ember/object';\nimport { computed } from '@ember/object';\nimport { reads, empty, filterBy } from '@ember/object/computed';\nimport { once, scheduleOnce } from '@ember/runloop';\nimport { inject as service } from '@ember/service';\nimport { task } from 'ember-concurrency';\nimport { UNSELECTED, SELECTED } from '../../utils/dropdown-select-item.js';\n\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type { Task } from 'ember-concurrency';\nimport type DropdownSelectItem from '../../utils/dropdown-select-item.js';\nimport type { CommonInputErrorTooltipArgs } from '../error-tooltip';\n\nconst VALUE_CHANGE_ACTION = 'value-change';\n\n/**\n * Update the selected item based on the given value.\n *\n * @param value - The value of the item that should be selected.\n * @param [shouldIgnoreAction=false] - Should the action notifying the user of a change in value not be sent?\n */\nfunction updateSelectedValue(this: SingleSelectComponent, value: string, shouldIgnoreAction = false): void {\n if (this.resolvedItems.length) {\n this.selectItem(value, shouldIgnoreAction);\n }\n}\n\n/**\n * Toggles the error message visibility.\n */\nfunction toggleErrorMessageVisibility(this: SingleSelectComponent, errorMessage?: string): void {\n if (!isDestroyed(this)) {\n this.hideErrorMessage = !errorMessage;\n }\n}\n\nexport interface SingleSelectSignature {\n Element: HTMLSelectElement;\n Args: CommonInputErrorTooltipArgs & {\n /** Triggered when the user chooses a new value for the drop down. */\n [VALUE_CHANGE_ACTION]?: (value: string) => void;\n /** The currently selected value. */\n value?: string;\n /** The dropdown items to render. */\n items?: Promise<DropdownSelectItem[]> | DropdownSelectItem[];\n /** Optional ID value for the native select element (should be passed as HTML attribute instead). */\n selectId?: string;\n /** Text for the optional unselectable placeholder option for the native select element. */\n placeholder?: string;\n /** Indicates a selection value is required (should be passed as HTML attribute instead). */\n required?: boolean;\n /** Indicates the native select element should be disabled (should be passed as HTML attribute instead). */\n disabled?: boolean;\n /** Optional aria-label for the select element (should be passed as HTML attribute instead). */\n label?: string;\n };\n}\n\n/**\n * @classdesc\n * ADC's custom version of the native HTML select element. Only one item can be selected from this dropdown.\n *\n * @note This component should not be directly rendered in a template. Use dropdown-select with the\n * \"multiselect\" property set to false in order to use this.\n */\nexport default class SingleSelectComponent extends Component<SingleSelectSignature> {\n @service declare intl: ADCIntlService;\n\n @tracked resolvedItems: DropdownSelectItem[] = [];\n\n /**\n * The dropdown select item enum value for SELECTED.\n */ // eslint-disable-next-line @typescript-eslint/no-unused-vars\n dropdownSelectItemEnumSelected = SELECTED;\n\n /**\n * A task for resolving promise items.\n */\n resolveItems: Task<void, never> = task({ restartable: true }, async () => {\n const items = await this.args.items;\n this.resolvedItems = items ? [...items] : [];\n });\n\n /**\n * Should the error message be hidden?\n */\n @tracked hideErrorMessage = false;\n\n /**\n * The error message for the select.\n */\n get resolvedErrorMessage(): string | undefined {\n return this.hideErrorMessage ? '' : this.args.errorMessage;\n }\n\n /**\n * Are there no items?\n */\n @empty('resolvedItems')\n isEmpty!: boolean;\n\n /**\n * A collection of items that are selected in the dropdown.\n *\n * @note This should only contain one item for the DropdownSelectSingle.\n * Warning: Never bind to this value from the outside. This should\n * be used internally only.\n *\n * @ignore\n */\n @filterBy('resolvedItems', 'state', SELECTED)\n selectedItems!: DropdownSelectItem[];\n\n /**\n * The item that is selected in the dropdown-select.\n *\n * @note This property should only be used in the DropdownSelectSingle component.\n * Warning: never bind to this value from the outside. This should be used\n * internally only.\n */\n @reads('selectedItems.firstObject')\n selectedItem!: DropdownSelectItem;\n\n /**\n * The aria-label attribute to apply. Use whats passed in if passed in, otherwise use default\n */\n @computed('args.label')\n get label(): string {\n return this.args.label || this.intl.t('@adc/ui-components.triggerSelect');\n }\n\n /**\n * Determines if the selected items have changed.\n */\n hasSelectionChanged(currentValue: string, previousValue?: string): boolean {\n try {\n // NOTE: The try/catch was added because there is a circular reference happening in items.\n return JSON.stringify(currentValue) !== JSON.stringify(previousValue);\n } catch (e) {\n return currentValue !== previousValue;\n }\n }\n\n /**\n * Triggers the value-change action if the selections inside the dropdown have changed.\n */\n saveSelectionChange(\n currentValue: string,\n previousValue?: string,\n valueChangeParameter: string = currentValue\n ): void {\n if (this.hasSelectionChanged(currentValue, previousValue)) {\n toggleErrorMessageVisibility.call(this);\n\n const valueChangeAction = this.args[VALUE_CHANGE_ACTION];\n\n if (valueChangeAction) {\n valueChangeAction(valueChangeParameter);\n }\n }\n }\n\n /**\n * Sets the specified item's state to selected.\n *\n * @param selectedValue - The value of the item that was selected.\n * @param [shouldIgnoreAction=false] - Should the action notifying the user of a change in value not be sent?\n */\n selectItem(selectedValue: string, shouldIgnoreAction = false): boolean {\n if (!selectedValue) {\n return false;\n }\n\n const flattenedItems = A<DropdownSelectItem>(\n this.resolvedItems\n .map((item) => (item.hasSubitems ? item.subitems : item))\n .reduce((acc, val) => acc.concat(val), [])\n ),\n previousItem = flattenedItems.findBy('state', SELECTED) ?? ({} as DropdownSelectItem),\n selectedItem = flattenedItems.findBy('value', selectedValue);\n\n if (!selectedItem) {\n return false;\n }\n\n // Ensure only the clicked item is selected.\n flattenedItems.setEach('state', UNSELECTED);\n set(selectedItem, 'state', SELECTED);\n\n if (!shouldIgnoreAction) {\n // Note: Native selects close when an item is selected.\n this.onDropdownClose(selectedItem.value, previousItem.value);\n }\n\n return true;\n }\n\n /**\n * Synchronizes the currently selected item with the current value.\n */\n @action synchronizeSelectedItem(): void {\n // Some parents do not utilize the 'value' arg, and just set the state of the options in the items array directly\n // This can confuse Ember, so to compensate, if this.args.value is undefined, we synchronize by\n // finding the selected item in the array and 'select' it again to ensure Ember updates the UI\n const value = this.args.value ?? this.resolvedItems.find((x) => x.state)?.value ?? '';\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n once<SingleSelectComponent, typeof updateSelectedValue>(this, updateSelectedValue, value, true);\n }\n\n /**\n * Called when the user changes the selected item in the UI.\n */\n @action itemClicked(evt: Event): void {\n this.selectItem((evt.target as HTMLSelectElement).value);\n }\n\n /**\n * Calls the saveSelectionChange method.\n */\n @action onDropdownClose(currentValue: string, previousValue?: string, valueChangeParameter?: string): void {\n this.saveSelectionChange(currentValue, previousValue, valueChangeParameter);\n }\n\n /**\n * Triggers when the error message changes.\n */\n @action onErrorMessageChange(): void {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n scheduleOnce<SingleSelectComponent, typeof toggleErrorMessageVisibility>(\n 'afterRender',\n this,\n toggleErrorMessageVisibility,\n this.args.errorMessage\n );\n }\n\n /**\n * Sets the attributes on the option element.\n */\n @action updateOption(item: DropdownSelectItem, el: HTMLOptionElement): void {\n if (item.state === SELECTED) {\n el.setAttribute('selected', 'selected');\n } else {\n el.removeAttribute('selected');\n }\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{#let (concat \\\"@adc/ui-components.\\\" (if @isExpanded \\\"hide\\\" \\\"show\\\")) as |textKey|}}\\n <button\\n type=\\\"button\\\"\\n class=\\\"ui-expand-button {{coalesce @direction \\'down\\'}} {{if @isExpanded \\'is-expanded\\'}}\\\"\\n title={{t textKey}}\\n aria-label={{t textKey}}\\n aria-expanded={{if @isExpanded \\\"true\\\" \\\"false\\\"}}\\n {{on \\\"click\\\" (fn (coalesce @onChange (noop)) (not @isExpanded))}}\\n ...attributes\\n >\\n <div>\\n {{#if (has-block)}}\\n <span>{{yield}}</span>\\n {{/if}}\\n <SvgSymbol @icon=\\\"dropdown-arrow\\\" />\\n </div>\\n </button>\\n{{/let}}\")","import templateOnlyComponent from '@ember/component/template-only';\n\nexport interface ExpandButtonSignature {\n Element: HTMLButtonElement;\n Args: {\n /** Indicates the button is in \"expanded\" state. */\n isExpanded?: boolean;\n /** The direction to display the arrow icon. */\n direction?: 'up' | 'down';\n /** Triggered when the user chooses to expand/collapse the element. */\n onChange?: VoidFunction;\n };\n Blocks: {\n default: [];\n };\n}\n\nconst ExpandButton = templateOnlyComponent<ExpandButtonSignature>();\nexport default ExpandButton;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<header class=\\\"fieldset-header\\\" ...attributes>\\n <span class=\\\"header-text\\\">{{@text}}</span>{{~yield}}\\n</header>\")","import templateOnlyComponent from '@ember/component/template-only';\n\nimport type { SafeString } from 'handlebars';\n\nexport interface FieldsetHeaderSignature {\n Element: HTMLElement;\n Args: {\n /** The text to be shown in the fieldset header. */\n text?: string | SafeString;\n };\n Blocks: {\n default: [];\n };\n}\n\nconst FieldsetHeader = templateOnlyComponent<FieldsetHeaderSignature>();\nexport default FieldsetHeader;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div\\n class=\\\"form-group\\n {{if @error \\'error\\'}}\\n {{if @inline \\'inline\\' \\'stacked\\'}}\\n {{if @required \\'required\\'}}\\n {{unless @label \\'no-label\\'}}\\n {{if (and @label @inline @labelDescription) \\'description\\'}}\\n {{if @labelTextRight \\'text-right\\'}}\\\"\\n ...attributes\\n>\\n {{#if @label}}\\n <label class={{@labelClass}} for=\\\"{{if @formElementId @formElementId}}\\\">\\n <span class=\\\"label\\\">{{@label}}</span>\\n {{#if (and @inline @labelDescription)}}\\n <span class=\\\"description\\\">{{@labelDescription}}</span>\\n {{/if}}\\n </label>\\n {{/if}}\\n\\n {{yield}}\\n</div>\")","import templateOnlyComponent from '@ember/component/template-only';\n\nimport type { SafeString } from 'handlebars';\n\nexport interface FormGroupSignature {\n Element: HTMLDivElement;\n Args: {\n /** Indicates there is a form input validation error. */\n error?: any;\n /** Indicates the form group should be inline with the input, instead of stacked. */\n inline?: boolean;\n /** Indicates the input is required. */\n required?: boolean;\n /** The label text for the input. */\n label?: string | SafeString;\n /** Optional CSS class applied tot he label element. */\n labelClass?: string;\n /** The description text for the input. */\n labelDescription?: string | SafeString;\n /** Indicates the format group should be text-align to the right. */\n labelTextRight?: boolean;\n /** Input ID value so the label/input are accessible (strongly encouraged). */\n formElementId?: string;\n };\n Blocks: {\n default: [];\n };\n}\n\nconst FormGroup = templateOnlyComponent<FormGroupSignature>();\nexport default FormGroup;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 24 24\\\" ...attributes>\\n <path\\n d=\\\"M21.64,17.78L14.32,4.41a2.59,2.59,0,0,0-4.6,0L2.38,17.78A2.81,2.81,0,0,0,4.68,22H19.34A2.81,2.81,0,0,0,21.64,17.78ZM13,20H11V18h2v2Zm0-4H11V8h2v8Z\\\"\\n ></path>\\n</svg>\")","import templateOnlyComponent from '@ember/component/template-only';\n\nexport interface DangerIconSignature {\n Element: SVGElement;\n}\n\nconst DangerIcon = templateOnlyComponent<DangerIconSignature>();\nexport default DangerIcon;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 24 24\\\" ...attributes>\\n <path d=\\\"M12,2A10,10,0,1,0,22,12,10,10,0,0,0,12,2Zm1,15H11V11h2v6Zm0-8H11V7h2V9Z\\\"></path>\\n</svg>\")","import templateOnlyComponent from '@ember/component/template-only';\n\nexport interface InfoIconSignature {\n Element: SVGElement;\n}\n\nconst InfoIcon = templateOnlyComponent<InfoIconSignature>();\nexport default InfoIcon;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 24 24\\\" ...attributes>\\n <path d=\\\"M12,2A10,10,0,1,0,22,12,10,10,0,0,0,12,2ZM11.38,16L10,14.62l-3-3,1.41-1.41,3,3L16.59,8,18,9.41Z\\\"></path>\\n</svg>\")","import templateOnlyComponent from '@ember/component/template-only';\n\nexport interface SuccessIconSignature {\n Element: SVGElement;\n}\n\nconst SuccessIcon = templateOnlyComponent<SuccessIconSignature>();\nexport default SuccessIcon;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 24 24\\\" ...attributes>\\n <path d=\\\"M12,2A10,10,0,1,0,22,12,10,10,0,0,0,12,2Zm1,15H11V11h2v6Zm0-8H11V7h2V9Z\\\"></path>\\n</svg>\")","import templateOnlyComponent from '@ember/component/template-only';\n\nexport interface WarningSignature {\n Element: SVGElement;\n}\n\nconst WarningIcon = templateOnlyComponent<WarningSignature>();\nexport default WarningIcon;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div class=\\\"alert elevated {{this.type}} {{@pointerPlacement}}\\\" ...attributes>\\n <div class=\\\"inline-alert-content\\\">\\n {{#unless @hideLeftIcon}}\\n <div class=\\\"svg-container\\\">\\n <div class=\\\"circle\\\" />\\n {{#if @leftIcon}}\\n <SvgSymbol class=\\\"icon\\\" @icon={{@leftIcon}} />\\n {{else}}\\n {{! @glint-expect-error: Glint does not know what this component is yet}}\\n <this.path class=\\\"icon\\\" />\\n {{/if}}\\n </div>\\n {{/unless}}\\n <div class=\\\"inline-alert-text\\\">\\n {{#if @title}}\\n <h3>{{@title}}</h3>\\n {{/if}}\\n {{#if @text}}\\n <p>{{@text}}</p>\\n {{else}}\\n {{yield}}\\n {{/if}}\\n </div>\\n {{#if @iconButton}}\\n <Button::Icon\\n class=\\\"right-icon-button\\\"\\n @buttonColor=\\\"stealth\\\"\\n @iconOnly={{true}}\\n @text={{@iconButton.text}}\\n @icon={{coalesce @iconButton.icon \\\"close\\\"}}\\n @buttonAction={{@iconButton.action}}\\n />\\n {{/if}}\\n </div>\\n <div class=\\\"alert-confirmation-buttons\\\">\\n {{#if @confirmButton}}\\n <Button::Simple @text={{@confirmButton.text}} @buttonColor=\\\"primary\\\" {{on \\\"click\\\" @confirmButton.action}} />\\n {{/if}}\\n {{#if @cancelButton}}\\n <Button::Simple @text={{@cancelButton.text}} {{on \\\"click\\\" @cancelButton.action}} />\\n {{/if}}\\n </div>\\n</div>\")","import Component from '@glimmer/component';\nimport DangerIcon from './inline-alert/danger.ts';\nimport InfoIcon from './inline-alert/info.ts';\nimport SuccessIcon from './inline-alert/success.ts';\nimport WarningIcon from './inline-alert/warning.ts';\n\nimport type { TOC } from '@ember/component/template-only';\nimport type { SafeString } from 'handlebars';\n\nexport type InlineAlertType = 'info' | 'success' | 'warning' | 'danger';\n\nexport type InlineAlertPointerPlacement = 'top' | 'bottom';\n\n// The button object that is rendered in the inline alert. Will need to pass in a text and an action to render properly.\nexport type InlineAlertButton = {\n icon?: string;\n text: string;\n action: () => any;\n};\n\n/**\n * The different possible types of messages, each colored differently.\n */\nconst TYPES: InlineAlertType[] = ['info', 'success', 'warning', 'danger'];\n\nexport interface InlineAlertSignature {\n Element: HTMLDivElement;\n Args: {\n /** The type of inline alert to show (defaults to 'info'). */\n type?: 'info' | 'success' | 'warning' | 'danger';\n /** Optional pointer type for inline alert to contain a top or bottom pointer, defaults to no pointer */\n pointerPlacement?: 'top' | 'bottom';\n /** Optional flag to hide the icon on the left side */\n hideLeftIcon?: boolean;\n /** Optional text to include within the inline alert (will not yield if present). */\n text?: string | SafeString;\n /** Optional title text to include within the inline alert */\n title?: string;\n /** Optional icon override for the left icon. If nothing is passed in, it will use the icon associated with the alert type */\n leftIcon?: string;\n /** The icon button, will need a text and an action to render properly.*/\n iconButton?: InlineAlertButton;\n /** The confirm button, will need a text and an action to render properly */\n confirmButton?: InlineAlertButton;\n /** The cancel button, will need a text and an action to render properly */\n cancelButton?: InlineAlertButton;\n };\n Blocks: {\n default: [];\n };\n}\n\n/**\n * An inline banner displayed with a configurable message, and including an icon and color indicative of the severity (info, success, warning or danger).\n */\nexport default class InlineAlert extends Component<InlineAlertSignature> {\n /**\n * Validated type.\n */\n get type(): InlineAlertType {\n const { type = TYPES[0] } = this.args;\n return TYPES.includes(type) ? type : TYPES[0];\n }\n\n get path(): typeof Component<any> | TOC<any> {\n return (\n {\n ['info']: InfoIcon,\n ['success']: SuccessIcon,\n ['warning']: WarningIcon,\n ['danger']: DangerIcon\n } as Record<string, typeof Component<any> | TOC<any>>\n )[this.type];\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div class=\\\"inset-group surface {{unless @title \\'no-title\\'}}\\\" ...attributes>\\n {{#if @title}}\\n <header class=\\\"inset-group-title\\\">\\n <span>\\n {{@title}}\\n {{yield to=\\\"title-contents\\\"}}\\n </span>\\n {{#if (has-block \\\"icon\\\")}}\\n {{yield to=\\\"icon\\\"}}\\n {{else if @icon}}\\n {{#if @onIconClick}}\\n <Button::Icon\\n class=\\\"icon-container\\\"\\n @text={{@iconText}}\\n @icon={{@icon}}\\n @iconOnly={{true}}\\n @buttonColor=\\\"stealth\\\"\\n {{on \\\"click\\\" @onIconClick}}\\n />\\n {{else}}\\n <div class=\\\"icon-container\\\">\\n <SvgSymbol @icon={{@icon}} @title={{@iconText}} />\\n </div>\\n {{/if}}\\n {{/if}}\\n </header>\\n {{/if}}\\n <div class=\\\"inset-group-content\\\">\\n {{yield}}\\n </div>\\n</div>\")","import templateOnlyComponent from '@ember/component/template-only';\n\ninterface BaseInsetGroupArgs {\n /** The title for the inset group. If excluded, the inset group will be title-less. */\n title?: string;\n}\n\ninterface ClickableIconInsetGroupArgs extends BaseInsetGroupArgs {\n /** Triggered when the user clicks the icon button. */\n onIconClick: VoidFunction;\n /** The icon button to show. */\n icon: string;\n /** The text describing the button. */\n iconText: string;\n}\n\ninterface NonClickableIconInsertGroupArgs extends BaseInsetGroupArgs {\n /** The icon button to show. */\n icon?: string;\n /** The text describing the button. */\n iconText?: string;\n /** Triggered when the user clicks the icon button. */\n onIconClick?: undefined;\n}\n\nexport interface InsetGroupSignature {\n Element: HTMLDivElement;\n Args: ClickableIconInsetGroupArgs | NonClickableIconInsertGroupArgs;\n Blocks: {\n icon: [];\n default: [];\n 'title-contents': [];\n };\n}\n\nconst InsetGroup = templateOnlyComponent<InsetGroupSignature>();\nexport default InsetGroup;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div id=\\\"{{guid-for this}}_keyword_search_wrapper\\\" class=\\\"keyword-search-wrapper text-input search-input\\\">\\n <SvgSymbol @icon=\\\"search\\\" @title={{t \\\"@adc/ui-components.search\\\"}} />\\n\\n {{#if @keyword}}\\n <p id=\\\"{{guid-for this}}_keyword\\\">\\n {{await this.displayName}}:\\n </p>\\n {{/if}}\\n\\n <Input\\n @type=\\\"search\\\"\\n @value={{@searchString}}\\n aria-live=\\\"polite\\\"\\n aria-labelledby=\\\"{{guid-for this}}_keyword\\\"\\n ...attributes\\n {{on \\\"input\\\" this.updateSearchString}}\\n {{on \\\"keydown\\\" this.keyDownEventListener}}\\n />\\n {{#if (or @searchString @keyword)}}\\n <Button::Icon\\n @icon=\\\"close\\\"\\n @iconOnly={{true}}\\n @text={{t \\\"@adc/ui-components.clearSearch\\\"}}\\n {{on \\\"click\\\" (fn @applySearchFn \\\"\\\" null)}}\\n />\\n {{/if}}\\n</div>\\n\\n{{#if @keywordOptions.length}}\\n <PopoverMenu\\n @anchorSelector=\\\"#{{guid-for this}}_keyword_search_wrapper input\\\"\\n @isOpen={{this.showKeywordSuggestionPopover}}\\n @popoverClass=\\\"keyword-suggestions {{@suggestionClass}}\\\"\\n @useImprovedCloseOnClick={{true}}\\n >\\n <p class=\\\"suggestions-header\\\">\\n {{t \\\"@adc/ui-components.suggestedSearches\\\"}}\\n </p>\\n {{#each this.suggestedKeywords as |suggestedKeyword|}}\\n <Button::Icon\\n @icon=\\\"search\\\"\\n @text={{t\\n \\\"@adc/ui-components.colonSeparatedText\\\"\\n first=suggestedKeyword.displayName\\n second=this.suggestedSearchString\\n }}\\n class=\\\"keyword-suggestion\\\"\\n {{on \\\"click\\\" (fn this.applySuggestedKeyword suggestedKeyword)}}\\n />\\n {{/each}}\\n </PopoverMenu>\\n{{/if}}\")","import Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { action, computed } from '@ember/object';\nimport { debounce } from '@ember/runloop';\n\n/**\n * Small interface to define the structure of a keyword suggestion.\n */\nexport interface KeywordSuggestion {\n displayName: string;\n value: string;\n}\n\n/**\n * Returns the user-provided keyword in the search string, if one exists.\n */\nfunction getKeywordInSearchString(searchString?: string): string | null {\n // Look for a desired keyword in the search string.\n const regex = /^[^=:]*(?=[=:]\\s)/,\n matches = searchString?.match(regex);\n\n // If we found one, clean it up and return it.\n return matches ? matches[0].toLowerCase().trim() : null;\n}\n\n/**\n * Returns the keyword that is exactly matched by the user-defined keyword in the search string, if appropriate.\n */\nfunction getMatchedKeyword(\n searchString?: string,\n keywordOptions?: Array<KeywordSuggestion>\n): KeywordSuggestion | undefined {\n // If the user-provided string does not include a potential keyword,\n // then there's definitely not going to be a match.\n const keywordInSearchString = getKeywordInSearchString(searchString);\n if (!keywordInSearchString) {\n return undefined;\n }\n\n // Try to find a keyword in the provided suggestions that exactly matches the one in the search string.\n return keywordOptions?.find((keyword) => keyword.displayName.toLowerCase() === keywordInSearchString);\n}\n\n/**\n * Returns the version of the search string that we should display within the keyword suggestions popup.\n * This can be different from the current search string if the search string includes a keyword.\n */\nfunction getSuggestedSearchString(searchString?: string, keywordOptions?: KeywordSuggestion[]): string {\n return (\n (getMatchedKeyword(searchString, keywordOptions)\n ? // Remove the keyword suggestion and any trailing whitespace from the search string.\n searchString?.replace(/[^=:]*[=:]\\s/, '').trim()\n : // Return the original string.\n searchString?.trim()) ?? ''\n );\n}\n\nexport interface KeywordSearchSignature {\n Element: HTMLInputElement;\n Args: {\n /** Represents the options for keyword suggestions. */\n keywordOptions?: KeywordSuggestion[];\n /** The keyword object to apply. */\n keyword?: KeywordSuggestion | Promise<KeywordSuggestion>;\n /** The search string to apply. */\n searchString?: string;\n /** Triggered when the search string changes. */\n applySearchFn: (searchString: string, keyword: KeywordSuggestion | null | undefined) => void;\n /** Optional CSS class applied to this element. */\n suggestionClass?: string;\n };\n}\n\n/**\n * @classdesc\n * A search bar that provides keyword suggestions.\n */\nexport default class KeywordSearch extends Component<KeywordSearchSignature> {\n // region Properties\n\n /**\n * Whether the popover for suggestions is open.\n */\n @tracked\n showKeywordSuggestionPopover = false;\n\n get displayName(): Promise<string> {\n return (async () => {\n const keyword = await this.args.keyword;\n return keyword?.displayName ?? '';\n })();\n }\n\n /**\n * Contains a list of all keyword suggestions that are matched by the input string.\n * For example, if the search string is \"Name: Headquarters\",\n * this would return both the \"Name:\" and \"Company Name:\" keyword suggestions.\n */\n @computed('args.{keywordOptions,searchString}')\n get matchedKeywordSuggestions(): Array<KeywordSuggestion> | null {\n const keywordInSearchString = getKeywordInSearchString(this.args.searchString);\n if (keywordInSearchString !== null) {\n // The user-provided search string includes a potential keyword. Attempt to find keyword suggestions that match.\n const matchingKeywords = this.args.keywordOptions?.filter((keywordOption) =>\n keywordOption.displayName.toLowerCase().includes(keywordInSearchString)\n );\n\n // If at least one keyword matches the keyword in the search string, return that.\n if (matchingKeywords?.length) {\n return matchingKeywords;\n }\n }\n\n // No matching suggestions were found, so return null.\n return null;\n }\n\n /**\n * Represents the list of keywords to display in the popup, given the current search string.\n * Note that this should account for any keywords already present in the current search string.\n * For example, if the search string is \"Name: Headquarters\",\n * then this should only return the \"Name:\" and \"Company name:\" keyword suggestions.\n */\n @computed('args.keywordOptions', 'matchedKeywordSuggestions')\n get suggestedKeywords(): KeywordSuggestion[] {\n // No valid keyword was found in the search string, so return all the options.\n return this.matchedKeywordSuggestions ?? this.args.keywordOptions ?? [];\n }\n\n /**\n * Gets the suggested search string based on the current input.\n */\n @computed('args.{keywordOptions,searchString}')\n get suggestedSearchString(): string {\n return getSuggestedSearchString(this.args.searchString, this.args.keywordOptions);\n }\n\n // endregion\n\n // region Actions\n\n /**\n * Updates the selected keyword and applies it to the search function.\n */\n @action\n applySuggestedKeyword(keyword: KeywordSuggestion): void {\n // Reset the suggestion popover visibility.\n this.showKeywordSuggestionPopover = false;\n\n // Now apply the search with the new values.\n this.applySearch(this.suggestedSearchString, keyword);\n }\n\n /**\n * Updates and applies the search string.\n */\n @action\n updateSearchString(event: InputEvent & { target: HTMLInputElement }): void {\n // Show the keyword suggestion popover.\n this.showKeywordSuggestionPopover = true;\n\n // Now apply the search function.\n this.applySearch(event.target.value, this.args.keyword);\n }\n\n /**\n * Applies key-based input functions.\n */\n @action\n async keyDownEventListener(event: KeyboardEvent & { target: HTMLInputElement }): Promise<void> {\n // If the user pressed escape, then we want to clear the keyword and close the popup.\n if (event.code === 'Escape') {\n await this.applySearch('', undefined, true);\n this.showKeywordSuggestionPopover = false;\n }\n\n // If the user is pressing enter, then they're presumably trying to apply a search.\n // However, we should have already applied the search, so instead, just close the popover.\n else if (event.code === 'Enter') {\n this.showKeywordSuggestionPopover = false;\n }\n\n // If the user pressed the down arrow key, then we want to re-open the popup.\n else if (event.code === 'ArrowDown') {\n // If the popup is already open, set focus on the first suggestion.\n if (this.showKeywordSuggestionPopover) {\n const elementToFocus: HTMLElement | null = document.querySelector(\n '.keyword-suggestions button.keyword-suggestion:nth-of-type(1)'\n );\n if (elementToFocus) {\n elementToFocus.focus();\n }\n }\n\n // If the popup is not already open, then open it.\n else {\n this.showKeywordSuggestionPopover = true;\n }\n }\n\n // If the user pressed the up arrow key with the popover window open, then we want to select the last suggestion.\n else if (event.code === 'ArrowUp' && this.showKeywordSuggestionPopover) {\n const elementToFocus: HTMLElement | null = document.querySelector(\n '.keyword-suggestions button.keyword-suggestion:last-of-type'\n );\n if (elementToFocus) {\n elementToFocus.focus();\n }\n }\n\n // If the user is pressing backspace at the start of the text input, then remove the keyword.\n else if (this.args.keyword && event.code === 'Backspace' && event.target.selectionStart === 0) {\n const searchString = event.target.value;\n\n // Reapply the search.\n await this.applySearch(searchString);\n }\n }\n\n /**\n * Applies the current search strings.\n */\n async applySearch(\n searchString: string,\n keyword?: KeywordSuggestion | Promise<KeywordSuggestion>,\n skipDebounceTime?: boolean\n ): Promise<void> {\n const matchedKeyword = getMatchedKeyword(searchString, this.args.keywordOptions);\n\n // If there's a specific keyword to apply, search on that.\n if (keyword) {\n keyword = await keyword;\n }\n\n // If there's no keyword applied, but there is one in the search string, then intelligently apply that keyword.\n else if (matchedKeyword) {\n searchString = getSuggestedSearchString(searchString, this.args.keywordOptions);\n keyword = matchedKeyword;\n }\n\n if (skipDebounceTime) {\n this.args.applySearchFn(searchString, keyword ?? null);\n } else {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n debounce(this, this.args.applySearchFn, searchString, keyword, 200);\n }\n }\n\n // endregion\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div\\n class=\\\"list-row-content {{coalesce this.rowContentClass \\'\\'}}\\\"\\n tabindex={{if @on-content-click \\\"0\\\" \\\"-1\\\"}}\\n role={{if @on-content-click \\\"button\\\"}}\\n {{on \\\"click\\\" this.onContentClick}}\\n {{did-update this.callSetActionItems this.showEllipsis}}\\n>\\n {{yield}}\\n</div>\\n{{#if this.collapse}}\\n {{#if (or this.showEllipsis this.actionItemsCollection.length)}}\\n <DropdownActions\\n @dropdownActionsClass=\\\"list-row-tools fs-unmask\\\"\\n @placement=\\\"bottom-end\\\"\\n @title={{this.actionsTitle}}\\n @replaceTriggerWithLoadingSpinner={{true}}\\n @validateOpen={{this.validateActionItemsOpen}}\\n @items={{this.actionItemsCollection}}\\n as |trigger|\\n >\\n <Button::Icon\\n @icon=\\\"more-h\\\"\\n @iconOnly={{true}}\\n @text={{t \\\"@adc/ui-components.openList\\\"}}\\n @buttonColor=\\\"stealth\\\"\\n disabled={{if @areActionsDisabled \\\"true\\\"}}\\n data-test-list-row-item-menu\\n {{trigger}}\\n />\\n </DropdownActions>\\n {{/if}}\\n{{else}}\\n <div class=\\\"list-row-tools fs-unmask\\\">\\n {{#each this.actionItemsCollection as |item|}}\\n {{#if item.visible}}\\n <div class=\\\"list-row-tool\\\">\\n <Button::Async\\n @icon={{item.icon}}\\n @iconOnly={{true}}\\n @text={{item.text}}\\n @buttonColor=\\\"stealth\\\"\\n @buttonAction={{item.action}}\\n disabled={{if item.disabled \\\"true\\\"}}\\n data-test-list-row-item-action={{item.icon}}\\n />\\n </div>\\n {{/if}}\\n {{/each}}\\n </div>\\n{{/if}}\")","// Do not copy this deprecated usage. If you see this, please fix it\n// eslint-disable-next-line ember/no-classic-components\n\nimport { isEnterOrSpaceCode } from '@adc/ember-utils/utils/a11y';\nimport { isFunction } from '@adc/ember-utils/utils/general';\nimport Component from '@ember/component';\nimport { computed, action } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport layout from '../templates/components/list-row-item.hbs';\nimport { ActionItem, DeleteActionItem, EditActionItem } from '../utils/action-item.js';\n\n// region Constants\n\n/**\n * The name of the action property to be called in order to received the action items list.\n *\n * @type {String}\n * @static\n * @memberof components.ListRowItem\n */\nconst ACTIONS_ITEMS_GETTER = 'getActionItems';\n\n// endregion\n\n// region Caching.\n\n/**\n * The translated default text of EditActionItem.\n *\n * @type {String}\n * @static\n * @memberof components.ListRowItem\n */\nlet editText = undefined;\n\n/**\n * The translated default text of DeleteActionItem.\n *\n * @type {String}\n * @static\n * @memberof components.ListRowItem\n */\nlet deleteText = undefined;\n\n// endregion\n\n// region Helper Methods\n\n/**\n * Ensures the action items have the necessary properties required for use in the list-row and they have the desired order.\n *\n * @param {Array<ActionItem>} actionItems - The action items we are validating.\n * @returns {Array<ActionItem>}\n *\n * @static\n * @memberof components.ListRowItem\n */\nfunction validateActionItems(actionItems) {\n let deleteAction = undefined;\n actionItems = actionItems.filter((action) => {\n if (!action) {\n return false;\n }\n\n if (!(action instanceof ActionItem)) {\n console.error(`list-row-item: The item ${action} must be an instance of ActionItem.`);\n return false;\n }\n\n // If action is not visible, do not add it to the list.\n if (!action.visible) {\n return false;\n }\n\n if (action instanceof DeleteActionItem) {\n // Add delete text and icon title if it was not defined.\n action.text = action.text || deleteText;\n action.iconTitle = action.iconTitle || deleteText;\n\n // Cache delete action and do not include it in the array because we will append it.\n deleteAction = action;\n return false;\n }\n\n if (action instanceof EditActionItem) {\n // Add edit text and icon title if it was not defined.\n action.text = action.text || editText;\n action.iconTitle = action.iconTitle || editText;\n }\n\n if (!action.icon || !action.text) {\n console.error(`list-row-item: The item ${action} must have an icon and text.`);\n return false;\n }\n\n return true;\n });\n\n // Add deleteAction to the end if it was defined.\n if (deleteAction) {\n actionItems.push(deleteAction);\n }\n\n return actionItems;\n}\n\n/**\n * Load the action items and set them for use within the template/dropdown\n *\n * @static\n * @memberof components.ListRowItem\n */\nfunction setActionItems() {\n const actions = this[ACTIONS_ITEMS_GETTER];\n\n if (!actions || !isFunction(actions)) {\n return false;\n }\n\n this.set('actionItemsCollection', validateActionItems(actions()));\n}\n\n// endregion\n\n// region Component\n\n/**\n * A flexible container containing content, alongside tools with associated actions.\n *\n * @class ListRowItem\n * @extends Ember.Component\n * @memberof components\n */\n// Do not copy this deprecated usage. If you see this, please fix it\n// eslint-disable-next-line ember/no-classic-classes, ember/require-tagless-components\nexport default Component.extend(\n /** @lends components.ListRowItem# **/ {\n intl: service(),\n\n // region Property Overrides\n\n /** @override */\n layout: layout,\n\n /** @override */\n classNames: ['list-row-item'],\n\n /** @override */\n classNameBindings: ['compact', 'highlightRow'],\n\n attributeBindings: ['dataTestId:data-test-list-row-item'],\n\n /** @override */\n init() {\n this._super(...arguments);\n\n if (!editText) {\n // Cache edit text.\n editText = this.intl.t('@adc/ui-components.edit');\n }\n\n if (!deleteText) {\n // Cache delete text.\n deleteText = this.intl.t('@adc/ui-components.delete');\n }\n\n setActionItems.call(this);\n },\n\n // endregion\n\n // region Properties\n\n /**\n * Should the list-row be highlighted on hover?\n *\n * @type {boolean}\n */\n highlightRow: true,\n\n /**\n * Indicates whether or not the dropdown actions trigger should be disabled.\n *\n * @type {boolean}\n */\n areActionsDisabled: false,\n\n /**\n * Whether to reset the dropdown action items.\n *\n * @type {boolean}\n */\n resetActionItems: false,\n\n /**\n * Whether to reset the dropdown action items.\n *\n * @type {boolean}\n */\n showEllipsis: true,\n\n // endregion\n\n // region Computed Properties\n\n /**\n * The title to be used for the tools dropdown. This property is translated locally for i18n support.\n *\n * @function\n * @returns {String}\n */\n actionsTitle: computed(function () {\n return this.intl.t('@adc/ui-components.dropdownTitle');\n }),\n\n // endregion\n\n /**\n * Listener for keyDown events.\n *\n * @param {KeyboardEvent} event\n */\n keyDown(event) {\n if (isEnterOrSpaceCode(event.code) && event.target.classList.contains('list-row-content')) {\n this.onContentClick();\n }\n },\n // region Actions\n\n callSetActionItems: action(function () {\n setActionItems.call(this);\n }),\n\n /**\n * Load the toolset into the dropdown actions\n */\n validateActionItemsOpen: action(function () {\n // If the model wasn't loaded during initialization or if we need to reset action items, set the actions when the ellipsis is clicked\n if (!this.actionItemsCollection?.length || this.resetActionItems) {\n setActionItems.call(this);\n }\n\n return true;\n }),\n\n /**\n * The action to execute on content click.\n */\n onContentClick: action(function () {\n const action = this['on-content-click'];\n\n if (!action) {\n return;\n }\n\n if (!isFunction(action)) {\n console.error(`list-row-item: action '${action}' is not a function.`);\n return false;\n }\n\n action();\n })\n\n // endregion\n }\n);\n\n// endregion\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div class=\\\"modal-host\\\" ...attributes>\\n {{#let this.modals.modalsToRender as |modals|}}\\n <div\\n role=\\\"button\\\"\\n class=\\\"modal-backdrop {{if modals.length \\'active\\'}}\\\"\\n aria-hidden=\\\"true\\\"\\n {{on \\\"click\\\" this.modalBackdropTrigger}}\\n ></div>\\n {{#each modals as |modal|}}\\n {{! template-lint-disable no-array-prototype-extensions }}\\n <div\\n class={{if (eq modal modals.lastObject) \\\"modal-top\\\" \\\"modal-hidden\\\"}}\\n {{focus-trap isActive=(eq modal modals.lastObject) focusTrapOptions=this.focusTrapOptions}}\\n >\\n {{! @glint-ignore: There is no way to tell glint what the modal.type is }}\\n <modal.type tabindex={{if this.focusSelector -1 0}} @model={{modal.model}} />\\n </div>\\n {{/each}}\\n {{/let}}\\n</div>\")","import Component from '@glimmer/component';\nimport { addWeakListener } from '@adc/ember-utils/utils/event-listeners';\nimport { action, computed } from '@ember/object';\nimport { inject as service } from '@ember/service';\n\nimport type ModalService from '../services/modals.ts';\n\nexport interface ModalsHostSignature {\n Element: HTMLDivElement;\n}\n\n/**\n * @classdesc\n *\n * Component designed to handle rendering of modals\n *\n */\nexport default class ModalsHost extends Component<ModalsHostSignature> {\n @service declare modals: ModalService;\n\n /**\n * option for focus-trap modifier\n */\n focusTrapOptions = {\n escapeDeactivates: false,\n allowOutsideClick: true,\n initialFocus: this.focusSelector,\n preventScroll: true\n };\n\n constructor(owner: unknown, args: any) {\n super(owner, args);\n\n addWeakListener(this, document, 'keyup', this.modalKeyTrigger);\n }\n\n /**\n * Return modal model's focusSelector if it has one\n */\n @computed('modals.modalsToRender')\n get focusSelector(): string | undefined {\n const modals = this.modals.modalsToRender;\n if (!modals.lastObject?.model) {\n return;\n }\n\n return modals.lastObject.model.focusSelector;\n }\n\n /**\n * Close the modal\n */\n @action\n modalBackdropTrigger(): void {\n if (!this.modals.modalsToRender.lastObject?.model?.disableBackdropClose) {\n this.modals.closeModal();\n }\n }\n\n /**\n * Handle keyup events\n */\n @action\n modalKeyTrigger(event: KeyboardEvent): void {\n const { code, target } = event;\n if (code === 'Escape' && (target as HTMLElement).tagName !== 'INPUT') {\n this.modalBackdropTrigger();\n }\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div class=\\\"ui-modal-header\\\" ...attributes>\\n {{yield}}\\n\\n {{#if @title}}\\n <h4 id={{@titleId}}>\\n {{@title}}\\n </h4>\\n {{/if}}\\n\\n {{#unless @disableCloseButton}}\\n <Button::Icon\\n @icon=\\\"close\\\"\\n @iconOnly={{true}}\\n @text={{t \\\"@adc/ui-components.close\\\"}}\\n @buttonColor=\\\"stealth\\\"\\n @buttonAction={{coalesce @customClose this.modals.closeModal}}\\n class=\\\"modal-close\\\"\\n />\\n {{/unless}}\\n</div>\")","import Component from '@glimmer/component';\nimport { inject as service } from '@ember/service';\n\nimport type ModalService from '../../../../services/modals.ts';\n\nexport interface ModalHeaderSignature {\n Element: HTMLDivElement;\n Args: {\n /** The modal header title. */\n title?: string;\n /** The title element ID attribute value, used to label the modal with the title element, for a11y. */\n titleId?: string;\n /** Triggered when the user interacts with the close button. */\n customClose?: () => void;\n /** Indicates the header close button should not be visible. */\n disableCloseButton?: boolean;\n };\n Blocks: {\n default: [];\n };\n}\n\n/**\n * @classdesc\n * Header for modal component, contains title and close button\n */\nexport default class ModalHeader extends Component<ModalHeaderSignature> {\n @service declare modals: ModalService;\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div class=\\\"base-modal\\\" ...attributes {{add-delayed-css \\\"rendered\\\"}}>\\n <div class=\\\"modal\\\" role=\\\"dialog\\\" aria-labelledby={{this.ariaLabelledBy}}>\\n {{yield (component \\\"modals/base/header/modal-header\\\" titleId=this.ariaLabelledBy) to=\\\"header\\\"}}\\n {{yield}}\\n {{yield (component \\\"modals/base/footer/modal-footer\\\") to=\\\"footer\\\"}}\\n </div>\\n</div>\")","import Component from '@glimmer/component';\nimport { guidFor } from '@ember/object/internals';\n\nimport type { ComponentLike, WithBoundArgs } from '@glint/template';\nimport type { ModalFooterSignature } from './footer/modal-footer';\nimport type { ModalHeaderSignature } from './header/modal-header';\n\nexport interface BaseModalSignature {\n Element: HTMLDivElement;\n Blocks: {\n /** The modal header component. */\n header: [WithBoundArgs<ComponentLike<ModalHeaderSignature>, 'titleId'>];\n /** The body of the modal. */\n default: [];\n /** The modal footer component. */\n footer: [ComponentLike<ModalFooterSignature>];\n };\n}\n\n/**\n * @classdesc\n * Base Modal component\n */\nexport default class BaseModal extends Component<BaseModalSignature> {\n get ariaLabelledBy(): string {\n return `${guidFor(this)}_header`;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<Modals::DialogModals::Simple::SimpleDialog\\n @title={{@title}}\\n @buttons={{array\\n (get-modal-button text=(t \\\"@adc/ui-components.cancel\\\") css=\\\"cancel-btn\\\" action=(coalesce @editCancelled (noop)))\\n (get-modal-button text=@buttonText css=(coalesce @buttonCss \\\"confirm-btn\\\") action=this.confirmAction)\\n }}\\n @disableFooterClose={{true}}\\n @disableHeaderClose={{true}}\\n class=\\\"edit-confirmation-modal\\\"\\n ...attributes\\n>\\n {{#if this.errorMessage}}\\n <p class=\\\"error\\\">\\n <SvgSymbol @icon=\\\"issue\\\" />\\n {{this.errorMessage}}\\n </p>\\n {{else}}\\n <div class=\\\"edit-confirm-body\\\">\\n {{yield}}\\n </div>\\n {{/if}}\\n</Modals::DialogModals::Simple::SimpleDialog>\")","import Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { action } from '@ember/object';\nimport { inject as service } from '@ember/service';\n\nimport type ModalService from '../../../../services/modals.ts';\nimport type { SimpleDialogSignature } from '../../dialog-modals/simple/simple-dialog';\n\nexport interface EditConfirmationModalSignature {\n Element: HTMLDivElement;\n Args: Pick<SimpleDialogSignature['Args'], 'title'> & {\n /** Text for the confirm button. */\n buttonText: string;\n /** Triggered when the user interacts with the confirm button. */\n editConfirmed: () => boolean | Promise<any> | void;\n /** Optional CSS class for the confirm button. */\n buttonCss?: string;\n /** Called when the user interacts with the cancel button. */\n editCancelled?: () => any;\n };\n Blocks: {\n default: [];\n };\n}\n\n/**\n * @classdesc\n * Base modal for making confirmation modals such as rename or delete\n */\nexport default class EditConfirmationModal extends Component<EditConfirmationModalSignature> {\n @service declare modals: ModalService;\n\n /**\n * Message to display to user if an error is encountered during operation\n */\n @tracked errorMessage = '';\n\n @action async confirmAction(): Promise<boolean> {\n try {\n const result = await this.args.editConfirmed();\n if (result === false) {\n return Promise.reject();\n }\n\n return true;\n } catch (ex) {\n this.errorMessage = ex;\n return false;\n }\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div class=\\\"simple-dialog-modal\\\" ...attributes>\\n <Modals::Base::BaseModal>\\n <:header as |DialogHeader|>\\n <DialogHeader @title={{@title}} @disableCloseButton={{@disableHeaderClose}} />\\n </:header>\\n\\n <:default>\\n {{yield}}\\n </:default>\\n\\n <:footer as |DialogFooter|>\\n <DialogFooter\\n @buttons={{@buttons}}\\n @disableCloseButton={{@disableFooterClose}}\\n @closeButtonText={{@footerCloseText}}\\n />\\n </:footer>\\n </Modals::Base::BaseModal>\\n</div>\")","import templateOnlyComponent from '@ember/component/template-only';\n\nimport type { ModalFooterSignature } from '../../base/footer/modal-footer';\nimport type { ModalHeaderSignature } from '../../base/header/modal-header';\n\ntype ModalHeaderArgs = ModalHeaderSignature['Args'];\ntype ModalFooterArgs = ModalFooterSignature['Args'];\n\nexport interface SimpleDialogSignature {\n Element: HTMLDivElement;\n Args: Pick<ModalHeaderArgs, 'title'> & {\n /** Indicates the header close button should not be visible. */\n disableHeaderClose?: ModalHeaderArgs['disableCloseButton'];\n /** The buttons to render in the modal footer. */\n buttons?: ModalFooterArgs['buttons'];\n /** Indicates the close button should not be added to the collection of footer buttons. */\n disableFooterClose?: ModalFooterArgs['disableCloseButton'];\n /** Optional text for the automatic close button. */\n footerCloseText?: ModalFooterArgs['closeButtonText'];\n };\n Blocks: {\n default: [];\n };\n}\n\nconst SimpleDialog = templateOnlyComponent<SimpleDialogSignature>();\nexport default SimpleDialog;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<Textarea\\n id={{guid-for this}}\\n class=\\\"multiline-text-input\\\"\\n @value={{@value}}\\n {{on \\\"change\\\" (coalesce @on-change (noop))}}\\n {{on \\\"keydown\\\" this.onKeyDown}}\\n {{on \\\"keyup\\\" this.onKeyUp}}\\n {{on \\\"focusin\\\" this.onFocusIn}}\\n ...attributes\\n/>\")","import Component from '@glimmer/component';\nimport { action } from '@ember/object';\n\n/**\n * Increases the size of the text area as the user types.\n */\nfunction resizeElement(element?: HTMLElement): void {\n if (element) {\n element.style.height = 'auto';\n element.style.height = element.scrollHeight + 'px';\n }\n}\n\nexport interface MultilineTextInputSignature {\n Element: HTMLTextAreaElement;\n Args: {\n /** The input value. */\n value?: string;\n /** Triggered when the user hits the enter key. */\n enter?: () => any;\n /** Triggered when the input value changes. */\n 'on-change'?: (e: KeyboardEvent) => any;\n };\n}\n\n/**\n * @classdesc\n * A textarea that expands and shrinks to fit content.\n */\nexport default class MultilineTextInputComponent extends Component<MultilineTextInputSignature> {\n @action\n onKeyDown(e: KeyboardEvent): void {\n // If we have an @enter argument, assume we want a \"submit\" behavior rather than a newline.\n if (e.key === 'Enter' && this.args.enter) {\n e.preventDefault();\n this.args.enter();\n }\n }\n\n /**\n * Manipulates the textarea element to fit contents.\n */\n @action\n onKeyUp(e: KeyboardEvent & { target: HTMLElement }): void {\n resizeElement.call(this, e.target);\n }\n\n /**\n * Manipulates the textarea element to fit contents.\n */\n @action\n onFocusIn(e: FocusEvent & { target: HTMLElement }): void {\n resizeElement.call(this, e.target);\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div\\n class=\\\"notification elevated {{@notification.type}} {{@notification.cssClass}} {{if @notification.hidden \\'hidden\\'}}\\\"\\n tabindex=\\\"0\\\"\\n aria-live=\\\"{{if @notification.autoCloseDuration \\'polite\\' \\'off\\'}}\\\"\\n aria-describedby=\\\"{{guid-for this}}_text\\\"\\n role=\\\"dialog\\\"\\n {{did-insert this.notificationInserted.perform}}\\n {{on \\\"keyup\\\" this.keyUpHandler}}\\n ...attributes\\n>\\n <SvgSymbol\\n @icon={{@notification.icon}}\\n @title={{@notification.iconTitle}}\\n @fillColor={{@notification.iconFillColor}}\\n @desc={{@notification.iconDesc}}\\n @isHiddenForAccessibility={{@notification.iconIsHiddenForAccessibility}}\\n class=\\\"notification-icon\\\"\\n />\\n\\n <p id=\\\"{{guid-for this}}_text\\\" class=\\\"notification-text\\\">\\n {{@notification.text}}\\n </p>\\n\\n {{#if @notification.buttons}}\\n <div class=\\\"buttons\\\">\\n {{#each @notification.buttons as |button|}}\\n <Button::Async\\n @icon={{coalesce button.icon \\\"\\\"}}\\n @iconOnly={{button.iconOnly}}\\n @text={{button.text}}\\n @buttonColor={{if button.noBackground \\\"stealth\\\"}}\\n @buttonAction={{fn this.buttonClicked button.action}}\\n class={{button.cssClass}}\\n />\\n {{/each}}\\n </div>\\n {{/if}}\\n\\n <Button::Icon\\n @text={{t \\\"@adc/ui-components.close\\\"}}\\n @icon=\\\"close\\\"\\n @iconOnly={{true}}\\n @buttonColor=\\\"stealth\\\"\\n {{on \\\"click\\\" (fn this.closeNotification false)}}\\n class=\\\"close-notification\\\"\\n />\\n</div>\")","import Component from '@glimmer/component';\nimport { ESCAPE_CODE } from '@adc/ember-utils/utils/a11y';\nimport { action } from '@ember/object';\nimport { timeout, task } from 'ember-concurrency';\n\nimport type { Task } from 'ember-concurrency';\nimport type { AppNotification, AppNotificationButton } from '../../services/notification-manager';\n\nexport interface ModalInsetOverlaySignature {\n Element: HTMLDivElement;\n Args: {\n /** The notification to render. */\n notification: AppNotification;\n /** Indicates notifications should close immediately (using to improve test performance). */\n isTesting?: boolean;\n /** Triggered when the user clicks the close button to clear the notification. */\n 'close-notification': (notification: AppNotification, elementToFocus?: Element) => void;\n };\n}\n\n/**\n * @classdesc An individual notification that is displayed within the notification manager.\n */\nexport default class AppNotificationComponent extends Component<ModalInsetOverlaySignature> {\n /**\n * The last focused element before the notification was opened.\n */\n lastFocusedElement: Element | null;\n\n /** @override */\n constructor(owner: unknown, args: ModalInsetOverlaySignature['Args']) {\n super(owner, args);\n\n this.lastFocusedElement = document.activeElement;\n }\n\n /**\n * Closes the notification.\n */\n @action closeNotification(restoreFocus = false): void {\n const { lastFocusedElement } = this;\n this.args['close-notification'](\n this.args.notification,\n restoreFocus && lastFocusedElement ? lastFocusedElement : undefined\n );\n }\n\n /**\n * Closes the notification when the user hits the escape key.\n */\n @action keyUpHandler(event: KeyboardEvent): void {\n if (event.code === ESCAPE_CODE) {\n this.closeNotification(true);\n }\n }\n\n /**\n * Called when the notification is inserted so we can schedule animation and auto close.\n */\n notificationInserted: Task<void, [HTMLElement]> = task({ drop: true }, async (el: HTMLElement) => {\n // Let it render and change CSS so it fades in.\n await timeout(0);\n el.classList.add('in');\n\n const { autoCloseDuration } = this.args.notification,\n { isTesting } = this.args;\n\n if (isTesting || autoCloseDuration) {\n // Wait for close duration then clear CSS so it fades out.\n await timeout(isTesting ? 1 : (autoCloseDuration as number));\n el.classList.remove('in');\n\n // Wait a little bit then close the faded animation.\n await timeout(isTesting ? 1 : 300);\n this.closeNotification(false);\n } else {\n el.focus();\n }\n });\n\n /**\n * Button inside notification was clicked.\n */\n @action buttonClicked(\n fn: AppNotificationButton['action'],\n buttonAnimation: Promise<boolean>\n ): Promise<unknown> | unknown {\n // Get the return value from the callback.\n const returnValue = (fn || (() => {}))(buttonAnimation),\n isPromise = !!returnValue?.then;\n\n Promise.resolve(returnValue).then((result) => {\n // If the click handler explicitly returned false then do NOT close the notification.\n if (result !== false) {\n // Close the notification.\n (isPromise ? buttonAnimation : Promise.resolve()).then(() => this.closeNotification(true));\n }\n });\n\n // Return the value to the button addon so it can animate if needed.\n return returnValue;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div class=\\\"notification-manager {{if @isHidden \\'hidden\\'}}\\\" ...attributes>\\n {{#each this.notificationManager.notifications as |notification|}}\\n <NotificationManager::AppNotification\\n @notification={{notification}}\\n @isTesting={{@isTesting}}\\n @close-notification={{fn this.closeNotification notification @lastFocusedElement}}\\n />\\n {{/each}}\\n</div>\")","import Component from '@glimmer/component';\nimport { isDestroyed } from '@adc/ember-utils/utils/ember-helpers';\nimport { action } from '@ember/object';\nimport { inject as service } from '@ember/service';\n\nimport type { AppNotification } from '../services/notification-manager';\nimport type NotificationManagerService from '../services/notification-manager';\n\nexport interface NotificationManagerSignature {\n Element: HTMLDivElement;\n Args: {\n /** Indicates automated tests are running, which will disable notification closing delay to speed up tests. */\n isTesting?: boolean;\n /** Indicates all notifications should be hidden. */\n isHidden?: boolean;\n /** Optional element to focus on after notification closes. */\n lastFocusedElement?: HTMLElement;\n };\n}\n\n/**\n * @classdesc\n * A container for the number of notifications that might be displayed within an application.\n */\nexport default class NotificationManager extends Component<NotificationManagerSignature> {\n @service declare notificationManager: NotificationManagerService;\n\n /**\n * Tells the notification-manager service to remove the given notification.\n *\n * @param notification - The notification to close.\n * @param [elementToFocus] - The default element to focus on.\n */\n @action closeNotification(notification: AppNotification, elementToFocus?: HTMLElement): void {\n const element = notification.elementToFocus ?? elementToFocus;\n if (element) {\n element.focus();\n }\n\n if (!isDestroyed(notification)) {\n this.notificationManager.removeNotification(notification);\n }\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<PageView @model={{@model}} ...attributes>\\n <:default as |PageViewContainer api|>\\n <PageViewContainer @dataLoaded={{@dataLoaded}} class=\\\"md {{coalesce @cssContainer \\'\\'}}\\\">\\n <:loading as |PageViewLoading|>\\n <PageViewLoading />\\n </:loading>\\n\\n <:default as |data|>\\n {{yield data api}}\\n\\n {{#if @deleteModel}}\\n <RouteView::Content::DeleteModel @model={{@deleteModel}} />\\n {{/if}}\\n\\n {{#if @buttons.confirmAction}}\\n <ActionButtons\\n @shouldGoBackAfterAction={{not @buttons.doNotGoBackAfterAction}}\\n @cancelButtonText={{coalesce @buttons.cancelText (t \\\"generic.cancel\\\")}}\\n @cancelButtonDisabled={{@buttons.cancelDisabled}}\\n @cancel-action={{(this.getCancelButtonAction api.navigation)}}\\n @confirmButtonText={{coalesce @buttons.confirmText (t \\\"generic.save\\\")}}\\n @confirmButtonDisabled={{@buttons.confirmDisabled}}\\n @confirm-action={{@buttons.confirmAction}}\\n @updateNativeToolbarButtons={{api.buttons.update}}\\n @disposeNativeButtons={{api.buttons.dispose}}\\n />\\n {{/if}}\\n </:default>\\n\\n <:error as |PageViewError|>\\n <PageViewError />\\n </:error>\\n </PageViewContainer>\\n </:default>\\n</PageView>\")","import Component from '@glimmer/component';\nimport { action } from '@ember/object';\n\nimport type { ActionButtonsSignature } from '../action-buttons';\nimport type { PageViewSignature } from '../page-view';\nimport type { PageViewContainerSignature } from '../page-view/container';\nimport type { PageViewDeleteSignature } from './delete';\n\ntype ActionButtonArgs = ActionButtonsSignature['Args'];\n\ninterface PageViewActionButtons {\n cancelText?: ActionButtonArgs['cancelButtonText'];\n cancelDisabled?: ActionButtonArgs['cancelButtonDisabled'];\n cancelAction?: ActionButtonArgs['cancel-action'];\n confirmText?: ActionButtonArgs['confirmButtonText'];\n confirmDisabled?: ActionButtonArgs['confirmButtonDisabled'];\n confirmAction?: ActionButtonArgs['confirm-action'];\n doNotGoBackAfterAction?: boolean;\n}\n\ninterface PageViewEditSignature<M> {\n Element: PageViewSignature<M>['Element'];\n Args: Pick<PageViewContainerSignature<M>['Args'], 'model' | 'dataLoaded'> & {\n /** Information about the delete operation. */\n deleteModel?: PageViewDeleteSignature['Args']['model'];\n /** Configuration options for the optional action buttons. */\n buttons: PageViewActionButtons;\n /** Optional CSS class applied to the `<PageView::Container />` component. */\n cssContainer?: string;\n };\n Blocks: {\n default: [PageViewContainerSignature<M>['Blocks']['default'][0], PageViewSignature<M>['Blocks']['default'][1]];\n };\n}\n\nexport default class PageViewEdit<M> extends Component<PageViewEditSignature<M>> {\n /**\n * Returns the cancel button function.\n */\n @action getCancelButtonAction(\n navigationApi?: PageViewSignature<M>['Blocks']['default'][1]['navigation']\n ): ActionButtonArgs['cancel-action'] | undefined {\n const { doNotGoBackAfterAction, cancelAction } = this.args.buttons;\n\n // If there was action defined or click should take user to previous route just use whatever the action was.\n if (cancelAction || !doNotGoBackAfterAction) {\n return cancelAction;\n }\n\n // Ensure that cancel button works correctly.\n return navigationApi?.transitionToPreviousRoute;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<PageView @model={{@model}} ...attributes>\\n <:toolbar as |api|>\\n {{yield api to=\\\"toolbar\\\"}}\\n </:toolbar>\\n\\n <:default as |PageViewContainer api|>\\n <PageViewContainer @dataLoaded={{@dataLoaded}} class={{coalesce @cssContainer \\\"\\\"}}>\\n <:loading as |PageViewLoading|>\\n <PageViewLoading />\\n </:loading>\\n\\n <:default as |data|>\\n {{yield data api}}\\n </:default>\\n\\n <:no-results as |PageViewNoResults|>\\n <PageViewNoResults @typeText={{@noResultsTypeText}} />\\n </:no-results>\\n\\n <:error as |PageViewError|>\\n <PageViewError />\\n </:error>\\n </PageViewContainer>\\n </:default>\\n</PageView>\")","import Component from '@glimmer/component';\n\nimport type { PageViewSignature } from '../page-view';\nimport type { PageViewContainerSignature } from '../page-view/container';\nimport type { NoResultsContentSignature } from '../route-view/view-container/no-results-content';\n\ninterface PageViewListSignature<M> {\n Element: PageViewSignature<M>['Element'];\n Args: Pick<PageViewContainerSignature<M>['Args'], 'model' | 'dataLoaded'> & {\n /** Translated text to indicate the type of items being filtered (passed to `generic.noFilterItems` or `generic.noItems`). */\n noResultsTypeText?: NoResultsContentSignature['Args']['typeText'];\n /** Optional CSS class applied to the `<PageView::Container />` component. */\n cssContainer?: string;\n };\n Blocks: {\n toolbar: [PageViewSignature<M>['Blocks']['toolbar'][0]];\n default: [PageViewContainerSignature<M>['Blocks']['default'][0], PageViewSignature<M>['Blocks']['default'][1]];\n };\n}\n\n// eslint-disable-next-line ember/no-empty-glimmer-component-classes\nexport default class PageViewList<M> extends Component<PageViewListSignature<M>> {}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<TextInput\\n @value={{@value}}\\n @type={{if this.isPasswordMasked \\\"password\\\" \\\"text\\\"}}\\n @containerClass=\\\"password-input {{@containerClass}}\\\"\\n @value-change={{@value-change}}\\n @errorMessage={{@errorMessage}}\\n @showErrorIcon={{@showErrorIcon}}\\n ...attributes\\n>\\n <:after-input>\\n <Button::Icon\\n @iconOnly={{true}}\\n @icon={{if this.isPasswordMasked \\\"eye-crossed\\\" \\\"eye\\\"}}\\n @text={{t (concat \\\"@adc/ui-components.\\\" (if this.isPasswordMasked \\\"hidePassword\\\" \\\"revealPassword\\\"))}}\\n @buttonAction={{fn (mut this.isPasswordMasked) (not this.isPasswordMasked)}}\\n @buttonColor=\\\"stealth\\\"\\n class=\\\"password-mask-button\\\"\\n aria-live=\\\"polite\\\"\\n {{on \\\"click\\\" (coalesce @onClick (noop))}}\\n />\\n </:after-input>\\n</TextInput>\")","import Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\n\nimport type { TextInputSignature } from './text-input.ts';\n\nexport interface PasswordInputSignature {\n Element: TextInputSignature['Element'];\n Args: Pick<\n TextInputSignature['Args'],\n 'value' | 'value-change' | 'errorMessage' | 'showErrorIcon' | 'containerClass'\n > & { onClick?: VoidFunction };\n}\n\n/**\n * @classdesc\n * Component designed for a password input.\n */\nexport default class PasswordInputComponent extends Component<PasswordInputSignature> {\n /**\n * Is the password masked?\n */\n @tracked isPasswordMasked = true;\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{! template-lint-disable require-input-label }}\\n<input\\n type=\\\"input\\\"\\n class=\\\"pikaday-input {{if @showIcon \\'show-icon\\'}} {{if this.hasTimeZone \\'has-time-zone\\'}}\\\"\\n disabled={{if @disabled \\\"true\\\"}}\\n ...attributes\\n {{did-insert this.initPikaday}}\\n {{will-destroy this.cleanupPikaday}}\\n {{did-update this.hidePikaday @disabled}}\\n/>\")","import { action, set } from '@ember/object';\nimport { isEmpty } from '@ember/utils';\nimport BasePikaday from './date-time-picker/base-pikaday.js';\n\n/**\n * @classdesc\n * Text input control that will open the calendar picker on click, then host the selected date as text.\n */\nexport default class PikadayInputComponent extends BasePikaday {\n /** @override */\n onPikadayOpen() {\n this.onOpen();\n }\n\n /** @override */\n onPikadayClose() {\n if (this.pikaday.getDate() === null || isEmpty(this.field.value)) {\n set(this, 'value', null);\n this.onSelection(null);\n }\n\n this.onClose();\n }\n\n @action initPikaday(el) {\n set(this, 'field', el);\n this.setupPikaday();\n\n // Update configuration.\n this.setMinDate();\n this.setMaxDate();\n this.setPikadayDate();\n\n if (this.options) {\n this.updateOptions();\n }\n\n this.hidePikaday();\n }\n\n @action hidePikaday() {\n if (this.disabled) {\n this.pikaday?.hide();\n }\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div class=\\\"pin-input-container {{@containerClass}}\\\" {{did-update this.onExternalValueChange @value}}>\\n {{#if @description}}\\n <div class=\\\"description\\\">\\n {{@description}}\\n </div>\\n {{/if}}\\n\\n <div class=\\\"input-wrapper\\\">\\n {{#if this.isCodeVisible}}\\n <TextInput\\n @containerClass=\\\"pin-input\\\"\\n @value={{this.internalValue}}\\n placeholder={{this.placeholder}}\\n @type=\\\"tel\\\"\\n aria-live=\\\"polite\\\"\\n @onlyAllowNumbers={{this.onlyAllowNumbers}}\\n @errorMessage={{coalesce @errorMessage \\\"\\\"}}\\n @errorTooltipPlace={{coalesce @errorTooltipPlace \\\"bottom\\\"}}\\n @autoDestroy={{@autoDestroy}}\\n maxlength={{coalesce @maxPinLength 8}}\\n disabled={{or @disabled @disablePinInput}}\\n @value-change={{this.debouncedValueChange}}\\n ...attributes\\n />\\n {{else}}\\n <div class=\\\"hidden-code-box\\\">\\n <SvgSymbol @icon=\\\"asterisk\\\" />\\n <SvgSymbol @icon=\\\"asterisk\\\" />\\n <SvgSymbol @icon=\\\"asterisk\\\" />\\n <SvgSymbol @icon=\\\"asterisk\\\" />\\n </div>\\n {{/if}}\\n </div>\\n\\n {{#if (and @get-random-pin this.buttonLabelInternal this.isCodeVisible)}}\\n <div class=\\\"button-wrapper\\\">\\n <Button::Async\\n class=\\\"generate-pin-button\\\"\\n @text={{this.buttonLabelInternal}}\\n @buttonStyle=\\\"link\\\"\\n disabled={{or @disabled @disableGeneratePinButton}}\\n @buttonAction={{this.generateRandomPin}}\\n />\\n </div>\\n {{/if}}\\n</div>\")","import Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { isFunction } from '@adc/ember-utils/utils/general';\nimport { isPromise } from '@adc/ember-utils/utils/rsvp';\nimport { computed, action } from '@ember/object';\nimport { scheduleOnce } from '@ember/runloop';\nimport { inject as service } from '@ember/service';\nimport { Promise as EmberPromise } from 'rsvp';\n\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type { TextInputSignature } from './text-input';\n\ntype TextInputSignatureArgs = TextInputSignature['Args'];\n\n/**\n * Action name constants to be triggered from inside this component.\n */\nconst GENERATE_PIN_ACTION = 'get-random-pin',\n PIN_CHANGED_ACTION = 'value-change';\n\ninterface PinInputSignature {\n Element: TextInputSignature['Element'];\n Args: Pick<TextInputSignatureArgs, 'errorMessage' | 'errorTooltipPlace' | 'autoDestroy'> & {\n /** The pin code input value. */\n value?: string;\n /** Flag to specify whether to show the pin code as it is, or hide it with asterisk icons. */\n isCodeVisible?: boolean;\n /** Should only numbers be allowed as input? */\n onlyAllowNumbers?: boolean;\n /** The minimum pin code length. */\n minPinLength?: number;\n /** The maximum pin code length. */\n maxPinLength?: number;\n /** Indicates the input and the generate pin button are disabled. */\n disabled?: boolean;\n /** Indicates the pin-input component is disabled. */\n disablePinInput?: boolean;\n /** Indicates the generate pin button is disabled. */\n disableGeneratePinButton?: boolean;\n /** Optional text for the generate button (defaults to generate). */\n buttonLabel?: string;\n /** Triggered when the user interacts with the generate code button. */\n [GENERATE_PIN_ACTION]?: () => any;\n /** Triggered when the pin value was changed. */\n [PIN_CHANGED_ACTION]?: (value?: string) => any;\n /** Text to be displayed above the input field. */\n description?: string;\n /** Class name for the pin input container. */\n containerClass?: string;\n };\n}\n\n/**\n * @classdesc\n * The purpose of this component is to show or read a pin code from the user.\n */\nexport default class PinInput extends Component<PinInputSignature> {\n // region Services\n\n @service declare intl: ADCIntlService;\n\n // endregion\n\n constructor(owner: unknown, args: PinInputSignature['Args']) {\n super(owner, args);\n\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n scheduleOnce('afterRender', this, this.onExternalValueChange);\n }\n\n // region Internal Properties\n\n /**\n * The internal value of the pin input.\n */\n @tracked internalValue?: string;\n\n /**\n * Whether or not the code should be hidden with asterisks.\n *\n * @note When set to false, 4 asterisks are shown regardless of the value property.\n */\n get isCodeVisible(): boolean {\n return this.args.isCodeVisible ?? true;\n }\n\n /**\n * Should only numbers be allowed as input?\n */\n get onlyAllowNumbers(): boolean {\n return this.args.onlyAllowNumbers ?? true;\n }\n\n // endregion\n\n // region Computed Properties\n\n /**\n * Generates the string to be used as a placeholder for the input field.\n */\n @computed('args.minPinLength')\n get placeholder(): string {\n const { minPinLength } = this.args,\n placeholderDigitsNumber: number = minPinLength && minPinLength > 0 ? minPinLength : 4;\n let placeholderString = '';\n\n for (let count = 0; count < placeholderDigitsNumber; count++) {\n placeholderString += '-';\n }\n\n return placeholderString;\n }\n\n /**\n * Text value to be shown on generate random code button. This property is translated locally for i18n support.\n */\n @computed('args.buttonLabel')\n get buttonLabelInternal(): string {\n return this.args.buttonLabel || this.intl.t('@adc/ui-components.generate');\n }\n\n // endregion\n\n /**\n * Calls the provided <GENERATE_PIN_ACTION> action and updates the value with the result. If the function returns a promise, the \"Generate Button\" styling will update according the promise status.\n *\n * @return {undefined|Promise}\n */\n @action\n generateRandomPin(): void {\n const generatePinMethod = this.args[GENERATE_PIN_ACTION];\n\n if (generatePinMethod && isFunction(generatePinMethod)) {\n const generateMethodResult = generatePinMethod(),\n resultPromise = isPromise(generateMethodResult)\n ? generateMethodResult\n : EmberPromise.resolve(generateMethodResult);\n\n resultPromise.then((newValue: string) => this.debouncedValueChange(newValue));\n\n return resultPromise;\n }\n }\n\n /**\n * Validates the new value of the input and calls the \"value-change\" action.\n *\n * @param newValue\n */\n @action\n debouncedValueChange(newValue: string): void {\n const onChange = this.args[PIN_CHANGED_ACTION];\n\n this.internalValue = newValue;\n\n if (onChange && isFunction(onChange)) {\n onChange(this.internalValue);\n }\n }\n\n /**\n * Updates the internal value when the external value changes.\n */\n @action\n onExternalValueChange(): void {\n const { value } = this.args;\n\n this.internalValue = value;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div id=\\\"qr-code\\\" {{did-insert this.initializeQRCode}} {{did-update this.makeQRCode this.data}}>\\n</div>\")","import Component from '@glimmer/component';\nimport { action } from '@ember/object';\n\n/**\n * QR code image sizes.\n */\nconst QRCodeSizes = {\n small: '144',\n medium: '240',\n large: '400'\n};\n\n/**\n * QRErrorCorrectLevel extracted from the qrcode.js library.\n */\nconst QRErrorCorrectLevel = {\n L: 1,\n M: 0,\n Q: 3,\n H: 2\n};\n\n/**\n * The QRCode from the qrcode.js library.\n */\ndeclare class QRCode {\n constructor(el: HTMLElement | string, vOption: Record<string, unknown> | string);\n\n makeCode(data: string): void;\n}\n\ninterface QrCodeSignature {\n Args: {\n /** The size of the QR symbol to render. */\n size?: 'small' | 'medium' | 'large';\n /** The QR data. */\n data: string;\n /** The hex value of the QR symbol dark color (defaults to `#000`). */\n darkColor?: string;\n /** The hex value of the QR symbol light color (defaults to `#fff`). */\n lightColor?: string;\n /** The QR correction level (defaults to \"L\"). */\n correctionLevel?: 'L' | 'M' | 'Q' | 'H';\n };\n}\n\n/**\n * @classdesc QR code generation in js.\n *\n * @note This implementation allows for only 1 QR code per page (only 1 QR code can be on the DOM).\n *\n * @note This qr-code component uses a qrcode.js file from a third party to generate a QR code using javascript.\n * Another .js file could be substituted for the one we use here in the future if necessary.\n */\nexport default class QrCodeComponent extends Component<QrCodeSignature> {\n /**\n * The QR Code.\n */\n qrcode?: QRCode;\n\n /**\n * The data for the QR code to represent.\n *\n * @type {String}\n */\n get data(): string {\n return this.args.data;\n }\n\n /**\n * Generates the QR code.\n */\n @action\n initializeQRCode(): void {\n const { args } = this,\n { data } = args,\n size = args.size,\n qrDimension = QRCodeSizes[size ?? 'small'] || QRCodeSizes['small'];\n\n this.qrcode = new QRCode('qr-code', {\n text: data,\n width: qrDimension,\n height: qrDimension,\n colorDark: args.darkColor ?? '#000000',\n colorLight: args.lightColor ?? '#ffffff',\n correctLevel: QRErrorCorrectLevel[args.correctionLevel ?? 'L']\n });\n\n this.qrcode.makeCode(data);\n }\n\n /**\n * Recreates the QR code if the data changes.\n */\n @action\n makeQRCode(_: any, [data]: [string]): void {\n this.qrcode?.makeCode(data);\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{#if this.deleteAction}}\\n <section ...attributes>\\n <Button::Simple\\n @text={{this.text}}\\n @buttonColor=\\\"danger\\\"\\n @buttonStyle=\\\"inverted\\\"\\n class=\\\"delete-model\\\"\\n {{on \\\"click\\\" (coalesce this.deleteAction (noop))}}\\n />\\n </section>\\n{{/if}}\")","import Component from '@glimmer/component';\nimport { computed } from '@ember/object';\nimport { inject as service } from '@ember/service';\n\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type ModalService from '../../../services/modals.ts';\nimport type { ModalButtonConfig } from '../../modals/base/footer/modal-footer';\n\ntype DeleteModel = {\n action: ModalButtonConfig['action'];\n text?: string;\n requireConfirmation?: boolean;\n confirmTitle?: string;\n confirmText?: string;\n confirmButtonText?: string;\n};\n\nexport interface DeleteModelSignature {\n Element: HTMLElement;\n Args: {\n /** Information about the delete operation. */\n model: DeleteModel;\n };\n}\n\n/**\n * @classdesc\n * Component for consistent styling of delete model functionality in route-views.\n */\nexport default class DeleteModelComponent extends Component<DeleteModelSignature> {\n @service declare modals: ModalService;\n @service declare intl: ADCIntlService;\n\n /**\n * Text to be shown in the delete button.\n */\n @computed('args.model.text')\n get text(): string {\n return this.args.model.text ?? this.intl.t('generic.delete');\n }\n\n /**\n * Determines the correct action for the button.\n */\n @computed('args.model.{action,confirmButtonText,confirmText,confirmTitle,requireConfirmation}', 'text')\n get deleteAction(): (() => Promise<void>) | VoidFunction | undefined {\n const { intl } = this,\n { action: fnAction, requireConfirmation } = this.args.model;\n\n if (!fnAction) {\n console.error('Action must be defined for the delete-model');\n return undefined;\n }\n\n // If confirmation is not required, then just use the action.\n if (!requireConfirmation) {\n return fnAction;\n }\n\n const {\n confirmTitle = this.text,\n confirmText = intl.t('generic.areYouSure'),\n confirmButtonText = intl.t('generic.delete')\n } = this.args.model;\n\n // Use confirmation dialog and if user confirms then execute the action.\n return () => {\n this.modals.showConfirmationDialog(confirmTitle, confirmText, {\n text: confirmButtonText,\n css: 'btn-color-danger',\n action: fnAction\n });\n };\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{#if @isRejected}}\\n <div class=\\\"error-content\\\">\\n {{#if (has-block)}}\\n {{yield (hash errorText=@errorText)}}\\n {{else}}\\n <InlineAlert @text={{@errorText}} @type=\\\"danger\\\" />\\n {{/if}}\\n </div>\\n <LastRenderMark @markEndOfRendering={{@markEndOfRendering}} />\\n{{/if}}\")","import templateOnlyComponent from '@ember/component/template-only';\n\nimport type { SafeString } from '@ember/template';\n\nexport interface ErrorContentSignature {\n Args: {\n /** Indicates the route view model promise rejected. */\n isRejected?: boolean;\n /** Optional error text to display. */\n errorText?: string | SafeString;\n /** Triggered when this component is done rendering. */\n markEndOfRendering: () => void;\n };\n Blocks: {\n /** Yields the error text. */\n default: [\n {\n errorText?: ErrorContentSignature['Args']['errorText'];\n }\n ];\n };\n}\n\nconst RouteViewContentErrorContent = templateOnlyComponent<ErrorContentSignature>();\nexport default RouteViewContentErrorContent;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{#if @isPending}}\\n <div\\n class=\\\"pending-content {{if this.show \\'show\\'}}\\\"\\n {{did-insert this.showHideElement.perform}}\\n {{did-update this.showHideElement.perform @isPending}}\\n >\\n {{#if (has-block)}}\\n {{yield}}\\n {{else}}\\n <div class=\\\"loading-indicator\\\">\\n <SpinnerSvg @spinning={{true}} @size=\\\"small\\\" />\\n </div>\\n {{/if}}\\n </div>\\n{{/if}}\")","import Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { timeout, task } from 'ember-concurrency';\n\nimport type { Task } from 'ember-concurrency';\n\nexport interface PendingContentSignature {\n Args: {\n /** Indicates the route-view model is still pending. */\n isPending?: boolean;\n /** The amount of milliseconds to delay the transition to fulfilled. */\n showDelay?: number;\n };\n Blocks: {\n default: [];\n };\n}\n\n/**\n * Component used for displaying \"waiting\" message to the end user.\n */\nexport default class PendingContent extends Component<PendingContentSignature> {\n /**\n * Show the content?\n */\n @tracked show = false;\n\n /**\n * Delay in ms after which this component is shown.\n */\n get showDelay(): number {\n return this.args.showDelay ?? 500;\n }\n\n /**\n * Handles showing/hiding changes.\n */\n showHideElement: Task<void, never> = task({ drop: true }, async () => {\n if (this.args.isPending) {\n await timeout(this.showDelay);\n this.show = this.args.isPending;\n }\n });\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<RouteView::ViewContainer\\n @model={{@model}}\\n @class={{this.containerMaxWidthClass}}\\n @contentClass={{@contentClass}}\\n @dataLoaded={{@dataLoaded}}\\n @maxWidth={{this.containerMaxWidth}}\\n as |container|\\n>\\n <container.loading />\\n\\n <container.body>\\n {{yield (hash body=container.body)}}\\n\\n {{#if this.deleteModel}}\\n <RouteView::Content::DeleteModel @model={{this.deleteModel}} />\\n {{/if}}\\n\\n {{#if this.buttons.confirmAction}}\\n <ActionButtons\\n @shouldGoBackAfterAction={{not this.buttons.doNotGoBackAfterAction}}\\n @cancelButtonText={{this.cancelButtonText}}\\n @cancelButtonDisabled={{this.buttons.cancelDisabled}}\\n @cancel-action={{this.cancelButtonAction}}\\n @confirmButtonText={{this.confirmButtonText}}\\n @confirmButtonDisabled={{this.buttons.confirmDisabled}}\\n @confirm-action={{this.buttons.confirmAction}}\\n @updateNativeToolbarButtons={{this.updateNativeToolbarButtons}}\\n @disposeNativeButtons={{this.disposeNativeButtons}}\\n />\\n {{/if}}\\n\\n </container.body>\\n\\n <container.error />\\n\\n</RouteView::ViewContainer>\")","import { computed, set } from '@ember/object';\nimport RouteView from '../route-view.js';\n\n/**\n * @classdesc\n * Root component for all \"edit\" routes.\n */\nexport default class EditView extends RouteView {\n /** @override */\n useRouteViewClass = true;\n\n /** @override */\n containerMaxWidth = 'md';\n\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/classic-decorator-hooks\n init(...args) {\n super.init(...args);\n\n if (!this.buttons) {\n console.error('Buttons object is not defined');\n // Fake buttons object so that things do not crash.\n set(this, 'buttons', {});\n } else if (!this.buttons.confirmAction) {\n console.error('Action for confirm button is not defined');\n }\n }\n\n /**\n * Optional definition for a delete model button.\n *\n * @type {components.route-view.content.DeleteModel.DeleteModelType|undefined}\n */\n deleteModel;\n\n /**\n * Buttons for action buttons.\n *\n * @type {components.route-view.EditView.RouteViewActionButtonsType|undefined}\n */\n buttons;\n\n /**\n * Text for the cancel button.\n *\n * @type {String}\n */\n @computed('buttons.cancelText', 'intl')\n get cancelButtonText() {\n return this.buttons.cancelText || this.intl.t('generic.cancel');\n }\n\n /**\n * Text for the confirm button.\n *\n * @type {String}\n */\n @computed('buttons.confirmText', 'intl')\n get confirmButtonText() {\n return this.buttons.confirmText || this.intl.t('generic.save');\n }\n\n /**\n * Action to be passed to the cancel button.\n *\n * @type {Function}\n */\n @computed('buttons.{cancelAction,doNotGoBackAfterAction}', 'navigationApi.transitionToPreviousRoute')\n get cancelButtonAction() {\n const { doNotGoBackAfterAction, cancelAction } = this.buttons;\n\n // If there was action defined or click should take user to previous route just use whatever the action was.\n if (cancelAction || !doNotGoBackAfterAction) {\n return cancelAction;\n }\n\n // Ensure that cancel button works correctly.\n return this.navigationApi?.transitionToPreviousRoute;\n }\n}\n\n/**\n * Buttons object definition for route-view subclasses\n *\n * @typedef {{\n * cancelText: String=,\n * cancelDisabled: boolean=,\n * cancelAction: Function=,\n * confirmText: String=,\n * confirmDisabled: boolean=,\n * confirmAction: Function,\n * doNotGoBackAfterAction: boolean=\n * }} components.route-view.EditView.RouteViewActionButtonsType\n *\n * @property {String=} cancelText - Optional text for cancel button. If none defined, \"Cancel\" is used.\n * @property {boolean=} cancelDisabled - If set to true, cancel button will be disabled.\n * @property {Function=} cancelAction - Optional function to be executed when cancel button is clicked.\n * @property {String=} confirmText - Optional text for confirm button. If none defined, \"Save\" is used.\n * @property {boolean=} confirmDisabled - If set to true, confirm button will be disabled.\n * @property {Function} confirmAction - Function to be executed when confirm button is clicked.\n * @property {boolean} doNotGoBackAfterAction - Action buttons will by default redirect to the previous route after action. Setting this to true will prevent that.\n *\n * @memberof components.route-view.EditView\n */\n","import { isArray } from '@ember/array';\nimport { computed, get } from '@ember/object';\n// eslint-disable-next-line ember/use-ember-data-rfc-395-imports\nimport DS from 'ember-data';\n\n/**\n * @classdesc\n * Promise wrapper for standard WebApi request result.\n */\nexport default class WebApiPromise extends DS.PromiseObject<any> {\n declare isFulfilled: boolean;\n\n declare content: any;\n\n /**\n * Returns true if the request has been fulfilled and has items.\n */\n @computed('content', 'isFulfilled', 'hasNoResults')\n get hasData(): boolean {\n return this.isFulfilled && this.content && !this.hasNoResults;\n }\n\n /**\n * Returns true if the request has been fulfilled but does not contain any data.\n */\n @computed('isFulfilled', 'content', 'content.meta.totalCount')\n get hasNoResults(): boolean {\n const { content, isFulfilled } = this;\n\n return (\n isFulfilled &&\n content &&\n (get(content, 'meta.totalCount') === 0 || (isArray(content) && content.length === 0))\n );\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{! template-lint-disable no-yield-only }}\\n{{yield}}\")","// Do not copy this deprecated usage. If you see this, please fix it\n// eslint-disable-next-line ember/no-classic-components\nimport Component from '@ember/component';\n\n/**\n * Inner component used in view-container.\n */\n// Do not copy this deprecated usage. If you see this, please fix it\n// eslint-disable-next-line ember/require-tagless-components\nexport default class ViewContent extends Component {\n classNames = ['view-content'];\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div class=\\\"heading row\\\" ...attributes>\\n {{#if (has-block)}}\\n {{yield}}\\n {{else}}\\n {{#each @items as |cell|}}\\n <h4 class=\\\"{{cell.css}} list-header\\\">{{cell.text}}</h4>\\n {{/each}}\\n {{/if}}\\n</div>\")","import templateOnlyComponent from '@ember/component/template-only';\n\nexport interface HeaderContentSignature {\n Element: HTMLDivElement;\n Args: {\n /** The header items to render. */\n items?: { css?: string; text: string }[];\n };\n Blocks: {\n default: [];\n };\n}\n\nconst RouteViewViewContainerHeaderContent = templateOnlyComponent<HeaderContentSignature>();\nexport default RouteViewViewContainerHeaderContent;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<RouteView::ViewContainer::ViewContent\\n @tagName={{this.computedContentTagName}}\\n @class={{concat this.contentClass \\\" \\\" this.contentWidthClass}}\\n>\\n {{yield\\n (hash\\n loading=(component \\\"route-view/content/pending-content\\\" isPending=this.promise.isPending)\\n header=(component \\\"route-view/view-container/header-content\\\" data=this.promise.content)\\n body=(component\\n \\\"route-view/content/fulfilled-content\\\"\\n hasData=this.promise.hasData\\n data=this.promise.content\\n hasCalledDataLoadedAction=this.hasCalledDataLoadedAction\\n markEndOfRendering=this.markEndOfRendering\\n )\\n noResults=(component\\n \\\"route-view/view-container/no-results-content\\\"\\n hasNoResults=this.promise.hasNoResults\\n search=@search\\n typeText=@typeText\\n markEndOfRendering=this.markEndOfRendering\\n )\\n error=(component\\n \\\"route-view/content/error-content\\\"\\n isRejected=this.promise.isRejected\\n errorText=this.errorText\\n markEndOfRendering=this.markEndOfRendering\\n )\\n isPending=this.promise.isPending\\n isSettled=this.promise.isSettled\\n isRejected=this.promise.isRejected\\n isFulfilled=this.promise.isFulfilled\\n hasData=this.promise.hasData\\n hasNoResults=this.promise.hasNoResults\\n headerItems=@headerItems\\n data=this.promise.content\\n hasCalledDataLoadedAction=this.hasCalledDataLoadedAction\\n )\\n }}\\n</RouteView::ViewContainer::ViewContent>\")","// Do not copy this deprecated usage. If you see this, please fix it\n// eslint-disable-next-line ember/no-classic-components\nimport Component from '@ember/component';\nimport { assert } from '@ember/debug';\nimport { computed, set } from '@ember/object';\nimport { addObserver, removeObserver } from '@ember/object/observers';\nimport { inject as service } from '@ember/service';\nimport { resolve } from 'rsvp';\nimport WebApiPromise from '../web-api-promise.ts';\n\nconst CONTENT_WIDTHS = ['small', 'large', 'full'];\n\n/**\n * @classdesc\n * Main content wrapper element.\n */\n// Do not copy this deprecated usage. If you see this, please fix it\n// eslint-disable-next-line ember/require-tagless-components\nexport default class ViewContainer extends Component {\n @service performanceMonitor;\n @service router;\n @service intl;\n\n classNames = ['view-container', 'surface'];\n\n /** @override */\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/classic-decorator-hooks\n init(...args) {\n super.init(...args);\n\n if (this.removeDefaultClasses) {\n set(this, 'classNames', []);\n }\n\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-observers\n addObserver(this, 'promise.isFulfilled', this, this.isFulfilledObserver);\n\n this.isFulfilledObserver();\n }\n\n willDestroy() {\n removeObserver(this, 'promise.isFulfilled', this, this.isFulfilledObserver);\n\n super.willDestroy();\n }\n\n /**\n * Remove the default classes defined in classNames?\n *\n * @type {boolean}\n */\n removeDefaultClasses = false;\n\n /**\n * Have we already reported the route timing?\n *\n * @type {boolean}\n */\n wasRouteTimingReported = false;\n\n /**\n * Records the route URL used when the route timing was reported.\n *\n * @type {string}\n */\n urlForReportedRouteTiming = '';\n\n /**\n * Tag name for the inner content element.\n *\n * @note Predefining to null so that it can be easily detected that it was overridden.\n *\n * @type {String|null}\n */\n contentTagName = null;\n\n /**\n * Additional class names for the inner content element.\n *\n * @type {String}\n */\n contentClass = '';\n\n /**\n * The width of the content.\n *\n * @type {ContentWidth | undefined}\n */\n contentWidth;\n\n /**\n * Class name for the content width.\n *\n * @type {'small-width'|'large-width'|'full-width'|''}\n */\n @computed('contentWidth')\n get contentWidthClass() {\n if (this.contentWidth) {\n assert(\n '[@adc/ui-components] contentWidth value should be \"small\" or \"large\" or \"full\".',\n CONTENT_WIDTHS.includes(this.contentWidth)\n );\n\n return `${this.contentWidth}-width`;\n }\n\n return '';\n }\n\n /**\n * Has the consumer 'dataLoaded' action been triggered, meaning the container.body\n * section is ready to be displayed?\n *\n * @type {boolean}\n */\n hasCalledDataLoadedAction = false;\n\n /**\n * Tag name that is passed to view-content.\n *\n * @type {String}\n */\n @computed('contentTagName', 'tagName', 'contentClass')\n get computedContentTagName() {\n const { contentTagName, tagName, contentClass } = this;\n\n // If there was a passed in contentTagName then use that.\n if (contentTagName !== null) {\n return contentTagName;\n }\n\n // If tagName of view-container is empty, then pass that through unless contentClass is defined.\n if (!tagName && !contentClass) {\n return tagName;\n }\n\n // Generic case - return div.\n return 'div';\n }\n\n /**\n * String to be shown when promise rejects.\n *\n * @type {String}\n */\n @computed('promise.reason.errors.firstObject.detail')\n get errorText() {\n // Return either error from the promise or generic error.\n return this.promise?.reason?.errors?.[0]?.detail || this.intl.t('generic.requestError');\n }\n\n /**\n * Wrapper for the passed in promise that gives us information about the promise.\n *\n * @type {WebApiPromise}\n */\n @computed('model')\n get promise() {\n // Right now we do not allow RSVP hash. The reason is that it would be hard to observe changes so it might not be worth it.\n // Additionally, we will most likely always have only 1 thing to load up to display and others can be loaded asynchronously.\n return WebApiPromise.create({\n promise: resolve(this.model)\n });\n }\n\n /**\n * Sends action with data once promise data loads.\n */\n isFulfilledObserver() {\n const { dataLoaded, promise: { isFulfilled, content } = {} } = this;\n\n // NOTE: isFulfilled will be true even if RouteView does not have a model.\n if (\n isFulfilled &&\n (!this.wasRouteTimingReported || this.urlForReportedRouteTiming !== this.router.currentURL)\n ) {\n // isFulfilledObserver can fire multiple times if the model changes. We can't fire this multiple times though, because\n // our metrics aren't built around having the same route resolve multiple times.\n this.wasRouteTimingReported = true;\n this.urlForReportedRouteTiming = this.router.currentURL;\n this.performanceMonitor.markModelResolved(this.router.currentRouteName);\n }\n\n if (!isFulfilled) {\n return;\n }\n\n if (dataLoaded) {\n dataLoaded(content);\n }\n\n set(this, 'hasCalledDataLoadedAction', true);\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{#if @hasNoResults}}\\n <div class=\\\"no-results\\\">\\n {{#if (has-block)}}\\n {{yield}}\\n {{else}}\\n <p>\\n {{t (concat \\\"generic.\\\" (if @search \\\"noFilterResults\\\" \\\"noItems\\\")) type=@typeText}}\\n </p>\\n {{/if}}\\n </div>\\n <LastRenderMark @markEndOfRendering={{@markEndOfRendering}} />\\n{{/if}}\")","import templateOnlyComponent from '@ember/component/template-only';\n\nexport interface NoResultsContentSignature {\n Args: {\n /** Indicates the route-view model resolved to have no results */\n hasNoResults?: boolean;\n /** I can't find anywhere this is used. */\n search?: string;\n /** The type of item searched for. */\n typeText?: string;\n /** Triggered when this component is done rendering. */\n markEndOfRendering?: () => void;\n };\n Blocks: {\n default: [];\n };\n}\n\nconst RouteViewViewContainerNoResultsContent = templateOnlyComponent<NoResultsContentSignature>();\nexport default RouteViewViewContainerNoResultsContent;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div\\n class=\\\"schedule-picker\\\"\\n tabindex=\\\"0\\\"\\n title={{@title}}\\n ...attributes\\n {{did-insert this.focusActiveElement}}\\n {{did-insert this.pickerChangeUpdate}}\\n {{did-update this.pickerChangeUpdate this.internalBeginTimeInMilliseconds}}\\n {{did-update this.pickerChangeUpdate this.internalEndTimeInMilliseconds}}\\n {{did-update this.externalBeginTimeUpdate @beginTimeInMinutes}}\\n {{did-update this.externalEndTimeUpdate @endTimeInMinutes}}\\n>\\n <div tabindex=\\\"0\\\" aria-label={{@daysPlaceholder}}>\\n <label class=\\\"days-label\\\">\\n {{@daysPlaceholder}}\\n </label>\\n <div class=\\\"simple-btn-group {{if @compactMode \\'compact\\'}}\\\">\\n {{#each this.days as |button|}}\\n <Button::Simple\\n @text={{button.text}}\\n @buttonAction={{fn this.selectDay button}}\\n @buttonColor={{if button.selected \\\"primary\\\"}}\\n aria-label={{concat button.fullDayName \\\" \\\" (if button.selected (t \\\"@adc/ui-components.selected\\\"))}}\\n data-id={{concat \\\"day-\\\" button.fullDayName}}\\n disabled={{if (or @disabled button.disabled) \\\"true\\\"}}\\n />\\n {{/each}}\\n </div>\\n </div>\\n\\n {{#unless @hideTimePicker}}\\n <div class=\\\"time-range\\\">\\n <div>\\n <span>\\n {{t \\\"@adc/ui-components.beginText\\\"}}:\\n </span>\\n <span class=\\\"picker\\\">\\n <DropdownSelect::SingleSelect\\n @disabled={{@disabled}}\\n @items={{this.beginHours}}\\n @placeholder={{@beginPlaceholder}}\\n @value-change={{fn this.updateTime \\\"internalBeginTimeInMilliseconds\\\"}}\\n />\\n </span>\\n </div>\\n\\n <div>\\n <span>\\n {{t \\\"@adc/ui-components.endText\\\"}}:\\n </span>\\n <span class=\\\"picker\\\">\\n <DropdownSelect::SingleSelect\\n @disabled={{@disabled}}\\n @items={{this.endHours}}\\n @placeholder={{@endPlaceholder}}\\n @value-change={{fn this.updateTime \\\"internalEndTimeInMilliseconds\\\"}}\\n />\\n </span>\\n </div>\\n </div>\\n {{/unless}}\\n</div>\")","import Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport {\n MINUTES_IN_HALF_HOUR as segmentLength,\n MINUTES_IN_HOUR,\n MINUTES_IN_DAY\n} from '@adc/ember-utils/constants/time';\nimport { newDate } from '@adc/ember-utils/utils/date-time';\nimport { A } from '@ember/array';\nimport { action, computed } from '@ember/object';\nimport { once, later } from '@ember/runloop';\nimport { inject as service } from '@ember/service';\nimport DropdownSelectItem, { SELECTED } from '../utils/dropdown-select-item.js';\nimport {\n HALF_HOURS_IN_DAY,\n MILLISECONDS_IN_HOUR,\n MILLISECONDS_IN_MINUTE,\n MILLISECONDS_IN_SECOND,\n isValidTimeValue\n} from '../utils/time.ts';\nimport { VALUE_CHANGE_ACTION } from './common/base-input.js';\n\nimport type IntlService from '@adc/i18n/services/adc-intl';\n\ninterface ResultValues {\n selectedDays?: number[];\n beginTimeInMinutes: number;\n endTimeInMinutes: number;\n beginTimeInSeconds: number;\n endTimeInSeconds: number;\n isEndTimeNextDay: boolean;\n}\n\nexport interface SchedulePickerSignature {\n Element: HTMLDivElement;\n Args: {\n /** The title and `aria-label` of the element. */\n title?: string;\n /** The label value for the collection of days. */\n daysPlaceholder?: string;\n /** Indicates whether the day buttons and begin/end time dropdowns should be disabled. */\n disabled?: boolean;\n /** The locale code the schedule picker should be localized for (e.g., 'en-US', 'fr-FR', 'nb-NO', etc). Localization includes day names, time formats and first day of the week. */\n localeCode?: string;\n /** Indicates the days of the week should begin with Sunday (as opposed to Monday). */\n weekStartsOnSunday?: boolean;\n /** How far after the start time should we reset the end time, given resetEndTimeOnBeginTimeChange is true? */\n resetTimeMinutes?: number;\n /** Should the \"(next-day)\" text be displayed in the end dropdown if the end time would be on the next day? */\n allowNextDayTimes?: boolean;\n /** Indicates the buttons should be compact, narrower but taller (44px by 44px, optimized for mobile touch) with just the first letter of each day. */\n compactMode?: boolean;\n /** The elapsed number of minutes after midnight, used to initialize the begin time value. */\n beginTimeInMinutes?: number;\n /** The elapsed number of seconds after midnight, used to initialize the begin time value. */\n beginTimeInSeconds?: number;\n /** The elapsed number of minutes after midnight, used to initialize the end time value. */\n endTimeInMinutes?: number;\n /** The elapsed number of seconds after midnight, used to initialize the end time value. */\n endTimeInSeconds?: number;\n /** Placeholder for the begin time select element. */\n beginPlaceholder?: string;\n /** Placeholder for the end time select element. */\n endPlaceholder?: string;\n /** When the begin time changes, should we reset the end time to be 1 hour past that? */\n resetEndTimeOnBeginTimeChange?: boolean;\n /** An array of the days of the week indices that should be selected (e.g., 0 = Sunday, 1 = Monday, etc). */\n selectedDays?: number[];\n /** An array of the days of the week indices that should be disabled (e.g., 0 = Sunday, 1 = Monday, etc). */\n disabledDays?: number[];\n /** ? */\n beginTimeBound?: number;\n /** ? */\n endTimeBound?: number;\n /** Hide built in time picker. */\n hideTimePicker?: boolean;\n /** Called when the schedule value changes. */\n 'value-change': (value: ResultValues) => void;\n };\n}\n\nconst { Intl } = window;\n\n/**\n * Computes the segment index of a given milliseconds time value.\n */\nfunction getSegmentIndex(time = 0): number {\n const minutesAfterMidnight = time / MILLISECONDS_IN_MINUTE;\n\n return Math.floor(minutesAfterMidnight / segmentLength);\n}\n\n/**\n * Computes a milliseconds after midnight value for the given segment index.\n */\nfunction getTimeFromSegmentIndex(segmentIndex = 0): number {\n const minutes = segmentIndex * segmentLength;\n\n return minutes * MILLISECONDS_IN_MINUTE;\n}\n\n/**\n * Creates a DateTimeFormat for the supplied options.\n */\nfunction getFormatter(localeCode: string, options: Intl.DateTimeFormatOptions): Intl.DateTimeFormat {\n return Intl.DateTimeFormat(localeCode, options);\n}\n\n/**\n * If we are set to update the end time when begin time changes, update the end time hour and minutes here.\n * The amount of time we reset is based on resetTimeMinutes in the component, or it is 60 minutes by default.\n */\nfunction getValidatedInternalEndTime(\n resetTimeMinutes: string,\n internalEndTimeInMilliseconds: number,\n internalBeginTimeInMilliseconds: number,\n updateEndTimeWithBeginTime?: boolean,\n oldBeginTimeInMilliseconds?: number\n): number {\n // Don't update the endTime if we don't have an existing beginTime - this component is new and will use default values.\n if (!oldBeginTimeInMilliseconds) {\n return internalEndTimeInMilliseconds;\n }\n\n let resetTimeAmount = parseInt(resetTimeMinutes);\n\n // Check the flag to see: if we update the begin time, should we update the end time to be immediately after it?\n if (updateEndTimeWithBeginTime && oldBeginTimeInMilliseconds !== internalBeginTimeInMilliseconds) {\n if (!Number.isInteger(resetTimeAmount) || resetTimeAmount < segmentLength || resetTimeAmount > MINUTES_IN_DAY) {\n resetTimeAmount = MINUTES_IN_HOUR;\n } else {\n // Otherwise, resetTimeMinutes is a valid integer - just make sure it is rounded down to the nearest 30 minute increment.\n resetTimeAmount -= resetTimeAmount % segmentLength;\n }\n\n internalEndTimeInMilliseconds = internalBeginTimeInMilliseconds + resetTimeAmount * MILLISECONDS_IN_MINUTE;\n }\n\n return internalEndTimeInMilliseconds;\n}\n\ntype Day = {\n id: number;\n fullDayName: string;\n text: string;\n selected?: boolean;\n disabled: boolean;\n};\n\n/**\n * @classdesc\n * A day schedule picker (days and begin and end times).\n */\nexport default class SchedulePicker extends Component<SchedulePickerSignature> {\n @service declare intl: IntlService;\n\n /** @override */\n constructor(owner: unknown, args: SchedulePickerSignature['Args']) {\n super(owner, args);\n\n // Delay initialization for the next event cycle, lest we make Ember very sad.\n // Initialize selected hours.\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n later(() => this.setInternalTime(), 0);\n }\n\n /**\n * Internal time tracked in milliseconds\n */\n @tracked\n internalBeginTimeInMilliseconds?: number;\n\n /**\n * Internal time tracked in milliseconds\n */\n @tracked\n internalEndTimeInMilliseconds?: number;\n\n /**\n * The current localization code (en-US, nb-NO, etc).\n */\n @computed('args.localeCode')\n get localeCode(): string {\n return this.args.localeCode ?? 'en-US';\n }\n\n /**\n * Data ID for the current active element.\n */\n currentActiveElementDataID?: string | null;\n\n /**\n * The indices of selected days, zero (Sunday) to 6 (Saturday).\n */\n @computed('args.selectedDays')\n get selectedDays(): number[] {\n return this.args.selectedDays ?? [];\n }\n\n /**\n * The indices of any disabled days, zero (Sunday) to 6 (Saturday).\n */\n @computed('args.disabledDays')\n get disabledDays(): number[] {\n return this.args.disabledDays ?? [];\n }\n\n /**\n * Internal begin time value in milliseconds, representing the selected start time after midnight.\n */\n beginTimeMilliseconds = 0;\n\n /**\n * Indicates whether or not the end time is selected in the next time.\n */\n @computed('internalBeginTimeInMilliseconds', 'internalEndTimeInMilliseconds')\n get isEndTimeNextDay(): boolean {\n return (\n getSegmentIndex(this.internalEndTimeInMilliseconds) <= getSegmentIndex(this.internalBeginTimeInMilliseconds)\n );\n }\n\n /**\n * How far after the start time should we reset the end time, given resetEndTimeOnBeginTimeChange is true?\n */\n @computed('args.resetTimeMinutes')\n get resetTimeMinutes(): number {\n return this.args.resetTimeMinutes ?? 60;\n }\n\n /**\n * The next-day text.\n */\n @computed('args.allowNextDayTimes')\n get nextDayText(): string {\n return this.args.allowNextDayTimes ? this.intl.t('@adc/ui-components.nextDayText') : '';\n }\n\n /**\n * The \"day\" buttons to show.\n */\n @computed('localeCode', 'args.{compactMode,weekStartsOnSunday}', 'selectedDays', 'disabledDays')\n get days(): Day[] {\n // Calculate the first day of the week.\n const formatter = getFormatter(this.localeCode, {\n weekday: this.args.compactMode ? 'narrow' : 'short'\n }),\n longDayNameFormatter = getFormatter(this.localeCode, {\n weekday: 'long'\n }),\n { selectedDays, disabledDays } = this,\n firstDayIndex = this.args.weekStartsOnSunday ?? true ? 0 : 1,\n today = new Date(),\n currentDay = today.getDay(),\n firstDay = new Date(\n today.setDate(today.getDate() - currentDay + (currentDay ? firstDayIndex : -7 + firstDayIndex))\n );\n\n // Create day buttons array.\n return Array.from(new Array(7), (_, idx) => {\n const weekday = new Date(new Date(firstDay).setDate(firstDay.getDate() + idx)),\n id = weekday.getDay();\n\n return {\n id,\n fullDayName: longDayNameFormatter.format(weekday).toLowerCase(),\n text: formatter.format(weekday),\n selected: selectedDays?.includes(id),\n disabled: !!disabledDays?.includes(id)\n };\n });\n }\n\n /**\n * The drop down hours for begin time.\n */\n @computed('localeCode', 'internalBeginTimeInMilliseconds', 'args.{beginTimeBound,endTimeBound}')\n get beginHours(): DropdownSelectItem[] {\n return this.getHours(false, this.internalBeginTimeInMilliseconds);\n }\n\n /**\n * The drop down hours for end time.\n */\n @computed(\n 'localeCode',\n 'internalBeginTimeInMilliseconds',\n 'internalEndTimeInMilliseconds',\n 'nextDayText',\n 'args.endTimeBound'\n )\n get endHours(): DropdownSelectItem[] {\n return this.getHours(true, this.internalEndTimeInMilliseconds);\n }\n\n /**\n * Returns an array of dropdown times (in 30 minute increments) based on the current locale code.\n */\n private getHours(isEndHours: boolean, time?: number): DropdownSelectItem[] {\n // Get hour formatter.\n const formatter = getFormatter(this.localeCode, {\n hour: 'numeric',\n minute: 'numeric'\n });\n\n // Calculate first and last values in dropdown, depending on if endHours, and bounds.\n let hourOffset = 0,\n segmentCount = HALF_HOURS_IN_DAY;\n\n // For endHours, we want to start the endHours dropdown with <segmentLength> minutes after the selected start time, and end at end bound if set.\n if (isEndHours) {\n hourOffset += getSegmentIndex(this.internalBeginTimeInMilliseconds) + 1;\n if (this.args.endTimeBound) {\n segmentCount = getSegmentIndex(this.args.endTimeBound * MILLISECONDS_IN_MINUTE) - hourOffset + 1;\n }\n }\n // For begin time, we want to start at 0 or the begin time bounds if set.\n // If end bounds set, end <segmentLength> minutes before the end bound, or resetTimeMinutes minutes before end bound, depending if resetEndTimeOnBeginTimeChange is true.\n else {\n if (this.args.beginTimeBound) {\n hourOffset += getSegmentIndex(this.args.beginTimeBound * MILLISECONDS_IN_MINUTE);\n }\n if (this.args.endTimeBound) {\n let extraEndTimeBuffer = 1;\n if (this.args.resetEndTimeOnBeginTimeChange) {\n extraEndTimeBuffer = Math.ceil(this.resetTimeMinutes / segmentLength);\n }\n segmentCount =\n getSegmentIndex(this.args.endTimeBound * MILLISECONDS_IN_MINUTE) -\n hourOffset -\n extraEndTimeBuffer +\n 1;\n } else {\n segmentCount -= hourOffset;\n }\n }\n\n // Is the selected index less than zero?\n let selectedIdx = getSegmentIndex(time) - hourOffset;\n if (selectedIdx < 0) {\n // Then this selected time is for the next day - add max index value to get correct dropdown value.\n selectedIdx += segmentCount;\n }\n\n // Return segment values.\n const displayedNextDayText = (idx: number) => {\n return this.nextDayText && isEndHours && idx >= HALF_HOURS_IN_DAY - hourOffset\n ? ' ' + this.nextDayText\n : '';\n };\n\n return Array.from(new Array(segmentCount), (_, idx) =>\n DropdownSelectItem.create({\n name: `${formatter.format(\n newDate(0, getTimeFromSegmentIndex(idx + hourOffset) / MILLISECONDS_IN_MINUTE)\n )}${displayedNextDayText(idx)}`,\n value: String(idx + hourOffset),\n state: idx === selectedIdx ? SELECTED : undefined,\n isSelectable: true\n })\n );\n }\n\n /**\n * Validates that internalEndTimeInMilliseconds is later than internalBeginTimeInMilliseconds (adjusting if necessary), and updates them with new values.\n */\n private validateAndUpdateTimes({\n internalBeginTimeInMilliseconds,\n internalEndTimeInMilliseconds\n }: {\n internalBeginTimeInMilliseconds: number;\n internalEndTimeInMilliseconds: number;\n }): void {\n // Update the internalEndTimeInMilliseconds hours and minutes if the component is set to automatically do that after setting the begin time.\n internalEndTimeInMilliseconds = getValidatedInternalEndTime(\n String(this.resetTimeMinutes),\n internalEndTimeInMilliseconds,\n internalBeginTimeInMilliseconds,\n this.args.resetEndTimeOnBeginTimeChange,\n this.internalBeginTimeInMilliseconds\n );\n\n // Save new values.\n Object.assign(this, {\n internalBeginTimeInMilliseconds,\n internalEndTimeInMilliseconds\n });\n }\n\n /**\n * Notifies listeners that the time/day components have changed (via value-change closure method).\n */\n private notifyChangeListeners() {\n // Get results (including a copy of selected days).\n const results: ResultValues = {\n selectedDays: this.selectedDays?.slice(),\n beginTimeInMinutes: Math.floor((this.internalBeginTimeInMilliseconds ?? 0) / MILLISECONDS_IN_MINUTE),\n endTimeInMinutes: Math.floor((this.internalEndTimeInMilliseconds ?? 0) / MILLISECONDS_IN_MINUTE),\n beginTimeInSeconds: Math.floor((this.internalBeginTimeInMilliseconds ?? 0) / MILLISECONDS_IN_SECOND),\n endTimeInSeconds: Math.floor((this.internalEndTimeInMilliseconds ?? 0) / MILLISECONDS_IN_SECOND),\n isEndTimeNextDay: this.isEndTimeNextDay\n },\n fnAction = this.args[VALUE_CHANGE_ACTION]; // Is there an action handler?\n\n if (fnAction) {\n // Call action handler.\n fnAction(results);\n }\n }\n\n /**\n * Sets the values for begin and end time in milliseconds. The values of initialBeginTime and initialEndTime are used if exist, otherwise a fallback default value is used.\n */\n private setInternalTime(): void {\n const unit = isValidTimeValue(Number(this.args.beginTimeInMinutes)) ? 'Minutes' : 'Seconds',\n initialBeginTime = this.args[`beginTimeIn${unit}` as 'beginTimeInMinutes' | 'beginTimeInSeconds'] ?? 0,\n initialEndTime = this.args[`endTimeIn${unit}` as 'endTimeInMinutes' | 'endTimeInSeconds'] ?? 0,\n toMillisecondsMultiplier = unit === 'Minutes' ? MILLISECONDS_IN_MINUTE : MILLISECONDS_IN_SECOND,\n beginTimeInMilliseconds = initialBeginTime * toMillisecondsMultiplier,\n endTimeInMilliseconds = initialEndTime * toMillisecondsMultiplier,\n fnGetTime = (n: number) => getTimeFromSegmentIndex(getSegmentIndex(n));\n\n // Validate/initialize time properties.\n this.validateAndUpdateTimes({\n internalBeginTimeInMilliseconds: fnGetTime(\n isValidTimeValue(beginTimeInMilliseconds) ? beginTimeInMilliseconds : 12 * MILLISECONDS_IN_HOUR\n ),\n internalEndTimeInMilliseconds: fnGetTime(\n isValidTimeValue(endTimeInMilliseconds) ? endTimeInMilliseconds : 14 * MILLISECONDS_IN_HOUR\n )\n });\n }\n\n /**\n * Listens for data changes and passes them out of the component.\n */\n @action\n pickerChangeUpdate(): void {\n // If any of these internal values are undefined, we probably should not propagate them to the listeners.\n if (\n this.internalBeginTimeInMilliseconds === undefined ||\n this.internalEndTimeInMilliseconds === undefined ||\n this.selectedDays === undefined\n ) {\n return;\n }\n\n // Schedule listener notification.\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n once(this, this.notifyChangeListeners);\n }\n\n /**\n * Listens for begin time updates from outside the component and updates internal values.\n */\n @action\n externalBeginTimeUpdate(): void {\n this.setInternalTime();\n }\n\n /**\n * Listens for end time updates from outside the component and updates internal values.\n */\n @action\n externalEndTimeUpdate(): void {\n this.setInternalTime();\n }\n\n @action\n focusActiveElement(element: HTMLDivElement): void {\n if (this.currentActiveElementDataID) {\n (element.querySelector(`[data-id='${this.currentActiveElementDataID}']`) as HTMLElement)?.focus();\n }\n }\n\n /**\n * Toggles the selected state of the passed button.\n */\n @action\n selectDay(button: Day): void {\n const { id } = button,\n selectedDays = A(this.selectedDays);\n\n // Update selectedDays collection.\n const newSelectedDays = button.selected\n ? selectedDays.reject((idx) => idx === id)\n : selectedDays.concat(id).sort();\n\n const activeElement = document.activeElement;\n\n this.currentActiveElementDataID = activeElement ? activeElement.getAttribute('data-id') : undefined;\n\n // Get results (including a copy of selected days).\n const results: ResultValues = {\n selectedDays: newSelectedDays.slice(),\n beginTimeInMinutes: Math.floor((this.internalBeginTimeInMilliseconds ?? 0) / MILLISECONDS_IN_MINUTE),\n endTimeInMinutes: Math.floor((this.internalEndTimeInMilliseconds ?? 0) / MILLISECONDS_IN_MINUTE),\n beginTimeInSeconds: Math.floor((this.internalBeginTimeInMilliseconds ?? 0) / MILLISECONDS_IN_SECOND),\n endTimeInSeconds: Math.floor((this.internalEndTimeInMilliseconds ?? 0) / MILLISECONDS_IN_SECOND),\n isEndTimeNextDay: this.isEndTimeNextDay\n },\n fnAction = this.args[VALUE_CHANGE_ACTION]; // Is there an action handler?\n\n if (fnAction) {\n // Call action handler.\n fnAction(results);\n }\n }\n\n /**\n * Updates (and validates) the time values.\n */\n @action\n updateTime(name: string, segmentIndex: string): void {\n // Update time and validate.\n this.validateAndUpdateTimes({\n internalBeginTimeInMilliseconds: Number(this.internalBeginTimeInMilliseconds),\n internalEndTimeInMilliseconds: Number(this.internalEndTimeInMilliseconds),\n [name]: getTimeFromSegmentIndex(parseInt(segmentIndex, 10)) // will overwrite one of the properties above\n });\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div class=\\\"schedule-type-view\\\" ...attributes>\\n {{this.scheduleTypeText}}\\n</div>\")","import { computed } from '@ember/object';\nimport BaseSchedule from './views/base-schedule.ts';\n\nimport type { BaseScheduleSignature } from './views/base-schedule';\n\nexport interface ScheduleTypeViewSignature extends BaseScheduleSignature {\n Args: BaseScheduleSignature['Args'] & {\n /** The text to display when the timetable is 24/7. */\n allTimesText?: string;\n /** The text to display when the timetable is empty. */\n emptyScheduleText?: string;\n /** The text to display when the timetable is neither all times nor empty. */\n customScheduleText?: string;\n // Temporary Access Plan timetable with start/end times when timetable takes affect.\n temporaryAccessPlanScheduleText?: string;\n };\n}\n\n/**\n * Displays the type of schedule. (No Schedule, All Times, Custom)\n */\nexport default class ScheduleTypeView extends BaseSchedule<ScheduleTypeViewSignature> {\n /**\n * Is the schedule empty?\n */\n @computed('planSchedules.[]')\n get isScheduleEmpty(): boolean {\n return (this.planSchedules ?? []).every((planSchedule) => !planSchedule.combinedSchedules.length);\n }\n\n @computed('args.{allTimesText,emptyScheduleText,customScheduleText}', 'isScheduleEmpty', 'isScheduleAllTimes')\n get scheduleTypeText(): string | undefined {\n const { args } = this;\n\n if (args.temporaryAccessPlanScheduleText) {\n return args.temporaryAccessPlanScheduleText;\n }\n\n if (this.isScheduleAllTimes) {\n return args.allTimesText;\n }\n\n if (this.isScheduleEmpty) {\n return args.emptyScheduleText;\n }\n\n return args.customScheduleText;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div class=\\\"timetable-schedule\\\" ...attributes>\\n <ScheduleHourLabels @isVertical={{true}} class=\\\"hour-labels\\\" />\\n\\n {{#unless this.isScheduleEmpty}}\\n <div class=\\\"hour-lines\\\">\\n {{#each this.hourLinePositions as |style|}}\\n <div style={{style}}></div>\\n {{/each}}\\n </div>\\n {{/unless}}\\n\\n <div class=\\\"day-labels\\\">\\n {{#each this.scheduleElements as |scheduleElement|}}\\n <div>{{scheduleElement.dayOfWeek}}</div>\\n {{/each}}\\n </div>\\n\\n <div class=\\\"grid\\\" {{on \\\"click\\\" this.editTimetable}} role=\\\"button\\\">\\n {{#if this.isScheduleAllTimes}}\\n <div class=\\\"all-times {{@color}} {{if @isInactiveSchedule \\'in-active\\'}}\\\">\\n {{this.allTimesText}}\\n </div>\\n {{else if this.isScheduleEmpty}}\\n <div class=\\\"empty-schedule\\\">\\n {{coalesce @emptyScheduleText \\\"\\\"}}\\n </div>\\n {{else}}\\n {{#each this.gridDays as |day|}}\\n <div>\\n {{#each day as |scheduleDay|}}\\n <div\\n class=\\\"bar {{scheduleDay.classes}} {{@color}} {{if @isInactiveSchedule \\'in-active\\'}}\\\"\\n style={{scheduleDay.style}}\\n ></div>\\n {{/each}}\\n </div>\\n {{/each}}\\n {{/if}}\\n </div>\\n</div>\")","import { MINUTES_IN_DAY, MINUTES_IN_HOUR } from '@adc/ember-utils/constants/time';\nimport { computed } from '@ember/object';\nimport { htmlSafe } from '@ember/template';\nimport { NINE_AM, TWELVE_PM, FIVE_PM } from './schedule-hour-labels.ts';\nimport BaseSchedule from './views/base-schedule.ts';\n\nimport type { SafeString } from 'handlebars';\nimport type { BaseScheduleSignature } from './views/base-schedule';\nimport type { ScheduleElement } from './views/types';\n\nexport interface ScheduleViewCompactSignature extends BaseScheduleSignature {\n Args: BaseScheduleSignature['Args'] & {\n /** The text to display when the timetable is 24/7. */\n allTimesText?: string;\n /** Optional bar CSS class used to set color (will use light gray if not present). */\n color?: 'red' | 'orange' | 'yellow' | 'green' | 'blue' | 'purple' | 'greenblue';\n /** The text to display when the timetable is empty. */\n emptyScheduleText?: string;\n /** Called to modify the timetable when the grid is clicked. */\n editTimetable?: VoidFunction;\n /** Optional CSS class for inactive schedules. Lower opacity for inactive plans */\n isInactiveSchedule?: boolean;\n };\n}\n\n/**\n * Displays a vertical schedule grid.\n */\nexport default class ScheduleViewCompact extends BaseSchedule<ScheduleViewCompactSignature> {\n /**\n * The text to display when the whole day is selected.\n */\n get allTimesText(): string {\n return this.args.allTimesText ?? '';\n }\n\n get editTimetable(): VoidFunction {\n return this.args.editTimetable ?? (() => {});\n }\n\n /**\n * Is the schedule empty?\n */\n @computed('planSchedules.[]')\n get isScheduleEmpty(): boolean {\n return (this.planSchedules ?? []).every((planSchedule) => !planSchedule.combinedSchedules.length);\n }\n\n /**\n * Array of string styles that specify the position for lines to be drawn horizontally across the schedule.\n */\n get hourLinePositions(): SafeString[] {\n return [NINE_AM, TWELVE_PM, FIVE_PM].map((hour) =>\n htmlSafe(`top:${(hour * MINUTES_IN_HOUR * 100) / MINUTES_IN_DAY}%`)\n );\n }\n\n /**\n * Schedule to be rendered into the grid\n */\n @computed('allTimesText', 'planSchedules.[]')\n get scheduleElements(): ScheduleElement[] {\n return this.getScheduleElements(true, this.allTimesText);\n }\n\n /**\n * Returns the time blocks for each day on the grid.\n */\n get gridDays(): { day: number; label: string; planNameLabel: string; classes: string; style: SafeString }[][] {\n return this.scheduleElements.map(({ schedules }) => {\n const [s] = schedules;\n return s?.timeBlocks;\n });\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div class=\\\"scroll-shadow-host\\\">\\n <div class=\\\"scroll-container\\\" {{did-resize this.toggleScrollCss}} {{on \\\"scroll\\\" this.handleScroll}} ...attributes>\\n {{yield this.recomputeScroll}}\\n </div>\\n</div>\")","import Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { once } from '@ember/runloop';\n\nexport interface ScrollContainerSignature {\n Element: HTMLDivElement;\n Blocks: {\n /** Yields a function that can be called to force the scroll to recompute. */\n default: [(scrollableChild: HTMLElement) => void];\n };\n}\n\n/**\n * @classdesc\n * A container element indicating its content can scroll vertically. Adds a small top shadow if the content can be scrolled up, and a bottom gradient if the content can scroll down.\n *\n * @see https://bitbucket.corp.adcinternal.com/projects/FALCOR/repos/adc-web-frontend/browse/addons/adc-ui-components/package/doc/scroll-container.md\n */\nexport default class ScrollContainer extends Component<ScrollContainerSignature> {\n /**\n * Calculates current scrollable state.\n */\n @action toggleScrollCss(scrollableContent: Element): void {\n const parent = scrollableContent.parentElement;\n if (parent) {\n const scrollShadowHostClassList = parent.classList,\n { scrollTop, clientHeight, scrollHeight } = scrollableContent;\n\n scrollShadowHostClassList.toggle('can-scroll-up', scrollTop > 0);\n scrollShadowHostClassList.toggle('can-scroll-down', scrollHeight - scrollTop - clientHeight > 1);\n }\n }\n\n /**\n * Action to handle element scrolling.\n */\n @action handleScroll(evt: Event & { target: HTMLElement }): void {\n this.toggleScrollCss(evt.target);\n }\n\n /**\n * Action yielded to consumer so child components can trigger the scrollable calculation.\n */\n @action recomputeScroll(scrollableChild: HTMLElement): void {\n const sc = scrollableChild.closest('.scroll-container');\n if (sc) {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n once(this, this.toggleScrollCss, sc);\n }\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<TextInput\\n @type=\\\"search\\\"\\n @value={{@value}}\\n disabled={{if @disabled true}}\\n @containerClass=\\\"search-input {{@containerClass}}\\\"\\n @value-change={{@value-change}}\\n aria-label={{coalesce @ariaLabel (t \\\"@adc/ui-components.search\\\")}}\\n ...attributes\\n>\\n <:after-input as |inputValue clearInput|>\\n <SvgSymbol @icon=\\\"search\\\" @title={{t \\\"@adc/ui-components.search\\\"}} @isHiddenForAccessibility={{true}} />\\n\\n {{#if inputValue}}\\n <Button::Icon\\n @iconOnly={{true}}\\n @icon=\\\"close\\\"\\n @text={{t \\\"@adc/ui-components.clearSearch\\\"}}\\n @buttonAction={{clearInput}}\\n @buttonColor=\\\"stealth\\\"\\n class=\\\"clear-search-button\\\"\\n disabled={{@disabled}}\\n />\\n {{/if}}\\n </:after-input>\\n</TextInput>\")","import templateOnlyComponent from '@ember/component/template-only';\n\nimport type { TextInputSignature } from './text-input';\n\nexport interface SearchInputSignature {\n Element: TextInputSignature['Element'];\n Args: Pick<TextInputSignature['Args'], 'value' | 'value-change' | 'containerClass'> & {\n /** Indicates the search input should be disabled. */\n disabled?: boolean;\n /** The `aria-label` for the search input (defaults to \"search\"). */\n ariaLabel?: string;\n };\n}\nconst SearchInput = templateOnlyComponent<SearchInputSignature>();\nexport default SearchInput;\n","import templateOnlyComponent from '@ember/component/template-only';\n\nimport type { SearchInputSignature } from './search-input';\n\ntype SearchInputSignatureArgs = SearchInputSignature['Args'];\n\nexport interface SearchToolbarSignature {\n Element: SearchInputSignature['Element'];\n Args: {\n /** The current search value. */\n searchString?: SearchInputSignatureArgs['value'];\n /** Triggered when the search string changes. */\n searchValueChange?: SearchInputSignatureArgs['value-change'];\n /** Optional CSS class for the search toolbar container element. */\n containerClass?: string;\n /** Indicates the search box should be hidden. */\n searchBoxHidden?: boolean;\n /** Indicates the search box should be disabled. */\n searchBoxDisabled?: boolean;\n /** Optional `aria-label` value. */\n ariaLabel?: SearchInputSignatureArgs['ariaLabel'];\n };\n Blocks: {\n default: [];\n };\n}\nconst SearchToolbar = templateOnlyComponent<SearchToolbarSignature>();\nexport default SearchToolbar;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div class={{this.css}} data-test-is-checked={{if (eq @checked true) \\\"true\\\"}}>\\n <input\\n id={{guid-for this}}\\n type={{this.type}}\\n checked={{eq @checked true}}\\n tabindex=\\\"0\\\"\\n data-checked={{if (eq @checked true) \\\"true\\\" \\\"false\\\"}}\\n class={{if (eq @checked \\\"mixed\\\") \\\"mixed\\\"}}\\n {{did-insert this.updateIndeterminate}}\\n {{did-update this.updateIndeterminate @checked}}\\n ...attributes\\n />\\n <label for={{guid-for this}}>\\n {{#if (has-block)}}\\n {{yield}}\\n {{else}}\\n {{#if (or @icon @label)}}\\n <SimpleBinary::Label @icon={{@icon}} @iconFill={{@iconFill}} @text={{@label}} />\\n {{/if}}\\n {{/if}}\\n </label>\\n <ErrorTooltip\\n @text={{@errorMessage}}\\n @placement={{coalesce @errorTooltipPlace \\\"auto\\\"}}\\n @duration={{@errorDuration}}\\n @selector=\\\"input\\\"\\n @selectorDirection=\\\"sibling\\\"\\n />\\n</div>\")","import Component from '@glimmer/component';\nimport { A } from '@ember/array';\nimport { action } from '@ember/object';\n\nimport type { CommonInputErrorTooltipArgs } from './error-tooltip';\nimport type { BinaryLabelSignature } from './simple-binary/label';\n\nexport type InputType = 'checkbox' | 'radio';\ntype BinaryLabelSignatureArgs = BinaryLabelSignature['Args'];\n\nexport interface SimpleBinaryArgs\n extends CommonInputErrorTooltipArgs,\n Pick<BinaryLabelSignatureArgs, 'icon' | 'iconFill'> {\n /** The binary type to show (do not use `list`, it's internal). */\n type?: 'checkbox' | 'radio' | 'toggle' | 'list';\n /** The current binary state (defaults to `false`). */\n checked?: true | false | 'mixed';\n /** Text for the input label. */\n label?: BinaryLabelSignatureArgs['text'];\n /** Optional CSS class for the binary input container element. */\n css?: string;\n /** Indicates the positions of the input/icon/label should be reversed. */\n reverse?: boolean;\n /** Indicates the label text should wrap. NOTE this will likely mess up vertical centering. */\n wrap?: boolean;\n}\n\nexport interface SimpleBinarySignature {\n Element: HTMLInputElement;\n Args: SimpleBinaryArgs;\n Blocks: {\n default: [];\n };\n}\n\nexport default class SimpleBinary extends Component<SimpleBinarySignature> {\n get type(): InputType {\n return this.args.type === 'radio' ? 'radio' : 'checkbox';\n }\n\n get css(): string {\n const { args } = this;\n\n return A([\n 'simple-binary',\n args.type === 'toggle' ? 'is-toggle' : undefined,\n args.css,\n args.errorMessage ? 'has-error' : undefined,\n args.reverse ? 'is-reversed' : undefined,\n args.wrap ? 'is-wrapped' : undefined\n ])\n .compact()\n .join(' ');\n }\n\n @action updateIndeterminate(el: HTMLInputElement): void {\n el.indeterminate = this.args.checked === 'mixed';\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<button\\n type=\\\"button\\\"\\n disabled={{or @disabled @item.disabled}}\\n aria-checked={{if @item.state \\\"true\\\" \\\"false\\\"}}\\n role={{if @isMultiSelect \\\"checkbox\\\" \\\"radio\\\"}}\\n data-button-list-item-id={{@item.props.id}}\\n ...attributes\\n>\\n {{yield}}\\n</button>\")","import templateOnlyComponent from '@ember/component/template-only';\n\nimport type { BinaryListItem } from './list';\n\nexport interface SimpleBinaryButtonSignature {\n Element: HTMLButtonElement;\n Args: {\n /** The binary list item to render. */\n item: BinaryListItem<any>;\n /** Indicates the button should be disabled. */\n disabled?: boolean;\n /** Indicates the containing list is multi select. */\n isMultiSelect?: boolean;\n };\n Blocks: {\n default: [];\n };\n}\n\nconst SimpleBinaryButton = templateOnlyComponent<SimpleBinaryButtonSignature>();\nexport default SimpleBinaryButton;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<AsyncLoader @promise={{@items}} as |items|>\\n <ul class=\\\"simple-button-list {{if (has-block) \\'is-custom\\'}} {{this.listCss}}\\\" id={{guid-for this}} ...attributes>\\n {{#each items as |item idx|}}\\n <li data-test-button-list-item={{idx}}>\\n {{#if (has-block)}}\\n <SimpleBinary::Button\\n @item={{item}}\\n @disabled={{@disabled}}\\n @isMultiSelect={{this.isMultiSelect}}\\n aria-label={{item.label}}\\n {{on \\\"click\\\" (fn this.buttonClicked item)}}\\n >\\n {{yield item}}\\n </SimpleBinary::Button>\\n {{else}}\\n {{#if this.isLongList}}\\n <SimpleBinary\\n @type={{if this.isMultiSelect \\\"list\\\" \\\"radio\\\"}}\\n @checked={{item.state}}\\n @label={{item.label}}\\n @icon={{item.icon}}\\n @iconFill={{item.color}}\\n @css={{item.css}}\\n data-button-list-item-id={{coalesce item.props.id}}\\n disabled={{coalesce @disabled item.disabled}}\\n aria-label={{item.label}}\\n {{on \\\"change\\\" (fn this.binaryToggled item)}}\\n />\\n {{else}}\\n <SimpleBinary::Button\\n @item={{item}}\\n @disabled={{@disabled}}\\n @isMultiSelect={{this.isMultiSelect}}\\n aria-label={{item.label}}\\n {{on \\\"click\\\" (fn this.buttonClicked item)}}\\n >\\n {{#if item.icon}}\\n <SvgSymbol @icon={{item.icon}} class=\\\"button-list-svg\\\" style={{icon-fill item.color}} />\\n {{/if}}\\n <span>{{item.label}}</span>\\n </SimpleBinary::Button>\\n {{/if}}\\n {{/if}}\\n\\n <div class=\\\"checkmark\\\">\\n <SvgSymbol @icon={{coalesce @selectedIcon \\\"check\\\"}} />\\n </div>\\n </li>\\n {{/each}}\\n </ul>\\n <ErrorTooltip\\n @text={{@errorMessage}}\\n @placement={{coalesce @errorTooltipPlace \\\"top-start\\\"}}\\n @duration={{@errorDuration}}\\n @selector=\\\"#{{guid-for this}}\\\"\\n @selectorDirection=\\\"sibling\\\"\\n />\\n</AsyncLoader>\")","import Component from '@glimmer/component';\nimport { A } from '@ember/array';\nimport { action } from '@ember/object';\nimport { gt } from '@ember/object/computed';\n\nimport type { CommonInputErrorTooltipArgs } from '../error-tooltip';\nimport type { SimpleBinaryButtonSignature } from './button';\nimport type { BinaryListItem } from './list';\n\ntype BinaryButtonListItem = SimpleBinaryButtonSignature['Args']['item'];\n\nexport interface SimpleBinaryButtonListSignature<T extends BinaryButtonListItem> {\n Element: HTMLUListElement;\n Args: CommonInputErrorTooltipArgs & {\n /** The binary list items to render. */\n items: T[] | Promise<T[]>;\n /** Optional icon name to be used for the selection indicator. */\n selectedIcon?: string;\n /** Indicates the list is multi select. */\n isMultiSelect?: boolean;\n /** Indicates that items can be deselected in single selection mode. */\n allowDeselect?: boolean;\n /** The list orientation (defaults to \"vertical\"). */\n orientation?: 'vertical' | 'horizontal';\n /** Indicates all buttons in the list should be disabled. */\n disabled?: boolean;\n /** Triggered when the user changes the binary list item state. */\n onchange?: (items: T[]) => void;\n };\n Blocks: {\n default: [T];\n };\n}\n\nexport default class SimpleBinaryButtonList<T extends BinaryButtonListItem> extends Component<\n SimpleBinaryButtonListSignature<T>\n> {\n get isMultiSelect(): boolean {\n return this.args.isMultiSelect ?? true;\n }\n\n @gt('args.items.length', 7)\n declare isLongList: boolean;\n\n get listCss(): string {\n return A([`o-${this.args.orientation ?? 'vertical'}`, this.isLongList ? 'is-long' : undefined])\n .compact()\n .join(' ');\n }\n\n private async listItemChanged(item: BinaryListItem, state: boolean): Promise<void> {\n const items = await this.args.items;\n\n // Is this NOT a multiselect list AND is the new state selected?\n if (!this.isMultiSelect && state) {\n // Clear all other selections.\n A(items).setEach('state', false);\n }\n\n item.state = state;\n this.args.onchange?.(items);\n }\n\n @action buttonClicked(item: BinaryListItem): void {\n const { isMultiSelect } = this,\n { allowDeselect } = this.args;\n\n if (isMultiSelect || allowDeselect || !item.state) {\n this.listItemChanged(item, !item.state);\n }\n\n // If not multiselect and not able to deselect, run onchange again on click.\n if (!isMultiSelect && !allowDeselect && item.state === true) {\n this.listItemChanged(item, item.state);\n }\n }\n\n @action binaryToggled(item: BinaryListItem, evt: InputEvent): void {\n this.listItemChanged(item, (evt.target as HTMLInputElement).checked);\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{#if @icon}}\\n <SvgSymbol @icon={{@icon}} style={{icon-fill @iconFill}} class=\\\"binary-svg\\\" />\\n{{/if}}\\n<span class=\\\"binary-text\\\">{{@text}}</span>\")","import templateOnlyComponent from '@ember/component/template-only';\n\nimport type { SafeString } from 'handlebars';\n\nexport interface BinaryLabelSignature {\n Element: HTMLDivElement;\n Args: {\n /** The binary control label text. */\n text?: string | number | SafeString;\n /** Optional name of the icon to render within the label (minus the \"icn-\" prefix). */\n icon?: string;\n /** Optional hex color value for for the icon fill. */\n iconFill?: string;\n };\n}\n\nconst BinaryLabel = templateOnlyComponent<BinaryLabelSignature>();\nexport default BinaryLabel;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<AsyncLoader @promise={{@items}} @spinnerSize={{@spinnerSize}} as |items|>\\n {{#if items.length}}\\n <ul class=\\\"simple-list text-body collection\\\" ...attributes>\\n {{#each items as |item idx|}}\\n <li>\\n {{#if (has-block)}}\\n {{yield item idx}}\\n {{else}}\\n <SimpleList::Item @item={{item}} />\\n {{/if}}\\n </li>\\n {{/each}}\\n </ul>\\n {{else if (has-block \\\"empty\\\")}}\\n {{yield to=\\\"empty\\\"}}\\n {{/if}}\\n</AsyncLoader>\")","import Component from '@glimmer/component';\n\nimport type EmberArray from '@ember/array';\nimport type { AsyncLoaderSignature } from './async-loader.ts';\n\nexport interface SimpleListSignature<T> {\n Element: HTMLUListElement;\n Args: {\n /** The items to display in the list. */\n items: T[] | Promise<T[]> | EmberArray<T>;\n /** The size of the spinner to show while items are resolving (defaults to \"medium\"). */\n spinnerSize?: AsyncLoaderSignature<T>['Args']['spinnerSize'];\n };\n Blocks: {\n /** Renders within the LI element for each item. */\n default: [T, number];\n /** Renders if the passed items are empty. */\n empty: [];\n };\n}\n\n// eslint-disable-next-line ember/no-empty-glimmer-component-classes\nexport default class SimpleList<T> extends Component<SimpleListSignature<T>> {}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{#if (has-block)}}\\n <p class=\\\"weight-regular text-callout value\\\" data-test-simple-list-item-value ...attributes>\\n {{yield}}\\n </p>\\n{{/if}}\\n{{#unless @hideArrow}}\\n <SvgSymbol @icon=\\\"chevron-right\\\" @fillColor=\\\"gray-60\\\" class=\\\"simple-list-item-chevron-value\\\" />\\n{{/unless}}\")","import templateOnlyComponent from '@ember/component/template-only';\n\nexport interface SimpleListChevronValueSignature {\n Element: HTMLParagraphElement;\n Args: {\n hideArrow?: boolean;\n };\n Blocks: {\n default: [];\n };\n}\n\nconst SimpleListChevronValue = templateOnlyComponent<SimpleListChevronValueSignature>();\nexport default SimpleListChevronValue;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div class=\\\"details\\\" data-simple-list-details ...attributes>\\n {{#if (has-block)}}\\n {{yield}}\\n {{else}}\\n <p class=\\\"text-description\\\" data-test-simple-list-item-description>\\n {{@description}}\\n </p>\\n {{#if (is-present @details)}}\\n <p class=\\\"text-footnote\\\" data-test-simple-list-item-details>\\n {{@details}}\\n </p>\\n {{/if}}\\n {{/if}}\\n</div>\")","import templateOnlyComponent from '@ember/component/template-only';\n\nexport interface SimpleListDetailsSignature {\n Element: HTMLDivElement;\n Args: {\n description: string;\n details?: string;\n };\n Blocks: {\n default: [];\n };\n}\n\nconst SimpleListDetails = templateOnlyComponent<SimpleListDetailsSignature>();\nexport default SimpleListDetails;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div\\n class=\\\"simple-list-item {{coalesce @item.css \\'\\'}}\\\"\\n role={{if @onClick \\\"button\\\"}}\\n tabindex={{if @onClick \\\"0\\\"}}\\n {{on \\\"click\\\" (coalesce @onClick (noop))}}\\n {{on \\\"keydown\\\" this.handleKeyDown}}\\n ...attributes\\n>\\n {{#if (has-block \\\"icon\\\")}}\\n {{yield to=\\\"icon\\\"}}\\n {{else if @item.icon}}\\n <SvgSymbol @icon={{@item.icon}} class=\\\"{{@item.iconCss}} simple-list-item--icon\\\" />\\n {{/if}}\\n\\n {{#if (has-block \\\"detail\\\")}}\\n <SimpleList::Details @description={{@item.description}} @details={{@item.details}}>\\n {{yield to=\\\"detail\\\"}}\\n </SimpleList::Details>\\n {{else}}\\n <SimpleList::Details @description={{@item.description}} @details={{@item.details}} />\\n {{/if}}\\n\\n {{#if (has-block \\\"value\\\")}}\\n {{yield to=\\\"value\\\"}}\\n {{else if (is-present @item.value)}}\\n <SimpleList::ChevronValue @hideArrow={{not @item.showChevron}}>\\n {{@item.value}}\\n </SimpleList::ChevronValue>\\n {{else if @item.showChevron}}\\n <SimpleList::ChevronValue />\\n {{/if}}\\n</div>\")","import Component from '@glimmer/component';\nimport { isEnterOrSpaceCode } from '@adc/ember-utils/utils/a11y';\nimport { action } from '@ember/object';\n\nimport type SimpleListItem from './list-item';\n\nexport interface SimpleListItemSignature {\n Element: HTMLDivElement;\n Args: {\n /** Data for the current item. */\n item: any | SimpleListItem;\n onClick?: VoidFunction;\n };\n Blocks: {\n /** Renders on the left side of the item, typically (but not limited to) an icon. */\n icon: [];\n /** Renders in the center of the item, will render description and details if omitted. */\n detail: [];\n /** Renders to the right of the item, could be an icon, or some value, or really anything. */\n value: [];\n };\n}\n\nexport default class SimpleListItemComponent extends Component<SimpleListItemSignature> {\n @action\n handleKeyDown(event: KeyboardEvent): void {\n if (isEnterOrSpaceCode(event.code)) {\n this.args.onClick?.();\n }\n }\n}\n","import { tracked } from '@glimmer/tracking';\n\nexport type ItemValue = string | number | boolean;\n\nexport interface ISelectItem<\n V extends ItemValue = string,\n P extends Record<string, unknown> = Record<string, unknown>\n> {\n /** The main text for the item. */\n name: string;\n /** The item value (string, number or boolean). */\n value?: V;\n /** The current state of the item. */\n state?: boolean;\n /** Indicates this item should be disabled. */\n disabled?: boolean;\n /** An optional array of subitems the items contains. */\n subitems?: ISelectItem<V, P>[];\n /** Optional props object useful for storing any needed data. */\n props?: P;\n}\n\n/**\n * @classdesc\n * An item to display in a checkbox tree component.\n */\nexport default class SelectItem<\n V extends ItemValue = string,\n P extends Record<string, unknown> = Record<string, unknown>\n> implements ISelectItem<V, P>\n{\n /**\n * The main text for the item.\n */\n @tracked name: string;\n\n /**\n * The current state of the item.\n */\n @tracked state = false;\n\n /**\n * The item value (string, number or boolean).\n */\n @tracked value?: V;\n\n /**\n * Is the item disabled (unselectable)?\n */\n @tracked disabled = false;\n\n /**\n * An optional array of subitems the items contains.\n */\n @tracked subitems: ISelectItem<V, P>[] = [];\n\n props: P;\n\n constructor(args: ISelectItem<V, P>) {\n this.name = args.name;\n this.state = args.state ?? false;\n this.value = args.value;\n this.disabled = args.disabled ?? false;\n this.subitems = (args.subitems ?? []).map((i) => new SelectItem(i));\n this.props = args.props ?? ({} as P);\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div\\n class=\\\"simple-select\\\"\\n {{did-insert this.resolveItems.perform}}\\n {{did-update this.resolveItems.perform @items}}\\n {{did-update (fn this.valueUpdated @value) @value}}\\n {{did-update this.errorMessageUpdated @error.text}}\\n>\\n {{#if this.resolveItems.isRunning}}\\n <SpinnerSvg @size=\\\"small\\\" @spinning={{true}} />\\n {{else}}\\n <select {{on \\\"change\\\" this.itemSelected}} ...attributes>\\n {{#if @placeholder}}\\n <option\\n disabled\\n value=\\\"\\\"\\n {{did-insert this.setPlaceholderState}}\\n {{did-update this.setPlaceholderState this.hasSelectedItem}}\\n >\\n {{@placeholder}}\\n </option>\\n {{/if}}\\n\\n {{#each this.items as |item|}}\\n {{#if item.subitems.length}}\\n <optgroup label={{item.name}}>\\n {{#each item.subitems as |subitem|}}\\n <option\\n value={{subitem.value}}\\n disabled={{if subitem.disabled \\\"true\\\"}}\\n selected={{if item.state \\\"selected\\\"}}\\n {{did-insert (fn this.setOptionState subitem)}}\\n {{did-update (fn this.setOptionState subitem) subitem.state}}\\n >\\n {{subitem.name}}\\n </option>\\n {{/each}}\\n </optgroup>\\n {{else}}\\n <option\\n value={{item.value}}\\n disabled={{if item.disabled \\\"true\\\"}}\\n selected={{if item.state \\\"selected\\\"}}\\n {{did-insert (fn this.setOptionState item)}}\\n {{did-update (fn this.setOptionState item) item.state}}\\n >\\n {{item.name}}\\n </option>\\n {{/if}}\\n {{/each}}\\n </select>\\n <svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 24 24\\\">\\n <polygon\\n fill-rule=\\\"evenodd\\\"\\n points=\\\"11.95 16.364 6.293 10.707 7.707 9.293 11.95 13.536 16.193 9.293 17.607 10.707\\\"\\n ></polygon>\\n </svg>\\n {{#if this.errorMessage}}\\n <ErrorTooltip\\n @text={{this.errorMessage}}\\n @placement={{@error.placement}}\\n @duration={{@error.duration}}\\n @selector=\\\"select\\\"\\n @selectorDirection=\\\"sibling\\\"\\n />\\n {{/if}}\\n {{/if}}\\n</div>\")","import Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { action } from '@ember/object';\nimport { task } from 'ember-concurrency';\nimport { runTask } from 'ember-lifeline';\nimport SelectItem from '../utils/select-item.ts';\n\nimport type { Task } from 'ember-concurrency';\nimport type { ISelectItem, ItemValue } from '../utils/select-item';\nimport type { ErrorTooltipSignature } from './error-tooltip';\n\nexport interface SingleSelectSignature<V extends ItemValue> {\n Element: HTMLSelectElement;\n Args: {\n /** The select options to render. */\n items: Promise<ISelectItem<V>[]> | ISelectItem<V>[];\n /** The currently selected value. */\n value?: V;\n /** Triggered when the user chooses a new value in the select element. */\n onchange?: (value: V) => void;\n /** Text for the optional unselectable placeholder option for the native select element. */\n placeholder?: string;\n /** Error information. */\n error?: Pick<ErrorTooltipSignature['Args'], 'text' | 'placement' | 'duration'>;\n };\n}\n\n/**\n * @classdesc\n * Simple, native select component.\n */\nexport default class SingleSelect<V extends ItemValue> extends Component<SingleSelectSignature<V>> {\n @tracked items: SelectItem<V>[] = [];\n @tracked errorMessage = '';\n\n get hasSelectedItem(): boolean {\n return !!this.items.find((i) => i.state);\n }\n\n /**\n * A task for resolving promise items and syncing state.\n */\n resolveItems: Task<void, never> = task({ restartable: true }, async () => {\n const { value } = this.args;\n\n this.items = ((await this.args.items) ?? []).map(\n (i) =>\n new SelectItem({\n name: i.name,\n state: value !== undefined ? i.value === value : i.state,\n value: i.value,\n disabled: i.disabled,\n subitems: i.subitems,\n props: i.props\n })\n );\n });\n\n private convertValue(newValue: string): V {\n const { value } = this.args,\n fnGetType = (v: V): V => {\n if (typeof v === 'number') {\n return Number(newValue) as V;\n }\n\n if (typeof v === 'boolean') {\n return Boolean(newValue) as V;\n }\n\n return newValue as V;\n };\n\n if (value !== undefined && value !== '') {\n return fnGetType(value);\n }\n\n const [i] = this.items;\n if (i?.value !== undefined) {\n return fnGetType(i.value);\n }\n\n return newValue as V;\n }\n\n /**\n * Update local error message text (after slight delay).\n */\n @action errorMessageUpdated(): void {\n runTask(this, () => (this.errorMessage = this.args.error?.text ?? ''));\n }\n\n /**\n * Called when the user changes the selected item in the UI.\n */\n @action itemSelected(evt: Event): void {\n const v = this.convertValue((evt.target as HTMLSelectElement).value);\n\n // Update local items.\n this.valueUpdated(v);\n\n // Clear local error message.\n this.errorMessage = '';\n\n // Notify consumer.\n this.args.onchange?.(v);\n }\n\n /**\n * Updates the item states based on the passed value.\n */\n @action valueUpdated(v: V): void {\n this.items\n .map((i) => [i, ...i.subitems])\n .flat()\n .forEach((i) => (i.state = i.value === v));\n }\n\n /**\n * Updates the placeholder option elements selected attribute.\n */\n @action setPlaceholderState(el: HTMLOptionElement): void {\n this.updateOptionState(!this.hasSelectedItem, el, false);\n }\n\n /**\n * Updates the main option elements selected attribute.\n */\n @action setOptionState(item: SelectItem<V>, el: HTMLOptionElement): void {\n this.updateOptionState(item.state, el, true);\n }\n\n private updateOptionState = (isSelected: boolean, el: HTMLOptionElement, updateSelect = false): void => {\n if (isSelected) {\n el.setAttribute('selected', 'selected');\n\n if (updateSelect) {\n const select = el.closest<HTMLSelectElement>('select');\n if (select) {\n select.value = el.value;\n }\n }\n } else {\n el.removeAttribute('selected');\n }\n };\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<form\\n action=\\\"javascript:void(0);\\\"\\n class=\\\"smart-date-range {{if @showMultiDayRange \\'multi-day\\' \\'single-day\\'}}\\\"\\n ...attributes\\n>\\n {{#if @showMultiDayRange}}\\n <span data-test-start-text>{{t \\\"@adc/ui-components.beginText\\\"}}: </span>\\n {{/if}}\\n\\n <SmartDate\\n @date={{@startDate}}\\n @minDate={{@minDate}}\\n @maxDate={{@maxDate}}\\n @timeZone={{@timeZone}}\\n @onchange={{fn this.changeDate true}}\\n required=\\\"true\\\"\\n data-test-start-date\\n />\\n\\n <SmartTime\\n @date={{@startDate}}\\n @minDate={{@minDate}}\\n @maxDate={{@maxDate}}\\n @showSeconds={{@showSeconds}}\\n @timeZone={{@timeZone}}\\n @onchange={{fn this.changeTime true}}\\n required=\\\"true\\\"\\n data-test-start-time\\n />\\n\\n {{#if @showMultiDayRange}}\\n <span data-test-end-text>{{t \\\"@adc/ui-components.endText\\\"}}: </span>\\n\\n <SmartDate\\n @date={{@endDate}}\\n @minDate={{@minDate}}\\n @maxDate={{@maxDate}}\\n @timeZone={{@timeZone}}\\n @onchange={{fn this.changeDate false}}\\n required=\\\"true\\\"\\n data-test-end-date\\n />\\n {{/if}}\\n\\n <SmartTime\\n @date={{@endDate}}\\n @minDate={{@minDate}}\\n @maxDate={{@maxDate}}\\n @showSeconds={{@showSeconds}}\\n @timeZone={{@timeZone}}\\n @onchange={{fn this.changeTime false}}\\n required=\\\"true\\\"\\n data-test-end-time\\n />\\n</form>\")","import { action } from '@ember/object';\nimport getDate from 'date-fns/getDate';\nimport getHours from 'date-fns/getHours';\nimport getMinutes from 'date-fns/getMinutes';\nimport getMonth from 'date-fns/getMonth';\nimport getSeconds from 'date-fns/getSeconds';\nimport getYear from 'date-fns/getYear';\nimport isEqual from 'date-fns/isEqual';\nimport setDate from 'date-fns/setDate';\nimport setHours from 'date-fns/setHours';\nimport setMinutes from 'date-fns/setMinutes';\nimport setMonth from 'date-fns/setMonth';\nimport setSeconds from 'date-fns/setSeconds';\nimport setYear from 'date-fns/setYear';\nimport BaseTimezoneControl from './base-timezone-control.ts';\n\nimport type { BaseTimezoneControlSignature } from './base-timezone-control';\n\nexport type DateChangePayload = {\n [index: string]: Date;\n startDate: Date;\n endDate: Date;\n};\n\ntype DateArg = 'start' | 'end';\n\nexport interface SmartDateRangeSignature extends BaseTimezoneControlSignature {\n Element: HTMLFormElement;\n Args: BaseTimezoneControlSignature['Args'] & {\n /** Indicates a multi-day date range should be shown (as opposed to single day). */\n showMultiDayRange?: boolean;\n /** The range starting date. */\n startDate: Date;\n /** The range ending date. */\n endDate: Date;\n /** Minimal range date. */\n minDate?: Date;\n /** maximum range date. */\n maxDate?: Date;\n /** Indicates whether to show seconds in the smart time picker. */\n showSeconds?: boolean;\n /** Called when the component changes the date range. */\n onchange: (dates: Partial<DateChangePayload>, isRange: boolean) => void;\n };\n}\n\n/**\n * Updates the passed date using the hours, minutes, and seconds from the passed value.\n *\n * @private\n */\nfunction updateTime(date: Date, value: Date): Date {\n return setHours(setMinutes(setSeconds(date, getSeconds(value)), getMinutes(value)), getHours(value));\n}\n\n/**\n * Updates the passed date using the day, month, and year from the passed value.\n *\n * @private\n */\nfunction updateDate(date: Date, value: Date): Date {\n return setYear(setMonth(setDate(date, getDate(value)), getMonth(value)), getYear(value));\n}\n\n/**\n * @classdesc\n * A component for displaying a single day, or multi-day date/time range picker, using smart time and date pickers.\n */\nexport default class SmartDateRangeComponent extends BaseTimezoneControl<SmartDateRangeSignature> {\n /**\n * Updates the indicated set of internal date values (range versus single).\n */\n private notifyDateChange(fields: DateArg[], value: Date, fnRecalculate: (date: Date, value: Date) => Date): void {\n const updatedProps = fields\n .map((prefix) => `${prefix}Date`)\n .reduce((props: Partial<DateChangePayload>, name: keyof SmartDateRangeSignature['Args']) => {\n const v = this.args[name] as Date,\n computedValue = this.getUtcDateFromZone(\n fnRecalculate(this.getZonedDate(v), this.getZonedDate(value))\n );\n\n // Check for inequality, because updating an object reference that is technically equal to the current value will still fire update events.\n if (!isEqual(v, computedValue)) {\n props[name] = computedValue;\n }\n\n return props;\n }, {});\n\n if (Object.keys(updatedProps).length) {\n this.args.onchange(updatedProps, this.args.showMultiDayRange ?? false);\n }\n }\n\n // region Actions\n\n /**\n * Updates a time value.\n *\n * @param isStart Indicates the value to change is a start time.\n * @param value The date to use for new hour, minutes, and seconds.\n */\n @action changeTime(isStart: boolean, value: Date): void {\n this.notifyDateChange([isStart ? 'start' : 'end'], value, updateTime);\n }\n\n /**\n * Updates a date value.\n *\n * @param isStart Indicates the value to change is a start date.\n * @param value The date to use for new day, month, and year.\n */\n @action changeDate(isStart: boolean, value: Date): void {\n const fields: DateArg[] = this.args.showMultiDayRange ? [isStart ? 'start' : 'end'] : ['start', 'end'];\n this.notifyDateChange(fields, value, updateDate);\n }\n\n // endregion\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{#if this.useNativeControl}}\\n {{#let (concat (guid-for this) \\\"_smart_date\\\") as |id|}}\\n {{#if @label}}\\n <label class=\\\"smart-date-label\\\" for={{id}}>\\n {{@label}}\\n </label>\\n {{/if}}\\n <input\\n type=\\\"date\\\"\\n class=\\\"smart-date-input\\\"\\n id={{if @label id}}\\n min={{this.min}}\\n max={{this.max}}\\n value={{this.displayDate}}\\n ...attributes\\n {{on \\\"blur\\\" this.inputBlurred}}\\n {{on \\\"change\\\" this.inputChanged}}\\n />\\n {{/let}}\\n{{/if}}\")","import { action } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport format from 'date-fns/format';\nimport isValid from 'date-fns/isValid';\nimport { getIsTouchDevice } from '../utils/general.ts';\nimport { isNativeDateInputSupported } from '../utils/time.ts';\nimport BaseTimeControl from './base-time-control.ts';\n\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type { BaseTimeControlSignature } from './base-time-control';\n\nconst outputFormat = 'yyyy-MM-dd';\n\n/**\n * Notifies the consumer that the date has changed.\n *\n * @private\n */\nfunction emitChangeEvent(this: SmartDateComponent, evt: Event, year: number, month: number, day: number): void {\n const date = new Date(year, month, day, 12);\n if (isValid(date)) {\n this.args.onchange(this.getUtcDateFromZone(date), evt);\n }\n}\n\nexport interface SmartDateSignature {\n Element: HTMLInputElement;\n Args: Omit<BaseTimeControlSignature['Args'], 'onchange'> & {\n /** Called when the user modifies the date/time value. */\n onchange: (date: Date | null, evt: Event) => void;\n /** Whether to allow the control to accept `null` values. */\n allowNull?: boolean;\n };\n}\n\n/**\n * @classdesc\n * A date picker that uses a native control, if possible, or the pikaday component if not possible.\n * export default class SmartTimeComponent extends BaseTimeControl<SmartTimeComponentArgs> {\n */\nexport default class SmartDateComponent extends BaseTimeControl<SmartDateSignature> {\n @service declare intl: ADCIntlService;\n\n hasTouchEvents?: boolean;\n\n constructor(owner: unknown, args: SmartDateSignature['Args']) {\n super(owner, args);\n getIsTouchDevice(this);\n }\n\n // region Component state.\n\n /** @override */\n useNativeControl = isNativeDateInputSupported;\n\n /**\n * The date placeholder.\n */\n get placeholder(): string {\n return 'mm/dd/yyyy';\n }\n\n /**\n * The date pattern for input validation.\n */\n get pattern(): string {\n if (isNativeDateInputSupported) {\n // Only one format for native time input.\n return '^\\\\d{4}-\\\\d{2}-\\\\d{2}$';\n }\n\n return '^(?:(?:31(\\\\/|-|\\\\.)(?:0?[13578]|1[02]))\\\\1|(?:(?:29|30)(\\\\/|-|\\\\.)(?:0?[13-9]|1[0-2])\\\\2))(?:(?:1[6-9]|[2-9]\\\\d)?\\\\d{2})$|^(?:29(\\\\/|-|\\\\.)0?2\\\\3(?:(?:(?:1[6-9]|[2-9]\\\\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:0?[1-9]|1\\\\d|2[0-8])(\\\\/|-|\\\\.)(?:(?:0?[1-9])|(?:1[0-2]))\\\\4(?:(?:1[6-9]|[2-9]\\\\d)?\\\\d{2})$';\n }\n\n private getFormattedDate(d?: Date): string | undefined {\n return d && format(this.getZonedDate(d), outputFormat);\n }\n\n /**\n * The minimum date value (if passed).\n */\n get min(): string | undefined {\n return this.getFormattedDate(this.args.minDate);\n }\n\n /**\n * The maximum date value (if passed).\n */\n get max(): string | undefined {\n return this.getFormattedDate(this.args.maxDate);\n }\n\n /**\n * The formatted, selected date.\n */\n get displayDate(): string {\n return this.getFormattedDate(this.args.date) ?? '';\n }\n\n // endregion\n\n // region Actions\n\n /**\n * Determines if we should listen to the change event.\n */\n @action inputChanged(evt: Event & { target: HTMLInputElement }): void {\n if (this.hasTouchEvents || !(evt instanceof KeyboardEvent)) {\n this.changeDate(evt);\n }\n }\n\n /**\n * Determines if we should listen to the blur event.\n */\n @action inputBlurred(evt: FocusEvent & { target: HTMLInputElement }): void {\n if (!this.hasTouchEvents) {\n this.changeDate(evt);\n }\n }\n\n /**\n * Updates the date, as indicated by the native date picker.\n */\n private changeDate(evt: Event & { target: HTMLInputElement }): void {\n const { target } = evt,\n { value } = target;\n\n // Did the value change?\n if (value !== this.displayDate) {\n // Clear validity message.\n target.setCustomValidity('');\n\n // Is input value valid?\n if (target.reportValidity()) {\n if (value === '' && this.args.allowNull) {\n this.args.onchange(null, evt);\n }\n const [year, month, day] = value.split('-').map(Number);\n emitChangeEvent.call(this, evt, year, month - 1, day);\n }\n }\n }\n\n // endregion\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{#let (concat (guid-for this) \\\"_smart_time\\\") as |id|}}\\n {{#if @label}}\\n <label class=\\\"smart-time-label\\\" for={{id}}>\\n {{@label}}\\n </label>\\n {{/if}}\\n <input\\n type=\\\"time\\\"\\n class=\\\"smart-time-input\\\"\\n id={{if @label id}}\\n placeholder={{this.placeholder}}\\n pattern={{this.pattern}}\\n min={{this.min}}\\n max={{this.max}}\\n value={{this.displayTime}}\\n title={{t \\\"@adc/ui-components.expectedFormat\\\" format=this.placeholder}}\\n step={{if @showSeconds \\\"1\\\" \\\"60\\\"}}\\n ...attributes\\n {{on \\\"change\\\" this.inputChanged}}\\n {{on \\\"invalid\\\" this.invalidInput}}\\n />\\n{{/let}}\")","import { action } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport format from 'date-fns/format';\nimport getHours from 'date-fns/getHours';\nimport getMinutes from 'date-fns/getMinutes';\nimport getSeconds from 'date-fns/getSeconds';\nimport isSameDay from 'date-fns/isSameDay';\nimport parse from 'date-fns/parse';\nimport setHours from 'date-fns/setHours';\nimport setMinutes from 'date-fns/setMinutes';\nimport setSeconds from 'date-fns/setSeconds';\nimport { isNativeTimeInputSupported } from '../utils/time.ts';\nimport BaseTimeControl from './base-time-control.ts';\n\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type { BaseTimeControlSignature } from './base-time-control';\n\n/**\n * Returns an updated date based on passed input element value.\n *\n * @private\n */\nfunction getAdjustedTime(this: SmartTimeComponent, value: string): Date {\n const date = parse(value, this.outputFormat, new Date());\n return setHours(\n setMinutes(setSeconds(this.zonedDate ?? new Date(), getSeconds(date)), getMinutes(date)),\n getHours(date)\n );\n}\n\n/**\n * Returns a string describing the time boundary errors, if they exist.\n *\n * @private\n */\nfunction getBoundaryErrorMessage(this: SmartTimeComponent, newDate: Date): string {\n const { intl } = this,\n { minDate, maxDate } = this.args,\n fnGetText = (key: string, date: Date) =>\n intl.t(`@adc/ui-components.${key}`, {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line @adc/ember/require-tz-functions\n time: intl.formatTime(date, this.intlFormat)\n });\n\n if (minDate) {\n const zonedMin = this.getZonedDate(minDate);\n if (zonedMin > newDate) {\n return fnGetText('timeInvalidMin', zonedMin);\n }\n }\n\n if (maxDate) {\n const zonedMax = this.getZonedDate(maxDate);\n if (zonedMax < newDate) {\n return fnGetText('timeInvalidMax', zonedMax);\n }\n }\n\n return '';\n}\n\ninterface SmartTimeSignature {\n Element: HTMLInputElement;\n Args: BaseTimeControlSignature['Args'] & {\n /** Indicates whether to display seconds in the time picker. */\n showSeconds?: boolean;\n };\n}\n\n/**\n * @classdesc\n * A time picker that uses a native control, if possible, or a pattern restricted input if not possible.\n */\nexport default class SmartTimeComponent extends BaseTimeControl<SmartTimeSignature> {\n @service declare intl: ADCIntlService;\n\n // region Component state.\n\n /** @override */\n useNativeControl = isNativeTimeInputSupported;\n\n /**\n * Indicates the time format will have a token for am/pm.\n */\n get useMeridiem(): boolean {\n return !this.intl\n .formatTimeTz(new Date('2020-06-04T13:00:00.000Z'), {\n hour: 'numeric',\n minute: '2-digit',\n timeZone: 'UTC'\n })\n .includes('13');\n }\n\n /**\n * The format object for locale aware date formatting.\n */\n get intlFormat(): Intl.DateTimeFormatOptions {\n const fmt: Intl.DateTimeFormatOptions = {\n hour: 'numeric',\n minute: '2-digit'\n };\n\n if (this.args.showSeconds) {\n fmt.second = '2-digit';\n }\n\n return fmt;\n }\n\n /**\n * The format string for non-locale aware native control formatting.\n */\n get outputFormat(): string {\n const expectMeridiem = this.useMeridiem && !isNativeTimeInputSupported,\n pattern = [expectMeridiem ? 'h' : 'HH'];\n\n pattern.push(':mm');\n\n if (this.args.showSeconds) {\n pattern.push(':ss');\n }\n\n if (expectMeridiem) {\n pattern.push(' a');\n }\n\n return pattern.join('');\n }\n\n /**\n * The time input placeholder value.\n */\n get placeholder(): string {\n return `HH:MM${this.args.showSeconds ? ':SS' : ''}${this.useMeridiem ? ' AM' : ''}`;\n }\n\n /**\n * The time input pattern, for validation.\n */\n get pattern(): string {\n const segments = [],\n { useMeridiem } = this;\n\n if (isNativeTimeInputSupported || !useMeridiem) {\n // 00 - 23 Hours.\n segments.push('(0?[0-9]|1[0-9]|2[0-3])');\n } else {\n // 00 - 12 Hours.\n segments.push('(0?[1-9]|1[012])');\n }\n\n // 00 - 59 Minutes.\n segments.push('(:[0-5][0-9])');\n\n // Should we show seconds?\n if (this.args.showSeconds) {\n // 00 - 59 Seconds.\n segments.push('{2}');\n }\n\n if (!isNativeTimeInputSupported && useMeridiem) {\n // am/aM/Am/AM - pm/pM/Pm/PM\n segments.push('\\\\s[APap][mM]');\n }\n\n return `^${segments.join('')}$`;\n }\n\n private getFormattedDate(d?: Date): string | undefined {\n const { zonedDate } = this;\n\n if (!d || !zonedDate) {\n return undefined;\n }\n\n const v = this.getZonedDate(d);\n return isSameDay(v, zonedDate) ? format(v, this.outputFormat) : undefined;\n }\n\n /**\n * The minimum date value (if passed).\n */\n get min(): string | undefined {\n return this.getFormattedDate(this.args.minDate);\n }\n\n /**\n * The maximum date value (if passed).\n */\n get max(): string | undefined {\n return this.getFormattedDate(this.args.maxDate);\n }\n\n // endregion\n\n /**\n * The time input value.\n */\n get displayTime(): string | undefined {\n const { zonedDate } = this;\n if (!zonedDate) {\n return;\n }\n\n return isNativeTimeInputSupported\n ? format(zonedDate, this.outputFormat)\n : // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line @adc/ember/require-tz-functions\n this.intl.formatTime(zonedDate, this.intlFormat);\n }\n\n // endregion\n\n // region Actions\n\n /**\n * Determines if we should listen to the change event.\n */\n @action inputChanged(evt: Event & { target: HTMLInputElement }): void {\n this.changeTime(evt);\n }\n\n /**\n * Updates the custom validity message for the target input element.\n */\n @action invalidInput(evt: Event & { target: HTMLInputElement }): void {\n const { target } = evt;\n\n target.setCustomValidity(\n getBoundaryErrorMessage.call(this, getAdjustedTime.call(this, target.value)) ||\n this.intl.t('@adc/ui-components.timeFormat', {\n format: this.placeholder\n })\n );\n }\n\n /**\n * Validates the current time input value and notifies consumer if valid.\n */\n private changeTime(evt: Event & { target: HTMLInputElement }): void {\n const { target } = evt;\n if (!target.value || target.value === this.displayTime) {\n // No change.\n return;\n }\n\n // Clear validity message.\n target.setCustomValidity('');\n\n // Is input value valid?\n if (target.reportValidity()) {\n const newDate = getAdjustedTime.call(this, target.value);\n\n if (!isNativeTimeInputSupported) {\n const errorText = getBoundaryErrorMessage.call(this, newDate);\n\n if (errorText) {\n target.setCustomValidity(errorText);\n target.reportValidity();\n target.focus();\n return;\n }\n }\n\n // Pass new value out to consumer.\n this.args.onchange(this.getUtcDateFromZone(newDate), evt);\n }\n }\n\n // endregion\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<svg\\n class=\\\"spinner {{this.size}} {{if this.spinning \\'spinning\\'}}\\\"\\n xmlns=\\\"http://www.w3.org/2000/svg\\\"\\n viewBox=\\\"0 0 18 18\\\"\\n aria-label={{this.ariaLabel}}\\n role=\\\"status\\\"\\n aria-live=\\\"polite\\\"\\n ...attributes\\n>\\n {{#if this.iconTitle}}<title>{{this.iconTitle}}{{/if}}\\n {{#if @desc}}{{@desc}}{{/if}}\\n \\n\")","import Component from '@glimmer/component';\nimport { computed } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport { isEmpty } from '@ember/utils';\nimport { intlPath } from '@adc/i18n/path';\n\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\n\n/**\n * Allowed sizes for the spinner\n */\nconst ALLOWED_SIZES: ('small' | 'medium' | 'large' | 'x-large')[] = ['small', 'medium', 'large', 'x-large'];\n\nexport interface SpinnerSvgSignature {\n Element: SVGElement;\n Args: {\n /** Indicates the spinner is spinning (defaults to `false`). */\n spinning?: boolean;\n /** Optional spinner size. */\n size?: 'small' | 'medium' | 'large' | 'x-large';\n /** Optional title rendered into a `` element. */\n title?: string;\n /** Optional description rendered into a `<desc />` element. */\n desc?: string;\n };\n}\n\n/**\n * @classdesc\n * Component for showing a spinner.\n */\n@intlPath({ module: '@adc/ui-components', path: 'spinner-svg' })\nexport default class SpinnerSvg extends Component<SpinnerSvgSignature> {\n @service declare intl: ADCIntlService;\n\n /**\n * Indicates that the spinner is spinning (defaults to `true`).\n */\n get spinning(): boolean {\n return this.args.spinning ?? true;\n }\n\n /**\n * Computed CSS class for size.\n */\n @computed('args.size')\n get size(): string {\n const { size = 'medium' } = this.args;\n return size === 'medium' || ALLOWED_SIZES.indexOf(size) < 0 ? '' : size;\n }\n\n /**\n * If the title was not specified, use a default title.\n */\n @computed('args.title')\n get iconTitle(): string {\n const { title } = this.args;\n\n if (isEmpty(title)) {\n return this.intl.tc(this, 'loading');\n }\n\n return title as string;\n }\n\n /**\n * The aria-label of the icon, if there is one.\n */\n @computed('iconTitle', 'args.desc')\n get ariaLabel(): string {\n return [this.iconTitle, this.args.desc].filter((el) => !!el).join(' ');\n }\n\n // endregion\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{#if @menuItems}}\\n <DropdownActions @items={{@menuItems}} as |trigger|>\\n <button type=\\\"button\\\" class=\\\"status-toggle-trigger\\\" {{trigger}}>\\n <div class=\\\"status-toggle {{this.statusColor}}\\\" ...attributes>\\n {{#if @statusIcon}}\\n <SvgSymbol @icon={{@statusIcon}} class=\\\"status-svg\\\" />\\n {{/if}}\\n <span class=\\\"text-footnote\\\">{{@statusText}}</span>\\n <SvgSymbol @icon=\\\"dropdown-arrow\\\" />\\n </div>\\n </button>\\n </DropdownActions>\\n{{else}}\\n <div class=\\\"status-toggle {{this.statusColor}}\\\" ...attributes>\\n {{#if @statusIcon}}\\n <SvgSymbol @icon={{@statusIcon}} class=\\\"status-svg\\\" />\\n {{/if}}\\n <span class=\\\"text-footnote add-margin\\\">{{@statusText}}</span>\\n </div>\\n{{/if}}\")","import Component from '@glimmer/component';\n\nimport type { ColorName } from '../utils/type-utils';\nimport type { DropdownActionsSignature } from './dropdown-actions';\n\nexport interface StatusToggleSignature {\n Element: HTMLDivElement;\n Args: {\n /** The text to display. */\n statusText: string;\n /** Optional icon to display. */\n statusIcon?: string;\n /** Optional menu items to show when status is clicked. */\n menuItems?: DropdownActionsSignature['Args']['items'];\n /** An optional status color (defaults to gray-60). */\n color?: ColorName;\n };\n}\n\nexport default class StatusToggle extends Component<StatusToggleSignature> {\n /**\n * A computed CSS class based on the optional status color.\n */\n get statusColor(): string {\n return `adc-${this.args.color ?? 'gray-60'}-text`;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div\\n class=\\\"text-input\\n {{@containerClass}}\\n {{if this.resolvedErrorMessage \\'error\\'}}\\n {{if @showErrorIcon \\'show-error-icon\\'}}\\\"\\n {{did-update this.onExternalValueChange @value}}\\n {{did-update this.onErrorMessageChange @errorMessage}}\\n {{did-insert this.onComponentInsert}}\\n>\\n {{#if (has-block)}}\\n {{yield this.internalValue this.clearInput}}\\n {{/if}}\\n <Input\\n @value={{this.internalValue}}\\n @type={{coalesce @type \\\"text\\\"}}\\n dir={{if (eq @type \\\"tel\\\") \\\"ltr\\\"}}\\n @escape-press={{@escape-press}}\\n @enter={{@enter}}\\n ...attributes\\n {{on \\\"input\\\" this.handleInputChange}}\\n {{on \\\"keydown\\\" (fn this.onKeyDownNonDebounced this.internalValue)}}\\n {{on \\\"keyup\\\" (fn this.onKeyUpNonDebounced this.internalValue)}}\\n {{on \\\"focusin\\\" (fn (coalesce @on-focus-in (noop)) this.internalValue)}}\\n {{on \\\"focusout\\\" (fn (coalesce @on-focus-out (noop)) this.internalValue)}}\\n {{did-insert (coalesce @didInsert (noop))}}\\n {{will-destroy (coalesce @willDestroy (noop))}}\\n />\\n\\n {{#if (and this.resolvedErrorMessage @showErrorIcon)}}\\n <div class=\\\"error-icon-wrapper\\\">\\n <SvgSymbol @icon=\\\"issue\\\" @title={{this.resolvedErrorMessage}} class=\\\"error-icon\\\" />\\n </div>\\n {{/if}}\\n\\n {{#if (has-block \\\"after-input\\\")}}\\n {{yield this.internalValue this.clearInput to=\\\"after-input\\\"}}\\n {{/if}}\\n\\n {{#unless @showErrorIcon}}\\n <ErrorTooltip\\n @text={{this.resolvedErrorMessage}}\\n @placement={{@errorTooltipPlace}}\\n @duration={{this.errorDuration}}\\n @selector=\\\".ember-text-field\\\"\\n @selectorDirection=\\\"sibling\\\"\\n />\\n {{/unless}}\\n</div>\")","import Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { isDestroyed } from '@adc/ember-utils/utils/ember-helpers';\nimport { computed, action } from '@ember/object';\nimport { debounce } from '@ember/runloop';\nimport { scheduleOnce } from '@ember/runloop';\nimport { inject as service } from '@ember/service';\nimport { convertAutoDestroyToDuration } from './error-tooltip.ts';\n\nimport type DomService from '@adc/ember-utils/services/dom';\nimport type { CommonInputErrorTooltipArgs } from './error-tooltip';\n\nexport interface TextInputSignature {\n Element: HTMLInputElement;\n Args: Pick<CommonInputErrorTooltipArgs, 'errorMessage' | 'errorTooltipPlace'> & {\n /** the text input value. */\n value?: any;\n /** Indicates the input should only allow number. */\n onlyAllowNumbers?: boolean;\n /** Optional CSS class for the input container element. */\n containerClass?: string;\n /** Optional number of milliseconds before closing tooltip (defaults to zero so tooltip won't close). */\n autoDestroy?: CommonInputErrorTooltipArgs['errorDuration'];\n /** Indicates whether to show an error icon when there is an error message. */\n showErrorIcon?: boolean;\n /** Optional input type (defaults to \"text\"). */\n type?: string;\n /** Called when the users presses the ESC key. */\n 'escape-press'?: (v: string, e: KeyboardEvent) => any;\n /** Called on user key down. */\n 'key-down'?: (v: string, e: KeyboardEvent) => any;\n /** Called on user key up. */\n 'key-up'?: (v: string, e: KeyboardEvent) => any;\n /** Called when the user changes the input value. */\n 'value-change'?: (internalValue?: string, value?: string) => any;\n /** Called when teh user presses the enter key. */\n enter?: (v?: string) => any;\n /** Called on user key down, with no debounce delay. */\n 'key-down-non-debounced'?: (v: string, e: KeyboardEvent) => any;\n /** Called on user key up, with no debounce delay. */\n 'key-up-non-debounced'?: (v: string, e: KeyboardEvent) => any;\n /** Called when the input receives focus. */\n 'on-focus-in'?: (v: string, e: FocusEvent) => any;\n /** Called when the input loses focus. */\n 'on-focus-out'?: (v: string, e: FocusEvent) => any;\n /** Action that get's called when component is created */\n didInsert?: () => void;\n /** Action that get's called when component is destroyed */\n willDestroy?: () => void;\n };\n Blocks: {\n /** Renders above the input element, and yields the current value as well as an action for clearing the input. */\n default: [string | undefined, VoidFunction];\n /** Renders below the input element, and yields the current value as well as an action for clearing the input. */\n 'after-input': [string | undefined, VoidFunction];\n };\n}\n\n/**\n * Debounce delay for triggering typing actions.\n */\nconst DEBOUNCE_ACTION_DELAY = 200;\n\n/**\n * Triggers a value change action.\n *\n * @private\n */\nfunction valueChangeTrigger(this: TextInput): void {\n if (isDestroyed(this)) {\n return;\n }\n\n const { internalValue } = this;\n const { value } = this.args;\n\n const onValueChange = this.args['value-change'];\n\n // Send value change action up the chain\n if (onValueChange) {\n onValueChange(internalValue, value);\n }\n}\n\n/**\n * Triggers the key-up action.\n *\n * @private\n */\nfunction keyUpTrigger(this: TextInput, value: string, e: KeyboardEvent): void {\n const onKeyUp = this.args['key-up'];\n\n // Send value change action up the chain\n if (onKeyUp) {\n onKeyUp(value, e);\n }\n}\n\n/**\n * Triggers the key-down action.\n *\n * @private\n */\nfunction keyDownTrigger(this: TextInput, value: string, e: KeyboardEvent): void {\n const onKeyDown = this.args['key-down'];\n\n // Send value change action up the chain\n if (onKeyDown) {\n onKeyDown(value, e);\n }\n}\n\n/**\n * Toggles the error message visibility.\n *\n * @private\n */\nfunction toggleErrorMessageVisibility(this: TextInput, errorMessage?: string): void {\n if (!isDestroyed(this)) {\n this.hideErrorMessage = !errorMessage;\n }\n}\n\n/**\n * Restricts input for the given input to the given filter function.\n * @note This handles drag and drop, copy/paste, typing, etc.\n *\n * @private\n */\nfunction setInputFilter(this: TextInput, textInput: HTMLInputElement, inputFilter: (v: string) => boolean) {\n type TextInputElement = HTMLInputElement & {\n oldValue: string;\n oldSelectionStart: number;\n oldSelectionEnd: number;\n };\n\n ['input', 'keydown', 'keyup', 'mousedown', 'mouseup', 'select', 'contextmenu', 'drop'].forEach((event) => {\n this.dom.addListener(this, textInput, event, function (e: InputEvent & { target: TextInputElement }) {\n const input = e.target;\n if (inputFilter(input.value)) {\n Object.assign(input, {\n oldValue: input.value,\n oldSelectionStart: input.selectionStart,\n oldSelectionEnd: input.selectionEnd\n });\n } else if (Object.prototype.hasOwnProperty.call(input, 'oldValue')) {\n input.value = input.oldValue;\n input.setSelectionRange(input.oldSelectionStart, input.oldSelectionEnd);\n } else {\n input.value = '';\n }\n });\n });\n}\n\n/**\n * Component that wraps input text element in an ADC specific instance so that we can utilize all the styles and positioning.\n */\nexport default class TextInput extends Component<TextInputSignature> {\n @service declare dom: DomService;\n\n constructor(owner: unknown, args: TextInputSignature['Args']) {\n super(owner, args);\n\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n scheduleOnce('afterRender', this, this.onExternalValueChange);\n }\n\n /**\n * The internal value of the input.\n */\n @tracked internalValue?: string;\n\n /**\n * Should the error message be hidden?\n */\n @tracked hideErrorMessage = false;\n\n /**\n * The value of the maxLength attribute on the input element.\n */\n @tracked maxLength = -1;\n /**\n * The error message for the current input value.\n */\n get resolvedErrorMessage(): string | undefined {\n return this.hideErrorMessage ? '' : this.args.errorMessage;\n }\n\n /**\n * Converts the autoDestroy value to be used as the ErrorTooltip components duration property.\n */\n @computed('args.autoDestroy')\n get errorDuration(): number | undefined {\n return convertAutoDestroyToDuration(this.args.autoDestroy);\n }\n\n /**\n * Reacts on changes in text box value change.\n */\n updateInternalValue(value: string, sendUpdate = true): void {\n const { internalValue, maxLength } = this;\n\n if (internalValue === value) {\n return;\n }\n\n // If the input element has a maxLength attribute set,\n // then do not allow the input to exceed the character limit.\n // The Android Mobile App does not use the maxLength attribute.\n if (maxLength > 0 && value.length > maxLength) {\n value = value.slice(0, maxLength);\n }\n\n this.internalValue = value;\n\n // Clear any possible error messages\n toggleErrorMessageVisibility.call(this);\n\n // If there is a value change action mapped, then trigger debounced call\n if (sendUpdate && this.args['value-change']) {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n debounce<TextInput, typeof valueChangeTrigger>(this, valueChangeTrigger, DEBOUNCE_ACTION_DELAY);\n }\n }\n\n // region actions\n\n /**\n * Reacts on changes in value passed into the addon.\n */\n @action onExternalValueChange(): void {\n // Set internal value to be a copy of the passed in value\n let stringValue = '';\n const { value } = this.args;\n\n if (value || value === 0 || typeof value === 'boolean') {\n stringValue = String(value);\n }\n\n if (this.args.onlyAllowNumbers) {\n stringValue = /^-?\\d*$/.test(stringValue) ? stringValue : '';\n }\n\n this.updateInternalValue(stringValue, false);\n }\n\n /**\n * Reacts to the input value changes.\n */\n @action handleInputChange(e: InputEvent & { target: HTMLInputElement }): void {\n this.updateInternalValue(e.target.value);\n }\n\n /**\n * Clears the error message, which in turn hides the tooltip and ads the listeners.\n */\n @action onComponentInsert(element: HTMLDivElement): void {\n toggleErrorMessageVisibility.call(this);\n\n const input = element.querySelector<HTMLInputElement>('.ember-text-field');\n\n if (!input) {\n return;\n }\n\n this.maxLength = input.maxLength;\n\n if (this.args.onlyAllowNumbers) {\n setInputFilter.call(this, input, function (value: string) {\n return /^-?\\d*$/.test(value);\n });\n }\n }\n\n /**\n * Triggers a non-debounced keydown action.\n *\n * <strong>WARNING:</strong> Non debounced, bind to it only if absolutely necessary.\n */\n @action onKeyDownNonDebounced(currentValue: string, event: KeyboardEvent): void {\n const onKeyDownNonDebounced = this.args['key-down-non-debounced'];\n\n // Trigger non-debounced action\n if (onKeyDownNonDebounced) {\n onKeyDownNonDebounced(currentValue, event);\n }\n\n // Trigger debounced action\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n debounce<TextInput, typeof keyDownTrigger>(this, keyDownTrigger, currentValue, event, DEBOUNCE_ACTION_DELAY);\n }\n\n /**\n * Triggers a non-debounced keyup action.\n *\n * <strong>WARNING:</strong> Non debounced, bind to it only if absolutely necessary.\n */\n @action onKeyUpNonDebounced(currentValue: string, event: KeyboardEvent): void {\n const onKeyUpNonDebounced = this.args['key-up-non-debounced'];\n\n // Trigger non-debounced action\n if (onKeyUpNonDebounced) {\n onKeyUpNonDebounced(currentValue, event);\n }\n\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n debounce<TextInput, typeof keyUpTrigger>(this, keyUpTrigger, currentValue, event, DEBOUNCE_ACTION_DELAY);\n }\n\n /**\n * Clears the input value.\n */\n @action clearInput(): void {\n this.updateInternalValue('');\n\n // Trigger an enter action to update the search, if an enter action is provided.\n if (this.args.enter) {\n this.args.enter('');\n }\n }\n\n /**\n * Triggers when the error message changes.\n */\n @action onErrorMessageChange(): void {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n scheduleOnce<TextInput, typeof toggleErrorMessageVisibility>(\n 'afterRender',\n this,\n toggleErrorMessageVisibility,\n this.args.errorMessage\n );\n }\n\n // endregion\n}\n","import PopoverMenu from './popover-menu.js';\n\n/**\n * @classdesc\n *\n * A popover component without a backdrop that is styled as a tooltip.\n *\n * The popover positioning is done by [Popper.js]{@link https://popper.js.org}\n */\nexport default class Tooltip extends PopoverMenu {\n // region Property Overrides\n\n /** @override */\n placement = 'top';\n\n /** @override */\n popoverClass = 'tool-tip default';\n\n /** @override */\n minHeight = 0;\n\n /** @override */\n minWidth = 0;\n\n /** @override */\n hasBackdrop = false;\n\n /** @override */\n fullScreenOnMobile = false;\n\n /** @override */\n directRenderOnMobile = false;\n\n // endregion\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{! template-lint-disable no-invalid-interactive }}\\n{{! template-lint-disable no-pointer-down-event-binding }}\\n<div\\n draggable=\\\"true\\\"\\n class=\\\"zoom-pan-overlay overlay\\\"\\n {{did-update this.reset @isEnabled}}\\n {{did-update this.initializeIfReady @elementSelector}}\\n {{did-insert this.initializeIfReady}}\\n {{will-destroy this.tearDownListeners}}\\n {{did-resize this.resizeListener}}\\n {{on \\\"wheel\\\" this.zoom}}\\n {{on \\\"mousedown\\\" this.startPanning}}\\n {{on \\\"dblclick\\\" this.onDoubleClick}}\\n {{on \\\"dragstart\\\" this.stopPropagationIfZoomedIn}}\\n ...attributes\\n>\\n {{yield}}\\n</div>\")","import Component from '@glimmer/component';\nimport { isDestroyed } from '@adc/ember-utils/utils/ember-helpers';\nimport { addWeakListener, removeListener } from '@adc/ember-utils/utils/event-listeners';\nimport { constrainRange } from '@adc/ember-utils/utils/math';\nimport { action } from '@ember/object';\nimport { later } from '@ember/runloop';\nimport { htmlSafe } from '@ember/template';\n\nimport type { SafeString } from 'handlebars';\n\n/**\n * The amount to multiply the scale value for every scroll zoom event.\n */\nconst ZOOM_AMT = 0.1;\n\n/**\n * The amount a mouse wheel has to be scrolled in order to trigger a zoom event.\n */\nconst ZOOM_DELTA = 120;\n\n/**\n * The maximum scale factor that things can be zoomed in\n */\nconst MAX_ZOOM_SCALE = 3;\n\n/**\n * The percentage that we should pan the image to where the user's mouse is on zoom events when scrolling.\n */\nconst CENTERING_FACTOR_FOR_ZOOM_ON_SCROLL = 0.2;\n\n/**\n * The percentage that we should pan the image to where the user's mouse is on zoom events when double clicking.\n */\nconst CENTERING_FACTOR_FOR_ZOOM_ON_DOUBLE_CLICK = 1;\n\n/**\n * The amount that clicking on the zoom buttons zooms in or out.\n */\nconst ZOOM_BUTTON_AMOUNT = 250;\n\n/**\n * The amount that double clicking zooms in.\n */\nconst ZOOM_DOUBLE_CLICK_AMOUNT = -500;\n\n/**\n * The amount of zoom to apply to reset back to original position. (this is just an arbitrarily set really large number)\n */\nconst ZOOM_AMOUNT_FOR_RESET = 99999;\n\n/**\n * The amount that clicking on the pan buttons pans in the particular direction.\n */\nconst PAN_BUTTON_AMOUNT = 60;\n\nexport type DigitalZoomPanMethod = (eventDirection?: number, position?: Position) => void;\n\nexport type Limitations = {\n canPanLeft: boolean;\n canPanRight: boolean;\n canPanUp: boolean;\n canPanDown: boolean;\n canZoomIn: boolean;\n canZoomOut: boolean;\n};\n\nexport type Position = {\n top: number;\n left: number;\n scale: number;\n};\n\n/**\n * Actions that describe how we should move the image\n */\nexport type RelativeDirections = {\n in: number;\n out: number;\n reset: number;\n left: number;\n up: number;\n right: number;\n down: number;\n};\n\nexport interface ZoomPanOverlaySignature {\n Element: HTMLDivElement;\n Args: {\n /** Indicates the ZPO is enabled (defaults to `true`). */\n isEnabled: boolean;\n /** Used so APO and the consuming application are speaking the same language. */\n relativeDirections: RelativeDirections;\n /** Called when the ZPO is changed to pass out the new style value. */\n zoomPanStyle: (style: SafeString) => void;\n /** When this component is initialized, we call this method to pass up a function so that the host component can make calls for panning and zooming. */\n sendDigitalZoomPanMethod: (digitalZoomPanMethod: DigitalZoomPanMethod) => void;\n /** Tells the host component what the new zoom/pan limitations (ie can't zoom in any further) are. */\n zoomPanLimitationsUpdated: (limitations: Limitations, position: Position) => void;\n /** A CSS selector to get the host element. */\n elementSelector: string | null;\n };\n Blocks: {\n default: [];\n };\n}\n\nexport default class ZoomPanOverlay extends Component<ZoomPanOverlaySignature> {\n left = 0;\n top = 0;\n scale = 1;\n height = 0;\n width = 0;\n\n /**\n * Collection of mouse event handler to clear on destroy.\n *\n * @ignore\n */\n mouseEventHandlers?: string[];\n\n /**\n * If this component is fully initialized. Meaning it knows its size properties and has passed its parent\n * component all the necessary methods/information\n */\n isInitialized = false;\n\n /**\n * Indicates whether pan/zoom are enabled.\n */\n get isEnabled(): boolean {\n return this.args.isEnabled ?? true;\n }\n\n /**\n * Cancel the passed event.\n */\n private cancelEvent(event: Event): void {\n event.preventDefault();\n event.stopPropagation();\n }\n\n /**\n * Returns the absolute top and left boundary positions.\n */\n private getBounds(): { boundsX: number; boundsY: number } {\n const { scale } = this;\n return {\n boundsX: (this.width / 2) * (scale - 1),\n boundsY: (this.height / 2) * (scale - 1)\n };\n }\n\n /**\n * Constrains the new requested left/top/scale values into the bounds and announces what the limitations are after this change.\n *\n * @param newLeft\n * @param newTop\n * @param newScale\n * @private\n */\n private constrainAndNotifyNewParams(newLeft: number, newTop: number, newScale: number) {\n this.scale = newScale;\n\n // Get bounds after changing the scale, because the new scale value will impact what getBounds returns.\n const { boundsX, boundsY } = this.getBounds();\n\n Object.assign(this, {\n left: constrainRange(newLeft, -boundsX, boundsX),\n top: constrainRange(newTop, -boundsY, boundsY)\n });\n\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n later(() => {\n this.args.zoomPanStyle(\n htmlSafe(`transform: translate(${this.left}px, ${this.top}px) scale(${this.scale});`)\n );\n\n this.announceZoomPanLimitations();\n }, 0);\n }\n\n /**\n * Tells the parent component what the new zoom/pan limitations (ie can't zoom in any further) are.\n *\n * @private\n */\n private announceZoomPanLimitations() {\n const { left, top, scale } = this;\n const { boundsX, boundsY } = this.getBounds();\n\n this.args.zoomPanLimitationsUpdated &&\n this.args.zoomPanLimitationsUpdated(\n {\n canPanLeft: left !== boundsX,\n canPanRight: left !== -boundsX,\n canPanUp: top !== boundsY,\n canPanDown: top !== -boundsY,\n canZoomIn: scale !== MAX_ZOOM_SCALE,\n canZoomOut: scale !== 1\n },\n {\n left,\n top,\n scale\n }\n );\n }\n\n /**\n * Sets the width and height properties of the element.\n */\n private setSizeValues(): void {\n if (isDestroyed(this)) {\n return;\n }\n\n const { elementSelector } = this.args;\n\n if (elementSelector === null) {\n return;\n }\n\n const element = document.querySelector(elementSelector) as HTMLElement;\n\n if (!element) {\n return;\n }\n\n const { offsetWidth, offsetHeight } = element;\n\n Object.assign(this, {\n width: offsetWidth,\n height: offsetHeight\n });\n }\n\n /**\n * Triggers a zoom event\n *\n * @param zoomAmount the amount to zoom in or out. Negative numbers is zoom in, positive is zoom out\n * @param centeringFactorForZoom the percentage (0 to 1) to pan directly to the event location. IE 0.5 means pan halfway from current location to event.\n * @param eventLocationX x value of mouse/event location. if not passed in we assume the middle\n * @param eventLocationY y value of mouse/event location. if not passed in we assume the middle\n * @private\n */\n private triggerZoom(\n zoomAmount: number,\n centeringFactorForZoom: number,\n eventLocationX?: number,\n eventLocationY?: number\n ) {\n if (!this.isEnabled || !this.isInitialized) {\n return;\n }\n\n const { width, height, left, top, scale } = this;\n\n const delta = zoomAmount / -ZOOM_DELTA,\n unboundedScale = scale * (1 + delta * ZOOM_AMT),\n newScale = Math.min(Math.max(unboundedScale, 1), MAX_ZOOM_SCALE);\n\n if (scale === newScale) {\n return;\n }\n\n if (newScale === 1) {\n return this.reset();\n }\n\n // Setting the new scale value before calling getBounds so that getBounds works off of the new scale info.\n this.scale = newScale;\n\n if (!eventLocationX || !eventLocationY) {\n eventLocationX = this.width / 2;\n eventLocationY = this.height / 2;\n }\n\n const mouseOffsetX = eventLocationX,\n mouseOffsetY = eventLocationY;\n\n let newLeft, newTop;\n\n // We want to pan towards where the users mouse is only if we are zooming in.\n if (delta > 0) {\n const mousePercentLeft = mouseOffsetX / width,\n mousePercentTop = mouseOffsetY / height,\n mouseTargetAsLeftValue = (mousePercentLeft - 0.5) * width,\n mouseTargetAsTopValue = (mousePercentTop - 0.5) * height;\n\n // When zooming in, we don't want to pan DIRECTLY to where the users mouse is, as this will cause the next zoom event triggered immediately after this one (zoom events get\n // triggered in bunches) to happen in a different location on the image, making for a difficult user experience. Instead we apply CENTERING_FACTOR_FOR_ZOOM and only pan\n // partially in the direction of where the user's mouse is, making it easier for a user to zoom specifically into the part of the image they want to see.\n newLeft = left - mouseTargetAsLeftValue * centeringFactorForZoom;\n newTop = top - mouseTargetAsTopValue * centeringFactorForZoom;\n } else {\n newLeft = left;\n newTop = top;\n }\n\n this.constrainAndNotifyNewParams(newLeft, newTop, newScale);\n }\n\n /**\n * Triggers various initialization such as setting size values and sending this component's parent information and methods it can use\n */\n private initializeComponent(): void {\n const { sendDigitalZoomPanMethod } = this.args;\n\n this.setSizeValues();\n\n // When this component is initialized, we call this.args.sendDigitalZoomPanMethod and pass up a function so that the parent to this component\n // can make calls for panning and zooming in here\n sendDigitalZoomPanMethod &&\n sendDigitalZoomPanMethod((eventDirection?: number, position?: Position) => {\n const { relativeDirections } = this.args;\n\n if (eventDirection == null) {\n if (position) {\n this.constrainAndNotifyNewParams(position.left, position.top, position.scale);\n }\n\n return;\n }\n\n if (\n [relativeDirections.in, relativeDirections.out, relativeDirections.reset].includes(eventDirection)\n ) {\n let deltaY = 0;\n\n switch (eventDirection) {\n case relativeDirections.in:\n deltaY = -ZOOM_BUTTON_AMOUNT;\n break;\n case relativeDirections.out:\n deltaY = ZOOM_BUTTON_AMOUNT;\n break;\n case relativeDirections.reset:\n deltaY = ZOOM_AMOUNT_FOR_RESET;\n break;\n }\n\n this.triggerZoom(deltaY, CENTERING_FACTOR_FOR_ZOOM_ON_SCROLL);\n } else {\n let { left, top } = this;\n\n if (eventDirection == relativeDirections.right) {\n left -= PAN_BUTTON_AMOUNT;\n } else if (eventDirection == relativeDirections.down) {\n top -= PAN_BUTTON_AMOUNT;\n } else if (eventDirection == relativeDirections.left) {\n left += PAN_BUTTON_AMOUNT;\n } else {\n top += PAN_BUTTON_AMOUNT;\n }\n\n this.constrainAndNotifyNewParams(left, top, this.scale);\n }\n });\n\n this.announceZoomPanLimitations();\n this.isInitialized = true;\n }\n\n /**\n * When this component's elementSelector args change, if its populated lets trigger initialization\n */\n @action initializeIfReady(): void {\n // much of initialization depends on having an elementSelector in the args, and often this selector isn't immediately available.\n // on svr-timeline for instance, the elementSelector isn't populated until the user clicks PLAY\n if (this.args.elementSelector && !this.isInitialized) {\n this.initializeComponent();\n }\n }\n\n /**\n * The window resize listener\n *\n * @ignore\n */\n @action resizeListener(): void {\n this.setSizeValues();\n }\n\n /**\n * Rests pan and zoom values.\n */\n @action reset(): void {\n this.constrainAndNotifyNewParams(0, 0, 1);\n }\n\n /**\n * Zooms the target.\n */\n @action zoom(event: WheelEvent): void {\n this.cancelEvent(event);\n\n this.triggerZoom(event.deltaY, CENTERING_FACTOR_FOR_ZOOM_ON_SCROLL, event.offsetX, event.offsetY);\n }\n\n /**\n * On user double click\n *\n * @param event\n */\n @action onDoubleClick(event: MouseEvent): void {\n // Double clicking while at the max zoom level resets the zoom level to the original.\n if (this.scale === MAX_ZOOM_SCALE) {\n this.reset();\n return;\n }\n\n this.triggerZoom(\n ZOOM_DOUBLE_CLICK_AMOUNT,\n CENTERING_FACTOR_FOR_ZOOM_ON_DOUBLE_CLICK,\n event.offsetX,\n event.offsetY\n );\n }\n\n /**\n * Begins the panning action.\n */\n @action startPanning(event: MouseEvent): void {\n // Can't pan if the feature is disabled, the image isnt zoomed in, or if this is a right click mousedown event.\n if (!this.isEnabled || this.scale === 1 || event.button !== 0) {\n return;\n }\n\n const { left, top } = this,\n { clientX: startX, clientY: startY } = event;\n\n this.mouseEventHandlers = [\n addWeakListener(this, document, 'mousemove', (event: MouseEvent) => {\n this.cancelEvent(event);\n\n this.constrainAndNotifyNewParams(\n event.clientX - startX + left,\n event.clientY - startY + top,\n this.scale\n );\n }),\n\n addWeakListener(this, document, 'mouseup', () => this.tearDownListeners())\n ];\n }\n\n /**\n * Called before the component element is destroyed, to detach global event listeners.\n */\n @action tearDownListeners(): void {\n (this.mouseEventHandlers ?? []).forEach((id) => removeListener(id));\n }\n\n /**\n * Prevents parent components from doing drag drop events if we're zoomed in, because we just want mouse-down combined with panning to change the ptz\n * and nothing else. Otherwise unexpected behavior can occur.\n */\n @action stopPropagationIfZoomedIn(e: DragEvent): void {\n if (this.scale === 1) {\n return;\n }\n\n this.cancelEvent(e);\n }\n}\n","import Helper from '@ember/component/helper';\nimport { getModalFooterButton } from '../components/modals/base/footer/modal-footer.ts';\nimport { isTestEnvironment } from '../utils/general.ts';\n\nimport type { ModalButtonConfig } from '../components/modals/base/footer/modal-footer';\n\nexport interface GetModalButtonSignature {\n Args: {\n Named: Partial<ModalButtonConfig> & {\n isPrimary?: boolean;\n };\n };\n Return: ModalButtonConfig & {\n toString?: () => string;\n };\n}\n\n/**\n * A template helper for generating modal footer button configuration objects (ModalButtonConfig).\n */\nexport default class GetModalButton extends Helper<GetModalButtonSignature> {\n compute(\n _: [],\n { text = '', action, css, disabled, isPrimary }: GetModalButtonSignature['Args']['Named']\n ): GetModalButtonSignature['Return'] {\n const cfg = getModalFooterButton(text, action, css, disabled, isPrimary);\n\n if (isTestEnvironment.call(this)) {\n cfg.toString = function () {\n return JSON.stringify(this);\n };\n }\n\n return cfg;\n }\n}\n","import { set } from '@ember/object';\n\ntype EventToHandle = Event & { target: HTMLInputElement };\n\nexport default function handleBinaryChange<T extends object>(context: T, name: keyof T): (evt: EventToHandle) => void {\n return (evt: EventToHandle): void => {\n set(context, name, !!evt.target.checked as any);\n };\n}\n","import { htmlSafe } from '@ember/template';\n\nexport default function iconFill(color?: string): ReturnType<typeof htmlSafe> {\n return htmlSafe(color ? `fill:${color};` : '');\n}\n","import Helper from '@ember/component/helper';\nimport { inject as service } from '@ember/service';\n\nimport type ModalService from '../services/modals';\n\ntype MethodParameters = Parameters<ModalService['showConfirmationDialog']>;\n\nexport interface ShowConfirmationModalSignature {\n Args: {\n Named: {\n title: MethodParameters[0];\n desc: MethodParameters[1];\n confirmButtonProperties?: MethodParameters[2];\n cancelButtonProperties?: MethodParameters[3];\n cssClass?: MethodParameters[4];\n };\n };\n Return: () => ReturnType<ModalService['showConfirmationDialog']>;\n}\n\n/**\n * Returns a function that when executed will open the confirmation dialog.\n */\nexport default class ShowConfirmationModal extends Helper<ShowConfirmationModalSignature> {\n @service declare modals: ModalService;\n\n compute(\n _: never[],\n {\n title,\n desc,\n confirmButtonProperties,\n cancelButtonProperties,\n cssClass\n }: {\n title: MethodParameters[0];\n desc: MethodParameters[1];\n confirmButtonProperties?: MethodParameters[2];\n cancelButtonProperties?: MethodParameters[3];\n cssClass?: MethodParameters[4];\n }\n ): () => ReturnType<ModalService['showConfirmationDialog']> {\n return () =>\n this.modals.showConfirmationDialog(title, desc, confirmButtonProperties, cancelButtonProperties, cssClass);\n }\n}\n","import EmberObject from '@ember/object';\n\nexport function initialize(application) {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-classic-classes\n application.register('@adc/ui-components:appValues', EmberObject.extend({}), { singleton: true });\n}\n\nexport default {\n name: '@adc/ui-components-initializer',\n initialize\n};\n","import Service from '@ember/service';\nimport { classify, dasherize } from '@ember/string';\n\ninterface ColorDescriptorObject {\n light: string;\n dark: string;\n highContrast: string;\n darkHighContrast: string;\n lightText: string;\n highContrastText: string;\n}\n\n/**\n * Class to be added on the body to activate the dark mode.\n */\nexport const DARK_MODE_CLASS = 'dark';\n\n/**\n * Class to be added on the body to activate the high-contrast mode.\n */\nexport const HIGH_CONTRAST_MODE_CLASS = 'hc';\n\n/**\n * High Contrast mode enum\n *\n * @private\n * @memberof AccessibilityService\n */\nconst HIGH_CONTRAST = 0;\n\n/**\n * Dark mode enum\n *\n * @private\n * @memberof AccessibilityService\n */\nconst DARK_MODE = 1;\n\n/**\n * Updates the root custom variables.\n *\n * @private\n * @memberof AccessibilityService\n */\nfunction updateRootVariable(color: ColorDescriptorObject, type: string) {\n if (color) {\n const rootStyle = document.documentElement.style;\n\n [\n ['light', ''],\n ['highContrast', 'hc'],\n ['dark', 'dark'],\n ['darkHighContrast', 'dark-hc']\n ].forEach(([key, css]: [keyof ColorDescriptorObject, string]) => {\n const description = dasherize(classify(css) + classify(type)),\n code = color[key];\n\n if (code) {\n rootStyle.setProperty(`--${description}-color`, code);\n }\n\n if (key === 'light' || key === 'highContrast') {\n const textColor = color[`${key}Text`];\n if (textColor) {\n rootStyle.setProperty(`--${description}-text-color`, textColor);\n }\n }\n });\n }\n}\n\n/**\n * Generates the corresponding class names for the given list of display mode features.\n *\n * @private\n * @memberof AccessibilityService\n */\nfunction getDisplayModeClasses(featuresList: Array<number> = []): Array<string> {\n const list: string[] = [];\n\n featuresList.forEach((feature) => {\n switch (feature) {\n case DARK_MODE:\n list.push(DARK_MODE_CLASS);\n break;\n case HIGH_CONTRAST:\n list.push(HIGH_CONTRAST_MODE_CLASS);\n break;\n default:\n break;\n }\n });\n\n return list;\n}\n\n/**\n * @classdesc\n * A service for accessibility.\n */\nexport default class AccessibilityService extends Service {\n /**\n * The last focused element on the page.\n */\n private lastFocusedElement?: HTMLElement;\n\n /**\n * Caches the focused element.\n */\n saveFocusedElement(): void {\n this.lastFocusedElement = document.activeElement as HTMLElement;\n }\n\n /**\n * Restores the focus on the cached element.\n */\n restoreFocus(): void {\n this.lastFocusedElement?.focus();\n }\n\n /**\n * Sets the focus on the specified element.\n */\n focusElement(selector: string, context: Element | Document = document): boolean {\n const element = context.querySelector(selector) as HTMLElement;\n if (element) {\n element.focus();\n return true;\n }\n\n return false;\n }\n\n /**\n * Updates the custom variables with the dealer colors.\n */\n updateDealerColors(\n headerColor: ColorDescriptorObject,\n navColor: ColorDescriptorObject,\n highlightColor: ColorDescriptorObject\n ): void {\n updateRootVariable(headerColor, 'header');\n updateRootVariable(navColor, 'nav-highlight');\n updateRootVariable(highlightColor, 'highlight');\n }\n\n /**\n * Activates dark and/or high-contrast for the entire app.\n */\n activateDisplayMode(featuresList: Array<number>): void {\n if (!featuresList) {\n return;\n }\n\n const displayModeClasses = getDisplayModeClasses(featuresList);\n\n displayModeClasses.forEach((className) => {\n document.body.classList.add(className);\n });\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<Modals::Confirmations::Edit::EditConfirmations\\n @title={{coalesce @model.title (t \\\"@adc/ui-components.delete\\\")}}\\n @buttonCss=\\\"btn-color-danger\\\"\\n @buttonText={{t \\\"@adc/ui-components.delete\\\"}}\\n @editConfirmed={{@model.delete}}\\n @editCancelled={{this.modals.closeModal}}\\n class=\\\"confirm-delete-modal\\\"\\n ...attributes\\n>\\n <p>\\n {{coalesce @model.message (t \\\"@adc/ui-components.deleteMessage\\\")}}\\n </p>\\n</Modals::Confirmations::Edit::EditConfirmations>\")","import Component from '@glimmer/component';\nimport { inject as service } from '@ember/service';\n\nimport type ModalService from '../../../../services/modals.ts';\nimport type { ModalModel } from '../../../../services/modals.ts';\nimport type { EditConfirmationModalSignature } from '../edit/edit-confirmations';\n\nexport interface ConfirmDeleteModel extends ModalModel {\n title?: EditConfirmationModalSignature['Args']['title'];\n message?: string;\n delete: VoidFunction;\n}\n\nexport interface ConfirmDeleteDialogSignature {\n Element: EditConfirmationModalSignature['Element'];\n Args: {\n /** The `ConfirmDeleteModel`. */\n model: ConfirmDeleteModel;\n };\n}\n\n/**\n * @classdesc\n * A dialog to confirm deleting of an item\n */\nexport default class ConfirmDeleteDialog extends Component<ConfirmDeleteDialogSignature> {\n @service declare modals: ModalService;\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<Modals::Confirmations::Edit::EditConfirmations\\n @title={{coalesce @model.title (t \\\"@adc/ui-components.rename\\\")}}\\n @buttonCss=\\\"btn-color-primary\\\"\\n @buttonText={{t \\\"@adc/ui-components.ok\\\"}}\\n @editConfirmed={{this.saveChanges}}\\n class=\\\"rename-dialog-modal\\\"\\n ...attributes\\n>\\n {{#if @model.message}}\\n <label for=\\\"{{guid-for this}}_rename\\\">\\n {{@model.message}}\\n </label>\\n {{/if}}\\n\\n <TextInput\\n @errorMessage={{@model.output.error}}\\n @type=\\\"text\\\"\\n @value={{@model.output.value}}\\n @errorTooltipPlace=\\\"top\\\"\\n id=\\\"{{guid-for this}}_rename\\\"\\n maxlength={{@model.maxLength}}\\n {{on \\\"change\\\" this.changeInputValue}}\\n {{on \\\"keyup\\\" this.keyInput}}\\n />\\n</Modals::Confirmations::Edit::EditConfirmations>\")","import Component from '@glimmer/component';\nimport { isEnterCode } from '@adc/ember-utils/utils/a11y';\nimport { action } from '@ember/object';\n\nimport type { ModalModel } from '../../../../services/modals.ts';\nimport type { EditConfirmationModalSignature } from '../edit/edit-confirmations';\n\nexport interface RenameDialogModel extends ModalModel {\n title: EditConfirmationModalSignature['Args']['title'];\n maxLength?: number;\n rename: (value: string) => boolean | Promise<boolean>;\n message?: string;\n output: { value: string; error?: string };\n}\n\nexport interface RenameDialogSignature {\n Element: EditConfirmationModalSignature['Element'];\n Args: {\n /** The rename dialog model. */\n model: RenameDialogModel;\n };\n}\n\n/**\n * @classdesc\n * A dialog for renaming an item\n */\nexport default class RenameDialog extends Component<RenameDialogSignature> {\n /**\n * Stored value to replace model's value\n */\n cachedValue?: string;\n\n /**\n * Saves the cached value.\n */\n @action\n saveChanges(): boolean | Promise<boolean> {\n return this.args.model.rename(this.cachedValue ?? this.args.model.output.value);\n }\n\n /**\n * Updates the cached value.\n */\n @action\n changeInputValue(evt: KeyboardEvent & { target: HTMLInputElement }): void {\n this.cachedValue = evt.target.value ?? this.args.model.output.value;\n }\n\n /**\n * Handles keydown for escape and enter.\n */\n @action\n keyInput(evt: KeyboardEvent & { target: HTMLInputElement }): void {\n if (!isEnterCode(evt.code)) {\n return;\n }\n\n this.changeInputValue(evt);\n const closeBtn = evt.target\n .closest('.rename-dialog-modal')\n ?.querySelector<HTMLElement>('.ui-modal-footer .btn-color-primary');\n\n // Cache new value, then trigger save using button so progress is shown.\n if (closeBtn) {\n closeBtn.click();\n } else {\n this.saveChanges();\n }\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div class=\\\"confirmation-modal {{coalesce @model.cssClass \\'\\'}}\\\" ...attributes>\\n <Modals::DialogModals::Simple::SimpleDialog\\n @title={{@model.title}}\\n @disableHeaderClose={{true}}\\n @disableFooterClose={{true}}\\n @buttons={{@model.buttons}}\\n >\\n <p class=\\\"confirm-desc\\\">\\n {{@model.description}}\\n </p>\\n </Modals::DialogModals::Simple::SimpleDialog>\\n</div>\")","import templateOnlyComponent from '@ember/component/template-only';\n\nimport type { SimpleDialogSignature } from '../simple/simple-dialog';\n\nexport interface ConfirmationDialogSignature {\n Element: HTMLDivElement;\n Args: {\n model: Pick<SimpleDialogSignature['Args'], 'title' | 'buttons'> & {\n /** The text to display in the confirmation modal body. */\n description: string;\n /** Optional CSS class applied to the modal `<div />`. */\n cssClass?: string;\n };\n };\n}\n\nconst ConfirmationDialog = templateOnlyComponent<ConfirmationDialogSignature>();\nexport default ConfirmationDialog;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div class=\\\"info-dialog-modal {{coalesce @model.css \\'\\'}} {{if @model.resizableOnMobile \\'resizable\\'}}\\\">\\n <Modals::DialogModals::Simple::SimpleDialog\\n @title={{@model.title}}\\n @buttons={{@model.buttons}}\\n @disableHeaderClose={{@model.disableHeaderClose}}\\n @disableFooterClose={{@model.disableFooterClose}}\\n >\\n <div\\n class=\\\"info-dialog-body\\\"\\n {{on \\\"scroll\\\" this.handleScroll}}\\n {{did-resize this.updateScrollIndicator debounce=250}}\\n >\\n {{#if @model.svg}}\\n <div class=\\\"icon-container\\\">\\n <div class=\\\"icon\\\">\\n <SvgSymbol @icon={{@model.svg}} />\\n </div>\\n </div>\\n {{/if}}\\n {{@model.info}}\\n </div>\\n </Modals::DialogModals::Simple::SimpleDialog>\\n</div>\")","import Component from '@glimmer/component';\nimport { action } from '@ember/object';\n\nimport type { SafeString } from 'handlebars';\nimport type { ModalModel } from '../../../../services/modals.ts';\nimport type { SimpleDialogSignature } from '../simple/simple-dialog';\n\nexport interface InfoDialogModel\n extends ModalModel,\n Pick<SimpleDialogSignature['Args'], 'title' | 'buttons' | 'disableHeaderClose' | 'disableFooterClose'> {\n /** The text to display in the info dialog. */\n info: string | SafeString;\n /** Optional SVG to display in the info dialog. */\n svg?: string;\n /** Optional CSS class applied to info dialog element. */\n css?: string;\n /** Optional bool to allow the modal to resize on mobile screens. */\n resizableOnMobile?: boolean;\n}\n\nexport interface InfoDialogSignature {\n Element: HTMLDivElement;\n Args: {\n model: InfoDialogModel;\n };\n}\n\n/**\n * @classdesc\n * A simple info dialog for displaying a string (or HTML) with custom buttons and title.\n */\nexport default class InfoDialog extends Component<InfoDialogSignature> {\n @action updateScrollIndicator(el: HTMLDivElement): void {\n const dialog = el.closest('.simple-dialog-modal');\n if (dialog) {\n dialog.classList.toggle('has-scroll-indicator', el.scrollHeight > el.offsetHeight);\n }\n }\n\n @action handleScroll(evt: MouseEvent & { target: HTMLDivElement }): void {\n const el = evt.target;\n el.classList.toggle('scrolled', !!el.scrollTop);\n }\n}\n","import { tracked } from '@glimmer/tracking';\nimport { A } from '@ember/array';\nimport { assert } from '@ember/debug';\nimport { computed, action } from '@ember/object';\nimport Service, { inject as service } from '@ember/service';\nimport { isHTMLSafe } from '@ember/template';\nimport { isEmpty } from '@ember/utils';\nimport { getModalFooterButton } from '../components/modals/base/footer/modal-footer.ts';\nimport ConfirmDeleteDialog from '../components/modals/confirmations/delete/confirm-delete.ts';\nimport RenameDialog from '../components/modals/confirmations/rename/rename-dialog.ts';\nimport ConfirmationDialog from '../components/modals/dialog-modals/confirm/confirmation-dialog.ts';\nimport InfoDialog from '../components/modals/dialog-modals/info/info-dialog.ts';\nimport PromiseDialog from '../components/modals/dialog-modals/promise/promise-dialog.ts';\nimport LoadingDialog from '../components/modals/loading/loading-spinner.ts';\nimport { hasHTML } from '../utils/general.ts';\n\nimport type NativeBridgeService from '@adc/app-infrastructure/services/native-bridge';\nimport type { NativeButton } from '@adc/app-infrastructure/services/native-bridge';\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\n// eslint-disable-next-line ember/no-classic-components\nimport type EmberComponent from '@ember/component';\nimport type { TOC } from '@ember/component/template-only';\nimport type Component from '@glimmer/component';\nimport type { SafeString } from 'handlebars';\nimport type { ModalButtonConfig } from '../components/modals/base/footer/modal-footer';\nimport type { ConfirmDeleteModel } from '../components/modals/confirmations/delete/confirm-delete';\nimport type { RenameDialogModel } from '../components/modals/confirmations/rename/rename-dialog';\nimport type { InfoDialogModel } from '../components/modals/dialog-modals/info/info-dialog';\nimport type { PromiseDialogModel } from '../components/modals/dialog-modals/promise/promise-dialog';\nimport type AccessibilityService from './accessibility';\nimport type NotificationManagerService from './notification-manager';\n\n/**\n * The private collection of modal objects.\n *\n * @private\n */\nconst activeModals: ReturnType<typeof A<Modal>> = A<Modal>([]);\n\nexport type ModalComponent = TOC<any> | typeof Component<any> | typeof EmberComponent<any>;\n\nexport interface ModalModel {\n disableBackdropClose?: boolean;\n}\n\ninterface VariableModalModal extends ModalModel {\n [key: string]: any;\n}\n\ntype CloseFn = () => boolean | void;\n\n/**\n * The modal configuration object.\n *\n * @inner\n */\nclass Modal {\n /**\n * The path to the modal component to render\n */\n type: ModalComponent;\n\n /**\n * Contains any specific data for a modal by its caller\n */\n @tracked model: VariableModalModal;\n\n /**\n * An optional handler called when the dialog closes\n */\n onClose: () => boolean | void | undefined;\n\n /**\n * Modal Constructor\n */\n constructor(type: ModalComponent, model: VariableModalModal = {}, onClose: () => boolean | void = () => true) {\n assert('[@adc/ui-components] Modal object \"type\" parameter required', !isEmpty(type));\n\n this.type = type;\n this.model = model;\n this.onClose = onClose;\n }\n}\n\ninterface ModalNativeButton extends NativeButton {\n css?: string;\n}\n\n/**\n * @classdesc\n * Modal Manager service to handle opening and closing of modals\n */\nexport default class ModalService extends Service {\n @service declare accessibility: AccessibilityService;\n @service declare notificationManager: NotificationManagerService;\n @service declare intl: ADCIntlService;\n @service declare nativeBridge: NativeBridgeService;\n\n /**\n * Returns readable array of activeModals\n */\n @computed()\n get modalsToRender(): typeof activeModals {\n return activeModals;\n }\n\n /**\n * Checks if the top-most modal matches the given type\n */\n modalIsOpen(type: ModalComponent): boolean {\n const { modalsToRender } = this;\n return modalsToRender[modalsToRender.length - 1]?.type === type;\n }\n\n /**\n * Render a confirmation dialog modal.\n */\n async showConfirmationDialog(\n title: string,\n desc: string | SafeString,\n confirmButtonProperties: ModalButtonConfig = {},\n cancelButtonProperties: ModalButtonConfig | null = {},\n cssClass?: string\n ): Promise<void> {\n const { nativeBridge } = this,\n buttons = [\n [confirmButtonProperties, 'confirm', nativeBridge.getButtonTypeConfirm(), () => {}, 'btn-color-primary']\n ];\n\n if (cancelButtonProperties) {\n buttons.unshift([cancelButtonProperties, 'cancel', nativeBridge.getButtonTypeCancel(), () => {}, '']);\n }\n\n const nativeButtons = buttons.map(\n ([props, text, nativeButtonType, fn, css]: [\n ModalButtonConfig,\n string,\n string,\n () => unknown,\n string\n ]): ModalNativeButton =>\n ({\n text: this.intl.t(`@adc/ui-components.${text}`),\n type: nativeButtonType,\n action: fn,\n renderAsNative: true,\n css,\n ...props\n } as ModalNativeButton)\n );\n\n if (nativeBridge.doesSupportConfirmationDialog) {\n try {\n await nativeBridge.showConfirmationDialog(title, String(desc), nativeButtons);\n return;\n } catch (e) {\n // Do nothing\n }\n }\n\n if (!isHTMLSafe(desc) && hasHTML(desc)) {\n console.warn('The confirmation dialog displayed a description containing HTML characters.');\n assert(\n '[@adc/ui-components] The confirmation dialog displayed a description containing HTML characters.',\n false\n );\n }\n\n this.showModal(ConfirmationDialog, {\n title,\n description: desc,\n buttons: nativeButtons.map(({ css, text, action }) => getModalFooterButton(text, action, css)),\n cssClass\n });\n }\n\n /**\n * Opens a new modal dialog, transferring focus and hiding notifications\n */\n @action\n showModal(type: ModalComponent, model?: VariableModalModal, onClose?: CloseFn): void {\n // Hide open notifications and save current focused element.\n this.notificationManager.hideNotifications();\n this.accessibility.saveFocusedElement();\n\n // Create and display modal\n this.modalsToRender.pushObject(new Modal(type, model, onClose));\n }\n\n /**\n * Opens a new informational modal dialog, transferring focus and hiding notifications.\n */\n @action\n showInfoModal(model: InfoDialogModel, onClose?: CloseFn): void {\n this.showModal(InfoDialog, model, onClose);\n }\n\n /**\n * Opens a dialog used to rename things.\n */\n @action\n showRenameModal(model: RenameDialogModel, onClose?: CloseFn): void {\n this.showModal(RenameDialog, model, onClose);\n }\n\n /**\n * Opens a dialog used to delete things.\n */\n @action\n showDeleteModal(model: ConfirmDeleteModel, onClose?: CloseFn): void {\n this.showModal(ConfirmDeleteDialog, model, onClose);\n }\n\n /**\n * Render the loading screen\n */\n @action\n showLoadingModal(promise: Promise<any>): void {\n this.showModal(LoadingDialog, { disableBackdropClose: true });\n\n // Close modal once promise resolves\n promise.finally(() => this.closeModal());\n }\n\n /**\n * Render a promise dialog.\n */\n @action\n showPromiseModal(model: PromiseDialogModel, onClose?: CloseFn): void {\n this.showModal(\n PromiseDialog,\n {\n ...model,\n disableBackdropClose: true\n },\n onClose\n );\n }\n\n /**\n * Hides and destroys the last open modal.\n */\n @action\n closeModal(keepNotificationsHidden?: boolean): void {\n const modals = this.modalsToRender;\n let lastModal = modals.lastObject;\n\n // Abort closing if we should not close\n if (!lastModal || lastModal.onClose() === false) {\n return;\n }\n\n lastModal = undefined;\n this.modalsToRender.popObject();\n\n if (!keepNotificationsHidden) {\n this.notificationManager.showNotifications();\n }\n\n this.accessibility.restoreFocus();\n }\n\n @action\n closeAllModals(): void {\n this.modalsToRender.clear();\n\n this.accessibility.restoreFocus();\n }\n}\n","import { tracked } from '@glimmer/tracking';\nimport { A } from '@ember/array';\nimport { assert } from '@ember/debug';\nimport { action } from '@ember/object';\nimport { getOwner } from '@ember/owner';\nimport Service from '@ember/service';\nimport { inject as service } from '@ember/service';\nimport { camelize } from '@ember/string';\nimport { isHTMLSafe } from '@ember/template';\nimport { hasHTML } from '../utils/general.ts';\n\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type { SvgSymbolSignature } from '@adc/svg-system/components/svg-symbol';\nimport type { InternalOwner } from '@ember/-internals/owner';\nimport type { SafeString } from 'handlebars';\nimport type { ButtonAsyncSignature } from '../components/button/async.ts';\n\ntype NotificationType = 'info' | 'success' | 'warning' | 'error' | 'session-ended' | 'custom';\nexport type AddNotificationMethodType = 'addInfo' | 'addSuccess' | 'addWarning' | 'addError' | 'addSessionEnded';\n\nexport interface AppNotificationButton extends Pick<ButtonAsyncSignature['Args'], 'icon' | 'iconOnly'> {\n text: string;\n cssClass?: string;\n noBackground?: boolean;\n elementToFocus?: HTMLElement;\n action?: (buttonAnimation?: Promise<boolean>) => any;\n}\n\nexport interface AppNotification {\n type: NotificationType;\n icon: string;\n text: string | SafeString;\n hidden: boolean;\n iconTitle?: string;\n iconFillColor?: SvgSymbolSignature['Args']['fillColor'];\n persistent?: boolean;\n autoCloseDuration?: number;\n iconDesc?: string;\n iconIsHiddenForAccessibility?: boolean;\n buttons?: AppNotificationButton[];\n cssClass?: string;\n elementToFocus?: HTMLElement;\n}\n\ntype NotificationManagerConfig = Record<NotificationType, Partial<AppNotification>>;\n\n/**\n * Creates a notification type.\n *\n * @private\n */\nfunction createNotificationType(\n this: NotificationManager,\n type: NotificationType,\n icon: string,\n persistent = false,\n autoCloseDuration?: number\n): AppNotification {\n // Create default notification config.\n const n = {\n type,\n icon,\n iconTitle: this.intl.t(`@adc/ui-components.${camelize(type)}`),\n persistent,\n autoCloseDuration\n },\n owner = getOwner(this),\n config = (owner && (owner as InternalOwner).resolveRegistration('config:environment')) ?? {};\n\n if ('notificationManager' in config) {\n Object.assign(n, (config.notificationManager as NotificationManagerConfig)[type] ?? {});\n }\n\n return n as AppNotification;\n}\n\n/**\n * Adds notification from predefined notification type.\n *\n * @private\n */\nfunction addNotificationFromType(\n this: NotificationManager,\n text: string | SafeString,\n notificationType: AppNotification,\n autoCloseDurationOverride?: number,\n elementToFocus?: HTMLElement\n): AppNotification | undefined {\n if (autoCloseDurationOverride !== undefined && isNaN(autoCloseDurationOverride)) {\n autoCloseDurationOverride = undefined;\n }\n\n if (elementToFocus && !(elementToFocus instanceof Element)) {\n elementToFocus = undefined;\n }\n\n return addNotification.call(this, text, {\n ...notificationType,\n autoCloseDuration:\n autoCloseDurationOverride !== undefined ? autoCloseDurationOverride : notificationType.autoCloseDuration,\n hidden: false,\n elementToFocus\n });\n}\n\n/**\n * Deletes any duplicates of the given notification.\n *\n * @private\n */\nfunction returnDedupedNotifications(this: NotificationManager, newNotification: AppNotification): AppNotification[] {\n const { text, type } = newNotification;\n\n if (text && type) {\n // Remove the duplicate notifications. Non-mutating returns a new array\n return this.notifications.reject((notification) => {\n // Note: have to compare SafeStrings here so using string property.\n return notification.text.toString() === text.toString() && notification.type === type;\n });\n }\n return this.notifications;\n}\n\n/**\n * Adds a notification to the notification manager by triggering a trigger.\n *\n * @private\n */\nfunction addNotification(\n this: NotificationManager,\n text: string | SafeString,\n appNotification: Omit<AppNotification, 'text'>\n): AppNotification | undefined {\n // Are notifications currently muted?\n if (this.isMuted) {\n // Is this DEV environment?\n const owner = getOwner(this),\n config = (owner && (owner as InternalOwner).resolveRegistration('config:environment')) ?? {};\n\n if ('environment' in config && config.environment === 'development') {\n // Log the muted notification.\n console.log(`Muted ${appNotification.type} notification: ${text}`);\n }\n\n // Do not add the notification.\n return;\n }\n\n if (!isHTMLSafe(text) && hasHTML(text)) {\n const msg =\n '[@adc/ui-components] The notification text contains HTML characters but is not HTML safe. Please mark text as safe, but only if it does not include any user entered data.';\n console.log(msg);\n console.log('failing text:', text);\n assert(msg, false);\n }\n\n const newNotification: AppNotification = {\n ...appNotification,\n text,\n // Convert false to 0ms to keep notification open until dismissed.\n autoCloseDuration: appNotification.autoCloseDuration ?? 0\n };\n\n // If there are duplicates that already exist, remove them.\n // Add the notification to the array.\n this.notifications = A([...returnDedupedNotifications.call(this, newNotification), newNotification]);\n return newNotification;\n}\n\n/**\n * @classdesc\n * Service that manages adding/removing notifications for an application.\n */\nexport default class NotificationManager extends Service {\n @service declare intl: ADCIntlService;\n\n // region Notification Types\n\n private get infoType(): AppNotification {\n return createNotificationType.call(this, 'info', 'info');\n }\n\n private get successType(): AppNotification {\n return createNotificationType.call(this, 'success', 'circle-o-check', true, 5000);\n }\n\n private get warningType(): AppNotification {\n return createNotificationType.call(this, 'warning', 'warning');\n }\n\n private get errorType(): AppNotification {\n return createNotificationType.call(this, 'error', 'issue');\n }\n\n private get sessionEndedType(): AppNotification {\n return createNotificationType.call(this, 'session-ended', 'issue', true, 0);\n }\n\n // endregion\n\n // region Properties\n\n /**\n * A list of currently displayed notifications.\n */\n @tracked notifications: ReturnType<typeof A<AppNotification>> = A<AppNotification>([]);\n\n /**\n * Determines if the notifications should be ignored.\n *\n * @note If the session is ended, this flag should be set to false using the addSessionEnded() method so no new notifications will be added.\n * New notifications are likely errors caused by the lack of session, and we don't want multiple of these to display during the logout process.\n */\n @tracked isMuted = false;\n\n // endregion\n\n // region Add/Remove Notification Methods\n\n /**\n * Adds an 'info' notification to the notification manager.\n */\n @action addInfo(\n text: string | SafeString,\n autoCloseDurationOverride?: number,\n elementToFocus?: HTMLElement\n ): AppNotification | undefined {\n return addNotificationFromType.call(this, text, this.infoType, autoCloseDurationOverride, elementToFocus);\n }\n\n /**\n * Adds a 'success' notification to the notification manager.\n */\n @action addSuccess(\n text: string | SafeString,\n autoCloseDurationOverride?: number,\n elementToFocus?: HTMLElement\n ): AppNotification | undefined {\n return addNotificationFromType.call(this, text, this.successType, autoCloseDurationOverride, elementToFocus);\n }\n\n /**\n * Adds a 'warning' notification to the notification manager.\n */\n @action addWarning(\n text: string | SafeString,\n autoCloseDurationOverride?: number,\n elementToFocus?: HTMLElement\n ): AppNotification | undefined {\n return addNotificationFromType.call(this, text, this.warningType, autoCloseDurationOverride, elementToFocus);\n }\n\n /**\n * Adds an 'error' notification to the notification manager.\n */\n @action addError(\n text: string | SafeString,\n autoCloseDurationOverride?: number,\n elementToFocus?: HTMLElement\n ): AppNotification | undefined {\n return addNotificationFromType.call(this, text, this.errorType, autoCloseDurationOverride, elementToFocus);\n }\n\n /**\n * Adds a notification telling the user that their session has ended.\n *\n * @note This sets a flag that does not allow any more notifications to be added.\n */\n @action addSessionEnded(\n text: string | SafeString,\n autoCloseDurationOverride?: number,\n elementToFocus?: HTMLElement\n ): void {\n addNotificationFromType.call(this, text, this.sessionEndedType, autoCloseDurationOverride, elementToFocus);\n\n // Mute notifications so service knows not to show any more application notifications.\n this.mute();\n }\n\n /**\n * Adds a notification to the notification manager.\n *\n * @param text - Text to show in the notification.\n * @param icon - Icon for the notification.\n * @param buttons - Buttons to render in the notification\n * @param [autoCloseDuration] - How long should the notification stay open? (in ms)\n * @param [hidden] - Determines if the notification persists is currently shown or hidden.\n * @param [persistent] - Determines if the notification persists through route transitions or is cleared.\n * @param [cssClass] - Css class to be added to the notification.\n * @param [iconTitle] - The icon's title for the notification.\n * @param [iconDesc] - The icon's description for the notification.\n * @param [iconIsHiddenForAccessibility] - Is the icon for the notification hidden for screen readers.\n * @param [elementToFocus] - The element to focus after the notification is closed.\n */\n @action addNotification(\n text: string | SafeString,\n icon: string,\n buttons?: AppNotificationButton[],\n autoCloseDuration?: number,\n persistent?: boolean,\n hidden?: boolean,\n cssClass?: string,\n iconTitle?: string,\n iconDesc?: string,\n iconIsHiddenForAccessibility?: boolean,\n elementToFocus?: HTMLElement\n ): AppNotification | undefined {\n return addNotification.call(this, text, {\n icon,\n type: 'custom',\n buttons,\n autoCloseDuration,\n persistent,\n hidden: !!hidden,\n cssClass,\n iconTitle,\n iconDesc,\n iconIsHiddenForAccessibility,\n elementToFocus\n });\n }\n\n /**\n * Removes the given notification from the list of notifications.\n */\n @action removeNotification(notification: AppNotification): void {\n this.notifications.removeObject(notification);\n }\n\n /**\n * Clears any notifications that are NOT persistent.\n */\n @action clearNonPersistentNotifications(): void {\n this.notifications = A<AppNotification>(this.notifications.rejectBy('persistent', false));\n }\n\n /**\n * Clears all notifications.\n */\n @action clearNotifications(): void {\n this.notifications = A<AppNotification>([]);\n }\n\n // endregion\n\n // region Methods to Update Properties\n\n /**\n * Hides any currently shown notifications.\n */\n @action hideNotifications(): void {\n this.notifications.setEach('hidden', true);\n }\n\n /**\n * Shows any currently hidden notifications.\n */\n @action showNotifications(): void {\n this.notifications.setEach('hidden', false);\n }\n\n /**\n * Mutes (i.e. ignores) notifications so they do not render on screen.\n */\n @action mute(): void {\n this.isMuted = true;\n }\n\n /**\n * Disabled notification muting.\n */\n @action unMute(): void {\n this.isMuted = false;\n }\n\n // endregion\n}\n","import BaseTimezoneControl from './base-timezone-control.ts';\n\nimport type { BaseTimezoneControlSignature } from './base-timezone-control';\n\nexport interface BaseTimeControlSignature {\n Args: BaseTimezoneControlSignature['Args'] & {\n /** The input date/time value. */\n date?: Date;\n /** Optional minimum input date. */\n minDate?: Date;\n /** Optional maximum input date. */\n maxDate?: Date;\n /** Optional label text to appear next to input. */\n label?: string;\n /** Called when the user modifies the date/time value. */\n onchange: (date: Date, evt?: Event) => void;\n };\n}\n\n/**\n * @classdesc\n * A base class for date and time pickers.\n */\nexport default class BaseTimeControl<\n T extends BaseTimeControlSignature = BaseTimeControlSignature\n> extends BaseTimezoneControl<T> {\n /**\n * Indicates we should display native controls for time/date manipulation.\n */\n useNativeControl = false;\n\n /**\n * The passed date, adjusted for computed timezone.\n */\n get zonedDate(): Date | undefined {\n const { date } = this.args;\n return date && this.getZonedDate(date);\n }\n}\n","import Component from '@glimmer/component';\nimport { computed } from '@ember/object';\nimport { getOwner } from '@ember/owner';\nimport { utcToZonedTime, zonedTimeToUtc } from 'date-fns-tz';\n\nimport type { InternalOwner } from '@ember/-internals/owner';\n\nexport interface BaseTimezoneControlSignature {\n Args: {\n /** Optional time zone to use for formatted dates. If omitted the global application time zone will be used. */\n timeZone?: string;\n };\n}\n\n/**\n * @classdesc\n * Base class for date/time controls that need to work with time zones.\n */\nexport default class BaseTimezoneControl<\n T extends BaseTimezoneControlSignature = BaseTimezoneControlSignature\n> extends Component<T> {\n /**\n * The computed timezone value to use for date conversions.\n */\n @computed('args.timeZone')\n get zone(): string {\n const { timeZone } = this.args;\n if (timeZone !== undefined) {\n return timeZone;\n }\n\n const owner = getOwner(this),\n cfg = owner && (owner as InternalOwner).lookup('@adc/ui-components:appValues');\n\n if (cfg) {\n return (cfg as { timeZone: string }).timeZone ?? '';\n }\n\n return '';\n }\n\n /**\n * Converts the passed date to be relative to the passed timezone.\n */\n getZonedDate(date: Date): Date {\n const { zone } = this;\n return zone ? utcToZonedTime(date, zone) : date;\n }\n\n /**\n * Converts the passed date to be relative to UTC.\n */\n getUtcDateFromZone(date: Date): Date {\n const { zone } = this;\n return zone ? zonedTimeToUtc(date, zone) : date;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{#if @icon}}\\n <Button::Icon\\n class=\\\"is-async {{this.asyncType}}\\\"\\n @icon={{@icon}}\\n @iconOnly={{@iconOnly}}\\n @text={{@text}}\\n @responsiveText={{@responsiveText}}\\n @type={{@type}}\\n @buttonColor={{@buttonColor}}\\n @buttonStyle={{@buttonStyle}}\\n @buttonAction={{this.executeButtonAction.perform}}\\n aria-describedby=\\\"aria_name_{{guid-for this}}\\\"\\n ...attributes\\n {{did-update (fn (coalesce @updateAsyncState (noop)) this.asyncState)}}\\n >\\n {{yield}}\\n\\n {{#if this.isPending}}\\n <SpinnerSvg @spinning={{true}} />\\n {{else if this.isFinished}}\\n <Button::AsyncButtonIcon @icon={{this.asyncType}} class=\\\"async-indicator\\\" />\\n {{/if}}\\n\\n {{! Add span for accessibility title for async buttons }}\\n <span id=\\\"aria_name_{{guid-for this}}\\\" aria-live=\\\"polite\\\" aria-label={{this.ariaLabel}} />\\n </Button::Icon>\\n{{else}}\\n <Button::Simple\\n class=\\\"is-async {{this.asyncType}}\\\"\\n @responsiveText={{@responsiveText}}\\n @type={{@type}}\\n @buttonColor={{@buttonColor}}\\n @buttonStyle={{this.simpleButtonStyle}}\\n @buttonAction={{this.executeButtonAction.perform}}\\n aria-describedby=\\\"aria_name_{{guid-for this}}\\\"\\n ...attributes\\n {{did-update (fn (coalesce @updateAsyncState (noop)) this.asyncState)}}\\n >\\n <span class=\\\"btn-contents\\\">\\n {{#if @text}}\\n {{~@text~}}\\n {{else}}\\n {{~yield~}}\\n {{/if}}\\n </span>\\n\\n {{#if this.isPending}}\\n <SpinnerSvg @spinning={{true}} />\\n {{else if this.isFinished}}\\n <Button::AsyncButtonIcon @icon={{this.asyncType}} class=\\\"async-indicator\\\" />\\n {{/if}}\\n\\n {{! Add span for accessibility title for async buttons }}\\n <span id=\\\"aria_name_{{guid-for this}}\\\" aria-live=\\\"polite\\\" aria-label={{this.ariaLabel}} />\\n </Button::Simple>\\n{{/if}}\")","import Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { computed } from '@ember/object';\nimport { equal } from '@ember/object/computed';\nimport { inject as service } from '@ember/service';\nimport { timeout, task } from 'ember-concurrency';\nimport { getSimpleButtonStyle } from './simple.ts';\n\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type { Task } from 'ember-concurrency';\nimport type { ButtonIconSignature } from './icon';\nimport type { ButtonSimpleSignature } from './simple';\n\nexport enum EnumAsyncState {\n idle,\n pending,\n success,\n failure\n}\n\ninterface ButtonAsyncCommonArgs {\n /** A required function called when the button is clicked. If a promise is returned this button will show the status of that button (rejects or success). */\n buttonAction: (buttonAnimation?: Promise<boolean>, e?: MouseEvent) => Promise<any> | any;\n /** Indicates the `buttonAnimation` promise should be resolved immediately instead of waiting (700ms for success, 3000ms for failure). */\n noDelay?: boolean;\n /** Hack used for native buttons, please don't use this. */\n updateAsyncState?: (value: EnumAsyncState) => void;\n}\n\nexport type ButtonAsyncSignature =\n | (Omit<ButtonSimpleSignature, 'Args'> & {\n Args: ButtonAsyncCommonArgs &\n Pick<\n ButtonSimpleSignature['Args'],\n 'text' | 'responsiveText' | 'buttonColor' | 'type' | 'buttonStyle'\n > & {\n icon?: undefined;\n iconOnly?: undefined;\n };\n })\n | (Omit<ButtonIconSignature, 'Args'> & {\n Args: ButtonAsyncCommonArgs &\n Pick<\n ButtonIconSignature['Args'],\n 'icon' | 'iconOnly' | 'text' | 'responsiveText' | 'buttonColor' | 'type' | 'buttonStyle'\n >;\n });\n\n/**\n * A button (icon or simple) that displays async state from promise.\n */\nexport default class ButtonAsync extends Component<ButtonAsyncSignature> {\n @service declare intl: ADCIntlService;\n\n get simpleButtonStyle(): ReturnType<typeof getSimpleButtonStyle> {\n return getSimpleButtonStyle(this.args.buttonStyle);\n }\n /**\n * The current async promise state.\n */\n @tracked asyncState = EnumAsyncState.idle;\n\n /**\n * Indicates the async promise is currently pending.\n */\n @equal('asyncState', EnumAsyncState.pending)\n declare isPending: boolean;\n\n /**\n * Indicates the async promise has completed (success or failure).\n */\n get isFinished(): boolean {\n const { asyncState } = this;\n return asyncState === EnumAsyncState.success || asyncState === EnumAsyncState.failure;\n }\n\n @computed('isPending', 'isFinished', 'asyncType')\n get ariaLabel(): string {\n return this.isPending\n ? this.intl.t('@adc/ui-components.loading')\n : this.isFinished\n ? this.intl.t(`@adc/ui-components.${this.asyncType}`)\n : '';\n }\n\n /**\n * The textual representation of the current async state.\n */\n get asyncType(): string {\n return {\n [EnumAsyncState.idle]: '',\n [EnumAsyncState.pending]: 'pending',\n [EnumAsyncState.success]: 'success',\n [EnumAsyncState.failure]: 'warning'\n }[this.asyncState];\n }\n\n /**\n * A task to animate promise state changes based on promise returned from `onClick` argument.\n */\n executeButtonAction: Task<void, [MouseEvent]> = task({ drop: true }, async (e: MouseEvent) => {\n const { buttonAction } = this.args;\n if (!buttonAction) {\n return;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let buttonAnimation = (_isSuccess: boolean) => {},\n isPromise = false;\n\n try {\n // Execute button action function.\n const p = buttonAction(\n new Promise((r) => (buttonAnimation = r as unknown as (_isSuccess: boolean) => void)),\n e\n );\n\n // Is the return value a promise?\n if (p && typeof p.then === 'function') {\n isPromise = true;\n this.asyncState = EnumAsyncState.pending;\n await p;\n this.asyncState = EnumAsyncState.success;\n }\n } catch (ex) {\n if (isPromise) {\n this.asyncState = EnumAsyncState.failure;\n }\n } finally {\n if (isPromise) {\n const isSuccess = this.asyncState === EnumAsyncState.success;\n\n if (!this.args.noDelay) {\n await timeout(isSuccess ? 700 : 3000);\n }\n\n this.asyncState = EnumAsyncState.idle;\n\n // Pass success/fail state out with button animation. Considered using promise\n // reject/resolve instead, but unhandled rejects raise application errors.\n buttonAnimation(isSuccess);\n }\n }\n });\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<button\\n class=\\\"simple-btn {{this.buttonCss}}\\\"\\n type={{coalesce @type \\\"button\\\"}}\\n {{on \\\"click\\\" this.handleClick}}\\n data-responsive-text={{@responsiveText}}\\n ...attributes\\n>\\n {{#if (has-block)}}\\n {{~yield~}}\\n {{else}}\\n <span>{{~@text~}}</span>\\n {{/if}}\\n</button>\")","import Component from '@glimmer/component';\nimport { A } from '@ember/array';\nimport { action } from '@ember/object';\nimport { isPresent } from '@ember/utils';\n\nexport type SimpleButtonColor = 'primary' | 'safe' | 'danger' | 'stealth' | 'dark';\nexport type SimpleButtonStyle = 'link' | 'small';\n\nexport interface ButtonSimpleSignature {\n Element: HTMLButtonElement;\n Args: {\n /** Optional text to appear in the button. */\n text?: string;\n /** Optional text that will appear for small screen widths. */\n responsiveText?: string;\n /** The button type. */\n type?: 'button' | 'submit' | 'reset';\n /** Optional button color. */\n buttonColor?: 'primary' | 'safe' | 'danger' | 'stealth' | 'dark';\n /** Optional button style. */\n buttonStyle?: 'link' | 'small' | 'inverted';\n /** A function called when the button is clicked (easier to use `{{on 'click'}}`). */\n buttonAction?: (e: MouseEvent | KeyboardEvent) => unknown;\n };\n Blocks: {\n default: [];\n };\n}\n\nfunction toArray(v?: string): string[] | undefined {\n return v?.trim().split(' ').filter(isPresent);\n}\n\nexport function getAnyButtonStyle(style?: string): string | undefined {\n return toArray(style)\n ?.map((v) => `btn-style-${v}`)\n .join(' ');\n}\n\n/**\n * Accepts another button style and removes anything not allowed in the simple button style.\n */\nexport function getSimpleButtonStyle(style?: string): SimpleButtonStyle | undefined {\n return toArray(style)\n ?.filter((v) => v === 'link' || v === 'small' || v === 'inverted')\n .join(' ') as SimpleButtonStyle;\n}\n\n/**\n * A simple button.\n */\nexport default class ButtonSimple extends Component<ButtonSimpleSignature> {\n /**\n * The computed CSS classes for this button based on the button color and style arguments. Since multiple `buttonColor` values would conflict only the last passed value will be used.\n */\n get buttonCss(): string {\n const { args } = this,\n lastColor = toArray(args.buttonColor)?.pop();\n\n return A([lastColor && `btn-color-${lastColor.trim()}`, getAnyButtonStyle(args.buttonStyle)])\n .compact()\n .join(' ')\n .trim();\n }\n\n /**\n * Event handler for template button click.\n */\n @action handleClick(e: MouseEvent): void {\n this.args.buttonAction?.(e);\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{#if @item.icon}}\\n <SvgSymbol\\n @icon={{@item.icon}}\\n @title={{@item.iconTitle}}\\n @desc={{@item.iconDesc}}\\n @isHiddenForAccessibility={{@item.iconIsHiddenForAccessibility}}\\n class=\\\"checkbox-tree-content-svg\\\"\\n />\\n{{/if}}\\n\\n<div class=\\\"text-info\\\">\\n <div class=\\\"primary-info\\\">\\n <p class=\\\"name\\\">{{@item.name}}</p>\\n\\n {{#if @item.description}}\\n <p class=\\\"description\\\">{{@item.description}}</p>\\n {{/if}}\\n </div>\\n\\n {{#if @item.secondaryDescription}}\\n <div class=\\\"secondary-info\\\">\\n <p class=\\\"secondary-description\\\">{{@item.secondaryDescription}}</p>\\n </div>\\n {{/if}}\\n</div>\")","import templateOnlyComponent from '@ember/component/template-only';\n\nimport type CheckboxTreeItem from '../../../utils/dropdown-select-item';\n\nexport interface DetailedCheckboxContentSignature {\n Args: {\n item: CheckboxTreeItem;\n };\n}\nconst DetailedCheckboxContent = templateOnlyComponent<DetailedCheckboxContentSignature>();\nexport default DetailedCheckboxContent;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div\\n class=\\\"detailed-checkbox\\n {{if @item.isFullySelected \\'selected\\'}}\\n {{if @item.isPartiallySelected \\'partially-selected\\'}}\\n {{unless @item.isSelectable \\'not-selectable\\'}}\\\"\\n data-value={{@item.value}}\\n data-test-checkbox-id=\\\"{{guid-for @item}}-checkbox\\\"\\n ...attributes\\n>\\n {{#if @item.isSelectable}}\\n <SimpleBinary\\n @checked={{if @item.isPartiallySelected \\\"mixed\\\" @item.isFullySelected}}\\n disabled={{@item.disabled}}\\n tabindex={{if (and (not @item.disabled) @isFocusable (not @item.parent.isCollapsed)) 0 -1}}\\n {{on \\\"change\\\" (fn this.itemClicked @item)}}\\n @css=\\\"checkbox-line\\\"\\n >\\n <CheckboxTree::DetailedCheckbox::Content @item={{@item}} />\\n </SimpleBinary>\\n\\n {{#unless @hideSubitems}}\\n {{#if @item.isCollapsible}}\\n <ExpandButton\\n @isExpanded={{not @item.isCollapsed}}\\n @onChange={{fn @toggle-subitems-visibility @item}}\\n aria-controls=\\\"{{guid-for @item}}-subitems\\\"\\n dataId=\\\"chevron{{@index}}\\\"\\n />\\n {{/if}}\\n {{/unless}}\\n {{else}}\\n <CheckboxTree::DetailedCheckbox::Content @item={{@item}} />\\n\\n {{#unless @hideSubitems}}\\n {{#if @item.showAllNoneSelectors}}\\n <CheckboxTree::AllNoneSelector\\n @index={{@index}}\\n @selectAll={{fn this.selectAll @item}}\\n @selectNone={{fn this.selectNone @item}}\\n />\\n {{/if}}\\n {{/unless}}\\n {{/if}}\\n</div>\")","import Component from '@glimmer/component';\nimport { set, action } from '@ember/object';\nimport { SELECTED, UNSELECTED } from '../../../utils/checkbox-tree-item.js';\n\nimport type CheckboxTreeItem from '../../../utils/dropdown-select-item';\n\nexport interface DetailCheckboxSignature {\n Element: HTMLDivElement;\n Args: {\n item: CheckboxTreeItem;\n idPrefix?: string;\n 'on-action-execute'?: VoidFunction;\n 'items-changed'?: (items: CheckboxTreeItem[]) => void;\n 'toggle-subitems-visibility': (item: CheckboxTreeItem) => void;\n isFocusable?: boolean;\n maxItemCount?: number;\n showGroupSeparator?: boolean;\n hideSubitems?: boolean;\n index: number | string;\n };\n}\n\n/**\n * @classdesc\n * A wrapper component for rendering the checkbox associated with a {@link components.checkbox-tree.TreeItem}.\n */\nexport default class DetailedCheckboxInput extends Component<DetailCheckboxSignature> {\n private executeAction(): void {\n this.args['on-action-execute']?.();\n }\n\n /**\n * Toggles the {@link CheckboxTreeItem} object's state along with each subitem's state.\n */\n @action itemClicked(item: CheckboxTreeItem, evt: Event & { target: HTMLInputElement }): void {\n this.executeAction();\n\n set(item, 'internalState', evt.target.checked ? SELECTED : UNSELECTED);\n }\n\n /**\n * Selects all subitems within the {@link CheckboxTreeItem}.\n */\n @action selectAll(item: CheckboxTreeItem): void {\n this.executeAction();\n\n set(item, 'internalState', SELECTED);\n }\n\n /**\n * Deselects all subitems within the {@link CheckboxTreeItem}.\n */\n @action selectNone(item: CheckboxTreeItem): void {\n this.executeAction();\n\n set(item, 'internalState', UNSELECTED);\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<li\\n class=\\\"tree-item {{if this.addGroupSeparator \\'separate-groups\\'}}\\\"\\n tabindex={{if (and this.canReceiveFocus (not @item.parent.isCollapsed)) 0 -1}}\\n data-test-tree-item-id=\\\"{{guid-for @item}}-li\\\"\\n ...attributes\\n>\\n <CheckboxTree::DetailedCheckbox::Checkbox\\n @item={{@item}}\\n @index={{@index}}\\n @on-action-execute={{@on-action-execute}}\\n @isFocusable={{this.isFocusable}}\\n @hideSubitems={{@hideSubitems}}\\n @toggle-subitems-visibility={{this.toggleSubitemsVisibility}}\\n />\\n\\n {{#unless @hideSubitems}}\\n {{#if this.hasSubItems}}\\n <CheckboxTree\\n @items={{this.subitems}}\\n @showGroupSeparator={{false}}\\n @on-action-execute={{@on-action-execute}}\\n @isFocusable={{and this.isFocusable (not @item.isCollapsed)}}\\n @hideSubitems={{@item.isCollapsed}}\\n id=\\\"{{guid-for @item}}-subitems\\\"\\n class=\\\"sub-tree {{if @item.isCollapsed \\'collapsed\\'}}\\\"\\n />\\n {{/if}}\\n {{/unless}}\\n</li>\")","import Component from '@glimmer/component';\nimport { action, set } from '@ember/object';\nimport { and, notEmpty, reads } from '@ember/object/computed';\n\nimport type CheckboxTreeItem from '../../utils/dropdown-select-item.ts';\n\nexport interface CheckboxTreeItemSignature {\n Element: HTMLLIElement;\n Args: {\n /** The item to render. */\n item: CheckboxTreeItem;\n /** Indicates the check box tree item should be focusable (defaults to true). */\n isFocusable?: boolean;\n /** The index of this check box tree item. */\n index: number | string;\n /** Triggered when an action is executed in the checkbox tree. */\n 'on-action-execute'?: VoidFunction;\n /** Indicates only root items will be rendered. */\n hideSubitems?: boolean;\n /** Indicates each item group should be visually separated. */\n showGroupSeparator?: boolean;\n /** Indicates the checkbox tree item parent (LI) element is focusable (not sure why this would ever be since it's not interactive). */\n isListItemFocusable?: boolean;\n /** Toggles an items collapses/expanded state. */\n 'toggle-subitems-visibility'?: VoidFunction;\n };\n}\n\n/**\n * @classdesc\n * Represents a row in the checkbox-tree component. Contains a\n * state, optional subitems, and multiple other properties.\n */\nexport default class CheckboxTreeItemComponent extends Component<CheckboxTreeItemSignature> {\n /**\n * Should the checkbox item be focusable?\n */\n get isFocusable(): boolean {\n return this.args.isFocusable ?? true;\n }\n\n /**\n * The subitems to render.\n */\n @reads('args.item.subitems')\n declare subitems: CheckboxTreeItem[];\n\n /**\n * Indicates there are subitems.\n */\n @notEmpty('args.item.subitems')\n declare hasSubItems: boolean;\n\n /**\n * Indicate this item should have a tabindex of zero.\n */\n @and('isFocusable', 'args.isListItemFocusable', 'hasSubItems')\n declare canReceiveFocus: boolean;\n\n /**\n * Should we use a border as group separator?\n */\n @and('args.showGroupSeparator', 'hasSubItems')\n declare addGroupSeparator: boolean;\n\n /**\n * Toggles the item's collapsed state.\n */\n @action toggleSubitemsVisibility(item: CheckboxTreeItem): void {\n this.args['on-action-execute']?.();\n\n set(item, 'isCollapsed', !item.isCollapsed);\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<ul\\n class=\\\"checkbox-tree\\\"\\n tabindex={{if this.isFocusable 0 -1}}\\n {{on \\\"keyup\\\" this.handleKeyUp}}\\n {{did-insert this.updateItemAction}}\\n {{did-update this.updateItemAction @items}}\\n ...attributes\\n>\\n {{#each @items as |item index|}}\\n <CheckboxTree::TreeItem\\n @showGroupSeparator={{@showGroupSeparator}}\\n @isListItemFocusable={{this.areListItemsFocusable}}\\n @on-action-execute={{@on-action-execute}}\\n @item={{item}}\\n @index={{if @idPrefix (concat @idPrefix \\\"-\\\" index) index}}\\n @hideSubitems={{@hideSubitems}}\\n />\\n {{/each}}\\n\\n {{yield}}\\n</ul>\")","import Component from '@glimmer/component';\nimport { isEnterCode } from '@adc/ember-utils/utils/a11y';\nimport { A } from '@ember/array';\nimport { set, computed, action } from '@ember/object';\nimport { once } from '@ember/runloop';\n\nimport type { CheckboxTreeItemSignature } from './checkbox-tree/tree-item';\n\ntype CheckboxTreeItemSignatureArgs = CheckboxTreeItemSignature['Args'];\ntype CheckboxTreeItem = CheckboxTreeItemSignatureArgs['item'];\n\nexport interface CheckboxTreeSignature {\n Element: HTMLUListElement;\n Args: Pick<CheckboxTreeItemSignatureArgs, 'on-action-execute' | 'showGroupSeparator' | 'hideSubitems'> & {\n /** The items to render. */\n items: CheckboxTreeItem[];\n /** Optional prefix added to the `@index` argument of each checkbox tree item. */\n idPrefix?: string;\n /** Triggered when tree item selection state changes. */\n 'items-changed'?: (items: CheckboxTreeItem[]) => void;\n /** Indicates the UL element is focusable (key up enter will expand/collapse tree). */\n isFocusable?: boolean;\n };\n Blocks: {\n default: [];\n };\n}\n\n/**\n * @classdesc\n * A component for rendering a tree hierarchy of checkbox items.\n *\n * This component specifically acts as the middle man between the consumer and the rendering of the tree.\n *\n * @note There is no internal copy of \"items\", so this component actually manipulates the\n * data passed into it. This was the cleanest way to keep track of external changes,\n * while ensuring computed properties still fire correctly. Complications\n * can arise with computed-properties when you make deep copies of the objects\n * they observe, because the copy of the item changed, not the original item the observer\n * is bound to.\n */\nexport default class CheckboxTree extends Component<CheckboxTreeSignature> {\n /**\n * Should the element be focusable?\n */\n get isFocusable(): boolean {\n return this.args.isFocusable ?? true;\n }\n\n /**\n * Should the list items be focusable or not?\n */\n @computed('args.items.[]')\n get areListItemsFocusable(): boolean {\n return this.args.items?.length > 1;\n }\n\n // endregion\n\n // region Actions\n\n /**\n * Collapses items if user hits the enter key.\n */\n @action handleKeyUp(event: KeyboardEvent & { target: HTMLElement }): void {\n if (isEnterCode(event.code)) {\n const checkbox = event.target.closest('li.detailed-checkbox');\n if (!checkbox) {\n return;\n }\n\n const item = A(this.args.items).findBy('value', (checkbox as HTMLElement).dataset.value);\n if (item?.isCollapsible) {\n set(item, 'isCollapsed', !item.isCollapsed);\n }\n }\n }\n\n /**\n * Updates the \"items-changed\" action for passed items.\n */\n @action updateItemAction(): void {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n once<CheckboxTree, typeof storeActionOnRootItems>(this, storeActionOnRootItems);\n }\n\n // endregion\n}\n\n/**\n * The name of the action used for notifying the consuming code that the state of the items has changed.\n * @public\n */\nexport const ITEMS_CHANGED_ACTION = 'items-changed';\n\n/**\n * Stores the \"items-changed\" action that was provided by the consumer on the root items of the tree.\n *\n * @note When the items change state, the root items are the last to\n * update and they will trigger this action.\n *\n * @private\n */\nfunction storeActionOnRootItems(this: CheckboxTree) {\n const itemsChangedAction = this.args[ITEMS_CHANGED_ACTION];\n if (itemsChangedAction) {\n const { items } = this.args;\n A(items).setEach(ITEMS_CHANGED_ACTION, () => itemsChangedAction(items));\n }\n}\n","// Do not copy this deprecated usage. If you see this, please fix it\n// eslint-disable-next-line ember/no-classic-components\n\nimport { isDestroyed } from '@adc/ember-utils/utils/ember-helpers';\nimport Component from '@ember/component';\nimport { computed } from '@ember/object';\nimport { scheduleOnce } from '@ember/runloop';\nimport { convertAutoDestroyToDuration } from '../error-tooltip.ts';\n\n// region Constants\n/**\n * Name of the error message clearing action\n *\n * @type {string}\n *\n * @static\n * @memberof components.common.BaseInput\n */\nexport const CLEAR_ERROR_MESSAGE_ACTION = 'clearErrorMessage';\n\n/**\n * Name of the action when value changes\n *\n * @note This is still being used as an export in other addons\n *\n * @type {string}\n *\n * @static\n * @memberof components.common.BaseInput\n */\nexport const VALUE_CHANGE_ACTION = 'value-change';\n\n// endregion\n\n// region Component Helpers\n\n/**\n * <p>Returns the correct value for a boolean html attribute.</p>\n * <strong>Note:</strong> Returns undefined if value is non-truthy, otherwise returns true\n *\n * @param propertyName\n * @returns {boolean}\n *\n * @private\n * @instance\n * @memberof components.common.BaseInput\n */\nfunction booleanHtmlAttributeValue(propertyName) {\n return this[propertyName] ? true : undefined;\n}\n\n/**\n * Clears the error message\n *\n * @private\n * @instance\n * @memberof components.common.BaseInput\n */\nfunction clearErrorMessageTrigger() {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line @adc/ember/no-is-destroyed\n if (!isDestroyed(this)) {\n this.send(CLEAR_ERROR_MESSAGE_ACTION);\n }\n}\n\n/**\n * Schedules clearing of error message\n *\n * @public\n * @instance\n * @memberof components.common.BaseInput\n */\nexport function clearErrorMessage() {\n // Clear error message\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n scheduleOnce('afterRender', this, clearErrorMessageTrigger);\n}\n// endregion\n\n/**\n * <p>Mixin that extracts some common properties/attributes and functions of ADC inputs.</p>\n *\n * @class BaseInput\n * @extends Ember.Component\n * @memberof components.common\n */\n// Do not copy this deprecated usage. If you see this, please fix it\n// eslint-disable-next-line ember/no-classic-classes, ember/require-tagless-components\nconst BaseInput = Component.extend(\n /** @lends components.common.BaseInput*/ {\n // region Error Messages\n\n /**\n * Specifies error message to be displayed as a tooltip on the input.\n *\n * @type {string|undefined}\n * @default undefined\n */\n errorMessage: undefined,\n\n /**\n * The number of seconds to wait before closing the error tooltip.\n *\n * @type {number}\n */\n autoDestroy: undefined,\n\n /**\n * Converts the autoDestroy value to be used as the ErrorTooltip components duration property.\n */\n errorDuration: computed('autoDestroy', function () {\n return convertAutoDestroyToDuration(this.autoDestroy);\n }),\n\n /**\n * Location for error tooltip.\n *\n * @type {String}\n */\n errorTooltipPlace: undefined,\n\n // endregion\n\n // region Disabling and visibility\n\n /**\n * <p>Attribute for triggering required visibility of the input.</p>\n *\n * @type {boolean}\n * @default false\n */\n required: false,\n\n /**\n * <p>Attribute for triggering disabled visibility of the input.</p>\n *\n * @type {boolean}\n * @default false\n */\n disabled: false,\n\n /**\n * <p>Attribute for triggering readonly visibility of the input.</p>\n *\n * @type {boolean}\n * @default false\n */\n readonly: false,\n\n /**\n * <p>Returns the correct attribute for required the input element.</p>\n * If required is false, this should return undefined\n *\n * @function\n * @returns {boolean}\n */\n isRequired: computed('required', function () {\n return booleanHtmlAttributeValue.call(this, 'required');\n }).readOnly(),\n\n /**\n * <p>Returns the correct attribute for readonly the input element.</p>\n * If readonly is false, this should return undefined\n *\n * @function\n * @returns {boolean}\n */\n isReadonly: computed('readonly', function () {\n return booleanHtmlAttributeValue.call(this, 'readonly');\n }).readOnly(),\n\n /**\n * <p>Returns the correct attribute for disabled the input element.</p>\n * If disabled is false, this should return undefined\n *\n * @function\n * @returns {boolean}\n */\n isDisabled: computed('disabled', function () {\n return booleanHtmlAttributeValue.call(this, 'disabled');\n }).readOnly(),\n\n // endregion\n\n /** @ignore **/\n // eslint-disable-next-line ember/no-actions-hash\n actions: /** @lends components.common.BaseInput*/ {\n /**\n * Clears the error message, which in turn hides the tooltip\n */\n clearErrorMessage() {\n // It could happen that by the time this action is received this is already destroyed.\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line @adc/ember/no-is-destroyed\n if (!isDestroyed(this)) {\n this.set('errorMessage', undefined);\n }\n }\n }\n }\n);\n\nexport default BaseInput;\n","// Do not copy this deprecated usage. If you see this, please fix it\n// eslint-disable-next-line ember/no-classic-components\n\nimport { isEnterOrSpaceCode } from '@adc/ember-utils/utils/a11y';\nimport { addWeakListener, removeListener } from '@adc/ember-utils/utils/event-listeners';\nimport Component from '@ember/component';\nimport { computed, action } from '@ember/object';\nimport { getOwner } from '@ember/owner';\nimport { schedule, once, bind } from '@ember/runloop';\nimport { isPresent } from '@ember/utils';\nimport { utcToZonedTime, zonedTimeToUtc } from 'date-fns-tz';\nimport format from 'date-fns/format';\nimport isAfter from 'date-fns/isAfter';\nimport isBefore from 'date-fns/isBefore';\nimport Pikaday from 'pikaday';\n\nimport 'pikaday/css/pikaday.css';\n\nconst MONTHS = Array.from(\n new Array(12),\n (_, idx) => new Date(`2018-${'00'.substring(0, 2 - String(idx + 1).length) + (idx + 1)}-01T12:00:00Z`)\n ),\n WEEKDAYS = Array.from(new Array(7), (_, idx) => new Date(`2018-10-${21 + idx}T12:00:00Z`));\n\n/**\n * Converts the passed time to the passed time zone (if present).\n *\n * @param {Date} date The date to convert.\n * @param {String} timeZone The time zone to convert to.\n *\n * @returns {Date}\n *\n * @private\n */\nfunction convertDateToZone(date, timeZone) {\n return isPresent(timeZone) ? utcToZonedTime(date, timeZone) : date;\n}\n\n/**\n * Calculates the pikaday year range.\n *\n * @param {number|String} [yearRange] The passed year range.\n *\n * @returns {number}\n *\n * @private\n */\nfunction determineYearRange(yearRange) {\n // Was a range not passed?\n if (!yearRange) {\n // Use default value.\n return 10;\n }\n\n // Is this NOT a formatted date string?\n if (yearRange.indexOf(',') === -1) {\n // Return passed value.\n return yearRange;\n }\n\n const yearArray = yearRange.split(',');\n\n if (yearArray[1] === 'currentYear') {\n yearArray[1] = new Date().getFullYear();\n }\n\n return yearArray;\n}\n\n/**\n * Converts the boundary value for timezone and schedules an update of the pikaday value if it is outside this boundary value.\n *\n * @param {Date} boundaryValue The boundary date to compare.\n * @param {function} fnCompare A date comparison function to determine if current value is outside this boundary.\n *\n * @returns {Date|null} Returns the boundary value (converted for timezone) if present.\n *\n * @private\n * @instance\n */\nfunction updateBoundaryDate(boundaryValue, fnCompare) {\n const { pikaday, value } = this,\n { timeZone } = this.computedOptions;\n\n // Is there a value for this boundary?\n if (boundaryValue) {\n // Compute timezone value.\n const local = convertDateToZone(boundaryValue, timeZone);\n\n // If the current date is outside the bounds we will update to that value after render.\n if (value && fnCompare(convertDateToZone(value, timeZone), local)) {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n schedule('afterRender', () => pikaday.setDate(local));\n }\n\n // Return timezone value so we can update pikaday boundary.\n return local;\n }\n\n return null;\n}\n\n/**\n * Pikaday sets passed dates to beginning of day, so this function will reset the time components of the returned date to the passed time.\n *\n * @param {Date} date The date object to reset.\n * @param {Date} [time] The time to reset the date object to.\n *\n * @returns {Date}\n */\nfunction synchronizeTimeValues(date, time) {\n const d = new Date(date);\n\n // Was a time passed?\n if (time) {\n // Synchronize.\n d.setHours(time.getHours());\n d.setMinutes(time.getMinutes());\n d.setSeconds(time.getSeconds());\n d.setMilliseconds(time.getMilliseconds());\n }\n\n return d;\n}\n\n/**\n * Called when the user selects a new date in the pikaday component.\n *\n * @param {Date} selectedDate\n *\n * @instance\n */\nfunction onPikadaySelect(selectedDate) {\n let { value } = this,\n { timeZone } = this.computedOptions;\n\n // Is there a timezone?\n if (timeZone) {\n // Was an initial date value supplied?\n if (value) {\n // Reset time components to original timezone values.\n selectedDate = synchronizeTimeValues(selectedDate, convertDateToZone(value, timeZone));\n }\n\n // Convert back to browser relative UTC.\n selectedDate = zonedTimeToUtc(selectedDate, timeZone);\n } else {\n // Reset time components to original values.\n selectedDate = synchronizeTimeValues(selectedDate, value);\n }\n\n // Notify date changed.\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n once(this, 'onSelection', selectedDate);\n}\n\n/**\n * Base class for the pikaday components.\n */\nexport default class BasePikadayComponent extends Component {\n tagName = '';\n\n get defaults() {\n return getOwner(this).lookup('pikaday:main');\n }\n\n /**\n * Indicates a specific time zone has been supplied.\n *\n * @type {boolean}\n */\n @computed('computedOptions.timeZone')\n get hasTimeZone() {\n return isPresent('computedOptions.timeZone');\n }\n\n // region Options\n\n /**\n * Returns the pikaday options computed from defaults, globally passed values and locally passed values.\n *\n * @type {Object}\n */\n @computed('defaults', 'i18n', 'options', 'position', 'reposition', 'timeZone')\n get computedOptions() {\n const options = this.getDefaultOptions(),\n fnAddOverrides = (src = {}, ...props) => {\n props.forEach((name) => {\n const value = src[name];\n if (isPresent(value)) {\n options[name] = value;\n }\n });\n };\n\n // Apply global defaults, then passed properties to options.\n fnAddOverrides(this.defaults, 'i18n', 'timeZone', 'firstDay');\n fnAddOverrides(this, 'i18n', 'timeZone', 'firstDay', 'position', 'reposition');\n\n const { timeZone } = options;\n\n // Is there a time zone?\n if (isPresent(timeZone)) {\n ['min', 'max'].forEach((n) => {\n const name = `${n}Date`,\n value = options[name];\n\n // Is these a min/max value?\n if (value) {\n // Convert for time zone\n options[name] = convertDateToZone(value, timeZone);\n }\n });\n }\n\n Object.assign(options, this.options || {});\n\n return options;\n }\n\n /**\n * Returns default pikaday options.\n *\n * @returns {Object}\n */\n getDefaultOptions() {\n const {\n firstDay,\n field,\n pikadayContainer,\n format: dateFormat,\n minDate,\n maxDate,\n theme,\n yearRange,\n disableDayFn\n } = this;\n\n return {\n field: field,\n container: pikadayContainer,\n bound: !pikadayContainer,\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n onOpen: bind(this, this.onPikadayOpen),\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n onClose: bind(this, this.onPikadayClose),\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n onSelect: bind(this, this.onPikadaySelect),\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n onDraw: bind(this, this.onPikadayRedraw),\n firstDay: firstDay === undefined ? 0 : parseInt(firstDay, 10),\n format: dateFormat || 'dd.MM.yyyy',\n yearRange: determineYearRange(yearRange),\n minDate: minDate ? minDate : null,\n maxDate: maxDate ? maxDate : null,\n theme: theme || null,\n keyboardInput: true,\n showDaysInNextAndPreviousMonths: true,\n timeZone: undefined,\n disableDayFn: disableDayFn,\n toString(date, fmt) {\n return format(date, fmt);\n },\n i18n: {\n previousMonth: '',\n nextMonth: '',\n months: MONTHS.map((d) => format(d, 'MMMM')),\n weekdays: WEEKDAYS.map((d) => format(d, 'EEEE')),\n weekdaysShort: WEEKDAYS.map((d) => format(d, 'EEEEEE'))\n }\n };\n }\n\n // endregion\n\n // region Pikaday configuration\n\n /**\n * Initialize the pikaday component.\n */\n setupPikaday() {\n this.pikaday = new Pikaday(this.computedOptions);\n this.setPikadayDate();\n\n const { pikadayContainer } = this;\n if (pikadayContainer) {\n this.keyListener = addWeakListener(this, pikadayContainer, 'keydown', (event) => {\n const { target } = event;\n\n // This keydown listener is added to the pikaday-container to avoid adding listeners to each button every time pikaday redraws.\n // This will ensure the target is a button and that it isn't disabled.\n if (\n isEnterOrSpaceCode(event.code) &&\n target.classList.contains('pika-button') &&\n !target.parentElement.classList.contains('is-disabled')\n ) {\n const { pikaYear: year, pikaMonth: month, pikaDay: day } = target.dataset;\n if (!year || !month || !day) {\n return;\n }\n\n onPikadaySelect.call(this, new Date(year, month, day));\n }\n });\n }\n }\n\n /**\n * Update the pikaday value, converting for timezone and min/max dates.\n *\n * @function\n */\n @action setPikadayDate() {\n const { value } = this;\n if (value) {\n this.pikaday.setDate(convertDateToZone(value, this.computedOptions.timeZone), true);\n }\n }\n\n /**\n * Update pikaday minimum date.\n */\n setMinDate() {\n const minDate = updateBoundaryDate.call(this, this.minDate, isBefore);\n if (minDate) {\n this.pikaday.setMinDate(minDate);\n }\n }\n\n /**\n * Update pikaday maximum date.\n */\n setMaxDate() {\n const maxDate = updateBoundaryDate.call(this, this.maxDate, isAfter);\n if (maxDate) {\n this.pikaday.setMaxDate(maxDate);\n }\n }\n\n /**\n * Update the pikaday configuration.\n */\n updateOptions() {\n this.pikaday.config(this.computedOptions);\n }\n\n // endregion\n\n // region Pikaday Events\n\n /**\n * Called when pikaday component is opened.\n */\n onOpen() {}\n\n /**\n * Called when pikaday component is closed.\n */\n onClose() {}\n\n /**\n * Called when user selects a new date.\n */\n onSelection() {}\n\n /**\n * Called when pikaday component is drawn.\n */\n onDraw() {}\n\n /**\n * Called when the user selects a new date in the pikaday component.\n */\n onPikadaySelect() {\n onPikadaySelect.call(this, this.pikaday.getDate());\n }\n\n /**\n * Called when the pikaday component redraws.\n */\n onPikadayRedraw() {\n this.onDraw();\n }\n\n // endregion\n\n @action cleanupPikaday() {\n const { keyListener } = this;\n if (keyListener) {\n removeListener(keyListener);\n }\n\n this.pikaday.destroy();\n }\n}\n","// https://gist.github.com/FezVrasta/075d228ffb855688c75a69c6d1d6afce\n\nexport default function parseGenerateConfig(config) {\n let defaultConfig = {\n tagName: 'div',\n classNames: ['popper'],\n attributes: [],\n parent: window.document.body,\n content: '',\n contentType: 'text',\n arrowTagName: 'div',\n arrowClassNames: ['popper__arrow'],\n arrowAttributes: ['x-arrow']\n };\n\n config = Object.assign({}, defaultConfig, config);\n\n let d = window.document;\n\n let popper = d.createElement(config.tagName);\n addClassNames(popper, config.classNames);\n addAttributes(popper, config.attributes);\n\n if (config.contentType === 'node') {\n popper.appendChild(config.content.jquery ? config.content[0] : config.content);\n } else if (config.contentType === 'html') {\n popper.innerHTML = config.content;\n } else {\n popper.textContent = config.content;\n }\n\n if (config.arrowTagName) {\n let arrow = d.createElement(config.arrowTagName);\n addClassNames(arrow, config.arrowClassNames);\n addAttributes(arrow, config.arrowAttributes);\n popper.appendChild(arrow);\n }\n\n let parent = config.parent.jquery ? config.parent[0] : config.parent;\n\n // if the given parent is a string, use it to match an element\n // if more than one element is matched, the first one will be used as parent\n // if no elements are matched, the script will throw an error\n if (typeof parent === 'string') {\n parent = d.querySelectorAll(config.parent);\n parent = parent[0];\n }\n\n // if the given parent is a DOM nodes list or an array of nodes with more than one element,\n // the first one will be used as parent\n if (parent.length > 1 && parent instanceof Element === false) {\n parent = parent[0];\n }\n\n // append the generated popper to its parent\n parent.appendChild(popper);\n\n return popper;\n}\n\nfunction addClassNames(element, classNames) {\n classNames.forEach(function (className) {\n element.classList.add(className);\n });\n}\n\nfunction addAttributes(element, attributes) {\n attributes.forEach(function (attribute) {\n element.setAttribute(attribute.split(':')[0], attribute.split(':')[1] || '');\n });\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div {{did-insert this.updateTooltip.perform}} {{did-update this.updateTooltip.perform @text}} ...attributes>\\n {{~yield~}}\\n</div>\")","import Component from '@glimmer/component';\nimport { assert } from '@ember/debug';\nimport { isPresent, isEmpty } from '@ember/utils';\nimport { timeout, task } from 'ember-concurrency';\nimport Popper from 'popper.js';\nimport parseGenerateConfig from '../utils/generate-popper.js';\n\nimport type { Task } from 'ember-concurrency';\n\nexport type ErrorTooltipDirection = 'up' | 'down' | 'sibling';\n\n/**\n * Converts the old HasErrorTooltip autoDestroy property value (seconds) to the new ErrorTooltip duration value (milliseconds).\n */\nexport function convertAutoDestroyToDuration(autoDestroy: unknown): number | undefined {\n if (isPresent(autoDestroy) && !isNaN(autoDestroy as number)) {\n return (autoDestroy as number) * 1000;\n }\n\n return undefined;\n}\n\ninterface ErrorTooltipArgs {\n /** The error text. */\n text?: string;\n /** The Popper.js placement of the tooltip. */\n placement?:\n | 'auto-start'\n | 'auto'\n | 'auto-end'\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'right-start'\n | 'right'\n | 'right-end'\n | 'bottom-end'\n | 'bottom'\n | 'bottom-start'\n | 'left-end'\n | 'left'\n | 'left-start';\n /** Optional CSS selector indicating which element to use for anchoring the tooltip. */\n selector?: string;\n /** The direction within the host element to look for the selector element: \"down\" uses `host.querySelector`, \"up\" uses `host.closest`, \"sibling\" uses `host.parentElement.querySelector` (defaults to \"down\"). */\n selectorDirection?: 'up' | 'down' | 'sibling';\n /** Optional number of milliseconds before closing tooltip (defaults to zero so tooltip won't close). */\n duration?: number;\n}\n\nexport interface ErrorTooltipSignature {\n Element: HTMLDivElement;\n Args: ErrorTooltipArgs;\n Blocks: {\n default: [];\n };\n}\n\nexport interface CommonInputErrorTooltipArgs {\n /** The text for the error tooltip. */\n errorMessage?: ErrorTooltipArgs['text'];\n /** The Popper.js placement of the tooltip. */\n errorTooltipPlace?: ErrorTooltipArgs['placement'];\n /** Optional number of milliseconds before closing tooltip (defaults to zero so tooltip won't close). */\n errorDuration?: ErrorTooltipArgs['duration'];\n}\n\n/**\n * A component for displaying a red error tooltip.\n */\nexport default class ErrorTooltip extends Component<ErrorTooltipSignature> {\n /**\n * The error tooltip instance.\n */\n tooltip: Popper | undefined;\n\n /**\n * Finds the element to use as the anchor for the error tooltip.\n */\n private getTooltipAnchor(el: HTMLDivElement): Element {\n const { selector = '', selectorDirection = 'down' } = this.args,\n defaultAnchor = (el.firstElementChild as Element) ?? el;\n\n if (isEmpty(selector)) {\n return defaultAnchor;\n }\n\n const anchor = (() => {\n if (selectorDirection === 'up') {\n return el.closest(selector);\n }\n\n return (selectorDirection === 'sibling' ? el.parentElement : el)?.querySelector(selector);\n })();\n\n assert(\n `[@adc/ui-components] ErrorTooltip target element not found for \"${selector}\" in direction \"${selectorDirection}\"`,\n anchor\n );\n\n return anchor ?? defaultAnchor;\n }\n\n /**\n * Creates (and caches) the error tooltip instance.\n */\n private createTooltip(el: HTMLDivElement): void {\n const { text, placement = 'auto' } = this.args;\n\n this.tooltip = new Popper(\n this.getTooltipAnchor(el),\n parseGenerateConfig({\n arrowClassNames: ['arrow'],\n classNames: ['tool-tip', 'tool-tip-error'],\n attributes: ['aria-live:assertive', 'role:alert', `aria-errormessage:${text}`],\n content: text,\n\n // If the reference element is within a modal, attach the tooltip to the modal.\n parent: el.closest('.modal') ?? window.document.body\n }),\n {\n placement,\n removeOnDestroy: true,\n modifiers: {\n preventOverflow: {\n escapeWithReference: false\n }\n }\n }\n );\n }\n\n /**\n * Destroys and clears the error tooltip instance.\n */\n private destroyTooltip(): void {\n const { tooltip } = this;\n if (tooltip) {\n tooltip.destroy();\n this.tooltip = undefined;\n }\n }\n\n /**\n * Called to create or update the error tooltip instance.\n */\n updateTooltip: Task<void, [HTMLDivElement]> = task({ restartable: true }, async (el: HTMLDivElement) => {\n // Schedule tooltip update so render is complete and positioning will be correct.\n await timeout(0);\n\n this.destroyTooltip();\n\n const { duration = 0, text } = this.args;\n\n if (isPresent(text)) {\n this.createTooltip(el);\n\n if (duration > 0) {\n // Close the popover after a short time.\n await timeout(duration);\n this.destroyTooltip();\n }\n }\n });\n\n /** @override */\n willDestroy(): void {\n super.willDestroy();\n\n this.destroyTooltip();\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div class=\\\"ui-modal-footer\\\" ...attributes>\\n {{yield}}\\n\\n {{#each this.buttonsToRender as |btn|}}\\n <Button::Async\\n class={{btn.css}}\\n disabled={{if btn.disabled \\\"true\\\"}}\\n @text={{btn.text}}\\n @buttonAction={{fn this.clickButton btn.action}}\\n />\\n {{/each}}\\n</div>\")","import Component from '@glimmer/component';\nimport { A } from '@ember/array';\nimport { computed, action } from '@ember/object';\nimport { inject as service } from '@ember/service';\n\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type ModalService from '../../../../services/modals';\nimport type { ButtonAsyncSignature } from '../../../button/async';\n\nexport interface ModalFooterSignature {\n Element: HTMLDivElement;\n Args: {\n /** Indicates the close button should not be added to the collection of footer buttons. */\n disableCloseButton?: boolean;\n /** The buttons to render in the modal footer. */\n buttons?: Array<ModalButtonConfig>;\n /** Optional text for the automatic close button. */\n closeButtonText?: string;\n };\n Blocks: {\n default: [];\n };\n}\n\ntype ModalFooterButtonAction = ButtonAsyncSignature['Args']['buttonAction'];\n\nexport interface ModalButtonConfig {\n css?: string;\n action?: ModalFooterButtonAction;\n disabled?: boolean;\n text?: string;\n}\n\n/**\n * Build a simple modal footer button\n */\nexport function getModalFooterButton(\n text: string,\n action: ModalFooterButtonAction = () => true,\n css?: string,\n disabled?: boolean,\n isPrimary = false\n): ModalButtonConfig {\n return {\n css: A([isPrimary ? 'btn-color-primary' : undefined, css])\n .compact()\n .join(' '),\n action,\n disabled: disabled ?? false,\n text\n };\n}\n\nexport { getModalFooterButton as modalFooterButton };\n\n/**\n * @classdesc\n * Footer for modal component, contains list of buttons\n */\nexport default class ModalFooter extends Component<ModalFooterSignature> {\n @service declare intl: ADCIntlService;\n @service declare modals: ModalService;\n\n /**\n * Get buttons to display as part of the footer\n */\n @computed('args.{buttons.@each.disabled,closeButtonText,disableCloseButton}')\n get buttonsToRender(): ModalButtonConfig[] {\n const { args } = this,\n buttons = A(args.buttons ?? []).compact();\n\n if (!(args.disableCloseButton === false)) {\n return buttons;\n }\n\n return [\n getModalFooterButton(\n args.closeButtonText ?? this.intl.t('@adc/ui-components.close'),\n () => true,\n 'close-btn'\n ),\n ...buttons\n ];\n }\n\n private handleActionResult(result: any): void {\n if (result !== false) {\n this.modals.closeModal();\n }\n }\n\n /**\n * Handle modal button actions.\n */\n @action\n clickButton(buttonAction: ModalFooterButtonAction, buttonAnimation?: Promise<boolean>): void | Promise<void> {\n const p = buttonAction(buttonAnimation);\n\n // Is the return value a promise?\n if (p !== undefined && typeof p.then === 'function') {\n return (async () => {\n const result = await p;\n this.handleActionResult(result);\n })();\n }\n\n this.handleActionResult(p);\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div class=\\\"nav-dialog-modal\\\" ...attributes>\\n <Modals::Base::BaseModal>\\n <:header as |DialogHeader|>\\n <DialogHeader\\n @title={{@title}}\\n @disableCloseButton={{@disableHeaderClose}}\\n @customClose={{@customHeaderClose}}\\n >\\n {{#if (or (media \\\"isMobile\\\") (media \\\"isTabletPortrait\\\"))}}\\n <Button::Icon\\n class=\\\"open-nav\\\"\\n @icon=\\\"menu\\\"\\n @iconOnly={{true}}\\n @text={{t \\\"@adc/ui-components.openList\\\"}}\\n @buttonColor=\\\"stealth\\\"\\n {{on \\\"click\\\" (fn (mut this.showNavMobile) (not this.showNavMobile))}}\\n />\\n {{/if}}\\n </DialogHeader>\\n </:header>\\n\\n <:default>\\n <div class=\\\"nav-dialog-area\\\" {{did-insert this.initSelectedItem}}>\\n {{#if this.navigationItems}}\\n <nav\\n class=\\\"elevated {{if this.showNavMobile \\'open\\'}}\\\"\\n aria-controls=\\\"{{guid-for this}}_contents\\\"\\n {{on-click-outside (fn (mut this.showNavMobile) false) capture=true}}\\n >\\n <ul {{did-resize this.updateNavListCss}}>\\n {{#each this.navigationItems as |navItem index|}}\\n <li data-test-model-id={{index}}>\\n <button\\n type=\\\"button\\\"\\n class=\\\"elevated\\n {{if navItem.selected \\'active\\'}}\\n {{if (and navItem.subItems navItem.expanded) \\'subitems-visible\\'}}\\\"\\n aria-haspopup={{if navItem.subItems \\\"true\\\"}}\\n {{on \\\"click\\\" (fn this.selectItem navItem)}}\\n aria-expanded={{if navItem.expanded \\\"true\\\" \\\"false\\\"}}\\n aria-controls=\\\"{{index}}-nav-subitems\\\"\\n >\\n {{#if (has-block \\\"nav-item\\\")}}\\n {{yield navItem to=\\\"nav-item\\\"}}\\n {{else}}\\n {{navItem.description}}\\n {{/if}}\\n </button>\\n\\n {{#if navItem.subItems}}\\n <ul\\n id=\\\"{{index}}-nav-subitems\\\"\\n aria-hidden={{unless navItem.expanded \\\"true\\\"}}\\n aria-label={{t\\n \\\"@adc/ui-components.navModalSubMenu\\\"\\n parentMenuName=navItem.description\\n }}\\n >\\n {{#each navItem.subItems as |subItem|}}\\n <li>\\n <button\\n type=\\\"button\\\"\\n class=\\\"elevated {{if subItem.selected \\'active\\'}}\\\"\\n {{on \\\"click\\\" (fn this.selectItem subItem)}}\\n >\\n {{#if (has-block \\\"sub-nav-item\\\")}}\\n {{yield subItem to=\\\"sub-nav-item\\\"}}\\n {{else}}\\n {{subItem.description}}\\n {{/if}}\\n </button>\\n </li>\\n {{/each}}\\n </ul>\\n {{/if}}\\n </li>\\n {{/each}}\\n </ul>\\n </nav>\\n {{/if}}\\n\\n <div class=\\\"nav-dialog-content\\\">\\n <div class=\\\"nav-dialog-body\\\" id=\\\"{{guid-for this}}_contents\\\">\\n {{yield}}\\n </div>\\n\\n {{#if @buttons}}\\n <Modals::Base::Footer::ModalFooter\\n @buttons={{@buttons}}\\n @disableCloseButton={{@disableFooterClose}}\\n @closeButtonText={{@footerCloseText}}\\n />\\n {{/if}}\\n </div>\\n </div>\\n </:default>\\n </Modals::Base::BaseModal>\\n</div>\")","import Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { A } from '@ember/array';\nimport { assert } from '@ember/debug';\nimport { computed, action } from '@ember/object';\n\nimport type { ModalFooterSignature } from '../../base/footer/modal-footer';\nimport type { ModalHeaderSignature } from '../../base/header/modal-header';\n\ntype SelectionFn = () => unknown;\n\n/**\n * The base class for NavItem as well as the concrete class for NavItem sub items.\n */\nexport class SubItem {\n @tracked description = '';\n @tracked selected = false;\n onSelection: () => unknown;\n data: any = {};\n\n constructor(fn: SelectionFn, props: Partial<Exclude<SubItem, 'onSelection'>> = {}) {\n assert(\n '[@adc/ui-components] The `onSelection` function must be passed to the <NavDialog /> item constructor',\n fn\n );\n\n this.onSelection = fn;\n this.description = props.description ?? '';\n this.selected = props.selected ?? false;\n this.data = props.data ?? {};\n }\n}\n\n/**\n * The source for navigation items in the navigation dialog.\n */\nexport class NavItem extends SubItem {\n @tracked expanded = false;\n subItems: SubItem[] = [];\n\n constructor(fn: SelectionFn, props: Partial<Exclude<NavItem, 'onSelection'>> = {}) {\n super(fn, props);\n\n this.expanded = props.expanded ?? false;\n this.subItems = props.subItems ?? [];\n }\n}\n\ntype ModalHeaderArgs = ModalHeaderSignature['Args'];\ntype ModalFooterArgs = ModalFooterSignature['Args'];\n\ninterface NavDialogArgs extends Pick<ModalHeaderArgs, 'title'>, Pick<ModalFooterArgs, 'buttons'> {\n /** The navigation items to render. */\n navItems: NavItem[];\n /** Indicates the header close button should not be visible. */\n disableHeaderClose?: ModalHeaderArgs['disableCloseButton'];\n /** Triggered when the user interacts with the close button. */\n customHeaderClose?: ModalHeaderArgs['customClose'];\n /** Indicates the close button should not be added to the collection of footer buttons. */\n disableFooterClose?: ModalFooterArgs['disableCloseButton'];\n /** Optional text for the automatic close button. */\n footerCloseText?: ModalFooterArgs['closeButtonText'];\n}\n\nexport interface NavigationDialogSignature {\n Element: HTMLDivElement;\n Args: NavDialogArgs;\n Blocks: {\n /** The navigation item section (right side). */\n 'nav-item': [NavItem];\n /** A sub nav item within the navigation section (not currently in use). */\n 'sub-nav-item': [SubItem];\n /** The body of the modal. */\n default: [];\n };\n}\n\n/**\n * @classdesc\n * A navigation dialog\n */\nexport default class NavigationDialog extends Component<NavigationDialogSignature> {\n /**\n * Is the nav visible on a mobile device?\n */\n @tracked showNavMobile = false;\n\n /**\n * Array of navigational items for the nav pane.\n */\n @computed('args.navItems')\n get navigationItems(): ReturnType<typeof A<NavItem>> {\n return A<NavItem>(this.args.navItems ?? []);\n }\n\n @action initSelectedItem(): void {\n const { navigationItems } = this;\n if (!navigationItems.findBy('selected')) {\n const firstItem = navigationItems.firstObject;\n if (firstItem) {\n this.selectItem(firstItem);\n }\n }\n }\n\n /**\n * Called from the template when the user selects a nav item.\n */\n @action selectItem(selectedItem: SubItem): boolean {\n const items = this.navigationItems;\n\n if (selectedItem instanceof NavItem) {\n // Reset all items and sub item values.\n items.forEach((item) => {\n item.selected = item.expanded = false;\n A(item.subItems).setEach('selected', false);\n });\n\n selectedItem.selected = true;\n\n const [firstItem] = selectedItem.subItems;\n if (firstItem) {\n selectedItem.expanded = true;\n firstItem.selected = true;\n firstItem.onSelection();\n } else {\n selectedItem.onSelection();\n }\n } else {\n const { subItems = [] } = items.find((item) => item.subItems.includes(selectedItem)) ?? {};\n A(subItems).setEach('selected', false);\n selectedItem.selected = true;\n selectedItem.onSelection();\n }\n\n return false;\n }\n\n @action updateNavListCss(el: HTMLUListElement): void {\n const nav = el.parentElement;\n if (nav) {\n nav.classList.toggle('has-list-indicator', el.scrollHeight !== el.clientHeight);\n }\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div class=\\\"promise-dialog-modal {{coalesce @model.css \\'\\'}}\\\">\\n <Modals::DialogModals::Simple::SimpleDialog\\n @title={{@model.title}}\\n @buttons={{this.buttons}}\\n @disableFooterClose={{true}}\\n @disableHeaderClose={{true}}\\n >\\n <div class=\\\"promise-body\\\">\\n {{yield}}\\n <div class=\\\"icon\\\">\\n {{#if this.displayIconType}}\\n <SvgSymbol @icon={{this.displayIconType}} />\\n {{else if this.showSpinner}}\\n <SpinnerSvg @spinning={{true}} />\\n {{/if}}\\n </div>\\n\\n {{#if this.errorMessage}}\\n <p class=\\\"body-text\\\">\\n {{this.errorMessage}}\\n </p>\\n {{/if}}\\n\\n <p class=\\\"body-text\\\">\\n {{this.currentStateValues.bodyText}}\\n </p>\\n\\n {{#if (or this.currentStateValues.footerImagePath this.currentStateValues.footerText)}}\\n <div class=\\\"footer\\\">\\n {{#if this.currentStateValues.footerImagePath}}\\n <img\\n alt={{this.currentStateValues.footerImageAlt}}\\n class=\\\"footer-image\\\"\\n src={{this.currentStateValues.footerImagePath}}\\n />\\n {{/if}}\\n {{#if this.currentStateValues.footerText}}\\n <p class=\\\"footer-text\\\">\\n {{this.currentStateValues.footerText}}\\n </p>\\n {{/if}}\\n </div>\\n {{/if}}\\n </div>\\n </Modals::DialogModals::Simple::SimpleDialog>\\n</div>\")","import Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { computed, action } from '@ember/object';\nimport { equal } from '@ember/object/computed';\nimport { inject as service } from '@ember/service';\nimport { getModalFooterButton } from '../../../modals/base/footer/modal-footer.ts';\n\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type ModalService from '../../../../services/modals.ts';\nimport type { ModalModel } from '../../../../services/modals.ts';\nimport type { SimpleDialogSignature } from '../simple/simple-dialog.ts';\n\ntype SimpleDialogSignatureArgs = SimpleDialogSignature['Args'];\n\nexport interface PromiseStep {\n bodyText: string;\n buttonText?: string;\n buttonCss?: string;\n displayCancel?: boolean;\n\n footerText?: string;\n footerImagePath?: string;\n footerImageAlt?: string;\n\n cancelOnClickFunction?: () => void;\n successOnClickFunction?: () => void;\n\n showError?: boolean;\n allowRetry?: boolean;\n}\n\nexport interface PromiseDialogModel extends ModalModel, Pick<SimpleDialogSignatureArgs, 'title'> {\n promiseFn: () => Promise<unknown>;\n stepConfirm: PromiseStep;\n stepPromise: PromiseStep;\n stepSuccess: PromiseStep;\n stepFailure: PromiseStep;\n css?: string;\n}\n\n/**\n * Constants for the different possible states.\n */\nenum State {\n Confirm,\n Promise,\n Success,\n Failure\n}\n\nexport interface PromiseDialogSignature {\n Args: {\n /** The promise dialog model. */\n model: PromiseDialogModel;\n };\n Blocks: {\n default: [];\n };\n}\n\n/**\n * @classdesc\n * A simple dialog for handling data while a promise resolves\n */\nexport default class PromiseDialog extends Component<PromiseDialogSignature> {\n @service declare intl: ADCIntlService;\n @service declare modals: ModalService;\n\n /**\n * Current promise state\n */\n @tracked private state = State.Confirm;\n\n /**\n * Message to display to user if an error is encountered during operation\n */\n @tracked errorMessage = '';\n\n /**\n * Should a spinner be displayed to indicate a pending promise\n */\n @equal('state', State.Promise)\n declare showSpinner: boolean;\n\n /**\n * Get the icon type based on the promise state\n */\n @computed('state')\n get displayIconType(): string {\n const { state } = this;\n\n if (state === State.Success) {\n return 'circle-check';\n }\n\n if (state === State.Failure) {\n return 'circle-x';\n }\n\n return '';\n }\n\n /**\n * Return the current promise state step\n */\n @computed('args.model', 'state')\n get currentStateValues(): PromiseStep {\n const { model } = this.args;\n return {\n [State.Confirm]: model.stepConfirm,\n [State.Promise]: model.stepPromise,\n [State.Success]: model.stepSuccess,\n [State.Failure]: model.stepFailure\n }[this.state];\n }\n\n /**\n * Return the buttons for the footer.\n */\n @computed('currentStateValues', 'processPromise', 'state')\n get buttons(): SimpleDialogSignatureArgs['buttons'] {\n const buttons = [],\n { state, currentStateValues } = this,\n { cancelOnClickFunction } = currentStateValues,\n showSuccess = state === State.Success,\n showRetry = state === State.Failure && currentStateValues.allowRetry;\n\n if (!showSuccess && currentStateValues.displayCancel) {\n buttons.push(\n getModalFooterButton(\n this.intl.t('@adc/ui-components.cancel'),\n cancelOnClickFunction && ([State.Promise, State.Confirm].includes(state) || showRetry)\n ? cancelOnClickFunction\n : () => {\n this.modals.closeModal();\n }\n )\n );\n }\n\n // Display an action button for stepConfirm and stepSuccess, and for stepFailure if promise retry is allowed.\n const displayPromiseButton = state === State.Confirm || showRetry;\n\n if (displayPromiseButton || showSuccess) {\n buttons.push(\n getModalFooterButton(\n currentStateValues.buttonText ?? '',\n displayPromiseButton ? this.processPromise : currentStateValues.successOnClickFunction,\n currentStateValues.buttonCss ?? ''\n )\n );\n }\n\n return buttons;\n }\n\n /**\n * Process the model's promise, changing state and handling errors\n */\n @action\n processPromise(): boolean {\n this.state = State.Promise;\n\n (async () => {\n const { model } = this.args;\n\n try {\n await model.promiseFn();\n this.state = State.Success;\n } catch (error) {\n this.state = State.Failure;\n\n if (model.stepFailure.showError) {\n this.errorMessage = this.intl.t('@adc/ui-components.promiseFailed', { error });\n }\n }\n })();\n\n return false;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div class=\\\"loading-spinner\\\">\\n <div class=\\\"spinner\\\" tabindex={{0}}>\\n <SpinnerSvg @spinning={{true}} />\\n </div>\\n</div>\")","import templateOnlyComponent from '@ember/component/template-only';\n\nconst LoadingDialog = templateOnlyComponent();\nexport default LoadingDialog;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div\\n class=\\\"page-view-container {{unless @noDefaultStyling \\'use-default-styles\\'}}\\\"\\n {{did-insert this.resolveModel.perform}}\\n {{did-update this.resolveModel.perform @model}}\\n ...attributes\\n>\\n <div class=\\\"page-view-content {{this.contentWidthClass}}\\\">\\n {{yield (component \\\"route-view/content/pending-content\\\" isPending=this.isPending) to=\\\"loading\\\"}}\\n\\n {{#if (and this.isFulfilled (not this.resolveModel.isRunning))}}\\n {{yield (this.getResolvedModel)}}\\n\\n {{! This portion loads even if there are no results, so we need to add a check to prevent it. }}\\n {{#unless this.hasNoResults}}\\n <LastRenderMark @markEndOfRendering={{@markEndOfRendering}} />\\n {{/unless}}\\n {{/if}}\\n\\n {{yield\\n (component\\n \\\"route-view/view-container/no-results-content\\\"\\n hasNoResults=this.hasNoResults\\n search=@search\\n typeText=@typeText\\n markEndOfRendering=@markEndOfRendering\\n )\\n to=\\\"no-results\\\"\\n }}\\n\\n {{yield\\n (component\\n \\\"route-view/content/error-content\\\"\\n isRejected=this.isRejected\\n errorText=this.errorText\\n markEndOfRendering=@markEndOfRendering\\n )\\n to=\\\"error\\\"\\n }}\\n </div>\\n</div>\")","import Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { isArray } from '@ember/array';\nimport { assert } from '@ember/debug';\nimport { reads } from '@ember/object/computed';\nimport { inject as service } from '@ember/service';\nimport { task, timeout } from 'ember-concurrency';\nimport FulfilledContent from '../route-view/content/fulfilled-content.ts';\n\nimport type { TEmberAjaxError } from '@adc/ajax/services/adc-ajax';\nimport type PerformanceMonitorService from '@adc/app-infrastructure/services/performance-monitor';\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type RouterService from '@ember/routing/router-service';\nimport type { ComponentLike, WithBoundArgs } from '@glint/template';\nimport type { Task } from 'ember-concurrency';\nimport type { ErrorContentSignature } from '../route-view/content/error-content';\nimport type PendingContent from '../route-view/content/pending-content';\nimport type { NoResultsContentSignature } from '../route-view/view-container/no-results-content';\n\nconst CONTENT_WIDTHS = ['small', 'large', 'full'] as const;\ntype ContentWidth = (typeof CONTENT_WIDTHS)[number];\ntype ContentWidthClass = 'small-width' | 'large-width' | 'full-width' | '';\n\ntype ResolvedModel<M> = NonNullable<Awaited<Promise<M> | M>>;\n\nexport interface PageViewContainerSignature<M> {\n Element: HTMLDivElement;\n Args: Pick<NoResultsContentSignature['Args'], 'search' | 'typeText'> & {\n /** The model for this page view container, which will be resolved and passed to the yielded fulfilled content component. */\n model?: Promise<M> | M;\n /** Removes the default CSS styling for this component. */\n noDefaultStyling?: boolean;\n /** The width of the content. */\n contentWidth?: ContentWidth;\n /** Triggered when the `@model` has been resolved. */\n dataLoaded?: (resolvedModel: ResolvedModel<M>) => any;\n /** Triggered when the container is done rendering. */\n markEndOfRendering: () => void;\n };\n Blocks: {\n /** Will appear and show a spinner while the `@model` parameter is resolved */\n loading: [WithBoundArgs<typeof PendingContent, 'isPending'>];\n /** Renders after the `@model` is resolved and yields the resolved @model. */\n default: [ResolvedModel<M>];\n /** Renders if the `@model` resolves as empty. */\n 'no-results': [\n WithBoundArgs<\n ComponentLike<NoResultsContentSignature>,\n 'hasNoResults' | 'search' | 'typeText' | 'markEndOfRendering'\n >\n ];\n /** Renders if an exception is thrown while resolving the `@model`. */\n error: [WithBoundArgs<ComponentLike<ErrorContentSignature>, 'isRejected' | 'errorText' | 'markEndOfRendering'>];\n };\n}\n\nexport default class PageViewContainer<M> extends Component<PageViewContainerSignature<M>> {\n @service declare performanceMonitor: PerformanceMonitorService;\n @service declare router: RouterService;\n @service declare intl: ADCIntlService;\n\n fulfilledComp = FulfilledContent<ResolvedModel<M>>;\n\n @reads('resolveModel.isRunning')\n declare isPending: boolean;\n\n @tracked isFulfilled = false;\n @tracked isRejected = false;\n @tracked hasNoResults = false;\n @tracked resolvedModel?: ResolvedModel<M>;\n @tracked errorText = '';\n\n /**\n * Indicates if the route timing has been reported to the performance monitor.\n */\n wasRouteTimingReported = false;\n\n /**\n * Records the route URL used when the route timing was reported.\n */\n urlForReportedRouteTiming = '';\n\n @tracked hasCalledDataLoadedAction = false;\n\n /**\n * Class name for the content width.\n */\n get contentWidthClass(): ContentWidthClass {\n const { contentWidth } = this.args;\n if (contentWidth) {\n assert(\n '[@adc/ui-components] contentWidth value should be \"small\" or \"large\" or \"full\".',\n CONTENT_WIDTHS.includes(contentWidth)\n );\n\n return `${contentWidth}-width`;\n }\n\n return '';\n }\n\n getResolvedModel = (): ResolvedModel<M> => {\n // This is a hack to tell TS that the resolved model will exist.\n return this.resolvedModel as ResolvedModel<M>;\n };\n\n resolveModel: Task<void, never> = task({ restartable: true }, async () => {\n Object.assign(this, {\n isFulfilled: false,\n isRejected: false,\n hasNoResults: false,\n resolvedModel: undefined\n });\n\n // Add a short delay to allow the template to update for the properties set above.\n await timeout(0);\n\n try {\n const resolvedModel = await this.args.model,\n { router } = this;\n\n if (!this.wasRouteTimingReported || this.urlForReportedRouteTiming !== router.currentURL) {\n // This model will get resolved any time it changes, but we only want to report route timing once.\n this.wasRouteTimingReported = true;\n this.urlForReportedRouteTiming = router.currentURL;\n this.performanceMonitor.markModelResolved(router.currentRouteName);\n }\n\n if (resolvedModel) {\n this.args.dataLoaded?.(resolvedModel);\n }\n\n const hasNoResults =\n !!resolvedModel &&\n ((resolvedModel as { meta?: { totalCount: number } }).meta?.totalCount === 0 ||\n (isArray(resolvedModel) && resolvedModel.length === 0));\n\n Object.assign(this, {\n hasCalledDataLoadedAction: true,\n isFulfilled: true,\n hasNoResults,\n resolvedModel\n });\n } catch (ex) {\n Object.assign(this, {\n isRejected: true,\n errorText: (ex as TEmberAjaxError).errors?.[0]?.detail ?? this.intl.t('generic.requestError')\n });\n }\n });\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div\\n {{did-insert (fn this.updateNativeToolbarButtons undefined)}}\\n {{will-destroy this.removeToolbarButtons}}\\n ...attributes\\n>\\n {{yield (hash update=this.updateNativeToolbarButtons dispose=this.disposeNativeButtons) this.navigationApi}}\\n</div>\")","import Component from '@glimmer/component';\nimport { isDestroyed } from '@adc/ember-utils/utils/ember-helpers';\nimport { action } from '@ember/object';\nimport { guidFor } from '@ember/object/internals';\nimport { getOwner } from '@ember/owner';\nimport { once } from '@ember/runloop';\nimport { inject as service } from '@ember/service';\n\nimport type NativeBridgeService from '@adc/app-infrastructure/services/native-bridge';\nimport type { InternalOwner } from '@ember/-internals/owner';\nimport type { ButtonNativeSignature, NativeButtonType } from './button/native';\n\ntype NativeButtonArgs = ButtonNativeSignature['Args'];\n\ninterface NavigationAPI {\n getVisitedRoutesStackLength(): number;\n transitionToPreviousRoute(): void;\n}\n\nexport interface NativeBridgeSignature {\n Element: HTMLDivElement;\n Args: {\n /** Called when there is no back or cancel button already present in the `buttonsList` collection when toolbar buttons are constructed. */\n handleNoNativeBackOrCancelButton(\n data: {\n contextButtons: NativeButtonType[];\n backButtons: NativeButtonType[];\n },\n navigationApi: NavigationAPI | undefined\n ): void;\n };\n Blocks: {\n default: [\n /** An object with methods for adding/removing native bridge buttons. */\n {\n /** Updates native toolbar buttons with the passed buttons. */\n update: NativeButtonArgs['updateNativeToolbarButtons'];\n /** Disposes buttons from toolbar with the defined componentIds. */\n dispose: NativeButtonArgs['disposeNativeButtons'];\n },\n /** The application navigation API. */\n NavigationAPI | undefined\n ];\n };\n}\n\n/**\n * A component that provides a common interface for components to interact with the native bridge.\n */\nexport default class NativeBridgeComponent extends Component<NativeBridgeSignature> {\n @service declare nativeBridge: NativeBridgeService;\n\n /**\n * Current list of native toolbar buttons.\n */\n private buttonsList: NativeButtonType[] = [];\n\n /**\n * Recalculates buttons for the native toolbar.\n */\n private recalculateNativeToolbar(): void {\n const backButtons: NativeButtonType[] = [],\n contextButtons: NativeButtonType[] = [],\n { buttonsList } = this;\n\n let wasBackOrCancel = false;\n\n buttonsList.forEach((button) => {\n switch (button.type) {\n case this.nativeBridge.getButtonTypeBack():\n case this.nativeBridge.getButtonTypeCancel():\n // Check if back or cancel already existed.\n if (wasBackOrCancel) {\n // Probably still let the new button be inserted but log an error.\n console.error(\n `Native toolbar back or cancel button already existed for modal, toolbar=${JSON.stringify(\n buttonsList\n )}`\n );\n }\n\n backButtons.unshift(button);\n\n wasBackOrCancel = true;\n break;\n\n case this.nativeBridge.getButtonTypeConfirm():\n contextButtons.unshift(button);\n break;\n\n default:\n contextButtons.push(button);\n break;\n }\n });\n\n // If there is no close button defined, then add one because a modal needs to have a close button.\n if (!wasBackOrCancel) {\n this.args.handleNoNativeBackOrCancelButton(\n {\n contextButtons,\n backButtons\n },\n this.navigationApi\n );\n }\n\n this.nativeBridge.setToolbarButtons({\n id: this.nativeToolbarId,\n backButtons,\n contextButtons\n } as Parameters<NativeBridgeService['setToolbarButtons']>[0]);\n }\n\n /**\n * Id that will uniquely represent this component in the native toolbars stack.\n */\n get nativeToolbarId(): ReturnType<typeof guidFor> {\n return guidFor(this);\n }\n\n get navigationApi(): NavigationAPI | undefined {\n const owner = getOwner(this);\n if (owner) {\n const api = (owner as InternalOwner).lookup('route-view:main');\n if (api) {\n return api as NavigationAPI;\n }\n }\n\n return undefined;\n }\n\n @action removeToolbarButtons(): void {\n this.nativeBridge.removeToolbarButtons(this.nativeToolbarId);\n }\n\n /**\n * Updates native toolbar buttons with the passed buttons.\n */\n @action updateNativeToolbarButtons(buttons: NativeButtonType[] = []): void {\n if (isDestroyed(this) || !this.nativeBridge.doesSupportToolbarButtons) {\n return;\n }\n\n // Remove any instance of buttons with the same componentId.\n this.disposeNativeButtons(\n buttons.map(({ componentId }) => componentId),\n true\n );\n\n this.buttonsList.push(...buttons);\n\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n once(this, this.recalculateNativeToolbar);\n }\n\n /**\n * Disposes buttons from toolbar with the defined componentIds.\n */\n @action disposeNativeButtons(componentIds: string[], doNotRecalculateToolbar?: boolean): void {\n if (isDestroyed(this) || !this.nativeBridge.doesSupportToolbarButtons) {\n return;\n }\n\n this.buttonsList = this.buttonsList.filter(({ componentId }) => !componentIds.includes(componentId));\n\n if (!doNotRecalculateToolbar) {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n once(this, this.recalculateNativeToolbar);\n }\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<NativeBridge\\n @handleNoNativeBackOrCancelButton={{this.handleNoNativeBackOrCancelButton}}\\n class=\\\"page-view\\\"\\n ...attributes\\n {{did-insert this.sendRouteViewRendered}}\\n as |buttons navigation|\\n>\\n {{yield (hash model=@model buttons=buttons navigation=navigation) to=\\\"toolbar\\\"}}\\n\\n {{yield\\n (component\\n (ensure-safe-component this.containerComp)\\n model=@model\\n dataLoaded=@dataLoaded\\n markEndOfRendering=this.markEndOfRendering\\n )\\n (hash model=@model buttons=buttons navigation=navigation)\\n }}\\n</NativeBridge>\")","import Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { service } from '@ember/service';\nimport PageViewContainer from './page-view/container.ts';\n\nimport type NativeBridgeService from '@adc/app-infrastructure/services/native-bridge';\nimport type PerformanceMonitorService from '@adc/app-infrastructure/services/performance-monitor';\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type RouterService from '@ember/routing/router-service';\nimport type { ComponentLike, WithBoundArgs } from '@glint/template';\nimport type { NativeBridgeSignature } from './native-bridge';\nimport type { PageViewContainerSignature } from './page-view/container';\n\ntype PageViewApi<M> = {\n /** The unresolved `@model`. */\n model: PageViewSignature<M>['Args']['model'];\n /** An object with native bridge button methods. */\n buttons: NativeBridgeSignature['Blocks']['default'][0];\n /** The host application navigation API. */\n navigation: NativeBridgeSignature['Blocks']['default'][1];\n};\n\nexport interface PageViewSignature<M> {\n Element: NativeBridgeSignature['Element'];\n Args: Pick<PageViewContainerSignature<M>['Args'], 'model' | 'dataLoaded'> & {\n /** Number of containers to render in the current page-view.\n * Passed in when there is more than 1 container to load. */\n numOfContainersToRender?: number;\n /** Indicates if this page view will utilize the kpi threshild metric system */\n useKpiThresholdMetrics?: boolean;\n };\n Blocks: {\n /** Space for a toolbar, rendered at the top of the `<PageView />` element. */\n toolbar: [\n /** The `<PageView />` api (with model, buttons and navigation properties). */\n PageViewApi<M>\n ];\n default: [\n /** The `<PageView::Container />` component. */\n WithBoundArgs<ComponentLike<PageViewContainerSignature<M>>, 'model' | 'dataLoaded' | 'markEndOfRendering'>,\n /** The `<PageView />` api (with model, buttons and navigation properties). */\n PageViewApi<M>\n ];\n };\n}\n\ntype NoBackParameters = Parameters<NativeBridgeSignature['Args']['handleNoNativeBackOrCancelButton']>;\n\n/**\n * This helps in tracking the rendering of multiple containers in a route. It increments a count of rendered containers and\n * checks if it equals the total number of containers to be rendered. If they are equal, it marks that the last container\n * has been loaded by calling markLastRender from PerformanceMonitorService. This function is useful for performance monitoring,\n * especially when a route consists of multiple containers that need to be rendered.\n * @param containersRendered Current number of rendered contianers.\n * @param numOfContainersToRender Expected total containers to render.\n * @param performanceMonitor The current instance of the performance monitor service.\n * @returns New count of containers rendered.\n */\nexport function markLastContainerRendered(\n containersRendered: number,\n numOfContainersToRender: number,\n performanceMonitor: PerformanceMonitorService\n): number {\n // If this is called we will increment the count because this can only be called once a container has rendered.\n containersRendered++;\n\n // If the counts are the same, mark that we've loaded the last contianer.\n if (containersRendered === numOfContainersToRender) {\n performanceMonitor.markLastRender();\n }\n\n return containersRendered;\n}\n\n/**\n * @classdesc\n * A component for rendering as the root element in each route, that contains code for resolving the model, and showing loading progress, error state and no results.\n */\nexport default class PageView<M> extends Component<PageViewSignature<M>> {\n @service declare intl: ADCIntlService;\n @service declare nativeBridge: NativeBridgeService;\n @service declare performanceMonitor: PerformanceMonitorService;\n @service declare router: RouterService;\n\n containerComp = PageViewContainer<M>;\n\n constructor(owner: unknown, args: PageViewSignature<M>['Args']) {\n super(owner, args);\n\n // We want to use kpi threshold metrics for page views.\n this.setKpiMetricUsage();\n }\n\n /**\n * Keeps track of the number of containers that have been rendered.\n */\n containersRendered = 0;\n\n /** Determines whether the rendering process for this page view\n * has completed and marks it using the performance monitor service.\n * This action is passed into each container and fires when that container\n * is finished rendering. Once every container has rendered, then we\n * call the performance monitor to mark the last render point.\n */\n @action\n markEndOfRendering(): void {\n const numOfContainersToRender = this.args.numOfContainersToRender ?? 1;\n\n // Attempt to mark the last container as rendered and return the new count.\n this.containersRendered = markLastContainerRendered(\n this.containersRendered,\n numOfContainersToRender,\n this.performanceMonitor\n );\n }\n\n /*\n * Determines whether the page view utilizes the KPI threshold metric tracking feature.\n */\n @action\n private setKpiMetricUsage(): void {\n this.performanceMonitor.setUseKpiThresholdMetrics(this.args.useKpiThresholdMetrics ?? false);\n }\n\n /**\n * Notifies the performance monitor service that the route view has been rendered.\n */\n @action sendRouteViewRendered(): void {\n this.performanceMonitor.markRouteViewRendered(this.router.currentRouteName);\n }\n\n @action handleNoNativeBackOrCancelButton(\n { backButtons }: NoBackParameters[0],\n navigationApi: NoBackParameters[1]\n ): void {\n // Is there no route to go back to?\n if (!navigationApi || navigationApi.getVisitedRoutesStackLength() <= 1) {\n return;\n }\n\n const backText = this.intl.t('generic.back');\n\n backButtons.unshift({\n componentId: 'back',\n text: backText,\n description: backText,\n type: this.nativeBridge.getButtonTypeBack(),\n action: () => navigationApi.transitionToPreviousRoute()\n });\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{! template-lint-disable no-inline-styles }}\\n<div\\n id={{this.domId}}\\n class=\\\"popover-menu elevated ember-view\\n {{if @isLoading \\'is-loading\\'}}\\n {{if this.isRenderedWithPopper \\'popper-container\\'}}\\\"\\n style={{this.style}}\\n aria-live={{coalesce @ariaLive \\\"assertive\\\"}}\\n role={{coalesce @role \\\"alert\\\"}}\\n tabindex={{if this.isFocusable 0 -1}}\\n {{did-insert this.initPopup}}\\n {{did-update this.togglePopper this.isRenderedWithPopper}}\\n {{did-update this.togglePopper this.shouldRenderWithPopper}}\\n {{did-update this.extraPopperUpdate this.style}}\\n {{on \\\"keydown\\\" this.keyDownOnElement}}\\n {{on-click-outside this.clickOutsidePopup capture=true}}\\n ...attributes\\n>\\n <div class=\\\"arrow\\\"></div>\\n\\n <div class=\\\"content\\\">\\n {{#if @isLoading}}\\n <div class=\\\"spinner-wrapper\\\">\\n <SpinnerSvg @spinning={{true}} />\\n </div>\\n {{else}}\\n {{yield}}\\n {{/if}}\\n </div>\\n</div>\")","// Do not copy this deprecated usage. If you see this, please fix it\n// eslint-disable-next-line ember/no-classic-components\n\nimport { tracked } from '@glimmer/tracking';\nimport { ESCAPE_CODE, addWeakTrapFocusListener, removeTrapFocusListener } from '@adc/ember-utils/utils/a11y';\nimport { isDestroyed } from '@adc/ember-utils/utils/ember-helpers';\nimport { isRtl, DIR_CHANGED_EVENT_KEY } from '@adc/ember-utils/utils/html-dir-helpers';\nimport { A } from '@ember/array';\nimport Component from '@ember/component';\nimport { action, computed, set } from '@ember/object';\nimport { notEmpty } from '@ember/object/computed';\nimport { guidFor } from '@ember/object/internals';\nimport { once } from '@ember/runloop';\nimport { inject as service } from '@ember/service';\nimport { dasherize } from '@ember/string';\nimport { htmlSafe } from '@ember/template';\nimport Popper from 'popper.js';\nimport { isTestEnvironment } from '../../utils/general.ts';\n\n// region RTL Support\n\n/**\n * Constants for placement strings.\n *\n * @note\n * These are only the placement options that are used in this file and do not reflect all that are possible for a popover.\n */\nconst LEFT = 'left',\n RIGHT = 'right',\n DEFAULT_PLACEMENT = 'bottom';\n\n/**\n * Helper variable to track if the popover was already focused.\n *\n * @type {Boolean}\n */\nlet focusSet = false;\n\n// endregion\n\n// region Popper Helpers\n\n/**\n * Returns the HTML element the popper should be anchored to.\n *\n * @returns {Element}\n */\nexport function getAnchorElement() {\n let { anchorSelector } = this;\n\n if (isTestEnvironment.call(this)) {\n // For tests, we append the popover to the #ember-testing container\n // so that ember-native-dom-helpers can find and operate on it.\n anchorSelector = '#ember-testing';\n }\n\n return typeof anchorSelector === 'string' ? document.querySelector(anchorSelector) : anchorSelector;\n}\n\n/**\n * Returns the options to use when creating the popper.\n *\n * @param {HTMLElement} el The popover element.\n *\n * @returns {{}}\n */\nfunction getPopperOptions(el) {\n const { placement, boundariesElement = 'viewport' } = this;\n\n return {\n onCreate: () => {\n const onCreateAction = this['on-create'];\n\n if (onCreateAction) {\n onCreateAction(el);\n }\n },\n placement,\n modifiers: {\n flip: {\n boundariesElement\n },\n arrow: {\n element: '.arrow'\n },\n preventOverflow: {\n boundariesElement,\n escapeWithReference: false\n }\n }\n };\n}\n\n/**\n * Creates a new Popper.js instance with the content of this component, and then saves its reference on the context.\n *\n * @param {HTMLElement} el The popper element.\n */\nfunction createAndSetPopper(el) {\n const anchorElement = getAnchorElement.call(this);\n if (!anchorElement) {\n console.error('No anchorSelector defined for popover');\n return;\n }\n\n // Creates a popper instance with the content of this component.\n set(this, 'popper', new Popper(anchorElement, el, getPopperOptions.call(this, el)));\n\n this.dom.addListener(this, document, 'transitionend', updatePopper.bind(this));\n}\n\n/**\n * Destroys the existing Popper.js instance if a reference is found, and then removes the reference from context.\n *\n * @returns undefined\n */\nfunction cleanupAndRemovePopper() {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line @adc/ember/no-is-destroyed\n if (isDestroyed(this) || !this.popper) {\n return;\n }\n\n this.popper.destroy();\n set(this, 'popper', null);\n}\n\n/**\n * Schedules an aspect update on the existing Popper.js instance, if a reference is found.\n *\n * @returns undefined\n */\nfunction updatePopper() {\n if (this.popper) {\n this.popper.scheduleUpdate();\n }\n}\n\n/**\n * Handler function for the togglePopper observer. It identifies the moment and does the switch between rendering with Popper.js and direct render.\n *\n * @param {HTMLElement} el The popper element.\n */\nfunction handleTogglePopper(el) {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line @adc/ember/no-is-destroyed\n if (isDestroyed(this)) {\n return;\n }\n\n const { isRenderedWithPopper, shouldRenderWithPopper } = this;\n\n if (isRenderedWithPopper && !shouldRenderWithPopper) {\n cleanupAndRemovePopper.call(this);\n } else if (!isRenderedWithPopper && shouldRenderWithPopper) {\n createAndSetPopper.call(this, el);\n }\n}\n\n// endregion\n\n// region Component\n\n/**\n * @classdesc\n *\n * Wrapper for the actual popover\n *\n * @note This could eventually be made into its own addon as a base-popover and we could use it in tooltips as well.\n */\nexport default class PopoverWrapper extends Component {\n tagName = '';\n\n // region Service\n\n @service media;\n @service dom;\n\n // endregion\n\n // region Component state\n\n domId = '';\n\n /**\n * This property will enable arrows to work like TAB or SHIFT + TAB\n *\n * @type {boolean}\n */\n treatArrowsAsTabEvents = true;\n\n /**\n * An optional CSS selector for the element that should have focus after render.\n *\n * @type {string}\n */\n focusSelector = '';\n\n /**\n * The last focused element before the popover was opened.\n *\n * @type {Object}\n * @ignore\n */\n lastFocusedElement;\n\n /**\n * Width for the popover.\n *\n * @type {undefined|number}\n */\n width;\n\n /**\n * Maximum width for the popover.\n *\n * @type {undefined|number}\n */\n maxWidth;\n\n /**\n * Maximum height for the popover.\n *\n * @type {undefined|number}\n */\n maxHeight;\n\n /**\n * Minimum width for the popover.\n *\n * @type {undefined|number}\n */\n minWidth;\n\n /**\n * Minimum height for the popover.\n *\n * @type {undefined|number}\n */\n minHeight;\n\n /**\n * Placement of the popover.\n *\n * @type {String}\n */\n placement = DEFAULT_PLACEMENT;\n\n /**\n * When the popover for this is rendered, we trigger a focus event on the popover. Should we prevent the page from scrolling when this focus is triggered.\n *\n * @type {Boolean}\n */\n preventScroll = false;\n\n /**\n * Is the element focusable?\n *\n * @type {boolean}\n */\n @tracked isFocusable = false;\n\n /**\n * Optional passed function to indicate the popover is handling close detection and wants to close.\n *\n * @function\n */\n willClose() {}\n\n // endregion\n\n // region Hooks\n\n /** @override */\n constructor() {\n super(...arguments);\n\n this.lastFocusedElement = document.activeElement;\n\n const rtlPlacement = () => {\n const { placement = DEFAULT_PLACEMENT } = this;\n\n // Make necessary conversions for RTL.\n if (isRtl()) {\n [\n [LEFT, RIGHT],\n [RIGHT, LEFT]\n ].some(([check, replacement]) => {\n if (placement.includes(check)) {\n this.placement = placement.replace(check, replacement);\n return true;\n }\n\n return false;\n });\n }\n };\n\n this.dom.addListener(this, document, DIR_CHANGED_EVENT_KEY, rtlPlacement);\n\n rtlPlacement();\n\n this.domId = this.id || guidFor(this);\n }\n\n /** @override */\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-component-lifecycle-hooks\n didUpdate() {\n focusSet = false;\n\n super.didUpdate();\n }\n\n /**\n * Called to initialize the popover element.\n *\n * @param {HTMLElement} el\n */\n @action initPopup(el) {\n this.trapFocusListener = addWeakTrapFocusListener(this, {\n scopeSelector: '.popover-menu',\n escapeCallback: () => {},\n treatArrowsAsTabEvents: this.treatArrowsAsTabEvents,\n oldListenerId: this.trapFocusListener\n });\n\n if (this.shouldRenderWithPopper) {\n createAndSetPopper.call(this, el);\n }\n }\n\n /** @override */\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-component-lifecycle-hooks\n didRender() {\n if (this.isRenderedWithPopper) {\n updatePopper.call(this);\n }\n\n const focusOptions = { preventScroll: this.preventScroll };\n\n if (this.isFocusable && !focusSet) {\n document.querySelector(`#${this.domId}`).focus(focusOptions);\n }\n\n if (this.focusSelector && !focusSet) {\n const elementToFocus = document.querySelector(this.focusSelector);\n\n if (elementToFocus) {\n elementToFocus.focus(focusOptions);\n }\n }\n\n return super.didRender();\n }\n\n /**\n * Cleanup and remove Popper object.\n *\n * @override\n */\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-component-lifecycle-hooks\n willDestroyElement() {\n cleanupAndRemovePopper.call(this);\n\n focusSet = false;\n removeTrapFocusListener(this.trapFocusListener);\n\n super.willDestroyElement(...arguments);\n }\n\n // endregion\n\n // region Computed Properties\n\n /**\n * Calculates css (max/min) height and (max/min) width style. This property is ignored when not rendering with Popper.js.\n *\n * NOTE: Avoid watching 'isRenderedWithPopper'. Changing the styles while the popper container is rendered in the page causes horizontal positioning issues: Wrongly calculated horizontal center and content flickering at initial render due to quick horizontal position correction.\n */\n @computed('{width,maxWidth,maxHeight,minWidth,minHeight}', 'shouldRenderWithPopper')\n get style() {\n // Ignore custom width and height if not rendering within a popper.\n if (!this.shouldRenderWithPopper) {\n return null;\n }\n\n return htmlSafe(\n A(\n ['width', 'maxHeight', 'maxWidth', 'minWidth', 'minHeight'].map((key) => {\n // Dasherize property name.\n let property = dasherize(key);\n\n const value = parseInt(this[key], 10);\n return window.isNaN(value) ? undefined : `${property}:${value}px;`;\n })\n )\n .compact()\n .join('')\n );\n }\n\n /**\n * Whether or not the component should be render with Popper.js.\n *\n * @type {boolean} - true if the component should be rendered with Popper.js.\n */\n @computed('media.isMobile', 'directRenderOnMobile')\n get shouldRenderWithPopper() {\n return this.media.isMobile ? !this.directRenderOnMobile : true;\n }\n\n /**\n * Whether or not the component is currently rendered with Popper.js.\n *\n * @type {boolean} - true if the component is already rendered with Popper.js.\n */\n @notEmpty('popper')\n isRenderedWithPopper;\n\n // endregion\n\n // region Actions\n\n /**\n * Called to switch from Popper.js to direct render and vice-versa. It also executes the necessary transition logic.\n *\n * @param {HTMLElement} el The popper element.\n */\n @action togglePopper(el) {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n once(this, handleTogglePopper, el);\n }\n\n /**\n * Triggers an additional updatePopper request, besides didRender hook, when style attribute value changes.\n *\n * @note This is used as a bug fix for the wrong popper horizontal positioning bug, which happens when styles change dynamically the time the popper component is already in the page.\n */\n @action extraPopperUpdate() {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n once(this, updatePopper);\n }\n\n /**\n * Listener for keyDown events.\n *\n * @param {KeyboardEvent} event\n */\n @action keyDownOnElement(event) {\n // Prevents exiting weak trap focus of popover using tab/enter when there are no inner focusable components\n if (event.target?.id === this.domId && event.code !== ESCAPE_CODE) {\n event.preventDefault();\n return;\n }\n\n focusSet = true;\n\n // Does user want to close this popup?\n if (event.code === ESCAPE_CODE) {\n const { lastFocusedElement } = this;\n if (lastFocusedElement) {\n lastFocusedElement.focus();\n }\n\n this['on-close']();\n }\n }\n\n /**\n * Called when the user clicks outside the popup. The willClose method will be called if it was provided.\n */\n @action clickOutsidePopup(event) {\n const path = event.path || (event.composedPath && event.composedPath());\n\n // When a user clicks the anchorSelector (the trigger), the popover toggles its visibility. Therefore we want to ignore clicking outside of the popup\n // here when the user clicks on the anchorSelector/trigger, otherwise it would cause a double toggle (and the popover would remain open).\n if (path.filter((path) => `#${path.id}` === this.anchorSelector).length) {\n return;\n }\n\n this.willClose();\n }\n\n // endregion\n}\n\n// endregion\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<header ...attributes>\\n {{#if @title}}\\n <h4>{{@title}}</h4>\\n {{/if}}\\n\\n {{yield}}\\n</header>\")","import templateOnlyComponent from '@ember/component/template-only';\n\nexport interface PopoverHeaderSignature {\n Element: HTMLElement;\n Args: {\n /** The text to render in the popover header. */\n title?: string;\n };\n Blocks: {\n default: [];\n };\n}\n\nconst PopoverHeader = templateOnlyComponent<PopoverHeaderSignature>();\nexport default PopoverHeader;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div class=\\\"body\\\" ...attributes>\\n {{yield}}\\n</div>\")","import templateOnlyComponent from '@ember/component/template-only';\n\nexport interface PopoverBodySignature {\n Element: HTMLDivElement;\n Blocks: {\n default: [];\n };\n}\n\nconst PopoverBody = templateOnlyComponent<PopoverBodySignature>();\nexport default PopoverBody;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<footer ...attributes>\\n {{yield}}\\n</footer>\")","import templateOnlyComponent from '@ember/component/template-only';\n\nexport interface PopoverFooterSignature {\n Element: HTMLElement;\n Blocks: {\n default: [];\n };\n}\n\nconst PopoverFooter = templateOnlyComponent<PopoverFooterSignature>();\nexport default PopoverFooter;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<span class=\\\"popover-menu-root\\\" {{did-update this.openStateChanged this.isOpen}}></span>\\n{{#if this.showPopover}}\\n <div class=\\\"popover-wormhole-wrapper\\\" ...attributes>\\n {{#in-element this.popoverDestinationElement insertBefore=null}}\\n <Popover::PopoverWrapper\\n @placement={{coalesce @placement \\\"bottom\\\"}}\\n @anchorSelector={{this.anchorSelector}}\\n @width={{this.width}}\\n @maxWidth={{@maxWidth}}\\n @maxHeight={{@maxHeight}}\\n @isFocusable={{@isFocusable}}\\n @minWidth={{@minWidth}}\\n @minHeight={{@minHeight}}\\n @isLoading={{@isLoading}}\\n @focusSelector={{@focusSelector}}\\n @boundariesElement={{this.boundariesElement}}\\n @treatArrowsAsTabEvents={{this.treatArrowsAsTabEvents}}\\n @directRenderOnMobile={{this.directRenderOnMobile}}\\n @id={{@contentId}}\\n @on-create={{@on-create-popover}}\\n @preventScroll={{@preventScroll}}\\n @willClose={{this.willClose}}\\n @on-close={{this.closePopover}}\\n @ariaLive={{@ariaLive}}\\n class={{this.classForPopover}}\\n data-test-component=\\\"menu\\\"\\n >\\n {{yield\\n (hash\\n header=(component \\\"popover/popover-header\\\")\\n body=(component \\\"popover/popover-body\\\")\\n footer=(component \\\"popover/popover-footer\\\")\\n )\\n }}\\n </Popover::PopoverWrapper>\\n {{/in-element}}\\n\\n {{#if this.hasBackdrop}}\\n {{#in-element this.backdropDestinationElement insertBefore=null}}\\n <div\\n class={{this.popoverBackdropClass}}\\n {{on \\\"click\\\" this.popoverBackdropClicked}}\\n role=\\\"button\\\"\\n aria-label={{@backdropLabel}}\\n ></div>\\n {{/in-element}}\\n {{/if}}\\n </div>\\n{{/if}}\")","// Do not copy this deprecated usage. If you see this, please fix it\n// eslint-disable-next-line ember/no-classic-components\nimport Component from '@ember/component';\nimport { action, computed, get, set } from '@ember/object';\nimport { reads, or, and } from '@ember/object/computed';\nimport { schedule, scheduleOnce } from '@ember/runloop';\nimport { inject as service } from '@ember/service';\nimport { isTestEnvironment } from '../utils/general.ts';\nimport { getAnchorElement } from './popover/popover-wrapper.js';\n\n/**\n * A CSS class name applied to the popover if it is being displayed in a modal.\n *\n * @type {String}\n */\nconst IN_MODAL_CLASS = 'in-modal';\n\n/**\n * A CSS class name applied to the popover if it is being displayed on a mobile screen.\n *\n * @type {String}\n */\nconst ON_MOBILE_CLASS = 'on-mobile';\n\n/**\n * A CSS class name applied to the popover to be displayed stretched on the entire screen when on mobile.\n *\n * @type {String}\n */\nconst FULL_SCREEN_ON_MOBILE_CLASS = 'full-screen';\n\n/**\n * A CSS class name applied to the popover to be used as a namespace for the mobile screen specific classes, to tell the difference when the popover content was\n * rendered directly or with Popper.js.\n *\n * @type {String}\n */\nconst DIRECT_RENDER_ON_MOBILE_CLASS = 'direct-render';\n\n// region Helper Methods\n\n/**\n * Handle opening and closing of the popover\n */\nfunction handleOpenClose() {\n const { isOpen } = this;\n if (isOpen) {\n if (!getAnchorElement.call(this)) {\n console.error('No element found for popover anchor selector', this.anchorSelector);\n return;\n }\n }\n\n set(this, 'showPopover', isOpen);\n\n // Trigger the action if there is a handler defined.\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-get\n get(this, isOpen ? 'on-open' : 'on-close')?.();\n}\n\n/**\n * Takes a list of [ testCase, className ] pairs and returns a string of all classNames where the testCase passed.\n * TODO: In the future, import this function from @adc/ember-utils instead, if it's available.\n *\n * @param {Array<{testCase: boolean, className: String}>} classList - An array of testCase/className pairs.\n *\n * @returns {String}\n */\nfunction buildClassListString(classList) {\n const classes = classList.reduce((appliedClasses, [shouldAddClass, className]) => {\n if (shouldAddClass) {\n appliedClasses.push(className);\n }\n\n return appliedClasses;\n }, []);\n\n return classes.join(' ');\n}\n\n// endregion\n\n/**\n * @classdesc\n *\n * A popover component for displaying other components.\n *\n * The popover positioning is done by [Popper.js]{@link https://popper.js.org}.\n */\nexport default class PopoverMenu extends Component {\n // region Services\n\n @service media;\n\n // endregion\n\n // region Property Overrides\n\n /** @override */\n tagName = '';\n\n /**\n * This property will enable arrows to work like TAB or SHIFT + TAB\n *\n * @type {boolean}\n */\n treatArrowsAsTabEvents = false;\n\n // endregion\n\n // region Hooks\n\n /** @override */\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/classic-decorator-hooks\n init(...args) {\n super.init(...args);\n\n if (!this.anchorSelector) {\n console.error('anchorSelector for popover must be defined');\n return;\n }\n\n // Should the popup be open already?\n if (this.isOpen) {\n // Display popover during the next run cycle.\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n schedule('afterRender', this, handleOpenClose);\n }\n }\n\n // endregion\n\n // region Properties\n\n /**\n * A HtmlElement or document.querySelectorAll selector for finding the element that anchors this popover.\n *\n * @type {String|HTMLElement}\n */\n anchorSelector = '';\n\n /**\n * CSS class added to the popover element.\n *\n * @type {String}\n */\n popoverClass = '';\n\n /**\n * When the popover for this is rendered, we trigger a focus event on the popover. Should we prevent the page from scrolling when this focus is triggered.\n *\n * @type {Boolean}\n */\n preventScroll = false;\n\n /**\n * The element which will define the boundaries of the popover position,\n * the popover will never be placed outside of the defined boundaries\n *\n * @type {String|HTMLElement}\n */\n boundariesElement = 'viewport';\n\n /**\n * Displays a loading indicator instead of the yield when true.\n *\n * @type {boolean}\n */\n isLoading = false;\n\n /**\n * Indicates the popover is open.\n *\n * @type {boolean}\n */\n isOpen = false;\n\n /**\n * Does the popover have a backdrop on large screens?\n *\n * @type {boolean}\n */\n renderBackdropOnLargeScreen = true;\n\n /**\n * Should the popover close when the backdrop is clicked?\n *\n * @type {boolean}\n */\n closeOnBackdropClick = true;\n\n /**\n * Indicates the popup should not use a backdrop, so users can interact with the background AND close the popover in one action.\n *\n * @type {boolean}\n */\n useImprovedCloseOnClick = false;\n\n /**\n * Whether or not to consider to directly render on mobile screens. Without Popper.js.\n *\n * NOTE: This property should be overridden by components which need their content to stay rendered inside Popper. Like the tool-tip component.\n */\n directRenderOnMobile = true;\n\n /**\n * Should the popover render full screen on mobile devices?\n *\n * @type {boolean}\n */\n fullScreenOnMobile = false;\n\n // endregion\n\n // region Computed Properties\n\n /**\n * Indicates the popover will be hosted within a modal.\n */\n @computed()\n get inModal() {\n const modal = document.body.querySelector('.modal');\n return !!modal?.contains(getAnchorElement.call(this));\n }\n\n /**\n * Returns the element that the backdrop should be appended to.\n *\n * @type {Node}\n */\n @computed()\n get backdropDestinationElement() {\n const { body } = window.document;\n\n if (isTestEnvironment.call(this)) {\n // For tests, we append the popover to the #ember-testing container\n // so that @ember/test-helpers can find and operate on it.\n return body.querySelector('#ember-testing');\n }\n\n return body;\n }\n\n /**\n * Find a DOM node to which the popover should be appended.\n *\n * This should be an offset parent of the last parent that is capable of being scrolled.\n *\n * @type {Element}\n */\n get popoverDestinationElement() {\n let bodyEl = window.document.body,\n goodParent = bodyEl;\n\n if (isTestEnvironment.call(this)) {\n // For tests, we append the popover to the #ember-testing container\n // so that @ember/test-helpers can find and operate on it.\n return bodyEl.querySelector('#ember-testing');\n }\n\n let { parentNode } = getAnchorElement.call(this),\n overflowStyles = ['overflow-x', 'overflow-y', 'overflow'],\n forbiddenStyleValue = ['auto', 'scroll', 'hidden'];\n\n while (parentNode !== bodyEl) {\n let style = getComputedStyle(parentNode);\n\n if (overflowStyles.some((key) => forbiddenStyleValue.some((value) => style[key] === value))) {\n // Move to the next available attachment element\n goodParent = parentNode = parentNode.offsetParent || bodyEl;\n } else {\n // Move to the next parent\n parentNode = parentNode.parentNode;\n }\n }\n\n // If the final element to append is position fixed then just use body as the append to element\n if (getComputedStyle(goodParent).position === 'fixed') {\n goodParent = bodyEl;\n }\n\n return goodParent;\n }\n\n /**\n * Observes opening and closing of the popover and triggers relevant actions if they were defined.\n */\n @action openStateChanged() {\n // Run this just once after render, otherwise it causes issues with dropdown-menu\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n scheduleOnce('afterRender', this, handleOpenClose);\n }\n\n /**\n * Class to be applied to the backdrop.\n *\n * @type {String}\n */\n @computed('inModal', 'isMobile')\n get popoverBackdropClass() {\n const classList = [\n [true, 'popover-backdrop'],\n [this.inModal, IN_MODAL_CLASS],\n [this.isMobile, ON_MOBILE_CLASS]\n ];\n\n return buildClassListString(classList);\n }\n\n /**\n * Class to be applied on popover.\n *\n * @type {String}\n */\n @computed('isMobile', 'fullScreenOnMobile', 'directRenderOnMobile', 'inModal', 'popoverClass')\n get classForPopover() {\n const classList = [\n [this.isMobile, ON_MOBILE_CLASS],\n [this.isMobile && this.fullScreenOnMobile, FULL_SCREEN_ON_MOBILE_CLASS],\n [this.directRenderOnMobile, DIRECT_RENDER_ON_MOBILE_CLASS],\n [this.inModal, IN_MODAL_CLASS],\n [this.popoverClass, this.popoverClass]\n ];\n\n return buildClassListString(classList);\n }\n\n /**\n * Defines an reads for media.isMobile so isMobile can be reached directly.\n *\n * @type {boolean}\n */\n @reads('media.isMobile')\n isMobile;\n\n /**\n * Indicates we will be rendering a backdrop.\n *\n * @type {boolean}\n */\n @or('renderBackdropOnLargeScreen', 'isMobile')\n usesBackdrop;\n\n /**\n * Does the popover have a backdrop?\n *\n * @type {boolean}\n */\n @computed('useImprovedCloseOnClick', 'usesBackdrop')\n get hasBackdrop() {\n return !this.useImprovedCloseOnClick && this.usesBackdrop;\n }\n\n /**\n * Indicates the popover should handle close as opposed to a local backdrop element.\n *\n * @type {boolean}\n */\n @and('useImprovedCloseOnClick', 'usesBackdrop')\n enhancedCloseOnClick;\n\n // endregion\n\n // region Actions\n\n /** @ignore */\n @action willClose() {\n if (this.enhancedCloseOnClick) {\n this.popoverBackdropClicked();\n }\n }\n\n /**\n * Toggles the popover\n */\n @action togglePopover() {\n set(this, 'isOpen', !this.isOpen);\n }\n\n /**\n * Closes the popover\n */\n @action closePopover() {\n set(this, 'isOpen', false);\n }\n\n /**\n * When the backdrop of the popover is clicked send the backdrop-clicked\n * action if it exists and then send the closePopover action\n */\n @action popoverBackdropClicked() {\n // If there is a handler, send the action.\n this['on-backdrop-click']?.();\n\n if (this.closeOnBackdropClick) {\n this.closePopover();\n }\n }\n\n // endregion\n}\n","// Do not copy this deprecated usage. If you see this, please fix it\n// eslint-disable-next-line ember/no-classic-components\n\nimport { logMissingAbstractMember } from '@adc/ember-utils/utils/debug';\nimport { isDestroyed } from '@adc/ember-utils/utils/ember-helpers';\nimport Component from '@ember/component';\nimport { computed, action } from '@ember/object';\nimport { alias } from '@ember/object/computed';\nimport { guidFor } from '@ember/object/internals';\nimport { once } from '@ember/runloop';\nimport { inject as service } from '@ember/service';\n\n/**\n * Recalculates buttons for the native toolbar.\n */\nfunction recalculateNativeToolbar() {\n let backButtons = [],\n contextButtons = [],\n wasBackOrCancel = false;\n\n const { buttonsList } = this;\n\n buttonsList.forEach((button) => {\n const { type } = button;\n\n switch (type) {\n case this.nativeBridge.getButtonTypeBack():\n case this.nativeBridge.getButtonTypeCancel():\n // Check if back or cancel already existed.\n if (wasBackOrCancel) {\n // Probably still let the new button be inserted but log an error.\n console.error(\n `Native toolbar back or cancel button already existed for modal, title=${\n this.title\n }, toolbar=${JSON.stringify(buttonsList)}`\n );\n }\n\n backButtons.insertAt(0, button);\n\n wasBackOrCancel = true;\n break;\n case this.nativeBridge.getButtonTypeConfirm():\n contextButtons.insertAt(0, button);\n break;\n default:\n contextButtons.pushObject(button);\n break;\n }\n });\n\n // If there is no close button defined, then add one because a modal needs to have a close button.\n if (!wasBackOrCancel) {\n this.handleNoNativeBackOrCancelButton({\n contextButtons,\n backButtons\n });\n }\n\n this.nativeBridge.setToolbarButtons({\n id: this.nativeToolbarId,\n backButtons,\n contextButtons\n });\n}\n\n/**\n * @classdesc\n * Base class for components that handle a layer in a view. For example a layer on a route, or a modal.\n * Handles some base functionality for communicating with a Native App.\n */\n// Do not copy this deprecated usage. If you see this, please fix it\n// eslint-disable-next-line ember/require-tagless-components\nexport default class BaseContentLayerComponent extends Component {\n @service nativeBridge;\n\n /**\n * List of buttons for a native toolbar.\n *\n * @type {Array<NativeButtonType>}\n */\n buttonsList = [];\n\n /**\n * Can the component utilize App native buttons?\n *\n * @type {boolean}\n */\n @alias('nativeBridge.doesSupportToolbarButtons')\n canHaveNativeButtons;\n\n /**\n * Id that will uniquely represent this component in the native toolbars stack.\n *\n * @type {String}\n */\n @computed('elementId')\n get nativeToolbarId() {\n return this.elementId || guidFor(this);\n }\n\n /**\n * Triggers the update of native toolbar.\n */\n triggerNativeToolbarUpdate() {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line @adc/ember/no-send\n this.send('updateNativeToolbarButtons');\n }\n\n /**\n * Called when there is no back or cancel button already present in the buttonsList collection when toolbar buttons are constructed.\n *\n * @param {{contextButtons: Array<NativeButtonType>, backButtons: Array<NativeButtonType> }} data Buttons to be used as context buttons (on the right side).\n */\n handleNoNativeBackOrCancelButton(data) {\n logMissingAbstractMember(this, '\"handleNoNativeBackOrCancelButton\" method', data);\n }\n\n willDestroy(...args) {\n this.nativeBridge.removeToolbarButtons(this.nativeToolbarId);\n\n super.willDestroy(...args);\n }\n\n /**\n * Updates native toolbar buttons with buttons that were passed in.\n *\n * @param {Array<NativeButtonType>} buttons Buttons list to add to the toolbar.\n */\n @action updateNativeToolbarButtons(buttons = []) {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line @adc/ember/no-is-destroyed\n if (isDestroyed(this) || !this.canHaveNativeButtons) {\n return;\n }\n\n const { buttonsList } = this;\n\n // Remove any instance of buttons with the same componentId.\n this.actions.disposeNativeButtons.call(\n this,\n buttons.map(({ componentId }) => componentId),\n true\n );\n\n buttonsList.pushObjects(buttons);\n\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n once(this, recalculateNativeToolbar);\n }\n\n /**\n * Disposes buttons from toolbar with the defined componentIds.\n *\n * @param {Array<number>} componentIds List of component ids referring to buttons that should be removed.\n * @param {boolean} doNotRecalculateToolbar Should the toolbar not be recalculate right now?\n */\n @action disposeNativeButtons(componentIds, doNotRecalculateToolbar) {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line @adc/ember/no-is-destroyed\n if (isDestroyed(this) || !this.canHaveNativeButtons) {\n return;\n }\n\n const { buttonsList } = this;\n\n componentIds.forEach((id) => buttonsList.removeObjects(buttonsList.filterBy('componentId', id)));\n\n if (!doNotRecalculateToolbar) {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n once(this, recalculateNativeToolbar);\n }\n }\n}\n","import templateOnly from '@ember/component/template-only';\nexport default templateOnly();\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{yield\\n (hash\\n toolbar=(component (ensure-safe-component this.toolbar))\\n container=(component \\\"route-view/view-container\\\" model=@model markEndOfRendering=this.markEndOfRendering)\\n model=@model\\n updateNativeToolbarButtons=this.updateNativeToolbarButtons\\n disposeNativeButtons=this.disposeNativeButtons\\n )\\n}}\")","import { tracked } from '@glimmer/tracking';\nimport { computed, get, action } from '@ember/object';\nimport { getOwner } from '@ember/owner';\nimport { inject as service } from '@ember/service';\nimport BaseContentLayerComponent from '../components/content-layer/base-content-layer-component.js';\nimport { markLastContainerRendered } from './page-view.ts';\nimport SearchToolbar from './search-toolbar.js';\n\n/**\n * The #app-content element.\n *\n * @type {HTMLElement|undefined}\n */\nlet appContentEl = undefined;\n\n/**\n * Get the #app-content element.\n *\n * @note We should figure out how to do this better.\n *\n * @returns {HTMLElement|undefined}\n */\nfunction getAppContentEl() {\n if (!appContentEl) {\n appContentEl = document.getElementById('app-content');\n }\n\n return appContentEl;\n}\n\n/**\n * Class names.\n */\nconst ROUTE_VIEW_CLASS = 'route-view',\n USE_FLEXBOX_CLASS = 'use-flexbox';\n\n/**\n * Mapping of property to class name for adding to app-content.\n *\n * @type {{useFlexbox: string, useRouteViewClass: string}}\n */\nconst PROPERTY_CLASS_MAP = {\n useFlexbox: USE_FLEXBOX_CLASS,\n useRouteViewClass: ROUTE_VIEW_CLASS\n};\n\n/**\n * List of allowed container width classes.\n */\nconst MAX_WIDTH_CLASSES = ['sm', 'md', 'lg'];\n\n/**\n * @classdesc\n * Root component for all route views. Handles a bunch of stuff.\n */\nexport default class RouteView extends BaseContentLayerComponent {\n @service nativeBridge;\n @service performanceMonitor;\n @service router;\n @service intl;\n\n tagName = '';\n\n @tracked toolbarComponent;\n\n get navigationApi() {\n return getOwner(this).lookup('route-view:main');\n }\n\n /**\n * Toolbar component to render.\n *\n * @type {Component}\n */\n get toolbar() {\n return this.toolbarComponent ?? SearchToolbar;\n }\n\n /**\n * Should the route-view set the parent #app-content element to use flex box?\n *\n * @note This is used only in one place, we should probably get rid of it in favor of using the new route-view components.\n *\n * @type {boolean}\n */\n useFlexbox = false;\n\n /**\n * Should the app-content use a route-view class that standardizes all paddings + margins?\n *\n * @type {Boolean}\n */\n useRouteViewClass = false;\n\n /**\n * Max width for the view-container.\n *\n * @type {String | undefined}\n */\n containerMaxWidth;\n\n /**\n * Keeps track of the number of containers that have been rendered.\n */\n containersRendered = 0;\n\n /** Determines whether the rendering process for this route view\n * has completed and marks it using the performance monitor service.\n * This action is passed into each container and fires when that container\n * is finished rendering. Once every container has rendered, then we\n * call the performance monitor to mark the last render point.\n */\n @action\n markEndOfRendering() {\n // If numOfContainersToRender wasn't passed in, then we assume there\n // is only one contianer to render.\n const numOfContainersToRender = this.numOfContainersToRender ?? 1;\n\n // Attempt to mark the last container as rendered and return the new count.\n this.containersRendered = markLastContainerRendered(\n this.containersRendered,\n numOfContainersToRender,\n this.performanceMonitor\n );\n }\n\n /*\n * Determines whether the route view utilizes the KPI threshold metric tracking feature.\n */\n @action\n setKpiMetricUsage() {\n this.performanceMonitor.setUseKpiThresholdMetrics(this.useKpiThresholdMetrics ?? false);\n }\n\n /**\n * Generates class size for the max width of the container.\n *\n * @returns {String | undefined}\n */\n @computed('containerMaxWidth')\n get containerMaxWidthClass() {\n const maxWidth = this.containerMaxWidth;\n\n return MAX_WIDTH_CLASSES.includes(maxWidth) ? maxWidth : undefined;\n }\n\n /**\n * @note Init of a new route runs AFTER willClearRender of the previous one. However Init of a new route runs BEFORE didDestroyElement of previous route.\n *\n * @override\n */\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/classic-decorator-hooks\n init(...args) {\n super.init(...args);\n\n // We want to use kpi threshold metrics for route views.\n this.setKpiMetricUsage();\n\n const el = getAppContentEl.call(this);\n\n if (el) {\n const classesToAdd = Object.keys(PROPERTY_CLASS_MAP)\n .map((key) => (get(this, key) ? PROPERTY_CLASS_MAP[key] : undefined))\n .compact();\n\n el.classList.add(...classesToAdd);\n }\n\n const maxWidth = this.containerMaxWidth;\n\n if (maxWidth && !MAX_WIDTH_CLASSES.includes(maxWidth)) {\n console.error(`Incorrect maxWidth defined=${maxWidth}, only ${MAX_WIDTH_CLASSES.join(', ')} are allowed`);\n }\n\n this.triggerNativeToolbarUpdate();\n }\n\n /** @override */\n didInsertElement(...args) {\n super.didInsertElement(...args);\n\n this.performanceMonitor.markRouteViewRendered(this.router.currentRouteName);\n }\n\n /** @override */\n handleNoNativeBackOrCancelButton({ backButtons }) {\n const { navigationApi } = this;\n\n // If there is no back button already defined, check if there is a \"go back\" route and if so then add that as a back button.\n if (navigationApi.get('getVisitedRoutesStackLength')() <= 1) {\n return;\n }\n\n const backText = this.intl.t('generic.back');\n\n backButtons.insertAt(0, {\n text: backText,\n description: backText,\n type: this.nativeBridge.getButtonTypeBack(),\n action: () => navigationApi.get('transitionToPreviousRoute')()\n });\n }\n\n /**\n * @override\n */\n willClearRender(...args) {\n const el = getAppContentEl.call(this);\n\n if (el) {\n el.classList.remove(...Object.keys(PROPERTY_CLASS_MAP).map((key) => PROPERTY_CLASS_MAP[key]));\n }\n\n super.willClearRender(...args);\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{#if (and @hasData @hasCalledDataLoadedAction)}}\\n {{yield @data}}\\n <LastRenderMark @markEndOfRendering={{@markEndOfRendering}} />\\n{{/if}}\")","import Component from '@glimmer/component';\n\nexport interface FulfilledContentSignature<M> {\n Args: {\n /** Indicates that data is present. */\n hasData?: boolean;\n /** Indicates the route-view data loaded action was triggered. */\n hasCalledDataLoadedAction?: boolean;\n /** The resolved data to yield. */\n data?: M;\n /** Triggered when this component is done rendering. */\n markEndOfRendering: () => void;\n };\n Blocks: {\n /** Yields the resolved data. */\n default: [FulfilledContentSignature<M>['Args']['data']];\n };\n}\n\n// eslint-disable-next-line ember/no-empty-glimmer-component-classes\nexport default class RouteViewContentFulfilledContent<T> extends Component<FulfilledContentSignature<T>> {}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div ...attributes>\\n {{#each this.hourLabels as |hourLabel|}}\\n <div style={{hourLabel.style}}>\\n {{hourLabel.label}}\\n </div>\\n {{/each}}\\n</div>\")","import Component from '@glimmer/component';\nimport { MINUTES_IN_DAY } from '@adc/ember-utils/constants/time';\nimport { computed } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport { htmlSafe } from '@ember/template';\nimport addMinutes from 'date-fns/addMinutes';\nimport startOfYear from 'date-fns/startOfYear';\n\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type { SafeString } from 'handlebars';\n\nconst TWELVE_AM = 0;\nexport const NINE_AM = 9;\nexport const TWELVE_PM = 12;\nexport const FIVE_PM = 17;\nconst TEN_PM = 22;\n\nexport interface ScheduleHourLabelsSignature {\n Element: HTMLDivElement;\n Args: {\n /** Indicates the hours axis should be rendered on the vertical axis. */\n isVertical?: boolean;\n /** Indicates which hours should show labels. */\n hours?: number[];\n };\n}\n\n/**\n * Displays hour labels for a schedule.\n */\nexport default class ScheduleHourLabels extends Component<ScheduleHourLabelsSignature> {\n @service declare intl: ADCIntlService;\n\n /**\n * Labels for specific times on the schedule\n */\n @computed('args.{hours.[],isVertical}')\n get hourLabels(): { label: string; style: SafeString }[] {\n const start = startOfYear(new Date());\n\n // Create absolutely positioned labels for supplied hours.\n return (this.args.hours ?? [TWELVE_AM, NINE_AM, TWELVE_PM, FIVE_PM, TEN_PM])\n .map((hours) => hours * 60)\n .map((minutes) => ({\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line @adc/ember/require-tz-functions\n label: this.intl.formatTime(addMinutes(start, minutes), {\n hour: 'numeric'\n }),\n style: htmlSafe(`${this.args.isVertical ? 'top' : 'left'}:${(minutes * 100) / MINUTES_IN_DAY}%`)\n }));\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<AsyncLoader @promise={{@items}} as |items|>\\n <ul\\n class=\\\"simple-binary-list o-{{coalesce @orientation \\'vertical\\'}}\\\"\\n id={{guid-for this}}\\n role={{if (eq @type \\\"radio\\\") \\\"radiogroup\\\"}}\\n ...attributes\\n >\\n {{#each items as |item idx|}}\\n <li data-test-binary-item={{idx}}>\\n {{#if (has-block \\\"label\\\")}}\\n <SimpleBinary\\n @type={{@type}}\\n @checked={{item.state}}\\n @label={{item.label}}\\n @icon={{item.icon}}\\n @iconFill={{item.color}}\\n @css={{item.css}}\\n @wrap={{@wrap}}\\n @reverse={{@reverse}}\\n disabled={{coalesce @disabled item.disabled}}\\n {{on \\\"change\\\" (fn this.listItemChanged item)}}\\n tabindex={{if @itemsAreNotFocusable -1 0}}\\n >\\n {{yield item to=\\\"label\\\"}}\\n </SimpleBinary>\\n {{else}}\\n <SimpleBinary\\n @type={{@type}}\\n @checked={{item.state}}\\n @label={{item.label}}\\n @icon={{item.icon}}\\n @iconFill={{item.color}}\\n @css={{item.css}}\\n @wrap={{@wrap}}\\n @reverse={{@reverse}}\\n disabled={{coalesce @disabled item.disabled}}\\n tabindex={{if @itemsAreNotFocusable -1 0}}\\n {{on \\\"change\\\" (fn this.listItemChanged item)}}\\n />\\n {{/if}}\\n\\n {{#if (has-block \\\"content\\\")}}\\n {{#if (or (not @hideUnselectedContent) item.state)}}\\n <div class=\\\"binary-list-item-content\\\">\\n {{yield item to=\\\"content\\\"}}\\n </div>\\n {{/if}}\\n {{/if}}\\n </li>\\n {{/each}}\\n </ul>\\n <ErrorTooltip\\n @text={{@errorMessage}}\\n @placement={{coalesce @errorTooltipPlace \\\"top-start\\\"}}\\n @duration={{@errorDuration}}\\n @selector=\\\"#{{guid-for this}}\\\"\\n @selectorDirection=\\\"sibling\\\"\\n />\\n</AsyncLoader>\")","import Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { A } from '@ember/array';\nimport { action } from '@ember/object';\n\nimport type { SafeString } from 'handlebars';\nimport type { CommonInputErrorTooltipArgs } from '../error-tooltip';\n\ntype ITEM_STATE = boolean | 'mixed';\nexport type BinaryListOrientation = 'vertical' | 'horizontal';\n\nexport class BinaryListItem<T = object> {\n @tracked label: string | SafeString = '';\n @tracked state: ITEM_STATE = false;\n @tracked icon?: string;\n @tracked css?: string;\n @tracked disabled?: boolean;\n @tracked color?: string;\n props: T;\n\n constructor(args: Partial<BinaryListItem<T>>) {\n Object.assign(this, args ?? {});\n this.props = (args.props ?? {}) as T;\n }\n}\n\nexport interface SimpleBinaryListSignature<T extends BinaryListItem> {\n Element: HTMLUListElement;\n Args: CommonInputErrorTooltipArgs & {\n /** The `BinaryListItem` collection to render. */\n items: T[] | Promise<T[]>;\n /** The binary input type. */\n type?: 'checkbox' | 'radio';\n /** The orientation of the list (defaults to vertical). */\n orientation?: 'vertical' | 'horizontal';\n /** Triggered when the user changes the state of the binary list items. */\n onchange?: (items: T[]) => void;\n /** Triggered when the user changes the state of a binary list item. */\n onItemChange?: (item: BinaryListItem) => void;\n /** Indicates all binary inputs in list should be disabled. */\n disabled?: boolean;\n /** Indicates label text for each binary input should wrap to a new line. */\n wrap?: boolean;\n /** Indicates all binary inputs in list should be reversed. */\n reverse?: boolean;\n /** Indicates the `content` block should be hidden if the parent binary control state is not `checked`. */\n hideUnselectedContent?: boolean;\n /** Passed in if it should not be possible to tab and focus on the list items */\n itemsAreNotFocusable?: boolean;\n };\n Blocks: {\n /** Renders within the label element for the input element. */\n label: [T];\n /** Renders in it's own `<div />` element below the label/input elements. */\n content: [T];\n };\n}\n\nexport default class SimpleBinaryList<T extends BinaryListItem> extends Component<SimpleBinaryListSignature<T>> {\n @action async listItemChanged(item: BinaryListItem, evt: InputEvent): Promise<void> {\n const items = await this.args.items,\n { type } = this.args;\n\n // Is this a radio list?\n if (type === 'radio') {\n // Clear all other selections.\n A(items).setEach('state', false);\n }\n\n item.state = (evt.target as HTMLInputElement).checked;\n\n const { onchange, onItemChange } = this.args;\n if (onchange) {\n onchange(A(items));\n }\n if (onItemChange) {\n onItemChange(item);\n }\n }\n}\n","import { tracked } from '@glimmer/tracking';\n\nimport type { SafeString } from '@ember/template/-private/handlebars';\n\n/**\n * A helper class to render list item elements of a simple-list components.\n */\nexport default class SimpleListItem<T = object> {\n @tracked css?: string;\n @tracked icon?: string;\n @tracked iconCss?: string;\n @tracked description?: string | SafeString;\n @tracked details?: string | SafeString;\n @tracked value?: string | SafeString;\n @tracked showChevron?: boolean;\n @tracked props: T;\n\n constructor(args: Partial<SimpleListItem<T>>) {\n Object.assign(this, args);\n this.props = (args.props ?? {}) as T;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<li\\n class=\\\"system-select-list-item {{if @item.subItems \\'group\\'}}\\\"\\n role=\\\"row\\\"\\n aria-selected={{if @item.selected \\\"true\\\"}}\\n ...attributes\\n>\\n <div class=\\\"list-item-flex-wrap\\\">\\n <a\\n href=\\\"javascript:void(0)\\\"\\n data-index=\\\"{{if @parentIndex (concat @parentIndex \\'-\\')}}{{@index}}\\\"\\n tabindex={{if @item.disabled -1 0}}\\n class={{if @item.action \\\"action\\\"}}\\n aria-disabled={{if @item.disabled \\\"true\\\"}}\\n {{on \\\"click\\\" this.itemClicked}}\\n >\\n {{#if @item.icon}}\\n <SvgSymbol @icon={{@item.icon}} />\\n {{/if}}\\n <span class=\\\"name\\\" title={{@item.tooltipText}}>\\n {{@item.name}}\\n </span>\\n {{#if @item.description}}\\n <span class=\\\"description\\\">\\n {{~@item.description}}\\n </span>\\n {{/if}}\\n </a>\\n {{#if @item.subItems}}\\n <Button::Icon\\n @icon={{if @item.showSubItems \\\"chevron-up\\\" \\\"chevron-down\\\"}}\\n @iconOnly={{true}}\\n @text={{t (if @item.showSubItems \\\"@adc/ui-components.collapse\\\" \\\"@adc/ui-components.expand\\\")}}\\n @buttonColor=\\\"stealth\\\"\\n class=\\\"end-icon\\\"\\n {{on \\\"click\\\" this.toggleSubItems}}\\n />\\n {{/if}}\\n </div>\\n {{#if @item.subItems}}\\n {{! Recursive items list generation }}\\n <SystemSelect::ItemsList\\n @items={{@item.subItems}}\\n @index={{@index}}\\n @parentIndex={{@index}}\\n @itemClicked={{@itemClicked}}\\n class=\\\"sub-list\\\"\\n />\\n {{/if}}\\n</li>\")","import Component from '@glimmer/component';\nimport { action } from '@ember/object';\n\nimport type { SystemSelectItem } from '../system-select';\n\nexport interface SystemSelectListItemSignature {\n Element: HTMLLIElement;\n Args: {\n /** The system item to render. */\n item: SystemSelectItem;\n /** The current index of this item (used for data-index attribute). */\n index?: number;\n /** The index of the current parent item (used for data-index attribute). */\n parentIndex?: number;\n /** Trigger when the user clicks the rendered item. */\n itemClicked: () => void;\n /** Optional tooltip for the item name element. */\n tooltipText?: string;\n };\n}\n\n/**\n * @classdesc\n * Items list for the dropdown menu component.\n */\nexport default class SystemSelectListItem extends Component<SystemSelectListItemSignature> {\n /**\n * Toggles visibility of this item's sub-items.\n */\n @action toggleSubItems(): void {\n const { item } = this.args;\n\n // The showSubItems property is used to alter the icon indicating whether the sub-items are collapsed or expanded.\n item.showSubItems = !item.showSubItems;\n\n // Loop over all the sub-items and toggle their visibility (unless they are selected).\n item.subItems?.forEach((subItem: SystemSelectItem) => {\n if (!subItem.selected) {\n subItem.show = !subItem.show;\n }\n });\n }\n\n /**\n * Called when the item is clicked.\n */\n @action itemClicked(): void {\n const { item } = this.args,\n fn = item?.disabled ? undefined : item?.action;\n\n if (fn) {\n fn();\n this.args.itemClicked();\n }\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<ul\\n class=\\\"items-list no-selected-action\\\"\\n style={{if @maxHeight (safe-html (concat \\\"max-height: \\\" @maxHeight \\\"px; overflow: auto;\\\"))}}\\n tabindex={{if @isFocusable \\\"0\\\" \\\"-1\\\"}}\\n ...attributes\\n>\\n {{#each @items as |item index|}}\\n {{#if item.show}}\\n <SystemSelect::ListItem\\n @item={{item}}\\n @index={{index}}\\n @parentIndex={{@parentIndex}}\\n @tooltipText={{item.tooltipText}}\\n @itemClicked={{@itemClicked}}\\n />\\n {{/if}}\\n {{/each}}\\n</ul>\")","import templateOnlyComponent from '@ember/component/template-only';\n\nimport type { SystemSelectItem } from '../system-select.ts';\nimport type { SystemSelectListItemSignature } from './list-item';\n\ntype SystemSelectListItemSignatureArgs = SystemSelectListItemSignature['Args'];\n\nexport interface SystemSelectItemsListSignature {\n Element: HTMLUListElement;\n Args: Pick<SystemSelectListItemSignatureArgs, 'index' | 'parentIndex' | 'itemClicked'> & {\n /** Optional max height (in pixels) of the items collection. */\n maxHeight?: number;\n /** Indicates the items collection is focusable (not sure why since it's not interactive). */\n isFocusable?: boolean;\n /** The system select items to render. */\n items?: SystemSelectItem[];\n };\n}\n\nconst SystemSelectItemsList = templateOnlyComponent<SystemSelectItemsListSignature>();\nexport default SystemSelectItemsList;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<button\\n class=\\\"dropdown-toggle\\\"\\n id={{guid-for this}}\\n tabindex={{if this.isInteractive \\\"0\\\" \\\"-1\\\"}}\\n aria-haspopup=\\\"true\\\"\\n ...attributes\\n type=\\\"button\\\"\\n {{on \\\"click\\\" this.toggleDropdown}}\\n {{did-insert this.createInternalItems.perform}}\\n {{did-update this.createInternalItems.perform @items}}\\n>\\n {{#if (has-block)}}\\n {{! Output the passed in trigger content }}\\n {{yield}}\\n {{/if}}\\n\\n <PopoverMenu\\n @anchorSelector=\\\"#{{guid-for this}}\\\"\\n @placement={{coalesce @placement \\\"bottom\\\"}}\\n @isOpen={{this.isOpen}}\\n @focusSelector={{this.focusSelector}}\\n @width={{this.width}}\\n @isFocusable={{true}}\\n @maxWidth={{@maxWidth}}\\n @popoverClass=\\\"system-select-menu {{coalesce @dropdownMenuClass \\'\\'}}\\\"\\n @on-open={{this.onOpen}}\\n @on-close={{this.onClose}}\\n @on-create-popover={{coalesce @on-create-dropdown (noop)}}\\n @useImprovedCloseOnClick={{true}}\\n as |popover|\\n >\\n {{#if this.showTitleWrap}}\\n <popover.header @title={{@title}} />\\n {{/if}}\\n\\n {{#if this.showSearch}}\\n <div class=\\\"search-wrapper\\\" {{did-insert this.configureSearch}}>\\n <SearchInput\\n @value={{this.searchValue}}\\n placeholder={{coalesce @searchPlaceholder (t \\\"@adc/ui-components.search\\\")}}\\n @value-change={{this.doSearchAction}}\\n />\\n </div>\\n {{/if}}\\n\\n {{! Instead of passing isLoading through to the popover-menu, we use it here to prevent search input field from re-rendering,\\n which can cause it to lose focus as the user types, as only the items-list needs to be replaced with a loading indicator. }}\\n {{#if this.createInternalItems.isRunning}}\\n <div class=\\\"spinner-wrapper\\\">\\n <SpinnerSvg @spinning={{true}} />\\n </div>\\n {{else}}\\n <SystemSelect::ItemsList\\n @items={{this.itemsInternal}}\\n @maxHeight={{this.maxHeightWithoutSearch}}\\n @itemClicked={{fn (mut this.isOpen) false}}\\n {{did-insert this.configurePopup}}\\n />\\n {{/if}}\\n </PopoverMenu>\\n</button>\")","import Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { isEnterOrSpaceCode } from '@adc/ember-utils/utils/a11y';\nimport { action, computed } from '@ember/object';\nimport { bool } from '@ember/object/computed';\nimport { guidFor } from '@ember/object/internals';\nimport { inject as service } from '@ember/service';\nimport { task } from 'ember-concurrency';\n\nimport type DomService from '@adc/ember-utils/services/dom';\nimport type IntlService from '@adc/i18n/services/adc-intl';\nimport type RouterService from '@ember/routing/router-service';\nimport type { Task } from 'ember-concurrency';\nimport type { PopoverMenuSignature } from './popover-menu';\nimport type { PopoverHeaderSignature } from './popover/popover-header';\n\ntype PopoverMenuSignatureArgs = PopoverMenuSignature['Args'];\n\nexport class SystemSelectItem {\n @tracked name: string;\n @tracked description: string;\n @tracked icon: string;\n @tracked selected: boolean;\n @tracked disabled: boolean;\n @tracked showSubItemsOnOpen: boolean;\n @tracked isSystemParentAccountSuspended: boolean;\n @tracked tooltipText: string;\n @tracked subItems?: SystemSelectItem[];\n action?: VoidFunction;\n\n @tracked showSubItems = false;\n @tracked show = false;\n\n constructor(props: Partial<SystemSelectItem>) {\n this.name = props.name ?? '';\n this.description = props.description ?? '';\n this.icon = props.icon ?? '';\n this.selected = props.selected ?? false;\n this.disabled = props.disabled ?? false;\n this.showSubItemsOnOpen = props.showSubItemsOnOpen ?? false;\n this.isSystemParentAccountSuspended = props.isSystemParentAccountSuspended ?? false;\n this.tooltipText = props.tooltipText ?? '';\n this.subItems = props.subItems;\n this.action = props.action;\n }\n}\n\n/**\n * Set this parameter to true on open to avoid sending actions for focused elements\n */\nlet preventKeyUpOnTrigger: boolean;\n\n/**\n * Handle document keyboard events when the dropdown is open.\n *\n * @private\n */\nfunction onGlobalKeyUp(this: SystemSelect, event: KeyboardEvent): void {\n // Are there no items?\n const items = this.itemsInternal;\n if (!items?.length) {\n return;\n }\n\n const activeElementDataIndex = (document.activeElement as HTMLElement).dataset.index;\n if (!activeElementDataIndex) {\n return;\n }\n\n // If the active element is an item from the list, get the item index\n const [mainItemIndex, subItemIndex = null] = activeElementDataIndex.split('-').map((s) => Number(s));\n\n const { code } = event;\n if (!isEnterOrSpaceCode(code)) {\n return;\n }\n\n event.preventDefault();\n\n let currentItem;\n\n // Check if the current item is a subitem or a main item\n if (subItemIndex) {\n currentItem = items[mainItemIndex].subItems?.[subItemIndex];\n } else if (mainItemIndex) {\n currentItem = items[mainItemIndex];\n }\n\n if (currentItem?.disabled) {\n return;\n }\n\n // Did the user hit the enter or space key?\n // If element is not in the list or the key is not Enter or Space, we prevent executing the wrong action.\n if (isEnterOrSpaceCode(code) && currentItem && !preventKeyUpOnTrigger) {\n const { action } = currentItem;\n if (action) {\n action();\n this.isOpen = false;\n }\n\n return;\n }\n\n preventKeyUpOnTrigger = false;\n}\n\n/**\n * Counts the items including their subitems\n *\n * @private\n */\nfunction countItems(items: SystemSelectItem[] = []): number {\n return items.reduce((count, { subItems = [] }) => count + subItems.length, items.length);\n}\n\nexport interface SystemSelectSignature {\n Element: HTMLButtonElement;\n Args: Pick<PopoverMenuSignatureArgs, 'placement' | 'maxWidth' | 'maxHeight'> & {\n /** The SystemSelectItems to render. */\n items?: SystemSelectItem[] | Promise<SystemSelectItem[]>;\n /** Optional CSS class added to the popover element. */\n dropdownMenuClass?: PopoverMenuSignatureArgs['popoverClass'];\n /** Optional placeholder text for the search input. */\n searchPlaceholder?: string;\n /** The number of items required to show the search box (defaults to 11). */\n numberOfItemsForSearchToAppear?: number;\n /** The text to render in the popover header. */\n title?: PopoverHeaderSignature['Args']['title'];\n /** `-1` if the element is interactive. */\n tabindex?: '0' | '-1';\n /** Called when the popover menu opens. */\n 'on-open'?: VoidFunction;\n /** Called when the popover menu closes. */\n 'on-close'?: VoidFunction;\n /** Called when the user searches. */\n 'search-change'?: (value: string) => void;\n /** Called when the popover opens. */\n 'on-create-dropdown'?: PopoverMenuSignatureArgs['on-create-popover'];\n };\n Blocks: {\n default: [];\n };\n}\n\n/**\n * @classdesc\n * Dropdown menu for selecting ADC system/group.\n */\nexport default class SystemSelect extends Component<SystemSelectSignature> {\n @service declare intl: IntlService;\n @service declare media: ADCResponsiveMediaService;\n @service declare router: RouterService;\n @service declare dom: DomService;\n\n /**\n * The number of elements to show before the search box is visible.\n */\n get numberOfItemsForSearchToAppear(): number {\n return this.args.numberOfItemsForSearchToAppear ?? 11;\n }\n\n /**\n * Indicates a search function was passed to this component.\n */\n @bool('args.search-change')\n declare hasSearchAction: boolean;\n\n /**\n * Should the element be focusable?\n */\n @computed('args.tabindex')\n get isInteractive(): boolean {\n return this.args.tabindex !== '-1';\n }\n\n /**\n * Indicates the menu is open.\n */\n @tracked isOpen = false;\n\n /**\n * Width for the menu.\n */\n @tracked width?: number;\n\n @tracked itemsInternal?: SystemSelectItem[];\n @tracked searchHeight?: number;\n\n /**\n * maxHeight with the searchHeight subtracted.\n * If there is no search bar, then it equals maxHeight.\n */\n @computed('args.maxHeight', 'searchHeight')\n get maxHeightWithoutSearch(): number | undefined {\n const { searchHeight = 0 } = this,\n { maxHeight } = this.args;\n\n if (!maxHeight || !searchHeight) {\n return maxHeight;\n }\n\n return maxHeight - searchHeight;\n }\n\n /**\n * Search value.\n */\n @tracked searchValue = '';\n\n /**\n * The selector of the element which should receive focus after the menu opens.\n */\n @tracked focusSelector = '';\n\n keyUpListener?: string;\n\n /**\n * Should the search input be visible even if the conditions are not met (in case the number of items changes because of the search)\n */\n @tracked keepSearchVisible = false;\n\n /**\n * Should the search input be shown?\n */\n @computed('itemsInternal', 'keepSearchVisible', 'hasSearchAction', 'numberOfItemsForSearchToAppear')\n get showSearch(): boolean {\n const count = this.hasSearchAction ? countItems(this.itemsInternal) : 0;\n return this.keepSearchVisible || count >= this.numberOfItemsForSearchToAppear;\n }\n\n /**\n * Should the title wrapper be shown?\n */\n @computed('args.title', 'media.isMobile')\n get showTitleWrap(): boolean {\n const { isMobile } = this.media;\n if (!this.args.title && isMobile) {\n console.error(\"A system-select title string should be rendered but it's missing.\");\n\n return false;\n }\n\n return isMobile;\n }\n\n /**\n * Called to create the internal items.\n */\n createInternalItems: Task<void, never> = task({ restartable: true }, async () => {\n const items: SystemSelectItem[] = (await this.args.items) ?? [],\n fnDetermineWhetherToShowItem = (items: SystemSelectItem[], showItems: boolean): SystemSelectItem[] => {\n return items.map((item) => {\n item.show = showItems || item.selected;\n\n const { subItems, showSubItemsOnOpen = false } = item;\n\n if (subItems) {\n item.showSubItems = showSubItemsOnOpen;\n item.subItems = fnDetermineWhetherToShowItem(subItems, showSubItemsOnOpen);\n }\n\n return item;\n });\n };\n\n this.itemsInternal = fnDetermineWhetherToShowItem(items, true);\n });\n\n /**\n * Toggles the dropdown\n */\n @action toggleDropdown(): void {\n this.isOpen = !this.isOpen;\n }\n\n /**\n * Handling opening of the popover menu\n */\n @action onOpen(): void {\n this.keyUpListener = this.dom.addListener(this, document, 'keyup', onGlobalKeyUp.bind(this), false, true);\n\n preventKeyUpOnTrigger = true;\n // The listener and preventKeyUpOnTrigger parameter will be removed in the onClose action.\n\n this.args['on-open']?.();\n }\n\n /**\n * Handling closing of the popover menu\n */\n @action onClose(): void {\n this.searchValue = '';\n\n const { keyUpListener } = this;\n if (keyUpListener) {\n this.dom.removeListener(this, keyUpListener);\n this.keyUpListener = undefined;\n }\n\n // This function recursively closes all sub-items when the system-select is closed.\n const fnCloseSubItems = (items?: SystemSelectItem[]): void => {\n items?.forEach((item) => {\n if (item.subItems) {\n // Make the item's collapsible icon show that the sub-items are collapsed.\n item.showSubItems = false;\n\n const { subItems = [] } = item;\n\n // Hide each sub-item (unless it is selected).\n subItems.forEach((subItem) => (subItem.show = subItem.selected));\n\n // Recursively perform the hiding steps on this item's sub-items.\n fnCloseSubItems(subItems);\n }\n });\n };\n\n // Close all sub-items.\n fnCloseSubItems(this.itemsInternal);\n\n this.args['on-close']?.();\n\n document.getElementById(guidFor(this))?.focus();\n preventKeyUpOnTrigger = false;\n }\n\n @action configurePopup(elList: HTMLUListElement): void {\n const cssSelected = 'li[aria-selected=\"true\"] a';\n elList.querySelector(cssSelected)?.scrollIntoView();\n\n if (this.showSearch) {\n if (this.width === undefined) {\n const width = elList.closest('.system-select-menu')?.clientWidth;\n if (width) {\n this.width = width;\n }\n }\n }\n }\n\n @action configureSearch(elSearchWrapper: HTMLDivElement): void {\n this.searchHeight = elSearchWrapper.offsetHeight;\n this.updateFocusSelector('input[type=\"search\"]');\n }\n\n private updateFocusSelector(v: string): void {\n this.focusSelector = `.system-select-menu ${v}`;\n }\n\n /**\n * Triggered when search value has been changed\n */\n @action doSearchAction(value: string): void {\n // Update the search value\n this.searchValue = value;\n\n const fn = this.args['search-change'];\n\n // Do not trigger search if there is no search function or if the dropdown is closed\n if (fn && this.isOpen) {\n fn(value);\n this.keepSearchVisible = true;\n }\n }\n}\n","import { MINUTES_IN_DAY, MINUTES_IN_WEEK, DAYS_IN_WEEK } from '@adc/ember-utils/constants/time';\nimport { computed, get, set, setProperties } from '@ember/object';\nimport { htmlSafe } from '@ember/template';\nimport setDay from 'date-fns/setDay';\nimport BaseView from './base-view.ts';\n\nimport type { TimeBlock, ScheduleObject, ScheduleElement, PlanSchedule } from './types';\n\n/**\n * The properties that should be applied to set a time block to be 24/7.\n */\nexport const ALL_TIMES_PROPERTIES: TimeBlock = {\n day: 1,\n startMinutesLocal: MINUTES_IN_DAY,\n endMinutesLocal: MINUTES_IN_WEEK + MINUTES_IN_DAY\n};\n\n/**\n * Merge overlapping schedules.\n */\nexport function mergeSchedules(timeBlocks: TimeBlock[]): TimeBlock[] {\n // Check that there's at least one schedule\n if (!timeBlocks || timeBlocks.length <= 0) {\n return [];\n }\n\n // Sort the schedules by start time in the week or by the end time if the start times are the same\n timeBlocks = timeBlocks.sort(\n ({ startMinutesLocal: startA, endMinutesLocal: endA }, { startMinutesLocal: startB, endMinutesLocal: endB }) =>\n startA - startB || endA - endB\n );\n\n // Create a stack with the first schedule in it.\n const stack = [timeBlocks.shift() as TimeBlock];\n\n // Start from the next interval and merge if necessary.\n timeBlocks.forEach((schedule) => {\n const last = stack.slice().pop() as TimeBlock,\n { endMinutesLocal: lastEnd } = last,\n { startMinutesLocal: scheduleStart, endMinutesLocal: scheduleEnd } = schedule;\n\n // Does the current schedule NOT overlap with the latest from the stack?\n if (lastEnd < scheduleStart) {\n stack.push(schedule);\n\n // Is the current schedule later?\n } else if (lastEnd < scheduleEnd) {\n // Update last with new end time,\n set(last, 'endMinutesLocal', scheduleEnd);\n }\n });\n\n const last = stack.slice().pop() as TimeBlock;\n let [first] = stack,\n endMinutesLocal = last.endMinutesLocal;\n\n if (first) {\n // Does the last schedule in the stack leak into next week?\n if (stack.length > 1 && endMinutesLocal >= MINUTES_IN_WEEK) {\n while (stack.length > 1 && endMinutesLocal % MINUTES_IN_WEEK >= first.startMinutesLocal) {\n // Update the endMinutesLocal with the greater of the two ends of the schedules we're comparing.\n endMinutesLocal = Math.max(first.endMinutesLocal + MINUTES_IN_WEEK, endMinutesLocal);\n set(last, 'endMinutesLocal', endMinutesLocal);\n\n // Remove first schedule.\n stack.shift();\n\n // Update first.\n [first] = stack;\n }\n }\n\n // Is there only one schedule?\n if (stack.length === 1) {\n const { startMinutesLocal: start, endMinutesLocal: end } = first;\n\n // Does it cover all times?\n if (end % MINUTES_IN_WEEK >= start && end >= MINUTES_IN_WEEK) {\n // Reset to exactly one week.\n setProperties(first, ALL_TIMES_PROPERTIES);\n }\n }\n }\n\n return stack;\n}\n\n/**\n * Get a PlanSchedule from a ScheduleObject.\n */\nexport function getPlanSchedule(schedule: ScheduleObject): PlanSchedule {\n const { id = 0, colorName = 'black', timetables = [] } = schedule;\n return {\n planId: id,\n planColor: colorName,\n combinedSchedules: mergeSchedules(\n timetables.reduce(\n (timeBlocks, timetable) => [\n ...timeBlocks,\n ...(get(timetable, 'scheduleDictionary') ?? []).map(\n ({ startMinutesLocal, endMinutesLocal, day }) => ({\n // Convert start and end times to represent minutes from the beginning of the week\n day,\n startMinutesLocal: startMinutesLocal + MINUTES_IN_DAY * day,\n endMinutesLocal: endMinutesLocal + MINUTES_IN_DAY * day\n })\n )\n ],\n []\n )\n )\n };\n}\n\nexport interface BaseScheduleSignature {\n Element: HTMLDivElement;\n Args: {\n /** The array of ScheduleObjects to be rendered. */\n scheduleObjects?: ScheduleObject[];\n };\n}\n\n/**\n * @classdesc\n * Base class for all schedule components.\n */\nexport default class BaseSchedule<T extends BaseScheduleSignature = BaseScheduleSignature> extends BaseView<T> {\n /**\n * Creates a plan schedule.\n */\n protected getPlanSchedule(schedule: ScheduleObject): PlanSchedule {\n return getPlanSchedule(schedule);\n }\n\n /**\n * Adds time blocks to the schedule.\n */\n protected addTimeBlockToScheduleSlot(\n timeBlock: TimeBlock,\n schedules: ScheduleElement[],\n schedulesSlot: number,\n isGridVertical: boolean,\n allTimesText: string\n ): void {\n const dayOfWeek = Math.floor(timeBlock.startMinutesLocal / MINUTES_IN_DAY);\n\n this.createElementsForTimeBlock(\n timeBlock,\n allTimesText,\n (index, label, classes, start, length, planNameLabel) => {\n schedules[index].schedules[schedulesSlot].timeBlocks.push({\n day: dayOfWeek,\n label,\n planNameLabel,\n classes,\n style: htmlSafe(\n isGridVertical ? `top:${start}%;height:${length}%;` : `left:${start}%;width:${length}%;`\n )\n });\n }\n );\n }\n\n /**\n * Creates and returns an empty schedule element collection.\n */\n protected getEmptyScheduleElements(): ScheduleElement[] {\n // Array of the 7 days of the week containing the string name for\n // the day of the week and an array of schedule elements\n const now = new Date();\n return Array.from({ length: DAYS_IN_WEEK }, (_, i) => ({\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line @adc/ember/require-tz-functions\n dayOfWeek: this.intl.formatDate(setDay(now, i), {\n weekday: 'short'\n }),\n dayOfWeekNum: i,\n schedules: []\n }));\n }\n\n /**\n * Creates collection of schedule elements for the plan schedules.\n */\n protected getScheduleElements(isGridVertical: boolean, allTimesText = ''): ScheduleElement[] {\n const schedules = this.getEmptyScheduleElements();\n\n // For each plan schedule, create the block elements we need to render from their combinedSchedules property\n this.planSchedules.forEach(({ combinedSchedules, planColor }) => {\n if (combinedSchedules.length) {\n const [{ startMinutesLocal, endMinutesLocal }] = combinedSchedules;\n\n // Check if the schedule is all times if the user is showing the grid that only shows one access plan\n if (\n !(\n combinedSchedules.length === 1 &&\n startMinutesLocal === MINUTES_IN_DAY &&\n endMinutesLocal === MINUTES_IN_WEEK + MINUTES_IN_DAY\n )\n ) {\n const schedulesSlot = schedules[0].schedules.length;\n schedules.forEach((schedule) =>\n schedule.schedules.push({\n planName: '',\n planIcon: '',\n planColor,\n timeBlocks: []\n })\n );\n\n combinedSchedules.forEach((schedule) => {\n schedule.title = '';\n this.addTimeBlockToScheduleSlot(\n schedule,\n schedules,\n schedulesSlot,\n isGridVertical,\n allTimesText\n );\n });\n }\n }\n });\n\n // Remove Sunday from the front of the array and add it to the end\n // We want Monday to be the first weekday on the schedule\n schedules.push(schedules.shift() as ScheduleElement);\n\n return schedules;\n }\n\n /**\n * Array of plan schedules.\n */\n @computed('args.scheduleObjects.[]')\n get planSchedules(): PlanSchedule[] {\n return (this.args.scheduleObjects ?? []).map((s) => this.getPlanSchedule(s));\n }\n\n /**\n * Whether or not the schedule covers all times.\n */\n @computed('planSchedules.[]')\n get isScheduleAllTimes(): boolean {\n return this.planSchedules.some(({ combinedSchedules = [] }) => {\n if (combinedSchedules.length !== 1) {\n return false;\n }\n\n // Check if the schedule covers all times\n const [{ startMinutesLocal, endMinutesLocal }] = combinedSchedules;\n return startMinutesLocal === MINUTES_IN_DAY && endMinutesLocal === MINUTES_IN_WEEK + MINUTES_IN_DAY;\n });\n }\n}\n","import Component from '@glimmer/component';\nimport { MINUTES_IN_DAY, MINUTES_IN_WEEK } from '@adc/ember-utils/constants/time';\nimport { inject as service } from '@ember/service';\nimport setDay from 'date-fns/setDay';\nimport setMinutes from 'date-fns/setMinutes';\nimport startOfYear from 'date-fns/startOfYear';\n\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type { TimeBlock } from './types';\n\n/**\n * @classdesc\n * Base class for all addon views.\n */\nexport default class BaseView<T> extends Component<T> {\n @service declare intl: ADCIntlService;\n\n /**\n * Create the elements needed to render a time block to the time block, then call fnPushSchedule for each element created.\n */\n protected createElementsForTimeBlock(\n timeBlock: TimeBlock,\n allTimesText: string,\n fnPushSchedule: (\n index: number,\n label: string,\n classes: string,\n start: number,\n length: number,\n planNameLabel: string\n ) => void\n ): void {\n let { startMinutesLocal, endMinutesLocal } = timeBlock;\n\n // Get day number based on startMinutes from beginning of the week.\n const dayOfWeek = Math.floor(startMinutesLocal / MINUTES_IN_DAY),\n { title = '' } = timeBlock;\n const passedInClasses = timeBlock.classes ?? '';\n\n // Adjust minutes for day of week.\n startMinutesLocal -= MINUTES_IN_DAY * dayOfWeek;\n endMinutesLocal -= MINUTES_IN_DAY * dayOfWeek;\n\n // Calculate day span.\n const daySpan = Math.floor(endMinutesLocal / MINUTES_IN_DAY),\n [startValue, endValue] = [startMinutesLocal, endMinutesLocal].map((minutes) =>\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line @adc/ember/require-tz-functions\n this.intl.formatTime(setMinutes(startOfYear(new Date()), minutes), {\n hour: 'numeric',\n minute: 'numeric'\n })\n );\n\n // Calculate the start point and length of the time block for the absolutely positioned time blocks.\n let start = (startMinutesLocal * 100) / MINUTES_IN_DAY,\n length = ((endMinutesLocal - startMinutesLocal) * 100) / MINUTES_IN_DAY;\n\n // Is there only 1 time block to create?\n if (daySpan === 0 || (daySpan === 1 && endMinutesLocal === MINUTES_IN_DAY)) {\n fnPushSchedule(dayOfWeek, `${startValue} - ${endValue}`, passedInClasses, start, length, title);\n return;\n }\n\n // Otherwise create all the time blocks we need to create.\n for (let i = 0; i <= daySpan; i++) {\n let elementTitle = '',\n label = '',\n classes = '';\n\n // Is this the first day?\n if (i === 0) {\n // Calculate weekday and add to label.\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line @adc/ember/require-tz-functions\n const weekday = this.intl.formatDate(setDay(new Date(), (dayOfWeek + daySpan) % 7), {\n weekday: 'long'\n });\n\n elementTitle = title;\n classes = 'start';\n length = ((MINUTES_IN_DAY - startMinutesLocal) * 100) / MINUTES_IN_DAY;\n label =\n endMinutesLocal - startMinutesLocal === MINUTES_IN_WEEK\n ? allTimesText\n : `${startValue} - ${endValue} (${weekday})`;\n } else {\n start = 0;\n length = 100;\n classes = 'middle';\n\n // If we're on the second to last day in the span, and the schedule ends at midnight, this is the end block.\n if (i === daySpan - 1 && endMinutesLocal - (i + 1) * MINUTES_IN_DAY === 0) {\n classes = 'end';\n }\n\n // If this is the last day.\n if (i === daySpan) {\n length = ((endMinutesLocal - i * MINUTES_IN_DAY) * 100) / MINUTES_IN_DAY;\n classes = 'end';\n\n if (length === 0) {\n break;\n }\n }\n }\n\n fnPushSchedule(\n (dayOfWeek + i) % 7,\n label,\n `wrap-indicator-${classes} ${passedInClasses}`,\n start,\n length,\n elementTitle\n );\n }\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div\\n class=\\\"bar time-block-{{@timeBlock.id}} {{if (eq @timeBlock.id @activeTimeBlockId) \\'active\\'}}\\\"\\n style={{@timeBlock.style}}\\n role=\\\"button\\\"\\n ...attributes\\n>\\n {{#if @timeBlock.label}}\\n <div>{{if @areTimeBlockLabelsVisible @timeBlock.label}}</div>\\n {{/if}}\\n</div>\")","import templateOnlyComponent from '@ember/component/template-only';\n\nimport type { WeekViewElements } from './week-view';\n\nexport interface WeekViewTimeBlockSignature {\n Element: HTMLElement;\n Args: {\n /** Information describing this time block. */\n timeBlock: WeekViewElements;\n /** The ID of the currently active time block. */\n activeTimeBlockId: number;\n /** Indicates we should display the label for this time block. */\n areTimeBlockLabelsVisible: boolean;\n };\n}\n\nconst WeekViewTimeBlock = templateOnlyComponent<WeekViewTimeBlockSignature>();\n\nexport default WeekViewTimeBlock;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<section class=\\\"week-view {{if @isReadOnly \\'read-only\\'}}\\\" ...attributes>\\n <div class=\\\"day-labels\\\">\\n {{#each this.daysOfWeek as |day|}}\\n <div>\\n {{if (media \\\"isMobile\\\") (format-date-tz day weekday=\\\"short\\\") (format-date-tz day weekday=\\\"long\\\")}}\\n </div>\\n {{/each}}\\n </div>\\n\\n <ScheduleHourLabels @isVertical={{true}} @hours={{this.hourLabels}} class=\\\"hour-labels\\\" aria-hidden=\\\"true\\\" />\\n\\n <div class=\\\"hour-lines\\\">\\n {{#each this.hourLines}}<div></div>{{/each}}\\n </div>\\n\\n <div class=\\\"grid\\\">\\n {{#each this.timeBlockElementsArray as |timeBlockElements idx|}}\\n <div class=\\\"grid-day\\\" data-test-day={{idx}}>\\n <div\\n class=\\\"all-day\\\"\\n aria-label={{t\\n \\\"@adc/ui-components.components.week-view.dayAriaLabel\\\"\\n dayName=(format-date-tz (get this.daysOfWeek idx) weekday=\\\"long\\\")\\n }}\\n role=\\\"button\\\"\\n {{on \\\"click\\\" (fn this.dayClicked idx)}}\\n {{on \\\"keydown\\\" (fn this.onKeyDown idx)}}\\n tabindex=\\\"0\\\"\\n ></div>\\n {{#unless this.isScheduleAllTimes}}\\n {{#each timeBlockElements as |timeBlock|}}\\n <WeekViewTimeBlock\\n @timeBlock={{timeBlock}}\\n @activeTimeBlockId={{coalesce @selectedTimeBlockId this.activeTimeBlockId}}\\n @areTimeBlockLabelsVisible={{this.areTimeBlockLabelsVisible}}\\n {{on \\\"mouseenter\\\" (fn (mut this.activeTimeBlockId) timeBlock.id)}}\\n {{on \\\"mouseleave\\\" (fn (mut this.activeTimeBlockId) null)}}\\n {{on \\\"click\\\" (fn this.handleTimeBlockClick timeBlock.id)}}\\n class={{timeBlock.classes}}\\n aria-hidden=\\\"true\\\"\\n />\\n {{/each}}\\n {{/unless}}\\n </div>\\n {{/each}}\\n {{#if this.isScheduleAllTimes}}\\n {{#let (get this.timeBlockElementsArray \\\"0.0.id\\\") as |firstBlockId|}}\\n <div class=\\\"all-times\\\" role=\\\"button\\\" {{on \\\"click\\\" (fn this.handleTimeBlockClick firstBlockId)}}>\\n <div class=\\\"bar time-block-{{firstBlockId}}\\\"><div>{{this.allTimesText}}</div></div>\\n </div>\\n {{/let}}\\n {{/if}}\\n </div>\\n</section>\")","import { tracked } from '@glimmer/tracking';\nimport {\n MINUTES_IN_HOUR,\n MINUTES_IN_DAY,\n MINUTES_IN_WEEK,\n DAYS_IN_WEEK,\n HOURS_IN_DAY\n} from '@adc/ember-utils/constants/time';\nimport { isEnterOrSpaceCode } from '@adc/ember-utils/utils/a11y';\nimport { computed, action } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport { htmlSafe } from '@ember/template';\nimport { utcToZonedTime } from 'date-fns-tz';\nimport setDay from 'date-fns/setDay';\nimport BaseView from './views/base-view.ts';\n\nimport type LocaleService from '@adc/app-infrastructure/services/locale';\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type { SafeString } from 'handlebars';\nimport type { TimeBlock } from './views/types';\n\nexport type WeekViewElements = {\n id?: number;\n day: number;\n label: string;\n classes: string;\n style: SafeString;\n planNameLabel?: string;\n};\n\ntype WeekViewElementsCollection = WeekViewElements[][];\n\nconst FIRST_DAY_IN_WEEK = 1; // First day of the week is Monday.\n\n/**\n * Is the schedule all times?\n */\nexport function isScheduleAllTimes(timeBlocks: TimeBlock[]): boolean {\n // It's only possible that the schedule is All Times if there is only 1 time block.\n if (!timeBlocks || timeBlocks.length !== 1) {\n return false;\n }\n\n const { startMinutesLocal, endMinutesLocal } = timeBlocks[0];\n return endMinutesLocal - startMinutesLocal === MINUTES_IN_WEEK;\n}\n\nexport interface WeekViewSignature {\n Element: HTMLElement;\n Args: {\n /** The time blocks to render. */\n timeBlocks: TimeBlock[];\n /** The text to display when the timetable is 24/7. */\n allTimesText: string;\n /** Indicates we should display the time block labels. */\n areTimeBlockLabelsVisible?: boolean;\n /** The ID of the currently active time block. */\n selectedTimeBlockId?: number;\n /** Disables interaction with the time table. */\n isReadOnly?: boolean;\n /** Called when the user clicks a time block, provided `isReadOnly` is not `true`. */\n timeBlockClicked: (id: number) => void;\n /** Called when the user clicks empty space within the time table. */\n emptyAreaClicked: (day: number, time: number) => void;\n };\n}\n\n/**\n * @classdesc\n * Displays a week view that can be populated with time blocks to display. Can fire events based on user interaction.\n *\n * timeBlockClicked: Fired when a user clicks on a time span.\n * id - id of the time block that was clicked.\n *\n * emptyAreaClicked: Fired when a user clicks on a blank area of the week.\n * day - Day number that was clicked.\n * time - Time of the day in minutes that was clicked rounded to the nearest 30 minute interval.\n */\nexport default class WeekView extends BaseView<WeekViewSignature> {\n @service declare intl: ADCIntlService;\n @service declare locale: LocaleService;\n\n /**\n * Text to display on a time block if it spans 24/7.\n */\n get allTimesText(): string {\n return this.args.allTimesText ?? '';\n }\n\n /**\n * Should we display the labels in the time blocks?\n */\n get areTimeBlockLabelsVisible(): boolean {\n return this.args.areTimeBlockLabelsVisible ?? true;\n }\n\n /**\n * The highlighted time block id.\n */\n @tracked activeTimeBlockId?: number;\n\n /**\n * Array of hours that should have lines drawn on the grid.\n */\n hourLines = Array.from({ length: HOURS_IN_DAY + 1 }, (_, i) => i);\n\n /**\n * Array of the hours that should have labels next to them.\n */\n hourLabels = Array.from({ length: HOURS_IN_DAY / 2 + 1 }, (_, i) => i * 2);\n\n /**\n * Days of the week labels\n */\n @computed('locale.timeZone')\n get daysOfWeek(): Date[] {\n const now = new Date(),\n days = Array.from({ length: DAYS_IN_WEEK }, (_, i) => {\n return setDay(now, i);\n }),\n zonedNow = utcToZonedTime(new Date(), this.locale.timeZone);\n\n // Rotate the array so we have the right first day of the week.\n if (zonedNow.getDay() == now.getDay()) {\n days.push(...days.splice(0, FIRST_DAY_IN_WEEK));\n } else if (zonedNow.getDay() < now.getDay()) {\n days.push(...days.splice(0, 2));\n }\n\n return days;\n }\n\n /**\n * Add a schedule to the specified list of schedule days.\n */\n private addTimeBlockToSchedule(timeBlock: TimeBlock, schedule: WeekViewElementsCollection): void {\n const dayOfWeek = Math.floor(timeBlock.startMinutesLocal / MINUTES_IN_DAY);\n\n this.createElementsForTimeBlock(\n timeBlock,\n this.allTimesText,\n (\n index: number,\n label: string,\n classes: string,\n start: number,\n length: number,\n planNameLabel: string\n ): void => {\n const style = htmlSafe(`top: ${start}%; height: ${length}%;`);\n\n schedule[index % 7].push({\n id: timeBlock.id,\n day: dayOfWeek,\n label,\n planNameLabel,\n classes,\n style\n });\n }\n );\n }\n\n /**\n * Is the current schedule All Times?\n */\n @computed('args.timeBlocks.[]')\n get isScheduleAllTimes(): boolean {\n return isScheduleAllTimes(this.args.timeBlocks);\n }\n\n /**\n * Elements to be rendered\n */\n @computed('allTimesText', 'args.timeBlocks.[]')\n get timeBlockElementsArray(): WeekViewElementsCollection {\n const schedule = Array.from({ length: 7 }, () => []);\n\n (this.args.timeBlocks ?? []).forEach((timeBlock) => this.addTimeBlockToSchedule(timeBlock, schedule));\n\n // Rotate the array so we have the right first day of the week.\n schedule.push(...schedule.splice(0, FIRST_DAY_IN_WEEK));\n\n return schedule;\n }\n\n /**\n * Called when a day element is clicked.\n */\n @action dayClicked(dayClicked: number, event: MouseEvent & { target: HTMLElement }): void {\n const { emptyAreaClicked } = this.args;\n\n // Return immediately if the grid is read only or an action is not defined.\n if (this.args.isReadOnly || !emptyAreaClicked) {\n return;\n }\n\n const { height, top } = event.target.getBoundingClientRect(),\n halfHourMinutes = MINUTES_IN_HOUR / 2,\n halfHourHeight = height / (MINUTES_IN_DAY / halfHourMinutes);\n\n emptyAreaClicked(\n // Day of the week that was clicked. 0 = Monday ... 6 = Sunday.\n (dayClicked + FIRST_DAY_IN_WEEK) % DAYS_IN_WEEK,\n\n // Start time floored to nearest half hour interval.\n Math.floor((event.clientY - top) / halfHourHeight) * halfHourMinutes\n );\n }\n\n /**\n * Triggered when a time block is clicked.\n */\n @action handleTimeBlockClick(timeBlockId: number): void {\n // If the grid is not read only send the action.\n if (!this.args.isReadOnly) {\n this.args.timeBlockClicked?.(timeBlockId);\n }\n }\n\n /**\n * For a11y, handles a space or enter while focusing on a day as a click.\n */\n @action onKeyDown(dayClicked: number, event: KeyboardEvent): void {\n if (isEnterOrSpaceCode(event.code)) {\n event.preventDefault();\n this.args.emptyAreaClicked((dayClicked + FIRST_DAY_IN_WEEK) % DAYS_IN_WEEK, 0);\n }\n }\n}\n","import EmberObject from '@ember/object';\n\n/**\n * ADC pikaday component initializer for injecting property values.\n *\n * @param {Ember.Application} application\n */\nexport function initialize(application) {\n // Create object to hold translations values that will be populated once we know the locale (see locale service).\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-classic-classes\n const defaults = EmberObject.extend({});\n\n application.register('pikaday:main', defaults, { singleton: true });\n}\n\nexport default {\n name: 'setup-pikaday',\n initialize\n};\n","import { assert } from '@ember/debug';\nimport EmberObject from '@ember/object';\n\n/**\n * ADC route-view component initializer for injecting property values.\n *\n * @param {Ember.Application} application\n */\nexport function initialize(application) {\n class AbstractNavigationApi extends EmberObject {\n getVisitedRoutesStackLength() {\n assert('[@adc/ui-components] RouteView component missing navigationApi', false);\n return 0;\n }\n\n transitionToPreviousRoute() {\n assert('[@adc/ui-components] RouteView component missing navigationApi', false);\n }\n }\n\n application.register('route-view:main', AbstractNavigationApi, {\n singleton: true\n });\n}\n\nexport default {\n name: 'setup-route-view',\n initialize\n};\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div class=\\\"search-toolbar fs-mask {{@containerClass}}\\\">\\n {{#unless @searchBoxHidden}}\\n <SearchInput\\n @value={{@searchString}}\\n @value-change={{@searchValueChange}}\\n @containerClass={{if @searchBoxDisabled \\\"disabled\\\"}}\\n @ariaLabel={{@ariaLabel}}\\n disabled={{@searchBoxDisabled}}\\n ...attributes\\n />\\n {{/unless}}\\n\\n <div class=\\\"content\\\">\\n {{yield}}\\n </div>\\n</div>\")","import { alias } from '@ember/object/computed';\nimport DropdownActionItem from './dropdown-action-item.js';\n\n/**\n * The name of the DeleteActionItem icon.\n *\n * @static\n * @type {String}\n */\nconst DELETE_ICON = 'trash';\n\n/**\n * The name of the class used by default to style DeleteActionItem.\n *\n * @static\n * @type {String}\n */\nconst DELETE_CSS = 'delete-action';\n\n/**\n * The name of the EditActionItem icon.\n *\n * @static\n * @type {String}\n */\nconst EDIT_ICON = 'edit';\n\n/**\n * An action item with an associated click action for the row.\n *\n * @typedef {Object} ActionItem\n * @extends DropdownActionItem\n *\n * @property {String} text - The text to display next to the icon.\n * @property {String} type - The type of the action item.\n * @property {boolean} visible - Determines if the item is visible.\n */\nexport const ActionItem = DropdownActionItem.extend({\n /**\n * The text to display next to the icon.\n *\n * @type {string}\n */\n text: '',\n\n /**\n * Whether or not the item should be visible.\n *\n * @type {boolean}\n */\n visible: true,\n\n /**\n * Sync the text property with DropdownActionItem's name property\n *\n * @type {string}\n */\n name: alias('text')\n});\n\n/**\n * Delete action item.\n *\n * @typedef {Object} DeleteActionItem\n * @extends ActionItem\n */\nexport const DeleteActionItem = ActionItem.extend({\n /**\n * The name of the icon.\n *\n * @type {string}\n */\n icon: DELETE_ICON,\n\n /**\n * The name of the class used to style the item.\n *\n * @type {string}\n */\n className: DELETE_CSS\n});\n\n/**\n * Edit action item.\n *\n * @typedef {Object} EditActionItem\n * @extends ActionItem\n */\nexport const EditActionItem = ActionItem.extend({\n /**\n * The name of the icon.\n *\n * @type {string}\n */\n icon: EDIT_ICON\n});\n\nexport default ActionItem;\n","/**\n * Utility helper module for icon animation states.\n * @module\n */\n\n/**\n * Animation is inactive.\n */\nexport const NONE = 0;\n\n/**\n * Request is sending.\n */\nexport const SENDING = 1;\n\n/**\n * Request is sent, waiting for confirmation.\n */\nexport const WAITING = 2;\n\n/**\n * Request is complete.\n */\nexport const COMPLETE = 3;\n\n/**\n * The animation CSS class to show.\n */\nexport function getAnimationCSS(animationState: AnimationType): string {\n return {\n [NONE]: '',\n [SENDING]: 'sending',\n [WAITING]: 'waiting',\n [COMPLETE]: 'complete'\n }[animationState];\n}\n\n/**\n * The types of animations.\n */\nexport type AnimationType = typeof NONE | typeof SENDING | typeof WAITING | typeof COMPLETE;\n","/**\n * Utility modules for the binary-input components.\n * @module\n */\n\nimport EmberObject from '@ember/object';\n\n/**\n * Creates an object representing a binary-input item (e.g. checkbox, radio, or toggle item).\n *\n * @param {number} id - ID to identify the item in a group.\n * @param {String} label - Label for the item.\n * @param {boolean} value - Binary state (on/off) for the item.\n * @param {String|undefined} [icon=undefined] - The name of the icon to display with the binary input.\n * @param {boolean} [disabled=false] - Should this individual item be disabled?\n * @param {String|undefined} [color=undefined] - Optional color for the item icon.\n * @param {String} iconTitle - The title of the icon\n * @param {String} iconDesc - The description of the icon\n * @param {boolean} iconIsHiddenForAccessibility - Should the icon be hidden for screen readers?\n *\n * @returns {BinaryInputItem}\n */\nexport function createBinaryInputItemObject(\n id = 1,\n label,\n value,\n icon = undefined,\n disabled = false,\n color = undefined,\n iconTitle,\n iconDesc,\n iconIsHiddenForAccessibility\n) {\n return EmberObject.create({\n id,\n label,\n value,\n icon,\n disabled,\n color,\n iconTitle,\n iconDesc,\n iconIsHiddenForAccessibility\n });\n}\n\n/**\n * @typedef {Object} BinaryInputItem\n *\n * @property {number} id - The ID of the binary input.\n * @property {String} label - The label to display.\n * @property {boolean} value - The value of the binary input (e.g. checked/unchecked).\n * @property {String} [icon=undefined] - The name of the SVG icon to display.\n * @property {boolean} [disabled=false] - The name of the SVG icon to display.\n * @property {String} iconTitle - The title of the icon\n * @property {String} iconDesc - The description of the icon\n * @property {boolean} iconIsHiddenForAccessibility - Should the icon be hidden for screen readers?\n *\n */\n","import { A } from '@ember/array';\nimport { default as EmberObject, computed, setProperties } from '@ember/object';\nimport { notEmpty } from '@ember/object/computed';\nimport { once } from '@ember/runloop';\nimport { dasherize } from '@ember/string';\nimport { isPresent } from '@ember/utils';\nimport { ITEMS_CHANGED_ACTION } from '../components/checkbox-tree.ts';\n\n// region Constants\n\n/**\n * The unselected state for an item.\n *\n * @type {number}\n *\n * @public\n * @memberof utils.CheckboxTreeItem\n */\nexport const UNSELECTED = 0;\n\n/**\n * The partially-selected state for an item.\n *\n * @type {number}\n *\n * @public\n * @memberof utils.CheckboxTreeItem\n */\nexport const PARTIALLY_SELECTED = 1;\n\n/**\n * The selected state for an item.\n *\n * @type {number}\n *\n * @public\n * @memberof utils.CheckboxTreeItem\n */\nexport const SELECTED = 2;\n\n// endregion\n\n// region CheckboxTreeItem Class\n\n/**\n * @classdesc\n *\n * An item to display in a checkbox tree component.\n *\n * @class utils.CheckboxTreeItem\n * @extends Ember.Object\n * @public\n *\n * @property {String} name - The main text for the item.\n * @property {String} [value] - A unique identifier and the corresponding string used as a \"value\" when used as a dropdown option.\n * @property {number} [state=UNSELECTED] - The current state of the item (e.g. selected, partially selected, etc.).\n * @property {boolean} [disabled=false] - Is the item disabled (unselectable)?\n * @property {String} [description] - Additional description text displayed along side the name.\n * @property {String} [icon] - The icon name to use for the item.\n * @property {String} [iconTitle] - The icon title.\n * @property {String} [iconDesc] - The icon description.\n * @property {boolean} [iconIsHiddenForAccessibility] - Should the icon be hidden for screen readers?\n * @property {String} [secondaryDescription] - A secondary description to display below the name and primary description.\n * @property {boolean} [isSelectable=true] - Should the item itself be selectable and display a checkbox?\n * @property {Array<CheckboxTreeItem>|undefined}} subitems - An optional array of subitems the items contains.\n * @property {boolean} [isCollapsible=false] - Should the subitems be collapsible?\n * @property {boolean} [isCollapsed=false] - Does the item currently have its subitems collapsed?\n * @property {boolean} [showAllNoneSelectors=false] - Should the item have an \"All | None\" selector for managing subitem states?\n *\n */\n// Do not copy this deprecated usage. If you see this, please fix it\n// eslint-disable-next-line ember/no-classic-classes\nexport default EmberObject.extend(\n /** @lends utils.CheckboxTreeItem# */ {\n // region Hooks\n\n /** @override */\n init() {\n this._super(...arguments);\n\n ensureValueExists.call(this);\n validateSubitemReliantProperties.call(this);\n setSubitemsParent.call(this);\n },\n\n // endregion\n\n // region Default Properties\n\n /**\n * The current state of the item.\n *\n * @type {number}\n */\n state: UNSELECTED,\n\n /**\n * Is the item supposed to render a checkbox and be capable of being selected?\n *\n * @type {boolean}\n */\n isSelectable: true,\n\n // endregion\n\n // region Computed Properties\n\n /**\n * The state that determines how the item is displayed in the tree (e.g. selected, unselected, etc.).\n *\n * @function\n * @returns {number}\n */\n internalState: computed('state', {\n get() {\n return this.state;\n },\n set(key, newState) {\n if (this.hasSubitems) {\n // Only update the leaf items. The rest of the CheckboxTreeItems\n // will figure out their state based on the states of subitems.\n setLeafItemStates(this, newState);\n } else {\n // This is a leaf item, so update its state and trigger parent updates.\n setStateAndUpdateParent.call(this, newState);\n }\n\n return this.state;\n }\n }),\n\n /**\n * Does the item have subitems?\n *\n * @function\n * @returns {boolean}\n */\n hasSubitems: notEmpty('subitems'),\n\n /**\n * The selected items within this checklist. Will return array of just this item if all subitems are selected.\n *\n * @function\n * @returns {EmberArray<utils.CheckboxTreeItem>}\n */\n selectedItems: computed('hasSubitems', 'state', 'subitems.@each.state', function () {\n const { isFullySelected } = this;\n\n // Are there NO subitems OR are they all selected?\n if (!this.hasSubitems || isFullySelected) {\n // Return item if all subitems selected or this item is selected.\n return A([isFullySelected || this.state === SELECTED ? this : undefined]).compact();\n }\n\n // Return selected subitems.\n return A(this.subitems.filterBy('state', SELECTED));\n }),\n\n /**\n * Indicates this item or all it's sub items are selected.\n *\n * @function\n * @returns {boolean}\n */\n isFullySelected: computed('hasSubitems', 'state', 'subitems.@each.state', function () {\n if (!this.hasSubitems) {\n return this.state === SELECTED;\n }\n\n // Is there only one state AND is it selected?\n const uniqueStates = getAllUnitItemStates(this);\n return uniqueStates.length === 1 && uniqueStates.firstObject === SELECTED;\n }),\n\n /**\n * Indicates this item or all it's sub items are partially selected.\n *\n * @function\n * @returns {boolean}\n */\n isPartiallySelected: computed('hasSubitems', 'state', 'subitems.@each.state', function () {\n // If an item has no subitems, it cannot be partially selected.\n if (!this.hasSubitems) {\n return false;\n }\n\n // Is there more than one state?\n return getAllUnitItemStates(this).length > 1;\n }),\n\n /**\n * Indicates this item and all it's sub items are not selected.\n *\n * @function\n * @returns {boolean}\n */\n isNotSelected: computed('isFullySelected', 'isPartiallySelected', function () {\n return !this.isFullySelected && !this.isPartiallySelected;\n })\n\n // endregion\n }\n);\n\n// endregion\n\n// region Validation\n\n/**\n * Ensures an item has a value by setting it to a dasherized form of the name, if a value was not specified.\n *\n * @private\n * @memberof utils.CheckboxTreeItem\n */\nfunction ensureValueExists() {\n const { name } = this;\n\n window.console.assert(name, `@adc/ui-components/checkbox-tree: Item name=\"${name}\" must have a name.`);\n\n if (!isPresent(this.value)) {\n this.set('value', dasherize(name));\n return;\n }\n\n // Ensure value is a string.\n if (typeof this.value !== 'string') {\n this.set('value', String(this.value));\n }\n}\n\n/**\n * Validates that properties that rely on the existence of subitems are correct.\n *\n * @private\n * @memberof utils.CheckboxTreeItem\n */\nfunction validateSubitemReliantProperties() {\n if (!this.hasSubitems) {\n setProperties(this, {\n isCollapsed: false,\n isCollapsible: false,\n showAllNoneSelectors: false\n });\n\n return;\n }\n\n if (!this.isCollapsible) {\n this.set('isCollapsed', false);\n }\n}\n\n// endregion\n\n// region Linking Subitems with Parents\n\n/**\n * Stores a reference to \"this\" (i.e. the parent) on all of its subitems.\n *\n * @private\n * @instance\n * @memberof utils.CheckboxTreeItem\n */\nfunction setSubitemsParent() {\n if (this.hasSubitems) {\n A(this.subitems).setEach('parent', this);\n }\n}\n\n// endregion\n\n// region State Management\n\n/**\n * Sets all leaf items' visualState properties to the provided value.\n *\n * @note Setting the visualState will update the internalState and state properties and\n * then trigger the parent items to update their states.\n *\n * @param {utils.CheckboxTreeItem} item - The item we are updating the leaf item states for.\n * @param {number} newState - The new state to set for all leaf items.\n *\n * @private\n * @memberof utils.CheckboxTreeItem\n */\nfunction setLeafItemStates(item, newState) {\n if (item.hasSubitems) {\n // NOTE: Only set the leaf items, then send the action to recalculate the rest of the parents' states.\n // We don't want to manually set the parent to selected, because a subitem might be unselected and disabled.\n item.subitems.forEach((subitem) => setLeafItemStates(subitem, newState));\n return;\n }\n\n if (isNotModifiable(item)) {\n return;\n }\n\n // Set the visual state so the computed property will trigger parent updates.\n item.set('internalState', newState);\n}\n\n/**\n * Updates the item's state to the provided state and then tells its parent to update itself.\n *\n * @param {number} newState - The state we should update the item to have.\n *\n * @private\n * @instance\n * @memberof utils.CheckboxTreeItem\n */\nfunction setStateAndUpdateParent(newState) {\n this.set('state', newState);\n\n updateParentState.call(this);\n}\n\n/**\n * If there is a parent item, this tells the parent to update its state,\n * as there was likely a change to the state of subitems in the tree.\n *\n * @private\n * @instance\n * @memberof utils.CheckboxTreeItem\n */\nfunction updateParentState() {\n const { parent } = this;\n if (parent) {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n once(parent, setStateAndUpdateParent, getItemState(parent));\n }\n\n (this.get(ITEMS_CHANGED_ACTION) || (() => {}))();\n}\n\n// endregion\n\n// region Determining Item State\n\n/**\n * Gets the state of the current {@link CheckboxTreeItem} based on its state or the states of its subitems.\n *\n * @param {utils.CheckboxTreeItem} item - The item in the tree we are getting the state of.\n *\n * @returns {number}\n *\n * @private\n * @memberof utils.CheckboxTreeItem\n * @static\n */\nfunction getItemState(item) {\n if (!item.hasSubitems) {\n // If there are no subitems, an item is either selected or unselected.\n return item.state === SELECTED ? SELECTED : UNSELECTED;\n }\n\n if (item.isPartiallySelected) {\n return PARTIALLY_SELECTED;\n }\n\n if (item.isFullySelected) {\n return SELECTED;\n }\n\n return UNSELECTED;\n}\n\n/**\n * Returns a flattened array containing the unique set of states for all descendant items (e.g. [ SELECTED, UNSELECTED, etc.]).\n *\n * @param item - The item we are getting subitems' states for.\n * @param isBaseItem - Is this the root item? Note: you should not need to use this parameter.\n *\n * @returns {EmberArray<number>}\n *\n * @private\n * @memberof utils.CheckboxTreeItem\n * @static\n */\nfunction getAllUnitItemStates(item, isBaseItem = true) {\n let subItemStates = A([]);\n\n if (!isBaseItem) {\n subItemStates.push(item.state);\n }\n\n if (!item.hasSubitems) {\n return subItemStates;\n }\n\n return A(\n item.subitems.reduce((states, subitem) => [...states, ...getAllUnitItemStates(subitem, false)], subItemStates)\n ).uniq();\n}\n\n/**\n * Is the item's state not capable of being changed?\n *\n * @param {utils.CheckboxTreeItem} item - The item we are checking the state of.\n *\n * @returns {boolean}\n *\n * @public\n * @static\n * @memberof utils.CheckboxTreeItem\n */\nexport function isNotModifiable(item) {\n return item.disabled || !item.isSelectable;\n}\n\n/**\n * Returns a flattened array of all items that are selected in the tree.\n *\n * @param {Array<utils.CheckboxTreeItem>} items - An array of root-level items to search through.\n * @param {boolean} useParentIfAllSubitemsSelected - When enabled, if all subitems are selected, this option will only add the parent item.\n *\n * @returns {EmberArray<utils.CheckboxTreeItem>}\n *\n * @private\n * @static\n * @memberof components.dropdown-select.MultiSelect\n */\nexport function getAllSelectedItems(items, useParentIfAllSubitemsSelected = true) {\n let selectedItems = [];\n\n (items || []).forEach((item) => {\n const subitems = item.subitems || [];\n\n if (useParentIfAllSubitemsSelected && item.isFullySelected) {\n // All the subitems are selected in this group, so use the parent item if specified.\n selectedItems.push(item);\n return;\n }\n\n if (item.state === SELECTED) {\n selectedItems.push(item);\n }\n\n selectedItems = selectedItems.concat(getAllSelectedItems(subitems, useParentIfAllSubitemsSelected));\n });\n\n return A(selectedItems);\n}\n\n// endregion\n","interface Range {\n min: number;\n max: number;\n}\n\n/**\n * Validates that the given range is a valid object with a min and a max property.\n */\nexport function isInvalidRange(range: Range): boolean {\n return !range || typeof range.min !== 'number' || typeof range.max !== 'number' || range.min > range.max;\n}\n\n/**\n * Verifies if the number is in the min/max range.\n */\nexport function isNumberInRange(x: number, range: Range, includeSuperiorEdge = false): boolean {\n if (isInvalidRange(range)) {\n console.error(\n 'utils/common: Invalid range provided to \"isNumberInRange\" function. It must be object with a min and a max numeric property.'\n );\n\n return false;\n }\n\n if (x < range.min || x > range.max) {\n return false;\n }\n\n if (!includeSuperiorEdge && x === range.max) {\n return false;\n }\n\n return true;\n}\n\n/**\n * Normalizes the received value to the given range, returning a float value between 0 and 1.\n **/\nexport function normalizeNumberToRange(x: number, range: Range): number | undefined {\n if (isInvalidRange(range)) {\n console.error(\n 'utils/common: Invalid range provided to \"normalizeNumberToRange\" function. It must be object with a min and a max numeric property.'\n );\n\n return;\n }\n\n if (x < range.min) {\n return 0;\n }\n\n if (x > range.max) {\n return 1;\n }\n\n return (x - range.min) / (range.max - range.min);\n}\n","import { isNumberInRange, normalizeNumberToRange } from '../../utils/common.ts';\n\nimport type { NumericRange } from '../type-utils';\n\nexport type Hue = NumericRange<0, 360>;\nexport type Saturation = NumericRange<0, 100>;\nexport type Lightness = NumericRange<50, 100>;\nexport type Warmth = NumericRange<0, 100>;\n\nexport interface Color {\n hue: Hue;\n baseHue?: Hue;\n saturation: Saturation;\n lightness: Lightness;\n percentWarmth?: Warmth;\n}\n\ninterface LightSettings {\n color: Color;\n percentWarmthRange: { min: Warmth; max: Warmth };\n}\n\n/**\n * HSL values for the Cold, Warm and Neutral lights. The user selected color will be an interpolation between those.\n */\nconst warmLight: LightSettings = {\n color: { hue: 36.28 as Hue, saturation: 100, lightness: 66.27 as Lightness },\n percentWarmthRange: { min: 0, max: 40 }\n },\n neutralLight: LightSettings = {\n color: { hue: 0, saturation: 100, lightness: 100 },\n percentWarmthRange: { min: 40, max: 60 }\n },\n coldLight: LightSettings = {\n color: { hue: 213.05 as Hue, saturation: 100, lightness: 76.86 as Lightness },\n percentWarmthRange: { min: 60, max: 100 }\n };\n\n/**\n * Gradient value for the color temperature gradient.\n */\nexport const TEMPERATURES_GRADIENT_VALUE = `${getHSLCss(warmLight.color)} 0%,${getHSLCss(\n neutralLight.color\n)} 40%,${getHSLCss(neutralLight.color)} 60%,${getHSLCss(coldLight.color)} 100%`;\n\n/**\n * Generates a linear gradient string in the given direction and with the specified value.\n */\nexport function fnGradient(direction: string, value: string): string {\n return `linear-gradient(to ${direction}, ${value})`;\n}\n\n/**\n * Calculates a new hue value using the offset and the optional base hue, wrapping as the value leaves the 0 - 360 range.\n */\nexport function constrainHueValue(offset: number, baseHue: Hue = 0): Hue {\n return ((baseHue + (offset % 360) + 360) % 360) as Hue;\n}\n\n/**\n * Outputs a value between leftValue and rightValue base on x.\n */\nexport function linearInterpolation<T = number>(x: number, leftValue: number, rightValue: number): T {\n return (leftValue + x * (rightValue - leftValue)) as T;\n}\n\n/**\n * Converts the passed HEX color string to an HSL color object.\n * @note adapted from https://css-tricks.com/converting-color-spaces-in-javascript/\n */\nexport function hexToHSL(hex: string): Color {\n // Convert hex to RGB first\n let r: any = 0,\n g: any = 0,\n b: any = 0;\n\n if (hex.length === 4) {\n r = '0x' + hex[1] + hex[1];\n g = '0x' + hex[2] + hex[2];\n b = '0x' + hex[3] + hex[3];\n } else if (hex.length === 7) {\n r = '0x' + hex[1] + hex[2];\n g = '0x' + hex[3] + hex[4];\n b = '0x' + hex[5] + hex[6];\n } else {\n throw `Invalid HEX format \"${hex}\"`;\n }\n\n // Then to HSL\n r /= 255;\n g /= 255;\n b /= 255;\n\n const cmin = Math.min(r, g, b),\n cmax = Math.max(r, g, b),\n delta = cmax - cmin;\n let hue: Hue, saturation: Saturation, lightness: Lightness;\n\n if (delta === 0) {\n hue = 0;\n } else if (cmax === r) {\n hue = (((g - b) / delta) % 6) as Hue;\n } else if (cmax === g) {\n hue = ((b - r) / delta + 2) as Hue;\n } else {\n hue = ((r - g) / delta + 4) as Hue;\n }\n\n hue = ((Math.round(hue * 60) + 360) % 360) as Hue;\n\n lightness = ((cmax + cmin) / 2) as Lightness;\n saturation = (delta === 0 ? 0 : delta / (1 - Math.abs(2 * lightness - 1))) as Saturation;\n saturation = +(saturation * 100).toFixed(1) as Saturation;\n lightness = +(lightness * 100).toFixed(1) as Lightness;\n\n return { hue, saturation, lightness };\n}\n\n/**\n * Receives the hslColor object and returns the css string describing the color in hsl format.\n */\nexport function getHSLCss(hslColor: any = {}): string {\n return `hsl(${hslColor.hue}, ${hslColor.saturation}%, ${hslColor.lightness}%)`;\n}\n\n/**\n * Converts the passed HSL color object to a HEX color string.\n * @note adapted from https://css-tricks.com/converting-color-spaces-in-javascript/\n */\nexport function hslToHex(hslColor: Color): string {\n const { hue } = hslColor;\n let { saturation, lightness } = hslColor;\n\n saturation /= 100;\n lightness /= 100;\n\n const c = (1 - Math.abs(2 * lightness - 1)) * saturation,\n x = c * (1 - Math.abs(((hue / 60) % 2) - 1)),\n m = lightness - c / 2;\n let r = 0,\n g = 0,\n b = 0;\n\n if (0 <= hue && hue < 60) {\n r = c;\n g = x;\n b = 0;\n } else if (60 <= hue && hue < 120) {\n r = x;\n g = c;\n b = 0;\n } else if (120 <= hue && hue < 180) {\n r = 0;\n g = c;\n b = x;\n } else if (180 <= hue && hue < 240) {\n r = 0;\n g = x;\n b = c;\n } else if (240 <= hue && hue < 300) {\n r = x;\n g = 0;\n b = c;\n } else if (300 <= hue && hue < 360) {\n r = c;\n g = 0;\n b = x;\n }\n\n return [r, g, b].reduce((hex, v) => {\n // Convert channel to hex, padding with zero (if necessary).\n return hex + ('00' + Math.round((v + m) * 255).toString(16)).substr(-2);\n }, '#');\n}\n\n/**\n * Determines the corresponding hsl color for the given percentWarmth value.\n */\nexport function hslFromPercentWarmth(percentWarmth: Warmth): Color {\n /**\n * The logic for the 3 hue ranges (blue, white and yellow).\n * Each object contains a matching function which tells if the percentWarmth is in the hue range,\n * and a function which does the math and return the hsl color for the percentWarmth value.\n */\n const hueRanges = [\n // Warm Light Range\n {\n includes: (percentWarmth: Warmth) => isNumberInRange(percentWarmth, warmLight.percentWarmthRange),\n getColorForPercentWarmth: (percentWarmth: Warmth) => {\n // Keeps the cold light hue and saturation, and interpolates between the white and warm light lightness.\n const interpolatedLightness = linearInterpolation<Lightness>(\n normalizeNumberToRange(percentWarmth, warmLight.percentWarmthRange) as number,\n warmLight.color.lightness,\n neutralLight.color.lightness\n );\n\n return { ...warmLight.color, lightness: interpolatedLightness };\n }\n },\n // Neutral Light Range\n {\n includes: (percentWarmth: Warmth) => isNumberInRange(percentWarmth, neutralLight.percentWarmthRange),\n getColorForPercentWarmth: () => neutralLight.color\n },\n // Cold Light Range\n {\n includes: (percentWarmth: Warmth) => isNumberInRange(percentWarmth, coldLight.percentWarmthRange, true),\n getColorForPercentWarmth: (percentWarmth: Warmth) => {\n // Keeps the cold light hue and saturation, and interpolates between the cold and white light lightness.\n const interpolatedLightness = linearInterpolation<Lightness>(\n normalizeNumberToRange(percentWarmth, coldLight.percentWarmthRange) as number,\n neutralLight.color.lightness,\n coldLight.color.lightness\n );\n\n return { ...coldLight.color, lightness: interpolatedLightness };\n }\n }\n ];\n const hueRange = hueRanges.find((range) => range.includes(percentWarmth));\n\n if (!hueRange) {\n return neutralLight.color;\n }\n\n return hueRange.getColorForPercentWarmth(percentWarmth);\n}\n\n/**\n * Returns the passed kelvin scale color value to a HEX color string.\n */\nexport function percentWarmthToHexString(percentWarmth: Warmth): string {\n return hslToHex(hslFromPercentWarmth(percentWarmth));\n}\n","/**\n * Represents the different possible states for a dimmer switch.\n */\nexport const UNKNOWN = 'unknown',\n ON = 'on',\n OFF = 'off';\n\nexport type DimmerState = typeof UNKNOWN | typeof ON | typeof OFF;\n\nexport interface DimmerArgs {\n dimPercentage: number;\n dimmerState: string;\n}\n","/**\n * Helper for downloading files.\n *\n * @module\n */\n\n/**\n * Iframe ID used for file download, only used for IE.\n *\n * @type {String}\n */\nconst IFRAME_ID = 'download-file-iframe';\n\n// Static clip counter for image element used for download clip.\nlet clipDownloadId = 0;\n\n/**\n * Attempts to download a file.\n *\n * @param src The url where the file is located.\n * @param [downloadName=''] An optional download name.\n */\nexport function downloadFile(src: string, downloadName = ''): void {\n if (!document) {\n return;\n }\n\n beginFileDownload(src, downloadName);\n}\n\n/**\n * Attempts to download an image file from passed image bytes.\n *\n * @param imageBytes The encoded image bytes, with or without the 'data:image/jpg;base64,' prefix\n * @param [downloadName=''] An optional name for the download when saved on the customer's computer.\n */\nexport function downloadImageFromBytes(imageBytes: string, downloadName = ''): boolean {\n if (!document || !imageBytes) {\n return false;\n }\n\n // Using a blob to download an image:\n // https://stackoverflow.com/questions/10473932/browser-html-force-download-of-image-from-src-dataimage-jpegbase64\n const imageBytesWithoutEncodingPrefix = imageBytes.replace(/^(data:image\\/jpe?g;base64,)/, ''),\n imageDecrypted = atob(imageBytesWithoutEncodingPrefix),\n arrayBuffer = new ArrayBuffer(imageDecrypted.length),\n view = new Uint8Array(arrayBuffer);\n for (let i = 0; i < imageBytes.length; i++) {\n view[i] = imageDecrypted.charCodeAt(i);\n }\n\n const imageBlob = new Blob([arrayBuffer], {\n type: 'application/octet-stream'\n }),\n blobUrl = window.URL.createObjectURL(imageBlob);\n\n beginFileDownload(blobUrl, downloadName);\n\n return true;\n}\n\n/**\n * Uses a canvas to download a cross origin image to the users computer.\n *\n * @param imageUrl The URL of the image to download.\n * @param downloadName The name to use when saving the image file.\n *\n * @returns {Promise}\n */\nexport function downloadCrossOriginImage(imageUrl: string, downloadName: string): Promise<void> {\n return new Promise((resolve, reject) => {\n const imageId = `cross-origin-download-${clipDownloadId++}`,\n fnDone = () => {\n // Is the image in the DOM?\n const image = document.querySelector(`#${imageId}`);\n if (image?.parentNode) {\n // Remove image.\n image.parentNode.removeChild(image);\n }\n },\n fnFail = (ex: any) => {\n fnDone();\n reject(ex);\n };\n\n try {\n const canvas = document.createElement('canvas'),\n image = new Image();\n\n // Configure image.\n image.setAttribute('id', imageId);\n image.setAttribute('crossorigin', 'anonymous');\n image.style.cssText = 'position: absolute;top: -10000px;';\n\n image.onload = function () {\n const { width, height } = <HTMLImageElement>this;\n\n // Configure canvas.\n canvas.width = width;\n canvas.height = height;\n canvas.getContext('2d')?.drawImage(this as CanvasImageSource, 0, 0, width, height);\n\n // Download canvas data URL bytes.\n downloadImageFromBytes(canvas.toDataURL('image/jpeg', 1.0), `${downloadName}.jpg`);\n\n // Clean up and success.\n fnDone();\n resolve();\n };\n\n image.onerror = fnFail;\n\n document.body.appendChild(image);\n image.setAttribute('src', imageUrl);\n } catch (ex) {\n fnFail(ex);\n }\n });\n}\n\n/**\n * Downloads a file directly to the user's computer.\n *\n * @param src The url where the file is located.\n * @param [downloadName=''] An optional download name.\n */\nfunction beginFileDownload(src: string, downloadName = ''): void {\n const anchor = document.createElement('a'),\n body = document.body,\n configureElement = (element: HTMLElement, attributes: Record<string, string>) => {\n element.style.display = 'none';\n Object.keys(attributes).forEach((name) => element.setAttribute(name, attributes[name]));\n };\n\n // Check for support for the download attribute.\n if (anchor.download !== undefined) {\n configureElement(anchor, { href: src, download: downloadName });\n\n // Firefox requires this anchor to be in the DOM for us to be able to click it.\n // It works in Chrome without appending it to the body.\n // Append the anchor and click it to initiate the download.\n body.appendChild(anchor);\n anchor.click();\n\n // Remove the anchor.\n body.removeChild(anchor);\n return;\n }\n\n // Use iframe to perform the download.\n const iframe = document.createElement('iframe');\n configureElement(iframe, {\n src: src,\n id: IFRAME_ID,\n download: downloadName\n });\n\n // Start the download process\n body.appendChild(iframe);\n}\n","import EmberObject from '@ember/object';\n\n// Do not copy this deprecated usage. If you see this, please fix it\n// eslint-disable-next-line ember/no-classic-classes\nexport default EmberObject.extend({\n // region Default Properties\n\n /**\n * The name of the icon to be used for this action item.\n *\n * @type {string}\n */\n icon: '',\n\n /**\n * The title of the icon to be used for this action item.\n *\n * @type {string}\n */\n iconTitle: '',\n\n /**\n * The description of the icon to be used for this action item.\n *\n * @type {string}\n */\n iconDesc: '',\n\n /**\n * Should the icon be hidden for screen readers?\n *\n * @type {boolean}\n */\n iconIsHiddenForAccessibility: false,\n\n /**\n * The name to be rendered in the list for this action item.\n *\n * @type {string}\n */\n name: '',\n\n /**\n * The name of the class to style the action item.\n *\n * @type {string}\n */\n className: '',\n\n /**\n * The description text for this action item.\n */\n description: '',\n\n /**\n * The tooltip text to be rendered when the user hovers the action item.\n *\n * @type {string}\n */\n tooltipText: '',\n\n /**\n * Whether or not this item is disabled. If true, it should not be able to trigger the action.\n *\n * @type {boolean}\n */\n disabled: false,\n\n /**\n * Whether or not the item should appear selected.\n *\n * @type {boolean}\n */\n selected: false,\n\n /**\n * The action function to be executed when the item is activated.\n *\n * @type {undefined|string}\n */\n action: '',\n\n /**\n * The arguments to trigger the action with\n *\n * @type {Array}\n */\n actionArguments: null\n\n // endregion\n});\n","import { HOURS_IN_DAY } from '@adc/ember-utils/constants/time';\n\nexport const SECONDS_IN_MINUTE = 60;\nexport const MINUTES_IN_HOUR = 60;\nexport const MILLISECONDS_IN_SECOND = 1000;\nexport const MILLISECONDS_IN_MINUTE = SECONDS_IN_MINUTE * MILLISECONDS_IN_SECOND;\nexport const MILLISECONDS_IN_HOUR = MINUTES_IN_HOUR * MILLISECONDS_IN_MINUTE;\nexport const HALF_A_DAY_IN_MILLISECONDS = (HOURS_IN_DAY / 2) * MILLISECONDS_IN_HOUR;\nexport const HALF_HOURS_IN_DAY = HOURS_IN_DAY * 2;\n\n/**\n * Checks the given value to determine if it may be time value or not.\n */\nexport function isValidTimeValue(timeValue: number): boolean {\n return !isNaN(timeValue) && timeValue !== null && timeValue >= 0;\n}\n\n/**\n * Tests to see if a native input type is supported.\n */\nfunction testInputType(type: string): boolean {\n const input = document.createElement('input'),\n value = 'a';\n\n input.setAttribute('type', type);\n input.setAttribute('value', value);\n\n return input.value !== value;\n}\n\n/**\n * Indicates that native date input elements are supported.\n */\nexport const isNativeDateInputSupported = testInputType('date');\n\n/**\n * Indicates that native time input elements are supported.\n */\nexport const isNativeTimeInputSupported = testInputType('time');\n","/* eslint-disable */\n/**\n * @fileoverview\n * - Using the 'QRCode for Javascript library'\n * - Fixed dataset of 'QRCode for Javascript library' for support full-spec.\n * - this library has no dependencies.\n *\n * @author davidshimjs\n * @see <a href=\"http://www.d-project.com/\" target=\"_blank\">http://www.d-project.com/</a>\n * @see <a href=\"http://jeromeetienne.github.com/jquery-qrcode/\" target=\"_blank\">http://jeromeetienne.github.com/jquery-qrcode/</a>\n */\nvar QRCode;\n\n(function () {\n //---------------------------------------------------------------------\n // QRCode for JavaScript\n //\n // Copyright (c) 2009 Kazuhiko Arase\n //\n // URL: http://www.d-project.com/\n //\n // Licensed under the MIT license:\n // http://www.opensource.org/licenses/mit-license.php\n //\n // The word \"QR Code\" is registered trademark of\n // DENSO WAVE INCORPORATED\n // http://www.denso-wave.com/qrcode/faqpatent-e.html\n //\n //---------------------------------------------------------------------\n function QR8bitByte(data) {\n this.mode = QRMode.MODE_8BIT_BYTE;\n this.data = data;\n this.parsedData = [];\n\n // Added to support UTF-8 Characters\n for (var i = 0, l = this.data.length; i < l; i++) {\n var byteArray = [];\n var code = this.data.charCodeAt(i);\n\n if (code > 0x10000) {\n byteArray[0] = 0xf0 | ((code & 0x1c0000) >>> 18);\n byteArray[1] = 0x80 | ((code & 0x3f000) >>> 12);\n byteArray[2] = 0x80 | ((code & 0xfc0) >>> 6);\n byteArray[3] = 0x80 | (code & 0x3f);\n } else if (code > 0x800) {\n byteArray[0] = 0xe0 | ((code & 0xf000) >>> 12);\n byteArray[1] = 0x80 | ((code & 0xfc0) >>> 6);\n byteArray[2] = 0x80 | (code & 0x3f);\n } else if (code > 0x80) {\n byteArray[0] = 0xc0 | ((code & 0x7c0) >>> 6);\n byteArray[1] = 0x80 | (code & 0x3f);\n } else {\n byteArray[0] = code;\n }\n\n this.parsedData.push(byteArray);\n }\n\n this.parsedData = Array.prototype.concat.apply([], this.parsedData);\n\n if (this.parsedData.length != this.data.length) {\n this.parsedData.unshift(191);\n this.parsedData.unshift(187);\n this.parsedData.unshift(239);\n }\n }\n\n QR8bitByte.prototype = {\n getLength: function (buffer) {\n return this.parsedData.length;\n },\n write: function (buffer) {\n for (var i = 0, l = this.parsedData.length; i < l; i++) {\n buffer.put(this.parsedData[i], 8);\n }\n }\n };\n\n function QRCodeModel(typeNumber, errorCorrectLevel) {\n this.typeNumber = typeNumber;\n this.errorCorrectLevel = errorCorrectLevel;\n this.modules = null;\n this.moduleCount = 0;\n this.dataCache = null;\n this.dataList = [];\n }\n\n QRCodeModel.prototype = {\n addData: function (data) {\n var newData = new QR8bitByte(data);\n this.dataList.push(newData);\n this.dataCache = null;\n },\n isDark: function (row, col) {\n if (row < 0 || this.moduleCount <= row || col < 0 || this.moduleCount <= col) {\n throw new Error(row + ',' + col);\n }\n return this.modules[row][col];\n },\n getModuleCount: function () {\n return this.moduleCount;\n },\n make: function () {\n this.makeImpl(false, this.getBestMaskPattern());\n },\n makeImpl: function (test, maskPattern) {\n this.moduleCount = this.typeNumber * 4 + 17;\n this.modules = new Array(this.moduleCount);\n for (var row = 0; row < this.moduleCount; row++) {\n this.modules[row] = new Array(this.moduleCount);\n for (var col = 0; col < this.moduleCount; col++) {\n this.modules[row][col] = null;\n }\n }\n this.setupPositionProbePattern(0, 0);\n this.setupPositionProbePattern(this.moduleCount - 7, 0);\n this.setupPositionProbePattern(0, this.moduleCount - 7);\n this.setupPositionAdjustPattern();\n this.setupTimingPattern();\n this.setupTypeInfo(test, maskPattern);\n if (this.typeNumber >= 7) {\n this.setupTypeNumber(test);\n }\n if (this.dataCache == null) {\n this.dataCache = QRCodeModel.createData(this.typeNumber, this.errorCorrectLevel, this.dataList);\n }\n this.mapData(this.dataCache, maskPattern);\n },\n setupPositionProbePattern: function (row, col) {\n for (var r = -1; r <= 7; r++) {\n if (row + r <= -1 || this.moduleCount <= row + r) continue;\n for (var c = -1; c <= 7; c++) {\n if (col + c <= -1 || this.moduleCount <= col + c) continue;\n if (\n (0 <= r && r <= 6 && (c == 0 || c == 6)) ||\n (0 <= c && c <= 6 && (r == 0 || r == 6)) ||\n (2 <= r && r <= 4 && 2 <= c && c <= 4)\n ) {\n this.modules[row + r][col + c] = true;\n } else {\n this.modules[row + r][col + c] = false;\n }\n }\n }\n },\n getBestMaskPattern: function () {\n var minLostPoint = 0;\n var pattern = 0;\n for (var i = 0; i < 8; i++) {\n this.makeImpl(true, i);\n var lostPoint = QRUtil.getLostPoint(this);\n if (i == 0 || minLostPoint > lostPoint) {\n minLostPoint = lostPoint;\n pattern = i;\n }\n }\n return pattern;\n },\n createMovieClip: function (target_mc, instance_name, depth) {\n var qr_mc = target_mc.createEmptyMovieClip(instance_name, depth);\n var cs = 1;\n this.make();\n for (var row = 0; row < this.modules.length; row++) {\n var y = row * cs;\n for (var col = 0; col < this.modules[row].length; col++) {\n var x = col * cs;\n var dark = this.modules[row][col];\n if (dark) {\n qr_mc.beginFill(0, 100);\n qr_mc.moveTo(x, y);\n qr_mc.lineTo(x + cs, y);\n qr_mc.lineTo(x + cs, y + cs);\n qr_mc.lineTo(x, y + cs);\n qr_mc.endFill();\n }\n }\n }\n return qr_mc;\n },\n setupTimingPattern: function () {\n for (var r = 8; r < this.moduleCount - 8; r++) {\n if (this.modules[r][6] != null) {\n continue;\n }\n this.modules[r][6] = r % 2 == 0;\n }\n for (var c = 8; c < this.moduleCount - 8; c++) {\n if (this.modules[6][c] != null) {\n continue;\n }\n this.modules[6][c] = c % 2 == 0;\n }\n },\n setupPositionAdjustPattern: function () {\n var pos = QRUtil.getPatternPosition(this.typeNumber);\n for (var i = 0; i < pos.length; i++) {\n for (var j = 0; j < pos.length; j++) {\n var row = pos[i];\n var col = pos[j];\n if (this.modules[row][col] != null) {\n continue;\n }\n for (var r = -2; r <= 2; r++) {\n for (var c = -2; c <= 2; c++) {\n if (r == -2 || r == 2 || c == -2 || c == 2 || (r == 0 && c == 0)) {\n this.modules[row + r][col + c] = true;\n } else {\n this.modules[row + r][col + c] = false;\n }\n }\n }\n }\n }\n },\n setupTypeNumber: function (test) {\n var bits = QRUtil.getBCHTypeNumber(this.typeNumber);\n for (var i = 0; i < 18; i++) {\n var mod = !test && ((bits >> i) & 1) == 1;\n this.modules[Math.floor(i / 3)][(i % 3) + this.moduleCount - 8 - 3] = mod;\n }\n for (var i = 0; i < 18; i++) {\n var mod = !test && ((bits >> i) & 1) == 1;\n this.modules[(i % 3) + this.moduleCount - 8 - 3][Math.floor(i / 3)] = mod;\n }\n },\n setupTypeInfo: function (test, maskPattern) {\n var data = (this.errorCorrectLevel << 3) | maskPattern;\n var bits = QRUtil.getBCHTypeInfo(data);\n for (var i = 0; i < 15; i++) {\n var mod = !test && ((bits >> i) & 1) == 1;\n if (i < 6) {\n this.modules[i][8] = mod;\n } else if (i < 8) {\n this.modules[i + 1][8] = mod;\n } else {\n this.modules[this.moduleCount - 15 + i][8] = mod;\n }\n }\n for (var i = 0; i < 15; i++) {\n var mod = !test && ((bits >> i) & 1) == 1;\n if (i < 8) {\n this.modules[8][this.moduleCount - i - 1] = mod;\n } else if (i < 9) {\n this.modules[8][15 - i - 1 + 1] = mod;\n } else {\n this.modules[8][15 - i - 1] = mod;\n }\n }\n this.modules[this.moduleCount - 8][8] = !test;\n },\n mapData: function (data, maskPattern) {\n var inc = -1;\n var row = this.moduleCount - 1;\n var bitIndex = 7;\n var byteIndex = 0;\n for (var col = this.moduleCount - 1; col > 0; col -= 2) {\n if (col == 6) col--;\n while (true) {\n for (var c = 0; c < 2; c++) {\n if (this.modules[row][col - c] == null) {\n var dark = false;\n if (byteIndex < data.length) {\n dark = ((data[byteIndex] >>> bitIndex) & 1) == 1;\n }\n var mask = QRUtil.getMask(maskPattern, row, col - c);\n if (mask) {\n dark = !dark;\n }\n this.modules[row][col - c] = dark;\n bitIndex--;\n if (bitIndex == -1) {\n byteIndex++;\n bitIndex = 7;\n }\n }\n }\n row += inc;\n if (row < 0 || this.moduleCount <= row) {\n row -= inc;\n inc = -inc;\n break;\n }\n }\n }\n }\n };\n QRCodeModel.PAD0 = 0xec;\n QRCodeModel.PAD1 = 0x11;\n QRCodeModel.createData = function (typeNumber, errorCorrectLevel, dataList) {\n var rsBlocks = QRRSBlock.getRSBlocks(typeNumber, errorCorrectLevel);\n var buffer = new QRBitBuffer();\n for (var i = 0; i < dataList.length; i++) {\n var data = dataList[i];\n buffer.put(data.mode, 4);\n buffer.put(data.getLength(), QRUtil.getLengthInBits(data.mode, typeNumber));\n data.write(buffer);\n }\n var totalDataCount = 0;\n for (var i = 0; i < rsBlocks.length; i++) {\n totalDataCount += rsBlocks[i].dataCount;\n }\n if (buffer.getLengthInBits() > totalDataCount * 8) {\n throw new Error('code length overflow. (' + buffer.getLengthInBits() + '>' + totalDataCount * 8 + ')');\n }\n if (buffer.getLengthInBits() + 4 <= totalDataCount * 8) {\n buffer.put(0, 4);\n }\n while (buffer.getLengthInBits() % 8 != 0) {\n buffer.putBit(false);\n }\n while (true) {\n if (buffer.getLengthInBits() >= totalDataCount * 8) {\n break;\n }\n buffer.put(QRCodeModel.PAD0, 8);\n if (buffer.getLengthInBits() >= totalDataCount * 8) {\n break;\n }\n buffer.put(QRCodeModel.PAD1, 8);\n }\n return QRCodeModel.createBytes(buffer, rsBlocks);\n };\n QRCodeModel.createBytes = function (buffer, rsBlocks) {\n var offset = 0;\n var maxDcCount = 0;\n var maxEcCount = 0;\n var dcdata = new Array(rsBlocks.length);\n var ecdata = new Array(rsBlocks.length);\n for (var r = 0; r < rsBlocks.length; r++) {\n var dcCount = rsBlocks[r].dataCount;\n var ecCount = rsBlocks[r].totalCount - dcCount;\n maxDcCount = Math.max(maxDcCount, dcCount);\n maxEcCount = Math.max(maxEcCount, ecCount);\n dcdata[r] = new Array(dcCount);\n for (var i = 0; i < dcdata[r].length; i++) {\n dcdata[r][i] = 0xff & buffer.buffer[i + offset];\n }\n offset += dcCount;\n var rsPoly = QRUtil.getErrorCorrectPolynomial(ecCount);\n var rawPoly = new QRPolynomial(dcdata[r], rsPoly.getLength() - 1);\n var modPoly = rawPoly.mod(rsPoly);\n ecdata[r] = new Array(rsPoly.getLength() - 1);\n for (var i = 0; i < ecdata[r].length; i++) {\n var modIndex = i + modPoly.getLength() - ecdata[r].length;\n ecdata[r][i] = modIndex >= 0 ? modPoly.get(modIndex) : 0;\n }\n }\n var totalCodeCount = 0;\n for (var i = 0; i < rsBlocks.length; i++) {\n totalCodeCount += rsBlocks[i].totalCount;\n }\n var data = new Array(totalCodeCount);\n var index = 0;\n for (var i = 0; i < maxDcCount; i++) {\n for (var r = 0; r < rsBlocks.length; r++) {\n if (i < dcdata[r].length) {\n data[index++] = dcdata[r][i];\n }\n }\n }\n for (var i = 0; i < maxEcCount; i++) {\n for (var r = 0; r < rsBlocks.length; r++) {\n if (i < ecdata[r].length) {\n data[index++] = ecdata[r][i];\n }\n }\n }\n return data;\n };\n var QRMode = { MODE_NUMBER: 1 << 0, MODE_ALPHA_NUM: 1 << 1, MODE_8BIT_BYTE: 1 << 2, MODE_KANJI: 1 << 3 };\n var QRErrorCorrectLevel = { L: 1, M: 0, Q: 3, H: 2 };\n var QRMaskPattern = {\n PATTERN000: 0,\n PATTERN001: 1,\n PATTERN010: 2,\n PATTERN011: 3,\n PATTERN100: 4,\n PATTERN101: 5,\n PATTERN110: 6,\n PATTERN111: 7\n };\n var QRUtil = {\n PATTERN_POSITION_TABLE: [\n [],\n [6, 18],\n [6, 22],\n [6, 26],\n [6, 30],\n [6, 34],\n [6, 22, 38],\n [6, 24, 42],\n [6, 26, 46],\n [6, 28, 50],\n [6, 30, 54],\n [6, 32, 58],\n [6, 34, 62],\n [6, 26, 46, 66],\n [6, 26, 48, 70],\n [6, 26, 50, 74],\n [6, 30, 54, 78],\n [6, 30, 56, 82],\n [6, 30, 58, 86],\n [6, 34, 62, 90],\n [6, 28, 50, 72, 94],\n [6, 26, 50, 74, 98],\n [6, 30, 54, 78, 102],\n [6, 28, 54, 80, 106],\n [6, 32, 58, 84, 110],\n [6, 30, 58, 86, 114],\n [6, 34, 62, 90, 118],\n [6, 26, 50, 74, 98, 122],\n [6, 30, 54, 78, 102, 126],\n [6, 26, 52, 78, 104, 130],\n [6, 30, 56, 82, 108, 134],\n [6, 34, 60, 86, 112, 138],\n [6, 30, 58, 86, 114, 142],\n [6, 34, 62, 90, 118, 146],\n [6, 30, 54, 78, 102, 126, 150],\n [6, 24, 50, 76, 102, 128, 154],\n [6, 28, 54, 80, 106, 132, 158],\n [6, 32, 58, 84, 110, 136, 162],\n [6, 26, 54, 82, 110, 138, 166],\n [6, 30, 58, 86, 114, 142, 170]\n ],\n G15: (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0),\n G18: (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0),\n G15_MASK: (1 << 14) | (1 << 12) | (1 << 10) | (1 << 4) | (1 << 1),\n getBCHTypeInfo: function (data) {\n var d = data << 10;\n while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15) >= 0) {\n d ^= QRUtil.G15 << (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15));\n }\n return ((data << 10) | d) ^ QRUtil.G15_MASK;\n },\n getBCHTypeNumber: function (data) {\n var d = data << 12;\n while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18) >= 0) {\n d ^= QRUtil.G18 << (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18));\n }\n return (data << 12) | d;\n },\n getBCHDigit: function (data) {\n var digit = 0;\n while (data != 0) {\n digit++;\n data >>>= 1;\n }\n return digit;\n },\n getPatternPosition: function (typeNumber) {\n return QRUtil.PATTERN_POSITION_TABLE[typeNumber - 1];\n },\n getMask: function (maskPattern, i, j) {\n switch (maskPattern) {\n case QRMaskPattern.PATTERN000:\n return (i + j) % 2 == 0;\n case QRMaskPattern.PATTERN001:\n return i % 2 == 0;\n case QRMaskPattern.PATTERN010:\n return j % 3 == 0;\n case QRMaskPattern.PATTERN011:\n return (i + j) % 3 == 0;\n case QRMaskPattern.PATTERN100:\n return (Math.floor(i / 2) + Math.floor(j / 3)) % 2 == 0;\n case QRMaskPattern.PATTERN101:\n return ((i * j) % 2) + ((i * j) % 3) == 0;\n case QRMaskPattern.PATTERN110:\n return (((i * j) % 2) + ((i * j) % 3)) % 2 == 0;\n case QRMaskPattern.PATTERN111:\n return (((i * j) % 3) + ((i + j) % 2)) % 2 == 0;\n default:\n throw new Error('bad maskPattern:' + maskPattern);\n }\n },\n getErrorCorrectPolynomial: function (errorCorrectLength) {\n var a = new QRPolynomial([1], 0);\n for (var i = 0; i < errorCorrectLength; i++) {\n a = a.multiply(new QRPolynomial([1, QRMath.gexp(i)], 0));\n }\n return a;\n },\n getLengthInBits: function (mode, type) {\n if (1 <= type && type < 10) {\n switch (mode) {\n case QRMode.MODE_NUMBER:\n return 10;\n case QRMode.MODE_ALPHA_NUM:\n return 9;\n case QRMode.MODE_8BIT_BYTE:\n return 8;\n case QRMode.MODE_KANJI:\n return 8;\n default:\n throw new Error('mode:' + mode);\n }\n } else if (type < 27) {\n switch (mode) {\n case QRMode.MODE_NUMBER:\n return 12;\n case QRMode.MODE_ALPHA_NUM:\n return 11;\n case QRMode.MODE_8BIT_BYTE:\n return 16;\n case QRMode.MODE_KANJI:\n return 10;\n default:\n throw new Error('mode:' + mode);\n }\n } else if (type < 41) {\n switch (mode) {\n case QRMode.MODE_NUMBER:\n return 14;\n case QRMode.MODE_ALPHA_NUM:\n return 13;\n case QRMode.MODE_8BIT_BYTE:\n return 16;\n case QRMode.MODE_KANJI:\n return 12;\n default:\n throw new Error('mode:' + mode);\n }\n } else {\n throw new Error('type:' + type);\n }\n },\n getLostPoint: function (qrCode) {\n var moduleCount = qrCode.getModuleCount();\n var lostPoint = 0;\n for (var row = 0; row < moduleCount; row++) {\n for (var col = 0; col < moduleCount; col++) {\n var sameCount = 0;\n var dark = qrCode.isDark(row, col);\n for (var r = -1; r <= 1; r++) {\n if (row + r < 0 || moduleCount <= row + r) {\n continue;\n }\n for (var c = -1; c <= 1; c++) {\n if (col + c < 0 || moduleCount <= col + c) {\n continue;\n }\n if (r == 0 && c == 0) {\n continue;\n }\n if (dark == qrCode.isDark(row + r, col + c)) {\n sameCount++;\n }\n }\n }\n if (sameCount > 5) {\n lostPoint += 3 + sameCount - 5;\n }\n }\n }\n for (var row = 0; row < moduleCount - 1; row++) {\n for (var col = 0; col < moduleCount - 1; col++) {\n var count = 0;\n if (qrCode.isDark(row, col)) count++;\n if (qrCode.isDark(row + 1, col)) count++;\n if (qrCode.isDark(row, col + 1)) count++;\n if (qrCode.isDark(row + 1, col + 1)) count++;\n if (count == 0 || count == 4) {\n lostPoint += 3;\n }\n }\n }\n for (var row = 0; row < moduleCount; row++) {\n for (var col = 0; col < moduleCount - 6; col++) {\n if (\n qrCode.isDark(row, col) &&\n !qrCode.isDark(row, col + 1) &&\n qrCode.isDark(row, col + 2) &&\n qrCode.isDark(row, col + 3) &&\n qrCode.isDark(row, col + 4) &&\n !qrCode.isDark(row, col + 5) &&\n qrCode.isDark(row, col + 6)\n ) {\n lostPoint += 40;\n }\n }\n }\n for (var col = 0; col < moduleCount; col++) {\n for (var row = 0; row < moduleCount - 6; row++) {\n if (\n qrCode.isDark(row, col) &&\n !qrCode.isDark(row + 1, col) &&\n qrCode.isDark(row + 2, col) &&\n qrCode.isDark(row + 3, col) &&\n qrCode.isDark(row + 4, col) &&\n !qrCode.isDark(row + 5, col) &&\n qrCode.isDark(row + 6, col)\n ) {\n lostPoint += 40;\n }\n }\n }\n var darkCount = 0;\n for (var col = 0; col < moduleCount; col++) {\n for (var row = 0; row < moduleCount; row++) {\n if (qrCode.isDark(row, col)) {\n darkCount++;\n }\n }\n }\n var ratio = Math.abs((100 * darkCount) / moduleCount / moduleCount - 50) / 5;\n lostPoint += ratio * 10;\n return lostPoint;\n }\n };\n var QRMath = {\n glog: function (n) {\n if (n < 1) {\n throw new Error('glog(' + n + ')');\n }\n return QRMath.LOG_TABLE[n];\n },\n gexp: function (n) {\n while (n < 0) {\n n += 255;\n }\n while (n >= 256) {\n n -= 255;\n }\n return QRMath.EXP_TABLE[n];\n },\n EXP_TABLE: new Array(256),\n LOG_TABLE: new Array(256)\n };\n for (var i = 0; i < 8; i++) {\n QRMath.EXP_TABLE[i] = 1 << i;\n }\n for (var i = 8; i < 256; i++) {\n QRMath.EXP_TABLE[i] =\n QRMath.EXP_TABLE[i - 4] ^ QRMath.EXP_TABLE[i - 5] ^ QRMath.EXP_TABLE[i - 6] ^ QRMath.EXP_TABLE[i - 8];\n }\n for (var i = 0; i < 255; i++) {\n QRMath.LOG_TABLE[QRMath.EXP_TABLE[i]] = i;\n }\n function QRPolynomial(num, shift) {\n if (num.length == undefined) {\n throw new Error(num.length + '/' + shift);\n }\n var offset = 0;\n while (offset < num.length && num[offset] == 0) {\n offset++;\n }\n this.num = new Array(num.length - offset + shift);\n for (var i = 0; i < num.length - offset; i++) {\n this.num[i] = num[i + offset];\n }\n }\n QRPolynomial.prototype = {\n get: function (index) {\n return this.num[index];\n },\n getLength: function () {\n return this.num.length;\n },\n multiply: function (e) {\n var num = new Array(this.getLength() + e.getLength() - 1);\n for (var i = 0; i < this.getLength(); i++) {\n for (var j = 0; j < e.getLength(); j++) {\n num[i + j] ^= QRMath.gexp(QRMath.glog(this.get(i)) + QRMath.glog(e.get(j)));\n }\n }\n return new QRPolynomial(num, 0);\n },\n mod: function (e) {\n if (this.getLength() - e.getLength() < 0) {\n return this;\n }\n var ratio = QRMath.glog(this.get(0)) - QRMath.glog(e.get(0));\n var num = new Array(this.getLength());\n for (var i = 0; i < this.getLength(); i++) {\n num[i] = this.get(i);\n }\n for (var i = 0; i < e.getLength(); i++) {\n num[i] ^= QRMath.gexp(QRMath.glog(e.get(i)) + ratio);\n }\n return new QRPolynomial(num, 0).mod(e);\n }\n };\n function QRRSBlock(totalCount, dataCount) {\n this.totalCount = totalCount;\n this.dataCount = dataCount;\n }\n QRRSBlock.RS_BLOCK_TABLE = [\n [1, 26, 19],\n [1, 26, 16],\n [1, 26, 13],\n [1, 26, 9],\n [1, 44, 34],\n [1, 44, 28],\n [1, 44, 22],\n [1, 44, 16],\n [1, 70, 55],\n [1, 70, 44],\n [2, 35, 17],\n [2, 35, 13],\n [1, 100, 80],\n [2, 50, 32],\n [2, 50, 24],\n [4, 25, 9],\n [1, 134, 108],\n [2, 67, 43],\n [2, 33, 15, 2, 34, 16],\n [2, 33, 11, 2, 34, 12],\n [2, 86, 68],\n [4, 43, 27],\n [4, 43, 19],\n [4, 43, 15],\n [2, 98, 78],\n [4, 49, 31],\n [2, 32, 14, 4, 33, 15],\n [4, 39, 13, 1, 40, 14],\n [2, 121, 97],\n [2, 60, 38, 2, 61, 39],\n [4, 40, 18, 2, 41, 19],\n [4, 40, 14, 2, 41, 15],\n [2, 146, 116],\n [3, 58, 36, 2, 59, 37],\n [4, 36, 16, 4, 37, 17],\n [4, 36, 12, 4, 37, 13],\n [2, 86, 68, 2, 87, 69],\n [4, 69, 43, 1, 70, 44],\n [6, 43, 19, 2, 44, 20],\n [6, 43, 15, 2, 44, 16],\n [4, 101, 81],\n [1, 80, 50, 4, 81, 51],\n [4, 50, 22, 4, 51, 23],\n [3, 36, 12, 8, 37, 13],\n [2, 116, 92, 2, 117, 93],\n [6, 58, 36, 2, 59, 37],\n [4, 46, 20, 6, 47, 21],\n [7, 42, 14, 4, 43, 15],\n [4, 133, 107],\n [8, 59, 37, 1, 60, 38],\n [8, 44, 20, 4, 45, 21],\n [12, 33, 11, 4, 34, 12],\n [3, 145, 115, 1, 146, 116],\n [4, 64, 40, 5, 65, 41],\n [11, 36, 16, 5, 37, 17],\n [11, 36, 12, 5, 37, 13],\n [5, 109, 87, 1, 110, 88],\n [5, 65, 41, 5, 66, 42],\n [5, 54, 24, 7, 55, 25],\n [11, 36, 12],\n [5, 122, 98, 1, 123, 99],\n [7, 73, 45, 3, 74, 46],\n [15, 43, 19, 2, 44, 20],\n [3, 45, 15, 13, 46, 16],\n [1, 135, 107, 5, 136, 108],\n [10, 74, 46, 1, 75, 47],\n [1, 50, 22, 15, 51, 23],\n [2, 42, 14, 17, 43, 15],\n [5, 150, 120, 1, 151, 121],\n [9, 69, 43, 4, 70, 44],\n [17, 50, 22, 1, 51, 23],\n [2, 42, 14, 19, 43, 15],\n [3, 141, 113, 4, 142, 114],\n [3, 70, 44, 11, 71, 45],\n [17, 47, 21, 4, 48, 22],\n [9, 39, 13, 16, 40, 14],\n [3, 135, 107, 5, 136, 108],\n [3, 67, 41, 13, 68, 42],\n [15, 54, 24, 5, 55, 25],\n [15, 43, 15, 10, 44, 16],\n [4, 144, 116, 4, 145, 117],\n [17, 68, 42],\n [17, 50, 22, 6, 51, 23],\n [19, 46, 16, 6, 47, 17],\n [2, 139, 111, 7, 140, 112],\n [17, 74, 46],\n [7, 54, 24, 16, 55, 25],\n [34, 37, 13],\n [4, 151, 121, 5, 152, 122],\n [4, 75, 47, 14, 76, 48],\n [11, 54, 24, 14, 55, 25],\n [16, 45, 15, 14, 46, 16],\n [6, 147, 117, 4, 148, 118],\n [6, 73, 45, 14, 74, 46],\n [11, 54, 24, 16, 55, 25],\n [30, 46, 16, 2, 47, 17],\n [8, 132, 106, 4, 133, 107],\n [8, 75, 47, 13, 76, 48],\n [7, 54, 24, 22, 55, 25],\n [22, 45, 15, 13, 46, 16],\n [10, 142, 114, 2, 143, 115],\n [19, 74, 46, 4, 75, 47],\n [28, 50, 22, 6, 51, 23],\n [33, 46, 16, 4, 47, 17],\n [8, 152, 122, 4, 153, 123],\n [22, 73, 45, 3, 74, 46],\n [8, 53, 23, 26, 54, 24],\n [12, 45, 15, 28, 46, 16],\n [3, 147, 117, 10, 148, 118],\n [3, 73, 45, 23, 74, 46],\n [4, 54, 24, 31, 55, 25],\n [11, 45, 15, 31, 46, 16],\n [7, 146, 116, 7, 147, 117],\n [21, 73, 45, 7, 74, 46],\n [1, 53, 23, 37, 54, 24],\n [19, 45, 15, 26, 46, 16],\n [5, 145, 115, 10, 146, 116],\n [19, 75, 47, 10, 76, 48],\n [15, 54, 24, 25, 55, 25],\n [23, 45, 15, 25, 46, 16],\n [13, 145, 115, 3, 146, 116],\n [2, 74, 46, 29, 75, 47],\n [42, 54, 24, 1, 55, 25],\n [23, 45, 15, 28, 46, 16],\n [17, 145, 115],\n [10, 74, 46, 23, 75, 47],\n [10, 54, 24, 35, 55, 25],\n [19, 45, 15, 35, 46, 16],\n [17, 145, 115, 1, 146, 116],\n [14, 74, 46, 21, 75, 47],\n [29, 54, 24, 19, 55, 25],\n [11, 45, 15, 46, 46, 16],\n [13, 145, 115, 6, 146, 116],\n [14, 74, 46, 23, 75, 47],\n [44, 54, 24, 7, 55, 25],\n [59, 46, 16, 1, 47, 17],\n [12, 151, 121, 7, 152, 122],\n [12, 75, 47, 26, 76, 48],\n [39, 54, 24, 14, 55, 25],\n [22, 45, 15, 41, 46, 16],\n [6, 151, 121, 14, 152, 122],\n [6, 75, 47, 34, 76, 48],\n [46, 54, 24, 10, 55, 25],\n [2, 45, 15, 64, 46, 16],\n [17, 152, 122, 4, 153, 123],\n [29, 74, 46, 14, 75, 47],\n [49, 54, 24, 10, 55, 25],\n [24, 45, 15, 46, 46, 16],\n [4, 152, 122, 18, 153, 123],\n [13, 74, 46, 32, 75, 47],\n [48, 54, 24, 14, 55, 25],\n [42, 45, 15, 32, 46, 16],\n [20, 147, 117, 4, 148, 118],\n [40, 75, 47, 7, 76, 48],\n [43, 54, 24, 22, 55, 25],\n [10, 45, 15, 67, 46, 16],\n [19, 148, 118, 6, 149, 119],\n [18, 75, 47, 31, 76, 48],\n [34, 54, 24, 34, 55, 25],\n [20, 45, 15, 61, 46, 16]\n ];\n QRRSBlock.getRSBlocks = function (typeNumber, errorCorrectLevel) {\n var rsBlock = QRRSBlock.getRsBlockTable(typeNumber, errorCorrectLevel);\n if (rsBlock == undefined) {\n throw new Error('bad rs block @ typeNumber:' + typeNumber + '/errorCorrectLevel:' + errorCorrectLevel);\n }\n var length = rsBlock.length / 3;\n var list = [];\n for (var i = 0; i < length; i++) {\n var count = rsBlock[i * 3 + 0];\n var totalCount = rsBlock[i * 3 + 1];\n var dataCount = rsBlock[i * 3 + 2];\n for (var j = 0; j < count; j++) {\n list.push(new QRRSBlock(totalCount, dataCount));\n }\n }\n return list;\n };\n QRRSBlock.getRsBlockTable = function (typeNumber, errorCorrectLevel) {\n switch (errorCorrectLevel) {\n case QRErrorCorrectLevel.L:\n return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 0];\n case QRErrorCorrectLevel.M:\n return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 1];\n case QRErrorCorrectLevel.Q:\n return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 2];\n case QRErrorCorrectLevel.H:\n return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 3];\n default:\n return undefined;\n }\n };\n function QRBitBuffer() {\n this.buffer = [];\n this.length = 0;\n }\n QRBitBuffer.prototype = {\n get: function (index) {\n var bufIndex = Math.floor(index / 8);\n return ((this.buffer[bufIndex] >>> (7 - (index % 8))) & 1) == 1;\n },\n put: function (num, length) {\n for (var i = 0; i < length; i++) {\n this.putBit(((num >>> (length - i - 1)) & 1) == 1);\n }\n },\n getLengthInBits: function () {\n return this.length;\n },\n putBit: function (bit) {\n var bufIndex = Math.floor(this.length / 8);\n if (this.buffer.length <= bufIndex) {\n this.buffer.push(0);\n }\n if (bit) {\n this.buffer[bufIndex] |= 0x80 >>> this.length % 8;\n }\n this.length++;\n }\n };\n var QRCodeLimitLength = [\n [17, 14, 11, 7],\n [32, 26, 20, 14],\n [53, 42, 32, 24],\n [78, 62, 46, 34],\n [106, 84, 60, 44],\n [134, 106, 74, 58],\n [154, 122, 86, 64],\n [192, 152, 108, 84],\n [230, 180, 130, 98],\n [271, 213, 151, 119],\n [321, 251, 177, 137],\n [367, 287, 203, 155],\n [425, 331, 241, 177],\n [458, 362, 258, 194],\n [520, 412, 292, 220],\n [586, 450, 322, 250],\n [644, 504, 364, 280],\n [718, 560, 394, 310],\n [792, 624, 442, 338],\n [858, 666, 482, 382],\n [929, 711, 509, 403],\n [1003, 779, 565, 439],\n [1091, 857, 611, 461],\n [1171, 911, 661, 511],\n [1273, 997, 715, 535],\n [1367, 1059, 751, 593],\n [1465, 1125, 805, 625],\n [1528, 1190, 868, 658],\n [1628, 1264, 908, 698],\n [1732, 1370, 982, 742],\n [1840, 1452, 1030, 790],\n [1952, 1538, 1112, 842],\n [2068, 1628, 1168, 898],\n [2188, 1722, 1228, 958],\n [2303, 1809, 1283, 983],\n [2431, 1911, 1351, 1051],\n [2563, 1989, 1423, 1093],\n [2699, 2099, 1499, 1139],\n [2809, 2213, 1579, 1219],\n [2953, 2331, 1663, 1273]\n ];\n\n function _isSupportCanvas() {\n return typeof CanvasRenderingContext2D != 'undefined';\n }\n\n // android 2.x doesn't support Data-URI spec\n function _getAndroid() {\n var android = false;\n var sAgent = navigator.userAgent;\n\n if (/android/i.test(sAgent)) {\n // android\n android = true;\n var aMat = sAgent.toString().match(/android ([0-9]\\.[0-9])/i);\n\n if (aMat && aMat[1]) {\n android = parseFloat(aMat[1]);\n }\n }\n\n return android;\n }\n\n var svgDrawer = (function () {\n var Drawing = function (el, htOption) {\n this._el = el;\n this._htOption = htOption;\n };\n\n Drawing.prototype.draw = function (oQRCode) {\n var _htOption = this._htOption;\n var _el = this._el;\n var nCount = oQRCode.getModuleCount();\n var nWidth = Math.floor(_htOption.width / nCount);\n var nHeight = Math.floor(_htOption.height / nCount);\n\n this.clear();\n\n function makeSVG(tag, attrs) {\n var el = document.createElementNS('http://www.w3.org/2000/svg', tag);\n for (var k in attrs) if (attrs.hasOwnProperty(k)) el.setAttribute(k, attrs[k]);\n return el;\n }\n\n var svg = makeSVG('svg', {\n viewBox: '0 0 ' + String(nCount) + ' ' + String(nCount),\n width: '100%',\n height: '100%',\n fill: _htOption.colorLight\n });\n svg.setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xlink', 'http://www.w3.org/1999/xlink');\n _el.appendChild(svg);\n\n svg.appendChild(makeSVG('rect', { fill: _htOption.colorLight, width: '100%', height: '100%' }));\n svg.appendChild(makeSVG('rect', { fill: _htOption.colorDark, width: '1', height: '1', id: 'template' }));\n\n for (var row = 0; row < nCount; row++) {\n for (var col = 0; col < nCount; col++) {\n if (oQRCode.isDark(row, col)) {\n var child = makeSVG('use', { x: String(col), y: String(row) });\n child.setAttributeNS('http://www.w3.org/1999/xlink', 'href', '#template');\n svg.appendChild(child);\n }\n }\n }\n };\n Drawing.prototype.clear = function () {\n while (this._el.hasChildNodes()) this._el.removeChild(this._el.lastChild);\n };\n return Drawing;\n })();\n\n var useSVG = document.documentElement.tagName.toLowerCase() === 'svg';\n\n // Drawing in DOM by using Table tag\n var Drawing = useSVG\n ? svgDrawer\n : !_isSupportCanvas()\n ? (function () {\n var Drawing = function (el, htOption) {\n this._el = el;\n this._htOption = htOption;\n };\n\n /**\n * Draw the QRCode\n *\n * @param {QRCode} oQRCode\n */\n Drawing.prototype.draw = function (oQRCode) {\n var _htOption = this._htOption;\n var _el = this._el;\n var nCount = oQRCode.getModuleCount();\n var nWidth = Math.floor(_htOption.width / nCount);\n var nHeight = Math.floor(_htOption.height / nCount);\n var aHTML = ['<table style=\"border:0;border-collapse:collapse;\">'];\n\n for (var row = 0; row < nCount; row++) {\n aHTML.push('<tr>');\n\n for (var col = 0; col < nCount; col++) {\n aHTML.push(\n '<td style=\"border:0;border-collapse:collapse;padding:0;margin:0;width:' +\n nWidth +\n 'px;height:' +\n nHeight +\n 'px;background-color:' +\n (oQRCode.isDark(row, col) ? _htOption.colorDark : _htOption.colorLight) +\n ';\"></td>'\n );\n }\n\n aHTML.push('</tr>');\n }\n\n aHTML.push('</table>');\n _el.innerHTML = aHTML.join('');\n\n // Fix the margin values as real size.\n var elTable = _el.childNodes[0];\n var nLeftMarginTable = (_htOption.width - elTable.offsetWidth) / 2;\n var nTopMarginTable = (_htOption.height - elTable.offsetHeight) / 2;\n\n if (nLeftMarginTable > 0 && nTopMarginTable > 0) {\n elTable.style.margin = nTopMarginTable + 'px ' + nLeftMarginTable + 'px';\n }\n };\n\n /**\n * Clear the QRCode\n */\n Drawing.prototype.clear = function () {\n this._el.innerHTML = '';\n };\n\n return Drawing;\n })()\n : (function () {\n // Drawing in Canvas\n function _onMakeImage() {\n this._elImage.src = this._elCanvas.toDataURL('image/png');\n this._elImage.style.display = 'block';\n this._elCanvas.style.display = 'none';\n }\n\n // Android 2.1 bug workaround\n // http://code.google.com/p/android/issues/detail?id=5141\n if (this._android && this._android <= 2.1) {\n var factor = 1 / window.devicePixelRatio;\n var drawImage = CanvasRenderingContext2D.prototype.drawImage;\n CanvasRenderingContext2D.prototype.drawImage = function (image, sx, sy, sw, sh, dx, dy, dw, dh) {\n if ('nodeName' in image && /img/i.test(image.nodeName)) {\n for (var i = arguments.length - 1; i >= 1; i--) {\n arguments[i] = arguments[i] * factor;\n }\n } else if (typeof dw == 'undefined') {\n arguments[1] *= factor;\n arguments[2] *= factor;\n arguments[3] *= factor;\n arguments[4] *= factor;\n }\n\n drawImage.apply(this, arguments);\n };\n }\n\n /**\n * Check whether the user's browser supports Data URI or not\n *\n * @private\n * @param {Function} fSuccess Occurs if it supports Data URI\n * @param {Function} fFail Occurs if it doesn't support Data URI\n */\n function _safeSetDataURI(fSuccess, fFail) {\n var self = this;\n self._fFail = fFail;\n self._fSuccess = fSuccess;\n\n // Check it just once\n if (self._bSupportDataURI === null) {\n var el = document.createElement('img');\n var fOnError = function () {\n self._bSupportDataURI = false;\n\n if (self._fFail) {\n self._fFail.call(self);\n }\n };\n var fOnSuccess = function () {\n self._bSupportDataURI = true;\n\n if (self._fSuccess) {\n self._fSuccess.call(self);\n }\n };\n\n el.onabort = fOnError;\n el.onerror = fOnError;\n el.onload = fOnSuccess;\n el.src =\n 'data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=='; // the Image contains 1px data.\n return;\n } else if (self._bSupportDataURI === true && self._fSuccess) {\n self._fSuccess.call(self);\n } else if (self._bSupportDataURI === false && self._fFail) {\n self._fFail.call(self);\n }\n }\n\n /**\n * Drawing QRCode by using canvas\n *\n * @constructor\n * @param {HTMLElement} el\n * @param {Object} htOption QRCode Options\n */\n var Drawing = function (el, htOption) {\n this._bIsPainted = false;\n this._android = _getAndroid();\n\n this._htOption = htOption;\n this._elCanvas = document.createElement('canvas');\n this._elCanvas.width = htOption.width;\n this._elCanvas.height = htOption.height;\n el.appendChild(this._elCanvas);\n this._el = el;\n this._oContext = this._elCanvas.getContext('2d');\n this._bIsPainted = false;\n this._elImage = document.createElement('img');\n this._elImage.alt = 'Scan me!';\n this._elImage.style.display = 'none';\n this._el.appendChild(this._elImage);\n this._bSupportDataURI = null;\n };\n\n /**\n * Draw the QRCode\n *\n * @param {QRCode} oQRCode\n */\n Drawing.prototype.draw = function (oQRCode) {\n var _elImage = this._elImage;\n var _oContext = this._oContext;\n var _htOption = this._htOption;\n\n var nCount = oQRCode.getModuleCount();\n var nWidth = _htOption.width / nCount;\n var nHeight = _htOption.height / nCount;\n var nRoundedWidth = Math.round(nWidth);\n var nRoundedHeight = Math.round(nHeight);\n\n _elImage.style.display = 'none';\n this.clear();\n\n for (var row = 0; row < nCount; row++) {\n for (var col = 0; col < nCount; col++) {\n var bIsDark = oQRCode.isDark(row, col);\n var nLeft = col * nWidth;\n var nTop = row * nHeight;\n _oContext.strokeStyle = bIsDark ? _htOption.colorDark : _htOption.colorLight;\n _oContext.lineWidth = 1;\n _oContext.fillStyle = bIsDark ? _htOption.colorDark : _htOption.colorLight;\n _oContext.fillRect(nLeft, nTop, nWidth, nHeight);\n\n // 안티 앨리어싱 방지 처리\n _oContext.strokeRect(\n Math.floor(nLeft) + 0.5,\n Math.floor(nTop) + 0.5,\n nRoundedWidth,\n nRoundedHeight\n );\n\n _oContext.strokeRect(\n Math.ceil(nLeft) - 0.5,\n Math.ceil(nTop) - 0.5,\n nRoundedWidth,\n nRoundedHeight\n );\n }\n }\n\n this._bIsPainted = true;\n };\n\n /**\n * Make the image from Canvas if the browser supports Data URI.\n */\n Drawing.prototype.makeImage = function () {\n if (this._bIsPainted) {\n _safeSetDataURI.call(this, _onMakeImage);\n }\n };\n\n /**\n * Return whether the QRCode is painted or not\n *\n * @return {Boolean}\n */\n Drawing.prototype.isPainted = function () {\n return this._bIsPainted;\n };\n\n /**\n * Clear the QRCode\n */\n Drawing.prototype.clear = function () {\n this._oContext.clearRect(0, 0, this._elCanvas.width, this._elCanvas.height);\n this._bIsPainted = false;\n };\n\n /**\n * @private\n * @param {Number} nNumber\n */\n Drawing.prototype.round = function (nNumber) {\n if (!nNumber) {\n return nNumber;\n }\n\n return Math.floor(nNumber * 1000) / 1000;\n };\n\n return Drawing;\n })();\n\n /**\n * Get the type by string length\n *\n * @private\n * @param {String} sText\n * @param {Number} nCorrectLevel\n * @return {Number} type\n */\n function _getTypeNumber(sText, nCorrectLevel) {\n var nType = 1;\n var length = _getUTF8Length(sText);\n\n for (var i = 0, len = QRCodeLimitLength.length; i <= len; i++) {\n var nLimit = 0;\n\n switch (nCorrectLevel) {\n case QRErrorCorrectLevel.L:\n nLimit = QRCodeLimitLength[i][0];\n break;\n case QRErrorCorrectLevel.M:\n nLimit = QRCodeLimitLength[i][1];\n break;\n case QRErrorCorrectLevel.Q:\n nLimit = QRCodeLimitLength[i][2];\n break;\n case QRErrorCorrectLevel.H:\n nLimit = QRCodeLimitLength[i][3];\n break;\n }\n\n if (length <= nLimit) {\n break;\n } else {\n nType++;\n }\n }\n\n if (nType > QRCodeLimitLength.length) {\n throw new Error('Too long data');\n }\n\n return nType;\n }\n\n function _getUTF8Length(sText) {\n var replacedText = encodeURI(sText)\n .toString()\n .replace(/\\%[0-9a-fA-F]{2}/g, 'a');\n return replacedText.length + (replacedText.length != sText ? 3 : 0);\n }\n\n /**\n * @class QRCode\n * @constructor\n * @example\n * new QRCode(document.getElementById(\"test\"), \"http://jindo.dev.naver.com/collie\");\n *\n * @example\n * var oQRCode = new QRCode(\"test\", {\n * text : \"http://naver.com\",\n * width : 128,\n * height : 128\n * });\n *\n * oQRCode.clear(); // Clear the QRCode.\n * oQRCode.makeCode(\"http://map.naver.com\"); // Re-create the QRCode.\n *\n * @param {HTMLElement|String} el target element or 'id' attribute of element.\n * @param {Object|String} vOption\n * @param {String} vOption.text QRCode link data\n * @param {Number} [vOption.width=256]\n * @param {Number} [vOption.height=256]\n * @param {String} [vOption.colorDark=\"#000000\"]\n * @param {String} [vOption.colorLight=\"#ffffff\"]\n * @param {QRCode.CorrectLevel} [vOption.correctLevel=QRCode.CorrectLevel.H] [L|M|Q|H]\n */\n QRCode = function (el, vOption) {\n this._htOption = {\n width: 256,\n height: 256,\n typeNumber: 4,\n colorDark: '#000000',\n colorLight: '#ffffff',\n correctLevel: QRErrorCorrectLevel.H\n };\n\n if (typeof vOption === 'string') {\n vOption = {\n text: vOption\n };\n }\n\n // Overwrites options\n if (vOption) {\n for (var i in vOption) {\n this._htOption[i] = vOption[i];\n }\n }\n\n if (typeof el == 'string') {\n el = document.getElementById(el);\n }\n\n if (this._htOption.useSVG) {\n Drawing = svgDrawer;\n }\n\n this._android = _getAndroid();\n this._el = el;\n this._oQRCode = null;\n this._oDrawing = new Drawing(this._el, this._htOption);\n\n if (this._htOption.text) {\n this.makeCode(this._htOption.text);\n }\n };\n\n /**\n * Make the QRCode\n *\n * @param {String} sText link data\n */\n QRCode.prototype.makeCode = function (sText) {\n this._oQRCode = new QRCodeModel(\n _getTypeNumber(sText, this._htOption.correctLevel),\n this._htOption.correctLevel\n );\n this._oQRCode.addData(sText);\n this._oQRCode.make();\n this._el.title = sText;\n this._oDrawing.draw(this._oQRCode);\n this.makeImage();\n };\n\n /**\n * Make the Image from Canvas element\n * - It occurs automatically\n * - Android below 3 doesn't support Data-URI spec.\n *\n * @private\n */\n QRCode.prototype.makeImage = function () {\n if (typeof this._oDrawing.makeImage == 'function' && (!this._android || this._android >= 3)) {\n this._oDrawing.makeImage();\n }\n };\n\n /**\n * Clear the QRCode\n */\n QRCode.prototype.clear = function () {\n this._oDrawing.clear();\n };\n\n /**\n * @name QRCode.CorrectLevel\n */\n QRCode.CorrectLevel = QRErrorCorrectLevel;\n})();\n\n(function () {\n /* globals define, qrcode */\n\n function generateModule(name, values) {\n define(name, [], function () {\n 'use strict';\n\n return values;\n });\n }\n\n generateModule('qrcode', { default: QRCode });\n})();\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{! template-lint-disable no-invalid-interactive }}\\n<div\\n class=\\\"ptz-ui\\\"\\n {{on \\\"mousemove\\\" this.setCursorPosition}}\\n {{on \\\"mouseleave\\\" (fn this.setCursorPosition undefined)}}\\n {{did-update (fn this.setCursorPosition undefined) @controlRect}}\\n ...attributes\\n>\\n {{#if this.cursorPosition}}\\n <div class=\\\"center-indicator\\\" />\\n <div class=\\\"cursor-circle {{if @isMovingPtz \\'active\\'}}\\\" style={{this.cursorStyle}}>\\n <SvgSymbol @icon=\\\"view-360-cursor-arrow\\\" class=\\\"cursor-arrow\\\" style={{this.svgTransform}} />\\n </div>\\n {{/if}}\\n\\n {{yield}}\\n</div>\")","import Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { action } from '@ember/object';\nimport { htmlSafe } from '@ember/template';\nimport { CenterOffset } from './overlay.ts';\n\nimport type { SafeString } from '@ember/template';\nimport type { CoordinateProps } from '../../utils/fisheye-utils.ts';\n\n/** The degrees between each rotation */\nconst Scale = 5;\n/** The number of rotations */\nconst Segments = 360 / 5;\n\ninterface OespPtzUiSignature {\n Element: HTMLDivElement;\n Args: {\n /** The rect for the overlay (this has the same bounds) */\n controlRect?: DOMRect;\n /** Center coordinates of the video pane minus an offset */\n center: CoordinateProps;\n /** Is the user moving ptz? */\n isMovingPtz: boolean;\n };\n Blocks: {\n default: [];\n };\n}\n\n/**\n * The UI for the OespPtz::Overlay consisting of circle to indicate the\n * center of the overlay and a custom cursor.\n */\nexport default class OespPtzUi extends Component<OespPtzUiSignature> {\n /**\n * Cached degree rotations to reuse.\n */\n readonly degrees = new Array(Segments).fill(0).map((_, deg) => deg * Scale);\n\n /**\n * Current coordinates of the mouse on the video pane.\n */\n @tracked cursorPosition?: CoordinateProps;\n\n /**\n * The transform to apply to cursor's arrow svg.\n */\n get svgTransform(): SafeString | undefined {\n if (!this.cursorPosition) {\n return;\n }\n\n const adjustedPosition = {\n x: this.cursorPosition.x - CenterOffset,\n y: this.cursorPosition.y - CenterOffset\n },\n deg = this.getRotationDegree(this.args.center, adjustedPosition),\n transform = `transform:rotate(${this.degrees[deg]}deg)`;\n return htmlSafe(transform);\n }\n\n /**\n * Position styling to apply to our cursor.\n */\n get cursorStyle(): SafeString | undefined {\n if (!this.cursorPosition) {\n return;\n }\n\n return htmlSafe(\n `left:${this.cursorPosition.x - CenterOffset}px;top:${this.cursorPosition.y - CenterOffset}px;`\n );\n }\n\n /**\n * Sets the cursor position.\n */\n @action\n setCursorPosition(evt?: MouseEvent): void {\n if (!evt || !this.args.controlRect) {\n this.cursorPosition = undefined;\n return;\n }\n\n // We can obtain rect from evt.currentTarget.getBoundingClientRect(), but since\n // the parent component already has this, we can reach for this.args.controlRect.\n const rect = this.args.controlRect;\n this.cursorPosition = {\n x: evt.clientX - rect.left,\n y: evt.clientY - rect.top\n };\n }\n\n /**\n * Gets the rotation degree.\n */\n private getRotationDegree(center: CoordinateProps, position: CoordinateProps): number {\n // Retrieve the angle in radians that will be used for rotating\n const angle = Math.atan2(position.y - center.y, position.x - center.x);\n // Formula for converting a radian into degrees\n const deg = Math.round((180 * angle) / Math.PI / Scale);\n return deg >= 0 ? deg : deg + Segments;\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'OespPtz::Ui': typeof OespPtzUi;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{! Lint disables added to match events from Openeye implementation }}\\n{{! template-lint-disable no-invalid-interactive }}\\n{{! template-lint-disable no-pointer-down-event-binding }}\\n<div\\n class=\\\"ptz-overlay\\\"\\n {{on \\\"wheel\\\" this.handleZoom}}\\n {{on \\\"mousedown\\\" this.handleMouseDown}}\\n {{on \\\"mouseenter\\\" this.handleMouseEnter}}\\n {{did-resize this.updateControlRect}}\\n ...attributes\\n>\\n {{#if @disablePanTilt}}\\n {{yield}}\\n {{else}}\\n <OespPtz::Ui @controlRect={{this.controlRect}} @center={{this.center}} @isMovingPtz={{this.isMovingPtz}}>\\n {{yield}}\\n </OespPtz::Ui>\\n {{/if}}\\n</div>\")","import Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { addWeakListener, removeListener } from '@adc/ember-utils/utils/event-listeners';\nimport { action } from '@ember/object';\nimport { task, timeout, type Task } from 'ember-concurrency';\nimport { getPanTiltParams, type CoordinateProps } from '../../utils/fisheye-utils.ts';\n\nimport type { FisheyePtzController, PtzController } from '@oecommon/oscar-js';\nimport type OespPlaybackStateController from '../../classes/state-controllers/oesp-playback-state-controller.ts';\n\n/** Time (ms) between PTZ moves */\nconst PtzMoveInterval = 100;\n\n/** Center offset in px. This is the radius of the cursor size (32px width / 2 + 2px border). */\nexport const CenterOffset = 18;\n\ninterface OespPtzOverlaySignature {\n Element: HTMLDivElement;\n Args: {\n apexId?: string;\n /** Should we disable Pan-Tilt? */\n disablePanTilt: boolean;\n /** Should we disable Zoom? */\n disableZoom: boolean;\n oespController?: OespPlaybackStateController;\n /** Optional callback to perform on fisheye pan-tilt-zoom end. This should only be passed in for fisheye cameras. */\n onFisheyePanTiltZoomEnd?: VoidFunction;\n /**\n * The type of PTZ usage for this PTZ overlay.\n * We currently expect ONVIF cameras with either fisheye or ptz support, not both.\n */\n usage: 'fisheye' | 'ptz';\n };\n Blocks: {\n default: [];\n };\n}\n\n/**\n * A PTZ overlay specifically for OESP streaming - physical PTZ cameras (future) and fisheye cameras\n * Based off of Openeye's OWS components.\n */\nexport default class OespPtzOverlay extends Component<OespPtzOverlaySignature> {\n /**\n * The overlay's bounding box\n */\n @tracked controlRect?: DOMRect;\n\n /**\n * Are we moving PTZ?\n */\n @tracked isMovingPtz = false;\n\n /**\n * The mouseup listener id\n */\n mouseUpListenerId?: string;\n\n /**\n * The mousemove listener id\n */\n mouseMoveListenerId?: string;\n\n /**\n * The center accounting for the center offset\n */\n get center(): CoordinateProps {\n return {\n x: this.containerWidth / 2 - CenterOffset,\n y: this.containerHeight / 2 - CenterOffset\n };\n }\n\n /**\n * The container height\n */\n get containerHeight(): number {\n return this.controlRect?.height ?? 0;\n }\n\n /**\n * The container width\n */\n get containerWidth(): number {\n return this.controlRect?.width ?? 0;\n }\n\n /**\n * The ptz controller based on our usage.\n */\n get ptzController(): PtzController | FisheyePtzController | undefined {\n const { apexId, oespController, usage } = this.args;\n if (!apexId) return;\n return usage === 'fisheye'\n ? oespController?.getFisheyePtzControllerForApexId(apexId)\n : oespController?.getPtzControllerForApexId(apexId);\n }\n\n /**\n * Updates the control rect\n */\n @action updateControlRect(element?: Element): void {\n this.controlRect = element?.getBoundingClientRect();\n }\n\n /**\n * Handles PTZ zooming\n */\n @action\n handleZoom(event: WheelEvent): void {\n if (this.args.disableZoom) {\n return;\n }\n\n const { apexId } = this.args;\n if (!apexId) {\n return;\n }\n\n // Added to prevent page scrolling\n event.preventDefault();\n const params = { zoom: event.deltaY < 0 ? 0.1 : -0.1 };\n this.ptzController?.panTiltZoom(apexId, params);\n this.args.onFisheyePanTiltZoomEnd?.();\n }\n\n /**\n * Starts PTZ panning\n */\n @action\n handleMouseDown(event: MouseEvent): void {\n if (this.args.disablePanTilt) {\n return;\n }\n\n // Using pointerdown events to initiate PTZ caused conflicts with mousemove listeners for the cursor position.\n // Canceling mousedown events still prevents VideoStreamingPlayer's drag and drop and text highlighting.\n event.preventDefault();\n\n this.isMovingPtz = true;\n this.doPtz(event);\n\n this.mouseUpListenerId = addWeakListener(this, document, 'mouseup', this.handleMouseUp, true, true);\n this.mouseMoveListenerId = addWeakListener(this, document, 'mousemove', this.handleMouseMove, undefined, true);\n }\n\n /**\n * Ends PTZ panning\n */\n @action\n handleMouseUp(): void {\n const { apexId } = this.args;\n if (!apexId) {\n return;\n }\n\n if (this.runDelayedPtzFn.isRunning) {\n this.runDelayedPtzFn.cancelAll();\n }\n\n if (this.mouseUpListenerId && this.mouseMoveListenerId) {\n removeListener(this.mouseUpListenerId);\n removeListener(this.mouseMoveListenerId);\n this.mouseUpListenerId = undefined;\n this.mouseMoveListenerId = undefined;\n }\n\n this.isMovingPtz = false;\n this.ptzController?.panTiltZoom(apexId, { pan: 0, tilt: 0 });\n this.args.onFisheyePanTiltZoomEnd?.();\n }\n\n /**\n * Handles PTZ panning\n */\n @action\n handleMouseMove(event: MouseEvent): void {\n this.doPtz(event);\n }\n\n /**\n * Sets the control rect\n *\n * @note updateControlRect is called in did-resize, but that doesn't cover all cases\n * where the bounds may change, such as swapping player positions of the same size\n */\n @action\n handleMouseEnter(event: MouseEvent): void {\n this.updateControlRect(event.currentTarget as HTMLDivElement);\n }\n\n /**\n * Performs PTZ work\n */\n private doPtz(event: MouseEvent): void {\n const { apexId } = this.args;\n if (!apexId) {\n return;\n }\n\n const { controlRect } = this;\n if (!controlRect) {\n return;\n }\n\n if (this.runDelayedPtzFn.isRunning) {\n this.runDelayedPtzFn.cancelAll();\n }\n\n const { ptzController } = this;\n if (ptzController === undefined) {\n return;\n }\n\n const position = {\n x: event.clientX - controlRect.left,\n y: event.clientY - controlRect.top\n },\n params = getPanTiltParams(position, controlRect),\n ptzFn = () => {\n ptzController.panTiltZoom(apexId, params);\n };\n\n ptzFn();\n this.runDelayedPtzFn.perform(ptzFn, PtzMoveInterval);\n }\n\n /**\n * Task to call ptz fn after a delay\n */\n private runDelayedPtzFn: Task<void, [VoidFunction, number]> = task(\n async (ptzFn: VoidFunction, interval: number) => {\n await timeout(interval);\n ptzFn();\n }\n );\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'OespPtz::Overlay': typeof OespPtzOverlay;\n }\n}\n","import { isDestroyed } from '@adc/ember-utils/utils/ember-helpers';\n\nimport type OpeneyePlayer from '../../components/openeye-player.ts';\nimport type WebrtcPlayer from '../../components/webrtc-player.ts';\nimport type { END_TO_END_COMMAND_STREAM_QUALITY } from './webrtc-end-to-end-state-controller';\nimport type {\n PLAYBACK_COMMAND_UPDATE,\n PLAYBACK_COMMAND_RESUME,\n PLAYBACK_COMMAND_PAUSE\n} from './webrtc-proxy-playback-state-controller';\n\nexport const TOGGLE_MICROPHONE_AUDIO = 'toggleMicrophoneAudio';\n\nexport type StateControllerCommandTypes =\n | typeof END_TO_END_COMMAND_STREAM_QUALITY\n | typeof TOGGLE_MICROPHONE_AUDIO\n | typeof CHANGE_CAMERA_AUDIO\n | typeof PLAYBACK_COMMAND_UPDATE\n | typeof PLAYBACK_COMMAND_RESUME\n | typeof PLAYBACK_COMMAND_PAUSE;\n\nexport interface Player<T> {\n component: T;\n isDestroyed?: boolean;\n}\n\n/**\n * Const values for shared proxy/end-to-end WebRTC commands.\n */\nexport const CHANGE_CAMERA_AUDIO = 'changeCameraAudio';\n\n/**\n * Sends a playback command to the connected player(s).\n * Currently used for WebRTC players.\n */\nexport function sendWebRtcCommand(\n this: BaseStateController,\n args: Parameters<WebrtcPlayer['sendPlayerCommand']>,\n playerId: string | null = null\n): void {\n let doCleanup = false;\n\n this.players.forEach((webRtcPlayerInfo) => {\n const component = webRtcPlayerInfo.component as WebrtcPlayer;\n\n // If there is a player ID, but it does not match this WebRTC player's ID,\n // then do not send the command to this player.\n // Otherwise, if there is no player ID set,\n // then the command should be sent to all players.\n if (playerId && playerId !== component.args.deviceId) {\n return;\n }\n\n // Check if the WebRTC component has been destroyed. If it has, skip it and mark the players list for cleanup.\n // Otherwise (and in most cases), we will call the state update function for this player.\n if (isDestroyed(component)) {\n doCleanup = true;\n webRtcPlayerInfo.isDestroyed = true;\n } else {\n component.sendPlayerCommand(args[0], args[1], args[2]);\n }\n });\n\n // Remove any destroyed components from the players array if needed.\n if (doCleanup) {\n this.players = this.players.filter((webRtcPlayerInfo) => !webRtcPlayerInfo.isDestroyed);\n }\n}\n\n/**\n * @classdesc\n * Object for sending state changes to one or many players.\n */\nexport default abstract class BaseStateController {\n constructor(playing = true, speed = 1) {\n this._playing = playing;\n this._speed = speed;\n }\n\n /**\n * A unique ID to differentiate one device from another.\n * for OESP controllers, this refers to the Apex device\n */\n id?: string;\n\n /**\n * Protected variable for the current time being played back.\n * This will currently only be used to determine when playback should start.\n */\n protected _currentTime: Date | null = null;\n\n /**\n * Protected variable for the current play status.\n * Change this to send a play/pause command through the websocket.\n */\n protected _playing = true;\n\n /**\n * Protected variable for the current speed.\n * Change this to request a speed RTSP command through the websocket.\n */\n protected _speed = 1;\n\n get playing(): boolean {\n return this._playing;\n }\n\n set playing(playing: boolean) {\n throw `Setting playing to ${playing} not implemented.`;\n }\n\n get speed(): number {\n return this._speed;\n }\n\n set speed(speed: number) {\n throw `Setting speed to ${speed} not implemented.`;\n }\n\n /**\n * Change the volume of the audio coming from the camera to the user.\n */\n changeCameraAudio(\n mute: boolean,\n volume: number,\n isEnabledAutomaticallyAfterDelay: boolean,\n playerId: string | null = null\n ): void {\n sendWebRtcCommand.call(\n this,\n [\n CHANGE_CAMERA_AUDIO,\n { mute, volume, isEnabledAutomaticallyAfterDelay },\n { alsoCallInternalFunction: true }\n ],\n playerId\n );\n }\n\n /**\n * Array storing information on all attached players.\n * Each entry contains a link to the actual component, which will contain\n * a function to call when making any state changes and a function to call to disconnect the stream.\n */\n players: Player<WebrtcPlayer | OpeneyePlayer>[] = [];\n\n /**\n * Connects a new player component to this playback state controller.\n */\n attachPlayer(component: WebrtcPlayer | OpeneyePlayer) {\n this.players.push({ component });\n }\n\n /**\n * Resets the streaming state of all players.\n */\n resetPlayers(): void {\n this.players.forEach(({ component }) => {\n if ('disconnect' in component) {\n component.disconnect('Play stopped');\n }\n });\n }\n\n /**\n * Sends an update command through all websocket connections to update the url.\n * NOTE: this should be called after updating the url for each player separately,\n * as this sends each player's current url in an update through the websocket.\n */\n updateUrl(): void {\n throw 'updateUrl should not be called on this controller.';\n }\n\n /**\n * Function to call when the component is destroyed for object cleanups.\n */\n willDestroy(): void {}\n}\n","import { tracked } from '@glimmer/tracking';\nimport { setOwner } from '@ember/owner';\nimport { inject as service } from '@ember/service';\nimport { POST } from '@adc/ajax/services/adc-ajax';\nimport {\n DisplayManager,\n OscarFactory,\n Html5MediaSourceFactory,\n HtmlElementFactory,\n RenderTimingManager,\n ObjectUrlManager,\n RenderTimingStrategyFactory,\n MultiVideoPlayer,\n StreamQuality,\n NvrManager,\n getAdcNvrConnector,\n OscarEvents,\n AudioRecordingState,\n FisheyeMountType\n} from '@oecommon/oscar-js';\nimport { Direction } from '@oecommon/oscar-js/modules/client/defs';\nimport { SimpleReactor, WebSocketFactory, Instant, LogConfig } from '@oecommon/plasma-js';\nimport { TrackedMap } from 'tracked-built-ins';\nimport { Playing, Paused, Connecting } from '../../constants/player-messages.ts';\nimport { BaseOeStreamLogsApiUrl } from '../../constants/wavefront.ts';\nimport BaseStateController from './base-state-controller.ts';\n\nimport type AjaxService from '@adc/ajax/services/adc-ajax';\nimport type Owner from '@ember/owner';\nimport type { FisheyeInfo, FisheyeMode, FisheyePtzController, Pane, PtzController } from '@oecommon/oscar-js';\nimport type { StateInfo } from '../../components/base-player.ts';\nimport type OpeneyePlayer from '../../components/openeye-player.ts';\nimport type { BasePlayer, PlayerStream } from './base-player.ts';\nimport type { Player } from './base-state-controller.ts';\n\nconst DEFAULT_PAN_CEILING = 0;\nconst DEFAULT_TILT_CEILING = 30;\nconst DEFAULT_PAN_WALL = 0;\nconst DEFAULT_TILT_WALL = 0;\nconst DEFAULT_FIELD_OF_VIEW = 55;\n\n/**\n * In Oscar JS, when the master pane is -1, then no player is currently selected.\n */\nconst NO_PLAYER_SELECTED = -1;\n\ninterface State {\n paused?: boolean;\n speed?: number;\n muted?: boolean;\n volume?: number;\n playbackTime?: Instant;\n}\n\n/**\n * Sets the new state of the controller.\n */\nfunction setNewState(this: OespPlaybackStateController, state: State, message: string): void {\n const { displayManager, players } = this;\n displayManager.setPlaybackState(state);\n players.forEach(({ component }) => component.args.updateState(message, ''));\n}\n\n/**\n * Pauses all players connected to this controller.\n */\nfunction pause(this: OespPlaybackStateController): void {\n const state = {\n paused: true\n };\n\n setNewState.call(this, state, Paused);\n}\n\n/**\n * Resumes playback for all players connected to this controller.\n */\nfunction resume(this: OespPlaybackStateController): void {\n const state = {\n paused: false\n };\n\n setNewState.call(this, state, Playing);\n}\n\n/**\n * Sets the speed for all players connected to this controller.\n */\nfunction setSpeed(this: OespPlaybackStateController, speed: number): void {\n const state = {\n speed: speed\n };\n\n setNewState.call(this, state, Playing);\n}\n\n/**\n * @classdesc\n *\n * Object for synchronizing playback state changes across OESP multiple players.\n * This one object is responsible for synchronizing all players from the same device.\n */\nexport default class OespPlaybackStateController extends BaseStateController implements BasePlayer, PlayerStream {\n @service declare ajax: AjaxService;\n\n declare displayManager: DisplayManager;\n\n /**\n * Should logging for oscar-js be enabled?\n *\n * See https://confluence.corp.adcinternal.com/display/VID/Enable+oscar-js+logging\n */\n declare enableOscarLogging: string | null;\n\n constructor(owner: Owner) {\n super();\n setOwner(this, owner);\n this.enableOscarLogging = new URLSearchParams(window.location.search).get('enableOscarLogging');\n }\n\n //#region Controller Vars\n\n /**\n * The host that this controller will be communicating with.\n */\n host?: string;\n\n /**\n * The number of players attached to this controller.\n */\n playerCount = 0;\n\n /**\n * The token used to communicate with the proxy.\n * This is only necessary for proxy connections.\n */\n token?: string | null;\n\n /**\n * The username for direct connections.\n * This is only necessary for direct connections.\n */\n username?: string;\n\n /**\n * The password for direct connections.\n * This is only necessary for direct connections.\n */\n password?: string;\n\n /**\n * Should we be using the HD stream for streaming.\n */\n useHdStream = false;\n\n /** @override */\n players: Player<OpeneyePlayer>[] = [];\n\n /**\n * The current recording state for our microphone / talkdown audio.\n */\n @tracked audioRecordingState?: AudioRecordingState;\n\n /**\n * Holds the result of the audio recording promise, allowing the stopAudioRecording method\n * to be suspended until microphone / talkdown audio has entered the \"Recording\" state.\n */\n onBackchannelConnected?: VoidFunction;\n\n /**\n * Should our talk-down audio recorder microphone be muted?\n */\n shouldTalkDownMicrophoneBeMuted = true;\n\n /**\n * isLiveVideo Is this called from a live view, or from playback?\n * This come from OE's implementation of setPlaybackState.\n */\n isLiveVideo?: boolean;\n\n /**\n * Should WebRTC be enabled on this player?\n */\n allowWebrtc?: boolean;\n\n /**\n * STUN server used for WebRTC connection.\n */\n stunServer?: string;\n\n /**\n * Apex Ids mapped to PtzControllers\n */\n ptzControllers = new Map<string, PtzController>();\n\n /**\n * Apex Ids mapped to PtzControllers\n */\n fisheyePtzControllers = new Map<string, FisheyePtzController>();\n\n /**\n * A map of Apex ids to their fisheye modes.\n */\n fisheyeModes = new TrackedMap<string, FisheyeMode>();\n\n //#endregion Controller Vars\n\n //#region Logging Properties\n\n /**\n * The timestamp for when the audioRecordingState changed to \"Connecting\".\n * Note: this is used exclusively for logging purposes.\n */\n audioRecordingConnectingStartTime = 0;\n\n /**\n * The most recently detected recording state.\n * Note: this is used to prevent duplicate logs in our Wavefront data.\n */\n previousRecordingState = AudioRecordingState.Idle;\n\n /**\n * Which panes, if any, have reported a backchannel connection error?\n * This is used to prevent duplicate logs in our wavefront data.\n * We only send one error per pane and this is reset when we teardown the players.\n */\n panesWithReportedBackchannelErrors = new Set<number>();\n\n //#endregion Logging Properties\n\n //#region Playback States\n\n /** @override */\n set playing(playing: boolean) {\n this._playing = playing;\n\n if (playing) {\n resume.call(this);\n } else {\n pause.call(this);\n }\n }\n\n get playing(): boolean {\n return this._playing;\n }\n\n /** @override */\n set speed(speed: number) {\n this._speed = speed;\n\n setSpeed.call(this, speed);\n }\n\n /** @override */\n seek(seekTime: Date): void {\n const { displayManager } = this;\n\n const state = {\n playbackTime: new Instant(seekTime.valueOf() * 1000)\n };\n\n displayManager.setPlaybackState(state);\n\n setNewState.call(this, state, Playing);\n }\n\n /** @override */\n setStreamQuality(useHdStream: boolean): void {\n this.useHdStream = useHdStream;\n\n const { displayManager, players } = this;\n if (!displayManager) {\n return;\n }\n\n displayManager.beginChange();\n players.forEach(({ component }) => {\n try {\n const pane = displayManager.getPane(component.args.cameraId);\n pane.newQuality = useHdStream ? StreamQuality.High : StreamQuality.Low;\n } catch (e) {\n displayManager.cancelChange();\n throw e;\n }\n });\n\n displayManager.commitChange();\n\n // When displayManager has volume, commitChange() in oscar.js sets audioplaybackcontroller.paused to true, silencing the audio.\n // We need to explicitly reset paused to false afterwards to restore sound.\n if (displayManager.volume !== 0) {\n displayManager.setPlaybackState({ paused: false });\n }\n }\n\n /** @override */\n startPlayback(): void {\n this._playing = true;\n const { displayManager } = this;\n\n const state = {\n speed: this._speed,\n paused: false,\n direction: Direction.Forwards,\n stepping: false,\n playbackTime: new Instant(this._currentTime ? this._currentTime.valueOf() * 1000 : null)\n };\n\n // Establishing connection with the proxy.\n this.players.forEach(({ component }) => component.args.updateState(Connecting, '', { percentage: 50 }));\n\n displayManager.setPlaybackState(state);\n }\n\n /** @override */\n startOespLiveRelay(): void {\n this._playing = true;\n this.players.forEach(({ component }) => component.args.updateState(Connecting, '', { percentage: 50 }));\n this.displayManager.setLive();\n }\n\n /**\n * Notifies the playbackStateController that the state of the stream has changed.\n */\n notifyStateChanged(player: Player<OpeneyePlayer>, state: string, args: StateInfo): void {\n player.component.args.updateState(state, '', args);\n }\n\n //#endregion Playback States\n\n //#region Init\n\n /** @override */\n setupPlayers(startTime: Date | null, speed: number, useHdStream: boolean): void {\n // Detach and cleanup old panes if they exist\n this.players?.forEach(({ component }) => {\n component?.detachPlayer();\n });\n\n const reactor = new SimpleReactor(),\n wsFactory = new WebSocketFactory(),\n elementFactory = new HtmlElementFactory(document),\n mediaSourceFactory = new Html5MediaSourceFactory(),\n hostname = this.host,\n objectUrlManager = new ObjectUrlManager(),\n adcParams = {\n hostname,\n adcRelayToken: this.token,\n username: this.username,\n password: this.password,\n allowWebrtc: this.allowWebrtc,\n stunServer: this.stunServer\n },\n nvrConnector = getAdcNvrConnector(wsFactory, adcParams),\n nvrManager = new NvrManager(nvrConnector),\n oscarFactory = new OscarFactory(\n reactor,\n nvrManager,\n elementFactory,\n mediaSourceFactory,\n objectUrlManager,\n adcParams\n ),\n strategyFactory = new RenderTimingStrategyFactory(reactor.timeProvider),\n timingManager = new RenderTimingManager(reactor, strategyFactory),\n multiPlayer = new MultiVideoPlayer(reactor, timingManager);\n\n this.displayManager = new DisplayManager(oscarFactory, multiPlayer);\n\n this.displayManager.paneCount = this.playerCount;\n this._currentTime = startTime;\n this._speed = speed;\n this.useHdStream = useHdStream;\n\n if (this.enableOscarLogging !== null) {\n localStorage.setItem('oelog:default', this.enableOscarLogging || 'spam');\n const logConfig = new LogConfig();\n logConfig.processConfig({});\n } else {\n localStorage.removeItem('oelog:default');\n }\n\n this.players.forEach(({ component }) => component.attachPlayer());\n this.setupAudioRecorderListener();\n }\n\n //#endregion Init\n\n //#region Connected Players\n\n /** @override */\n resetPlayers(): void {\n this.token = null;\n this.players.forEach(({ component }) => component.detachPlayer());\n\n this.ptzControllers.clear();\n this.fisheyePtzControllers.clear();\n this.fisheyeModes.clear();\n this.stopAudioRecording();\n this.tearDownAudioRecorderListener();\n this.panesWithReportedBackchannelErrors.clear();\n }\n\n /** @override */\n /**\n * Change the volume of the audio coming from the camera to the user.\n *\n * @param {boolean} mute Are we muting this audio feed?\n * @param {number} volume The volume slider value or last unmuted volume.\n * @param {boolean} _isEnabledAutomaticallyAfterDelay used for two-way audio.\n * @param {string|null} playerId The player ID to change the audio for.\n * @param {boolean} beginAudioRecordingConnection True if we want to start an the audio recording connection with the new master pane.\n * This should only be true if this is live video and the camera has a speaker for audio talkdown.\n */\n changeCameraAudio(\n mute: boolean,\n volume: number,\n _isEnabledAutomaticallyAfterDelay: boolean,\n playerId: string | null = null,\n beginAudioRecordingConnection = false\n ): void {\n this.changeMasterPane(playerId, beginAudioRecordingConnection);\n\n // OE expects a volume range from 0 - 1\n volume = volume / 100;\n\n Object.assign(this.displayManager, {\n volume,\n muted: mute\n });\n }\n\n /**\n * OESP only supports audio from one displayManager at a time; this method is responsible\n * for designating which player should play audio and turning off the others to match OE's library.\n *\n * @param {string|null} playerId The player ID to change the audio for.\n * @param {boolean} beginLiveViewAudioRecordingConnection True if we want to start an audio recording connection.\n * This should be true when we are on the live view and the given camera has a speaker for 2wa talkdown.\n */\n changeMasterPane(playerId: string | null, beginLiveViewAudioRecordingConnection = false): void {\n if (!Number.isNaN(parseFloat(playerId ?? ''))) {\n const playerIdIndex = Number(playerId),\n isLiveVideo = this.isLiveVideo ?? false,\n startAudioRecordingConnection = beginLiveViewAudioRecordingConnection && isLiveVideo;\n\n // If we aren't changing to a new master pane.\n if (this.displayManager.masterPane === playerIdIndex) {\n // If audio recording state is error and we are trying to use talk-down audio (changeInitiatedFromMicrophoneRecording), try to establish a new audio recording connection.\n // This is necessary because if the recorder is in error due to another user/browser using it, if they stop recording, we can re-establish a connection.\n if (this.audioRecordingState === AudioRecordingState.Error && startAudioRecordingConnection) {\n this.startAudioRecordingConnection();\n }\n\n // Do nothing else if the master pane is already set to the player ID.\n return;\n }\n\n // Stop all audio on the previous master pane (if any).\n if (isLiveVideo && this.displayManager.masterPane !== NO_PLAYER_SELECTED) {\n Object.assign(this.displayManager, {\n volume: 0,\n muted: true\n });\n this.stopAudioRecording();\n }\n\n // Change the master pane.\n this.displayManager.masterPane = playerIdIndex;\n\n // Start the audio recording connection on the new master pane.\n if (startAudioRecordingConnection) {\n this.startAudioRecordingConnection();\n }\n\n return;\n }\n\n this.displayManager.masterPane = NO_PLAYER_SELECTED;\n }\n\n /**\n * Adds a listener that will fire off the onRecordingStateChanged method each time the\n * recording state of audioRecorder changes.\n */\n private setupAudioRecorderListener(): void {\n this.displayManager.audioRecorder.addEventListener(\n OscarEvents.StateChange,\n this.onRecordingStateChanged.bind(this)\n );\n }\n\n /**\n * Removes the listener from audioRecorder.\n */\n private tearDownAudioRecorderListener(): void {\n this.displayManager?.audioRecorder.removeEventListener(\n OscarEvents.StateChange,\n this.onRecordingStateChanged.bind(this)\n );\n }\n\n /**\n * Method to be run each time the recording state of audioRecorder changes.\n */\n private onRecordingStateChanged(): void {\n this.audioRecordingState = this.displayManager.audioRecorder.recordingState;\n\n if (this.onBackchannelConnected && this.audioRecordingState === AudioRecordingState.Recording) {\n // Since we are now recording, resolve the promise and allow stopAudioRecording() to continue executing.\n this.onBackchannelConnected();\n }\n\n if (this.audioRecordingState == AudioRecordingState.Connecting) {\n Object.assign(this, {\n audioRecordingConnectingStartTime: Date.now(),\n previousRecordingState: AudioRecordingState.Connecting\n });\n } else if (\n this.audioRecordingState == AudioRecordingState.Recording &&\n this.previousRecordingState == AudioRecordingState.Connecting\n ) {\n this.previousRecordingState = AudioRecordingState.Recording;\n\n const timeElapsedMilliseconds = Date.now() - this.audioRecordingConnectingStartTime,\n url = `${BaseOeStreamLogsApiUrl}/reportThirdPartyTalkdownAudioLatencyToWaveFront`;\n\n // Report the connection latency to Wavefront.\n this.ajax.apiRequest(url, undefined, JSON.stringify(timeElapsedMilliseconds), POST);\n } else if (\n this.audioRecordingState == AudioRecordingState.Error &&\n this.previousRecordingState == AudioRecordingState.Connecting &&\n !this.panesWithReportedBackchannelErrors.has(this.displayManager.masterPane)\n ) {\n this.previousRecordingState = AudioRecordingState.Error;\n\n // Report the backchannel connection error to Wavefront.\n const url = `${BaseOeStreamLogsApiUrl}/reportOespBackchannelErrorToWaveFront`;\n this.ajax.apiRequest(url, undefined, null, POST);\n\n // Add to the set of panes that have reported backchannel errors to avoid duplicate logging.\n this.panesWithReportedBackchannelErrors.add(this.displayManager.masterPane);\n }\n }\n\n /**\n * Wrapper method for displayManager's stopAudioRecording() method that ensures\n * the audioRecorder has entered the \"Recording\" state before allowing displayManager.stopAudioRecording() to run.\n *\n * @note This prevents a situation where we try to stop audio recording before it ever started,\n * in which case the microphone would erroneously be left in a permanent unmuted state.\n */\n async stopAudioRecording(): Promise<void> {\n if (this.audioRecordingState === AudioRecordingState.Recording) {\n this.displayManager.stopAudioRecording();\n } else if (this.audioRecordingState === AudioRecordingState.Connecting) {\n await new Promise<void>((resolve) => {\n // Do not proceed until onBackchannelConnected() is called again.\n this.onBackchannelConnected = resolve;\n });\n this.displayManager.stopAudioRecording();\n this.onBackchannelConnected = undefined;\n }\n }\n\n /**\n * Begin an audio recording connection on the current master pane and set the user's microphone to muted to prevent audio from outputting.\n */\n private async startAudioRecordingConnection(): Promise<void> {\n this.shouldTalkDownMicrophoneBeMuted = true;\n await this.displayManager.startAudioRecording();\n this.setUsersMediaStreamToMuteOrUnmute();\n }\n\n /**\n * Set the users microphone for audio recording talk down to muted or unmuted.\n */\n private setUsersMediaStreamToMuteOrUnmute(): void {\n const mediaStream = this.displayManager.audioRecorder._mediaStream;\n\n if (mediaStream) {\n mediaStream.getAudioTracks()[0].enabled = !this.shouldTalkDownMicrophoneBeMuted;\n }\n }\n\n /** @override */\n toggleMicrophoneMute(shouldMute: boolean, playerId: string | null): void {\n this.changeMasterPane(playerId, !shouldMute);\n this.shouldTalkDownMicrophoneBeMuted = shouldMute;\n this.setUsersMediaStreamToMuteOrUnmute();\n }\n //#endregion Connected Players\n\n //#region PTZ\n /**\n * Helper to get the PtzController used for an Apex Id\n */\n getPtzControllerForApexId(id: string): PtzController | undefined {\n if (this.ptzControllers.has(id)) {\n return this.ptzControllers.get(id);\n }\n\n const pane = this.getPaneForApexId(id);\n if (!pane) {\n return;\n }\n\n const camera = pane._camera,\n nvrInfo = camera.nvrInfo,\n { oscarFactory } = this.displayManager,\n ptzController = oscarFactory.createPtzController(nvrInfo);\n\n this.ptzControllers.set(id, ptzController);\n return ptzController;\n }\n\n //#endregion PTZ\n\n //#region Fisheye/dewarping\n /**\n * Attempts to update the fisheye mode. If the camera is missing fisheyeMode, we abort.\n */\n setFisheyeMode(id: string, mode: FisheyeMode): void {\n const { displayManager } = this,\n pane = this.getPaneForApexId(id);\n\n if (!pane) {\n return;\n }\n\n const { fisheye, fisheyeInfo } = pane._camera;\n if (!fisheye || !fisheyeInfo) {\n // Trying to set the necessary fisheyeInfo on pane._camera or pane.newCamera down below in displayManager's beginChange() and\n // commitChange() does not work. It looks like these properties can only be added during setup.\n return;\n }\n\n displayManager.beginChange();\n pane.fisheyeMode = mode;\n displayManager.commitChange();\n\n this.fisheyeModes.set(id, mode);\n }\n\n /**\n * Helper to get the FisheyePtzController used for an Apex Id\n */\n getFisheyePtzControllerForApexId(id: string): FisheyePtzController | undefined {\n if (this.fisheyePtzControllers.has(id)) {\n return this.fisheyePtzControllers.get(id);\n }\n\n const { displayManager } = this;\n if (!displayManager) {\n return;\n }\n\n const pane = this.getPaneForApexId(id);\n if (!pane) {\n return;\n }\n\n const { oscarFactory } = displayManager,\n fisheyePtzController = oscarFactory.createFisheyePtzController(pane);\n\n this.fisheyePtzControllers.set(id, fisheyePtzController);\n return fisheyePtzController;\n }\n\n /**\n * Adjusts the pan and tilt immediately for a fisheye camera.\n */\n adjustFisheyePanTiltForApexId(id: string, panDelta: number, tiltDelta: number): void {\n const displayPane = this.getPaneForApexId(id);\n if (!displayPane) {\n return;\n }\n\n const currentPanTilt = displayPane.fisheyePanTilt,\n newPanTilt = {\n pan: currentPanTilt.pan + panDelta,\n tilt: currentPanTilt.tilt + tiltDelta\n };\n\n displayPane.fisheyePanTilt = newPanTilt;\n }\n\n /**\n * Adjusts the zoom immediately for a fisheye camera.\n */\n adjustFisheyeZoomForApexId(id: string, zoomDelta: number): void {\n const ptzController = this.getFisheyePtzControllerForApexId(id);\n if (!ptzController) {\n return;\n }\n\n ptzController.panTiltZoom(id, { zoom: zoomDelta });\n }\n\n /**\n * Resets the pan, tilt, and fov (zoom) immediately for a fisheye camera.\n */\n resetFisheyePanTiltZoomForApexId(id: string): void {\n const pane = this.getPaneForApexId(id),\n mountType = (pane?._camera?.fisheyeInfo as FisheyeInfo | undefined)?.mount?.type;\n\n if (!pane || !mountType) {\n return;\n }\n\n const pan = mountType === FisheyeMountType.Ceiling ? DEFAULT_PAN_CEILING : DEFAULT_PAN_WALL,\n tilt = mountType === FisheyeMountType.Ceiling ? DEFAULT_TILT_CEILING : DEFAULT_TILT_WALL,\n fov = DEFAULT_FIELD_OF_VIEW;\n\n this.setFisheyePanTiltZoomForApexId(id, pan, tilt, fov);\n }\n\n /**\n * Sets the pan, tilt, and fov (zoom) immediately for a fisheye camera.\n */\n setFisheyePanTiltZoomForApexId(id: string, pan: number, tilt: number, fov: number): void {\n const pane = this.getPaneForApexId(id);\n if (!pane) {\n return;\n }\n\n Object.assign<Pane, Partial<Pane>>(pane, {\n fisheyePanTilt: { pan, tilt },\n fisheyeFieldOfView: fov\n });\n }\n\n /**\n * Helper to grab the fisheye pan tilt zoom.\n */\n getFisheyePanTiltZoomForApexId(id: string): Pick<Pane, 'fisheyePanTilt' | 'fisheyeFieldOfView'> | undefined {\n const pane = this.getPaneForApexId(id);\n if (!pane) {\n return;\n }\n\n const { fisheyePanTilt, fisheyeFieldOfView } = pane;\n return { fisheyePanTilt, fisheyeFieldOfView };\n }\n //#endregion Fisheye/dewarping\n\n //#region Helpers\n /**\n * Helper to grab the DisplayPane for the given Apex ID.\n */\n getPaneForApexId(id: string): Pane | undefined {\n const { displayManager } = this;\n if (!displayManager) {\n return;\n }\n\n const player = this.players.find((p) => p.component.args.apexId === id);\n if (!player) {\n return;\n }\n\n const { component } = player,\n { args } = component,\n paneIndex = args.cameraId;\n\n return displayManager.getPane(paneIndex);\n }\n //#endregion Helpers\n}\n","import BaseStateController, { sendWebRtcCommand } from './base-state-controller.ts';\nimport { TOGGLE_MICROPHONE_AUDIO } from './base-state-controller.ts';\n\nimport type { PlayerStream, PlayerMicrophone } from './base-player.ts';\n\n/**\n * Const values for WebRTC commands.\n */\nexport const END_TO_END_COMMAND_STREAM_QUALITY = 'streamQuality',\n END_TO_END_COMMAND_LOAD_MEDIA = 'loadMedia';\n\n/**\n * @classdesc\n *\n * Object for synchronizing playback state changes across multiple end-to-end WebRTC players.\n * After hooking up to 1 or more WebRTC players, state changes can be passed into this object\n * which will then be forwarded to all WebRTC players together.\n */\nexport default class WebrtcEndToEndStateController\n extends BaseStateController\n implements PlayerStream, PlayerMicrophone\n{\n /** @override */\n setStreamQuality(useHdStream: boolean): void {\n sendWebRtcCommand.call(this, [END_TO_END_COMMAND_STREAM_QUALITY, { useHdStream }]);\n }\n\n /** @override */\n toggleMicrophoneMute(mute: boolean): void {\n sendWebRtcCommand.call(this, [TOGGLE_MICROPHONE_AUDIO, { mute }, { alsoCallInternalFunction: true }]);\n }\n}\n","import { inject as service } from '@ember/service';\nimport BaseStateController, { sendWebRtcCommand } from './base-state-controller.ts';\nimport { TOGGLE_MICROPHONE_AUDIO } from './base-state-controller.ts';\n\nimport type EnvSettingsService from '@adc/app-infrastructure/services/env-settings';\nimport type { PlayerMicrophone } from './base-player.ts';\n\nexport const ProxyAudioSampleRate = 8000; // 8kHz\n\n/**\n * Const values for playback commands. Update covers the case of changing speed or seeking.\n */\nexport const PLAYBACK_COMMAND_RESUME = 'resume',\n PLAYBACK_COMMAND_PAUSE = 'pause',\n PLAYBACK_COMMAND_UPDATE = 'update';\n\n/**\n * @classdesc\n *\n * Object for synchronizing playback state changes across multiple players.\n * After hooking up to 1 or more WebRTC players, state changes can be passed into this object\n * which will then be forwarded to all WebRTC players together.\n */\nexport default class WebrtcProxyPlaybackStateController extends BaseStateController implements PlayerMicrophone {\n @service declare envSettings: EnvSettingsService;\n\n private audioContext?: AudioContext;\n private hasAudioStreamStarted = false;\n private workletNode?: AudioWorkletNode;\n private _audioStream?: MediaStream;\n private _dataChannel?: RTCDataChannel; // WebRTC datachannel to send audio signals through\n private pendingData: ArrayBuffer[] = []; // Pending audio signals to be sent while setting up a datachannel.\n private rootUrl?: string; // URL for accessing the public directory.\n private micMuted = false;\n\n constructor(rootUrl?: string) {\n super();\n this.rootUrl = rootUrl;\n }\n\n // #region Audio\n\n /**\n * Setter for datachannel. Send all pending audio signals when the channel opens.\n */\n public set dataChannel(dataChannel: RTCDataChannel) {\n this._dataChannel = dataChannel;\n\n dataChannel.onopen = () => {\n while (this.pendingData.length > 0) {\n const data = this.pendingData.shift();\n data && dataChannel.send(data);\n }\n };\n }\n\n set audioStream(audioStream: MediaStream) {\n this._audioStream = audioStream;\n }\n\n /**\n * Setup the audio context with the custom processor.\n */\n async initializeAudioContext(): Promise<void> {\n this.audioContext = new AudioContext({ sampleRate: ProxyAudioSampleRate });\n await this.audioContext.audioWorklet.addModule(`${this.rootUrl}assets/audio-processor.js`);\n }\n\n /**\n * Function for sending audio signals through the connected WebRTC datachannel.\n */\n async startAudioStream(): Promise<void> {\n const { _dataChannel } = this;\n if (!_dataChannel) {\n return;\n }\n\n await this.initializeAudioContext();\n\n const { audioContext, _audioStream: mediaStream } = this;\n\n if (!mediaStream || !audioContext) {\n return;\n }\n\n this.workletNode = new AudioWorkletNode(audioContext, 'processor');\n\n this.workletNode.port.onmessage = (event) => {\n if (this.micMuted) {\n return;\n }\n\n const { pendingData, _dataChannel } = this;\n if (!event.data) {\n return;\n }\n\n const buffer = event.data.buffer;\n\n if (_dataChannel?.readyState === 'open') {\n _dataChannel?.send(buffer);\n } else {\n pendingData.push(buffer);\n }\n };\n\n this.workletNode.connect(audioContext.destination);\n const mediaSource = audioContext.createMediaStreamSource(mediaStream);\n mediaSource.connect(this.workletNode);\n }\n\n /**\n * Teardown all audio objects.\n */\n stopAudioStream(): void {\n this._audioStream?.getTracks().forEach((track) => track.stop());\n this._audioStream = undefined;\n this.audioContext?.close();\n this.audioContext = undefined;\n this.workletNode?.disconnect();\n this.workletNode = undefined;\n }\n\n // #endregion Audio\n\n // #region Playback States\n\n /** @override */\n set playing(playing: boolean) {\n this._playing = playing;\n\n const playStateCommand = playing ? PLAYBACK_COMMAND_RESUME : PLAYBACK_COMMAND_PAUSE;\n sendWebRtcCommand.call(this, [playStateCommand]);\n }\n\n /** @override */\n set speed(speed: number) {\n this._speed = speed;\n\n sendWebRtcCommand.call(this, [PLAYBACK_COMMAND_UPDATE, { speed }, { sendProxyUrl: false }]);\n }\n\n /** @override */\n willDestroy(): void {\n this.stopAudioStream();\n }\n\n // #endregion\n\n // #region Changing State Functions\n\n /** @override */\n updateUrl(): void {\n sendWebRtcCommand.call(this, [PLAYBACK_COMMAND_UPDATE, {}, { sendProxyUrl: true }]);\n }\n\n /** @override */\n toggleMicrophoneMute(mute: boolean): void {\n this.micMuted = mute;\n\n // If this is the first time enabling audio, start streaming the audio upstream\n if (!mute && !this.hasAudioStreamStarted) {\n this.startAudioStream();\n this.hasAudioStreamStarted = true;\n }\n\n // Proxy audio is primarily sent via datachannel, but we must also toggle the user's audio stream for VV/RVM browser recording.\n sendWebRtcCommand.call(this, [TOGGLE_MICROPHONE_AUDIO, { mute }, { alsoCallInternalFunction: true }]);\n }\n\n // #endregion\n}\n","import { isDestroyed } from '@adc/ember-utils/utils/ember-helpers';\nimport { getOwner, setOwner } from '@ember/owner';\nimport { inject as service } from '@ember/service';\nimport { task, timeout } from 'ember-concurrency';\nimport {\n AutoPlayFailed,\n DisconnectedCellConnectorConnectedCamera,\n DisconnectedRecordedVVEEStream,\n FailedToAttach,\n IceNegotiationFailed\n} from '../../constants/disconnection-reasons.ts';\nimport { ConsoleDebug, OneMinuteMs, InboundRtp, Video, StreamingTypePlayback } from '../../constants/generic.ts';\nimport {\n Connecting,\n Initializing,\n Playing,\n AutoplayFailure,\n IceFailure,\n Log,\n Error,\n Frozen,\n Disconnected,\n TimedOut\n} from '../../constants/player-messages.ts';\nimport { WavefrontWebrtcIceFailed, WavefrontWebrtcUsedTurn } from '../../constants/wavefront.ts';\nimport DataUsageModeEnum from '../../enums/DataUsageModeEnum.ts';\nimport { AdcWebrtcEndToEndStreamLoadTimeStates } from '../../utils/stream-load-times.ts';\nimport { parseWebRTCStatsReport, IceStateFailed } from '../../utils/webrtc-utils.ts';\n\nimport type EnvSettingsService from '@adc/app-infrastructure/services/env-settings';\nimport type Owner from '@ember/owner';\nimport type { Task } from 'ember-concurrency';\nimport type { StateInfo } from '../../components/base-player.ts';\nimport type { StreamingTypeLive } from '../../constants/generic.ts';\nimport type { WebrtcAudioStatus } from '../../enums/WebrtcAudioUsage.ts';\nimport type { RTCIceCandidateStats } from '../../types.ts';\nimport type { JanusPluginHandle, JanusSession } from '../../utils/minijanus';\nimport type { AdcWebrtcEndToEndStreamLoadTimes } from '../../utils/stream-load-times.ts';\nimport type { CHANGE_CAMERA_AUDIO, StateControllerCommandTypes } from '../state-controllers/base-state-controller.ts';\nimport type WebrtcStreamRecorder from './webrtc-stream-recorder.ts';\n\nexport type PlayerCommandRequestParams<T> = T;\n\nexport type PlayerCommandCommands<T> = T | StateControllerCommandTypes;\n\nexport interface BaseRtcPlayerProps {\n cameraDataUsageMode?: number;\n deviceModel?: string;\n firmware?: string;\n forcedAspectRatio?: number;\n logMessageToWavefront: (message: string) => void;\n mac?: string;\n playerId: string;\n streamingType: string;\n updateState: (state: string, stateInfo: StateInfo) => void;\n upstreamLogger?: (message: string) => void;\n}\n\nexport type SendPlayerCommandBaseCommands = typeof CHANGE_CAMERA_AUDIO;\n\n/**\n * Various strings used in this file.\n */\nconst WsGotAMessage = 'Got a message.',\n StunStreamType = 'STUN',\n TurnStreamType = 'TURN',\n InitialLocalCandidates = 'initial-local-candidates',\n InitialRemoteCandidates = 'initial-remote-candidates',\n InitialCandidatePairs = 'initial-candidate-pairs',\n Port443 = '443';\n\n/**\n * The 16:9 aspect ratio in decimal form.\n * This aspect ratio is the default until we get the true aspect ratio from the stream.\n */\nconst SixteenNineAspectRatio = 16 / 9;\n\n/**\n * Variables relating to stream quality.\n * We check the stream quality every [StreamQualityCheckRateMs].\n * We send a stream frozen message after [FrozenFpsCount] FPS rates of 0.\n * We will disconnect the stream after [FrozenDurationMaxMs] (once we send a stream frozen message [FrozenFpsCountMax] times).\n */\nconst StreamQualityCheckRateMs = 500,\n FrozenFpsCount = 5,\n FrozenDurationMaxMs = 10_000,\n // Note: add FrozenFpsCount to offset the first 5 checks (to be in frozen state for a full 10 seconds).\n FrozenFpsCountMax = FrozenDurationMaxMs / StreamQualityCheckRateMs + FrozenFpsCount;\n\n/**\n * Timeout times for\n * - end-to-end VV/EE and TURN streams.\n * - Stream load default timeout.\n */\nconst FifteenMinuteStreamCapMs = 900_000;\nexport const DefaultConnectionTimeout = 10_000;\n\n/**\n * Stream load percentages.\n */\nexport const TenPercent = 10,\n TwentyPercent = 20,\n ThirtyPercent = 30,\n FourtyPercent = 40,\n FourtyFivePercent = 45,\n FiftyPercent = 50,\n SixtyPercent = 60,\n SeventyPercent = 70,\n EightyPercent = 80;\n\n/**\n * Gets the native aspect ratio from the video (once the stream has started coming in), and sets aspect-ratio-related\n * css on the video player.\n */\nfunction getAndSetAspectRatioFromVideo(this: BaseRtcPlayer): void {\n const { streamDisconnected, aspectRatioSet, videoPlayer } = this;\n\n // This function may resolve when we call peerConnection.close on stream disconnect when:\n // the WebRTC connection was completed and ready to receive video, but the server immediately hung up (i.e. a stream error occurred).\n // In this case, ignore any other stream setup steps we would normally follow.\n // We also do not need to set the aspect ratio if we already did so.\n if (streamDisconnected || aspectRatioSet || !videoPlayer) {\n return;\n }\n\n // Grab the native height and width from the video player when it has loaded.\n const { videoHeight, videoWidth } = videoPlayer,\n nativeAspectRatio = videoWidth / videoHeight;\n\n // For Legacy Edge: when onloadedmetadata is first called, the stream size is 6x6. Skip this case because this is incorrect.\n // We will call this function again when video has actually started coming through.\n if (videoHeight < 10 || videoWidth < 10) {\n return;\n }\n\n setAspectRatioCss.call(this, nativeAspectRatio);\n}\n\n/**\n * Sets aspect-ratio-related CSS on the video player based on a given aspect ratio.\n *\n * @note This currently only works with aspect ratios that are no wider than 16:9.\n */\nfunction setAspectRatioCss(this: BaseRtcPlayer, aspectRatio: number): void {\n if (!this.videoPlayer) {\n return;\n }\n\n // Note: this code currently only works with aspect ratios that are no wider than 16:9. Will need to change if we get wider streams.\n const widthPercentage = (100 * aspectRatio) / SixteenNineAspectRatio;\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore TODO fix in post-Typescript cleanup VID-65385\n this.videoPlayer.style = `width: ${widthPercentage}%;`;\n this.aspectRatioSet = true;\n}\n\n/**\n * Helper function to handle the websocket teardown.\n */\nfunction handleWebSocketTeardown(this: BaseRtcPlayer, sendLogPromise?: Promise<void>): void {\n const {\n webSocket,\n handle,\n handleAttached,\n session,\n sessionCreated,\n peerConnection,\n videoPlayer,\n usersAudioStream\n } = this;\n let detach, destroy;\n\n // Handle and session may not exist if we disconnect early or are using an end-to-end stream.\n if (handle && handleAttached) {\n detach = handle.detach();\n }\n\n if (session && sessionCreated) {\n destroy = session.destroy();\n }\n\n // This is the equivalent of Promise.allSettled, which is not available in all browsers yet.\n const promises = [detach, destroy, sendLogPromise].filter((p) => p !== undefined).map((p) => p?.catch((e) => e));\n Promise.all(promises).then(() => {\n // Kill the session keepalive so we don't attempt to send anymore keepalives through a closed session.\n // We do this multiple times since it sometimes can get triggered back on when sending disconnect messages.\n this.clearKeepalive();\n\n if (this.oneMinuteLogTimeout) {\n clearTimeout(this.oneMinuteLogTimeout);\n }\n\n // Close the websocket if it is still open.\n !this.webSocketIsNullOrClosingOrClosed(webSocket) && webSocket?.close();\n\n // Close down the peer connection object to release resources.\n if (peerConnection) {\n // Following steps listed in this document: https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API/Signaling_and_video_calling\n peerConnection.onicecandidate = null;\n peerConnection.oniceconnectionstatechange = null;\n peerConnection.ontrack = null;\n\n if (videoPlayer && videoPlayer.srcObject && videoPlayer.srcObject instanceof MediaStream) {\n videoPlayer.srcObject.getTracks().forEach((track) => track.stop());\n }\n\n if (usersAudioStream) {\n usersAudioStream.getTracks().forEach((track) => track.stop());\n }\n\n peerConnection.close();\n this.peerConnection = undefined;\n }\n });\n}\n\n/**\n * Function to handle restarting the stream if we're streaming e2e and we aren't using 443.\n */\nexport function restartStreamIfNotUsingPort443(this: BaseRtcPlayer): void {\n if (this.signallingServerPort && this.signallingServerPort !== Port443 && !this.isFallbackToPort443) {\n this.isFallbackToPort443 = true;\n this.isStreamRestart = true;\n this.startStream();\n }\n}\n\n/**\n * @classdesc\n *\n * A base object for creating and handling WebRTC streaming connections.\n */\nexport default abstract class BaseRtcPlayer {\n @service declare envSettings: EnvSettingsService;\n\n // #region Required Values\n\n /**\n * A unique id for the player, in case there are multiple webRTC players on the page.\n */\n playerId = '';\n\n /**\n * Is this for an End-to-End WebRTC connection (as opposed to a proxy connection over WebRTCProxy)?\n */\n isEndToEnd?: boolean;\n\n /**\n * Function passed in for sending state updates.\n */\n updateState = (\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _state: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _stateInfo?: StateInfo\n ) => {};\n\n upstreamLogger = (\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _message: string\n ) => {};\n\n // #endregion\n\n // #region Optional Values\n\n /**\n * Camera property determines what, if any, data-saving restrictions should be put in place.\n */\n cameraDataUsageMode?: number;\n\n /**\n * The mac address of the camera.\n */\n mac?: string;\n\n /**\n * The aspect ratio we want to use for this stream, if we're forcing one.\n */\n forcedAspectRatio?: number;\n\n /**\n * The model of the camera we're streaming from.\n */\n deviceModel?: string;\n\n /**\n * The firmware version of the camera.\n */\n firmware?: string;\n\n // #endregion\n\n // #region WebRTC Proxy\n\n // TODO the following should move to proxy-rtc-player VID-65385\n\n /**\n * Is this camera a virtual camera?\n */\n isVirtualCamera?: boolean;\n\n /**\n * The session for a WebRTC proxy stream.\n */\n session?: JanusSession;\n\n /**\n * Has a Janus session been created?\n */\n sessionCreated = false;\n\n /**\n * The handle for a WebRTC proxy stream.\n */\n handle?: JanusPluginHandle;\n\n /**\n * Has a Janus plugin handle been created and attached to a Janus session?\n */\n handleAttached = false;\n\n /**\n * The streaming type, whether live or playback.\n */\n streamingType?: typeof StreamingTypeLive | typeof StreamingTypePlayback;\n\n // #endregion\n\n // #region WebRTC End-to-End\n\n // TODO the following should move to end-to-end-rtc-player VID-65385\n /**\n * The signalling server port.\n */\n signallingServerPort?: string;\n\n /**\n * Should we fall back to port 443? Will be set to true if we are using a custom port and the stream fails to connect.\n */\n isFallbackToPort443 = false;\n\n // #region Audio\n\n /**\n * If this stream is using audio, this is the audioStream object for the user's microphone input.\n * Currently this is only used for end-to-end streams.\n */\n usersAudioStream?: MediaStream;\n\n /**\n * The constraints we use for microphone requests for two-way audio (customer microphone going to camera).\n */\n abstract microphoneRequestConstraints: MediaStreamConstraints;\n\n // #endregion\n\n // #region Stream Recording\n\n /**\n * A WebrtcStreamRecorder object if this stream is being recorded through the browser.\n */\n recorder?: WebrtcStreamRecorder;\n\n // #endregion\n\n // #endregion\n\n // #region Player State Variables\n\n /**\n * The peerconnection for this stream.\n */\n peerConnection?: RTCPeerConnection;\n\n /**\n * The websocket connection open for this stream.\n */\n webSocket?: WebSocket;\n\n /**\n * The video player tag for this stream.\n */\n videoPlayer?: HTMLVideoElement;\n\n /**\n * Whether video has started for this stream or not.\n */\n playStarted?: boolean;\n\n /**\n * The current stream percentage.\n */\n currentStreamPercentage?: number;\n\n /**\n * Has the aspect ratio been set on the video player?\n */\n aspectRatioSet = false;\n\n /**\n * Is this a stream restart? If so, reset the streamDisconnected property to false later on in the connection process.\n * This is to avoid disconnection-related promises/event listeners from resolving in the beginning of the stream restart.\n */\n isStreamRestart = false;\n\n /**\n * Has ICE negotiation failed?\n */\n iceNegotiationFailed = false;\n\n /**\n * Has autoplay failed?\n */\n autoplayFailed = false;\n\n /**\n * Has the stream gone through the full disconnect process?\n */\n streamDisconnected = false;\n\n /**\n * Is the stream currently paused?\n */\n isPaused = false;\n\n /**\n * A timeout for sending an updated stream log 1 minute after streaming has started.\n * Cancelled in case the stream ends or is destroyed before 1 minute.\n */\n oneMinuteLogTimeout?: number;\n\n /**\n * How long we'll wait when stuck at the current loading percentage.\n * This starts at 10 seconds, but we change it to 60 seconds if we are forcing a STUN stream.\n */\n timeoutTimeIfStuckMs: number = DefaultConnectionTimeout;\n\n // #endregion\n\n // #region Logging and Testing\n\n /**\n * A proxy containing a URLSearchParams object, used for grabbing any query params we are using on the page.\n * This is mostly used for custom query params we want configurable for WebRTC internal testing.\n */\n queryParams: URLSearchParams;\n\n /**\n * Have we sent the initial WebRTC stats log?\n */\n initialLogSent = false;\n\n /**\n * When did ICE negotiation start?\n */\n iceStartTime?: number;\n\n /**\n * When did ICE negotiation finish?\n */\n iceCompletionTime?: number;\n\n /**\n * A function to log a message to Wavefront through the WebrtcPlayer ember component.\n */\n logMessageToWavefront: (message: string) => void = () => {};\n\n /**\n * An object containing the candidate-pair, local-candidate, and remote-candidate stats from the initial webRtcStats log.\n */\n initialLogCandidateStats: {\n 'initial-local-candidates'?: RTCIceCandidateStats[];\n 'initial-remote-candidates'?: RTCIceCandidateStats[];\n 'initial-candidate-pairs'?: RTCIceCandidatePairStats[];\n } = {};\n\n /**\n * Did we send a stream stuck log for proxy during the stream load? If so, send the next log as an initial log.\n */\n sentStreamStuckLogDuringProxyStreamLoad = false;\n\n /**\n * Are we only receiving relay candidates? Here we would skip processing non-relay candidates received like host, srflx, and prflx.\n */\n onlyReceiveRelayCandidates = false;\n\n /**\n * Are we only sending relay candidates? Here we would skip sending any non-relay candidates like host, srflx, and prflx.\n */\n onlySendRelayCandidates = false;\n\n /**\n * Are we ignoring relay candidates? Here we would skip sending/receiving any relay candidates.\n */\n ignoreRelayCandidates = false;\n\n /**\n * An object for measuring stream load times of the stream.\n * Undefined if we are not measuring timing for this stream.\n *\n * For now this only works with end-to-end streams. In the future we may make this generic for proxy. VID-79606\n */\n streamLoadTimesObject?: AdcWebrtcEndToEndStreamLoadTimes;\n\n // #endregion\n\n // #region Stream Quality\n\n /**\n * Boolean check for if the stream has frozen and has received no frames for over 2 seconds.\n */\n isStreamFrozen = false;\n\n /**\n * How many times in a row have we received an fps of 0 or undefined from a stream quality check?\n */\n noFpsCount = 0;\n\n // #endregion\n\n // #region Ember Object Hooks\n\n // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars\n constructor(host: object, _props: any) {\n // Set owner so we can inject services.\n setOwner(this, getOwner(host) as Owner);\n\n this.queryParams = new URLSearchParams(window.location.search);\n\n window.RTCLogInformation = [];\n window.RTCDebugLogInformation = [];\n\n this.setForceTurnProperties();\n\n this.updateState(Initializing);\n }\n\n // #endregion\n\n // #region WebRTC Connection Functions\n\n /**\n * Begin the WebRTC stream process.\n */\n abstract startStream(): void;\n\n private get getVideoPlayer(): HTMLVideoElement | null {\n return document.getElementById(this.playerId) as HTMLVideoElement;\n }\n\n /**\n * Attach the WebRTC stream to the video tag with the matching playerId.\n *\n * @param event The event object containing the WebRTC stream.\n */\n attachStreamToVideoTag(event: RTCTrackEvent): void {\n this.logWithMac('Player is on track, attaching to video tag.', event, ConsoleDebug);\n\n // Set the stream on the video tag when we are ready to play.\n const { forcedAspectRatio, webSocket, streamingType } = this;\n\n // TODO fix in post TS follow-up\n // eslint-disable-next-line @typescript-eslint/no-this-alias, @adc/ember/no-is-destroyed\n if (isDestroyed(this) || !this.webSocketIsOpen(webSocket)) {\n return;\n }\n\n const videoPlayer = this.getVideoPlayer;\n if (!videoPlayer) {\n // Could not find the video tag to which we want to attach the stream.\n this.disconnectWithError(FailedToAttach, null);\n return;\n }\n\n this.streamLoadTimesObject?.addTiming(AdcWebrtcEndToEndStreamLoadTimeStates.AttachTrack);\n\n this.recorder && this.recorder.addStream(event.streams[0], true);\n\n videoPlayer.srcObject = event.streams[0];\n videoPlayer.muted = true;\n\n const playPromise = videoPlayer.play();\n\n // Set up any other necessary player hooks.\n playPromise &&\n playPromise\n .then(() => {\n // This function may resolve when we call peerConnection.close on stream disconnect when:\n // the WebRTC connection was completed and ready to receive video, but the server immediately hung up (i.e. a stream error occurred).\n // In this case, ignore any other stream setup steps we would normally follow.\n if (!this.streamDisconnected) {\n this.onPlayStarted();\n\n this.streamLoadTimesObject?.addTiming(AdcWebrtcEndToEndStreamLoadTimeStates.PlayStarted);\n }\n })\n .catch((e) => {\n // Autoplay may fail due to an abort error if we navigate away from the page before play starts (which can be expected).\n // If it wasn't an abort error, disconnect the stream and update the player state.\n if (e.code !== e.ABORT_ERR) {\n // VID-46787: Temporarily disconnect with error for playback since we have not handled auto-play failures for those streaming types yet.\n if (streamingType === StreamingTypePlayback) {\n this.disconnectWithError(AutoPlayFailed, e);\n } else {\n this.disconnectStream(AutoPlayFailed);\n this.updateState(AutoplayFailure);\n }\n\n this.autoplayFailed = true;\n }\n });\n\n this.videoPlayer = videoPlayer;\n\n this.setPlayerAspectRatio(videoPlayer, forcedAspectRatio);\n }\n\n /**\n * Method for tasks to do when the video playing actually starts.\n */\n onPlayStarted(): void {\n this.logWithMac(`Playing video now for video player id ${this.playerId}`);\n this.updateState(Playing);\n\n // For Legacy Edge: when onloadedmetadata is called, the stream size is 6x6.\n // We will call the aspect ratio setting function again to check if we need to set this css now.\n getAndSetAspectRatioFromVideo.call(this);\n\n // For Legacy Edge: mark when play has started because we receive the 80% loading message after play has started.\n this.playStarted = true;\n\n this.disconnectOrSendLogIfStreamGetsStuck.cancelAll();\n this.checkStreamQualityTask.perform();\n\n // If we are recording this stream (for VV or RVM), start a recording and end this stream at 15 minutes.\n if (this.recorder) {\n this.recorder.startRecording();\n this.disconnectStreamAtStreamCap.perform(DisconnectedRecordedVVEEStream);\n }\n\n // If the camera is in LowDataUsageMode we want to end the stream after 15 minutes to prevent rampant data usage.\n if (this.cameraDataUsageMode && this.cameraDataUsageMode === DataUsageModeEnum.LowDataMode) {\n this.disconnectStreamAtStreamCap.perform(DisconnectedCellConnectorConnectedCamera);\n }\n }\n\n /**\n * Set the aspect ratio of the player when possible. This would either be set:\n * 1) now if the player was passed an aspect ratio we want to force the video to fit, or\n * 2) later once the video stream starts and we get the native aspect ratio from the stream metadata.\n */\n setPlayerAspectRatio(videoPlayer: HTMLVideoElement, forcedAspectRatio?: number): void {\n // By default, the video player css is set to work with 16:9 aspect ratio streams.\n // If the aspect ratio we want is not 16:9, we need update player css\n // so the div and overlay will be the exact size of the player* instead of covering a 16:9 area.\n // *The exception for this would be if we pass in an aspect ratio we want to force the player to use.\n\n if (forcedAspectRatio) {\n // Do we have a specific aspect ratio we want to force the player to use?\n // If so, we can set relevant sizing css now.\n setAspectRatioCss.call(this, forcedAspectRatio);\n } else {\n // Otherwise, we need to wait for video to start so we can grab the native aspect ratio from the stream metadata.\n videoPlayer.onloadedmetadata = getAndSetAspectRatioFromVideo.bind(this);\n }\n }\n\n /**\n * Checks the current ICE negotiation state in the peer connection, and disconnects the stream if negotiation failed.\n */\n disconnectIfIceFailed(): void {\n if (this.peerConnection && this.peerConnection.iceConnectionState === IceStateFailed) {\n this.logMessageToWavefront(WavefrontWebrtcIceFailed);\n this.iceNegotiationFailed = true;\n window.console.error(IceNegotiationFailed);\n this.updateState(IceFailure);\n this.disconnectStream(IceNegotiationFailed);\n }\n }\n\n /**\n * Disconnect the WebRTC stream.\n *\n * @param disconnectionReason A nullable reason for the disconnection, used in logging.\n * @param skipLog Do we want to skip sending the log (if we are only clearing out variables and restarting the connection).\n */\n disconnectStream(disconnectionReason: string, skipLog = false): void {\n const { streamDisconnected, webSocket, initialLogSent } = this;\n let sendLogPromise;\n\n // If the stream is already disconnected or disconnecting, don't disconnect it again.\n if (streamDisconnected) {\n return;\n }\n\n this.logWithMac('Disconnecting stream.');\n this.streamDisconnected = true;\n\n // Send a log on disconnect if we haven't sent one already. In this case, the stream failed to connect.\n // Wait to close the peerConnection until the getStats call can complete.\n if (!skipLog) {\n // If we sent an initial log during the stream load, we should log the current log as an initial log as well.\n if (!initialLogSent || this.sentStreamStuckLogDuringProxyStreamLoad) {\n sendLogPromise = this.sendLog(true, true, disconnectionReason);\n this.sentStreamStuckLogDuringProxyStreamLoad = false;\n } else {\n sendLogPromise = this.sendLog(false, false, disconnectionReason);\n }\n }\n\n this.cancelTasksAndRecorders();\n\n // Kill the session keepalive so we don't attempt to send anymore keepalives through a closed session.\n // We do this multiple times since it sometimes can get triggered back on when sending disconnect messages.\n this.clearKeepalive();\n\n // If the websocket isn't already closing, start tearing everything down.\n // For some stream disconnections, the websocket will close on the server side (say if we disconnect with an error).\n // For most normal timeout cases, we need to close this ourselves.\n if (webSocket && !this.webSocketIsNullOrClosingOrClosed(webSocket)) {\n handleWebSocketTeardown.call(this, sendLogPromise);\n }\n\n // Whether or not the websocket was open, always do this extra cleanup last.\n // Kill the session keepalive so we don't attempt to send anymore keepalives through a closed session.\n // We do this multiple times since it sometimes can get triggered back on when sending disconnect messages.\n this.clearKeepalive();\n\n Object.assign(this, {\n handle: null,\n handleAttached: false,\n peerConnection: null,\n session: null,\n sessionCreated: false,\n webSocket: null,\n websocketOpened: false\n });\n }\n\n // #endregion\n\n // #region Player Command Functions\n\n /**\n * Sends a player command to the WebRTC stream.\n * This could be a command through the websocket. For example, proxy sends events to the janus server like play, pause, set speed, seek, or change url.\n * This could also be a command just for the player itself. For example, end-to-end can mute and unmute camera and user audio.\n *\n * @param command The plain-text command for the player.\n * @param requestParams Additional request params needed for this message.\n * @param options Additional properties needed to process the command.\n */\n abstract sendPlayerCommand(\n command: PlayerCommandCommands<SendPlayerCommandBaseCommands>,\n requestParams: PlayerCommandRequestParams<object>,\n options: { sendProxyUrl?: boolean; alsoCallInternalFunction?: boolean }\n ): void;\n\n /**\n * Change the audio (mute/unmute or volume) coming from the camera to the user.\n *\n * @param mute Whether we want to mute this audio feed or not.\n * @param volume The volume slider value or last unmuted volume.\n * @param isEnabledAutomaticallyAfterDelay Is the camera audio being enabled automatically after a delay (from customer-ember)?\n */\n changeCameraAudio({\n mute,\n volume,\n isEnabledAutomaticallyAfterDelay\n }: {\n mute: boolean;\n volume: number;\n isEnabledAutomaticallyAfterDelay: boolean;\n }): void {\n const { videoPlayer, recorder } = this;\n\n if (!videoPlayer) {\n return;\n }\n\n videoPlayer.muted = mute || !volume;\n videoPlayer.volume = mute ? 0 : volume * 0.01;\n\n if (recorder && isEnabledAutomaticallyAfterDelay) {\n recorder.toggleCameraAudioGain(false);\n }\n }\n\n // #endregion\n\n // #region General Helper Methods\n\n /**\n * If we received a forceTurn query param, we will stop sending and/or receiving certain candidate types (relay and non-relay).\n * This allows us to test STUN (non-relay, usually the default) and TURN streaming (relay, often not the default).\n *\n * forceTurn = 0: ignore sending/receiving relay candidates (send and process all other types like host, srflx, prflx)\n * forceTurn = 1: only send relay candidates and process received relay candidates (skip all other types like host, srflx, prflx)\n * forceTurn = 2: only process received relay candidates\n * forceTurn = 3: only send relay candidates\n */\n setForceTurnProperties(): void {\n // Check if we want to force us to use TURN instead of STUN.\n // We'll do this either blocking non-relay candidates from sending and/or receiving.\n // Checking the param here makes TURN more easily testable on different pages without needing to implement a query param on every page.\n const forceTurn = this.queryParams.get('forceTurn');\n\n if (forceTurn === '0') {\n // For this value, ignore sending/receiving relay candidates over the signaling server.\n this.ignoreRelayCandidates = true;\n }\n\n if (forceTurn === '1' || forceTurn === '2') {\n // For these values, only receive relay candidates coming from the camera over the signaling server.\n this.onlyReceiveRelayCandidates = true;\n }\n\n if (forceTurn === '1' || forceTurn === '3') {\n // For these values, only send relay candidates over the signaling server.\n this.onlySendRelayCandidates = true;\n }\n }\n\n /**\n * Logs an info message to the console with the mac address appended.\n *\n * @param message Initial message to log.\n * @param infoObject An info or context object to add to the end of the console message.\n * @param messageType The type of console message to use. 'info' if null.\n */\n logWithMac(\n message: string,\n infoObject?: any,\n messageType: 'error' | 'warn' | 'log' | 'info' | 'debug' = 'info'\n ): void {\n const args = [`${message} Mac:${this.mac}`];\n // Add an object to the end of the log only if it exists.\n !!infoObject && args.push(infoObject);\n window.console[messageType](...args);\n\n if (messageType !== 'debug') {\n if (!window.RTCLogInformation) {\n window.RTCLogInformation = [];\n }\n\n window.RTCLogInformation.push(`${message}`);\n } else {\n // If we got a message from the signalling server, add infoObject.data to message for more detail.\n const messageToLog = message === WsGotAMessage ? `${message} ${infoObject.data}` : `${message}`;\n\n if (!window.RTCDebugLogInformation) {\n window.RTCDebugLogInformation = [];\n }\n\n window.RTCDebugLogInformation.push(messageToLog);\n }\n }\n\n /**\n * Sends a WebRTC log up with the current state of the stream.\n * We send an initial log up on stream success/fail, and we send an additional log 1 minute later.\n *\n * @param isInitialLog Is this the initial log we are sending up, instead of an update log?\n * @param streamFailedToConnect Did the stream fail to connect?\n * @param disconnectionReason An optional disconnection reason for the log (if the stream has ended).\n */\n sendLog(\n isInitialLog: boolean,\n streamFailedToConnect: boolean,\n disconnectionReason?: string,\n audioStatus?: WebrtcAudioStatus\n ): Promise<void> | undefined {\n const { peerConnection, isVirtualCamera, iceStartTime, iceCompletionTime, isEndToEnd } = this;\n\n // In some cases we may not have a peer connection yet but we want to send a simplified log.\n // For example, an end-to-end stream could return an error message after our first websocket message out.\n if (!peerConnection) {\n if (isInitialLog) {\n this.updateState(Log, {\n direct: isEndToEnd,\n disconnectionReason,\n failed: true,\n isInitialLog: (this.initialLogSent = true),\n isVirtualCamera\n });\n }\n\n return;\n }\n\n return peerConnection.getStats().then((reports) => {\n const parsedReport = parseWebRTCStatsReport(reports);\n\n const logProperties = {\n direct: isEndToEnd,\n disconnectionReason,\n failed: streamFailedToConnect,\n iceCompletionTime,\n iceStartTime,\n isInitialLog,\n webRtcStats: parsedReport.webRtcStats,\n audioStatus,\n isVirtualCamera\n };\n\n if (isInitialLog) {\n if (!streamFailedToConnect) {\n // If the stream was successful, send an update log 1 minute after the initial log\n // and check if our connection went through TURN for Wavefront.\n this.initialLogCandidateStats[InitialLocalCandidates] = parsedReport.localCandidates;\n this.initialLogCandidateStats[InitialRemoteCandidates] = parsedReport.remoteCandidates;\n this.initialLogCandidateStats[InitialCandidatePairs] = parsedReport.candidatePairs;\n this.oneMinuteLogTimeout = setTimeout(this.sendLog.bind(this, false), OneMinuteMs);\n\n if (parsedReport.usedTurn) {\n this.logMessageToWavefront(WavefrontWebrtcUsedTurn);\n }\n\n if (this.isEndToEnd) {\n const stunOrTurnString = parsedReport.usedTurn ? TurnStreamType : StunStreamType;\n this.logWithMac(\n `End-to-end stream is connected to ${stunOrTurnString}. Selected candidate pair types (local-remote): ${parsedReport.selectedCandidatePairTypes}`,\n parsedReport.selectedCandidatePair,\n ConsoleDebug\n );\n\n if (parsedReport.usedTurn) {\n this.disconnectStreamAtStreamCap.perform(\n 'Disconnected end-to-end stream after 15 minutes due to TURN usage.'\n );\n }\n }\n\n Object.assign(logProperties, parsedReport);\n\n this.streamLoadTimesObject?.streamPlaying(parsedReport.selectedCandidatePairTypes);\n }\n } else {\n // If we are sending an update log, replace the candidate stats with the initial log candidate stats.\n logProperties.webRtcStats = JSON.stringify(this.initialLogCandidateStats);\n }\n\n this.updateState(Log, logProperties);\n\n this.initialLogSent = true;\n });\n }\n\n /**\n * Is a (nullable) WebSocket open?\n */\n webSocketIsOpen(webSocket?: WebSocket): boolean {\n return !!webSocket && webSocket.readyState === WebSocket.OPEN;\n }\n\n /**\n * Is a (nullable) WebSocket closing or closed?\n * If the WebSocket item is null, we will consider it to be closed here and return true.\n */\n webSocketIsNullOrClosingOrClosed(webSocket?: WebSocket): boolean {\n return webSocket\n ? webSocket.readyState === WebSocket.CLOSING || webSocket.readyState === WebSocket.CLOSED\n : true;\n }\n\n /**\n * Returns an error message from an error object.\n */\n getErrorMessage(e: { message: string; error?: { reason: string } }): string | undefined {\n return e.message || e.error?.reason;\n }\n\n /**\n * Disconnects the player with an error status.\n * Logs this error with the mac address (if needed for testing), plus sends this error message up for further\n * error logging in the consuming application.\n *\n * @param errorMessage The custom error message to send.\n * @param e Object with error message and/or stack trace.\n * @param [disconnectionType=Error] The disconnection state to use and send in the state update.\n * @param [logToSentry=true] Do we want to send this error up for Sentry logging in the consuming app?\n * @param [shouldRestartPlayer=false] Should we restart the player due to this error? Default false.\n * @param [shouldRestartWebrtcModule=false] Should we restart the WebRTC e2e module due to this error?\n * @param [disconnectStream=true] Do we want to disconnect the stream?\n */\n disconnectWithError(\n errorMessage: string,\n e: any,\n {\n disconnectionType = Error,\n logToSentry = true,\n shouldRestartPlayer = false,\n shouldRestartWebrtcModule = false,\n disconnectStream = true\n } = {}\n ): void {\n // Log the message with a mac address as a normal console log so this can be used by Selenium if wanted.\n this.logWithMac(errorMessage, e);\n\n // Kill the session keepalive if it still exists.\n this.clearKeepalive();\n\n // Send an error state up to the consuming application for updating player state.\n // Optionally send an error message if we want that message to be used for error tracking purposes in the consuming app.\n const stateArguments =\n disconnectionType === Error\n ? {\n errorMessage: logToSentry ? errorMessage : undefined,\n shouldRestartPlayer,\n shouldRestartWebrtcModule\n }\n : undefined;\n this.updateState(disconnectionType, stateArguments);\n\n // Disconnect the stream if needed.\n disconnectStream && this.disconnectStream(errorMessage);\n }\n\n /**\n * Sets the current loading percentage of the stream.\n */\n updateLoadingPercentage(percentage: number): void {\n this.currentStreamPercentage = percentage;\n this.updateState(Connecting, { percentage });\n this.disconnectOrSendLogIfStreamGetsStuck.perform();\n }\n\n /**\n * Clears the stream's keepalive.\n */\n abstract clearKeepalive(): void;\n\n /**\n * Cancel any ongoing recorders, timers, tasks, etc.\n */\n cancelTasksAndRecorders(): void {\n this.disconnectOrSendLogIfStreamGetsStuck.cancelAll();\n }\n\n // #endregion\n\n // #region Audio\n\n /**\n * Gets the user's audio stream (ex. a microphone stream) if this session is using two-way audio.\n * Adds it to the peerConnection (e2e) and to any running recording (e2e+proxy).\n *\n * @note E2E connects this to the peerConnection. Proxy only needs it for in-browser VV/RVM recording.\n */\n requestUsersAudioStreamAndAddToRecorder(\n supportsAudio: boolean,\n isMicrophoneConnected: boolean,\n sdp?: string\n ): Promise<void> {\n return (async () => {\n // If this device supports audio, we are told to connect our (user's mic) audio,\n // and the incoming offer requests audio, try setting up the microphone permissions.\n // Proxy doesn't use audio through the peerconnection and its SDP, so skip that check here.\n const { isEndToEnd } = this,\n // Proxy doesn't use audio through the peerconnection and its SDP, so skip that check here.\n // For end-to-end, an audio line in the SDP means the camera supports audio and we can send it microphone audio if desired.\n sdpMeetsAudioRequirements = !isEndToEnd || sdp?.indexOf('a=mid:audio') !== -1,\n requestingMicrophoneAudio = supportsAudio && isMicrophoneConnected && sdpMeetsAudioRequirements;\n\n if (!requestingMicrophoneAudio) {\n // We are not sending audio. Either the camera didn't request it, we don't have permissions/a camera that\n // supports audio, or the customer denied microphone permissions.\n return Promise.resolve();\n }\n\n const usersAudioStream = await navigator.mediaDevices.getUserMedia(this.microphoneRequestConstraints);\n\n if (this.streamDisconnected) {\n usersAudioStream.getTracks().forEach((track) => track.stop());\n return Promise.resolve();\n }\n\n // If we get here, the device is requesting audio, PLUS we got microphone permissions from the camera.\n this.usersAudioStream = usersAudioStream;\n\n this.attachMicrophoneStreamToPlayer(usersAudioStream);\n\n // Disable user's microphone audio initially, so we have permission but audio won't be automatically sent to the camera yet.\n usersAudioStream.getAudioTracks()[0].enabled = false;\n\n // Add audio stream to in-browser recorder if we are recording.\n this.recorder && this.recorder.addStream(usersAudioStream, false);\n\n return Promise.resolve();\n })();\n }\n /**\n * Attaches a microphone stream to whatever WebRTC element transmits audio to the camera.\n *\n * @param usersAudioStream The microphone stream for the customer.\n */\n abstract attachMicrophoneStreamToPlayer(usersAudioStream: MediaStream): void;\n\n /**\n * Mutes or unmutes the audio sent to the camera from the user's microphone.\n *\n * @param mute Whether we want to mute this audio feed or not.\n */\n toggleMicrophoneAudio({ mute }: { mute: boolean }): void {\n const { usersAudioStream, recorder } = this;\n usersAudioStream && (usersAudioStream.getAudioTracks()[0].enabled = !mute);\n\n if (recorder && !mute) {\n recorder.toggleCameraAudioGain(true);\n }\n }\n\n // #endregion\n\n // #region Tasks\n\n /**\n * Task to handle the event queue and reset the rate limiter count.\n */\n disconnectOrSendLogIfStreamGetsStuck: Task<void, []> = task({ restartable: true }, async () => {\n if (this.envSettings.isTestEnvironment() && !this.isEndToEnd) {\n return;\n }\n\n const { timeoutTimeIfStuckMs, currentStreamPercentage } = this,\n queriedTimeoutTime = this.queryParams.get('timeoutTime'),\n timeoutTimeMs = queriedTimeoutTime ? parseInt(queriedTimeoutTime) * 1000 : timeoutTimeIfStuckMs,\n streamStuckDisconnectionMessage = `Stream stuck at ${currentStreamPercentage} percent after ${\n timeoutTimeMs / 1000\n } seconds.`;\n\n await timeout(timeoutTimeMs);\n\n // If it's stuck at 80% because it can't find a video player, skip disconnection.\n // This will only happen when the stream is being preloaded from a non-video page.\n if (this.getVideoPlayer) {\n this.disconnectOrSendLogIfStreamGetsStuckHelper(streamStuckDisconnectionMessage, currentStreamPercentage);\n }\n });\n\n /**\n * Method to actually disconnect or send log if stream is stuck.\n */\n abstract disconnectOrSendLogIfStreamGetsStuckHelper(\n streamStuckDisconnectionMessage: string,\n _currentStreamPercentage?: number\n ): void;\n\n /**\n * Task to disconnect the stream at stream cap (due to either TURN usage or VV/EE recorded streams).\n */\n disconnectStreamAtStreamCap: Task<void, [string]> = task({ drop: true }, async (disconnectionReason: string) => {\n await timeout(FifteenMinuteStreamCapMs);\n\n this.updateState(TimedOut);\n this.disconnectStream(disconnectionReason);\n });\n\n /**\n * A restartable task that checks the quality of the WebRTC stream. Checks every half second.\n */\n checkStreamQualityTask: Task<void, []> = task({ restartable: true }, async () => {\n const { peerConnection, isEndToEnd } = this;\n // We can't check stats with no peerConnection.\n // Skip buffer checks if we are in ember tests because this prevents test awaits from completing (because these promises are ongoing).\n if (!peerConnection || this.envSettings.isTestEnvironment()) {\n return;\n }\n\n const peerConnectionStats = await peerConnection.getStats();\n\n peerConnectionStats.forEach((stat) => {\n // Process the inbound rtp stat for video to check for fps.\n if (stat.type !== InboundRtp || stat.kind !== Video) {\n return;\n }\n\n const fps = stat.framesPerSecond;\n // We received a truthly fps, so we are streaming.\n if (fps) {\n this.noFpsCount = 0;\n\n // We are no longer frozen if we have received frames again.\n if (this.isStreamFrozen) {\n this.isStreamFrozen = false;\n this.updateState(Playing);\n }\n\n return;\n }\n\n // If fps is falsy, we received 0 or undefined fps. If we are paused, this is expected.\n if (this.isPaused) {\n return;\n }\n\n // Otherwise, we are unexpectedly getting 0fps. Count this towards the frozen/no fps count.\n this.noFpsCount++;\n\n // We set the frozen state after we have had 0 fps for 5 checks in a row (2.5 seconds).\n if (this.noFpsCount === FrozenFpsCount) {\n this.isStreamFrozen = true;\n this.updateState(Frozen);\n }\n\n // If we've had 0 fps for 20 checks in a row (10 seconds) after setting the frozen state, we will:\n // (end-to-end streams) send a streamStuckAtFrozen flag.\n // (proxy streams) disconnect the stream.\n if (this.noFpsCount === FrozenFpsCountMax) {\n if (isEndToEnd) {\n this.updateState(Frozen, { streamStuckAtFrozen: true });\n } else {\n this.updateState(Disconnected);\n }\n\n this.disconnectStream(`Stream froze for ${FrozenDurationMaxMs / 1000} seconds.`);\n }\n });\n\n await timeout(StreamQualityCheckRateMs);\n\n this.checkStreamQualityTask.perform();\n });\n\n willDestroy(): void {\n delete window.RTCLogInformation;\n delete window.RTCDebugLogInformation;\n }\n\n // #endregion\n}\n","enum WebrtcPreloadingSupport {\n NoPreloading = 0,\n PreloadToHello = 1,\n PreloadToSdp = 2,\n PreloadToIce = 3\n}\n\nexport default WebrtcPreloadingSupport;\n","import { assert } from '@ember/debug';\nimport { task, timeout } from 'ember-concurrency';\nimport {\n CameraHasDisconnected,\n CameraNotYetDialedIn,\n KeepaliveFailed,\n SessionStoppedByServer,\n WebsocketClosed\n} from '../../constants/disconnection-reasons.ts';\nimport { ConsoleDebug, ConsoleWarn } from '../../constants/generic.ts';\nimport { Disconnected, Error, FailedToConnect, CameraSpeakerAlreadyInUse } from '../../constants/player-messages.ts';\nimport { WavefrontEndToEndNotDialedIn } from '../../constants/wavefront.ts';\nimport { WebrtcAudioStatus } from '../../enums/WebrtcAudioUsage.ts';\nimport WebrtcPreloadingSupport from '../../enums/WebrtcPreloadingSupport.ts';\nimport { AdcWebrtcEndToEndStreamLoadTimeStates } from '../../utils/stream-load-times.ts';\nimport {\n IceCandidateTypeHost,\n IceCandidateTypeRelay,\n IceCandidateTypeSrflx,\n IceStateFailed,\n IceCandidateTypeUdp\n} from '../../utils/webrtc-utils.ts';\nimport { TOGGLE_MICROPHONE_AUDIO } from '../state-controllers/base-state-controller.ts';\nimport {\n END_TO_END_COMMAND_STREAM_QUALITY,\n END_TO_END_COMMAND_LOAD_MEDIA\n} from '../state-controllers/webrtc-end-to-end-state-controller.ts';\nimport BaseRtcPlayer, {\n TenPercent,\n TwentyPercent,\n ThirtyPercent,\n FourtyFivePercent,\n SixtyPercent,\n SeventyPercent,\n EightyPercent,\n restartStreamIfNotUsingPort443\n} from './base-rtc-player.ts';\nimport WebrtcStreamRecorder from './webrtc-stream-recorder.ts';\n\nimport type { Task } from 'ember-concurrency';\nimport type { EndToEndWebrtcConnectionInfo, WebrtcStreamQualityMessage, VideoPreloaderRtcProps } from '../../types.ts';\nimport type { AdcWebrtcEndToEndStreamLoadTimes } from '../../utils/stream-load-times.ts';\nimport type { SendPlayerCommandBaseCommands } from './base-rtc-player.ts';\nimport type { BaseRtcPlayerProps, PlayerCommandCommands, PlayerCommandRequestParams } from './base-rtc-player.ts';\n\ntype WebsocketCommandString = typeof WebsocketMessageChangeStream | typeof WebsocketMessageAdcCommand | undefined;\n\ninterface EndToEndWebsocketCommandBody {\n to?: string;\n from?: string;\n stream?: WebrtcStreamQualityMessage;\n adc_cmd?: 'mute_audio' | 'unmute_audio' | typeof WebsocketMessageLoadMedia;\n}\n\ninterface EndToEndPlayerCommandRequestParams {\n mute?: boolean;\n useHdStream?: boolean;\n}\n\nexport interface EndToEndRtcPlayerProps extends BaseRtcPlayerProps {\n endToEndWebrtcConnectionInfo: EndToEndWebrtcConnectionInfo;\n streamLoadTimesObject?: AdcWebrtcEndToEndStreamLoadTimes;\n videoPreloaderRtcProps?: VideoPreloaderRtcProps;\n}\n\ntype SendPlayerCommandEndToEndCommands =\n | SendPlayerCommandBaseCommands\n | typeof END_TO_END_COMMAND_STREAM_QUALITY\n | typeof END_TO_END_COMMAND_LOAD_MEDIA\n | typeof TOGGLE_MICROPHONE_AUDIO;\n/**\n * Various string const values used in this file.\n * - End-to-End WebRTC websocket messages, sent and received.\n * - ICE connected state\n * - Websocket message types\n */\nconst WebsocketMessageHello = 'HELLO',\n WebsocketMessageStartSession = 'START_SESSION',\n WebsocketMessageSessionStarted = 'SESSION_STARTED',\n WebsocketMessageSessionStopped = 'SESSION_STOPPED',\n WebsocketMessagePreloadToSdp = 'PRELOAD_SESSIONTOSDP',\n WebsocketMessagePreloadToIce = 'PRELOAD_SESSIONTOICE',\n WebsocketMessageError = 'ERROR',\n WebsocketMessageKeepalive = 'keepalive',\n WebsocketMessageChangeStream = 'CHANGE_STREAM',\n WebsocketMessageAdcCommand = 'ADC_CMD',\n WebsocketMessageLoadMedia = 'load_media',\n WebsocketWarningAudioNotAvailable = 'Two way audio may not be available',\n IceStateConnected = 'connected',\n PeerStateNew = 'new',\n PeerStateConnecting = 'connecting',\n OperatorKeyword = 'operator';\n\n/**\n * Const numbers used in this file:\n * - The timeout we are using between sending keepalive messages through the websocket. 55 seconds.\n * - The time we wait to receive a response to our keepalive message. 30 seconds.\n * - Values for timeouts if we get stuck at a certain part of the stream connection.\n * - The time we wait to process relay candidates.\n */\nconst KeepaliveMs = 55000,\n KeepaliveResponseMs = 30000,\n ExtendedConnectionTimeout = 60000,\n DefaultTurnDelayMs = 5000;\n\n/**\n * Process an incoming message from the websocket.\n *\n * @param event The message event we received.\n */\nfunction processWebsocketMessage(this: EndToEndRtcPlayer, event: MessageEvent): void {\n this.logWithMac('Got a message.', event, ConsoleDebug);\n const { streamLoadTimesObject } = this,\n data = event.data;\n\n // First message from the signalling server responding to our initial hello.\n if (data.startsWith(WebsocketMessageHello)) {\n sendSessionStartMessage.call(this);\n return;\n }\n\n // Second message from the signalling server indicating we've started connecting a WebRTC session.\n if (data.startsWith(WebsocketMessageSessionStarted)) {\n this.updateLoadingPercentage(ThirtyPercent);\n streamLoadTimesObject?.addTiming(AdcWebrtcEndToEndStreamLoadTimeStates.ReceiveSessionStart);\n\n // We get a JSON object back with stream info. Parse it after the 'SESSION_STARTED' initial message.\n const sessionInfo = JSON.parse(data.substring(`${WebsocketMessageSessionStarted}`.length));\n\n const remoteEndToEndPeerId = sessionInfo.publisher_peer_id;\n this.remoteEndToEndPeerId = remoteEndToEndPeerId;\n this.logWithMac(`Session with publisher peer ${remoteEndToEndPeerId} started.`, null, ConsoleDebug);\n\n // We can now set up the WebRTC peer connection object because we've received iceServers from the signalling server.\n setUpEndToEndPeerConnection.call(this, sessionInfo.iceServers);\n return;\n }\n\n // The WebRTC connection ended, start tearing down the connection.\n if (data.startsWith(WebsocketMessageSessionStopped)) {\n this.logWithMac(`Session for peer ${this.remoteEndToEndPeerId} stopped by server.`);\n this.updateState(Disconnected);\n this.disconnectStream(SessionStoppedByServer);\n return;\n }\n\n // The WebRTC connection had an error, start tearing down the connection.\n if (data.startsWith(WebsocketMessageError)) {\n // The format of this message is unknown so far - we will log a console error so we can detect it if it occurs.\n this.disconnectWithError(`End-to-end error received: ${data.toString()}`, null);\n return;\n }\n\n if (data.startsWith('keepalive-ok')) {\n clearTimeout(this.keepaliveResponseTimeout);\n return;\n }\n\n // Handle incoming JSON SDP and ICE messages.\n let message;\n try {\n message = JSON.parse(data);\n } catch (e) {\n this.disconnectWithError(`Cannot parse websocket message: \"${data.toString()}\"`, e);\n return;\n }\n\n if (message.sdp) {\n onIncomingSDP.call(this, message);\n } else if (message.ice) {\n onIncomingICE.call(this, message.ice);\n } else if (message.warning) {\n onIncomingWarning.call(this, message.warning);\n } else if (message.info) {\n this.logWithMac(`End-to-end info received: ${message.info}.`, null, ConsoleDebug);\n } else if (message.error) {\n if (message.error.endsWith('has not yet dialed in')) {\n this.logMessageToWavefront(WavefrontEndToEndNotDialedIn);\n this.disconnectWithError(CameraNotYetDialedIn, null, {\n disconnectionType: Error,\n logToSentry: false,\n shouldRestartWebrtcModule: true\n });\n } else if (message.error.endsWith('has disconnected')) {\n this.disconnectWithError(CameraHasDisconnected, null, { disconnectionType: Disconnected });\n } else {\n // General error case.\n this.disconnectWithError(message.error, null);\n }\n } else {\n this.logWithMac('Received unknown message type from end-to-end player.', message, ConsoleWarn);\n }\n}\n\n/**\n * Sends the message for starting a session.\n * This is either a basic start session, or a specialized preloading message.\n */\nfunction sendSessionStartMessage(this: EndToEndRtcPlayer): void {\n const { streamLoadTimesObject, videoPreloaderRtcProps } = this,\n preloadingSupportEnum = videoPreloaderRtcProps?.preloadingSupportEnum;\n\n this.updateLoadingPercentage(TwentyPercent);\n streamLoadTimesObject?.addTiming(AdcWebrtcEndToEndStreamLoadTimeStates.ReceiveHello);\n\n let startSessionMessage = WebsocketMessageStartSession;\n\n if (preloadingSupportEnum === WebrtcPreloadingSupport.PreloadToSdp) {\n startSessionMessage = WebsocketMessagePreloadToSdp;\n } else if (preloadingSupportEnum === WebrtcPreloadingSupport.PreloadToIce) {\n startSessionMessage = WebsocketMessagePreloadToIce;\n }\n\n const cameraAuthToken = this.endToEndWebrtcConnectionInfo.cameraAuthToken,\n operatorSessionKeyword = this.endToEndWebrtcConnectionInfo.urlForRecordingStream ? ` ${OperatorKeyword}` : '';\n this.sendWebSocketMessage(`${startSessionMessage} ${cameraAuthToken}${operatorSessionKeyword}`);\n\n streamLoadTimesObject?.addTiming(AdcWebrtcEndToEndStreamLoadTimeStates.SentSessionStart);\n}\n\n/**\n * Creates the PeerConnection for End-to-End WebRTC connections once we have the needed ice servers.\n */\nfunction setUpEndToEndPeerConnection(this: EndToEndRtcPlayer, iceServers: RTCIceServer[]): void {\n // For end-to-end streams, we get the ice servers from the signalling server connection, so we must wait until\n // we have received all of them so we can create the peer connection object.\n // For the proxy case, we instead get the ice servers values from the backend.\n const pcConfig = { iceServers },\n peerConnection = new RTCPeerConnection(pcConfig);\n\n this.upstreamLogger?.('RTCPeerConnection config: ' + JSON.stringify(pcConfig));\n this.peerConnection = peerConnection;\n\n // Send ICE Candidates to the signalling server when the peer connection receives them.\n peerConnection.onicecandidate = (event) => processIceCandidate.call(this, event);\n\n // If ICE negotiation fails, send a separate disconnect message indicating ICE failure and disconnect the player.\n peerConnection.oniceconnectionstatechange = () => processIceState.call(this);\n\n // Attach the stream to the video tag when the stream is ready to play.\n peerConnection.ontrack = (event) => {\n if (this.videoPreloaderRtcProps?.onTrackCallback) {\n this.videoPreloaderRtcProps.onTrackCallback(event);\n } else {\n this.attachStreamToVideoTag(event);\n }\n };\n\n this.streamLoadTimesObject?.addTiming(AdcWebrtcEndToEndStreamLoadTimeStates.CreatePeerConnection);\n}\n\n/**\n * Process the SDP we receive from the camera for end-to-end WebRTC streaming.\n */\nfunction onIncomingSDP(\n this: EndToEndRtcPlayer,\n message: { to: string; message: string; from: string; sdp: RTCSessionDescriptionInit }\n): void {\n const { peerConnection, remoteEndToEndPeerId, endToEndWebrtcConnectionInfo, streamLoadTimesObject } = this,\n { sdp, to } = message,\n // TODO fix in post TS follow-up VID-65385\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n player = this;\n\n if (!peerConnection || !sdp.sdp) {\n return;\n }\n\n streamLoadTimesObject?.addTiming(AdcWebrtcEndToEndStreamLoadTimeStates.ReceiveSdp);\n\n this.localEndToEndPeerId = to;\n\n this.updateLoadingPercentage(FourtyFivePercent);\n\n // VID-37492: Manually set the profile-level-id to the same value that has worked with WebRTC proxy streaming.\n // This is to fix a Firefox issue, but we are applying across the board for consistency.\n sdp.sdp = sdp.sdp.replace(/profile-level-id=.{6}/, 'profile-level-id=42e01f');\n\n // If this is a stream restart, wait till now to reset streamDisconnected to avoid disconnection-related promises/event listeners from resolving in the beginning of the stream restart.\n if (this.isStreamRestart) {\n this.streamDisconnected = false;\n }\n\n this.upstreamLogger?.('Setting remote description: ' + JSON.stringify(sdp));\n\n peerConnection\n .setRemoteDescription(sdp)\n .then(() => {\n // For end-to-end streaming, the camera should reach out first with an offer. We will always send an answer.\n if (sdp.type !== 'offer') {\n return;\n }\n\n streamLoadTimesObject?.addTiming(AdcWebrtcEndToEndStreamLoadTimeStates.SetRemoteSdp);\n\n // If the stream has disconnected or autoplay has failed, do not continue with the rest of the connection.\n if (this.streamDisconnected || this.autoplayFailed) {\n return;\n }\n\n this.updateLoadingPercentage(SixtyPercent);\n\n const { supportsAudio, isMicrophoneConnected } = endToEndWebrtcConnectionInfo;\n this.requestUsersAudioStreamAndAddToRecorder(supportsAudio, isMicrophoneConnected, sdp.sdp).finally(() => {\n // In either case, afterwards we will create our answer and continue with the WebRTC setup process.\n peerConnection\n .createAnswer()\n .then((desc) => {\n streamLoadTimesObject?.addTiming(AdcWebrtcEndToEndStreamLoadTimeStates.CreatedAnswerSdp);\n this.upstreamLogger?.('Setting local description: ' + JSON.stringify(desc));\n return peerConnection.setLocalDescription(desc);\n })\n .then(() => {\n streamLoadTimesObject?.addTiming(AdcWebrtcEndToEndStreamLoadTimeStates.SetAnswerSdp);\n const responseSdp = { to: remoteEndToEndPeerId, sdp: peerConnection.localDescription };\n\n this.sendWebSocketMessage(JSON.stringify(responseSdp));\n\n streamLoadTimesObject?.addTiming(AdcWebrtcEndToEndStreamLoadTimeStates.SentAnswerSdp);\n\n this.iceStartTime = Date.now();\n if (this.shouldDelayTurnProcessing) {\n this.delayProcessingRelayCandidates.perform();\n this.logWithMac(\n `Delaying TURN processing for ${this.turnDelayTimeMs / 1000} seconds.`,\n null,\n ConsoleDebug\n );\n }\n this.updateLoadingPercentage(SeventyPercent);\n });\n });\n })\n .catch((e) => {\n player.disconnectWithError(`Error exchanging SDPs: ${this.getErrorMessage(e)}`, e);\n });\n}\n\n/**\n * Send an ICE candidate to the remote peer.\n */\nfunction sendIceCandidateToRemotePeer(this: EndToEndRtcPlayer, candidate: RTCIceCandidate): void {\n this.sendWebSocketMessage(JSON.stringify({ to: this.remoteEndToEndPeerId, ice: candidate }));\n}\n\n/**\n * Receive an ICE message from the end-to-end signalling server connection, and process it through the peer connection.\n */\nfunction onIncomingICE(this: EndToEndRtcPlayer, ice: RTCIceCandidateInit): void {\n // We sometimes hit this call when the stream has already started tearing down. Ignore messages if no peerConnection.\n if (!this.peerConnection) {\n return;\n }\n\n const candidate = new RTCIceCandidate(ice);\n if (this.onlyReceiveRelayCandidates && candidate.type !== IceCandidateTypeRelay) {\n // Skip processing non-relay candidates if the forceTurn query param dictates we should do so.\n this.logWithMac('Skipping receiving non-relay candidate due to forceTurn', candidate, ConsoleDebug);\n return;\n } else if (this.ignoreRelayCandidates && candidate.type === IceCandidateTypeRelay) {\n // Skip receiving relay candidates if the forceTurn query param dictates we should do so.\n this.logWithMac('Skipping receiving relay candidate to force a STUN connection', candidate, ConsoleDebug);\n return;\n }\n\n // We will hold onto relay candidates for the initial 5s of ICE negotiation to increase the likelihood of establishing a STUN connection.\n if (\n this.shouldDelayTurnProcessing &&\n candidate.type === IceCandidateTypeRelay &&\n !this.onlyReceiveRelayCandidates\n ) {\n this.remoteCandidateQueue.push(candidate);\n this.logWithMac(\n 'Added relay candidate to remoteCandidateQueue due to TURN processing delay',\n this.remoteCandidateQueue,\n ConsoleDebug\n );\n return;\n }\n\n createIpSwappedIceCandidateForNetworkedConnections.call(this, candidate);\n\n this.peerConnection.addIceCandidate(candidate).catch((e) => window.console.warn('Ice candidate error', e));\n}\n\n/**\n * Handler when receiving a warning message from the websocket.\n *\n * @param warning The warning we received from the signaling server.\n */\nfunction onIncomingWarning(this: EndToEndRtcPlayer, warning: string): void {\n if (warning === WebsocketWarningAudioNotAvailable) {\n this.updateState(CameraSpeakerAlreadyInUse);\n return;\n }\n\n this.logWithMac(`End-to-end warning received: ${warning}.`);\n}\n\n/**\n * For cases where this device is behind a second networked device (for example, a camera plugged in via ethernet to a CSVR),\n * and when we receive a host or srflx candidate with the camera's private IP, let's try creating a second remote candidate with\n * the networked device's private IP.\n * This may help with some connection problems by providing another connection method.\n */\nfunction createIpSwappedIceCandidateForNetworkedConnections(this: EndToEndRtcPlayer, candidate: RTCIceCandidate): void {\n const { networkedDevicePrivateIp } = this.endToEndWebrtcConnectionInfo,\n originalCandidateString = candidate.candidate;\n\n if (!this.peerConnection) {\n return;\n }\n\n // We create a copied host candidate, unless we have a query param saying not to.\n const isHostCandidateToCopy =\n candidate.type === IceCandidateTypeHost && !this.queryParams.get('skipFakeCandidateHost'),\n // We create a copied srflx candidate, unless we have a query param saying not to.\n isSrflxCandidateToCopy =\n candidate.type === IceCandidateTypeSrflx && !this.queryParams.get('skipFakeCandidateSrflx');\n\n if (\n // If this is a UDP candidate to copy and we have an IP to swap in (+ extra guards), do the swap.\n (isHostCandidateToCopy || isSrflxCandidateToCopy) &&\n !!networkedDevicePrivateIp &&\n !!candidate.address &&\n candidate.protocol === IceCandidateTypeUdp\n ) {\n const newCandidateString = originalCandidateString.replace(candidate.address, networkedDevicePrivateIp);\n\n const ipSwappedCandidate = new RTCIceCandidate({\n candidate: newCandidateString,\n sdpMid: candidate.sdpMid,\n sdpMLineIndex: candidate.sdpMLineIndex,\n usernameFragment: candidate.usernameFragment\n });\n\n this.peerConnection.addIceCandidate(ipSwappedCandidate);\n }\n}\n\n/**\n * Process an ICE candidate that we generate from our peer connection object.\n *\n * @param event The object generated which contains an ICE candidate to send.\n */\nfunction processIceCandidate(this: EndToEndRtcPlayer, event: RTCPeerConnectionIceEvent): void {\n const { webSocket } = this;\n\n if (!this.webSocketIsOpen(webSocket)) {\n this.logWithMac('Returning from icecandidate event function because websocket was closed.', null, ConsoleDebug);\n return;\n }\n\n // Don't send a null ending ICE candidate because the end-to-end module does not expect this message.\n if (!event.candidate) {\n return;\n }\n\n if (this.onlySendRelayCandidates && event.candidate.type !== IceCandidateTypeRelay) {\n // Skip sending non-relay candidates if the forceTurn query param dictates we should do so.\n this.logWithMac('Skipping sending non-relay candidate due to forceTurn', event.candidate, ConsoleDebug);\n return;\n } else if (this.ignoreRelayCandidates && event.candidate.type === IceCandidateTypeRelay) {\n // Skip sending relay candidates if the forceTurn query param dictates we should do so.\n this.logWithMac('Skipping sending relay candidate to force a STUN connection', event.candidate, ConsoleDebug);\n return;\n }\n\n // We will hold onto relay candidates for the initial 5s of ICE negotiation to increase the likelihood of establishing a STUN connection.\n if (\n this.shouldDelayTurnProcessing &&\n event.candidate.type === IceCandidateTypeRelay &&\n !this.onlySendRelayCandidates\n ) {\n this.localCandidateQueue.push(event.candidate);\n this.logWithMac(\n 'Added relay candidate to localCandidateQueue due to TURN processing delay',\n this.localCandidateQueue,\n ConsoleDebug\n );\n return;\n }\n\n sendIceCandidateToRemotePeer.call(this, event.candidate);\n}\n\n/**\n * Process relay candidates after the 5 second delay.\n */\nfunction processRelayCandidateQueues(this: EndToEndRtcPlayer): void {\n const { peerConnection, localCandidateQueue, remoteCandidateQueue } = this;\n\n if (!peerConnection || !localCandidateQueue || !remoteCandidateQueue) {\n return;\n }\n\n if (localCandidateQueue?.length > 0) {\n this.logWithMac('Processing localCandidateQueue', this.localCandidateQueue, ConsoleDebug);\n localCandidateQueue.forEach((candidate) => {\n sendIceCandidateToRemotePeer.call(this, candidate);\n });\n }\n\n if (remoteCandidateQueue?.length > 0) {\n this.logWithMac('Processing remoteCandidateQueue', this.remoteCandidateQueue, ConsoleDebug);\n remoteCandidateQueue.forEach((candidate) => {\n peerConnection.addIceCandidate(candidate).catch((e) => window.console.warn('Ice candidate error', e));\n });\n }\n}\n\n/**\n * Process the current ICE state.\n */\nfunction processIceState(this: EndToEndRtcPlayer): void {\n const { peerConnection, streamLoadTimesObject } = this;\n\n if (!peerConnection) {\n return;\n }\n\n this.logWithMac(\n `New ice state: Ice State = ${peerConnection.iceConnectionState} and Connection State = ${peerConnection.connectionState}`,\n undefined,\n ConsoleDebug\n );\n\n const peerStateNewOrConnecting =\n peerConnection.connectionState === PeerStateNew || peerConnection.connectionState === PeerStateConnecting;\n\n if (peerConnection.iceConnectionState === IceStateConnected) {\n // sets the ice completion time when the ice connected state is connected\n if (!this.iceCompletionTime) {\n this.iceCompletionTime = Date.now();\n }\n // If ICE succeeded and the peer connection state is new or connecting (so we only enter the first time we load the stream), update loading percentage and ICE completion time.\n // This is different from how proxy does it, which listens for a specific webrtcup message instead of listening for ICE state.\n if (peerStateNewOrConnecting) {\n this.delayProcessingRelayCandidates.cancelAll();\n streamLoadTimesObject?.addTiming(AdcWebrtcEndToEndStreamLoadTimeStates.IceCompleted);\n this.updateLoadingPercentage(EightyPercent);\n return;\n }\n }\n\n // If ICE negotiation failed before we processed relay candidates, initiate a stream restart and include relay candidates in the ICE negotiation process.\n if (\n this.shouldDelayTurnProcessing &&\n peerConnection.iceConnectionState === IceStateFailed &&\n peerStateNewOrConnecting\n ) {\n this.delayProcessingRelayCandidates.cancelAll();\n this.disconnectStream('', true);\n this.shouldDelayTurnProcessing = false;\n this.isStreamRestart = true;\n this.startStream();\n this.logWithMac(\n 'Restarting stream due to ICE negotiation failure before processing relay candidates',\n null,\n ConsoleDebug\n );\n return;\n }\n\n // Otherwise, check for failed state in base RTC player class.\n this.disconnectIfIceFailed();\n}\n\n/**\n * Creates a message for changing stream quality.\n *\n * @param body The contents of the body/object of this message\n * @param messageType The type of message we are sending up. For example, a CHANGE_STREAM message\n * @returns A completed, stringified message to send through the websocket.\n */\nfunction createStreamMessageWithObject(body: object, messageType: WebsocketCommandString): string {\n return `${messageType ? messageType + ' ' : ''}${JSON.stringify(body)}`;\n}\n\n/**\n * Helper function to add the onselectedcandidatepairchange event listener.\n * Sometimes the selected ICE candidate pair might change midstream - log updated candidate pair to console when that happens.\n */\nfunction addOnSelectedCandidatePairChangeEventListener(this: EndToEndRtcPlayer): void {\n const iceTransport = this.peerConnection?.getSenders()[0].transport?.iceTransport;\n if (iceTransport) {\n iceTransport.onselectedcandidatepairchange = () => {\n const updatedSelectedCandidatePair = iceTransport.getSelectedCandidatePair(),\n updatedLocalCandidate = updatedSelectedCandidatePair?.local,\n updatedRemoteCandidate = updatedSelectedCandidatePair?.remote;\n this.logWithMac(\n `The selected candidate pair changed. Updated selected candidate pair types (local-remote): ${updatedLocalCandidate}-${updatedRemoteCandidate}`,\n updatedSelectedCandidatePair,\n ConsoleDebug\n );\n };\n }\n}\n\n/**\n * A base object for creating and handling End-to-End WebRTC streaming connections.\n */\nexport default class EndToEndRtcPlayer extends BaseRtcPlayer {\n // #region Required Values\n\n /**\n * Object containing WebRTC streaming info needed to establish an end-to-end connection.\n */\n endToEndWebrtcConnectionInfo: EndToEndWebrtcConnectionInfo;\n\n /**\n * Properties used in the video preloader provided by the rtc player.\n */\n videoPreloaderRtcProps?: VideoPreloaderRtcProps;\n\n /** @override */\n isEndToEnd = true;\n\n // #endregion\n\n // #region End-to-End Properties\n\n /**\n * The remote publisher peer id sent through the websocket, first sent with the SESSION_STARTED message.\n */\n remoteEndToEndPeerId?: string;\n\n /**\n * The local peer id sent through the websocket, first sent with the camera's offer.\n */\n localEndToEndPeerId?: string;\n\n // #endregion\n\n // #region Keepalive\n\n /**\n * A timeout for sending a keepalive message through the websocket connection.\n * This is reset after every websocket message is sent.\n */\n keepaliveTimeout?: number;\n\n /**\n * A timeout for waiting to receive a keepalive response.\n * This timer is reset whenever we receive a 'keepalive-ok' response after sending a keepalive.\n * If we receive no response, the timer will complete and disconnect the stream.\n */\n keepaliveResponseTimeout?: number;\n\n // #endregion\n\n // #region Delayed TURN Processing\n\n /**\n * The queue of candidates we are holding onto from the local peer to send to the remote peer over the websocket.\n */\n declare localCandidateQueue: RTCIceCandidate[];\n\n /**\n * The queue of candidates we are holding onto from the remote peer to add to the local peer.\n */\n declare remoteCandidateQueue: RTCIceCandidate[];\n\n /**\n * Should we delay processing relay candidates? Will be set to false:\n * - After the 5 second delay\n * - When the user sets the turnDelay query param to 0\n * - When we restart the stream if ICE negotiation fails before processing relay candidates\n */\n shouldDelayTurnProcessing = true;\n\n /**\n * The time we wait to process relay candidates.\n */\n turnDelayTimeMs: number = DefaultTurnDelayMs;\n\n // #endregion\n\n // #region Audio\n\n /** @override */\n microphoneRequestConstraints = { audio: true, video: false };\n\n // #endregion Audio\n\n // #region Ember Object Hooks\n\n /** @override */\n constructor(host: object, props: EndToEndRtcPlayerProps) {\n super(host, props);\n\n Object.assign(this, props);\n\n // Verify we have all of the required string properties we need for WebRTC streaming.\n const requiredValues = ['playerId', 'endToEndWebrtcConnectionInfo'];\n\n requiredValues.forEach((name: keyof EndToEndRtcPlayer) => {\n assert(`The ${name} property must be passed to the EndToEndRtcPlayer object.`, !!this[name]);\n });\n\n this.endToEndWebrtcConnectionInfo = props.endToEndWebrtcConnectionInfo;\n this.videoPreloaderRtcProps = props.videoPreloaderRtcProps;\n\n if (this.endToEndWebrtcConnectionInfo?.shouldForceEndToEndWithExtendedTimeouts) {\n // If we're forcing a STUN stream, extend the timeout time to 60s.\n this.timeoutTimeIfStuckMs = ExtendedConnectionTimeout;\n this.ignoreRelayCandidates = true;\n this.shouldDelayTurnProcessing = false;\n } else {\n this.setTurnDelayProperties();\n }\n }\n\n get isWebRtcConnected(): boolean {\n return this.peerConnection?.iceConnectionState === IceStateConnected;\n }\n\n /**\n * Sets the various turn delay properties (the candidate queues, the turn delay time, and shouldDelayTurnProcessing).\n */\n setTurnDelayProperties(): void {\n this.localCandidateQueue = [];\n this.remoteCandidateQueue = [];\n\n const userAgent = navigator.userAgent,\n isUsingFirefox = userAgent.match(/firefox|fxios/i);\n\n // Temporary for VID-53746: Disable TURN delay in Firefox.\n if (isUsingFirefox) {\n this.turnDelayTimeMs = 0;\n }\n\n const turnDelayQueryParameter = this.queryParams.get('turnDelay') as string;\n if (turnDelayQueryParameter) {\n this.turnDelayTimeMs = Number.parseInt(turnDelayQueryParameter) * 1000;\n }\n\n this.shouldDelayTurnProcessing =\n !this.endToEndWebrtcConnectionInfo.hasStreamLoadTimeFeatureToggle && this.turnDelayTimeMs > 0;\n }\n\n // #endregion\n\n // #region WebRTC Connection Functions\n\n /** @override */\n startStream(): void {\n const { endToEndWebrtcConnectionInfo, streamLoadTimesObject } = this,\n { signallingServerUrl, signallingServerToken, urlForRecordingStream } = endToEndWebrtcConnectionInfo;\n\n streamLoadTimesObject?.addTiming(AdcWebrtcEndToEndStreamLoadTimeStates.CreatedRtcClass);\n\n this.updateLoadingPercentage(TenPercent);\n\n this.logWithMac('Starting end-to-end stream.');\n\n // We are recording this stream through the frontend if we have a url to send our recording pieces.\n if (urlForRecordingStream) {\n this.recorder = new WebrtcStreamRecorder(this, urlForRecordingStream);\n }\n\n const portMatches = signallingServerUrl.match(/:(?:[0-9]+)$/);\n let portWithColon, portWithoutColon, signallingServer;\n\n if (portMatches) {\n portWithColon = portMatches[0];\n portWithoutColon = portWithColon.substring(1);\n this.signallingServerPort = portWithoutColon;\n }\n\n if (this.isFallbackToPort443 && portWithColon) {\n const signallingServerUrlWithoutPort = signallingServerUrl.replace(portWithColon, '');\n signallingServer = `${signallingServerUrlWithoutPort}\\\\${signallingServerToken}?relayPort=${this.signallingServerPort}`;\n } else {\n signallingServer = `${signallingServerUrl}\\\\${signallingServerToken}`;\n }\n\n // Create WebRTC connection objects.\n const webSocket = new WebSocket(signallingServer);\n streamLoadTimesObject?.addTiming(AdcWebrtcEndToEndStreamLoadTimeStates.RequestOpenWebsocket);\n\n this.webSocket = webSocket;\n\n // Set up WebSocket event listeners:\n\n // Begin the webrtc stream connection process when the web socket opens.\n webSocket.addEventListener('open', () => {\n streamLoadTimesObject?.addTiming(AdcWebrtcEndToEndStreamLoadTimeStates.WebsocketOpened);\n this.sendWebSocketMessage(`${WebsocketMessageHello} 2.0.1`);\n\n streamLoadTimesObject?.addTiming(AdcWebrtcEndToEndStreamLoadTimeStates.SendHello);\n this.logWithMac('Started end-to-end connection with the signalling server.', null, ConsoleDebug);\n });\n\n // Add event to parse any messages we get from the web socket.\n webSocket.addEventListener('message', (event) => {\n processWebsocketMessage.call(this, event);\n });\n\n webSocket.addEventListener('close', () => {\n // Don't process close websocket event if we already know the stream has disconnected.\n if (this.streamDisconnected) {\n return;\n }\n\n this.updateState(Disconnected);\n this.disconnectStream(WebsocketClosed);\n });\n\n webSocket.addEventListener('error', (e: Event) => {\n // TODO figure out a better type for this in a follow-up VID-65385\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.disconnectWithError(`WebRTC end-to-end websocket connection error: ${this.getErrorMessage(e)}`, e);\n\n // If we get a websocket error at 10%, that means we were unable to establish a connection with the signaling server.\n // Fall back to port 443 if we were on a custom port.\n if (this.currentStreamPercentage === TenPercent) {\n restartStreamIfNotUsingPort443.call(this);\n }\n });\n }\n\n /** @override */\n attachMicrophoneStreamToPlayer(usersAudioStream: MediaStream): void {\n // End-to-end streams connect this audio track to the peerConnection. Proxy does not as it uses a data channel.\n usersAudioStream.getTracks().forEach((track) => this.peerConnection?.addTrack(track, usersAudioStream));\n }\n\n /** @override */\n onPlayStarted(): void {\n super.onPlayStarted();\n\n const audioStatus = this.endToEndWebrtcConnectionInfo.supportsAudio\n ? this.endToEndWebrtcConnectionInfo.isMicrophoneConnected\n ? WebrtcAudioStatus.SentAndReceivedAudio\n : WebrtcAudioStatus.OnlyReceivedAudio\n : WebrtcAudioStatus.Unknown;\n\n this.sendLog(true, false, undefined, audioStatus);\n\n this.delayProcessingRelayCandidates.cancelAll();\n\n addOnSelectedCandidatePairChangeEventListener.call(this);\n }\n\n /**\n * Sends a message through the websocket, and resets the keepalive timeout.\n *\n * @param message The message to send through the websocket.\n */\n sendWebSocketMessage(message: string): void {\n const { webSocket } = this;\n\n if (!webSocket || !this.webSocketIsOpen(webSocket)) {\n this.updateState(Disconnected);\n this.disconnectStream(WebsocketClosed);\n return;\n }\n\n webSocket.send(message);\n this.setKeepalive();\n }\n\n /**\n * Sets the timeout for sending a keepalive message through the websocket.\n */\n setKeepalive(): void {\n let { keepaliveTimeout } = this;\n\n if (keepaliveTimeout) {\n clearTimeout(keepaliveTimeout);\n }\n\n keepaliveTimeout = setTimeout(() => {\n this.sendWebSocketMessage(WebsocketMessageKeepalive);\n\n // Wait for a response from the keepalive.\n // If we didn't get a response (so this timeout completes), disconnect the stream.\n const keepaliveResponseTimeout = setTimeout(() => {\n clearTimeout(this.keepaliveTimeout);\n this.updateState(Disconnected);\n this.disconnectStream(KeepaliveFailed);\n }, KeepaliveResponseMs);\n\n this.keepaliveResponseTimeout = keepaliveResponseTimeout;\n }, KeepaliveMs);\n\n this.keepaliveTimeout = keepaliveTimeout;\n }\n\n /**\n * Task to delay processing relay candidates by 5 seconds (or by the value specified in the query param).\n */\n delayProcessingRelayCandidates: Task<void, []> = task(async () => {\n await timeout(this.turnDelayTimeMs);\n this.shouldDelayTurnProcessing = false;\n processRelayCandidateQueues.call(this);\n });\n\n /**\n * @override\n */\n disconnectOrSendLogIfStreamGetsStuckHelper(\n streamStuckDisconnectionMessage: string,\n currentStreamPercentage?: number\n ): void {\n // If we aren't able to establish a connection with the signalling server, fall back to port 443.\n if (currentStreamPercentage === TenPercent) {\n this.disconnectStream(streamStuckDisconnectionMessage);\n restartStreamIfNotUsingPort443.call(this as BaseRtcPlayer);\n return;\n }\n\n // If this device does not support a fallback method, don't end the stream as this is the only streaming option.\n if (this.endToEndWebrtcConnectionInfo.cameraDoesntSupportProxyFallback) {\n return;\n }\n\n this.updateState(FailedToConnect);\n this.disconnectStream(streamStuckDisconnectionMessage);\n }\n\n // #endregion\n\n // #region Player Command Functions\n\n /** @override */\n sendPlayerCommand(\n this: EndToEndRtcPlayer,\n command: PlayerCommandCommands<SendPlayerCommandEndToEndCommands>,\n requestParams: PlayerCommandRequestParams<EndToEndPlayerCommandRequestParams>,\n { alsoCallInternalFunction = false }\n ): void {\n const { webSocket, remoteEndToEndPeerId, localEndToEndPeerId, endToEndWebrtcConnectionInfo } = this;\n\n if (!this.webSocketIsOpen(webSocket)) {\n return;\n }\n\n // Some player commands require calling an internal method along with sending a websocket message. Process if needed.\n if (alsoCallInternalFunction && command in this) {\n this[command as keyof EndToEndRtcPlayer & SendPlayerCommandEndToEndCommands](requestParams as any);\n }\n\n const body: EndToEndWebsocketCommandBody = {\n to: remoteEndToEndPeerId,\n from: localEndToEndPeerId\n };\n let messageType: WebsocketCommandString;\n\n // Check the message type to determine if we need to send a websocket message for this action.\n if (command === END_TO_END_COMMAND_STREAM_QUALITY) {\n messageType = WebsocketMessageChangeStream;\n body.stream = requestParams.useHdStream\n ? endToEndWebrtcConnectionInfo.hdStreamQualityMessage\n : endToEndWebrtcConnectionInfo.sdStreamQualityMessage;\n } else if (command === TOGGLE_MICROPHONE_AUDIO) {\n messageType = WebsocketMessageAdcCommand;\n body.adc_cmd = requestParams.mute ? 'mute_audio' : 'unmute_audio';\n } else if (command === END_TO_END_COMMAND_LOAD_MEDIA) {\n messageType = WebsocketMessageAdcCommand;\n body.adc_cmd = WebsocketMessageLoadMedia;\n\n // Reset the timeout timer when continuing with preloading to prevent cases where\n // most of our time on a certain percentage was off of live view, and the player doesn't have enough time to load the next step.\n this.disconnectOrSendLogIfStreamGetsStuck.perform();\n } else {\n // If message is not one of the above types, return and don't send a websocket message.\n return;\n }\n\n this.sendWebSocketMessage(createStreamMessageWithObject(body, messageType));\n }\n\n // #endregion\n\n // #region General Helper Methods\n\n /** @override */\n clearKeepalive(): void {\n const { keepaliveTimeout, keepaliveResponseTimeout } = this;\n\n if (keepaliveTimeout) {\n clearTimeout(keepaliveTimeout);\n }\n\n if (keepaliveResponseTimeout) {\n clearTimeout(keepaliveResponseTimeout);\n }\n }\n\n /** @override */\n cancelTasksAndRecorders(): void {\n super.cancelTasksAndRecorders();\n\n // If we've been recording this stream, stop the recording.\n this.recorder && this.recorder.stopRecording();\n\n // Cancel any tasks.\n this.disconnectStreamAtStreamCap.cancelAll();\n this.delayProcessingRelayCandidates.cancelAll();\n }\n\n // #endregion\n\n // #region Typedefs\n\n /**\n * @typedef {{\n * signallingServerUrl: string,\n * signallingServerToken: string,\n * cameraAuthToken: string,\n * hdStreamQualityMessage: string,\n * sdStreamQualityMessage: string,\n * supportsAudio: boolean,\n * supportsFullDuplex: boolean,\n * isMicrophoneConnected: boolean\n * urlForRecordingStream: string\n * }} EndToEndWebrtcConnectionInfo\n *\n * @property {string} signallingServerUrl - Base IP and PORT of the signalling server.\n * @property {string} signallingServerToken - Token we must use with the signalling server.\n * @property {string} cameraAuthToken - Authentication token for connecting to the camera.\n * @property {string} hdStreamQualityMessage - The websocket message for setting the end-to-end stream to high definition.\n * @property {string} sdStreamQualityMessage - The websocket message for setting the end-to-end stream to standard definition.\n * @property {boolean} supportsAudio - Does this camera support audio (and have permission for it)?\n * @property {boolean} supportsFullDuplex - Does this camera support full duplex?\n * @property {boolean} isMicrophoneConnected - Has the user connected their audio for this two-way audio stream?\n * @property {string} urlForRecordingStream - The url we're using to send recording stream pieces, if we are recording this stream.\n */\n\n // #endregion\n}\n","import { getOwner, setOwner } from '@ember/owner';\nimport { inject as service } from '@ember/service';\nimport { task, timeout } from 'ember-concurrency';\nimport { Audio, Video } from '../../constants/generic.ts';\nimport { reportClippyMessageToWavefront, WaveFrontClippyMessage } from '../../utils/wavefront.ts';\n\nimport type AjaxService from '@adc/ajax/services/adc-ajax';\nimport type Owner from '@ember/owner';\n\nconst UpdateFrequencyDefaultMs = 5000;\n\n/**\n * Gets the current url to use for sending the stream recording piece.\n * This either adds a 0-based index, or it adds an END message for a final message.\n *\n * @param urlForRecordingStream The base url we use for uploading clip fragments.\n * @param urlSuffix The suffix (number or 'END') to inject into the url to make it unique.\n */\nfunction getCurrentUrlForRecordingStream(urlForRecordingStream: string, urlSuffix: number | 'END'): string {\n return urlForRecordingStream.replace('.mp4', `_${urlSuffix}.mp4`);\n}\n\n/**\n * @classdesc\n *\n * An object for controlling stream recording of a WebRTC stream.\n * Records video and audio and sends this data to a server for recording.\n *\n * @class classes.webrtc.WebrtcStreamRecorder\n */\nexport default class WebrtcStreamRecorder {\n @service declare ajax: AjaxService;\n\n /**\n * @param host The object that is creating this object.\n * @param urlForRecordingStream The url we are using for recording the recorded stream.\n */\n constructor(host: object, urlForRecordingStream: string) {\n // Set owner so we can inject services.\n setOwner(this, getOwner(host) as Owner);\n\n this.urlForRecordingStream = urlForRecordingStream;\n\n // Gets the value of \"updateFrequency\" in the url\n const params = new URLSearchParams(window.location.search),\n updateFrequency = params.get('updateFrequency');\n this.updateFrequency = updateFrequency != null ? Number.parseInt(updateFrequency) : UpdateFrequencyDefaultMs;\n }\n\n // region Properties\n\n /**\n * The GainNode connected to the camera audio node. Used to set the camera audio's gain.\n */\n cameraAudioGainNode?: GainNode;\n\n /**\n * The camera's stream, which includes video and optionally audio.\n */\n cameraStream?: MediaStream;\n\n /**\n * The user's audio stream object, if the WebRTC stream is sending user audio.\n */\n userStream?: MediaStream;\n\n /**\n * The MediaRecorder object for recording both the camera and user stream.\n */\n mediaRecorder?: MediaRecorder;\n\n /**\n * The url which will receive the recorded stream data.\n */\n urlForRecordingStream: string;\n\n /**\n * How often do we want to send recorded data to the servers?\n */\n updateFrequency = UpdateFrequencyDefaultMs;\n\n /**\n * How many clip fragments have we sent to the servers so far?\n */\n uploadCount = 0;\n\n /**\n * The number of clip fragments that have failed to upload due to api error.\n */\n uploadFailureCount = 0;\n\n // endregion\n\n // region Stream Methods\n\n /**\n * Adds a stream to be recorded by this object.\n * We are looking for a stream from a camera and optionally a stream from the user.\n *\n * @param stream The camera or user audio stream.\n * @param isFromCamera Is this stream a stream from the camera (as opposed to the user's audio-only stream)?\n */\n addStream(stream: MediaStream, isFromCamera: boolean): void {\n if (isFromCamera) {\n this.cameraStream = stream;\n } else {\n this.userStream = stream;\n }\n }\n\n /**\n * Toggles the camera audio's gain (volume). We need to mute it once the user starts speaking into the browser to prevent\n * audio coming from the speaker from being recorded.\n *\n * @param shouldMute Should we mute the camera audio gain (true if the microphone button is pressed).\n */\n toggleCameraAudioGain(shouldMute: boolean): void {\n if (!this.cameraAudioGainNode) {\n return;\n }\n\n this.cameraAudioGainNode.gain.value = shouldMute ? 0 : 1;\n }\n\n /**\n * Starts the recording with the streams that have been given to this stream recorder object.\n */\n startRecording(): void {\n const { cameraStream, urlForRecordingStream, userStream } = this;\n if (!cameraStream || !urlForRecordingStream || this.mediaRecorder) {\n // Need a camera stream and url for sending recordings at minimum, plus we must not have started recording yet.\n return;\n }\n\n let finalStream: MediaStream;\n if (userStream) {\n // We'll need to mix all of our streams together.\n const mixedStream = this.mixCameraAndUserStreamsIntoSingleStream(cameraStream, userStream);\n if (!mixedStream) {\n return;\n }\n\n finalStream = mixedStream;\n } else {\n // If we just have a camera stream (no user audio), this is simpler.\n finalStream = cameraStream;\n }\n\n this.createMediaRecorder(finalStream);\n\n this.recordMediaThenCreateNewMediaRecorderTask.perform(finalStream);\n }\n\n /**\n * Stops and completes the recording of the stream.\n */\n stopRecording(): void {\n const { mediaRecorder, recordMediaThenCreateNewMediaRecorderTask } = this;\n\n recordMediaThenCreateNewMediaRecorderTask.cancelAll();\n\n if (!mediaRecorder) {\n return;\n }\n\n mediaRecorder.onstop = () => this.sendEndOfStreamMessage();\n\n mediaRecorder.stop();\n this.mediaRecorder = undefined;\n }\n\n // endregion\n\n // region Private Stream Methods\n\n /**\n * Takes in a camera stream and user (audio) stream, mixes them, and returns a MediaStream containing all content.\n *\n * @param cameraStream The MediaStream from the camera, which should contain video and audio.\n * @param userStream The MediaStream from the user, which should contain audio.\n */\n private mixCameraAndUserStreamsIntoSingleStream(\n cameraStream: MediaStream,\n userStream: MediaStream\n ): MediaStream | undefined {\n // Split up the camera stream into separate video and audio tracks.\n const tracks: MediaStreamTrack[] = cameraStream.getTracks(),\n cameraVideoTrack = tracks.find((track) => track.kind === Video),\n cameraAudioTrack = tracks.find((track) => track.kind === Audio);\n\n if (!cameraVideoTrack || !cameraAudioTrack) {\n console.warn(`Failed to get camera audio or video track during WebRTC stream recording.`, {\n videoExists: !!cameraVideoTrack,\n audioExists: !!cameraAudioTrack,\n cameraStream\n });\n return undefined;\n }\n\n // We need the camera's audio in a MediaStream format though, so convert it back.\n const cameraAudioTrackStream = new MediaStream([cameraAudioTrack]);\n\n // Mash audio together with two audio streams.\n const audioContext = new AudioContext(),\n audioDestination = audioContext.createMediaStreamDestination(),\n gainNode = audioContext.createGain(),\n audioSource1 = audioContext.createMediaStreamSource(userStream),\n audioSource2 = audioContext.createMediaStreamSource(cameraAudioTrackStream);\n audioSource1.connect(audioDestination);\n audioSource2.connect(gainNode);\n gainNode.connect(audioDestination);\n const mixedAudioTrack = audioDestination.stream.getTracks()[0];\n\n this.cameraAudioGainNode = gainNode;\n\n // Mash camera video and mixed audio together.\n return new MediaStream([cameraVideoTrack, mixedAudioTrack]);\n }\n\n /**\n * Creates a MediaRecorder object for recording the current WebRTC e2e stream.\n *\n * @param stream The stream object we want to record (with video and optionally audio).\n */\n private createMediaRecorder(stream: MediaStream): void {\n const mediaRecorder = new MediaRecorder(stream);\n\n mediaRecorder.ondataavailable = (event: BlobEvent) => this.sendRecordedStreamData(event.data);\n mediaRecorder.start();\n\n this.mediaRecorder = mediaRecorder;\n }\n\n /**\n * Task which lets an existing MediaRecorder stream for updateFrequency ms, then it stops it and swaps in a new recorder\n * so we can upload the clip that was just recorded.\n *\n * @param stream The stream object we want to record (with video and optionally audio).\n */\n private recordMediaThenCreateNewMediaRecorderTask = task(\n this,\n { restartable: true },\n async (stream: MediaStream) => {\n // Let the MediaRecorder record for the given ms.\n await timeout(this.updateFrequency);\n\n // Then stop the MediaRecorder, and create a new one.\n if (this.mediaRecorder) {\n this.mediaRecorder.stop();\n this.mediaRecorder = undefined;\n }\n\n this.createMediaRecorder(stream);\n\n this.recordMediaThenCreateNewMediaRecorderTask.perform(stream);\n }\n );\n\n /**\n * Sends recorded stream data to the server if this WebRTC stream is being recorded on the browser.\n *\n * @param blob The Blob containing recorded stream data.\n */\n private sendRecordedStreamData(blob: Blob): void {\n const headers = {\n headers: {\n 'content-type': blob.type,\n accept: 'application/json;charset=utf-8'\n }\n };\n\n // Code below is primarily copied from ajax.request.\n // We're doing this temporarily for now for testing until ajax can be updated to not encode Blob objects in WEB-13194.\n\n // We use a copy of the options passed in. Otherwise we would be mutating the original options, which could be one of our enums like JSON_REQUEST.\n const newOptions: Partial<RequestInit> = { ...headers },\n defaultHeaders = this.ajax.get('defaultHeaders');\n\n // Build the options. Note that user provided options take priority over others.\n newOptions.headers = { ...defaultHeaders, ...newOptions.headers };\n newOptions.method = 'PUT';\n newOptions.body = blob;\n\n // We need to manually inject the current upload count into the url.\n const currentUrlForRecordingStream = getCurrentUrlForRecordingStream(\n this.urlForRecordingStream,\n this.uploadCount\n );\n this.uploadCount++;\n\n fetch(currentUrlForRecordingStream, newOptions).catch((e) =>\n this.processUploadError(e, currentUrlForRecordingStream)\n );\n }\n\n /**\n * Sends a final END message to the server after we've sent all recorded data over to the recording server.\n */\n private sendEndOfStreamMessage(this: WebrtcStreamRecorder): void {\n const currentUrlForRecordingStream = getCurrentUrlForRecordingStream(this.urlForRecordingStream, 'END');\n this.ajax.request(currentUrlForRecordingStream, undefined, null, 'PUT');\n }\n\n /**\n * Process a failure to upload a clip fragment. For certain errors, we send a Sentry error.\n *\n * @param error The error received from the fetch request\n * @param currentUrlForRecordingStream The current stream we tried to use for uploading, so we can gather info about the failed upload stream.\n */\n private processUploadError(error: Error, currentUrlForRecordingStream: string): void {\n this.uploadFailureCount++;\n\n const additionalErrorInfo = {\n firstFailureIndex: this.uploadCount,\n uploadUrl: currentUrlForRecordingStream\n };\n\n if (this.uploadFailureCount === 1) {\n console.warn('WebRTC recording clip fragment failed to upload.', Object.assign(error, additionalErrorInfo));\n reportClippyMessageToWavefront(this.ajax, WaveFrontClippyMessage.failedToUploadFragment);\n } else if (this.uploadFailureCount === 5) {\n console.warn(\n 'WebRTC recording clip fragment failed to upload 5 or more times.',\n Object.assign(error, additionalErrorInfo)\n );\n }\n }\n\n // endregion\n}\n","import Component from '@glimmer/component';\nimport { computed } from '@ember/object';\n\nimport type {\n OeDirectFailureReasonEnum,\n OeRelayFailureReasonEnum\n} from '@adc/video-player/constants/disconnection-reasons';\nimport type { Instant } from '@oecommon/plasma-js';\nimport type { WebrtcAudioStatus } from '../enums/WebrtcAudioUsage.ts';\n\nexport interface StateInfo {\n disconnectionReason?: string;\n direct?: boolean;\n errorMessage?: string;\n failed?: boolean;\n isInitialLog?: boolean;\n isTimeout?: boolean;\n percentage?: number;\n shouldRestartPlayer?: boolean;\n streamStuckAtFrozen?: boolean;\n time?: Date;\n audioStatus?: WebrtcAudioStatus;\n isVirtualCamera?: boolean;\n iceStartTime?: number;\n iceCompletionTime?: number;\n usedTurn?: boolean;\n stats?: string;\n renderTime?: Instant;\n streamStats?: string;\n directFailureReason?: OeDirectFailureReasonEnum;\n relayFailureReason?: OeRelayFailureReasonEnum;\n selectedCandidatePairTypes?: string;\n}\n\n/**\n * Gets the player id for the selected video by concatenating the player type prefix with the device id.\n */\nexport function getPlayerId(playerPrefix: string, deviceId: string): string {\n return `${playerPrefix}_${deviceId}`;\n}\n\n/**\n * Gets the element selector for the selected video.\n */\nexport function getElementSelector(playerContainerId: string): string | null {\n return playerContainerId ? `#${playerContainerId}` : null;\n}\n\n/**\n * @classdesc\n * Base player class for shared properties\n */\nexport default class BasePlayer<T> extends Component<T> {\n /**\n * The player ID of each video player.\n */\n _playerId = '';\n\n get playerId(): string {\n return this._playerId;\n }\n\n set playerId(value) {\n this._playerId = value;\n }\n\n /**\n * The id of the container/parent of the video component. (The div we use to do zoom-pan transforms on)\n */\n @computed('playerId')\n get playerContainerId(): string {\n if (!this.playerId) {\n return '';\n }\n\n return `${this.playerId}-container`;\n }\n\n /**\n * The element selector for the video player element\n */\n @computed('playerContainerId')\n get elementSelector(): string | null {\n return getElementSelector(this.playerContainerId);\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div class=\\\"video-player mjpeg-player\\\" ...attributes>\\n <div\\n id={{this.playerContainerId}}\\n class=\\\"video-container\\\"\\n style={{@styleString}}\\n {{did-insert this.insertCachedMjpegProperties}}\\n {{did-update this.updateMjpegStreamingValues @url @deviceId}}\\n >\\n <img\\n id={{this.playerId}}\\n class=\\\"mjpeg-player-img\\\"\\n src={{@url}}\\n alt={{this.altText}}\\n {{did-insert this.insertImageTag}}\\n {{did-insert (fn (coalesce @setZoomPanOverlaySelector (noop)) this.elementSelector)}}\\n {{did-update (fn (coalesce @setZoomPanOverlaySelector (noop)) this.elementSelector) this.elementSelector}}\\n />\\n </div>\\n {{yield}}\\n</div>\")","import { isDestroyed } from '@adc/ember-utils/utils/ember-helpers';\nimport { action, computed, set, setProperties } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport { intlPath } from '@adc/i18n/path';\nimport { Initializing, Playing, FailedToConnect, TimedOut } from '../constants/player-messages.ts';\nimport BasePlayer, { getPlayerId } from './base-player.ts';\nimport { BaseImgIdPrefix } from './live-video-player.ts';\n\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type { SafeString } from 'handlebars';\nimport type { StateInfo } from './base-player.ts';\n\nexport interface MjpegPlayerSignature {\n Element: HTMLDivElement;\n Args: {\n /** The name of the device on the system. */\n cameraName?: string;\n /** The unique ID of the device. */\n deviceId: string;\n /** A forced streaming aspect ratio to use, if any. This value is the width divided by the height. */\n forcedAspectRatio?: number;\n /** Sets the zoom pan overlay selector. */\n setZoomPanOverlaySelector?: (elementSelector: string | null) => void;\n /** The style string for manipulating the video element. */\n styleString?: SafeString;\n /** Handles the event sent by the webrtc or oesp player. */\n updateState: (x: string, y: string, z?: StateInfo) => void;\n /** URL we should use right now to play the stream with. */\n url?: string;\n };\n Blocks: {\n default: [];\n };\n}\n\ninterface MjpegPlayerProperties {\n url?: string;\n deviceId: string;\n}\n\n/**\n * 3 minutes - the amount of time this feed will stream before disconnecting from the streaming server.\n */\nconst PlayerTimeoutMs = 1000 * 60 * 3;\n\n/**\n * Get the img element if it exists and we can grab it with an id.\n */\nfunction getImgElement(this: MjpegPlayer): HTMLElement | null {\n const { playerId } = this,\n { url } = this.args;\n\n if (!playerId || !url) {\n return null;\n }\n\n return document.getElementById(playerId);\n}\n\n/**\n * Attempt to start the live stream through the img tag.\n */\nfunction attemptToSetUpImgListeners(this: MjpegPlayer): void {\n const { playerId } = this,\n { updateState } = this.args,\n img = getImgElement.call(this);\n if (img) {\n updateState(Initializing, playerId);\n\n const imgErrorFunction = () => {\n // This would be called if a url is bad or a camera otherwise fails to connect (and the img tag can't render an image).\n updateState(FailedToConnect, playerId);\n },\n imgLoadFunction = () => {\n // This is called when we get the first streaming data from the server.\n img.removeEventListener('load', imgLoadFunction);\n\n // eslint-disable-next-line @adc/ember/no-is-destroyed\n if (isDestroyed(this)) {\n return;\n }\n\n updateState(Playing, playerId);\n\n // Disconnect the stream automatically after 3 minutes to match the proxy timeout.\n // We currently do it this way since the src in an img tag only tells us when we connect (this function), not when we disconnect.\n const disconnectedTimer = setTimeout(() => {\n img.removeEventListener('error', imgErrorFunction);\n\n // eslint-disable-next-line @adc/ember/no-is-destroyed\n if (isDestroyed(this)) {\n return;\n }\n\n updateState?.(TimedOut, playerId);\n setProperties(this, {\n disconnectedTimer: null,\n imgErrorFunction: null\n });\n }, PlayerTimeoutMs);\n\n setProperties(this, {\n disconnectedTimer,\n imgLoadFunction: null\n });\n };\n\n img.addEventListener('load', imgLoadFunction);\n img.addEventListener('error', imgErrorFunction);\n\n setProperties(this, {\n imgLoadFunction,\n imgErrorFunction\n });\n }\n}\n\n/**\n * Remove or clear any current event listeners and timers.\n */\nfunction removeListenersAndTimers(this: MjpegPlayer): void {\n const { imgLoadFunction, imgErrorFunction, disconnectedTimer } = this;\n const img = getImgElement.call(this);\n if (img) {\n imgLoadFunction && img.removeEventListener('load', imgLoadFunction);\n imgErrorFunction && img.removeEventListener('error', imgErrorFunction);\n disconnectedTimer && clearTimeout(disconnectedTimer);\n }\n}\n\n/**\n * @classdesc\n *\n * MJPEG player component for streaming live \"video\" through an img tag.\n */\n@intlPath({ module: '@adc/video-player', path: 'mjpeg-player' })\nexport default class MjpegPlayer extends BasePlayer<MjpegPlayerSignature> {\n @service declare intl: ADCIntlService;\n\n declare cachedMjpegProperties: MjpegPlayerProperties;\n\n // region Img Tag Player Properties\n\n /**\n * The id we will attach to the img tag, based on the deviceId.\n *\n * @type {string}\n */\n @computed('args.deviceId')\n get playerId(): string {\n return getPlayerId(BaseImgIdPrefix, this.args.deviceId);\n }\n\n /**\n * The alt text to use for the img tag.\n * Requires an intl service in the encompassing app in order to get translated text.\n *\n * @note adc/i18n (which contains intl) is currently listed as a dev dependency only so we can use intl within the dummy app.\n * @note The encompassing application MUST have adc/i18n imported or the MJPEG player will throw an error.\n * @note If needed in the future and the encompassing app cannot import adc/i18n, it will need to move to a regular dependency in this add-on.\n */\n get altText(): string {\n const { intl } = this,\n { cameraName } = this.args;\n\n return !cameraName\n ? intl.tc(this, 'snapshotStreamAltTextGeneric')\n : intl.tc(this, 'snapshotStreamAltText', { cameraName });\n }\n\n // endregion\n\n // region Event Listeners and Timers\n\n /**\n * Event listener for when the img tag finally loads.\n */\n imgLoadFunction: (() => void) | null = null;\n\n /**\n * Event listener for when the img tag has a loading error.\n */\n imgErrorFunction: (() => void) | null = null;\n\n /**\n * Timer for disconnecting this stream after 3 minutes of streaming.\n */\n disconnectedTimer: number | null = null;\n\n // endregion\n\n // region Component Hooks\n\n /** @override */\n willDestroy() {\n super.willDestroy();\n\n const { disconnectedTimer } = this;\n disconnectedTimer && clearTimeout(disconnectedTimer);\n }\n\n // endregion\n\n // region Actions\n\n /**\n * Fired when the img tag is added - sets up image event listeners.\n */\n @action\n insertImageTag(): void {\n attemptToSetUpImgListeners.call(this);\n }\n\n /**\n * Create a cached object containing current MJPEG streaming properties.\n * That way, when didReceiveAttrs is called, we can tell if a required MJPEG streaming value changed\n * or if something else (like enableOverlay) was changed.\n */\n @action\n insertCachedMjpegProperties(): void {\n const { url, deviceId } = this.args;\n\n set(this, 'cachedMjpegProperties', {\n url,\n deviceId\n });\n }\n\n /**\n * Check if any of the required MJPEG streaming values changed by comparing the current values\n * to our previously-cached MJPEG streaming values.\n * If a value changed, update the value cache and connect or disconnect the stream as needed.\n */\n @action\n updateMjpegStreamingValues(): void {\n const { cachedMjpegProperties } = this,\n { url, deviceId } = this.args,\n currentValues = {\n url,\n deviceId\n };\n\n if (\n Object.keys(currentValues).some(\n (key) =>\n cachedMjpegProperties[key as keyof MjpegPlayerProperties] !==\n currentValues[key as keyof MjpegPlayerProperties]\n )\n ) {\n set(this, 'cachedMjpegProperties', currentValues);\n removeListenersAndTimers.call(this);\n attemptToSetUpImgListeners.call(this);\n }\n }\n\n // endregion\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n MjpegPlayer: typeof MjpegPlayer;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{#if @isMjpeg}}\\n <MjpegPlayer\\n class=\\\"live-video-player\\\"\\n @cameraName={{@cameraName}}\\n @deviceId={{@deviceId}}\\n @forcedAspectRatio={{@forcedAspectRatio}}\\n @setZoomPanOverlaySelector={{@setZoomPanOverlaySelector}}\\n @styleString={{@styleString}}\\n @updateState={{@updateState}}\\n @url={{@url}}\\n >\\n {{yield}}\\n </MjpegPlayer>\\n{{else if @isOesp}}\\n <OpeneyePlayer\\n class=\\\"live-video-player\\\"\\n @apexId={{@apexId}}\\n @cameraId={{@cameraId}}\\n @deviceId={{@deviceId}}\\n @dewarpConfig={{@dewarpConfig}}\\n @onAttachToOespController={{@onAttachToOespController}}\\n @playbackStateController={{this.oespPlaybackStateController}}\\n @setZoomPanOverlaySelector={{@setZoomPanOverlaySelector}}\\n @styleString={{@styleString}}\\n @svrId={{@svrId}}\\n @updateCurrentStreamIsEndToEnd={{@updateCurrentStreamIsEndToEnd}}\\n @updateState={{@updateState}}\\n >\\n {{yield}}\\n </OpeneyePlayer>\\n{{else}}\\n <WebrtcPlayer\\n class=\\\"live-video-player {{@warningSoundClass}}\\\"\\n @cameraDataUsageMode={{@cameraDataUsageMode}}\\n @coturnAddressesTuplets={{@coturnAddressesTuplets}}\\n @deviceId={{@deviceId}}\\n @deviceModel={{@deviceModel}}\\n @endToEndWebrtcConnectionInfo={{@endToEndWebrtcConnectionInfo}}\\n @firmware={{@firmware}}\\n @forcedAspectRatio={{@forcedAspectRatio}}\\n @iceServers={{@iceServers}}\\n @isVirtualCamera={{@isVirtualCamera}}\\n @janusGatewayUrl={{@janusGatewayUrl}}\\n @mac={{@mac}}\\n @playbackStateController={{this.webrtcEndToEndStateController}}\\n @proxyWebrtcConnectionInfo={{@proxyWebrtcConnectionInfo}}\\n @setZoomPanOverlaySelector={{@setZoomPanOverlaySelector}}\\n @spsAndPpsRequired={{@spsAndPpsRequired}}\\n @streamingType={{@streamingType}}\\n @streamTimeoutSeconds={{@streamTimeoutSeconds}}\\n @styleString={{@styleString}}\\n @token={{@token}}\\n @updateState={{@updateState}}\\n @url={{@url}}\\n @audioUpStreamUrl={{@audioUpStreamUrl}}\\n @urlQueryParams={{@urlQueryParams}}\\n @videoPreloaderDetail={{@videoPreloaderDetail}}\\n @visualVerificationRecord={{@visualVerificationRecord}}\\n >\\n {{yield}}\\n </WebrtcPlayer>\\n{{/if}}\")","import { assert } from '@ember/debug';\nimport { computed } from '@ember/object';\nimport OespPlaybackStateController from '../classes/state-controllers/oesp-playback-state-controller.ts';\nimport WebrtcEndToEndStateController from '../classes/state-controllers/webrtc-end-to-end-state-controller.ts';\nimport WebrtcProxyPlaybackStateController from '../classes/state-controllers/webrtc-proxy-playback-state-controller.ts';\nimport BasePlayer, { getPlayerId } from './base-player.ts';\n\nimport type { SafeString } from '@ember/template';\nimport type BaseStateController from '../classes/state-controllers/base-state-controller.ts';\nimport type { StreamingTypeLive, StreamingTypePlayback } from '../constants/generic.ts';\nimport type { EndToEndWebrtcConnectionInfo, ProxyWebrtcConnectionInfo, VideoPreloaderDetail } from '../types.ts';\nimport type { DewarpConfigRecord } from '../utils/fisheye-utils.ts';\nimport type { StateInfo } from './base-player.ts';\n\n/**\n * The base MJPEG player id, without a unique id value (like device id) appended to the end.\n */\nexport const BaseImgIdPrefix = 'mjpeg-player';\n\n/**\n * The base openeye player id, without a unique id value (like device id) appended to the end.\n */\nexport const BaseOpeneyeIdPrefix = 'openeye-player';\n\n/**\n * The base WebRTC player id, without a unique id value (like device id) appended to the end.\n */\nexport const BaseVideoIdPrefix = 'webrtc-player';\n\ninterface LiveVideoPlayerSignature<T extends BaseStateController> {\n Args: {\n urlQueryParams?: string;\n /** The ID for the specific channel on the Apex device we're accessing. */\n apexId?: string;\n /** The camera data usage mode. */\n cameraDataUsageMode?: number;\n /** The name of the device on the system. */\n cameraName?: string;\n /** A unique ID to differentiate one Apex device from another. */\n cameraId?: string;\n /** Values needed to be able swap public ip for private ip when TURN is needed for the proxy. */\n coturnAddressesTuplets?: string;\n /** The unique ID of the device. */\n deviceId: string;\n /** The device model name. */\n deviceModel: string;\n /** The dewarp config housing the (fisheye) camera's dewarp parameters. */\n dewarpConfig?: DewarpConfigRecord | null;\n /** A model containing values needed to set up an End-to-End WebRTC connection with a streaming module in-camera. */\n endToEndWebrtcConnectionInfo: EndToEndWebrtcConnectionInfo;\n /** The camera firmware version. */\n firmware?: string;\n /** A forced streaming aspect ratio to use, if any. This value is the width divided by the height. */\n forcedAspectRatio?: number;\n /** A stringified JSON object containing all of the possible ICE servers for proxy WebRTC streaming. */\n iceServers?: string;\n /** Does this player usage have an mjpeg stream usage? */\n isMjpeg?: boolean;\n /** Does this player usage have an oesp stream usage? */\n isOesp?: boolean;\n /** Is this camera a virtual camera? */\n isVirtualCamera?: boolean;\n /** The Janus/signalling server url needed for WebRTC proxy streaming. */\n janusGatewayUrl?: string;\n /** The camera MAC address. */\n mac?: string;\n /** Callback to start live view relay once all openeye players on the controller are attached. */\n onAttachToOespController?: (controller: OespPlaybackStateController) => void;\n /** An object for controlling the current video playback state or sending other non-playback commands. */\n playbackStateController?: T;\n /** The ProxyWebrtcConnectionInfo model received with streaming properties needed for WebRTC proxy. */\n proxyWebrtcConnectionInfo?: ProxyWebrtcConnectionInfo;\n /** Sets the zoom pan overlay selector. */\n setZoomPanOverlaySelector?: (elementSelector: string | null) => void;\n /** Whether the camera's stream needs the SPS and PPS headers to stream over WebRTC. */\n spsAndPpsRequired?: boolean;\n /** Strings indicating the streaming type used in the WebRTC proxy player (either 'Live' or 'Playback'). */\n streamingType?: typeof StreamingTypeLive | typeof StreamingTypePlayback;\n /** How long (in seconds) can we allow this device to stream video through the proxy before timing out? */\n streamTimeoutSeconds?: number;\n /** The style string for manipulating the video element */\n styleString?: SafeString;\n /** The ID of the oesp playback state controller. */\n svrId?: string;\n /** The Janus streaming token required for WebRTC. */\n token?: string;\n /** Handles the event sent by the webrtc or oesp player. */\n updateState: (x: string, y: string, z?: StateInfo) => void;\n /** URL we should use right now to play the stream with. */\n url?: string;\n /** The camera API URL for sending audio (two-way audio to the camera). */\n audioUpStreamUrl?: string;\n /** WebRTC stream preloader details. */\n videoPreloaderDetail?: VideoPreloaderDetail;\n /** Visual Verification data needed with the WebRTC proxy when the streaming user is a rep or VV operator. */\n visualVerificationRecord?: string;\n /** Classnames for warning sounds. */\n warningSoundClass?: string;\n /** Function to set stream is e2e boolean */\n updateCurrentStreamIsEndToEnd?: (isEndToEnd: boolean) => void;\n };\n Blocks: {\n default: [];\n };\n}\n\n/**\n * @classdesc\n *\n * Player for streaming live video.\n * This is either using WebRTC for RTSP streams or refreshing img snapshots for MJPEG streams.\n */\nexport default class LiveVideoPlayer<T extends BaseStateController> extends BasePlayer<LiveVideoPlayerSignature<T>> {\n /**\n * The class name for the player type we are using.\n * We add this here so we can have a single div with the live video and MJPEG/WebRTC/OESP classes\n * that contains both the player and the overlay.\n */\n @computed('args.{isMjpeg,isOesp}')\n get playerClassName(): string {\n if (this.args.isMjpeg) {\n return BaseImgIdPrefix;\n }\n\n if (this.args.isOesp) {\n return BaseOpeneyeIdPrefix;\n }\n\n return BaseVideoIdPrefix;\n }\n\n /**\n * The OespPlaybackStateController.\n */\n get oespPlaybackStateController(): OespPlaybackStateController {\n const { playbackStateController } = this.args;\n\n assert(\n '[@adc/video-player] playbackStateController should be of type OespPlaybackStateController',\n playbackStateController instanceof OespPlaybackStateController ||\n playbackStateController === undefined ||\n playbackStateController === null\n );\n\n return playbackStateController as OespPlaybackStateController;\n }\n\n /**\n * The WebrtcEndToEndStateController.\n */\n get webrtcEndToEndStateController():\n | WebrtcEndToEndStateController\n | WebrtcProxyPlaybackStateController\n | undefined {\n const { playbackStateController } = this.args;\n\n if (playbackStateController instanceof WebrtcEndToEndStateController) {\n return playbackStateController as WebrtcEndToEndStateController;\n }\n\n if (playbackStateController instanceof WebrtcProxyPlaybackStateController) {\n return playbackStateController as WebrtcProxyPlaybackStateController;\n }\n\n return;\n }\n\n /**\n * The id we will attach to the img tag, based on the deviceId.\n */\n @computed('args.deviceId', 'playerClassName')\n get playerId(): string {\n return getPlayerId(`${this.playerClassName}`, this.args.deviceId);\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n LiveVideoPlayer: typeof LiveVideoPlayer;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div id={{@id}} class=\\\"video-player openeye-player\\\" ...attributes>\\n <div\\n id={{this.playerContainerId}}\\n class=\\\"video-container\\\"\\n style={{@styleString}}\\n {{did-insert this.checkPlaybackStateController}}\\n {{did-update this.updatePlaybackStateController @playbackStateController}}\\n >\\n <div\\n id={{this.playerId}}\\n class=\\\"oesp-video\\\"\\n preload=\\\"none\\\"\\n {{did-insert (fn (coalesce @setZoomPanOverlaySelector (noop)) this.elementSelector)}}\\n {{did-update (fn (coalesce @setZoomPanOverlaySelector (noop)) this.elementSelector) this.elementSelector}}\\n />\\n </div>\\n\\n {{yield}}\\n</div>\")","import { isDestroyed } from '@adc/ember-utils/utils/ember-helpers';\nimport { action, computed } from '@ember/object';\nimport { next } from '@ember/runloop';\nimport { task, timeout, type Task } from 'ember-concurrency';\nimport { FisheyeMode, OscarEvents, StreamQuality, type Pane } from '@oecommon/oscar-js';\nimport { BaseOpeneyeIdPrefix } from '../components/live-video-player.ts';\nimport { OeDirectFailureReasonEnum, OeRelayFailureReasonEnum } from '../constants/disconnection-reasons.ts';\nimport {\n Disconnected,\n Frozen,\n Initializing,\n Log,\n Playing,\n UpdateOsd,\n OeStreamTransportType,\n OeStateType,\n OeStreamTransportState\n} from '../constants/player-messages.ts';\nimport { generateFisheyeInfoFromDewarpConfig, type DewarpConfigRecord } from '../utils/fisheye-utils.ts';\nimport { convertInstantToSeconds } from '../utils/osd-utils.ts';\nimport { parseWebRTCStatsReport } from '../utils/webrtc-utils.ts';\nimport BasePlayer, { getPlayerId, type StateInfo } from './base-player.ts';\n\nimport type { SafeString } from '@ember/template/-private/handlebars';\nimport type { Instant } from '@oecommon/plasma-js';\nimport type { Player } from '../classes/state-controllers/base-state-controller.ts';\nimport type OespPlaybackStateController from '../classes/state-controllers/oesp-playback-state-controller.ts';\n\nexport interface OpeneyePlayerSignature {\n Element: HTMLDivElement;\n Args: {\n id?: string;\n /** The ID for the specific channel on the Apex device we're accessing. */\n apexId?: string;\n /** A unique ID to differentiate one Apex device from another. */\n cameraId?: string;\n /** The unique ID of the device. */\n deviceId: string;\n /** The dewarp config housing the (fisheye) camera's dewarp parameters. */\n dewarpConfig?: DewarpConfigRecord | null;\n /** Callback to start live view relay once all openeye players on the controller are attached. */\n onAttachToOespController?: (controller: OespPlaybackStateController) => void;\n /** An object for controlling the current video playback state or sending other non-playback commands. */\n playbackStateController: OespPlaybackStateController;\n /** Sets the zoom pan overlay selector. */\n setZoomPanOverlaySelector?: (elementSelector: string | null) => void;\n /** The style string for manipulating the video element. */\n styleString?: SafeString;\n /** The ID of the oesp playback state controller. */\n svrId?: string;\n /** Handles the event sent by the webrtc or oesp player. */\n updateState: (x: string, y: string, z?: StateInfo) => void;\n isTimeout?: boolean;\n /** Function to set stream is e2e boolean */\n updateCurrentStreamIsEndToEnd?: (isEndToEnd: boolean) => void;\n };\n Blocks: {\n default: [];\n };\n}\n\n/**\n * Timeout to disconnect a player.\n */\nconst DisconnectedPlayerTimeoutMS = 30000;\n\n/**\n * Timeout to determine if a stream is frozen.\n */\nconst FrozenPlayerTimeoutMS = 2000;\n\n/**\n * Timeout to fallback to relay after direct WebRTC fails.\n */\nexport const OeRelayFallbackTimeout = 10000;\n\n/**\n * A large timeout to essentially never fallback to relay for forcing a direct connection.\n */\nexport const ForceOeWebrtcTimeout = 60000;\n\n/**\n * Sets up the connection between this OpenEye player and a PlaybackStateController.\n */\nfunction connectToPlaybackStateController(this: OpeneyePlayer): void {\n // Send a message with the current context to the playback state controller to tell it this player is connected.\n this.args.playbackStateController.attachPlayer(this);\n this.playbackStateControllerInitCompleted = true;\n}\n\n/**\n * Callback used in OSD which grabs the stream's time and stats.\n */\nfunction getOsdProperties(this: OpeneyePlayer): Pick<Pane, 'renderTime' | 'streamStats'> {\n const displayManager = this.args.playbackStateController?.displayManager,\n pane = displayManager?.getPane(this.args.cameraId),\n { renderTime, streamStats } = pane ?? {};\n\n return { renderTime, streamStats };\n}\n\n/**\n * @classdesc\n *\n * OESP player component for playing back video.\n */\nexport default class OpeneyePlayer extends BasePlayer<OpeneyePlayerSignature> {\n /**\n * When navigate away from the page, ensure all OESP audio players are turned off.\n */\n willDestroy() {\n super.willDestroy();\n\n // Remove master pane to end any active audio connections.\n this.args.playbackStateController?.changeMasterPane(null);\n }\n\n /**\n * Whether or not stream has been connected for this player. This is used to determine the disconnection state.\n */\n hasStreamConnected = false;\n\n frozen?: boolean;\n\n playbackStateControllerInitCompleted?: boolean;\n\n declare animationRequest: number;\n\n lastInstant?: Instant | null;\n\n /**\n * Determines whether or not the first log has been sent or not.\n */\n isInitialLog = true;\n\n directFailureReason = OeDirectFailureReasonEnum.Unknown;\n\n relayFailureReason = OeRelayFailureReasonEnum.Unknown;\n\n private get pane(): Pane | undefined {\n const { playbackStateController, cameraId } = this.args,\n { displayManager } = playbackStateController;\n\n return displayManager?.getPane(cameraId);\n }\n\n /**\n * The id of this player object\n */\n @computed('args.deviceId')\n get playerId(): string {\n return getPlayerId(BaseOpeneyeIdPrefix, this.args.deviceId);\n }\n\n /**\n * Get the player connected to the cameraId\n */\n @computed('args.{cameraId,playbackStateController.players}')\n get player(): Player<OpeneyePlayer> | undefined {\n return this.args.playbackStateController.players.find(\n (player: Player<OpeneyePlayer>) => player.component.args.cameraId === this.args.cameraId\n );\n }\n\n /**\n * Get the playing state from the controller.\n */\n @computed('args.{playbackStateController.playing}')\n get playing(): boolean {\n return this.args.playbackStateController.playing;\n }\n\n /**\n * Is the OE stream using a direct WebRTC connection?\n */\n get isEndToEnd(): boolean {\n return this.pane?.transportType === OeStreamTransportType.WebRTC;\n }\n\n /**\n * Puts the player into an active state.\n */\n attachPlayer(): void {\n const { playbackStateController, cameraId, apexId } = this.args,\n { playerId } = this;\n\n const displayManager = playbackStateController.displayManager;\n\n displayManager.beginChange();\n\n try {\n const pane = displayManager.getPane(cameraId);\n pane.newCamera = { id: apexId, fisheyeInfo: null };\n\n if (this.args.dewarpConfig) {\n pane.newCamera = {\n ...pane.newCamera,\n fisheye: true,\n fisheyeInfo: generateFisheyeInfoFromDewarpConfig(this.args.dewarpConfig)\n };\n }\n\n pane.newQuality = playbackStateController.useHdStream ? StreamQuality.High : StreamQuality.Low;\n if (pane.addEventListener) {\n pane.addEventListener(OscarEvents.StateChange, this.onOscarStateChange.bind(this));\n pane.addEventListener(OscarEvents.TransportStateChange, this.onOscarTransportStateChange.bind(this));\n }\n } catch (e) {\n displayManager.cancelChange();\n throw e;\n }\n\n displayManager.commitChange();\n\n const videoWrapper = document.getElementById(playerId),\n pane = displayManager.getPane(cameraId);\n\n if (pane) {\n pane.parentElement = videoWrapper;\n }\n }\n\n /**\n * Event listener for oscar-js' state change.\n */\n onOscarStateChange(): void {\n const { apexId, cameraId, playbackStateController } = this.args,\n { hasStreamConnected, player } = this,\n pane = playbackStateController.displayManager.getPane(cameraId);\n\n if (pane.state === OeStateType.Idle) {\n this.hasStreamConnected = false;\n }\n\n const state = {\n [OeStateType.MediaPresent]: Playing,\n [OeStateType.Starting]: Initializing,\n [OeStateType.Error]: Disconnected\n }[pane.state as string];\n\n if (!player || !state) {\n return;\n }\n\n const args: StateInfo = {};\n\n switch (state) {\n case Playing:\n this.disconnectIfStreamGetsStuck.cancelAll();\n this.hasStreamConnected = true;\n this.sendLog.perform(false);\n this.startOsdTicker();\n\n // Restore/set fisheye settings. This runs when transitioning from paused to playing but not from paused to playing.\n if (apexId && this.args.dewarpConfig && !playbackStateController.fisheyeModes.has(apexId)) {\n const fisheyeMode = this.args.dewarpConfig.lastMode;\n playbackStateController.setFisheyeMode(apexId, fisheyeMode);\n\n // Restore last fisheye pan tilt zoom settings if provided.\n if (fisheyeMode === FisheyeMode.Ptz) {\n const { lastPan, lastTilt, lastFov } = this.args.dewarpConfig;\n if (lastPan !== null && lastTilt !== null && lastFov !== null) {\n playbackStateController.setFisheyePanTiltZoomForApexId(apexId, lastPan, lastTilt, lastFov);\n }\n }\n }\n break;\n case Initializing:\n // Initialization can happen while the stream is already playing and without a subsequent transition to the playing state.\n // In which case, the disconnect timer shouldn't be restarted.\n if (!this.hasStreamConnected) {\n this.disconnectIfStreamGetsStuck.perform();\n }\n\n // Starting state is used within the player to timeout when state is stuck.\n // Do not notify state change for starting state.\n return;\n case Disconnected:\n this.disconnectIfStreamGetsStuck.cancelAll();\n (player.component as OpeneyePlayer).detachPlayer();\n player.component.playbackStateControllerInitCompleted = false;\n args.isTimeout = hasStreamConnected;\n this.sendLog.perform(true);\n this.stopOsdTicker();\n\n if (apexId) {\n playbackStateController.fisheyeModes.delete(apexId);\n // Interactive mode can't be controlled by the existing fisheyePtzController after a disconnect\n playbackStateController.fisheyePtzControllers.delete(apexId);\n // Ptz controller will also have an out of date token.\n playbackStateController.ptzControllers.delete(apexId);\n }\n\n break;\n }\n\n playbackStateController.notifyStateChanged(player, state, args);\n }\n\n /**\n * Event listener for oscar-js' transport state change.\n */\n onOscarTransportStateChange(): void {\n const { updateCurrentStreamIsEndToEnd, playbackStateController } = this.args,\n { isEndToEnd, pane } = this;\n if (!pane) {\n return;\n }\n\n updateCurrentStreamIsEndToEnd?.(isEndToEnd);\n\n const failureReason = <T>(success: T, noStreamAvailable: T, connectedButFailed: T, failed: T): T => {\n if (pane.transportState === OeStreamTransportState.Connected) {\n switch (pane.state) {\n case OeStateType.NoMediaPresent:\n return noStreamAvailable;\n case OeStateType.MediaPresent:\n return success;\n default:\n return connectedButFailed;\n }\n } else {\n return failed;\n }\n };\n\n if (isEndToEnd) {\n this.directFailureReason = failureReason(\n OeDirectFailureReasonEnum.Success,\n OeDirectFailureReasonEnum.NoStreamAvailable,\n OeDirectFailureReasonEnum.ConnectedButFailed,\n OeDirectFailureReasonEnum.WebrtcFailed\n );\n } else {\n if (!playbackStateController.allowWebrtc) {\n this.directFailureReason = OeDirectFailureReasonEnum.WebrtcNotAllowed;\n }\n\n this.relayFailureReason = failureReason(\n OeRelayFailureReasonEnum.Success,\n OeRelayFailureReasonEnum.NoStreamAvailable,\n OeRelayFailureReasonEnum.ConnectedButFailed,\n OeRelayFailureReasonEnum.WebsocketFailed\n );\n }\n }\n\n /**\n * Puts the player into an inactive state.\n */\n detachPlayer(): void {\n const { pane } = this,\n { playbackStateController } = this.args;\n\n // If we haven't called OespPlaybackStateController::setupPlayers to wire up a displayManager, then there's nothing to be done here\n if (!playbackStateController?.displayManager || !pane) {\n return;\n }\n\n playbackStateController.displayManager.beginChange();\n pane.newCamera = null;\n playbackStateController.displayManager.commitChange();\n }\n\n /**\n * Sends a log up with the current state of the stream.\n * We send an initial log up on stream success/fail, and we send an additional log 10 seconds later.\n */\n sendLog: Task<void, [boolean]> = task({ drop: true }, async (streamFailedToConnect: boolean) => {\n const { updateState } = this.args,\n { isEndToEnd, pane, isInitialLog, directFailureReason, relayFailureReason } = this;\n\n if (!pane) {\n return;\n }\n\n const initial = {\n isInitialLog,\n failed: streamFailedToConnect,\n time: new Date(),\n stats: pane.streamStats,\n direct: isEndToEnd,\n directFailureReason,\n relayFailureReason\n };\n\n if (isEndToEnd) {\n const reports = await pane.transportInfo.getWebRtcStats(),\n parsedReports = parseWebRTCStatsReport(reports);\n\n Object.assign(initial, parsedReports);\n }\n\n updateState(Log, '', initial);\n\n this.isInitialLog = false;\n\n if (!streamFailedToConnect) {\n await timeout(10_000);\n const { isInitialLog } = this;\n const update = {\n isInitialLog,\n stats: pane.streamStats\n };\n updateState(Log, '', update);\n }\n });\n\n /**\n * This starts off the ticker for updating OSD time and stats.\n */\n startOsdTicker(): void {\n this.lastInstant = null;\n this.animationRequest = requestAnimationFrame(this.handleTick.bind(this));\n }\n\n /**\n * This sends a final update to clear out the OSD and then cancels the ticker.\n */\n stopOsdTicker(): void {\n this.lastInstant = null;\n this.args.updateState(UpdateOsd, '', {});\n cancelAnimationFrame(this.animationRequest);\n }\n\n /**\n * This schedules the next call of itself and updates the OSD's time and stats.\n */\n handleTick(): void {\n this.animationRequest = requestAnimationFrame(this.handleTick.bind(this));\n\n const osdProperties = getOsdProperties.call(this),\n { renderTime } = osdProperties,\n { player, frozen, lastInstant } = this,\n { playbackStateController } = this.args,\n { playing } = playbackStateController;\n\n if (!renderTime) {\n return;\n }\n\n this.lastInstant = renderTime;\n\n if (!lastInstant) {\n return;\n }\n\n if (playing && convertInstantToSeconds(renderTime) != convertInstantToSeconds(lastInstant)) {\n // No need to update OSD if update occurred within the same second.\n // This is broken usage, if you are working on this code, please fix this!\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.args.updateState(UpdateOsd, '', osdProperties);\n if (frozen && playbackStateController && player) {\n playbackStateController.notifyStateChanged(player, Playing, { isTimeout: true });\n this.frozen = false;\n }\n return;\n }\n\n if (!frozen && playing) {\n this.updateStateIfStreamIsFrozen.perform();\n return;\n }\n\n if (frozen && !playing) {\n // If the video is paused, set frozen back to false.\n this.frozen = false;\n }\n }\n\n /**\n * Check if we added a state controller. If we did, proceed to do remaining setup steps for it.\n */\n @action\n checkPlaybackStateController(): void {\n const { playbackStateController } = this.args;\n\n if (playbackStateController) {\n connectToPlaybackStateController.call(this);\n }\n }\n\n /**\n * Check if we added a state controller. Don't do anything if we have previously added a state controller to this component.\n * If we added a state controller, proceed to do remaining setup steps for the state and OESP controllers.\n */\n @action\n updatePlaybackStateController(): void {\n const { playbackStateController, onAttachToOespController } = this.args,\n { playbackStateControllerInitCompleted } = this;\n\n if (playbackStateController && !playbackStateControllerInitCompleted) {\n connectToPlaybackStateController.call(this);\n\n if (onAttachToOespController) {\n // After connecting, allow pane to render before attempting to setup and start playback.\n // Do not copy this deprecated usage. If you see this, please convert to use ember-lifeline runTask, at which point we won't need the isDestroyed check anymore.\n // eslint-disable-next-line ember/no-runloop\n next(() => {\n // eslint-disable-next-line @adc/ember/no-is-destroyed\n if (isDestroyed(this)) {\n return;\n }\n\n onAttachToOespController(playbackStateController);\n });\n }\n }\n }\n\n /**\n * Disconnects the player if it remains in a state before the playing state.\n */\n disconnectIfStreamGetsStuck: Task<void, []> = task({ restartable: true }, async () => {\n await timeout(DisconnectedPlayerTimeoutMS);\n\n const { playbackStateController } = this.args,\n { player } = this;\n\n this.sendLog.perform(true);\n if (player) {\n (player.component as OpeneyePlayer).detachPlayer();\n playbackStateController.notifyStateChanged(player, Disconnected, { isTimeout: true });\n }\n });\n\n /**\n * Notify the state as frozen if time hasn't changed for 2 seconds.\n */\n updateStateIfStreamIsFrozen: Task<void, []> = task({ drop: true }, async () => {\n const prevTime = getOsdProperties.call(this).renderTime.value;\n await timeout(FrozenPlayerTimeoutMS);\n const currentTime = getOsdProperties.call(this)?.renderTime?.value;\n\n if (currentTime === prevTime) {\n const { playbackStateController } = this.args,\n { frozen, player, playing } = this;\n\n if (!frozen && playing && player) {\n playbackStateController.notifyStateChanged(player, Frozen, { isTimeout: true });\n this.disconnectIfStreamGetsStuck.perform();\n this.frozen = true;\n }\n }\n });\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n OpeneyePlayer: typeof OpeneyePlayer;\n }\n}\n","/**\n * Represents a handle to a single Janus plugin on a Janus session. Each WebRTC connection to the Janus server will be\n * associated with a single handle. Once attached to the server, this handle will be given a unique ID which should be\n * used to associate it with future signalling messages.\n *\n * See https://janus.conf.meetecho.com/docs/rest.html#handles.\n **/\n\nimport { KeepaliveFailed } from '../constants/disconnection-reasons.ts';\n\nimport type { ProxyICECandidate } from '../classes/webrtc/proxy-rtc-player';\n\n// TODO better define this in a future ts ticket VID-66319\ntype Completed = {\n completed: boolean;\n};\n\nexport type Candidate = RTCIceCandidateInit | Completed;\n\nexport type SignalBody = {\n request?: string;\n id?: string;\n timeout_seconds?: number;\n media_uri?: string;\n media_uri_query?: string;\n is_private?: boolean;\n type?: string;\n add_sps_pps?: boolean;\n is_virtual?: boolean;\n streaming_type?: string;\n max_timeout_seconds?: number;\n video?: boolean;\n videoport?: number;\n videopt?: number;\n videortpmap?: string;\n videofmtp?: string;\n audio?: boolean;\n audioport?: number;\n audiopt?: number;\n audiortpmap?: string;\n data?: boolean;\n dataport?: number;\n datatype?: string;\n dataiface?: string;\n databuffermsg?: boolean;\n upstream_uri?: string;\n name?: string;\n model?: string;\n firmware?: string;\n vv_record?: string;\n packetsSize?: number;\n};\n\nexport type Signal = {\n transaction?: number;\n janus?: string;\n session_id?: string;\n sender?: string;\n token?: string;\n jsep?: RTCSessionDescriptionInit;\n body?: SignalBody;\n candidate?: Candidate;\n handle_id?: number;\n data?: any;\n};\n\ntype JanusResponse = {\n data: {\n id: string;\n };\n};\n\ntype JanusBaseResponse = {\n janus: string;\n session_id?: number;\n transaction?: number;\n};\n\nexport type JanusPluginData = {\n plugin: string;\n data: {\n adc_streaming?: string;\n streaming: string;\n code?: number;\n created?: string;\n error?: string;\n message?: string;\n result?: { status?: string };\n status?: string;\n };\n};\n\nexport type JanusTransactionResponse = JanusBaseResponse & {\n plugindata: JanusPluginData;\n sender: number;\n jsep?: RTCSessionDescriptionInit;\n};\n\nexport type JanusAckResponse = JanusBaseResponse & {\n janus: 'ack';\n transaction: number;\n};\n\nexport type JanusSuccessResponse = JanusBaseResponse & {\n janus: 'success';\n data: { id?: number };\n};\n\nexport type JanusErrorResponse = JanusBaseResponse & {\n janus: 'error';\n error: {\n code: number;\n reason: string;\n };\n transaction: number;\n};\n\nexport type JanusCreationResponse = JanusTransactionResponse & {\n plugindata: JanusPluginData & {\n data: {\n permanent: boolean;\n stream: {\n id: number;\n type: string;\n description?: string;\n is_private: boolean;\n video_host: string;\n video_port: number;\n };\n warning: string;\n };\n };\n};\n\nexport type TrickleResponse = JanusBaseResponse & {\n candidate: Candidate;\n janus: 'trickle';\n sender: number;\n};\n\nexport type JanusTimeoutResponse = JanusTransactionResponse;\n\nexport type JanusWatchTransactionResponse = JanusTransactionResponse & {\n plugindata: JanusPluginData & {\n data: { streaming: string; created: string; error?: string; stream: { id: string } };\n };\n};\n\nexport type JanusJsepTransactionResponse = JanusTransactionResponse & {\n jsep: RTCSessionDescriptionInit;\n};\n\nexport type JanusPluginHandle = {\n session: JanusSession;\n playerId: string;\n id?: string;\n attach: (plugin: string) => void;\n detach: () => void;\n on: (ev: string, callback: (s: Signal) => void) => void;\n send: (type: string, signal: Signal) => JanusTransactionResponse;\n sendMessage: (body: any) => Promise<void>;\n sendJsep: (jsep: RTCSessionDescriptionInit) => Promise<void>;\n sendTrickle: (candidate: ProxyICECandidate | null) => Promise<void>;\n};\n\nexport type JanusSession = {\n output: () => void;\n token: string;\n id?: string;\n nextTxId: number;\n txns: object;\n eventHandlers: object;\n options: { verbose: boolean; timeoutMs: number; keepaliveMs: number };\n disconnect: () => void;\n keepaliveErrorReceived: boolean;\n create: () => Promise<void>;\n destroy: () => Promise<void>;\n dispose: () => void;\n isError: (signal: Signal) => boolean;\n on: (ev: string, callback: () => void) => void;\n receive: (signal: Signal) => void;\n send: (type: string, signal: Signal) => Promise<void>;\n _transmit: (type: string, signal: Signal) => void;\n _logOutgoing: (signal: Signal) => void;\n _logIncoming: (signal: Signal) => void;\n _sendKeepalive: () => Promise<void>;\n _killKeepalive: () => void;\n _resetKeepalive: () => void;\n};\n\n/**\n * MiniJanus is based off of the github for MiniJanus, which in turn is based off of the Meetecho Janus.\n *\n * See https://github.com/mozilla/minijanus.js\n **/\n\nexport function JanusPluginHandle(\n this: typeof JanusSession.prototype,\n session: typeof JanusSession,\n playerId: string\n): void {\n this.session = session;\n this.playerId = playerId;\n this.id = undefined;\n}\n\n/** Attaches this handle to the Janus server and sets its ID. **/\nJanusPluginHandle.prototype.attach = function (plugin: string) {\n const payload = { plugin, 'force-bundle': true, 'force-rtcp-mux': true, opaque_id: this.playerId };\n return this.session.send('attach', payload).then((resp: JanusResponse) => {\n this.id = resp.data.id;\n return resp;\n });\n};\n\n/** Detaches this handle. **/\nJanusPluginHandle.prototype.detach = function () {\n return this.send('detach');\n};\n\n/** Registers a callback to be fired upon the reception of any incoming Janus signals for this plugin handle with the\n * `janus` attribute equal to `ev`.\n **/\nJanusPluginHandle.prototype.on = function (ev: string, callback: (s: Signal) => void) {\n return this.session.on(ev, (signal: Signal) => {\n if (signal.sender === this.id) {\n callback(signal);\n }\n });\n};\n\n/**\n * Sends a signal associated with this handle. Signals should be JSON-serializable objects. Returns a promise that will\n * be resolved or rejected when a response to this signal is received, or when no response is received within the\n * session timeout.\n **/\nJanusPluginHandle.prototype.send = function (type: string, signal: Signal) {\n return this.session.send(type, Object.assign({ handle_id: this.id }, signal));\n};\n\n/** Sends a plugin-specific message associated with this handle. **/\nJanusPluginHandle.prototype.sendMessage = function (body: any) {\n return this.send('message', { body });\n};\n\n/** Sends a JSEP offer or answer associated with this handle. **/\nJanusPluginHandle.prototype.sendJsep = function (jsep: RTCSessionDescriptionInit) {\n return this.send('message', {\n body: {\n request: 'start'\n },\n jsep\n });\n};\n\n/** Sends an ICE trickle candidate associated with this handle. **/\nJanusPluginHandle.prototype.sendTrickle = function (candidate: ProxyICECandidate | null) {\n return this.send('trickle', { candidate });\n};\n\n/**\n * Represents a Janus session -- a Janus context from within which you can open multiple handles and connections. Once\n * created, this session will be given a unique ID which should be used to associate it with future signalling messages.\n *\n * See https://janus.conf.meetecho.com/docs/rest.html#sessions.\n **/\nexport function JanusSession(\n this: typeof JanusSession.prototype,\n output: () => void,\n token: string,\n options: { verbose: boolean; timeoutMs: number; keepaliveMs: number },\n disconnectionFunction: () => void\n) {\n this.output = output;\n this.token = token;\n this.id = undefined;\n this.nextTxId = 0;\n this.txns = {};\n this.eventHandlers = {};\n this.options = Object.assign(\n {\n verbose: false,\n timeoutMs: 10000,\n keepaliveMs: 55000\n },\n options\n );\n this.disconnect = disconnectionFunction;\n this.keepaliveErrorReceived = false;\n}\n\n/** Creates this session on the Janus server and sets its ID. **/\nJanusSession.prototype.create = function () {\n return this.send('create', { request: 'create' }).then((resp: JanusResponse) => {\n this.id = resp.data.id;\n return resp;\n });\n};\n\n/**\n * Destroys this session. Note that upon destruction, Janus will also close the signalling transport (if applicable) and\n * any open WebRTC connections.\n **/\nJanusSession.prototype.destroy = function () {\n return this.send('destroy').then((resp: Promise<void>) => {\n this.dispose();\n return resp;\n });\n};\n\n/**\n * Disposes of this session in a way such that no further incoming signalling messages will be processed.\n * Outstanding transactions will be rejected.\n **/\nJanusSession.prototype.dispose = function () {\n this._killKeepalive();\n this.eventHandlers = {};\n for (const txId in this.txns) {\n // eslint-disable-next-line no-prototype-builtins\n if (this.txns.hasOwnProperty(txId)) {\n const txn = this.txns[txId];\n clearTimeout(txn.timeout);\n txn.reject(new Error('Janus session was disposed.'));\n delete this.txns[txId];\n }\n }\n};\n\n/**\n * Whether this signal represents an error, and the associated promise (if any) should be rejected.\n * Users should override this to handle any custom plugin-specific error conventions.\n **/\nJanusSession.prototype.isError = function (signal: Signal) {\n return signal.janus === 'error';\n};\n\n/** Registers a callback to be fired upon the reception of any incoming Janus signals for this session with the\n * `janus` attribute equal to `ev`.\n **/\nJanusSession.prototype.on = function (ev: string, callback: () => void) {\n let handlers = this.eventHandlers[ev];\n if (handlers == null) {\n handlers = this.eventHandlers[ev] = [];\n }\n\n handlers.push(callback);\n};\n\n/**\n * Callback for receiving JSON signalling messages pertinent to this session. If the signals are responses to previously\n * sent signals, the promises for the outgoing signals will be resolved or rejected appropriately with this signal as an\n * argument.\n *\n * External callers should call this function every time a new signal arrives on the transport; for example, in a\n * WebSocket's `message` event, or when a new datum shows up in an HTTP long-polling response.\n **/\nJanusSession.prototype.receive = function (signal: Signal) {\n if (this.options.verbose) {\n this._logIncoming(signal);\n }\n\n if (signal.session_id !== this.id) {\n window.console.warn(\n `Incorrect session ID received in Janus signalling message: was ${signal.session_id}, expected ${this.id}.`\n );\n }\n\n const responseType = signal.janus;\n\n if (!responseType) {\n return;\n }\n\n const handlers = this.eventHandlers[responseType];\n if (handlers != null) {\n for (let i = 0; i < handlers.length; i++) {\n handlers[i](signal);\n }\n }\n\n if (signal.transaction != null) {\n const txn = this.txns[signal.transaction];\n if (txn == null) {\n // this is a response to a transaction that wasn't caused via JanusSession.send, or a plugin replied twice to a\n // single request, or the session was disposed, or something else that isn't under our purview; that's fine\n return;\n }\n\n if (responseType === 'ack' && txn.type === 'message') {\n // this is an ack of an asynchronously-processed plugin request, we should wait to resolve the promise until the\n // actual response comes in\n return;\n }\n\n clearTimeout(txn.timeout);\n\n delete this.txns[signal.transaction];\n (this.isError(signal) ? txn.reject : txn.resolve)(signal);\n }\n};\n\n/**\n * Sends a signal associated with this session, beginning a new transaction. Returns a promise that will be resolved or\n * rejected when a response is received in the same transaction, or when no response is received within the session\n * timeout.\n **/\nJanusSession.prototype.send = function (type: string, signal: Signal) {\n signal = Object.assign({ transaction: (this.nextTxId++).toString(), token: this.token }, signal);\n return new Promise((resolve, reject) => {\n let timeout = null;\n if (this.options.timeoutMs) {\n timeout = setTimeout(() => {\n delete this.txns[signal.transaction!];\n // This was the previous error message, but the id was stripped out to make Sentry errors match.\n // reject(new Error(`Signalling transaction with txid ${signal.transaction} timed out.`));\n reject(new Error('Signalling transaction timed out.'));\n }, this.options.timeoutMs);\n }\n\n this.txns[signal.transaction!] = { resolve: resolve, reject: reject, timeout: timeout, type: type };\n this._transmit(type, signal);\n });\n};\n\nJanusSession.prototype._transmit = function (type: string, signal: Signal) {\n signal = Object.assign({ janus: type }, signal);\n\n if (this.id != null) {\n // this.id is undefined in the special case when we're sending the session create message\n signal = Object.assign({ session_id: this.id }, signal);\n }\n\n if (this.options.verbose) {\n this._logOutgoing(signal);\n }\n\n this.output(JSON.stringify(signal));\n this._resetKeepalive();\n};\n\nJanusSession.prototype._logOutgoing = function (signal: Signal) {\n let kind = signal.janus;\n if (kind === 'message' && signal.jsep) {\n kind = signal.jsep.type;\n }\n\n const message = `> Outgoing Janus ${kind || 'signal'} (#${signal.transaction}): `;\n window.console.debug(`%c${message}`, 'color: #040', signal);\n};\n\nJanusSession.prototype._logIncoming = function (signal: Signal) {\n const kind = signal.janus;\n const message = signal.transaction\n ? `< Incoming Janus ${kind || 'signal'} (#${signal.transaction}): `\n : `< Incoming Janus ${kind || 'signal'}: `;\n window.console.debug(`%c${message}`, 'color: #004', signal);\n};\n\nJanusSession.prototype._sendKeepalive = function () {\n return this.send('keepalive');\n};\n\nJanusSession.prototype._killKeepalive = function () {\n clearTimeout(this.keepaliveTimeout);\n};\n\nJanusSession.prototype._resetKeepalive = function () {\n this._killKeepalive();\n if (this.options.keepaliveMs) {\n this.keepaliveTimeout = setTimeout(() => {\n this._sendKeepalive().catch((e: Error) => {\n // Sometimes on player teardown or error, this keepalive accidentally gets triggered again and continues to send over and over.\n // In bad situations, we can keep sending failed keepalives even throughout other pages on the site.\n // This can end up causing a massive amount of Sentry errors for the same non-issue.\n // The first time we get this, log it. Otherwise, do not log an error to Sentry again. See VID-33104.\n if (!this.keepaliveErrorReceived) {\n this.keepaliveErrorReceived = true;\n\n if (this.disconnect) {\n this.disconnect(KeepaliveFailed);\n } else {\n window.console.error('Error received from keepalive: ', e);\n }\n }\n });\n }, this.options.keepaliveMs);\n }\n};\n","import { isDestroyed } from '@adc/ember-utils/utils/ember-helpers';\nimport { assert } from '@ember/debug';\nimport { inject as service } from '@ember/service';\nimport { task, timeout } from 'ember-concurrency';\nimport { GenericProxyError, KeepaliveFailed } from '../../constants/disconnection-reasons.ts';\nimport {\n ConsoleDebug,\n ConsoleWarn,\n MessageTypeEvent,\n MessageTypeSlowLink,\n DefaultProxyStreamTimeoutSeconds,\n DefaultMaxTimeoutSeconds\n} from '../../constants/generic.ts';\nimport {\n Disconnected,\n Error as ErrorPlayerMessage,\n FailedToConnect,\n Paused,\n Playing,\n TimedOut,\n PoorStartingConnection\n} from '../../constants/player-messages.ts';\nimport { WavefrontProxyWebsocketFailed, WavefrontProxyWebsocketFailed8989 } from '../../constants/wavefront.ts';\nimport { WebrtcAudioStatus } from '../../enums/WebrtcAudioUsage.ts';\nimport { JanusPluginHandle, JanusSession } from '../../utils/minijanus.ts';\nimport { IceCandidateTypeRelay } from '../../utils/webrtc-utils.ts';\nimport { CHANGE_CAMERA_AUDIO } from '../state-controllers/base-state-controller.ts';\nimport { TOGGLE_MICROPHONE_AUDIO } from '../state-controllers/base-state-controller.ts';\nimport {\n PLAYBACK_COMMAND_RESUME,\n PLAYBACK_COMMAND_PAUSE,\n PLAYBACK_COMMAND_UPDATE\n} from '../state-controllers/webrtc-proxy-playback-state-controller.ts';\nimport { ProxyAudioSampleRate } from '../state-controllers/webrtc-proxy-playback-state-controller.ts';\nimport BaseRtcPlayer, {\n TenPercent,\n TwentyPercent,\n ThirtyPercent,\n FourtyPercent,\n FiftyPercent,\n SixtyPercent,\n SeventyPercent,\n EightyPercent\n} from './base-rtc-player.ts';\nimport WebrtcStreamRecorder from './webrtc-stream-recorder.ts';\n\nimport type EnvSettingsService from '@adc/app-infrastructure/services/env-settings';\nimport type { Task } from 'ember-concurrency';\nimport type { ProxyWebrtcConnectionInfo } from '../../types.ts';\nimport type {\n JanusJsepTransactionResponse,\n JanusTransactionResponse,\n JanusWatchTransactionResponse\n} from '../../utils/minijanus';\nimport type WebrtcProxyPlaybackStateController from '../state-controllers/webrtc-proxy-playback-state-controller.ts';\nimport type {\n BaseRtcPlayerProps,\n PlayerCommandCommands,\n PlayerCommandRequestParams,\n SendPlayerCommandBaseCommands\n} from './base-rtc-player';\n\ninterface ProxyWebsocketCommandBody {\n request: string;\n media_uri?: string;\n media_uri_query?: string;\n timeout_seconds?: number;\n max_timeout_seconds?: number;\n}\n\ninterface ProxyPlayerCommandRequestParams {\n isEnabledAutomaticallyAfterDelay?: boolean;\n mute?: boolean;\n speed?: number;\n volume?: number;\n}\n\nexport interface ProxyRtcPlayerProps extends BaseRtcPlayerProps {\n coturnAddressesTuplets?: string;\n iceServers: string;\n isVirtualCamera: boolean;\n janusGatewayUrl: string;\n proxyWebrtcConnectionInfo?: ProxyWebrtcConnectionInfo;\n spsAndPpsRequired: boolean;\n streamMaxTimeoutSeconds: number;\n streamTimeoutSeconds: number;\n supportsAudioForProxyStream: boolean;\n token: string;\n url: string;\n audioUpStreamUrl?: string;\n urlQueryParams?: string;\n visualVerificationRecord?: string;\n webrtcProxyPlaybackStateController: WebrtcProxyPlaybackStateController;\n}\n\nexport type ProxyICECandidate = RTCIceCandidate | RTCIceCandidateInit | { completed: true };\n\ntype SendPlayerCommandProxyCommands = SendPlayerCommandBaseCommands | typeof TOGGLE_MICROPHONE_AUDIO;\n\n/**\n * Various number values used in this file.\n * - Different proxy disconnection reasons.\n * - Stream disconnection groupings for disconnect messages.\n * - Messages/errors for wavefront.\n */\nconst PROXY_DISCONNECTION_CODE_NORMAL = 0,\n PROXY_DISCONNECTION_CODE_ERROR = 1,\n PROXY_DISCONNECTION_CODE_AUTH_ERROR = 2,\n PROXY_DISCONNECTION_CODE_CAMERA_NOT_REACHABLE = 3,\n PROXY_DISCONNECTION_CODE_STREAM_NOT_REACHABLE = 4,\n PROXY_DISCONNECTION_CODE_STREAM_DROPPED = 5,\n PROXY_DISCONNECTION_CODE_END_OF_STREAM = 6,\n PROXY_DISCONNECTION_CODE_TIMEOUT = 7,\n PROXY_DISCONNECTION_CODE_STOPPED = 8,\n PROXY_DISCONNECTION_CODE_WEBRTC_STOPPED = 9,\n PROXY_DISCONNECTION_CODE_WEBRTC_FAILED = 10,\n DISCONNECTION_TYPE_FAILED_TO_CONNECT = 0,\n DISCONNECTION_TYPE_DISCONNECTED = 1,\n DISCONNECTION_TYPE_TIMEOUT = 2,\n DISCONNECTION_TYPE_ERROR = 3,\n SlowLinkCheckYieldTimeMs = 7000;\n\nconst WEBRTC_RETRY_TIMEOUT = 500;\n\nconst TWO_WAY_AUDIO_DATA_CHANNEL = 'TWO_WAY_AUDIO_DATA_CHANNEL';\n\n/**\n * Given a proxy disconnection code, what type of player disconnection is this?\n * Options are between failed to connect, disconnected, time out, and error.\n *\n * @param code The proxy disconnection code coming from the WebRTC proxy server.\n */\nfunction proxyDisconnectionType(code: number): number {\n switch (code) {\n case PROXY_DISCONNECTION_CODE_CAMERA_NOT_REACHABLE:\n case PROXY_DISCONNECTION_CODE_STREAM_NOT_REACHABLE:\n case PROXY_DISCONNECTION_CODE_WEBRTC_FAILED:\n case PROXY_DISCONNECTION_CODE_AUTH_ERROR: // This \"error\" happens most often with outdated VPN IPs and works on restart.\n return DISCONNECTION_TYPE_FAILED_TO_CONNECT;\n case PROXY_DISCONNECTION_CODE_NORMAL:\n case PROXY_DISCONNECTION_CODE_STREAM_DROPPED:\n case PROXY_DISCONNECTION_CODE_END_OF_STREAM:\n case PROXY_DISCONNECTION_CODE_STOPPED:\n case PROXY_DISCONNECTION_CODE_WEBRTC_STOPPED:\n return DISCONNECTION_TYPE_DISCONNECTED;\n case PROXY_DISCONNECTION_CODE_TIMEOUT:\n return DISCONNECTION_TYPE_TIMEOUT;\n case PROXY_DISCONNECTION_CODE_ERROR:\n return DISCONNECTION_TYPE_ERROR;\n default:\n return DISCONNECTION_TYPE_DISCONNECTED;\n }\n}\n\n/**\n * Callback function used in minijanus in the case where sending a keepalive message results in an error.\n * In this case, disconnect the stream if it hasn't already been disconnected.\n */\nfunction disconnectAfterKeepaliveFailure(this: ProxyRtcPlayer): void {\n // TODO fix in post TS follow-up\n // eslint-disable-next-line @typescript-eslint/no-this-alias, @adc/ember/no-is-destroyed\n if (isDestroyed(this) || this.streamDisconnected) {\n return;\n }\n\n const disconnectionType = this.playStarted ? Disconnected : FailedToConnect;\n this.disconnectWithError(KeepaliveFailed, null, { disconnectionType, logToSentry: false });\n}\n\n/**\n * A base object for creating and handling proxy WebRTC streaming connections, going through a Janus gateway.\n */\nexport default class ProxyRtcPlayer extends BaseRtcPlayer {\n @service declare envSettings: EnvSettingsService;\n\n // #region Required Values\n\n /**\n * The encrypted url we are attempting to stream from.\n */\n url = '';\n\n /**\n * The streaming token.\n */\n token = '';\n\n /**\n * The janus gateway url to which we need to connect for webRTC streaming.\n */\n janusGatewayUrl = '';\n\n /**\n * The ICE server properties, in stringified JSON.\n */\n iceServers = '';\n\n /**\n * The ProxyWebrtcConnectionInfo model received with streaming properties needed for WebRTC proxy.\n * (TODO move the rest in VID-69014)\n */\n proxyWebrtcConnectionInfo?: ProxyWebrtcConnectionInfo;\n\n /**\n * The playback state controller for proxy webrtc. Gets initialized in the constructor.\n */\n webrtcProxyPlaybackStateController?: WebrtcProxyPlaybackStateController;\n\n // #endregion\n\n // #region Optional Values\n\n /**\n * Are SPS and PPS headers required for this stream?\n */\n spsAndPpsRequired?: boolean;\n\n /**\n * If we're recording this stream for an operator portal session, this value is needed to initiative a server-side recording.\n */\n visualVerificationRecord?: string;\n\n /**\n * Optional query params we may want appended to the url on the server side after decryption.\n */\n urlQueryParams = '';\n\n /**\n * What size should we use for the video packets sent from the server?\n */\n packetsSize?: number;\n\n // #endregion\n\n // #region Audio Values\n\n /**\n * Does the proxy stream support audio?\n */\n supportsAudioForProxyStream = false;\n\n /**\n * The camera API URL for sending audio (two-way audio to the camera).\n */\n audioUpStreamUrl = '';\n\n /** @override */\n microphoneRequestConstraints = {\n video: false,\n audio: {\n echoCancellation: true,\n noiseSuppression: true,\n channelCount: 1,\n sampleRate: ProxyAudioSampleRate\n }\n };\n\n // #endregion\n\n // #region Other Stream Properties\n\n /**\n * Has the websocket opened?\n */\n websocketOpened = false;\n\n /**\n * Stream timeout seconds used when sending updates through the websocket for proxy streaming..\n * Default is 3 minutes, but is customizable (say for different dealers).\n */\n streamTimeoutSeconds = DefaultProxyStreamTimeoutSeconds;\n\n /**\n * Max stream timeout used when the stream is paused.\n * By default this is 15 minutes, but is customizable.\n */\n streamMaxTimeoutSeconds = DefaultMaxTimeoutSeconds;\n\n /**\n * The queue of candidates from the server.\n * When we receive these candidates, we can only process them after the remote description has been set.\n * If we receive candidates before then, we add them to the queue and process them later.\n */\n candidateQueue: Array<ProxyICECandidate>;\n\n /** @override */\n isEndToEnd = false;\n\n /**\n * Are we using port 8989 to connect to Janus?\n * This starts true and we connect over the default :8989. We will try port :443 if the Websocket fails to open.\n *\n * @note This is because :8989 is a non-traditional port, so some Firewalls may block it over :443.\n * @note However Janus traditionally runs over port :8989, and the port forwarding from :443 -> :8989 may not work for all customers.\n */\n usingPort8989 = true;\n\n /**\n * Have we received a slowlink message from the websocket?\n */\n hasReceivedSlowLinkMessage = false;\n\n /**\n * Have we sent a message reporting a slow connection for this stream?\n * This requires receiving a slowlink message within 7 seconds of the stream sitting at 80% without loading.\n */\n hasSentSlowConnectionMessage = false;\n\n // #endregion\n\n /**\n * An array for tuplets (public, private) ip addresses, in stringified JSON.\n * This is passed in as a string and then we parse and save it as an array.\n */\n coturnAddressesTuplets?: string;\n\n /**\n * An array for tuplets (public, private) ip addresses, turned into a real array from stringified JSON.\n */\n coturnAddressesTupletsArray?: Array<{ public: string; private: string }>;\n\n // #region Ember Object Hooks\n\n /** @override */\n constructor(host: object, props: ProxyRtcPlayerProps) {\n super(host, props);\n\n Object.assign(this, props);\n\n // Verify we have all of the required string properties we need for WebRTC streaming.\n const requiredValues = ['playerId', 'url', 'token', 'janusGatewayUrl', 'iceServers'];\n\n requiredValues.forEach((name: keyof ProxyRtcPlayer) => {\n assert(`The ${name} property must be passed to the AdcRtcPlayer object`, !!this[name]);\n });\n\n // We get coturnAddressesTuplets as stringified JSON and need to parse it as an array.\n const coturnTuplets = this.coturnAddressesTuplets;\n if (coturnTuplets) {\n this.coturnAddressesTupletsArray = JSON.parse(coturnTuplets);\n }\n\n this.candidateQueue = [];\n\n // Allow a custom packetsSize property if we passed it in as a query param.\n this.packetsSize = parseInt((this.queryParams.get('packetsSize') as string) || '', 10);\n\n this.streamTimeoutSeconds =\n parseInt(this.queryParams.get('proxyTimeoutTime') || '') || this.streamTimeoutSeconds;\n }\n\n // #endregion\n\n // #region WebRTC Connection Functions\n\n /** @override */\n startStream(): void {\n const {\n playerId,\n url,\n token,\n iceServers,\n proxyWebrtcConnectionInfo,\n urlQueryParams,\n isVirtualCamera,\n spsAndPpsRequired,\n coturnAddressesTupletsArray,\n mac,\n deviceModel,\n firmware,\n streamingType,\n streamTimeoutSeconds,\n streamMaxTimeoutSeconds,\n usingPort8989,\n packetsSize,\n supportsAudioForProxyStream,\n audioUpStreamUrl\n } = this;\n let { visualVerificationRecord } = this;\n\n if (this.streamDisconnected) {\n return;\n }\n\n this.updateLoadingPercentage(TenPercent);\n\n this.logWithMac('Starting proxy stream.');\n\n let janusGatewayUrl = this.janusGatewayUrl;\n if (usingPort8989 && !janusGatewayUrl.includes(':8989')) {\n this.usingPort8989 = false;\n }\n\n if (!usingPort8989) {\n // Strip out port :8989 if we failed to open the websocket the first time over :8989 (assuming the original url\n // contained :8989). We will try over port :443 the second time.\n janusGatewayUrl = janusGatewayUrl.replace(':8989', '');\n }\n\n // Create Websocket and other objects needed for the Janus signalling server connection.\n const webSocket = new WebSocket(janusGatewayUrl, 'janus-protocol'),\n // TODO improve the casting here once we improve minijanus object typings VID-65385\n session = new (JanusSession as any)(\n webSocket.send.bind(webSocket),\n token,\n {},\n disconnectAfterKeepaliveFailure.bind(this)\n ) as any as JanusSession,\n handle = new (JanusPluginHandle as any)(session, playerId) as any as JanusPluginHandle;\n\n // Create WebRTC peerConnection object.\n // For proxy streams, we can create the peer connection initially since we get the ice servers from the backend.\n // Comparatively, the end-to-end case must wait to get the ice servers from the signalling server first.\n const pcConfig = { iceServers: JSON.parse(iceServers) },\n peerConnection = new RTCPeerConnection(pcConfig);\n\n this.upstreamLogger?.('RTCPeerConnection config: ' + JSON.stringify(pcConfig));\n\n Object.assign(this, {\n handle,\n peerConnection,\n session,\n webSocket\n });\n\n // Set up WebRTC Peer Connection event listeners:\n\n // Send ICE Candidates to the server.\n peerConnection.addEventListener('icecandidate', (event) => {\n const { handleAttached, sessionCreated, webSocket } = this,\n webSocketOpen = this.webSocketIsOpen(webSocket);\n\n this.logWithMac('Ice candidate event.', event, ConsoleDebug);\n\n if (!handleAttached || !sessionCreated || !webSocketOpen) {\n this.logWithMac(\n `Returning from icecandidate event function. handle ${handleAttached}, session ${sessionCreated}, websocket ${webSocketOpen}`,\n null,\n ConsoleDebug\n );\n return;\n }\n\n let localCandidate: ProxyICECandidate = { completed: true };\n\n if (event.candidate) {\n if (this.onlySendRelayCandidates && event.candidate.type !== IceCandidateTypeRelay) {\n // Skip sending non-relay candidates if the forceTurn query param dictates we should do so.\n this.logWithMac(\n 'Skipping sending non-relay candidate due to forceTurn',\n event.candidate,\n ConsoleDebug\n );\n return;\n } else if (this.ignoreRelayCandidates && event.candidate.type === IceCandidateTypeRelay) {\n // Skip sending relay candidates if the forceTurn query param dictates we should do so.\n this.logWithMac('Skipping sending relay candidate due to forceTurn', event.candidate, ConsoleDebug);\n return;\n }\n\n if (\n event.candidate.candidate.indexOf('typ relay') > 0 &&\n coturnAddressesTupletsArray &&\n coturnAddressesTupletsArray.length > 0\n ) {\n let strCandidate = event.candidate.candidate;\n // Replace the public ip with private.\n for (const tuplet of coturnAddressesTupletsArray) {\n if (strCandidate.indexOf(tuplet.public) > 0) {\n strCandidate = strCandidate.replace(tuplet.public, tuplet.private);\n break;\n }\n }\n\n localCandidate = {\n candidate: strCandidate,\n sdpMid: event.candidate.sdpMid,\n sdpMLineIndex: event.candidate.sdpMLineIndex\n };\n } else {\n localCandidate = event.candidate;\n }\n }\n\n handle.sendTrickle(localCandidate).catch((e) => {\n this.disconnectWithError(`Error trickling ICE: ${this.getErrorMessage(e)}`, e);\n });\n });\n\n // If ICE negotiation fails, send a separate disconnect message indicating ICE failure and disconnect the player.\n peerConnection.oniceconnectionstatechange = () => this.disconnectIfIceFailed();\n\n // Attach the stream to the video tag when the stream is ready to play.\n peerConnection.ontrack = (event) => this.attachStreamToVideoTag(event);\n\n // Set up WebSocket even listeners:\n\n // Add event to parse any messages we get from the web socket.\n webSocket.addEventListener('message', (event) => {\n const eventData = JSON.parse(event.data);\n\n // Process a the peer ICE candidate if we receive one.\n if (eventData.candidate) {\n this.receiveIceCandidate(eventData.candidate);\n }\n\n // Parse messages for the janus session...\n session.receive(eventData);\n // ...and parse messages in our code so we know the player status.\n this.processStatus(eventData);\n });\n\n // Begin the webrtc stream connection process when the web socket opens.\n webSocket.addEventListener('open', () => {\n this.websocketOpened = true;\n\n // Create a session.\n const performHandshake = (): Promise<void> =>\n session\n .create()\n // Attach the handle.\n .then(() => {\n if (this.streamDisconnected) {\n return;\n }\n\n this.sessionCreated = true;\n this.updateLoadingPercentage(TwentyPercent);\n\n return handle.attach('janus.plugin.streaming');\n })\n // Send a setup message to the janus server connect to this camera stream.\n .then(() => {\n if (this.streamDisconnected) {\n return;\n }\n\n this.handleAttached = true;\n this.updateLoadingPercentage(ThirtyPercent);\n\n const messageBody: { [key: string]: any } = {\n request: 'create',\n is_private: true,\n type: 'rtp',\n media_uri: url,\n media_uri_query: urlQueryParams,\n add_sps_pps: spsAndPpsRequired,\n is_virtual: isVirtualCamera,\n streaming_type: streamingType,\n timeout_seconds: streamTimeoutSeconds,\n max_timeout_seconds: streamMaxTimeoutSeconds,\n video: true,\n videoport: 0,\n videopt: 126,\n videortpmap: 'H264/90000',\n videofmtp: 'profile-level-id=42e01f;packetization-mode=1'\n };\n\n // Only add the audio properties if the player supports it.\n // TODO VID-69012 consolidate all audio properties into one property\n if (supportsAudioForProxyStream || proxyWebrtcConnectionInfo?.supportsAudio) {\n [\n ['audio', true],\n ['audioport', 0],\n ['audiopt', 0],\n ['audiortpmap', 'PCMU/8000']\n ].forEach(([key, value]) => {\n messageBody[key as string] = value;\n });\n\n if (proxyWebrtcConnectionInfo?.supportsAudio && audioUpStreamUrl) {\n [\n ['data', true],\n ['dataport', 0],\n ['datatype', 'binary'],\n ['dataiface', '127.0.0.1'],\n ['databuffermsg', false],\n ['upstream_uri', audioUpStreamUrl]\n ].forEach(([key, value]) => {\n messageBody[key as string] = value;\n });\n\n if (this.webrtcProxyPlaybackStateController) {\n this.webrtcProxyPlaybackStateController.dataChannel =\n peerConnection.createDataChannel(\n `${TWO_WAY_AUDIO_DATA_CHANNEL}-${this.playerId}`\n );\n }\n\n // We are recording this stream through the frontend if we have a url to send our recording pieces.\n const urlForRecordingStream = proxyWebrtcConnectionInfo?.urlForRecordingStream;\n if (urlForRecordingStream) {\n this.recorder = new WebrtcStreamRecorder(this, urlForRecordingStream);\n\n // If recording in browser, don't record on Janus.\n visualVerificationRecord = undefined;\n }\n }\n }\n\n // Add optional values if they exist.\n [\n ['name', mac],\n ['model', deviceModel],\n ['firmware', firmware],\n ['vv_record', visualVerificationRecord],\n ['packetsSize', packetsSize]\n ].forEach(([key, value]) => {\n if (value) {\n messageBody[key as string] = value;\n }\n });\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore TODO better define minijanus signals in a future ticket VID-65385\n return handle.send('message', {\n body: messageBody\n });\n })\n // Send a request message to watch the stream.\n .then((response: JanusWatchTransactionResponse) => {\n if (this.streamDisconnected) {\n return;\n }\n\n const responseData = response.plugindata.data;\n if (responseData.error) {\n throw new Error(`Error with 'create' message: ${responseData.error}`);\n }\n\n this.updateLoadingPercentage(FourtyPercent);\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore TODO better define minijanus signals in a future ticket VID-65385\n return handle.send('message', {\n body: {\n request: 'watch',\n id: response.plugindata.data.stream.id\n }\n });\n })\n // When we get an offer from the server, set the remote description...\n .then((response: JanusJsepTransactionResponse) => {\n if (this.streamDisconnected) {\n return;\n }\n\n this.updateLoadingPercentage(45);\n\n if (this.proxyWebrtcConnectionInfo) {\n const { supportsAudio, isMicrophoneConnected } = proxyWebrtcConnectionInfo!;\n this.requestUsersAudioStreamAndAddToRecorder(\n supportsAudio,\n isMicrophoneConnected,\n response.jsep.sdp\n );\n }\n\n this.upstreamLogger?.('Setting remote description: ' + JSON.stringify(response));\n return peerConnection.setRemoteDescription(response.jsep);\n })\n // ...and then create an answer for the server's offer.\n .then(() => {\n if (this.streamDisconnected) {\n return;\n }\n\n // If we have any queued candidates (from the websocket 'message' listener) to add to the peer connection,\n // we can add them now that the remote description has been set.\n const candidateQueue = this.candidateQueue;\n this.logWithMac('Candidate queue processing.', candidateQueue, ConsoleDebug);\n\n if (candidateQueue && candidateQueue.length > 0) {\n candidateQueue.forEach((candidate) => {\n // Pass in a null message as the \"candidate\" if this is actually the end-of-candidates message.\n // We still pass this in since addIceCandidates expects to receive a null object\n // once we have processed all of the ICE candidates from the peer connection.\n let sentCandidate: ProxyICECandidate | undefined = candidate;\n if ('completed' in candidate && candidate.completed) {\n sentCandidate = undefined;\n }\n\n peerConnection\n .addIceCandidate(sentCandidate as RTCIceCandidate | RTCIceCandidateInit)\n .catch((e) =>\n window.console.warn(\n 'Failed to add ice candidate after remote description has been set.',\n e\n )\n );\n });\n }\n\n // Then we can create an answer for the remote connection.\n this.updateLoadingPercentage(FiftyPercent);\n return peerConnection.createAnswer();\n })\n // Send the JSEP (Javascript Session Establishment Protocol) and make sure we set the local description.\n .then((ans) => {\n if (this.streamDisconnected || !ans) {\n return;\n }\n\n this.updateLoadingPercentage(SixtyPercent);\n\n this.upstreamLogger?.('Setting local description: ' + JSON.stringify(ans));\n\n const remote = handle.sendJsep(ans),\n local = peerConnection.setLocalDescription(ans);\n\n const promise = Promise.all([local, remote]);\n\n // Nest this .then within the current .then so if this promise fails, it will only be caught in one place\n // instead of also being caught in the generic failure .catch\n promise\n .then(() => {\n // WebRTC can fail from an ICE negotiation failure message in the peer connection.\n // If we received that failure message, do not continue listening for specific WebRTC messages.\n if (this.streamDisconnected || this.iceNegotiationFailed) {\n return;\n }\n\n this.iceStartTime = Date.now();\n this.updateLoadingPercentage(SeventyPercent);\n\n let isWebrtcUp = false;\n const webrtcUpPromise = new Promise((resolve) => handle.on('webrtcup', resolve));\n\n // TODO VID-66137 - fix the inconsistent WebRTC handshake currently fixed by re-trying\n setTimeout(() => {\n if (this.envSettings.isTestEnvironment() && !isWebrtcUp) {\n performHandshake();\n }\n }, WEBRTC_RETRY_TIMEOUT);\n\n webrtcUpPromise.then(() => {\n isWebrtcUp = true;\n\n if (this.streamDisconnected) {\n return;\n }\n\n this.logWithMac('Connected to Janus.', peerConnection);\n this.iceCompletionTime = Date.now();\n\n // For Legacy Edge: the video play promise is completed before this message.\n // Do not update the player state to loading if video has already started playing.\n if (this.playStarted) {\n return;\n }\n\n this.updateLoadingPercentage(EightyPercent);\n });\n\n return webrtcUpPromise;\n })\n .catch((e) => {\n this.disconnectWithError(`Error negotiating offer: ${this.getErrorMessage(e)}`, e);\n });\n })\n .catch((e) => {\n this.disconnectWithError(`Error connecting to Janus: ${this.getErrorMessage(e)}`, e);\n });\n\n performHandshake();\n });\n\n webSocket.addEventListener('error', () => {\n // TODO fix in post TS follow-up VID-65385\n // eslint-disable-next-line @typescript-eslint/no-this-alias, @adc/ember/no-is-destroyed\n if (isDestroyed(this)) {\n return;\n }\n\n if (!this.websocketOpened) {\n const janusGatewayUrlHostname = new URL(janusGatewayUrl).hostname.toString();\n\n if (this.usingPort8989) {\n // If the websocket fails to open with port 8989, try again with port 443.\n // Disconnect without sending a log just to clear out the Websocket and Janus variables.\n this.disconnectStream('', true);\n\n Object.assign(this, {\n streamDisconnected: false,\n usingPort8989: false\n });\n\n // Log this failure to Wavefront.\n const websocketFailed8989WavefrontMessage = WavefrontProxyWebsocketFailed8989.concat(\n '.',\n janusGatewayUrlHostname\n );\n this.logMessageToWavefront(websocketFailed8989WavefrontMessage);\n\n this.startStream();\n return;\n } else {\n // If the websocket fails to open with port 443 (after 8989), continue to disconnect the stream.\n // Log this failure to Wavefront.\n const websocketFailedWavefrontMessage = WavefrontProxyWebsocketFailed.concat(\n '.',\n janusGatewayUrlHostname\n );\n this.logMessageToWavefront(websocketFailedWavefrontMessage);\n }\n }\n\n // VID-33105: this error is logged a lot to Sentry. We will just log this through the WebRTC logs.\n this.disconnectWithError(GenericProxyError, null, { logToSentry: false });\n });\n }\n\n /**\n * Process an ICE candidate received from the peer connection.\n */\n receiveIceCandidate(candidate: RTCIceCandidate | { completed: true }): void {\n const { peerConnection } = this;\n\n if (!peerConnection) {\n return;\n }\n\n // If we get a candidate event, we need to make sure to process it through the peerConnection addIceCandidate call.\n // This is a necessary part of the setup process to connect to the server and stream from the camera.\n // We will receive multiple ICE candidates, then finally receive an end-of-candidates message ({ completed: true }).\n // All of these candidates (including end-of-candidates message) need to be processed and added to the peer connection.\n // .. however, we can only process them after the remote description has been set.\n if (!peerConnection.remoteDescription) {\n // If it is too early, add them to a queue for later processing.\n this.candidateQueue.push(candidate);\n } else {\n // Otherwise, process them now.\n\n if ('completed' in candidate) {\n // Pass in a null message as the \"candidate\" if this is actually the end-of-candidates message.\n // We still pass this in since addIceCandidates expects to receive a null object\n // once we have processed all of the ICE candidates from the peer connection.\n peerConnection.addIceCandidate(undefined).catch((e) => {\n this.logWithMac('Failed to add ice candidate in webSocket message event callback.', e);\n });\n return;\n } else if (this.onlyReceiveRelayCandidates && candidate.type !== IceCandidateTypeRelay) {\n // Skip processing non-relay candidates if the forceTurn query param dictates we should do so.\n this.logWithMac('Skipping receiving non-relay candidate due to forceTurn', candidate, ConsoleDebug);\n return;\n } else if (this.ignoreRelayCandidates && candidate.type === IceCandidateTypeRelay) {\n // Skip processing relay candidates if the forceTurn query param dictates we should do so.\n this.logWithMac('Skipping receiving relay candidate due to forceTurn', candidate, ConsoleDebug);\n return;\n }\n\n peerConnection.addIceCandidate(candidate).catch((e) => {\n this.logWithMac('Failed to add ice candidate in webSocket message event callback.', e);\n });\n }\n }\n\n /**\n * Process a WebRTC status change.\n *\n * @param statusMessage The WebRTC status object we received from the server.\n */\n processStatus(statusMessage: JanusTransactionResponse): void {\n const { janus: type, plugindata } = statusMessage;\n\n this.logWithMac('Got a message.', statusMessage, ConsoleDebug);\n\n if (type === MessageTypeSlowLink) {\n this.hasReceivedSlowLinkMessage = true;\n return;\n }\n\n if (type !== MessageTypeEvent) {\n // There are no other message types we need to parse for now.\n return;\n }\n\n const { data } = plugindata,\n { code, message, error, result } = data;\n\n if (result) {\n this.logWithMac(`Current status detected is: ${result.status}.`, undefined, ConsoleDebug);\n\n // Here we could do things to process the event info.\n // For example, do things if the status is 'stopped' or 'started',\n // though those were removed because those events can be detected in other places in ProxyRtcPlayer.\n return;\n }\n\n // If we got a code, we got a disconnection message from the websocket.\n if (code) {\n // When disconnecting, we will either get a message or an error string\n // (depending on if the disconnection is expected (like a timeout) or not (like an error)).\n const disconnectionMessage = (message || error) as string;\n\n this.logWithMac(`Session closing with code ${code} and message \"${disconnectionMessage}\".`);\n\n const disconnectionType = proxyDisconnectionType(code),\n // If we received an auth error, it is possible the VPN IP from the camera/media uri is outdated.\n // We will want to restart the player after refreshing the info we get from the db.\n shouldRestartPlayer = [\n PROXY_DISCONNECTION_CODE_AUTH_ERROR,\n PROXY_DISCONNECTION_CODE_CAMERA_NOT_REACHABLE\n ].includes(code);\n\n switch (disconnectionType) {\n case DISCONNECTION_TYPE_ERROR:\n // We got an error message from the websocket.\n this.logWithMac(`Received error from websocket: ${disconnectionMessage}.`);\n this.updateState(ErrorPlayerMessage, { errorMessage: disconnectionMessage });\n break;\n case DISCONNECTION_TYPE_FAILED_TO_CONNECT:\n // The stream failed to connect.\n this.logWithMac('Stream failed to connect.');\n this.updateState(FailedToConnect, { shouldRestartPlayer });\n break;\n case DISCONNECTION_TYPE_TIMEOUT:\n // The session timed out after the usual proxy timeout time.\n this.logWithMac('Session timed out.');\n this.updateState(TimedOut);\n break;\n case DISCONNECTION_TYPE_DISCONNECTED:\n // The session disconnected for some other reason (like a camera going offline).\n this.logWithMac('Stream disconnected.');\n this.updateState(Disconnected);\n break;\n default:\n // There's another disconnection type we haven't found yet. Add extra logging so we know to investigate this case.\n this.logWithMac(\n `NOTE: the code ${code} and message \"${disconnectionMessage}\" have not been handled in processStatus. Is this a new websocket message type?`,\n null,\n ConsoleWarn\n );\n this.updateState(Disconnected);\n }\n\n this.disconnectStream(disconnectionMessage);\n }\n }\n\n // #endregion\n\n // #region Overrides\n\n /** @override */\n attachMicrophoneStreamToPlayer(usersAudioStream: MediaStream): void {\n if (this.webrtcProxyPlaybackStateController) {\n this.webrtcProxyPlaybackStateController.audioStream = usersAudioStream;\n }\n }\n\n /** @override */\n onPlayStarted(): void {\n super.onPlayStarted();\n\n this.sendPoorConnectionMessageOnSlowLink.cancelAll();\n\n if (!this.proxyWebrtcConnectionInfo) {\n return;\n }\n\n if (!this.proxyWebrtcConnectionInfo.supportsAudio) {\n this.sendLog(true, false, undefined, WebrtcAudioStatus.NoAudioOverProxySupport);\n } else {\n const audioStatus = this.proxyWebrtcConnectionInfo.isMicrophoneConnected\n ? WebrtcAudioStatus.SentAndReceivedAudio\n : WebrtcAudioStatus.OnlyReceivedAudio;\n\n this.sendLog(true, false, undefined, audioStatus);\n }\n }\n\n /** @override */\n updateLoadingPercentage(percentage: number): void {\n super.updateLoadingPercentage(percentage);\n\n // Once we hit 80%, WebRTC has connected and we're waiting for the camera stream. Assess stream connection quality\n // in a few seconds if the stream hasn't actually started.\n if (percentage === EightyPercent) {\n this.sendPoorConnectionMessageOnSlowLink.perform();\n }\n }\n\n /** @override */\n cancelTasksAndRecorders(): void {\n super.cancelTasksAndRecorders();\n\n // If we've been recording this stream, stop the recording.\n this.recorder && this.recorder.stopRecording();\n\n // Cancel any tasks.\n this.sendPoorConnectionMessageOnSlowLink.cancelAll();\n }\n\n /**\n * @override\n */\n disconnectOrSendLogIfStreamGetsStuckHelper(\n streamStuckDisconnectionMessage: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _currentStreamPercentage?: number\n ): void {\n this.sendLog(\n true,\n false,\n `${streamStuckDisconnectionMessage} - still trying to connect.`,\n WebrtcAudioStatus.FailedToConnect\n );\n this.sentStreamStuckLogDuringProxyStreamLoad = true;\n }\n\n // #endregion\n\n // #region Tasks\n\n /**\n * Task for sending a poor connection state message if a proxy stream 1) takes more than 7 seconds at 80%, and 2) receives a slowlink message.\n *\n * @note On 7 seconds: a vast majority of streams get through 80% in under 7 seconds, especially those with strong connections.\n * @note On slowlink: receiving 'slowlink' from the proxy websocket is a good indicator that sending or receiving data is not running well.\n */\n sendPoorConnectionMessageOnSlowLink: Task<void, []> = task({ restartable: true }, async () => {\n await timeout(SlowLinkCheckYieldTimeMs);\n\n // Check if we should send poor starting connection message. This would be if we received a slowlink message within 7 seconds.\n // We only need to send one message per stream.\n if (!this.hasReceivedSlowLinkMessage || this.hasSentSlowConnectionMessage) {\n return;\n }\n\n this.hasSentSlowConnectionMessage = true;\n this.updateState(PoorStartingConnection);\n });\n\n // #endregion\n\n // #region Player Command Functions\n\n /** @override */\n sendPlayerCommand(\n this: ProxyRtcPlayer,\n command: PlayerCommandCommands<SendPlayerCommandProxyCommands>,\n requestParams: PlayerCommandRequestParams<ProxyPlayerCommandRequestParams>,\n { sendProxyUrl = false, alsoCallInternalFunction = false }\n ): void {\n const { webSocket, handle, handleAttached, streamTimeoutSeconds, streamMaxTimeoutSeconds } = this;\n\n if (!this.webSocketIsOpen(webSocket) || !handleAttached || !handle) {\n return;\n }\n\n // Some player commands require calling an internal method along with sending a websocket message. Process if needed.\n if (alsoCallInternalFunction && command in this) {\n this[command as keyof ProxyRtcPlayer & SendPlayerCommandProxyCommands](requestParams as any);\n }\n\n const body: ProxyWebsocketCommandBody = {\n request: command,\n ...requestParams\n };\n\n if (sendProxyUrl) {\n body.media_uri = this.url;\n body.media_uri_query = this.urlQueryParams;\n }\n\n // Changing the camera audio does not require sending a websocket message.\n if (command === CHANGE_CAMERA_AUDIO || command === TOGGLE_MICROPHONE_AUDIO) {\n return;\n }\n\n if (command === PLAYBACK_COMMAND_UPDATE) {\n body.timeout_seconds = streamTimeoutSeconds;\n body.max_timeout_seconds = streamMaxTimeoutSeconds;\n }\n\n if (command === PLAYBACK_COMMAND_RESUME || command === PLAYBACK_COMMAND_PAUSE) {\n this.isPaused = command === PLAYBACK_COMMAND_PAUSE;\n }\n\n handle\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore TODO better define minijanus signals in a future ticket VID-65385\n .send('message', { body })\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore TODO better define minijanus signals in a future ticket VID-65385\n .then(() => {\n const newState = command === PLAYBACK_COMMAND_PAUSE ? Paused : Playing;\n this.updateState(newState);\n })\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore TODO better define minijanus signals in a future ticket VID-65385\n .catch((e) => {\n const errorMessage = `Error sending playback request = ${command}: ${this.getErrorMessage(e)}`;\n window.console.warn(errorMessage, e);\n\n // We might want to send an error up, but usually the message is just rejected on the server side,\n // which ends up closing the connection anyway.\n });\n }\n\n // #endregion\n\n // #region General Helper Methods\n\n /** @override */\n clearKeepalive(): void {\n this.session?._killKeepalive();\n }\n\n // #endregion\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div id={{@id}} class=\\\"video-player webrtc-player\\\" ...attributes>\\n <div\\n id={{this.playerContainerId}}\\n class=\\\"video-container\\\"\\n style={{@styleString}}\\n {{did-insert this.checkStateControllerAndSetCachedWebRtcProperties}}\\n {{did-update this.updateWebRtcStreamingValues this.currentWebRtcStreamingValues}}\\n {{did-update this.updateUrlProperties @url @urlQueryParams}}\\n >\\n <video\\n id={{this.playerId}}\\n preload=\\\"none\\\"\\n {{did-insert this.insertVideoTag}}\\n {{did-insert (fn (coalesce @setZoomPanOverlaySelector (noop)) this.elementSelector)}}\\n {{did-update (fn (coalesce @setZoomPanOverlaySelector (noop)) this.elementSelector) this.elementSelector}}\\n />\\n </div>\\n {{yield}}\\n</div>\")","import { isDestroyed } from '@adc/ember-utils/utils/ember-helpers';\nimport { action, computed, set, setProperties } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport { type Registry as ServiceRegistry } from '@ember/service';\nimport { task } from 'ember-concurrency';\nimport { END_TO_END_COMMAND_LOAD_MEDIA } from '../classes/state-controllers/webrtc-end-to-end-state-controller.ts';\nimport EndToEndRtcPlayer from '../classes/webrtc/end-to-end-rtc-player.ts';\nimport ProxyRtcPlayer from '../classes/webrtc/proxy-rtc-player.ts';\nimport {\n DisconnectingToAttemptProxy,\n PlayEnded,\n PlayerDestroyed,\n UserLeftPage\n} from '../constants/disconnection-reasons.ts';\nimport { DefaultProxyStreamTimeoutSeconds, DefaultMaxTimeoutSeconds, StreamingTypeLive } from '../constants/generic.ts';\nimport { Log } from '../constants/player-messages.ts';\nimport { AdcWebrtcEndToEndStreamLoadTimes } from '../utils/stream-load-times.ts';\nimport { logMessageToWavefront } from '../utils/wavefront.ts';\nimport BasePlayer, { getPlayerId } from './base-player.ts';\nimport { BaseVideoIdPrefix } from './live-video-player.ts';\n\nimport type AdcAjaxService from '@adc/ajax/services/adc-ajax';\nimport type { SafeString } from '@ember/template/-private/handlebars';\nimport type { Task } from 'ember-concurrency';\nimport type WebrtcEndToEndStateController from '../classes/state-controllers/webrtc-end-to-end-state-controller.ts';\nimport type WebrtcProxyPlaybackStateController from '../classes/state-controllers/webrtc-proxy-playback-state-controller.ts';\nimport type BaseRtcPlayer from '../classes/webrtc/base-rtc-player.ts';\nimport type { PlayerCommandCommands, SendPlayerCommandBaseCommands } from '../classes/webrtc/base-rtc-player.ts';\nimport type { StreamingTypePlayback } from '../constants/generic.ts';\nimport type { EndToEndWebrtcConnectionInfo, ProxyWebrtcConnectionInfo, VideoPreloaderDetail } from '../types.ts';\nimport type { StateInfo } from './base-player.ts';\n\ninterface WebRTCStreaming {\n url?: string;\n playbackStateController?: WebrtcEndToEndStateController | WebrtcProxyPlaybackStateController;\n token?: string;\n janusGatewayUrl?: string;\n iceServers?: string;\n endToEndWebrtcConnectionInfo?: EndToEndWebrtcConnectionInfo;\n isVirtualCamera?: boolean;\n spsAndPpsRequired?: boolean;\n visualVerificationRecord?: string;\n coturnAddressesTuplets?: string;\n deviceId: string;\n supportsAudioForProxyStream?: boolean;\n}\n\nexport interface WebrtcPlayerSignature {\n Element: HTMLDivElement;\n Args: {\n id?: string;\n /** The camera API URL for sending audio (two-way audio to the camera). */\n audioUpStreamUrl?: string;\n /** The camera data usage mode. */\n cameraDataUsageMode?: number;\n /** Values needed to be able swap public ip for private ip when TURN is needed for the proxy. */\n coturnAddressesTuplets?: string;\n /** The unique ID of the device. */\n deviceId: string;\n /** The device model name. */\n deviceModel?: string;\n /** A model containing values needed to set up an End-to-End WebRTC connection with a streaming module in-camera. */\n endToEndWebrtcConnectionInfo?: EndToEndWebrtcConnectionInfo;\n /** The camera firmware version. */\n firmware?: string;\n /** A forced streaming aspect ratio to use, if any. This value is the width divided by the height. */\n forcedAspectRatio?: number;\n /** A stringified JSON object containing all of the possible ICE servers for proxy WebRTC streaming. */\n iceServers?: string;\n /** Is a download occurring right now? We need to know this, so we don't accidentally stop stream during a download. Downloads trigger a \"beforeunload\" event which is also triggered when page refreshes. */\n isProcessingDownload?: boolean;\n /** Is this camera a virtual camera? */\n isVirtualCamera?: boolean;\n /** The Janus/signalling server url needed for WebRTC proxy streaming. */\n janusGatewayUrl?: string;\n /** The camera MAC address. */\n mac?: string;\n /** Callback method for passing up the stream load timings to a higher component, if we want to measure stream load times. */\n onStreamConnected?: (stringExcelResults: string) => void;\n /** An object for controlling the current video playback state or sending other non-playback commands. */\n playbackStateController?: WebrtcEndToEndStateController | WebrtcProxyPlaybackStateController;\n /** The ProxyWebrtcConnectionInfo model received with streaming properties needed for WebRTC proxy. */\n proxyWebrtcConnectionInfo?: ProxyWebrtcConnectionInfo;\n /** Sets the zoom pan overlay selector. */\n setZoomPanOverlaySelector?: (elementSelector: string | null) => void;\n /** Whether the camera's stream needs the SPS and PPS headers to stream over WebRTC. */\n spsAndPpsRequired?: boolean;\n /** Strings indicating the streaming type used in the WebRTC proxy player (either 'Live' or 'Playback'). */\n streamingType?: typeof StreamingTypeLive | typeof StreamingTypePlayback;\n /** How long (in seconds) can we allow this device to stream video through the proxy before timing out? */\n streamTimeoutSeconds?: number;\n /** The style string for manipulating the video element. */\n styleString?: SafeString;\n /** Does the player support playing audio from the camera through the proxy stream? */\n supportsAudioForProxyStream?: boolean;\n /** The Janus streaming token required for WebRTC. */\n token?: string;\n /** Handles the event sent by the webrtc or oesp player. */\n updateState: (x: string, y: string, z?: StateInfo) => void;\n /** Callback function to send messages upstream to a parent component. **/\n upstreamLogger?: (message: string) => void;\n /** URL we should use right now to play the stream with. */\n url?: string;\n /** The query params entered in the URL. */\n urlQueryParams?: string;\n /** WebRTC stream preloader details. */\n videoPreloaderDetail?: VideoPreloaderDetail;\n /** Visual Verification data needed with the WebRTC proxy when the streaming user is a rep or VV operator. */\n visualVerificationRecord?: string;\n };\n Blocks: {\n default: [];\n };\n}\n\n/**\n * Is this disconnection reason one caused by the user?\n * By comparison, this isn't a reason caused by the camera, the proxy, any timeouts, any failures, etc.\n */\nexport function isUserCausedDisconnection(disconnectionReason: string): boolean {\n return disconnectionReason === PlayerDestroyed || disconnectionReason === UserLeftPage;\n}\n\n/**\n * Sets up the connection between this WebRTC player and a PlaybackStateController.\n */\nfunction connectToPlaybackStateController(this: WebrtcPlayer): void {\n // Send a message with the current context to the playback state controller to tell it this player is connected.\n this.args.playbackStateController?.attachPlayer(this);\n}\n\n/**\n * Do we have all of the streaming variables required for WebRTC proxy streaming?\n */\nfunction haveAllRequiredProxyVariables(this: WebrtcPlayer): boolean {\n const { deviceId, url, token, janusGatewayUrl, iceServers } = this.args;\n return !!(deviceId && url && token && janusGatewayUrl && iceServers);\n}\n\n/**\n * Sends up a state update action if it exists.\n */\nfunction sendStateUpdate(this: WebrtcPlayer, state: string, stateInfo: StateInfo): void {\n const { updateState, mac } = this.args;\n\n // Don't send this message if the player has been destroyed, EXCEPT for log state messages which can come at disconnect.\n // eslint-disable-next-line @adc/ember/no-is-destroyed\n if (isDestroyed(this) && state !== Log) {\n return;\n }\n\n // Create a string for loading percentage in case that was passed with a state update.\n // This is the case when a CONNECTING message is sent.\n const loadingPercentageString = stateInfo && stateInfo.percentage ? `${stateInfo.percentage}%` : '';\n window.console.debug(`Sending the message ${state} ${loadingPercentageString}. Mac:${mac}`);\n\n if (!window.RTCLogInformation) {\n window.RTCLogInformation = [];\n }\n\n window.RTCLogInformation.push(`${state} ${loadingPercentageString}`);\n\n // Call updateState closure action.\n updateState?.(state, this.playerId, stateInfo);\n}\n\n/**\n * Resets any values on the stream object that need to be reset if we reuse this component for another stream.\n */\nfunction resetValues(this: WebrtcPlayer): void {\n this.adcRtcPlayer = null;\n this.isEndToEnd = undefined;\n}\n\n/**\n * @classdesc\n *\n * WebRTC player component for streaming live video.\n */\nexport default class WebrtcPlayer extends BasePlayer<WebrtcPlayerSignature> {\n @service declare ajax: AdcAjaxService;\n @service declare store: ServiceRegistry['store'];\n\n streamMaxTimeoutSeconds?: number;\n\n declare cachedWebRtcProperties: WebRTCStreaming;\n\n // region WebRTC Streaming Objects\n\n /**\n * The AdcRTCPlayer object created for streaming.\n */\n adcRtcPlayer: BaseRtcPlayer | null = null;\n\n /**\n * A function to disconnect from Janus if the user navigates away from the site.\n * Set when starting to stream, and removed from the window when called once.\n */\n beforeUnloadEventListener: (() => void) | null = null;\n\n // endregion\n\n // region Video Player Properties\n\n /**\n * Whether this stream is a WebRTC end-to-end stream or a proxied stream.\n */\n isEndToEnd?: boolean;\n\n /**\n * Has the video tag been rendered?\n */\n videoTagCreated = false;\n\n // endregion\n\n /**\n * The time at which this component rendered. Used sometimes for taking stream load time metrics.\n */\n componentRenderedTime: number;\n\n // region Functions\n\n /**\n * Sends a playback command through the websocket.\n */\n sendPlayerCommand(\n command: PlayerCommandCommands<SendPlayerCommandBaseCommands>,\n requestParams = {},\n options = {}\n ): void {\n const { adcRtcPlayer } = this;\n adcRtcPlayer && adcRtcPlayer.sendPlayerCommand(command, requestParams, options);\n }\n\n /**\n * Disconnect the WebRtc stream and WebSocket when the component is destroyed or we navigate away from the page.\n */\n disconnect(disconnectionReason: string): void {\n const { adcRtcPlayer } = this;\n\n adcRtcPlayer && adcRtcPlayer.disconnectStream(disconnectionReason);\n\n if (this.beforeUnloadEventListener) {\n window.removeEventListener('beforeunload', this.beforeUnloadEventListener);\n }\n\n // eslint-disable-next-line @adc/ember/no-is-destroyed\n if (isDestroyed(this)) {\n return;\n }\n\n resetValues.call(this);\n }\n\n // endregion\n\n // region Component Hooks\n\n /** @override */\n constructor(owner: unknown, args: WebrtcPlayerSignature['Args']) {\n super(owner, args);\n\n Object.assign(this, args);\n this.componentRenderedTime = Date.now();\n }\n\n /** @override */\n willDestroy(): void {\n const { adcRtcPlayer } = this;\n const isPreloaderActive = adcRtcPlayer instanceof EndToEndRtcPlayer && adcRtcPlayer.videoPreloaderRtcProps;\n\n if (!isPreloaderActive) {\n // Disconnect from the websocket when this component is destroyed.\n // This does not handle cases where the Ember site is fully refreshed with a browser refresh.\n this.disconnect(PlayerDestroyed);\n }\n\n window.RTCDebugLogInformation = [];\n\n return super.willDestroy();\n }\n\n logMessageToWavefrontTask: Task<void, [string]> = task(async (message: string) => {\n logMessageToWavefront(this.ajax, this.store, this.isEndToEnd, this.args.isVirtualCamera, message);\n });\n\n // endregion\n\n // region Computed Properties\n\n /**\n * Get our current WebRTC streaming values.\n */\n @computed(\n 'args.{url,playbackStateController,token,janusGatewayUrl,iceServers,endToEndWebrtcConnectionInfo,isVirtualCamera,spsAndPpsRequired,visualVerificationRecord,coturnAddressesTuplets,deviceId,supportsAudioForProxyStream}'\n )\n get currentWebRtcStreamingValues(): WebRTCStreaming {\n const {\n url,\n playbackStateController,\n token,\n janusGatewayUrl,\n iceServers,\n endToEndWebrtcConnectionInfo,\n isVirtualCamera,\n spsAndPpsRequired,\n visualVerificationRecord,\n coturnAddressesTuplets,\n deviceId,\n supportsAudioForProxyStream\n } = this.args;\n\n return {\n url,\n playbackStateController,\n token,\n janusGatewayUrl,\n iceServers,\n endToEndWebrtcConnectionInfo,\n isVirtualCamera,\n spsAndPpsRequired,\n visualVerificationRecord,\n coturnAddressesTuplets,\n deviceId,\n supportsAudioForProxyStream\n };\n }\n\n // endregion\n\n // region Actions\n\n /**\n * Update videoTagCreated after the video tag element was added to the DOM and call handleStreamAttributeChange.\n */\n @action\n insertVideoTag(): void {\n this.videoTagCreated = true;\n\n this.handleStreamAttributeChange();\n }\n\n /**\n * Check if we added a state controller and create a cached object containing current WebRTC properties.\n * By creating cachedWebRtcProperties, we can tell if a required WebRTC streaming value changed\n * or if something else (like enableOverlay) was changed when updateWebRtcStreamingValues is called.\n * If a WebRTC property was changed, we will want to destroy and/or create a WebRTC stream.\n */\n @action\n checkStateControllerAndSetCachedWebRtcProperties(): void {\n const {\n playbackStateController,\n url,\n token,\n janusGatewayUrl,\n iceServers,\n endToEndWebrtcConnectionInfo,\n isVirtualCamera,\n spsAndPpsRequired,\n visualVerificationRecord,\n coturnAddressesTuplets,\n deviceId,\n supportsAudioForProxyStream\n } = this.args;\n\n if (playbackStateController) {\n connectToPlaybackStateController.call(this);\n }\n\n set(this, 'cachedWebRtcProperties', {\n url,\n playbackStateController,\n token,\n janusGatewayUrl,\n iceServers,\n endToEndWebrtcConnectionInfo,\n isVirtualCamera,\n spsAndPpsRequired,\n visualVerificationRecord,\n coturnAddressesTuplets,\n deviceId,\n supportsAudioForProxyStream\n });\n }\n\n /**\n * Check if any of the required webRtc streaming values changed by comparing the current values\n * to our previously-cached webRtc streaming values.\n * If a WebRTC streaming value changed, update the value cache and connect or disconnect the stream as needed.\n */\n @action\n updateWebRtcStreamingValues(): void {\n const { cachedWebRtcProperties, currentWebRtcStreamingValues } = this;\n\n if (\n Object.keys(currentWebRtcStreamingValues).some(\n (key: keyof WebRTCStreaming) => cachedWebRtcProperties[key] !== currentWebRtcStreamingValues[key]\n )\n ) {\n set(this, 'cachedWebRtcProperties', currentWebRtcStreamingValues);\n this.handleStreamAttributeChange();\n }\n }\n\n /**\n * Update the url and queryParam values (if changed) in AdcRtcPlayer (if created).\n * This is because playback streaming may change the url many times during one connection (whereas live view will not).\n */\n @action\n updateUrlProperties(): void {\n const { url, urlQueryParams } = this.args;\n\n this.adcRtcPlayer &&\n Object.assign(this.adcRtcPlayer, {\n url,\n urlQueryParams\n });\n }\n\n // endregion\n\n /**\n * Attempt to connect the WebRtc stream if we have all required streaming values and we haven't already attempted streaming.\n */\n private attemptToStartStream(): boolean {\n const {\n deviceId,\n url,\n token,\n janusGatewayUrl,\n iceServers,\n proxyWebrtcConnectionInfo,\n endToEndWebrtcConnectionInfo,\n urlQueryParams,\n isVirtualCamera,\n spsAndPpsRequired,\n visualVerificationRecord,\n coturnAddressesTuplets,\n forcedAspectRatio,\n mac,\n deviceModel,\n firmware,\n cameraDataUsageMode,\n supportsAudioForProxyStream,\n streamingType,\n streamTimeoutSeconds = DefaultProxyStreamTimeoutSeconds,\n playbackStateController,\n audioUpStreamUrl,\n onStreamConnected,\n videoPreloaderDetail\n } = this.args,\n { streamMaxTimeoutSeconds = DefaultMaxTimeoutSeconds, componentRenderedTime } = this;\n\n // If we have already created an AdcRtcPlayer object for streaming, don't create another and assume the current one is connected.\n if (this.adcRtcPlayer) {\n return false;\n }\n\n const logMessageToWavefrontWrapper = (message: string) => {\n this.logMessageToWavefrontTask.perform(message);\n };\n\n const playerId = getPlayerId(BaseVideoIdPrefix, deviceId),\n isEndToEnd = !!endToEndWebrtcConnectionInfo,\n webRtcProperties = {\n playerId,\n forcedAspectRatio,\n mac,\n deviceModel,\n firmware,\n cameraDataUsageMode,\n streamingType: streamingType || StreamingTypeLive,\n updateState: sendStateUpdate.bind(this),\n logMessageToWavefront: logMessageToWavefrontWrapper,\n upstreamLogger: this.args.upstreamLogger\n };\n\n const createEndToEndRtcPlayer = (): EndToEndRtcPlayer => {\n if (!endToEndWebrtcConnectionInfo) {\n throw new Error('endToEndWebrtcConnectionInfo should be defined.');\n }\n\n return new EndToEndRtcPlayer(this, {\n ...webRtcProperties,\n endToEndWebrtcConnectionInfo,\n streamLoadTimesObject: onStreamConnected\n ? new AdcWebrtcEndToEndStreamLoadTimes(componentRenderedTime, onStreamConnected, mac, deviceModel)\n : undefined\n });\n };\n\n const createProxyRtcPlayer = (): ProxyRtcPlayer => {\n if (!(url && token && janusGatewayUrl && iceServers)) {\n throw new Error('url && token && janusGatewayUrl && iceServers should be defined.');\n }\n\n return new ProxyRtcPlayer(this, {\n ...webRtcProperties,\n audioUpStreamUrl,\n webrtcProxyPlaybackStateController: playbackStateController as WebrtcProxyPlaybackStateController,\n url,\n token,\n janusGatewayUrl,\n iceServers,\n proxyWebrtcConnectionInfo,\n urlQueryParams,\n isVirtualCamera: isVirtualCamera ?? false,\n spsAndPpsRequired: spsAndPpsRequired ?? false,\n visualVerificationRecord,\n coturnAddressesTuplets,\n streamTimeoutSeconds,\n streamMaxTimeoutSeconds,\n supportsAudioForProxyStream: supportsAudioForProxyStream ?? false\n });\n };\n\n const getAdcRtcPlayer = (): BaseRtcPlayer => {\n if (videoPreloaderDetail) {\n const { rtcPlayer, isConnected, state } = videoPreloaderDetail;\n\n if (rtcPlayer && state) {\n this.args.updateState?.(state.eventName, playerId, state.args);\n\n if (isConnected) {\n videoPreloaderDetail.attachEventToVideoElement();\n }\n\n videoPreloaderDetail.attachUpdateState(sendStateUpdate.bind(this));\n\n rtcPlayer.sendPlayerCommand(END_TO_END_COMMAND_LOAD_MEDIA, {}, {});\n return rtcPlayer;\n }\n }\n return isEndToEnd ? createEndToEndRtcPlayer() : createProxyRtcPlayer();\n };\n\n const adcRtcPlayer = getAdcRtcPlayer();\n\n connectToPlaybackStateController.call(this);\n\n setProperties(this, {\n adcRtcPlayer,\n isEndToEnd,\n playerId\n });\n\n // Disconnect from Janus if the user navigates away from the site.\n // This covers page refreshes which willDestroyElement will not cover.\n const beforeUnloadEventListener = (): void => {\n // There is no info in the event input that helps determine if the page is refreshing vs a download is happening.\n // For now, we will have the caller tell us when to avoid disconnecting in that case.\n if (!this.args.isProcessingDownload) {\n this.disconnect(UserLeftPage);\n }\n };\n\n window.addEventListener('beforeunload', beforeUnloadEventListener);\n this.beforeUnloadEventListener = beforeUnloadEventListener;\n\n if (!videoPreloaderDetail) {\n adcRtcPlayer.startStream();\n }\n\n return true;\n }\n\n /**\n * Handle changes made to the stream attributes passed into the player.\n * Either connect the stream, disconnect the stream, or do nothing depending on the attributes in the component.\n *\n * Case 1: The video tag has not been created yet, so we do nothing.\n * Case 2: We have all streaming attributes, so we attempt to start a stream.\n * Case 3: We are missing one or more streaming attributes, so we disconnect the stream if connected.\n * Case 4: We were streaming WebRTC end-to-end but are now going proxy, so disconnect and restart the stream.\n */\n private handleStreamAttributeChange(): void {\n const { videoTagCreated, isEndToEnd } = this,\n { endToEndWebrtcConnectionInfo } = this.args;\n\n // We can't create the stream until the video tag has been created.\n if (!videoTagCreated) {\n return;\n }\n\n const haveAllProxyVariables = haveAllRequiredProxyVariables.call(this);\n\n // Do we have all required string streaming attributes? Attempt to stream if so, attempt to disconnect stream if not.\n // We must have all of the required proxy streaming attributes OR all of the end-to-end streaming attributes.\n if (!haveAllProxyVariables && !endToEndWebrtcConnectionInfo) {\n // If we are missing some stream values, we either need to disconnect the current stream if it exists.\n // We know a video stream is or was connected if the AdcRtcPlayer object exists.\n if (this.adcRtcPlayer) {\n this.disconnect(PlayEnded);\n }\n\n return;\n }\n\n // If we have all of the attributes, and we WERE end-to-end but are NOW streaming proxy, disconnect and then restart stream.\n if (isEndToEnd && !endToEndWebrtcConnectionInfo && haveAllProxyVariables) {\n this.disconnect(DisconnectingToAttemptProxy);\n }\n\n this.attemptToStartStream();\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n WebrtcPlayer: typeof WebrtcPlayer;\n }\n}\n","/**\n * File containing all possible disconnection reasons in the add-on.\n *\n * @module constants\n */\n\n// region General Errors\n\n/**\n * The player component was destroyed.\n * Often happens if someone navigates away from a page or the page otherwise stops displaying the player.\n */\nexport const PlayerDestroyed = 'Player Destroyed';\n\n/**\n * The player component was destroyed because someone navigated away or started to close a tab.\n */\nexport const UserLeftPage = 'User left page';\n\n/**\n * ICE negotiation failed.\n */\nexport const IceNegotiationFailed = 'ICE negotiation failed.';\n\n/**\n * We couldn't find a video tag to attach a stream to.\n */\nexport const FailedToAttach = 'Failed to attach WebRTC stream to video tag';\n\n/**\n * The auto-playing of the stream failed (can happen with some browsers that have strict security settings).\n */\nexport const AutoPlayFailed = 'Auto-play failed';\n\n/**\n * If the keepalive message has an error and the stream needs to disconnect.\n */\nexport const KeepaliveFailed = 'Keepalive failed';\n\n/**\n * If we changed some of the values we pass into the add-on player and now some values are missing.\n */\nexport const PlayEnded = 'Play ended';\n\n/**\n * We're disconnecting an e2e stream to attempt proxy (different values were passed in).\n */\nexport const DisconnectingToAttemptProxy = 'Disconnecting to attempt proxy';\n\n// endregion\n\n// region Proxy Errors\n\n/**\n * We received had a generic error that doesn't fit under other proxy failures.\n */\nexport const GenericProxyError = 'Error occurred with WebRTC proxy websocket connection';\n\n// endregion\n\n// region End-to-End Errors\n\n/**\n * The end-to-end websocket sent a message on ending the session.\n */\nexport const SessionStoppedByServer = 'Session stopped by server';\n\n/**\n * The camera's e2e module hasn't called into the websocket server yet,\n * or it isn't dialed into the server you're communicating with.\n */\nexport const CameraNotYetDialedIn = 'Camera has not yet dialed in';\n\n/**\n * The camera has disconnected for some reason.\n * There are many possibilities, such as a camera losing power.\n */\nexport const CameraHasDisconnected = 'Camera has disconnected';\n\n/**\n * The websocket closed from either end, or we failed to send a message to a closed websocket.\n */\nexport const WebsocketClosed = 'Websocket closed';\n\n/**\n * Visual Verification and Escalated Events are two stream cases where we\n * purposefully disconnect an e2e stream that otherwise might continue.\n */\nexport const DisconnectedRecordedVVEEStream = 'Disconnected recorded VV/EE stream at stream length cap.';\n\n/**\n * Enum describing the reason a direct OE connection failed.\n */\nexport enum OeDirectFailureReasonEnum {\n Unknown,\n Success,\n WebrtcNotAllowed,\n WebrtcFailed,\n NoStreamAvailable,\n ConnectedButFailed\n}\n\n/**\n * Enum describing the reason a websocket OE connection failed.\n */\nexport enum OeRelayFailureReasonEnum {\n Unknown,\n Success,\n WebsocketFailed,\n NoStreamAvailable,\n ConnectedButFailed\n}\n\n/**\n * When a camera is in low data mode, we add a timeout to lower the potential data usage if otherwise left playing.\n */\nexport const DisconnectedCellConnectorConnectedCamera = 'Disconnected camera in low data mode at stream length cap.';\n\n// endregion\n\n// Notably not in this document (because they have variables baked in):\n// - General WebRTC\n// - Stream froze for X seconds (usually 10s) - The stream stopped receiving frames for a long-enough time.\n// - Proxy streams\n// --- Error trickling ICE: [error] - We failed to send an ICE message from our end\n// --- Error negotiating offer: [error]\n// --- Error connecting to Janus: [error] - This is a generic connection message\n// --- Proxy can also receive other generic websocket errors\n// - End-to-End streams\n// --- Stream stuck at X% after Y seconds - We disconnect e2e streams so we can attempt proxy if they aren't working.\n// --- End-to-end error received: [error] - This is customizable, comes from the server.\n// --- WebRTC end-to-end websocket connection error [error]\n// --- Cannot parse websocket message: [message] - We couldn't parse a json message.\n","/**\n * File containing various generic const values.\n *\n * @module constants\n */\n\nexport type RTCStatsForLogging =\n | typeof CandidatePair\n | typeof RemoteCandidate\n | typeof LocalCandidate\n | typeof InboundRtp\n | typeof OutboundRtp;\n\n/**\n * Various console log types.\n */\nexport const ConsoleDebug = 'debug',\n ConsoleWarn = 'warn',\n ConsoleError = 'error';\n\n/**\n * One minute in ms.\n */\nexport const OneMinuteMs = 60000;\n\n/**\n * Different message types we can receive through the proxy websocket connection.\n */\nexport const MessageTypeEvent = 'event',\n MessageTypeSlowLink = 'slowlink';\n\n/**\n * The default proxy stream timeout, set to 3 minutes.\n */\nexport const DefaultProxyStreamTimeoutSeconds = 180;\n\n/**\n * The default max timeout, set to 15 minutes.\n */\nexport const DefaultMaxTimeoutSeconds = 900;\n\n/**\n * WebRTC proxy variables for whether a stream is a live stream or a playback stream.\n */\nexport const StreamingTypeLive = 'Live',\n StreamingTypePlayback = 'Playback';\n\n// region PeerConnection getStats types.\n\n/**\n * String key for the transport stats.\n */\nexport const Transport = 'transport';\n\n/**\n * String key for the candidate-pair peerConnection stats.\n */\nexport const CandidatePair = 'candidate-pair';\n\n/**\n * String key for the remote-candidate peerConnection stats.\n */\nexport const RemoteCandidate = 'remote-candidate';\n\n/**\n * String key for the local-candidate peerConnection stats.\n */\nexport const LocalCandidate = 'local-candidate';\n\n/**\n * String key for the inbound-rtp peerConnection stats.\n */\nexport const InboundRtp = 'inbound-rtp';\n\n/**\n * String key for the outbound-rtp peerConnection stats.\n */\nexport const OutboundRtp = 'outbound-rtp';\n\n// endregion\n\n// region PeerConnection Stat and Track types\n\n/**\n * Video named property, used for things like PeerConnection stats or tracks.\n */\nexport const Video = 'video';\n\n/**\n * Audio named property, used for things like PeerConnection stats or tracks.\n */\nexport const Audio = 'audio';\n\n// endregion\n","/**\n * File containing different messages the video player can send.\n *\n * @module constants\n */\n\n// region Messages About Player States\n\n/**\n * State for when the AdcRtcPlayer has been initialized but has not started playing.\n */\nexport const Initializing = 'initializing';\n\n/**\n * State for when the AdcRtcPlayer is connecting to the streamer.\n */\nexport const Connecting = 'connecting';\n\n/**\n * State for when the AdcRtcPlayer is currently streaming video.\n */\nexport const Playing = 'playing';\n\n/**\n * State for when the AdcRtcPlayer is connected but video is paused.\n */\nexport const Paused = 'paused';\n\n/**\n * State for when the AdcRtcPlayer failed to connect.\n */\nexport const FailedToConnect = 'failedToConnect';\n\n/**\n * State for when the AdcRtcPlayer disconnected.\n */\nexport const Disconnected = 'disconnected';\n\n/**\n * State for when the AdcRtcPlayer has disconnected due to a proxy timeout.\n */\nexport const TimedOut = 'timeout';\n\n/**\n * State for when the player experienced an error.\n */\nexport const Error = 'error';\n\n/**\n * The WebRTC player failed to play because autoplay was disabled on the user's browser.\n */\nexport const AutoplayFailure = 'autoplayFailure';\n\n/**\n * The WebRTC player failed its ICE negotiation process, thus failed to connect the video feed.\n * This may require a fix such as requesting microphone permissions to get more networking data before restarting.\n */\nexport const IceFailure = 'iceFailure';\n\n/**\n * Is the stream frozen but not disconnected?\n */\nexport const Frozen = 'frozen';\n\n/**\n * Is this stream attempting to connect but experiencing a poor connection?\n */\nexport const PoorStartingConnection = 'poorStartingConnection';\n\n/**\n * Have we detected that the camera speaker may already be in use for this camera?\n * This may be the case if there are 2+ people attempting to stream from the same camera at one time.\n */\nexport const CameraSpeakerAlreadyInUse = 'cameraSpeakerAlreadyInUse';\n\n// endregion\n\n// region Other Messages\n\n/**\n * Message type for when we are sending WebRTC connection info up.\n */\nexport const Log = 'log';\n\n/**\n * Message type for when we are sending OSD time and stats up.\n */\nexport const UpdateOsd = 'updateOsd';\n\n// endregion\n\n// region OpenEye player states\n\n/**\n * OE stream state types.\n */\nexport enum OeStateType {\n Idle = 'Idle',\n MediaPresent = 'MediaPresent',\n NoMediaPresent = 'NoMediaPresent',\n Starting = 'Starting',\n Error = 'Error'\n}\n\n/**\n * OE stream types.\n */\nexport enum OeStreamTransportType {\n None = 'None',\n WebRTC = 'WebRTC',\n WebSocket = 'WebSocket'\n}\n\n/**\n * OE stream states.\n */\nexport enum OeStreamTransportState {\n Idle = 'Idle',\n Connecting = 'Connecting',\n Connected = 'Connected',\n Closed = 'Closed',\n Timeout = 'Timeout',\n Error = 'Error'\n}\n\nexport type PlayerMessage =\n | typeof Initializing\n | typeof Connecting\n | typeof Playing\n | typeof Paused\n | typeof FailedToConnect\n | typeof Disconnected\n | typeof TimedOut\n | typeof Error\n | typeof AutoplayFailure\n | typeof IceFailure\n | typeof Frozen\n | typeof PoorStartingConnection\n | typeof CameraSpeakerAlreadyInUse\n | typeof Log\n | typeof UpdateOsd\n | OeStateType\n | OeStreamTransportType;\n","/**\n * File containing Wavefront message strings and URLs.\n *\n * @module constants\n */\n\n// region WebRTC Generic\n/**\n * The url to use for reporting WebRTC messages to Wavefront through WebAPI.\n */\nexport const WebRTCWaveFrontApiEndpoint = 'video/streamLogs/webrtcStreamLogs/reportWebRtcMessageToWaveFront';\n\n/**\n * Wavefront message for ICE negotiation failures.\n */\nexport const WavefrontWebrtcIceFailed = 'IceNegotiationFailed';\n\n/**\n * Wavefront message for WebRTC connections using TURN instead of STUN for streaming.\n */\nexport const WavefrontWebrtcUsedTurn = 'UsedTurnServer';\n\n// endregion\n\n// region WebRTC Proxy\n\n/**\n * Wavefront message when WebRTC proxy fails to open the websocket on port 8989.\n * (This happens first before attempting port 443.)\n */\nexport const WavefrontProxyWebsocketFailed8989 = 'WebsocketFailed8989';\n\n/**\n * Wavefront message when WebRTC proxy fails to open the websocket on port 443.\n * (This happens second after attempting port 8989.)\n */\nexport const WavefrontProxyWebsocketFailed = 'WebsocketFailed';\n\n// endregion\n\n// region WebRTC End-to-End\n\n/**\n * Wavefront message when a WebRTC End-to-End camera has not yet dialed into the requested signalling server.\n */\nexport const WavefrontEndToEndNotDialedIn = 'CameraNotDialedIn';\n\n// endregion\n\n// region Openeye\n\nexport const BaseOeStreamLogsApiUrl = 'video/streamLogs/oeStreamLogs';\n\n// endregion\n","/**\n * Indicates what level of data-saving restrictions should be imposed on a camera.\n */\nenum DataUsageModeEnum {\n None = 0,\n LowDataMode = 1,\n CriticalDataMode = 2\n}\n\nexport default DataUsageModeEnum;\n","/**\n * This enum describes whether or audio was used during WebRTC streaming.\n */\nexport enum WebrtcAudioStatus {\n Unknown = 0,\n OnlyReceivedAudio = 1 << 0, // 1\n SentAndReceivedAudio = 1 << 1, // 2\n FailedToConnect = 1 << 2, // 4\n NoAudioOverProxySupport = 1 << 3, // 8\n NoCameraSupport = 1 << 4, // 16\n CameraAudioDisabled = 1 << 5, // 32\n NoCustomerPermission = 1 << 6, // 64\n NoOperatorPermission = 1 << 7, // 128\n UsingLoginAsLogin = 1 << 8 // 256\n}\n","import { FisheyeMode, FisheyeMountType, type FisheyeInfo } from '@oecommon/oscar-js';\n\nimport type OespPlaybackStateController from '../classes/state-controllers/oesp-playback-state-controller.ts';\n\n/**\n * An object containing all of the device's dewarp parameters and user's fisheye settings.\n * Should match our customer site's Ember data record of 'video/dewarp-config'\n */\nexport interface DewarpConfigRecord {\n // TODO(VID-67697): Use FisheyeMountTypeEnum from customer-site instead of number\n mountType: number;\n mountAngle: number;\n centerX: number;\n centerY: number;\n height: number;\n width: number;\n focalLength: number;\n lastMode: FisheyeMode;\n lastPan: number | null;\n lastTilt: number | null;\n lastFov: number | null;\n}\n\n/**\n * An object containing all of the device's dewarp parameters. Used by device's /api/cameras endpoint.\n */\nexport type DewarpParameters = {\n mount: typeof DewarpParametersCeilingMountType | typeof DewarpParametersWallMountType;\n mountAngle: number;\n centerX: number;\n centerY: number;\n height: number;\n width: number;\n focalLength: number;\n};\n\nexport type CoordinateProps = {\n x: number;\n y: number;\n};\n\ntype PanTiltParams = {\n pan: number;\n tilt: number;\n};\n\n/**\n * The expected string for a ceiling mount type in a camera's dewarpParameters.\n */\nconst DewarpParametersCeilingMountType = 'ceiling';\n\n/**\n * The expected string for a wall mount type in a camera's dewarpParameters.\n */\nconst DewarpParametersWallMountType = 'wall';\n\n/**\n * Gets the latest fisheye view settings.\n */\nexport function getFisheyeSettings(\n apexId: string,\n oespPlaybackStateController: OespPlaybackStateController\n): Partial<DewarpConfigRecord> {\n const fisheyeMode = oespPlaybackStateController.fisheyeModes.get(apexId);\n if (fisheyeMode === undefined) {\n return {};\n }\n\n const newProps: Partial<DewarpConfigRecord> = { lastMode: fisheyeMode };\n if (fisheyeMode === FisheyeMode.Ptz) {\n const fisheyePanTiltZoom = oespPlaybackStateController.getFisheyePanTiltZoomForApexId(apexId);\n if (fisheyePanTiltZoom) {\n newProps.lastPan = fisheyePanTiltZoom.fisheyePanTilt.pan;\n newProps.lastTilt = fisheyePanTiltZoom.fisheyePanTilt.tilt;\n newProps.lastFov = fisheyePanTiltZoom.fisheyeFieldOfView;\n }\n }\n\n return newProps;\n}\n\n/**\n * Converts our dewarpParameters's mount type to the DewarpConfig's mount type.\n */\nexport function transformDewarpParametersMountTypeToDewarpConfigMountType(\n type: typeof DewarpParametersCeilingMountType | typeof DewarpParametersWallMountType\n): 0 | 1 {\n // TODO(VID-67697): Use FisheyeMountTypeEnum from customer-site\n switch (type) {\n case DewarpParametersCeilingMountType:\n return 0;\n case DewarpParametersWallMountType:\n return 1;\n default:\n return 0;\n }\n}\n\n/**\n * Converts our dewarp config's mount type to oscar-js' FisheyeMountType.\n */\nfunction transformDewarpConfigMountType(type: number): FisheyeMountType {\n switch (type) {\n case 0:\n return FisheyeMountType.Ceiling;\n case 1:\n return FisheyeMountType.Wall;\n default:\n return FisheyeMountType.Ceiling;\n }\n}\n\n/**\n * Generates FisheyeInfo for a given dewarp config.\n */\nexport function generateFisheyeInfoFromDewarpConfig(dewarpConfig: DewarpConfigRecord): FisheyeInfo {\n return {\n mount: {\n // Typically type of 0 and angle of 0\n type: transformDewarpConfigMountType(dewarpConfig.mountType),\n angle: dewarpConfig.mountAngle\n },\n geometry: {\n size: {\n // The height and width of some resolution (any resolution) in pixels\n height: dewarpConfig.height,\n width: dewarpConfig.width\n },\n center: {\n // The center of the provided resolution (typically .5 x height, .5 x width)\n x: dewarpConfig.centerX,\n y: dewarpConfig.centerY\n },\n // Calculated as height * diameter / Math.PI (resolution height, diameter typically 1.1)\n focalLength: dewarpConfig.focalLength\n }\n };\n}\n\nexport function getPanTiltParams(position: CoordinateProps, controlRect: DOMRect): PanTiltParams {\n const { width, height } = controlRect,\n center = { x: width / 2, y: height / 2 },\n scale = Math.min(center.x, center.y);\n\n let pan = (position.x - center.x) / scale,\n tilt = (center.y - position.y) / scale;\n\n // If almost horizontal or almost vertical, snap to exactly horizontal or vertical\n if (Math.abs(pan) > Math.abs(tilt) * 8) {\n tilt = 0;\n }\n\n if (Math.abs(tilt) > Math.abs(pan) * 8) {\n pan = 0;\n }\n\n // Constrain x and y to 1.0, but preserve the angle of the vector they form\n const max = Math.max(Math.abs(pan), Math.abs(tilt));\n\n if (max > 1.0) {\n pan /= max;\n tilt /= max;\n }\n\n return adjustPanTiltScale(pan, tilt);\n}\n\nfunction adjustPanTiltScale(pan: number, tilt: number): PanTiltParams {\n // Convert to polar co-ordinates\n let r = Math.sqrt(pan * pan + tilt * tilt);\n const theta = Math.atan2(tilt, pan);\n\n // Square the radius to make the speed change more slowly near the center\n r *= r;\n\n return {\n pan: r * Math.cos(theta),\n tilt: r * Math.sin(theta)\n };\n}\n","import { CodecType } from '@oecommon/oscar-js';\nimport { TimeDefs } from '@oecommon/plasma-js';\n\nimport type { Instant } from '@oecommon/plasma-js';\n\n// Values for formatting bitrate\nconst Kilo = 1024;\nconst Mega = 1024 * 1024;\n\n// The number of trailing digits after the decimal point.\nconst RATE_PRECISION = 2;\n\ninterface StreamStatus {\n videoCodec?: CodecType;\n videoResolution: {\n width: number;\n height: number;\n };\n frameRate?: number;\n bitRate?: number;\n}\n\n/**\n * Converts an Instant (from @oecommon/plasma-js) to seconds.\n */\nexport function convertInstantToSeconds(instant: Instant): number {\n return Math.floor(instant.value / TimeDefs.TimeUnitsPerSecond);\n}\n\n/**\n * Takes in streamStats and returns the formatted resolution.\n */\nexport function formatResolution(streamStats: StreamStatus): string | null {\n if (!streamStats?.videoCodec) {\n return null;\n }\n\n return `${streamStats.videoResolution.width} x ${streamStats.videoResolution.height}`;\n}\n\n/**\n * Takes in streamStats and returns the formatted video codec.\n */\nexport function formatVideoCodec(streamStats: StreamStatus): string | null {\n if (!streamStats?.videoCodec) {\n return null;\n }\n\n switch (streamStats.videoCodec) {\n case CodecType.Mjpeg:\n return 'M-JPEG';\n case CodecType.Mpeg4:\n return 'MPEG-4';\n case CodecType.H264:\n return 'H.264';\n default:\n return null;\n }\n}\n\n/**\n * Takes in streamStats and returns the formatted framerate.\n */\nexport function formatFrameRate(streamStats: StreamStatus): string | null {\n if (!streamStats?.frameRate) {\n return null;\n }\n\n return streamStats.frameRate.toFixed(RATE_PRECISION) + ' fps';\n}\n\n/**\n * Takes in streamStats and returns the formatted bitrate.\n */\nexport function formatBitRate(streamStats: StreamStatus): string | null {\n if (!streamStats?.bitRate) {\n return null;\n }\n\n const { bitRate } = streamStats;\n\n if (bitRate >= Mega) {\n return `${(bitRate / Mega).toFixed(RATE_PRECISION)} Mbps`;\n } else if (bitRate >= Kilo) {\n return `${(bitRate / Kilo).toFixed(RATE_PRECISION)} Kbps`;\n } else {\n return `${bitRate.toFixed(RATE_PRECISION)} bps`;\n }\n}\n","export const ColumnItemSeparator = ',',\n RowSeparator = '\\n';\n\nexport enum AdcWebrtcEndToEndStreamLoadTimeStates {\n CreatedWebrtcPlayer = 1, // TODO VID-79606 move to generic enum to share with proxy\n CreatedRtcClass,\n RequestOpenWebsocket,\n WebsocketOpened,\n SendHello,\n ReceiveHello,\n SentSessionStart,\n ReceiveSessionStart,\n CreatePeerConnection,\n ReceiveSdp,\n AttachTrack, // TODO VID-79606 move to generic enum to share with proxy\n SetRemoteSdp,\n CreatedAnswerSdp,\n SetAnswerSdp,\n SentAnswerSdp,\n IceCompleted,\n PlayStarted = 99 // TODO VID-79606 move to generic enum to share with proxy\n}\n\n/**\n * Converts a typescript enum to an Excel row of headers. Enum names are separated by tabs.\n *\n * @param enumObj An enum object, here intended for AdcWebrtcEndToEndStreamLoadTimeStates\n */\nfunction enumToExcelHeader(enumObj: typeof AdcWebrtcEndToEndStreamLoadTimeStates): string {\n const keys = Object.keys(enumObj);\n let header = '';\n\n keys.forEach((key) => {\n if (isNaN(Number(key))) {\n header += `${key}${ColumnItemSeparator}`;\n }\n });\n\n return header;\n}\n\n/**\n * @returns Excel header for the ADC WebRTC e2e timing metrics.\n */\nexport function webrtcEndToEndTimingsExcelHeader(): string {\n return `Mac${ColumnItemSeparator}Model${ColumnItemSeparator}CandidatePair${ColumnItemSeparator}${enumToExcelHeader(\n AdcWebrtcEndToEndStreamLoadTimeStates\n )}FullTime${RowSeparator}`;\n}\n\n/**\n * A base class for tracking and storing stream load time measurements at different parts of the ADC WebRTC loading process.\n */\nexport class AdcWebrtcBaseStreamLoadTimes<T extends AdcWebrtcEndToEndStreamLoadTimeStates> {\n /**\n * Callback method for when the video stream has fully connected, so we can report\n * stream load time metrics back up.\n */\n onStreamConnected: (stringExcelResults: string) => void;\n\n /**\n * The mac of the camera.\n */\n mac?: string;\n\n /**\n * The model of the camera.\n */\n model?: string;\n\n /**\n * The candidate pair type from the successful stream.\n */\n candidatePairTypes?: string;\n\n /**\n * An object containing all of the stream load states and when they occurred during the connection.\n */\n timings: { [id in T]?: number } = {};\n\n /**\n * @param componentRenderedTime The time at which the stream was fully created.\n * @param onStreamConnected Callback method when stream is complete, to report results.\n * @param mac The camera's mac.\n * @param model The camera's device model.\n *\n * @note We don't do Date.now() because we call this when webrtc-player is created,\n * which happens before we know if this stream is ADC end-to-end or proxy.\n */\n constructor(\n _componentRenderedTime: number,\n onStreamConnected: (stringExcelResults: string) => void,\n mac?: string,\n model?: string\n ) {\n this.onStreamConnected = onStreamConnected;\n this.mac = mac;\n this.model = model;\n }\n\n /**\n * When an enum timing event occurs, add it to the timings array with the current time.\n *\n * @param state The enum state that occurred.\n */\n addTiming(state: T): void {\n this.timings[state] = Date.now();\n }\n\n /**\n * Converts the array of timings to a row that can be copied to Excel.\n * Converts the timings from raw Date.now() values to times since the WebRTC player was created,\n * so a tester can see how long it took for certain states to occur.\n */\n timingsToExcelRow(): string {\n const { timings, mac, model, candidatePairTypes } = this;\n\n const webrtcPlayerRendered = timings[AdcWebrtcEndToEndStreamLoadTimeStates.CreatedWebrtcPlayer as T];\n if (!webrtcPlayerRendered) {\n return '';\n }\n\n let timeAtLastState = webrtcPlayerRendered;\n const arrayValues: number[] = [],\n startingTime = timeAtLastState;\n Object.keys(timings).forEach((key) => {\n const keyToEnum = Number.parseInt(key) as T;\n const timeAtCurrentState: number | undefined = timings[keyToEnum],\n // Generate each value with a number that is time since video connection started.\n valueToPush: number = timeAtCurrentState ? timeAtCurrentState - timeAtLastState : -1;\n arrayValues.push(valueToPush);\n\n if (timeAtCurrentState) {\n timeAtLastState = timeAtCurrentState;\n }\n });\n\n // Push a final value for the total time for the stream to load.\n arrayValues.push(timeAtLastState - startingTime);\n\n return `${mac}${ColumnItemSeparator}${model}${ColumnItemSeparator}${candidatePairTypes}${ColumnItemSeparator}${arrayValues.join(\n ColumnItemSeparator\n )}${RowSeparator}`;\n }\n\n /**\n * Method to call when the stream is playing. Sends stringified timing results to callback method.\n */\n streamPlaying(selectedCandidatePairTypes?: string): void {\n this.candidatePairTypes = selectedCandidatePairTypes;\n this.onStreamConnected(this.timingsToExcelRow());\n }\n}\n\n/**\n * An extension of the base stream load time class, set to work for ADC end-to-end streams.\n */\nexport class AdcWebrtcEndToEndStreamLoadTimes extends AdcWebrtcBaseStreamLoadTimes<AdcWebrtcEndToEndStreamLoadTimeStates> {\n constructor(\n componentRenderedTime: number,\n onStreamConnected: (stringExcelResults: string) => void,\n mac?: string,\n model?: string\n ) {\n super(componentRenderedTime, onStreamConnected, mac, model);\n\n this.timings[AdcWebrtcEndToEndStreamLoadTimeStates.CreatedWebrtcPlayer] = componentRenderedTime;\n }\n}\n","import { POST } from '@adc/ajax/services/adc-ajax';\nimport { WebRTCWaveFrontApiEndpoint } from '../constants/wavefront.ts';\n\nimport type AjaxService from '@adc/ajax/services/adc-ajax';\nimport type Store from '@ember-data/store';\n\n/**\n * Types of wavefront messages to send to clippy.\n */\nexport enum WaveFrontClippyMessage {\n successOnStart = 'SuccessOnStart',\n failureOnStart = 'FailureOnStart',\n failedToUploadFragment = 'FailedToUploadFragment'\n}\n\n/**\n * API request to report clippy upload stats to Wavefront.\n */\nexport function reportClippyMessageToWavefront(ajax: AjaxService, message: WaveFrontClippyMessage): void {\n ajax.apiRequest('video/videoSources/liveVideoSources/reportClippyMessageToWavefront', undefined, message, POST);\n}\n/**\n * Logs a message to Wavefront.\n */\nexport function logMessageToWavefront(\n ajax: AjaxService,\n store: Store,\n isEndToEnd: boolean | undefined,\n isVirtualCamera: boolean | undefined,\n message: string\n): void {\n const isProxy = !isEndToEnd,\n report = store.createRecord('video/stream-logs/webrtc-wavefront-report-message', {\n message,\n isProxy,\n isVirtualCamera\n });\n\n ajax.apiRequest(WebRTCWaveFrontApiEndpoint, undefined, report, POST);\n}\n","import {\n CandidatePair,\n RemoteCandidate,\n LocalCandidate,\n InboundRtp,\n OutboundRtp,\n Transport,\n type RTCStatsForLogging\n} from '../constants/generic.ts';\n\nimport type { RTCIceCandidateStats } from '../types.ts';\n\n/**\n * Const for ICE candidate types, states, and properties.\n */\nexport const IceCandidateTypeHost = 'host',\n IceCandidateTypeSrflx = 'srflx',\n IceCandidateTypePrflx = 'prflx',\n IceCandidateTypeRelay = 'relay',\n IceStateFailed = 'failed',\n IceCandidateTypeUdp = 'udp';\n\n/**\n * Utility file containing WebRTC helper methods.\n * @module\n */\n\n/**\n * Get the selected candidate pair from the current connection based on getStats properties.\n * Different browsers have different WebRTC implementations, so we attempt two options here.\n *\n * @param candidatePairs All candidate pairs we've gotten from the peerConnection's getStats call.\n * @param rtcTransportObject The transport object we've gotten from the peerConnection's getStats call.\n */\nexport function getSelectedCandidatePair(\n candidatePairs: RTCIceCandidatePairStats[],\n rtcTransportObject?: RTCTransportStats\n): RTCIceCandidatePairStats | undefined {\n if (!candidatePairs?.length) {\n return undefined;\n }\n\n // Different browsers support different ways of finding the selected candidate, so we'll try multiple.\n\n // First see if we got an RTCTransport object from getStats.\n const selectedCandidatePairId = rtcTransportObject?.selectedCandidatePairId;\n if (selectedCandidatePairId) {\n return candidatePairs.find((candidatePair) => candidatePair.id === selectedCandidatePairId);\n }\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore Firefox browsers have a non-standard selected property.\n const browserSupportsSelectedProperty = candidatePairs[0].selected !== undefined;\n if (browserSupportsSelectedProperty) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore Firefox browsers have a non-standard selected property.\n return candidatePairs.find((candidatePair) => candidatePair.selected === true);\n }\n\n // If neither of these work, we likely need to add further browser support. Return undefined for now.\n return undefined;\n}\n\n/**\n * Is this an RtcStatsReport object we want to send to the server for logging?\n * We base this off of the RtcStatsReport type in the object.\n *\n * @param rtcStatsObject An object containing WebRTC statistics, gotten from an RtcStatsReport object.\n */\nexport function isStatsTypeForLogging(rtcStatsObject: { type: string }): boolean {\n const statsTypesForLogging = new Set([CandidatePair, RemoteCandidate, LocalCandidate, InboundRtp, OutboundRtp]);\n return statsTypesForLogging.has(rtcStatsObject.type);\n}\n\ninterface SavedPeerConnectionStats {\n 'candidate-pair'?: RTCIceCandidatePairStats[];\n 'remote-candidate'?: localRemoteCandidateStats[];\n 'local-candidate'?: localRemoteCandidateStats[];\n 'inbound-rtp'?: RTCInboundRtpStreamStats[];\n 'outbound-rtp'?: RTCStats[];\n}\n\ninterface localRemoteCandidateStats extends RTCStats {\n address: string;\n candidateType:\n | typeof IceCandidateTypeHost\n | typeof IceCandidateTypeSrflx\n | typeof IceCandidateTypePrflx\n | typeof IceCandidateTypeRelay;\n foundation: string;\n ip: string;\n isRemote: boolean;\n networkType: string;\n port: number;\n priority: number;\n protocol: string;\n transportId: string;\n usernameFragment: string;\n}\n\n/**\n * Parses RTCStatsReport and converts it into readable stats.\n * An example would be 'host-host' or 'srflx-srflx' for the selectedIceCandidateTypes.\n */\nexport function parseWebRTCStatsReport(reports: RTCStatsReport): {\n selectedCandidatePairTypes?: string;\n selectedCandidatePair: { local?: RTCIceCandidateStats; remote?: RTCIceCandidateStats };\n usedTurn?: boolean;\n webRtcStats: string;\n localCandidates: RTCIceCandidateStats[];\n remoteCandidates: RTCIceCandidateStats[];\n candidatePairs: RTCIceCandidatePairStats[];\n} {\n const localCandidateStatsDictionary: Record<string, RTCIceCandidateStats> = {},\n remoteCandidateStatsDictionary: Record<string, RTCIceCandidateStats> = {},\n webRtcStats: SavedPeerConnectionStats = {},\n candidatePairs: RTCIceCandidatePairStats[] = [];\n\n let rtcTransportStats: RTCTransportStats | undefined;\n\n reports.forEach((report) => {\n if (isStatsTypeForLogging(report)) {\n const reportType: RTCStatsForLogging = report.type;\n\n if (!webRtcStats[reportType]) {\n webRtcStats[reportType] = [];\n }\n\n webRtcStats[reportType]?.push(report);\n }\n\n switch (report.type) {\n case Transport: {\n rtcTransportStats = report;\n break;\n }\n case CandidatePair: {\n candidatePairs.push(report);\n break;\n }\n case LocalCandidate: {\n localCandidateStatsDictionary[report.id] = report;\n break;\n }\n case RemoteCandidate: {\n remoteCandidateStatsDictionary[report.id] = report;\n break;\n }\n }\n });\n\n const selectedCandidatePairStats = getSelectedCandidatePair(candidatePairs, rtcTransportStats);\n\n let selectedCandidatePairTypes = '',\n usedTurn = false,\n selectedLocalCandidate,\n selectedRemoteCandidate;\n\n if (selectedCandidatePairStats) {\n const selectedLocalCandidate = localCandidateStatsDictionary[selectedCandidatePairStats.localCandidateId],\n selectedRemoteCandidate = remoteCandidateStatsDictionary[selectedCandidatePairStats.remoteCandidateId];\n\n if (selectedLocalCandidate && selectedRemoteCandidate) {\n const localType = selectedLocalCandidate.candidateType,\n remoteType = selectedRemoteCandidate.candidateType;\n\n selectedCandidatePairTypes = `${localType}-${remoteType}`;\n usedTurn = localType === IceCandidateTypeRelay || remoteType === IceCandidateTypeRelay;\n }\n }\n\n const localCandidates = Object.values(localCandidateStatsDictionary),\n remoteCandidates = Object.values(remoteCandidateStatsDictionary);\n\n return {\n selectedCandidatePairTypes,\n selectedCandidatePair: { local: selectedLocalCandidate, remote: selectedRemoteCandidate },\n usedTurn,\n webRtcStats: JSON.stringify(webRtcStats),\n localCandidates,\n remoteCandidates,\n candidatePairs\n };\n}\n","import { tracked } from '@glimmer/tracking';\nimport { assert } from '@ember/debug';\nimport { get, set } from '@ember/object';\nimport Service from '@ember/service';\n\n/**\n * @classdesc Service for storing application data\n */\nexport default class LocalStateService extends Service {\n /**\n * The number of property changes made via the service.\n */\n @tracked numChanges = 0;\n\n /**\n * Override Ember.Object.Set in order to increment the numChanges property\n */\n set<K extends keyof this>(key: K, value: this[K]) {\n super.set(key, value);\n this.numChanges++;\n }\n\n /**\n * Saves data to the service\n */\n save(saveLocation: string, data: any): void {\n assert('[@adc/wizard] You must provide a saveLocation and data to save', arguments.length >= 2);\n\n // If its a POJO, we save each individual property so we don't blow away any existing properties\n // that aren't provided. We only do this one level deep so nested properties could still be lost.\n if (typeof data === 'object' && !Array.isArray(data) && data !== null) {\n Object.keys(data).forEach((key) => this.setAndCreate(`${saveLocation}.${key}`, data[key]));\n return;\n }\n\n // Default\n this.setAndCreate(saveLocation, data);\n }\n\n private setAndCreate(pathToSet: string, value: any): void {\n // Ember used to ignore leading '.', but its handled differently now. If we get a leading '.' (eg. '.foobar')\n // we treat it the same as 'foobar'.\n pathToSet = pathToSet[0] === '.' ? pathToSet.substring(1) : pathToSet;\n\n // Split the path and remove the last item. It is the value we are setting and not part of the path we need to create.\n const keys = pathToSet.split('.').slice(0, -1);\n\n // We move down the path and create any undefined objects. If its defined and not an ember object we log an error.\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n let nestedLevel: any = this;\n const success = keys.every((key) => {\n // We can't call get w/ an empty string.\n const currentProp = key.length ? get(nestedLevel, key) : this;\n // If undefined, set it as an object.\n if (currentProp === undefined) {\n set(nestedLevel, key, {});\n nestedLevel = get(nestedLevel, key);\n return true;\n }\n\n // If its already an ember object, we move down the path\n if (typeof currentProp === 'object' && currentProp !== null && !Array.isArray(currentProp)) {\n nestedLevel = currentProp;\n\n // Make sure it has the get method. If not it is a POJO and we need to wrap in an Ember object.\n if (!nestedLevel.get) {\n nestedLevel = { ...nestedLevel };\n }\n\n return true;\n }\n\n // If we got here, then we are trying to set a value as a property of a primitive (eg. state.\"some string\".foo = bar\n return false;\n });\n\n if (success) {\n // eslint-disable-next-line ember/classic-decorator-no-classic-methods\n this.set(pathToSet as keyof this, value);\n } else {\n console.error(`Error saving key=${pathToSet}. The path attempts to overwrite a primitive value.`);\n }\n }\n}\n","import { registerDestructor } from '@ember/destroyable';\nimport Evented from '@ember/object/evented';\nimport Service from '@ember/service';\n\nimport type PlaceholderItemComponent from '../components/wizard-items/placeholder-item';\nimport type { RequestResponse } from '../types';\n\n/**\n * @classdesc Service for distributing response for placeholder\n */\nexport default class PlaceholderService extends Service.extend(Evented) {\n /**\n * A hash which contains all subscribed placeholders.\n */\n subscriptionTargets: Record<string, PlaceholderItemComponent> = {};\n\n /**\n * Subscribe placeholderItem for waiting the responseItems.\n */\n subscribe(placeholderItem: PlaceholderItemComponent): void {\n const subs = this.subscriptionTargets,\n { placeholderKey } = placeholderItem;\n\n // Check if the item key already exists in our subscriptions. This error shouldn't occur.\n if (subs[placeholderKey]) {\n console.error(`There is already a placeholder with key=${placeholderKey}. It is being overwritten.`);\n }\n\n subs[placeholderKey] = placeholderItem;\n\n registerDestructor(placeholderItem, () => {\n this.unsubscribe(subs[placeholderKey]);\n });\n }\n\n /**\n * Trigger update to the placeholder\n */\n update(response: RequestResponse, targetPlaceholderKey: string): void {\n if (!targetPlaceholderKey) {\n return;\n }\n\n const sub = this.subscriptionTargets[targetPlaceholderKey];\n if (!sub) {\n console.warn(\n `Placeholder w/ the key=${targetPlaceholderKey} could not be found. This may be OK if response is not to be posted to the UI.`\n );\n return;\n }\n\n sub.updatePlaceholder(response);\n }\n\n /**\n * Unsubscribe placeholderItem to avoid event/memory leaks\n */\n unsubscribe(placeholderItem: PlaceholderItemComponent): void {\n delete this.subscriptionTargets[placeholderItem.placeholderKey];\n }\n\n willDestroy(): void {\n super.willDestroy();\n\n this.subscriptionTargets = {};\n }\n}\n","/**\n * Adds listener to check dark mode related changes.\n * Listener needs to be removed in application which calls method to avoid memory leaks.\n */\nexport function darkModeListener(toggleClassOnBody) {\n let isDarkModeEnabled = false;\n const darkModeRequest = window.matchMedia('(prefers-color-scheme: dark)'), classToggler = function (requestMatches) {\n if (toggleClassOnBody) {\n document.body.classList.toggle('dark', requestMatches);\n }\n isDarkModeEnabled = requestMatches;\n }, fnApplyDarkMode = (request) => {\n classToggler(request.matches);\n };\n classToggler(darkModeRequest.matches);\n try {\n darkModeRequest.addEventListener('change', fnApplyDarkMode);\n }\n catch (e) {\n try {\n // Safari\n darkModeRequest.addListener(fnApplyDarkMode);\n }\n catch (e) {\n console.error('Failed to determine if dark mode was requested for web views.', e);\n }\n }\n document.body.classList.remove('hide');\n return {\n destructor: () => darkModeRequest.removeEventListener('change', fnApplyDarkMode),\n isDarkModeEnabled: isDarkModeEnabled\n };\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"assets/chunk.\" + {\"161\":\"5ac320725793d0fedb71\",\"176\":\"d2462ee4a6c785e13ca0\",\"285\":\"996047765db714b71408\",\"309\":\"dda7d80b31f8932421b2\",\"340\":\"c7fd234f4d04b672d675\",\"396\":\"8297d554bd4cc91f7e6a\",\"594\":\"d97cc395854414c64b6a\",\"729\":\"2428f191f5d229ab40b9\",\"982\":\"0ac06fd707822c66df19\",\"1560\":\"b43d3176572ceb719ff0\",\"1583\":\"8d6124f7198179550ef7\",\"1599\":\"66316dbce0829504a908\",\"1656\":\"f97cca84667993296f1d\",\"1724\":\"fcf8f125bebe4a2d72e3\",\"1787\":\"b7b9808296a9978e5ef9\",\"1957\":\"f1a88c61158803fa8d5f\",\"2615\":\"d4af8345935234670195\",\"2686\":\"5fed155696f106a92631\",\"2823\":\"08f80e6579d660308fd4\",\"2831\":\"1297645dbcc5b41fa0cc\",\"3023\":\"bf25222f0e01af5d8c23\",\"3342\":\"a71fc572cbb27b9b0b7a\",\"3609\":\"3d6d830802ef308f2428\",\"3663\":\"fccc2a78ab4113cb8196\",\"3840\":\"f66b94ab6fe201af2da5\",\"3928\":\"78a2b96fbcefad724bb0\",\"4011\":\"749fdc7b060b216b2e6a\",\"4025\":\"b5d4ae3672024155f3ba\",\"4168\":\"66ecef98dbac58552da4\",\"4186\":\"829ea5cfb41a71c2e88b\",\"4231\":\"2131ac59bbe829e8b707\",\"4347\":\"68daeb3b89f8b3ca9451\",\"4413\":\"a217a1be8d0ff8ecb429\",\"4418\":\"d63dbebd9ed18a54ea99\",\"4857\":\"52cce10ec7fe559a9a36\",\"4860\":\"d397136227e224067b88\",\"5122\":\"c1897cdcb65380dc4dad\",\"5138\":\"4f08d0f54461d7b48fbf\",\"5160\":\"b6b37ca154c225084ee6\",\"5212\":\"b332f10e33df4cd205a3\",\"5363\":\"a6790a4b1b28f0f7e2c6\",\"5381\":\"b7f41e1cf4b3fffd3088\",\"5510\":\"d1e2f897ac0bca5e0389\",\"5698\":\"3a38bda4a288e4c7c4fd\",\"5813\":\"a01945628bbf85ecd33f\",\"5962\":\"1d36f726fc0916a6e2b7\",\"6151\":\"d163f8bc204ac521397c\",\"6188\":\"9952a63a48531e80d216\",\"6486\":\"997efa1aeaee88aca2fe\",\"6547\":\"f966d10b86d226a4e84e\",\"6660\":\"ddbb01bdc113da00ff95\",\"6677\":\"4a381bfc7924e633afce\",\"6716\":\"831536991df8fd2aca10\",\"6893\":\"2659028cd19a8345e837\",\"6952\":\"e0f7e7bae57f47208807\",\"6993\":\"b5286d73717c8cbef28b\",\"7311\":\"108ecbc73716712e8ebe\",\"7624\":\"d8dfc06c3de60d3c3fc7\",\"7843\":\"d9847f3578f0e778b15b\",\"7912\":\"5e204cad8d05b593ab0e\",\"7972\":\"989746bcf80fbbc2446b\",\"7997\":\"7fcca5ec988ae06ca1ac\",\"8044\":\"99fb58d23ea6022b0c74\",\"8611\":\"bd8ae6d7291ec206b4b0\",\"8701\":\"33f1dcb3fa35b5cc2e03\",\"8804\":\"8f0add2acba3d671ba88\",\"8806\":\"52ca099e888bd1125dee\",\"9059\":\"8928450a72e73c33df93\",\"9215\":\"4f5f3c7c3d06a02ba79b\",\"9373\":\"f257c9eb382701d78970\",\"9407\":\"17fc4e2b652b218afea1\",\"9484\":\"d0982bcfe9201bbcc4ee\",\"9870\":\"a29088c1134535e9c6b8\"}[chunkId] + \".js\";\n};","// This function allow to reference async chunks\n__webpack_require__.miniCssF = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"assets/chunk.\" + {\"309\":\"dda7d80b31f8932421b2\",\"340\":\"c7fd234f4d04b672d675\",\"396\":\"8297d554bd4cc91f7e6a\",\"729\":\"2428f191f5d229ab40b9\",\"1599\":\"66316dbce0829504a908\",\"1787\":\"b7b9808296a9978e5ef9\",\"1957\":\"f1a88c61158803fa8d5f\",\"2615\":\"d4af8345935234670195\",\"2823\":\"08f80e6579d660308fd4\",\"3023\":\"bf25222f0e01af5d8c23\",\"3609\":\"3d6d830802ef308f2428\",\"3840\":\"f66b94ab6fe201af2da5\",\"4186\":\"829ea5cfb41a71c2e88b\",\"4413\":\"a217a1be8d0ff8ecb429\",\"4418\":\"d63dbebd9ed18a54ea99\",\"5122\":\"c1897cdcb65380dc4dad\",\"5212\":\"b332f10e33df4cd205a3\",\"5813\":\"a01945628bbf85ecd33f\",\"5962\":\"1d36f726fc0916a6e2b7\",\"6151\":\"d163f8bc204ac521397c\",\"6660\":\"ddbb01bdc113da00ff95\",\"6993\":\"b5286d73717c8cbef28b\",\"7624\":\"d8dfc06c3de60d3c3fc7\",\"7843\":\"d9847f3578f0e778b15b\",\"8044\":\"99fb58d23ea6022b0c74\",\"8701\":\"33f1dcb3fa35b5cc2e03\",\"8806\":\"52ca099e888bd1125dee\",\"9215\":\"4f5f3c7c3d06a02ba79b\",\"9373\":\"f257c9eb382701d78970\",\"9484\":\"d0982bcfe9201bbcc4ee\"}[chunkId] + \".css\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.p = \"/web/system/\";","if (typeof document === \"undefined\") return;\nvar createStylesheet = (chunkId, fullhref, oldTag, resolve, reject) => {\n\tvar linkTag = document.createElement(\"link\");\n\n\tlinkTag.rel = \"stylesheet\";\n\tlinkTag.type = \"text/css\";\n\tif (__webpack_require__.nc) {\n\t\tlinkTag.nonce = __webpack_require__.nc;\n\t}\n\tvar onLinkComplete = (event) => {\n\t\t// avoid mem leaks.\n\t\tlinkTag.onerror = linkTag.onload = null;\n\t\tif (event.type === 'load') {\n\t\t\tresolve();\n\t\t} else {\n\t\t\tvar errorType = event && event.type;\n\t\t\tvar realHref = event && event.target && event.target.href || fullhref;\n\t\t\tvar err = new Error(\"Loading CSS chunk \" + chunkId + \" failed.\\n(\" + errorType + \": \" + realHref + \")\");\n\t\t\terr.name = \"ChunkLoadError\";\n\t\t\terr.code = \"CSS_CHUNK_LOAD_FAILED\";\n\t\t\terr.type = errorType;\n\t\t\terr.request = realHref;\n\t\t\tif (linkTag.parentNode) linkTag.parentNode.removeChild(linkTag)\n\t\t\treject(err);\n\t\t}\n\t}\n\tlinkTag.onerror = linkTag.onload = onLinkComplete;\n\tlinkTag.href = fullhref;\n\n\n\t(function (linkTag) {\n\t // We want to load RTL stylesheets if RTL is selected.\n\t // eslint-disable-next-line no-undef\n\t if (document.dir === 'rtl') {\n\t linkTag.href = linkTag.href.replace('chunk', 'rtl-styling');\n\t }\n\n\t // eslint-disable-next-line no-undef\n\t document.head.appendChild(linkTag);\n\t })(linkTag)\n\treturn linkTag;\n};\nvar findStylesheet = (href, fullhref) => {\n\tvar existingLinkTags = document.getElementsByTagName(\"link\");\n\tfor(var i = 0; i < existingLinkTags.length; i++) {\n\t\tvar tag = existingLinkTags[i];\n\t\tvar dataHref = tag.getAttribute(\"data-href\") || tag.getAttribute(\"href\");\n\t\tif(tag.rel === \"stylesheet\" && (dataHref === href || dataHref === fullhref)) return tag;\n\t}\n\tvar existingStyleTags = document.getElementsByTagName(\"style\");\n\tfor(var i = 0; i < existingStyleTags.length; i++) {\n\t\tvar tag = existingStyleTags[i];\n\t\tvar dataHref = tag.getAttribute(\"data-href\");\n\t\tif(dataHref === href || dataHref === fullhref) return tag;\n\t}\n};\nvar loadStylesheet = (chunkId) => {\n\treturn new Promise((resolve, reject) => {\n\t\tvar href = __webpack_require__.miniCssF(chunkId);\n\t\tvar fullhref = __webpack_require__.p + href;\n\t\tif(findStylesheet(href, fullhref)) return resolve();\n\t\tcreateStylesheet(chunkId, fullhref, null, resolve, reject);\n\t});\n}\n// object to store loaded CSS chunks\nvar installedCssChunks = {\n\t2400: 0\n};\n\n__webpack_require__.f.miniCss = (chunkId, promises) => {\n\tvar cssChunks = {\"309\":1,\"340\":1,\"396\":1,\"729\":1,\"1599\":1,\"1787\":1,\"1957\":1,\"2615\":1,\"2823\":1,\"3023\":1,\"3609\":1,\"3840\":1,\"4186\":1,\"4413\":1,\"4418\":1,\"5122\":1,\"5212\":1,\"5813\":1,\"5962\":1,\"6151\":1,\"6660\":1,\"6993\":1,\"7624\":1,\"7843\":1,\"8044\":1,\"8701\":1,\"8806\":1,\"9215\":1,\"9373\":1,\"9484\":1};\n\tif(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]);\n\telse if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) {\n\t\tpromises.push(installedCssChunks[chunkId] = loadStylesheet(chunkId).then(() => {\n\t\t\tinstalledCssChunks[chunkId] = 0;\n\t\t}, (e) => {\n\t\t\tdelete installedCssChunks[chunkId];\n\t\t\tthrow e;\n\t\t}));\n\t}\n};\n\n// no hmr\n\n// no prefetching\n\n// no preloaded","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t2400: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(!/^(4186|7843)$/.test(chunkId)) {\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t} else installedChunks[chunkId] = 0;\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkcustomer_site\"] = self[\"webpackChunkcustomer_site\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [5536], () => (__webpack_require__(27723)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","inProgress","dataWebpackPrefix","m","window","require","default","__esModule","module","exports","requirejs","define","d","esc","setComponentTemplate","template","component","map","webpackContext","req","id","webpackContextResolve","__webpack_require__","o","e","Error","code","keys","Object","resolve","AddDeviceCategoryAdapter","BaseAddDeviceAdapter","AddDeviceResourceAdapter","urlForDeleteRecord","modelname","_ref","adapterOptions","categoryId","queryString","concat","super","arguments","PairedDeviceAdapter","_name","WeakMap","_icon","_devices","_isVideoCategory","_isDoorbellCameraCategory","_isGoogleNestCategory","_isMatterCategory","AddDeviceCategoryModel","BaseModel","constructor","_classPrivateFieldInitSpec","i","_AddDeviceCategoryModel","g","prototype","attr","defaultValue","hasMany","inverse","_category","_displayName","_longName","_manufacturerName","_image","_additionalImage","_installWizardEnum","_energyAccountId","_referenceType","_referenceValue","_isRepeaterDevice","_exampleDescription","_isOAuthDevice","_isZWaveDevice","_isNamingNeeded","_isMountedBeforeWizard","_disableStartInstallationWizard","_canBeUnlinkedByUser","_isRFDevice","_isUsingInstallerLedFlow","_isUsingDiyFlow","_repReferenceValue","_completeInstallationMessage","_isNearInstallLocationBeforeWizard","_isMatterDevice","_linkDevicesUrl","AddDeviceResourceModel","_AddDeviceResourceModel","belongsTo","allowNull","PairedDeviceModel","_deviceName","_setUpCompleted","_dlCode","_categoryEnum","_resourceEnum","_deviceTypeQolsys","_deviceTypeSubDescription","_PairedDeviceModel","_envSettings","BaseAdapter","namespace","addDeviceEngine","this","envSettings","getEnvironment","engineApiPrefix","_BaseAddDeviceAdapter","inject","NotLoggedIn","InvalidAntiForgeryToken","NoPermissionForEmber","TwoFactorAuthenticationRequired","ValidationError","ProcessingError","ServerProcessingError","ServiceUnavailable","APPLICATION_JSON","POST","PUT","GET","JSONAPI_REQUEST","headers","accept","JSON_REQUEST","URL_ENCODED","CONTENT_TYPE_PLAIN","EmberAjaxError","message","type","errors","_defineProperty","name","AdcAjaxService","Service","environmentConfig","owner","getOwner","resolveRegistration","defaultHeaders","envAntiForgeryCookieName","antiForgeryCookieName","undefined","_objectSpread","ajaxrequestuniquekey","getCookie","apiBaseUrl","_this$environmentConf","apiRequest","apiEndpoint","_this$environmentConf2","data","length","httpVerb","useJsonApiFormat","newOptions","envUseJsonApi","requestJsonApiResponse","credentials","joinChar","request","microApiRequest","microApiEnum","_this$microApiData","_this$microApiData$da","_this$microApiData2","microApiData","microApiDataRaw","endpointData","included","find","item","Number","attributes","now","Date","isBefore","jwtExpirationDate","setSeconds","getSeconds","pathname","search","location","Accept","Authorization","encodedJwtToken","SourcePath","SourceQueryParams","TokenVersion","microApiTokenVer","subEndpoint","baseApiEndpoint","finalEndpoint","startsWith","serializeBody","serialize","JSON","stringify","url","optionsOrType","includeHeaders","method","body","response","fetch","status","result","async","text","parse","error","SyntaxError","ok","parseResponse","errorData","getErrorWithStatusCode","title","decodeURIComponent","processNoNetworkError","simpleRequest","isNoNetworkError","noInternetConnection","_AdcAjaxService","n","computed","NotFound","AjaxError","shouldBeLogged","isUnauthorizedAccess","isValidationError","isProcessingError","isIncorrectSite","statusCode","args","navigator","onLine","getStatusCodeAsNumber","parseInt","getProcessingErrorStatusCode","getServerProcessingErrorStatusCode","isProcessingErrorStatusCode","isServerProcessingErrorStatusCode","isInvalidSessionStatusCode","isNoPermissionsForApplicationStatusCode","isInvalidSessionError","_response$errors","Array","some","isAdapterErrorProcessingError","_response$errors2","String","toLowerCase","every","_ref2","processValidationErrorsFromResponse","processValidationErrors","call","getValidationErrorsFromResponse","validationErrors","forEach","key","processError","_errors$errors","responseErrors","A","compact","filterBy","reduce","_error$source$pointer","_error$source","pathMatch","source","pointer","match","getValidationErrorKey","detail","clearValidationErrors","validationErrorKeys","set","push","TEMPLATE","createTemplateFactory","scope","didInsert_","_performanceMonitor","LastRenderMark","Component","markEndOfRendering","_this$args$markEndOfR","performanceMonitor","markLastRender","_LastRenderMark","service","action","_microApiEndpoints","_microApiTokenVer","MicroApiDataItem","_MicroApiDataItem","MicroApiEndpoint","_baseApiEndpoint","_namespace","_encodedJwtToken","_jwtExpirationDate","_MicroApiEndpoint","IsMediumWidthPage","Mixin","pageMaxWidth","PAGE_MAX_WIDTH_MEDIUM","BrowserService","_nativeBridge","copyToClipboard","textArea","document","createElement","style","visibility","value","appendChild","select","clipboard","writeText","removeChild","_unused","universalCopyToClipboard","subject","anchorElement","nativeBridge","doesSupportLaunchShareActionDialog","launchShareActionDialog","_unused2","_BrowserService","EnvSettingsService","setEnvironment","env","console","isEnvironmentOfType","_this$envSettings","environment","isDevelopmentEnvironment","isTestEnvironment","isProductionEnvironment","MONTHS","from","_","idx","startOfHour","setHours","setMonth","getTranslations","cultureId","translations","Promise","language","ajax","_ajax","_intl","_contextManager","_timeZone","LocaleService","isRtl","refreshCulture","contextManager","transitionToUrl","changeLocale","locale","intl","cache","app","_app$translations","isoCode","weekStartsOnSunday","defaultIsoCode","all","Intl","loadScript","warn","addTranslations","setLocale","timeZone","uiComponents","lookup","defaults","props","firstDay","WEEKDAYS","setDay","i18n","previousMonth","t","nextMonth","months","formatDate","month","weekdays","weekday","weekdaysShort","setProperties","_LocaleService","alias","BluetoothPermissionEnum","RUN_TOOLBAR_BUTTON_ACTION_NAME","RUN_MODAL_BUTTON_ACTION_NAME","RUN_RESOLVE_PROMISE_ACTION","runMethod","featureEnum","isEnabled","RSVPReject","doesSupportFeature","promise","RSVPPromise","returnPromiseId","guidFor","promiseCache","content","feature","later","_this$bridge","bridge","postMessage","getButtonCollectionWithId","getCollectionWithId","collectionName","get","findBy","getBridge","_bridge","bridgeName","webkit","messageHandlers","NativeBridge","supportedNativeBridgeFeatures","includes","doesSupportNativeView","viewEnum","supportedNativeViews","getObjectWithoutId","object","_objectWithoutProperties","_excluded","setupActionsOnBridge","_this","toolbarId","buttonPath","index","toolbar","buttons","button","buttonIndex","modalButtons","objectAt","promiseId","reject","previouslyResolvedPromiseIds","toISOString","_this$previouslyResol","wasPreviouslyResolved","sentryExtras","latestResolvedTime","sentryTags","sentryWithScopeAndError","sendTitleToApp","_this$titleStack","titleStack","lastObject","transformButtonObject","buttonObject","bridgeMethodKey","description","icon","isPromisePending","paramsString","_len","params","_key","isEmpty","join","toString","actionPath","wrapJsInTryCatch","translateToolbarButtons","backButtons","contextButtons","sendToolbarButtonsToApp","_this$toolbarsStack","toolbarsStack","processCollectionUpdate","stackType","newCollection","updateAction","existingCollection","stack","indexOfExisting","indexOf","popObject","pushObject","processCollectionDispose","needsUpdate","removeObject","initializeBridge","promiseResolveDataReplaceTemplate","startTime","initializationFailSafe","promiseResolvePath","cancel","duration","getTime","log","initialize","addWeakListener","resetToolbarButtons","doesSupportTitle","doesSupportToolbarButtons","doesSupportConfirmationDialog","doesSupportGoBack","doesSupportRefreshWebView","doesSupportReloadAssociatedSystems","doesSupportTransitionToNativeView","doesSupportTransitionToNativeViewWithId","doesSupportCloseWebView","doesSupportLaunchImportContact","doesSupportLaunchBrowser","doesSupportCloseWebViewV2","doesSupportTerminateAppSession","doesSupportLaunchNewContext","doesSupportPersistAppSession","doesSupportEnablePushNotifications","doesSupportEnableBluetooth","doesSupportCheckBluetoothPermissions","doesSupportStartBleAdvertising","doesSupportStopBleAdvertising","setTitle","titleCollection","removeTitle","setToolbarButtons","removeToolbarButtons","clear","getButtonTypeBack","getButtonTypeCancel","getButtonTypeConfirm","getButtonTypeAdd","showConfirmationDialog","rect","getBoundingClientRect","buttonWidth","right","left","xCoordinate","yCoordinate","top","launchImportContact","goBack","handleError","refreshWebView","reloadAssociatedSystems","transitionToNativeView","nativeViewId","transitionData","shouldAvoidReloadingWebView","deviceID","macAddress","showBackArrow","returnToWebView","contextSwitchType","None","customerId","groupId","closeWebView","launchBrowser","isForSso","closeWebViewV2","terminateAppSession","launchNewContext","emberId","persistAppSession","enablePushNotifications","notificationTypes","enableBluetooth","checkBluetoothPermissions","permissionToCheck","values","startBleAdvertising","stopBleAdvertising","willDestroy","_super","jsString","WebsocketMessageType","BaseWebsocketMessage","unitId","deviceId","EventWebsocketMessage","eventType","eventValue","qStringForExtraData","eventDateUtc","event","assign","subtype","subvalue","GeofenceCrossingWebsocketMessage","fenceId","isInsideNow","geofenceCrossing","MonitoringEventWebsocketMessage","correlatedEventId","monitoringEvent","PropertyChangeWebsocketMessage","property","propertyValue","propertyChange","StatusUpdateWebsocketMessage","newState","flagMask","statusUpdate","isDefined","variable","_store","WebsocketService","getReconnectionTimeout","attempts","range","Math","min","pow","floor","max","random","start","WebSocket","C","establishConnection","eventCode","socket","close","authToken","socketConnect","retrieveToken","endpoint","addEventListener","reconnectionAttempts","delay","handleMessage","_this$authToken","_this$endpoint","tokenResponse","metaData","UnitId","DeviceId","_unused3","isPresent","EventType","EventValue","EventDateUtc","QstringForExtraData","CorrelatedEventId","Property","PropertyValue","FenceId","IsInsideNow","NewState","FlagMask","getWebsocketMessage","filter","handler","willHandle","invoke","_WebsocketService","ArrayTransform","Transform","deserialized","toArray","deserialize","array","NullableBoolean","DS","BooleanTransform","serialized","RESTAdapter","AjaxRequestUniqueKey","handleResponse","payload","requestData","jsonPayload","typeOf","ex","isAdapterError","InvalidError","statusData","number","AdapterError","submitCustomApiCall","model","verb","rawData","buildURL","modelName","BaseJsonApiContentAdapter","_endpointData","_tokenVer","BaseMicroApiAdapter","NotSet","_this$endpointData$en","_this$endpointData","buildHeaderProps","findAll","store","sinceToken","snapshot","RSVP","ensureEndpointAndToken","then","catch","findRecord","query","queryRecord","updateRecord","createRecord","deleteRecord","pathForType","_modelName","microApiEndpointPath","tokenVer","_this$store$peekAll$f","_endpointData$namespa","_endpointData$baseApi","peekAll","firstObject","microApiEndpoints","buildNamespace","host","buildHost","reload","token","_this$tokenVer","namespaceData","hostData","_BaseMicroApiAdapter","tracked","EnterpriseToSingleSystem","EnterpriseToGroup","PresenceStateApi","DiscoverApi","IntercomApi","MassNotificationsApi","Home","DoorbellCameraInstall","VideoCameraInstall","Thermostats","PanelSettings","ThermostatSettings","VideoSettings","DoorbellSettings","AudioSettings","CarSettings","Video","CarSettingsV2","NestVideoSettings","Fleet","Ambient","MatterInstall","SalesforceChat","NamiInstall","EnableIntercomNotifications","createRecordWithServerDefaults","_defaultModel$data$at","_defaultModel$data","modelId","defaultProperties","defaultModel","pluralize","Model","shouldRollbackRelationships","canBeRolledBack","isDestroyed","isDestroying","options","rollback","rollbackAttributes","getModelName","_String$match$","_String$match","apiMethod","adapterFor","rollbackRelationships","getRelationshipRecords","_this$hasMany$value","kind","rollbackRelationship","relDescriptor","record","eachRelationship","_isoCode","_language","_weekStartsOnSunday","LocaleModel","_LocaleModel","updateRouteInfo","queryParams","routeItem","routeName","fullRouteName","setCurrentRouteData","route","pageTitle","getRouteItemTitle","wasReplaceTransition","getQueryParam","refreshModel","replace","baseRoute","EmberRoute","routeId","_this$_routeItem","_routeItem","getRouteItem","_this$routeItem","tc","sendRouteInfoToApp","once","serializeQueryParam","urlKey","defaultValueType","deserializeQueryParam","isMediumWidthPage","beforeModel","transition","markRouteInitialized","targetName","setUseKpiThresholdMetrics","actions","didTransition","LEGACY_PAGE_ROUTE_NAME","parseUrl","fullUrl","hash","RegExp","BaseSerializer","CommonSerializer","json","includeId","relationships","fromEntries","entries","JSONAPISerializer","keyForAttribute","keyForRelationship","polymorphicSerializer","extend","EmbeddedRecordsMixin","isEmbeddedRecordsMixinCompatible","payloadKeyFromModelName","singularize","BaseEngineConfig","twoFactorAuthenticationTypes","TWO_FACTOR_AUTHENTICATION_TYPES","recognizedDeviceTypes","RECOGNIZED_DEVICE_TYPES","getRouteIdFromRouteName","customerPageUrlEnums","LEVEL_TO_CONSOLE_FN_MAP","fatal","warning","info","debug","DEFAULT_CONFIG","attachStacktrace","serverName","hostname","release","isRecognizedServerError","hint","getErrorCodeFromHint","isNaN","errorCode","fnLog","logMessage","originalException","isArray","shouldEventBeIgnored","errorsToIgnore","errorToIgnore","getExceptionStringValue","propertyType","getConfiguration","errorReportingConfiguration","beforeSend","bind","beforeBreadcrumb","integrations","CaptureConsole","levels","ignoreErrors","denyUrls","_this$configuration","configuration","showDebugInfo","BaseErrorReporting","evt","preventDefault","stopPropagation","stopImmediatePropagation","getETI","xhrRequestsToIgnoreInBreadcrumbs","configure","init","setContext","context","user","tags","extra","fingerprint","configureScope","setLevel","setUser","setTags","setExtras","setFingerprint","_this$configuration2","level","_this$console","breadcrumb","category","_breadcrumb$data$url","_breadcrumb$data","r","target","path","targetKey","tagName","_router","ContextManager","_routeData","_wasReplaceTransition","logMissingAbstractMember","setIsLoading","_isLoading","logout","_useReturnUrl","_routeId","_url","resetVisitedRoutesStack","transitionToPreviousRoute","_defaultPageIfStackIsEmpty","getVisitedRoutesStackLength","isSystemInstall","router","currentURL","rootURL","_ContextManager","SameSite","Cookie","isSecure","sameSite","namePrefix","expirationDate","domain","trim","Strict","EssentialCookie","isAllowed","setCookie","cookieName","cookie","toUTCString","validateCookie","_a","getCookieInvalidationDate","getNonPrefixedCookieName","getCookieValue","split","cookieValue","trimmedCookie","consentCookieValue","CookieManager","cookieService","CookieService","deleteCookie","hasTruthyCookieValue","getEssentialCookie","hasEssentialCookieTruthyValue","deleteEssentialCookie","setEssentialCookie","JS_PARSE_END","TTI_END","ROUTE_INITIALIZED","LAST_RENDER_MARK_RENDERED","CONTEXT_SWITCH_INITIALIZED","CONTEXT_SWITCH_RESOLVED","TIME_TO_INTERACTIVE","CSS_PARSE_TIME","JS_PARSE_TIME","ROUTE_VIEW_RENDERED","MODEL_RESOLVED","CONTEXT_SWITCH_TIME","createMeasurement","measurementName","startMark","endMark","doAllMarksExist","performance","measure","markNames","browserReadOnlyTimes","timing","allRecordedMarkNames","getEntriesByType","mapBy","allPossibleMarks","markName","createMark","mark","clearContextSwitchMarks","clearMarks","filtered","filteredMarkNamesByCreated","getMeasurements","_len2","measurementNames","_key2","resultDictionary","performanceEntry","clearMeasures","convertRouteNameToPath","PerformanceMonitorService","buildTask","generator","kpiThreshold","exceededThreshold","thresholdIncrement","threshold","timeout","useKpiThresholdMetrics","currentRouteName","routePath","restartable","on","startKpiThresholdTask","registerDestructor","off","enabled","isDisabled","sendInitialMetricsToServer","sendRouteViewMetricsToServer","validMetrics","metricName","routeViewMetricPathDictionary","clearRouteViewMarks","err","markJSEnd","markTTIEnd","routeMarkedAsInitialized","markRouteViewRendered","markModelResolved","markContextSwitchInitialized","contextId","contextSwitchPreviousId","markContextSwitchResolved","originalContextId","newContextId","getKpiThreshold","kpiThresholdParam","URL","origin","searchParams","kpiThresholdTask","perform","_PerformanceMonitorService","keepAliveFailures","triggerLogoutTimeout","forceLogoutOnNextTransition","routeIgnoresSessionTimeout","baseLogout","triggerInactivityWarningTimeout","inactive","triggerInactivityWarning","cancelTimers","timers","cancelLogoutTimeouts","logoutTimeoutEvent","inactivityWarningTimeoutEvent","keepAlive","enableKeepAlive","stillAlive","keepSessionActive","keepAliveTimeout","debounce","keepAliveFrequencyMs","handleUserActivityEvent","doNotTimeoutSession","logoutTimeoutMs","inactivityWarningTimeoutMs","removeAllListeners","listenerIds","listenerId","removeListener","_inactive","_routeIgnoresSessionTimeout","_enableKeepAlive","_keepAliveUrl","_forceLogoutOnNextTransition","SessionActivity","applicationSessionProperties","shouldTimeout","keepAliveUrl","getInactivityWarningDuration","clearInactiveStatus","refreshApplication","updateSessionTimeout","doNotTimeOut","forceLogout","apply","_SessionActivity","getErrorText","_firstError$detail","firstError","initializePendoMetrics","pendoConfiguration","config","metrics","_pendoConfiguration$v","_pendoConfiguration$c","_pendoConfiguration$s","_pendoConfiguration$s2","_pendoConfiguration$c2","_pendoConfiguration$a","pop","activateAdapters","environments","apiKey","identify","visitor","visitorId","systemGroupId","state","country","account","accountId","sentryWithScopeAndWarn","warningMessage","extras","sentryWithScopeAndErrorOrWarn","errorMessage","isError","withScope","parseQueryString","pairs","pair","decodedKey","decodedValue","_websocket","BaseWebsocketMessageHandler","setOwner","handlesEventTypes","hasAdditionalPayload","process","shouldReloadStore","peekRecord","shouldCreateNewModel","getPayload","shouldReloadModel","getIdType","_this$modelName","isValidEvent","isValidMonitoringEvent","handlesMonitoringEventTypes","isValidProperty","handlesPropertyTypes","isValidStatusUpdate","handlesStatusUpdates","isValidGeofenceCrossing","handlesGeofenceCrossings","_BaseWebsocketMessageHandler","SmartArmingRulesAdapter","BaseModelAdapter","sitePrefix","camelize","_SmartArmingRulesAdapter","_notificationManager","normalizeErrorResponse","_headers","codes","defaultText","notificationManager","addError","_BaseModelAdapter","getDateForTime","time","hours","minutes","date","_isSensorBased","_isDisarm","_startTime","_endTime","_cutoffTime","_duration","_isEnabled","_triggers","_isDefault","SmartArming","localizedStartTime","parseTime","localizedEndTime","endTime","segmentedStartTime","getTimeModelFromRule","segmentedEndTime","localizedDuration","parseDuration","isScheduleValid","existingRules","_await$this$submitCus","_await$this$submitCus2","modifiedRule","rule","isValid","newTime","hour","minute","ruleTime","timeDate","getHours","getMinutes","timeInt","num","_SmartArming","CACHE_NAME","ON_CLOSE_CLICK_LISTENER_KEY","DomService","addListener","destroyable","element","fn","isOnce","capture","passive","_destroyable$CACHE_NA","_destroyable$CACHE_NA2","domListeners","clearCloseClickListener","attachCloseHandler","fnClose","fnTestElement","verifyCloseTarget","selector","_parent$contains","parent","querySelector","contains","srcElement","MINUTES_IN_HOUR","MINUTES_IN_HALF_HOUR","HOURS_IN_DAY","DAYS_IN_WEEK","MINUTES_IN_DAY","MINUTES_IN_WEEK","SHIFT_KEY","SPACE_KEY","SPACE_CODE","ENTER_KEY","ENTER_CODE","NUMPAD_ENTER_CODE","ESCAPE_KEY","ESCAPE_CODE","TAB_KEY","TAB_CODE","DOWN_ARROW_KEY","ARROW_DOWN_CODE","UP_ARROW_KEY","ARROW_UP_CODE","LEFT_ARROW_KEY","ARROW_LEFT_CODE","RIGHT_ARROW_KEY","ARROW_RIGHT_CODE","EQUALS_KEY","LEFT_BRACKET_KEY","RIGHT_BRACKET_KEY","B_KEY","C_KEY","D_KEY","E_KEY","F_KEY","N_KEY","S_KEY","T_KEY","isEnterOrSpaceCode","isArrowRightCode","isArrowLeftCode","isArrowDownCode","isArrowUpCode","isArrowCode","isTabCode","isEnterCode","isSpaceCode","isEscapeCode","nodeHandlesKeyboardInput","node","nodeName","nodeHandlesSpaceOrEnterInput","addWeakTrapFocusListener","scopeSelector","escapeCallback","treatArrowsAsTabEvents","oldListenerId","changeElementInFocus","isFunction","shiftKey","trapFocus","isFirstTabPressInTrapFocusListener","removeTrapFocusListener","getFocusableElements","baseElement","querySelectorAll","getAttribute","el","width","height","isVisible","shouldFocusPreviousElement","focusElements","currentIndex","activeElement","elementCount","lastElementIndex","listContainer","listItems","newIndex","listItemsLastIndex","focus","activateFocusTrap","targetClass","updateTrapFocusHandler","getElementToFocus","classList","schedule","focusTarget","firstElement","areArraysSame","first","second","expireCookie","setTime","toggleClassOnBody","className","add","toggleClassOnElement","scrollIntoViewIfNeeded","elem","finalElement","centerIfNeeded","padding","animate","withinBounds","extent","offsetLeft","offsetTop","offsetWidth","offsetHeight","area","makeArea","bottom","translate","x","y","relativeFromTo","lhs","rhs","newLeft","newTop","tempLHS","offsetParent","tempRHS","clientLeft","clientTop","parentNode","HTMLElement","scrollLeft","clientWidth","scrollTop","clientHeight","scriptUrl","Promise$1","scriptEl","src","onload","_scriptEl$parentNode","onerror","isMobileBrowser","userAgent","test","platform","maxTouchPoints","MSStream","newDate","base","nowPlusDays","days","setUTCSeconds","setUTCMilliseconds","setDate","getDate","getDayScheduleDuration","difference","memberName","getObjProperties","obj","names","buildClassListString","appliedClasses","shouldAddClass","listenerCache","getTimestamp","round","runGarbageCollection","setTimeout","requestIdleCallback","requestAnimationFrame","listeners","getEventListenersObject","count","timestamp","initialized","generateEventId","crypto","Uint32Array","getRandomValues","eventOptions","fnEvent","_data$element","removeEventListener","functionToCheck","RTL_STRING","DIR_CHANGED_EVENT_KEY","_document$documentEle","documentElement","getNamedItem","directionChangedEvent","createEvent","initEvent","MutationObserver","mutations","mutation","attributeName","dispatchEvent","observe","constrainRange","isBetween","z","a","b","eps","sort","defaultEmbeddedRecordSerializerAttribute","fnResolve","fnReject","isPromise","getPromiseAndFn","rsvpPromise","next","cancelationToken","next$1","later$1","queue","schedule$1","FormatDateTzHelper","Helper","compute","formatDateTz","_FormatDateTzHelper","TcHelper","properties","onLocaleChanged","recompute","named","getTranslation","_TcHelper","PATH_REG_EXP","intlPath","modulePrefix","getIntlPath","EmberComponent","resolvePath","getPolyfillCode","defaultCode","codePart","STYLESHEET_SELECTOR","swapRtlStylesheets","link","href","newHref","setAttribute","ADCIntlService","IntlService","direction","reloadStylesheets","_locale$","crowdinConfig","crowdinSrc","loadCrowdinScripts","browser","detect","version","versionNumber","needsPluralRules","chrome","firefox","safari","edge","opera","needsRelativeTimeFormat","localeCode","loadIntlPolyfills","onIntlError","IntlErrorCode","MISSING_DATA","MISSING_TRANSLATION","formatTimeTz","isSameDay","date1","date2","isSameDayTz","isTomorrow","today","oneDayAhead","isToday","isYesterday","oneDayBehind","head","bodyRoot","_ADCIntlService","getFormattingOptions","formatTime","computeDayKeyTz","day","year","CUSTOM_TRANSLATION_CONTEXT_REGEX","TRANSLATION_CONTEXT_REGEX","GENERATED_CONTEXT_REGEX","TYPES_WITH_PREFIX","getTranslationPathFromContext","_getCustomPath","_context$getIntlPath2","_context$getIntlPath3","_context$toString2","contextPath","_context$getIntlPath","concreteMatch","getCustomPath","_context$toString","generatedMatch","fnCreateResponse","getStandardPath","unshift","contextOrKey","keyOrReplaceTokens","replaceTokensOnly","replaceTokens","hasContext","getTranslationKeyAndTokens","optionKeys","k","v","isNone","formatMessage","AgreementsAdapter","BaseLoginSetupAdapter","ArmingReminderAdapter","ContactAddressAdapter","CommMethodAdapter","MarketingCategoryAdapter","ProfileAdapter","profileModel","serializerFor","serializeIntoHash","currentPassword","PushMigrationPromptAdapter","RecognizedDeviceAdapter","SystemInformationAdapter","BusinessHourDayAdapter","EmergencyContactListCollectionAdapter","EmergencyContactListEntryAdapter","EmergencyContactListAdapter","EmergencyContactPhoneAdapter","EmergencyContactAdapter","CallListSettingAdapter","ContactPasscodeSettingAdapter","EmergencyContactSettingAdapter","PermitAdapter","PasscodeAdapter","PermittedActionAdapter","PhoneCollectionAdapter","PremisePhoneAdapter","PremisePasscodeSettingAdapter","PremisePhoneSettingAdapter","CountryMobileCarrierAdapter","TwoFactorAuthAdapter","Agreement","_type","_version","_cultureId","_isHtml","_text","_headerText","_footerText","_additionalCheckboxText","_downloadUrl","_isDeclinable","_warningModalMessage","_isEula","_agreeButtonText","_disagreeButtonText","updateAgreement","isAgree","additionalCheckboxValue","getProperties","agreeToAgreement","declineAgreement","emailAgreement","emailAddress","_Agreement","_pauseNotification","_notificationName","_selectedDays","_recipients","ArmingReminder","_ArmingReminder","_address","_addressType","_selected","ContactAddressSimple","addressTypeDesc","ContactTypeEnum","Email","Phone","Mobile","IPhonePush","addressType","_ContactAddressSimple","Unknown","CommunicationMethod","_communicationMethodName","_isVisible","_CommunicationMethod","_categoryPreferences","CommunicationPreference","_CommunicationPreference","_categoryName","_communicationMethods","MarketingCategory","_MarketingCategory","Message","_canBeCleared","_Message","_loginName","_loginInitials","_primaryEmailAddress","_loginEmailAddress","_securityQuestionId","_loginFlags","_canLogoutAllLoginsOnPasswordUpdate","_shouldSendNewDeviceAlerts","_locale","_availableLocales","_supportOption","_siteAppearance","_communicationPreference","_videoDownloadFormat","Profile","sendVerificationEmail","primaryEmail","getSecurityQuestions","setSecurityQuestion","securityQuestionId","securityQuestionAnswer","updatePassword","newPassword","confirmationPassword","shouldLogOutAllDevices","shouldLogOutSmartDevices","logoutDeviceIds","updateLoginName","loginName","saveModel","save","setDefaultSystem","findSystemsForLogin","password","addSystemsForLogin","deleteSourceLogin","setSendNewDeviceAlerts","shouldSendNewDeviceAlerts","_Profile","PushMigrationToolPushMigrationPrompt","_phoneNumber","_sMSContactAddressId","_pushContactAddressId","_pushDeviceName","_pushDeviceId","_showRemindMeLater","migrate","remindLater","doNotRemindAgain","_PushMigrationToolPushMigrationPrompt","_customDeviceName","_location","_lastSuccessfulLoginDateTime","_firstSuccessfulLoginDateTime","_isTrustedDevice","_isSavedLogin","_isCurrentDevice","_isVoiceDevice","_deviceType","RecognizedDevice","formattedLastDateTime","getFormattedDateTime","lastSuccessfulLoginDateTime","formattedFirstDateTime","firstSuccessfulLoginDateTime","dateTime","differenceInHours","formatRelative","differenceInMinutes","unit","numeric","_RecognizedDevice","_billingInformation","_marketingCommunication","_firstName","_lastName","_title","_emailAddress","_canEditEmailAddress","_country","_address2","_city","_subCity","_state","_subState","_postalCode","_canEditAddress","_isBusiness","_businessName","_businessNameMaxLength","_canEditBusinessName","_canEditAccountInformation","_canEditEmailPreferences","AccountInformation","getNextMessage","clearMessage","messageId","_AccountInformation","DTCBillingInformation","_errorMessages","_isCreditCardNeeded","_convergeUrl","_availableStates","_availableCreditCardTypes","_creditCardType","_creditCardNumber","_expirationMonth","_expirationYear","_DTCBillingInformation","MarketingCommunication","_isChecked","_description","_MarketingCommunication","CountryAddressResource","_street","_street1ResourceLabel","_isStreet1Required","_shouldShowStreet","_street2","_street2ResourceLabel","_isStreet2Required","_shouldShowStreet2","_cityResourceLabel","_isCityRequired","_shouldShowCity","_subCityResourceLabel","_isSubCityRequired","_shouldShowSubCity","_region","_regionResourceLabel","_isRegionRequired","_shouldShowRegion","_subRegion","_subRegionResourceLabel","_isSubRegionRequired","_shouldShowSubRegion","_postalCodeResourceLabel","_isPostalCodeRequired","_shouldShowPostalCode","_countryEnum","_CountryAddressResource","PropertyInformation","_propertyType","_companyName","_companyNameMaxLength","_isPrimaryResidence","_occupancyAdults","_occupancyChildren","_occupancyPets","_propertyArea","_electricityProviderId","_canEditPropertyInformation","_canEditCompanyName","_businessType","_businessSubtype","_PropertyInformation","_temperature","_volume","_systemName","_timezone","_hasAddressWritePermission","_dealerName","_canUpdateSystemInformation","SystemInformation","_SystemInformation","_day","_locationOpenForBusiness","_hours","BusinessHourDay","toJSON","_BusinessHourDay","EmployeeArrival","StartTime","EndTime","OpenForBusiness","EmployeeDeparture","_enabled","_isReadOnly","_businessHourDays","_unitId","_unitPartitions","_allowedPartitions","_canEditLegacyBusinessHours","_canEditEmberBusinessHours","LocationBusinessHour","_LocationBusinessHour","SettingsMonitoringStationContactsEmergencyContactListCollection","_callLists","_SettingsMonitoringStationContactsEmergencyContactListCollection","SettingsMonitoringStationContactsEmergencyContactListEntry","_order","_contact","_list","_SettingsMonitoringStationContactsEmergencyContactListEntry","SettingsMonitoringStationContactsEmergencyContactList","_entries","_SettingsMonitoringStationContactsEmergencyContactList","SettingsMonitoringStationContactsEmergencyContactPhone","_chatEnabled","_phoneType","_SettingsMonitoringStationContactsEmergencyContactPhone","SettingsMonitoringStationContactsEmergencyContact","_passcode","_phoneNumbers","_listEntries","_SettingsMonitoringStationContactsEmergencyContact","SettingsMonitoringStationContactsSettingsCallListSetting","_minContacts","_maxContacts","_maxTotalContacts","_SettingsMonitoringStationContactsSettingsCallListSetting","SettingsMonitoringStationContactsSettingsContactPasscodeSetting","_required","_useUniquePasscodes","_usePanelCode","_minPasscodeLength","_maxPasscodeLength","_useNumericPasscodes","_disallowSpecialCharacters","_disallowSpaces","_SettingsMonitoringStationContactsSettingsContactPasscodeSetting","SettingsMonitoringStationContactsSettingsEmergencyContactSetting","_optionalContactLastNames","_disallowSpecialCharactersInName","_allowPhoneChat","_maxPhones","_passcodeSettings","_availablePhoneTypes","_SettingsMonitoringStationContactsSettingsEmergencyContactSetting","SettingsMonitoringStationPremisePermit","_permitNumber","_expiration","_authority","_SettingsMonitoringStationPremisePermit","AlarmPermitAuthorityEnum","SettingsMonitoringStationPremisePasscode","_SettingsMonitoringStationPremisePasscode","SettingsMonitoringStationPremisePermittedAction","_managePhones","_managePasscodes","_managePermits","_SettingsMonitoringStationPremisePermittedAction","SettingsMonitoringStationPremisePhoneCollection","_phones","_SettingsMonitoringStationPremisePhoneCollection","SettingsMonitoringStationPremisePhone","_SettingsMonitoringStationPremisePhone","SettingsMonitoringStationContactsSettingsPremisePasscodeSetting","_SettingsMonitoringStationContactsSettingsPremisePasscodeSetting","SettingsMonitoringStationContactsSettingsPremisePhoneSetting","_optional","_min","_max","_requireUnique","_SettingsMonitoringStationContactsSettingsPremisePhoneSetting","SiteAppearance","_supportedDisplayModeFeatures","_isDarkModeEnabled","_isHighContrastModeEnabled","_isDarkModeDealerLogoMissing","_isDarkModeDealerFooterLogoMissing","_SiteAppearance","CountryMobileCarrier","_countryName","_carriers","_CountryMobileCarrier","_loginId","_supportWebsiteUrl","_canViewHelpDocumentation","_canLaunchHelpTour","_canAccessPointCentralUniversity","_canAccessLiveChat","_createIssueFrameUrl","_supportPages","SupportOption","_SupportOption","SupportPage","_routeEnum","_SupportPage","TWO_FACTOR_BASE_API_ROUTE","_engineConfig","_AUTHENTICATOR","_SMS","_EMAIL","_selected2FAType","_smsMobileNumber","_email","_enabledTwoFactorTypes","_valid2FAPermissions","_canReset2FA","_showSuggestedSetup","_canSkipSuggestedSetup","_currentDeviceName","_isCurrentDeviceTrusted","TwoFactorAuthentication","is2FAEnabled","enabledTwoFactorTypes","areMultiple2FAMethodsEnabled","bitmask","isTwoFactorTypeEnabled","twoFactorType","Boolean","isAuthenticatorEnabled","AUTHENTICATOR","isSMSEnabled","SMS","isEmailEnabled","EMAIL","isTwoFactorTypeAllowed","valid2FAPermissions","hasAuthenticatorPermission","hasSmsPermission","hasEmailPermission","lastFourPhoneDigits","smsMobileNumber","mobileNumber","slice","formattedMobileNumber","obfuscatedEmailAddress","email","_match","startShow","startHide","middleShow","middleHide","end","repeat","sendTwoFactorAuthenticationCode","isResend","loginId","sendTwoFactorAuthenticationCodeViaSms","sendTwoFactorAuthenticationCodeViaEmail","apiEndpointName","verifyTwoFactorCode","typeOf2FA","trustTwoFactorDevice","deviceName","reset2FA","disableTwoFactorAuthentication","validateSmsMobileNumber","verifyCodeAndEnable2FA","verificationMethod","getAuthenticatorSecretData","skipTwoFactorSetup","_TwoFactorAuthentication","DownloadFormat","_DownloadFormat","ArmingReminderSerializer","recipients","CommunicationPreferenceSerializer","categoryPreferences","MarketingCategorySerializer","communicationMethods","callLists","contact","phoneNumbers","phones","_this$envSettings$get","loginSetupEngine","_BaseLoginSetupAdapter","modalsDialogModalsSimpleSimpleDialog_","tc_","t_","getModalButton_","guidFor_","tc_0","textInput_","EditDeviceModal","c","_errorMessage","_EditDeviceModal","_device$customDeviceN","device","customDeviceName","saveDevice","successMsg","addSuccess","nameError","editDevice","ForgetDeviceModal","_ForgetDeviceModal","forgetDevice","isTrustedDevice","TrustDeviceModal","_TrustDeviceModal","trustDevice","weekView_","popoverMenu_","buttonIcon_","autoFocus_","dropdownSelectSingleSelect_","toString_","checkboxTree_","actionButtons_","DEFAULT_ARRIVAL_START_TIME","DEFAULT_ARRIVAL_END_TIME","DEFAULT_BUSINESS_START_TIME","DEFAULT_BUSINESS_END_TIME","DEFAULT_DEPARTURE_START_TIME","DEFAULT_DEPARTURE_END_TIME","TimeSelectionsEnum","dayMinutesToTimeString","dayMinutes","EditBusinessHoursTimetable","_accessibility","_didUpdateHours","_showEditTimeblockPopover","_showCopyTimeblockPopover","_showTimeblockPopover","_selectedDay","_selectedTimeBlockId","_daysToCopyTo","_businessHourData","_dropdownArrivalStartIntervals","_dropdownArrivalEndIntervals","_dropdownBusinessStartIntervals","_dropdownBusinessEndIntervals","_dropdownDepartureStartIntervals","_dropdownDepartureEndIntervals","_arrivalStartHasConflicts","_arrivalEndHasConflicts","_businessHoursStartHasConflicts","_businessHoursEndHasConflicts","_departureStartHasConflicts","_departureEndHasConflicts","_EditBusinessHoursTimetable","locationBusinessHours","selectionChanged","checkboxTree","daysToCopyTo","flatMap","subitems","SELECTED","weekdaysOffset","zonedNow","utcToZonedTime","getDay","copyTimeblockDayOptions","CheckboxTreeItem","create","isSelectable","showAllNoneSelectors","disabled","selectedDay","currentBusinessHourDay","businessHourData","businessHourDays","currentSelectedDay","scheduleElements","timeblocks","businessHourDay","locationOpenForBusiness","arrivalStartTime","arrivalEndTime","businessStartTime","businessEndTime","departureStartTime","departureEndTime","classes","ARRIVAL_CLASS","HIDDEN_CLASS","HIDELABEL_CLASS","startMinutesLocal","endMinutesLocal","BUSINESS_HOURS_CLASS","DEPARTURE_CLASS","conflictTimeblocks","times","HALF_DAY","timesPlusSunday","sundayTimes","conflictDelta","j","startTimeEqualsEndTime","CONFLICT_CLASS","setHasConflict","copyHoursText","htmlSafe","dayOfWeek","closeCopyPopover","showEditTimeblockPopover","accessibility","restoreFocus","createTimeBlock","dayNum","isReadOnly","useDefaultValues","selectTimeBlock","updatePreview","selectedPreviewDay","toggleCopyTimeblockPopover","showCopyTimeblockPopover","closeBusinessOnDay","timeBlockClicked","timeBlockId","selectedArrivalStartTimeChanged","didUpdateHours","updateConflictsForCurrentBusinessDay","selectedArrivalEndTimeChanged","selectedBusinessStartTimeChanged","selectedBusinessEndTimeChanged","selectedDepartureStartTimeChanged","selectedDepartureEndTimeChanged","copyBusinessHours","dayToCopy","selectedTimeBlock","selectedTimeBlockId","getTimes","minuteValues","offset","arrivalStart","arrivalEnd","businessHoursStart","businessHoursEnd","departureStart","departureEnd","timeOfDay","DropdownSelectItem","getArrayOfDaysTimes","hasConflicts","arrivalStartHasConflicts","arrivalEndHasConflicts","businessHoursStartHasConflicts","businessHoursEndHasConflicts","departureStartHasConflicts","departureEndHasConflicts","resetConflicts","currentDayTimes","previousDayTimes","nextDayTimes","enableTimeConflict","startIndex","endIndex","CsContactPhoneNumberTypeEnum","BleWifiConfigPermissionAdapter","NetworkConfigAdapter","WifiConfigAdapter","WifiInfoItemAdapter","FrequencyBandEnum","SignalStrengthEnum","WiFiEncryptionAlgorithmEnum","WiFiEncryptionTypeEnum","BleWifiConfigPermission","_hasWifiConfigPermission","_isUsingBleEnrollmentInstallation","_BleWifiConfigPermission","_myWifiNetworks","_otherWifiNetworks","_encryptionTypeOptions","_securityTypeOptions","_selectedNetworkSSID","_selectedPassword","_selectedSecurityType","_selectedEncryptionType","_disallowedSsidOrPasswordCharactersList","_wirelessConnectionInstructionsToDisplay","_isCopyingNetwork","WifiConfig","_WifiConfig","WirelessConnectionInstructionsTypeEnum","WifiInfoItem","_networkSSID","_isEncrypted","_isDeviceConnected","_isDeviceConnectionInProgress","_numberOfConnectedDevices","_encryptionType","_algorithm","_frequencyBand","_signalStrengthEnum","_WifiInfoItem","networkConfigEngine","_NetworkConfigAdapter","didUpdate_","SvgSymbol","clickHandler","_this$args$onClick","iconPath","_config$adcSvgSyste","_config$adcSvgSyste2","ariaLabel","labelText","desc","hideForAccessibility","isHiddenForAccessibility","isInteractive","isFocusable","iconCss","fillColor","loadSvgDefs","defsElement","getSpriteSelector","replaceWith","cloneNode","hasSvgDefs","_SvgSymbol","_spriteMarkup","SvgSpriteLoader","spriteRootPath","spritePaths","spritesData","spriteUrl","_text$replace","spriteMarkup","drop","_SvgSpriteLoader","EmptyContainer","templateOnlyComponent","emptyContainer","AndHelper","p","guidForFn","isPresentHelper","truthConvert","truthy","isTruthy","not","len","PromiseHashTrackedHelper","ResolveModelHelper","safeHtml","isHTMLSafe","addDelayedCssSignature","modifier","css","AutoFocusModifier","Modifier","modify","elementToFocus","runTask","hasAttribute","DidResizeModifier","observer","handlers","ResizeObserver","entry","unobserve","domElement","addHandler","debounceId","removeHandler","delete","instance","coalesce","eq","math","op","abs","gt","lt","or","toBoolean","validationErrorHelper","propertyError","_propertyError$firstO","buttonNative_","coalesce_","_shouldHide","ActionButtons","confirmButtonVisible","_this$args$confirmBut","confirmButtonNativeType","cancelButtonVisible","_this$args$cancelButt","cancelButtonNativeType","shouldGoBackAfterAction","confirmAction","buttonAnimation","callAction","cancelAction","actionName","_owner$lookup","_api$navigationApi","_api$navigationApi$tr","navigationApi","_ActionButtons","ActionSheetHost","actionSheetHost","isPending_","spinnerSvg_","await_","AsyncLoader","noop_","wrapper","dom","classNames","classNameBindings","matchTriggerElementWidth","popoverIsFocusable","focusSelector","didInsertElement","setPopoverWidth","triggerSelector","triggerId","anchorSelectorForPopover","isDefaultAnchorSelector","matchTriggerElementWidthObserver","popoverAnchor","popoverClasses","popoverClass","placement","popoverPlacement","boundariesElement","boundariesPadding","isOpen","popoverWidth","popoverMaxWidth","popoverMaxHeight","preventScroll","fullScreenOnMobile","triggerElement","AsyncButtonIcon","buttonSimple_","svgSymbol_","_media","ButtonIcon","simpleButtonStyle","getSimpleButtonStyle","buttonStyle","reversedCss","_this$args$buttonStyl","getAnyButtonStyle","buttonText","responsiveText","media","isMobile","_ButtonIcon","buttonAsync_","and_","publishNativeButton","isRenderedNative","nativeType","updateNativeToolbarButtons","buttonAction","componentId","elementId","isPending","click","disposeNativeButton","disposeNativeButtons","_asyncState","_isPending","_isRenderedNative","NativeButton","_this$args$id","noDelay","propertiesChanged","updateAsyncState","asyncState","_NativeButton","EnumAsyncState","idle","equal","pending","buttonAsyncButtonIcon_","ButtonSelected","buttonColor","formGroup_","passwordInput_","t_0","await_0","not_","asyncLoader_","PasswordStrengthPrefixes","_pwd","_newPwd","_pwdConf","_isSuggestionsDropdownExpanded","ChangePassword","passwordConfirmation","requiredLength","_this$args$requiredLe","passwordConfirmationError","confirmationPasswordError","internalPasswordError","passwordStrengthKey","passwordStrengthInt","passwordStrength","_this$args$passwordSt","passwordStrengthData","strength","passwordStrengthTranslated","strengthBarBoxes","strengthBoxes","class","requirements","numberMatches","symbolMatches","letterMatches","numbersRequired","symbolsRequired","lettersRequired","lengthCriteria","minimumCount","isMet","requirement","updateNewPassword","passwordValue","onChangeNewPassword","getPasswordStrengthAction","updateConfirmPassword","onChangePasswordConfirmation","updateField","fieldKey","_this$args$fieldKey","_ChangePassword","CheckboxTreeAllNoneSelector","allNoneSelector","CircleIcon","iconStyle","iconSize","animationCSS","_this$args$animationS","getAnimationCSS","animationState","NONE","_CircleIcon","guidFor_0","simpleBinaryList_","smartDateRange_","DATE_SINGLE","DATE_RANGE","getSelectedDates","isRangeSelected","startDate","endDate","DateRangePickerComponent","_isOpen","_startSingle","_endSingle","_startRange","_endRange","_selectedType","_isRangeSelected","_DateRangePickerComponent","BaseTimezoneControl","timeFormat","_this$args$formats","formats","showSeconds","displayText","_args$formats$date","_args$formats","zone","dates","fnFormat","BinaryListItem","label","selectedType","isRange","invalidDateRange","validationFn","configurePicker","seed","subMinutes","minDate","maxDate","fnAddDate","isEqual","getZonedDate","singleDate","startSingle","getUtcDateFromZone","startOfDay","endSingle","endOfDay","switchType","items","_A$findBy","togglePicker","cancelPicker","changeTimeValues","selectRange","reportValidity","VALUE_CHANGE_ACTION","DrillThroughItem","borderBottom","_this$args$borderBott","forceLtrForSubDescription","_this$args$subdescrip","subdescription","media_","DropdownActionsResponsiveHeader","responsiveHeader","ListItemComponent","onKeyUp","_ListItemComponent","dropdownActionsListItem_","ItemsListComponent","itemsList","willDestroy_","baseDropdownWrapper_","coalesce_0","dropdownActionsResponsiveHeader_","dropdownActionsItemsList_","initializeInternalItems","updateInternalItems","itemsInternal","DropdownActionItem","_isLoading2","_itemsInternal","DropdownActions","_this$args$validateOp","_this$args","validateOpen","toggleDropdown","actionArguments","keepOpenAfterItemTriggered","replaceTriggerWithLoadingSpinner","_this$_isOpen","initializeItems","clearTriggerListener","_DropdownActions","searchToolbar_","DropdownMultiSelectToolbar","checkboxTreeAllNoneSelector_","DropdownMultiSelectTreeWrapper","treeWrapper","didResize_","dropdownSelectMultiSelectToolbar_","dropdownSelectMultiSelectTreeWrapper_","errorTooltip_","ChecklistTreeInfo","_props$title","_props$items","_props$maxItemCount","_props$additionalItem","_props$show","_props$noResults","_props$showHeader","_props$showAllNoneSel","maxItemCount","additionalItemCount","show","noResults","showHeader","displayItems","updateItemState","setEach","selectAll","selectNone","UNSELECTED","_ChecklistTreeInfo","setFocusSelector","fnUpdateFocusSelector","s","showSearch","setFocusBackToTrigger","_document$querySelect","hasCustomTrigger","firstElementChild","contentId","clearErrorMessageTrigger","scheduleOnce","cloneItems","flatten","subItems","synchronizeItems","clones","clone","getFilteredItems","searchString","filteredItems","hasSubitems","doesItemMatchSearch","_resolvedItems","_isEmpty","_showSearch","_isFiltered","_isPlaceholderShown","MultiSelectComponent","resolvedItems","updateFocusSelector","isSimpleList","isEvery","limitItems","selectedItems","getAllSelectedItems","unselectedItems","rejectBy","itemCollections","selected","limit","unselected","selectedCount","unselectedCount","selectedMax","getCheckList","itemCollection","alwaysShowHeaders","selectedTree","itemsText","unselectedTree","triggerText","isFullySelected","placeholder","triggerTextHtml","hasSelectionChanged","currentSelections","previousSelections","previousItem","saveSelectionChange","currentValue","previousValue","valueChangeParameter","valueChangeAction","triggerResized","triggerTextChanged","innerText","updateFocusSelectorForElement","dataset","onDropdownOpen","cachedSelections","onDropdownClose","tree","clearErrorMessage","togglePopoverVisibility","_MultiSelectComponent","empty","bool","eq_","updateSelectedValue","shouldIgnoreAction","selectItem","toggleErrorMessageVisibility","hideErrorMessage","_hideErrorMessage","_selectedItems","_selectedItem","SingleSelectComponent","resolvedErrorMessage","selectedValue","_flattenedItems$findB","flattenedItems","acc","val","selectedItem","synchronizeSelectedItem","_this$args$value","_this$resolvedItems$f","itemClicked","onErrorMessageChange","updateOption","removeAttribute","_SingleSelectComponent","reads","ExpandButton","expandButton","FieldsetHeader","fieldsetHeader","FormGroup","formGroup","DangerIcon","DangerIcon$1","InfoIcon","InfoIcon$1","SuccessIcon","SuccessIcon$1","WarningIcon","WarningIcon$1","TYPES","InlineAlert","InsetGroup","insetGroup","Input","or_","getKeywordInSearchString","matches","getMatchedKeyword","keywordOptions","keywordInSearchString","keyword","displayName","getSuggestedSearchString","_showKeywordSuggestionPopover","KeywordSearch","_keyword$displayName","matchedKeywordSuggestions","_this$args$keywordOpt","matchingKeywords","keywordOption","suggestedKeywords","_this$matchedKeywordS","suggestedSearchString","applySuggestedKeyword","showKeywordSuggestionPopover","applySearch","updateSearchString","keyDownEventListener","selectionStart","skipDebounceTime","matchedKeyword","_keyword","applySearchFn","_KeywordSearch","dropdownActions_","editText","deleteText","setActionItems","actionItems","deleteAction","ActionItem","visible","DeleteActionItem","iconTitle","EditActionItem","validateActionItems","listRowItem","layout","attributeBindings","highlightRow","areActionsDisabled","resetActionItems","showEllipsis","actionsTitle","keyDown","onContentClick","callSetActionItems","validateActionItemsOpen","_this$actionItemsColl","actionItemsCollection","focusTrap_","_modals","ModalsHost","escapeDeactivates","allowOutsideClick","initialFocus","modalKeyTrigger","_modals$lastObject","modals","modalsToRender","modalBackdropTrigger","_this$modals$modalsTo","disableBackdropClose","closeModal","_ModalsHost","ModalHeader","_ModalHeader","addDelayedCss_","modalsBaseHeaderModalHeader_","modalsBaseFooterModalFooter_","BaseModal","ariaLabelledBy","EditConfirmationModal","editConfirmed","_EditConfirmationModal","modalsBaseBaseModal_","SimpleDialog","simpleDialog","Textarea","resizeElement","scrollHeight","MultilineTextInputComponent","onKeyDown","enter","onFocusIn","_MultilineTextInputComponent","AppNotificationComponent","autoCloseDuration","notification","isTesting","remove","closeNotification","lastFocusedElement","keyUpHandler","buttonClicked","returnValue","_AppNotificationComponent","notificationManagerAppNotification_","NotificationManager","_notification$element","removeNotification","_NotificationManager","pageView_","routeViewContentDeleteModel_","PageViewEdit","getCancelButtonAction","doNotGoBackAfterAction","_PageViewEdit","PageViewList","_isPasswordMasked","PasswordInputComponent","_PasswordInputComponent","PikadayInputComponent","BasePikadayComponent","onPikadayOpen","onOpen","onPikadayClose","pikaday","field","onSelection","onClose","initPikaday","setupPikaday","setMinDate","setMaxDate","setPikadayDate","updateOptions","hidePikaday","_this$pikaday","hide","_PikadayInputComponent","_internalValue","PinInput","onExternalValueChange","isCodeVisible","_this$args$isCodeVisi","onlyAllowNumbers","_this$args$onlyAllowN","minPinLength","placeholderDigitsNumber","placeholderString","buttonLabelInternal","buttonLabel","generateRandomPin","generatePinMethod","generateMethodResult","resultPromise","newValue","debouncedValueChange","onChange","internalValue","_PinInput","QRCodeSizes","small","medium","large","QRErrorCorrectLevel","L","M","Q","H","QrCodeComponent","initializeQRCode","_args$darkColor","_args$lightColor","_args$correctionLevel","size","qrDimension","qrcode","QRCode","colorDark","darkColor","colorLight","lightColor","correctLevel","correctionLevel","makeCode","makeQRCode","_this$qrcode","_QrCodeComponent","DeleteModelComponent","_this$args$model$text","fnAction","requireConfirmation","confirmTitle","confirmText","confirmButtonText","_DeleteModelComponent","inlineAlert_","lastRenderMark_","RouteViewContentErrorContent","errorContent","_show","PendingContent","showDelay","_this$args$showDelay","_PendingContent","routeViewViewContainer_","EditView","RouteView","cancelButtonText","cancelText","cancelButtonAction","_this$navigationApi","_EditView","WebApiPromise","PromiseObject","hasData","isFulfilled","hasNoResults","_WebApiPromise","ViewContent","RouteViewViewContainerHeaderContent","headerContent","routeViewViewContainerViewContent_","routeViewContentPendingContent_","routeViewViewContainerHeaderContent_","routeViewContentFulfilledContent_","routeViewViewContainerNoResultsContent_","routeViewContentErrorContent_","ViewContainer","removeDefaultClasses","addObserver","isFulfilledObserver","removeObserver","contentWidthClass","contentWidth","computedContentTagName","contentTagName","contentClass","errorText","_this$promise","reason","dataLoaded","wasRouteTimingReported","urlForReportedRouteTiming","_ViewContainer","RouteViewViewContainerNoResultsContent","noResultsContent","getSegmentIndex","minutesAfterMidnight","MILLISECONDS_IN_MINUTE","getTimeFromSegmentIndex","getFormatter","DateTimeFormat","_internalBeginTimeInMilliseconds","_internalEndTimeInMilliseconds","SchedulePicker","setInternalTime","_this$args$localeCode","selectedDays","_this$args$selectedDa","disabledDays","_this$args$disabledDa","isEndTimeNextDay","internalEndTimeInMilliseconds","internalBeginTimeInMilliseconds","resetTimeMinutes","_this$args$resetTimeM","nextDayText","allowNextDayTimes","_this$args$weekStarts","formatter","compactMode","longDayNameFormatter","firstDayIndex","currentDay","fullDayName","format","beginHours","endHours","isEndHours","hourOffset","segmentCount","HALF_HOURS_IN_DAY","endTimeBound","beginTimeBound","extraEndTimeBuffer","resetEndTimeOnBeginTimeChange","ceil","selectedIdx","displayedNextDayText","validateAndUpdateTimes","updateEndTimeWithBeginTime","oldBeginTimeInMilliseconds","resetTimeAmount","isInteger","getValidatedInternalEndTime","notifyChangeListeners","_this$selectedDays","_this$internalBeginTi","_this$internalEndTime","_this$internalBeginTi2","_this$internalEndTime2","results","beginTimeInMinutes","endTimeInMinutes","beginTimeInSeconds","MILLISECONDS_IN_SECOND","endTimeInSeconds","_this$args2","isValidTimeValue","initialBeginTime","initialEndTime","toMillisecondsMultiplier","beginTimeInMilliseconds","endTimeInMilliseconds","fnGetTime","MILLISECONDS_IN_HOUR","pickerChangeUpdate","externalBeginTimeUpdate","externalEndTimeUpdate","focusActiveElement","_element$querySelecto","currentActiveElementDataID","selectDay","_this$internalBeginTi3","_this$internalEndTime3","_this$internalBeginTi4","_this$internalEndTime4","newSelectedDays","updateTime","segmentIndex","_SchedulePicker","ScheduleTypeView","BaseSchedule","isScheduleEmpty","_this$planSchedules","planSchedules","planSchedule","combinedSchedules","scheduleTypeText","temporaryAccessPlanScheduleText","isScheduleAllTimes","allTimesText","emptyScheduleText","customScheduleText","_ScheduleTypeView","scheduleHourLabels_","ScheduleViewCompact","_this$args$allTimesTe","editTimetable","_this$args$editTimeta","hourLinePositions","NINE_AM","TWELVE_PM","FIVE_PM","getScheduleElements","gridDays","schedules","timeBlocks","_ScheduleViewCompact","ScrollContainer","toggleScrollCss","scrollableContent","parentElement","scrollShadowHostClassList","toggle","handleScroll","recomputeScroll","scrollableChild","sc","closest","_ScrollContainer","SearchInput","searchInput","SearchToolbar","searchToolbar","simpleBinaryLabel_","SimpleBinary","reverse","wrap","updateIndeterminate","indeterminate","checked","_SimpleBinary","SimpleBinaryButton","simpleBinaryButton_","simpleBinary_","iconFill_","_isLongList","SimpleBinaryButtonList","isMultiSelect","_this$args$isMultiSel","listCss","_this$args$orientatio","orientation","isLongList","listItemChanged","_this$args$onchange","onchange","allowDeselect","binaryToggled","_SimpleBinaryButtonList","BinaryLabel","simpleListItem_","SimpleList","SimpleListChevronValue","chevronValue","isPresent_","SimpleListDetails","details","simpleListDetails_","simpleListChevronValue_","SimpleListItemComponent","handleKeyDown","onClick","_SimpleListItemComponent","_value","_disabled","_subitems","SelectItem","_args$state","_args$disabled","_args$subitems","_args$props","_SelectItem","_items","SingleSelect","_yield$this$args$item","isSelected","updateSelect","hasSelectedItem","convertValue","fnGetType","errorMessageUpdated","_this$args$error$text","_this$args$error","itemSelected","valueUpdated","flat","setPlaceholderState","updateOptionState","setOptionState","_SingleSelect","smartDate_","smartTime_","setMinutes","updateDate","setYear","getMonth","getYear","SmartDateRangeComponent","notifyDateChange","fields","fnRecalculate","updatedProps","prefix","computedValue","_this$args$showMultiD","showMultiDayRange","changeTime","isStart","changeDate","_SmartDateRangeComponent","emitChangeEvent","SmartDateComponent","BaseTimeControl","isNativeDateInputSupported","getIsTouchDevice","pattern","getFormattedDate","displayDate","_this$getFormattedDat","inputChanged","hasTouchEvents","KeyboardEvent","inputBlurred","setCustomValidity","_SmartDateComponent","getAdjustedTime","_this$zonedDate","outputFormat","zonedDate","getBoundaryErrorMessage","fnGetText","intlFormat","zonedMin","zonedMax","SmartTimeComponent","isNativeTimeInputSupported","useMeridiem","fmt","expectMeridiem","segments","displayTime","invalidInput","_SmartTimeComponent","ALLOWED_SIZES","SpinnerSvg","_SpinnerSvg","spinning","_this$args$spinning","StatusToggle","statusColor","_this$args$color","color","valueChangeTrigger","onValueChange","keyUpTrigger","keyDownTrigger","setInputFilter","textInput","inputFilter","input","oldValue","oldSelectionStart","oldSelectionEnd","selectionEnd","hasOwnProperty","setSelectionRange","_dom","_maxLength","TextInput","errorDuration","convertAutoDestroyToDuration","autoDestroy","updateInternalValue","sendUpdate","maxLength","stringValue","handleInputChange","onComponentInsert","onKeyDownNonDebounced","onKeyUpNonDebounced","clearInput","_TextInput","Tooltip","PopoverMenu","ZoomPanOverlay","_this$args$isEnabled","cancelEvent","getBounds","scale","boundsX","boundsY","constrainAndNotifyNewParams","newScale","zoomPanStyle","announceZoomPanLimitations","zoomPanLimitationsUpdated","canPanLeft","canPanRight","canPanUp","canPanDown","canZoomIn","canZoomOut","setSizeValues","elementSelector","triggerZoom","zoomAmount","centeringFactorForZoom","eventLocationX","eventLocationY","isInitialized","delta","unboundedScale","reset","initializeComponent","sendDigitalZoomPanMethod","eventDirection","position","relativeDirections","in","out","deltaY","down","initializeIfReady","resizeListener","zoom","offsetX","offsetY","onDoubleClick","startPanning","clientX","startX","clientY","startY","mouseEventHandlers","tearDownListeners","_this$mouseEventHandl","stopPropagationIfZoomedIn","_ZoomPanOverlay","GetModalButton","isPrimary","cfg","getModalFooterButton","handleBinaryChange","iconFill","ShowConfirmationModal","confirmButtonProperties","cancelButtonProperties","cssClass","_ShowConfirmationModal","setupUiComponents","application","register","EmberObject","singleton","updateRootVariable","rootStyle","dasherize","classify","setProperty","textColor","AccessibilityService","saveFocusedElement","_this$lastFocusedElem","focusElement","updateDealerColors","headerColor","navColor","highlightColor","activateDisplayMode","featuresList","displayModeClasses","list","getDisplayModeClasses","modalsConfirmationsEditEditConfirmations_","ConfirmDeleteDialog","_ConfirmDeleteDialog","RenameDialog","saveChanges","_this$cachedValue","rename","cachedValue","output","changeInputValue","_evt$target$value","keyInput","_evt$target$closest","closeBtn","_RenameDialog","ConfirmationDialog","ConfirmationDialog$1","InfoDialog","updateScrollIndicator","dialog","_InfoDialog","activeModals","_model","Modal","_Modal","ModalService","modalIsOpen","_modalsToRender","nativeButtons","nativeButtonType","renderAsNative","hasHTML","showModal","hideNotifications","showInfoModal","showRenameModal","showDeleteModal","showLoadingModal","LoadingDialog","finally","showPromiseModal","PromiseDialog","keepNotificationsHidden","lastModal","showNotifications","closeAllModals","_ModalService","createNotificationType","persistent","_config$notificationM","addNotificationFromType","notificationType","autoCloseDurationOverride","Element","addNotification","hidden","returnDedupedNotifications","newNotification","notifications","appNotification","_appNotification$auto","isMuted","msg","_notifications","_isMuted","infoType","successType","warningType","errorType","sessionEndedType","addInfo","addWarning","addSessionEnded","mute","iconDesc","iconIsHiddenForAccessibility","clearNonPersistentNotifications","clearNotifications","unMute","_cfg$timeZone","zonedTimeToUtc","_BaseTimezoneControl","ButtonAsync","_isSuccess","success","failure","isSuccess","isFinished","asyncType","_ButtonAsync","_toArray","_toArray2","ButtonSimple","buttonCss","_toArray3","lastColor","handleClick","_this$args$buttonActi","_ButtonSimple","DetailedCheckboxContent","checkboxTreeDetailedCheckboxContent_","expandButton_","DetailedCheckboxInput","executeAction","_this$args$onAction","_DetailedCheckboxInput","checkboxTreeDetailedCheckboxCheckbox_","_hasSubItems","_canReceiveFocus","_addGroupSeparator","CheckboxTreeItemComponent","_this$args$isFocusabl","toggleSubitemsVisibility","isCollapsed","_CheckboxTreeItemComponent","notEmpty","and","checkboxTreeTreeItem_","CheckboxTree","areListItemsFocusable","_this$args$items","handleKeyUp","checkbox","isCollapsible","updateItemAction","storeActionOnRootItems","_CheckboxTree","ITEMS_CHANGED_ACTION","itemsChangedAction","CLEAR_ERROR_MESSAGE_ACTION","booleanHtmlAttributeValue","propertyName","send","BaseInput","errorTooltipPlace","required","readonly","isRequired","readOnly","isReadonly","substring","convertDateToZone","determineYearRange","yearRange","yearArray","getFullYear","updateBoundaryDate","boundaryValue","fnCompare","computedOptions","local","synchronizeTimeValues","setMilliseconds","getMilliseconds","onPikadaySelect","selectedDate","hasTimeZone","getDefaultOptions","fnAddOverrides","pikadayContainer","dateFormat","theme","disableDayFn","container","bound","onSelect","onDraw","onPikadayRedraw","keyboardInput","showDaysInNextAndPreviousMonths","Pikaday","keyListener","pikaYear","pikaMonth","pikaDay","isAfter","cleanupPikaday","destroy","_BasePikadayComponent","addClassNames","addAttributes","attribute","ErrorTooltip","destroyTooltip","createTooltip","getTooltipAnchor","_el$firstElementChild","selectorDirection","defaultAnchor","anchor","_el$closest","tooltip","Popper","defaultConfig","contentType","arrowTagName","arrowClassNames","arrowAttributes","popper","jquery","innerHTML","textContent","arrow","parseGenerateConfig","removeOnDestroy","modifiers","preventOverflow","escapeWithReference","ModalFooter","buttonsToRender","_args$buttons","_args$closeButtonText","disableCloseButton","closeButtonText","handleActionResult","clickButton","_ModalFooter","onClickOutside_","SubItem","_props$description","_props$selected","_props$data","_SubItem","_expanded","NavItem","_props$expanded","_props$subItems","expanded","_NavItem","_showNavMobile","NavigationDialog","navigationItems","_this$args$navItems","navItems","initSelectedItem","firstItem","_items$find","updateNavListCss","nav","_NavigationDialog","State","_showSpinner","displayIconType","Success","Failure","currentStateValues","Confirm","stepConfirm","stepPromise","stepSuccess","stepFailure","cancelOnClickFunction","showSuccess","showRetry","allowRetry","displayCancel","displayPromiseButton","_currentStateValues$b","_currentStateValues$b2","processPromise","successOnClickFunction","promiseFn","showError","_PromiseDialog","LoadingDialog$1","_isFulfilled","_isRejected","_hasNoResults","_resolvedModel","_errorText","_hasCalledDataLoadedAction","PageViewContainer","RouteViewContentFulfilledContent","resolvedModel","isRejected","_resolvedModel$meta","_this$args$dataLoaded","meta","totalCount","hasCalledDataLoadedAction","_ex$errors$0$detail","_ex$errors","_PageViewContainer","NativeBridgeComponent","recalculateNativeToolbar","buttonsList","wasBackOrCancel","handleNoNativeBackOrCancelButton","nativeToolbarId","api","componentIds","doNotRecalculateToolbar","_NativeBridgeComponent","nativeBridge_","ensureSafeComponent_","markLastContainerRendered","containersRendered","numOfContainersToRender","PageView","setKpiMetricUsage","_this$args$numOfConta","_this$args$useKpiThre","sendRouteViewRendered","backText","_PageView","LEFT","RIGHT","DEFAULT_PLACEMENT","focusSet","getAnchorElement","anchorSelector","getPopperOptions","onCreate","onCreateAction","flip","createAndSetPopper","updatePopper","cleanupAndRemovePopper","scheduleUpdate","handleTogglePopper","isRenderedWithPopper","shouldRenderWithPopper","_isFocusable","_isRenderedWithPopper","PopoverWrapper","willClose","rtlPlacement","check","replacement","domId","didUpdate","initPopup","trapFocusListener","didRender","focusOptions","willDestroyElement","directRenderOnMobile","togglePopper","extraPopperUpdate","keyDownOnElement","_event$target","clickOutsidePopup","composedPath","_PopoverWrapper","PopoverHeader","popoverHeader","PopoverBody","popoverBody","PopoverFooter","popoverFooter","popoverPopoverWrapper_","popoverPopoverHeader_","popoverPopoverBody_","popoverPopoverFooter_","IN_MODAL_CLASS","ON_MOBILE_CLASS","handleOpenClose","_get","_isMobile","_usesBackdrop","_enhancedCloseOnClick","inModal","modal","backdropDestinationElement","popoverDestinationElement","bodyEl","goodParent","overflowStyles","forbiddenStyleValue","getComputedStyle","openStateChanged","popoverBackdropClass","classForPopover","hasBackdrop","useImprovedCloseOnClick","usesBackdrop","enhancedCloseOnClick","popoverBackdropClicked","togglePopover","closePopover","_this$onBackdropCli","closeOnBackdropClick","_PopoverMenu","insertAt","_canHaveNativeButtons","BaseContentLayerComponent","triggerNativeToolbarUpdate","canHaveNativeButtons","pushObjects","removeObjects","_BaseContentLayerComponent","TEMPLATE$1","appContentEl","getAppContentEl","getElementById","PROPERTY_CLASS_MAP","useFlexbox","useRouteViewClass","MAX_WIDTH_CLASSES","_toolbarComponent","_this$toolbarComponen","toolbarComponent","_this$numOfContainers","_this$useKpiThreshold","containerMaxWidthClass","maxWidth","containerMaxWidth","classesToAdd","willClearRender","_RouteView","ScheduleHourLabels","hourLabels","_this$args$hours","startOfYear","addMinutes","isVertical","_ScheduleHourLabels","_label","_css","_color","_BinaryListItem","SimpleBinaryList","onItemChange","_SimpleBinaryList","_iconCss","_details","_showChevron","_props","SimpleListItem","_SimpleListItem","systemSelectItemsList_","SystemSelectListItem","toggleSubItems","_item$subItems","showSubItems","subItem","_SystemSelectListItem","safeHtml_","systemSelectListItem_","SystemSelectItemsList","searchInput_","_showSubItemsOnOpen","_isSystemParentAccountSuspended","_tooltipText","_subItems","_showSubItems","SystemSelectItem","_props$name","_props$icon","_props$disabled","_props$showSubItemsOn","_props$isSystemParent","_props$tooltipText","showSubItemsOnOpen","isSystemParentAccountSuspended","tooltipText","preventKeyUpOnTrigger","onGlobalKeyUp","_currentItem","activeElementDataIndex","mainItemIndex","subItemIndex","currentItem","_items$mainItemIndex$","_SystemSelectItem","_hasSearchAction","_width","_searchHeight","_searchValue","_focusSelector","_keepSearchVisible","SystemSelect","fnDetermineWhetherToShowItem","showItems","numberOfItemsForSearchToAppear","_this$args$numberOfIt","tabindex","maxHeightWithoutSearch","searchHeight","maxHeight","hasSearchAction","countItems","keepSearchVisible","showTitleWrap","_this$args$onOpen","keyUpListener","_this$args$onClose","_document$getElementB","searchValue","fnCloseSubItems","configurePopup","elList","_elList$querySelector","scrollIntoView","_elList$closest","configureSearch","elSearchWrapper","doSearchAction","_SystemSelect","ALL_TIMES_PROPERTIES","mergeSchedules","startA","endA","startB","endB","shift","last","lastEnd","scheduleStart","scheduleEnd","getPlanSchedule","colorName","timetables","planId","planColor","timetable","_ref3","BaseView","addTimeBlockToScheduleSlot","timeBlock","schedulesSlot","isGridVertical","createElementsForTimeBlock","planNameLabel","getEmptyScheduleElements","dayOfWeekNum","_ref4","planName","planIcon","_this$args$scheduleOb","scheduleObjects","_ref5","_BaseSchedule","fnPushSchedule","_timeBlock$classes","passedInClasses","daySpan","startValue","endValue","elementTitle","_BaseView","WeekViewTimeBlock","weekViewTimeBlock","formatDateTz_","weekViewTimeBlock_","_activeTimeBlockId","WeekView","areTimeBlockLabelsVisible","_this$args$areTimeBlo","daysOfWeek","splice","addTimeBlockToSchedule","timeBlockElementsArray","_this$args$timeBlocks","dayClicked","emptyAreaClicked","halfHourMinutes","halfHourHeight","handleTimeBlockClick","_this$args$timeBlockC","_WeekView","AbstractNavigationApi","setupRouteView","SENDING","WAITING","COMPLETE","createBinaryInputItemObject","PARTIALLY_SELECTED","ensureValueExists","validateSubitemReliantProperties","setSubitemsParent","internalState","setLeafItemStates","setStateAndUpdateParent","uniqueStates","getAllUnitItemStates","isPartiallySelected","isNotSelected","assert","subitem","isNotModifiable","updateParentState","isBaseItem","subItemStates","states","uniq","useParentIfAllSubitemsSelected","isInvalidRange","isNumberInRange","includeSuperiorEdge","normalizeNumberToRange","warmLight","hue","saturation","lightness","percentWarmthRange","neutralLight","coldLight","TEMPERATURES_GRADIENT_VALUE","getHSLCss","fnGradient","constrainHueValue","linearInterpolation","leftValue","rightValue","hexToHSL","hex","cmin","cmax","toFixed","hslColor","hslToHex","substr","hslFromPercentWarmth","percentWarmth","hueRanges","getColorForPercentWarmth","interpolatedLightness","hueRange","percentWarmthToHexString","UNKNOWN","ON","OFF","IFRAME_ID","clipDownloadId","downloadFile","beginFileDownload","downloadImageFromBytes","imageBytes","downloadName","imageBytesWithoutEncodingPrefix","imageDecrypted","atob","arrayBuffer","ArrayBuffer","view","Uint8Array","charCodeAt","imageBlob","Blob","createObjectURL","downloadCrossOriginImage","imageUrl","imageId","fnDone","image","fnFail","canvas","Image","cssText","_canvas$getContext","getContext","drawImage","toDataURL","configureElement","display","download","iframe","touchValue","fnUpdate","toggleBodyScroll","noScroll","timeValue","testInputType","QR8bitByte","mode","QRMode","MODE_8BIT_BYTE","parsedData","l","byteArray","QRCodeModel","typeNumber","errorCorrectLevel","modules","moduleCount","dataCache","dataList","getLength","buffer","write","put","addData","newData","isDark","row","col","getModuleCount","make","makeImpl","getBestMaskPattern","maskPattern","setupPositionProbePattern","setupPositionAdjustPattern","setupTimingPattern","setupTypeInfo","setupTypeNumber","createData","mapData","minLostPoint","lostPoint","QRUtil","getLostPoint","createMovieClip","target_mc","instance_name","depth","qr_mc","createEmptyMovieClip","beginFill","moveTo","lineTo","endFill","pos","getPatternPosition","bits","getBCHTypeNumber","mod","getBCHTypeInfo","inc","bitIndex","byteIndex","dark","getMask","PAD0","PAD1","rsBlocks","QRRSBlock","getRSBlocks","QRBitBuffer","getLengthInBits","totalDataCount","dataCount","putBit","createBytes","maxDcCount","maxEcCount","dcdata","ecdata","dcCount","ecCount","rsPoly","getErrorCorrectPolynomial","modPoly","QRPolynomial","modIndex","totalCodeCount","MODE_NUMBER","MODE_ALPHA_NUM","MODE_KANJI","PATTERN_POSITION_TABLE","G15","G18","G15_MASK","getBCHDigit","digit","errorCorrectLength","multiply","QRMath","gexp","qrCode","sameCount","darkCount","glog","LOG_TABLE","EXP_TABLE","ratio","RS_BLOCK_TABLE","rsBlock","getRsBlockTable","bufIndex","bit","QRCodeLimitLength","_getAndroid","android","sAgent","aMat","parseFloat","svgDrawer","Drawing","htOption","_el","_htOption","draw","oQRCode","nCount","makeSVG","tag","attrs","createElementNS","svg","viewBox","fill","setAttributeNS","child","hasChildNodes","lastChild","CanvasRenderingContext2D","nWidth","nHeight","aHTML","elTable","childNodes","nLeftMarginTable","nTopMarginTable","margin","_onMakeImage","_elImage","_elCanvas","_android","factor","devicePixelRatio","sx","sy","sw","sh","dx","dy","dw","dh","_safeSetDataURI","fSuccess","fFail","self","_fFail","_fSuccess","_bSupportDataURI","fOnError","onabort","_bIsPainted","_oContext","alt","nRoundedWidth","nRoundedHeight","bIsDark","nLeft","nTop","strokeStyle","lineWidth","fillStyle","fillRect","strokeRect","makeImage","isPainted","clearRect","nNumber","vOption","useSVG","_oQRCode","_oDrawing","sText","nCorrectLevel","nType","replacedText","encodeURI","_getUTF8Length","nLimit","_getTypeNumber","CorrectLevel","_cursorPosition","OespPtzUi","deg","svgTransform","cursorPosition","adjustedPosition","CenterOffset","getRotationDegree","center","transform","degrees","cursorStyle","setCursorPosition","controlRect","angle","atan2","PI","_OespPtzUi","oespPtzUi_","_controlRect","_isMovingPtz","OespPtzOverlay","ptzFn","interval","containerWidth","containerHeight","_this$controlRect$hei","_this$controlRect","_this$controlRect$wid","_this$controlRect2","ptzController","apexId","oespController","usage","getFisheyePtzControllerForApexId","getPtzControllerForApexId","updateControlRect","handleZoom","_this$ptzController","_this$args$onFisheyeP","disableZoom","panTiltZoom","onFisheyePanTiltZoomEnd","handleMouseDown","disablePanTilt","isMovingPtz","doPtz","mouseUpListenerId","handleMouseUp","mouseMoveListenerId","handleMouseMove","_this$ptzController2","_this$args$onFisheyeP2","runDelayedPtzFn","isRunning","cancelAll","pan","tilt","handleMouseEnter","currentTarget","getPanTiltParams","_OespPtzOverlay","TOGGLE_MICROPHONE_AUDIO","CHANGE_CAMERA_AUDIO","sendWebRtcCommand","playerId","doCleanup","players","webRtcPlayerInfo","sendPlayerCommand","BaseStateController","playing","speed","_playing","_speed","changeCameraAudio","volume","isEnabledAutomaticallyAfterDelay","alsoCallInternalFunction","attachPlayer","resetPlayers","disconnect","updateUrl","setNewState","displayManager","setPlaybackState","updateState","pause","paused","Paused","resume","Playing","setSpeed","_audioRecordingState","OespPlaybackStateController","Map","TrackedMap","AudioRecordingState","Idle","Set","enableOscarLogging","URLSearchParams","seek","seekTime","playbackTime","Instant","valueOf","setStreamQuality","useHdStream","beginChange","getPane","cameraId","newQuality","StreamQuality","High","Low","cancelChange","commitChange","startPlayback","Direction","Forwards","stepping","_currentTime","Connecting","percentage","startOespLiveRelay","setLive","notifyStateChanged","player","setupPlayers","_this$players","detachPlayer","reactor","SimpleReactor","wsFactory","WebSocketFactory","elementFactory","HtmlElementFactory","mediaSourceFactory","Html5MediaSourceFactory","objectUrlManager","ObjectUrlManager","adcParams","adcRelayToken","username","allowWebrtc","stunServer","nvrConnector","getAdcNvrConnector","nvrManager","NvrManager","oscarFactory","OscarFactory","strategyFactory","RenderTimingStrategyFactory","timeProvider","timingManager","RenderTimingManager","multiPlayer","MultiVideoPlayer","DisplayManager","paneCount","playerCount","localStorage","setItem","LogConfig","processConfig","removeItem","_ref6","setupAudioRecorderListener","_ref7","ptzControllers","fisheyePtzControllers","fisheyeModes","stopAudioRecording","tearDownAudioRecorderListener","panesWithReportedBackchannelErrors","_isEnabledAutomaticallyAfterDelay","beginAudioRecordingConnection","changeMasterPane","muted","beginLiveViewAudioRecordingConnection","_this$isLiveVideo","playerIdIndex","isLiveVideo","startAudioRecordingConnection","masterPane","audioRecordingState","audioRecorder","OscarEvents","StateChange","onRecordingStateChanged","_this$displayManager","recordingState","onBackchannelConnected","Recording","audioRecordingConnectingStartTime","previousRecordingState","timeElapsedMilliseconds","BaseOeStreamLogsApiUrl","has","shouldTalkDownMicrophoneBeMuted","startAudioRecording","setUsersMediaStreamToMuteOrUnmute","mediaStream","_mediaStream","getAudioTracks","toggleMicrophoneMute","shouldMute","pane","getPaneForApexId","nvrInfo","_camera","createPtzController","setFisheyeMode","fisheye","fisheyeInfo","fisheyeMode","fisheyePtzController","createFisheyePtzController","adjustFisheyePanTiltForApexId","panDelta","tiltDelta","displayPane","currentPanTilt","fisheyePanTilt","newPanTilt","adjustFisheyeZoomForApexId","zoomDelta","resetFisheyePanTiltZoomForApexId","_pane$_camera","mountType","mount","FisheyeMountType","Ceiling","setFisheyePanTiltZoomForApexId","fov","fisheyeFieldOfView","getFisheyePanTiltZoomForApexId","paneIndex","_OespPlaybackStateController","END_TO_END_COMMAND_STREAM_QUALITY","END_TO_END_COMMAND_LOAD_MEDIA","WebrtcEndToEndStateController","ProxyAudioSampleRate","PLAYBACK_COMMAND_RESUME","PLAYBACK_COMMAND_PAUSE","PLAYBACK_COMMAND_UPDATE","WebrtcProxyPlaybackStateController","rootUrl","dataChannel","_dataChannel","onopen","pendingData","audioStream","_audioStream","initializeAudioContext","audioContext","AudioContext","sampleRate","audioWorklet","addModule","startAudioStream","workletNode","AudioWorkletNode","port","onmessage","micMuted","readyState","connect","destination","createMediaStreamSource","stopAudioStream","_this$_audioStream","_this$audioContext","_this$workletNode","getTracks","track","stop","playStateCommand","sendProxyUrl","hasAudioStreamStarted","_WebrtcProxyPlaybackStateController","Port443","SixteenNineAspectRatio","TenPercent","TwentyPercent","ThirtyPercent","FourtyPercent","FourtyFivePercent","FiftyPercent","SixtyPercent","SeventyPercent","EightyPercent","getAndSetAspectRatioFromVideo","streamDisconnected","aspectRatioSet","videoPlayer","videoHeight","videoWidth","nativeAspectRatio","setAspectRatioCss","aspectRatio","widthPercentage","handleWebSocketTeardown","sendLogPromise","webSocket","handle","handleAttached","session","sessionCreated","peerConnection","usersAudioStream","detach","promises","clearKeepalive","oneMinuteLogTimeout","clearTimeout","webSocketIsNullOrClosingOrClosed","onicecandidate","oniceconnectionstatechange","ontrack","srcObject","MediaStream","restartStreamIfNotUsingPort443","signallingServerPort","isFallbackToPort443","isStreamRestart","startStream","BaseRtcPlayer","_stateInfo","_message","isEndToEnd","timeoutTimeIfStuckMs","currentStreamPercentage","queriedTimeoutTime","timeoutTimeMs","streamStuckDisconnectionMessage","getVideoPlayer","disconnectOrSendLogIfStreamGetsStuckHelper","disconnectionReason","TimedOut","disconnectStream","getStats","stat","InboundRtp","framesPerSecond","noFpsCount","isStreamFrozen","isPaused","Frozen","FrozenDurationMaxMs","streamStuckAtFrozen","Disconnected","checkStreamQualityTask","RTCLogInformation","RTCDebugLogInformation","setForceTurnProperties","Initializing","attachStreamToVideoTag","_this$streamLoadTimes","logWithMac","ConsoleDebug","forcedAspectRatio","streamingType","webSocketIsOpen","disconnectWithError","FailedToAttach","streamLoadTimesObject","addTiming","AdcWebrtcEndToEndStreamLoadTimeStates","AttachTrack","recorder","addStream","streams","playPromise","play","_this$streamLoadTimes2","onPlayStarted","PlayStarted","ABORT_ERR","StreamingTypePlayback","AutoPlayFailed","AutoplayFailure","autoplayFailed","setPlayerAspectRatio","playStarted","disconnectOrSendLogIfStreamGetsStuck","startRecording","disconnectStreamAtStreamCap","DisconnectedRecordedVVEEStream","cameraDataUsageMode","DataUsageModeEnum","LowDataMode","DisconnectedCellConnectorConnectedCamera","onloadedmetadata","disconnectIfIceFailed","iceConnectionState","IceStateFailed","logMessageToWavefront","WavefrontWebrtcIceFailed","iceNegotiationFailed","IceNegotiationFailed","IceFailure","skipLog","initialLogSent","sentStreamStuckLogDuringProxyStreamLoad","sendLog","cancelTasksAndRecorders","websocketOpened","toggleCameraAudioGain","forceTurn","ignoreRelayCandidates","onlyReceiveRelayCandidates","onlySendRelayCandidates","infoObject","messageType","mac","messageToLog","isInitialLog","streamFailedToConnect","audioStatus","isVirtualCamera","iceStartTime","iceCompletionTime","reports","parsedReport","parseWebRTCStatsReport","logProperties","direct","failed","webRtcStats","_this$streamLoadTimes3","initialLogCandidateStats","localCandidates","remoteCandidates","candidatePairs","OneMinuteMs","usedTurn","WavefrontWebrtcUsedTurn","stunOrTurnString","selectedCandidatePairTypes","selectedCandidatePair","streamPlaying","Log","OPEN","CLOSING","CLOSED","getErrorMessage","_e$error","disconnectionType","logToSentry","shouldRestartPlayer","shouldRestartWebrtcModule","stateArguments","updateLoadingPercentage","requestUsersAudioStreamAndAddToRecorder","supportsAudio","isMicrophoneConnected","sdp","sdpMeetsAudioRequirements","mediaDevices","getUserMedia","microphoneRequestConstraints","attachMicrophoneStreamToPlayer","toggleMicrophoneAudio","_BaseRtcPlayer","WebrtcPreloadingSupport","WebsocketMessageHello","WebsocketMessageStartSession","WebsocketMessageSessionStarted","WebsocketMessagePreloadToSdp","WebsocketMessagePreloadToIce","WebsocketMessageAdcCommand","WebsocketWarningAudioNotAvailable","IceStateConnected","PeerStateNew","PeerStateConnecting","OperatorKeyword","processWebsocketMessage","sendSessionStartMessage","ReceiveSessionStart","sessionInfo","remoteEndToEndPeerId","publisher_peer_id","setUpEndToEndPeerConnection","iceServers","SessionStoppedByServer","keepaliveResponseTimeout","onIncomingSDP","ice","onIncomingICE","onIncomingWarning","endsWith","WavefrontEndToEndNotDialedIn","CameraNotYetDialedIn","CameraHasDisconnected","ConsoleWarn","videoPreloaderRtcProps","preloadingSupportEnum","ReceiveHello","startSessionMessage","PreloadToSdp","PreloadToIce","cameraAuthToken","endToEndWebrtcConnectionInfo","operatorSessionKeyword","urlForRecordingStream","sendWebSocketMessage","SentSessionStart","_this$upstreamLogger","pcConfig","RTCPeerConnection","upstreamLogger","processIceCandidate","processIceState","_this$videoPreloaderR","onTrackCallback","CreatePeerConnection","_this$upstreamLogger2","to","ReceiveSdp","localEndToEndPeerId","setRemoteDescription","SetRemoteSdp","createAnswer","_this$upstreamLogger3","CreatedAnswerSdp","setLocalDescription","SetAnswerSdp","responseSdp","localDescription","SentAnswerSdp","shouldDelayTurnProcessing","delayProcessingRelayCandidates","turnDelayTimeMs","sendIceCandidateToRemotePeer","candidate","RTCIceCandidate","IceCandidateTypeRelay","remoteCandidateQueue","createIpSwappedIceCandidateForNetworkedConnections","addIceCandidate","CameraSpeakerAlreadyInUse","networkedDevicePrivateIp","originalCandidateString","isHostCandidateToCopy","IceCandidateTypeHost","isSrflxCandidateToCopy","IceCandidateTypeSrflx","address","protocol","IceCandidateTypeUdp","newCandidateString","ipSwappedCandidate","sdpMid","sdpMLineIndex","usernameFragment","localCandidateQueue","processRelayCandidateQueues","connectionState","peerStateNewOrConnecting","IceCompleted","addOnSelectedCandidatePairChangeEventListener","_this$peerConnection","iceTransport","getSenders","transport","onselectedcandidatepairchange","updatedSelectedCandidatePair","getSelectedCandidatePair","updatedLocalCandidate","updatedRemoteCandidate","remote","EndToEndRtcPlayer","_this$endToEndWebrtcC","audio","video","shouldForceEndToEndWithExtendedTimeouts","setTurnDelayProperties","isWebRtcConnected","_this$peerConnection2","turnDelayQueryParameter","hasStreamLoadTimeFeatureToggle","signallingServerUrl","signallingServerToken","CreatedRtcClass","WebrtcStreamRecorder","portMatches","portWithColon","portWithoutColon","signallingServer","signallingServerUrlWithoutPort","RequestOpenWebsocket","WebsocketOpened","SendHello","WebsocketClosed","_this$peerConnection3","addTrack","WebrtcAudioStatus","SentAndReceivedAudio","OnlyReceivedAudio","setKeepalive","keepaliveTimeout","KeepaliveFailed","cameraDoesntSupportProxyFallback","FailedToConnect","command","requestParams","stream","hdStreamQualityMessage","sdStreamQualityMessage","adc_cmd","createStreamMessageWithObject","stopRecording","getCurrentUrlForRecordingStream","urlSuffix","updateFrequency","mediaRecorder","createMediaRecorder","recordMediaThenCreateNewMediaRecorderTask","isFromCamera","cameraStream","userStream","cameraAudioGainNode","gain","finalStream","mixedStream","mixCameraAndUserStreamsIntoSingleStream","onstop","sendEndOfStreamMessage","tracks","cameraVideoTrack","cameraAudioTrack","Audio","videoExists","audioExists","cameraAudioTrackStream","audioDestination","createMediaStreamDestination","gainNode","createGain","audioSource1","audioSource2","mixedAudioTrack","MediaRecorder","ondataavailable","sendRecordedStreamData","blob","currentUrlForRecordingStream","uploadCount","processUploadError","uploadFailureCount","additionalErrorInfo","firstFailureIndex","uploadUrl","reportClippyMessageToWavefront","WaveFrontClippyMessage","failedToUploadFragment","_WebrtcStreamRecorder","getPlayerId","playerPrefix","BasePlayer","_playerId","playerContainerId","_BasePlayer","getImgElement","attemptToSetUpImgListeners","img","imgErrorFunction","imgLoadFunction","disconnectedTimer","removeListenersAndTimers","MjpegPlayer","_MjpegPlayer","BaseImgIdPrefix","altText","cameraName","insertImageTag","insertCachedMjpegProperties","updateMjpegStreamingValues","cachedMjpegProperties","currentValues","mjpegPlayer_","openeyePlayer_","webrtcPlayer_","BaseOpeneyeIdPrefix","BaseVideoIdPrefix","LiveVideoPlayer","playerClassName","isMjpeg","isOesp","oespPlaybackStateController","playbackStateController","webrtcEndToEndStateController","_LiveVideoPlayer","OeRelayFallbackTimeout","ForceOeWebrtcTimeout","connectToPlaybackStateController","playbackStateControllerInitCompleted","getOsdProperties","_this$args$playbackSt","renderTime","streamStats","OpeneyePlayer","OeDirectFailureReasonEnum","OeRelayFailureReasonEnum","directFailureReason","relayFailureReason","initial","stats","transportInfo","getWebRtcStats","parsedReports","update","isTimeout","_getOsdProperties$cal","prevTime","frozen","disconnectIfStreamGetsStuck","_this$args$playbackSt2","_this$pane","transportType","OeStreamTransportType","WebRTC","newCamera","dewarpConfig","generateFisheyeInfoFromDewarpConfig","onOscarStateChange","TransportStateChange","onOscarTransportStateChange","videoWrapper","hasStreamConnected","OeStateType","MediaPresent","Starting","startOsdTicker","lastMode","FisheyeMode","Ptz","lastPan","lastTilt","lastFov","stopOsdTicker","updateCurrentStreamIsEndToEnd","failureReason","noStreamAvailable","connectedButFailed","transportState","OeStreamTransportState","Connected","NoMediaPresent","NoStreamAvailable","ConnectedButFailed","WebrtcFailed","WebrtcNotAllowed","WebsocketFailed","lastInstant","animationRequest","handleTick","UpdateOsd","cancelAnimationFrame","osdProperties","convertInstantToSeconds","updateStateIfStreamIsFrozen","checkPlaybackStateController","updatePlaybackStateController","onAttachToOespController","_OpeneyePlayer","JanusPluginHandle","JanusSession","disconnectionFunction","nextTxId","txns","eventHandlers","verbose","timeoutMs","keepaliveMs","keepaliveErrorReceived","attach","plugin","opaque_id","resp","ev","callback","signal","sender","handle_id","sendMessage","sendJsep","jsep","sendTrickle","dispose","_killKeepalive","txId","txn","janus","receive","_logIncoming","session_id","responseType","transaction","_transmit","_logOutgoing","_resetKeepalive","_sendKeepalive","PROXY_DISCONNECTION_CODE_AUTH_ERROR","PROXY_DISCONNECTION_CODE_CAMERA_NOT_REACHABLE","disconnectAfterKeepaliveFailure","ProxyRtcPlayer","echoCancellation","noiseSuppression","channelCount","DefaultProxyStreamTimeoutSeconds","DefaultMaxTimeoutSeconds","hasReceivedSlowLinkMessage","hasSentSlowConnectionMessage","PoorStartingConnection","coturnTuplets","coturnAddressesTuplets","coturnAddressesTupletsArray","candidateQueue","packetsSize","streamTimeoutSeconds","proxyWebrtcConnectionInfo","urlQueryParams","spsAndPpsRequired","deviceModel","firmware","streamMaxTimeoutSeconds","usingPort8989","supportsAudioForProxyStream","audioUpStreamUrl","visualVerificationRecord","janusGatewayUrl","webSocketOpen","localCandidate","completed","strCandidate","tuplet","public","private","eventData","receiveIceCandidate","processStatus","performHandshake","messageBody","is_private","media_uri","media_uri_query","add_sps_pps","is_virtual","streaming_type","timeout_seconds","max_timeout_seconds","videoport","videopt","videortpmap","videofmtp","webrtcProxyPlaybackStateController","createDataChannel","responseData","plugindata","sentCandidate","ans","isWebrtcUp","webrtcUpPromise","janusGatewayUrlHostname","websocketFailed8989WavefrontMessage","WavefrontProxyWebsocketFailed8989","websocketFailedWavefrontMessage","WavefrontProxyWebsocketFailed","GenericProxyError","remoteDescription","statusMessage","MessageTypeSlowLink","MessageTypeEvent","disconnectionMessage","proxyDisconnectionType","Error$1","sendPoorConnectionMessageOnSlowLink","NoAudioOverProxySupport","_currentStreamPercentage","_this$session","_ProxyRtcPlayer","isUserCausedDisconnection","PlayerDestroyed","UserLeftPage","haveAllRequiredProxyVariables","sendStateUpdate","stateInfo","loadingPercentageString","resetValues","adcRtcPlayer","WebrtcPlayer","beforeUnloadEventListener","componentRenderedTime","currentWebRtcStreamingValues","insertVideoTag","videoTagCreated","handleStreamAttributeChange","checkStateControllerAndSetCachedWebRtcProperties","updateWebRtcStreamingValues","cachedWebRtcProperties","updateUrlProperties","attemptToStartStream","onStreamConnected","videoPreloaderDetail","webRtcProperties","StreamingTypeLive","logMessageToWavefrontTask","createEndToEndRtcPlayer","AdcWebrtcEndToEndStreamLoadTimes","createProxyRtcPlayer","getAdcRtcPlayer","rtcPlayer","isConnected","_this$args$updateStat","eventName","attachEventToVideoElement","attachUpdateState","isProcessingDownload","haveAllProxyVariables","DisconnectingToAttemptProxy","PlayEnded","_WebrtcPlayer","Transport","CandidatePair","RemoteCandidate","LocalCandidate","OutboundRtp","WebRTCWaveFrontApiEndpoint","getFisheyeSettings","newProps","fisheyePanTiltZoom","transformDewarpConfigMountType","Wall","mountAngle","geometry","centerX","centerY","focalLength","sqrt","theta","cos","sin","adjustPanTiltScale","Kilo","Mega","RATE_PRECISION","instant","TimeDefs","TimeUnitsPerSecond","formatResolution","videoCodec","videoResolution","formatVideoCodec","CodecType","Mjpeg","Mpeg4","H264","formatFrameRate","frameRate","formatBitRate","bitRate","ColumnItemSeparator","RowSeparator","webrtcEndToEndTimingsExcelHeader","enumObj","header","enumToExcelHeader","AdcWebrtcBaseStreamLoadTimes","_componentRenderedTime","timings","timingsToExcelRow","candidatePairTypes","webrtcPlayerRendered","CreatedWebrtcPlayer","timeAtLastState","arrayValues","startingTime","keyToEnum","timeAtCurrentState","valueToPush","isProxy","report","localCandidateStatsDictionary","remoteCandidateStatsDictionary","rtcTransportStats","rtcStatsObject","_webRtcStats$reportTy","reportType","selectedCandidatePairStats","rtcTransportObject","selectedCandidatePairId","candidatePair","selectedLocalCandidate","localCandidateId","selectedRemoteCandidate","remoteCandidateId","localType","candidateType","remoteType","LocalStateService","_numChanges","numChanges","saveLocation","setAndCreate","pathToSet","nestedLevel","currentProp","_LocalStateService","PlaceholderService","Evented","subscribe","placeholderItem","subs","subscriptionTargets","placeholderKey","unsubscribe","targetPlaceholderKey","sub","updatePlaceholder","darkModeListener","isDarkModeEnabled","darkModeRequest","matchMedia","classToggler","requestMatches","fnApplyDarkMode","destructor","__webpack_module_cache__","moduleId","cachedModule","loaded","__webpack_modules__","O","chunkIds","priority","notFulfilled","Infinity","fulfilled","getter","definition","defineProperty","enumerable","f","chunkId","u","miniCssF","globalThis","Function","prop","done","script","needAttach","scripts","getElementsByTagName","charset","nc","onScriptComplete","prev","doneFns","Symbol","toStringTag","nmd","paths","children","installedCssChunks","miniCss","fullhref","existingLinkTags","dataHref","rel","existingStyleTags","findStylesheet","oldTag","linkTag","nonce","realHref","dir","createStylesheet","loadStylesheet","installedChunks","installedChunkData","realSrc","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","chunkLoadingGlobal","__webpack_exports__"],"sourceRoot":""}