@openmrs/esm-stock-management-app 1.0.1-pre.327
Sign up to get free protection for your applications and to get access to all the features.
- package/.editorconfig +12 -0
- package/.eslintignore +2 -0
- package/.eslintrc +39 -0
- package/.husky/pre-commit +4 -0
- package/.husky/pre-push +6 -0
- package/.prettierignore +14 -0
- package/.turbo.json +18 -0
- package/.yarn/plugins/@yarnpkg/plugin-outdated.cjs +35 -0
- package/LICENSE +401 -0
- package/README.md +3 -0
- package/__mocks__/react-i18next.js +55 -0
- package/dist/26.js +2 -0
- package/dist/26.js.LICENSE.txt +32 -0
- package/dist/26.js.map +1 -0
- package/dist/294.js +2 -0
- package/dist/294.js.LICENSE.txt +9 -0
- package/dist/294.js.map +1 -0
- package/dist/375.js +2 -0
- package/dist/375.js.LICENSE.txt +40 -0
- package/dist/375.js.map +1 -0
- package/dist/46.js +1 -0
- package/dist/46.js.map +1 -0
- package/dist/484.js +1 -0
- package/dist/484.js.map +1 -0
- package/dist/574.js +1 -0
- package/dist/629.js +1 -0
- package/dist/629.js.map +1 -0
- package/dist/707.js +1 -0
- package/dist/707.js.map +1 -0
- package/dist/800.js +2 -0
- package/dist/800.js.LICENSE.txt +3 -0
- package/dist/800.js.map +1 -0
- package/dist/935.js +2 -0
- package/dist/935.js.LICENSE.txt +19 -0
- package/dist/935.js.map +1 -0
- package/dist/979.js +1 -0
- package/dist/979.js.map +1 -0
- package/dist/main.js +2 -0
- package/dist/main.js.LICENSE.txt +60 -0
- package/dist/main.js.map +1 -0
- package/dist/openmrs-esm-stock-management-app.js +1 -0
- package/dist/openmrs-esm-stock-management-app.js.buildmanifest.json +356 -0
- package/dist/openmrs-esm-stock-management-app.js.map +1 -0
- package/dist/routes.json +1 -0
- package/i18next-parser.config.js +89 -0
- package/jest.config.js +25 -0
- package/package.json +116 -0
- package/src/config-schema.ts +18 -0
- package/src/constants.ts +214 -0
- package/src/core/api/api.ts +34 -0
- package/src/core/api/types/Auditable.ts +9 -0
- package/src/core/api/types/BaseOpenmrsData.ts +4 -0
- package/src/core/api/types/BaseOpenmrsMetadata.ts +6 -0
- package/src/core/api/types/BaseOpenmrsObject.ts +3 -0
- package/src/core/api/types/BatchJob.ts +121 -0
- package/src/core/api/types/DashboardExtension.ts +8 -0
- package/src/core/api/types/Location.ts +16 -0
- package/src/core/api/types/LocationTree.ts +7 -0
- package/src/core/api/types/OpenmrsData.ts +5 -0
- package/src/core/api/types/OpenmrsMetadata.ts +8 -0
- package/src/core/api/types/OpenmrsObject.ts +3 -0
- package/src/core/api/types/PageableResult.ts +15 -0
- package/src/core/api/types/Party.ts +8 -0
- package/src/core/api/types/RecordPermission.ts +9 -0
- package/src/core/api/types/Retireable.ts +9 -0
- package/src/core/api/types/Voidable.ts +9 -0
- package/src/core/api/types/concept/Concept.ts +24 -0
- package/src/core/api/types/concept/ConceptName.ts +14 -0
- package/src/core/api/types/concept/Drug.ts +14 -0
- package/src/core/api/types/identity/Credentials.ts +4 -0
- package/src/core/api/types/identity/Patient.ts +3 -0
- package/src/core/api/types/identity/Person.ts +4 -0
- package/src/core/api/types/identity/PriviledgeScope.ts +9 -0
- package/src/core/api/types/identity/Privilege.ts +5 -0
- package/src/core/api/types/identity/Role.ts +5 -0
- package/src/core/api/types/identity/Session.ts +16 -0
- package/src/core/api/types/identity/User.ts +19 -0
- package/src/core/api/types/identity/UserRoleScope.ts +17 -0
- package/src/core/api/types/identity/UserRoleScopeLocation.ts +7 -0
- package/src/core/api/types/identity/UserRoleScopeOperationType.ts +6 -0
- package/src/core/api/types/stockItem/ImportResult.ts +9 -0
- package/src/core/api/types/stockItem/StockBatch.ts +8 -0
- package/src/core/api/types/stockItem/StockBatchDTO.ts +8 -0
- package/src/core/api/types/stockItem/StockItem.ts +63 -0
- package/src/core/api/types/stockItem/StockItemInventory.ts +10 -0
- package/src/core/api/types/stockItem/StockItemPackagingUOM.ts +20 -0
- package/src/core/api/types/stockItem/StockItemTransaction.ts +22 -0
- package/src/core/api/types/stockItem/StockRule.ts +28 -0
- package/src/core/api/types/stockOperation/LocationType.ts +4 -0
- package/src/core/api/types/stockOperation/StockOperation.ts +36 -0
- package/src/core/api/types/stockOperation/StockOperationAction.ts +24 -0
- package/src/core/api/types/stockOperation/StockOperationDTO.ts +64 -0
- package/src/core/api/types/stockOperation/StockOperationItem.ts +13 -0
- package/src/core/api/types/stockOperation/StockOperationItemCost.ts +14 -0
- package/src/core/api/types/stockOperation/StockOperationItemDTO.ts +29 -0
- package/src/core/api/types/stockOperation/StockOperationLinkDTO.ts +13 -0
- package/src/core/api/types/stockOperation/StockOperationStatus.ts +18 -0
- package/src/core/api/types/stockOperation/StockOperationType.ts +162 -0
- package/src/core/api/types/stockOperation/StockSource.ts +8 -0
- package/src/core/components/carbon/controlled-combo-box/controlled-combo-box.component.tsx +37 -0
- package/src/core/components/carbon/controlled-combo-box/controlled-combo-box.resource.tsx +0 -0
- package/src/core/components/carbon/controlled-combo-box/controlled-combo-box.scss +0 -0
- package/src/core/components/carbon/controlled-combo-box/controlled-combo-box.test.tsx +8 -0
- package/src/core/components/carbon/controlled-dropdown/controlled-dropdown.component.tsx +40 -0
- package/src/core/components/carbon/controlled-dropdown/controlled-dropdown.resource.tsx +0 -0
- package/src/core/components/carbon/controlled-dropdown/controlled-dropdown.scss +0 -0
- package/src/core/components/carbon/controlled-dropdown/controlled-dropdown.test.tsx +8 -0
- package/src/core/components/carbon/controlled-number-input/controlled-number-input.component.tsx +44 -0
- package/src/core/components/carbon/controlled-number-input/controlled-number-input.resource.tsx +0 -0
- package/src/core/components/carbon/controlled-number-input/controlled-number-input.scss +0 -0
- package/src/core/components/carbon/controlled-number-input/controlled-number-input.test.tsx +8 -0
- package/src/core/components/carbon/controlled-radio-button-group/controlled-radio-button-group.component.tsx +54 -0
- package/src/core/components/carbon/controlled-radio-button-group/controlled-radio-button-group.resource.tsx +0 -0
- package/src/core/components/carbon/controlled-radio-button-group/controlled-radio-button-group.scss +0 -0
- package/src/core/components/carbon/controlled-radio-button-group/controlled-radio-button-group.test.tsx +8 -0
- package/src/core/components/carbon/controlled-text-area/controlled-text-area.component.tsx +37 -0
- package/src/core/components/carbon/controlled-text-area/controlled-text-area.resource.tsx +0 -0
- package/src/core/components/carbon/controlled-text-area/controlled-text-area.scss +0 -0
- package/src/core/components/carbon/controlled-text-area/controlled-text-area.test.tsx +11 -0
- package/src/core/components/carbon/controlled-text-input/controlled-text-input.component.tsx +37 -0
- package/src/core/components/carbon/controlled-text-input/controlled-text-input.resource.tsx +0 -0
- package/src/core/components/carbon/controlled-text-input/controlled-text-input.scss +0 -0
- package/src/core/components/carbon/controlled-text-input/controlled-text-input.test.tsx +8 -0
- package/src/core/components/carbon/types.ts +7 -0
- package/src/core/components/card/metrics-card-component.tsx +102 -0
- package/src/core/components/card/metrics-card.scss +78 -0
- package/src/core/components/overlay/hook.ts +47 -0
- package/src/core/components/overlay/overlay.component.tsx +52 -0
- package/src/core/components/overlay/overlay.scss +97 -0
- package/src/core/components/side-nav/side-nav.component.tsx +62 -0
- package/src/core/components/side-nav/side-nav.scss +126 -0
- package/src/core/components/side-nav/types.ts +6 -0
- package/src/core/components/table/table.component.tsx +239 -0
- package/src/core/components/table/table.scss +173 -0
- package/src/core/components/table/types.ts +8 -0
- package/src/core/components/tabs/types.ts +7 -0
- package/src/core/components/tabs/vertical-tabs.component.tsx +53 -0
- package/src/core/components/tabs/vertical-tabs.scss +126 -0
- package/src/core/hooks/debounce-hook.ts +35 -0
- package/src/core/print/PrintStyles.ts +774 -0
- package/src/core/print/PrintTemplate.ts +65 -0
- package/src/core/print/printUtils.ts +19 -0
- package/src/core/utils/alert.ts +10 -0
- package/src/core/utils/datetimeUtils.ts +84 -0
- package/src/core/utils/debounce.ts +21 -0
- package/src/core/utils/imageUtils.ts +82 -0
- package/src/core/utils/stringUtils.ts +27 -0
- package/src/core/utils/utils.ts +70 -0
- package/src/createDashboardLink.tsx +43 -0
- package/src/dashboard/stock-management-dashboard-side-nav.component.tsx +50 -0
- package/src/dashboard/stock-management-dashboard.component.tsx +41 -0
- package/src/dashboard/stock-management-dashboard.scss +8 -0
- package/src/dashboard.meta.ts +5 -0
- package/src/declarations.d.ts +6 -0
- package/src/index.ts +64 -0
- package/src/root.component.tsx +12 -0
- package/src/root.scss +174 -0
- package/src/routes.json +53 -0
- package/src/setup-tests.ts +1 -0
- package/src/stock-app-menu-item/item.component.tsx +21 -0
- package/src/stock-app-menu-item/item.resource.ts +0 -0
- package/src/stock-app-menu-item/item.scss +17 -0
- package/src/stock-batch/stock-batch.resource.ts +79 -0
- package/src/stock-home/stock-home-detail-card.scss +211 -0
- package/src/stock-home/stock-home-detail-cards.component.tsx +62 -0
- package/src/stock-home/stock-home-inventory-card.component.tsx +80 -0
- package/src/stock-home/stock-home-inventory-expiry.resource.tsx +32 -0
- package/src/stock-home/stock-home-inventory-items.resource.tsx +28 -0
- package/src/stock-home/stock-home-issuing-card.component.tsx +84 -0
- package/src/stock-home/stock-home-issuing.resource.tsx +18 -0
- package/src/stock-home/stock-home-landing-page-component.tsx +14 -0
- package/src/stock-home/stock-home-metrics.tsx +112 -0
- package/src/stock-home/stock-home-receiving-card.component.tsx +66 -0
- package/src/stock-home/stock-home-receiving.resource.tsx +17 -0
- package/src/stock-home/stock-home.scss +13 -0
- package/src/stock-home/useDisposalList.tsx +18 -0
- package/src/stock-home/useStockList.tsx +36 -0
- package/src/stock-items/add-bulk-stock-item/add-stock-items-bulk-import-action-button.component.tsx +26 -0
- package/src/stock-items/add-bulk-stock-item/stock-items-bulk-import.component.tsx +109 -0
- package/src/stock-items/add-bulk-stock-item/stock-items-bulk-import.resource.ts +14 -0
- package/src/stock-items/add-bulk-stock-item/stock-items-bulk-import.scss +0 -0
- package/src/stock-items/add-stock-item/add-stock-action-button.component.tsx +21 -0
- package/src/stock-items/add-stock-item/add-stock-item.component.tsx +84 -0
- package/src/stock-items/add-stock-item/add-stock-item.resource.tsx +36 -0
- package/src/stock-items/add-stock-item/add-stock-item.scss +5 -0
- package/src/stock-items/add-stock-item/batch-information/batch-information.component.tsx +98 -0
- package/src/stock-items/add-stock-item/batch-information/batch-information.resource.tsx +71 -0
- package/src/stock-items/add-stock-item/batch-information/batch-information.scss +0 -0
- package/src/stock-items/add-stock-item/concepts-selector/concepts-selector.component.tsx +79 -0
- package/src/stock-items/add-stock-item/concepts-selector/concepts-selector.resource.tsx +0 -0
- package/src/stock-items/add-stock-item/concepts-selector/concepts-selector.scss +0 -0
- package/src/stock-items/add-stock-item/concepts-selector/concepts-selector.test.tsx +8 -0
- package/src/stock-items/add-stock-item/dispensing-package-measurement/dispensing-package-measurement.component.tsx +76 -0
- package/src/stock-items/add-stock-item/dispensing-unit-selector/dispensing-unit-selector.component.tsx +66 -0
- package/src/stock-items/add-stock-item/dispensing-unit-selector/dispensing-unit-selector.resource.tsx +0 -0
- package/src/stock-items/add-stock-item/dispensing-unit-selector/dispensing-unit-selector.scss +0 -0
- package/src/stock-items/add-stock-item/dispensing-unit-selector/dispensing-unit-selector.test.tsx +8 -0
- package/src/stock-items/add-stock-item/drug-selector/drug-selector.component.tsx +83 -0
- package/src/stock-items/add-stock-item/drug-selector/drug-selector.resource.tsx +50 -0
- package/src/stock-items/add-stock-item/drug-selector/drug-selector.scss +0 -0
- package/src/stock-items/add-stock-item/packaging-units/packaging-units.component.tsx +255 -0
- package/src/stock-items/add-stock-item/packaging-units/packaging-units.resource.tsx +38 -0
- package/src/stock-items/add-stock-item/packaging-units/packaging-units.scss +21 -0
- package/src/stock-items/add-stock-item/packaging-units/validationSchema.ts +14 -0
- package/src/stock-items/add-stock-item/packaging-units-concept-selector/packaging-units-concept-selector.component.tsx +95 -0
- package/src/stock-items/add-stock-item/preferred-vendor-selector/preferred-vendor-selector.component.tsx +70 -0
- package/src/stock-items/add-stock-item/preferred-vendor-selector/preferred-vendor-selector.resource.tsx +0 -0
- package/src/stock-items/add-stock-item/preferred-vendor-selector/preferred-vendor-selector.scss +0 -0
- package/src/stock-items/add-stock-item/preferred-vendor-selector/preferred-vendor-selector.test.tsx +8 -0
- package/src/stock-items/add-stock-item/quantities/quantities.component.tsx +83 -0
- package/src/stock-items/add-stock-item/quantities/quantities.resource.tsx +69 -0
- package/src/stock-items/add-stock-item/quantities/quantities.scss +0 -0
- package/src/stock-items/add-stock-item/stock-item-category-selector/stock-item-category-selector.component.tsx +67 -0
- package/src/stock-items/add-stock-item/stock-item-category-selector/stock-item-category-selector.resource.tsx +0 -0
- package/src/stock-items/add-stock-item/stock-item-category-selector/stock-item-category-selector.scss +0 -0
- package/src/stock-items/add-stock-item/stock-item-category-selector/stock-item-category-selector.test.tsx +8 -0
- package/src/stock-items/add-stock-item/stock-item-details/stock-item-details.component.tsx +239 -0
- package/src/stock-items/add-stock-item/stock-item-details/stock-item-details.resource.tsx +14 -0
- package/src/stock-items/add-stock-item/stock-item-details/stock-item-details.scss +13 -0
- package/src/stock-items/add-stock-item/stock-item-rules/add-stock-rule-button.component.tsx +30 -0
- package/src/stock-items/add-stock-item/stock-item-rules/add-stock-rules.component.tsx +424 -0
- package/src/stock-items/add-stock-item/stock-item-rules/add-stock-rules.scss +18 -0
- package/src/stock-items/add-stock-item/stock-item-rules/delete-stock-rule-modal.component.tsx +47 -0
- package/src/stock-items/add-stock-item/stock-item-rules/edit-stock-rule.component.tsx +37 -0
- package/src/stock-items/add-stock-item/stock-item-rules/edit-stock-rule.scss +0 -0
- package/src/stock-items/add-stock-item/stock-item-rules/stock-item-rules.component.tsx +222 -0
- package/src/stock-items/add-stock-item/stock-item-rules/stock-item-rules.resource.tsx +72 -0
- package/src/stock-items/add-stock-item/stock-item-rules/stock-item-rules.scss +13 -0
- package/src/stock-items/add-stock-item/stock-item-rules/stock-rules-delete.component.tsx +67 -0
- package/src/stock-items/add-stock-item/stock-item-rules/stock-rules-delete.scss +0 -0
- package/src/stock-items/add-stock-item/stock-item-rules/stock-rules-filter.component.tsx +38 -0
- package/src/stock-items/add-stock-item/stock-item-rules/stock-rules-filter.scss +13 -0
- package/src/stock-items/add-stock-item/stock-item-rules/stock-rules.resource.ts +79 -0
- package/src/stock-items/add-stock-item/stock-item-units-edit/stock-item-units-edit.component.tsx +132 -0
- package/src/stock-items/add-stock-item/stock-rules/stock-rules.component.tsx +16 -0
- package/src/stock-items/add-stock-item/stock-rules/stock-rules.resource.tsx +0 -0
- package/src/stock-items/add-stock-item/stock-rules/stock-rules.scss +0 -0
- package/src/stock-items/add-stock-item/transactions/transactions.component.tsx +151 -0
- package/src/stock-items/add-stock-item/transactions/transactions.resource.tsx +109 -0
- package/src/stock-items/add-stock-item/transactions/transactions.scss +0 -0
- package/src/stock-items/components/filter-stock-items/filter-stock-items.component.tsx +28 -0
- package/src/stock-items/components/filter-stock-items/filter-stock-items.resource.tsx +0 -0
- package/src/stock-items/components/filter-stock-items/filter-stock-items.scss +3 -0
- package/src/stock-items/edit-stock-item/edit-stock-item-action-menu.component.tsx +30 -0
- package/src/stock-items/stock-item.utils.tsx +62 -0
- package/src/stock-items/stock-items-table.component.tsx +266 -0
- package/src/stock-items/stock-items-table.resource.ts +58 -0
- package/src/stock-items/stock-items-table.scss +66 -0
- package/src/stock-items/stock-items.component.tsx +12 -0
- package/src/stock-items/stock-items.resource.ts +365 -0
- package/src/stock-items/types.ts +8 -0
- package/src/stock-items/validationSchema.ts +67 -0
- package/src/stock-locations/stock-locations-table.component.tsx +69 -0
- package/src/stock-locations/stock-locations-table.resource.tsx +73 -0
- package/src/stock-locations/stock-locations-table.scss +0 -0
- package/src/stock-locations/stock-locations.component.tsx +12 -0
- package/src/stock-locations/stock-locations.resource.ts +0 -0
- package/src/stock-lookups/stock-lookups.resource.ts +306 -0
- package/src/stock-management-admin-card-link.component.tsx +29 -0
- package/src/stock-management-header/stock-management-Illustration.tsx +35 -0
- package/src/stock-management-header/stock-management-header.component.tsx +37 -0
- package/src/stock-management-header/stock-management-header.scss +58 -0
- package/src/stock-management.component.tsx +6 -0
- package/src/stock-operations/add-stock-operation/add-stock-operation.component.tsx +491 -0
- package/src/stock-operations/add-stock-operation/add-stock-operation.resource.tsx +33 -0
- package/src/stock-operations/add-stock-operation/add-stock-operation.scss +44 -0
- package/src/stock-operations/add-stock-operation/add-stock-operation.utils.tsx +241 -0
- package/src/stock-operations/add-stock-operation/add-stock-utils.ts +110 -0
- package/src/stock-operations/add-stock-operation/base-operation-details.component.tsx +352 -0
- package/src/stock-operations/add-stock-operation/stock-items-addition-row.component.tsx +347 -0
- package/src/stock-operations/add-stock-operation/stock-items-addition-row.resource.tsx +0 -0
- package/src/stock-operations/add-stock-operation/stock-items-addition-row.scss +0 -0
- package/src/stock-operations/add-stock-operation/stock-items-addition-row.test.tsx +11 -0
- package/src/stock-operations/add-stock-operation/stock-items-addition.component.scss +5 -0
- package/src/stock-operations/add-stock-operation/stock-items-addition.component.tsx +272 -0
- package/src/stock-operations/add-stock-operation/stock-operation-context/useStockOperationContext.tsx +22 -0
- package/src/stock-operations/add-stock-operation/stock-operation-submission.component.tsx +188 -0
- package/src/stock-operations/add-stock-operation/types.ts +55 -0
- package/src/stock-operations/add-stock-operation/validationSchema.ts +45 -0
- package/src/stock-operations/batch-no-selector/batch-no-selector.component.tsx +100 -0
- package/src/stock-operations/batch-no-selector/batch-no-selector.resource.tsx +46 -0
- package/src/stock-operations/batch-no-selector/batch-no-selector.scss +0 -0
- package/src/stock-operations/batch-no-selector/batch-no-selector.test.tsx +11 -0
- package/src/stock-operations/edit-stock-operation/edit-stock-operation-action-menu.component.tsx +73 -0
- package/src/stock-operations/party-selector/party-selector.component.tsx +58 -0
- package/src/stock-operations/qty-uom-selector/qty-uom-selector.component.tsx +65 -0
- package/src/stock-operations/qty-uom-selector/qty-uom-selector.resource.tsx +0 -0
- package/src/stock-operations/qty-uom-selector/qty-uom-selector.scss +0 -0
- package/src/stock-operations/qty-uom-selector/qty-uom-selector.test.tsx +11 -0
- package/src/stock-operations/stock-item-selector/stock-item-selector.component.tsx +74 -0
- package/src/stock-operations/stock-item-selector/stock-item-selector.resource.tsx +47 -0
- package/src/stock-operations/stock-item-selector/stock-item-selector.scss +0 -0
- package/src/stock-operations/stock-item-selector/stock-item-selector.test.tsx +11 -0
- package/src/stock-operations/stock-operation-operations-filter/stock-operation-operations-filter.component.tsx +27 -0
- package/src/stock-operations/stock-operation-operations-filter/stock-operation-operations-filter.scss +13 -0
- package/src/stock-operations/stock-operation-reason-selector/stock-operation-reason-selector.component.tsx +65 -0
- package/src/stock-operations/stock-operation-sources-filter/stock-operation-sources-filter.component.tsx +30 -0
- package/src/stock-operations/stock-operation-sources-filter/stock-operation-sources-filter.scss +13 -0
- package/src/stock-operations/stock-operation-statuses-filter/stock-operation-statuses-filter.component.tsx +32 -0
- package/src/stock-operations/stock-operation-statuses-filter/stock-operation-statuses-filter.scss +13 -0
- package/src/stock-operations/stock-operation-types-selector/stock-operation-types-selector.component.tsx +80 -0
- package/src/stock-operations/stock-operation.utils.tsx +106 -0
- package/src/stock-operations/stock-operations-dialog/stock-operations-approve-button.component.tsx +36 -0
- package/src/stock-operations/stock-operations-dialog/stock-operations-approve-dispatch-button.component.tsx +36 -0
- package/src/stock-operations/stock-operations-dialog/stock-operations-cancel-button.component.tsx +37 -0
- package/src/stock-operations/stock-operations-dialog/stock-operations-complete-button.component.tsx +36 -0
- package/src/stock-operations/stock-operations-dialog/stock-operations-completed-dispatch-button.component.tsx +36 -0
- package/src/stock-operations/stock-operations-dialog/stock-operations-dialog.component.tsx +167 -0
- package/src/stock-operations/stock-operations-dialog/stock-operations-dialog.scss +14 -0
- package/src/stock-operations/stock-operations-dialog/stock-operations-issue-stock-button.component.tsx +58 -0
- package/src/stock-operations/stock-operations-dialog/stock-operations-print-button.component.tsx +160 -0
- package/src/stock-operations/stock-operations-dialog/stock-operations-reject-button.component.tsx +37 -0
- package/src/stock-operations/stock-operations-dialog/stock-operations-return-button.component.tsx +37 -0
- package/src/stock-operations/stock-operations-table.component.tsx +524 -0
- package/src/stock-operations/stock-operations-table.resource.tsx +77 -0
- package/src/stock-operations/stock-operations-table.scss +0 -0
- package/src/stock-operations/stock-operations.component.tsx +12 -0
- package/src/stock-operations/stock-operations.resource.ts +238 -0
- package/src/stock-operations/stock-print-reports/GoodsReceivedNote.tsx +147 -0
- package/src/stock-operations/stock-print-reports/RequisitionDocument.tsx +153 -0
- package/src/stock-operations/stock-print-reports/StockOperationReport.tsx +133 -0
- package/src/stock-operations/stock-print-reports/StockTransferDocument.tsx +161 -0
- package/src/stock-operations/swr-revalidation.ts +7 -0
- package/src/stock-operations/users-selector/users-selector.component.tsx +77 -0
- package/src/stock-operations/users-selector/users-selector.resource.tsx +47 -0
- package/src/stock-operations/validation-schema.ts +195 -0
- package/src/stock-reports/ReportType.ts +63 -0
- package/src/stock-reports/stock-reports.component.tsx +0 -0
- package/src/stock-reports/stock-reports.resource.ts +0 -0
- package/src/stock-settings/stock-settings.component.tsx +11 -0
- package/src/stock-settings/stock-settings.resource.ts +0 -0
- package/src/stock-sources/add-stock-source-button.component.tsx +21 -0
- package/src/stock-sources/add-stock-sources/add-stock-sources.component.tsx +152 -0
- package/src/stock-sources/add-stock-sources/add-stock-sources.scss +18 -0
- package/src/stock-sources/delete-stock-modal.component.tsx +47 -0
- package/src/stock-sources/edit-stock-source/edit-stock-source.component.tsx +35 -0
- package/src/stock-sources/edit-stock-source/edit-stock-source.scss +0 -0
- package/src/stock-sources/stock-sources-delete/stock-sources-delate.scss +0 -0
- package/src/stock-sources/stock-sources-delete/stock-sources-delete.component.tsx +72 -0
- package/src/stock-sources/stock-sources-filter/stock-sources-filter.component.tsx +35 -0
- package/src/stock-sources/stock-sources-filter/stock-sources-filter.scss +13 -0
- package/src/stock-sources/stock-sources-items-table.component.tsx +213 -0
- package/src/stock-sources/stock-sources-items-table.resource.ts +56 -0
- package/src/stock-sources/stock-sources.component.tsx +12 -0
- package/src/stock-sources/stock-sources.resource.ts +80 -0
- package/src/stock-sources/stock-sources.scss +220 -0
- package/src/stock-sources/swr-revalidation.ts +7 -0
- package/src/stock-tabs/commodity-tabs.component.tsx +43 -0
- package/src/stock-tabs/commodity-tabs.scss +0 -0
- package/src/stock-user-role-scopes/add-stock-user-role-scope-button.component.tsx +21 -0
- package/src/stock-user-role-scopes/add-stock-user-scope/add-stock-user-role-scope.component.tsx +525 -0
- package/src/stock-user-role-scopes/add-stock-user-scope/add-stock-user-role-scope.scss +37 -0
- package/src/stock-user-role-scopes/delete-stock-user-scope/delete-stock-user-scope.component.tsx +73 -0
- package/src/stock-user-role-scopes/delete-stock-user-scope/delete-stock-user-scope.scss +0 -0
- package/src/stock-user-role-scopes/delete-stock-user-scope-modal.component.tsx +47 -0
- package/src/stock-user-role-scopes/edit-stock-user-scope/edit-stock-user-scope-action-menu.component.tsx +35 -0
- package/src/stock-user-role-scopes/stock-user-role-scopes-items-table.component.tsx +284 -0
- package/src/stock-user-role-scopes/stock-user-role-scopes-items-table.resource.ts +31 -0
- package/src/stock-user-role-scopes/stock-user-role-scopes.component.tsx +12 -0
- package/src/stock-user-role-scopes/stock-user-role-scopes.resource.ts +76 -0
- package/src/stock-user-role-scopes/stock-user-role-scopes.scss +61 -0
- package/src/stock-user-role-scopes/swr-revalidation.ts +7 -0
- package/src/utils.ts +10 -0
- package/translations/en.json +24 -0
- package/tsconfig.json +23 -0
- package/webpack.config.js +1 -0
package/dist/800.js
ADDED
@@ -0,0 +1,2 @@
|
|
1
|
+
/*! For license information please see 800.js.LICENSE.txt */
|
2
|
+
(globalThis.webpackChunk_openmrs_esm_stock_management_app=globalThis.webpackChunk_openmrs_esm_stock_management_app||[]).push([[800],{154:(e,t,n)=>{function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function a(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}System.register(["@openmrs/esm-config","@openmrs/esm-navigation","@openmrs/esm-error-handling","@openmrs/esm-offline"],(function(e,t){var u={},c={},s={},l={};return{setters:[function(e){u.Type=e.Type,u.defineConfigSchema=e.defineConfigSchema,u.getConfig=e.getConfig,u.validators=e.validators},function(e){c.navigate=e.navigate},function(e){s.reportError=e.reportError},function(e){l.getSynchronizationItems=e.getSynchronizationItems}],execute:function(){e(function(){var e={385:function(){System.register([],(function(e,t){return{execute:function(){e(function(){"use strict";var e=function(e,t){var n=u[e];if(n)return n.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):n.value.setState(t,!0),n.active=!0,n.value;var r=a()((function(){return t}));return u[e]={value:r,active:!0},r},t=function(e,t){var n=u[e];if(!n){var r=a()((function(){return null!=t?t:{}}));return u[e]={value:r,active:!1},r}return n.value},n=function(e,t,n){var r=t(e.getState());return e.subscribe((function(e){var o=t(e);o!==r&&(r=o,n(o))}))},r={d:function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},o={};r.r(o),r.d(o,{createGlobalStore:function(){return e},getGlobalStore:function(){return t},subscribeTo:function(){return n}});var i=function(e){var t,n=new Set,r=function(e,r){var o="function"==typeof e?e(t):e;if(!Object.is(o,t)){var i=t;t=(null!=r?r:"object"!=typeof o)?o:Object.assign({},t,o),n.forEach((function(e){return e(t,i)}))}},o=function(){return t},i={setState:r,getState:o,subscribe:function(e){return n.add(e),function(){return n.delete(e)}},destroy:function(){console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return t=e(r,o,i),i},a=function(e){return e?i(e):i},u={};return setTimeout((function(){"development"===window.spaEnv&&(window.stores=u)}),1e3),o}())}}}))},824:function(e){"use strict";e.exports=u},254:function(e){"use strict";e.exports=s},513:function(e){"use strict";e.exports=c},738:function(e){"use strict";e.exports=l}},t={};function f(n){var r=t[n];if(void 0!==r)return r.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,f),o.exports}f.d=function(e,t){for(var n in t)f.o(t,n)&&!f.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},f.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var d={};return function(){"use strict";var e=function(e,t){function n(){this.constructor=e}ut(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},t=function(e){return"function"==typeof e},u=function(e){setTimeout((function(){throw e}),0)},c=function(e){return null!==e&&"object"==typeof e},s=function(e){return e.reduce((function(e,t){return e.concat(i(t,pt)?t.errors:t)}),[])},l=function(e){return e},p=function(e){if(e||(e=st.Promise||Promise),!e)throw new Error("no Promise impl found");return e},h=function(e,t,n){var r=g(e,t,n);Gt.length?Gt.forEach((function(e){return e(r)})):setTimeout((function(){throw r}))},v=function(e){if("function"!=typeof e)throw Error(m(28,!1));Gt.push(e)},y=function(e){if("function"!=typeof e)throw Error(m(29,!1));var t=!1;return Gt=Gt.filter((function(n){var r=n===e;return t=t||r,!r})),t},m=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return"single-spa minified message #".concat(e,": ").concat(t?t+" ":"","See https://single-spa.js.org/error/?code=").concat(e).concat(r.length?"&arg=".concat(r.join("&arg=")):"")},g=function(e,t,n){var r,o="".concat(E(t)," '").concat(S(t),"' died in status ").concat(t.status,": ");if(i(e,Error)){try{e.message=o+e.message}catch(e){}r=e}else{console.warn(m(30,!1,t.status,S(t)));try{r=Error(o+JSON.stringify(e))}catch(t){r=e}}return r.appOrParcelName=S(t),t.status=n,r},b=function(e){return e.status===Yt},w=function(e){try{return e.activeWhen(window.location)}catch(t){return h(t,e,tn),!1}},S=function(e){return e.name},O=function(e){return Boolean(e.unmountThisParcel)},E=function(e){return O(e)?"parcel":"application"},_=function(){for(var e=arguments.length-1;e>0;e--)for(var t in arguments[e])"__proto__"!==t&&(arguments[e-1][t]=arguments[e][t]);return arguments[0]},j=function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n];return null},x=function(e){return e&&("function"==typeof e||(t=e,Array.isArray(t)&&!j(t,(function(e){return"function"!=typeof e}))));var t},C=function(e,t){var n=e[t]||[];0===(n=Array.isArray(n)?n:[n]).length&&(n=[function(){return Promise.resolve()}]);var r=E(e),o=S(e);return function(e){return n.reduce((function(n,i,a){return n.then((function(){var n=i(e);return P(n)?n:Promise.reject(m(15,!1,r,o,t,a))}))}),Promise.resolve())}},P=function(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch},A=function(e,t){return Promise.resolve().then((function(){return e.status!==zt?e:(e.status=Wt,e.bootstrap?F(e,"bootstrap").then(n).catch((function(n){if(t)throw g(n,e,tn);return h(n,e,tn),e})):Promise.resolve().then(n))}));function n(){return e.status=qt,e}},T=function(e,t){return Promise.resolve().then((function(){var n=function(){return F(e,"unmount").then((function(){e.status=qt}),(function(n){if(t)throw g(n,e,tn);h(n,e,tn)}))};if(e.status!==Yt)return e;e.status=Jt;var r=Object.keys(e.parcels).map((function(t){return e.parcels[t].unmountThisParcel()}));return Promise.all(r).then(n,(function(r){return n().then((function(){var n=Error(r.message);if(t)throw g(n,e,tn);h(n,e,tn)}))})).then((function(){return e}))}))},k=function(e,t){return Promise.resolve().then((function(){return e.status!==qt?e:(rn||(window.dispatchEvent(new Vt("single-spa:before-first-mount")),rn=!0),e.status=Zt,F(e,"mount").then((function(){return e.status=Yt,on||(window.dispatchEvent(new Vt("single-spa:first-mount")),on=!0),e})).catch((function(n){var r=function(){if(t)throw g(n,e,tn);return h(n,e,tn),e};return e.status=Yt,T(e,!0).then(r,r)})))}))},I=function(){return R.apply(un,arguments)},R=function(e,t){var n=this;if(!e||"object"!=typeof e&&"function"!=typeof e)throw Error(m(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(m(3,!1,a(e.name)));var r=an++,o=e.name||"parcel-".concat(r);if("object"!=typeof t)throw Error(m(4,!1,o,void 0===t?"undefined":a(t)));if(!t.domElement)throw Error(m(5,!1,o));var i,u="function"==typeof e,c=u?e:function(){return Promise.resolve(e)},s={id:r,parcels:{},status:u?$t:zt,customProps:t,parentName:S(n),unmountThisParcel:function(){return h.then((function(){if(s.status!==Yt)throw Error(m(6,!1,o,s.status));return T(s,!0)})).then((function(e){return s.parentName&&delete n.parcels[s.id],e})).then((function(e){return f(e),e})).catch((function(e){throw s.status=tn,d(e),e}))}};n.parcels[r]=s;var l=c();if(!l||"function"!=typeof l.then)throw Error(m(7,!1));l=l.then((function(e){if(!e)throw Error(m(8,!1));if(o=e.name||"parcel-".concat(r),Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!x(e.bootstrap))throw Error(m(9,!1,o));if(!x(e.mount))throw Error(m(10,!1,o));if(!x(e.unmount))throw Error(m(11,!1,o));if(e.update&&!x(e.update))throw Error(m(12,!1,o));var t=C(e,"bootstrap"),n=C(e,"mount"),a=C(e,"unmount");s.status=zt,s.name=o,s.bootstrap=t,s.mount=n,s.unmount=a,s.timeouts=H(e.timeouts),e.update&&(s.update=C(e,"update"),i.update=function(e){return s.customProps=e,D((t=s,Promise.resolve().then((function(){if(t.status!==Yt)throw Error(m(32,!1,S(t)));return t.status=Xt,F(t,"update").then((function(){return t.status=Yt,t})).catch((function(e){throw g(e,t,tn)}))}))));var t})}));var f,d,p=l.then((function(){return A(s,!0)})),h=p.then((function(){return k(s,!0)})),v=new Promise((function(e,t){f=e,d=t}));return i={mount:function(){return D(Promise.resolve().then((function(){if(s.status!==qt)throw Error(m(13,!1,o,s.status));return n.parcels[r]=s,k(s)})))},unmount:function(){return D(s.unmountThisParcel())},getStatus:function(){return s.status},loadPromise:D(l),bootstrapPromise:D(p),mountPromise:D(h),unmountPromise:D(v)}},D=function(e){return e.then((function(){return null}))},M=function(e){var t=S(e),n="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!=typeof n||null===n||Array.isArray(n))&&(n={},console.warn(m(40,!1),t,n));var r=_({},n,{name:t,mountParcel:R.bind(e),singleSpa:Ft});return O(e)&&(r.unmountSelf=e.unmountThisParcel),r},N=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(m(16,!1));cn.bootstrap={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},L=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(m(17,!1));cn.mount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},U=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(m(18,!1));cn.unmount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},B=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(m(19,!1));cn.unload={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},F=function(e,t){var n=e.timeouts[t],r=n.warningMillis,o=E(e);return new Promise((function(i,a){var u=!1,c=!1;e[t](M(e)).then((function(e){u=!0,i(e)})).catch((function(e){u=!0,a(e)})),setTimeout((function(){return l(1)}),r),setTimeout((function(){return l(!0)}),n.millis);var s=m(31,!1,t,o,S(e),n.millis);function l(e){if(!u)if(!0===e)c=!0,n.dieOnTimeout?a(Error(s)):console.error(s);else if(!c){var t=e,o=t*r;console.warn(s),o+r<n.millis&&setTimeout((function(){return l(t+1)}),r)}}}))},H=function(e){var t={};for(var n in cn)t[n]=_({},cn[n],e&&e[n]||{});return t},V=function(e){return Promise.resolve().then((function(){return e.loadPromise?e.loadPromise:e.status!==Kt&&e.status!==en?e:(e.status=$t,e.loadPromise=Promise.resolve().then((function(){var r=e.loadApp(M(e));if(!P(r))throw n=!0,Error(m(33,!1,S(e)));return r.then((function(n){var r;e.loadErrorTime=null,"object"!=typeof(t=n)&&(r=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!x(t.bootstrap)&&(r=35),x(t.mount)||(r=36),x(t.unmount)||(r=37);var o=E(t);if(r){var i;try{i=JSON.stringify(t)}catch(e){}return console.error(m(r,!1,o,S(e),i),t),h(void 0,e,tn),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=_({},e.devtools.overlays,t.devtools.overlays)),e.status=zt,e.bootstrap=C(t,"bootstrap"),e.mount=C(t,"mount"),e.unmount=C(t,"unmount"),e.unload=C(t,"unload"),e.timeouts=H(t.timeouts),delete e.loadPromise,e}))})).catch((function(t){var r;return delete e.loadPromise,n?r=tn:(r=en,e.loadErrorTime=(new Date).getTime()),h(t,e,r),e})));var t,n}))},G=function(e){var t;if("string"==typeof e)t=e;else if(this&&this.href)t=this.href;else{if(!(e&&e.currentTarget&&e.currentTarget.href&&e.preventDefault))throw Error(m(14,!1));t=e.currentTarget.href,e.preventDefault()}var n=q(window.location.href),r=q(t);0===t.indexOf("#")?window.location.hash=r.hash:n.host!==r.host&&r.host?window.location.href=t:r.pathname===n.pathname&&r.search===n.search?window.location.hash=r.hash:window.history.pushState(null,null,t)},K=function(e){var t=this;if(e){var n=e[0].type;fn.indexOf(n)>=0&&ln[n].forEach((function(n){try{n.apply(t,e)}catch(e){setTimeout((function(){throw e}))}}))}},$=function(){Sn([],arguments)},z=function(e,t){return function(){var n=window.location.href,r=e.apply(this,arguments),o=window.location.href;return Bt&&n===o||window.dispatchEvent(function(e,t){var n;try{n=new PopStateEvent("popstate",{state:e})}catch(t){(n=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,e)}return n.singleSpa=!0,n.singleSpaTrigger=t,n}(window.history.state,t)),r}},W=function(e){if(pn)throw Error(m(43,!1));Bt=!e||!e.hasOwnProperty("urlRerouteOnly")||e.urlRerouteOnly,pn=!0,dn=window.history.replaceState,window.addEventListener("hashchange",$),window.addEventListener("popstate",$);var t=window.addEventListener,n=window.removeEventListener;window.addEventListener=function(e,n){if(!("function"==typeof n&&fn.indexOf(e)>=0)||j(ln[e],(function(e){return e===n})))return t.apply(this,arguments);ln[e].push(n)},window.removeEventListener=function(e,t){if(!("function"==typeof t&&fn.indexOf(e)>=0))return n.apply(this,arguments);ln[e]=ln[e].filter((function(e){return e!==t}))},window.history.pushState=z(window.history.pushState,"pushState"),window.history.replaceState=z(dn,"replaceState")},q=function(e){var t=document.createElement("a");return t.href=e,t},Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.jQuery;if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!hn){var t=e.fn.on,n=e.fn.off;e.fn.on=function(e,n){return Y.call(this,t,window.addEventListener,e,n,arguments)},e.fn.off=function(e,t){return Y.call(this,n,window.removeEventListener,e,t,arguments)},hn=!0}},Y=function(e,t,n,r,o){return"string"!=typeof n?e.apply(this,o):(n.split(/\s+/).forEach((function(e){fn.indexOf(e)>=0&&(t(e,r),n=n.replace(e,""))})),""===n.trim()?this:e.apply(this,o))},X=function(e){return Promise.resolve().then((function(){var t=vn[S(e)];if(!t)return e;if(e.status===Kt)return J(e,t),e;if(e.status===Qt)return t.promise.then((function(){return e}));if(e.status!==qt&&e.status!==en)return e;var n=e.status===en?Promise.resolve():F(e,"unload");return e.status=Qt,n.then((function(){return J(e,t),e})).catch((function(n){return function(e,t,n){delete vn[S(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,h(n,e,tn),t.reject(n)}(e,t,n),e}))}))},J=function(e,t){delete vn[S(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=Kt,t.resolve()},Q=function(e,t,n,r){vn[S(e)]={app:e,resolve:n,reject:r},Object.defineProperty(vn[S(e)],"promise",{get:t})},ee=function(e){return vn[e]},te=function(){return yn.filter(b).map(S)},ne=function(){return yn.map(S)},re=function(e){var t=j(yn,(function(t){return S(t)===e}));return t?t.status:null},oe=function(e,t,n,r){var o=function(e,t,n,r){var o,i={name:null,loadApp:null,activeWhen:null,customProps:null};return"object"==typeof e?(function(e){if(Array.isArray(e)||null===e)throw Error(m(39,!1));var t=["name","app","activeWhen","customProps"],n=Object.keys(e).reduce((function(e,n){return t.indexOf(n)>=0?e:e.concat(n)}),[]);if(0!==n.length)throw Error(m(38,!1,t.join(", "),n.join(", ")));if("string"!=typeof e.name||0===e.name.length)throw Error(m(20,!1));if("object"!=typeof e.app&&"function"!=typeof e.app)throw Error(m(20,!1));var r=function(e){return"string"==typeof e||"function"==typeof e};if(!(r(e.activeWhen)||Array.isArray(e.activeWhen)&&e.activeWhen.every(r)))throw Error(m(24,!1));if(!se(e.customProps))throw Error(m(22,!1))}(e),i.name=e.name,i.loadApp=e.app,i.activeWhen=e.activeWhen,i.customProps=e.customProps):(function(e,t,n,r){if("string"!=typeof e||0===e.length)throw Error(m(20,!1));if(!t)throw Error(m(23,!1));if("function"!=typeof n)throw Error(m(24,!1));if(!se(r))throw Error(m(22,!1))}(e,t,n,r),i.name=e,i.loadApp=t,i.activeWhen=n,i.customProps=r),i.loadApp="function"!=typeof(o=i.loadApp)?function(){return Promise.resolve(o)}:o,i.customProps=function(e){return e||{}}(i.customProps),i.activeWhen=function(e){var t=Array.isArray(e)?e:[e];return t=t.map((function(e){return"function"==typeof e?e:le(e)})),function(e){return t.some((function(t){return t(e)}))}}(i.activeWhen),i}(e,t,n,r);if(he()||mn||(mn=!0,setTimeout((function(){he()||console.warn(m(1,!1))}),5e3)),-1!==ne().indexOf(o.name))throw Error(m(21,!1,o.name));yn.push(_({loadErrorTime:null,status:Kt,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},o)),sn&&(Z(),Sn())},ie=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location;return yn.filter((function(t){return t.activeWhen(e)})).map(S)},ae=function(e){if(0===yn.filter((function(t){return S(t)===e})).length)throw Error(m(25,!1,e));return(sn?ue(e,{waitForUnmount:!1}):Promise.resolve()).then((function(){var t=yn.map(S).indexOf(e);yn.splice(t,1)}))},ue=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{waitForUnmount:!1};if("string"!=typeof e)throw Error(m(26,!1));var n=j(yn,(function(t){return S(t)===e}));if(!n)throw Error(m(27,!1,e));var r,o=ee(S(n));if(t&&t.waitForUnmount){if(o)return o.promise;var i=new Promise((function(e,t){Q(n,(function(){return i}),e,t)}));return i}return o?(r=o.promise,ce(n,o.resolve,o.reject)):r=new Promise((function(e,t){Q(n,(function(){return r}),e,t),ce(n,e,t)})),r},ce=function(e,t,n){Promise.resolve().then((function(){if(j(ie(),(function(t){return t===S(e)})))return fe()})).then((function(){return T(e).then(X).then((function(){t(),setTimeout((function(){Sn()}))}))})).catch(n)},se=function(e){return!e||"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},le=function(e,t){var n=function(e,t){var n=0,r=!1,o="^";"/"!==e[0]&&(e="/"+e);for(var i=0;i<e.length;i++){var a=e[i];(!r&&":"===a||r&&"/"===a)&&u(i)}return u(e.length),new RegExp(o,"i");function u(i){var a=e.slice(n,i).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=r?"[^/]+/?":a,i===e.length)if(r)t&&(o+="$");else{var u=t?"":".*";o="/"===o.charAt(o.length-1)?"".concat(o).concat(u,"$"):"".concat(o,"(/").concat(u,")?(#.*)?$")}r=!r,n=i}}(e,t);return function(e){var t=e.origin;t||(t="".concat(e.protocol,"//").concat(e.host));var r=e.href.replace(t,"").replace(e.search,"").split("?")[0];return n.test(r)}},fe=function(){return Sn()},de=function(e,t){return w(e)?A(e).then((function(e){return t.then((function(){return w(e)?k(e):e}))})):t.then((function(){return e}))},pe=function(e){On=!0,sn&&(W(e),Sn())},he=function(){return On},ve=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},ye=function(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)},me=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},ge=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}},be=function(e){return e&&e.startsWith("http")?e:("/"!==e[0]&&(e="/"+e),window.openmrsBase+e)},we=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof e)throw Error("The first argument to @openmrs/api's openmrsFetch function must be a url string");if("object"!=typeof t)throw Error("The second argument to @openmrs/api's openmrsFetch function must be a plain object.");if(!window.openmrsBase)throw Error("@openmrs/api is running in a browser that doesn't have window.openmrsBase, which is provided by openmrs-module-spa's HTML file.");var n=be(e);if(t.headers||(t.headers={}),Mt(t.body)&&(t.body=JSON.stringify(t.body)),void 0===t.headers.Accept&&(t.headers.Accept="application/json"),null===t.headers.Accept&&delete t.headers.Accept,e.startsWith(An)&&void 0===t.headers["Disable-WWW-Authenticate"]&&(t.headers["Disable-WWW-Authenticate"]="true"),e.startsWith(Tn)){var r=new URL(n,window.location.toString());r.searchParams.has("_summary")||(r.searchParams.set("_summary","data"),n=r.toString())}var o,i,a=Error();return window.fetch(n,t).then((o=function(e){var t,r;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}(this,(function(o){switch(o.label){case 0:return(t=e).ok?204===t.status?(t.data=null,[2,t]):[2,t.clone().text().then((function(e){try{e&&(t.data=JSON.parse(e))}catch(e){}return t}))]:[3,1];case 1:return[4,(0,Nt.getConfig)("@openmrs/esm-api")];case 2:return r=o.sent().redirectAuthFailure,n===be(kn)&&403===t.status||r.enabled&&r.errors.includes(t.status)?(sessionStorage.removeItem(_n),(0,Lt.navigate)({to:r.url}),[2,r.resolvePromise?Promise.resolve():new Promise((function(){}))]):[2,t.clone().text().then((function(e){var r=e;try{r=JSON.parse(e)}catch(e){}throw new In(n,t,r,a)}),(function(e){throw new In(n,t,null,a)}))];case 3:return[2]}}))},i=function(){var e=this,t=arguments;return new Promise((function(n,r){var i=o.apply(e,t);function a(e){ye(i,n,r,a,u,"next",e)}function u(e){ye(i,n,r,a,u,"throw",e)}a(void 0)}))},function(e){return i.apply(this,arguments)}))},Se=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("object"!=typeof t)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");var n=new AbortController;return t.signal=n.signal,new bt((function(r){var o=!1;return we(e,t).then((function(e){o=!0,r.next(e),r.complete()}),(function(e){o=!0,r.error(e)})),function(){o||n.abort()}}))},Oe=function(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)},Ee=function(e,t){return we("".concat(Rn,"/").concat(e),{signal:t.signal})},_e=function(e,t,n){return we("".concat(Rn,"?patient=").concat(e,"&includeEncounterless=").concat(t),{signal:n.signal})},je=function(e,t){return Dn.apply(this,arguments)},xe=function(e,t){return we("".concat(Rn,"/").concat(e),{method:"DELETE",signal:t.signal})},Ce=function(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)},Pe=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Ce(i,r,o,a,u,"next",e)}function u(e){Ce(i,r,o,a,u,"throw",e)}a(void 0)}))}},Ae=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},Te=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{includeAuthStatus:!0};return(Un<Date.now()-6e4||!Ln.getState().loaded)&&Re(),new bt((function(t){var n=function(n){var r;n.loaded&&(e.includeAuthStatus?t.next(n.session):t.next(null===(r=n.session)||void 0===r?void 0:r.user))};return n(Ln.getState()),Ln.subscribe(n)}))},ke=function(){return(Un<Date.now()-6e4||!Ln.getState().loaded)&&Re(),Ln},Ie=function(e){var t,n,r,o=null!==(r=null==e||null===(t=e.user)||void 0===t||null===(n=t.userProperties)||void 0===n?void 0:n.defaultLocale)&&void 0!==r?r:e.locale,i=document.documentElement.getAttribute("lang");(function(e){if(void 0===e||"string"!=typeof e)return!1;try{new Intl.Locale(e)}catch(e){return!1}return!0})(o)&&o!==i&&document.documentElement.setAttribute("lang",o)},Re=function(){return new Promise((function(e,t){Un=Date.now(),we(kn).then((function(n){if("object"!=typeof(null==n?void 0:n.data))return t(),Promise.reject();Ie(n.data),e(n.data),Ln.setState({loaded:!0,session:n.data})})).catch((function(e){return(0,Mn.reportError)("Failed to fetch new session information: ".concat(e)),t(e),{sessionId:"",authenticated:!1}}))}))},De=function(){Ln.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})},Me=function(e,t){return void 0===t?Boolean(e):!Boolean(e)||function(e,t){return"string"==typeof e?!Nn(t.privileges.find((function(t){return e===t.display}))):Array.isArray(e)?e.every((function(e){return!Nn(t.privileges.find((function(t){return e===t.display})))})):(Nn(e)||console.error('Could not understand privileges "'.concat(e,'"')),!0)}(e,t)||function(e){return!Nn(e.roles.find((function(e){return"System Developer"===e.display})))}(t)},Ne=function(){var e,t;return new Promise((function(n,r){var o=function(r){r.loaded&&r.session.user&&(e=r.session.user,n(r.session.user),t&&t())};o(Ln.getState()),e||(t=Ln.subscribe(o))}))},Le=function(){return new Promise((function(e,t){Te().subscribe((function(t){e(t.sessionLocation)}),t).unsubscribe()}))},Ue=function(e,t){return Bn.apply(this,arguments)},Be=function(e,t,n){return Fn.apply(this,arguments)},Fe=function(){(0,Nt.defineConfigSchema)("@openmrs/esm-api",{redirectAuthFailure:{enabled:{_type:Nt.Type.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:Nt.Type.String,_default:"${openmrsSpaBase}/login",_validators:[Nt.validators.isUrl]},errors:{_type:Nt.Type.Array,_default:[401],_elements:{_type:Nt.Type.Number,_validators:[Nt.validators.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:Nt.Type.Boolean,_default:!1,_description:"Changes how requests that fail authentication are handled. Try messing with this if redirects to the login page aren't working correctly."}}}),Re()},He=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},Ve=function(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)},Ge=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Ve(i,r,o,a,u,"next",e)}function u(e){Ve(i,r,o,a,u,"throw",e)}a(void 0)}))}},Ke=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return He(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?He(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},$e=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},ze=function(e,t){return Vn.apply(this,arguments)},We=function(e){return Gn.apply(this,arguments)},qe=function(e){return function(t){return 0===e?Xn:t.lift(new Jn(e))}},Ze=function(e,t){return function(n){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new er(e,t))}},Ye=function(){return(0,Ut.getGlobalStore)("visit",rr)},Xe=function(e,t){Ye().setState({patientUuid:e,manuallySetVisitUuid:t})},Je=function(e,t,n){var r=null!=n?n:nr;return Se("/ws/rest/v1/visit?patient=".concat(e,"&v=").concat(r),{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}}).pipe(qe(1)).pipe(Ze((function(e){return e})))},Qe=function(e,t){return Se("/ws/rest/v1/visit",{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})},et=function(e,t,n){return Se("/ws/rest/v1/visit/".concat(e),{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})},tt=function(e){return{uuid:e.uuid,display:e.display,name:e.name}},nt=function(){return Se("/ws/rest/v1/visittype").pipe(Ze((function(e){return e.data.results.map(tt)}))).pipe(qe(1))},rt=function(e){return{uuid:e.uuid,display:e.display}},ot=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return Se("/ws/rest/v1/location"+(e?"?tag="+e:"")).pipe(Ze((function(e){return e.data.results.map(rt)}))).pipe(qe(1))};f.r(d),f.d(d,{OpenmrsFetchError:function(){return In},VisitMode:function(){return or},VisitStatus:function(){return ir},attachmentUrl:function(){return Rn},backendDependencies:function(){return ur},clearCurrentUser:function(){return De},createAttachment:function(){return je},defaultVisitCustomRepresentation:function(){return nr},deleteAttachmentPermanently:function(){return xe},fetchCurrentPatient:function(){return ze},fhirBaseUrl:function(){return Tn},getAttachmentByUuid:function(){return Ee},getAttachments:function(){return _e},getCurrentUser:function(){return Te},getLocations:function(){return ot},getLoggedInUser:function(){return Ne},getSessionLocation:function(){return Le},getSessionStore:function(){return ke},getStartedVisit:function(){return ar},getVisitStore:function(){return Ye},getVisitTypes:function(){return nt},getVisitsForPatient:function(){return Je},makeUrl:function(){return be},openmrsFetch:function(){return we},openmrsObservableFetch:function(){return Se},refetchCurrentUser:function(){return Re},restBaseUrl:function(){return An},saveVisit:function(){return Qe},sessionEndpoint:function(){return kn},setCurrentVisit:function(){return Xe},setSessionLocation:function(){return Ue},setUserLanguage:function(){return Ie},setUserProperties:function(){return Be},setupApiModule:function(){return Fe},toLocationObject:function(){return rt},toVisitTypeObject:function(){return tt},updateVisit:function(){return et},userHasAccess:function(){return Me}});var it,at,ut=function(e,t){return ut=Object.setPrototypeOf||i({__proto__:[]},Array)&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},ut(e,t)},ct=!1,st={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){e&&(new Error).stack,ct=e},get useDeprecatedSynchronousErrorHandling(){return ct}},lt={closed:!0,next:function(e){},error:function(e){if(st.useDeprecatedSynchronousErrorHandling)throw e;u(e)},complete:function(){}},ft=Array.isArray||function(e){return e&&"number"==typeof e.length},dt=function(){function e(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this}return e.prototype=Object.create(Error.prototype),e}(),pt=dt,ht=function(){function e(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return e.prototype.unsubscribe=function(){var n;if(!this.closed){var r=this,o=r._parentOrParents,a=r._ctorUnsubscribe,u=r._unsubscribe,l=r._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,i(o,e))o.remove(this);else if(null!==o)for(var f=0;f<o.length;++f)o[f].remove(this);if(t(u)){a&&(this._unsubscribe=void 0);try{u.call(this)}catch(e){n=i(e,pt)?s(e.errors):[e]}}if(ft(l)){f=-1;for(var d=l.length;++f<d;){var p=l[f];if(c(p))try{p.unsubscribe()}catch(e){n=n||[],i(e,pt)?n=n.concat(s(e.errors)):n.push(e)}}}if(n)throw new pt(n)}},e.prototype.add=function(t){var n=t;if(!t)return e.EMPTY;switch(void 0===t?"undefined":a(t)){case"function":n=new e(t);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!i(n,e)){var r=n;(n=new e)._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}var o=n._parentOrParents;if(null===o)n._parentOrParents=this;else if(i(o,e)){if(o===this)return n;n._parentOrParents=[o,this]}else{if(-1!==o.indexOf(this))return n;o.push(this)}var u=this._subscriptions;return null===u?this._subscriptions=[n]:u.push(n),n},e.prototype.remove=function(e){var t=this._subscriptions;if(t){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},e.EMPTY=function(e){return e.closed=!0,e}(new e),e}(),vt="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),yt=function(t){function n(e,r,o){var a=t.call(this)||this;switch(a.syncErrorValue=null,a.syncErrorThrown=!1,a.syncErrorThrowable=!1,a.isStopped=!1,arguments.length){case 0:a.destination=lt;break;case 1:if(!e){a.destination=lt;break}if("object"==typeof e){i(e,n)?(a.syncErrorThrowable=e.syncErrorThrowable,a.destination=e,e.add(a)):(a.syncErrorThrowable=!0,a.destination=new mt(a,e));break}default:a.syncErrorThrowable=!0,a.destination=new mt(a,e,r,o)}return a}return e(n,t),n.prototype[vt]=function(){return this},n.create=function(e,t,r){var o=new n(e,t,r);return o.syncErrorThrowable=!1,o},n.prototype.next=function(e){this.isStopped||this._next(e)},n.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},n.prototype._next=function(e){this.destination.next(e)},n.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},n.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},n.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},n}(ht),mt=function(n){function r(e,r,o,i){var a,u=n.call(this)||this;u._parentSubscriber=e;var c=u;return t(r)?a=r:r&&(a=r.next,o=r.error,i=r.complete,r!==lt&&(t((c=Object.create(r)).unsubscribe)&&u.add(c.unsubscribe.bind(c)),c.unsubscribe=u.unsubscribe.bind(u))),u._context=c,u._next=a,u._error=o,u._complete=i,u}return e(r,n),r.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;st.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},r.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,n=st.useDeprecatedSynchronousErrorHandling;if(this._error)n&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)n?(t.syncErrorValue=e,t.syncErrorThrown=!0):u(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;u(e)}}},r.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var n=function(){return e._complete.call(e._context)};st.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},r.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),st.useDeprecatedSynchronousErrorHandling)throw e;u(e)}},r.prototype.__tryOrSetError=function(e,t,n){if(!st.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(t){return st.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):(u(t),!0)}return!1},r.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},r}(yt),gt="function"==typeof Symbol&&Symbol.observable||"@@observable",bt=function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this.operator,o=function(e,t,n){if(e){if(i(e,yt))return e;if(e[vt])return e[vt]()}return e||t||n?new yt(e,t,n):new yt(lt)}(e,t,n);if(r?o.add(r.call(o,this.source)):o.add(this.source||st.useDeprecatedSynchronousErrorHandling&&!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),st.useDeprecatedSynchronousErrorHandling&&o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){st.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),function(e){for(;e;){var t=e,n=t.closed,r=t.destination,o=t.isStopped;if(n||o)return!1;e=r&&i(r,yt)?r:null}return!0}(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=p(t))((function(t,r){var o;o=n.subscribe((function(t){try{e(t)}catch(e){r(e),o&&o.unsubscribe()}}),r,t)}))},e.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},e.prototype[gt]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?this:(0===(n=e).length?l:1===n.length?n[0]:function(e){return n.reduce((function(e,t){return t(e)}),e)})(this);var n},e.prototype.toPromise=function(e){var t=this;return new(e=p(e))((function(e,n){var r;t.subscribe((function(e){return r=e}),(function(e){return n(e)}),(function(){return e(r)}))}))},e.create=function(t){return new e(t)},e}(),wt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,St="object"==typeof self&&self&&self.Object===Object&&self,Ot=(wt||St||Function("return this")()).Symbol,Et=Object.prototype,_t=Et.hasOwnProperty,jt=Et.toString,xt=Ot?Ot.toStringTag:void 0,Ct=Object.prototype.toString,Pt=Ot?Ot.toStringTag:void 0,At=(it=Object.getPrototypeOf,at=Object,function(e){return it(at(e))}),Tt=Function.prototype,kt=Object.prototype,It=Tt.toString,Rt=kt.hasOwnProperty,Dt=It.call(Object),Mt=function(e){if(!function(e){return null!=e&&"object"==typeof e}(e)||"[object Object]"!=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Pt&&Pt in Object(e)?function(e){var t=_t.call(e,xt),n=e[xt];try{e[xt]=void 0;var r=!0}catch(e){}var o=jt.call(e);return r&&(t?e[xt]=n:delete e[xt]),o}(e):function(e){return Ct.call(e)}(e)}(e))return!1;var t=At(e);if(null===t)return!0;var n=Rt.call(t,"constructor")&&t.constructor;return"function"==typeof n&&i(n,n)&&It.call(n)==Dt},Nt=f(824),Lt=f(513),Ut=f(385);(0,Ut.createGlobalStore)("breadcrumbs",[]);var Bt,Ft=Object.freeze({__proto__:null,get start(){return pe},get ensureJQuerySupport(){return Z},get setBootstrapMaxTime(){return N},get setMountMaxTime(){return L},get setUnmountMaxTime(){return U},get setUnloadMaxTime(){return B},get registerApplication(){return oe},get unregisterApplication(){return ae},get getMountedApps(){return te},get getAppStatus(){return re},get unloadApplication(){return ue},get checkActivityFunctions(){return ie},get getAppNames(){return ne},get pathToActiveWhen(){return le},get navigateToUrl(){return G},get patchHistoryApi(){return W},get triggerAppChange(){return fe},get addErrorHandler(){return v},get removeErrorHandler(){return y},get mountRootParcel(){return I},get NOT_LOADED(){return Kt},get LOADING_SOURCE_CODE(){return $t},get NOT_BOOTSTRAPPED(){return zt},get BOOTSTRAPPING(){return Wt},get NOT_MOUNTED(){return qt},get MOUNTING(){return Zt},get UPDATING(){return Xt},get LOAD_ERROR(){return en},get MOUNTED(){return Yt},get UNLOADING(){return Qt},get UNMOUNTING(){return Jt},get SKIP_BECAUSE_BROKEN(){return tn}}),Ht=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{}).CustomEvent,Vt=function(){try{var e=new Ht("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(e){}return!1}()?Ht:"undefined"!=typeof document&&"function"==typeof document.createEvent?function(e,t){var n=document.createEvent("CustomEvent");return t?n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail):n.initCustomEvent(e,!1,!1,void 0),n}:function(e,t){var n=document.createEventObject();return n.type=e,t?(n.bubbles=Boolean(t.bubbles),n.cancelable=Boolean(t.cancelable),n.detail=t.detail):(n.bubbles=!1,n.cancelable=!1,n.detail=void 0),n},Gt=[],Kt="NOT_LOADED",$t="LOADING_SOURCE_CODE",zt="NOT_BOOTSTRAPPED",Wt="BOOTSTRAPPING",qt="NOT_MOUNTED",Zt="MOUNTING",Yt="MOUNTED",Xt="UPDATING",Jt="UNMOUNTING",Qt="UNLOADING",en="LOAD_ERROR",tn="SKIP_BECAUSE_BROKEN",nn=[],rn=!1,on=!1,an=0,un={parcels:{}},cn={bootstrap:{millis:4e3,dieOnTimeout:!1,warningMillis:1e3},mount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unmount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unload:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},update:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3}},sn="undefined"!=typeof window,ln={hashchange:[],popstate:[]},fn=["hashchange","popstate"],dn=null,pn=!1;sn&&(window.singleSpaNavigate?console.warn(m(41,!1)):window.singleSpaNavigate=G);var hn=!1,vn={},yn=[],mn=!1,gn=!1,bn=[],wn=sn&&window.location.href;function Sn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(gn)return new Promise((function(e,n){bn.push({resolve:e,reject:n,eventArguments:t})}));var r,i=function(){var e=[],t=[],n=[],r=[],o=(new Date).getTime();return yn.forEach((function(i){var a=i.status!==tn&&w(i);switch(i.status){case en:a&&o-i.loadErrorTime>=200&&n.push(i);break;case Kt:case $t:a&&n.push(i);break;case zt:case qt:!a&&ee(S(i))?e.push(i):a&&r.push(i);break;case Yt:a||t.push(i)}})),{appsToUnload:e,appsToUnmount:t,appsToLoad:n,appsToMount:r}}(),a=i.appsToUnload,u=i.appsToUnmount,c=i.appsToLoad,s=i.appsToMount,l=[],f=wn,d=wn=window.location.href;return he()?(gn=!0,r=a.concat(c,u,s),Promise.resolve().then((function(){return g(0===r.length?"before-no-app-change":"before-app-change",y(!0)),g("before-routing-event",y(!0,{cancelNavigation:p})),Promise.all(l).then((function(n){if(n.some((function(e){return e})))return dn.call(window.history,history.state,"",f.substring(location.origin.length)),wn=location.href,gn=!1,Sn(e,t,!0);var r=a.map(X),o=u.map(T).map((function(e){return e.then(X)})).concat(r),i=Promise.all(o);i.then((function(){g("before-mount-routing-event",y(!0))}),(function(e){throw e}));var l=c.map((function(e){return V(e).then((function(e){return de(e,i)}))})),d=s.filter((function(e){return c.indexOf(e)<0})).map((function(e){return de(e,i)}));return i.catch((function(e){throw v(),e})).then((function(){return v(),Promise.all(l.concat(d)).catch((function(t){throw e.forEach((function(e){return e.reject(t)})),t})).then(h).then((function(){}),(function(e){throw e}))}))}))}))):(r=c,Promise.resolve().then((function(){var e=c.map(V);return Promise.all(e).then(v).then((function(){return[]})).catch((function(e){throw v(),e})).finally((function(){}))})));function p(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t="function"==typeof(null==e?void 0:e.then)?e:Promise.resolve(e);l.push(t.catch((function(e){return console.warn(Error(m(42,!1))),console.warn(e),!1})))}function h(){var t=te();e.forEach((function(e){return e.resolve(t)}));try{g(0===r.length?"no-app-change":"app-change",y()),g("routing-event",y())}catch(e){setTimeout((function(){throw e}))}if(gn=!1,bn.length>0){var n=bn;bn=[],Sn(n)}return t}function v(){n||(e.forEach((function(e){K(e.eventArguments)})),K(t))}function y(){var e,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1?arguments[1]:void 0,l={},p=(o(e={},Yt,[]),o(e,qt,[]),o(e,Kt,[]),o(e,tn,[]),e);n?(c.concat(s).forEach((function(e,t){v(e,Yt)})),a.forEach((function(e){v(e,Kt)})),u.forEach((function(e){v(e,qt)}))):r.forEach((function(e){v(e)}));var h={detail:{newAppStatuses:l,appsByNewStatus:p,totalAppChanges:r.length,originalEvent:null==t?void 0:t[0],oldUrl:f,newUrl:d}};return i&&_(h.detail,i),h;function v(e,t){var n=S(e);t=t||re(n),l[n]=t,(p[t]=p[t]||[]).push(n)}}function g(e,t){n||window.dispatchEvent(new Vt("single-spa:".concat(e),t))}}var On=!1,En={getRawAppData:function(){return function(e){if(Array.isArray(e))return r(e)}(e=yn)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();var e},reroute:Sn,NOT_LOADED:Kt,toLoadPromise:V,toBootstrapPromise:A,unregisterApplication:ae,getProfilerData:function(){return nn}};sn&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=En);var _n="openmrs:history";function jn(e,t,n){return jn=ge()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&Cn(o,n.prototype),o},jn.apply(null,arguments)}function xn(e){return xn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},xn(e)}function Cn(e,t){return Cn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Cn(e,t)}function Pn(e){var t="function"==typeof Map?new Map:void 0;return Pn=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return jn(e,arguments,xn(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Cn(r,e)},Pn(e)}var An="/ws/rest/v1",Tn="/ws/fhir2/R4",kn="".concat(An,"/session"),In=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Cn(e,t)}(o,e);var t,n,r=(t=o,n=ge(),function(){var e,r=xn(t);if(n){var o=xn(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return function(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":void 0===n?"undefined":a(n))&&"function"!=typeof t?ve(e):t;var n}(this,e)});function o(e,t,n,a){var u;return function(e,t){if(!i(e,t))throw new TypeError("Cannot call a class as a function")}(this,o),me(ve(u=r.call(this)),"response",void 0),me(ve(u),"responseBody",void 0),u.message="Server responded with ".concat(t.status," (").concat(t.statusText,") for url ").concat(e,". Check err.responseBody or network tab in dev tools for more info"),a.message=u.message,u.responseBody=n,u.response=t,u.stack="Stacktrace for outgoing request:\n".concat(a.stack,"\nStacktrace for incoming response:\n").concat(u.stack),u}return o}(Pn(Error)),Rn="/ws/rest/v1/attachment";function Dn(){var e;return e=function(e,t){var n;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}(this,(function(r){return(n=new FormData).append("fileCaption",t.fileDescription),n.append("patient",e),t.file?n.append("file",t.file):(n.append("file",new File([""],t.fileName),t.fileName),n.append("base64Content",t.base64Content)),[2,we("".concat(Rn),{method:"POST",body:n})]}))},Dn=function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Oe(i,r,o,a,u,"next",e)}function u(e){Oe(i,r,o,a,u,"throw",e)}a(void 0)}))},Dn.apply(this,arguments)}var Mn=f(254),Nn=function(e){return void 0===e},Ln=(0,Ut.createGlobalStore)("session",{loaded:!1,session:null}),Un=0;function Bn(){return(Bn=Pe((function(e,t){return Ae(this,(function(n){switch(n.label){case 0:return[4,we(kn,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:t.signal})];case 1:return n.sent(),[4,Re()];case 2:return n.sent(),[2]}}))}))).apply(this,arguments)}function Fn(){return(Fn=Pe((function(e,t,n){return Ae(this,(function(r){switch(r.label){case 0:return n||(n=new AbortController),[4,we("/ws/rest/v1/user/".concat(e),{method:"POST",body:{userProperties:t},headers:{"Content-Type":"application/json"},signal:n.signal})];case 1:return r.sent(),[4,Re()];case 2:return r.sent(),[2]}}))}))).apply(this,arguments)}var Hn=f(738);function Vn(){return Vn=Ge((function(e,t){var n,r,o,i,a,u=arguments;return $e(this,(function(c){switch(c.label){case 0:return n=!(u.length>2&&void 0!==u[2])||u[2],e?(r=null,[4,Promise.all([we("".concat(Tn,"/Patient/").concat(e),t).catch((function(e){return r=e})),n?We(e):Promise.resolve(null)])]):[3,2];case 1:if(o=Ke.apply(void 0,[c.sent(),2]),i=o[0],a=o[1],i.ok)return[2,i.data];if(a)return[2,a];if(r)throw r;c.label=2;case 2:return[2,null]}}))})),Vn.apply(this,arguments)}function Gn(){return(Gn=Ge((function(e){var t,n,r;return $e(this,(function(o){switch(o.label){case 0:return[4,(0,Hn.getSynchronizationItems)("patient-registration")];case 1:return t=o.sent(),n=t.find((function(t){return t.fhirPatient.id===e})),[2,null!==(r=null==n?void 0:n.fhirPatient)&&void 0!==r?r:null]}}))}))).apply(this,arguments)}var Kn=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}(),$n=function(t){function n(e,n){var r=t.call(this)||this;return r.subject=e,r.subscriber=n,r.closed=!1,r}return e(n,t),n.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var n=t.indexOf(this.subscriber);-1!==n&&t.splice(n,1)}}},n}(ht),zn=function(t){function n(e){var n=t.call(this,e)||this;return n.destination=e,n}return e(n,t),n}(yt),Wn=function(t){function n(){var e=t.call(this)||this;return e.observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return e(n,t),n.prototype[vt]=function(){return new zn(this)},n.prototype.lift=function(e){var t=new qn(this,this);return t.operator=e,t},n.prototype.next=function(e){if(this.closed)throw new Kn;if(!this.isStopped)for(var t=this.observers,n=t.length,r=t.slice(),o=0;o<n;o++)r[o].next(e)},n.prototype.error=function(e){if(this.closed)throw new Kn;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,n=t.length,r=t.slice(),o=0;o<n;o++)r[o].error(e);this.observers.length=0},n.prototype.complete=function(){if(this.closed)throw new Kn;this.isStopped=!0;for(var e=this.observers,t=e.length,n=e.slice(),r=0;r<t;r++)n[r].complete();this.observers.length=0},n.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},n.prototype._trySubscribe=function(e){if(this.closed)throw new Kn;return t.prototype._trySubscribe.call(this,e)},n.prototype._subscribe=function(e){if(this.closed)throw new Kn;return this.hasError?(e.error(this.thrownError),ht.EMPTY):this.isStopped?(e.complete(),ht.EMPTY):(this.observers.push(e),new $n(this,e))},n.prototype.asObservable=function(){var e=new bt;return e.source=this,e},n.create=function(e,t){return new qn(e,t)},n}(bt),qn=function(t){function n(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r}return e(n,t),n.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},n.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},n.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},n.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):ht.EMPTY},n}(Wn),Zn=function(t){function n(e){var n=t.call(this)||this;return n._value=e,n}return e(n,t),Object.defineProperty(n.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),n.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return n&&!n.closed&&e.next(this._value),n},n.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new Kn;return this._value},n.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},n}(Wn),Yn=function(){function e(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return e.prototype=Object.create(Error.prototype),e}(),Xn=new bt((function(e){return e.complete()})),Jn=function(){function e(e){if(this.total=e,this.total<0)throw new Yn}return e.prototype.call=function(e,t){return t.subscribe(new Qn(e,this.total))},e}(),Qn=function(t){function n(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r}return e(n,t),n.prototype._next=function(e){var t=this.total,n=++this.count;n<=t&&(this.destination.next(e),n===t&&(this.destination.complete(),this.unsubscribe()))},n}(yt),er=function(){function e(e,t){this.project=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new tr(e,this.project,this.thisArg))},e}(),tr=function(t){function n(e,n,r){var o=t.call(this,e)||this;return o.project=n,o.count=0,o.thisArg=r||o,o}return e(n,t),n.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}this.destination.next(t)},n}(yt),nr="custom:(uuid,encounters:(uuid,encounterDatetime,form:(uuid,name),location:ref,encounterType:ref,encounterProviders:(uuid,display,provider:(uuid,display))),patient:(uuid,uuid),visitType:(uuid,name,display),attributes:(uuid,display,attributeType:(name,datatypeClassname,uuid),value),location:(uuid,name,display),startDatetime,stopDatetime)",rr=function(){try{return JSON.parse(localStorage.getItem("openmrs:visitStoreState")||"null")}catch(e){return null}}()||{patientUuid:null,manuallySetVisitUuid:null};Ye().subscribe((function(e){var t;t=e,localStorage.setItem("openmrs:visitStoreState",JSON.stringify(t))}));var or,ir,ar=new Zn(null);!function(e){e.NEWVISIT="startVisit",e.EDITVISIT="editVisit",e.LOADING="loadingVisit"}(or||(or={})),function(e){e.NOTSTARTED="notStarted",e.ONGOING="ongoing"}(ir||(ir={}));var ur={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"}}(),d}())}}}))},4611:()=>{function e(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}System.register(["@openmrs/esm-state"],(function(t,n){var r={};return{setters:[function(e){r.createGlobalStore=e.createGlobalStore,r.getGlobalStore=e.getGlobalStore}],execute:function(){t(function(){"use strict";var t={685:function(e){e.exports=r}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,o),i.exports}o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){var t=function(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]},n=function(e){return function n(r){return 0===arguments.length||t(r)?n:e.apply(this,arguments)}},r=function(e){return function r(o,i){switch(arguments.length){case 0:return r;case 1:return t(o)?r:n((function(t){return e(o,t)}));default:return t(o)&&t(i)?r:t(o)?n((function(t){return e(t,i)})):t(i)?n((function(t){return e(o,t)})):e(o,i)}}},a=function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n},u=function(e,t,n){for(var r=0,o=n.length;r<o;){if(e(t,n[r]))return!0;r+=1}return!1},c=function(e,t){return Object.prototype.hasOwnProperty.call(t,e)},s=function(e,t,n,r){var o=a(e);function i(e,t){return le(e,t,n.slice(),r.slice())}return!u((function(e,t){return!u(i,t,e)}),a(t),o)},l=function(e){return function o(i,a,u){switch(arguments.length){case 0:return o;case 1:return t(i)?o:r((function(t,n){return e(i,t,n)}));case 2:return t(i)&&t(a)?o:t(i)?r((function(t,n){return e(t,a,n)})):t(a)?r((function(t,n){return e(i,t,n)})):n((function(t){return e(i,a,t)}));default:return t(i)&&t(a)&&t(u)?o:t(i)&&t(a)?r((function(t,n){return e(t,n,u)})):t(i)&&t(u)?r((function(t,n){return e(t,a,n)})):t(a)&&t(u)?r((function(t,n){return e(i,t,n)})):t(i)?n((function(t){return e(t,a,u)})):t(a)?n((function(t){return e(i,t,u)})):t(u)?n((function(t){return e(i,a,t)})):e(i,a,u)}}},f=function(e){return"[object Object]"===Object.prototype.toString.call(e)},d=function(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)},p=function(e,t,n,r){return e["@@transducer/result"](n[r](Ee(e["@@transducer/step"],e),t))},h=function(e,t){return function(n){if(!e(n))return"function"==typeof t?t(n):t}},v=function(e){return(0,Ie.getGlobalStore)("config-module-".concat(e),{config:null,loaded:!1,translationOverridesLoaded:!1})},y=function(){return(0,Ie.getGlobalStore)("config-extension-slots",{slots:{}})},m=function(e){return g(y().getState(),e)},g=function(e,t){var n=e.slots[t];return null!=n?n:{loaded:!1,config:{}}},b=function(){return(0,Ie.getGlobalStore)("config-extensions",{configs:{}})},w=function(e,t){var n=Object.assign({},S(b().getState(),e,t));return n.config=ve(["Display conditions","Translation overrides"],n.config),n},S=function(e,t,n){var r,o=null===(r=e.configs[t])||void 0===r?void 0:r[n];return null!=o?o:{loaded:!1,config:null}},O=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},E=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},_=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){E(e,t,n[t])}))}return e},j=function(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e},x=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||P(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},C=function(e){return function(e){if(Array.isArray(e))return O(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||P(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},P=function(e,t){if(e){if("string"==typeof e)return O(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?O(e,t):void 0}},A=function(e,t){var n=!0,r=!1,o=void 0;try{for(var i,a=Object.keys(e.schemas)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value,c=v(u);if(e.moduleLoaded[u]){var s=G(u,e,t);c.setState({translationOverridesLoaded:!0,loaded:!0,config:s})}else{var l=K(u,e,t);c.setState({translationOverridesLoaded:!0,loaded:!1,config:l})}}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}},T=function(e,t){var n,r,o=(n=z(V(e,t)),function(e){var t=!0,n=!1,r=void 0;try{for(var o,i=Object.entries(e)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=x(o.value,2),u=a[0],c=a[1],s=!0,l=!1,f=void 0;try{for(var d,p=Object.entries(c)[Symbol.iterator]();!(s=(d=p.next()).done);s=!0){var h=x(d.value,2),v=h[0];H(h[1],u,v)}}catch(e){l=!0,f=e}finally{try{s||null==p.return||p.return()}finally{if(l)throw f}}}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}(r=Object.keys(n).reduce((function(e,t){var r,o;return(null===(r=n[t])||void 0===r?void 0:r.extensionSlots)&&(e[t]=null===(o=n[t])||void 0===o?void 0:o.extensionSlots),e}),{})),Object.keys(r).reduce((function(e,t){return _({},e,r[t])}),{})),i=Object.fromEntries(Object.entries(o).map((function(e){var t=x(e,2);return[t[0],{loaded:!0,config:t[1]}]}))),a=y(),u=a.getState(),c={slots:_({},u.slots,i)};fe(u,c)||a.setState(c)},k=function(e,t){var n=function(e,t){var n=Le(ge(e.schemas)),r=C(e.providedConfigs.map((function(e){return[e.config,e.source]}))).concat([[t.config,"temporary config"]]),o=!0,i=!1,a=void 0;try{for(var u,c=r[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var s=x(u.value,2);n=z([n,Ue(s[0],s[1])])}}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t);Ne.setState({config:n})},I=function(e,t,n){var r={},o=!0,i=!1,a=void 0;try{for(var u,c=t.mountedExtensions[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var s=u.value,l=F(s.slotModuleName,s.extensionModuleName,s.slotName,s.extensionId,e,n);r[s.slotName]=j(_({},r[s.slotName]),E({},s.extensionId,{config:l,loaded:!0}))}}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}b().setState({configs:r})},R=function(e,t){Be(e,t);var n=he(t,Ke),r=Re.getState();Re.setState({schemas:j(_({},r.schemas),E({},e,n)),moduleLoaded:j(_({},r.moduleLoaded),E({},e,!0))})},D=function(e){var t=Re.getState();Re.setState({schemas:j(_({},t.schemas),E({},e,Ke))})},M=function(e,t){Be(e,t);var n=he(t,Ke),r=Re.getState();r.schemas[e]&&console.error("Config schema for extension ".concat(e," already exists. If there are multiple extensions with this same name, one will probably crash.")),Re.setState({schemas:j(_({},r.schemas),E({},e,n))})},N=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"provided",n=Re.getState();Re.setState({providedConfigs:C(n.providedConfigs).concat([{source:t,config:e}])})},L=function(e){return new Promise((function(t){var n=function(e){if(e.loaded&&e.config){var n=ve(["Display conditions","Translation overrides"],e.config);t(n),o&&o()}},r=v(e);n(r.getState());var o=r.subscribe(n)}))},U=function(e){return new Promise((function(t){var n=function(e){if(e.translationOverridesLoaded&&e.config){var n,r=null!==(n=e.config["Translation overrides"])&&void 0!==n?n:{};t(r),o&&o()}},r=v(e);n(r.getState());var o=r.subscribe(n)}))},B=function(e,t,n){W(e,t,n);var r=Ve(e,t);return He(e,r,n),r},F=function(e,t,n,r,o,i){var a,u,c,s,l=function(e){return x(e.split("#"),1)[0]}(r),f=o.schemas[l],d=f?l:t,p=V(o,i),h=$(e,p),v=null!==(s=null==h||null===(a=h.extensionSlots)||void 0===a||null===(u=a[n])||void 0===u||null===(c=u.configure)||void 0===c?void 0:c[r])&&void 0!==s?s:{},y=z([$(d,p),v]),m=null!=f?f:o.schemas[t];W(m,y,d);var g=Ve(m,y);return He(m,g,d),delete g.extensionSlots,g},H=function(e,t,n){var r="".concat(t,".extensionSlots.").concat(n),o="Extension slot config '".concat(r,"'"),i=Object.keys(e).filter((function(e){return!["add","remove","order","configure"].includes(e)}));i.length&&J(r,o+"' contains invalid keys '".concat(i.join("', '"),"'")),e.add&&(Array.isArray(e.add)&&e.add.every((function(e){return"string"==typeof e}))||J(r,o+".add' is invalid. Must be an array of strings (extension IDs)")),e.remove&&(Array.isArray(e.remove)&&e.remove.every((function(e){return"string"==typeof e}))||J(r,o+".remove' is invalid. Must be an array of strings (extension IDs)")),e.order&&(Array.isArray(e.order)&&e.order.every((function(e){return"string"==typeof e}))||J(r,o+".order' is invalid. Must be an array of strings (extension IDs)")),e.configure&&(X(e.configure)||J(r,o+".configure' is invalid. Must be an object with extension IDs for keys"))},V=function(e,t){return C(e.providedConfigs.map((function(e){return e.config}))).concat([t.config])},G=function(e,t,n){var r=t.schemas[e],o=$(e,V(t,n));W(r,o,e);var i=Ve(r,o);return He(r,i,e),delete i.extensionSlots,i},K=function(e,t,n){var r=$(e,V(t,n)),o=Ve(Ke,r);return He(Ke,o,e),delete o.extensionSlots,o},$=function(e,t){return z(t.map((function(t){return t[e]})).filter((function(e){return!!e})))},z=function(e){return je(he)({},e)},W=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=a.value,s=t[c],l=n+"."+c,f=e[c];e.hasOwnProperty(c)?Fe(f,s,l):"extensionSlots"===c&&""!==n||J(l,"Unknown config key '".concat(l,"' provided. Ignoring."))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}},q=function(e,t,n){t&&Z(e,[{Array:xe,Boolean:Ce,ConceptUuid:ke,Number:Pe,Object:Te,String:Ae,UUID:ke,PersonAttributeTypeUuid:ke,PatientIdentifierTypeUuid:ke}[t]],n)},Z=function(e,t,n){if(t)try{var r=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=(0,a.value)(n);"string"==typeof c&&J(e,"object"==typeof n?"Invalid configuration for ".concat(e,": ").concat(c):"Invalid configuration value ".concat(n," for ").concat(e,": ").concat(c))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}catch(t){console.error('Skipping invalid validator at "'.concat(e,'". Encountered error\n\t').concat(t))}},Y=function(e){return!!e&&Object.keys(e).filter((function(e){return!["_default","_validators"].includes(e)})).length>0},X=function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e},J=function(e,t){var n="".concat(e,":::").concat(t);Ge.has(n)||(console.error(t),Ge.add(n))},Q=function(e){e?Ge.forEach((function(t){t.startsWith(e)&&Ge.delete(t)})):Ge.clear()};o.r(i),o.d(i,{Type:function(){return me},clearConfigErrors:function(){return Q},configExtensionStore:function(){return Me},configInternalStore:function(){return Re},defineConfigSchema:function(){return R},defineExtensionConfigSchema:function(){return M},getConfig:function(){return L},getConfigStore:function(){return v},getExtensionConfig:function(){return w},getExtensionConfigFromStore:function(){return S},getExtensionSlotConfig:function(){return m},getExtensionSlotConfigFromStore:function(){return g},getExtensionSlotsConfigStore:function(){return y},getExtensionsConfigStore:function(){return b},getTranslationOverrides:function(){return U},implementerToolsConfigStore:function(){return Ne},inRange:function(){return $e},isUrl:function(){return We},isUrlWithTemplateParameters:function(){return ze},oneOf:function(){return qe},processConfig:function(){return B},provide:function(){return N},registerModuleWithConfigSystem:function(){return D},temporaryConfigStore:function(){return De},validator:function(){return h},validators:function(){return Ze}});var ee="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},te=Object.prototype.toString,ne=function(){return"[object Arguments]"===te.call(arguments)?function(e){return"[object Arguments]"===te.call(e)}:function(e){return c("callee",e)}}(),re=ne,oe=!{toString:null}.propertyIsEnumerable("toString"),ie=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],ae=function(){return arguments.propertyIsEnumerable("length")}(),ue=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1},ce="function"!=typeof Object.keys||ae?n((function(e){if(Object(e)!==e)return[];var t,n,r=[],o=ae&&re(e);for(t in e)!c(t,e)||o&&"length"===t||(r[r.length]=t);if(oe)for(n=ie.length-1;n>=0;)c(t=ie[n],e)&&!ue(r,t)&&(r[r.length]=t),n-=1;return r})):n((function(e){return Object(e)!==e?[]:Object.keys(e)})),se=n((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function le(t,n,r,o){if(ee(t,n))return!0;var i,a,u=se(t);if(u!==se(n))return!1;if(null==t||null==n)return!1;if("function"==typeof t["fantasy-land/equals"]||"function"==typeof n["fantasy-land/equals"])return"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](n)&&"function"==typeof n["fantasy-land/equals"]&&n["fantasy-land/equals"](t);if("function"==typeof t.equals||"function"==typeof n.equals)return"function"==typeof t.equals&&t.equals(n)&&"function"==typeof n.equals&&n.equals(t);switch(u){case"Arguments":case"Array":case"Object":if("function"==typeof t.constructor&&"Promise"===(i=t.constructor,null==(a=String(i).match(/^function (\w*)/))?"":a[1]))return t===n;break;case"Boolean":case"Number":case"String":if((void 0===t?"undefined":e(t))!=(void 0===n?"undefined":e(n))||!ee(t.valueOf(),n.valueOf()))return!1;break;case"Date":if(!ee(t.valueOf(),n.valueOf()))return!1;break;case"Error":return t.name===n.name&&t.message===n.message;case"RegExp":if(t.source!==n.source||t.global!==n.global||t.ignoreCase!==n.ignoreCase||t.multiline!==n.multiline||t.sticky!==n.sticky||t.unicode!==n.unicode)return!1}for(var l=r.length-1;l>=0;){if(r[l]===t)return o[l]===n;l-=1}switch(u){case"Map":return t.size===n.size&&s(t.entries(),n.entries(),r.concat([t]),o.concat([n]));case"Set":return t.size===n.size&&s(t.values(),n.values(),r.concat([t]),o.concat([n]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var f=ce(t);if(f.length!==ce(n).length)return!1;var d=r.concat([t]),p=o.concat([n]);for(l=f.length-1;l>=0;){var h=f[l];if(!c(h,n)||!le(n[h],t[h],d,p))return!1;l-=1}return!0}var fe=r((function(e,t){return le(e,t,[],[])})),de=l((function(e,t,n){var r,o={};for(r in t)c(r,t)&&(o[r]=c(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)c(r,n)&&!c(r,o)&&(o[r]=n[r]);return o})),pe=l((function e(t,n,r){return de((function(n,r,o){return f(r)&&f(o)?e(t,r,o):t(n,r,o)}),n,r)})),he=r((function(e,t){return pe((function(e,t,n){return n}),e,t)})),ve=r((function(e,t){for(var n={},r={},o=0,i=e.length;o<i;)r[e[o]]=1,o+=1;for(var a in t)r.hasOwnProperty(a)||(n[a]=t[a]);return n}));function ye(e,t,n,r){var o,i=function(o){for(var i=t.length,a=0;a<i;){if(e===t[a])return n[a];a+=1}for(var u in t[a+1]=e,n[a+1]=o,e)o[u]=r?ye(e[u],t,n,!0):e[u];return o};switch(se(e)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(e.valueOf());case"RegExp":return o=e,new RegExp(o.source,(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.sticky?"y":"")+(o.unicode?"u":""));default:return e}}var me,ge=n((function(e){return null!=e&&"function"==typeof e.clone?e.clone():ye(e,[],[],!0)})),be=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)},we=n((function(e){return!!be(e)||!!e&&"object"==typeof e&&!function(e){return"[object String]"===Object.prototype.toString.call(e)}(e)&&(1===e.nodeType?!!e.length:0===e.length||e.length>0&&e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1))})),Se=function(){function e(e){this.f=e}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}(),Oe=r((function(e,t){return function(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,o){return t.apply(this,arguments)};case 5:return function(e,n,r,o,i){return t.apply(this,arguments)};case 6:return function(e,n,r,o,i,a){return t.apply(this,arguments)};case 7:return function(e,n,r,o,i,a,u){return t.apply(this,arguments)};case 8:return function(e,n,r,o,i,a,u,c){return t.apply(this,arguments)};case 9:return function(e,n,r,o,i,a,u,c,s){return t.apply(this,arguments)};case 10:return function(e,n,r,o,i,a,u,c,s,l){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(e.length,(function(){return e.apply(t,arguments)}))})),Ee=Oe,_e="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",je=l((function(e,t,n){if("function"==typeof e&&(e=function(e){return new Se(e)}(e)),we(n))return function(e,t,n){for(var r=0,o=n.length;r<o;){if((t=e["@@transducer/step"](t,n[r]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r+=1}return e["@@transducer/result"](t)}(e,t,n);if("function"==typeof n["fantasy-land/reduce"])return p(e,t,n,"fantasy-land/reduce");if(null!=n[_e])return d(e,t,n[_e]());if("function"==typeof n.next)return d(e,t,n);if("function"==typeof n.reduce)return p(e,t,n,"reduce");throw new TypeError("reduce: list must be array or iterable")}));!function(e){e.Array="Array",e.Boolean="Boolean",e.ConceptUuid="ConceptUuid",e.Number="Number",e.Object="Object",e.String="String",e.UUID="UUID",e.PersonAttributeTypeUuid="PersonAttributeTypeUuid",e.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid"}(me||(me={}));var xe=h((function(e){return Array.isArray(e)}),"must be an array"),Ce=h((function(e){return"boolean"==typeof e}),"must be a boolean"),Pe=h((function(e){return"number"==typeof e}),"must be a number"),Ae=h((function(e){return"string"==typeof e}),"must be a string"),Te=h((function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}),"must be an object (not an array or null)"),ke=h((function(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/^[0-9a-f]{36}$/i.test(e)}),"must be a valid UUID or a 36-character hexadecimal string"),Ie=o(685),Re=(0,Ie.createGlobalStore)("config-internal",{providedConfigs:[],schemas:{},moduleLoaded:{}}),De=(0,Ie.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});De.subscribe((function(e){var t;t=e.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}));var Me=(0,Ie.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]}),Ne=(0,Ie.createGlobalStore)("config-implementer-tools",{config:{}});function Le(e){return e.hasOwnProperty("_default")?j(_({},e),{_value:e._default,_source:"default"}):X(e)?Object.keys(e).reduce((function(t,n){return t[n]=Le(e[n]),t}),{}):{}}function Ue(e,t){return X(e)?Object.keys(e).reduce((function(n,r){return n[r]=Ue(e[r],t),n}),{}):{_value:e,_source:t}}function Be(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r="Please verify that you are running the latest version and, if so, alert the maintainer.",o=!0,i=!1,a=void 0;try{for(var u,c=function(){var o=u.value,i=n+(n&&".")+o,a=t[o];if("Display conditions"===i&&console.error("".concat(e,' declares a configuration option called "Display conditions"; the "Display conditions" option is a reserved name. ').concat(r)),"Translation overrides"===i&&console.error("".concat(e,' declares a configuration option called "Translation overrides"; the "Translation overrides" option is a reserved name. ').concat(r)),!X(a))return console.error("".concat(e," has bad config schema definition for key '").concat(i,"'. ").concat(r)),"continue";a.hasOwnProperty("_default")||Be(e,a,i);var c=a._elements;if(Y(c)&&Be(e,c,i+"._elements"),a._validators){var s=!0,l=!1,f=void 0;try{for(var d,p=a._validators[Symbol.iterator]();!(s=(d=p.next()).done);s=!0){var h=d.value;"function"!=typeof h&&console.error("".concat(e," has invalid validator for key '").concat(i,"' ").concat(r,".")+"\n\nIf you're the maintainer: validators must be functions that return either "+"undefined or an error string. Received ".concat(h,"."))}}catch(e){l=!0,f=e}finally{try{s||null==p.return||p.return()}finally{if(l)throw f}}}var v=a._type;v&&!Object.values(me).includes(v)&&console.error("".concat(e," has invalid type for key '").concat(i,"' ").concat(r,".")+"\n\nIf you're the maintainer: the allowed types are ".concat(Object.values(me).join(", "),". ")+"Received '".concat(v,"'")),Object.keys(a).every((function(e){return["_description","_validators","_elements","_type"].includes(e)}))&&!n.includes("._elements")&&console.error("".concat(e," has bad config schema definition for key '").concat(i,"'. ").concat(r,".")+"\n\nIf you're the maintainer: all config elements must have a default. "+"Received ".concat(JSON.stringify(a))),c&&v&&![me.Array,me.Object].includes(v)&&console.error("".concat(e," has bad config schema definition for key '").concat(i,"'. ").concat(r,".")+"\n\nIf you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. "+"Received ".concat(JSON.stringify(v)))},s=Object.keys(t).filter((function(e){return!e.startsWith("_")}))[Symbol.iterator]();!(o=(u=s.next()).done);o=!0)c()}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}}function Fe(e,t,n){q(n,e._type,t),X(t)?e._type===me.Object?function(e,t,n){if(e._elements){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=a.value,s=t[c];W(e._elements,s,"".concat(n,".").concat(c))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}}(e,t,n):e.hasOwnProperty("_default")||W(e,t,n):e._type===me.Array&&function(e,t,n){if(Y(e._elements))for(var r=0;r<t.length;r++)Fe(e._elements,t[r],"".concat(n,"[").concat(r,"]"));for(var o=0;o<t.length;o++){var i;q("".concat(n,"[").concat(o,"]"),null===(i=e._elements)||void 0===i?void 0:i._type,t[o])}}(e,t,n)}function He(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(e)if(t!==e._default&&Z(n,e._validators,t),X(t)){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=a.value,s=t[c],l=n+"."+c,f=e[c];e._type===me.Object&&e._elements?He(e._elements,s,l):He(f,s,l)}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}else if(Array.isArray(t)&&e._elements)for(var d=0;d<t.length;d++)He(e._elements,t[d],"".concat(n,"[").concat(d,"]"))}A(Re.getState(),De.getState()),Re.subscribe((function(e){return A(e,De.getState())})),De.subscribe((function(e){return A(Re.getState(),e)})),k(Re.getState(),De.getState()),Re.subscribe((function(e){return k(e,De.getState())})),De.subscribe((function(e){return k(Re.getState(),e)})),T(Re.getState(),De.getState()),Re.subscribe((function(e){return T(e,De.getState())})),De.subscribe((function(e){return T(Re.getState(),e)})),I(Re.getState(),Me.getState(),De.getState()),Re.subscribe((function(e){I(e,Me.getState(),De.getState())})),Me.subscribe((function(e){I(Re.getState(),e,De.getState())})),De.subscribe((function(e){I(Re.getState(),Me.getState(),e)}));var Ve=function(e,t){var n=ge(t);if(!e)return n;var r=!0,o=!1,i=void 0;try{for(var a,u=function(){var t=a.value,r=n[t],o=e[t];if(o&&o.hasOwnProperty("_default")){n.hasOwnProperty(t)||(n[t]=o._default);var i=o._elements;if(r&&Y(i))if(o._type===me.Array&&Array.isArray(r)){var u=r.map((function(e){return Ve(i,e)}));n[t]=u}else if(o._type===me.Object){var c=!0,s=!1,l=void 0;try{for(var f,d=Object.keys(r)[Symbol.iterator]();!(c=(f=d.next()).done);c=!0){var p=f.value;r[p]=Ve(i,r[p])}}catch(e){s=!0,l=e}finally{try{c||null==d.return||d.return()}finally{if(s)throw l}}}}else if(X(o)){var h=n.hasOwnProperty(t)?r:{};X(h)&&(n[t]=Ve(o,h))}},c=Object.keys(e)[Symbol.iterator]();!(r=(a=c.next()).done);r=!0)u()}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n},Ge=new Set,Ke={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:me.Array,_default:[]}},"Translation overrides":{_description:"Per-language overrides for frontend translations should be keyed by language code and each language dictionary contains the translation key and the display value",_type:me.Object,_default:{},_validators:[h((function(e){return Object.keys(e).every((function(e){return/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e)}))}),(function(e){var t=Object.keys(e).filter((function(e){return!/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e)}));return"The 'Translation overrides' object should have language codes for keys. Language codes must be in the form of a two-to-three letter language code optionally followed by a hyphen and a two-to-three letter country code. The following keys do not conform: ".concat(t.join(", "),".")}))]}},$e=function(e,t){return h((function(n){return e<=n&&n<=t}),"must be between ".concat(e," and ").concat(t))},ze=function(e){var t=e.concat(["openmrsBase","openmrsSpaBase"]);return h((function(e){if(!e||"string"!=typeof e)return!1;for(var n=/\${(.*?)}/g,r=n.exec(e);r;){if(!t.includes(r[1]))return!1;r=n.exec(e)}return!0}),"Should be a URL or path. The allowed template parameters are "+t.map((function(e){return"${"+e+"}"})).join(", "))},We=ze([]),qe=function(e){return h((function(t){return e.includes(t)}),"Must be one of the following: '".concat(e.join("', '"),"'."))},Ze={inRange:$e,isUrl:We,isUrlWithTemplateParameters:ze,oneOf:qe}}(),i}())}}}))},5607:()=>{System.register([],(function(e,t){return{execute:function(){e(function(){"use strict";var e=function(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)},t=function(t){return function(){var n=this,r=arguments;return new Promise((function(o,i){var a=t.apply(n,r);function u(t){e(a,o,i,u,c,"next",t)}function c(t){e(a,o,i,u,c,"throw",t)}u(void 0)}))}},n=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},r=function(e){return e.replace(/[\/\-@]/g,"_")},o=function(e){return s.apply(this,arguments)},i=function(e,t){return l.apply(this,arguments)},a=function(){return f.apply(this,arguments)},u={d:function(e,t){for(var n in t)u.o(t,n)&&!u.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}};!function(){u.S={};var e={},t={};u.I=function(n,r){r||(r=[]);var o=t[n];if(o||(o=t[n]={}),!(r.indexOf(o)>=0)){if(r.push(o),e[n])return e[n];u.o(u.S,n)||(u.S[n]={}),u.S[n];var i=[];return e[n]=i.length?Promise.all(i).then((function(){return e[n]=1})):1}}}();var c={};function s(){return s=t((function(e){var t,o,a,c,s,l,f,d,p=arguments;return n(this,(function(n){switch(n.label){case 0:return t=p.length>1&&void 0!==p[1]?p[1]:"./start",[4,i(e,null==(o=p.length>2?p[2]:void 0)?void 0:o.importMap)];case 1:if(n.sent(),a=r(e),"object"!=typeof(h=c=window[a])||null===h||!("init"in h)||"function"!=typeof h.init||!("get"in h)||"function"!=typeof h.get)throw s="The global variable ".concat(a," does not refer to a federated module"),console.error(s),new Error(s);return c.init(u.S.default),[4,c.get(t)];case 2:if(l=n.sent(),"object"!=typeof(f=l())||null===f)throw d="Container for ".concat(e," did not return an ESM module as expected"),console.error(d),new Error(d);return[2,f]}var h}))})),s.apply(this,arguments)}function l(){return(l=t((function(e,t){var o,i,u,c,s,l;return n(this,(function(n){switch(n.label){case 0:if("string"!=typeof e||0===e.trim().length)throw o="Attempted to call importDynamic() without supplying a package to load",console.error(o),new Error(o);return i=r(e),window[i]?[3,5]:null==t?[3,1]:(c=t,[3,3]);case 1:return[4,a()];case 2:c=n.sent(),n.label=3;case 3:if(!(u=c).imports.hasOwnProperty(e))throw s="Could not find the package ".concat(e," defined in the current importmap"),console.error(s),new Error(s);return(l=u.imports[e]).startsWith("./")&&(l=window.spaBase+l.substring(1)),[4,new Promise((function(e,t){!function(e,t,n){var r=document.head.querySelector('script[src="'.concat(e,'"]')),o=window[d];if(o||(o=window[d]=new Set([])),r)if(o.has(e)){var i=function(){null==r||r.removeEventListener("load",i),t(null)};r.addEventListener("load",i);var a=function(t){console.error("Failed to load script from ".concat(e),t),null==r||r.removeEventListener("error",a),n(t.message)};r.addEventListener("error",a)}else console.warn("Script already loaded. Not loading it again.",e),t(null);else{o.add(e);var u=document.createElement("script");u.src=e,u.type="text/javascript",u.async=!0;var c=function(){o.delete(e),u.removeEventListener("load",c),t(null)};u.addEventListener("load",c);var s=function(t){var r;o.delete(e),console.error("Failed to load script from ".concat(e),t),u.removeEventListener("error",s),n(null!==(r=t.message)&&void 0!==r?r:"Failed to load script from ".concat(e))};u.addEventListener("error",s),document.head.appendChild(u)}}(l,e,t)}))];case 4:n.sent(),n.label=5;case 5:return[2]}}))}))).apply(this,arguments)}function f(){return(f=t((function(){return n(this,(function(e){return[2,window.importMapOverrides.getCurrentPageMap()]}))}))).apply(this,arguments)}u.r(c),u.d(c,{getCurrentImportMap:function(){return a},importDynamic:function(){return o},preloadImport:function(){return i},slugify:function(){return r}});var d=Symbol("__openmrs_script_loading");return c}())}}}))},2102:()=>{System.register(["@openmrs/esm-globals"],(function(e,t){var n={};return{setters:[function(e){n.dispatchNotificationShown=e.dispatchNotificationShown}],execute:function(){e(function(){"use strict";var e={728:function(e){e.exports=n}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return function(){var e=function(e){var t=n(e);setTimeout((function(){throw t}))},t=function(){var t=Error();return function(r){n(r).stack+="\nAsync stacktrace:\n".concat(t.stack),e(r)}},n=function(e){var t,n,r,o,i;if(n=e,null!=(r=Error)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):(o=n,null!=(i=r)&&"undefined"!=typeof Symbol&&i[Symbol.hasInstance]?i[Symbol.hasInstance](o):o instanceof i))return e;if(null===e)return Error("'null' was thrown as an error");if("object"==typeof e){try{t="Object thrown as error: ".concat(JSON.stringify(e))}catch(n){t="Object thrown as error with the following properties: ".concat(Object.keys(e))}return Error(t)}return void 0===e?Error("'undefined' was thrown as an error"):Error(e.toString())};r.r(o),r.d(o,{createErrorHandler:function(){return t},reportError:function(){return e}});var i=r(728);window.onerror=function(e){return console.error("Unexpected error: ",e),(0,i.dispatchNotificationShown)({description:null!=e?e:"Oops! An unexpected error occurred.",kind:"error",title:"Error"}),!1},window.onunhandledrejection=function(e){var t;console.error("Unhandled rejection: ",e.reason),(0,i.dispatchNotificationShown)({description:null!==(t=e.reason)&&void 0!==t?t:"Oops! An unhandled promise rejection occurred.",kind:"error",title:"Error"})}}(),o}())}}}))},4647:(e,t,n)=>{function r(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function o(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}e=n.nmd(e),System.register(["@openmrs/esm-config","@openmrs/esm-state","@openmrs/esm-api","@openmrs/esm-feature-flags","single-spa"],(function(i,a){var u={},c={},s={},l={},f={};return{setters:[function(e){u.configExtensionStore=e.configExtensionStore,u.getExtensionConfigFromStore=e.getExtensionConfigFromStore,u.getExtensionSlotConfig=e.getExtensionSlotConfig,u.getExtensionSlotConfigFromStore=e.getExtensionSlotConfigFromStore,u.getExtensionSlotsConfigStore=e.getExtensionSlotsConfigStore,u.getExtensionsConfigStore=e.getExtensionsConfigStore},function(e){c.createGlobalStore=e.createGlobalStore,c.getGlobalStore=e.getGlobalStore},function(e){s.getSessionStore=e.getSessionStore,s.userHasAccess=e.userHasAccess},function(e){l.featureFlagsStore=e.featureFlagsStore},function(e){f.mountRootParcel=e.mountRootParcel}],execute:function(){i(function(){"use strict";var i={766:function(e){e.exports=s},824:function(e){e.exports=u},708:function(e){e.exports=l},685:function(e){e.exports=c},645:function(e){e.exports=f}},a={};function d(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={exports:{}};return i[e](n,n.exports,d),n.exports}d.d=function(e,t){for(var n in t)d.o(t,n)&&!d.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},d.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},d.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var p={};return function(){var i=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},a=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},u=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},c=function(e){var t=this.__data__=new $(e);this.size=t.size},s=function(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Oe;++t<n;)this.add(e[t])},l=function(e){var t=Mt.getState(),n=e(t);n!==t&&Mt.setState(n)},f=function(e){var t=[],n=!0,r=!1,o=void 0;try{for(var i,a=Object.values(e.extensions)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value,c=!0,s=!1,l=void 0;try{for(var f,d=u.instances[Symbol.iterator]();!(c=(f=d.next()).done);c=!0){var p=f.value;t.push({slotModuleName:p.slotModuleName,extensionModuleName:u.moduleName,slotName:p.slotName,extensionId:p.id})}}catch(e){s=!0,l=e}finally{try{c||null==d.return||d.return()}finally{if(s)throw l}}}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}It(Rt.configExtensionStore.getState().mountedExtensions,t)||Rt.configExtensionStore.setState({mountedExtensions:t})},h=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},v=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},y=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){v(e,t,n[t])}))}return e},m=function(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e},g=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||w(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},b=function(e){return function(e){if(Array.isArray(e))return h(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||w(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},w=function(e,t){if(e){if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(e,t):void 0}},S=function(e,t,n){var r={},o=!0,i=!1,a=void 0;try{for(var u,c=Object.entries(e.slots)[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var s=g(u.value,2),l=s[0],f=s[1],d=k(l,e,(0,Rt.getExtensionSlotConfigFromStore)(t,f.name).config,n);r[l]={moduleName:f.moduleName,assignedExtensions:d}}}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}It(Vt.getState().slots,r)||Vt.setState({slots:r})},O=function(e,t){return{moduleName:t,name:e,attachedIds:[],config:null}},E=function(e){return g(e.split("#"),1)[0]},_=function(e,t){var n=E(t);return e.extensions[n]},j=function(e){return _(Ht.getState(),e)},x=function(e,t){l((function(n){var r=n.slots[e];return m(y({},n),r?{slots:m(y({},n.slots),v({},e,m(y({},r),{attachedIds:b(r.attachedIds).concat([t])})))}:{slots:m(y({},n.slots),v({},e,m(y({},O(e)),{attachedIds:[t]})))})}))},C=function(e,t){l((function(n){var r=n.slots[e];return r&&r.attachedIds.includes(t)?m(y({},n),{slots:m(y({},n.slots),v({},e,m(y({},r),{attachedIds:r.attachedIds.filter((function(e){return e!==t}))})))}):n}))},P=function(e){l((function(t){var n=t.slots[e];return n?m(y({},t),{slots:m(y({},t.slots),v({},e,m(y({},n),{attachedIds:[]})))}):t}))},A=function(e,t,n,r){var o=t.indexOf(e);if(-1!==o)return o;if(void 0!==n)return 1e3+n;var i=r.indexOf(e);return-1!==i?2e3+i:-1},T=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=null!=t?t:navigator.onLine,o=null!=n?n:Object.entries(Bt.featureFlagsStore.getState().flags).filter((function(e){return g(e,2)[1].enabled})).map((function(e){return g(e,1)[0]}));return e.filter((function(e){return D(r,e.online,e.offline)})).filter((function(e){return void 0===e.featureFlag||(null==o?void 0:o.includes(e.featureFlag))}))},k=function(e,t,n,r){var o=function(e,t){var n=e.add||[],r=e.remove||[],o=e.order||[],i=Ht.getState().extensions;return b(t).concat(b(n)).filter((function(e){return!r.includes(e)})).sort((function(e,n){var r,a,u=A(e,o,null===(r=i[E(e)])||void 0===r?void 0:r.order,t),c=A(n,o,null===(a=i[E(n)])||void 0===a?void 0:a.order,t);return-1===c?-1:-1===u?1:u-c}))}(n,t.slots[e].attachedIds),i=[],a=void 0,u=!0,c=!1,s=void 0;try{for(var l,f=o[Symbol.iterator]();!(u=(l=f.next()).done);u=!0){var d=l.value,p=(0,Rt.getExtensionConfigFromStore)(r,e,d).config,h=E(d),v=t.extensions[h];if(v){var y,m,g,w,S,O=null!==(g=null!==(m=null==p||null===(y=p["Display conditions"])||void 0===y?void 0:y.privileges)&&void 0!==m?m:v.privileges)&&void 0!==g?g:[];if(O&&("string"==typeof O||Array.isArray(O)&&O.length>0)){var _;if(Ft(a)&&(a=null===(_=(0,Ut.getSessionStore)().getState().session)||void 0===_?void 0:_.user),!a)continue;if(!(0,Ut.userHasAccess)(O,a))continue}i.push({id:d,name:h,moduleName:v.moduleName,config:p,featureFlag:v.featureFlag,meta:v.meta,online:null===(w=v.online)||void 0===w||w,offline:null!==(S=v.offline)&&void 0!==S&&S})}}}catch(e){c=!0,s=e}finally{try{u||null==f.return||f.return()}finally{if(c)throw s}}return i},I=function(e){return k(e,Ht.getState(),(0,Rt.getExtensionSlotConfig)(e).config,Kt.getState())},R=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return D(navigator.onLine,e,t)},D=function(e){return Boolean(e?!(arguments.length>1&&void 0!==arguments[1])||arguments[1]:arguments.length>2&&void 0!==arguments[2]&&arguments[2])},M=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},N=function(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)},L=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},U=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){L(e,t,n[t])}))}return e},B=function(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e},F=function(e,t,n,r){return Yt.apply(this,arguments)};d.r(p),d.d(p,{attach:function(){return x},checkStatus:function(){return R},checkStatusFor:function(){return D},detach:function(){return C},detachAll:function(){return P},extensionStore:function(){return Xt},getAssignedExtensions:function(){return I},getConnectedExtensions:function(){return T},getExtensionInternalStore:function(){return Nt},getExtensionNameFromId:function(){return E},getExtensionRegistration:function(){return j},getExtensionRegistrationFrom:function(){return _},getExtensionStore:function(){return Lt},registerExtension:function(){return $t},registerExtensionSlot:function(){return zt},renderExtension:function(){return F},reset:function(){return Wt},updateInternalExtensionStore:function(){return l}});var H=function(e,t){return e===t||e!=e&&t!=t},V=function(e,t){for(var n=e.length;n--;)if(H(e[n][0],t))return n;return-1},G=Array.prototype.splice;i.prototype.clear=function(){this.__data__=[],this.size=0},i.prototype.delete=function(e){var t=this.__data__,n=V(t,e);return!(n<0||(n==t.length-1?t.pop():G.call(t,n,1),--this.size,0))},i.prototype.get=function(e){var t=this.__data__,n=V(t,e);return n<0?void 0:t[n][1]},i.prototype.has=function(e){return V(this.__data__,e)>-1},i.prototype.set=function(e,t){var n=this.__data__,r=V(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var K,$=i,z="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,W="object"==typeof self&&self&&self.Object===Object&&self,q=z||W||Function("return this")(),Z=q.Symbol,Y=Object.prototype,X=Y.hasOwnProperty,J=Y.toString,Q=Z?Z.toStringTag:void 0,ee=Object.prototype.toString,te=Z?Z.toStringTag:void 0,ne=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":te&&te in Object(e)?function(e){var t=X.call(e,Q),n=e[Q];try{e[Q]=void 0;var r=!0}catch(e){}var o=J.call(e);return r&&(t?e[Q]=n:delete e[Q]),o}(e):function(e){return ee.call(e)}(e)},re=function(e){var t=void 0===e?"undefined":o(e);return null!=e&&("object"==t||"function"==t)},oe=function(e){if(!re(e))return!1;var t=ne(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},ie=q["__core-js_shared__"],ae=(K=/[^.]+$/.exec(ie&&ie.keys&&ie.keys.IE_PROTO||""))?"Symbol(src)_1."+K:"",ue=Function.prototype.toString,ce=function(e){if(null!=e){try{return ue.call(e)}catch(e){}try{return e+""}catch(e){}}return""},se=/^\[object .+?Constructor\]$/,le=Function.prototype,fe=Object.prototype,de=le.toString,pe=fe.hasOwnProperty,he=RegExp("^"+de.call(pe).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ve=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!re(e)||(t=e,ae&&ae in t))&&(oe(e)?he:se).test(ce(e));var t}(n)?n:void 0},ye=ve(q,"Map"),me=ve(Object,"create"),ge=Object.prototype.hasOwnProperty,be=Object.prototype.hasOwnProperty;a.prototype.clear=function(){this.__data__=me?me(null):{},this.size=0},a.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},a.prototype.get=function(e){var t=this.__data__;if(me){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return ge.call(t,e)?t[e]:void 0},a.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:be.call(t,e)},a.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=me&&void 0===t?"__lodash_hash_undefined__":t,this};var we=a,Se=function(e,t){var n,r,i=e.__data__;return("string"==(r=o(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map};u.prototype.clear=function(){this.size=0,this.__data__={hash:new we,map:new(ye||$),string:new we}},u.prototype.delete=function(e){var t=Se(this,e).delete(e);return this.size-=t?1:0,t},u.prototype.get=function(e){return Se(this,e).get(e)},u.prototype.has=function(e){return Se(this,e).has(e)},u.prototype.set=function(e,t){var n=Se(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};var Oe=u;c.prototype.clear=function(){this.__data__=new $,this.size=0},c.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},c.prototype.get=function(e){return this.__data__.get(e)},c.prototype.has=function(e){return this.__data__.has(e)},c.prototype.set=function(e,t){var n=this.__data__;if(r(n,$)){var o=n.__data__;if(!ye||o.length<199)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new Oe(o)}return n.set(e,t),this.size=n.size,this};var Ee=c;s.prototype.add=s.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},s.prototype.has=function(e){return this.__data__.has(e)};var _e=s,je=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},xe=function(e,t,n,r,o,i){var a=1&n,u=e.length,c=t.length;if(u!=c&&!(a&&c>u))return!1;var s=i.get(e),l=i.get(t);if(s&&l)return s==t&&l==e;var f=-1,d=!0,p=2&n?new _e:void 0;for(i.set(e,t),i.set(t,e);++f<u;){var h=e[f],v=t[f];if(r)var y=a?r(v,h,f,t,e,i):r(h,v,f,e,t,i);if(void 0!==y){if(y)continue;d=!1;break}if(p){if(!je(t,(function(e,t){if(a=t,!p.has(a)&&(h===e||o(h,e,n,r,i)))return p.push(t);var a}))){d=!1;break}}else if(h!==v&&!o(h,v,n,r,i)){d=!1;break}}return i.delete(e),i.delete(t),d},Ce=q.Uint8Array,Pe=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},Ae=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},Te=Z?Z.prototype:void 0,ke=Te?Te.valueOf:void 0,Ie=Array.isArray,Re=Object.prototype.propertyIsEnumerable,De=Object.getOwnPropertySymbols,Me=De?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a)&&(i[o++]=a)}return i}(De(e),(function(t){return Re.call(e,t)})))}:function(){return[]},Ne=function(e){return null!=e&&"object"==typeof e},Le=function(e){return Ne(e)&&"[object Arguments]"==ne(e)},Ue=Object.prototype,Be=Ue.hasOwnProperty,Fe=Ue.propertyIsEnumerable,He=Le(function(){return arguments}())?Le:function(e){return Ne(e)&&Be.call(e,"callee")&&!Fe.call(e,"callee")},Ve=He,Ge=t&&!t.nodeType&&t,Ke=Ge&&e&&!e.nodeType&&e,$e=Ke&&Ke.exports===Ge?q.Buffer:void 0,ze=($e?$e.isBuffer:void 0)||function(){return!1},We=/^(?:0|[1-9]\d*)$/,qe=function(e,t){var n=void 0===e?"undefined":o(e);return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&We.test(e))&&e>-1&&e%1==0&&e<t},Ze=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},Ye={};Ye["[object Float32Array]"]=Ye["[object Float64Array]"]=Ye["[object Int8Array]"]=Ye["[object Int16Array]"]=Ye["[object Int32Array]"]=Ye["[object Uint8Array]"]=Ye["[object Uint8ClampedArray]"]=Ye["[object Uint16Array]"]=Ye["[object Uint32Array]"]=!0,Ye["[object Arguments]"]=Ye["[object Array]"]=Ye["[object ArrayBuffer]"]=Ye["[object Boolean]"]=Ye["[object DataView]"]=Ye["[object Date]"]=Ye["[object Error]"]=Ye["[object Function]"]=Ye["[object Map]"]=Ye["[object Number]"]=Ye["[object Object]"]=Ye["[object RegExp]"]=Ye["[object Set]"]=Ye["[object String]"]=Ye["[object WeakMap]"]=!1;var Xe,Je=t&&!t.nodeType&&t,Qe=Je&&e&&!e.nodeType&&e,et=Qe&&Qe.exports===Je&&z.process,tt=function(){try{return Qe&&Qe.require&&Qe.require("util").types||et&&et.binding&&et.binding("util")}catch(e){}}(),nt=tt&&tt.isTypedArray,rt=nt?(Xe=nt,function(e){return Xe(e)}):function(e){return Ne(e)&&Ze(e.length)&&!!Ye[ne(e)]},ot=Object.prototype.hasOwnProperty,it=Object.prototype,at=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),ut=Object.prototype.hasOwnProperty,ct=function(e){return null!=(t=e)&&Ze(t.length)&&!oe(t)?function(e,t){var n=Ie(e),r=!n&&Ve(e),o=!n&&!r&&ze(e),i=!n&&!r&&!o&&rt(e),a=n||r||o||i,u=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=u.length;for(var s in e)!ot.call(e,s)||a&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||qe(s,c))||u.push(s);return u}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||it))return at(e);var t,n,r=[];for(var o in Object(e))ut.call(e,o)&&"constructor"!=o&&r.push(o);return r}(e);var t},st=function(e){return function(e,t,n){var r=t(e);return Ie(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,ct,Me)},lt=Object.prototype.hasOwnProperty,ft=ve(q,"DataView"),dt=ve(q,"Promise"),pt=ve(q,"Set"),ht=ve(q,"WeakMap"),vt="[object Map]",yt="[object Promise]",mt="[object Set]",gt="[object WeakMap]",bt="[object DataView]",wt=ce(ft),St=ce(ye),Ot=ce(dt),Et=ce(pt),_t=ce(ht),jt=ne;(ft&&jt(new ft(new ArrayBuffer(1)))!=bt||ye&&jt(new ye)!=vt||dt&&jt(dt.resolve())!=yt||pt&&jt(new pt)!=mt||ht&&jt(new ht)!=gt)&&(jt=function(e){var t=ne(e),n="[object Object]"==t?e.constructor:void 0,r=n?ce(n):"";if(r)switch(r){case wt:return bt;case St:return vt;case Ot:return yt;case Et:return mt;case _t:return gt}return t});var xt=jt,Ct="[object Arguments]",Pt="[object Array]",At="[object Object]",Tt=Object.prototype.hasOwnProperty,kt=function e(t,n,o,i,a){return t===n||(null==t||null==n||!Ne(t)&&!Ne(n)?t!=t&&n!=n:function(e,t,n,o,i,a){var u=Ie(e),c=Ie(t),s=u?Pt:xt(e),l=c?Pt:xt(t),f=(s=s==Ct?At:s)==At,d=(l=l==Ct?At:l)==At,p=s==l;if(p&&ze(e)){if(!ze(t))return!1;u=!0,f=!1}if(p&&!f)return a||(a=new Ee),u||rt(e)?xe(e,t,n,o,i,a):function(e,t,n,r,o,i,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new Ce(e),new Ce(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return H(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var u=Pe;case"[object Set]":var c=1&r;if(u||(u=Ae),e.size!=t.size&&!c)return!1;var s=a.get(e);if(s)return s==t;r|=2,a.set(e,t);var l=xe(u(e),u(t),r,o,i,a);return a.delete(e),l;case"[object Symbol]":if(ke)return ke.call(e)==ke.call(t)}return!1}(e,t,s,n,o,i,a);if(!(1&n)){var h=f&&Tt.call(e,"__wrapped__"),v=d&&Tt.call(t,"__wrapped__");if(h||v){var y=h?e.value():e,m=v?t.value():t;return a||(a=new Ee),i(y,m,n,o,a)}}return!!p&&(a||(a=new Ee),function(e,t,n,o,i,a){var u=1&n,c=st(e),s=c.length;if(s!=st(t).length&&!u)return!1;for(var l=s;l--;){var f=c[l];if(!(u?f in t:lt.call(t,f)))return!1}var d=a.get(e),p=a.get(t);if(d&&p)return d==t&&p==e;var h=!0;a.set(e,t),a.set(t,e);for(var v=u;++l<s;){var y=e[f=c[l]],m=t[f];if(o)var g=u?o(m,y,f,t,e,a):o(y,m,f,e,t,a);if(!(void 0===g?y===m||i(y,m,n,o,a):g)){h=!1;break}v||(v="constructor"==f)}if(h&&!v){var b=e.constructor,w=t.constructor;b==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&r(b,b)&&"function"==typeof w&&r(w,w)||(h=!1)}return a.delete(e),a.delete(t),h}(e,t,n,o,i,a))}(t,n,o,i,e,a))},It=function(e,t){return kt(e,t)},Rt=d(824),Dt=d(685),Mt=(0,Dt.createGlobalStore)("extensionsInternal",{slots:{},extensions:{}}),Nt=function(){return(0,Dt.getGlobalStore)("extensionsInternal",{slots:{},extensions:{}})},Lt=function(){return(0,Dt.getGlobalStore)("extensions",{slots:{}})};f(Mt.getState()),Mt.subscribe(f);var Ut=d(766),Bt=d(708),Ft=function(e){return void 0===e},Ht=Nt(),Vt=Lt(),Gt=(0,Rt.getExtensionSlotsConfigStore)(),Kt=(0,Rt.getExtensionsConfigStore)();Ht.subscribe((function(e){S(e,Gt.getState(),Kt.getState())})),Gt.subscribe((function(e){S(Ht.getState(),e,Kt.getState())})),Kt.subscribe((function(e){S(Ht.getState(),Gt.getState(),e)}));var $t=function(e){return Ht.setState((function(t){return t.extensions[e.name]=m(y({},e),{instances:[]}),t}))},zt=function(e,t){return Ht.setState((function(n){var r,o=null===(r=n.slots[t])||void 0===r?void 0:r.moduleName;if(o&&o!=e)return console.warn("An extension slot with the name '".concat(t,'\' already exists. Refusing to register the same slot name twice (in "registerExtensionSlot"). The existing one is from module ').concat(o,".")),n;if(o&&o==e)return n;if(n.slots[t])return m(y({},n),{slots:m(y({},n.slots),v({},t,m(y({},n.slots[t]),{moduleName:e})))});var i=O(t,e);return m(y({},n),{slots:m(y({},n.slots),v({},t,i))})}))},Wt=function(){return Vt.setState((function(){return{slots:{},extensions:{}}}))},qt=d(645),Zt=0;function Yt(){var e;return e=function(e,t,n,r){var o,i,a,u,c,s,f,d,p,h,v,y,m,g,b=arguments;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}(this,(function(w){switch(w.label){case 0:if(o=b.length>4&&void 0!==b[4]?b[4]:function(e){return e},i=b.length>5&&void 0!==b[5]?b[5]:{},a=E(r),u=j(r),c=null,!e)return[3,3];if(!u)throw Error("Couldn't find extension '".concat(a,"' to attach to '").concat(t,"'"));return s=u.load,f=u.meta,d=u.moduleName,p=u.online,h=u.offline,R(p,h)?(l((function(o){var i,u={domElement:e,id:r,slotName:t,slotModuleName:n};return B(U({},o),{extensions:B(U({},o.extensions),L({},a,B(U({},o.extensions[a]),{instances:(i=o.extensions[a].instances,function(e){if(Array.isArray(e))return M(e)}(i)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(i)||function(e,t){if(e){if("string"==typeof e)return M(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?M(e,t):void 0}}(i)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([u])})))})})),[4,s()]):[3,2];case 1:v=w.sent(),y=v.default,m=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(v,["default"]),g=Zt++,c=(0,qt.mountRootParcel)(o(B(U({},null!=y?y:m),{name:"".concat(t,"/").concat(a,"-").concat(g)})),B(U({},i),{_meta:f,_extensionContext:{extensionId:r,extensionSlotName:t,extensionSlotModuleName:n,extensionModuleName:d},domElement:e})),w.label=2;case 2:return[3,4];case 3:console.warn("Tried to render ".concat(r," into ").concat(t," but no DOM element was available.")),w.label=4;case 4:return[2,c]}}))},Yt=function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){N(i,r,o,a,u,"next",e)}function u(e){N(i,r,o,a,u,"throw",e)}a(void 0)}))},Yt.apply(this,arguments)}var Xt=Nt()}(),p}())}}}))},7895:()=>{System.register(["@openmrs/esm-state"],(function(e,t){var n={};return{setters:[function(e){n.getGlobalStore=e.getGlobalStore}],execute:function(){e(function(){"use strict";var e={685:function(e){e.exports=n}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return function(){var e=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},t=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},n=function(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(n){t(e,n,r[n])}))}return e},i=function(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e},a=function(e,r,o){var a;d.setState((function(u){var c;return{flags:i(n({},u.flags),t({},e,{enabled:null!==(a=null===(c=u.flags[e])||void 0===c?void 0:c.enabled)&&void 0!==a&&a,label:r,description:o}))}}))},u=function(e){return d.getState().flags[e].enabled},c=function(e,t){d.subscribe((function(n){t(n.flags[e].enabled)}))},s=function(e,r){d.setState((function(o){return{flags:i(n({},o.flags),t({},e,i(n({},o.flags[e]),{enabled:r})))}}))};r.r(o),r.d(o,{featureFlagsStore:function(){return d},getFeatureFlag:function(){return u},registerFeatureFlag:function(){return a},setFeatureFlag:function(){return s},subscribeToFeatureFlag:function(){return c}});var l=r(685),f={flags:function(){var e={},t=!0,r=!1,o=void 0;try{for(var i,a=Object.keys(localStorage)[Symbol.iterator]();!(t=(i=a.next()).done);t=!0){var u=i.value;if(u.startsWith("openmrs:feature-flag:")){var c=u.replace("openmrs:feature-flag:",""),s=JSON.parse(localStorage.getItem("openmrs:feature-flag-meta:".concat(c))||"{}");e[c]=n({enabled:"true"===localStorage.getItem(u)},s)}}}catch(e){r=!0,o=e}finally{try{t||null==a.return||a.return()}finally{if(r)throw o}}return e}()},d=(0,l.getGlobalStore)("feature-flags",f);d.subscribe((function(t){var n,r=!0,o=!1,i=void 0;try{for(var a,u=Object.entries(t.flags)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=function(e){if(Array.isArray(e))return e}(n=a.value)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(n)||function(t,n){if(t){if("string"==typeof t)return e(t,2);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,2):void 0}}(n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),s=c[0],l=c[1];localStorage.setItem("openmrs:feature-flag:".concat(s),l.enabled.toString()),localStorage.setItem("openmrs:feature-flag-meta:".concat(s),JSON.stringify({label:l.label,description:l.description}))}}catch(t){o=!0,i=t}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}))}(),o}())}}}))},4800:(e,t,n)=>{"use strict";n.r(t),n.d(t,{addRoutesOverride:()=>h.Uo,isOpenmrsAppRoutes:()=>h.ZF,isOpenmrsRoutes:()=>h.Hs,localStorageRoutesPrefix:()=>h.F,removeRoutesOverride:()=>h.n,resetAllRoutesOverrides:()=>h.O$});var r=n(154),o={};for(const e in r)"default"!==e&&(o[e]=()=>r[e]);n.d(t,o);var i=n(4611);o={};for(const e in i)"default"!==e&&(o[e]=()=>i[e]);n.d(t,o);var a=n(5607);o={};for(const e in a)"default"!==e&&(o[e]=()=>a[e]);n.d(t,o);var u=n(2102);o={};for(const e in u)"default"!==e&&(o[e]=()=>u[e]);n.d(t,o);var c=n(4647);o={};for(const e in c)"default"!==e&&(o[e]=()=>c[e]);n.d(t,o);var s=n(7895);o={};for(const e in s)"default"!==e&&(o[e]=()=>s[e]);n.d(t,o);var l=n(6428);o={};for(const e in l)"default"!==e&&(o[e]=()=>l[e]);n.d(t,o);var f=n(1281);o={};for(const e in f)"default"!==e&&(o[e]=()=>f[e]);n.d(t,o);var d=n(2158);o={};for(const e in d)"default"!==e&&(o[e]=()=>d[e]);n.d(t,o);var p=n(3584);o={};for(const e in p)"default"!==e&&(o[e]=()=>p[e]);n.d(t,o);var h=n(3850),v=n(681);o={};for(const e in v)["default","addRoutesOverride","isOpenmrsAppRoutes","isOpenmrsRoutes","localStorageRoutesPrefix","removeRoutesOverride","resetAllRoutesOverrides"].indexOf(e)<0&&(o[e]=()=>v[e]);n.d(t,o);var y=n(4696);o={};for(const e in y)["default","addRoutesOverride","isOpenmrsAppRoutes","isOpenmrsRoutes","localStorageRoutesPrefix","removeRoutesOverride","resetAllRoutesOverrides"].indexOf(e)<0&&(o[e]=()=>y[e]);n.d(t,o);var m=n(8831);o={};for(const e in m)["default","addRoutesOverride","isOpenmrsAppRoutes","isOpenmrsRoutes","localStorageRoutesPrefix","removeRoutesOverride","resetAllRoutesOverrides"].indexOf(e)<0&&(o[e]=()=>m[e]);n.d(t,o)},6428:()=>{System.register([],(function(e,t){return{execute:function(){e(function(){"use strict";var e=function(e){window.dispatchEvent(new CustomEvent(h,{detail:{online:e}}))},t=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(h,t),function(){return window.removeEventListener(h,t)}},n=function(e){return e({online:navigator.onLine}),t(e)},r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};window.dispatchEvent(new CustomEvent(v,{detail:e}))},o=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(v,t),function(){return window.removeEventListener(v,t)}},i=function(e){window.dispatchEvent(new CustomEvent(y,{detail:e}))},a=function(e){window.dispatchEvent(new CustomEvent(m,{detail:e}))},u=function(e){window.dispatchEvent(new CustomEvent(b,{detail:e}))},c=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(y,t),function(){return window.removeEventListener(y,t)}},s=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(m,t),function(){return window.removeEventListener(m,t)}},l=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(g,t),function(){return window.removeEventListener(g,t)}},f=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(b,t),function(){return window.removeEventListener(b,t)}},d={d:function(e,t){for(var n in t)d.o(t,n)&&!d.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},p={};d.r(p),d.d(p,{dispatchActionableNotificationShown:function(){return a},dispatchConnectivityChanged:function(){return e},dispatchNotificationShown:function(){return i},dispatchPrecacheStaticDependencies:function(){return r},dispatchSnackbarShown:function(){return u},subscribeActionableNotificationShown:function(){return s},subscribeConnectivity:function(){return n},subscribeConnectivityChanged:function(){return t},subscribeNotificationShown:function(){return c},subscribePrecacheStaticDependencies:function(){return o},subscribeSnackbarShown:function(){return f},subscribeToastShown:function(){return l}});var h="openmrs:connectivity-changed",v="openmrs:precache-static-dependencies",y="openmrs:notification-shown",m="openmrs:actionable-notification-shown",g="openmrs:toast-shown",b="openmrs:snack-bar-shown";return p}())}}}))},1281:(e,t,n)=>{function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function a(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}System.register(["@openmrs/esm-state"],(function(e,t){var u={};return{setters:[function(e){u.createGlobalStore=e.createGlobalStore}],execute:function(){e(function(){"use strict";var e={685:function(e){e.exports=u}},t={};function c(n){var r=t[n];if(void 0!==r)return r.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,c),o.exports}c.d=function(e,t){for(var n in t)c.o(t,n)&&!c.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},c.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};return function(){var e=function(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")},t=function(e){return e&&e.sensitive?"":"i"},u=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},l=function(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},f=function(e){return t=e.matcher,(null!=(n=RegExp)&&"undefined"!=typeof Symbol&&n[Symbol.hasInstance]?n[Symbol.hasInstance](t):i(t,n))?e.matcher:"string"==typeof e.matcher?Pe(e.matcher):Pe(e.path);var t,n},d=function(e){return p([e])},p=function(e){var t=h(),n=e.map((function(e){return{matcher:f(e),settings:e}})),r=l(t).concat(l(n));Ae.setState(r,!0)},h=function(){return Ae.getState()},v=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},y=function(e,t){if(e.length>0){var n=Te(e,t);if(n){for(var r=[n],o=Te(e,n.settings.parent);void 0!==o;)r.push(o),o=Te(e,o.settings.parent);return r.reverse()}}return[]},m=function(e){return y(h(),e)},g=function(e,t,n){var r=O(e,t,n);Me.length?Me.forEach((function(e){return e(r)})):setTimeout((function(){throw r}))},b=function(e){if("function"!=typeof e)throw Error(S(28,!1));Me.push(e)},w=function(e){if("function"!=typeof e)throw Error(S(29,!1));var t=!1;return Me=Me.filter((function(n){var r=n===e;return t=t||r,!r})),t},S=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return"single-spa minified message #".concat(e,": ").concat(t?t+" ":"","See https://single-spa.js.org/error/?code=").concat(e).concat(r.length?"&arg=".concat(r.join("&arg=")):"")},O=function(e,t,n){var r,o="".concat(C(t)," '").concat(j(t),"' died in status ").concat(t.status,": ");if(i(e,Error)){try{e.message=o+e.message}catch(e){}r=e}else{console.warn(S(30,!1,t.status,j(t)));try{r=Error(o+JSON.stringify(e))}catch(t){r=e}}return r.appOrParcelName=j(t),t.status=n,r},E=function(e){return e.status===Ve},_=function(e){try{return e.activeWhen(window.location)}catch(t){return g(t,e,We),!1}},j=function(e){return e.name},x=function(e){return Boolean(e.unmountThisParcel)},C=function(e){return x(e)?"parcel":"application"},P=function(){for(var e=arguments.length-1;e>0;e--)for(var t in arguments[e])"__proto__"!==t&&(arguments[e-1][t]=arguments[e][t]);return arguments[0]},A=function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n];return null},T=function(e){return e&&("function"==typeof e||(t=e,Array.isArray(t)&&!A(t,(function(e){return"function"!=typeof e}))));var t},k=function(e,t){var n=e[t]||[];0===(n=Array.isArray(n)?n:[n]).length&&(n=[function(){return Promise.resolve()}]);var r=C(e),o=j(e);return function(e){return n.reduce((function(n,i,a){return n.then((function(){var n=i(e);return I(n)?n:Promise.reject(S(15,!1,r,o,t,a))}))}),Promise.resolve())}},I=function(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch},R=function(e,t){return Promise.resolve().then((function(){return e.status!==Ue?e:(e.status=Be,e.bootstrap?K(e,"bootstrap").then(n).catch((function(n){if(t)throw O(n,e,We);return g(n,e,We),e})):Promise.resolve().then(n))}));function n(){return e.status=Fe,e}},D=function(e,t){return Promise.resolve().then((function(){var n=function(){return K(e,"unmount").then((function(){e.status=Fe}),(function(n){if(t)throw O(n,e,We);g(n,e,We)}))};if(e.status!==Ve)return e;e.status=Ke;var r=Object.keys(e.parcels).map((function(t){return e.parcels[t].unmountThisParcel()}));return Promise.all(r).then(n,(function(r){return n().then((function(){var n=Error(r.message);if(t)throw O(n,e,We);g(n,e,We)}))})).then((function(){return e}))}))},M=function(e,t){return Promise.resolve().then((function(){return e.status!==Fe?e:(Ze||(window.dispatchEvent(new De("single-spa:before-first-mount")),Ze=!0),e.status=He,K(e,"mount").then((function(){return e.status=Ve,Ye||(window.dispatchEvent(new De("single-spa:first-mount")),Ye=!0),e})).catch((function(n){var r=function(){if(t)throw O(n,e,We);return g(n,e,We),e};return e.status=Ve,D(e,!0).then(r,r)})))}))},N=function(){return L.apply(Je,arguments)},L=function(e,t){var n=this;if(!e||"object"!=typeof e&&"function"!=typeof e)throw Error(S(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(S(3,!1,a(e.name)));var r=Xe++,o=e.name||"parcel-".concat(r);if("object"!=typeof t)throw Error(S(4,!1,o,void 0===t?"undefined":a(t)));if(!t.domElement)throw Error(S(5,!1,o));var i,u="function"==typeof e,c=u?e:function(){return Promise.resolve(e)},s={id:r,parcels:{},status:u?Le:Ue,customProps:t,parentName:j(n),unmountThisParcel:function(){return h.then((function(){if(s.status!==Ve)throw Error(S(6,!1,o,s.status));return D(s,!0)})).then((function(e){return s.parentName&&delete n.parcels[s.id],e})).then((function(e){return f(e),e})).catch((function(e){throw s.status=We,d(e),e}))}};n.parcels[r]=s;var l=c();if(!l||"function"!=typeof l.then)throw Error(S(7,!1));l=l.then((function(e){if(!e)throw Error(S(8,!1));if(o=e.name||"parcel-".concat(r),Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!T(e.bootstrap))throw Error(S(9,!1,o));if(!T(e.mount))throw Error(S(10,!1,o));if(!T(e.unmount))throw Error(S(11,!1,o));if(e.update&&!T(e.update))throw Error(S(12,!1,o));var t=k(e,"bootstrap"),n=k(e,"mount"),a=k(e,"unmount");s.status=Ue,s.name=o,s.bootstrap=t,s.mount=n,s.unmount=a,s.timeouts=$(e.timeouts),e.update&&(s.update=k(e,"update"),i.update=function(e){return s.customProps=e,U((t=s,Promise.resolve().then((function(){if(t.status!==Ve)throw Error(S(32,!1,j(t)));return t.status=Ge,K(t,"update").then((function(){return t.status=Ve,t})).catch((function(e){throw O(e,t,We)}))}))));var t})}));var f,d,p=l.then((function(){return R(s,!0)})),h=p.then((function(){return M(s,!0)})),v=new Promise((function(e,t){f=e,d=t}));return i={mount:function(){return U(Promise.resolve().then((function(){if(s.status!==Fe)throw Error(S(13,!1,o,s.status));return n.parcels[r]=s,M(s)})))},unmount:function(){return U(s.unmountThisParcel())},getStatus:function(){return s.status},loadPromise:U(l),bootstrapPromise:U(p),mountPromise:U(h),unmountPromise:U(v)}},U=function(e){return e.then((function(){return null}))},B=function(e){var t=j(e),n="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!=typeof n||null===n||Array.isArray(n))&&(n={},console.warn(S(40,!1),t,n));var r=P({},n,{name:t,mountParcel:L.bind(e),singleSpa:Ie});return x(e)&&(r.unmountSelf=e.unmountThisParcel),r},F=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(S(16,!1));Qe.bootstrap={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},H=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(S(17,!1));Qe.mount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},V=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(S(18,!1));Qe.unmount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},G=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(S(19,!1));Qe.unload={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},K=function(e,t){var n=e.timeouts[t],r=n.warningMillis,o=C(e);return new Promise((function(i,a){var u=!1,c=!1;e[t](B(e)).then((function(e){u=!0,i(e)})).catch((function(e){u=!0,a(e)})),setTimeout((function(){return l(1)}),r),setTimeout((function(){return l(!0)}),n.millis);var s=S(31,!1,t,o,j(e),n.millis);function l(e){if(!u)if(!0===e)c=!0,n.dieOnTimeout?a(Error(s)):console.error(s);else if(!c){var t=e,o=t*r;console.warn(s),o+r<n.millis&&setTimeout((function(){return l(t+1)}),r)}}}))},$=function(e){var t={};for(var n in Qe)t[n]=P({},Qe[n],e&&e[n]||{});return t},z=function(e){return Promise.resolve().then((function(){return e.loadPromise?e.loadPromise:e.status!==Ne&&e.status!==ze?e:(e.status=Le,e.loadPromise=Promise.resolve().then((function(){var r=e.loadApp(B(e));if(!I(r))throw n=!0,Error(S(33,!1,j(e)));return r.then((function(n){var r;e.loadErrorTime=null,"object"!=typeof(t=n)&&(r=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!T(t.bootstrap)&&(r=35),T(t.mount)||(r=36),T(t.unmount)||(r=37);var o=C(t);if(r){var i;try{i=JSON.stringify(t)}catch(e){}return console.error(S(r,!1,o,j(e),i),t),g(void 0,e,We),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=P({},e.devtools.overlays,t.devtools.overlays)),e.status=Ue,e.bootstrap=k(t,"bootstrap"),e.mount=k(t,"mount"),e.unmount=k(t,"unmount"),e.unload=k(t,"unload"),e.timeouts=$(t.timeouts),delete e.loadPromise,e}))})).catch((function(t){var r;return delete e.loadPromise,n?r=We:(r=ze,e.loadErrorTime=(new Date).getTime()),g(t,e,r),e})));var t,n}))},W=function(e){var t;if("string"==typeof e)t=e;else if(this&&this.href)t=this.href;else{if(!(e&&e.currentTarget&&e.currentTarget.href&&e.preventDefault))throw Error(S(14,!1));t=e.currentTarget.href,e.preventDefault()}var n=J(window.location.href),r=J(t);0===t.indexOf("#")?window.location.hash=r.hash:n.host!==r.host&&r.host?window.location.href=t:r.pathname===n.pathname&&r.search===n.search?window.location.hash=r.hash:window.history.pushState(null,null,t)},q=function(e){var t=this;if(e){var n=e[0].type;nt.indexOf(n)>=0&&tt[n].forEach((function(n){try{n.apply(t,e)}catch(e){setTimeout((function(){throw e}))}}))}},Z=function(){dt([],arguments)},Y=function(e,t){return function(){var n=window.location.href,r=e.apply(this,arguments),o=window.location.href;return ke&&n===o||window.dispatchEvent(function(e,t){var n;try{n=new PopStateEvent("popstate",{state:e})}catch(t){(n=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,e)}return n.singleSpa=!0,n.singleSpaTrigger=t,n}(window.history.state,t)),r}},X=function(e){if(ot)throw Error(S(43,!1));ke=!e||!e.hasOwnProperty("urlRerouteOnly")||e.urlRerouteOnly,ot=!0,rt=window.history.replaceState,window.addEventListener("hashchange",Z),window.addEventListener("popstate",Z);var t=window.addEventListener,n=window.removeEventListener;window.addEventListener=function(e,n){if(!("function"==typeof n&&nt.indexOf(e)>=0)||A(tt[e],(function(e){return e===n})))return t.apply(this,arguments);tt[e].push(n)},window.removeEventListener=function(e,t){if(!("function"==typeof t&&nt.indexOf(e)>=0))return n.apply(this,arguments);tt[e]=tt[e].filter((function(e){return e!==t}))},window.history.pushState=Y(window.history.pushState,"pushState"),window.history.replaceState=Y(rt,"replaceState")},J=function(e){var t=document.createElement("a");return t.href=e,t},Q=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.jQuery;if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!it){var t=e.fn.on,n=e.fn.off;e.fn.on=function(e,n){return ee.call(this,t,window.addEventListener,e,n,arguments)},e.fn.off=function(e,t){return ee.call(this,n,window.removeEventListener,e,t,arguments)},it=!0}},ee=function(e,t,n,r,o){return"string"!=typeof n?e.apply(this,o):(n.split(/\s+/).forEach((function(e){nt.indexOf(e)>=0&&(t(e,r),n=n.replace(e,""))})),""===n.trim()?this:e.apply(this,o))},te=function(e){return Promise.resolve().then((function(){var t=at[j(e)];if(!t)return e;if(e.status===Ne)return ne(e,t),e;if(e.status===$e)return t.promise.then((function(){return e}));if(e.status!==Fe&&e.status!==ze)return e;var n=e.status===ze?Promise.resolve():K(e,"unload");return e.status=$e,n.then((function(){return ne(e,t),e})).catch((function(n){return function(e,t,n){delete at[j(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,g(n,e,We),t.reject(n)}(e,t,n),e}))}))},ne=function(e,t){delete at[j(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=Ne,t.resolve()},re=function(e,t,n,r){at[j(e)]={app:e,resolve:n,reject:r},Object.defineProperty(at[j(e)],"promise",{get:t})},oe=function(e){return at[e]},ie=function(){return ut.filter(E).map(j)},ae=function(){return ut.map(j)},ue=function(e){var t=A(ut,(function(t){return j(t)===e}));return t?t.status:null},ce=function(e,t,n,r){var o=function(e,t,n,r){var o,i={name:null,loadApp:null,activeWhen:null,customProps:null};return"object"==typeof e?(function(e){if(Array.isArray(e)||null===e)throw Error(S(39,!1));var t=["name","app","activeWhen","customProps"],n=Object.keys(e).reduce((function(e,n){return t.indexOf(n)>=0?e:e.concat(n)}),[]);if(0!==n.length)throw Error(S(38,!1,t.join(", "),n.join(", ")));if("string"!=typeof e.name||0===e.name.length)throw Error(S(20,!1));if("object"!=typeof e.app&&"function"!=typeof e.app)throw Error(S(20,!1));var r=function(e){return"string"==typeof e||"function"==typeof e};if(!(r(e.activeWhen)||Array.isArray(e.activeWhen)&&e.activeWhen.every(r)))throw Error(S(24,!1));if(!pe(e.customProps))throw Error(S(22,!1))}(e),i.name=e.name,i.loadApp=e.app,i.activeWhen=e.activeWhen,i.customProps=e.customProps):(function(e,t,n,r){if("string"!=typeof e||0===e.length)throw Error(S(20,!1));if(!t)throw Error(S(23,!1));if("function"!=typeof n)throw Error(S(24,!1));if(!pe(r))throw Error(S(22,!1))}(e,t,n,r),i.name=e,i.loadApp=t,i.activeWhen=n,i.customProps=r),i.loadApp="function"!=typeof(o=i.loadApp)?function(){return Promise.resolve(o)}:o,i.customProps=function(e){return e||{}}(i.customProps),i.activeWhen=function(e){var t=Array.isArray(e)?e:[e];return t=t.map((function(e){return"function"==typeof e?e:he(e)})),function(e){return t.some((function(t){return t(e)}))}}(i.activeWhen),i}(e,t,n,r);if(ge()||ct||(ct=!0,setTimeout((function(){ge()||console.warn(S(1,!1))}),5e3)),-1!==ae().indexOf(o.name))throw Error(S(21,!1,o.name));ut.push(P({loadErrorTime:null,status:Ne,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},o)),et&&(Q(),dt())},se=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location;return ut.filter((function(t){return t.activeWhen(e)})).map(j)},le=function(e){if(0===ut.filter((function(t){return j(t)===e})).length)throw Error(S(25,!1,e));return(et?fe(e,{waitForUnmount:!1}):Promise.resolve()).then((function(){var t=ut.map(j).indexOf(e);ut.splice(t,1)}))},fe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{waitForUnmount:!1};if("string"!=typeof e)throw Error(S(26,!1));var n=A(ut,(function(t){return j(t)===e}));if(!n)throw Error(S(27,!1,e));var r,o=oe(j(n));if(t&&t.waitForUnmount){if(o)return o.promise;var i=new Promise((function(e,t){re(n,(function(){return i}),e,t)}));return i}return o?(r=o.promise,de(n,o.resolve,o.reject)):r=new Promise((function(e,t){re(n,(function(){return r}),e,t),de(n,e,t)})),r},de=function(e,t,n){Promise.resolve().then((function(){if(A(se(),(function(t){return t===j(e)})))return ve()})).then((function(){return D(e).then(te).then((function(){t(),setTimeout((function(){dt()}))}))})).catch(n)},pe=function(e){return!e||"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},he=function(e,t){var n=function(e,t){var n=0,r=!1,o="^";"/"!==e[0]&&(e="/"+e);for(var i=0;i<e.length;i++){var a=e[i];(!r&&":"===a||r&&"/"===a)&&u(i)}return u(e.length),new RegExp(o,"i");function u(i){var a=e.slice(n,i).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=r?"[^/]+/?":a,i===e.length)if(r)t&&(o+="$");else{var u=t?"":".*";o="/"===o.charAt(o.length-1)?"".concat(o).concat(u,"$"):"".concat(o,"(/").concat(u,")?(#.*)?$")}r=!r,n=i}}(e,t);return function(e){var t=e.origin;t||(t="".concat(e.protocol,"//").concat(e.host));var r=e.href.replace(t,"").replace(e.search,"").split("?")[0];return n.test(r)}},ve=function(){return dt()},ye=function(e,t){return _(e)?R(e).then((function(e){return t.then((function(){return _(e)?M(e):e}))})):t.then((function(){return e}))},me=function(e){pt=!0,et&&(X(e),dt())},ge=function(){return pt},be=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},we=function(e,t){var n=window.getOpenmrsSpaBase().replace(/\/$/,"");return Se(e,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){be(e,t,n[t])}))}return e}({openmrsBase:window.openmrsBase,openmrsSpaBase:n},t)).replace(/^\/\//,"/")},Se=function(e,t){return Object.keys(t).reduce((function(e,n){return e.split("${"+n+"}").join(t[n])}),e)},Oe=function(e){var t=e.to,n=e.templateParams,r=window.getOpenmrsSpaBase().replace(/\/$/,""),o=we(t,n).replace(window.location.origin,"");o.startsWith(r)?W(o):window.location.assign(o)},Ee=function(e){var t,n=JSON.parse(null!==(t=sessionStorage.getItem(vt))&&void 0!==t?t:"[]")||[];n.push(e),n.length>50&&(n=n.slice(-50)),sessionStorage.setItem(vt,JSON.stringify(n))},_e=function(){var e;0===JSON.parse(null!==(e=sessionStorage.getItem(vt))&&void 0!==e?e:"[]").length&&document.referrer&&Ee(document.referrer),window.addEventListener("single-spa:routing-event",(function(e){var t,n,r=je();"replaceState"==(null===(t=e.detail.originalEvent)||void 0===t?void 0:t.singleSpaTrigger)?(r[r.length-1]=window.location.href,sessionStorage.setItem(vt,JSON.stringify(r))):!(null===(n=e.detail.originalEvent)||void 0===n?void 0:n.singleSpa)&&r.includes(window.location.href)?xe({toUrl:window.location.href}):r[r.length-1]!==window.location.href&&Ee(window.location.href)}))},je=function(){var e;return JSON.parse(null!==(e=sessionStorage.getItem(vt))&&void 0!==e?e:"[]")},xe=function(e){var t=e.toUrl,n=je(),r=n.lastIndexOf(t);if(-1==r)throw new Error("URL ".concat(t," not found in history; cannot go back to it."));var o=n.slice(0,r+1);Oe({to:n[r]}),sessionStorage.setItem(vt,JSON.stringify(o))},Ce=function(){sessionStorage.removeItem(vt)};function Pe(n,r,o){return i(n,RegExp)?function(e,t){if(!t)return e;var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:"",suffix:"",modifier:"",pattern:""});return e}(n,r):Array.isArray(n)?function(e,n,r){var o=e.map((function(e){return Pe(e,n,r).source}));return new RegExp("(?:"+o.join("|")+")",t(r))}(n,r,o):function(n,r,o){return function(n,r,o){void 0===o&&(o={});for(var i=o.strict,a=void 0!==i&&i,u=o.start,c=void 0===u||u,s=o.end,l=void 0===s||s,f=o.encode,d=void 0===f?function(e){return e}:f,p="["+e(o.endsWith||"")+"]|$",h="["+e(o.delimiter||"/#?")+"]",v=c?"^":"",y=0,m=n;y<m.length;y++){var g=m[y];if("string"==typeof g)v+=e(d(g));else{var b=e(d(g.prefix)),w=e(d(g.suffix));if(g.pattern)if(r&&r.push(g),b||w)if("+"===g.modifier||"*"===g.modifier){var S="*"===g.modifier?"?":"";v+="(?:"+b+"((?:"+g.pattern+")(?:"+w+b+"(?:"+g.pattern+"))*)"+w+")"+S}else v+="(?:"+b+"("+g.pattern+")"+w+")"+g.modifier;else v+="("+g.pattern+")"+g.modifier;else v+="(?:"+b+w+")"+g.modifier}}if(l)a||(v+=h+"?"),v+=o.endsWith?"(?="+p+")":"$";else{var O=n[n.length-1],E="string"==typeof O?h.indexOf(O[O.length-1])>-1:void 0===O;a||(v+="(?:"+h+"(?="+p+"))?"),E||(v+="(?="+h+"|"+p+")")}return new RegExp(v,t(o))}(function(t,n){void 0===n&&(n={});for(var r=function(e){for(var t=[],n=0;n<e.length;){var r=e[n];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)t.push({type:"CHAR",index:n,value:e[n++]});else{var o=1,i="";if("?"===e[u=n+1])throw new TypeError('Pattern cannot start with "?" at '+u);for(;u<e.length;)if("\\"!==e[u]){if(")"===e[u]){if(0==--o){u++;break}}else if("("===e[u]&&(o++,"?"!==e[u+1]))throw new TypeError("Capturing groups are not allowed at "+u);i+=e[u++]}else i+=e[u++]+e[u++];if(o)throw new TypeError("Unbalanced pattern at "+n);if(!i)throw new TypeError("Missing pattern at "+n);t.push({type:"PATTERN",index:n,value:i}),n=u}else{for(var a="",u=n+1;u<e.length;){var c=e.charCodeAt(u);if(!(c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||95===c))break;a+=e[u++]}if(!a)throw new TypeError("Missing parameter name at "+n);t.push({type:"NAME",index:n,value:a}),n=u}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(t),o=n.prefixes,i=void 0===o?"./":o,a="[^"+e(n.delimiter||"/#?")+"]+?",u=[],c=0,s=0,l="",f=function(e){if(s<r.length&&r[s].type===e)return r[s++].value},d=function(e){var t=f(e);if(void 0!==t)return t;var n=r[s],o=n.type,i=n.index;throw new TypeError("Unexpected "+o+" at "+i+", expected "+e)},p=function(){for(var e,t="";e=f("CHAR")||f("ESCAPED_CHAR");)t+=e;return t};s<r.length;){var h=f("CHAR"),v=f("NAME"),y=f("PATTERN");if(v||y){var m=h||"";-1===i.indexOf(m)&&(l+=m,m=""),l&&(u.push(l),l=""),u.push({name:v||c++,prefix:m,suffix:"",pattern:y||a,modifier:f("MODIFIER")||""})}else{var g=h||f("ESCAPED_CHAR");if(g)l+=g;else if(l&&(u.push(l),l=""),f("OPEN")){m=p();var b=f("NAME")||"",w=f("PATTERN")||"",S=p();d("CLOSE"),u.push({name:b||(w?c++:""),pattern:b&&!w?a:w,prefix:m,suffix:S,modifier:f("MODIFIER")||""})}else d("END")}}return u}(n,o),r,o)}(n,r,o)}c.r(s),c.d(s,{clearHistory:function(){return Ce},filterBreadcrumbs:function(){return y},getBreadcrumbs:function(){return h},getBreadcrumbsFor:function(){return m},getHistory:function(){return je},goBackInHistory:function(){return xe},interpolateString:function(){return Se},interpolateUrl:function(){return we},navigate:function(){return Oe},registerBreadcrumb:function(){return d},registerBreadcrumbs:function(){return p},setupHistory:function(){return _e}});var Ae=(0,c(685).createGlobalStore)("breadcrumbs",[]);function Te(e,t){if(t)return function(e,t){var n=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),1!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return v(e,1);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(e,1):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e.filter((function(e){return e.matcher.test(t)})));return n[0]}(e,t)||function(e,t){for(var n=t.split("/");n.length>1;){n.pop();var r=Te(e,n.join("/"));if(r)return r}}(e,t)}var ke,Ie=Object.freeze({__proto__:null,get start(){return me},get ensureJQuerySupport(){return Q},get setBootstrapMaxTime(){return F},get setMountMaxTime(){return H},get setUnmountMaxTime(){return V},get setUnloadMaxTime(){return G},get registerApplication(){return ce},get unregisterApplication(){return le},get getMountedApps(){return ie},get getAppStatus(){return ue},get unloadApplication(){return fe},get checkActivityFunctions(){return se},get getAppNames(){return ae},get pathToActiveWhen(){return he},get navigateToUrl(){return W},get patchHistoryApi(){return X},get triggerAppChange(){return ve},get addErrorHandler(){return b},get removeErrorHandler(){return w},get mountRootParcel(){return N},get NOT_LOADED(){return Ne},get LOADING_SOURCE_CODE(){return Le},get NOT_BOOTSTRAPPED(){return Ue},get BOOTSTRAPPING(){return Be},get NOT_MOUNTED(){return Fe},get MOUNTING(){return He},get UPDATING(){return Ge},get LOAD_ERROR(){return ze},get MOUNTED(){return Ve},get UNLOADING(){return $e},get UNMOUNTING(){return Ke},get SKIP_BECAUSE_BROKEN(){return We}}),Re=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{}).CustomEvent,De=function(){try{var e=new Re("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(e){}return!1}()?Re:"undefined"!=typeof document&&"function"==typeof document.createEvent?function(e,t){var n=document.createEvent("CustomEvent");return t?n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail):n.initCustomEvent(e,!1,!1,void 0),n}:function(e,t){var n=document.createEventObject();return n.type=e,t?(n.bubbles=Boolean(t.bubbles),n.cancelable=Boolean(t.cancelable),n.detail=t.detail):(n.bubbles=!1,n.cancelable=!1,n.detail=void 0),n},Me=[],Ne="NOT_LOADED",Le="LOADING_SOURCE_CODE",Ue="NOT_BOOTSTRAPPED",Be="BOOTSTRAPPING",Fe="NOT_MOUNTED",He="MOUNTING",Ve="MOUNTED",Ge="UPDATING",Ke="UNMOUNTING",$e="UNLOADING",ze="LOAD_ERROR",We="SKIP_BECAUSE_BROKEN",qe=[],Ze=!1,Ye=!1,Xe=0,Je={parcels:{}},Qe={bootstrap:{millis:4e3,dieOnTimeout:!1,warningMillis:1e3},mount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unmount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unload:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},update:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3}},et="undefined"!=typeof window,tt={hashchange:[],popstate:[]},nt=["hashchange","popstate"],rt=null,ot=!1;et&&(window.singleSpaNavigate?console.warn(S(41,!1)):window.singleSpaNavigate=W);var it=!1,at={},ut=[],ct=!1,st=!1,lt=[],ft=et&&window.location.href;function dt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(st)return new Promise((function(e,n){lt.push({resolve:e,reject:n,eventArguments:t})}));var r,i=function(){var e=[],t=[],n=[],r=[],o=(new Date).getTime();return ut.forEach((function(i){var a=i.status!==We&&_(i);switch(i.status){case ze:a&&o-i.loadErrorTime>=200&&n.push(i);break;case Ne:case Le:a&&n.push(i);break;case Ue:case Fe:!a&&oe(j(i))?e.push(i):a&&r.push(i);break;case Ve:a||t.push(i)}})),{appsToUnload:e,appsToUnmount:t,appsToLoad:n,appsToMount:r}}(),a=i.appsToUnload,u=i.appsToUnmount,c=i.appsToLoad,s=i.appsToMount,l=[],f=ft,d=ft=window.location.href;return ge()?(st=!0,r=a.concat(c,u,s),Promise.resolve().then((function(){return m(0===r.length?"before-no-app-change":"before-app-change",y(!0)),m("before-routing-event",y(!0,{cancelNavigation:p})),Promise.all(l).then((function(n){if(n.some((function(e){return e})))return rt.call(window.history,history.state,"",f.substring(location.origin.length)),ft=location.href,st=!1,dt(e,t,!0);var r=a.map(te),o=u.map(D).map((function(e){return e.then(te)})).concat(r),i=Promise.all(o);i.then((function(){m("before-mount-routing-event",y(!0))}),(function(e){throw e}));var l=c.map((function(e){return z(e).then((function(e){return ye(e,i)}))})),d=s.filter((function(e){return c.indexOf(e)<0})).map((function(e){return ye(e,i)}));return i.catch((function(e){throw v(),e})).then((function(){return v(),Promise.all(l.concat(d)).catch((function(t){throw e.forEach((function(e){return e.reject(t)})),t})).then(h).then((function(){}),(function(e){throw e}))}))}))}))):(r=c,Promise.resolve().then((function(){var e=c.map(z);return Promise.all(e).then(v).then((function(){return[]})).catch((function(e){throw v(),e})).finally((function(){}))})));function p(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t="function"==typeof(null==e?void 0:e.then)?e:Promise.resolve(e);l.push(t.catch((function(e){return console.warn(Error(S(42,!1))),console.warn(e),!1})))}function h(){var t=ie();e.forEach((function(e){return e.resolve(t)}));try{m(0===r.length?"no-app-change":"app-change",y()),m("routing-event",y())}catch(e){setTimeout((function(){throw e}))}if(st=!1,lt.length>0){var n=lt;lt=[],dt(n)}return t}function v(){n||(e.forEach((function(e){q(e.eventArguments)})),q(t))}function y(){var e,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1?arguments[1]:void 0,l={},p=(o(e={},Ve,[]),o(e,Fe,[]),o(e,Ne,[]),o(e,We,[]),e);n?(c.concat(s).forEach((function(e,t){v(e,Ve)})),a.forEach((function(e){v(e,Ne)})),u.forEach((function(e){v(e,Fe)}))):r.forEach((function(e){v(e)}));var h={detail:{newAppStatuses:l,appsByNewStatus:p,totalAppChanges:r.length,originalEvent:null==t?void 0:t[0],oldUrl:f,newUrl:d}};return i&&P(h.detail,i),h;function v(e,t){var n=j(e);t=t||ue(n),l[n]=t,(p[t]=p[t]||[]).push(n)}}function m(e,t){n||window.dispatchEvent(new De("single-spa:".concat(e),t))}}var pt=!1,ht={getRawAppData:function(){return function(e){if(Array.isArray(e))return r(e)}(e=ut)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();var e},reroute:dt,NOT_LOADED:Ne,toLoadPromise:z,toBootstrapPromise:R,unregisterApplication:le,getProfilerData:function(){return qe}};et&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=ht);var vt="openmrs:history"}(),s}())}}}))},2158:(e,t,n)=>{function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){u(e,t,n[t])}))}return e}function l(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||h(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||h(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function h(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}System.register(["@openmrs/esm-api","@openmrs/esm-state"],(function(e,t){var r={},i={};return{setters:[function(e){r.getLoggedInUser=e.getLoggedInUser},function(e){i.createGlobalStore=e.createGlobalStore}],execute:function(){e(function(){"use strict";var e={766:function(e){e.exports=r},685:function(e){e.exports=i}},t={};function h(n){var r=t[n];if(void 0!==r)return r.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,h),o.exports}h.d=function(e,t){for(var n in t)h.o(t,n)&&!h.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},h.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},h.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var v={};return function(){var e=function(e,t){return new Promise((function(n){var r=new MessageChannel;r.port1.onmessage=function(e){n(e.data)},e.postMessage(t,[r.port2])}))},t=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},r=function(e,n){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,n){if(e){if("string"==typeof e)return t(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){r&&(e=r);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=e[Symbol.iterator]()).next.bind(r)},i=function(e,t){var n=location.href;return new URL(e,n).href===new URL(t,n).href},y=function(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)},m=function(){},g=function(e,t){if(!t)return e&&e.then?e.then(m):Promise.resolve()},b=function(e,t){if(void 0!==Rn)return console.warn("The application's Service Worker has already been registered. The new service worker at ".concat(e," will not be registered.")),Rn;if(!("serviceWorker"in navigator))throw new Error("Registering the Service Worker is not possible due to missing browser capabilities.");var n=new In(e,t);return Rn=n.register().then((function(){return n.controlling.then((function(){return n}))}))},w=function(){return null!=Rn?Rn:Promise.resolve(void 0)},S=function(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)},O=function(e){return Ln.apply(this,arguments)},E=function(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)},j=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){E(i,r,o,a,u,"next",e)}function u(e){E(i,r,o,a,u,"throw",e)}a(void 0)}))}},x=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},C=function(){return Un.apply(this,arguments)},P=function(){return Bn.apply(this,arguments)},A=function(){return Fn.apply(this,arguments)},T=function(){return Hn.apply(this,arguments)},k=function(){return{current:Gn,notAvailable:"unavailable"===Gn,active:"on"===Gn}},I=function(e){"unavailable"!==Gn&&"unavailable"!==e&&(localStorage.setItem(Vn,"on"===e?"active":"disabled"),Gn=e)},R=function(){return Kn.apply(this,arguments)},D=function(e,t){return"object"!=typeof t||zn(t).forEach((function(n){e[n]=t[n]})),e},M=function(e,t){return Zn.call(e,t)},N=function(e,t){"function"==typeof t&&(t=t(qn(e))),("undefined"==typeof Reflect?zn:Reflect.ownKeys)(t).forEach((function(n){L(e,n,t[n])}))},L=function(e,t,n,r){Yn(e,t,D(n&&M(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))},U=function(e){return{from:function(t){return e.prototype=Object.create(t.prototype),L(e.prototype,"constructor",e),{extend:N.bind(null,e.prototype)}}}},B=function(e,t,n){return Qn.call(e,t,n)},F=function(e,t){return t(e)},H=function(e){if(!e)throw new Error("Assertion Failed")},V=function(e){$n.setImmediate?setImmediate(e):setTimeout(e,0)},G=function(e,t){return e.reduce((function(e,n,r){var o=t(n,r);return o&&(e[o[0]]=o[1]),e}),{})},K=function(e){var t={};for(var n in e)M(e,n)&&(t[n]=e[n]);return t},$=function(e){return nr.apply([],e)},z=function(e){ir="undefined"!=typeof WeakMap&&new WeakMap;var t=ar(e);return ir=null,t},W=function(e){return ur.call(e).slice(8,-1)},q=function(e){var t,n,r,o;if(1===arguments.length){if(Wn(e))return e.slice();if(this===lr&&"string"==typeof e)return[e];if(o=sr(e)){for(n=[];!(r=o.next()).done;)n.push(r.value);return n}if(null==e)return[e];if("number"==typeof(t=e.length)){for(n=new Array(t);t--;)n[t]=e[t];return n}return[e]}for(t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return n},Z=function(e,t){dr=e,pr=t},Y=function(e,t){var n=e.stack;return n?(t=t||0,0===n.indexOf(e.name)&&(t+=(e.name+e.message).split("\n").length),n.split("\n").slice(t).filter(pr).map((function(e){return"\n"+e})).join("")):""},X=function(e,t){this._e=vr(),this.name=e,this.message=t},J=function(e,t){return e+". Errors: "+Object.keys(t).map((function(e){return t[e].toString()})).filter((function(e,t,n){return n.indexOf(e)===t})).join("\n")},Q=function(e,t,n,r){this._e=vr(),this.failures=t,this.failedKeys=r,this.successCount=n,this.message=J(e,t)},ee=function(e,t){this._e=vr(),this.name="BulkError",this.failures=Object.keys(t).map((function(e){return t[e]})),this.failuresByPos=t,this.message=J(e,t)},te=function(){},ne=function(e){return e},re=function(e,t){return null==e||e===ne?t:function(n){return t(e(n))}},oe=function(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}},ie=function(e,t){return e===te?t:function(){var n=e.apply(this,arguments);void 0!==n&&(arguments[0]=n);var r=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var i=t.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?oe(r,this.onsuccess):r),o&&(this.onerror=this.onerror?oe(o,this.onerror):o),void 0!==i?i:n}},ae=function(e,t){return e===te?t:function(){e.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?oe(n,this.onsuccess):n),r&&(this.onerror=this.onerror?oe(r,this.onerror):r)}},ue=function(e,t){return e===te?t:function(n){var r=e.apply(this,arguments);D(n,r);var o=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var a=t.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?oe(o,this.onsuccess):o),i&&(this.onerror=this.onerror?oe(i,this.onerror):i),void 0===r?void 0===a?void 0:a:D(r,a)}},ce=function(e,t){return e===te?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}},se=function(e,t){return e===te?t:function(){var n=e.apply(this,arguments);if(n&&"function"==typeof n.then){for(var r=this,o=arguments.length,i=new Array(o);o--;)i[o]=arguments[o];return n.then((function(){return t.apply(r,i)}))}return t.apply(this,arguments)}},le=function(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=te,this._lib=!1;var t=this._PSD=Vr;if(dr&&(this._stackHolder=vr(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==_r)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&de(this,this._value))}this._state=null,this._value=null,++t.ref,Wr(this,e)},fe=function(e,t,n,r,o){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r,this.psd=o},de=function(e,t){if(Ur.push(t),null===e._state){var n=e._lib&&ge();t=Fr(t),e._state=!1,e._value=t,dr&&null!==t&&"object"==typeof t&&!t._promise&&function(e,t,n){try{e.apply(null,void 0)}catch(e){}}((function(){var n=Jn(t,"stack");t._promise=e,L(t,"stack",{get:function(){return Ir?n&&(n.get?n.get.apply(t):n.value):e.stack}})})),function(e){Lr.some((function(t){return t._value===e._value}))||Lr.push(e)}(e),pe(e),n&&be()}},pe=function(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n<r;++n)he(e,t[n]);var o=e._PSD;--o.ref||o.finalize(),0===Kr&&(++Kr,Dr((function(){0==--Kr&&we()}),[]))},he=function(e,t){if(null!==e._state){var n=e._state?t.onFulfilled:t.onRejected;if(null===n)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++Kr,Dr(ve,[n,e,t])}else e._listeners.push(t)},ve=function(e,t,n){try{Br=t;var r,o=t._value;t._state?r=e(o):(Ur.length&&(Ur=[]),r=e(o),-1===Ur.indexOf(o)&&function(e){for(var t=Lr.length;t;)if(Lr[--t]._value===e._value)return void Lr.splice(t,1)}(t)),n.resolve(r)}catch(e){n.reject(e)}finally{Br=null,0==--Kr&&we(),--n.psd.ref||n.psd.finalize()}},ye=function(e,t){var n=t?t._numPrev+1:0;n<100&&(e._prev=t,e._numPrev=n)},me=function(){ge()&&be()},ge=function(){var e=Mr;return Mr=!1,Nr=!1,e},be=function(){var e,t,n;do{for(;Gr.length>0;)for(e=Gr,Gr=[],n=e.length,t=0;t<n;++t){var r=e[t];r[0].apply(null,r[1])}}while(Gr.length>0);Mr=!0,Nr=!0},we=function(){var e=Lr;Lr=[],e.forEach((function(e){e._PSD.onunhandled.call(null,e._value,e)}));for(var t=$r.slice(0),n=t.length;n;)t[--n]()},Se=function(e){return new le(_r,!1,e)},Oe=function(e,t){var n=Vr;return function(){var r=ge(),o=Vr;try{return Ae(n,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{Ae(o,!1),r&&be()}}},Ee=function(e,t,n,r){var o=Vr,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++eo;var a=Hr.env;i.env=kr?{Promise:le,PromiseProp:{value:le,configurable:!0,writable:!0},all:le.all,race:le.race,allSettled:le.allSettled,any:le.any,resolve:le.resolve,reject:le.reject,nthen:De(a.nthen,i),gthen:De(a.gthen,i)}:{},t&&D(i,t),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var u=ke(i,e,n,r);return 0===i.ref&&i.finalize(),u},_e=function(){return Zr.id||(Zr.id=++Yr),++Zr.awaits,Zr.echoes+=100,Zr.id},je=function(){return!!Zr.awaits&&(0==--Zr.awaits&&(Zr.id=0),Zr.echoes=100*Zr.awaits,!0)},xe=function(e){return Zr.echoes&&e&&e.constructor===Tr?(_e(),e.then((function(e){return je(),e}),(function(e){return je(),to(e)}))):e},Ce=function(e){++Qr,Zr.echoes&&0!=--Zr.echoes||(Zr.echoes=Zr.id=0),Xr.push(Vr),Ae(e,!0)},Pe=function(){var e=Xr[Xr.length-1];Xr.pop(),Ae(e,!1)},Ae=function(e,t){var n=Vr;if((t?!Zr.echoes||Jr++&&e===Vr:!Jr||--Jr&&e===Vr)||Ie(t?Ce.bind(null,e):Pe),e!==Vr&&(Vr=e,n===Hr&&(Hr.env=Te()),kr)){var r=Hr.env.Promise,o=e.env;Cr.then=o.nthen,r.prototype.then=o.gthen,(n.global||e.global)&&(Object.defineProperty($n,"Promise",o.PromiseProp),r.all=o.all,r.race=o.race,r.resolve=o.resolve,r.reject=o.reject,o.allSettled&&(r.allSettled=o.allSettled),o.any&&(r.any=o.any))}},Te=function(){var e=$n.Promise;return kr?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor($n,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:Cr.then,gthen:e.prototype.then}:{}},ke=function(e,t,n,r,o){var i=Vr;try{return Ae(e,!0),t(n,r,o)}finally{Ae(i,!1)}},Ie=function(e){Ar.call(xr,e)},Re=function(e,t,n,r){return"function"!=typeof e?e:function(){var o=Vr;n&&_e(),Ae(t,!0);try{return e.apply(this,arguments)}finally{Ae(o,!1),r&&Ie(je)}}},De=function(e,t){return function(n,r){return e.call(this,Re(n,t),Re(r,t))}},Me=function(e,t){var n;try{n=t.onuncatched(e)}catch(e){}if(!1!==n)try{var r,o={promise:t,reason:e};if($n.document&&document.createEvent?((r=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),D(r,o)):$n.CustomEvent&&D(r=new CustomEvent("unhandledrejection",{detail:o}),o),r&&$n.dispatchEvent&&(dispatchEvent(r),!$n.PromiseRejectionEvent&&$n.onunhandledrejection))try{$n.onunhandledrejection(r)}catch(e){}dr&&r&&!r.defaultPrevented&&console.warn("Unhandled rejection: ".concat(e.stack||e))}catch(e){}},Ne=function(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t},Le=function(e){return"string"!=typeof e||/\./.test(e)?function(e){return e}:function(t){return void 0===t[e]&&e in t&&delete(t=z(t))[e],t}},Ue=function(e){var t={},n=function(n,r){if(r){for(var o=arguments.length,i=new Array(o-1);--o;)i[o-1]=arguments[o];return t[n].subscribe.apply(null,i),e}if("string"==typeof n)return t[n]};n.addEventType=i;for(var r=1,o=arguments.length;r<o;++r)i(arguments[r]);return n;function i(e,r,o){if("object"==typeof e)return function(e){zn(e).forEach((function(t){var n=e[t];if(Wn(n))i(t,e[t][0],e[t][1]);else{if("asap"!==n)throw new Sr.InvalidArgument("Invalid event config");var r=i(t,ne,(function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];r.subscribers.forEach((function(e){V((function(){e.apply(null,t)}))}))}))}}))}(e);r||(r=ce),o||(o=te);var a={subscribers:[],fire:o,subscribe:function(e){-1===a.subscribers.indexOf(e)&&(a.subscribers.push(e),a.fire=r(a.fire,e))},unsubscribe:function(e){a.subscribers=a.subscribers.filter((function(t){return t!==e})),a.fire=a.subscribers.reduce(r,o)}};return t[e]=n[e]=a,a}},Be=function(e,t){return U(t).from({prototype:e}),t},Fe=function(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)},He=function(e,t){e.filter=Ne(e.filter,t)},Ve=function(e,t,n){var r=e.replayFilter;e.replayFilter=r?function(){return Ne(r(),t())}:t,e.justLimit=n&&!r},Ge=function(e,t){if(e.isPrimKey)return t.primaryKey;var n=t.getIndexByKeyPath(e.index);if(!n)throw new Sr.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n},Ke=function(e,t,n){var r=Ge(e,t.schema);return t.openCursor({trans:n,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:r,range:e.range}})},$e=function(e,t,n,r){var o=e.replayFilter?Ne(e.filter,e.replayFilter()):e.filter;if(e.or){var i={},a=function(e,n,r){if(!o||o(n,r,(function(e){return n.stop(e)}),(function(e){return n.fail(e)}))){var a=n.primaryKey,u=""+a;"[object ArrayBuffer]"===u&&(u=""+new Uint8Array(a)),M(i,u)||(i[u]=!0,t(e,n,r))}};return Promise.all([e.or._iterate(a,n),ze(Ke(e,r,n),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return ze(Ke(e,r,n),Ne(e.algorithm,o),t,!e.keysOnly&&e.valueMapper)},ze=function(e,t,n,r){var o=Oe(r?function(e,t,o){return n(r(e),t,o)}:n);return e.then((function(e){if(e)return e.start((function(){var n=function(){return e.continue()};t&&!t(e,(function(e){return n=e}),(function(t){e.stop(t),n=te}),(function(t){e.fail(t),n=te}))||o(e.value,e,(function(e){return n=e})),n()}))}))},We=function(e){var t=void 0===e?"undefined":p(e);if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";var n=W(e);return"ArrayBuffer"===n?"binary":n},qe=function(e){return c(e,Uint8Array)?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)},Ze=function(e,t){return e<t?-1:e===t?0:1},Ye=function(e,t){return e>t?-1:e===t?0:1},Xe=function(e,t,n){var r=c(e,yo)?new e.Collection(e):e;return r._ctx.error=n?new n(t):new TypeError(t),r},Je=function(e){return new e.Collection(e,(function(){return nt("")})).limit(0)},Qe=function(e,t,n,r,o,i){for(var a=Math.min(e.length,r.length),u=-1,c=0;c<a;++c){var s=t[c];if(s!==r[c])return o(e[c],n[c])<0?e.substr(0,c)+n[c]+n.substr(c+1):o(e[c],r[c])<0?e.substr(0,c)+r[c]+n.substr(c+1):u>=0?e.substr(0,u)+t[u]+n.substr(u+1):null;o(e[c],s)<0&&(u=c)}return a<r.length&&"next"===i?e+n.substr(e.length):a<e.length&&"prev"===i?e.substr(0,n.length):u<0?null:e.substr(0,u)+r[u]+n.substr(u+1)},et=function(e,t,n,r){var o,i,a,u,c,s,l,f=n.length;if(!n.every((function(e){return"string"==typeof e})))return Xe(e,"String expected.");function d(e){o=function(e){return"next"===e?function(e){return e.toUpperCase()}:function(e){return e.toLowerCase()}}(e),i=function(e){return"next"===e?function(e){return e.toLowerCase()}:function(e){return e.toUpperCase()}}(e),a="next"===e?Ze:Ye;var t=n.map((function(e){return{lower:i(e),upper:o(e)}})).sort((function(e,t){return a(e.lower,t.lower)}));u=t.map((function(e){return e.upper})),c=t.map((function(e){return e.lower})),s=e,l="next"===e?"":r}d("next");var p=new e.Collection(e,(function(){return tt(u[0],c[f-1]+r)}));p._ondirectionchange=function(e){d(e)};var h=0;return p._addAlgorithm((function(e,n,r){var o=e.key;if("string"!=typeof o)return!1;var d=i(o);if(t(d,c,h))return!0;for(var p=null,v=h;v<f;++v){var y=Qe(o,d,u[v],c[v],a,s);null===y&&null===p?h=v+1:(null===p||a(p,y)>0)&&(p=y)}return n(null!==p?function(){e.continue(p+l)}:r),!1})),p},tt=function(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}},nt=function(e){return{type:1,lower:e,upper:e}},rt=function(e){return Oe((function(t){return ot(t),e(t.target.error),!1}))},ot=function(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()},it=function(e,t,n,r,o,i,a){return{name:e,keyPath:t,unique:n,multi:r,auto:o,compound:i,src:(n&&!a?"&":"")+(r?"*":"")+(o?"++":"")+at(t)}},at=function(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""},ut=function(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:G(n,(function(e){return[e.name,e]}))}},ct=function(e){return null==e?function(){}:"string"==typeof e?function(e){return 1===e.split(".").length?function(t){return t[e]}:function(t){return er(t,e)}}(e):function(t){return er(t,e)}},st=function(e){return[].slice.call(e)},lt=function(e){return null==e?":id":"string"==typeof e?e:"[".concat(e.join("+"),"]")},ft=function(e,t){var n=e._novip,r=t.db,o=function(e,t,n,r){var o=n.IDBKeyRange,i=(n.indexedDB,function(e,t){return t.reduce((function(e,t){return s({},e,(0,t.create)(e))}),e)}(function(e,t,n){function r(e){if(3===e.type)return null;if(4===e.type)throw new Error("Cannot convert never type to IDBKeyRange");var n=e.lower,r=e.upper,o=e.lowerOpen,i=e.upperOpen;return void 0===n?void 0===r?null:t.upperBound(r,!!i):void 0===r?t.lowerBound(n,!!o):t.bound(n,r,!!o,!!i)}var o=function(e,t){var n=st(e.objectStoreNames);return{schema:{name:e.name,tables:n.map((function(e){return t.objectStore(e)})).map((function(e){var t=e.keyPath,n=e.autoIncrement,r=Wn(t),o=null==t,i={},a={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:r,keyPath:t,autoIncrement:n,unique:!0,extractKey:ct(t)},indexes:st(e.indexNames).map((function(t){return e.index(t)})).map((function(e){var t=e.name,n=e.unique,r=e.multiEntry,o=e.keyPath,a={name:t,compound:Wn(o),keyPath:o,unique:n,multiEntry:r,extractKey:ct(o)};return i[lt(o)]=a,a})),getIndexByKeyPath:function(e){return i[lt(e)]}};return i[":id"]=a.primaryKey,null!=t&&(i[lt(t)]=a.primaryKey),a}))},hasGetAll:n.length>0&&"getAll"in t.objectStore(n[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}(e,n),i=o.schema,a=o.hasGetAll,u=i.tables.map((function(e){return function(e){var t=e.name;return{name:t,schema:e,mutate:function(e){var n=e.trans,o=e.type,i=e.keys,a=e.values,u=e.range;return new Promise((function(e,c){e=Oe(e);var s=n.objectStore(t),l=null==s.keyPath,d="put"===o||"add"===o;if(!d&&"delete"!==o&&"deleteRange"!==o)throw new Error("Invalid operation type: "+o);var p,h=(i||a||{length:1}).length;if(i&&a&&i.length!==a.length)throw new Error("Given keys array must have same length as given values array.");if(0===h)return e({numFailures:0,failures:{},results:[],lastResult:void 0});var v=[],y=[],m=0,g=function(e){++m,ot(e)};if("deleteRange"===o){if(4===u.type)return e({numFailures:m,failures:y,results:[],lastResult:void 0});3===u.type?v.push(p=s.clear()):v.push(p=s.delete(r(u)))}else{var b=f(d?l?[a,i]:[a,null]:[i,null],2),w=b[0],S=b[1];if(d)for(var O=0;O<h;++O)v.push(p=S&&void 0!==S[O]?s[o](w[O],S[O]):s[o](w[O])),p.onerror=g;else for(var E=0;E<h;++E)v.push(p=s[o](w[E])),p.onerror=g}var _=function(t){var n=t.target.result;v.forEach((function(e,t){return null!=e.error&&(y[t]=e.error)})),e({numFailures:m,failures:y,results:"delete"===o?i:v.map((function(e){return e.result})),lastResult:n})};p.onerror=function(e){g(e),_(e)},p.onsuccess=_}))},getMany:function(e){var n=e.trans,r=e.keys;return new Promise((function(e,o){e=Oe(e);for(var i,a=n.objectStore(t),u=r.length,c=new Array(u),s=0,l=0,f=function(t){var n=t.target;c[n._pos]=n.result,++l===s&&e(c)},d=rt(o),p=0;p<u;++p)null!=r[p]&&((i=a.get(r[p]))._pos=p,i.onsuccess=f,i.onerror=d,++s);0===s&&e(c)}))},get:function(e){var n=e.trans,r=e.key;return new Promise((function(e,o){e=Oe(e);var i=n.objectStore(t).get(r);i.onsuccess=function(t){return e(t.target.result)},i.onerror=rt(o)}))},query:function(e){return function(n){return new Promise((function(o,i){o=Oe(o);var a=n.trans,u=n.values,c=n.limit,s=n.query,l=c===1/0?void 0:c,f=s.index,d=s.range,p=a.objectStore(t),h=f.isPrimaryKey?p:p.index(f.name),v=r(d);if(0===c)return o({result:[]});if(e){var y=u?h.getAll(v,l):h.getAllKeys(v,l);y.onsuccess=function(e){return o({result:e.target.result})},y.onerror=rt(i)}else{var m=0,g=u||!("openKeyCursor"in h)?h.openCursor(v):h.openKeyCursor(v),b=[];g.onsuccess=function(e){var t=g.result;return t?(b.push(u?t.value:t.primaryKey),++m===c?o({result:b}):void t.continue()):o({result:b})},g.onerror=rt(i)}}))}}(a),openCursor:function(e){var n=e.trans,o=e.values,i=e.query,a=e.reverse,u=e.unique;return new Promise((function(e,c){e=Oe(e);var s=i.index,l=i.range,f=n.objectStore(t),d=s.isPrimaryKey?f:f.index(s.name),p=a?u?"prevunique":"prev":u?"nextunique":"next",h=o||!("openKeyCursor"in d)?d.openCursor(r(l),p):d.openKeyCursor(r(l),p);h.onerror=rt(c),h.onsuccess=Oe((function(t){var r=h.result;if(r){r.___id=++wo,r.done=!1;var o=r.continue.bind(r),i=r.continuePrimaryKey;i&&(i=i.bind(r));var a=r.advance.bind(r),u=function(){throw new Error("Cursor not stopped")};r.trans=n,r.stop=r.continue=r.continuePrimaryKey=r.advance=function(){throw new Error("Cursor not started")},r.fail=Oe(c),r.next=function(){var e=this,t=1;return this.start((function(){return t--?e.continue():e.stop()})).then((function(){return e}))},r.start=function(e){var t=new Promise((function(e,t){e=Oe(e),h.onerror=rt(t),r.fail=t,r.stop=function(t){r.stop=r.continue=r.continuePrimaryKey=r.advance=u,e(t)}})),n=function(){if(h.result)try{e()}catch(e){r.fail(e)}else r.done=!0,r.start=function(){throw new Error("Cursor behind last entry")},r.stop()};return h.onsuccess=Oe((function(e){h.onsuccess=n,n()})),r.continue=o,r.continuePrimaryKey=i,r.advance=a,n(),t},e(r)}else e(null)}),c)}))},count:function(e){var n=e.query,o=e.trans,i=n.index,a=n.range;return new Promise((function(e,n){var u=o.objectStore(t),c=i.isPrimaryKey?u:u.index(i.name),s=r(a),l=s?c.count(s):c.count();l.onsuccess=Oe((function(t){return e(t.target.result)})),l.onerror=rt(n)}))}}}(e)})),c={};return u.forEach((function(e){return c[e.name]=e})),{stack:"dbcore",transaction:e.transaction.bind(e),table:function(e){if(!c[e])throw new Error("Table '".concat(e,"' not found"));return c[e]},MIN_KEY:-1/0,MAX_KEY:bo(t),schema:i}}(t,o,r),e.dbcore));return{dbcore:i}}(n._middlewares,r,n._deps,t);n.core=o.dbcore,n.tables.forEach((function(e){var t=e.name;n.core.schema.tables.some((function(e){return e.name===t}))&&(e.core=n.core.table(t),c(n[t],n.Table)&&(n[t].core=e.core))}))},dt=function(e,t,n,r){var o=e._novip;n.forEach((function(e){var n=r[e];t.forEach((function(t){var r=Jn(t,e);(!r||"value"in r&&void 0===r.value)&&(t===o.Transaction.prototype||c(t,o.Transaction)?L(t,e,{get:function(){return this.table(e)},set:function(t){Yn(this,e,{value:t,writable:!0,configurable:!0,enumerable:!0})}}):t[e]=new o.Table(e,n))}))}))},pt=function(e,t){var n=e._novip;t.forEach((function(e){for(var t in e)c(e[t],n.Table)&&delete e[t]}))},ht=function(e,t){return e._cfg.version-t._cfg.version},vt=function(e,t){var n,r={del:[],add:[],change:[]};for(n in e)t[n]||r.del.push(n);for(n in t){var o=e[n],i=t[n];if(o){var a={name:n,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")!=""+(i.primKey.keyPath||"")||o.primKey.auto!==i.primKey.auto&&!ao)a.recreate=!0,r.change.push(a);else{var u=o.idxByName,c=i.idxByName,s=void 0;for(s in u)c[s]||a.del.push(s);for(s in c){var l=u[s],f=c[s];l?l.src!==f.src&&a.change.push(f):a.add.push(f)}(a.del.length>0||a.add.length>0||a.change.length>0)&&r.change.push(a)}}else r.add.push([n,i])}return r},yt=function(e,t,n,r){var o=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach((function(e){return mt(o,e)})),o},mt=function(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})},gt=function(e,t,n){var r={};return B(t.objectStoreNames,0).forEach((function(e){for(var t=n.objectStore(e),o=t.keyPath,i=it(at(o),o||"",!1,!1,!!t.autoIncrement,o&&"string"!=typeof o,!0),a=[],u=0;u<t.indexNames.length;++u){var c=t.index(t.indexNames[u]);o=c.keyPath;var s=it(c.name,o,!!c.unique,!!c.multiEntry,!1,o&&"string"!=typeof o,!1);a.push(s)}r[e]=ut(e,i,a)})),r},bt=function(e,t,n){for(var r=e._novip,o=n.db.objectStoreNames,i=0;i<o.length;++i){var a=o[i],u=n.objectStore(a);r._hasGetAll="getAll"in u;for(var s=0;s<u.indexNames.length;++s){var l=u.indexNames[s],f=u.index(l).keyPath,d="string"==typeof f?f:"["+B(f).join("+")+"]";if(t[a]){var p=t[a].idxByName[d];p&&(p.name=l,delete t[a].idxByName[d],t[a].idxByName[l]=p)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&$n.WorkerGlobalScope&&c($n,$n.WorkerGlobalScope)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(r._hasGetAll=!1)},wt=function(e,t){var n=e._dbNamesDB;return n||(n=e._dbNamesDB=new ko("__dbnames",{addons:[],indexedDB:e,IDBKeyRange:t})).version(1).stores({dbnames:"name"}),n.table("dbnames")},St=function(e){return e&&"function"==typeof e.databases},Ot=function(e){return Ee((function(){return Vr.letThrough=!0,e()}))},Et=function(){var e;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(t){var n=function(){return indexedDB.databases().finally(t)};e=setInterval(n,100),n()})).finally((function(){return clearInterval(e)})):Promise.resolve()},_t=function(e){var t=function(t){return e.next(t)},n=o(t),r=o((function(t){return e.throw(t)}));function o(e){return function(t){var o=e(t),i=o.value;return o.done?i:i&&"function"==typeof i.then?i.then(n,r):Wn(i)?Promise.all(i).then(n,r):n(i)}}return o(t)()},jt=function(e,t,n){var r=arguments.length;if(r<2)throw new Sr.InvalidArgument("Too few arguments");for(var o=new Array(r-1);--r;)o[r-1]=arguments[r];return n=o.pop(),[e,$(o),n]},xt=function(e,t,n){for(var r=Wn(e)?e.slice():[e],o=0;o<n;++o)r.push(t);return r},Ct=function(e,t,n){try{if(!t)return null;if(t.keys.length<e.length)return null;for(var r=[],o=0,i=0;o<t.keys.length&&i<e.length;++o)0===po(t.keys[o],e[i])&&(r.push(n?z(t.values[o]):t.values[o]),++i);return r.length===e.length?r:null}catch(e){return null}},Pt=function(e){return!("from"in e)},At=function(e,t){Pt(t)||function e(t,n){var r=n.from,o=n.to,i=n.l,a=n.r;Po(t,r,o),i&&e(t,i),a&&e(t,a)}(e,t)},Tt=function(e){var t=Pt(e)?null:{s:0,n:e};return{next:function(e){for(var n=arguments.length>0;t;)switch(t.s){case 0:if(t.s=1,n)for(;t.n.l&&po(e,t.n.from)<0;)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!n||po(e,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}},kt=function(e){var t,n,r=((null===(t=e.r)||void 0===t?void 0:t.d)||0)-((null===(n=e.l)||void 0===n?void 0:n.d)||0),o=r>1?"r":r<-1?"l":"";if(o){var i="r"===o?"l":"r",a=s({},e),u=e[o];e.from=u.from,e.to=u.to,e[o]=u[o],a[o]=u[i],e[i]=a,a.d=It(a)}e.d=It(e)},It=function(e){var t=e.r,n=e.l;return(t?n?Math.max(t.d,n.d):t.d:n?n.d:0)+1},Rt=function(e,t){return zn(t).forEach((function(n){At(e[n]||(e[n]=new Co),t[n])})),e},Dt=function(e){var t=Mo;try{Mo=!0,mo.storagemutated.fire(e)}finally{Mo=t}},Mt=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},Nt=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Lt=function(){return new Vo},Ut=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},Bt=function(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)},Ft=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Bt(i,r,o,a,u,"next",e)}function u(e){Bt(i,r,o,a,u,"throw",e)}a(void 0)}))}},Ht=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Vt=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Ht(e,t,n[t])}))}return e},Gt=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ut(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ut(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},Kt=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},$t=function(){return $o},zt=function(){return zo.apply(this,arguments)},Wt=function(){return qo.apply(this,arguments)},qt=function(e,t,n,r){return Zo.apply(this,arguments)},Zt=function(e,t,n){return Yo.apply(this,arguments)},Yt=function(e,t){return Xo.apply(this,arguments)},Xt=function(e,t){return Jo.apply(this,arguments)},Jt=function(e){return Qo.apply(this,arguments)},Qt=function(e){return ei.apply(this,arguments)},en=function(e){return ti.apply(this,arguments)},tn=function(e){var t;return!!(null===(t=Ko[e])||void 0===t?void 0:t.options.onBeginEditSyncItem)},nn=function(e){return ni.apply(this,arguments)},rn=function(e){return ri.apply(this,arguments)},on=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Ko[e]={type:e,dependsOn:t,process:n,options:r}},an=function(){if(!oi&&!(oi="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return oi(ai)},un=function(){return li+si()},cn=function(e){return e.startsWith(li)},sn=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},ln=function(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)},fn=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){ln(i,r,o,a,u,"next",e)}function u(e){ln(i,r,o,a,u,"throw",e)}a(void 0)}))}},dn=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},pn=function(){return Object.values(fi)},hn=function(e){fi[e.id]&&console.warn('[setupDynamicOfflineDataHandler] Another second handler with the ID "'.concat(e.id,'" was registered. This handler will override the previous one. This could be unintended as the previous handler might run different flows than the newly registered one. If this is the case, ensure that you are setting up the handlers with different IDs.')),fi[e.id]=e},vn=function(e){return di.apply(this,arguments)},yn=function(e,t){return pi.apply(this,arguments)},mn=function(e,t){return hi.apply(this,arguments)},gn=function(e,t,n){return vi.apply(this,arguments)},bn=function(e,t){return yi.apply(this,arguments)},wn=function(e,t,n){return mi.apply(this,arguments)},Sn=function(e,t){return gi.apply(this,arguments)},On=function(e,t,n){return bi.apply(this,arguments)},En=function(){return wi.apply(this,arguments)},_n=function(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)},jn=function(){return Pn(),Si},xn=function(e,t){Pn(),hn({type:"patient",displayName:t.displayName,id:e,isSynced:function(){return Promise.resolve(!0)},sync:function(e,n){return t.onOfflinePatientAdded({patientUuid:e,signal:null!=n?n:(new AbortController).signal})}})},Cn=function(e){return Oi.apply(this,arguments)},Pn=function(){console.warn("The offline patient API has been deprecated and will be removed in a future release. To prevent future crashes, the functions remain available for the moment, but any invocations should be migrated ASAP.")};h.r(v),h.d(v,{activateOfflineCapability:function(){return R},beginEditSynchronizationItem:function(){return nn},canBeginEditSynchronizationItemsOfType:function(){return tn},deleteSynchronizationItem:function(){return rn},generateOfflineUuid:function(){return un},getCurrentOfflineMode:function(){return k},getDynamicOfflineDataEntries:function(){return vn},getDynamicOfflineDataEntriesFor:function(){return yn},getDynamicOfflineDataHandlers:function(){return pn},getFullSynchronizationItems:function(){return Qt},getFullSynchronizationItemsFor:function(){return Xt},getOfflineDb:function(){return Lt},getOfflinePatientDataStore:function(){return jn},getOfflineSynchronizationStore:function(){return $t},getOmrsServiceWorker:function(){return w},getSynchronizationItem:function(){return en},getSynchronizationItems:function(){return Jt},getSynchronizationItemsFor:function(){return Yt},isOfflineUuid:function(){return cn},messageOmrsServiceWorker:function(){return O},offlineUuidPrefix:function(){return li},omrsOfflineCachingStrategyHttpHeaderName:function(){return Nn},omrsOfflineResponseBodyHttpHeaderName:function(){return Dn},omrsOfflineResponseStatusHttpHeaderName:function(){return Mn},putDynamicOfflineData:function(){return mn},putDynamicOfflineDataFor:function(){return gn},queueSynchronizationItem:function(){return Zt},queueSynchronizationItemFor:function(){return qt},registerOfflinePatientHandler:function(){return xn},registerOmrsServiceWorker:function(){return b},removeDynamicOfflineData:function(){return bn},removeDynamicOfflineDataFor:function(){return wn},runSynchronization:function(){return zt},setCurrentOfflineMode:function(){return I},setupDynamicOfflineDataHandler:function(){return hn},setupOfflineSync:function(){return on},syncAllDynamicOfflineData:function(){return Sn},syncDynamicOfflineData:function(){return On},syncOfflinePatientData:function(){return Cn}});try{self["workbox:window:6.5.4"]&&_()}catch(e){}try{self["workbox:core:6.5.4"]&&_()}catch(e){}var An=function(){var e=this;this.promise=new Promise((function(t,n){e.resolve=t,e.reject=n}))},Tn=function(e,t){this.type=e,Object.assign(this,t)},kn={type:"SKIP_WAITING"},In=function(t){var n,r;function o(e,n){var r,o;return void 0===n&&(n={}),(r=t.call(this)||this).nn={},r.tn=0,r.rn=new An,r.en=new An,r.on=new An,r.un=0,r.an=new Set,r.cn=function(){var e=r.fn,t=e.installing;r.tn>0||!i(t.scriptURL,r.sn.toString())||performance.now()>r.un+6e4?(r.vn=t,e.removeEventListener("updatefound",r.cn)):(r.hn=t,r.an.add(t),r.rn.resolve(t)),++r.tn,t.addEventListener("statechange",r.ln)},r.ln=function(e){var t=r.fn,n=e.target,o=n.state,i=n===r.vn,a={sw:n,isExternal:i,originalEvent:e};!i&&r.mn&&(a.isUpdate=!0),r.dispatchEvent(new Tn(o,a)),"installed"===o?r.wn=self.setTimeout((function(){"installed"===o&&t.waiting===n&&r.dispatchEvent(new Tn("waiting",a))}),200):"activating"===o&&(clearTimeout(r.wn),i||r.en.resolve(n))},r.dn=function(e){var t=r.hn,n=t!==navigator.serviceWorker.controller;r.dispatchEvent(new Tn("controlling",{isExternal:n,originalEvent:e,sw:t,isUpdate:r.mn})),n||r.on.resolve(t)},r.gn=(o=function(e){var t=e.data,n=e.ports,o=e.source;return y(r.getSW(),(function(){r.an.has(o)&&r.dispatchEvent(new Tn("message",{data:t,originalEvent:e,ports:n,sw:o}))}))},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(o.apply(this,e))}catch(e){return Promise.reject(e)}}),r.sn=e,r.nn=n,navigator.serviceWorker.addEventListener("message",r.gn),r}r=t,(n=o).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r;var a,u=o.prototype;return u.register=function(e){var t=(void 0===e?{}:e).immediate,n=void 0!==t&&t;try{var r=this;return function(e,t){var n=e();return n&&n.then?n.then(t):t()}((function(){if(!n&&"complete"!==document.readyState)return g(new Promise((function(e){return window.addEventListener("load",e)})))}),(function(){return r.mn=Boolean(navigator.serviceWorker.controller),r.yn=r.pn(),y(r.bn(),(function(e){r.fn=e,r.yn&&(r.hn=r.yn,r.en.resolve(r.yn),r.on.resolve(r.yn),r.yn.addEventListener("statechange",r.ln,{once:!0}));var t=r.fn.waiting;return t&&i(t.scriptURL,r.sn.toString())&&(r.hn=t,Promise.resolve().then((function(){r.dispatchEvent(new Tn("waiting",{sw:t,wasWaitingBeforeRegister:!0}))})).then((function(){}))),r.hn&&(r.rn.resolve(r.hn),r.an.add(r.hn)),r.fn.addEventListener("updatefound",r.cn),navigator.serviceWorker.addEventListener("controllerchange",r.dn),r.fn}))}))}catch(e){return Promise.reject(e)}},u.update=function(){try{return this.fn?g(this.fn.update()):void 0}catch(e){return Promise.reject(e)}},u.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},u.messageSW=function(t){try{return y(this.getSW(),(function(n){return e(n,t)}))}catch(e){return Promise.reject(e)}},u.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&e(this.fn.waiting,kn)},u.pn=function(){var e=navigator.serviceWorker.controller;return e&&i(e.scriptURL,this.sn.toString())?e:void 0},u.bn=function(){try{var e=this;return function(t,n){try{var r=y(navigator.serviceWorker.register(e.sn,e.nn),(function(t){return e.un=performance.now(),t}))}catch(t){return n(t)}return r&&r.then?r.then(void 0,n):r}((function(){return y(navigator.serviceWorker.register(e.sn,e.nn),(function(t){return e.un=performance.now(),t}))}),(function(e){throw e}))}catch(e){return Promise.reject(e)}},(a=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(o.prototype,a),o}(function(){function e(){this.Pn=new Map}var t=e.prototype;return t.addEventListener=function(e,t){this.Sn(e).add(t)},t.removeEventListener=function(e,t){this.Sn(e).delete(t)},t.dispatchEvent=function(e){e.target=this;for(var t,n=r(this.Sn(e.type));!(t=n()).done;)(0,t.value)(e)},t.Sn=function(e){return this.Pn.has(e)||this.Pn.set(e,new Set),this.Pn.get(e)},e}()),Rn=void 0,Dn="x-omrs-offline-response-body",Mn="x-omrs-offline-response-status",Nn="x-omrs-offline-caching-strategy";function Ln(){return Ln=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){S(i,r,o,a,u,"next",e)}function u(e){S(i,r,o,a,u,"throw",e)}a(void 0)}))}}((function(e){var t,n;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}(this,(function(r){switch(r.label){case 0:return[4,w()];case 1:return(t=r.sent())?[4,t.messageSW(e)]:[3,3];case 2:return n=r.sent(),[3,4];case 3:n={success:!1,result:void 0,error:"No service worker has been registered. This is typically the case when the application has been built without offline-related features."},r.label=4;case 4:return[2,n]}}))})),Ln.apply(this,arguments)}function Un(){return Un=j((function(){var e;return x(this,(function(t){e=window.sessionStorage;try{e.setItem("someKeyHere","test"),e.removeItem("someKeyHere")}catch(t){if(t.code===DOMException.QUOTA_EXCEEDED_ERR&&0===e.length)return[2,!0]}return[2,!1]}))})),Un.apply(this,arguments)}function Bn(){return(Bn=j((function(){return x(this,(function(e){return[2,!window.indexedDB]}))}))).apply(this,arguments)}function Fn(){return Fn=j((function(){return x(this,(function(e){return[2,new Promise((function(e){var t=indexedDB.open("test");t.onerror=function(){return e(!0)},t.onsuccess=function(){return e(!1)}}))]}))})),Fn.apply(this,arguments)}function Hn(){return(Hn=j((function(){var e,t;return x(this,(function(n){switch(n.label){case 0:return[4,A()];case 1:return(t=n.sent())?[3,3]:[4,P()];case 2:t=n.sent(),n.label=3;case 3:return(e=t)?[3,5]:[4,C()];case 4:e=n.sent(),n.label=5;case 5:return[2,e]}}))}))).apply(this,arguments)}var Vn="openmrs3:offline-mode",Gn="unavailable";function Kn(){return(Kn=j((function(){return x(this,(function(e){switch(e.label){case 0:return[4,T()];case 1:return e.sent()||(Gn="active"===localStorage.getItem(Vn)?"on":"off"),navigator.onLine,[2]}}))}))).apply(this,arguments)}var $n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,zn=Object.keys,Wn=Array.isArray;"undefined"==typeof Promise||$n.Promise||($n.Promise=Promise);var qn=Object.getPrototypeOf,Zn={}.hasOwnProperty,Yn=Object.defineProperty,Xn=Object.getOwnPropertyDescriptor;function Jn(e,t){var n;return Xn(e,t)||(n=qn(e))&&Jn(n,t)}var Qn=[].slice;function er(e,t){if(M(e,t))return e[t];if(!t)return e;if("string"!=typeof t){for(var n=[],r=0,o=t.length;r<o;++r){var i=er(e,t[r]);n.push(i)}return n}var a=t.indexOf(".");if(-1!==a){var u=e[t.substr(0,a)];return void 0===u?void 0:er(u,t.substr(a+1))}}function tr(e,t,n){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){H("string"!=typeof n&&"length"in n);for(var r=0,o=t.length;r<o;++r)tr(e,t[r],n[r])}else{var i=t.indexOf(".");if(-1!==i){var a=t.substr(0,i),u=t.substr(i+1);if(""===u)void 0===n?Wn(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=n;else{var c=e[a];c&&M(e,a)||(c=e[a]={}),tr(c,u,n)}}else void 0===n?Wn(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=n}}var nr=[].concat,rr="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat($([8,16,32,64].map((function(e){return["Int","Uint","Float"].map((function(t){return t+e+"Array"}))})))).filter((function(e){return $n[e]})),or=rr.map((function(e){return $n[e]}));G(rr,(function(e){return[e,!0]}));var ir=null;function ar(e){if(!e||"object"!=typeof e)return e;var t=ir&&ir.get(e);if(t)return t;if(Wn(e)){t=[],ir&&ir.set(e,t);for(var n=0,r=e.length;n<r;++n)t.push(ar(e[n]))}else if(or.indexOf(e.constructor)>=0)t=e;else{var o=qn(e);for(var i in t=o===Object.prototype?{}:Object.create(o),ir&&ir.set(e,t),e)M(e,i)&&(t[i]=ar(e[i]))}return t}var ur={}.toString,cr="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",sr="symbol"==(void 0===cr?"undefined":p(cr))?function(e){var t;return null!=e&&(t=e[cr])&&t.apply(e)}:function(){return null},lr={},fr="undefined"!=typeof Symbol?function(e){return"AsyncFunction"===e[Symbol.toStringTag]}:function(){return!1},dr="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href),pr=function(){return!0},hr=!new Error("").stack;function vr(){if(hr)try{throw vr.arguments,new Error}catch(e){return e}return new Error}var yr=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],mr=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(yr),gr={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};U(X).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+Y(this._e,2))}},toString:function(){return this.name+": "+this.message}}),U(Q).from(X),U(ee).from(X);var br=mr.reduce((function(e,t){return e[t]=t+"Error",e}),{}),wr=X,Sr=mr.reduce((function(e,t){var n=function(e,n){this._e=vr(),this.name=r,e?"string"==typeof e?(this.message="".concat(e).concat(n?"\n "+n:""),this.inner=n||null):"object"==typeof e&&(this.message="".concat(e.name," ").concat(e.message),this.inner=e):(this.message=gr[t]||r,this.inner=null)},r=t+"Error";return U(n).from(wr),e[t]=n,e}),{});Sr.Syntax=SyntaxError,Sr.Type=TypeError,Sr.Range=RangeError;var Or=yr.reduce((function(e,t){return e[t+"Error"]=Sr[t],e}),{}),Er=mr.reduce((function(e,t){return-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=Sr[t]),e}),{});Er.ModifyError=Q,Er.DexieError=X,Er.BulkError=ee;var _r={},jr=f("undefined"==typeof Promise?[]:function(){var e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,qn(e),e];var t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,qn(t),e]}(),3),xr=jr[0],Cr=jr[1],Pr=jr[2],Ar=Cr&&Cr.then,Tr=xr&&xr.constructor,kr=!!Pr,Ir=!1,Rr=Pr?function(){Pr.then(me)}:$n.setImmediate?setImmediate.bind(null,me):$n.MutationObserver?function(){var e=document.createElement("div");new MutationObserver((function(){me(),e=null})).observe(e,{attributes:!0}),e.setAttribute("i","1")}:function(){setTimeout(me,0)},Dr=function(e,t){Gr.push([e,t]),Nr&&(Rr(),Nr=!1)},Mr=!0,Nr=!0,Lr=[],Ur=[],Br=null,Fr=ne,Hr={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Me,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((function(e){try{Me(e[0],e[1])}catch(e){}}))}},Vr=Hr,Gr=[],Kr=0,$r=[],zr={get:function(){var e=Vr,t=Qr;function n(n,r){var o=this,i=!e.global&&(e!==Vr||t!==Qr),a=i&&!je(),u=new le((function(t,u){he(o,new fe(Re(n,e,i,a),Re(r,e,i,a),t,u,e))}));return dr&&ye(u,this),u}return n.prototype=_r,n},set:function(e){L(this,"then",e&&e.prototype===_r?zr:{get:function(){return e},set:zr.set})}};function Wr(e,t){try{t((function(t){if(null===e._state){if(t===e)throw new TypeError("A promise cannot be resolved with itself.");var n=e._lib&&ge();t&&"function"==typeof t.then?Wr(e,(function(e,n){c(t,le)?t._then(e,n):t.then(e,n)})):(e._state=!0,e._value=t,pe(e)),n&&be()}}),de.bind(null,e))}catch(t){de(e,t)}}function qr(e,t,n){if(t.length===n)return t;var r="";if(!1===e._state){var o,i,a=e._value;null!=a?(o=a.name||"Error",i=a.message||a,r=Y(a,0)):(o=a,i=""),t.push(o+(i?": "+i:"")+r)}return dr&&((r=Y(e._stackHolder,2))&&-1===t.indexOf(r)&&t.push(r),e._prev&&qr(e._prev,t,n)),t}N(le.prototype,{then:zr,_then:function(e,t){he(this,new fe(null,null,e,t,Vr))},catch:function(e){if(1===arguments.length)return this.then(null,e);var t=arguments[0],n=arguments[1];return"function"==typeof t?this.then(null,(function(e){return c(e,t)?n(e):Se(e)})):this.then(null,(function(e){return e&&e.name===t?n(e):Se(e)}))},finally:function(e){return this.then((function(t){return e(),t}),(function(t){return e(),Se(t)}))},stack:{get:function(){if(this._stack)return this._stack;try{Ir=!0;var e=qr(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{Ir=!1}}},timeout:function(e,t){var n=this;return e<1/0?new le((function(r,o){var i=setTimeout((function(){return o(new Sr.Timeout(t))}),e);n.then(r,o).finally(clearTimeout.bind(null,i))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&L(le.prototype,Symbol.toStringTag,"Dexie.Promise"),Hr.env=Te(),N(le,{all:function(){var e=q.apply(null,arguments).map(xe);return new le((function(t,n){0===e.length&&t([]);var r=e.length;e.forEach((function(o,i){return le.resolve(o).then((function(n){e[i]=n,--r||t(e)}),n)}))}))},resolve:function(e){if(c(e,le))return e;if(e&&"function"==typeof e.then)return new le((function(t,n){e.then(t,n)}));var t=new le(_r,!0,e);return ye(t,Br),t},reject:Se,race:function(){var e=q.apply(null,arguments).map(xe);return new le((function(t,n){e.map((function(e){return le.resolve(e).then(t,n)}))}))},PSD:{get:function(){return Vr},set:function(e){return Vr=e}},totalEchoes:{get:function(){return Qr}},newPSD:Ee,usePSD:ke,scheduler:{get:function(){return Dr},set:function(e){Dr=e}},rejectionMapper:{get:function(){return Fr},set:function(e){Fr=e}},follow:function(e,t){return new le((function(n,r){return Ee((function(t,n){var r=Vr;r.unhandleds=[],r.onunhandled=n,r.finalize=oe((function(){var e=this;!function(e){$r.push((function t(){e(),$r.splice($r.indexOf(t),1)})),++Kr,Dr((function(){0==--Kr&&we()}),[])}((function(){0===e.unhandleds.length?t():n(e.unhandleds[0])}))}),r.finalize),e()}),t,n,r)}))}}),Tr&&(Tr.allSettled&&L(le,"allSettled",(function(){var e=q.apply(null,arguments).map(xe);return new le((function(t){0===e.length&&t([]);var n=e.length,r=new Array(n);e.forEach((function(e,o){return le.resolve(e).then((function(e){return r[o]={status:"fulfilled",value:e}}),(function(e){return r[o]={status:"rejected",reason:e}})).then((function(){return--n||t(r)}))}))}))})),Tr.any&&"undefined"!=typeof AggregateError&&L(le,"any",(function(){var e=q.apply(null,arguments).map(xe);return new le((function(t,n){0===e.length&&n(new AggregateError([]));var r=e.length,o=new Array(r);e.forEach((function(e,i){return le.resolve(e).then((function(e){return t(e)}),(function(e){o[i]=e,--r||n(new AggregateError(o))}))}))}))})));var Zr={awaits:0,echoes:0,id:0},Yr=0,Xr=[],Jr=0,Qr=0,eo=0;-1===(""+Ar).indexOf("[native code]")&&(_e=je=te);var to=le.reject;function no(e,t,n,r){if(e.idbdb&&(e._state.openComplete||Vr.letThrough||e._vip)){var o=e._createTransaction(t,n,e._dbSchema);try{o.create(),e._state.PR1398_maxLoop=3}catch(o){return o.name===br.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((function(){return no(e,t,n,r)}))):to(o)}return o._promise(t,(function(e,t){return Ee((function(){return Vr.trans=o,r(e,t,o)}))})).then((function(e){return o._completion.then((function(){return e}))}))}if(e._state.openComplete)return to(new Sr.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return to(new Sr.DatabaseClosed);e.open().catch(te)}return e._state.dbReadyPromise.then((function(){return no(e,t,n,r)}))}var ro=String.fromCharCode(65535),oo="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",io=[],ao="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),uo=ao,co=ao,so=function(e){return!/(dexie\.js|dexie\.min\.js)/.test(e)},lo={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1},fo=function(){function e(){o(this,e)}return a(e,[{key:"_trans",value:function(e,t,n){var r=this._tx||Vr.trans,o=this.name;function i(e,n,r){if(!r.schema[o])throw new Sr.NotFound("Table "+o+" not part of transaction");return t(r.idbtrans,r)}var a=ge();try{return r&&r.db===this.db?r===Vr.trans?r._promise(e,i,n):Ee((function(){return r._promise(e,i,n)}),{trans:r,transless:Vr.transless||Vr}):no(this.db,e,[this.name],i)}finally{a&&be()}}},{key:"get",value:function(e,t){var n=this;return e&&e.constructor===Object?this.where(e).first(t):this._trans("readonly",(function(t){return n.core.get({trans:t,key:e}).then((function(e){return n.hook.reading.fire(e)}))})).then(t)}},{key:"where",value:function(e){if("string"==typeof e)return new this.db.WhereClause(this,e);if(Wn(e))return new this.db.WhereClause(this,"[".concat(e.join("+"),"]"));var t=zn(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);var n=this.schema.indexes.concat(this.schema.primKey).filter((function(e){return e.compound&&t.every((function(t){return e.keyPath.indexOf(t)>=0}))&&e.keyPath.every((function(e){return t.indexOf(e)>=0}))}))[0];if(n&&this.db._maxKey!==ro)return this.where(n.name).equals(n.keyPath.map((function(t){return e[t]})));!n&&dr&&console.warn("The query ".concat(JSON.stringify(e)," on ").concat(this.name," would benefit of a compound index [").concat(t.join("+"),"]"));var r=this.schema.idxByName,o=this.db._deps.indexedDB;function i(e,t){try{return 0===o.cmp(e,t)}catch(e){return!1}}var a=f(t.reduce((function(t,n){var o=f(t,2),a=o[0],u=o[1],c=r[n],s=e[n];return[a||c,a||!c?Ne(u,c&&c.multi?function(e){var t=er(e,n);return Wn(t)&&t.some((function(e){return i(s,e)}))}:function(e){return i(s,er(e,n))}):u]}),[null,null]),2),u=a[0],c=a[1];return u?this.where(u.name).equals(e[u.keyPath]).filter(c):n?this.filter(c):this.where(t).equals("")}},{key:"filter",value:function(e){return this.toCollection().and(e)}},{key:"count",value:function(e){return this.toCollection().count(e)}},{key:"offset",value:function(e){return this.toCollection().offset(e)}},{key:"limit",value:function(e){return this.toCollection().limit(e)}},{key:"each",value:function(e){return this.toCollection().each(e)}},{key:"toArray",value:function(e){return this.toCollection().toArray(e)}},{key:"toCollection",value:function(){return new this.db.Collection(new this.db.WhereClause(this))}},{key:"orderBy",value:function(e){return new this.db.Collection(new this.db.WhereClause(this,Wn(e)?"[".concat(e.join("+"),"]"):e))}},{key:"reverse",value:function(){return this.toCollection().reverse()}},{key:"mapToClass",value:function(e){this.schema.mappedClass=e;var t=function(t){if(!t)return t;var n=Object.create(e.prototype);for(var r in t)if(M(t,r))try{n[r]=t[r]}catch(e){}return n};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=t,this.hook("reading",t),e}},{key:"defineClass",value:function(){return this.mapToClass((function(e){D(this,e)}))}},{key:"add",value:function(e,t){var n=this,r=this.schema.primKey,o=r.auto,i=r.keyPath,a=e;return i&&o&&(a=Le(i)(e)),this._trans("readwrite",(function(e){return n.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[a]})})).then((function(e){return e.numFailures?le.reject(e.failures[0]):e.lastResult})).then((function(t){if(i)try{tr(e,i,t)}catch(e){}return t}))}},{key:"update",value:function(e,t){if("object"!=typeof e||Wn(e))return this.where(":id").equals(e).modify(t);var n=er(e,this.schema.primKey.keyPath);if(void 0===n)return to(new Sr.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?zn(t).forEach((function(n){tr(e,n,t[n])})):t(e,{value:e,primKey:n})}catch(e){}return this.where(":id").equals(n).modify(t)}},{key:"put",value:function(e,t){var n=this,r=this.schema.primKey,o=r.auto,i=r.keyPath,a=e;return i&&o&&(a=Le(i)(e)),this._trans("readwrite",(function(e){return n.core.mutate({trans:e,type:"put",values:[a],keys:null!=t?[t]:null})})).then((function(e){return e.numFailures?le.reject(e.failures[0]):e.lastResult})).then((function(t){if(i)try{tr(e,i,t)}catch(e){}return t}))}},{key:"delete",value:function(e){var t=this;return this._trans("readwrite",(function(n){return t.core.mutate({trans:n,type:"delete",keys:[e]})})).then((function(e){return e.numFailures?le.reject(e.failures[0]):void 0}))}},{key:"clear",value:function(){var e=this;return this._trans("readwrite",(function(t){return e.core.mutate({trans:t,type:"deleteRange",range:lo})})).then((function(e){return e.numFailures?le.reject(e.failures[0]):void 0}))}},{key:"bulkGet",value:function(e){var t=this;return this._trans("readonly",(function(n){return t.core.getMany({keys:e,trans:n}).then((function(e){return e.map((function(e){return t.hook.reading.fire(e)}))}))}))}},{key:"bulkAdd",value:function(e,t,n){var r=this,o=Array.isArray(t)?t:void 0,i=(n=n||(o?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(function(t){var n=r.schema.primKey,a=n.auto,u=n.keyPath;if(u&&o)throw new Sr.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(o&&o.length!==e.length)throw new Sr.InvalidArgument("Arguments objects and keys must have the same length");var c=e.length,s=u&&a?e.map(Le(u)):e;return r.core.mutate({trans:t,type:"add",keys:o,values:s,wantResults:i}).then((function(e){var t=e.numFailures,n=e.results,o=e.lastResult,a=e.failures;if(0===t)return i?n:o;throw new ee("".concat(r.name,".bulkAdd(): ").concat(t," of ").concat(c," operations failed"),a)}))}))}},{key:"bulkPut",value:function(e,t,n){var r=this,o=Array.isArray(t)?t:void 0,i=(n=n||(o?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(function(t){var n=r.schema.primKey,a=n.auto,u=n.keyPath;if(u&&o)throw new Sr.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(o&&o.length!==e.length)throw new Sr.InvalidArgument("Arguments objects and keys must have the same length");var c=e.length,s=u&&a?e.map(Le(u)):e;return r.core.mutate({trans:t,type:"put",keys:o,values:s,wantResults:i}).then((function(e){var t=e.numFailures,n=e.results,o=e.lastResult,a=e.failures;if(0===t)return i?n:o;throw new ee("".concat(r.name,".bulkPut(): ").concat(t," of ").concat(c," operations failed"),a)}))}))}},{key:"bulkDelete",value:function(e){var t=this,n=e.length;return this._trans("readwrite",(function(n){return t.core.mutate({trans:n,type:"delete",keys:e})})).then((function(e){var r=e.numFailures,o=e.lastResult,i=e.failures;if(0===r)return o;throw new ee("".concat(t.name,".bulkDelete(): ").concat(r," of ").concat(n," operations failed"),i)}))}}]),e}();function po(e,t){try{var n=We(e),r=We(t);if(n!==r)return"Array"===n?1:"Array"===r?-1:"binary"===n?1:"binary"===r?-1:"string"===n?1:"string"===r?-1:"Date"===n?1:"Date"!==r?NaN:-1;switch(n){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return function(e,t){for(var n=e.length,r=t.length,o=n<r?n:r,i=0;i<o;++i)if(e[i]!==t[i])return e[i]<t[i]?-1:1;return n===r?0:n<r?-1:1}(qe(e),qe(t));case"Array":return function(e,t){for(var n=e.length,r=t.length,o=n<r?n:r,i=0;i<o;++i){var a=po(e[i],t[i]);if(0!==a)return a}return n===r?0:n<r?-1:1}(e,t)}}catch(e){}return NaN}var ho=function(){function e(){o(this,e)}return a(e,[{key:"_read",value:function(e,t){var n=this._ctx;return n.error?n.table._trans(null,to.bind(null,n.error)):n.table._trans("readonly",e).then(t)}},{key:"_write",value:function(e){var t=this._ctx;return t.error?t.table._trans(null,to.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}},{key:"_addAlgorithm",value:function(e){var t=this._ctx;t.algorithm=Ne(t.algorithm,e)}},{key:"_iterate",value:function(e,t){return $e(this._ctx,e,t,this._ctx.table.core)}},{key:"clone",value:function(e){var t=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return e&&D(n,e),t._ctx=n,t}},{key:"raw",value:function(){return this._ctx.valueMapper=null,this}},{key:"each",value:function(e){var t=this._ctx;return this._read((function(n){return $e(t,e,n,t.table.core)}))}},{key:"count",value:function(e){var t=this;return this._read((function(e){var n=t._ctx,r=n.table.core;if(Fe(n,!0))return r.count({trans:e,query:{index:Ge(n,r.schema),range:n.range}}).then((function(e){return Math.min(e,n.limit)}));var o=0;return $e(n,(function(){return++o,!1}),e,r).then((function(){return o}))})).then(e)}},{key:"sortBy",value:function(e,t){var n=e.split(".").reverse(),r=n[0],o=n.length-1;function i(e,t){return t?i(e[n[t]],t-1):e[r]}var a="next"===this._ctx.dir?1:-1;function u(e,t){var n=i(e,o),r=i(t,o);return n<r?-a:n>r?a:0}return this.toArray((function(e){return e.sort(u)})).then(t)}},{key:"toArray",value:function(e){var t=this;return this._read((function(e){var n=t._ctx;if("next"===n.dir&&Fe(n,!0)&&n.limit>0){var r=n.valueMapper,o=Ge(n,n.table.core.schema);return n.table.core.query({trans:e,limit:n.limit,values:!0,query:{index:o,range:n.range}}).then((function(e){var t=e.result;return r?t.map(r):t}))}var i=[];return $e(n,(function(e){return i.push(e)}),e,n.table.core).then((function(){return i}))}),e)}},{key:"offset",value:function(e){var t=this._ctx;return e<=0||(t.offset+=e,Fe(t)?Ve(t,(function(){var t=e;return function(e,n){return 0===t||(1===t?(--t,!1):(n((function(){e.advance(t),t=0})),!1))}})):Ve(t,(function(){var t=e;return function(){return--t<0}}))),this}},{key:"limit",value:function(e){return this._ctx.limit=Math.min(this._ctx.limit,e),Ve(this._ctx,(function(){var t=e;return function(e,n,r){return--t<=0&&n(r),t>=0}}),!0),this}},{key:"until",value:function(e,t){return He(this._ctx,(function(n,r,o){return!e(n.value)||(r(o),t)})),this}},{key:"first",value:function(e){return this.limit(1).toArray((function(e){return e[0]})).then(e)}},{key:"last",value:function(e){return this.reverse().first(e)}},{key:"filter",value:function(e){var t,n;return He(this._ctx,(function(t){return e(t.value)})),t=this._ctx,n=e,t.isMatch=Ne(t.isMatch,n),this}},{key:"and",value:function(e){return this.filter(e)}},{key:"or",value:function(e){return new this.db.WhereClause(this._ctx.table,e,this)}},{key:"reverse",value:function(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}},{key:"desc",value:function(){return this.reverse()}},{key:"eachKey",value:function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.key,n)}))}},{key:"eachUniqueKey",value:function(e){return this._ctx.unique="unique",this.eachKey(e)}},{key:"eachPrimaryKey",value:function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.primaryKey,n)}))}},{key:"keys",value:function(e){var t=this._ctx;t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.key)})).then((function(){return n})).then(e)}},{key:"primaryKeys",value:function(e){var t=this._ctx;if("next"===t.dir&&Fe(t,!0)&&t.limit>0)return this._read((function(e){var n=Ge(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:n,range:t.range}})})).then((function(e){return e.result})).then(e);t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.primaryKey)})).then((function(){return n})).then(e)}},{key:"uniqueKeys",value:function(e){return this._ctx.unique="unique",this.keys(e)}},{key:"firstKey",value:function(e){return this.limit(1).keys((function(e){return e[0]})).then(e)}},{key:"lastKey",value:function(e){return this.reverse().firstKey(e)}},{key:"distinct",value:function(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var n={};return He(this._ctx,(function(e){var t=e.primaryKey.toString(),r=M(n,t);return n[t]=!0,!r})),this}},{key:"modify",value:function(e){var t=this,n=this._ctx;return this._write((function(r){var o;if("function"==typeof e)o=e;else{var i=zn(e),a=i.length;o=function(t){for(var n=!1,r=0;r<a;++r){var o=i[r],u=e[o];er(t,o)!==u&&(tr(t,o,u),n=!0)}return n}}var u=n.table.core,c=u.schema.primaryKey,s=c.outbound,l=c.extractKey,f=t.db._options.modifyChunkSize||200,d=[],p=0,h=[],v=function(e,t){var n=t.failures,r=t.numFailures;p+=e-r;var o=!0,i=!1,a=void 0;try{for(var u,c=zn(n)[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var s=u.value;d.push(n[s])}}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}};return t.clone().primaryKeys().then((function(t){var i=function(a){var c=Math.min(f,t.length-a);return u.getMany({trans:r,keys:t.slice(a,a+c),cache:"immutable"}).then((function(d){for(var p=[],h=[],y=s?[]:null,m=[],g=0;g<c;++g){var b=d[g],w={value:z(b),primKey:t[a+g]};!1!==o.call(w,w.value,w)&&(null==w.value?m.push(t[a+g]):s||0===po(l(b),l(w.value))?(h.push(w.value),s&&y.push(t[a+g])):(m.push(t[a+g]),p.push(w.value)))}var S=Fe(n)&&n.limit===1/0&&("function"!=typeof e||e===vo)&&{index:n.index,range:n.range};return Promise.resolve(p.length>0&&u.mutate({trans:r,type:"add",values:p}).then((function(e){for(var t in e.failures)m.splice(parseInt(t),1);v(p.length,e)}))).then((function(){return(h.length>0||S&&"object"==typeof e)&&u.mutate({trans:r,type:"put",keys:y,values:h,criteria:S,changeSpec:"function"!=typeof e&&e}).then((function(e){return v(h.length,e)}))})).then((function(){return(m.length>0||S&&e===vo)&&u.mutate({trans:r,type:"delete",keys:m,criteria:S}).then((function(e){return v(m.length,e)}))})).then((function(){return t.length>a+c&&i(a+f)}))}))};return i(0).then((function(){if(d.length>0)throw new Q("Error modifying one or more objects",d,p,h);return t.length}))}))}))}},{key:"delete",value:function(){var e=this._ctx,t=e.range;return Fe(e)&&(e.isPrimKey&&!co||3===t.type)?this._write((function(n){var r=e.table.core.schema.primaryKey,o=t;return e.table.core.count({trans:n,query:{index:r,range:o}}).then((function(t){return e.table.core.mutate({trans:n,type:"deleteRange",range:o}).then((function(e){var n=e.failures,r=(e.lastResult,e.results,e.numFailures);if(r)throw new Q("Could not delete some values",Object.keys(n).map((function(e){return n[e]})),t-r);return t-r}))}))})):this.modify(vo)}}]),e}(),vo=function(e,t){return t.value=null},yo=function(){function e(){o(this,e)}return a(e,[{key:"Collection",get:function(){return this._ctx.table.db.Collection}},{key:"between",value:function(e,t,n,r){n=!1!==n,r=!0===r;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(n||r)&&(!n||!r)?Je(this):new this.Collection(this,(function(){return tt(e,t,!n,!r)}))}catch(e){return Xe(this,oo)}}},{key:"equals",value:function(e){return null==e?Xe(this,oo):new this.Collection(this,(function(){return nt(e)}))}},{key:"above",value:function(e){return null==e?Xe(this,oo):new this.Collection(this,(function(){return tt(e,void 0,!0)}))}},{key:"aboveOrEqual",value:function(e){return null==e?Xe(this,oo):new this.Collection(this,(function(){return tt(e,void 0,!1)}))}},{key:"below",value:function(e){return null==e?Xe(this,oo):new this.Collection(this,(function(){return tt(void 0,e,!1,!0)}))}},{key:"belowOrEqual",value:function(e){return null==e?Xe(this,oo):new this.Collection(this,(function(){return tt(void 0,e)}))}},{key:"startsWith",value:function(e){return"string"!=typeof e?Xe(this,"String expected."):this.between(e,e+ro,!0,!0)}},{key:"startsWithIgnoreCase",value:function(e){return""===e?this.startsWith(e):et(this,(function(e,t){return 0===e.indexOf(t[0])}),[e],ro)}},{key:"equalsIgnoreCase",value:function(e){return et(this,(function(e,t){return e===t[0]}),[e],"")}},{key:"anyOfIgnoreCase",value:function(){var e=q.apply(lr,arguments);return 0===e.length?Je(this):et(this,(function(e,t){return-1!==t.indexOf(e)}),e,"")}},{key:"startsWithAnyOfIgnoreCase",value:function(){var e=q.apply(lr,arguments);return 0===e.length?Je(this):et(this,(function(e,t){return t.some((function(t){return 0===e.indexOf(t)}))}),e,ro)}},{key:"anyOf",value:function(){var e=this,t=q.apply(lr,arguments),n=this._cmp;try{t.sort(n)}catch(e){return Xe(this,oo)}if(0===t.length)return Je(this);var r=new this.Collection(this,(function(){return tt(t[0],t[t.length-1])}));r._ondirectionchange=function(r){n="next"===r?e._ascending:e._descending,t.sort(n)};var o=0;return r._addAlgorithm((function(e,r,i){for(var a=e.key;n(a,t[o])>0;)if(++o===t.length)return r(i),!1;return 0===n(a,t[o])||(r((function(){e.continue(t[o])})),!1)})),r}},{key:"notEqual",value:function(e){return this.inAnyRange([[-1/0,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}},{key:"noneOf",value:function(){var e=q.apply(lr,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return Xe(this,oo)}var t=e.reduce((function(e,t){return e?e.concat([[e[e.length-1][1],t]]):[[-1/0,t]]}),null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})}},{key:"inAnyRange",value:function(e,t){var n=this,r=this._cmp,o=this._ascending,i=this._descending,a=this._min,u=this._max;if(0===e.length)return Je(this);if(!e.every((function(e){return void 0!==e[0]&&void 0!==e[1]&&o(e[0],e[1])<=0})))return Xe(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",Sr.InvalidArgument);var c,s=!t||!1!==t.includeLowers,l=t&&!0===t.includeUppers,f=o;function d(e,t){return f(e[0],t[0])}try{c=e.reduce((function(e,t){for(var n=0,o=e.length;n<o;++n){var i=e[n];if(r(t[0],i[1])<0&&r(t[1],i[0])>0){i[0]=a(i[0],t[0]),i[1]=u(i[1],t[1]);break}}return n===o&&e.push(t),e}),[]),c.sort(d)}catch(e){return Xe(this,oo)}var p=0,h=l?function(e){return o(e,c[p][1])>0}:function(e){return o(e,c[p][1])>=0},v=s?function(e){return i(e,c[p][0])>0}:function(e){return i(e,c[p][0])>=0},y=h,m=new this.Collection(this,(function(){return tt(c[0][0],c[c.length-1][1],!s,!l)}));return m._ondirectionchange=function(e){"next"===e?(y=h,f=o):(y=v,f=i),c.sort(d)},m._addAlgorithm((function(e,t,r){for(var i=e.key;y(i);)if(++p===c.length)return t(r),!1;return!!function(e){return!h(e)&&!v(e)}(i)||(0===n._cmp(i,c[p][1])||0===n._cmp(i,c[p][0])||t((function(){f===o?e.continue(c[p][0]):e.continue(c[p][1])})),!1)})),m}},{key:"startsWithAnyOf",value:function(){var e=q.apply(lr,arguments);return e.every((function(e){return"string"==typeof e}))?0===e.length?Je(this):this.inAnyRange(e.map((function(e){return[e,e+ro]}))):Xe(this,"startsWithAnyOf() only works with strings")}}]),e}(),mo=Ue(null,"storagemutated"),go=function(){function e(){o(this,e)}return a(e,[{key:"_lock",value:function(){return H(!Vr.global),++this._reculock,1!==this._reculock||Vr.global||(Vr.lockOwnerFor=this),this}},{key:"_unlock",value:function(){if(H(!Vr.global),0==--this._reculock)for(Vr.global||(Vr.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{ke(e[1],e[0])}catch(e){}}return this}},{key:"_locked",value:function(){return this._reculock&&Vr.lockOwnerFor!==this}},{key:"create",value:function(e){var t=this;if(!this.mode)return this;var n=this.db.idbdb,r=this.db._state.dbOpenError;if(H(!this.idbtrans),!e&&!n)switch(r&&r.name){case"DatabaseClosedError":throw new Sr.DatabaseClosed(r);case"MissingAPIError":throw new Sr.MissingAPI(r.message,r);default:throw new Sr.OpenFailed(r)}if(!this.active)throw new Sr.TransactionInactive;return H(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):n.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=Oe((function(n){ot(n),t._reject(e.error)})),e.onabort=Oe((function(n){ot(n),t.active&&t._reject(new Sr.Abort(e.error)),t.active=!1,t.on("abort").fire(n)})),e.oncomplete=Oe((function(){t.active=!1,t._resolve(),"mutatedParts"in e&&mo.storagemutated.fire(e.mutatedParts)})),this}},{key:"_promise",value:function(e,t,n){var r=this;if("readwrite"===e&&"readwrite"!==this.mode)return to(new Sr.ReadOnly("Transaction is readonly"));if(!this.active)return to(new Sr.TransactionInactive);if(this._locked())return new le((function(o,i){r._blockedFuncs.push([function(){r._promise(e,t,n).then(o,i)},Vr])}));if(n)return Ee((function(){var e=new le((function(e,n){r._lock();var o=t(e,n,r);o&&o.then&&o.then(e,n)}));return e.finally((function(){return r._unlock()})),e._lib=!0,e}));var o=new le((function(e,n){var o=t(e,n,r);o&&o.then&&o.then(e,n)}));return o._lib=!0,o}},{key:"_root",value:function(){return this.parent?this.parent._root():this}},{key:"waitFor",value:function(e){var t=this._root(),n=le.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then((function(){return n}));else{t._waitingFor=n,t._waitingQueue=[];var r=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(r.get(-1/0).onsuccess=e)}()}var o=t._waitingFor;return new le((function(e,r){n.then((function(n){return t._waitingQueue.push(Oe(e.bind(null,n)))}),(function(e){return t._waitingQueue.push(Oe(r.bind(null,e)))})).finally((function(){t._waitingFor===o&&(t._waitingFor=null)}))}))}},{key:"abort",value:function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new Sr.Abort))}},{key:"table",value:function(e){var t=this._memoizedTables||(this._memoizedTables={});if(M(t,e))return t[e];var n=this.schema[e];if(!n)throw new Sr.NotFound("Table "+e+" not part of transaction");var r=new this.db.Table(e,n,this);return r.core=this.db.core.table(e),t[e]=r,r}}]),e}(),bo=function(e){try{return e.only([[]]),bo=function(){return[[]]},[[]]}catch(e){return bo=function(){return ro},ro}},wo=0,So=function(){function e(){o(this,e)}return a(e,[{key:"_parseStoresSpec",value:function(e,t){zn(e).forEach((function(n){if(null!==e[n]){var r=e[n].split(",").map((function(e,t){var n=(e=e.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return it(n,r||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),Wn(r),0===t)})),o=r.shift();if(o.multi)throw new Sr.Schema("Primary key cannot be multi-valued");r.forEach((function(e){if(e.auto)throw new Sr.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new Sr.Schema("Index must have a name and cannot be an empty string")})),t[n]=ut(n,o,r)}}))}},{key:"stores",value:function(e){var t=this.db;this._cfg.storesSource=this._cfg.storesSource?D(this._cfg.storesSource,e):e;var n=t._versions,r={},o={};return n.forEach((function(e){D(r,e._cfg.storesSource),o=e._cfg.dbschema={},e._parseStoresSpec(r,o)})),t._dbSchema=o,pt(t,[t._allTables,t,t.Transaction.prototype]),dt(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],zn(o),o),t._storeNames=zn(o),this}},{key:"upgrade",value:function(e){return this._cfg.contentUpgrade=se(this._cfg.contentUpgrade||te,e),this}}]),e}();function Oo(e,t,n,r,o){return le.resolve().then((function(){var i=Vr.transless||Vr,a=e._createTransaction(t,n,e._dbSchema,r),u={trans:a,transless:i};if(r)a.idbtrans=r.idbtrans;else try{a.create(),e._state.PR1398_maxLoop=3}catch(r){return r.name===br.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((function(){return Oo(e,t,n,null,o)}))):to(r)}var c,s=fr(o);s&&_e();var l=le.follow((function(){if(c=o.call(a,a))if(s){var e=je.bind(null,null);c.then(e,e)}else"function"==typeof c.next&&"function"==typeof c.throw&&(c=_t(c))}),u);return(c&&"function"==typeof c.then?le.resolve(c).then((function(e){return a.active?e:to(new Sr.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))})):l.then((function(){return c}))).then((function(e){return r&&a._resolve(),a._completion.then((function(){return e}))})).catch((function(e){return a._reject(e),to(e)}))}))}var Eo={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return l(s({},e),{table:function(t){var n=e.table(t),r=n.schema,o={},i=[];function a(e,t,n){var r=lt(e),u=o[r]=o[r]||[],c=null==e?0:"string"==typeof e?1:e.length,f=t>0,d=l(s({},n),{isVirtual:f,keyTail:t,keyLength:c,extractKey:ct(e),unique:!f&&n.unique});return u.push(d),d.isPrimaryKey||i.push(d),c>1&&a(2===c?e[0]:e.slice(0,c-1),t+1,n),u.sort((function(e,t){return e.keyTail-t.keyTail})),d}var u=a(r.primaryKey.keyPath,0,r.primaryKey);o[":id"]=[u];var c=!0,f=!1,d=void 0;try{for(var p,h=r.indexes[Symbol.iterator]();!(c=(p=h.next()).done);c=!0){var v=p.value;a(v.keyPath,0,v)}}catch(e){f=!0,d=e}finally{try{c||null==h.return||h.return()}finally{if(f)throw d}}function y(t){var n,r,o=t.query.index;return o.isVirtual?l(s({},t),{query:{index:o,range:(n=t.query.range,r=o.keyTail,{type:1===n.type?2:n.type,lower:xt(n.lower,n.lowerOpen?e.MAX_KEY:e.MIN_KEY,r),lowerOpen:!0,upper:xt(n.upper,n.upperOpen?e.MIN_KEY:e.MAX_KEY,r),upperOpen:!0})}}):t}var m=l(s({},n),{schema:l(s({},r),{primaryKey:u,indexes:i,getIndexByKeyPath:function(e){var t=o[lt(e)];return t&&t[0]}}),count:function(e){return n.count(y(e))},query:function(e){return n.query(y(e))},openCursor:function(t){var r=t.query.index,o=r.keyTail,i=r.isVirtual,a=r.keyLength;return i?n.openCursor(y(t)).then((function(n){return n&&function(n){var r=Object.create(n,{continue:{value:function(r){null!=r?n.continue(xt(r,t.reverse?e.MAX_KEY:e.MIN_KEY,o)):t.unique?n.continue(n.key.slice(0,a).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,o)):n.continue()}},continuePrimaryKey:{value:function(t,r){n.continuePrimaryKey(xt(t,e.MAX_KEY,o),r)}},primaryKey:{get:function(){return n.primaryKey}},key:{get:function(){var e=n.key;return 1===a?e[0]:e.slice(0,a)}},value:{get:function(){return n.value}}});return r}(n)})):n.openCursor(t)}});return m}})}};function _o(e,t,n,r){return n=n||{},r=r||"",zn(e).forEach((function(o){if(M(t,o)){var i=e[o],a=t[o];if("object"==typeof i&&"object"==typeof a&&i&&a){var u=W(i);u!==W(a)?n[r+o]=t[o]:"Object"===u?_o(i,a,n,r+o+"."):i!==a&&(n[r+o]=t[o])}else i!==a&&(n[r+o]=t[o])}else n[r+o]=void 0})),zn(t).forEach((function(o){M(e,o)||(n[r+o]=t[o])})),n}var jo={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(e){return l(s({},e),{table:function(t){var n=e.table(t),r=n.schema.primaryKey,o=l(s({},n),{mutate:function(e){var o=Vr.trans,i=o.table(t).hook,a=i.deleting,u=i.creating,c=i.updating;switch(e.type){case"add":if(u.fire===te)break;return o._promise("readwrite",(function(){return f(e)}),!0);case"put":if(u.fire===te&&c.fire===te)break;return o._promise("readwrite",(function(){return f(e)}),!0);case"delete":if(a.fire===te)break;return o._promise("readwrite",(function(){return f(e)}),!0);case"deleteRange":if(a.fire===te)break;return o._promise("readwrite",(function(){return function(e){return p(e.trans,e.range,1e4)}(e)}),!0)}return n.mutate(e);function f(e){var t=Vr.trans,o=e.keys||function(e,t){return"delete"===t.type?t.keys:t.keys||t.values.map(e.extractKey)}(r,e);if(!o)throw new Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?l(s({},e),{keys:o}):s({},e)).type&&(e.values=d(e.values)),e.keys&&(e.keys=d(e.keys)),function(e,t,n){return"add"===t.type?Promise.resolve([]):e.getMany({trans:t.trans,keys:n,cache:"immutable"})}(n,e,o).then((function(i){var s=o.map((function(n,o){var s=i[o],l={onerror:null,onsuccess:null};if("delete"===e.type)a.fire.call(l,n,s,t);else if("add"===e.type||void 0===s){var f=u.fire.call(l,n,e.values[o],t);null==n&&null!=f&&(n=f,e.keys[o]=n,r.outbound||tr(e.values[o],r.keyPath,n))}else{var d=_o(s,e.values[o]),p=c.fire.call(l,d,n,s,t);if(p){var h=e.values[o];Object.keys(p).forEach((function(e){M(h,e)?h[e]=p[e]:tr(h,e,p[e])}))}}return l}));return n.mutate(e).then((function(t){for(var n=t.failures,r=t.results,a=t.numFailures,u=t.lastResult,c=0;c<o.length;++c){var l=r?r[c]:o[c],f=s[c];null==l?f.onerror&&f.onerror(n[c]):f.onsuccess&&f.onsuccess("put"===e.type&&i[c]?e.values[c]:l)}return{failures:n,results:r,numFailures:a,lastResult:u}})).catch((function(e){return s.forEach((function(t){return t.onerror&&t.onerror(e)})),Promise.reject(e)}))}))}function p(e,t,o){return n.query({trans:e,values:!1,query:{index:r,range:t},limit:o}).then((function(n){var r=n.result;return f({type:"delete",keys:r,trans:e}).then((function(n){return n.numFailures>0?Promise.reject(n.failures[0]):r.length<o?{failures:[],numFailures:0,lastResult:void 0}:p(e,l(s({},t),{lower:r[r.length-1],lowerOpen:!0}),o)}))}))}}});return o}})}},xo={stack:"dbcore",level:-1,create:function(e){return{table:function(t){var n=e.table(t);return l(s({},n),{getMany:function(e){if(!e.cache)return n.getMany(e);var t=Ct(e.keys,e.trans._cache,"clone"===e.cache);return t?le.resolve(t):n.getMany(e).then((function(t){return e.trans._cache={keys:e.keys,values:"clone"===e.cache?z(t):t},t}))},mutate:function(e){return"add"!==e.type&&(e.trans._cache=null),n.mutate(e)}})}}}},Co=function(e,t){if(!this){var n=new Co;return e&&"d"in e&&D(n,e),n}D(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function Po(e,t,n){var r=po(t,n);if(!isNaN(r)){if(r>0)throw RangeError();if(Pt(e))return D(e,{from:t,to:n,d:1});var o=e.l,i=e.r;if(po(n,e.from)<0)return o?Po(o,t,n):e.l={from:t,to:n,d:1,l:null,r:null},kt(e);if(po(t,e.to)>0)return i?Po(i,t,n):e.r={from:t,to:n,d:1,l:null,r:null},kt(e);po(t,e.from)<0&&(e.from=t,e.l=null,e.d=i?i.d+1:1),po(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);var a=!e.r;o&&!e.l&&At(e,o),i&&a&&At(e,i)}}N(Co.prototype,u({add:function(e){return At(this,e),this},addKey:function(e){return Po(this,e,e),this},addKeys:function(e){var t=this;return e.forEach((function(e){return Po(t,e,e)})),this}},cr,(function(){return Tt(this)})));var Ao,To={stack:"dbcore",level:0,create:function(e){var t=e.schema.name,n=new Co(e.MIN_KEY,e.MAX_KEY);return l(s({},e),{table:function(r){var o=e.table(r),i=o.schema,a=i.primaryKey,u=a.extractKey,c=a.outbound,d=l(s({},o),{mutate:function(e){var a=e.trans,u=a.mutatedParts||(a.mutatedParts={}),c=function(e){var n="idb://".concat(t,"/").concat(r,"/").concat(e);return u[n]||(u[n]=new Co)},s=c(""),l=c(":dels"),d=e.type,p=f("deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[],2),h=p[0],v=p[1],y=e.trans._cache;return o.mutate(e).then((function(e){if(Wn(h)){"delete"!==d&&(h=e.results),s.addKeys(h);var t=Ct(h,y);t||"add"===d||l.addKeys(h),(t||v)&&function(e,t,n,r){t.indexes.forEach((function(t){var o=e(t.name||"");function i(e){return null!=e?t.extractKey(e):null}var a=function(e){return t.multiEntry&&Wn(e)?e.forEach((function(e){return o.addKey(e)})):o.addKey(e)};(n||r).forEach((function(e,t){var o=n&&i(n[t]),u=r&&i(r[t]);0!==po(o,u)&&(null!=o&&a(o),null!=u&&a(u))}))}))}(c,i,t,v)}else if(h){var r={from:h.lower,to:h.upper};l.add(r),s.add(r)}else s.add(n),l.add(n),i.indexes.forEach((function(e){return c(e.name).add(n)}));return e}))}}),p=function(t){var n,r,o=t.query,i=o.index,a=o.range;return[i,new Co(null!==(n=a.lower)&&void 0!==n?n:e.MIN_KEY,null!==(r=a.upper)&&void 0!==r?r:e.MAX_KEY)]},h={get:function(e){return[a,new Co(e.key)]},getMany:function(e){return[a,(new Co).addKeys(e.keys)]},count:p,query:p,openCursor:p};return zn(h).forEach((function(e){d[e]=function(i){var a=Vr.subscr;if(a){var d=function(e){var n="idb://".concat(t,"/").concat(r,"/").concat(e);return a[n]||(a[n]=new Co)},p=d(""),v=d(":dels"),y=f(h[e](i),2),m=y[0],g=y[1];if(d(m.name||"").add(g),!m.isPrimaryKey){if("count"!==e){var b="query"===e&&c&&i.values&&o.query(l(s({},i),{values:!1}));return o[e].apply(this,arguments).then((function(t){if("query"===e){if(c&&i.values)return b.then((function(e){var n=e.result;return p.addKeys(n),t}));var n=i.values?t.result.map(u):t.result;i.values?p.addKeys(n):v.addKeys(n)}else if("openCursor"===e){var r=t,o=i.values;return r&&Object.create(r,{key:{get:function(){return v.addKey(r.primaryKey),r.key}},primaryKey:{get:function(){var e=r.primaryKey;return v.addKey(e),e}},value:{get:function(){return o&&p.addKey(r.primaryKey),r.value}}})}return t}))}v.add(n)}}return o[e].apply(this,arguments)}})),d}})}},ko=function(){function e(t,n){var r=this;o(this,e),this._middlewares={},this.verno=0;var i=e.dependencies;this._options=n=s({addons:e.addons,autoOpen:!0,indexedDB:i.indexedDB,IDBKeyRange:i.IDBKeyRange},n),this._deps={indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange};var a=n.addons;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var u,c={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:te,dbReadyPromise:null,cancelOpen:te,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};c.dbReadyPromise=new le((function(e){c.dbReadyResolve=e})),c.openCanceller=new le((function(e,t){c.cancelOpen=t})),this._state=c,this.name=t,this.on=Ue(this,"populate","blocked","versionchange","close",{ready:[se,te]}),this.on.ready.subscribe=F(this.on.ready.subscribe,(function(t){return function(n,o){e.vip((function(){var e=r._state;if(e.openComplete)e.dbOpenError||le.resolve().then(n),o&&t(n);else if(e.onReadyBeingFired)e.onReadyBeingFired.push(n),o&&t(n);else{t(n);var i=r;o||t((function e(){i.on.ready.unsubscribe(n),i.on.ready.unsubscribe(e)}))}}))}})),this.Collection=(u=this,Be(ho.prototype,(function(e,t){this.db=u;var n=lo,r=null;if(t)try{n=t()}catch(e){r=e}var o=e._ctx,i=o.table,a=i.hook.reading.fire;this._ctx={table:i,index:o.index,isPrimKey:!o.index||i.schema.primKey.keyPath&&o.index===i.schema.primKey.name,range:n,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:r,or:o.or,valueMapper:a!==ne?a:null}}))),this.Table=function(e){return Be(fo.prototype,(function(t,n,r){this.db=e,this._tx=r,this.name=t,this.schema=n,this.hook=e._allTables[t]?e._allTables[t].hook:Ue(null,{creating:[ie,te],reading:[re,ne],updating:[ue,te],deleting:[ae,te]})}))}(this),this.Transaction=function(e){return Be(go.prototype,(function(t,n,r,o,i){var a=this;this.db=e,this.mode=t,this.storeNames=n,this.schema=r,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=Ue(this,"complete","error","abort"),this.parent=i||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new le((function(e,t){a._resolve=e,a._reject=t})),this._completion.then((function(){a.active=!1,a.on.complete.fire()}),(function(e){var t=a.active;return a.active=!1,a.on.error.fire(e),a.parent?a.parent._reject(e):t&&a.idbtrans&&a.idbtrans.abort(),to(e)}))}))}(this),this.Version=function(e){return Be(So.prototype,(function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=function(e){return Be(yo.prototype,(function(t,n,r){this.db=e,this._ctx={table:t,index:":id"===n?null:n,or:r};var o=e._deps.indexedDB;if(!o)throw new Sr.MissingAPI;this._cmp=this._ascending=o.cmp.bind(o),this._descending=function(e,t){return o.cmp(t,e)},this._max=function(e,t){return o.cmp(e,t)>0?e:t},this._min=function(e,t){return o.cmp(e,t)<0?e:t},this._IDBKeyRange=e._deps.IDBKeyRange}))}(this),this.on("versionchange",(function(e){e.newVersion>0?console.warn("Another connection wants to upgrade database '".concat(r.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(r.name,"'. Closing db now to resume the delete request.")),r.close()})),this.on("blocked",(function(e){!e.newVersion||e.newVersion<e.oldVersion?console.warn("Dexie.delete('".concat(r.name,"') was blocked")):console.warn("Upgrade '".concat(r.name,"' blocked by other connection holding version ").concat(e.oldVersion/10))})),this._maxKey=bo(n.IDBKeyRange),this._createTransaction=function(e,t,n,o){return new r.Transaction(e,t,n,r._options.chromeTransactionDurability,o)},this._fireOnBlocked=function(e){r.on("blocked").fire(e),io.filter((function(e){return e.name===r.name&&e!==r&&!e._state.vcFired})).map((function(t){return t.on("versionchange").fire(e)}))},this.use(Eo),this.use(jo),this.use(To),this.use(xo),this.vip=Object.create(this,{_vip:{value:!0}}),a.forEach((function(e){return e(r)}))}return a(e,[{key:"version",value:function(e){if(isNaN(e)||e<.1)throw new Sr.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new Sr.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);var t=this._versions,n=t.filter((function(t){return t._cfg.version===e}))[0];return n||(n=new this.Version(e),t.push(n),t.sort(ht),n.stores({}),this._state.autoSchema=!1,n)}},{key:"_whenReady",value:function(e){var t=this;return this.idbdb&&(this._state.openComplete||Vr.letThrough||this._vip)?e():new le((function(e,n){if(t._state.openComplete)return n(new Sr.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._options.autoOpen)return void n(new Sr.DatabaseClosed);t.open().catch(te)}t._state.dbReadyPromise.then(e,n)})).then(e)}},{key:"use",value:function(e){var t=e.stack,n=e.create,r=e.level,o=e.name;o&&this.unuse({stack:t,name:o});var i=this._middlewares[t]||(this._middlewares[t]=[]);return i.push({stack:t,create:n,level:null==r?10:r,name:o}),i.sort((function(e,t){return e.level-t.level})),this}},{key:"unuse",value:function(e){var t=e.stack,n=e.name,r=e.create;return t&&this._middlewares[t]&&(this._middlewares[t]=this._middlewares[t].filter((function(e){return r?e.create!==r:!!n&&e.name!==n}))),this}},{key:"open",value:function(){return function(e){var t=e._state,n=e._deps.indexedDB;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then((function(){return t.dbOpenError?to(t.dbOpenError):e}));dr&&(t.openCanceller._stackHolder=vr()),t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;var r=t.openCanceller;function o(){if(t.openCanceller!==r)throw new Sr.DatabaseClosed("db.open() was cancelled")}var i=t.dbReadyResolve,a=null,u=!1;return le.race([r,("undefined"==typeof navigator?le.resolve():Et()).then((function(){return new le((function(r,i){if(o(),!n)throw new Sr.MissingAPI;var c=e.name,s=t.autoSchema?n.open(c):n.open(c,Math.round(10*e.verno));if(!s)throw new Sr.MissingAPI;s.onerror=rt(i),s.onblocked=Oe(e._fireOnBlocked),s.onupgradeneeded=Oe((function(r){if(a=s.transaction,t.autoSchema&&!e._options.allowEmptyDB){s.onerror=ot,a.abort(),s.result.close();var o=n.deleteDatabase(c);o.onsuccess=o.onerror=Oe((function(){i(new Sr.NoSuchDatabase("Database ".concat(c," doesnt exist")))}))}else{a.onerror=rt(i);var l=r.oldVersion>Math.pow(2,62)?0:r.oldVersion;u=l<1,e._novip.idbdb=s.result,function(e,t,n,r){var o=e._dbSchema,i=e._createTransaction("readwrite",e._storeNames,o);i.create(n),i._completion.catch(r);var a=i._reject.bind(i),u=Vr.transless||Vr;Ee((function(){Vr.trans=i,Vr.transless=u,0===t?(zn(o).forEach((function(e){yt(n,e,o[e].primKey,o[e].indexes)})),ft(e,n),le.follow((function(){return e.on.populate.fire(i)})).catch(a)):function(e,t,n,r){var o=e._novip,i=[],a=o._versions,u=o._dbSchema=gt(0,o.idbdb,r),c=!1;return a.filter((function(e){return e._cfg.version>=t})).forEach((function(e){i.push((function(){var i=u,a=e._cfg.dbschema;bt(o,i,r),bt(o,a,r),u=o._dbSchema=a;var s=vt(i,a);s.add.forEach((function(e){yt(r,e[0],e[1].primKey,e[1].indexes)})),s.change.forEach((function(e){if(e.recreate)throw new Sr.Upgrade("Not yet support for changing primary key");var t=r.objectStore(e.name);e.add.forEach((function(e){return mt(t,e)})),e.change.forEach((function(e){t.deleteIndex(e.name),mt(t,e)})),e.del.forEach((function(e){return t.deleteIndex(e)}))}));var l=e._cfg.contentUpgrade;if(l&&e._cfg.version>t){ft(o,r),n._memoizedTables={},c=!0;var f=K(a);s.del.forEach((function(e){f[e]=i[e]})),pt(o,[o.Transaction.prototype]),dt(o,[o.Transaction.prototype],zn(f),f),n.schema=f;var d,p=fr(l);p&&_e();var h=le.follow((function(){if((d=l(n))&&p){var e=je.bind(null,null);d.then(e,e)}}));return d&&"function"==typeof d.then?le.resolve(d):h.then((function(){return d}))}})),i.push((function(t){c&&uo||function(e,t){[].slice.call(t.db.objectStoreNames).forEach((function(n){return null==e[n]&&t.db.deleteObjectStore(n)}))}(e._cfg.dbschema,t),pt(o,[o.Transaction.prototype]),dt(o,[o.Transaction.prototype],o._storeNames,o._dbSchema),n.schema=o._dbSchema}))})),function e(){return i.length?le.resolve(i.shift()(n.idbtrans)).then(e):le.resolve()}().then((function(){var e,t;t=r,zn(e=u).forEach((function(n){t.db.objectStoreNames.contains(n)||yt(t,n,e[n].primKey,e[n].indexes)}))}))}(e,t,i,n).catch(a)}))}(e,l/10,a,i)}}),i),s.onsuccess=Oe((function(){a=null;var n,o=e._novip.idbdb=s.result,i=B(o.objectStoreNames);if(i.length>0)try{var l=o.transaction(1===(n=i).length?n[0]:n,"readonly");t.autoSchema?function(e,t,n){var r=e._novip;r.verno=t.version/10;var o=r._dbSchema=gt(0,t,n);r._storeNames=B(t.objectStoreNames,0),dt(r,[r._allTables],zn(o),o)}(e,o,l):(bt(e,e._dbSchema,l),function(e,t){var n=vt(gt(0,e.idbdb,t),e._dbSchema);return!(n.add.length||n.change.some((function(e){return e.add.length||e.change.length})))}(e,l)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),ft(e,l)}catch(e){}io.push(e),o.onversionchange=Oe((function(n){t.vcFired=!0,e.on("versionchange").fire(n)})),o.onclose=Oe((function(t){e.on("close").fire(t)})),u&&function(e,t){var n=e.indexedDB,r=e.IDBKeyRange;!St(n)&&"__dbnames"!==t&&wt(n,r).put({name:t}).catch(te)}(e._deps,c),r()}),i)}))}))]).then((function(){return o(),t.onReadyBeingFired=[],le.resolve(Ot((function(){return e.on.ready.fire(e.vip)}))).then((function n(){if(t.onReadyBeingFired.length>0){var r=t.onReadyBeingFired.reduce(se,te);return t.onReadyBeingFired=[],le.resolve(Ot((function(){return r(e.vip)}))).then(n)}}))})).finally((function(){t.onReadyBeingFired=null,t.isBeingOpened=!1})).then((function(){return e})).catch((function(n){t.dbOpenError=n;try{a&&a.abort()}catch(e){}return r===t.openCanceller&&e._close(),to(n)})).finally((function(){t.openComplete=!0,i()}))}(this)}},{key:"_close",value:function(){var e=this._state,t=io.indexOf(this);if(t>=0&&io.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new le((function(t){e.dbReadyResolve=t})),e.openCanceller=new le((function(t,n){e.cancelOpen=n}))}},{key:"close",value:function(){this._close();var e=this._state;this._options.autoOpen=!1,e.dbOpenError=new Sr.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}},{key:"delete",value:function(){var e=this,t=arguments.length>0,n=this._state;return new le((function(r,o){var i=function(){e.close();var t=e._deps.indexedDB.deleteDatabase(e.name);t.onsuccess=Oe((function(){!function(e,t){var n=e.indexedDB,r=e.IDBKeyRange;!St(n)&&"__dbnames"!==t&&wt(n,r).delete(t).catch(te)}(e._deps,e.name),r()})),t.onerror=rt(o),t.onblocked=e._fireOnBlocked};if(t)throw new Sr.InvalidArgument("Arguments not allowed in db.delete()");n.isBeingOpened?n.dbReadyPromise.then(i):i()}))}},{key:"backendDB",value:function(){return this.idbdb}},{key:"isOpen",value:function(){return null!==this.idbdb}},{key:"hasBeenClosed",value:function(){var e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}},{key:"hasFailed",value:function(){return null!==this._state.dbOpenError}},{key:"dynamicallyOpened",value:function(){return this._state.autoSchema}},{key:"tables",get:function(){var e=this;return zn(this._allTables).map((function(t){return e._allTables[t]}))}},{key:"transaction",value:function(){var e=jt.apply(this,arguments);return this._transaction.apply(this,e)}},{key:"_transaction",value:function(e,t,n){var r=this,o=Vr.trans;o&&o.db===this&&-1===e.indexOf("!")||(o=null);var i,a,u=-1!==e.indexOf("?");e=e.replace("!","").replace("?","");try{if(a=t.map((function(e){var t=c(e,r.Table)?e.name:e;if("string"!=typeof t)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t})),"r"==e||"readonly"===e)i="readonly";else{if("rw"!=e&&"readwrite"!=e)throw new Sr.InvalidArgument("Invalid transaction mode: "+e);i="readwrite"}if(o){if("readonly"===o.mode&&"readwrite"===i){if(!u)throw new Sr.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");o=null}o&&a.forEach((function(e){if(o&&-1===o.storeNames.indexOf(e)){if(!u)throw new Sr.SubTransaction("Table "+e+" not included in parent transaction.");o=null}})),u&&o&&!o.active&&(o=null)}}catch(e){return o?o._promise(null,(function(t,n){n(e)})):to(e)}var s=Oo.bind(null,this,i,a,o,n);return o?o._promise(i,s,"lock"):Vr.trans?ke(Vr.transless,(function(){return r._whenReady(s)})):this._whenReady(s)}},{key:"table",value:function(e){if(!M(this._allTables,e))throw new Sr.InvalidTable("Table ".concat(e," does not exist"));return this._allTables[e]}}]),e}(),Io="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable",Ro=function(){function e(t){o(this,e),this._subscribe=t}return a(e,[{key:"subscribe",value:function(e,t,n){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:n})}},{key:Io,value:function(){return this}}]),e}();try{Ao={indexedDB:$n.indexedDB||$n.mozIndexedDB||$n.webkitIndexedDB||$n.msIndexedDB,IDBKeyRange:$n.IDBKeyRange||$n.webkitIDBKeyRange}}catch(r){Ao={indexedDB:null,IDBKeyRange:null}}var Do=ko;N(Do,l(s({},Er),{delete:function(e){return new Do(e,{addons:[]}).delete()},exists:function(e){return new Do(e,{addons:[]}).open().then((function(e){return e.close(),!0})).catch("NoSuchDatabaseError",(function(){return!1}))},getDatabaseNames:function(e){try{return function(e){var t=e.indexedDB,n=e.IDBKeyRange;return St(t)?Promise.resolve(t.databases()).then((function(e){return e.map((function(e){return e.name})).filter((function(e){return"__dbnames"!==e}))})):wt(t,n).toCollection().primaryKeys()}(Do.dependencies).then(e)}catch(e){return to(new Sr.MissingAPI)}},defineClass:function(){return function(e){D(this,e)}},ignoreTransaction:function(e){return Vr.trans?ke(Vr.transless,e):e()},vip:Ot,async:function(e){return function(){try{var t=_t(e.apply(this,arguments));return t&&"function"==typeof t.then?t:le.resolve(t)}catch(e){return to(e)}}},spawn:function(e,t,n){try{var r=_t(e.apply(n,t||[]));return r&&"function"==typeof r.then?r:le.resolve(r)}catch(e){return to(e)}},currentTransaction:{get:function(){return Vr.trans||null}},waitFor:function(e,t){var n=le.resolve("function"==typeof e?Do.ignoreTransaction(e):e).timeout(t||6e4);return Vr.trans?Vr.trans.waitFor(n):n},Promise:le,debug:{get:function(){return dr},set:function(e){Z(e,"dexie"===e?function(){return!0}:so)}},derive:U,extend:D,props:N,override:F,Events:Ue,on:mo,liveQuery:function(e){return new Ro((function(t){var n=function(){return zn(a).some((function(e){return i[e]&&function(e,t){var n=Tt(t),r=n.next();if(r.done)return!1;for(var o=r.value,i=Tt(e),a=i.next(o.from),u=a.value;!r.done&&!a.done;){if(po(u.from,o.to)<=0&&po(u.to,o.from)>=0)return!0;po(o.from,u.from)<0?o=(r=n.next(u.from)).value:u=(a=i.next(o.from)).value}return!1}(i[e],a[e])}))},r=fr(e),o=!1,i={},a={},u={get closed(){return o},unsubscribe:function(){o=!0,mo.storagemutated.unsubscribe(l)}};t.start&&t.start(u);var c=!1,s=!1,l=function(e){Rt(i,e),n()&&f()},f=function(){if(!c&&!o){i={};var d={},p=function(t){r&&_e();var n=function(){return Ee(e,{subscr:t,trans:null})},o=Vr.trans?ke(Vr.transless,n):n();return r&&o.then(je,je),o}(d);s||(mo("storagemutated",l),s=!0),c=!0,Promise.resolve(p).then((function(e){c=!1,o||(n()?f():(i={},a=d,t.next&&t.next(e)))}),(function(e){c=!1,t.error&&t.error(e),u.unsubscribe()}))}};return f(),u}))},extendObservabilitySet:Rt,getByKeyPath:er,setByKeyPath:tr,delByKeyPath:function(e,t){"string"==typeof t?tr(e,t,void 0):"length"in t&&[].map.call(t,(function(t){tr(e,t,void 0)}))},shallowClone:K,deepClone:z,getObjectDiff:_o,cmp:po,asap:V,minKey:-1/0,addons:[],connections:io,errnames:br,dependencies:Ao,semVer:"3.2.3",version:"3.2.3".split(".").map((function(e){return parseInt(e)})).reduce((function(e,t,n){return e+t/Math.pow(10,2*n)}))})),Do.maxKey=bo(Do.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(mo("storagemutated",(function(e){var t;Mo||(ao?(t=document.createEvent("CustomEvent")).initCustomEvent("x-storagemutated-1",!0,!0,e):t=new CustomEvent("x-storagemutated-1",{detail:e}),Mo=!0,dispatchEvent(t),Mo=!1)})),addEventListener("x-storagemutated-1",(function(e){var t=e.detail;Mo||Dt(t)})));var Mo=!1;if("undefined"!=typeof BroadcastChannel){var No=new BroadcastChannel("x-storagemutated-1");"function"==typeof No.unref&&No.unref(),mo("storagemutated",(function(e){Mo||No.postMessage(e)})),No.onmessage=function(e){e.data&&Dt(e.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){mo("storagemutated",(function(e){try{Mo||("undefined"!=typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&d(self.clients.matchAll({includeUncontrolled:!0})).forEach((function(t){return t.postMessage({type:"x-storagemutated-1",changedParts:e})})))}catch(e){}})),"undefined"!=typeof addEventListener&&addEventListener("storage",(function(e){if("x-storagemutated-1"===e.key){var t=JSON.parse(e.newValue);t&&Dt(t.changedParts)}}));var Lo=self.document&&navigator.serviceWorker;Lo&&Lo.addEventListener("message",(function(e){var t=e.data;t&&"x-storagemutated-1"===t.type&&Dt(t.changedParts)}))}le.rejectionMapper=function(e,t){if(!e||c(e,X)||c(e,TypeError)||c(e,SyntaxError)||!e.name||!Or[e.name])return e;var n=new Or[e.name](t||e.message,e);return"stack"in e&&L(n,"stack",{get:function(){return this.inner.stack}}),n},Z(dr,so);var Uo=h(766),Bo=h(685);function Fo(e){return Fo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Fo(e)}function Ho(e,t){return Ho=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Ho(e,t)}var Vo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ho(e,t)}(n,e);var t=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Fo(e);if(t){var o=Fo(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":void 0===n?"undefined":p(n))&&"function"!=typeof t?Mt(e):t;var n}(this,n)}}(n);function n(){var e;return function(e,t){if(!c(e,t))throw new TypeError("Cannot call a class as a function")}(this,n),Nt(Mt(e=t.call(this,"EsmOffline")),"syncQueue",void 0),Nt(Mt(e),"dynamicOfflineData",void 0),e.version(4).stores({syncQueue:"++id,userId,type,[userId+type]",dynamicOfflineData:"++id,type,identifier,*users,&[type+identifier]"}),e.syncQueue=e.table("syncQueue"),e.dynamicOfflineData=e.table("dynamicOfflineData"),e}return n}(ko),Go=new Vo,Ko={},$o=(0,Bo.createGlobalStore)("offline-synchronization",{});function zo(){return zo=Ft((function(){var e,t,n,r,o,i,a,u,c,s,l,f,d;return Kt(this,(function(p){switch(p.label){case 0:return $o.getState().synchronization?[2]:[4,Go.syncQueue.count()];case 1:e=p.sent(),t={},n=Object.entries(Ko),r=n.length,o={},i=new AbortController,a=function(){var e,t,n=$o.getState().synchronization;$o.setState({synchronization:(e=Vt({},n),t={pendingCount:n.pendingCount-1},t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e)})},p.label=2;case 2:p.trys.push([2,,10,11]),$o.setState({synchronization:{totalCount:e,pendingCount:e,abortController:i}}),u=0,p.label=3;case 3:if(!(u<r&&n.length>0))return[3,8];c=n.length,p.label=4;case 4:return c--?(s=Gt(n[c],2),l=s[0],f=s[1],(d=f.dependsOn.map((function(e){return t[e]}))).every(Boolean)?(o[l]={},[4,Promise.all(d)]):[3,6]):[3,7];case 5:p.sent(),t[l]=function(e,t,n,r){return Wo.apply(this,arguments)}(f,o,i,a),n.splice(c,1),p.label=6;case 6:return[3,4];case 7:return u++,[3,3];case 8:return[4,Promise.allSettled(Object.values(t))];case 9:return p.sent(),[3,11];case 10:return $o.setState({synchronization:void 0}),[7];case 11:return[2]}}))})),zo.apply(this,arguments)}function Wo(){return Wo=Ft((function(e,t,n,r){var o,i,a,u,c,s,l,f,d,p,h,v,y,m,g,b,w;return Kt(this,(function(S){switch(S.label){case 0:return o=e.type,i=e.dependsOn,a=e.process,u=[],c=[],[4,Wt()];case 1:return s=S.sent(),[4,Go.syncQueue.where({type:o,userId:s}).each((function(e,t){u.push([t.primaryKey,e.content,e.descriptor]),c.push(e.content)}))];case 2:S.sent(),l=0,S.label=3;case 3:if(!(l<u.length))return[3,11];f=Gt(u[l],3),d=f[0],p=f[1],h=f[2],v=h.id,y=h.dependencies,m=void 0===y?[]:y,S.label=4;case 4:return S.trys.push([4,7,9,10]),[4,a(p,{abort:n,index:l,items:c,userId:s,dependencies:m.map((function(e){var n=e.id,r=e.type;return i.includes(r)?t[r][n]:void 0}))})];case 5:return g=S.sent(),void 0!==v&&(t[o][v]=g),[4,Go.syncQueue.delete(d)];case 6:return S.sent(),[3,10];case 7:return b=S.sent(),[4,Go.syncQueue.update(d,{lastError:{name:null==b?void 0:b.name,message:null!==(w=null==b?void 0:b.message)&&void 0!==w?w:null==b?void 0:b.toString()}})];case 8:return S.sent(),[3,10];case 9:return r(),[7];case 10:return l++,[3,3];case 11:return[2]}}))})),Wo.apply(this,arguments)}function qo(){return(qo=Ft((function(){var e;return Kt(this,(function(t){switch(t.label){case 0:return[4,(0,Uo.getLoggedInUser)()];case 1:return[2,(null==(e=t.sent())?void 0:e.uuid)||"*"]}}))}))).apply(this,arguments)}function Zo(){return(Zo=Ft((function(e,t,n,r){var o;return Kt(this,(function(i){switch(i.label){case 0:return void 0===(o=r&&r.id)?[3,2]:[4,Go.syncQueue.where({type:t,userId:e}).filter((function(e){return(null==e?void 0:e.descriptor.id)===o})).delete().catch(ko.errnames.DatabaseClosed)];case 1:i.sent(),i.label=2;case 2:return[4,Go.syncQueue.add({type:t,content:n,userId:e,descriptor:r||{},createdOn:new Date}).catch(ko.errnames.DatabaseClosed,(function(){return-1}))];case 3:return[2,i.sent()]}}))}))).apply(this,arguments)}function Yo(){return(Yo=Ft((function(e,t,n){return Kt(this,(function(r){switch(r.label){case 0:return[4,Wt()];case 1:return[4,qt(r.sent(),e,t,n)];case 2:return[2,r.sent()]}}))}))).apply(this,arguments)}function Xo(){return(Xo=Ft((function(e,t){return Kt(this,(function(n){switch(n.label){case 0:return[4,Xt(e,t)];case 1:return[2,n.sent().map((function(e){return e.content}))]}}))}))).apply(this,arguments)}function Jo(){return(Jo=Ft((function(e,t){var n;return Kt(this,(function(r){switch(r.label){case 0:return n=t?{type:t,userId:e}:{userId:e},[4,Go.syncQueue.where(n).toArray().catch(ko.errnames.DatabaseClosed,(function(){return[]}))];case 1:return[2,r.sent()]}}))}))).apply(this,arguments)}function Qo(){return(Qo=Ft((function(e){return Kt(this,(function(t){switch(t.label){case 0:return[4,Wt()];case 1:return[4,Yt(t.sent(),e)];case 2:return[2,t.sent()]}}))}))).apply(this,arguments)}function ei(){return(ei=Ft((function(e){return Kt(this,(function(t){switch(t.label){case 0:return[4,Wt()];case 1:return[4,Xt(t.sent(),e)];case 2:return[2,t.sent()]}}))}))).apply(this,arguments)}function ti(){return(ti=Ft((function(e){return Kt(this,(function(t){switch(t.label){case 0:return[4,Go.syncQueue.get(e).catch(ko.errnames.DatabaseClosed,(function(){}))];case 1:return[2,t.sent()]}}))}))).apply(this,arguments)}function ni(){return(ni=Ft((function(e){var t,n,r;return Kt(this,(function(o){switch(o.label){case 0:return[4,en(e)];case 1:if(!(n=o.sent()))throw new Error("No sync item with the ID ".concat(e," exists."));if(!(r=null===(t=Ko[n.type])||void 0===t?void 0:t.options.onBeginEditSyncItem))throw new Error("A sync item with the ID ".concat(e,' exists, but the associated handler (if one exists) doesn\'t support editing the item. You can avoid this error by either verifying that sync items of this type can be edited via the "canEditSynchronizationItemsOfType(type: string)" function or alternatively ensure that the synchronizaton handler for sync items of type "').concat(n.type,'" supports editing items.'));return r(n),[2]}}))}))).apply(this,arguments)}function ri(){return(ri=Ft((function(e){return Kt(this,(function(t){switch(t.label){case 0:return[4,Go.syncQueue.delete(e).catch(ko.errnames.DatabaseClosed)];case 1:return t.sent(),[2]}}))}))).apply(this,arguments)}for(var oi,ii={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},ai=new Uint8Array(16),ui=[],ci=0;ci<256;++ci)ui.push((ci+256).toString(16).slice(1));var si=function(e,t,n){if(ii.randomUUID&&!t&&!e)return ii.randomUUID();var r=(e=e||{}).random||(e.rng||an)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(ui[e[t+0]]+ui[e[t+1]]+ui[e[t+2]]+ui[e[t+3]]+"-"+ui[e[t+4]]+ui[e[t+5]]+"-"+ui[e[t+6]]+ui[e[t+7]]+"-"+ui[e[t+8]]+ui[e[t+9]]+"-"+ui[e[t+10]]+ui[e[t+11]]+ui[e[t+12]]+ui[e[t+13]]+ui[e[t+14]]+ui[e[t+15]]).toLowerCase()}(r)},li="OFFLINE+",fi={};function di(){return(di=fn((function(e){return dn(this,(function(t){switch(t.label){case 0:return[4,En()];case 1:return[4,yn(t.sent(),e)];case 2:return[2,t.sent()]}}))}))).apply(this,arguments)}function pi(){return(pi=fn((function(e,t){var n;return dn(this,(function(r){switch(r.label){case 0:return n=t?{type:t,users:e}:{users:e},[4,(new Vo).dynamicOfflineData.where(n).toArray().catch(ko.errnames.DatabaseClosed,(function(){return[]}))];case 1:return[2,r.sent()]}}))}))).apply(this,arguments)}function hi(){return(hi=fn((function(e,t){return dn(this,(function(n){switch(n.label){case 0:return[4,En()];case 1:return[4,gn(n.sent(),e,t)];case 2:return[2,n.sent()]}}))}))).apply(this,arguments)}function vi(){return vi=fn((function(e,t,n){var r,o;return dn(this,(function(i){switch(i.label){case 0:return[4,(r=new Vo).dynamicOfflineData.get({type:t,identifier:n}).catch(ko.errnames.DatabaseClosed,(function(){}))];case 1:return(o=i.sent())?[3,3]:[4,r.dynamicOfflineData.add({users:[e],type:t,identifier:n}).catch(ko.errnames.DatabaseClosed)];case 2:return i.sent(),[3,5];case 3:return o.users.includes(e)?[3,5]:[4,r.dynamicOfflineData.update(o.id,{users:(a=o.users,function(e){if(Array.isArray(e))return sn(e)}(a)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(a)||function(e,t){if(e){if("string"==typeof e)return sn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?sn(e,t):void 0}}(a)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([e])}).catch(ko.errnames.DatabaseClosed)];case 4:i.sent(),i.label=5;case 5:return[2]}var a}))})),vi.apply(this,arguments)}function yi(){return(yi=fn((function(e,t){return dn(this,(function(n){switch(n.label){case 0:return[4,En()];case 1:return[4,wn(n.sent(),e,t)];case 2:return[2,n.sent()]}}))}))).apply(this,arguments)}function mi(){return mi=fn((function(e,t,n){var r,o;return dn(this,(function(i){switch(i.label){case 0:return[4,(r=new Vo).dynamicOfflineData.get({type:t,identifier:n,users:e}).catch(ko.errnames.DatabaseClosed,(function(){}))];case 1:return(o=i.sent())?o.users.length>1?[4,r.dynamicOfflineData.update(o.id,{users:o.users.filter((function(t){return t!==e}))}).catch(ko.errnames.DatabaseClosed)]:[3,3]:[3,5];case 2:return i.sent(),[3,5];case 3:return[4,r.dynamicOfflineData.delete(o.id).catch(ko.errnames.DatabaseClosed)];case 4:i.sent(),i.label=5;case 5:return[2]}}))})),mi.apply(this,arguments)}function gi(){return gi=fn((function(e,t){var n;return dn(this,(function(r){switch(r.label){case 0:return[4,vn(e)];case 1:return n=r.sent(),[4,Promise.all(n.map((o=fn((function(e){return dn(this,(function(n){return[2,On(e.type,e.identifier,t)]}))})),function(e){return o.apply(this,arguments)})))];case 2:return r.sent(),[2]}var o}))})),gi.apply(this,arguments)}function bi(){return bi=fn((function(e,t,n){var r,o,i,a,u,c,s,l,f;return dn(this,(function(d){switch(d.label){case 0:return[4,mn(e,t)];case 1:return d.sent(),r=new Vo,[4,En()];case 2:return o=d.sent(),[4,r.dynamicOfflineData.get({type:e,identifier:t}).catch(ko.errnames.DatabaseClosed,(function(){}))];case 3:return i=d.sent(),a=pn().filter((function(t){return t.type===e})),i?[4,Promise.all(a.map((p=fn((function(e){var r,o,i;return dn(this,(function(a){try{return e.sync(t,n),[2,{id:e.id,error:void 0}]}catch(t){return i=null!==(o=null===(r=t.message)||void 0===r?void 0:r.toString())&&void 0!==o?o:t.toString(),[2,{id:e.id,error:i}]}return[2]}))})),function(e){return p.apply(this,arguments)})))]:[2];case 4:return u=d.sent(),c=u.filter((function(e){return!e.error})).map((function(e){return e.id})),s=u.filter((function(e){return e.error})).map((function(e){return e.id})),l=u.filter((function(e){return e.error})).map((function(e){return{handlerId:e.id,message:e.error}})),f={syncedOn:new Date,syncedBy:o,succeededHandlers:c,erroredHandlers:s,errors:l},i.id?[4,r.dynamicOfflineData.update(i.id,{syncState:f}).catch(ko.errnames.DatabaseClosed)]:[3,6];case 5:d.sent(),d.label=6;case 6:return[2]}var p}))})),bi.apply(this,arguments)}function wi(){return(wi=fn((function(){var e;return dn(this,(function(t){switch(t.label){case 0:return[4,(0,Uo.getLoggedInUser)()];case 1:if(!(e=t.sent().uuid))throw new Error("Using the dynamic offline data API requires a logged in user.");return[2,e]}}))}))).apply(this,arguments)}var Si=(0,Bo.createGlobalStore)("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});function Oi(){return Oi=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){_n(i,r,o,a,u,"next",e)}function u(e){_n(i,r,o,a,u,"throw",e)}a(void 0)}))}}((function(e){return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}(this,(function(t){switch(t.label){case 0:return Pn(),[4,On("patient",e)];case 1:return t.sent(),[2]}}))})),Oi.apply(this,arguments)}}(),v}())}}}))},3584:(e,t,n)=>{function r(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function o(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}e=n.nmd(e),System.register(["react","@openmrs/esm-navigation","@openmrs/esm-extensions","@openmrs/esm-globals","@openmrs/esm-api","react-dom","react-i18next","swr","@openmrs/esm-config","dayjs"],(function(i,a){var u={},c={},s={},l={},f={},d={},p={},h={},v={},y={};return Object.defineProperty(d,"__esModule",{value:!0}),{setters:[function(e){u.Suspense=e.Suspense,u.default=e.default,u.useCallback=e.useCallback,u.useContext=e.useContext,u.useEffect=e.useEffect,u.useMemo=e.useMemo,u.useReducer=e.useReducer,u.useRef=e.useRef,u.useState=e.useState},function(e){c.interpolateUrl=e.interpolateUrl,c.navigate=e.navigate},function(e){s.getConnectedExtensions=e.getConnectedExtensions,s.getExtensionInternalStore=e.getExtensionInternalStore,s.getExtensionStore=e.getExtensionStore,s.registerExtensionSlot=e.registerExtensionSlot,s.renderExtension=e.renderExtension},function(e){l.subscribeConnectivityChanged=e.subscribeConnectivityChanged},function(e){f.attachmentUrl=e.attachmentUrl,f.defaultVisitCustomRepresentation=e.defaultVisitCustomRepresentation,f.fetchCurrentPatient=e.fetchCurrentPatient,f.getCurrentUser=e.getCurrentUser,f.getLocations=e.getLocations,f.getSessionStore=e.getSessionStore,f.getVisitStore=e.getVisitStore,f.getVisitTypes=e.getVisitTypes,f.openmrsFetch=e.openmrsFetch,f.userHasAccess=e.userHasAccess},function(e){Object.keys(e).forEach((function(t){d[t]=e[t]}))},function(e){p.I18nextProvider=e.I18nextProvider},function(e){h.SWRConfig=e.SWRConfig,h.default=e.default},function(e){v.getConfigStore=e.getConfigStore,v.getExtensionConfigFromStore=e.getExtensionConfigFromStore,v.getExtensionsConfigStore=e.getExtensionsConfigStore},function(e){y.default=e.default}],execute:function(){i(function(){var i={332:function(e){e.exports=function(){"use strict";return function(e,t,n){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=n();return this.format(e)===t.format(e)}}}()},645:function(e,t,n){"use strict";var r=n(493);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},570:function(){System.register(["@openmrs/esm-state"],(function(e,t){var n={};return{setters:[function(e){n.getGlobalStore=e.getGlobalStore}],execute:function(){e(function(){"use strict";var e={685:function(e){e.exports=n}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return function(){var e=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},t=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},n=function(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(n){t(e,n,r[n])}))}return e},i=function(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e},a=function(e,r,o){var a;d.setState((function(u){var c;return{flags:i(n({},u.flags),t({},e,{enabled:null!==(a=null===(c=u.flags[e])||void 0===c?void 0:c.enabled)&&void 0!==a&&a,label:r,description:o}))}}))},u=function(e){return d.getState().flags[e].enabled},c=function(e,t){d.subscribe((function(n){t(n.flags[e].enabled)}))},s=function(e,r){d.setState((function(o){return{flags:i(n({},o.flags),t({},e,i(n({},o.flags[e]),{enabled:r})))}}))};r.r(o),r.d(o,{featureFlagsStore:function(){return d},getFeatureFlag:function(){return u},registerFeatureFlag:function(){return a},setFeatureFlag:function(){return s},subscribeToFeatureFlag:function(){return c}});var l=r(685),f={flags:function(){var e={},t=!0,r=!1,o=void 0;try{for(var i,a=Object.keys(localStorage)[Symbol.iterator]();!(t=(i=a.next()).done);t=!0){var u=i.value;if(u.startsWith("openmrs:feature-flag:")){var c=u.replace("openmrs:feature-flag:",""),s=JSON.parse(localStorage.getItem("openmrs:feature-flag-meta:".concat(c))||"{}");e[c]=n({enabled:"true"===localStorage.getItem(u)},s)}}}catch(e){r=!0,o=e}finally{try{t||null==a.return||a.return()}finally{if(r)throw o}}return e}()},d=(0,l.getGlobalStore)("feature-flags",f);d.subscribe((function(t){var n,r=!0,o=!1,i=void 0;try{for(var a,u=Object.entries(t.flags)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=function(e){if(Array.isArray(e))return e}(n=a.value)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(n)||function(t,n){if(t){if("string"==typeof t)return e(t,2);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,2):void 0}}(n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),s=c[0],l=c[1];localStorage.setItem("openmrs:feature-flag:".concat(s),l.enabled.toString()),localStorage.setItem("openmrs:feature-flag-meta:".concat(s),JSON.stringify({label:l.label,description:l.description}))}}catch(t){o=!0,i=t}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}))}(),o}())}}}))},385:function(){System.register([],(function(e,t){return{execute:function(){e(function(){"use strict";var e=function(e,t){var n=u[e];if(n)return n.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):n.value.setState(t,!0),n.active=!0,n.value;var r=a()((function(){return t}));return u[e]={value:r,active:!0},r},t=function(e,t){var n=u[e];if(!n){var r=a()((function(){return null!=t?t:{}}));return u[e]={value:r,active:!1},r}return n.value},n=function(e,t,n){var r=t(e.getState());return e.subscribe((function(e){var o=t(e);o!==r&&(r=o,n(o))}))},r={d:function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},o={};r.r(o),r.d(o,{createGlobalStore:function(){return e},getGlobalStore:function(){return t},subscribeTo:function(){return n}});var i=function(e){var t,n=new Set,r=function(e,r){var o="function"==typeof e?e(t):e;if(!Object.is(o,t)){var i=t;t=(null!=r?r:"object"!=typeof o)?o:Object.assign({},t,o),n.forEach((function(e){return e(t,i)}))}},o=function(){return t},i={setState:r,getState:o,subscribe:function(e){return n.add(e),function(){return n.delete(e)}},destroy:function(){console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return t=e(r,o,i),i},a=function(e){return e?i(e):i},u={};return setTimeout((function(){"development"===window.spaEnv&&(window.stores=u)}),1e3),o}())}}}))},766:function(e){"use strict";e.exports=f},824:function(e){"use strict";e.exports=v},45:function(e){"use strict";e.exports=s},728:function(e){"use strict";e.exports=l},513:function(e){"use strict";e.exports=c},688:function(e){"use strict";e.exports=y},954:function(e){"use strict";e.exports=u},493:function(e){"use strict";e.exports=d},281:function(e){"use strict";e.exports=p},725:function(e){"use strict";e.exports=h}},a={};function m(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={exports:{}};return i[e].call(n.exports,n,n.exports,m),n.exports}m.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return m.d(t,{a:t}),t},m.d=function(e,t){for(var n in t)m.o(t,n)&&!m.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},m.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},m.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var g={};return function(){"use strict";var i=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},a=function(e){var t=e.to,n=e.templateParams,r=e.onBeforeNavigate,o=e.children,a=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["to","templateParams","onBeforeNavigate","children"]);return(0,Ue.useEffect)((function(){a.href&&console.warn("ConfigurableLink does not support the href prop. Use the 'to' prop instead. The provided href value is '".concat(a.href,"'")),a.onClick&&console.warn("ConfigurableLink does not support the onClick prop. Use the 'onBeforeNavigate' prop instead. The 'to' prop of the offending link is ".concat(t))}),[]),Ue.default.createElement("a",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){i(e,t,n[t])}))}return e}({onClick:function(e){return function(e,t,n,r){0!==e.button||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey||(e.preventDefault(),null==r||r(e),(0,Fe.navigate)({to:t,templateParams:n})),0===e.button&&(e.ctrlKey||e.metaKey)&&(null==r||r(e)),0===e.button&&e.shiftKey&&(null==r||r(e)),1===e.button&&(null==r||r(e))}(e,t,n,r)},href:(0,Fe.interpolateUrl)(t,n)},a),o)},u=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},c=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},s=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){c(e,t,n[t])}))}return e},l=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},f=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,Ue.useState)(window.navigator.onLine))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return l(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,2):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=t[0],r=t[1];return(0,Ue.useEffect)((function(){return(0,Ge.subscribeConnectivityChanged)((function(e){var t=e.online;return r(t)}))}),[]),n},d=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},p=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},h=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){p(e,t,n[t])}))}return e},v=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||b(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},y=function(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||b(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},b=function(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}},w=function(e,t){var n=function(n){r[n]=function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];e.setState((function(e){var r,i=[e].concat(y(o));return(r=t)[n].apply(r,y(i))}))}};"function"==typeof t&&(t=t(e));var r={};for(var o in t)n(o);return r},S=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$e,n=arguments.length>2?arguments[2]:void 0,r=v((0,Ue.useState)((function(){return t(e.getState())})),2),o=r[0],i=r[1];return(0,Ue.useEffect)((function(){return(0,Ke.subscribeTo)(e,t,i)}),[e,t]),h({},o,(0,Ue.useMemo)((function(){return n?w(e,n):{}}),[e,n]))},O=function(e,t){return S(e,$e,t)},E=function(e){return function(t){var n=v((0,Ue.useState)(e.getState()),2),r=n[0],o=n[1];return(0,Ue.useEffect)((function(){return e.subscribe((function(e){return o(e)}))}),[]),h({},r,(0,Ue.useMemo)((function(){return t?w(e,t):{}}),[t]))}},_=function(e){var t=ze().slots;return(0,Ue.useMemo)((function(){var n,r;return null!==(r=null===(n=t[e])||void 0===n?void 0:n.assignedExtensions)&&void 0!==r?r:[]}),[t,e])},j=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},x=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return j(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?j(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},C=function(e){var t=f(),n=_(e),r=S(We.featureFlagsStore),o=(0,Ue.useMemo)((function(){return Object.entries(r.flags).filter((function(e){return x(e,2)[1].enabled})).map((function(e){return x(e,1)[0]}))}),[r.flags]);return(0,Ue.useMemo)((function(){return(0,He.getConnectedExtensions)(n,t,o)}),[n,t,o])},P=function(e){var t=(0,Ue.useContext)(Be).moduleName;if(!t)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,Ue.useEffect)((function(){(0,He.registerExtensionSlot)(t,e)}),[]),{extensions:C(e),extensionSlotName:e,extensionSlotModuleName:t}},A=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},T=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){A(e,t,n[t])}))}return e},k=function(e){return e},I=function(e){var t=e.name,n=e.extensionSlotName,r=e.select,o=void 0===r?k:r,i=e.children,a=e.state,u=e.style,c=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["name","extensionSlotName","select","children","state","style"]);if(i&&a)throw new Error("Both children and state have been provided. If children are provided, the state must be passed as a prop to the `Extension` component.");var s,l,f,d,p=null!=t?t:n,h=(0,Ue.useRef)(null),v=P(p),y=v.extensions,m=v.extensionSlotModuleName,g=(0,Ue.useMemo)((function(){return o(y)}),[o,y]),b=(0,Ue.useMemo)((function(){if("function"==typeof i&&!Ue.default.isValidElement(i))return g.map((function(e){return i(e)}))}),[i,g]);return Ue.default.createElement("div",T({ref:h,"data-extension-slot-name":p,"data-extension-slot-module-name":m,style:(f=T({},u),d={position:"relative"},d=null!=d?d:{},Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(d)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(d)).forEach((function(e){Object.defineProperty(f,e,Object.getOwnPropertyDescriptor(d,e))})),f)},c),p&&g.map((function(e,t){return Ue.default.createElement(Be.Provider,{key:e.id,value:{moduleName:m,extension:{extensionId:e.id,extensionSlotName:p,extensionSlotModuleName:m}}},null!==(l=null!==(s=null==b?void 0:b[t])&&void 0!==s?s:"function"!=typeof i?i:null)&&void 0!==l?l:Ue.default.createElement(Ve,{state:a}))})))},R=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},D=function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n},M=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach((function(t){N(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e},N=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},L=function(e,t){var n;if("function"!=typeof(n=t.domElement?function(){return t.domElement}:t.domElementGetter?t.domElementGetter:e.domElementGetter?e.domElementGetter:function(e){var t=e.appName||e.name;if(!t)throw Error("single-spa's dom-element-getter-helpers was not given an application name as a prop, so it can't make a unique dom element container for the react application");var n="single-spa-application:".concat(t);return function(){var e=document.getElementById(n);return e||((e=document.createElement("div")).id=n,document.body.appendChild(e)),e}}(t)))throw Error("single-spa's dom-element-getter-helpers was given an invalid domElementGetter for application or parcel '".concat(t.name,"'. Expected a function, received ").concat(Je(n)));return function(){var e=n(t);if(!r(e,HTMLElement))throw Error("single-spa's dom-element-getter-helpers: domElementGetter returned an invalid dom element for application or parcel '".concat(t.name,"'. Expected HTMLElement, received ").concat(Je(e)));return e}},U=function(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then((function(t){e.rootComponent=t}))},B=function(e,t){return new Promise((function(n,r){e.suppressComponentDidCatchWarning||!function(e){if(!(e&&"string"==typeof e.version&&e.version.indexOf(".")>=0))return!1;var t=e.version.slice(0,e.version.indexOf("."));try{return Number(t)>=16}catch(e){return!1}}(e.React)||e.errorBoundary||e.errorBoundaryClass||(e.rootComponent.prototype?e.rootComponent.prototype.componentDidCatch||console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire single-spa application.")):console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent does not implement an error boundary. If using a functional component, consider providing an opts.errorBoundary to singleSpaReact(opts).")));var o=K(e,t,(function(){n(this)})),i=L(e,t)(),a=function(e){var t=e.renderType,n=e.elementToRender,r=e.domElement,o=e.reactDom[t];if("function"!=typeof o)throw new Error('renderType "'.concat(t,'" did not return a function.'));switch(t){case"createRoot":case"unstable_createRoot":case"createBlockingRoot":case"unstable_createBlockingRoot":var i=o(r);return i.render(n),i;case"hydrateRoot":return o(r,n);default:return o(n,r),null}}({elementToRender:o,domElement:i,reactDom:V(e),renderType:G(e)});e.domElements[t.name]=i,e.renderResults[t.name]=a}))},F=function(e,t){return new Promise((function(n){e.unmountResolves[t.name]=n;var r=e.renderResults[t.name];r&&r.unmount?r.unmount():V(e).unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]}))},H=function(e,t){return new Promise((function(n){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(n);var r=K(e,t,null),o=e.renderResults[t.name];if(o&&o.render)o.render(r);else{var i=L(e,t)();V(e).render(r,i)}}))},V=function(e){return e.ReactDOMClient||e.ReactDOM},G=function(e){return"function"==typeof e.renderType?e.renderType():e.renderType},K=function(e,t,n){var r=e.React.createElement(e.rootComponent,t),o=Qe?e.React.createElement(Qe.Provider,{value:t},r):r;return(e.errorBoundary||t.errorBoundary||e.errorBoundaryClass||t.errorBoundaryClass)&&(e.errorBoundaryClass=e.errorBoundaryClass||t.errorBoundaryClass||function(e,t){function n(t){e.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},n.displayName="SingleSpaReactErrorBoundary(".concat(t.name,")")}return n.prototype=Object.create(e.React.Component.prototype),n.prototype.render=function(){return this.state.caughtError?(e.errorBoundary||t.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},n.prototype.componentDidCatch=function(e,t){this.setState({caughtError:e,caughtErrorInfo:t})},n}(e,t),o=e.React.createElement(e.errorBoundaryClass,t,o)),e.React.createElement(e.SingleSpaRoot,M(M({},t),{},{mountFinished:n,updateFinished:function(){e.updateResolves[t.name]&&(e.updateResolves[t.name].forEach((function(e){return e()})),delete e.updateResolves[t.name])},unmountFinished:function(){e.unmountResolves[t.name]&&(e.unmountResolves[t.name](),delete e.unmountResolves[t.name])}}),o)},$=function(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw new Error("Invalid options");var t=Object.assign({},it,e);return function(e){var n,i,a,u;return i=n=function(n){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ot(e,t)}(u,n);var i,a=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=rt(e);if(t){var i=rt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":void 0===n?"undefined":o(n))&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t;var n}(this,n)}}(u);function u(e){var n;return function(e,t){if(!r(e,t))throw new TypeError("Cannot call a class as a function")}(this,u),(n=a.call(this,e)).state={caughtError:null,caughtErrorInfo:null,config:{moduleName:t.moduleName,extension:e._extensionContext}},n}return(i=[{key:"componentDidCatch",value:function(e,n){n&&n.componentStack&&(e.extra=Object.assign(e.extra||{},{componentStack:n.componentStack})),t.throwErrorsToConsole&&setTimeout((function(){throw e})),this.setState({caughtError:e,caughtErrorInfo:n})}},{key:"render",value:function(){if(this.state.caughtError)return Ue.default.createElement("div",null,"An error has occurred. Please try reloading the page.");var n=Ue.default.createElement(Ue.Suspense,{fallback:null},Ue.default.createElement(nt.SWRConfig,{value:at},Ue.default.createElement(Be.Provider,{value:this.state.config},t.disableTranslations?Ue.default.createElement(e,this.props):Ue.default.createElement(tt.I18nextProvider,{i18n:window.i18next,defaultNS:t.moduleName},Ue.default.createElement(e,this.props)))));return t.strictMode||!Ue.default.StrictMode?n:Ue.default.createElement(Ue.default.StrictMode,null,n)}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(u.prototype,i),u}(Ue.default.Component),a="displayName",u="OpenmrsReactComponent(".concat(t.featureName,")"),a in i?Object.defineProperty(i,a,{value:u,enumerable:!0,configurable:!0,writable:!0}):i[a]=u,n}},z=function(e,t){return function(e){if("object"!==Xe(e))throw new Error("single-spa-react requires a configuration object");var t,n=M(M({},et),e);if(!n.React)throw new Error("single-spa-react must be passed opts.React");if(!n.ReactDOM&&!n.ReactDOMClient)throw new Error("single-spa-react must be passed opts.ReactDOM or opts.ReactDOMClient");if(n.renderType||(null!==(t=n.ReactDOMClient)&&void 0!==t&&t.createRoot?n.renderType="createRoot":n.renderType="render"),!n.rootComponent&&!n.loadRootComponent)throw new Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(n.errorBoundary&&"function"!=typeof n.errorBoundary)throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!Qe&&n.React.createContext&&(Qe=n.React.createContext()),n.SingleSpaRoot=function(e){function t(e){t.displayName="SingleSpaRoot(".concat(e.name,")")}return t.prototype=Object.create(e.React.Component.prototype),t.prototype.componentDidMount=function(){setTimeout(this.props.mountFinished)},t.prototype.componentWillUnmount=function(){setTimeout(this.props.unmountFinished)},t.prototype.render=function(){return setTimeout(this.props.updateFinished),this.props.children},t}(n);var r={bootstrap:U.bind(null,n),mount:B.bind(null,n),unmount:F.bind(null,n)};return n.parcelCanUpdate&&(r.update=H.bind(null,n)),r}({React:Ue.default,ReactDOMClient:Ye,rootComponent:$(t)(e)})},W=function(e,t){return function(){return e().then((function(e){return z(e.default,t)}))}},q=function(e,t){return function(){return Promise.resolve(z(e,t))}},Z=function(){var e=(0,Ue.useRef)();return e.current&&!e.current.signal.aborted||(e.current=new AbortController),(0,Ue.useEffect)((function(){var t=e.current;return function(){return null==t?void 0:t.abort()}}),[]),e.current},Y=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},X=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},J=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},Q=function(e){var t=this.__data__=new pt(e);this.size=t.size},ee=function(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Kt;++t<n;)this.add(e[t])},te=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},ne=function(e){var t,n=function(e){if(Array.isArray(e))return e}(t=(0,Ue.useState)([]))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return te(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?te(e,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=n[0],o=n[1];return(0,Ue.useEffect)((function(){return(0,He.getExtensionStore)().subscribe((function(t){var n,i,a=null!==(i=null===(n=t.slots[e])||void 0===n?void 0:n.assignedExtensions.map((function(e){return e.id})))&&void 0!==i?i:[];nr(a,r)||o(a)}))}),[]),r},re=function(e,t){var n,r=(0,nt.default)("".concat(qe.attachmentUrl,"?patient=").concat(e,"&includeEncounterless=").concat(t),qe.openmrsFetch),o=r.data,i=r.error,a=r.mutate,u=r.isLoading,c=r.isValidating;return(0,Ue.useMemo)((function(){return{isLoading:u,data:null!==(n=null==o?void 0:o.data.results)&&void 0!==n?n:[],error:i,mutate:a,isValidating:c}}),[o,i,u,c,a])},oe=function(e){(0,Ue.useEffect)((function(){if(e){var t=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",function(){document.body.style.overflow=t}}}),[e])},ie=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},ae=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},ue=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){ae(e,t,n[t])}))}return e},ce=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ie(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ie(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},se=function(e){var t,n=(0,Ue.useContext)(Be),r=n.moduleName,o=n.extension,i=null!==(t=null==e?void 0:e.externalModuleName)&&void 0!==t?t:r;if(!i&&!o)throw Error(ir);var a=function(e){var t=(0,Ue.useMemo)((function(){return(0,rr.getConfigStore)(e)}),[e]),n=e,r=function(e){var t=ce((0,Ue.useState)(function(e){return function(){var t=e.getState();return t.loaded&&t.config?t.config:null}}(e)),2),n=t[0],r=t[1];return(0,Ue.useEffect)((function(){return null==e?void 0:e.subscribe((function(e){e.loaded&&e.config&&r(e.config)}))}),[e]),n}(t);if(!r)throw or[n]||(or[n]=function(e){return new Promise((function(t){var n=e.subscribe((function(e){e.loaded&&e.config&&(t(e.config),n())}))}))}(t)),or[n];return r}(i),u=function(e){var t=(0,Ue.useMemo)(rr.getExtensionsConfigStore,[]),n=function(e,t){var n=ce((0,Ue.useState)(function(e,t){return t?function(){var n=e.getState(),r=(0,rr.getExtensionConfigFromStore)(n,t.extensionSlotName,t.extensionId);if(r.loaded&&r.config)return r.config}:null}(e,t)),2),r=n[0],o=n[1];return(0,Ue.useEffect)((function(){if(t)return e.subscribe((function(e){var n=(0,rr.getExtensionConfigFromStore)(e,t.extensionSlotName,t.extensionId);n.loaded&&n.config&&!nr(n.config,r)&&o(n.config)}))}),[e,t,r]),r}(t,e);if(!n&&e){var r="".concat(e.extensionSlotName,"-").concat(e.extensionId);throw!or[r]&&t&&(or[r]=function(e,t){return new Promise((function(n){var r=e.subscribe((function(e){var o=(0,rr.getExtensionConfigFromStore)(e,t.extensionSlotName,t.extensionId);o.loaded&&o.config&&(n(o.config),r())}))}))}(t,e)),or[r]}return n||{}}(o);return(0,Ue.useMemo)((function(){return(null==e?void 0:e.externalModuleName)&&i===e.externalModuleName?ue({},a):ue({},a,u)}),[i,null==e?void 0:e.externalModuleName,a,u])},le=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},fe=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300,r=function(e){if(Array.isArray(e))return e}(t=(0,Ue.useState)(e))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return le(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?le(e,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=r[0],i=r[1];return(0,Ue.useEffect)((function(){var t=setTimeout((function(){i(e)}),n);return function(){clearTimeout(t)}}),[e,n]),o},de=function(e){var t=C(e);return(0,Ue.useMemo)((function(){return Object.fromEntries(t.map((function(e){return[e.name,e.meta]})))}),[t])},pe=function(e){var t,n=S(We.featureFlagsStore).flags;return(0,Ue.useEffect)((function(){n[e]||console.error('useFeatureFlag: Attempted to get value of non-existent flag "'.concat(e,'". Did you forget to call registerFeatureFlag?'))}),[n[e]]),null===(t=n[e])||void 0===t?void 0:t.enabled},he=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},ve=function(){var e,t=(e=(0,Ue.useState)(0),function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return he(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?he(e,2):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[1];return(0,Ue.useCallback)((function(){t((function(e){return e+1}))}),[])},ye=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},me=function(){var e="tablet";return document.body.classList.forEach((function(t){switch(t){case"omrs-breakpoint-lt-tablet":e="phone";break;case"omrs-breakpoint-gt-small-desktop":e="large-desktop";break;case"omrs-breakpoint-gt-tablet":e="small-desktop"}})),e},ge=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,Ue.useState)(me))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return ye(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ye(e,2):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=t[0],r=t[1];return(0,Ue.useEffect)((function(){var e=function(){r(me())};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[]),n},be=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},we=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=function(e){if(Array.isArray(e))return e}(e=(0,Ue.useState)([]))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return be(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?be(e,2):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=n[0],o=n[1];return(0,Ue.useEffect)((function(){var e=(0,qe.getLocations)(t).subscribe((function(e){o(e)}),(function(e){console.error(e)}));return function(){return e.unsubscribe()}}),[]),r},Se=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=(0,Ue.useRef)(null);return(0,Ue.useEffect)((function(){var r=function(r){t&&n.current&&!n.current.contains(r.target)&&e(r)};return window.addEventListener("mousedown",r),window.addEventListener("touchstart",r),function(){window.removeEventListener("mousedown",r),window.removeEventListener("touchstart",r)}}),[e,t]),n},Oe=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Ee=function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.abortController,i=r.fetchInit,a=r.url,u=r.swrConfig,c=ct(),s=(0,Ue.useMemo)((function(){return null!==(n=null!==(t=null==i?void 0:i.signal)&&void 0!==t?t:null==o?void 0:o.signal)&&void 0!==n?n:c.signal}),[null==o?void 0:o.signal,null==i?void 0:i.signal,c.signal]),l=(0,Ue.useCallback)((function(e){var t,n,r=function(e,t){if(t)return"function"==typeof t?t(e):t;if("string"==typeof e)return e;throw new Error("When using useOpenmrsSWR with a key that is not a string, you must provide a url() function that converts the key to a valid url. The key for this hook is ".concat(e,"."))}(e,a);return(0,qe.openmrsFetch)(r,(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Oe(e,t,n[t])}))}return e}({},i),n=null!=(n={signal:s})?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})),t))}),[s,i,a]);return(0,nt.default)(e,l,u)},_e=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},je=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},xe=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){je(e,t,n[t])}))}return e},Ce=function(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e},Pe=function(){var e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]},Ae=function(e,t){switch(t.type){case Zn.loadPatient:return Ce(xe({},e),{patientUuid:t.patientUuid,patient:null,isPendingUuid:!1,isLoadingPatient:!0,err:null});case Zn.newPatient:return Ce(xe({},e),{patient:t.patient,isPendingUuid:!1,isLoadingPatient:!1,err:null});case Zn.loadError:return Ce(xe({},e),{patient:null,isPendingUuid:!1,isLoadingPatient:!1,err:t.err});default:return e}},Te=function(e){var t,n=function(e){if(Array.isArray(e))return e}(t=(0,Ue.useReducer)(Ae,Ce(xe({},sr),{patientUuid:null!=e?e:null,isPendingUuid:!e,isLoadingPatient:!!e})))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return _e(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_e(e,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=n[0],o=n[1];return(0,Ue.useEffect)((function(){if(r.isPendingUuid){var e=Pe();o(e?{type:Zn.loadPatient,patientUuid:e}:{type:Zn.newPatient,patient:null})}var t=!0;return r.isLoadingPatient&&r.patientUuid&&(0,qe.fetchCurrentPatient)(r.patientUuid).then((function(e){return t&&o({patient:e,type:Zn.newPatient})}),(function(e){return t&&o({err:e,type:Zn.loadError})})),function(){t=!1}}),[r.isPendingUuid,r.isLoadingPatient,r.patientUuid]),(0,Ue.useEffect)((function(){var e=function(e){var t=Pe();t!=r.patientUuid&&o({type:Zn.loadPatient,patientUuid:t})};return window.addEventListener("single-spa:routing-event",e),function(){return window.removeEventListener("single-spa:routing-event",e)}}),[r.patientUuid]),{isLoading:r.isPendingUuid||r.isLoadingPatient,patient:r.patient,patientUuid:null!=e?e:r.patientUuid,error:r.err}},ke=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},Ie=function(){var e,t=(0,Ue.useRef)(),n=function(e){if(Array.isArray(e))return e}(e=(0,Ue.useState)(null))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return ke(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ke(e,2):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=n[0],o=n[1],i=null;if(!r){if(cr){var a=(0,qe.getSessionStore)().getState();a.loaded&&(i=a.session)}else cr=new Promise((function(e){var n=function(n){var r=n.loaded,o=n.session;r&&(e(o),i=o,t.current&&t.current(),t.current=void 0)};n((0,qe.getSessionStore)().getState()),i||(t.current=(0,qe.getSessionStore)().subscribe(n))}));if(!i)throw cr;o(i)}(0,Ue.useEffect)((function(){return t.current||(t.current=(0,qe.getSessionStore)().subscribe((function(e){var t=e.loaded,n=e.session;t&&(i=n,o(n))}))),function(){t.current&&t.current(),t.current=void 0}}),[]);var u=r||i;if(!u)throw cr?(console.warn("useSession is in an unexpected state. Attempting to recover."),cr):Error("useSession is in an invalid state.");return u},Re=function(e){var t,n=S((0,qe.getVisitStore)()),r=n.patientUuid,o=n.manuallySetVisitUuid,i=e&&r==e?o:null,a="?patient=".concat(e,"&v=").concat(qe.defaultVisitCustomRepresentation,"&includeInactive=false"),u="/".concat(i),c=(0,nt.default)(e?"/ws/rest/v1/visit".concat(a):null,qe.openmrsFetch),s=c.data,l=c.error,f=c.mutate,d=c.isValidating,p=(0,nt.default)(e&&i?"/ws/rest/v1/visit".concat(u):null,qe.openmrsFetch),h=p.data,v=p.error,y=p.mutate,m=p.isValidating,g=(0,Ue.useMemo)((function(){return null!==(t=null==s?void 0:s.data.results.find((function(e){return null===e.stopDatetime})))&&void 0!==t?t:null}),[s]),b=(0,Ue.useMemo)((function(){return i?null==h?void 0:h.data:null!=g?g:null}),[h,g,i]);return{error:l||v,mutate:function(){f(),y()},isValidating:d||m,activeVisit:g,currentVisit:b,currentVisitIsRetrospective:Boolean(i),isLoading:Boolean((!s||i&&!h)&&(!l||!v))}},De=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},Me=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,Ue.useState)([]))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return De(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?De(e,2):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=t[0],r=t[1];return(0,Ue.useEffect)((function(){var e=(0,qe.getVisitTypes)().subscribe((function(e){r(e)}),(function(e){return console.error(e)}));return function(){return e.unsubscribe()}}),[]),n},Ne=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},Le=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:pr,r=function(e){if(Array.isArray(e))return e}(e=(0,Ue.useState)(1))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return Ne(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ne(e,2):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=r[0],i=r[1],a=(0,Ue.useMemo)((function(){return"number"==typeof n&&n>0?Math.max(1,Math.ceil(t.length/n)):1}),[t.length,n]),u=(0,Ue.useMemo)((function(){var e=(o-1)*n,r=(o+0)*n;return t.slice(e,r)}),[t,o,n]),c=(0,Ue.useCallback)((function(e){i(Math.max(1,Math.min(a,e)))}),[i,a]),s=(0,Ue.useCallback)((function(){o<a&&i(o+1)}),[o,a,i]),l=(0,Ue.useCallback)((function(){o>1&&i(o-1)}),[o,i]);return(0,Ue.useMemo)((function(){return{results:u,totalPages:a,currentPage:o,paginated:t.length>n,showNextButton:o<a,showPreviousButton:o>1,goTo:c,goToNext:s,goToPrevious:l}}),[u,a,t.length,n,o,c,s,l])};m.r(g),m.d(g,{ComponentContext:function(){return Be},ConfigurableLink:function(){return a},Extension:function(){return Ve},ExtensionSlot:function(){return I},UserHasAccess:function(){return Ze},createUseStore:function(){return E},getAsyncExtensionLifecycle:function(){return ut},getAsyncLifecycle:function(){return W},getLifecycle:function(){return z},getSyncLifecycle:function(){return q},isDesktop:function(){return ur},openmrsComponentDecorator:function(){return $},useAbortController:function(){return Z},useAssignedExtensionIds:function(){return ne},useAssignedExtensions:function(){return _},useAttachments:function(){return re},useBodyScrollLock:function(){return oe},useConfig:function(){return se},useConnectedExtensions:function(){return C},useConnectivity:function(){return f},useDebounce:function(){return fe},useExtensionInternalStore:function(){return ar},useExtensionSlot:function(){return P},useExtensionSlotMeta:function(){return de},useExtensionStore:function(){return ze},useFeatureFlag:function(){return pe},useForceUpdate:function(){return ve},useLayoutType:function(){return ge},useLocations:function(){return we},useOnClickOutside:function(){return Se},useOpenmrsSWR:function(){return Ee},usePagination:function(){return Le},usePatient:function(){return Te},useSession:function(){return Ie},useStore:function(){return S},useStoreWithActions:function(){return O},useVisit:function(){return Re},useVisitTypes:function(){return Me}});var Ue=m(954),Be=Ue.default.createContext({moduleName:""}),Fe=m(513),He=m(45),Ve=function(e){var t,n=e.state,o=e.children,i=e.wrap,a=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["state","children","wrap"]),c=function(e){if(Array.isArray(e))return e}(t=(0,Ue.useState)())||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return u(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),l=c[0],f=c[1],d=(0,Ue.useContext)(Be).extension,p=(0,Ue.useRef)(null),h=(0,Ue.useRef)(Promise.resolve()),v=(0,Ue.useRef)(!1);(0,Ue.useEffect)((function(){i&&console.warn("'wrap' prop of Extension is being used ".concat((null==d?void 0:d.extensionId)?"by ".concat(d.extensionId," in ").concat(d.extensionSlotName):"",". This will be removed in a future release."))}),[]);var y=(0,Ue.useCallback)((function(e){f(e)}),[f]);(0,Ue.useEffect)((function(){if(null!=l&&(null==d?void 0:d.extensionSlotName)&&d.extensionSlotModuleName&&d.extensionSlotModuleName&&!p.current&&!v.current)return v.current=!0,(0,He.renderExtension)(l,d.extensionSlotName,d.extensionSlotModuleName,d.extensionId,void 0,n).then((function(e){p.current=e,v.current=!1})),function(){if(p&&p.current)switch(p.current.getStatus()){case"MOUNTING":p.current.mountPromise.then((function(){var e;"MOUNTED"===(null===(e=p.current)||void 0===e?void 0:e.getStatus())&&p.current.unmount()}));break;case"MOUNTED":p.current.unmount();break;case"UPDATING":h.current&&h.current.then((function(){var e;"MOUNTED"===(null===(e=p.current)||void 0===e?void 0:e.getStatus())&&p.current.unmount()}))}}}),[null==d?void 0:d.extensionSlotName,null==d?void 0:d.extensionId,null==d?void 0:d.extensionSlotModuleName,l]),(0,Ue.useEffect)((function(){p.current&&p.current.update&&"UNMOUNTING"!==p.current.getStatus()&&Promise.all([p.current.mountPromise,h.current]).then((function(){var e;"MOUNTED"===(null==p||null===(e=p.current)||void 0===e?void 0:e.getStatus())&&p.current.update&&(h.current=p.current.update(s({},n)).catch((function(e){var t,n,o;if(n=e,!(null!=(o=Error)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?o[Symbol.hasInstance](n):r(n,o))||!e.message.includes("minified message #32")||"MOUNTED"===(null===(t=p.current)||void 0===t?void 0:t.getStatus()))throw e})))}))}),[n]);var m=Ue.default.createElement("div",s({ref:y,"data-extension-id":null==d?void 0:d.extensionId,style:{position:"relative"}},a));return"function"!=typeof o||Ue.default.isValidElement(o)?d&&i?i(m,d):m:Ue.default.createElement(Ue.default.Fragment,null,o(m,d))},Ge=m(728),Ke=m(385),$e=function(e){return e},ze=E((0,He.getExtensionStore)()),We=m(570),qe=m(766),Ze=function(e){var t,n=e.privilege,r=e.fallback,o=e.children,i=function(e){if(Array.isArray(e))return e}(t=(0,Ue.useState)(null))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return R(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?R(e,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),a=i[0],u=i[1];return(0,Ue.useEffect)((function(){var e=(0,qe.getCurrentUser)({includeAuthStatus:!1}).subscribe(u);return function(){return e.unsubscribe()}}),[]),a&&(0,qe.userHasAccess)(n,a)?Ue.default.createElement(Ue.default.Fragment,null,o):r?Ue.default.createElement(Ue.default.Fragment,null,r):null},Ye=m(645);function Xe(e){return(Xe="function"==typeof Symbol&&"symbol"==o(Symbol.iterator)?function(e){return void 0===e?"undefined":o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":o(e)})(e)}function Je(e){return(Je="function"==typeof Symbol&&"symbol"==o(Symbol.iterator)?function(e){return void 0===e?"undefined":o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":o(e)})(e)}var Qe=null;try{Qe=n(1672).createContext()}catch(D){}var et={React:null,ReactDOM:null,ReactDOMClient:null,rootComponent:null,loadRootComponent:null,errorBoundary:null,errorBoundaryClass:null,domElementGetter:null,parcelCanUpdate:!0,suppressComponentDidCatchWarning:!1,domElements:{},renderResults:{},updateResolves:{},unmountResolves:{}},tt=m(281),nt=m(725);function rt(e){return rt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},rt(e)}function ot(e,t){return ot=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ot(e,t)}var it={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},at={errorRetryCount:3,fetcher:qe.openmrsFetch,focusThrottleInterval:3e4},ut=W,ct=Z,st=function(e,t){return e===t||e!=e&&t!=t},lt=function(e,t){for(var n=e.length;n--;)if(st(e[n][0],t))return n;return-1},ft=Array.prototype.splice;Y.prototype.clear=function(){this.__data__=[],this.size=0},Y.prototype.delete=function(e){var t=this.__data__,n=lt(t,e);return!(n<0||(n==t.length-1?t.pop():ft.call(t,n,1),--this.size,0))},Y.prototype.get=function(e){var t=this.__data__,n=lt(t,e);return n<0?void 0:t[n][1]},Y.prototype.has=function(e){return lt(this.__data__,e)>-1},Y.prototype.set=function(e,t){var n=this.__data__,r=lt(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var dt,pt=Y,ht="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,vt="object"==typeof self&&self&&self.Object===Object&&self,yt=ht||vt||Function("return this")(),mt=yt.Symbol,gt=Object.prototype,bt=gt.hasOwnProperty,wt=gt.toString,St=mt?mt.toStringTag:void 0,Ot=Object.prototype.toString,Et=mt?mt.toStringTag:void 0,_t=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Et&&Et in Object(e)?function(e){var t=bt.call(e,St),n=e[St];try{e[St]=void 0;var r=!0}catch(e){}var o=wt.call(e);return r&&(t?e[St]=n:delete e[St]),o}(e):function(e){return Ot.call(e)}(e)},jt=function(e){var t=void 0===e?"undefined":o(e);return null!=e&&("object"==t||"function"==t)},xt=function(e){if(!jt(e))return!1;var t=_t(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},Ct=yt["__core-js_shared__"],Pt=(dt=/[^.]+$/.exec(Ct&&Ct.keys&&Ct.keys.IE_PROTO||""))?"Symbol(src)_1."+dt:"",At=Function.prototype.toString,Tt=function(e){if(null!=e){try{return At.call(e)}catch(e){}try{return e+""}catch(e){}}return""},kt=/^\[object .+?Constructor\]$/,It=Function.prototype,Rt=Object.prototype,Dt=It.toString,Mt=Rt.hasOwnProperty,Nt=RegExp("^"+Dt.call(Mt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Lt=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!jt(e)||(t=e,Pt&&Pt in t))&&(xt(e)?Nt:kt).test(Tt(e));var t}(n)?n:void 0},Ut=Lt(yt,"Map"),Bt=Lt(Object,"create"),Ft=Object.prototype.hasOwnProperty,Ht=Object.prototype.hasOwnProperty;X.prototype.clear=function(){this.__data__=Bt?Bt(null):{},this.size=0},X.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},X.prototype.get=function(e){var t=this.__data__;if(Bt){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Ft.call(t,e)?t[e]:void 0},X.prototype.has=function(e){var t=this.__data__;return Bt?void 0!==t[e]:Ht.call(t,e)},X.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Bt&&void 0===t?"__lodash_hash_undefined__":t,this};var Vt=X,Gt=function(e,t){var n,r,i=e.__data__;return("string"==(r=o(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map};J.prototype.clear=function(){this.size=0,this.__data__={hash:new Vt,map:new(Ut||pt),string:new Vt}},J.prototype.delete=function(e){var t=Gt(this,e).delete(e);return this.size-=t?1:0,t},J.prototype.get=function(e){return Gt(this,e).get(e)},J.prototype.has=function(e){return Gt(this,e).has(e)},J.prototype.set=function(e,t){var n=Gt(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};var Kt=J;Q.prototype.clear=function(){this.__data__=new pt,this.size=0},Q.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Q.prototype.get=function(e){return this.__data__.get(e)},Q.prototype.has=function(e){return this.__data__.has(e)},Q.prototype.set=function(e,t){var n=this.__data__;if(r(n,pt)){var o=n.__data__;if(!Ut||o.length<199)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new Kt(o)}return n.set(e,t),this.size=n.size,this};var $t=Q;ee.prototype.add=ee.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},ee.prototype.has=function(e){return this.__data__.has(e)};var zt=ee,Wt=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},qt=function(e,t,n,r,o,i){var a=1&n,u=e.length,c=t.length;if(u!=c&&!(a&&c>u))return!1;var s=i.get(e),l=i.get(t);if(s&&l)return s==t&&l==e;var f=-1,d=!0,p=2&n?new zt:void 0;for(i.set(e,t),i.set(t,e);++f<u;){var h=e[f],v=t[f];if(r)var y=a?r(v,h,f,t,e,i):r(h,v,f,e,t,i);if(void 0!==y){if(y)continue;d=!1;break}if(p){if(!Wt(t,(function(e,t){if(a=t,!p.has(a)&&(h===e||o(h,e,n,r,i)))return p.push(t);var a}))){d=!1;break}}else if(h!==v&&!o(h,v,n,r,i)){d=!1;break}}return i.delete(e),i.delete(t),d},Zt=yt.Uint8Array,Yt=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},Xt=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},Jt=mt?mt.prototype:void 0,Qt=Jt?Jt.valueOf:void 0,en=Array.isArray,tn=Object.prototype.propertyIsEnumerable,nn=Object.getOwnPropertySymbols,rn=nn?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a)&&(i[o++]=a)}return i}(nn(e),(function(t){return tn.call(e,t)})))}:function(){return[]},on=function(e){return null!=e&&"object"==typeof e},an=function(e){return on(e)&&"[object Arguments]"==_t(e)},un=Object.prototype,cn=un.hasOwnProperty,sn=un.propertyIsEnumerable,ln=an(function(){return arguments}())?an:function(e){return on(e)&&cn.call(e,"callee")&&!sn.call(e,"callee")},fn=ln,dn=t&&!t.nodeType&&t,pn=dn&&e&&!e.nodeType&&e,hn=pn&&pn.exports===dn?yt.Buffer:void 0,vn=(hn?hn.isBuffer:void 0)||function(){return!1},yn=/^(?:0|[1-9]\d*)$/,mn=function(e,t){var n=void 0===e?"undefined":o(e);return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&yn.test(e))&&e>-1&&e%1==0&&e<t},gn=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},bn={};bn["[object Float32Array]"]=bn["[object Float64Array]"]=bn["[object Int8Array]"]=bn["[object Int16Array]"]=bn["[object Int32Array]"]=bn["[object Uint8Array]"]=bn["[object Uint8ClampedArray]"]=bn["[object Uint16Array]"]=bn["[object Uint32Array]"]=!0,bn["[object Arguments]"]=bn["[object Array]"]=bn["[object ArrayBuffer]"]=bn["[object Boolean]"]=bn["[object DataView]"]=bn["[object Date]"]=bn["[object Error]"]=bn["[object Function]"]=bn["[object Map]"]=bn["[object Number]"]=bn["[object Object]"]=bn["[object RegExp]"]=bn["[object Set]"]=bn["[object String]"]=bn["[object WeakMap]"]=!1;var wn,Sn=t&&!t.nodeType&&t,On=Sn&&e&&!e.nodeType&&e,En=On&&On.exports===Sn&&ht.process,_n=function(){try{return On&&On.require&&On.require("util").types||En&&En.binding&&En.binding("util")}catch(e){}}(),jn=_n&&_n.isTypedArray,xn=jn?(wn=jn,function(e){return wn(e)}):function(e){return on(e)&&gn(e.length)&&!!bn[_t(e)]},Cn=Object.prototype.hasOwnProperty,Pn=Object.prototype,An=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),Tn=Object.prototype.hasOwnProperty,kn=function(e){return null!=(t=e)&&gn(t.length)&&!xt(t)?function(e,t){var n=en(e),r=!n&&fn(e),o=!n&&!r&&vn(e),i=!n&&!r&&!o&&xn(e),a=n||r||o||i,u=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=u.length;for(var s in e)!Cn.call(e,s)||a&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||mn(s,c))||u.push(s);return u}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||Pn))return An(e);var t,n,r=[];for(var o in Object(e))Tn.call(e,o)&&"constructor"!=o&&r.push(o);return r}(e);var t},In=function(e){return function(e,t,n){var r=t(e);return en(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,kn,rn)},Rn=Object.prototype.hasOwnProperty,Dn=Lt(yt,"DataView"),Mn=Lt(yt,"Promise"),Nn=Lt(yt,"Set"),Ln=Lt(yt,"WeakMap"),Un="[object Map]",Bn="[object Promise]",Fn="[object Set]",Hn="[object WeakMap]",Vn="[object DataView]",Gn=Tt(Dn),Kn=Tt(Ut),$n=Tt(Mn),zn=Tt(Nn),Wn=Tt(Ln),qn=_t;(Dn&&qn(new Dn(new ArrayBuffer(1)))!=Vn||Ut&&qn(new Ut)!=Un||Mn&&qn(Mn.resolve())!=Bn||Nn&&qn(new Nn)!=Fn||Ln&&qn(new Ln)!=Hn)&&(qn=function(e){var t=_t(e),n="[object Object]"==t?e.constructor:void 0,r=n?Tt(n):"";if(r)switch(r){case Gn:return Vn;case Kn:return Un;case $n:return Bn;case zn:return Fn;case Wn:return Hn}return t});var Zn,Yn=qn,Xn="[object Arguments]",Jn="[object Array]",Qn="[object Object]",er=Object.prototype.hasOwnProperty,tr=function e(t,n,o,i,a){return t===n||(null==t||null==n||!on(t)&&!on(n)?t!=t&&n!=n:function(e,t,n,o,i,a){var u=en(e),c=en(t),s=u?Jn:Yn(e),l=c?Jn:Yn(t),f=(s=s==Xn?Qn:s)==Qn,d=(l=l==Xn?Qn:l)==Qn,p=s==l;if(p&&vn(e)){if(!vn(t))return!1;u=!0,f=!1}if(p&&!f)return a||(a=new $t),u||xn(e)?qt(e,t,n,o,i,a):function(e,t,n,r,o,i,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new Zt(e),new Zt(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return st(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var u=Yt;case"[object Set]":var c=1&r;if(u||(u=Xt),e.size!=t.size&&!c)return!1;var s=a.get(e);if(s)return s==t;r|=2,a.set(e,t);var l=qt(u(e),u(t),r,o,i,a);return a.delete(e),l;case"[object Symbol]":if(Qt)return Qt.call(e)==Qt.call(t)}return!1}(e,t,s,n,o,i,a);if(!(1&n)){var h=f&&er.call(e,"__wrapped__"),v=d&&er.call(t,"__wrapped__");if(h||v){var y=h?e.value():e,m=v?t.value():t;return a||(a=new $t),i(y,m,n,o,a)}}return!!p&&(a||(a=new $t),function(e,t,n,o,i,a){var u=1&n,c=In(e),s=c.length;if(s!=In(t).length&&!u)return!1;for(var l=s;l--;){var f=c[l];if(!(u?f in t:Rn.call(t,f)))return!1}var d=a.get(e),p=a.get(t);if(d&&p)return d==t&&p==e;var h=!0;a.set(e,t),a.set(t,e);for(var v=u;++l<s;){var y=e[f=c[l]],m=t[f];if(o)var g=u?o(m,y,f,t,e,a):o(y,m,f,e,t,a);if(!(void 0===g?y===m||i(y,m,n,o,a):g)){h=!1;break}v||(v="constructor"==f)}if(h&&!v){var b=e.constructor,w=t.constructor;b==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&r(b,b)&&"function"==typeof w&&r(w,w)||(h=!1)}return a.delete(e),a.delete(t),h}(e,t,n,o,i,a))}(t,n,o,i,e,a))},nr=function(e,t){return tr(e,t)},rr=m(824),or={},ir='No ComponentContext has been provided. This should come from "openmrsComponentDecorator".\nUsually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".',ar=E((0,He.getExtensionInternalStore)()),ur=function(e){return"small-desktop"===e||"large-desktop"===e};!function(e){e.loadPatient="loadPatient",e.newPatient="newPatient",e.loadError="patientLoadError"}(Zn||(Zn={}));var cr,sr={patientUuid:null,patient:null,isPendingUuid:!0,isLoadingPatient:!1,err:null},lr=m(688),fr=m(332),dr=m.n(fr);lr.default.extend(dr());var pr=10}(),g}())}}}))},3850:(e,t,n)=>{"use strict";n.d(t,{Uo:()=>a,ZF:()=>l,Hs:()=>f,F:()=>r,n:()=>u,O$:()=>c});var r="openmrs-routes:";function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var i=(0,n(8831).canAccessStorage)();function a(e,t){if(i){if("string"==typeof t){if(t.startsWith("http"))return s(e,t);try{var n=JSON.parse(t);if(l(n))return s(e,n);console.error("The supplied routes for ".concat(e," is not a valid OpenmrsAppRoutes object"),t)}catch(t){console.error("Could not add routes override for ".concat(e,": "),t)}}else{if(r=t,null!=(o=URL)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?o[Symbol.hasInstance](r):r instanceof o)return s(e,t.toString());if(l(t))return s(e,t)}var r,o;console.error("Override for ".concat(e," is not in a valid format. Expected either a Javascript Object, a JSON string of a Javascript object, or a URL"),t)}}function u(e){if(i){var t=r+e;localStorage.removeItem(t)}}function c(){if(i)for(var e=window.localStorage,t=0;t<e.length;t++){var n=e.key(t);(null==n?void 0:n.startsWith(r))&&e.removeItem(n)}}function s(e,t){var n=r+e;localStorage.setItem(n,JSON.stringify(t))}function l(e){if(e&&"object"==typeof e){var t=Object.prototype.hasOwnProperty,n=e;return!!(!t.call(e,"pages")||Boolean(n.pages)&&Array.isArray(n.pages))&&!!(!t.call(e,"extensions")||Boolean(n.extensions)&&Array.isArray(n.extensions))}return!1}function f(e){if(e&&"object"==typeof e){var t=e;return Object.entries(t).every((function(e){var t,n,r=(n=2,function(e){if(Array.isArray(e))return e}(t=e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t,n)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=r[0],a=r[1];return"string"==typeof i&&l(a)}))}return!1}},681:()=>{System.register([],(function(e,t){return{execute:function(){e(function(){"use strict";var e=function(e,t){var n=u[e];if(n)return n.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):n.value.setState(t,!0),n.active=!0,n.value;var r=a()((function(){return t}));return u[e]={value:r,active:!0},r},t=function(e,t){var n=u[e];if(!n){var r=a()((function(){return null!=t?t:{}}));return u[e]={value:r,active:!1},r}return n.value},n=function(e,t,n){var r=t(e.getState());return e.subscribe((function(e){var o=t(e);o!==r&&(r=o,n(o))}))},r={d:function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},o={};r.r(o),r.d(o,{createGlobalStore:function(){return e},getGlobalStore:function(){return t},subscribeTo:function(){return n}});var i=function(e){var t,n=new Set,r=function(e,r){var o="function"==typeof e?e(t):e;if(!Object.is(o,t)){var i=t;t=(null!=r?r:"object"!=typeof o)?o:Object.assign({},t,o),n.forEach((function(e){return e(t,i)}))}},o=function(){return t},i={setState:r,getState:o,subscribe:function(e){return n.add(e),function(){return n.delete(e)}},destroy:function(){console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return t=e(r,o,i),i},a=function(e){return e?i(e):i},u={};return setTimeout((function(){"development"===window.spaEnv&&(window.stores=u)}),1e3),o}())}}}))},4696:()=>{function e(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}System.register(["@openmrs/esm-extensions","@openmrs/esm-framework","@openmrs/esm-react-utils","@openmrs/esm-state","react","react-dom","rxjs"],(function(t,n){var r={},o={},i={},a={},u={},c={},s={};return Object.defineProperty(c,"__esModule",{value:!0}),{setters:[function(){},function(e){o.Type=e.Type,o.defineConfigSchema=e.defineConfigSchema},function(){},function(e){a.createGlobalStore=e.createGlobalStore},function(){},function(e){Object.keys(e).forEach((function(t){c[t]=e[t]}))},function(e){s.Subject=e.Subject}],execute:function(){t(function(){var t={976:function(t,n){var r;!function(){"use strict";var o={}.hasOwnProperty;function i(){for(var t,n=[],r=0;r<arguments.length;r++){var a=arguments[r];if(a){var u=void 0===a?"undefined":(t=a)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":e(t);if("string"===u||"number"===u)n.push(a);else if(Array.isArray(a)){if(a.length){var c=i.apply(null,a);c&&n.push(c)}}else if("object"===u){if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]")){n.push(a.toString());continue}for(var s in a)o.call(a,s)&&a[s]&&n.push(s)}}}return n.join(" ")}t.exports?(i.default=i,t.exports=i):void 0===(r=function(){return i}.apply(n,[]))||(t.exports=r)}()},279:function(e,t,n){"use strict";var r=n(493);r.createRoot,r.hydrateRoot},714:function(){var t=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":e(t)};System.register(["@openmrs/esm-state"],(function(e,n){var r={};return{setters:[function(e){r.createGlobalStore=e.createGlobalStore,r.getGlobalStore=e.getGlobalStore}],execute:function(){e(function(){"use strict";var e={685:function(e){e.exports=r}},n={};function o(t){var r=n[t];if(void 0!==r)return r.exports;var i=n[t]={exports:{}};return e[t](i,i.exports,o),i.exports}o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){var e=function(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]},n=function(t){return function n(r){return 0===arguments.length||e(r)?n:t.apply(this,arguments)}},r=function(t){return function r(o,i){switch(arguments.length){case 0:return r;case 1:return e(o)?r:n((function(e){return t(o,e)}));default:return e(o)&&e(i)?r:e(o)?n((function(e){return t(e,i)})):e(i)?n((function(e){return t(o,e)})):t(o,i)}}},a=function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n},u=function(e,t,n){for(var r=0,o=n.length;r<o;){if(e(t,n[r]))return!0;r+=1}return!1},c=function(e,t){return Object.prototype.hasOwnProperty.call(t,e)},s=function(e,t,n,r){var o=a(e);function i(e,t){return le(e,t,n.slice(),r.slice())}return!u((function(e,t){return!u(i,t,e)}),a(t),o)},l=function(t){return function o(i,a,u){switch(arguments.length){case 0:return o;case 1:return e(i)?o:r((function(e,n){return t(i,e,n)}));case 2:return e(i)&&e(a)?o:e(i)?r((function(e,n){return t(e,a,n)})):e(a)?r((function(e,n){return t(i,e,n)})):n((function(e){return t(i,a,e)}));default:return e(i)&&e(a)&&e(u)?o:e(i)&&e(a)?r((function(e,n){return t(e,n,u)})):e(i)&&e(u)?r((function(e,n){return t(e,a,n)})):e(a)&&e(u)?r((function(e,n){return t(i,e,n)})):e(i)?n((function(e){return t(e,a,u)})):e(a)?n((function(e){return t(i,e,u)})):e(u)?n((function(e){return t(i,a,e)})):t(i,a,u)}}},f=function(e){return"[object Object]"===Object.prototype.toString.call(e)},d=function(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)},p=function(e,t,n,r){return e["@@transducer/result"](n[r](Ee(e["@@transducer/step"],e),t))},h=function(e,t){return function(n){if(!e(n))return"function"==typeof t?t(n):t}},v=function(e){return(0,Ie.getGlobalStore)("config-module-".concat(e),{config:null,loaded:!1,translationOverridesLoaded:!1})},y=function(){return(0,Ie.getGlobalStore)("config-extension-slots",{slots:{}})},m=function(e){return g(y().getState(),e)},g=function(e,t){var n=e.slots[t];return null!=n?n:{loaded:!1,config:{}}},b=function(){return(0,Ie.getGlobalStore)("config-extensions",{configs:{}})},w=function(e,t){var n=Object.assign({},S(b().getState(),e,t));return n.config=ve(["Display conditions","Translation overrides"],n.config),n},S=function(e,t,n){var r,o=null===(r=e.configs[t])||void 0===r?void 0:r[n];return null!=o?o:{loaded:!1,config:null}},O=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},E=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},_=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){E(e,t,n[t])}))}return e},j=function(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e},x=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||P(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},C=function(e){return function(e){if(Array.isArray(e))return O(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||P(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},P=function(e,t){if(e){if("string"==typeof e)return O(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?O(e,t):void 0}},A=function(e,t){var n=!0,r=!1,o=void 0;try{for(var i,a=Object.keys(e.schemas)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value,c=v(u);if(e.moduleLoaded[u]){var s=G(u,e,t);c.setState({translationOverridesLoaded:!0,loaded:!0,config:s})}else{var l=K(u,e,t);c.setState({translationOverridesLoaded:!0,loaded:!1,config:l})}}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}},T=function(e,t){var n,r,o=(n=z(V(e,t)),function(e){var t=!0,n=!1,r=void 0;try{for(var o,i=Object.entries(e)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=x(o.value,2),u=a[0],c=a[1],s=!0,l=!1,f=void 0;try{for(var d,p=Object.entries(c)[Symbol.iterator]();!(s=(d=p.next()).done);s=!0){var h=x(d.value,2),v=h[0];H(h[1],u,v)}}catch(e){l=!0,f=e}finally{try{s||null==p.return||p.return()}finally{if(l)throw f}}}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}(r=Object.keys(n).reduce((function(e,t){var r,o;return(null===(r=n[t])||void 0===r?void 0:r.extensionSlots)&&(e[t]=null===(o=n[t])||void 0===o?void 0:o.extensionSlots),e}),{})),Object.keys(r).reduce((function(e,t){return _({},e,r[t])}),{})),i=Object.fromEntries(Object.entries(o).map((function(e){var t=x(e,2);return[t[0],{loaded:!0,config:t[1]}]}))),a=y(),u=a.getState(),c={slots:_({},u.slots,i)};fe(u,c)||a.setState(c)},k=function(e,t){var n=function(e,t){var n=Le(ge(e.schemas)),r=C(e.providedConfigs.map((function(e){return[e.config,e.source]}))).concat([[t.config,"temporary config"]]),o=!0,i=!1,a=void 0;try{for(var u,c=r[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var s=x(u.value,2);n=z([n,Ue(s[0],s[1])])}}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t);Ne.setState({config:n})},I=function(e,t,n){var r={},o=!0,i=!1,a=void 0;try{for(var u,c=t.mountedExtensions[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var s=u.value,l=F(s.slotModuleName,s.extensionModuleName,s.slotName,s.extensionId,e,n);r[s.slotName]=j(_({},r[s.slotName]),E({},s.extensionId,{config:l,loaded:!0}))}}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}b().setState({configs:r})},R=function(e,t){Be(e,t);var n=he(t,Ke),r=Re.getState();Re.setState({schemas:j(_({},r.schemas),E({},e,n)),moduleLoaded:j(_({},r.moduleLoaded),E({},e,!0))})},D=function(e){var t=Re.getState();Re.setState({schemas:j(_({},t.schemas),E({},e,Ke))})},M=function(e,t){Be(e,t);var n=he(t,Ke),r=Re.getState();r.schemas[e]&&console.error("Config schema for extension ".concat(e," already exists. If there are multiple extensions with this same name, one will probably crash.")),Re.setState({schemas:j(_({},r.schemas),E({},e,n))})},N=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"provided",n=Re.getState();Re.setState({providedConfigs:C(n.providedConfigs).concat([{source:t,config:e}])})},L=function(e){return new Promise((function(t){var n=function(e){if(e.loaded&&e.config){var n=ve(["Display conditions","Translation overrides"],e.config);t(n),o&&o()}},r=v(e);n(r.getState());var o=r.subscribe(n)}))},U=function(e){return new Promise((function(t){var n=function(e){if(e.translationOverridesLoaded&&e.config){var n,r=null!==(n=e.config["Translation overrides"])&&void 0!==n?n:{};t(r),o&&o()}},r=v(e);n(r.getState());var o=r.subscribe(n)}))},B=function(e,t,n){W(e,t,n);var r=Ve(e,t);return He(e,r,n),r},F=function(e,t,n,r,o,i){var a,u,c,s,l=function(e){return x(e.split("#"),1)[0]}(r),f=o.schemas[l],d=f?l:t,p=V(o,i),h=$(e,p),v=null!==(s=null==h||null===(a=h.extensionSlots)||void 0===a||null===(u=a[n])||void 0===u||null===(c=u.configure)||void 0===c?void 0:c[r])&&void 0!==s?s:{},y=z([$(d,p),v]),m=null!=f?f:o.schemas[t];W(m,y,d);var g=Ve(m,y);return He(m,g,d),delete g.extensionSlots,g},H=function(e,t,n){var r="".concat(t,".extensionSlots.").concat(n),o="Extension slot config '".concat(r,"'"),i=Object.keys(e).filter((function(e){return!["add","remove","order","configure"].includes(e)}));i.length&&J(r,o+"' contains invalid keys '".concat(i.join("', '"),"'")),e.add&&(Array.isArray(e.add)&&e.add.every((function(e){return"string"==typeof e}))||J(r,o+".add' is invalid. Must be an array of strings (extension IDs)")),e.remove&&(Array.isArray(e.remove)&&e.remove.every((function(e){return"string"==typeof e}))||J(r,o+".remove' is invalid. Must be an array of strings (extension IDs)")),e.order&&(Array.isArray(e.order)&&e.order.every((function(e){return"string"==typeof e}))||J(r,o+".order' is invalid. Must be an array of strings (extension IDs)")),e.configure&&(X(e.configure)||J(r,o+".configure' is invalid. Must be an object with extension IDs for keys"))},V=function(e,t){return C(e.providedConfigs.map((function(e){return e.config}))).concat([t.config])},G=function(e,t,n){var r=t.schemas[e],o=$(e,V(t,n));W(r,o,e);var i=Ve(r,o);return He(r,i,e),delete i.extensionSlots,i},K=function(e,t,n){var r=$(e,V(t,n)),o=Ve(Ke,r);return He(Ke,o,e),delete o.extensionSlots,o},$=function(e,t){return z(t.map((function(t){return t[e]})).filter((function(e){return!!e})))},z=function(e){return je(he)({},e)},W=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=a.value,s=t[c],l=n+"."+c,f=e[c];e.hasOwnProperty(c)?Fe(f,s,l):"extensionSlots"===c&&""!==n||J(l,"Unknown config key '".concat(l,"' provided. Ignoring."))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}},q=function(e,t,n){t&&Z(e,[{Array:xe,Boolean:Ce,ConceptUuid:ke,Number:Pe,Object:Te,String:Ae,UUID:ke,PersonAttributeTypeUuid:ke,PatientIdentifierTypeUuid:ke}[t]],n)},Z=function(e,t,n){if(t)try{var r=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=(0,a.value)(n);"string"==typeof c&&J(e,"object"==typeof n?"Invalid configuration for ".concat(e,": ").concat(c):"Invalid configuration value ".concat(n," for ").concat(e,": ").concat(c))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}catch(t){console.error('Skipping invalid validator at "'.concat(e,'". Encountered error\n\t').concat(t))}},Y=function(e){return!!e&&Object.keys(e).filter((function(e){return!["_default","_validators"].includes(e)})).length>0},X=function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e},J=function(e,t){var n="".concat(e,":::").concat(t);Ge.has(n)||(console.error(t),Ge.add(n))},Q=function(e){e?Ge.forEach((function(t){t.startsWith(e)&&Ge.delete(t)})):Ge.clear()};o.r(i),o.d(i,{Type:function(){return me},clearConfigErrors:function(){return Q},configExtensionStore:function(){return Me},configInternalStore:function(){return Re},defineConfigSchema:function(){return R},defineExtensionConfigSchema:function(){return M},getConfig:function(){return L},getConfigStore:function(){return v},getExtensionConfig:function(){return w},getExtensionConfigFromStore:function(){return S},getExtensionSlotConfig:function(){return m},getExtensionSlotConfigFromStore:function(){return g},getExtensionSlotsConfigStore:function(){return y},getExtensionsConfigStore:function(){return b},getTranslationOverrides:function(){return U},implementerToolsConfigStore:function(){return Ne},inRange:function(){return $e},isUrl:function(){return We},isUrlWithTemplateParameters:function(){return ze},oneOf:function(){return qe},processConfig:function(){return B},provide:function(){return N},registerModuleWithConfigSystem:function(){return D},temporaryConfigStore:function(){return De},validator:function(){return h},validators:function(){return Ze}});var ee="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},te=Object.prototype.toString,ne=function(){return"[object Arguments]"===te.call(arguments)?function(e){return"[object Arguments]"===te.call(e)}:function(e){return c("callee",e)}}(),re=ne,oe=!{toString:null}.propertyIsEnumerable("toString"),ie=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],ae=function(){return arguments.propertyIsEnumerable("length")}(),ue=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1},ce="function"!=typeof Object.keys||ae?n((function(e){if(Object(e)!==e)return[];var t,n,r=[],o=ae&&re(e);for(t in e)!c(t,e)||o&&"length"===t||(r[r.length]=t);if(oe)for(n=ie.length-1;n>=0;)c(t=ie[n],e)&&!ue(r,t)&&(r[r.length]=t),n-=1;return r})):n((function(e){return Object(e)!==e?[]:Object.keys(e)})),se=n((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function le(e,n,r,o){if(ee(e,n))return!0;var i,a,u=se(e);if(u!==se(n))return!1;if(null==e||null==n)return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof n["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](n)&&"function"==typeof n["fantasy-land/equals"]&&n["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof n.equals)return"function"==typeof e.equals&&e.equals(n)&&"function"==typeof n.equals&&n.equals(e);switch(u){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===(i=e.constructor,null==(a=String(i).match(/^function (\w*)/))?"":a[1]))return e===n;break;case"Boolean":case"Number":case"String":if((void 0===e?"undefined":t(e))!=(void 0===n?"undefined":t(n))||!ee(e.valueOf(),n.valueOf()))return!1;break;case"Date":if(!ee(e.valueOf(),n.valueOf()))return!1;break;case"Error":return e.name===n.name&&e.message===n.message;case"RegExp":if(e.source!==n.source||e.global!==n.global||e.ignoreCase!==n.ignoreCase||e.multiline!==n.multiline||e.sticky!==n.sticky||e.unicode!==n.unicode)return!1}for(var l=r.length-1;l>=0;){if(r[l]===e)return o[l]===n;l-=1}switch(u){case"Map":return e.size===n.size&&s(e.entries(),n.entries(),r.concat([e]),o.concat([n]));case"Set":return e.size===n.size&&s(e.values(),n.values(),r.concat([e]),o.concat([n]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var f=ce(e);if(f.length!==ce(n).length)return!1;var d=r.concat([e]),p=o.concat([n]);for(l=f.length-1;l>=0;){var h=f[l];if(!c(h,n)||!le(n[h],e[h],d,p))return!1;l-=1}return!0}var fe=r((function(e,t){return le(e,t,[],[])})),de=l((function(e,t,n){var r,o={};for(r in t)c(r,t)&&(o[r]=c(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)c(r,n)&&!c(r,o)&&(o[r]=n[r]);return o})),pe=l((function e(t,n,r){return de((function(n,r,o){return f(r)&&f(o)?e(t,r,o):t(n,r,o)}),n,r)})),he=r((function(e,t){return pe((function(e,t,n){return n}),e,t)})),ve=r((function(e,t){for(var n={},r={},o=0,i=e.length;o<i;)r[e[o]]=1,o+=1;for(var a in t)r.hasOwnProperty(a)||(n[a]=t[a]);return n}));function ye(e,t,n,r){var o,i=function(o){for(var i=t.length,a=0;a<i;){if(e===t[a])return n[a];a+=1}for(var u in t[a+1]=e,n[a+1]=o,e)o[u]=r?ye(e[u],t,n,!0):e[u];return o};switch(se(e)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(e.valueOf());case"RegExp":return o=e,new RegExp(o.source,(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.sticky?"y":"")+(o.unicode?"u":""));default:return e}}var me,ge=n((function(e){return null!=e&&"function"==typeof e.clone?e.clone():ye(e,[],[],!0)})),be=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)},we=n((function(e){return!!be(e)||!!e&&"object"==typeof e&&!function(e){return"[object String]"===Object.prototype.toString.call(e)}(e)&&(1===e.nodeType?!!e.length:0===e.length||e.length>0&&e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1))})),Se=function(){var e=function(e){this.f=e};return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}(),Oe=r((function(e,t){return function(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,o){return t.apply(this,arguments)};case 5:return function(e,n,r,o,i){return t.apply(this,arguments)};case 6:return function(e,n,r,o,i,a){return t.apply(this,arguments)};case 7:return function(e,n,r,o,i,a,u){return t.apply(this,arguments)};case 8:return function(e,n,r,o,i,a,u,c){return t.apply(this,arguments)};case 9:return function(e,n,r,o,i,a,u,c,s){return t.apply(this,arguments)};case 10:return function(e,n,r,o,i,a,u,c,s,l){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(e.length,(function(){return e.apply(t,arguments)}))})),Ee=Oe,_e="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",je=l((function(e,t,n){if("function"==typeof e&&(e=function(e){return new Se(e)}(e)),we(n))return function(e,t,n){for(var r=0,o=n.length;r<o;){if((t=e["@@transducer/step"](t,n[r]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r+=1}return e["@@transducer/result"](t)}(e,t,n);if("function"==typeof n["fantasy-land/reduce"])return p(e,t,n,"fantasy-land/reduce");if(null!=n[_e])return d(e,t,n[_e]());if("function"==typeof n.next)return d(e,t,n);if("function"==typeof n.reduce)return p(e,t,n,"reduce");throw new TypeError("reduce: list must be array or iterable")}));!function(e){e.Array="Array",e.Boolean="Boolean",e.ConceptUuid="ConceptUuid",e.Number="Number",e.Object="Object",e.String="String",e.UUID="UUID",e.PersonAttributeTypeUuid="PersonAttributeTypeUuid",e.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid"}(me||(me={}));var xe=h((function(e){return Array.isArray(e)}),"must be an array"),Ce=h((function(e){return"boolean"==typeof e}),"must be a boolean"),Pe=h((function(e){return"number"==typeof e}),"must be a number"),Ae=h((function(e){return"string"==typeof e}),"must be a string"),Te=h((function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}),"must be an object (not an array or null)"),ke=h((function(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/^[0-9a-f]{36}$/i.test(e)}),"must be a valid UUID or a 36-character hexadecimal string"),Ie=o(685),Re=(0,Ie.createGlobalStore)("config-internal",{providedConfigs:[],schemas:{},moduleLoaded:{}}),De=(0,Ie.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});De.subscribe((function(e){var t;t=e.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}));var Me=(0,Ie.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]}),Ne=(0,Ie.createGlobalStore)("config-implementer-tools",{config:{}});function Le(e){return e.hasOwnProperty("_default")?j(_({},e),{_value:e._default,_source:"default"}):X(e)?Object.keys(e).reduce((function(t,n){return t[n]=Le(e[n]),t}),{}):{}}function Ue(e,t){return X(e)?Object.keys(e).reduce((function(n,r){return n[r]=Ue(e[r],t),n}),{}):{_value:e,_source:t}}function Be(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r="Please verify that you are running the latest version and, if so, alert the maintainer.",o=!0,i=!1,a=void 0;try{for(var u,c=function(){var o=u.value,i=n+(n&&".")+o,a=t[o];if("Display conditions"===i&&console.error("".concat(e,' declares a configuration option called "Display conditions"; the "Display conditions" option is a reserved name. ').concat(r)),"Translation overrides"===i&&console.error("".concat(e,' declares a configuration option called "Translation overrides"; the "Translation overrides" option is a reserved name. ').concat(r)),!X(a))return console.error("".concat(e," has bad config schema definition for key '").concat(i,"'. ").concat(r)),"continue";a.hasOwnProperty("_default")||Be(e,a,i);var c=a._elements;if(Y(c)&&Be(e,c,i+"._elements"),a._validators){var s=!0,l=!1,f=void 0;try{for(var d,p=a._validators[Symbol.iterator]();!(s=(d=p.next()).done);s=!0){var h=d.value;"function"!=typeof h&&console.error("".concat(e," has invalid validator for key '").concat(i,"' ").concat(r,".")+"\n\nIf you're the maintainer: validators must be functions that return either "+"undefined or an error string. Received ".concat(h,"."))}}catch(e){l=!0,f=e}finally{try{s||null==p.return||p.return()}finally{if(l)throw f}}}var v=a._type;v&&!Object.values(me).includes(v)&&console.error("".concat(e," has invalid type for key '").concat(i,"' ").concat(r,".")+"\n\nIf you're the maintainer: the allowed types are ".concat(Object.values(me).join(", "),". ")+"Received '".concat(v,"'")),Object.keys(a).every((function(e){return["_description","_validators","_elements","_type"].includes(e)}))&&!n.includes("._elements")&&console.error("".concat(e," has bad config schema definition for key '").concat(i,"'. ").concat(r,".")+"\n\nIf you're the maintainer: all config elements must have a default. "+"Received ".concat(JSON.stringify(a))),c&&v&&![me.Array,me.Object].includes(v)&&console.error("".concat(e," has bad config schema definition for key '").concat(i,"'. ").concat(r,".")+"\n\nIf you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. "+"Received ".concat(JSON.stringify(v)))},s=Object.keys(t).filter((function(e){return!e.startsWith("_")}))[Symbol.iterator]();!(o=(u=s.next()).done);o=!0)c()}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}}function Fe(e,t,n){q(n,e._type,t),X(t)?e._type===me.Object?function(e,t,n){if(e._elements){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=a.value,s=t[c];W(e._elements,s,"".concat(n,".").concat(c))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}}(e,t,n):e.hasOwnProperty("_default")||W(e,t,n):e._type===me.Array&&function(e,t,n){if(Y(e._elements))for(var r=0;r<t.length;r++)Fe(e._elements,t[r],"".concat(n,"[").concat(r,"]"));for(var o=0;o<t.length;o++){var i;q("".concat(n,"[").concat(o,"]"),null===(i=e._elements)||void 0===i?void 0:i._type,t[o])}}(e,t,n)}function He(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(e)if(t!==e._default&&Z(n,e._validators,t),X(t)){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=a.value,s=t[c],l=n+"."+c,f=e[c];e._type===me.Object&&e._elements?He(e._elements,s,l):He(f,s,l)}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}else if(Array.isArray(t)&&e._elements)for(var d=0;d<t.length;d++)He(e._elements,t[d],"".concat(n,"[").concat(d,"]"))}A(Re.getState(),De.getState()),Re.subscribe((function(e){return A(e,De.getState())})),De.subscribe((function(e){return A(Re.getState(),e)})),k(Re.getState(),De.getState()),Re.subscribe((function(e){return k(e,De.getState())})),De.subscribe((function(e){return k(Re.getState(),e)})),T(Re.getState(),De.getState()),Re.subscribe((function(e){return T(e,De.getState())})),De.subscribe((function(e){return T(Re.getState(),e)})),I(Re.getState(),Me.getState(),De.getState()),Re.subscribe((function(e){I(e,Me.getState(),De.getState())})),Me.subscribe((function(e){I(Re.getState(),e,De.getState())})),De.subscribe((function(e){I(Re.getState(),Me.getState(),e)}));var Ve=function(e,t){var n=ge(t);if(!e)return n;var r=!0,o=!1,i=void 0;try{for(var a,u=function(){var t=a.value,r=n[t],o=e[t];if(o&&o.hasOwnProperty("_default")){n.hasOwnProperty(t)||(n[t]=o._default);var i=o._elements;if(r&&Y(i))if(o._type===me.Array&&Array.isArray(r)){var u=r.map((function(e){return Ve(i,e)}));n[t]=u}else if(o._type===me.Object){var c=!0,s=!1,l=void 0;try{for(var f,d=Object.keys(r)[Symbol.iterator]();!(c=(f=d.next()).done);c=!0){var p=f.value;r[p]=Ve(i,r[p])}}catch(e){s=!0,l=e}finally{try{c||null==d.return||d.return()}finally{if(s)throw l}}}}else if(X(o)){var h=n.hasOwnProperty(t)?r:{};X(h)&&(n[t]=Ve(o,h))}},c=Object.keys(e)[Symbol.iterator]();!(r=(a=c.next()).done);r=!0)u()}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n},Ge=new Set,Ke={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:me.Array,_default:[]}},"Translation overrides":{_description:"Per-language overrides for frontend translations should be keyed by language code and each language dictionary contains the translation key and the display value",_type:me.Object,_default:{},_validators:[h((function(e){return Object.keys(e).every((function(e){return/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e)}))}),(function(e){var t=Object.keys(e).filter((function(e){return!/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e)}));return"The 'Translation overrides' object should have language codes for keys. Language codes must be in the form of a two-to-three letter language code optionally followed by a hyphen and a two-to-three letter country code. The following keys do not conform: ".concat(t.join(", "),".")}))]}},$e=function(e,t){return h((function(n){return e<=n&&n<=t}),"must be between ".concat(e," and ").concat(t))},ze=function(e){var t=e.concat(["openmrsBase","openmrsSpaBase"]);return h((function(e){if(!e||"string"!=typeof e)return!1;for(var n=/\${(.*?)}/g,r=n.exec(e);r;){if(!t.includes(r[1]))return!1;r=n.exec(e)}return!0}),"Should be a URL or path. The allowed template parameters are "+t.map((function(e){return"${"+e+"}"})).join(", "))},We=ze([]),qe=function(e){return h((function(t){return e.includes(t)}),"Must be one of the following: '".concat(e.join("', '"),"'."))},Ze={inRange:$e,isUrl:We,isUrlWithTemplateParameters:ze,oneOf:qe}}(),i}())}}}))},45:function(e){"use strict";e.exports=r},489:function(e){"use strict";e.exports=o},740:function(e){"use strict";e.exports=i},685:function(e){"use strict";e.exports=a},954:function(e){"use strict";e.exports=u},493:function(e){"use strict";e.exports=c},792:function(e){"use strict";e.exports=s}},n={};function l(e){var r=n[e];if(void 0!==r)return r.exports;var o=n[e]={exports:{}};return t[e](o,o.exports,l),o.exports}l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var f={};return function(){"use strict";var t=function(e,t){var n=(new DOMParser).parseFromString(t,"text/html").querySelector("svg");n&&(n.id=e,c.appendChild(n))},n=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,u=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(e,t)||r(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},r=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}},o=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},i='<svg viewBox="0 0 380 119" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.29 40.3278C45.3275 35.2904 52.2878 32.1739 59.9776 32.1739C67.6466 32.1739 74.5911 35.2765 79.6245 40.29L79.6454 21.7502C73.7513 18.7143 67.0622 17 59.9776 17C52.8891 17 46.1652 18.9309 40.2692 21.9679L40.29 40.3278Z" fill="var(--logo-red)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6454 79.6712C74.6079 84.7096 67.6506 87.8251 59.9608 87.8251C52.2918 87.8251 45.3473 84.7236 40.3099 79.709L40.29 98.2498C46.1871 101.285 52.8732 103 59.9608 103C67.0493 103 73.7374 101.285 79.6315 98.2488L79.6454 79.6712Z" fill="var(--logo-orange)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.3278 79.6961C35.2904 74.6586 32.1739 67.7012 32.1739 60.0114C32.1739 52.3425 35.2755 45.399 40.29 40.3616L21.7492 40.3417C18.7143 46.2378 17 52.9229 17 60.0114C17 67.1 18.7143 73.7881 21.7522 79.6831L40.3278 79.6961Z" fill="var(--logo-purple)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6344 40.289C84.6719 45.3255 87.7883 52.2868 87.7883 59.9766C87.7883 67.6456 84.6868 74.5901 79.6712 79.6225L98.213 79.6434C101.248 73.7493 102.962 67.0612 102.962 59.9766C102.962 52.8871 101.248 46.198 98.211 40.302L79.6344 40.289Z" fill="var(--logo-green)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M156.184 60.0025C156.184 51.2543 150.066 44.2264 141.159 44.2264C132.25 44.2264 126.134 51.2543 126.134 60.0025C126.134 68.7507 132.25 75.7816 141.159 75.7816C150.066 75.7816 156.184 68.7507 156.184 60.0025ZM121.303 60.0025C121.303 48.5205 129.621 40.0436 141.159 40.0436C152.695 40.0436 161.014 48.5205 161.014 60.0025C161.014 71.4875 152.695 79.9674 141.159 79.9674C129.621 79.9674 121.303 71.4875 121.303 60.0025Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M179.514 75.5401C185.021 75.5401 188.564 71.4 188.564 66.0585C188.564 60.717 185.021 56.575 179.514 56.575C174.009 56.575 170.468 60.717 170.468 66.0585C170.468 71.4 174.009 75.5401 179.514 75.5401ZM166.22 53.3064H170.468V57.0102H170.578C172.922 54.2853 176.027 52.6506 179.732 52.6506C187.746 52.6506 193.14 58.32 193.14 66.0585C193.14 73.6887 187.527 79.4645 180.388 79.4645C175.808 79.4645 172.157 77.1749 170.578 74.286H170.468V90.87H166.22V53.3064Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M217.773 63.7679C217.61 59.4629 214.773 56.575 210.087 56.575C205.402 56.575 202.297 59.4629 201.752 63.7679H217.773ZM221.426 74.1796C218.425 78.0484 214.83 79.4645 210.087 79.4645C202.077 79.4645 197.173 73.4711 197.173 66.0585C197.173 58.157 202.732 52.6506 210.253 52.6506C217.449 52.6506 222.349 57.5568 222.349 66.0049V67.3673H201.752C202.077 71.7797 205.456 75.5401 210.087 75.5401C213.737 75.5401 216.192 74.2333 218.207 71.6723L221.426 74.1796Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M227.854 59.3565C227.854 57.0102 227.638 54.9959 227.638 53.3064H231.669C231.669 54.6689 231.779 56.083 231.779 57.5012H231.889C233.033 54.9959 236.195 52.6506 240.389 52.6506C247.094 52.6506 250.088 56.9029 250.088 63.0603V78.8086H245.84V63.4986C245.84 59.2462 243.984 56.575 240.007 56.575C234.504 56.575 232.104 60.554 232.104 66.3865V78.8086H227.854V59.3565Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M259.211 41.0085H265.919L278.8 70.7909H278.907L291.889 41.0085H298.438V78.9994H293.932V47.1242H293.826L280.192 78.9994H277.454L263.825 47.1242H263.718V78.9994H259.211V41.0085Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M312.392 57.7516H316.415C321.407 57.7516 327.902 57.7516 327.902 51.47C327.902 45.9992 323.126 45.1943 318.725 45.1943H312.392V57.7516ZM307.886 41.0085H317.597C324.949 41.0085 332.729 42.0798 332.729 51.47C332.729 56.9973 329.135 60.5948 323.234 61.507L334.018 78.9994H328.493L318.189 61.9364H312.392V78.9994H307.886V41.0085Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M358.123 47.7125C356.617 45.2986 353.936 44.2264 351.197 44.2264C347.224 44.2264 343.097 46.1056 343.097 50.6113C343.097 54.1005 345.028 55.6577 351.091 57.5906C356.994 59.4688 362.468 61.3997 362.468 68.858C362.468 76.4246 355.973 79.9674 349.108 79.9674C344.706 79.9674 339.983 78.5174 337.408 74.7063L341.27 71.5412C342.88 74.3347 346.1 75.7816 349.375 75.7816C353.237 75.7816 357.638 73.5277 357.638 69.18C357.638 64.5112 354.473 63.7063 347.71 61.4524C342.344 59.6805 338.268 57.3183 338.268 50.989C338.268 43.6907 344.545 40.0436 351.197 40.0436C355.438 40.0436 359.033 41.2222 361.822 44.4947L358.123 47.7125Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M185.885 90.9982H187.309L190.043 97.3236H190.066L192.824 90.9982H194.215V99.0676H193.258V92.2971H193.234L190.34 99.0676H189.758L186.864 92.2971H186.842V99.0676H185.885V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M198.386 90.9982H203.457V91.8867H199.343V94.4168H203.184V95.3062H199.343V98.1782H203.663V99.0676H198.386V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M207.891 98.1782H209.713C211.561 98.1782 212.963 97.2431 212.963 95.0319C212.963 92.8218 211.561 91.8867 209.713 91.8867H207.891V98.1782ZM206.934 90.9982H210.034C211.617 90.9982 213.987 92.0586 213.987 95.0319C213.987 98.0083 211.617 99.0676 210.034 99.0676H206.934V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M217.007 99.0676H217.965V90.9982H217.007V99.0676Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M227.105 92.6628C226.627 92.0119 225.863 91.6819 225.088 91.6819C223.288 91.6819 222.011 93.266 222.011 95.0319C222.011 96.9012 223.277 98.3839 225.088 98.3839C226.068 98.3839 226.855 97.9844 227.425 97.255L228.143 97.8582C227.425 98.8281 226.377 99.2724 225.088 99.2724C222.774 99.2724 220.986 97.4826 220.986 95.0319C220.986 92.6628 222.695 90.7935 225.088 90.7935C226.183 90.7935 227.254 91.1701 227.937 92.0586L227.105 92.6628Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M233.557 92.2295H233.533L231.858 96.1947H235.152L233.557 92.2295ZM233.123 90.9982H234.023L237.453 99.0676H236.336L235.516 97.0841H231.482L230.65 99.0676H229.568L233.123 90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M240.006 90.9982H240.964V98.1782H244.656V99.0676H240.006V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M252.793 94.5539H253.648C254.708 94.5539 256.087 94.5539 256.087 93.2203C256.087 92.0586 255.073 91.8867 254.139 91.8867H252.793V94.5539ZM251.836 90.9982H253.899C255.46 90.9982 257.113 91.2258 257.113 93.2203C257.113 94.3939 256.349 95.1582 255.095 95.3519L257.386 99.0676H256.213L254.023 95.4434H252.793V99.0676H251.836V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M260.51 90.9982H265.58V91.8867H261.468V94.4168H265.308V95.3062H261.468V98.1782H265.786V99.0676H260.51V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M274.402 92.6628C273.923 92.0119 273.16 91.6819 272.384 91.6819C270.584 91.6819 269.307 93.266 269.307 95.0319C269.307 96.9012 270.573 98.3839 272.384 98.3839C273.364 98.3839 274.151 97.9844 274.72 97.255L275.438 97.8582C274.72 98.8281 273.672 99.2724 272.384 99.2724C270.071 99.2724 268.282 97.4826 268.282 95.0319C268.282 92.6628 269.991 90.7935 272.384 90.7935C273.478 90.7935 274.55 91.1701 275.234 92.0586L274.402 92.6628Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M284.739 95.0319C284.739 93.1746 283.439 91.6819 281.548 91.6819C279.656 91.6819 278.357 93.1746 278.357 95.0319C278.357 96.8903 279.656 98.3839 281.548 98.3839C283.439 98.3839 284.739 96.8903 284.739 95.0319ZM277.33 95.0319C277.33 92.5932 279.097 90.7935 281.548 90.7935C283.998 90.7935 285.765 92.5932 285.765 95.0319C285.765 97.4726 283.998 99.2724 281.548 99.2724C279.097 99.2724 277.33 97.4726 277.33 95.0319Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M289.514 94.5539H290.369C291.428 94.5539 292.807 94.5539 292.807 93.2203C292.807 92.0586 291.793 91.8867 290.859 91.8867H289.514V94.5539ZM288.556 90.9982H290.618C292.181 90.9982 293.833 91.2258 293.833 93.2203C293.833 94.3939 293.07 95.1582 291.817 95.3519L294.106 99.0676H292.933L290.744 95.4434H289.514V99.0676H288.556V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M297.81 98.1782H299.635C301.48 98.1782 302.881 97.2431 302.881 95.0319C302.881 92.8218 301.48 91.8867 299.635 91.8867H297.81V98.1782ZM296.853 90.9982H299.953C301.538 90.9982 303.909 92.0586 303.909 95.0319C303.909 98.0083 301.538 99.0676 299.953 99.0676H296.853V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M315.407 92.4223C315.089 91.9095 314.517 91.6819 313.937 91.6819C313.093 91.6819 312.216 92.0814 312.216 93.0384C312.216 93.7788 312.626 94.1097 313.914 94.5202C315.168 94.9187 316.331 95.3291 316.331 96.9132C316.331 98.5201 314.951 99.2724 313.493 99.2724C312.558 99.2724 311.555 98.9643 311.007 98.1554L311.828 97.4826C312.17 98.0759 312.854 98.3839 313.549 98.3839C314.37 98.3839 315.303 97.9049 315.303 96.9807C315.303 95.9899 314.633 95.818 313.196 95.341C312.057 94.9644 311.19 94.4625 311.19 93.1189C311.19 91.5677 312.523 90.7935 313.937 90.7935C314.837 90.7935 315.601 91.0439 316.193 91.7386L315.407 92.4223Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M320.844 95.5914L317.835 90.9982H319.054L321.323 94.6454L323.658 90.9982H324.81L321.8 95.5914V99.0676H320.844V95.5914Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M330.565 92.4223C330.245 91.9095 329.675 91.6819 329.094 91.6819C328.251 91.6819 327.374 92.0814 327.374 93.0384C327.374 93.7788 327.784 94.1097 329.072 94.5202C330.326 94.9187 331.487 95.3291 331.487 96.9132C331.487 98.5201 330.109 99.2724 328.65 99.2724C327.716 99.2724 326.713 98.9643 326.165 98.1554L326.986 97.4826C327.328 98.0759 328.012 98.3839 328.707 98.3839C329.528 98.3839 330.461 97.9049 330.461 96.9807C330.461 95.9899 329.79 95.818 328.354 95.341C327.215 94.9644 326.348 94.4625 326.348 93.1189C326.348 91.5677 327.681 90.7935 329.094 90.7935C329.995 90.7935 330.759 91.0439 331.351 91.7386L330.565 92.4223Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M339.283 91.8867H336.617V99.0676H335.659V91.8867H332.992V90.9982H339.283V91.8867Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M341.665 90.9982H346.736V91.8867H342.623V94.4168H346.463V95.3062H342.623V98.1782H346.942V99.0676H341.665V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M349.905 90.9982H351.329L354.064 97.3236H354.087L356.845 90.9982H358.236V99.0676H357.278V92.2971H357.255L354.361 99.0676H353.779L350.884 92.2971H350.863V99.0676H349.905V90.9982Z" fill="var(--logo-black)"/>\n</svg>\n',a='<svg id="omrs-logo-partial" viewBox="0 0 380 119" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.2901 40.3278C45.3275 35.2904 52.2879 32.1739 59.9777 32.1739C67.6466 32.1739 74.5911 35.2765 79.6246 40.29L79.6454 21.7502C73.7514 18.7143 67.0623 17 59.9777 17C52.8891 17 46.1653 18.9309 40.2692 21.9679L40.2901 40.3278Z" fill="var(--logo-red)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6454 79.6712C74.6079 84.7096 67.6506 87.8251 59.9608 87.8251C52.2918 87.8251 45.3473 84.7236 40.3099 79.709L40.29 98.2498C46.1871 101.285 52.8732 103 59.9608 103C67.0493 103 73.7374 101.285 79.6315 98.2488L79.6454 79.6712Z" fill="var(--logo-orange)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.3278 79.6961C35.2904 74.6586 32.1739 67.7012 32.1739 60.0114C32.1739 52.3425 35.2755 45.399 40.29 40.3616L21.7492 40.3417C18.7143 46.2378 17 52.9229 17 60.0114C17 67.1 18.7143 73.7881 21.7522 79.6831L40.3278 79.6961Z" fill="var(--logo-purple)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6344 40.289C84.6718 45.3255 87.7883 52.2868 87.7883 59.9766C87.7883 67.6456 84.6867 74.5901 79.6712 79.6225L98.213 79.6434C101.248 73.7493 102.962 67.0612 102.962 59.9766C102.962 52.8871 101.248 46.198 98.211 40.302L79.6344 40.289Z" fill="var(--logo-green)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M156.184 60.0025C156.184 51.2543 150.066 44.2264 141.159 44.2264C132.25 44.2264 126.134 51.2543 126.134 60.0025C126.134 68.7507 132.25 75.7816 141.159 75.7816C150.066 75.7816 156.184 68.7507 156.184 60.0025ZM121.303 60.0025C121.303 48.5205 129.621 40.0436 141.159 40.0436C152.695 40.0436 161.014 48.5205 161.014 60.0025C161.014 71.4875 152.695 79.9674 141.159 79.9674C129.621 79.9674 121.303 71.4875 121.303 60.0025Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M179.514 75.5401C185.021 75.5401 188.564 71.4 188.564 66.0585C188.564 60.717 185.021 56.575 179.514 56.575C174.009 56.575 170.468 60.717 170.468 66.0585C170.468 71.4 174.009 75.5401 179.514 75.5401ZM166.22 53.3064H170.468V57.0102H170.578C172.922 54.2853 176.027 52.6506 179.732 52.6506C187.746 52.6506 193.14 58.32 193.14 66.0585C193.14 73.6887 187.527 79.4645 180.388 79.4645C175.808 79.4645 172.157 77.1749 170.578 74.286H170.468V90.87H166.22V53.3064Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M217.773 63.7679C217.61 59.4629 214.773 56.575 210.087 56.575C205.402 56.575 202.297 59.4629 201.752 63.7679H217.773ZM221.426 74.1796C218.425 78.0484 214.83 79.4645 210.087 79.4645C202.077 79.4645 197.173 73.4711 197.173 66.0585C197.173 58.157 202.732 52.6506 210.253 52.6506C217.449 52.6506 222.349 57.5568 222.349 66.0049V67.3673H201.752C202.077 71.7797 205.456 75.5401 210.087 75.5401C213.737 75.5401 216.192 74.2333 218.207 71.6723L221.426 74.1796Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M227.854 59.3565C227.854 57.0102 227.638 54.9959 227.638 53.3064H231.669C231.669 54.6689 231.779 56.083 231.779 57.5012H231.889C233.033 54.9959 236.195 52.6506 240.389 52.6506C247.094 52.6506 250.088 56.9029 250.088 63.0603V78.8086H245.84V63.4986C245.84 59.2462 243.984 56.575 240.007 56.575C234.504 56.575 232.104 60.554 232.104 66.3865V78.8086H227.854V59.3565Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M259.211 41.0085H265.919L278.8 70.7909H278.907L291.889 41.0085H298.438V78.9994H293.932V47.1242H293.826L280.192 78.9994H277.454L263.825 47.1242H263.718V78.9994H259.211V41.0085Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M312.392 57.7516H316.415C321.407 57.7516 327.902 57.7516 327.902 51.47C327.902 45.9992 323.126 45.1943 318.725 45.1943H312.392V57.7516ZM307.886 41.0085H317.597C324.949 41.0085 332.729 42.0798 332.729 51.47C332.729 56.9973 329.135 60.5948 323.234 61.5071L334.018 78.9994H328.493L318.189 61.9364H312.392V78.9994H307.886V41.0085Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M358.123 47.7125C356.617 45.2986 353.936 44.2264 351.197 44.2264C347.224 44.2264 343.097 46.1056 343.097 50.6113C343.097 54.1005 345.028 55.6577 351.091 57.5906C356.994 59.4688 362.468 61.3997 362.468 68.858C362.468 76.4246 355.973 79.9674 349.108 79.9674C344.706 79.9674 339.983 78.5174 337.408 74.7063L341.27 71.5412C342.88 74.3347 346.1 75.7816 349.375 75.7816C353.237 75.7816 357.638 73.5277 357.638 69.18C357.638 64.5112 354.473 63.7063 347.71 61.4524C342.344 59.6805 338.268 57.3183 338.268 50.989C338.268 43.6907 344.545 40.0436 351.197 40.0436C355.438 40.0436 359.033 41.2222 361.822 44.4947L358.123 47.7125Z" fill="var(--logo-black)"/>\n</svg>\n',u='<svg id="omrs-logo-icon" width="121" height="118" viewBox="0 0 121 118" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.436 39.474C45.505 34.405 52.509 31.269 60.247 31.269C67.964 31.269 74.952 34.391 80.017 39.436L80.038 20.78C74.107 17.725 67.376 16 60.247 16C53.114 16 46.348 17.943 40.415 20.999L40.436 39.474Z" fill="var(--logo-red)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M80.038 79.064C74.969 84.134 67.968 87.269 60.23 87.269C52.513 87.269 45.525 84.148 40.456 79.102L40.436 97.759C46.37 100.813 53.098 102.539 60.23 102.539C67.363 102.539 74.093 100.813 80.024 97.758L80.038 79.064Z" fill="var(--logo-orange)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.474 79.089C35.405 74.02 32.269 67.019 32.269 59.281C32.269 51.564 35.39 44.577 40.436 39.508L21.779 39.488C18.725 45.421 17 52.148 17 59.281C17 66.414 18.725 73.144 21.782 79.076L40.474 79.089Z" fill="var(--logo-purple)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M80.027 39.435C85.096 44.503 88.232 51.508 88.232 59.246C88.232 66.963 85.111 73.951 80.064 79.015L98.722 79.036C101.776 73.105 103.501 66.375 103.501 59.246C103.501 52.112 101.776 45.381 98.72 39.448L80.027 39.435Z" fill="var(--logo-green)"/>\n</svg>\n',c=document.createElement("div"),s=function(){document.body.appendChild(c)};c.id="omrs-svgs-container",c.style.display="none","complete"===document.readyState?s():window.addEventListener("load",s);var f=l(714),d=l(489),p={"Brand color #1":{_default:"#005d5d",_type:d.Type.String},"Brand color #2":{_default:"#004144",_type:d.Type.String},"Brand color #3":{_default:"#007d79",_type:d.Type.String},preferredCalendar:{_type:d.Type.Object,_default:{am:"ethiopic"}}};Number.MAX_SAFE_INTEGER,l(954);var h=l(792),v={};try{process.env.CARBON_ENABLE_CSS_CUSTOM_PROPERTIES&&"true"===process.env.CARBON_ENABLE_CSS_CUSTOM_PROPERTIES?v.enableCssCustomProperties=!0:v.enableCssCustomProperties=!1,process.env.CARBON_ENABLE_USE_CONTROLLED_STATE_WITH_VALUE&&"true"===process.env.CARBON_ENABLE_USE_CONTROLLED_STATE_WITH_VALUE?v.enableUseControlledStateWithValue=!0:v.enableUseControlledStateWithValue=!1,process.env.CARBON_ENABLE_CSS_GRID&&"true"===process.env.CARBON_ENABLE_CSS_GRID?v.enableCssGrid=!0:v.enableCssGrid=!1,process.env.CARBON_ENABLE_V11_RELEASE?"true"===process.env.CARBON_ENABLE_V11_RELEASE?v.enableV11Release=!0:v.enableV11Release=!1:v.enableV11Release=!0,process.env.CARBON_ENABLE_EXPERIMENTAL_TILE_CONTRAST&&"true"===process.env.CARBON_ENABLE_EXPERIMENTAL_TILE_CONTRAST?v.enableExperimentalTileContrast=!0:v.enableExperimentalTileContrast=!1,process.env.CARBON_ENABLE_V12_TILE_DEFAULT_ICONS&&"true"===process.env.CARBON_ENABLE_V12_TILE_DEFAULT_ICONS?v.enableV12TileDefaultIcons=!0:v.enableV12TileDefaultIcons=!1,process.env.CARBON_ENABLE_V12_OVERFLOWMENU&&"true"===process.env.CARBON_ENABLE_V12_OVERFLOWMENU?v.enableV12Overflowmenu=!0:v.enableV12Overflowmenu=!1}catch(e){v.enableCssCustomProperties=!1,v.enableUseControlledStateWithValue=!1,v.enableCssGrid=!1,v.enableV11Release=!0,v.enableExperimentalTileContrast=!1,v.enableV12TileDefaultIcons=!1,v.enableV12Overflowmenu=!1}for(var y=[{name:"enable-css-custom-properties",description:"Describe what the flag does",enabled:v.enableCssCustomProperties},{name:"enable-use-controlled-state-with-value",description:"Enable components to be created in either a controlled or uncontrolled mode\n",enabled:v.enableUseControlledStateWithValue},{name:"enable-css-grid",description:"Enable CSS Grid Layout in the Grid and Column React components\n",enabled:v.enableCssGrid},{name:"enable-v11-release",description:"Enable the features and functionality for the v11 Release\n",enabled:v.enableV11Release},{name:"enable-experimental-tile-contrast",description:"Enable the experimental tile improved contrast styles\n",enabled:v.enableExperimentalTileContrast},{name:"enable-v12-tile-default-icons",description:"Enable rendering of default icons in the tile components\n",enabled:v.enableV12TileDefaultIcons},{name:"enable-v12-overflowmenu",description:"Enable the use of the v12 OverflowMenu leveraging the Menu subcomponents\n",enabled:v.enableV12Overflowmenu}],m=function(){function t(e){var n=this;(function(e,t){if(o=e,!(null!=(i=t)&&"undefined"!=typeof Symbol&&i[Symbol.hasInstance]?i[Symbol.hasInstance](o):(n=o,r=i,null!=r&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)))throw new TypeError("Cannot call a class as a function");var n,r,o,i})(this,t),this.flags=new Map,e&&Object.keys(e).forEach((function(t){n.flags.set(t,e[t])}))}var o,i;return o=t,i=[{key:"checkForFlag",value:function(e){if(!this.flags.has(e))throw new Error("Unable to find a feature flag with the name: `".concat(e,"`"))}},{key:"add",value:function(e,t){if(this.flags.has(e))throw new Error("The feature flag: ".concat(e," already exists"));this.flags.set(e,t)}},{key:"enable",value:function(e){this.checkForFlag(e),this.flags.set(e,!0)}},{key:"disable",value:function(e){this.checkForFlag(e),this.flags.set(e,!1)}},{key:"merge",value:function(e){var t=this;Object.keys(e).forEach((function(n){t.flags.set(n,e[n])}))}},{key:"mergeWithScope",value:function(e){var t,o=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=r(e))){n&&(e=n);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return u=e.done,e},e:function(e){c=!0,a=e},f:function(){try{u||null==n.return||n.return()}finally{if(c)throw a}}}}(e.flags);try{for(o.s();!(t=o.n()).done;){var i=n(t.value,2),a=i[0],u=i[1];this.flags.has(a)||this.flags.set(a,u)}}catch(e){o.e(e)}finally{o.f()}}},{key:"enabled",value:function(e){return this.checkForFlag(e),this.flags.get(e)}}],i&&function(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,"symbol"==(void 0===(a=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key))?"undefined":(i=a)&&"undefined"!=typeof Symbol&&i.constructor===Symbol?"symbol":void 0===i?"undefined":e(i))?a:String(a),o)}var i,a}(o.prototype,i),Object.defineProperty(o,"prototype",{writable:!1}),t}(),g=new m(void 0),b=0;b<y.length;b++){var w=y[b];g.add(w.name,w.enabled)}!function(){g.merge.apply(g,arguments)}({"enable-css-custom-properties":!0,"enable-css-grid":!0,"enable-v11-release":!0,"enable-experimental-tile-contrast":!1}),l(279),new h.Subject,new h.Subject,new h.Subject,l(976),new h.Subject,l(45);var S,O=l(685);(0,O.createGlobalStore)("globalModalState",{modalContainer:null,modalStack:[]}),window.getComputedStyle(document.body).overflow,l(740),(0,O.createGlobalStore)("left-nav",{slotName:null,basePath:window.spaBase}),(0,d.defineConfigSchema)("@openmrs/esm-styleguide",p),S=function(e,t){document.documentElement.style.setProperty(e,t)},(0,f.getConfigStore)("@openmrs/esm-styleguide").subscribe((function(e){e.loaded&&e.config&&(S("--brand-01",e.config["Brand color #1"]),S("--brand-02",e.config["Brand color #2"]),S("--brand-03",e.config["Brand color #3"]))})),t("omrs-logo-full-color",i),t("omrs-logo-full-mono",i),t("omrs-logo-full-grey",i),t("omrs-logo-partial-color",a),t("omrs-logo-partial-mono",a),t("omrs-logo-partial-grey",a),t("omrs-logo-icon-color",u),t("omrs-logo-icon-mono",u),t("omrs-logo-icon-grey",u),t("omrs-logo-white",'<svg id="omrs-logo-white" viewBox="0 0 380 119" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.2901 40.3278C45.3275 35.2904 52.2879 32.1739 59.9777 32.1739C67.6466 32.1739 74.5911 35.2765 79.6246 40.29L79.6454 21.7502C73.7514 18.7143 67.0623 17 59.9777 17C52.8891 17 46.1653 18.9309 40.2692 21.9679L40.2901 40.3278Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6454 79.6712C74.6079 84.7096 67.6506 87.8251 59.9608 87.8251C52.2918 87.8251 45.3473 84.7236 40.3099 79.709L40.29 98.2498C46.1871 101.285 52.8732 103 59.9608 103C67.0493 103 73.7374 101.285 79.6315 98.2488L79.6454 79.6712Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.3278 79.6961C35.2904 74.6586 32.1739 67.7012 32.1739 60.0114C32.1739 52.3425 35.2755 45.399 40.29 40.3616L21.7492 40.3417C18.7143 46.2378 17 52.9229 17 60.0114C17 67.1 18.7143 73.7881 21.7522 79.6831L40.3278 79.6961Z" fill="var(--logo-grey)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6344 40.289C84.6718 45.3255 87.7883 52.2868 87.7883 59.9766C87.7883 67.6456 84.6867 74.5901 79.6712 79.6225L98.213 79.6434C101.248 73.7493 102.962 67.0612 102.962 59.9766C102.962 52.8871 101.248 46.198 98.211 40.302L79.6344 40.289Z" fill="var(--logo-grey)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M156.184 60.0025C156.184 51.2543 150.066 44.2264 141.159 44.2264C132.25 44.2264 126.134 51.2543 126.134 60.0025C126.134 68.7507 132.25 75.7816 141.159 75.7816C150.066 75.7816 156.184 68.7507 156.184 60.0025ZM121.303 60.0025C121.303 48.5205 129.621 40.0436 141.159 40.0436C152.695 40.0436 161.014 48.5205 161.014 60.0025C161.014 71.4875 152.695 79.9674 141.159 79.9674C129.621 79.9674 121.303 71.4875 121.303 60.0025Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M179.514 75.5401C185.021 75.5401 188.564 71.4 188.564 66.0585C188.564 60.717 185.021 56.575 179.514 56.575C174.009 56.575 170.468 60.717 170.468 66.0585C170.468 71.4 174.009 75.5401 179.514 75.5401ZM166.22 53.3064H170.468V57.0102H170.578C172.922 54.2853 176.027 52.6506 179.732 52.6506C187.746 52.6506 193.14 58.32 193.14 66.0585C193.14 73.6887 187.527 79.4645 180.388 79.4645C175.808 79.4645 172.157 77.1749 170.578 74.286H170.468V90.87H166.22V53.3064Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M217.773 63.7679C217.61 59.4629 214.773 56.575 210.087 56.575C205.402 56.575 202.297 59.4629 201.752 63.7679H217.773ZM221.426 74.1796C218.425 78.0484 214.83 79.4645 210.087 79.4645C202.077 79.4645 197.173 73.4711 197.173 66.0585C197.173 58.157 202.732 52.6506 210.253 52.6506C217.449 52.6506 222.349 57.5568 222.349 66.0049V67.3673H201.752C202.077 71.7797 205.456 75.5401 210.087 75.5401C213.737 75.5401 216.192 74.2333 218.207 71.6723L221.426 74.1796Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M227.854 59.3565C227.854 57.0102 227.638 54.9959 227.638 53.3064H231.669C231.669 54.6689 231.779 56.083 231.779 57.5012H231.889C233.033 54.9959 236.195 52.6506 240.389 52.6506C247.094 52.6506 250.088 56.9029 250.088 63.0603V78.8086H245.84V63.4986C245.84 59.2462 243.984 56.575 240.007 56.575C234.504 56.575 232.104 60.554 232.104 66.3865V78.8086H227.854V59.3565Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M259.211 41.0085H265.919L278.8 70.7909H278.907L291.889 41.0085H298.438V78.9994H293.932V47.1242H293.826L280.192 78.9994H277.454L263.825 47.1242H263.718V78.9994H259.211V41.0085Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M312.392 57.7516H316.415C321.407 57.7516 327.902 57.7516 327.902 51.47C327.902 45.9992 323.126 45.1943 318.725 45.1943H312.392V57.7516ZM307.886 41.0085H317.597C324.949 41.0085 332.729 42.0798 332.729 51.47C332.729 56.9973 329.135 60.5948 323.234 61.5071L334.018 78.9994H328.493L318.189 61.9364H312.392V78.9994H307.886V41.0085Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M358.123 47.7125C356.617 45.2986 353.936 44.2264 351.197 44.2264C347.224 44.2264 343.097 46.1056 343.097 50.6113C343.097 54.1005 345.028 55.6577 351.091 57.5906C356.994 59.4688 362.468 61.3997 362.468 68.858C362.468 76.4246 355.973 79.9674 349.108 79.9674C344.706 79.9674 339.983 78.5174 337.408 74.7063L341.27 71.5412C342.88 74.3347 346.1 75.7816 349.375 75.7816C353.237 75.7816 357.638 73.5277 357.638 69.18C357.638 64.5112 354.473 63.7063 347.71 61.4524C342.344 59.6805 338.268 57.3183 338.268 50.989C338.268 43.6907 344.545 40.0436 351.197 40.0436C355.438 40.0436 359.033 41.2222 361.822 44.4947L358.123 47.7125Z" fill="var(--logo-white)"/>\n</svg>\n'),t("omrs-icon-visibility",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/action/visibility_24px">\n <path id="icon/action/visibility_24px_2" fill-rule="evenodd" clip-rule="evenodd" d="M12 4.5C7 4.5 2.72998 7.60999 1 12C2.72998 16.39 7 19.5 12 19.5C17 19.5 21.27 16.39 23 12C21.27 7.60999 17 4.5 12 4.5ZM12 17C9.23999 17 7 14.76 7 12C7 9.23999 9.23999 7 12 7C14.76 7 17 9.23999 17 12C17 14.76 14.76 17 12 17ZM9 12C9 10.34 10.34 9 12 9C13.66 9 15 10.34 15 12C15 13.66 13.66 15 12 15C10.34 15 9 13.66 9 12Z"/>\n </g>\n <title>Visibility rounded</title>\n</svg>\n'),t("omrs-icon-menu",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/menu_24px">\n <path id="icon/navigation/menu_24px_2" fill-rule="evenodd" clip-rule="evenodd" d="M4 8C3.44995 8 3 7.54999 3 7C3 6.45001 3.44995 6 4 6H20C20.55 6 21 6.45001 21 7C21 7.54999 20.55 8 20 8H4ZM4 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H4C3.44995 11 3 11.45 3 12C3 12.55 3.44995 13 4 13ZM4 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H4C3.44995 16 3 16.45 3 17C3 17.55 3.44995 18 4 18Z"/>\n </g>\n <title>Menu rounded</title>\n</svg>\n'),t("omrs-icon-search",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/action/search_24px">\n <path id="icon/action/search_24px_2" fill-rule="evenodd" clip-rule="evenodd" d="M15.1865 14.4716H15.9765L20.2165 18.7316C20.6266 19.1416 20.6266 19.8116 20.2165 20.2216C19.8065 20.6316 19.1366 20.6316 18.7265 20.2216L14.4765 15.9716V15.1816L14.2065 14.9016C12.8065 16.1016 10.8966 16.7216 8.86655 16.3816C6.08652 15.9116 3.86655 13.5916 3.52658 10.7916C3.00656 6.56158 6.5665 3.00158 10.7966 3.52157C13.5965 3.86157 15.9166 6.08157 16.3866 8.86157C16.7265 10.8916 16.1065 12.8016 14.9066 14.2016L15.1865 14.4716ZM5.47653 9.97155C5.47653 12.4615 7.48654 14.4716 9.97653 14.4716C12.4665 14.4716 14.4765 12.4615 14.4765 9.97155C14.4765 7.48156 12.4665 5.47155 9.97653 5.47155C7.48654 5.47155 5.47653 7.48156 5.47653 9.97155Z"/>\n </g>\n <title>Search rounded</title>\n</svg>\n'),t("omrs-icon-arrow-back",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/arrow_back_24px">\n <path id="icon/navigation/arrow_back_24px_2" d="M18.7912 11.005H7.62124L12.5012 6.12499C12.8912 5.73499 12.8912 5.09499 12.5012 4.70499C12.3144 4.51774 12.0608 4.41251 11.7962 4.41251C11.5317 4.41251 11.2781 4.51774 11.0912 4.70499L4.50124 11.295C4.11124 11.685 4.11124 12.315 4.50124 12.705L11.0912 19.295C11.4812 19.685 12.1112 19.685 12.5012 19.295C12.8912 18.905 12.8912 18.275 12.5012 17.885L7.62124 13.005H18.7912C19.3412 13.005 19.7912 12.555 19.7912 12.005C19.7912 11.455 19.3412 11.005 18.7912 11.005Z"/>\n </g>\n <title>Arrow back rounded</title>\n</svg>\n'),t("omrs-icon-arrow-forward",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <path d="M5 13h11.17l-4.88 4.88c-.39.39-.39 1.03 0 1.42.39.39 1.02.39 1.41 0l6.59-6.59c.39-.39.39-1.02 0-1.41l-6.58-6.6c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L16.17 11H5c-.55 0-1 .45-1 1s.45 1 1 1z"/>\n <title>Arrow forward rounded</title>\n</svg>'),t("omrs-icon-arrow-downward",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/arrow_downward_24px">\n <path id="icon/navigation/arrow_downward_24px_2" d="M11.005 5.20874V16.3787L6.12498 11.4987C5.73498 11.1087 5.09498 11.1087 4.70498 11.4987C4.31498 11.8887 4.31498 12.5187 4.70498 12.9087L11.295 19.4987C11.685 19.8887 12.315 19.8887 12.705 19.4987L19.295 12.9087C19.685 12.5187 19.685 11.8887 19.295 11.4987C19.1081 11.3115 18.8545 11.2063 18.59 11.2063C18.3255 11.2063 18.0718 11.3115 17.885 11.4987L13.005 16.3787V5.20874C13.005 4.65874 12.555 4.20874 12.005 4.20874C11.455 4.20874 11.005 4.65874 11.005 5.20874Z"/>\n </g>\n <title>Arrow downward rounded</title>\n</svg>\n'),t("omrs-icon-arrow-upward",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/arrow_upward_24px">\n <path id="icon/navigation/arrow_upward_24px_2" d="M13 18.7913V7.62126L17.88 12.5013C18.27 12.8913 18.91 12.8913 19.3 12.5013C19.69 12.1113 19.69 11.4813 19.3 11.0913L12.71 4.50126C12.5231 4.314 12.2695 4.20877 12.005 4.20877C11.7405 4.20877 11.4868 4.314 11.3 4.50126L4.69997 11.0813C4.30997 11.4713 4.30997 12.1013 4.69997 12.4913C5.08997 12.8813 5.71997 12.8813 6.10997 12.4913L11 7.62126V18.7913C11 19.3413 11.45 19.7913 12 19.7913C12.55 19.7913 13 19.3413 13 18.7913Z"/>\n </g>\n <title>Arrow upward rounded </title>\n</svg>\n'),t("omrs-icon-chevron-left",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/chevron_left_24px">\n <path id="icon/navigation/chevron_left_24px_2" d="M15 6.70499C14.8132 6.51774 14.5595 6.41251 14.295 6.41251C14.0305 6.41251 13.7769 6.51774 13.59 6.70499L9.00002 11.295C8.61002 11.685 8.61002 12.315 9.00002 12.705L13.59 17.295C13.98 17.685 14.61 17.685 15 17.295C15.39 16.905 15.39 16.275 15 15.885L11.12 11.995L15 8.11499C15.39 7.72499 15.38 7.08499 15 6.70499Z"/>\n </g>\n <title>Chevron left</title>\n</svg>\n'),t("omrs-icon-chevron-right",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/chevron_right_24px">\n <path id="icon/navigation/chevron_right_24px_2" d="M9.00002 6.71063C8.61002 7.10063 8.61002 7.73063 9.00002 8.12063L12.88 12.0006L9.00002 15.8806C8.61002 16.2706 8.61002 16.9006 9.00002 17.2906C9.39002 17.6806 10.02 17.6806 10.41 17.2906L15 12.7006C15.39 12.3106 15.39 11.6806 15 11.2906L10.41 6.70063C10.03 6.32063 9.39002 6.32063 9.00002 6.71063Z"/>\n </g>\n <title>Chevron right</title>\n</svg>\n'),t("omrs-icon-chevron-up",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/chevron_up_24px">\n <path d="M11.29 8.71L6.7 13.3c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 10.83l3.88 3.88c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L12.7 8.71c-.38-.39-1.02-.39-1.41 0z"/>\n </g>\n <title>Chevron up</title>\n</svg>\n'),t("omrs-icon-chevron-down",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/chevron_down_24px">\n <path id="icon/navigation/chevron_down_24px" d="M8.12 9.29L12 13.17l3.88-3.88c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41l-4.59 4.59c-.39.39-1.02.39-1.41 0L6.7 10.7c-.39-.39-.39-1.02 0-1.41.39-.38 1.03-.39 1.42 0z"/>\n </g>\n <title>Chevron down</title>\n</svg>\n'),t("omrs-icon-supervised-user-circle",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/action/supervised_user_circle_24px">\n <path id="icon/action/supervised_user_circle_24px_2" fill-rule="evenodd" clip-rule="evenodd" d="M12 2C6.47998 2 2 6.48001 2 12C2 17.52 6.47998 22 12 22C17.52 22 22 17.52 22 12C22 6.48001 17.52 2 12 2ZM15.61 8.34C16.6801 8.34 17.54 9.19998 17.54 10.27C17.54 11.34 16.6801 12.2 15.61 12.2C14.54 12.2 13.6801 11.34 13.6801 10.27C13.67 9.19998 14.54 8.34 15.61 8.34ZM11.97 9.12C11.97 7.82001 10.91 6.76001 9.60999 6.76001C8.30005 6.76001 7.25 7.81 7.25 9.12C7.25 10.42 8.31006 11.48 9.60999 11.48C10.91 11.48 11.97 10.42 11.97 9.12ZM9.60999 15.89V19.64C7.20996 18.89 5.30994 17.04 4.46997 14.68C5.52002 13.56 8.14001 12.99 9.60999 12.99C10.14 12.99 10.8099 13.07 11.51 13.21C9.87 14.08 9.60999 15.23 9.60999 15.89ZM11.21 19.96C11.47 19.99 11.73 20 12 20C15.39 20 18.2799 17.88 19.45 14.91C18.5299 14.15 16.6799 13.76 15.61 13.76C14.1499 13.76 11.21 14.47 11.21 15.89V19.96Z"/>\n </g>\n <title>Supervised user circle rounded</title>\n</svg>\n'),t("omrs-icon-home",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n<g id="icon/navigation/home_24px">\n <path id="icon/navigation/home_24px" d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z"/>\n</g>\n<title>Home rounded</title>\n</svg>'),t("omrs-icon-close",'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path d="M18.3 5.71c-.39-.39-1.02-.39-1.41 0L12 10.59 7.11 5.7c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"/>\n <title>Close icon</title>\n</svg>'),t("omrs-icon-important-notification",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/important_notification_24px_rounded">\n <path d="M12 23c1.1 0 1.99-.89 1.99-1.99h-3.98c0 1.1.89 1.99 1.99 1.99zm8.29-4.71L19 17v-6c0-3.35-2.36-6.15-5.5-6.83V3c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v1.17C7.36 4.85 5 7.65 5 11v6l-1.29 1.29c-.63.63-.19 1.71.7 1.71h15.17c.9 0 1.34-1.08.71-1.71zM13 16h-2v-2h2v2zm0-5c0 .55-.45 1-1 1s-1-.45-1-1V9c0-.55.45-1 1-1s1 .45 1 1v2z"/>\n </g>\n <title>Important notification</title>\n</svg>\n'),t("omrs-icon-calendar",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/callend/calendar24px">\n <path d="M20 3h-1V2c0-.55-.45-1-1-1s-1 .45-1 1v1H7V2c0-.55-.45-1-1-1s-1 .45-1 1v1H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-1 18H5c-.55 0-1-.45-1-1V8h16v12c0 .55-.45 1-1 1z"/>\n </g>\n <title>Calendar rounded</title>\n</svg>'),t("omrs-icon-access-time",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/callend/access_time24px">\n <path id="icon/callend/access_time24px" d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm-.22-13h-.06c-.4 0-.72.32-.72.72v4.72c0 .35.18.68.49.86l4.15 2.49c.34.2.78.1.98-.24.21-.34.1-.79-.25-.99l-3.87-2.3V7.72c0-.4-.32-.72-.72-.72z" />\n </g>\n <title>Access time rounded</title>\n</svg>'),t("omrs-icon-add",'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <g id="icon/content/add-24px">\n <path d="M18 13h-5v5c0 .55-.45 1-1 1s-1-.45-1-1v-5H6c-.55 0-1-.45-1-1s.45-1 1-1h5V6c0-.55.45-1 1-1s1 .45 1 1v5h5c.55 0 1 .45 1 1s-.45 1-1 1z"/>\n </g>\n <title>Add rounded</title>\n</svg>\n'),t("omrs-icon-remove",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/content/add-24px">\n <path d="M18 13H6c-.55 0-1-.45-1-1s.45-1 1-1h12c.55 0 1 .45 1 1s-.45 1-1 1z"/>\n </g>\n <title>Remove rounded</title>\n</svg>\n'),t("omrs-icon-check-circle",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/>\n <title>Check circle</title>\n</svg>\n'),t("omrs-icon-zoomoutmap",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/action/visibility_24px">\n <path d="M15.85 3.85L17.3 5.3l-2.18 2.16c-.39.39-.39 1.03 0 1.42.39.39 1.03.39 1.42 0L18.7 6.7l1.45 1.45c.31.31.85.09.85-.36V3.5c0-.28-.22-.5-.5-.5h-4.29c-.45 0-.67.54-.36.85zm-12 4.3L5.3 6.7l2.16 2.18c.39.39 1.03.39 1.42 0 .39-.39.39-1.03 0-1.42L6.7 5.3l1.45-1.45c.31-.31.09-.85-.36-.85H3.5c-.28 0-.5.22-.5.5v4.29c0 .45.54.67.85.36zm4.3 12L6.7 18.7l2.18-2.16c.39-.39.39-1.03 0-1.42-.39-.39-1.03-.39-1.42 0L5.3 17.3l-1.45-1.45c-.31-.31-.85-.09-.85.36v4.29c0 .28.22.5.5.5h4.29c.45 0 .67-.54.36-.85zm12-4.3L18.7 17.3l-2.16-2.18c-.39-.39-1.03-.39-1.42 0-.39.39-.39 1.03 0 1.42l2.18 2.16-1.45 1.45c-.31.31-.09.85.36.85h4.29c.28 0 .5-.22.5-.5v-4.29c0-.45-.54-.67-.85-.36z" />\n </g>\n <title>\n Zoom Out \n </title>\n</svg>'),t("omrs-icon-location",'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24">\n <path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"/>\n <path d="M0 0h24v24H0z" class="omrs-icon-location"/>\n <title>Location icon</title>\n</svg>'),t("omrs-icon-download",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM17 13l-5 5-5-5h3V9h4v4h3z" />\n <title>Download icon</title>\n</svg>')}(),function(){"use strict";l.r(f)}(),f}())}}}))},8831:()=>{function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function r(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}function o(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||a(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,n){if(t){if("string"==typeof t)return e(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,n):void 0}}System.register(["dayjs","i18next"],(function(n,u){var c={},s={};return{setters:[function(e){c.default=e.default},function(e){s.default=e.default}],execute:function(){n(function(){var n={332:function(e){e.exports=function(){"use strict";return function(e,t,n){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=n();return this.format(e)===t.format(e)}}}()},14:function(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,o,i){var a=o.prototype;i.utc=function(e){return new o({date:e,utc:!0,args:arguments})},a.utc=function(t){var n=i(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},a.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var u=a.parse;a.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),u.call(this,e)};var c=a.init;a.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else c.call(this)};var s=a.utcOffset;a.utcOffset=function(r,o){var i=this.$utils().u;if(i(r))return this.$u?0:i(this.$offset)?s.call(this):this.$offset;if("string"==typeof r&&(r=function(e){void 0===e&&(e="");var r=e.match(t);if(!r)return null;var o=(""+r[0]).match(n)||["-",0,0],i=o[0],a=60*+o[1]+ +o[2];return 0===a?0:"+"===i?a:-a}(r),null===r))return this;var a=Math.abs(r)<=16?60*r:r,u=this;if(o)return u.$offset=a,u.$u=0===r,u;if(0!==r){var c=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(u=this.local().add(a+c,e)).$offset=a,u.$x.$localOffset=c}else u=this.utc();return u};var l=a.format;a.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return l.call(this,t)},a.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var f=a.toDate;a.toDate=function(e){return"s"===e&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():f.call(this)};var d=a.diff;a.diff=function(e,t,n){if(e&&this.$u===e.$u)return d.call(this,e,t,n);var r=this.local(),o=i(e).local();return d.call(r,o,t,n)}}}()},257:function(e,n,i){var a=Symbol("SemVer ANY"),u=function(){"use strict";function e(n,r){if(t(this,e),r&&"object"==typeof r||(r={loose:!!r,includePrerelease:!1}),o(n,e)){if(n.loose===!!r.loose)return n;n=n.value}d("comparator",n,r),this.options=r,this.loose=!!r.loose,this.parse(n),this.semver===a?this.value="":this.value=this.operator+this.semver.version,d("comp",this)}return r(e,[{key:"parse",value:function(e){var t=this.options.loose?s[l.COMPARATORLOOSE]:s[l.COMPARATOR],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: ".concat(e));this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new p(n[2],this.options.loose):this.semver=a}},{key:"toString",value:function(){return this.value}},{key:"test",value:function(e){if(d("Comparator.test",e,this.options.loose),this.semver===a||e===a)return!0;if("string"==typeof e)try{e=new p(e,this.options)}catch(e){return!1}return f(e,this.operator,this.semver,this.options)}},{key:"intersects",value:function(t,n){if(!o(t,e))throw new TypeError("a Comparator is required");if(n&&"object"==typeof n||(n={loose:!!n,includePrerelease:!1}),""===this.operator)return""===this.value||new h(t.value,n).test(this.value);if(""===t.operator)return""===t.value||new h(this.value,n).test(t.semver);var r=!(">="!==this.operator&&">"!==this.operator||">="!==t.operator&&">"!==t.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==t.operator&&"<"!==t.operator),a=this.semver.version===t.semver.version,u=!(">="!==this.operator&&"<="!==this.operator||">="!==t.operator&&"<="!==t.operator),c=f(this.semver,"<",t.semver,n)&&(">="===this.operator||">"===this.operator)&&("<="===t.operator||"<"===t.operator),s=f(this.semver,">",t.semver,n)&&("<="===this.operator||"<"===this.operator)&&(">="===t.operator||">"===t.operator);return r||i||a&&u||c||s}}],[{key:"ANY",get:function(){return a}}]),e}();e.exports=u;var c=i(765),s=c.re,l=c.t,f=i(539),d=i(225),p=i(376),h=i(902)},902:function(e,n,i){var a=function(){"use strict";function e(n,r){var i=this;if(t(this,e),r&&"object"==typeof r||(r={loose:!!r,includePrerelease:!1}),o(n,e))return n.loose===!!r.loose&&n.includePrerelease===!!r.includePrerelease?n:new e(n.raw,r);if(o(n,u))return this.raw=n.value,this.set=[[n]],this.format(),this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=n,this.set=n.split(/\s*\|\|\s*/).map((function(e){return i.parseRange(e.trim())})).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: ".concat(n));this.format()}return r(e,[{key:"format",value:function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range}},{key:"toString",value:function(){return this.range}},{key:"parseRange",value:function(e){var t=this,n=this.options.loose;e=e.trim();var r=n?f[d.HYPHENRANGELOOSE]:f[d.HYPHENRANGE];e=e.replace(r,C(this.options.includePrerelease)),c("hyphen replace",e),e=e.replace(f[d.COMPARATORTRIM],p),c("comparator trim",e,f[d.COMPARATORTRIM]),e=(e=(e=e.replace(f[d.TILDETRIM],h)).replace(f[d.CARETTRIM],v)).split(/\s+/).join(" ");var o=n?f[d.COMPARATORLOOSE]:f[d.COMPARATOR];return e.split(" ").map((function(e){return m(e,t.options)})).join(" ").split(/\s+/).map((function(e){return x(e,t.options)})).filter(this.options.loose?function(e){return!!e.match(o)}:function(){return!0}).map((function(e){return new u(e,t.options)}))}},{key:"intersects",value:function(t,n){if(!o(t,e))throw new TypeError("a Range is required");return this.set.some((function(e){return y(e,n)&&t.set.some((function(t){return y(t,n)&&e.every((function(e){return t.every((function(t){return e.intersects(t,n)}))}))}))}))}},{key:"test",value:function(e){if(!e)return!1;if("string"==typeof e)try{e=new s(e,this.options)}catch(e){return!1}for(var t=0;t<this.set.length;t++)if(P(this.set[t],e,this.options))return!0;return!1}}]),e}();e.exports=a;var u=i(257),c=i(225),s=i(376),l=i(765),f=l.re,d=l.t,p=l.comparatorTrimReplace,h=l.tildeTrimReplace,v=l.caretTrimReplace,y=function(e,t){for(var n=!0,r=e.slice(),o=r.pop();n&&r.length;)n=r.every((function(e){return o.intersects(e,t)})),o=r.pop();return n},m=function(e,t){return c("comp",e,t),e=S(e,t),c("caret",e),e=b(e,t),c("tildes",e),e=E(e,t),c("xrange",e),e=j(e,t),c("stars",e),e},g=function(e){return!e||"x"===e.toLowerCase()||"*"===e},b=function(e,t){return e.trim().split(/\s+/).map((function(e){return w(e,t)})).join(" ")},w=function(e,t){var n=t.loose?f[d.TILDELOOSE]:f[d.TILDE];return e.replace(n,(function(t,n,r,o,i){var a;return c("tilde",e,t,n,r,o,i),g(n)?a="":g(r)?a=">=".concat(n,".0.0 <").concat(+n+1,".0.0-0"):g(o)?a=">=".concat(n,".").concat(r,".0 <").concat(n,".").concat(+r+1,".0-0"):i?(c("replaceTilde pr",i),a=">=".concat(n,".").concat(r,".").concat(o,"-").concat(i," <").concat(n,".").concat(+r+1,".0-0")):a=">=".concat(n,".").concat(r,".").concat(o," <").concat(n,".").concat(+r+1,".0-0"),c("tilde return",a),a}))},S=function(e,t){return e.trim().split(/\s+/).map((function(e){return O(e,t)})).join(" ")},O=function(e,t){c("caret",e,t);var n=t.loose?f[d.CARETLOOSE]:f[d.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,(function(t,n,o,i,a){var u;return c("caret",e,t,n,o,i,a),g(n)?u="":g(o)?u=">=".concat(n,".0.0").concat(r," <").concat(+n+1,".0.0-0"):g(i)?u="0"===n?">=".concat(n,".").concat(o,".0").concat(r," <").concat(n,".").concat(+o+1,".0-0"):">=".concat(n,".").concat(o,".0").concat(r," <").concat(+n+1,".0.0-0"):a?(c("replaceCaret pr",a),u="0"===n?"0"===o?">=".concat(n,".").concat(o,".").concat(i,"-").concat(a," <").concat(n,".").concat(o,".").concat(+i+1,"-0"):">=".concat(n,".").concat(o,".").concat(i,"-").concat(a," <").concat(n,".").concat(+o+1,".0-0"):">=".concat(n,".").concat(o,".").concat(i,"-").concat(a," <").concat(+n+1,".0.0-0")):(c("no pr"),u="0"===n?"0"===o?">=".concat(n,".").concat(o,".").concat(i).concat(r," <").concat(n,".").concat(o,".").concat(+i+1,"-0"):">=".concat(n,".").concat(o,".").concat(i).concat(r," <").concat(n,".").concat(+o+1,".0-0"):">=".concat(n,".").concat(o,".").concat(i," <").concat(+n+1,".0.0-0")),c("caret return",u),u}))},E=function(e,t){return c("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return _(e,t)})).join(" ")},_=function(e,t){e=e.trim();var n=t.loose?f[d.XRANGELOOSE]:f[d.XRANGE];return e.replace(n,(function(n,r,o,i,a,u){c("xRange",e,n,r,o,i,a,u);var s=g(o),l=s||g(i),f=l||g(a),d=f;return"="===r&&d&&(r=""),u=t.includePrerelease?"-0":"",s?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&d?(l&&(i=0),a=0,">"===r?(r=">=",l?(o=+o+1,i=0,a=0):(i=+i+1,a=0)):"<="===r&&(r="<",l?o=+o+1:i=+i+1),"<"===r&&(u="-0"),n="".concat(r+o,".").concat(i,".").concat(a).concat(u)):l?n=">=".concat(o,".0.0").concat(u," <").concat(+o+1,".0.0-0"):f&&(n=">=".concat(o,".").concat(i,".0").concat(u," <").concat(o,".").concat(+i+1,".0-0")),c("xRange return",n),n}))},j=function(e,t){return c("replaceStars",e,t),e.trim().replace(f[d.STAR],"")},x=function(e,t){return c("replaceGTE0",e,t),e.trim().replace(f[t.includePrerelease?d.GTE0PRE:d.GTE0],"")},C=function(e){return function(t,n,r,o,i,a,u,c,s,l,f,d,p){return"".concat(n=g(r)?"":g(o)?">=".concat(r,".0.0").concat(e?"-0":""):g(i)?">=".concat(r,".").concat(o,".0").concat(e?"-0":""):a?">=".concat(n):">=".concat(n).concat(e?"-0":"")," ").concat(c=g(s)?"":g(l)?"<".concat(+s+1,".0.0-0"):g(f)?"<".concat(s,".").concat(+l+1,".0-0"):d?"<=".concat(s,".").concat(l,".").concat(f,"-").concat(d):e?"<".concat(s,".").concat(l,".").concat(+f+1,"-0"):"<=".concat(c)).trim()}},P=function(e,t,n){for(var r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(var o=0;o<e.length;o++)if(c(e[o].semver),e[o].semver!==u.ANY&&e[o].semver.prerelease.length>0){var i=e[o].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0}},376:function(e,n,i){var a=i(225),u=i(295),c=u.MAX_LENGTH,s=u.MAX_SAFE_INTEGER,l=i(765),f=l.re,d=l.t,p=i(742).compareIdentifiers,h=function(){"use strict";function e(n,r){if(t(this,e),r&&"object"==typeof r||(r={loose:!!r,includePrerelease:!1}),o(n,e)){if(n.loose===!!r.loose&&n.includePrerelease===!!r.includePrerelease)return n;n=n.version}else if("string"!=typeof n)throw new TypeError("Invalid Version: ".concat(n));if(n.length>c)throw new TypeError("version is longer than ".concat(c," characters"));a("SemVer",n,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;var i=n.trim().match(r.loose?f[d.LOOSE]:f[d.FULL]);if(!i)throw new TypeError("Invalid Version: ".concat(n));if(this.raw=n,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>s||this.major<0)throw new TypeError("Invalid major version");if(this.minor>s||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>s||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t<s)return t}return e})):this.prerelease=[],this.build=i[5]?i[5].split("."):[],this.format()}return r(e,[{key:"format",value:function(){return this.version="".concat(this.major,".").concat(this.minor,".").concat(this.patch),this.prerelease.length&&(this.version+="-".concat(this.prerelease.join("."))),this.version}},{key:"toString",value:function(){return this.version}},{key:"compare",value:function(t){if(a("SemVer.compare",this.version,this.options,t),!o(t,e)){if("string"==typeof t&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}},{key:"compareMain",value:function(t){return o(t,e)||(t=new e(t,this.options)),p(this.major,t.major)||p(this.minor,t.minor)||p(this.patch,t.patch)}},{key:"comparePre",value:function(t){if(o(t,e)||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;var n=0;do{var r=this.prerelease[n],i=t.prerelease[n];if(a("prerelease compare",n,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return p(r,i)}while(++n)}},{key:"compareBuild",value:function(t){o(t,e)||(t=new e(t,this.options));var n=0;do{var r=this.build[n],i=t.build[n];if(a("prerelease compare",n,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return p(r,i)}while(++n)}},{key:"inc",value:function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var n=this.prerelease.length;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);-1===n&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: ".concat(e))}return this.format(),this.raw=this.version,this}}]),e}();e.exports=h},507:function(e,t,n){var r=n(959);e.exports=function(e,t){var n=r(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null}},539:function(e,t,n){var r=n(718),o=n(194),i=n(312),a=n(903),u=n(544),c=n(56);e.exports=function(e,t,n,s){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return r(e,n,s);case"!=":return o(e,n,s);case">":return i(e,n,s);case">=":return a(e,n,s);case"<":return u(e,n,s);case"<=":return c(e,n,s);default:throw new TypeError("Invalid operator: ".concat(t))}}},38:function(e,t,n){var r=n(376),i=n(959),a=n(765),u=a.re,c=a.t;e.exports=function(e,t){if(o(e,r))return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;var n=null;if((t=t||{}).rtl){for(var a;(a=u[c.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&a.index+a[0].length===n.index+n[0].length||(n=a),u[c.COERCERTL].lastIndex=a.index+a[1].length+a[2].length;u[c.COERCERTL].lastIndex=-1}else n=e.match(u[c.COERCE]);return null===n?null:i("".concat(n[2],".").concat(n[3]||"0",".").concat(n[4]||"0"),t)}},773:function(e,t,n){var r=n(376);e.exports=function(e,t,n){var o=new r(e,n),i=new r(t,n);return o.compare(i)||o.compareBuild(i)}},880:function(e,t,n){var r=n(269);e.exports=function(e,t){return r(e,t,!0)}},269:function(e,t,n){var r=n(376);e.exports=function(e,t,n){return new r(e,n).compare(new r(t,n))}},378:function(e,t,n){var r=n(959),o=n(718);e.exports=function(e,t){if(o(e,t))return null;var n=r(e),i=r(t),a=n.prerelease.length||i.prerelease.length,u=a?"pre":"",c=a?"prerelease":"";for(var s in n)if(("major"===s||"minor"===s||"patch"===s)&&n[s]!==i[s])return u+s;return c}},718:function(e,t,n){var r=n(269);e.exports=function(e,t,n){return 0===r(e,t,n)}},312:function(e,t,n){var r=n(269);e.exports=function(e,t,n){return r(e,t,n)>0}},903:function(e,t,n){var r=n(269);e.exports=function(e,t,n){return r(e,t,n)>=0}},253:function(e,t,n){var r=n(376);e.exports=function(e,t,n,o){"string"==typeof n&&(o=n,n=void 0);try{return new r(e,n).inc(t,o).version}catch(e){return null}}},544:function(e,t,n){var r=n(269);e.exports=function(e,t,n){return r(e,t,n)<0}},56:function(e,t,n){var r=n(269);e.exports=function(e,t,n){return r(e,t,n)<=0}},679:function(e,t,n){var r=n(376);e.exports=function(e,t){return new r(e,t).major}},789:function(e,t,n){var r=n(376);e.exports=function(e,t){return new r(e,t).minor}},194:function(e,t,n){var r=n(269);e.exports=function(e,t,n){return 0!==r(e,t,n)}},959:function(e,t,n){var r=n(295).MAX_LENGTH,i=n(765),a=i.re,u=i.t,c=n(376);e.exports=function(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),o(e,c))return e;if("string"!=typeof e)return null;if(e.length>r)return null;if(!(t.loose?a[u.LOOSE]:a[u.FULL]).test(e))return null;try{return new c(e,t)}catch(e){return null}}},358:function(e,t,n){var r=n(376);e.exports=function(e,t){return new r(e,t).patch}},559:function(e,t,n){var r=n(959);e.exports=function(e,t){var n=r(e,t);return n&&n.prerelease.length?n.prerelease:null}},795:function(e,t,n){var r=n(269);e.exports=function(e,t,n){return r(t,e,n)}},657:function(e,t,n){var r=n(773);e.exports=function(e,t){return e.sort((function(e,n){return r(n,e,t)}))}},712:function(e,t,n){var r=n(902);e.exports=function(e,t,n){try{t=new r(t,n)}catch(e){return!1}return t.test(e)}},100:function(e,t,n){var r=n(773);e.exports=function(e,t){return e.sort((function(e,n){return r(e,n,t)}))}},397:function(e,t,n){var r=n(959);e.exports=function(e,t){var n=r(e,t);return n?n.version:null}},249:function(e,t,n){var r=n(765);e.exports={re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:n(295).SEMVER_SPEC_VERSION,SemVer:n(376),compareIdentifiers:n(742).compareIdentifiers,rcompareIdentifiers:n(742).rcompareIdentifiers,parse:n(959),valid:n(397),clean:n(507),inc:n(253),diff:n(378),major:n(679),minor:n(789),patch:n(358),prerelease:n(559),compare:n(269),rcompare:n(795),compareLoose:n(880),compareBuild:n(773),sort:n(100),rsort:n(657),gt:n(312),lt:n(544),eq:n(718),neq:n(194),gte:n(903),lte:n(56),cmp:n(539),coerce:n(38),Comparator:n(257),Range:n(902),satisfies:n(712),toComparators:n(42),maxSatisfying:n(775),minSatisfying:n(649),minVersion:n(316),validRange:n(230),outside:n(826),gtr:n(606),ltr:n(32),intersects:n(937),simplifyRange:n(908),subset:n(799)}},295:function(e){var t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:t,MAX_SAFE_COMPONENT_LENGTH:16}},225:function(t){var n,r="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return(n=console).error.apply(n,["SEMVER"].concat(function(t){if(Array.isArray(t))return e(t)}(i=r)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(i)||a(i)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()));var i}:function(){};t.exports=r},742:function(e){var t=/^[0-9]+$/,n=function(e,n){var r=t.test(e),o=t.test(n);return r&&o&&(e=+e,n=+n),e===n?0:r&&!o?-1:o&&!r?1:e<n?-1:1};e.exports={compareIdentifiers:n,rcompareIdentifiers:function(e,t){return n(t,e)}}},765:function(e,t,n){var r=n(295).MAX_SAFE_COMPONENT_LENGTH,o=n(225),i=(t=e.exports={}).re=[],a=t.src=[],u=t.t={},c=0,s=function(e,t,n){var r=c++;o(r,t),u[e]=r,a[r]=t,i[r]=new RegExp(t,n?"g":void 0)};s("NUMERICIDENTIFIER","0|[1-9]\\d*"),s("NUMERICIDENTIFIERLOOSE","[0-9]+"),s("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),s("MAINVERSION","(".concat(a[u.NUMERICIDENTIFIER],")\\.(").concat(a[u.NUMERICIDENTIFIER],")\\.(").concat(a[u.NUMERICIDENTIFIER],")")),s("MAINVERSIONLOOSE","(".concat(a[u.NUMERICIDENTIFIERLOOSE],")\\.(").concat(a[u.NUMERICIDENTIFIERLOOSE],")\\.(").concat(a[u.NUMERICIDENTIFIERLOOSE],")")),s("PRERELEASEIDENTIFIER","(?:".concat(a[u.NUMERICIDENTIFIER],"|").concat(a[u.NONNUMERICIDENTIFIER],")")),s("PRERELEASEIDENTIFIERLOOSE","(?:".concat(a[u.NUMERICIDENTIFIERLOOSE],"|").concat(a[u.NONNUMERICIDENTIFIER],")")),s("PRERELEASE","(?:-(".concat(a[u.PRERELEASEIDENTIFIER],"(?:\\.").concat(a[u.PRERELEASEIDENTIFIER],")*))")),s("PRERELEASELOOSE","(?:-?(".concat(a[u.PRERELEASEIDENTIFIERLOOSE],"(?:\\.").concat(a[u.PRERELEASEIDENTIFIERLOOSE],")*))")),s("BUILDIDENTIFIER","[0-9A-Za-z-]+"),s("BUILD","(?:\\+(".concat(a[u.BUILDIDENTIFIER],"(?:\\.").concat(a[u.BUILDIDENTIFIER],")*))")),s("FULLPLAIN","v?".concat(a[u.MAINVERSION]).concat(a[u.PRERELEASE],"?").concat(a[u.BUILD],"?")),s("FULL","^".concat(a[u.FULLPLAIN],"$")),s("LOOSEPLAIN","[v=\\s]*".concat(a[u.MAINVERSIONLOOSE]).concat(a[u.PRERELEASELOOSE],"?").concat(a[u.BUILD],"?")),s("LOOSE","^".concat(a[u.LOOSEPLAIN],"$")),s("GTLT","((?:<|>)?=?)"),s("XRANGEIDENTIFIERLOOSE","".concat(a[u.NUMERICIDENTIFIERLOOSE],"|x|X|\\*")),s("XRANGEIDENTIFIER","".concat(a[u.NUMERICIDENTIFIER],"|x|X|\\*")),s("XRANGEPLAIN","[v=\\s]*(".concat(a[u.XRANGEIDENTIFIER],")(?:\\.(").concat(a[u.XRANGEIDENTIFIER],")(?:\\.(").concat(a[u.XRANGEIDENTIFIER],")(?:").concat(a[u.PRERELEASE],")?").concat(a[u.BUILD],"?)?)?")),s("XRANGEPLAINLOOSE","[v=\\s]*(".concat(a[u.XRANGEIDENTIFIERLOOSE],")(?:\\.(").concat(a[u.XRANGEIDENTIFIERLOOSE],")(?:\\.(").concat(a[u.XRANGEIDENTIFIERLOOSE],")(?:").concat(a[u.PRERELEASELOOSE],")?").concat(a[u.BUILD],"?)?)?")),s("XRANGE","^".concat(a[u.GTLT],"\\s*").concat(a[u.XRANGEPLAIN],"$")),s("XRANGELOOSE","^".concat(a[u.GTLT],"\\s*").concat(a[u.XRANGEPLAINLOOSE],"$")),s("COERCE","(^|[^\\d])(\\d{1,".concat(r,"})(?:\\.(\\d{1,").concat(r,"}))?(?:\\.(\\d{1,").concat(r,"}))?(?:$|[^\\d])")),s("COERCERTL",a[u.COERCE],!0),s("LONETILDE","(?:~>?)"),s("TILDETRIM","(\\s*)".concat(a[u.LONETILDE],"\\s+"),!0),t.tildeTrimReplace="$1~",s("TILDE","^".concat(a[u.LONETILDE]).concat(a[u.XRANGEPLAIN],"$")),s("TILDELOOSE","^".concat(a[u.LONETILDE]).concat(a[u.XRANGEPLAINLOOSE],"$")),s("LONECARET","(?:\\^)"),s("CARETTRIM","(\\s*)".concat(a[u.LONECARET],"\\s+"),!0),t.caretTrimReplace="$1^",s("CARET","^".concat(a[u.LONECARET]).concat(a[u.XRANGEPLAIN],"$")),s("CARETLOOSE","^".concat(a[u.LONECARET]).concat(a[u.XRANGEPLAINLOOSE],"$")),s("COMPARATORLOOSE","^".concat(a[u.GTLT],"\\s*(").concat(a[u.LOOSEPLAIN],")$|^$")),s("COMPARATOR","^".concat(a[u.GTLT],"\\s*(").concat(a[u.FULLPLAIN],")$|^$")),s("COMPARATORTRIM","(\\s*)".concat(a[u.GTLT],"\\s*(").concat(a[u.LOOSEPLAIN],"|").concat(a[u.XRANGEPLAIN],")"),!0),t.comparatorTrimReplace="$1$2$3",s("HYPHENRANGE","^\\s*(".concat(a[u.XRANGEPLAIN],")\\s+-\\s+(").concat(a[u.XRANGEPLAIN],")\\s*$")),s("HYPHENRANGELOOSE","^\\s*(".concat(a[u.XRANGEPLAINLOOSE],")\\s+-\\s+(").concat(a[u.XRANGEPLAINLOOSE],")\\s*$")),s("STAR","(<|>)?=?\\s*\\*"),s("GTE0","^\\s*>=\\s*0.0.0\\s*$"),s("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},606:function(e,t,n){var r=n(826);e.exports=function(e,t,n){return r(e,t,">",n)}},937:function(e,t,n){var r=n(902);e.exports=function(e,t,n){return e=new r(e,n),t=new r(t,n),e.intersects(t)}},32:function(e,t,n){var r=n(826);e.exports=function(e,t,n){return r(e,t,"<",n)}},775:function(e,t,n){var r=n(376),o=n(902);e.exports=function(e,t,n){var i=null,a=null,u=null;try{u=new o(t,n)}catch(e){return null}return e.forEach((function(e){u.test(e)&&(i&&-1!==a.compare(e)||(a=new r(i=e,n)))})),i}},649:function(e,t,n){var r=n(376),o=n(902);e.exports=function(e,t,n){var i=null,a=null,u=null;try{u=new o(t,n)}catch(e){return null}return e.forEach((function(e){u.test(e)&&(i&&1!==a.compare(e)||(a=new r(i=e,n)))})),i}},316:function(e,t,n){var r=n(376),o=n(902),i=n(312);e.exports=function(e,t){e=new o(e,t);var n=new r("0.0.0");if(e.test(n))return n;if(n=new r("0.0.0-0"),e.test(n))return n;n=null;for(var a=0;a<e.set.length;++a)e.set[a].forEach((function(e){var t=new r(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":n&&!i(n,t)||(n=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: ".concat(e.operator))}}));return n&&e.test(n)?n:null}},826:function(e,t,n){var r=n(376),o=n(257),i=o.ANY,a=n(902),u=n(712),c=n(312),s=n(544),l=n(56),f=n(903);e.exports=function(e,t,n,d){var p,h,v,y,m,g,b=function(n){var r=t.set[n],a=null,u=null;return r.forEach((function(e){e.semver===i&&(e=new o(">=0.0.0")),a=a||e,u=u||e,p(e.semver,a.semver,d)?a=e:v(e.semver,u.semver,d)&&(u=e)})),a.operator===y||a.operator===m?{v:!1}:u.operator&&u.operator!==y||!h(e,u.semver)?u.operator===m&&v(e,u.semver)?{v:!1}:void 0:{v:!1}};switch(e=new r(e,d),t=new a(t,d),n){case">":p=c,h=l,v=s,y=">",m=">=";break;case"<":p=s,h=f,v=c,y="<",m="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(u(e,t,d))return!1;for(var w=0;w<t.set.length;++w){var S=b(w);if("object"==((g=S)&&"undefined"!=typeof Symbol&&g.constructor===Symbol?"symbol":typeof g))return S.v}return!0}},908:function(e,t,n){var r=n(712),o=n(269);e.exports=function(e,t,n){var a=[],u=null,c=null,s=e.sort((function(e,t){return o(e,t,n)})),l=!0,f=!1,d=void 0;try{for(var p,h=s[Symbol.iterator]();!(l=(p=h.next()).done);l=!0){var v=p.value;r(v,t,n)?(c=v,u||(u=v)):(c&&a.push([u,c]),c=null,u=null)}}catch(e){f=!0,d=e}finally{try{l||null==h.return||h.return()}finally{if(f)throw d}}u&&a.push([u,null]);var y=[],m=!0,g=!1,b=void 0;try{for(var w,S=a[Symbol.iterator]();!(m=(w=S.next()).done);m=!0){var O=i(w.value,2),E=O[0],_=O[1];E===_?y.push(E):_||E!==s[0]?_?E===s[0]?y.push("<=".concat(_)):y.push("".concat(E," - ").concat(_)):y.push(">=".concat(E)):y.push("*")}}catch(e){g=!0,b=e}finally{try{m||null==S.return||S.return()}finally{if(g)throw b}}var j=y.join(" || "),x="string"==typeof t.raw?t.raw:String(t);return j.length<x.length?j:t}},799:function(e,t,n){var r=n(902),o=n(257).ANY,i=n(712),a=n(269),u=function(e,t,n){if(1===e.length&&e[0].semver===o)return 1===t.length&&t[0].semver===o;var r,u,l,f,d,p=new Set,h=!0,v=!1,y=void 0;try{for(var m,g=e[Symbol.iterator]();!(h=(m=g.next()).done);h=!0){var b=m.value;">"===b.operator||">="===b.operator?r=c(r,b,n):"<"===b.operator||"<="===b.operator?u=s(u,b,n):p.add(b.semver)}}catch(e){v=!0,y=e}finally{try{h||null==g.return||g.return()}finally{if(v)throw y}}if(p.size>1)return null;if(r&&u){if((l=a(r.semver,u.semver,n))>0)return null;if(0===l&&(">="!==r.operator||"<="!==u.operator))return null}var w=!0,S=!1,O=void 0;try{for(var E,_=p[Symbol.iterator]();!(w=(E=_.next()).done);w=!0){var j=E.value;if(r&&!i(j,String(r),n))return null;if(u&&!i(j,String(u),n))return null;var x=!0,C=!1,P=void 0;try{for(var A,T=t[Symbol.iterator]();!(x=(A=T.next()).done);x=!0){var k=A.value;if(!i(j,String(k),n))return!1}}catch(e){C=!0,P=e}finally{try{x||null==T.return||T.return()}finally{if(C)throw P}}return!0}}catch(e){S=!0,O=e}finally{try{w||null==_.return||_.return()}finally{if(S)throw O}}var I=!0,R=!1,D=void 0;try{for(var M,N=t[Symbol.iterator]();!(I=(M=N.next()).done);I=!0){var L=M.value;if(d=d||">"===L.operator||">="===L.operator,f=f||"<"===L.operator||"<="===L.operator,r)if(">"===L.operator||">="===L.operator){if(c(r,L,n)===L)return!1}else if(">="===r.operator&&!i(r.semver,String(L),n))return!1;if(u)if("<"===L.operator||"<="===L.operator){if(s(u,L,n)===L)return!1}else if("<="===u.operator&&!i(u.semver,String(L),n))return!1;if(!L.operator&&(u||r)&&0!==l)return!1}}catch(e){R=!0,D=e}finally{try{I||null==N.return||N.return()}finally{if(R)throw D}}return!(r&&f&&!u&&0!==l||u&&d&&!r&&0!==l)},c=function(e,t,n){if(!e)return t;var r=a(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},s=function(e,t,n){if(!e)return t;var r=a(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=function(e,t,n){e=new r(e,n),t=new r(t,n);var o=!1,i=!0,a=!1,c=void 0;try{e:for(var s,l=e.set[Symbol.iterator]();!(i=(s=l.next()).done);i=!0){var f=s.value,d=!0,p=!1,h=void 0;try{for(var v,y=t.set[Symbol.iterator]();!(d=(v=y.next()).done);d=!0){var m=v.value,g=u(f,m,n);if(o=o||null!==g,g)continue e}}catch(e){p=!0,h=e}finally{try{d||null==y.return||y.return()}finally{if(p)throw h}}if(o)return!1}}catch(e){a=!0,c=e}finally{try{i||null==l.return||l.return()}finally{if(a)throw c}}return!0}},42:function(e,t,n){var r=n(902);e.exports=function(e,t){return new r(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))}},230:function(e,t,n){var r=n(902);e.exports=function(e,t){try{return new r(e,t).range||"*"}catch(e){return null}}},688:function(e){"use strict";e.exports=c},64:function(e){"use strict";e.exports=s}},u={};function l(e){var t=u[e];if(void 0!==t)return t.exports;var r=u[e]={exports:{}};return n[e].call(r.exports,r,r.exports,l),r.exports}l.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(t,{a:t}),t},l.d=function(e,t){for(var n in t)l.o(t,n)&&!l.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var f={};return function(){"use strict";var e=function(e,t){var n=function(e,t,n){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}(e,t);return function(e,t){return t.get?t.get.call(e):t.value}(e,n)},t=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},n=function(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(n){t(e,n,r[n])}))}return e},r=function(e){return null!=e&&28===e.trim().length&&"T"===(e=e.trim())[10]&&":"===e[13]&&":"===e[16]&&"."===e[19]&&("+"===e[23]||"-"===e[23])&&(0,L.default)(e,V).isValid()},i=function(e){return(0,L.default)(e).isToday()},a=function(e){return r(e)?(0,L.default)(e,V).toDate():null},u=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=(0,L.default)(e);return t&&(n=n.utc()),n.format(V)},c=function(e){return(0,L.default)(e).format("HH:mm")},s=function(e){return L.default.utc(e).format("HH:mm A")},d=function(e){return h(e,"DD - MMM - YYYY")},p=function(e){return h(e,"DD-MMM")},h=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"YYYY-MMM-DD";return(0,L.default)(e).format(t)},v=function(e){return(0,L.default)(e).toDate()},y=function(e,t){$.register(e,t)},m=function(e){var t,n,r=null!=e?e:S();return $.getCalendar((t=r,(null!=(n=Intl.Locale)&&"undefined"!=typeof Symbol&&n[Symbol.hasInstance]?n[Symbol.hasInstance](t):o(t,n))?r:new Intl.Locale(r)))},g=function(e,t){var r,o=S(),i=new Intl.Locale(o),a=n({},G,{noToday:"am"===i.language},t),u=a.calendar,c=a.mode,s=a.time,l=a.day,f=a.year,d=a.noToday,p={calendar:null!=u?u:m(i),year:f?"numeric":void 0,month:"short",day:l?"2-digit":void 0},h=(0,L.default)(e).isToday();if(h&&!d)r=(r=new Intl.RelativeTimeFormat(o,{numeric:"auto"}).format(0,"day"))[0].toLocaleUpperCase(o)+r.slice(1);else{"en"===i.language&&(o="en-GB");var v=new Intl.DateTimeFormat(o,p).formatToParts(e);("en"===i.language||"am"===i.language)&&"standard"==c&&f&&l&&(v=v.map(z("-"))),"wide"==c&&(v=v.map(z(" — "))),"ethiopic"===p.calendar&&(v=v.filter((function(e,t,n){return!("era"===e.type||"literal"===e.type&&t<n.length-1&&"era"===n[t+1].type)}))),r=v.map((function(e){return e.value})).join("")}return(!0===s||h&&"for today"===s)&&(r+=", ".concat(b(e))),r},b=function(e){return e.toLocaleTimeString(S(),{hour:"2-digit",minute:"2-digit"})},w=function(e,t){return g(e,(r=n({},t),o=null!=(o={time:!0})?o:{},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))})),r));var r,o},S=function(){var e=window.i18next.language;return"ht"===(e=e.replace("_","-"))&&(e="fr-HT"),e},O=function(e){return(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())-Date.UTC(e.getUTCFullYear(),0,0))/24/60/60/1e3},E=function(e,t){var n=e.toISOString(),r=t.toISOString();return n.slice(0,n.indexOf("T"))===r.slice(0,r.indexOf("T"))},_=function(e){var t=new Date,n=new Date(e),r=t.getUTCMonth()-n.getUTCMonth(),o=t.getUTCDate()-n.getUTCDate(),i=t.getUTCFullYear()-n.getUTCFullYear();(r<0||0===r&&o<0)&&i--;var a=r>=0?r:r+12;o<0&&a--;var u=O(t)-O(n);u<0&&(u+=365);var c=Math.floor(u/7),s=S();return 0===i?E(t,n)?new Intl.RelativeTimeFormat(s,{numeric:"auto"}).format(0,"day"):u<31?new Intl.NumberFormat(s,{style:"unit",unit:"day",unitDisplay:"short"}).format(u):new Intl.NumberFormat(s,{style:"unit",unit:"week",unitDisplay:"short"}).format(c):i<2?new Intl.NumberFormat(s,{style:"unit",unit:"month",unitDisplay:"short"}).format(a+12):new Intl.NumberFormat(s,{style:"unit",unit:"year",unitDisplay:"short"}).format(i)},j=function(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertyNames(t);return n.length===r.length&&n.every((function(n){return e[n]===t[n]}))},x=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.localStorage;try{return e.getItem("test"),!0}catch(e){return!1}},C=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},P=function(e,t,n,r){return(q.default.default||q.default).t(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){C(e,t,n[t])}))}return e}({ns:e,defaultValue:n},r))},A=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},T=function(e){var t,n=function(e){if(Array.isArray(e))return e}(t=e.split("."))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),3!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return A(e,3);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(e,3):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=n[0],o=n[1],i=n[2];return"".concat(r,".").concat(o,".").concat(i)},k=function(e,t){var n=function(e){var t=e.indexOf("-");if(t>=0){var n=T(e.slice(0,t)),r=e.slice(t+1);return"".concat(n,"-").concat(r)}return T(e)}(t);return Z.satisfies(n,e,{includePrerelease:!0})},I=function(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)},R=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){I(i,r,o,a,u,"next",e)}function u(e){I(i,r,o,a,u,"throw",e)}a(void 0)}))}},D=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},M=function(e){return Y.apply(this,arguments)},N=function(e){return X.apply(this,arguments)};l.r(f),l.d(f,{age:function(){return _},canAccessStorage:function(){return x},daysIntoYear:function(){return O},formatDate:function(){return g},formatDatetime:function(){return w},formatTime:function(){return b},getDefaultCalendar:function(){return m},getDefaultsFromConfigSchema:function(){return W},getLocale:function(){return S},isOmrsDateStrict:function(){return r},isOmrsDateToday:function(){return i},isSameDay:function(){return E},isVersionSatisfied:function(){return k},parseDate:function(){return v},registerDefaultCalendar:function(){return y},retry:function(){return M},shallowEqual:function(){return j},toDateObjectStrict:function(){return a},toOmrsDateFormat:function(){return h},toOmrsDayDateFormat:function(){return d},toOmrsIsoString:function(){return u},toOmrsTimeString:function(){return s},toOmrsTimeString24:function(){return c},toOmrsYearlessDateFormat:function(){return p},translateFrom:function(){return P}});var L=l(688),U=l(14),B=l.n(U),F=l(332),H=l.n(F);L.default.extend(B()),L.default.extend(H());var V="YYYY-MM-DDTHH:mm:ss.SSSZZ",G={mode:"standard",time:"for today",day:!0,year:!0,noToday:!1},K=new WeakMap,$=new(function(){function t(){var n,r;!function(e,t){if(!o(e,t))throw new TypeError("Cannot call a class as a function")}(this,t),n=K,r={writable:!0,value:new Map},function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(this,n),n.set(this,r),e(this,K).set("am","ethiopic")}var n;return(n=[{key:"register",value:function(t,n){e(this,K).set(t,n)}},{key:"getCalendar",value:function(t){if(Boolean(t)){if(t.calendar)return t.calendar;if(t.region){var n="".concat(t.language,"-").concat(t.region);if(e(this,K).has(n))return e(this,K).get(n)}if(t.language&&e(this,K).has(t.language))return e(this,K).get(t.language);var r=new Intl.DateTimeFormat(t.toString()).resolvedOptions().calendar;return e(this,K).set("".concat(t.language).concat(t.region?"-".concat(t.region):""),r),r}}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),t}()),z=function(e){return function(t,n,r){return"literal"!==t.type||" "!==t.value||n<r.length-1&&"era"===r[n+1].type?t:{type:"literal",value:e}}};function W(e){var t,n={},r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(e)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=a.value;if(e[c].hasOwnProperty("_default"))n[c]=e[c]._default;else{if(c.startsWith("_"))continue;(t=e[c])&&t.constructor===Object?n[c]=W(e[c]):n[c]=e[c]}}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}var q=l(64),Z=l(249);function Y(){return Y=R((function(e){var t,n,r,o,i,a,u,c=arguments;return D(this,(function(s){switch(s.label){case 0:n=(t=c.length>1&&void 0!==c[1]?c[1]:{}).shouldRetry,r=t.getDelay,o=t.onError,n=null!=n?n:function(e){return function(e,t){return e<=5}(e)},r=null!=r?r:function(e){return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2]?e+1:e;return t*Math.pow(2,n)}(e,1e3)},i=0,a=void 0,s.label=1;case 1:return s.trys.push([1,4,,5]),[4,N(r(i))];case 2:return s.sent(),[4,e()];case 3:return[2,s.sent()];case 4:return u=s.sent(),null==o||o(u,i),a=u,[3,5];case 5:if(n(i++))return[3,1];s.label=6;case 6:throw a}}))})),Y.apply(this,arguments)}function X(){return(X=R((function(e){return D(this,(function(t){return e<=0?[2]:[2,new Promise((function(t){return setTimeout(t,e)}))]}))}))).apply(this,arguments)}}(),f}())}}}))}}]);
|