@genesislcap/design-system-configurator 14.373.2-MX-499.2 → 14.373.2-MX-499.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/816.6dbf1a0a1072650412d6fe5f8bb168c1.js.map +1 -0
- package/dist/816.816.3e7440fbd6718a8414c2.js +5751 -0
- package/dist/{designSystemConfigurator.daea382a463cb47dd5f44aeccf1b76e3.js.map → designSystemConfigurator.52124d26821144aeeb1023c072b2baff.js.map} +1 -1
- package/dist/index.html +1 -1
- package/dist/{main.6db3cb2b53a1e19ba62c.js → main.65d1736ce088b29a0d7b.js} +2 -2
- package/dist/{main.4cde47e464a6367c190b4e2dc772a38a.js.map → main.7ce2ee5391e617c26d8c4105bd621f74.js.map} +1 -1
- package/dist/remoteEntry.js +2 -2
- package/package.json +13 -13
- package/dist/969.969.1e3cc8f2cd0c178eb059.js +0 -5751
- package/dist/969.f322fa1f3c643f5d5aac2658eabdca4c.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"816.816.xxxxxxxxxxxxxxxxxxxx.js","mappings":"kMAOA,MAkBaA,EAAa,CAACC,EAAuBC,EAASC,MACvD,QAAmBF,GACnB,MAAMG,EAAYF,EAAQG,MAAM,KAAK,GAC/BC,EAASC,SAASC,cAAc,GAAGJ,YACnCK,EAAYN,EAtBO,CAACA,IAC1B,IAAIO,EAAoBP,EAAqBQ,cAAc,qBAO3D,OANKD,IACDA,EAAoBH,SAASC,cAAc,OAC3CE,EAAkBE,aAAa,KAAM,oBACrCF,EAAkBG,MAAMC,SAAW,WACnCX,EAAqBY,YAAYL,IAE9BA,GAeDM,CAAqBb,IACrB,QAAyB,mBAAoBD,GACnDO,EAAUM,YAAYT,GACtBA,EAAOW,aAAehB,EACtBK,EAAOY,O,oGCjCJ,MAAMC,GAAS,IAAAC,cAAa,4BCGnC,IAAIC,EAAiB,KAErB,MAAMC,EAAmB,IAAIC,IAOhBC,EAA0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EAAWA,EAAmB,OAAI,KAAO,SACzCA,EAAWA,EAAiB,KAAI,KAAO,OACvCA,EAAWA,EAAkB,MAAI,KAAO,OAC3C,CAPD,CAOGA,IAAeA,EAAa,CAAC,IASzB,MAAMC,EAAe,CAACC,EAAQn3F,EAAQg3F,EAAUI,OAAQ56D,EAASy6D,EAAWI,UAAY,oBAC9EF,qBACDn3F,sBACCw8B,OAMJ86D,EAAiB,CAC1B9+D,UAAW,EACXG,UAAW,EACXG,QAAS,EACTG,QAAS,EACTG,UAAW,EACXG,SAAU,EACVG,SAAU,EACVG,QAAS,E","sources":["webpack://@genesislcap/design-system-configurator/../../foundation/foundation-notifications/dist/esm/dialog/dialog-launcher.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-notifications/dist/esm/logger.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-notifications/dist/esm/notification-util.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-utils/dist/esm/directives/when-else/when-else.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/accordion/accordion.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/accordion/accordion.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/accordion/accordion.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/accordion-item/accordion-item.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/accordion-item/accordion-item.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/accordion-item/accordion-item.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/actions-menu/actions-menu.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/utils/logger.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/utils/base-datasource.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/utils/dom.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-criteria/dist/esm/logger.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-criteria/dist/esm/types.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-criteria/dist/esm/utils.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-criteria/dist/esm/criteria-builder.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-criteria/dist/esm/serialisers.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-criteria/dist/esm/expression-builder.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/utils/options-datasource-utils.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/actions-menu/actions-menu.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/actions-menu/actions-menu.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/anchor/anchor.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/anchor/anchor.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/anchor/anchor.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/anchored-region/anchor-region.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/anchored-region/anchored-region.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/anchored-region/anchored-region.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/avatar/avatar.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/avatar/avatar.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/avatar/avatar.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/badge/badge.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/badge/badge.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/badge/badge.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/banner/banner.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/banner/banner.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/banner/banner.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/breadcrumb/breadcrumb.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/breadcrumb/breadcrumb.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/breadcrumb/breadcrumb.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/breadcrumb-item/breadcrumb-item.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/breadcrumb-item/breadcrumb-item.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/breadcrumb-item/breadcrumb-item.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/button/button.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/button/button.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/button/button.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/calendar/calendar.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/calendar/calendar.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/calendar/calendar.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/card/card.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/card/card.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/card/card.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/multiselect/multiselect-consts.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/multiselect/multiselect.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/options-datasource/options-datasource.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/options-datasource/multiselect-datasource.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/multiselect/multiselect.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/multiselect/multiselect.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/categorized-multiselect/categorized-multiselect.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/categorized-multiselect/categorized-multiselect.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/categorized-multiselect/categorized-multiselect.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/checkbox/checkbox.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/checkbox/checkbox.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/checkbox/checkbox.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/combobox/combobox.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/combobox/combobox.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/combobox/combobox.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/connection-indicator/connection-indicator.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/connection-indicator/connection-indicator.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/connection-indicator/connection-indicator.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/data-grid/data-grid.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/data-grid/data-grid.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/data-grid/data-grid.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/data-grid-cell/data-grid-cell.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/data-grid-cell/data-grid.cell.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/data-grid-row/data-grid-row.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/data-grid-row/data-grid.row.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/date-picker/date-picker.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/date-picker/date-picker.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/date-picker/day.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/date-picker/month.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/date-picker/calendar.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/date-picker/day.util.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/date-picker/date-picker.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-utils/dist/esm/utils/deepMerge.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/design-system-provider/default-design-tokens.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/design-system-provider/design-system-provider.utils.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/_config/styles/colors.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/_config/tokens/custom.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/_config/values/color.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/_config/values/misc.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/_config/values/sizing.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/_config/styles/directives.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/_config/styles/external/fontawesome-free/index.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/_config/styles/fonts.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/design-system-provider/design-system-provider.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/design-system-provider/design-system-provider.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/dialog/dialog.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/dialog/dialog.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/dialog/dialog.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/disclosure/disclosure.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/disclosure/disclosure.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/disclosure/disclosure.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/divider/divider.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/divider/divider.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/divider/divider.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/dropdown-menu/dropdown-menu.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/dropdown-menu/dropdown-menu.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/dropdown-menu/dropdown-menu.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/environment-indicator/environment-indicator.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/environment-indicator/environment-indicator.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/environment-indicator/utils/configure.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/environment-indicator/utils/logger.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/environment-indicator/environment-indicator.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/error-banner/error-banner.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/error-banner/error-banner.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/error-boundary/error-boundary.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-errors/dist/esm/types.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-errors/dist/esm/error-util.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-errors/dist/esm/error-launcher.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-errors/dist/esm/notification/notification-launcher.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-errors/dist/esm/dialog/error-dialog-launcher.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-errors/dist/esm/snackbar/snackbar-launcher.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-errors/dist/esm/banner/error-banner-launcher.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-errors/dist/esm/error-builder.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-errors/dist/esm/notification/notification-builder.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/error-boundary/error-boundary.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/error-dialog/error-dialog.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/error-dialog/error-dialog.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/error-dialog/error-dialog.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-notifications/dist/esm/snackbar/snackbar-launcher.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-notifications/dist/esm/toast/toast-launcher.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-notifications/dist/esm/notification-launcher.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-notifications/dist/esm/alert/alert-builder.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-notifications/dist/esm/banner/banner-launcher.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/_common/base-file-component.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/_common/icons.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/file-reader/file-reader.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/file-reader/file-reader.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/file-reader/file-reader.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/file-upload/file-upload.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/file-upload/file-upload.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/file-upload/file-upload.utils.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/file-upload/file-upload.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/filter/filter.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/filter/filter.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/filter/filter.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/filter-bar/filter-bar.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/filter-bar/filter-bar.utils.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/filter-bar/filter-bar.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/filter-bar/filter-bar.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/flex-layout/flex-layout.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/flex-layout/flex-layout.types.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/flex-layout/responsiveness/flex-layout-rwd.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/flex-layout/flex-layout.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/flex-layout/flex-layout.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/flipper/flipper.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/flipper/flipper.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/flipper/flipper.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/flyout/flyout.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/flyout/flyout.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/flyout/flyout.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/grid-layout/grid-layout.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/grid-layout/grid-layout.types.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/grid-layout/responsiveness/grid-layout-rwd.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/grid-layout/grid-layout.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/grid-layout/grid-layout.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/grid-layout-item/grid-layout-item.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/grid-layout-item/grid-layout-item.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/horizontal-scroll/horizontal-scroll.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/horizontal-scroll/horizontal-scroll.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/horizontal-scroll/horizontal-scroll.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/icon/icon.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/icon/icon.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/icon/icon.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/listbox/listbox.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/listbox/listbox.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/listbox/listbox.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/listbox-option/listbox-option.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/listbox-option/listbox-option.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/listbox-option/listbox-option.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/menu/menu.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/menu/menu.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/menu/menu.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/menu-item/menu-item.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/menu-item/menu-item.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/menu-item/menu-item.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/modal/modal.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/modal/modal.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/modal/modal.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/number-field/number-field.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/number-field/number-field.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-utils/dist/esm/formatters/localeNumberParser.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/number-field/utils.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/number-field/number-field.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-comms/dist/esm/networkMonitor/config.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-comms/dist/esm/networkMonitor/types.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-comms/dist/esm/networkMonitor/service.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-utils/dist/esm/promise/resolveAfter.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/progress/progress.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/progress/progress.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/progress/progress.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/provide-design-system.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/overlays/system-health/types.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/overlays/system-health/system-health-overlay.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/popper/popper.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/progress-ring/progress-ring.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/progress-ring/progress-ring.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/progress-ring/progress-ring.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/radio/radio.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/radio/radio.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/radio/radio.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/radio-group/radio-group.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/radio-group/radio-group.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/radio-group/radio-group.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/scheduler/scheduler.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/scheduler/scheduler.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/scheduler/scheduler.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-notifications/dist/esm/toast/toast-builder.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/scheduler-cron-builder/types.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/scheduler-cron-builder/helpers.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/scheduler-cron-builder/scheduler-cron-builder.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-events/dist/esm/eventEmitter/eventEmitterMixin.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-events/dist/esm/types.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/scheduler-cron-builder/daily-recurrence/daily-recurrence.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/scheduler-cron-builder/daily-recurrence/daily-recurrence.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/scheduler-cron-builder/daily-recurrence/daily-recurrence.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/scheduler-cron-builder/monthly-yearly-recurrence/monthly-yearly-recurrence.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/scheduler-cron-builder/monthly-yearly-recurrence/monthly-yearly-recurrence.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/scheduler-cron-builder/monthly-yearly-recurrence/monthly-yearly-recurrence.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/scheduler-cron-builder/weekly-recurrence/weekly-recurrence.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/scheduler-cron-builder/weekly-recurrence/weekly-recurrence.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/scheduler-cron-builder/weekly-recurrence/weekly-recurrence.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/scheduler-cron-builder/scheduler-cron-builder.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/scheduler-cron-builder/scheduler-cron-builder.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/scheduler-timezone/scheduler-timezone.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/scheduler-timezone/scheduler-timezone.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/scheduler-timezone/scheduler-timezone.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/search-bar/search-bar.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/search-bar/search-bar.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/search-bar/search-bar.types.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/search-bar/search-bar.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/search-bar/search-bar-combobox.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/search-bar/search-bar-combobox.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/search-bar/search-bar-combobox.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/section-navigator/section-navigator.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/section-navigator/section-navigator.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/section-navigator/section-navigator.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/segmented-control/segmented-control.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/segmented-control/segmented-control.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/segmented-control/segmented-control.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/segmented-item/segmented-item.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/segmented-item/segmented-item.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/segmented-item/segmented-item.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/select/select.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/select/select.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/select/select.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/skeleton/skeleton.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/skeleton/skeleton.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/skeleton/skeleton.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/slider/slider.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/slider/slider.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/slider/slider.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/slider-label/slider-label.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/slider-label/slider-label.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/slider-label/slider-label.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/snackbar/snackbar.config.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/snackbar/snackbar.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/snackbar/snackbar.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/snackbar/snackbar.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/stacking-icons/stacking-icons.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/stacking-icons/stacking-icons.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/stacking-icons/stacking-icons.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/status-pill/status-pill.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/status-pill/status-pill.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/status-pill/status-pill.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/stepper-tab/stepper-tab.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/stepper-tab/stepper-tab.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/stepper-tab/stepper-tab.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/stepper-tab-panel/stepper-tab-panel.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/stepper-tab-panel/stepper-tab-panel.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/switch/switch.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/switch/switch.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/switch/switch.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/tab/tab.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/tab/tab.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/tab/tab.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/tab-panel/tab-panel.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/tab-panel/tab-panel.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/tab-panel/tab-panel.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/tabs/tabs.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/tabs/tabs.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/tabs/tabs.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/text-area/text-area.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/text-area/text-area.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/text-area/text-area.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/text-field/text-field.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-utils/dist/esm/styles/color.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/text-field/text-field.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/text-field/text-field.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/toast/toast.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/toast/toast.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/toast/toast.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/toolbar/toolbar.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/toolbar/toolbar.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/toolbar/toolbar.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/tooltip/tooltip.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/tooltip/tooltip.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/tooltip/tooltip.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/tree-item/tree-item.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/tree-item/tree-item.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/tree-item/tree-item.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/tree-view/tree-view.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/tree-view/tree-view.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/tree-view/tree-view.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/url-input/url-input.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/url-input/url-input.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/url-input/url-input.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/base-components.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/data-grid-datasource/data-grid-datasource.js","webpack://@genesislcap/design-system-configurator/../../foundation/expression-builder/dist/esm/config/combinators.js","webpack://@genesislcap/design-system-configurator/../../foundation/expression-builder/dist/esm/config/operators.js","webpack://@genesislcap/design-system-configurator/../../foundation/expression-builder/dist/esm/main/expression-builder.helpers.js","webpack://@genesislcap/design-system-configurator/../../foundation/expression-builder/dist/esm/utils/data-model.js","webpack://@genesislcap/design-system-configurator/../../foundation/expression-builder/dist/esm/utils/formatting.js","webpack://@genesislcap/design-system-configurator/../../foundation/expression-builder/dist/esm/utils/misc.js","webpack://@genesislcap/design-system-configurator/../../foundation/expression-builder/dist/esm/main/events.js","webpack://@genesislcap/design-system-configurator/../../foundation/expression-builder/dist/esm/main/expression-builder.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/expression-builder/dist/esm/main/expression-group/expression-group.styles.js","webpack://@genesislcap/design-system-configurator/../web-core/dist/esm/directives/when-else.js","webpack://@genesislcap/design-system-configurator/../../foundation/expression-builder/dist/esm/main/expression-group/expression-group.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/expression-builder/dist/esm/main/expression-group/expression-group.js","webpack://@genesislcap/design-system-configurator/../../foundation/expression-builder/dist/esm/main/expression-builder.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/expression-builder/dist/esm/main/rule-field/rule-field.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/expression-builder/dist/esm/main/rule-field/rule-field.js","webpack://@genesislcap/design-system-configurator/../../foundation/expression-builder/dist/esm/main/rule-operator/rule-operator.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/expression-builder/dist/esm/main/rule-operator/rule-operator.js","webpack://@genesislcap/design-system-configurator/../../foundation/expression-builder/dist/esm/main/rule-value/rule-value.helpers.js","webpack://@genesislcap/design-system-configurator/../../foundation/expression-builder/dist/esm/main/rule-value/rule-value.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/expression-builder/dist/esm/main/rule-value/rule-value.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/expression-builder/dist/esm/main/rule-value/rule-value.js","webpack://@genesislcap/design-system-configurator/../../foundation/expression-builder/dist/esm/main/expression-rule/expression-rule.helpers.js","webpack://@genesislcap/design-system-configurator/../../foundation/expression-builder/dist/esm/main/expression-rule/expression-rule.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/expression-builder/dist/esm/main/expression-rule/expression-rule.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/expression-builder/dist/esm/main/expression-rule/expression-rule.js","webpack://@genesislcap/design-system-configurator/../../foundation/expression-builder/dist/esm/main/expression-builder.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/expression-builder/expression-builder.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/expression-builder/expressions-shared-helpers.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/expression-builder/types.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/expression-builder/rule-expression-builder.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/expression-builder/value-expression-builder.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/notification-listener/notification-listener.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-notifications/dist/esm/types.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/notification-listener/notification-listener.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/patterns/define.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/patterns/tag-for.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-comms/dist/esm/analytics/analytics.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/router/logger.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/router/router.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/router/utils.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/router/navigation.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/router/navItems.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/router/routes.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/router/configuration.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/router/events.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/router/foundation-router.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/stepper/stepper.template.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/stepper/stepper.styles.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/stepper/stepper.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-ui/dist/esm/index.js","webpack://@genesislcap/design-system-configurator/../../foundation/foundation-utils/dist/esm/styles/typography.js"],"sourcesContent":["import { getNotificationContainer, showLoggerLogLevel } from '../notification-util';\n/**\n * Gets or creates a dialog container within the provided boundary element.\n * @internal\n * @param notificationBoundary - The boundary element to search for or create the container within\n * @returns The dialog container element\n */\nconst getBoundaryContainer = (notificationBoundary) => {\n let boundaryContainer = notificationBoundary.querySelector('#dialog-container');\n if (!boundaryContainer) {\n boundaryContainer = document.createElement('div');\n boundaryContainer.setAttribute('id', 'dialog-container');\n boundaryContainer.style.position = 'relative';\n notificationBoundary.appendChild(boundaryContainer);\n }\n return boundaryContainer;\n};\n/**\n * Shows the dialog\n * @internal\n * @param notificationStructure - The NotificationStructure object\n * @param tagName - The tag name to create prefix for the design system provider & notification component\n * @param notificationBoundary - Optional boundary element to place the dialog within. If provided, the dialog will be created within this element's context, which can help with z-index stacking issues when the dialog needs to appear above modals or other elements.\n * @returns\n * */\nexport const showDialog = (notificationStructure, tagName, notificationBoundary) => {\n showLoggerLogLevel(notificationStructure);\n const tagPrefix = tagName.split('-')[0];\n const dialog = document.createElement(`${tagPrefix}-dialog`);\n const container = notificationBoundary\n ? getBoundaryContainer(notificationBoundary)\n : getNotificationContainer('dialog-container', tagName);\n container.appendChild(dialog);\n dialog.notification = notificationStructure;\n dialog.show();\n};\n","import { createLogger } from '@genesislcap/foundation-logger';\nexport const logger = createLogger('foundation-notifications');\n","import { LogLevel } from '@genesislcap/foundation-logger';\nimport { getCurrentDesignSystem, getAllElements } from '@genesislcap/foundation-utils';\nimport { logger } from './logger';\n// Cache for the design system provider to avoid expensive DOM traversal\nlet cachedProvider = null;\n// Cache for existing notification containers to avoid expensive DOM traversal\nconst cachedContainers = new Map();\n/**\n * Retrieves the notification details from an NotificationStructure object\n * @public\n * @param details - The NotificationStructure object\n * @returns The title and body concatenated as a string, or default values ('Error: Something went wrong') if not present\n */\nexport const getNotificationDetails = (details) => {\n var _a, _b;\n const title = (_a = details === null || details === void 0 ? void 0 : details.title) !== null && _a !== void 0 ? _a : 'Error';\n const body = (_b = details === null || details === void 0 ? void 0 : details.body) !== null && _b !== void 0 ? _b : 'Something went wrong';\n return `${title}: ${body}`;\n};\n/**\n * Retrieves the log level from an NotificationStructure object\n * @public\n * @param details - The NotificationStructure object\n * @returns The log level or the default value (LogLevel.Debug) if not present\n */\nexport const getLoglevel = (details) => {\n var _a;\n return (details === null || details === void 0 ? void 0 : details.logLevel) || ((_a = details === null || details === void 0 ? void 0 : details.config) === null || _a === void 0 ? void 0 : _a.logLevel) || LogLevel.Debug;\n};\n/**\n * Shows logger with log level from NotificationStructure object\n * @public\n * @param notificationStructure - The NotificationStructure object\n */\nexport const showLoggerLogLevel = (notificationStructure) => {\n logger.log({\n message: getNotificationDetails(notificationStructure),\n level: getLoglevel(notificationStructure),\n });\n};\n/**\n * Get/Create the error container in the DOM\n * @public\n * @param id - The id of the container\n * @param tagName - The tag name to create prefix for the design system provider\n * @returns\n */\nexport const getNotificationContainer = (id, tagName) => {\n let container = document.querySelector(`#${id}`);\n // If not found in light DOM, check cache first, then search deeply including shadow roots\n if (!container) {\n // Check cache first\n if (cachedContainers.has(id)) {\n container = cachedContainers.get(id);\n }\n else {\n // Search deeply and cache the result\n const deepElements = getAllElements(document);\n const found = deepElements.find((el) => el.id === id);\n if (found) {\n container = found;\n cachedContainers.set(id, found);\n }\n }\n }\n if (!container) {\n container = document.createElement('div');\n container.setAttribute('id', id);\n container.style.zIndex = '9999';\n // Get the current design system provider and prefix in one call\n const { element: providerElement, prefix: currentPrefix } = getCurrentDesignSystem(document.body, 'rapid');\n // Use the found provider element if available, otherwise use cached provider or find it\n if (providerElement) {\n // We already have the provider element, use it directly\n providerElement.appendChild(container);\n cachedProvider = providerElement;\n }\n else if (cachedProvider) {\n // Use existing cached provider\n cachedProvider.appendChild(container);\n }\n else {\n // Only create new provider if none exists\n const dsProvider = document.createElement(`${currentPrefix}-design-system-provider`);\n dsProvider.appendChild(container);\n document.body.appendChild(dsProvider);\n cachedProvider = dsProvider;\n }\n }\n return container;\n};\n/**\n * Get the banner anchor to attach the banner to\n * @public\n * @param element - The element to start searching from\n * @returns\n */\nexport const getBannerAnchor = (element) => {\n var _a, _b;\n while (element && !(element instanceof ShadowRoot)) {\n const anchor = (_a = element === null || element === void 0 ? void 0 : element.getRootNode()) === null || _a === void 0 ? void 0 : _a.getElementById('banner-anchor');\n if (anchor) {\n anchor.style.position = 'relative';\n return anchor;\n }\n element = (_b = element === null || element === void 0 ? void 0 : element.getRootNode()) === null || _b === void 0 ? void 0 : _b.host;\n }\n return createBannerContainer();\n};\nconst createBannerContainer = () => {\n const anchor = document.createElement('div');\n anchor.setAttribute('id', 'banner-anchor');\n anchor.style.position = 'relative';\n document.body.insertBefore(anchor, document.body.firstChild);\n return anchor;\n};\n","/**\n * Directive that allows supplying an \"else\" template to the traditional {@link https://www.fast.design/docs/api/fast-element.when/#when-function} directive\n *\n * @param binding - The condition to test for rendering.\n * @param trueTemplateOrTemplateBinding - The template or a binding that gets the template to render when the condition is true.\n * @param falseTemplateOrTemplateBinding - The template or a binding that gets the template to render when the condition is false.\n * @public\n */\nexport function whenElse(binding, trueTemplateOrTemplateBinding, falseTemplateOrTemplateBinding) {\n const getTemplate = (template) => typeof template === 'function' ? template : () => template;\n const trueTemplate = getTemplate(trueTemplateOrTemplateBinding);\n const falseTemplate = getTemplate(falseTemplateOrTemplateBinding);\n return (source, context) => binding(source, context) ? trueTemplate(source, context) : falseTemplate(source, context);\n}\n","import { accordionTemplate as fastAccordionTemplate } from '@microsoft/fast-foundation';\nexport const foundationAccordionTemplate = (context, definition) => fastAccordionTemplate(context, definition);\n","import { accordionStyles as fastAccordionStyles } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationAccordionStyles = (context, definition) => css `\n ${fastAccordionStyles(context, definition)}\n`;\n","import { Accordion as FASTAccordion } from '@microsoft/fast-foundation';\nimport { foundationAccordionStyles as styles } from './accordion.styles';\nimport { foundationAccordionTemplate as template } from './accordion.template';\n/**\n * @tagname %%prefix%%-accordion\n */\nexport class Accordion extends FASTAccordion {\n}\nexport const foundationAccordionShadowOptions = {\n delegatesFocus: true,\n mode: 'open',\n};\nexport const defaultAccordionConfig = {};\n/**\n * The Foundation Accordion\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-accordion\\>\n */\nexport const foundationAccordion = Accordion.compose(Object.assign({ baseName: 'accordion', template,\n styles, shadowOptions: foundationAccordionShadowOptions }, defaultAccordionConfig));\n","import { accordionItemTemplate as fastAccordionItemTemplate } from '@microsoft/fast-foundation';\nexport const foundationAccordionItemTemplate = (context, definition) => fastAccordionItemTemplate(context, definition);\n","import { accordionItemStyles as fastAccordionItemStyles } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationAccordionItemStyles = (context, definition) => css `\n ${fastAccordionItemStyles(context, definition)}\n\n slot[name='collapsed-icon'] {\n display: flex;\n stroke: var(--accent-foreground-rest);\n fill: none;\n }\n\n slot[name='expanded-icon'] {\n display: none;\n stroke: var(--accent-foreground-rest);\n fill: none;\n }\n`;\n","import { AccordionItem as FASTAccordionItem } from '@microsoft/fast-components';\nimport { foundationAccordionItemStyles as styles } from './accordion-item.styles';\nimport { foundationAccordionItemTemplate as template } from './accordion-item.template';\n/**\n * @tagname %%prefix%%-accordion-item\n */\nexport class AccordionItem extends FASTAccordionItem {\n}\nexport const foundationAccordionItemShadowOptions = {\n delegatesFocus: true,\n mode: 'open',\n};\nexport const defaultAccordionItemConfig = {\n collapsedIcon: `<svg width=\"16\" height=\"16\" viewBox=\"0 0 18 18\" xmlns=\"http://www.w3.org/2000/svg\" slot=\"collapsed-icon\">\n <path d=\"M15.2222 1H2.77778C1.79594 1 1 1.79594 1 2.77778V15.2222C1 16.2041 1.79594 17 2.77778 17H15.2222C16.2041 17 17 16.2041 17 15.2222V2.77778C17 1.79594 16.2041 1 15.2222 1Z\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>\n <path class=\"plus-sign\" d=\"M9 5.44446V12.5556\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>\n <path class=\"plus-sign\" d=\"M5.44446 9H12.5556\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>\n </svg>`,\n expandedIcon: `<svg width=\"16\" height=\"16\" viewBox=\"0 0 18 18\" xmlns=\"http://www.w3.org/2000/svg\" slot=\"expanded-icon\">\n <path d=\"M15.2222 1H2.77778C1.79594 1 1 1.79594 1 2.77778V15.2222C1 16.2041 1.79594 17 2.77778 17H15.2222C16.2041 17 17 16.2041 17 15.2222V2.77778C17 1.79594 16.2041 1 15.2222 1Z\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>\n <path class=\"minus-sign\" d=\"M5.44446 9H12.5556\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>\n </svg>`,\n};\n/**\n * The Foundation Accordion Item\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-accordion-item\\>\n */\nexport const foundationAccordionItem = AccordionItem.compose(Object.assign({ baseName: 'accordion-item', template,\n styles, shadowOptions: foundationAccordionItemShadowOptions }, defaultAccordionItemConfig));\n","import { css } from '@microsoft/fast-element';\nexport const actionsMenuBaseStyles = (context, definition) => css `\n :host {\n --actions-opener-height-multiplier: 0.7px;\n --actions-opener-bg-color: 249 254 255;\n --menu-item-height-multiplier: 0.7px;\n }\n\n .actions-container {\n align-items: center;\n display: flex;\n height: 100%;\n justify-content: right;\n }\n\n .actions-menu {\n display: none;\n position: absolute;\n max-width: 350px;\n overflow-y: auto;\n }\n\n .actions-vertical .actions-menu {\n padding: calc(var(--design-unit) * 1px);\n max-height: 175px;\n z-index: 100;\n }\n\n .actions-menu:not(.hidden):hover {\n display: inline-flex;\n }\n\n .hidden {\n display: none;\n }\n\n .visible {\n display: inline-flex;\n }\n\n .actions-opener {\n align-self: center;\n display: flex;\n height: calc(\n (var(--base-height-multiplier) + var(--density)) * var(--design-unit) *\n var(--actions-opener-height-multiplier)\n );\n }\n\n svg {\n width: 100%;\n height: 100%;\n fill: #879ba6;\n }\n\n .actions-opener:hover svg {\n fill: #fff;\n }\n\n foundation-menu-item {\n display: flex;\n user-select: none;\n }\n\n foundation-menu-item::part(content) {\n margin-inline: 10px;\n }\n\n foundation-menu-item[disabled] {\n pointer-events: none;\n }\n\n .menu-item {\n flex: 1;\n max-height: calc(\n (var(--base-height-multiplier) + var(--density)) * var(--design-unit) *\n var(--menu-item-height-multiplier)\n );\n min-height: 0;\n }\n\n .actions-vertical .menu-item {\n flex: 1 1 auto;\n justify-content: center;\n margin: calc(var(--design-unit) * 1px);\n }\n\n .actions-vertical .visible,\n .actions-vertical .actions-menu:not(.hidden):hover {\n display: flex;\n flex-direction: column;\n }\n`;\nexport const foundationActionsMenuStyles = (context, definition) => css `\n ${actionsMenuBaseStyles(context, definition)}\n`;\n","import { createLogger, LogLevel } from '@genesislcap/foundation-logger';\nexport { LogLevel };\nexport const logger = createLogger('foundation-ui');\n","import { __awaiter, __decorate } from \"tslib\";\nimport { Connect, dataServerResultFilter, Datasource, DatasourceDefaults, DatasourceEventHandler, FieldTypeEnum, MessageType, normaliseCriteria, } from '@genesislcap/foundation-comms';\nimport { formatTimestamp } from '@genesislcap/foundation-utils';\nimport { attr, observable } from '@microsoft/fast-element';\nimport { FoundationElement } from '@microsoft/fast-foundation';\nimport { BehaviorSubject } from 'rxjs';\nimport { logger } from './logger';\nconst criteriaDelimiter = ';';\nconst criteriaJoin = ' && ';\nconst withoutFullInit = null;\nexport class BaseDatasource extends DatasourceEventHandler(FoundationElement) {\n constructor() {\n super(...arguments);\n this.withGridInit = true;\n this.isSnapshot = false;\n this.maxRows = DatasourceDefaults.MAX_ROWS_250;\n this.maxView = DatasourceDefaults.MAX_VIEW_1000;\n this.resourceName = '';\n this.reverse = false;\n this.rowId = 'ROW_REF';\n /**\n * Enabled by default, will format UNIX timestamp fields to readable [DATE|DATETIME] values.\n * @public\n */\n this.withTimestampFormatting = true;\n this.requiresFullDataRefresh = true;\n this.rowsSyncedWithStream = new Map();\n this.dataSubWasLoggedOff = false;\n this.criteriaFromFilters = new Map();\n this.update = new BehaviorSubject(new Map());\n }\n criteriaChanged(oldCriteria, newCriteria) {\n const criteriaIsNotDuplicate = oldCriteria !== normaliseCriteria(newCriteria, criteriaDelimiter);\n if (this.datasource.initialized && criteriaIsNotDuplicate) {\n if (this.dataSub) {\n this.dataSub.unsubscribe();\n this.dataSub = undefined;\n }\n this.fetchGenesisData(withoutFullInit);\n }\n }\n dataChanged(oldValue) {\n if (oldValue) {\n this.clearData();\n this.reset();\n }\n }\n set datasourceConfig(config) {\n if (config) {\n Object.keys(config).forEach((key) => {\n if (config[key] !== undefined) {\n this[key] = config[key];\n }\n });\n }\n }\n disconnectedCallback() {\n var _a, _b;\n super.disconnectedCallback();\n this.clearData();\n /**\n * Attempt to clean up after ourselves.\n */\n (_a = this.dataSub) === null || _a === void 0 ? void 0 : _a.unsubscribe();\n (_b = this.update) === null || _b === void 0 ? void 0 : _b.unsubscribe();\n delete this.dataSub;\n delete this.update;\n this.datasource.destroy();\n delete this.datasource;\n }\n // Genesis Specific\n reset() {\n this.requiresFullDataRefresh = true;\n this.fetchGenesisData();\n }\n fetchGenesisData() {\n return __awaiter(this, arguments, void 0, function* (withFullInit = true) {\n if (this.data) {\n this.syncComponentData(this.data);\n return;\n }\n const requiresMetadataFetch = withFullInit || !this.datasource.initialized;\n if (!requiresMetadataFetch) {\n this.connect.dataLogoff(this.sourceRef);\n this.clearData();\n }\n const initOK = yield this.datasource.init(this.datasourceOptions(), requiresMetadataFetch);\n if (!initOK) {\n this.handleError({\n message: `Genesis Datasource init failed for ${this.resourceName}`,\n loggerType: 'error',\n });\n return;\n }\n if (this.isSnapshot) {\n const rowData = yield this.datasource.snapshotFiltered();\n this.syncComponentData(rowData);\n return;\n }\n logger.debug(`requesting stream for ${this.resourceName}`);\n this.dataSub = this.datasource.stream.subscribe((result) => {\n if (result.DISCONNECTED) {\n this.handleError({\n message: `Genesis Datasource disconnected for ${this.resourceName}`,\n loggerType: 'error',\n });\n }\n this.sourceRef = result.SOURCE_REF;\n const messageType = result.MESSAGE_TYPE;\n if (messageType && messageType === MessageType.LOGOFF_ACK) {\n this.dataSubWasLoggedOff = true;\n return;\n }\n this.dataSubWasLoggedOff = false;\n if (result.ROW) {\n const nextMessage = dataServerResultFilter(result);\n this.handleStreamUpdate(nextMessage);\n }\n else {\n this.handleStreamUpdate(result);\n }\n });\n });\n }\n initDatasource() {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.datasource.init(this.datasourceOptions(), true);\n });\n }\n datasourceOptions() {\n return {\n criteria: this.buildCriteria(),\n fields: this.fields,\n isSnapshot: this.isSnapshot,\n orderBy: this.orderBy,\n resourceName: this.resourceName,\n request: this.request,\n reverse: this.reverse,\n maxRows: this.maxRows,\n maxView: this.maxView,\n };\n }\n handleStreamUpdate(result) {\n if (!result)\n return;\n const isRequestServer = result.hasOwnProperty('REPLY');\n if (isRequestServer) {\n this.applyRequestServerData(result);\n }\n else {\n this.applyDataserverData(result);\n }\n }\n applyRequestServerData(requestServerResult) {\n var _a, _b;\n if (!Array.isArray(requestServerResult.REPLY) ||\n !((_a = requestServerResult.MESSAGE_TYPE) === null || _a === void 0 ? void 0 : _a.startsWith('REP_'))) {\n this.handleError({\n message: 'received invalid RequestServerResult',\n loggerType: 'error',\n loggerArgs: [requestServerResult],\n });\n return;\n }\n if (this.requiresFullDataRefresh) {\n if (this.rowId !== 'ROW_REF') {\n (_b = requestServerResult.REPLY) === null || _b === void 0 ? void 0 : _b.forEach((insertData) => {\n this.rowsSyncedWithStream.set(insertData[this.rowId], insertData);\n });\n }\n const rowData = this.rowsSyncedWithStream.size > 0\n ? Array.from(this.rowsSyncedWithStream.values())\n : requestServerResult.REPLY;\n this.syncComponentData(rowData);\n return;\n }\n this.handleStreamInserts(requestServerResult.REPLY);\n const rowsToDelete = Array.from(this.rowsSyncedWithStream.values()).filter((row) => !requestServerResult.REPLY.includes(row));\n this.handleStreamDeletes(rowsToDelete);\n }\n applyDataserverData(dataServerResult) {\n var _a, _b, _c, _d;\n if (this.requiresFullDataRefresh) {\n (_a = dataServerResult.inserts) === null || _a === void 0 ? void 0 : _a.forEach((insertData) => {\n this.rowsSyncedWithStream.set(insertData[this.rowId], insertData);\n });\n const rowData = Array.from(this.rowsSyncedWithStream.values());\n this.syncComponentData(rowData);\n return;\n }\n if (((_b = dataServerResult.inserts) === null || _b === void 0 ? void 0 : _b.length) > 0) {\n this.handleStreamInserts(dataServerResult.inserts);\n }\n if (((_c = dataServerResult.deletes) === null || _c === void 0 ? void 0 : _c.length) > 0) {\n this.handleStreamDeletes(dataServerResult.deletes);\n }\n if (((_d = dataServerResult.updates) === null || _d === void 0 ? void 0 : _d.length) > 0) {\n this.handleStreamUpdates(dataServerResult.updates);\n }\n }\n buildCriteria() {\n var _a;\n const initialCriteria = ((_a = this.criteria) === null || _a === void 0 ? void 0 : _a.split(criteriaDelimiter)) || [];\n return normaliseCriteria(initialCriteria.join(criteriaJoin), criteriaDelimiter);\n }\n setFilter(fieldName, newFilter) {\n this.criteriaFromFilters.set(fieldName, newFilter);\n this.update.next(this.criteriaFromFilters);\n }\n removeFilter(fieldName) {\n this.criteriaFromFilters.delete(fieldName);\n this.update.next(this.criteriaFromFilters);\n }\n handleError(params = {}) {\n const { message, loggerType, loggerArgs = [] } = params;\n if (message) {\n logger[loggerType](message, ...loggerArgs);\n }\n }\n getFieldMetadata(fieldName) {\n var _a;\n return (_a = this.datasource.fieldMetadata) === null || _a === void 0 ? void 0 : _a.find((fm) => fm.name === fieldName);\n }\n getDefaultLabelFormat(field, type) {\n if (type === FieldTypeEnum.DATE || type === FieldTypeEnum.DATETIME) {\n return formatTimestamp(field, type === FieldTypeEnum.DATETIME);\n }\n return field;\n }\n}\n__decorate([\n Connect\n], BaseDatasource.prototype, \"connect\", void 0);\n__decorate([\n Datasource\n], BaseDatasource.prototype, \"datasource\", void 0);\n__decorate([\n attr({ mode: 'boolean' })\n], BaseDatasource.prototype, \"withGridInit\", void 0);\n__decorate([\n attr\n], BaseDatasource.prototype, \"criteria\", void 0);\n__decorate([\n observable\n], BaseDatasource.prototype, \"data\", void 0);\n__decorate([\n attr\n], BaseDatasource.prototype, \"fields\", void 0);\n__decorate([\n attr({ mode: 'boolean' })\n], BaseDatasource.prototype, \"isSnapshot\", void 0);\n__decorate([\n attr\n], BaseDatasource.prototype, \"maxRows\", void 0);\n__decorate([\n attr\n], BaseDatasource.prototype, \"maxView\", void 0);\n__decorate([\n attr\n], BaseDatasource.prototype, \"orderBy\", void 0);\n__decorate([\n attr\n], BaseDatasource.prototype, \"resourceName\", void 0);\n__decorate([\n attr({ mode: 'boolean' })\n], BaseDatasource.prototype, \"reverse\", void 0);\n__decorate([\n attr\n], BaseDatasource.prototype, \"rowId\", void 0);\n__decorate([\n attr({ mode: 'boolean', attribute: 'with-timestamp-formatting' })\n], BaseDatasource.prototype, \"withTimestampFormatting\", void 0);\n","export const wasClickOutsideElement = (event, target) => !event.composedPath().includes(target);\nexport const wasClickInsideElement = (event, target) => event.composedPath().includes(target);\nexport const getPrefix = (element) => element.tagName.toLowerCase().split('-')[0];\nexport function getRootActiveElement(element) {\n const rootNode = element.getRootNode();\n if (rootNode instanceof ShadowRoot) {\n return rootNode.activeElement;\n }\n return document.activeElement;\n}\n","import { createLogger } from '@genesislcap/foundation-logger';\nexport const logger = createLogger('foundation-criteria');\n","/**\n * @internal\n */\nexport var Operator;\n(function (Operator) {\n Operator[\"AND\"] = \"&&\";\n Operator[\"OR\"] = \"||\";\n Operator[\"NOT\"] = \"!\";\n Operator[\"GT\"] = \">\";\n Operator[\"GE\"] = \">=\";\n Operator[\"LT\"] = \"<\";\n Operator[\"LE\"] = \"<=\";\n Operator[\"NE\"] = \"!=\";\n Operator[\"EQ\"] = \"==\";\n})(Operator || (Operator = {}));\n/**\n * Used to describe how Expressions are joined\n * @public\n */\nexport class Join {\n constructor(type) {\n this.$$operator = type;\n }\n static And() {\n return new Join(Operator.AND);\n }\n static Or() {\n return new Join(Operator.OR);\n }\n static Not() {\n return new Join(Operator.NOT);\n }\n static GreaterThan() {\n return new Join(Operator.GT);\n }\n static GreaterThanOrEqual() {\n return new Join(Operator.GE);\n }\n static LessThan() {\n return new Join(Operator.LT);\n }\n static LessThanOrEqual() {\n return new Join(Operator.LE);\n }\n static NotEqual() {\n return new Join(Operator.NE);\n }\n static Equal() {\n return new Join(Operator.EQ);\n }\n get operator() {\n return this.$$operator;\n }\n}\n","/* eslint-disable @typescript-eslint/no-magic-numbers */\nimport { Serialisers } from './serialisers';\nexport const interleave = (source, obj) => source\n .flat()\n .flatMap((value, index, array) => (array.length - 1 !== index ? [value, obj] : value));\nexport const ensureArray = (value) => (Array.isArray(value) ? value : [value]);\nexport const isExpressionParams = (value) => ((Array.isArray(value) && value.length === 3) ||\n (value.length === 4 && Array.isArray(value[0])) ||\n typeof value[0] === 'string') &&\n typeof value[1] === 'function' &&\n Object.values(Serialisers).includes(value[1]);\n","import { logger } from './logger';\nimport { Join } from './types';\nimport { interleave } from './utils';\nconst DEFAULT_GROUP = 'default';\n/**\n * Builder class used to generate query criteria\n *\n * @public\n */\nexport class CriteriaBuilder {\n constructor() {\n this.expressions = {};\n this.And = (expression, options = {}) => this.withExpression(expression, options, Join.And());\n this.Or = (expression, options = {}) => this.withExpression(expression, options, Join.Or());\n this.Not = (expression, options = {}) => this.withExpression(expression, options, Join.Not());\n }\n withExpression(expression, options = {}, groupJoin = Join.And()) {\n const { condition, join: optionsJoin, groupName } = options;\n const addExpressionToGroup = (e, gName = DEFAULT_GROUP) => {\n var _a;\n const prev = (_a = this.expressions[gName]) !== null && _a !== void 0 ? _a : [];\n this.expressions[gName] = [\n ...prev,\n { join: groupJoin || optionsJoin, condition, expression: e },\n ];\n };\n // When expression is array of expressions\n if (Array.isArray(expression)) {\n // And a join option is present\n if (optionsJoin) {\n // Remove inline joins\n const withoutInline = expression.filter((e) => {\n const isJoin = e instanceof Join;\n if (isJoin) {\n logger.warn('Inline joins will be discarded when join is defined in ExpressionOptions');\n }\n return !isJoin;\n });\n if (groupName) {\n // Add every expression to the group\n withoutInline.forEach((exp) => {\n addExpressionToGroup(exp, groupName);\n });\n }\n else {\n // Merge join specified in options with expressions and add to group\n const joined = interleave(withoutInline, optionsJoin);\n addExpressionToGroup(joined, DEFAULT_GROUP);\n }\n }\n else {\n addExpressionToGroup(expression, DEFAULT_GROUP);\n }\n }\n else if (typeof expression === 'string') {\n addExpressionToGroup(expression, DEFAULT_GROUP);\n }\n else {\n addExpressionToGroup(expression, expression.group);\n }\n return this;\n }\n build(outputFn) {\n const parsedExpressions = Object.entries(this.expressions).reduce((acc, [groupName, expressions]) => (Object.assign(Object.assign({}, acc), { [groupName]: `(${expressions\n .filter(({ condition }) => (condition ? condition() : true))\n .map(({ expression, join }, index, arr) => this.parseExpression(expression, arr[index - 1], join))\n .join('')})` })), {});\n return outputFn\n ? outputFn(parsedExpressions)\n : `(${Object.values(parsedExpressions).join(' && ')})`;\n }\n reset() {\n this.expressions = {};\n }\n parseExpression(expression, previous, join) {\n const result = [];\n if (join && !!previous) {\n result.push(` ${join.operator} `);\n }\n if (typeof expression === 'string') {\n result.push(expression);\n }\n else if (Array.isArray(expression)) {\n expression.forEach((e, idx, arr) => {\n if (e instanceof Join) {\n const prev = arr[idx - 1];\n if (prev instanceof Join) {\n throw new Error('Adjacent Join operations detected');\n }\n }\n });\n result.push(`(${expression.map((e) => this.parseExpression(e, undefined)).join('')})`);\n }\n else if (expression instanceof Join) {\n result.push(` ${expression.operator} `);\n }\n else if (expression) {\n result.push(expression.serialiser(expression));\n }\n return result.join('');\n }\n}\n","import { Operator } from './types';\nconst getValue = (e) => {\n const { value } = e;\n if (e.valueGetter) {\n return e.valueGetter(value);\n }\n else if (typeof value === 'function') {\n return value(e);\n }\n else if (Array.isArray(value)) {\n return value.join(',');\n }\n else if (typeof value === 'string') {\n return `\"${value}\"`;\n }\n return value;\n};\nconst createSerialiser = (operator) => (e) => `${e.field} ${operator} ${getValue(e)}`;\n/**\n * Functions to to serialise an Expression to a string\n * @public\n */\nexport const Serialisers = {\n AND: (e) => createSerialiser(Operator.AND)(e),\n OR: (e) => createSerialiser(Operator.OR)(e),\n NOT: (e) => createSerialiser(Operator.NOT)(e),\n GT: (e) => createSerialiser(Operator.GT)(e),\n GE: (e) => createSerialiser(Operator.GE)(e),\n LT: (e) => createSerialiser(Operator.LT)(e),\n LE: (e) => createSerialiser(Operator.LE)(e),\n NE: (e) => createSerialiser(Operator.NE)(e),\n EQ: (e) => createSerialiser(Operator.EQ)(e),\n equals: (e) => `${e.field}.equals(${getValue(e)})`,\n equalsIgnoreCase: (e) => `${e.field}.equalsIgnoreCase(${getValue(e)})`,\n contains: (e) => `Expr.contains(${e.field}, ${getValue(e)})`,\n fieldContains: (e) => `${e.field}.contains(${getValue(e)})`,\n containsIgnoreCase: (e) => `Expr.containsIgnoreCase(${e.field}, ${getValue(e)})`,\n dateIsEqual: (e) => `Expr.dateIsEqual(${e.field}, ${getValue(e)})`,\n dateIsGreaterEqual: (e) => `Expr.dateIsGreaterEqual(${e.field}, ${getValue(e)})`,\n dateIsLessEqual: (e) => `Expr.dateIsLessEqual(${e.field}, ${getValue(e)})`,\n dateTimeIsGreaterEqual: (e) => `Expr.dateTimeIsGreaterEqual(${e.field}, ${getValue(e)})`,\n dateTimeIsLessEqual: (e) => `Expr.dateTimeIsLessEqual(${e.field}, ${getValue(e)})`,\n};\n","import { Serialisers } from './serialisers';\n/**\n * @public\n */\nexport class ExpressionBuilder {\n constructor(opts) {\n this.serialiser = Serialisers.EQ;\n this.build = () => {\n if (!this.field) {\n throw new Error(`Missing required param 'field'`);\n }\n if (this.value === undefined) {\n throw new Error(`Missing required param 'value'`);\n }\n if (!this.serialiser) {\n throw new Error(`Missing required param 'serialise'`);\n }\n return {\n field: this.field,\n value: this.value,\n serialiser: this.serialiser,\n params: this.params,\n valueGetter: this.valueGetter,\n group: this.group,\n };\n };\n if (opts) {\n this.field = opts.field;\n this.value = opts.value;\n this.serialiser = opts.serialiser;\n this.params = opts.params;\n this.valueGetter = opts.valueGetter;\n this.group = opts.group;\n }\n }\n withField(field) {\n this.field = field;\n return this;\n }\n withValue(value) {\n this.value = value;\n return this;\n }\n withSerialiser(serialiser) {\n this.serialiser = serialiser;\n return this;\n }\n withParams(params) {\n this.params = params;\n return this;\n }\n withValueGetter(valueGetter) {\n this.valueGetter = valueGetter;\n return this;\n }\n withGroup(group) {\n this.group = group;\n return this;\n }\n}\n","import { CriteriaBuilder, ExpressionBuilder, Serialisers } from '@genesislcap/foundation-criteria';\nexport function dataserverCriteriaBuilder(datasource, value) {\n var _a;\n const criteriaBuilder = new CriteriaBuilder();\n criteriaBuilder.withExpression(new ExpressionBuilder()\n .withField((_a = datasource.labelField) !== null && _a !== void 0 ? _a : datasource.valueField)\n .withValue(value)\n .withSerialiser(Serialisers.containsIgnoreCase)\n .build());\n if (datasource.baseCriteria) {\n datasource.criteria = `${datasource.baseCriteria} && ${criteriaBuilder.build()}`;\n }\n else {\n datasource.criteria = criteriaBuilder.build();\n }\n}\nexport function requestServerCriteriaBuilder(datasource, value) {\n var _a;\n const requestFieldName = (_a = datasource.labelField) !== null && _a !== void 0 ? _a : datasource.valueField;\n datasource.request = {\n [requestFieldName]: `${value}*`,\n };\n datasource.fetchGenesisData(false);\n}\n","import { html, ref, repeat, when } from '@microsoft/fast-element';\nimport { getPrefix } from '../utils';\nexport const menuTemplate = (prefix) => html `\n <${prefix}-button\n id=\"actiosnMenuTrigger\"\n class=\"actions-opener${(x) => (x.open ? ' opened' : '')}\"\n appearance=\"${(x) => x.buttonAppearance}\"\n part=\"actions-opener\"\n @click=${(x) => x.toggleActionsMenuVisibility()}\n >\n ${(x) => x.open\n ? '✖'\n : html `\n ${x.name}\n `}\n </${prefix}-button>\n <${prefix}-menu ${ref('actionsMenu')} class=\"actions-menu ${(x) => x.classNames}\" part=\"actions-menu\">\n ${repeat((x) => x.allActions, html `\n ${when((x, context) => x.isDisabled && x.isDisabled(context.parent.rowData), html `\n <${prefix}-menu-item\n class=\"menu-item\"\n tabindex=\"${(x, context) => context.index}\"\n disabled\n style=${(x, ctx) => (ctx.parent.hideDisabled ? 'display:none' : '')}\n >\n ${(x, ctx) => ctx.parent.getLabel(x.name)}\n </${prefix}-menu-item>\n `)}\n ${when((x, context) => !x.isDisabled || !x.isDisabled(context.parent.rowData), html `\n <${prefix}-menu-item\n class=\"menu-item\"\n tabindex=\"${(x, context) => context.index}\"\n @click=${(x, context) => context.parent.onActionMenuItemClick(x.callback)}\n style=\"${(x) => (x.color ? `color: ${x.color};` : '')}\"\n >\n ${(x, ctx) => ctx.parent.getLabel(x.name)}\n </${prefix}-menu-item>\n `)}\n `, { positioning: true })}\n </${prefix}-menu>\n`;\nexport const singleOptionTemplate = (prefix) => html `\n <${prefix}-button\n appearance=\"${(x) => x.buttonAppearance}\"\n part=\"actions-opener\"\n class=\"actions-opener\"\n @click=${(x) => {\n return x === null || x === void 0 ? void 0 : x.singleOption.callback(x.rowData);\n}}\n ?disabled=${(x) => {\n return (x === null || x === void 0 ? void 0 : x.singleOption.isDisabled) && (x === null || x === void 0 ? void 0 : x.singleOption.isDisabled(x.rowData));\n}}\n >\n ${(x) => x.getLabel(x === null || x === void 0 ? void 0 : x.singleOption.name)}\n </${prefix}-button>\n`;\nexport const foundationActionsMenuTemplate = html `\n <div\n class=\"actions-container${(x) => (x.isVertical ? ' actions-vertical' : '')}\"\n part=\"actions-container\"\n >\n ${(x) => x.getTemplate(getPrefix(x))}\n </div>\n`;\n","import { __decorate } from \"tslib\";\nimport { attr, observable } from '@microsoft/fast-element';\nimport { FoundationElement } from '@microsoft/fast-foundation';\nimport { classNames } from '@microsoft/fast-web-utilities';\nimport { foundationActionsMenuStyles as styles } from './actions-menu.styles';\nimport { singleOptionTemplate, menuTemplate, foundationActionsMenuTemplate as template, } from './actions-menu.template';\n/**\n * @tagname %%prefix%%-actions-menu\n */\nexport class ActionsMenu extends FoundationElement {\n constructor() {\n super(...arguments);\n this.isVertical = false;\n this.addDefaultActions = true;\n this.autoCloseOnAction = true;\n this.name = 'Actions';\n this.open = false;\n this.hideDisabled = false;\n this.hideMenuSingleOption = false;\n }\n definitionChanged(oldValue, newValue) {\n var _a;\n this.actions = (_a = newValue === null || newValue === void 0 ? void 0 : newValue.actions) !== null && _a !== void 0 ? _a : [];\n delete this.definition.actions;\n if (newValue.buttonText) {\n this.name = newValue.buttonText;\n delete this.definition.customButtonText;\n }\n if (newValue.isVertical) {\n this.isVertical = newValue.isVertical;\n delete this.definition.isVertical;\n }\n if (newValue.buttonAppearance) {\n this.buttonAppearance = newValue.buttonAppearance;\n delete this.definition.buttonAppearance;\n }\n if (newValue.hideMenuSingleOption) {\n this.hideMenuSingleOption = newValue.hideMenuSingleOption;\n delete this.definition.hideMenuSingleOption;\n }\n }\n openChanged() {\n this.classNames = classNames(['visible', this.open], ['hidden', !this.open]);\n }\n toggleActionsMenuVisibility() {\n this.open = !this.open;\n }\n onActionMenuItemClick(callback) {\n if (this.autoCloseOnAction)\n this.open = false;\n callback(this.rowData);\n }\n get allActions() {\n var _a;\n const defaultActions = [\n {\n name: '✖',\n callback: () => (this.open = false),\n },\n ];\n return this.addDefaultActions ? [...((_a = this.actions) !== null && _a !== void 0 ? _a : []), ...defaultActions] : this.actions;\n }\n get rowData() {\n if (!this.definition)\n return;\n const { node, data } = this.definition;\n return (node === null || node === void 0 ? void 0 : node.data) || data;\n }\n getLabel(name) {\n if (typeof name === 'function') {\n return name(this.rowData);\n }\n return name;\n }\n getTemplate(prefix) {\n if (!this.hideMenuSingleOption) {\n return menuTemplate(prefix);\n }\n const enabledRows = this.actions.filter((action) => {\n if (!action.isDisabled) {\n return true;\n }\n return !action.isDisabled(this.rowData);\n });\n this.singleOption = null;\n if (enabledRows.length === 0) {\n return;\n }\n else if (enabledRows.length === 1) {\n this.singleOption = enabledRows[0];\n return singleOptionTemplate(prefix);\n }\n return menuTemplate(prefix);\n }\n}\n__decorate([\n observable\n], ActionsMenu.prototype, \"actions\", void 0);\n__decorate([\n attr({ attribute: 'is-vertical', mode: 'boolean' })\n], ActionsMenu.prototype, \"isVertical\", void 0);\n__decorate([\n attr({ attribute: 'add-default-actions', mode: 'boolean' })\n], ActionsMenu.prototype, \"addDefaultActions\", void 0);\n__decorate([\n attr({ attribute: 'auto-close-on-action', mode: 'boolean' })\n], ActionsMenu.prototype, \"autoCloseOnAction\", void 0);\n__decorate([\n observable\n], ActionsMenu.prototype, \"classNames\", void 0);\n__decorate([\n observable\n], ActionsMenu.prototype, \"definition\", void 0);\n__decorate([\n attr\n], ActionsMenu.prototype, \"name\", void 0);\n__decorate([\n attr({ attribute: 'open', mode: 'boolean' })\n], ActionsMenu.prototype, \"open\", void 0);\n__decorate([\n attr\n], ActionsMenu.prototype, \"buttonAppearance\", void 0);\n__decorate([\n attr({ attribute: 'hide-disabled', mode: 'boolean' })\n], ActionsMenu.prototype, \"hideDisabled\", void 0);\n__decorate([\n attr({ attribute: 'hide-menu-single-option', mode: 'boolean' })\n], ActionsMenu.prototype, \"hideMenuSingleOption\", void 0);\n__decorate([\n observable\n], ActionsMenu.prototype, \"singleOption\", void 0);\n/**\n * The Foundation Actions Menu\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-actions-menu\\>\n */\nexport const foundationActionsMenu = ActionsMenu.compose({\n baseName: 'actions-menu',\n styles,\n template,\n});\n","import { anchorTemplate as fastAnchorTemplate } from '@microsoft/fast-foundation';\nexport const foundationAnchorTemplate = (context, definition) => fastAnchorTemplate(context, definition);\n","import { anchorStyles as fastAnchorStyles } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationAnchorStyles = (context, definition) => css `\n ${fastAnchorStyles(context, definition)}\n`;\n","import { Anchor as FASTAnchor } from '@microsoft/fast-components';\nimport { foundationAnchorStyles as styles } from './anchor.styles';\nimport { foundationAnchorTemplate as template } from './anchor.template';\n/**\n * @tagname %%prefix%%-anchor\n */\nexport class Anchor extends FASTAnchor {\n}\n// explicitly declaring for extensibility\nexport const foundationAnchorShadowOptions = {\n delegatesFocus: true,\n mode: 'open',\n};\nexport const defaultAnchorConfig = {};\n/**\n * The Foundation Anchor\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-anchor\\>\n */\nexport const foundationAnchor = Anchor.compose(Object.assign({ baseName: 'anchor', template,\n styles, shadowOptions: foundationAnchorShadowOptions }, defaultAnchorConfig));\n","import { anchoredRegionTemplate as fastAnchoredRegionTemplate } from '@microsoft/fast-foundation';\nexport const foundationAnchoredRegionTemplate = (context, definition) => fastAnchoredRegionTemplate(context, definition);\n","import { anchoredRegionStyles as fastAnchoredRegionStyles } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationAnchoredRegionStyles = (context, definition) => css `\n ${fastAnchoredRegionStyles(context, definition)}\n`;\n","import { AnchoredRegion as FASTAnchoredRegion } from '@microsoft/fast-components';\nimport { foundationAnchoredRegionTemplate as template } from './anchor-region.template';\nimport { foundationAnchoredRegionStyles as styles } from './anchored-region.styles';\n/**\n * @tagname %%prefix%%-anchored-region\n */\nexport class AnchoredRegion extends FASTAnchoredRegion {\n}\n// explicitly declaring for extensibility\nexport const foundationAnchoredRegionShadowOptions = {\n delegatesFocus: true,\n mode: 'open',\n};\nexport const defaultAnchoredRegionConfig = {};\n/**\n * The Foundation Anchored Region\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-anchored-region\\>\n */\nexport const foundationAnchoredRegion = AnchoredRegion.compose(Object.assign({ baseName: 'anchored-region', template,\n styles, shadowOptions: foundationAnchoredRegionShadowOptions }, defaultAnchoredRegionConfig));\n","import { html, when } from '@microsoft/fast-element';\nimport { avatarTemplate as fastAvatarTemplate } from '@microsoft/fast-foundation';\nexport const foundationAvatarTemplate = (context, definition) => fastAvatarTemplate(context, definition);\nexport const media = html `\n ${when((x) => x.imgSrc, html `\n <img src=\"${(x) => x.imgSrc}\" alt=\"${(x) => x.alt}\" slot=\"media\" class=\"media\" part=\"media\" />\n `)}\n`;\n","import { avatarStyles as fastAvatarStyles } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationAvatarStyles = (context, definition) => css `\n ${fastAvatarStyles(context, definition)}\n`;\n","import { Avatar as FASTAvatar } from '@microsoft/fast-components';\nimport { foundationAvatarStyles as styles } from './avatar.styles';\nimport { foundationAvatarTemplate as template, media as mediaTemplate } from './avatar.template';\n/**\n * @tagname %%prefix%%-avatar\n */\nexport class Avatar extends FASTAvatar {\n}\n// explicitly declaring for extensibility\nexport const foundationAvatarShadowOptions = {\n delegatesFocus: true,\n mode: 'open',\n};\nexport const defaultAvatarConfig = {\n media: mediaTemplate,\n};\n/**\n * The Foundation Avatar\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-avatar\\>\n */\nexport const foundationAvatar = Avatar.compose(Object.assign({ baseName: 'avatar', template,\n styles, shadowOptions: foundationAvatarShadowOptions }, defaultAvatarConfig));\n","import { badgeTemplate as fastBadgeTemplate } from '@microsoft/fast-foundation';\nexport const foundationBadgeTemplate = (context, definition) => fastBadgeTemplate(context, definition);\n","import { badgeStyles as fastBadgeStyles } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationBadgeStyles = (context, definition) => css `\n ${fastBadgeStyles(context, definition)}\n`;\n","import { Badge as FASTBadge } from '@microsoft/fast-components';\nimport { foundationBadgeStyles as styles } from './badge.styles';\nimport { foundationBadgeTemplate as template } from './badge.template';\n/**\n * @tagname %%prefix%%-badge\n */\nexport class Badge extends FASTBadge {\n}\n// explicitly declaring for extensibility\nexport const foundationBadgeShadowOptions = undefined;\nexport const defaultBadgeConfig = {};\n/**\n * The Foundation Badge\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-badge\\>\n */\nexport const foundationBadge = Badge.compose(Object.assign({ baseName: 'badge', template,\n styles, shadowOptions: foundationBadgeShadowOptions }, defaultBadgeConfig));\n","import { css } from '@microsoft/fast-element';\nexport const foundationBannerStyles = css `\n @keyframes delete-animate {\n from {\n height: 100px;\n opacity: 100%;\n }\n\n to {\n height: 0;\n opacity: 0%;\n }\n }\n\n @keyframes append-animate {\n from {\n height: 0;\n opacity: 0%;\n }\n\n to {\n height: var(--banner-height);\n opacity: 100%;\n }\n }\n\n :host {\n --banner-width: 100%;\n --banner-height: 65px;\n --flow: row;\n }\n\n @media screen and (max-width: 640px) {\n :host {\n --flow: column;\n --banner-height: 100px;\n }\n }\n\n .banner {\n animation: append-animate 0.3s linear;\n width: var(--banner-width);\n height: var(--banner-height);\n background-color: var(--fill-color);\n display: flex;\n flex-direction: var(--flow);\n padding: 5px 8px;\n box-sizing: border-box;\n overflow: hidden;\n }\n\n .banner-delete {\n animation: delete-animate 0.3s linear;\n opacity: 0%;\n }\n\n .content {\n display: flex;\n align-items: center;\n flex: 2;\n font-size: 12px;\n overflow: hidden;\n white-space: pre-line;\n }\n\n .action {\n display: flex;\n flex-direction: row-reverse;\n align-items: center;\n gap: 10px;\n flex: 1;\n overflow: hidden;\n }\n`;\n","import { html, ref, repeat, when } from '@microsoft/fast-element';\nimport { getPrefix } from '../utils';\nexport const getBannerTemplate = (prefix) => html `\n <div role=\"alert\" aria-live=\"polite\" class=\"banner ${(x) => x.dismissAnimation}\" ${ref('banner')}>\n <div part=\"content\" class=\"content\">\n <slot name=\"content\">\n ${when((x) => x.notification, html `\n <div>\n <div>${(x) => { var _a; return ((_a = x.notification) === null || _a === void 0 ? void 0 : _a.body) || 'Place holder for notification message'; }}</div>\n </div>\n `)}\n </slot>\n </div>\n <div part=\"action\" class=\"action\">\n <slot name=\"action\" class=\"action\">\n ${when((x) => x.notification, html `\n <${prefix}-button slot=\"action\" appearance=\"lightweight\" @click=${(x) => x.dismiss()}>\n ${(x) => { var _a, _b, _c, _d; return ((_d = (_c = (_b = (_a = x.notification) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.banner) === null || _c === void 0 ? void 0 : _c.dismissingAction) === null || _d === void 0 ? void 0 : _d.label) || 'Ignore'; }}\n </${prefix}-button>`)}\n ${repeat((x) => { var _a, _b; return (_b = (_a = x.notification) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.banner.confirmingActions; }, html `\n <${prefix}-button\n slot=\"action\"\n appearance=\"lightweight\"\n @click=${(x, c) => {\n var _a;\n x === null || x === void 0 ? void 0 : x.action();\n (_a = c.parent) === null || _a === void 0 ? void 0 : _a.dismissNotification();\n}}\n >\n ${(x) => x.label}\n </${prefix}-button>\n `)}\n </slot>\n </div>\n </div>\n`;\nexport const foundationBannerTemplate = html `\n ${(x) => getBannerTemplate(getPrefix(x))}\n`;\n","import { __awaiter, __decorate } from \"tslib\";\nimport { observable } from '@microsoft/fast-element';\nimport { FoundationElement } from '@microsoft/fast-foundation';\nimport { logger } from '../utils';\nimport { foundationBannerStyles as styles } from './banner.styles';\nimport { foundationBannerTemplate as template } from './banner.template';\nexport const foundationBannerShadowOptions = {\n mode: 'open',\n delegatesFocus: true,\n};\n/**\n * @tagname %%prefix%%-banner\n */\nexport class Banner extends FoundationElement {\n constructor() {\n super(...arguments);\n this.dismissAnimation = '';\n }\n connectedCallback() {\n super.connectedCallback();\n }\n /**\n * Dismiss the Banner from display.\n */\n dismiss() {\n this.dismissAnimation = 'banner-delete';\n return new Promise((resolve) => {\n this.banner.onanimationend = () => {\n this.remove();\n resolve();\n };\n });\n }\n /**\n * Dismiss the Banner (NotificationStructure) from display.\n */\n dismissNotification() {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n yield this.dismiss();\n this.remove();\n }\n catch (e) {\n logger.error(e);\n }\n });\n }\n}\n__decorate([\n observable\n], Banner.prototype, \"dismissAnimation\", void 0);\n__decorate([\n observable\n], Banner.prototype, \"notification\", void 0);\n/**\n * The Foundation Banner\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-banner\\>\n */\nexport const foundationBanner = Banner.compose({\n baseName: 'banner',\n styles,\n template,\n shadowOptions: foundationBannerShadowOptions,\n});\n","import { breadcrumbTemplate as fastBreadcrumbTemplate } from '@microsoft/fast-foundation';\nexport const foundationBreadcrumbTemplate = (context, definition) => fastBreadcrumbTemplate(context, definition);\n","import { breadcrumbStyles as fastBreadcrumbStyles } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationBreadcrumbStyles = (context, definition) => css `\n ${fastBreadcrumbStyles(context, definition)}\n`;\n","import { Breadcrumb as FASTBreadcrumb } from '@microsoft/fast-components';\nimport { foundationBreadcrumbStyles as styles } from './breadcrumb.styles';\nimport { foundationBreadcrumbTemplate as template } from './breadcrumb.template';\n/**\n * @tagname %%prefix%%-breadcrumb\n */\nexport class Breadcrumb extends FASTBreadcrumb {\n}\n// explicitly declaring for extensibility\nexport const foundationBreadcrumbShadowOptions = undefined;\nexport const defaultBreadcrumbConfig = {};\n/**\n * The Foundation Breadcrumb\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-breadcrumb\\>\n */\nexport const foundationBreadcrumb = Breadcrumb.compose(Object.assign({ baseName: 'breadcrumb', template,\n styles, shadowOptions: foundationBreadcrumbShadowOptions }, defaultBreadcrumbConfig));\n","import { breadcrumbItemTemplate as fastBreadcrumbItemTemplate } from '@microsoft/fast-foundation';\nexport const foundationBreadcrumbItemTemplate = (context, definition) => fastBreadcrumbItemTemplate(context, definition);\n","import { breadcrumbItemStyles as fastBreadcrumbItemStyles } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationBreadcrumbItemStyles = (context, definition) => css `\n ${fastBreadcrumbItemStyles(context, definition)}\n`;\n","import { BreadcrumbItem as FASTBreadcrumbItem } from '@microsoft/fast-components';\nimport { foundationBreadcrumbItemStyles as styles } from './breadcrumb-item.styles';\nimport { foundationBreadcrumbItemTemplate as template } from './breadcrumb-item.template';\n/**\n * @tagname %%prefix%%-breadcrumb-item\n */\nexport class BreadcrumbItem extends FASTBreadcrumbItem {\n}\n// explicitly declaring for extensibility\nexport const foundationBreadcrumbItemShadowOptions = undefined;\nexport const defaultBreadcrumbItemConfig = {\n separator: '/',\n};\n/**\n * The Foundation Breadcrumb Item\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-breadcrumb-item\\>\n */\nexport const foundationBreadcrumbItem = BreadcrumbItem.compose(Object.assign({ baseName: 'breadcrumb-item', template,\n styles, shadowOptions: foundationBreadcrumbItemShadowOptions }, defaultBreadcrumbItemConfig));\n","import { buttonTemplate as fastButtonTemplate } from '@microsoft/fast-foundation';\nexport const foundationButtonTemplate = (context, definition) => fastButtonTemplate(context, definition);\n","import { buttonStyles as fastButtonStyles } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationButtonStyles = (context, definition) => css `\n ${fastButtonStyles(context, definition)}\n`;\n","import { Button as FASTButton } from '@microsoft/fast-components';\nimport { foundationButtonStyles as styles } from './button.styles';\nimport { foundationButtonTemplate as template } from './button.template';\n/**\n * @tagname %%prefix%%-button\n */\nexport class Button extends FASTButton {\n}\n// explicitly declaring for extensibility\nexport const foundationButtonShadowOptions = {\n delegatesFocus: true,\n mode: 'open',\n};\nexport const defaultButtonConfig = {};\n/**\n * The Foundation Button\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-button\\>\n */\nexport const foundationButton = Button.compose(Object.assign({ baseName: 'button', template,\n styles, shadowOptions: foundationButtonShadowOptions }, defaultButtonConfig));\n","import { CalendarStyles as fastCalendarStyles } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationCalendarStyles = () => css `\n ${fastCalendarStyles}\n`;\n","import { calendarTemplate as fastCalendarTemplate } from '@microsoft/fast-foundation';\nexport const foundationCalendarTemplate = (context, definition) => fastCalendarTemplate(context, definition);\n","import { Calendar as FASTCalendar } from '@microsoft/fast-components';\nimport { foundationCalendarStyles as styles } from './calendar.styles';\nimport { foundationCalendarTemplate as template } from './calendar.template';\n/**\n * @tagname %%prefix%%-calendar\n */\nexport class Calendar extends FASTCalendar {\n}\n// explicitly declaring for extensibility\nexport const foundationCalendarShadowOptions = {\n delegatesFocus: true,\n mode: 'open',\n};\nexport const defaultCalendarConfig = {};\n/**\n * The Foundation Calendar\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-calendar\\>\n */\nexport const foundationCalendar = Calendar.compose(Object.assign({ baseName: 'calendar', template,\n styles, shadowOptions: foundationCalendarShadowOptions }, defaultCalendarConfig));\n","import { cardTemplate as fastCardTemplate } from '@microsoft/fast-foundation';\nexport const foundationCardTemplate = (context, definition) => fastCardTemplate(context, definition);\n","import { cardStyles as fastCardStyles } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationCardStyles = (context, definition) => css `\n ${fastCardStyles(context, definition)}\n :host {\n background-color: var(--fui-card-fill-color);\n color: var(--fui-card-foreground-color);\n }\n`;\n","import { Card as FASTCard } from '@microsoft/fast-components';\nimport { foundationCardStyles as styles } from './card.styles';\nimport { foundationCardTemplate as template } from './card.template';\n/**\n * @tagname %%prefix%%-card\n */\nexport class Card extends FASTCard {\n}\n// explicitly declaring for extensibility\nexport const foundationCardShadowOptions = undefined;\nexport const defaultCardConfig = {};\n/**\n * The Foundation Card\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-card\\>\n */\nexport const foundationCard = Card.compose(Object.assign({ baseName: 'card', template,\n styles, shadowOptions: foundationCardShadowOptions }, defaultCardConfig));\n","export var Position;\n(function (Position) {\n Position[\"BELOW\"] = \"below\";\n Position[\"ABOVE\"] = \"above\";\n})(Position || (Position = {}));\n","import { css } from '@microsoft/fast-element';\nexport const maxheight = 230;\nexport const multiselectStyles = css `\n :host {\n --scrollbar-width: 12px;\n --scrollbar-thumb-width: 8px;\n }\n\n .root {\n position: relative;\n width: inherit;\n min-width: 250px;\n }\n\n .control {\n cursor: pointer;\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n border-radius: calc(var(--control-corner-radius) * 1px);\n }\n\n #display-field {\n width: 100%;\n cursor: pointer;\n color: rgb(241 241 241);\n min-height: 40px;\n padding: 0 calc(var(--design-unit) * 2.25px);\n border-width: 0;\n background-color: var(--neutral-fill-input-rest);\n border-radius: calc(var(--control-corner-radius) * 1px);\n }\n\n #display-field[disabled] {\n cursor: not-allowed;\n opacity: 30%;\n }\n\n #display-field:focus {\n outline: 1px solid var(--accent-fill-rest);\n background: var(--neutral-fill-input-rest);\n border-style: none;\n box-shadow: none;\n }\n\n #display-field:hover:not(:focus):not([disabled]) {\n outline: 1px solid rgb(231 232 232);\n }\n\n button {\n pointer-events: none;\n }\n\n .indicator {\n position: absolute;\n left: calc(100% - 26px);\n padding: 0;\n cursor: pointer;\n }\n\n #arrow-icon {\n width: 16px;\n fill: white;\n transform: rotate(0deg);\n transition: transform 0.2s linear 0s;\n }\n\n #arrow-icon.flipped {\n transform: rotate(180deg);\n }\n\n .disabled-svg {\n pointer-events: none;\n opacity: 30%;\n }\n\n .position-above {\n bottom: 100%;\n }\n\n ::-webkit-scrollbar {\n width: var(--scrollbar-width);\n }\n\n ::-webkit-scrollbar-track {\n background: var(--neutral-layer-4);\n }\n\n ::-webkit-scrollbar-thumb {\n width: var(--scrollbar-thumb-width);\n border-radius: 10px;\n box-shadow: inset 0 0 6px rgba(0 0 0 / 30%);\n background-color: var(--neutral-layer-2);\n border: 3px solid var(--neutral-layer-4);\n }\n\n ::-webkit-scrollbar-corner {\n background: var(--neutral-layer-4);\n }\n\n .multiselect-dropdown {\n display: flex;\n flex-direction: column;\n position: absolute;\n height: max-content;\n overflow: hidden;\n margin-top: calc(var(--design-unit) * 1px);\n border: calc(var(--stroke-width) * 1px) solid var(--neutral-layer-2);\n border-radius: 4px;\n background: var(--neutral-fill-input-rest);\n width: 100%;\n max-height: 0;\n visibility: hidden;\n z-index: 999;\n }\n\n .multiselect-dropdown:not(.is-resizing) {\n transition:\n max-height 0.4s ease 0s,\n visibility 0.4s ease 0s;\n }\n\n .checkbox-container {\n display: flex;\n flex-direction: column;\n list-style: none;\n overflow-y: auto;\n height: 100%;\n }\n\n .is-resizing .checkbox-container {\n overflow-y: hidden;\n }\n\n .checkbox-container zero-checkbox {\n min-width: fit-content;\n }\n\n .checkbox-container zero-checkbox[disabled],\n .checkbox-container foundation-checkbox[disabled] {\n cursor: not-allowed;\n }\n\n .visible {\n visibility: visible;\n max-height: var(--custom-max-height, ${maxheight.toString()}px);\n overflow: hidden;\n }\n\n ::slotted(foundation-checkbox),\n foundation-checkbox {\n border-bottom: 1px solid var(--neutral-layer-4);\n padding: 5px 0 5px 5px;\n margin: 0;\n }\n\n ::slotted(foundation-checkbox:hover),\n foundation-checkbox:hover {\n background-color: var(--neutral-layer-3);\n cursor: pointer;\n }\n\n ::slotted(foundation-checkbox)::part(label),\n foundation-checkbox::part(label) {\n overflow-x: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .label {\n display: block;\n cursor: pointer;\n font-size: var(--type-ramp-base-font-size);\n line-height: var(--type-ramp-base-line-height);\n font-style: normal;\n margin: calc(var(--design-unit) * 2px) 0;\n }\n\n .label-hidden {\n display: none;\n }\n\n ol,\n li {\n margin: 0;\n padding: 0;\n }\n\n .checkbox {\n width: 100%;\n }\n\n .select-all {\n width: 100%;\n margin-left: 0;\n margin-right: 0;\n }\n\n .display-value {\n position: absolute;\n right: 40px;\n color: var(--neutral-foreground-rest);\n font-size: var(--type-ramp-base-font-size);\n line-height: var(--type-ramp-base-line-height);\n font-family: var(--body-font);\n }\n\n .options-header-item-hidden {\n display: none;\n }\n\n .resize-button {\n position: absolute;\n bottom: 0;\n right: 0;\n width: 12px;\n height: 12px;\n cursor: nw-resize;\n background: linear-gradient(\n -45deg,\n transparent 30%,\n var(--neutral-foreground-rest) 30%,\n var(--neutral-foreground-rest) 40%,\n transparent 40%,\n transparent 60%,\n var(--neutral-foreground-rest) 60%,\n var(--neutral-foreground-rest) 70%,\n transparent 70%\n );\n z-index: 1000;\n opacity: 60%;\n transition: opacity 0.2s ease;\n }\n\n .resize-button:hover {\n opacity: 100%;\n }\n\n .multiselect-dropdown.resizable {\n resize: none;\n overflow: hidden;\n }\n`;\n","var OptionsDatasource_1;\nimport { __awaiter, __decorate } from \"tslib\";\nimport { Combobox as FASTComboBox, } from '@microsoft/fast-components';\nimport { attr, customElement, DOM, observable } from '@microsoft/fast-element';\nimport { BaseDatasource, getPrefix, logger } from '../utils';\nimport { dataserverCriteriaBuilder as criteriaMatchBuilder } from '../utils';\nlet OptionsDatasource = OptionsDatasource_1 = class OptionsDatasource extends BaseDatasource {\n constructor() {\n super(...arguments);\n this.emptyDataLabel = 'No matching records';\n this.allowCustomOptions = false;\n this.initalSelectedValueInitialized = false;\n this.isSnapshot = true;\n this.baseCriteria = '';\n this.resizeObserverCallback = (entries) => {\n entries.forEach((resizeObserverEntry) => {\n this.checkOverflow(resizeObserverEntry.target);\n });\n };\n this.selectChangeHandler = (e) => {\n var _a;\n const value = e.target.value;\n const selectedOption = (_a = this.options) === null || _a === void 0 ? void 0 : _a.find((option) => String(option.label) === value);\n if (!selectedOption && this.allowCustomOptions && this.select instanceof FASTComboBox) {\n this.select.$emit('value-change', { label: value, value });\n }\n else {\n this.select.$emit('value-change', selectedOption);\n }\n };\n }\n initialSelectedValueChanged(oldValue, newValue) {\n if (newValue && newValue !== oldValue) {\n this.initalSelectedValueInitialized = false;\n this.clearData();\n this.fetchData();\n }\n }\n connectedCallback() {\n const _super = Object.create(null, {\n connectedCallback: { get: () => super.connectedCallback }\n });\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n _super.connectedCallback.call(this);\n this.baseCriteria = this.criteria;\n this.fields = this.labelField ? (_a = this.valueField) === null || _a === void 0 ? void 0 : _a.concat(' ', this.labelField) : this.valueField;\n this.select = this.parentElement;\n this.optionElement = (_b = this.optionElement) !== null && _b !== void 0 ? _b : `${getPrefix(this.select)}-option`;\n this.select.addEventListener('change', this.selectChangeHandler);\n this.resizeObserver = new ResizeObserver(this.resizeObserverCallback);\n this.fetchData();\n if (!this.valueField) {\n logger.warn('Specify field for values in options (e.g value-field=\"VALUE\") and optionally field for label (e.g label-field=\"NAME\")');\n }\n });\n }\n disconnectedCallback() {\n super.disconnectedCallback();\n this.resizeObserver.disconnect();\n this.select.removeEventListener('change', this.selectChangeHandler);\n }\n fetchData() {\n if (this.select &&\n this.valueField &&\n ((this.resourceName && this.connect.isConnected) || this.data)) {\n if (this.select instanceof FASTComboBox && this.select.async && this.initialSelectedValue) {\n this.asyncModeIntialization();\n }\n else {\n this.fetchGenesisData();\n }\n }\n }\n asyncModeIntialization() {\n return __awaiter(this, void 0, void 0, function* () {\n const initOK = yield this.datasource.init(this['datasourceOptions'](), true);\n if (!initOK) {\n this.handleError({\n message: `Genesis Datasource async mode initialization failed for ${this.resourceName}`,\n loggerType: 'error',\n });\n return;\n }\n criteriaMatchBuilder(this, this.initialSelectedValue);\n });\n }\n clearData() {\n if (!this.select)\n return;\n Array.from(this.select.children).forEach((x) => {\n if (!(x instanceof OptionsDatasource_1)) {\n this.select.removeChild(x);\n }\n });\n this.select.value = '';\n this.select.initialValue = '';\n }\n checkOverflow(element) {\n const content = element.shadowRoot.querySelector('.content');\n if (!content)\n return;\n if (content.scrollWidth > content.clientWidth) {\n element.setAttribute('title', element.textContent);\n }\n else {\n element.removeAttribute('title');\n }\n }\n syncComponentData(snapshotData) {\n const rowData = snapshotData !== null && snapshotData !== void 0 ? snapshotData : Array.from(this.rowsSyncedWithStream.values());\n if (rowData.length > 0) {\n this.options = rowData.map((row) => {\n var _a;\n return ({\n value: row[this.valueField],\n label: this.labelRowFormatter\n ? this.labelRowFormatter(row)\n : this.labelFormatter\n ? this.labelFormatter(row[this.labelField])\n : this.getDefaultLabelFormat(row[this.labelField], (_a = this.getFieldMetadata(this.labelField)) === null || _a === void 0 ? void 0 : _a.type),\n });\n });\n const listboxOptions = this.options.map(({ value, label }) => {\n const option = document.createElement(this.optionElement);\n option.textContent = label ? label : value;\n option.value = value;\n return option;\n });\n listboxOptions.forEach((x) => {\n this.select.appendChild(x);\n this.resizeObserver.observe(x);\n });\n if (!this.initalSelectedValueInitialized ||\n (this.select instanceof FASTComboBox && !this.select.async)) {\n this.resetCombobox();\n const initialLabel = this.getInitialLabel();\n DOM.queueUpdate(() => {\n this.select.value = String(initialLabel);\n if (this.select instanceof FASTComboBox && this.select.async) {\n this.selectChangeHandler({ target: { value: initialLabel } });\n }\n });\n this.initalSelectedValueInitialized = true;\n }\n }\n else {\n if (this.allowCustomOptions &&\n this.initialSelectedValue &&\n (!this.initalSelectedValueInitialized ||\n (this.select instanceof FASTComboBox && !this.select.async))) {\n this.resetCombobox();\n DOM.queueUpdate(() => {\n this.select.value = String(this.initialSelectedValue);\n });\n this.initalSelectedValueInitialized = true;\n }\n const option = document.createElement(this.optionElement);\n option.textContent = this.emptyDataLabel;\n option.value = '';\n option.disabled = true;\n this.select.appendChild(option);\n }\n }\n getInitialLabel() {\n var _a, _b;\n let initialValue = '';\n if (this.initialSelectedValue || this.initialSelectedValue === 0) {\n if (this.allowCustomOptions && this.select instanceof FASTComboBox) {\n initialValue =\n ((_a = this.options.find((x) => x.value === this.initialSelectedValue)) === null || _a === void 0 ? void 0 : _a.label) ||\n this.initialSelectedValue;\n }\n else {\n initialValue = ((_b = this.options.find((x) => x.value === this.initialSelectedValue)) === null || _b === void 0 ? void 0 : _b.label) || '';\n }\n }\n return initialValue;\n }\n resetCombobox() {\n if (this.select && this.select instanceof FASTComboBox) {\n this.select.resetCombobox();\n }\n }\n handleStreamInserts(insertedRows) {\n logger.debug('handleStreamInserts - Method not implemented.');\n }\n handleStreamDeletes(deletedRows) {\n logger.debug('handleStreamDeletes - Method not implemented.');\n }\n handleStreamUpdates(updatedRows) {\n logger.debug('handleStreamUpdates - Method not implemented.');\n }\n};\n__decorate([\n attr({ attribute: 'label-field' })\n], OptionsDatasource.prototype, \"labelField\", void 0);\n__decorate([\n attr({ attribute: 'option-element' })\n], OptionsDatasource.prototype, \"optionElement\", void 0);\n__decorate([\n attr({ attribute: 'value-field' })\n], OptionsDatasource.prototype, \"valueField\", void 0);\n__decorate([\n attr({ attribute: 'empty-data-label' })\n], OptionsDatasource.prototype, \"emptyDataLabel\", void 0);\n__decorate([\n attr({ mode: 'boolean', attribute: 'allow-custom-options' })\n], OptionsDatasource.prototype, \"allowCustomOptions\", void 0);\n__decorate([\n observable\n], OptionsDatasource.prototype, \"labelFormatter\", void 0);\n__decorate([\n observable\n], OptionsDatasource.prototype, \"labelRowFormatter\", void 0);\n__decorate([\n observable\n], OptionsDatasource.prototype, \"initialSelectedValue\", void 0);\nOptionsDatasource = OptionsDatasource_1 = __decorate([\n customElement({\n name: 'options-datasource',\n })\n], OptionsDatasource);\nexport { OptionsDatasource };\n","import { __awaiter, __decorate } from \"tslib\";\nimport { attr, customElement } from '@microsoft/fast-element';\nimport { BaseDatasource, logger } from '../utils';\nlet MultiselectDatasource = class MultiselectDatasource extends BaseDatasource {\n constructor() {\n super(...arguments);\n this.isSnapshot = true;\n this.baseCriteria = '';\n }\n connectedCallback() {\n const _super = Object.create(null, {\n connectedCallback: { get: () => super.connectedCallback }\n });\n return __awaiter(this, void 0, void 0, function* () {\n var _a;\n _super.connectedCallback.call(this);\n this.baseCriteria = this.criteria;\n this.fields = this.labelField ? (_a = this.valueField) === null || _a === void 0 ? void 0 : _a.concat(' ', this.labelField) : this.valueField;\n this.select = this.parentElement;\n if (this.select &&\n this.valueField &&\n ((this.resourceName && this.connect.isConnected) || this.data)) {\n this.fetchGenesisData();\n }\n if (!this.valueField) {\n logger.warn('Specify field for values in options (e.g value-field=\"VALUE\") and optionally field for label which is supported only in select and combobox (e.g label-field=\"NAME\")');\n }\n });\n }\n clearData() {\n this.select.options = [];\n }\n syncComponentData(snapshotData) {\n var _a;\n const rowData = snapshotData !== null && snapshotData !== void 0 ? snapshotData : Array.from(this.rowsSyncedWithStream.values());\n const options = rowData.map((row) => {\n var _a;\n return ({\n value: row[this.valueField],\n label: this.getDefaultLabelFormat(row[this.labelField], (_a = this.getFieldMetadata(this.labelField)) === null || _a === void 0 ? void 0 : _a.type),\n });\n });\n if ((_a = this.select) === null || _a === void 0 ? void 0 : _a.async) {\n this.select.loading = false;\n }\n this.select.options = options;\n }\n handleStreamInserts(insertedRows) {\n logger.debug('handleStreamInserts - Method not implemented.');\n }\n handleStreamDeletes(deletedRows) {\n logger.debug('handleStreamDeletes - Method not implemented.');\n }\n handleStreamUpdates(updatedRows) {\n logger.debug('handleStreamUpdates - Method not implemented.');\n }\n};\n__decorate([\n attr({ attribute: 'value-field' })\n], MultiselectDatasource.prototype, \"valueField\", void 0);\n__decorate([\n attr({ attribute: 'label-field' })\n], MultiselectDatasource.prototype, \"labelField\", void 0);\nMultiselectDatasource = __decorate([\n customElement({\n name: 'multiselect-datasource',\n })\n], MultiselectDatasource);\nexport { MultiselectDatasource };\n","import { sync } from '@genesislcap/foundation-utils';\nimport { html, ref, repeat, slotted, when } from '@microsoft/fast-element';\nimport { whitespaceFilter } from '@microsoft/fast-foundation';\nimport { classNames } from '@microsoft/fast-web-utilities';\nimport { MultiselectDatasource } from '../options-datasource';\nconst ARROW_SVG_PATH = 'M11.85.65c.2.2.2.5 0 .7L6.4 6.84a.55.55 0 01-.78 0L.14 1.35a.5.5 0 11.71-.7L6 5.8 11.15.65c.2-.2.5-.2.7 0z';\nexport const getPrefixedMultiselect = (prefix = 'foundation') => html `\n <label\n part=\"label\"\n for=\"display-field\"\n class=${(x) => { var _a; return classNames('label', ['label-hidden', !((_a = x.defaultSlottedNodes) === null || _a === void 0 ? void 0 : _a.length)]); }}\n >\n <slot\n name=\"label\"\n ${slotted({\n property: 'defaultSlottedNodes',\n filter: whitespaceFilter,\n})}\n ></slot>\n </label>\n <div class=\"root\" part=\"root\" @keydown=\"${(x, c) => x.keydownHandler(c.event)}\">\n <div class=\"control\" part=\"control\">\n <input\n id=\"display-field\"\n part=\"filter-search\"\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n aria-controls=\"checkbox-container\"\n aria-expanded=${(x) => (x.open ? 'true' : 'false')}\n tabindex=\"${(x) => x.tabindex}\"\n ?readonly=${(x) => !x.search}\n @click=${(x) => x.toggle()}\n ?disabled=\"${(x) => x.disabled}\"\n ${ref('filterSearchInput')}\n value=${sync((x) => x.filterSearchValue, 'string', 'input')}\n placeholder=\"${(x) => x.getDisplayValue}\"\n autocomplete=\"off\"\n @input=${(x, c) => x.inputHandler()}\n @change=${(x, c) => x.changeHandler(c.event)}\n />\n <div part=\"indicator\" class=\"indicator\" @click=${(x) => !x.disabled && x.toggle()}>\n <svg\n viewBox=\"0 0 12 7\"\n ${ref('arrowIcon')}\n id=\"arrow-icon\"\n class=\"${(x) => classNames(['disabled-svg', x.disabled])}\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"${ARROW_SVG_PATH}\" />\n </svg>\n </div>\n ${when((x) => x.filterSearchValue && x.selectedOptions.length, html `\n <div class=\"display-value\">${(x) => x.getDisplayValue}</div>\n `)}\n </div>\n ${when((x) => x.loading, html `\n <${prefix}-progress slot=\"indicator\"></${prefix}-progress>\n `)}\n <section\n class=${(x) => classNames('multiselect-dropdown', ['resizable', x.resizable])}\n ${ref('multiselectDropdown')}\n part=\"multiselect-dropdown\"\n >\n ${when((x) => x.resizable, html `\n <div\n class=\"resize-button\"\n @mousedown=${(x, c) => x.handleResizeStart(c.event)}\n ></div>\n `)}\n ${when((x) => x.all, html `\n <${prefix}-button\n class=\"select-all\"\n @click=${(x) => x.selectCheckboxAll()}\n ?disabled=\"${(x, c) => x.isAllOptionsDisabled}\"\n >\n Select All ${(x) => x.name}\n </${prefix}-button>\n `)}\n <ol\n id=\"checkbox-container\"\n class=\"checkbox-container options\"\n aria-multiselectable=\"true\"\n part=\"options-ol\"\n >\n <li\n part=\"options-header-item\"\n class=${(x) => {\n var _a;\n return classNames('options-header-item', [\n 'options-header-item-hidden',\n !((_a = x.optionsHeaderSlottedNodes) === null || _a === void 0 ? void 0 : _a.length),\n ]);\n}}\n >\n <slot\n name=\"options-header\"\n ${slotted({\n property: 'optionsHeaderSlottedNodes',\n filter: whitespaceFilter,\n})}\n ></slot>\n </li>\n ${repeat((x) => x.filteredAvailableOptions, html `\n <li role=\"option\" value=${(x, ctx) => ctx.parent.getItemLabel(x)} part=\"option\">\n <${prefix}-checkbox\n part=\"checkbox\"\n class=\"checkbox\"\n exportparts=\"label:checkbox-label\"\n @keydown=${(x, c) => c.parent.checkboxKeyDown(x, c.event)}\n @click=${(x, c) => c.parent.selectCheckboxOne(x)}\n @change=${(x, c) => c.parent.changeHandler(c.event)}\n ?current-checked=\"${(x, c) => c.parent.isOptionSelected(x)}\"\n ?disabled=\"${(x, c) => c.parent.isOptionDisabled(x)}\"\n >\n ${(x, ctx) => { var _a, _b; return (_b = (_a = ctx.parent) === null || _a === void 0 ? void 0 : _a.itemRenderer) === null || _b === void 0 ? void 0 : _b.call(_a, x, ctx.parent); }}\n </${prefix}-checkbox>\n </li>\n `)}\n </ol>\n ${when((x) => x.showCreatable, html `\n <${prefix}-button @click=${(x) => x.addOption()}>Create \"${(x) => x.filterSearchValue}\"</${prefix}-button>\n `)}\n </section>\n </div>\n <slot\n ${slotted({\n property: 'slottedDatasource',\n filter: (x) => x instanceof MultiselectDatasource,\n})}\n ></slot>\n`;\nexport const multiselectTemplate = html `\n ${getPrefixedMultiselect()}\n`;\n","import { __decorate } from \"tslib\";\nimport { attr, html, observable, volatile } from '@microsoft/fast-element';\nimport { FoundationElement } from '@microsoft/fast-foundation';\nimport debounce from 'lodash.debounce';\nimport { dataserverCriteriaBuilder as criteriaMatchBuilder, logger, wasClickOutsideElement, } from '../utils';\nimport { Position } from './multiselect-consts';\nimport { maxheight, multiselectStyles as styles } from './multiselect.styles';\nimport { multiselectTemplate as template } from './multiselect.template';\nconst DEBOUNCE_TIME = 500;\nexport const foundationMultiselectShadowOptions = undefined;\nexport const defaultMultiselectConfig = {};\nconst MIN_WIDTH_MULTISELECT = 250;\nconst MIN_HEIGHT_MULTISELECT = 100;\n/**\n * @tagname %%prefix%%-multiselect\n */\nexport class Multiselect extends FoundationElement {\n constructor() {\n super(...arguments);\n this.name = '';\n this.autoPosition = true;\n this.all = true;\n this.allSelected = false;\n this.search = true;\n this.disabled = false;\n this.creatable = false;\n this.async = false;\n this.debounce = DEBOUNCE_TIME;\n this.resizable = false;\n /** Tells if the filter uses a contains; if FALSE, will filter using a starts-with check */\n this.filterByContains = false;\n this.filterSearchValue = '';\n this.clickOutside = (e) => this.handleClickOutside(e);\n this.open = false;\n this.options = [];\n this.selectedOptions = [];\n this.filteredAvailableOptions = [...this.options];\n /**\n * Controls the positioning of the multiselect dropdown. Accepts the following values:\n * - Position.ABOVE: Forces the dropdown to always open above the input field.\n * - Position.BELOW: Forces the dropdown to always open below the input field.\n */\n this.position = Position.BELOW;\n this.itemRenderer = this.defaultItemRenderer;\n this.initialisedOptions = false;\n // Resize-related properties\n this.isResizing = false;\n this.startX = 0;\n this.startY = 0;\n this.startWidth = 0;\n this.startHeight = 0;\n /**\n * Handles the start of resizing\n */\n this.handleResizeStart = (e) => {\n if (!this.resizable || !this.multiselectDropdown)\n return;\n e.preventDefault();\n e.stopPropagation();\n this.isResizing = true;\n this.startX = e.clientX;\n this.startY = e.clientY;\n this.startWidth = this.multiselectDropdown.offsetWidth;\n this.startHeight = this.multiselectDropdown.offsetHeight;\n this.multiselectDropdown.classList.add('is-resizing');\n document.addEventListener('mousemove', this.handleResizeMove);\n document.addEventListener('mouseup', this.handleResizeEnd);\n };\n /**\n * Handles the resize movement\n */\n this.handleResizeMove = (e) => {\n if (!this.isResizing || !this.multiselectDropdown)\n return;\n e.preventDefault();\n const deltaX = e.clientX - this.startX;\n const deltaY = e.clientY - this.startY;\n const newWidth = Math.max(MIN_WIDTH_MULTISELECT, this.startWidth + deltaX);\n const newHeight = Math.max(MIN_HEIGHT_MULTISELECT, this.startHeight + deltaY);\n // Set the dropdown width and use direct maxHeight for immediate response during resize\n if (this.multiselectDropdown) {\n this.multiselectDropdown.style.width = `${newWidth}px`;\n this.multiselectDropdown.style.maxHeight = `${newHeight}px`;\n }\n };\n /**\n * Handles the end of resizing\n */\n this.handleResizeEnd = () => {\n this.isResizing = false;\n document.removeEventListener('mousemove', this.handleResizeMove);\n document.removeEventListener('mouseup', this.handleResizeEnd);\n // Switch from direct maxHeight to CSS custom property for transition\n if (this.multiselectDropdown) {\n this.multiselectDropdown.classList.remove('is-resizing');\n this.multiselectDropdown.style.setProperty('--custom-max-height', this.multiselectDropdown.style.maxHeight);\n this.multiselectDropdown.style.removeProperty('max-height');\n }\n };\n }\n debounceChanged(oldValue, newValue) {\n this.debouncedInputHandler = debounce(this.asyncSetFilter, newValue);\n }\n openChanged(previous, open) {\n var _a, _b, _c, _d;\n if (open) {\n document.addEventListener('mousedown', this.clickOutside);\n (_a = this.arrowIcon) === null || _a === void 0 ? void 0 : _a.classList.add('flipped');\n (_b = this.multiselectDropdown) === null || _b === void 0 ? void 0 : _b.classList.add('visible');\n }\n else {\n document.removeEventListener('mousedown', this.clickOutside);\n (_c = this.arrowIcon) === null || _c === void 0 ? void 0 : _c.classList.remove('flipped');\n (_d = this.multiselectDropdown) === null || _d === void 0 ? void 0 : _d.classList.remove('visible');\n }\n }\n connectedCallback() {\n var _a;\n super.connectedCallback();\n if (this.position === Position.ABOVE) {\n (_a = this.multiselectDropdown) === null || _a === void 0 ? void 0 : _a.classList.add('position-above');\n }\n }\n disconnectedCallback() {\n super.disconnectedCallback();\n document.removeEventListener('mousedown', this.clickOutside);\n document.removeEventListener('mousemove', this.handleResizeMove);\n document.removeEventListener('mouseup', this.handleResizeEnd);\n }\n defaultItemRenderer(option, parent) {\n return html `\n ${typeof option === 'string'\n ? html `\n <span part=\"option-label\">${() => parent.getItemLabel(option)}</span>\n `\n : html `\n <span\n data-option-label-text=${() => option.optionLabelText}\n style=${() => option.labelStyle}\n part=\"option-label\"\n >\n ${() => parent.getItemLabel(option)}\n </span>\n `}\n `;\n }\n toggle() {\n if (!this.open) {\n this.setDropdownPosition();\n }\n this.open = !this.open;\n }\n optionsChanged() {\n if (this.allSelected && !this.initialisedOptions) {\n this.selectedOptions = this.options.map((option) => this.optionValueGetter(option));\n }\n this.filteredAvailableOptions = [...this.options];\n }\n selectedOptionsChanged() {\n if (this.$fastController.isConnected) {\n this.initialisedOptions = true;\n return;\n }\n }\n /**\n * Sets the dropdown position based on the current configuration.\n * @remarks\n * If `autoPosition` is `true`, this method calculates the available space above and below the input field in the viewport and positions the dropdown accordingly.\n * This ensures the dropdown is always visible to the user. If `autoPosition` is `false`, the dropdown position is locked to either 'above' or 'below', as specified by the `position` attribute.\n * This method is intended for internal use by the component and is marked as private.\n * @private\n */\n setDropdownPosition() {\n let calculatedPosition = this.position;\n if (this.autoPosition) {\n const multiselectRect = this.getBoundingClientRect();\n const viewportHeight = window.innerHeight;\n const spaceAbove = multiselectRect.top;\n const spaceBelow = viewportHeight - multiselectRect.bottom;\n if (spaceBelow < maxheight && spaceAbove > spaceBelow) {\n calculatedPosition = Position.ABOVE;\n }\n else {\n calculatedPosition = Position.BELOW;\n }\n }\n this.multiselectDropdown.classList.toggle('position-above', calculatedPosition === Position.ABOVE);\n this.multiselectDropdown.classList.toggle('position-below', calculatedPosition === Position.BELOW);\n }\n optionValueGetter(option) {\n if (typeof option === 'string') {\n return option;\n }\n return option.value;\n }\n optionLabelGetter(option) {\n if (typeof option === 'string') {\n return option;\n }\n return option.label;\n }\n getItemLabel(option) {\n let value;\n if (!option) {\n return '';\n }\n if (typeof option === 'string') {\n value = option;\n }\n else {\n value = this.optionLabelGetter(option) || this.optionValueGetter(option) || '';\n }\n return this.valueFormatter ? this.valueFormatter(value) : value;\n }\n isOptionDisabled(option) {\n if (!option || typeof option === 'string') {\n return false;\n }\n return option.disabled || false;\n }\n get getDisplayValue() {\n let displayText = '';\n switch (this.selectedOptions.length) {\n case 0: {\n displayText = this.getPlaceholder;\n break;\n }\n case 1: {\n const selectedOption = this.options.find((option) => this.optionValueGetter(option) === this.selectedOptions[0]);\n displayText = this.getItemLabel(selectedOption);\n break;\n }\n case this.options.length: {\n displayText = `All ${this.name}`.trim();\n break;\n }\n default: {\n displayText = `${this.selectedOptions.length} Selected`;\n }\n }\n return displayText;\n }\n get getPlaceholder() {\n return `Search ${this.name}`.trim().concat('...');\n }\n get isAllOptionsDisabled() {\n return this.options.length === this.options.filter(this.isOptionDisabled).length;\n }\n get showCreatable() {\n return (this.creatable &&\n this.filterSearchValue.length > 0 &&\n this.findExactMatchOptions().length === 0);\n }\n isOptionSelected(normalizedOption) {\n const value = this.optionValueGetter(normalizedOption);\n return this.selectedOptions.some((selectedValue) => {\n if (typeof normalizedOption === 'object' && typeof normalizedOption.value === 'object') {\n try {\n return JSON.stringify(selectedValue) === JSON.stringify(value);\n }\n catch (_a) {\n return selectedValue === value;\n }\n }\n return selectedValue === value;\n });\n }\n selectCheckboxOne(normalizedOption) {\n const option = this.optionValueGetter(normalizedOption);\n const isIncluded = this.selectedOptions.includes(option);\n if (!isIncluded) {\n this.selectedOptions = [...this.selectedOptions, option];\n }\n else {\n this.selectedOptions = this.selectedOptions.filter((x) => x !== option);\n }\n this.$emit('selectionChange', this.selectedOptions);\n }\n checkboxKeyDown(normalizedOption, event) {\n if (event.key === ' ') {\n event.preventDefault();\n this.selectCheckboxOne(normalizedOption);\n }\n return true;\n }\n getEnabledOptionsCount() {\n return this.options.length - this.options.filter(this.isOptionDisabled).length;\n }\n selectCheckboxAll() {\n const prevAllChecked = this.selectedOptions.length === this.getEnabledOptionsCount();\n this.selectedOptions = prevAllChecked\n ? []\n : this.options\n .filter((opt) => !this.isOptionDisabled(opt))\n .map((option) => this.optionValueGetter(option));\n if (this.onAllSelectedCallback) {\n this.onAllSelectedCallback(!prevAllChecked);\n }\n this.$emit('selectionChange', this.selectedOptions);\n }\n inputHandler() {\n if (!this.open) {\n this.open = true;\n }\n if (this.async) {\n this.loading = true;\n this.filteredAvailableOptions = [];\n this.debouncedInputHandler();\n }\n else {\n this.setFilter();\n }\n }\n findExactMatchOptions() {\n const filterSearchValueLower = this.filterSearchValue.toLowerCase();\n return this.filteredAvailableOptions.filter((option) => {\n var _a, _b;\n const optionValue = typeof option === 'string'\n ? option\n : ((_a = this.optionLabelGetter(option)) !== null && _a !== void 0 ? _a : this.optionValueGetter(option));\n return ((_b = optionValue === null || optionValue === void 0 ? void 0 : optionValue.toLowerCase()) !== null && _b !== void 0 ? _b : '') === filterSearchValueLower;\n });\n }\n setFilter() {\n const searchValue = this.filterSearchValue.toLowerCase();\n this.filteredAvailableOptions = this.options.filter((option) => {\n if (!searchValue)\n return true;\n if (typeof option === 'string') {\n return option.toLowerCase().includes(searchValue);\n }\n const label = option.label.toLowerCase();\n const checkObjectValues = (obj) => {\n return Object.values(obj).some((val) => val.toLowerCase().includes(searchValue));\n };\n const value = typeof option.value === 'object'\n ? checkObjectValues(option.value)\n : String(option.value).toLowerCase().includes(searchValue);\n return label.includes(searchValue) || value;\n });\n }\n addOption() {\n this.options = [\n { value: this.filterSearchValue, label: this.filterSearchValue },\n ...this.options,\n ];\n this.setFilter();\n this.selectedOptions = [...this.selectedOptions, this.filterSearchValue];\n }\n asyncSetFilter() {\n if (this.slottedDatasource.length > 0) {\n criteriaMatchBuilder(this.slottedDatasource[0], this.filterSearchValue);\n }\n else {\n this.loading = false;\n logger.warn('Multiselect-datasource is not connected. Please add a datasource to use this functionality.');\n }\n }\n changeHandler(event) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n handleClickOutside(event) {\n if (wasClickOutsideElement(event, this)) {\n this.open = false;\n }\n }\n keydownHandler(e) {\n const key = e.key;\n if (e.ctrlKey || e.shiftKey) {\n return true;\n }\n switch (key) {\n case 'Escape': {\n if (this.open) {\n this.open = false;\n break;\n }\n break;\n }\n case 'ArrowUp':\n case 'ArrowDown': {\n if (!this.open) {\n this.open = true;\n break;\n }\n break;\n }\n default: {\n return true;\n }\n }\n }\n /**\n * Clears the selected values and/or filter text\n * @param options - Options for clearing the multiselect\n */\n clear(options = {}) {\n const { clearSelectedValues = true, clearFilterText = true } = options;\n if (clearSelectedValues) {\n this.selectedOptions = [];\n this.$emit('selectionChange', this.selectedOptions);\n }\n if (clearFilterText) {\n this.filterSearchValue = '';\n this.setFilter();\n // Directly set input value to force template update\n if (this.filterSearchInput) {\n this.filterSearchInput.value = '';\n }\n }\n // Emit clear event with the options that were used\n this.$emit('clear', { clearSelectedValues, clearFilterText });\n }\n}\n__decorate([\n attr\n], Multiselect.prototype, \"name\", void 0);\n__decorate([\n attr({ mode: 'boolean', attribute: 'auto-position' })\n], Multiselect.prototype, \"autoPosition\", void 0);\n__decorate([\n attr({ mode: 'boolean' })\n], Multiselect.prototype, \"all\", void 0);\n__decorate([\n attr({ mode: 'boolean' })\n], Multiselect.prototype, \"allSelected\", void 0);\n__decorate([\n attr({ mode: 'boolean' })\n], Multiselect.prototype, \"search\", void 0);\n__decorate([\n attr({ mode: 'boolean' })\n], Multiselect.prototype, \"disabled\", void 0);\n__decorate([\n attr({ mode: 'boolean' })\n], Multiselect.prototype, \"creatable\", void 0);\n__decorate([\n attr({ mode: 'boolean' })\n], Multiselect.prototype, \"async\", void 0);\n__decorate([\n attr\n], Multiselect.prototype, \"debounce\", void 0);\n__decorate([\n attr({ mode: 'boolean' })\n], Multiselect.prototype, \"resizable\", void 0);\n__decorate([\n attr\n], Multiselect.prototype, \"tabindex\", void 0);\n__decorate([\n attr({ mode: 'boolean', attribute: 'filter-by-contains' })\n], Multiselect.prototype, \"filterByContains\", void 0);\n__decorate([\n observable\n], Multiselect.prototype, \"defaultSlottedNodes\", void 0);\n__decorate([\n observable\n], Multiselect.prototype, \"slottedDatasource\", void 0);\n__decorate([\n observable\n], Multiselect.prototype, \"valueFormatter\", void 0);\n__decorate([\n observable\n], Multiselect.prototype, \"loading\", void 0);\n__decorate([\n observable\n], Multiselect.prototype, \"filterSearchValue\", void 0);\n__decorate([\n observable\n], Multiselect.prototype, \"open\", void 0);\n__decorate([\n observable\n], Multiselect.prototype, \"options\", void 0);\n__decorate([\n observable\n], Multiselect.prototype, \"selectedOptions\", void 0);\n__decorate([\n observable\n], Multiselect.prototype, \"filteredAvailableOptions\", void 0);\n__decorate([\n observable\n], Multiselect.prototype, \"scrollContainer\", void 0);\n__decorate([\n attr\n], Multiselect.prototype, \"position\", void 0);\n__decorate([\n observable\n], Multiselect.prototype, \"onAllSelectedCallback\", void 0);\n__decorate([\n observable\n], Multiselect.prototype, \"itemRenderer\", void 0);\n__decorate([\n volatile\n], Multiselect.prototype, \"getDisplayValue\", null);\n__decorate([\n volatile\n], Multiselect.prototype, \"getPlaceholder\", null);\n__decorate([\n volatile\n], Multiselect.prototype, \"isAllOptionsDisabled\", null);\n__decorate([\n volatile\n], Multiselect.prototype, \"showCreatable\", null);\n__decorate([\n observable\n], Multiselect.prototype, \"optionsHeaderSlottedNodes\", void 0);\nexport const foundationMultiselect = Multiselect.compose(Object.assign({ baseName: 'multiselect', template,\n styles, shadowOptions: foundationMultiselectShadowOptions }, defaultMultiselectConfig));\n","import { css } from '@microsoft/fast-element';\nexport const optionsMaxheight = 450;\nexport const categorizedMultiselectStyles = css `\n .root {\n position: relative;\n width: 100%;\n min-width: 250px;\n }\n\n .control-button {\n display: flex;\n justify-content: center;\n min-width: 31px;\n width: 31px;\n height: 31px;\n margin-left: calc(var(--design-unit) * 2px);\n color: var(--neutral-foreground-hint);\n }\n\n .control {\n cursor: pointer;\n position: relative;\n display: flex;\n justify-content: end;\n align-items: center;\n width: 100%;\n border-radius: calc(var(--control-corner-radius) * 1px);\n }\n\n .label {\n display: block;\n cursor: pointer;\n font-size: var(--type-ramp-base-font-size);\n line-height: var(--type-ramp-base-line-height);\n font-style: normal;\n font-weight: 700;\n margin: calc(var(--design-unit) * 2px) 0;\n }\n\n .label-hidden {\n display: none;\n }\n\n .control:hover .control-button,\n .control:hover .label {\n color: var(--neutral-foreground-rest);\n }\n\n button {\n pointer-events: none;\n }\n\n .options {\n display: flex;\n flex-direction: column;\n position: absolute;\n height: max-content;\n overflow-y: hidden;\n margin-top: 5px;\n padding: calc((var(--design-unit) + 3) * 2px) calc((var(--design-unit) + 3) * 1px);\n border: 1px solid rgba(46 51 57 / 100%);\n border-radius: 4px;\n background: var(--neutral-fill-input-rest);\n width: 100%;\n max-height: 0;\n visibility: hidden;\n transition:\n max-height 0.4s ease 0s,\n visibility 0.4s ease 0s;\n z-index: 999;\n }\n\n .option-content {\n display: flex;\n align-items: center;\n gap: calc(var(--design-unit) * 4px);\n width: 100%;\n }\n\n .icon-container {\n display: flex;\n align-items: center;\n justify-content: center;\n width: calc(\n ((var(--base-height-multiplier) * var(--design-unit)) + (var(--design-unit) * 2)) * 1px + 4px\n );\n height: calc(\n ((var(--base-height-multiplier) * var(--design-unit)) + (var(--design-unit) * 2)) * 1px\n );\n border-radius: calc((var(--control-corner-radius) - 1) * 2px);\n background: var(--neutral-layer-2);\n box-sizing: border-box;\n box-shadow: 0 0 5px 0 rgba(0 0 0 / 35%);\n flex-shrink: 0;\n }\n\n .text-content {\n display: flex;\n flex-direction: column;\n flex: 1;\n }\n\n .svg-icon {\n height: 2em;\n }\n\n .position-above {\n bottom: 100%;\n }\n\n .checkbox-container {\n display: flex;\n flex-direction: column;\n overflow-y: scroll;\n scrollbar-width: thin;\n scrollbar-color: rgb(46 48 53) rgb(31 33 38);\n }\n\n span {\n border-bottom: calc(var(--stroke-width) * 1px) solid;\n border-color: color-mix(in srgb, var(--neutral-fill-rest), transparent 50%);\n padding: calc((var(--design-unit) + 2) * 2px) calc((var(--design-unit) + 3) * 1px);\n font-size: calc((var(--type-ramp-base-font-size) - 1px));\n color: var(--neutral-foreground-hint);\n }\n\n .multiselect-checkbox {\n min-width: fit-content;\n flex-direction: row-reverse;\n justify-content: space-between;\n align-items: flex-start;\n border-bottom: 1px solid;\n border-color: color-mix(in srgb, var(--neutral-fill-rest), transparent 50%);\n padding: calc((var(--design-unit) + 3) * 1px) calc((var(--design-unit) + 3) * 1px)\n calc((var(--design-unit) + 3) * 1px) 0;\n margin: 0;\n }\n\n .multiselect-checkbox:hover {\n background-color: rgb(45 47 51);\n cursor: pointer;\n }\n\n .multiselect-checkbox::part(label) {\n overflow-x: hidden;\n text-overflow: ellipsis;\n }\n\n .multiselect-checkbox::part(control) {\n min-width: calc(\n (\n (var(--base-height-multiplier) + var(--density)) * var(--design-unit) / 2 +\n var(--design-unit)\n ) *\n 1px\n );\n }\n\n .checkbox-container .multiselect-checkbox[disabled] {\n cursor: not-allowed;\n }\n\n .description {\n text-wrap: wrap;\n font-size: calc((var(--type-ramp-base-font-size) - 1px));\n margin: calc((var(--design-unit) + 3) * 1px) 0;\n }\n\n #filter-search {\n padding: 5px;\n }\n\n ::-webkit-scrollbar {\n width: 12px;\n }\n\n ::-webkit-scrollbar-track {\n background: rgb(31 33 38);\n }\n\n ::-webkit-scrollbar-thumb {\n width: 8px;\n border-radius: 10px;\n box-shadow: inset 0 0 6px rgba(0 0 0 / 30%);\n background-color: rgb(46 48 53);\n border: 3px solid rgb(31 33 38);\n }\n\n .visible {\n visibility: visible;\n max-height: ${optionsMaxheight.toString()}px;\n }\n`;\n","import { sync } from '@genesislcap/foundation-utils';\nimport { html, repeat, ref, when, slotted } from '@microsoft/fast-element';\nimport { whitespaceFilter } from '@microsoft/fast-foundation';\nimport { classNames } from '@microsoft/fast-web-utilities';\nexport const getPrefixedCategorizedMultiselect = (prefix = 'foundation') => html `\n <div class=\"root\" part=\"root\">\n <div class=\"control\" part=\"control\" @click=${(x) => !x.disabled && x.toggle()}>\n <label\n part=\"label\"\n for=\"control\"\n class=${(x) => { var _a; return classNames('label', ['label-hidden', !((_a = x.defaultSlottedNodes) === null || _a === void 0 ? void 0 : _a.length)]); }}\n >\n <slot\n ${slotted({\n property: 'defaultSlottedNodes',\n filter: whitespaceFilter,\n})}\n ></slot>\n </label>\n <${prefix}-button class=\"control-button\" part=\"control-button\">\n <slot name=\"button-content\">\n <${prefix}-icon name=\"plus\" variant=\"solid\" size=\"lg\"></${prefix}-icon>\n </slot>\n </${prefix}-button>\n </div>\n <div ${ref('optionsElement')} class=\"options\" part=\"options\">\n ${when((x) => x.search, html `\n <${prefix}-text-field\n id=\"filter-search\"\n part=\"filter-search\"\n value=${sync((x) => x.filterSearchValue, 'string', 'input')}\n placeholder=\"${(x) => x.getPlaceholder}\"\n @input=${(x, c) => x.setFilter()}\n @change=${(x, c) => x.changeHandler(c.event)}\n ></${prefix}-text-field>\n `)}\n <div class=\"checkbox-container\" part=\"checkbox-container\">\n ${repeat((x) => x.filteredAvailableOptions, html `\n <span>${(x) => x.type}</span>\n ${repeat((x) => x.options, html `\n <${prefix}-checkbox\n class=\"multiselect-checkbox\"\n part=\"multiselect-checkbox\"\n @click=${(x, c) => c.parentContext.parent.selectCheckboxOne(x)}\n @change=${(x, c) => c.parentContext.parent.changeHandler(c.event)}\n ?current-checked=\"${(x, c) => c.parentContext.parent.isOptionSelected(x)}\"\n ?disabled=\"${(x, c) => c.parentContext.parent.isOptionDisabled(x)}\"\n >\n <div class=\"option-content\">\n ${when((x) => x.icon || x.svg, html `\n <div class=\"icon-container\">\n ${when((x) => x.icon, html `\n <${prefix}-icon\n style=\"color:${(x) => x.iconColor || '#fff'}\"\n name=\"${(x) => x.icon}\"\n size=\"xl\"\n ></${prefix}-icon>\n `)}\n ${when((x) => x.svg, html `\n <img class=\"svg-icon\" src=\"${(x) => x.svg}\" alt=\"${(x) => x.label}\" />\n `)}\n </div>\n `)}\n <div class=\"text-content\">\n <div class=\"option-label\">${(x, ctx) => ctx.parentContext.parent.getItemLabel(x)}</div>\n ${when((x) => x.description, html `\n <p class=\"description\">${(x) => x.description}</p>\n `)}\n </div>\n </div>\n </${prefix}-checkbox>\n `)}\n `)}\n </div>\n </div>\n </div>\n`;\nexport const categorizedMultiselectTemplate = html `\n ${getPrefixedCategorizedMultiselect()}\n`;\n","import { __decorate } from \"tslib\";\nimport { attr, observable, volatile } from '@microsoft/fast-element';\nimport { FoundationElement } from '@microsoft/fast-foundation';\nimport { Position } from '../multiselect';\nimport { wasClickOutsideElement } from '../utils';\nimport { categorizedMultiselectStyles as styles } from './categorized-multiselect.styles';\nimport { categorizedMultiselectTemplate as template } from './categorized-multiselect.template';\nexport const foundationCategorizedMultiselectShadowOptions = undefined;\nexport const defaultCategorizedMultiselectConfig = {};\n/**\n * @tagname %%prefix%%-categorized-multiselect\n */\nexport class CategorizedMultiselect extends FoundationElement {\n constructor() {\n super(...arguments);\n this.name = '';\n this.autoPosition = true;\n this.search = true;\n this.disabled = false;\n this.clickOutside = (e) => this.handleClickOutside(e);\n this.open = false;\n this.options = [];\n this.selectedOptions = [];\n /**\n * Controls the positioning of the multiselect dropdown. Accepts the following values:\n * - Position.ABOVE: Forces the dropdown to always open above the input field.\n * - Position.BELOW: Forces the dropdown to always open below the input field.\n */\n this.position = Position.BELOW;\n }\n openChanged(previous, open) {\n var _a, _b;\n if (open) {\n document.addEventListener('mousedown', this.clickOutside);\n (_a = this.optionsElement) === null || _a === void 0 ? void 0 : _a.classList.add('visible');\n }\n else {\n document.removeEventListener('mousedown', this.clickOutside);\n (_b = this.optionsElement) === null || _b === void 0 ? void 0 : _b.classList.remove('visible');\n }\n }\n connectedCallback() {\n var _a;\n super.connectedCallback();\n if (this.position === Position.ABOVE) {\n (_a = this.optionsElement) === null || _a === void 0 ? void 0 : _a.classList.add('position-above');\n }\n }\n disconnectedCallback() {\n super.disconnectedCallback();\n document.removeEventListener('mousedown', this.clickOutside);\n }\n toggle() {\n if (!this.open) {\n this.setDropdownPosition();\n }\n this.open = !this.open;\n }\n sortFilteredOptions(options) {\n const sortedData = (options !== null && options !== void 0 ? options : this.options).reduce((acc, curr) => {\n const type = curr.type || 'Other';\n if (!acc[type]) {\n acc[type] = {\n type: type,\n options: [curr],\n };\n }\n else {\n acc[type].options.push(curr);\n }\n return acc;\n }, {});\n const result = Object.values(sortedData);\n return result;\n }\n optionsChanged() {\n this.filteredAvailableOptions = this.sortFilteredOptions();\n }\n /**\n * Sets the dropdown position based on the current configuration.\n * @remarks\n * If `autoPosition` is `true`, this method calculates the available space above and below the input field in the viewport and positions the dropdown accordingly.\n * This ensures the dropdown is always visible to the user. If `autoPosition` is `false`, the dropdown position is locked to either 'above' or 'below', as specified by the `position` attribute.\n * This method is intended for internal use by the component and is marked as private.\n * @private\n */\n setDropdownPosition() {\n let calculatedPosition = this.position;\n if (this.autoPosition) {\n let container = this.assignedSlot ? this.assignedSlot.parentElement : this.parentElement;\n while (container && !container.classList.contains('content-wrapper')) {\n container = container.parentElement;\n }\n if (!container) {\n const multiselectRect = this.getBoundingClientRect();\n const viewportHeight = window.innerHeight;\n const spaceAbove = multiselectRect.top;\n const spaceBelow = viewportHeight - multiselectRect.bottom;\n calculatedPosition =\n spaceBelow < multiselectRect.height && spaceAbove > spaceBelow\n ? Position.ABOVE\n : Position.BELOW;\n }\n else {\n const containerRect = container.getBoundingClientRect();\n const thisRect = this.getBoundingClientRect();\n const midPoint = containerRect.top + containerRect.height / 2;\n calculatedPosition = thisRect.top < midPoint ? Position.BELOW : Position.ABOVE;\n }\n }\n if (calculatedPosition === Position.ABOVE) {\n this.optionsElement.classList.add('position-above');\n this.optionsElement.classList.remove('position-below');\n }\n else if (calculatedPosition === Position.BELOW) {\n this.optionsElement.classList.add('position-below');\n this.optionsElement.classList.remove('position-above');\n }\n }\n optionGetter(option) {\n return option.value;\n }\n getItemLabel(option) {\n let value;\n if (!option) {\n return '';\n }\n else {\n value = option.label || option.value || '';\n }\n return this.valueFormatter ? this.valueFormatter(value) : value;\n }\n isOptionDisabled(option) {\n if (!option || typeof option === 'string') {\n return false;\n }\n return option.disabled || false;\n }\n get getPlaceholder() {\n return `Search ${this.name}`.trim().concat('...');\n }\n isOptionSelected(normalizedOption) {\n return this.selectedOptions.includes(this.optionGetter(normalizedOption));\n }\n selectCheckboxOne(normalizedOption) {\n const option = this.optionGetter(normalizedOption);\n const isIncluded = this.selectedOptions.includes(option);\n if (!isIncluded) {\n this.selectedOptions = [...this.selectedOptions, option];\n }\n else {\n this.selectedOptions = [...this.selectedOptions];\n this.selectedOptions.splice(this.selectedOptions.indexOf(option), 1);\n }\n this.$emit('selectionChange', this.selectedOptions);\n }\n setFilter() {\n const filteredOptions = this.options.filter((option) => {\n var _a;\n const optionDescription = option.description;\n const optionValue = (_a = option.label) !== null && _a !== void 0 ? _a : option.value;\n if (optionDescription === null || optionDescription === void 0 ? void 0 : optionDescription.toLowerCase().includes(this.filterSearchValue.toLowerCase())) {\n return option;\n }\n if (optionValue.toLowerCase().includes(this.filterSearchValue.toLowerCase())) {\n return option;\n }\n });\n this.filteredAvailableOptions = this.sortFilteredOptions(filteredOptions);\n }\n changeHandler(event) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n handleClickOutside(event) {\n if (wasClickOutsideElement(event, this)) {\n this.open = false;\n }\n }\n}\n__decorate([\n attr\n], CategorizedMultiselect.prototype, \"name\", void 0);\n__decorate([\n attr({ mode: 'boolean', attribute: 'auto-position' })\n], CategorizedMultiselect.prototype, \"autoPosition\", void 0);\n__decorate([\n attr({ mode: 'boolean' })\n], CategorizedMultiselect.prototype, \"search\", void 0);\n__decorate([\n attr({ mode: 'boolean' })\n], CategorizedMultiselect.prototype, \"disabled\", void 0);\n__decorate([\n observable\n], CategorizedMultiselect.prototype, \"defaultSlottedNodes\", void 0);\n__decorate([\n observable\n], CategorizedMultiselect.prototype, \"valueFormatter\", void 0);\n__decorate([\n observable\n], CategorizedMultiselect.prototype, \"filterSearchValue\", void 0);\n__decorate([\n observable\n], CategorizedMultiselect.prototype, \"open\", void 0);\n__decorate([\n observable\n], CategorizedMultiselect.prototype, \"options\", void 0);\n__decorate([\n observable\n], CategorizedMultiselect.prototype, \"selectedOptions\", void 0);\n__decorate([\n observable\n], CategorizedMultiselect.prototype, \"filteredAvailableOptions\", void 0);\n__decorate([\n observable\n], CategorizedMultiselect.prototype, \"position\", void 0);\n__decorate([\n volatile\n], CategorizedMultiselect.prototype, \"getPlaceholder\", null);\nexport const foundationCategorizedMultiselect = CategorizedMultiselect.compose(Object.assign({ baseName: 'categorized-multiselect', template,\n styles, shadowOptions: foundationCategorizedMultiselectShadowOptions }, defaultCategorizedMultiselectConfig));\n","import { checkboxTemplate as fastCheckboxTemplate } from '@microsoft/fast-foundation';\nexport const foundationCheckboxTemplate = (context, definition) => fastCheckboxTemplate(context, definition);\n","import { checkboxStyles as fastCheckboxStyles } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationCheckboxStyles = (context, definition) => css `\n ${fastCheckboxStyles(context, definition)}\n`;\n","import { Checkbox as FASTCheckbox } from '@microsoft/fast-components';\nimport { foundationCheckboxStyles as styles } from './checkbox.styles';\nimport { foundationCheckboxTemplate as template } from './checkbox.template';\n/**\n * @tagname %%prefix%%-checkbox\n */\nexport class Checkbox extends FASTCheckbox {\n}\n// explicitly declaring for extensibility\nexport const foundationCheckboxShadowOptions = undefined;\nexport const defaultCheckboxConfig = {\n checkedIndicator: `\n <svg\n aria-hidden=\"true\"\n part=\"checked-indicator\"\n class=\"checked-indicator\"\n viewBox=\"0 0 20 20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M8.143 12.6697L15.235 4.5L16.8 5.90363L8.23812 15.7667L3.80005 11.2556L5.27591 9.7555L8.143 12.6697Z\"\n />\n </svg>\n `,\n indeterminateIndicator: `\n <div part=\"indeterminate-indicator\" class=\"indeterminate-indicator\"></div>\n `,\n};\n/**\n * The Foundation Checkbox\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-checkbox\\>\n */\nexport const foundationCheckbox = Checkbox.compose(Object.assign({ baseName: 'checkbox', template,\n styles, shadowOptions: foundationCheckboxShadowOptions }, defaultCheckboxConfig));\n","import { comboboxStyles as fastComboboxStyles } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationComboboxStyles = (context, definition) => css `\n .combo-box-indicator {\n transition-property: transform;\n transition-duration: 0.2s;\n transition-timing-function: ease-out;\n }\n\n :host([open]) .combo-box-indicator {\n transform: rotate(180deg);\n }\n\n ${fastComboboxStyles(context, definition)}\n`;\n","import { html, ref, slotted } from '@microsoft/fast-element';\nimport { endSlotTemplate, Listbox, startSlotTemplate } from '@microsoft/fast-foundation';\nexport const foundationComboboxTemplate = (context, definition) => html `\n <template\n aria-activedescendant=\"${(x) => x.activeDescendant}\"\n class=\"${(x) => (x.open ? 'open' : '')} ${(x) => (x.disabled ? 'disabled' : '')} ${(x) => x.position}\"\n ?open=\"${(x) => x.open}\"\n @click=\"${(x, c) => x.clickHandler(c.event)}\"\n @focusout=\"${(x, c) => x.focusoutHandler(c.event)}\"\n @keydown=\"${(x, c) => x.keydownHandler(c.event)}\"\n >\n <div class=\"control\" part=\"control\">\n ${startSlotTemplate(context, definition)}\n <slot name=\"control\">\n <input\n aria-activedescendant=\"${(x) => x.activeDescendant}\"\n aria-autocomplete=\"${(x) => x.ariaAutoComplete || x.autocomplete}\"\n aria-controls=\"${(x) => x.ariaControls || x.listboxId}\"\n aria-disabled=\"${(x) => (x.disabled ? 'true' : 'false')}\"\n aria-expanded=\"${(x) => (x.open ? 'true' : 'false')}\"\n aria-haspopup=\"listbox\"\n aria-labelledby=\"${(x) => x.ariaLabelledby}\"\n aria-label=\"${(x) => x.ariaLabel}\"\n autocomplete=\"${(x) => x.autocomplete}\"\n class=\"selected-value\"\n part=\"selected-value\"\n placeholder=\"${(x) => x.placeholder}\"\n role=\"combobox\"\n type=\"text\"\n ?disabled=\"${(x) => x.disabled}\"\n :value=\"${(x) => x.value}\"\n @input=\"${(x, c) => x.inputHandler(c.event)}\"\n @keyup=\"${(x, c) => x.keyupHandler(c.event)}\"\n ${ref('control')}\n />\n <div class=\"indicator\" part=\"indicator\" aria-hidden=\"true\">\n <slot name=\"indicator\">${definition.indicator || ''}</slot>\n </div>\n </slot>\n ${endSlotTemplate(context, definition)}\n </div>\n <div\n class=\"listbox\"\n id=\"${(x) => x.listboxId}\"\n part=\"listbox\"\n role=\"listbox\"\n ?disabled=\"${(x) => x.disabled}\"\n ?hidden=\"${(x) => !x.open}\"\n ${ref('listbox')}\n >\n <slot\n ${ref('slottedDatasource')}\n ${slotted({\n filter: Listbox.slottedOptionFilter,\n flatten: true,\n property: 'slottedOptions',\n})}\n ></slot>\n </div>\n </template>\n`;\n","var _Combobox_indicator, _Combobox_wasOpenOnEnterDown;\nimport { __classPrivateFieldGet, __classPrivateFieldSet, __decorate } from \"tslib\";\nimport { Combobox as FASTComboBox } from '@microsoft/fast-components';\nimport { attr, DOM, observable, Observable } from '@microsoft/fast-element';\nimport { ComboboxAutocomplete } from '@microsoft/fast-foundation';\nimport debounce from 'lodash.debounce';\nimport { OptionsDatasource } from '../options-datasource';\nimport { logger, wasClickInsideElement, wasClickOutsideElement } from '../utils';\nimport { dataserverCriteriaBuilder as criteriaMatchBuilder } from '../utils';\nimport { foundationComboboxStyles as styles } from './combobox.styles';\nimport { foundationComboboxTemplate as template } from './combobox.template';\nconst DEBOUNCE_TIME = 500;\n/**\n * @tagname %%prefix%%-combobox\n */\nexport class Combobox extends FASTComboBox {\n constructor() {\n super(...arguments);\n _Combobox_indicator.set(this, void 0);\n _Combobox_wasOpenOnEnterDown.set(this, false);\n this.needManualChangeEventDispatch = false;\n this.async = false;\n this.debounce = DEBOUNCE_TIME;\n /** Controls whether to perform a case-sensitive search in the list of options */\n this.caseSensitive = false;\n /** Controls whether to suppress opening the dropdown when the input field is clicked */\n this.ignoreInputClick = false;\n /** Controls whether to filter by contains or startsWith */\n this.filterMode = 'startsWith';\n /**\n * Controls whether the combobox should always scroll to the selected option when the dropdown is opened\n * @experimental\n */\n this.scrollToSelectedWhenOpening = false;\n /**\n * Options for scrolling to the selected option when the dropdown is opened\n * @experimental\n */\n this.scrollToSelectedWhenOpeningOptions = {\n behavior: 'auto',\n block: 'nearest',\n };\n /**\n * Controls whether the combobox should scroll to the selected option when the selection changes\n * @experimental\n */\n this.scrollWhenSelectionChanges = false;\n /**\n * Options for scrolling to the selected option when the selection changes\n * @experimental\n */\n this.scrollWhenSelectionChangesOptions = {\n behavior: 'auto',\n block: 'center',\n };\n this.resetCombobox = () => {\n this.selectedOptions = [];\n this.selectedIndex = -1;\n this.value = '';\n this.control.value = '';\n this['filter'] = '';\n this.filterOptions();\n };\n }\n get activeDescendant() {\n var _a, _b;\n if (!this.selectedOptions || this.selectedOptions.length === 0)\n return;\n this.ariaActiveDescendant = (_a = this.selectedOptions[0]) === null || _a === void 0 ? void 0 : _a.id;\n return (_b = this.selectedOptions[0]) === null || _b === void 0 ? void 0 : _b.id;\n }\n debounceChanged(oldValue, newValue) {\n this.debouncedInputHandler = debounce(this.asyncSetFilter, newValue);\n }\n openChanged() {\n super.openChanged();\n if (this.open) {\n if (this.scrollToSelectedWhenOpening) {\n // TODO: Double-check this bit / DOM.queueUpdate do not work here\n setTimeout(() => {\n const selectedOption = this.options[this.selectedIndex];\n selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.scrollIntoView(this.scrollToSelectedWhenOpeningOptions);\n }, DEBOUNCE_TIME);\n }\n }\n else {\n this.manuallyDispatchChangeEvent();\n this['filter'] = '';\n this.filterOptions();\n }\n }\n get value() {\n Observable.track(this, 'value');\n return this._ourValue;\n }\n set value(next) {\n var _a, _b, _c;\n if (next === undefined)\n return;\n const prev = `${this._ourValue}`;\n if (this.$fastController.isConnected && this.options) {\n const searchFunc = this.caseSensitive\n ? (el) => el.text === next\n : (el) => el.text.toLowerCase() === String(next).toLowerCase();\n const selectedIndex = this.options ? this.options.findIndex(searchFunc) : -1;\n const prevSelectedValue = (_a = this.options[this.selectedIndex]) === null || _a === void 0 ? void 0 : _a.text;\n const nextSelectedValue = (_b = this.options[selectedIndex]) === null || _b === void 0 ? void 0 : _b.text;\n this.selectedIndex =\n nextSelectedValue && nextSelectedValue !== prevSelectedValue\n ? selectedIndex\n : this.selectedIndex;\n // Only override with firstSelectedOption if next is not empty and no match was found\n if (next && next.trim() !== '' && selectedIndex === -1) {\n next = ((_c = this.firstSelectedOption) === null || _c === void 0 ? void 0 : _c.text) || next;\n }\n }\n if (prev !== next) {\n this._ourValue = next;\n super.valueChanged(prev, next);\n Observable.notify(this, 'value');\n }\n }\n slottedOptionsChanged(prev, next) {\n const shouldEmit = this.async ? true : false;\n super.slottedOptionsChanged(prev, next);\n this['updateValue'](shouldEmit);\n }\n filterOptions() {\n if (!this.autocomplete || this.autocomplete === ComboboxAutocomplete.none) {\n this['filter'] = '';\n }\n const innerFilter = this['filter'];\n const filter = this.caseSensitive ? innerFilter : innerFilter.toLowerCase();\n const searchFunc = (el) => {\n const text = this.caseSensitive ? el.text : el.text.toLowerCase();\n return this.filterMode === 'contains' ? text.includes(filter) : text.startsWith(filter);\n };\n this.filteredOptions = this._options.filter(searchFunc);\n if (!this['isAutocompleteList'])\n return;\n if (!this.filteredOptions.length && !filter)\n this.filteredOptions = this._options;\n this._options.forEach((o) => (o.hidden = !this.filteredOptions.includes(o)));\n }\n clickHandler(e) {\n if (this.disabled)\n return;\n // click outside, always close\n if (wasClickOutsideElement(e, this)) {\n this.open = false;\n return;\n }\n // always open/close on arrow box\n if (wasClickInsideElement(e, this.indicator)) {\n this.open = !this.open;\n if (this.open)\n this.control.focus();\n return;\n }\n // don't open when clicked in input\n if (this.ignoreInputClick && wasClickInsideElement(e, this.control))\n return;\n return super.clickHandler(e);\n }\n keydownHandler(e) {\n const key = e.key;\n if (e.ctrlKey || e.shiftKey)\n return true;\n switch (key) {\n case 'Enter':\n __classPrivateFieldSet(this, _Combobox_wasOpenOnEnterDown, this.open, \"f\");\n // don't swallow keys if the combobox isn't open\n if (!this.open) {\n this.open = true;\n return true;\n }\n break;\n case 'ArrowDown':\n case 'ArrowUp':\n if (!this.open) {\n this.open = true;\n return true;\n }\n else if (this.scrollWhenSelectionChanges) {\n const selectedOption = this.options[this.selectedIndex];\n selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.scrollIntoView(this.scrollWhenSelectionChangesOptions);\n }\n break;\n case 'Escape':\n // if value is different from current value, restore current value and leave\n if (this.control.value !== this.currentValue) {\n this['filter'] = '';\n this.filterOptions();\n this.control.value = this.currentValue;\n this.selectItemByValue(this.currentValue);\n this.open = false;\n return;\n }\n // don't swallow keys if the combobox isn't open\n if (!this.open)\n return true;\n break;\n }\n const result = super.keydownHandler(e);\n if (key !== 'Enter')\n return result; // for Enter key, don't propagate keypress when selecting\n }\n keyupHandler(e) {\n var _a;\n const key = e.key;\n if (e.ctrlKey || e.shiftKey)\n return true;\n switch (key) {\n case 'Enter':\n return !__classPrivateFieldGet(this, _Combobox_wasOpenOnEnterDown, \"f\");\n case 'ArrowDown':\n case 'ArrowUp':\n if (this.open &&\n this.firstSelectedOption &&\n this.autocomplete === ComboboxAutocomplete.both) {\n this.needManualChangeEventDispatch = true;\n this.currentValue = (_a = this.firstSelectedOption) === null || _a === void 0 ? void 0 : _a.value;\n }\n break;\n case 'Home':\n case 'End':\n // base class clears the selected value for this, which is silly\n return;\n case 'Backspace':\n case 'Delete':\n const result = super.keyupHandler(e);\n this.selectItemByValue(this.control.value);\n return result;\n }\n return super.keyupHandler(e);\n }\n /**\n * Gets the HTML element for the indicator button\n *\n * @protected\n */\n get indicator() {\n if (!__classPrivateFieldGet(this, _Combobox_indicator, \"f\"))\n __classPrivateFieldSet(this, _Combobox_indicator, this.shadowRoot.querySelector('[part=\"indicator\"]'), \"f\");\n return __classPrivateFieldGet(this, _Combobox_indicator, \"f\");\n }\n /**\n * Selects an item in the dropdown based on its text value\n *\n * @param value - The text value of the item to be selected\n * @protected\n */\n selectItemByValue(value) {\n var _a, _b, _c;\n this.selectedIndex = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.findIndex((el) => el.text === value)) !== null && _b !== void 0 ? _b : -1;\n (_c = this.options) === null || _c === void 0 ? void 0 : _c.forEach((o, i) => (o.selected = i === this.selectedIndex));\n }\n inputHandler(e) {\n if (this.async) {\n this.debouncedInputHandler();\n }\n else {\n super.inputHandler(e);\n }\n }\n asyncSetFilter() {\n const cachedControlValue = this.control.value;\n const datasourceNode = this.slottedDatasource\n .assignedNodes()\n .filter((x) => x instanceof OptionsDatasource);\n if (datasourceNode.length > 0) {\n criteriaMatchBuilder(datasourceNode[0], this.control.value);\n DOM.queueUpdate(() => {\n this.control.value = cachedControlValue;\n });\n }\n else {\n logger.warn('Options-datasource is not connected. Please add a datasource to use this functionality.');\n }\n }\n manuallyDispatchChangeEvent() {\n if (this.needManualChangeEventDispatch &&\n this.firstSelectedOption &&\n this.autocomplete === ComboboxAutocomplete.both) {\n this.dispatchEvent(new Event('change', { bubbles: true }));\n this.needManualChangeEventDispatch = false;\n }\n }\n}\n_Combobox_indicator = new WeakMap(), _Combobox_wasOpenOnEnterDown = new WeakMap();\n__decorate([\n observable\n], Combobox.prototype, \"activeDescendant\", null);\n__decorate([\n observable\n], Combobox.prototype, \"slottedDatasource\", void 0);\n__decorate([\n attr({ mode: 'boolean' })\n], Combobox.prototype, \"async\", void 0);\n__decorate([\n attr\n], Combobox.prototype, \"debounce\", void 0);\n__decorate([\n attr({ mode: 'boolean', attribute: 'case-sensitive' })\n], Combobox.prototype, \"caseSensitive\", void 0);\n__decorate([\n attr({ mode: 'boolean', attribute: 'ignore-input-click' })\n], Combobox.prototype, \"ignoreInputClick\", void 0);\n__decorate([\n attr({ attribute: 'filter-mode' })\n], Combobox.prototype, \"filterMode\", void 0);\n__decorate([\n attr({ mode: 'boolean', attribute: 'scroll-to-selected-when-opening' })\n], Combobox.prototype, \"scrollToSelectedWhenOpening\", void 0);\n__decorate([\n observable\n], Combobox.prototype, \"scrollToSelectedWhenOpeningOptions\", void 0);\n__decorate([\n attr({ mode: 'boolean', attribute: 'scroll-when-selection-changes' })\n], Combobox.prototype, \"scrollWhenSelectionChanges\", void 0);\n__decorate([\n observable\n], Combobox.prototype, \"scrollWhenSelectionChangesOptions\", void 0);\n// explicitly declaring for extensibility\nexport const foundationComboboxShadowOptions = {\n delegatesFocus: true,\n mode: 'open',\n};\nexport const defaultComboboxConfig = {\n indicator: `\n <svg\n class=\"combo-box-indicator\"\n part=\"combo-box-indicator\"\n viewBox=\"0 0 12 7\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M11.85.65c.2.2.2.5 0 .7L6.4 6.84a.55.55 0 01-.78 0L.14 1.35a.5.5 0 11.71-.7L6 5.8 11.15.65c.2-.2.5-.2.7 0z\"\n />\n </svg>\n `,\n};\n/**\n * The Foundation Combo-box\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-combo-box\\>\n */\nexport const foundationCombobox = Combobox.compose(Object.assign({ baseName: 'combobox', template,\n styles, shadowOptions: foundationComboboxShadowOptions }, defaultComboboxConfig));\n","import { css } from '@microsoft/fast-element';\nexport const foundationConnectionIndicatorStyles = (context, definition) => css `\n :host {\n --light-size: 12px;\n --height: calc(var(--design-unit) * 2px + var(--light-size));\n\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: var(--height);\n margin: calc(var(--design-unit) * 2px) 0;\n\n /* https://www.colorxs.com/color/traffic-light-green-2032-20 */\n --green: 50 164 49;\n --trafic-light-green: rgb(var(--green));\n --trafic-light-green-glow:\n rgb(var(--green) / 40%) 0 0 4px 4px,\n rgb(var(--green) / 20%) 0 0 8px 8px;\n\n /* https://www.colorxs.com/color/ral-3020-traffic-red */\n --red: 187 30 16;\n --trafic-light-red: rgb(var(--red));\n --trafic-light-red-glow:\n rgb(var(--red) / 40%) 0 0 4px 4px,\n rgb(var(--red) / 20%) 0 0 8px 8px;\n }\n\n .light {\n height: var(--light-size);\n width: var(--light-size);\n margin: 1rem;\n border-radius: 100%;\n }\n\n .green {\n background: var(--trafic-light-green);\n box-shadow: var(--trafic-light-green-glow);\n }\n\n .red {\n background: var(--trafic-light-red);\n box-shadow: var(--trafic-light-red-glow);\n }\n\n .label {\n font-size: small;\n color: grey;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n`;\n","import { when } from '@microsoft/fast-element';\nimport { html } from '@microsoft/fast-element';\nimport { classNames } from '@microsoft/fast-web-utilities';\nexport const foundationConnectionIndicatorTemplate = html `\n <div class=${(x) => classNames(['light', true], [x.colour, true])}></div>\n ${when((x) => x.showLabel, html `\n <div class=\"label\">${(x) => x.label}</div>\n `)}\n`;\n","import { __decorate } from \"tslib\";\nimport { Connect, Session } from '@genesislcap/foundation-comms';\nimport { attr, observable } from '@microsoft/fast-element';\nimport { FoundationElement } from '@microsoft/fast-foundation';\nimport { foundationConnectionIndicatorStyles as styles } from './connection-indicator.styles';\nimport { foundationConnectionIndicatorTemplate as template } from './connection-indicator.template';\n/**\n * @tagname %%prefix%%-connection-indicator\n */\nexport class ConnectionIndicator extends FoundationElement {\n constructor() {\n super(...arguments);\n this.showLabel = false;\n // could have been a boolean but might support more states in the future (connecting?)\n this.label = 'disconnected';\n this.colour = 'red';\n }\n connectedCallback() {\n super.connectedCallback();\n this.subscription = this.connect.isConnectedSubject.subscribe((connected) => {\n this.label = this.getLabel(connected);\n this.colour = connected ? 'green' : 'red';\n });\n }\n disconnectedCallback() {\n var _a;\n (_a = this.subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();\n }\n getLabel(connected) {\n if (!connected)\n return 'disconnected';\n const hostUrl = this.session.getSessionStorageItem('hostUrl');\n return `${hostUrl} ✔`;\n }\n}\n__decorate([\n Connect\n], ConnectionIndicator.prototype, \"connect\", void 0);\n__decorate([\n Session\n], ConnectionIndicator.prototype, \"session\", void 0);\n__decorate([\n attr({ mode: 'boolean', attribute: 'show-label' })\n], ConnectionIndicator.prototype, \"showLabel\", void 0);\n__decorate([\n observable\n], ConnectionIndicator.prototype, \"label\", void 0);\n__decorate([\n observable\n], ConnectionIndicator.prototype, \"colour\", void 0);\n/**\n * The Connection Indicator\n *\n * @public\n * @remarks\n * HTML Element: \\<connection-indicator\\>\n */\nexport const foundationConnectionIndicator = ConnectionIndicator.compose({\n baseName: 'connection-indicator',\n template,\n styles,\n});\n","import { dataGridTemplate as fastDataGridTemplate } from '@microsoft/fast-foundation';\nexport const foundationDataGridTemplate = (context, definition) => fastDataGridTemplate(context, definition);\n","import { dataGridStyles as fastDataGridStyles } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationDataGridStyles = (context, defintion) => css `\n ${fastDataGridStyles(context, defintion)}\n`;\n","import { DataGrid as FASTDataGrid } from '@microsoft/fast-components';\nimport { foundationDataGridStyles as gridStyles } from './data-grid.styles';\nimport { foundationDataGridTemplate as gridTemplate } from './data-grid.template';\n/**\n * @tagname %%prefix%%-data-grid\n */\nexport class DataGrid extends FASTDataGrid {\n}\n// explicitly declaring for extensibility\nexport const foundationDataGridShadowOptions = undefined;\nexport const defaultDataGridConfig = {};\n/**\n * The Foundation Data Grid Element.\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-data-grid\\>\n */\nexport const foundationDataGrid = DataGrid.compose(Object.assign({ baseName: 'data-grid', template: gridTemplate, styles: gridStyles, shadowOptions: foundationDataGridShadowOptions }, defaultDataGridConfig));\n","import { dataGridCellStyles as fastDataGridCellStyles } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationDataGridCellStyles = (context, defintion) => css `\n ${fastDataGridCellStyles(context, defintion)}\n`;\n","import { DataGridCell as FASTDataGridCell } from '@microsoft/fast-components';\nimport { dataGridCellTemplate as template } from '@microsoft/fast-foundation';\nimport { foundationDataGridCellStyles as styles } from './data-grid-cell.styles';\nexport { dataGridCellTemplate as foundationDataGridCellTemplate } from '@microsoft/fast-foundation';\n/**\n * @tagname %%prefix%%-data-grid-cell\n */\nexport class DataGridCell extends FASTDataGridCell {\n}\n// explicitly declaring for extensibility\nexport const foundationDataGridCellShadowOptions = undefined;\nexport const defaultDataGridCellConfig = {};\n/**\n * The Foundation Data Grid Cell Element.\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-data-grid-cell\\>\n */\nexport const foundationDataGridCell = DataGridCell.compose(Object.assign({ baseName: 'data-grid-cell', template,\n styles, shadowOptions: foundationDataGridCellShadowOptions }, defaultDataGridCellConfig));\n","import { dataGridRowStyles as fastDataGridRowStyles } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationDataGridRowStyles = (context, defintion) => css `\n ${fastDataGridRowStyles(context, defintion)}\n`;\n","import { DataGridRow as FASTDataGridRow } from '@microsoft/fast-components';\nimport { dataGridRowTemplate as template } from '@microsoft/fast-foundation';\nimport { foundationDataGridRowStyles as styles } from './data-grid-row.styles';\nexport { dataGridRowTemplate as foundationDataGridRowTemplate } from '@microsoft/fast-foundation';\n/**\n * @tagname %%prefix%%-data-grid-row\n */\nexport class DataGridRow extends FASTDataGridRow {\n}\n// explicitly declaring for extensibility\nexport const foundationDataGridRowShadowOptions = undefined;\nexport const defaultDataGridRowConfig = {};\n/**\n * The Foundation Data Grid Row Element.\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-data-grid-row\\>\n */\nexport const foundationDataGridRow = DataGridRow.compose(Object.assign({ baseName: 'data-grid-row', template,\n styles, shadowOptions: foundationDataGridRowShadowOptions }, defaultDataGridRowConfig));\n","import { css } from '@microsoft/fast-element';\nexport const foundationDatePickerStyles = css `\n :host {\n position: relative;\n }\n\n .date-toggle::part(control) {\n cursor: pointer;\n }\n\n .date-toggle::part(label) {\n cursor: pointer;\n }\n\n .calendar-dropdown {\n display: none;\n width: 300px;\n z-index: 999;\n position: absolute;\n top: 100%;\n left: 50%;\n transform: translate(-50%, 8px);\n margin: 10px 0 0;\n padding: 20px;\n background: var(--neutral-fill-rest);\n border-radius: calc(var(--control-corner-radius) * 1px);\n box-shadow: 0 0 8px rgb(0 0 0 / 20%);\n }\n\n .calendar-dropdown.hide-weekends {\n width: 215px;\n }\n\n .calendar-dropdown.top {\n top: auto;\n bottom: 100%;\n margin: 0 0 5px;\n transform: translate(-50%, -8px);\n }\n\n .calendar-dropdown.left {\n top: 50%;\n left: 0;\n margin: 0 0 0 5px;\n transform: translate(calc(-8px + -100%), -50%);\n }\n\n .calendar-dropdown.right {\n top: 50%;\n left: 100%;\n transform: translate(8px, -50%);\n }\n\n .calendar-dropdown.visible {\n display: block;\n }\n\n .calendar-dropdown.inline {\n display: block;\n position: static;\n z-index: auto;\n margin-top: 5px;\n transform: none;\n }\n\n .header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin: 0 0 10px;\n }\n\n .header h3 {\n margin: 0;\n text-transform: capitalize;\n font-weight: bold;\n color: var(--neutral-foreground-rest);\n }\n\n .header .icon-button {\n height: auto;\n padding: 0;\n min-width: auto;\n }\n\n .header .months-arrows {\n display: flex;\n gap: calc(var(--design-unit) * 2px);\n }\n\n .week-days {\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n grid-gap: 5px;\n margin-bottom: 10px;\n color: var(--neutral-foreground-rest);\n }\n\n .week-days span {\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: 14px;\n font-weight: bold;\n text-transform: capitalize;\n }\n\n .week-days span.disabled {\n opacity: 60%;\n }\n\n .month-days {\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n grid-gap: 5px;\n }\n\n .week-days.hide-weekends,\n .month-days.hide-weekends {\n grid-template-columns: repeat(5, 1fr);\n }\n\n .month-day {\n padding: 8px 5px;\n color: #808080;\n background: none;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: calc(var(--control-corner-radius) * 4px);\n cursor: pointer;\n border: none;\n }\n\n .month-day.current {\n opacity: 100%;\n color: var(--neutral-foreground-hint);\n }\n\n .month-day.selected {\n background: var(--accent-foreground-rest);\n color: var(--neutral-foreground-rest);\n }\n\n .month-day:hover:not(:disabled) {\n background: var(--neutral-stroke-hover);\n color: var(--neutral-foreground-rest);\n }\n\n .month-day[disabled] {\n opacity: 50%;\n cursor: not-allowed;\n }\n\n .date-toggle[readonly] .label {\n cursor: pointer;\n }\n`;\n","import { html, when } from '@microsoft/fast-element';\nimport { repeat } from '@microsoft/fast-element';\nimport { classNames } from '@microsoft/fast-web-utilities';\nimport { getPrefix } from '../utils';\nconst SUNDAY_INDEX = 1;\nconst SATURDAY_INDEX = 7;\nconst WEEKEND_DAY_INDICES = [SUNDAY_INDEX, SATURDAY_INDEX];\nexport const getPrefixedDatePicker = (prefix) => html `\n <${prefix}-text-field data-test-id=\"date-picker\" readonly :value=\"${(x) => x.formatDate}\" part=\"date-toggle\" class=\"date-toggle\" @click=\"${(x) => x.toggleCalendar()}\">\n ${(x) => x.label}\n <div class=\"input-icon-container\" part=\"input-icon-container\" slot=\"end\"><${prefix}-icon variant=\"regular\" name=\"calendar-alt\" size=\"sm\"></${prefix}-icon></div>\n </${prefix}-text-field>\n <div class=\"calendar-dropdown ${(x) => x.calendarDropdownClasses} ${(x) => x.position}\">\n <div class=\"header\">\n <h3>${(x) => x.currentMonth} ${(x) => x.currentYear}</h3>\n <div class=\"months-arrows\">\n <${prefix}-button class=\"icon-button\" appearance=\"accent\" @click=\"${(x) => x.prevMonth()}\" aria-label=\"previous month\">\n <${prefix}-icon name=\"angle-left\"></${prefix}-icon>\n </${prefix}-button>\n <${prefix}-button class=\"icon-button\" appearance=\"accent\" @click=\"${(x) => x.nextMonth()}\" aria-label=\"next month\">\n <${prefix}-icon name=\"angle-right\"></${prefix}-icon>\n </${prefix}-button>\n </div>\n </div>\n <div class=\"week-days ${(x) => classNames(['hide-weekends', x.hideWeekends])}\">\n ${repeat((x) => { var _a; return (_a = x.calendar) === null || _a === void 0 ? void 0 : _a.weekDays; }, html `\n ${when((x, ctx) => !ctx.parent.hideWeekends || WEEKEND_DAY_INDICES.indexOf(ctx.index + 1) === -1, html `\n <span\n class=\"${(x, ctx) => classNames([\n 'disabled',\n ctx.parent.disabledDaysOfWeek.indexOf(ctx.index + 1) !== -1,\n])}\"\n >\n ${(x, c) => x.substring(0, c.parent.substringNumber)}\n </span>\n `)}\n `, { positioning: true })}\n </div>\n <div class=\"month-days ${(x) => classNames(['hide-weekends', x.hideWeekends])}\">\n ${repeat((x) => x.monthList, html `\n ${when((x, ctx) => !ctx.parent.hideWeekends || WEEKEND_DAY_INDICES.indexOf(x.dayNumber) === -1, html `\n <button\n ?disabled=\"${(x, ctx) => ctx.parent.disabledDaysOfWeek.indexOf(x.dayNumber) !== -1}\"\n class=\"month-day \n ${(x, c) => (c.parent.isSelectedDate(x) ? 'selected' : '')} \n ${(x, c) => x.monthNumber === c.parent.calendar.month.number ? 'current' : ''}\"\n @click=${(x, c) => c.parent.selectDay(x)}\n >\n ${(x) => x.date}\n </button>\n `)}\n `)}\n </div>\n <slot name=\"bottom\"></slot>\n </div>\n`;\nexport const foundationDatePickerTemplate = html `\n ${(x) => getPrefixedDatePicker(getPrefix(x))}\n`;\n","export default class Day {\n constructor(date, lang = 'default') {\n date = date !== null && date !== void 0 ? date : new Date();\n this.Date = date;\n this.date = date.getDate();\n this.day = date.toLocaleString(lang, { weekday: 'long' });\n this.dayNumber = date.getDay() + 1;\n this.dayShort = date.toLocaleString(lang, { weekday: 'short' });\n this.year = date.getFullYear();\n this.yearShort = Number(date.toLocaleString(lang, { year: '2-digit' }));\n this.month = date.toLocaleString(lang, { month: 'long' });\n this.monthShort = date.toLocaleString(lang, { month: 'short' });\n this.monthNumber = date.getMonth() + 1;\n this.timestamp = date.getTime();\n }\n}\n","import dayjs from 'dayjs';\nimport isLeapYear from 'dayjs/plugin/isLeapYear';\nimport Day from './day';\ndayjs.extend(isLeapYear);\nexport default class Month {\n constructor(date = null, lang = 'default') {\n const day = new Day(date, lang);\n // eslint-disable-next-line @typescript-eslint/no-magic-numbers\n const monthSize = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n this.lang = lang;\n this.name = day.month;\n this.number = day.monthNumber;\n this.year = day.year;\n this.numberOfDays = monthSize[this.number - 1];\n if (this.number === 2) {\n this.numberOfDays += dayjs(day.date).isLeapYear() ? 1 : 0;\n }\n }\n getDay(date) {\n return new Day(new Date(this.year, this.number - 1, date), this.lang);\n }\n}\n","import dayjs from 'dayjs';\nimport isLeapYear from 'dayjs/plugin/isLeapYear';\nimport Day from './day';\nimport Month from './month';\ndayjs.extend(isLeapYear);\nexport default class Calendar {\n constructor(year = null, monthNumber = null, lang = 'default') {\n this.weekDays = Array.from({ length: 7 });\n this.today = new Day(null, lang);\n this.year = year !== null && year !== void 0 ? year : this.today.year;\n this.month = new Month(new Date(this.year, (monthNumber || this.today.monthNumber) - 1), lang);\n this.lang = lang;\n this.weekDays.forEach((item, index) => {\n const day = this.month.getDay(index);\n this.weekDays[day.dayNumber - 1] = day.day;\n });\n }\n getMonth(monthNumber) {\n return new Month(new Date(this.year, monthNumber - 1), this.lang);\n }\n getPreviousMonth() {\n const month = 11;\n if (this.month.number === 1) {\n return new Month(new Date(this.year - 1, month), this.lang);\n }\n return new Month(new Date(this.year, this.month.number - 2), this.lang);\n }\n getNextMonth() {\n if (this.month.number === 1) {\n return new Month(new Date(this.year + 1, 0), this.lang);\n }\n return new Month(new Date(this.year, this.month.number + 2), this.lang);\n }\n goToDate(monthNumber, year) {\n this.month = new Month(new Date(year, monthNumber - 1), this.lang);\n this.year = year;\n }\n goToNextYear() {\n this.year += 1;\n this.month = new Month(new Date(this.year, 0), this.lang);\n }\n goToPreviousYear() {\n const month = 11;\n this.year -= 1;\n this.month = new Month(new Date(this.year, month), this.lang);\n }\n goToNextMonth() {\n const month = 12;\n if (this.month.number === month) {\n return this.goToNextYear();\n }\n this.month = new Month(new Date(this.year, this.month.number + 1 - 1), this.lang);\n }\n goToPreviousMonth() {\n if (this.month.number === 1) {\n return this.goToPreviousYear();\n }\n this.month = new Month(new Date(this.year, this.month.number - 1 - 1), this.lang);\n }\n}\n","import { logger } from '@genesislcap/foundation-utils';\nimport Day from './day';\nexport const getNextDay = (date, numDays = 1) => {\n const tomorrow = new Date(date);\n tomorrow.setDate(date.getDate() + numDays);\n return tomorrow;\n};\nexport const getPreviousDay = (date, numDays = 1) => {\n const yesterday = new Date();\n yesterday.setDate(date.getDate() - numDays);\n return yesterday;\n};\nexport const isDayEnabled = (disabledDays, day) => {\n return disabledDays.indexOf(day.dayNumber) === -1;\n};\n// eslint-disable-next-line @typescript-eslint/no-magic-numbers\nconst daysOfWeek = [1, 2, 3, 4, 5, 6, 7];\nconst NUM_DAYS_OF_WEEK = 7;\nexport const getNextEnabledDay = (disabledDaysOfWeek, currentDate, lang) => {\n if (isDayEnabled(disabledDaysOfWeek, currentDate)) {\n return currentDate;\n }\n const enabledDays = daysOfWeek.filter((d) => disabledDaysOfWeek.indexOf(d) === -1);\n let nextDayNumber = enabledDays.find((d) => d > currentDate.dayNumber);\n if (!nextDayNumber) {\n nextDayNumber = Math.min(...enabledDays);\n }\n const rollDays = currentDate.dayNumber < nextDayNumber\n ? nextDayNumber - currentDate.dayNumber\n : nextDayNumber - currentDate.dayNumber + NUM_DAYS_OF_WEEK;\n if (enabledDays.length) {\n return new Day(getNextDay(currentDate.Date, rollDays), lang);\n }\n else {\n logger.warn('Date picker disabled days - all days of week have been disabled');\n return currentDate;\n }\n};\n","import { __decorate } from \"tslib\";\nimport { attr, observable } from '@microsoft/fast-element';\nimport { FoundationElement } from '@microsoft/fast-foundation';\nimport { classNames } from '@microsoft/fast-web-utilities';\nimport dayjs from 'dayjs';\nimport customParseFormat from 'dayjs/plugin/customParseFormat';\nimport localeData from 'dayjs/plugin/localeData';\nimport LocalizedFormat from 'dayjs/plugin/localizedFormat';\nimport Calendar from './calendar';\nimport { foundationDatePickerStyles as styles } from './date-picker.styles';\nimport { foundationDatePickerTemplate as template } from './date-picker.template';\nimport Day from './day';\nimport { getNextEnabledDay } from './day.util';\nexport const foundationDatePickerShadowOptions = undefined;\nexport const defaultDatePickerConfig = {};\n/**\n * @tagname %%prefix%%-date-picker\n *\n * @fires value-changed - Fired when the date is changed in the calendar\n */\nexport class DatePicker extends FoundationElement {\n constructor() {\n super(...arguments);\n /**\n * @attr format - date format that will be displayed.\n * @default 'MM-DD-YYYY\n * @example\n * Date picker with day, month, year\n * ```html\n * <rapid-date-picker format=\"MM-DD-YYYY\">\n * </rapid-date-picker>\n * ```\n */\n this.format = 'MM-DD-YYYY';\n this.lang = 'en-US';\n this.visible = false;\n /**\n * @attr position - positions the calendar picker relative to the input control.\n * @default bottom\n * @example\n * To position the calendar to the right.\n * ```html\n * <rapid-date-picker position=\"right\">\n * </rapid-date-picker>\n * ```\n */\n this.position = 'bottom';\n /**\n * @public disabledDaysOfWeek - an array of numbers disabling days of the week.\n * Sunday = 1, Monday = 2, Tuesday = 3, Wednesday = 4, Thursday = 5, Friday = 6, Saturday = 7\n * @example\n * To disable Saturday and Sunday.\n * ```html\n * <rapid-date-picker :disabledDaysOfWeek=\"${() => [1,7]}\">\n * </rapid-date-picker>\n * ```\n */\n this.disabledDaysOfWeek = [];\n }\n formatChanged(oldValue, newValue) {\n if (newValue && this.calendar) {\n this.formatDate = dayjs(this.currentDate.Date).format(newValue);\n }\n }\n inlineCalendarChanged() {\n this.toggleVisibility();\n }\n hideWeekendsCalendarChanged() {\n this.toggleVisibility();\n }\n valueChanged(oldValue, newValue) {\n if (newValue && this.calendar) {\n const localeFormat = dayjs().localeData().longDateFormat('L');\n this.currentDate = new Day(dayjs(newValue, localeFormat).toDate(), this.lang);\n this.calendar.goToDate(this.currentDate.monthNumber, this.currentDate.year);\n this.formatDate = dayjs(this.currentDate.Date).format(this.format);\n this.updateHeaderText();\n this.monthList = this.getMonthDaysGrid();\n }\n }\n connectedCallback() {\n var _a;\n super.connectedCallback();\n dayjs.extend(customParseFormat);\n dayjs.extend(LocalizedFormat);\n dayjs.extend(localeData);\n this.substringNumber = 3;\n const dateString = this.value;\n const dayjsDate = dateString ? dayjs(dateString, 'MM-DD-YYYY') : dayjs();\n let currentDate = new Day(dayjsDate.toDate(), this.lang);\n if ((_a = this.disabledDaysOfWeek) === null || _a === void 0 ? void 0 : _a.length) {\n currentDate = getNextEnabledDay(this.disabledDaysOfWeek, currentDate, this.lang);\n }\n this.currentDate = currentDate;\n this.calendar = new Calendar(this.currentDate.year, this.currentDate.monthNumber, this.lang);\n this.value = dayjs(this.currentDate.Date).format('MM-DD-YYYY');\n this.currentMonth = this.calendar.month.name;\n this.currentYear = this.calendar.year;\n this.formatDate = dayjs(this.currentDate.Date).format(this.format);\n this.monthList = this.getMonthDaysGrid();\n }\n updateHeaderText() {\n this.currentMonth = this.calendar.month.name;\n this.currentYear = this.calendar.year;\n }\n toggleCalendar() {\n this.visible = !this.visible;\n this.toggleVisibility();\n if (!this.isCurrentCalendarMonth()) {\n this.calendar.goToDate(this.currentDate.monthNumber, this.currentDate.year);\n this.updateHeaderText();\n }\n }\n toggleVisibility() {\n this.calendarDropdownClasses = classNames(['visible', this.visible], this.position, ['inline', this.inlineCalendar], ['hide-weekends', this.hideWeekends]);\n }\n isSelectedDate(date) {\n return dayjs(date.Date).isSame(this.currentDate.Date, 'day');\n }\n isCurrentCalendarMonth() {\n return (\n // ToDo FUI-2290 adding types. Investigate is currentMonth can be a number or is this a bug\n // @ts-ignore\n this.currentMonth === this.currentDate.monthNumber &&\n this.currentYear === this.currentDate.year);\n }\n prevMonth() {\n this.calendar.goToPreviousMonth();\n this.updateHeaderText();\n this.monthList = this.getMonthDaysGrid();\n }\n nextMonth() {\n this.calendar.goToNextMonth();\n this.updateHeaderText();\n this.monthList = this.getMonthDaysGrid();\n }\n selectDay(day) {\n if (dayjs(day.Date).isSame(this.currentDate.Date))\n return;\n this.currentDate = day;\n if (day.monthNumber !== this.calendar.month.number) {\n this.prevMonth();\n }\n this.formatDate = dayjs(this.currentDate.Date).format(this.format);\n this.value = dayjs(day.Date).format('MM-DD-YYYY');\n this.$emit('value-changed', this.value);\n this.toggleCalendar();\n }\n getMonthDaysGrid() {\n const firstDayOfTheMonth = this.calendar.month.getDay(1);\n const prevMonth = this.calendar.getPreviousMonth();\n const totalLastMonthFinalDays = firstDayOfTheMonth.dayNumber - 1;\n const totalDays = this.calendar.month.numberOfDays + totalLastMonthFinalDays;\n const monthList = Array.from({ length: totalDays });\n for (let i = totalLastMonthFinalDays; i < totalDays; i += 1) {\n monthList[i] = this.calendar.month.getDay(i + 1 - totalLastMonthFinalDays);\n }\n for (let i = 0; i < totalLastMonthFinalDays; i += 1) {\n const inverted = totalLastMonthFinalDays - (i + 1);\n monthList[i] = prevMonth.getDay(prevMonth.numberOfDays - inverted);\n }\n return monthList;\n }\n}\n__decorate([\n attr\n], DatePicker.prototype, \"format\", void 0);\n__decorate([\n attr\n], DatePicker.prototype, \"lang\", void 0);\n__decorate([\n attr\n], DatePicker.prototype, \"visible\", void 0);\n__decorate([\n attr({ attribute: 'inline-calendar', mode: 'boolean' })\n], DatePicker.prototype, \"inlineCalendar\", void 0);\n__decorate([\n attr({ attribute: 'hide-weekends', mode: 'boolean' })\n], DatePicker.prototype, \"hideWeekends\", void 0);\n__decorate([\n attr\n], DatePicker.prototype, \"position\", void 0);\n__decorate([\n attr\n], DatePicker.prototype, \"label\", void 0);\n__decorate([\n attr\n], DatePicker.prototype, \"value\", void 0);\n__decorate([\n observable\n], DatePicker.prototype, \"currentDate\", void 0);\n__decorate([\n observable\n], DatePicker.prototype, \"currentMonth\", void 0);\n__decorate([\n observable\n], DatePicker.prototype, \"currentYear\", void 0);\n__decorate([\n observable\n], DatePicker.prototype, \"calendarDropdownClasses\", void 0);\n__decorate([\n observable\n], DatePicker.prototype, \"formatDate\", void 0);\n__decorate([\n observable\n], DatePicker.prototype, \"monthList\", void 0);\n__decorate([\n observable\n], DatePicker.prototype, \"disabledDaysOfWeek\", void 0);\n__decorate([\n observable\n], DatePicker.prototype, \"calendar\", void 0);\n/**\n * The Foundation DatePicker\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-date-picker\\>\n */\nexport const foundationDatePicker = DatePicker.compose(Object.assign({ baseName: 'date-picker', styles,\n template, shadowOptions: foundationDatePickerShadowOptions }, defaultDatePickerConfig));\n","/**\n * Deep merges two objects, with source values taking precedence over target values.\n * Arrays are replaced (not merged), and null/undefined values in source are preserved.\n *\n * @param target - The target object to merge into (defaults/base values)\n * @param source - The source object to merge from (overrides)\n * @returns A new merged object with source values taking precedence\n * @public\n * @example\n * ```ts\n * const defaults = { a: 1, b: { c: 2, d: 3 } };\n * const overrides = { b: { c: 4 } };\n * const merged = deepMerge(defaults, overrides);\n * // Result: { a: 1, b: { c: 4, d: 3 } }\n * ```\n */\nexport const deepMerge = (target, source) => {\n const output = structuredClone(target);\n if (!source || typeof source !== 'object' || Array.isArray(source)) {\n return source !== undefined ? source : output;\n }\n Object.keys(source).forEach((key) => {\n const sourceValue = source[key];\n const targetValue = output[key];\n // If source value is null or undefined, skip it (preserve target value)\n if (sourceValue === null || sourceValue === undefined) {\n return;\n }\n // Type guard for Date check\n const isDate = (value) => value instanceof Date;\n // If both are plain objects (not arrays, dates, etc.), recursively merge\n if (sourceValue &&\n typeof sourceValue === 'object' &&\n !Array.isArray(sourceValue) &&\n !isDate(sourceValue) &&\n targetValue &&\n typeof targetValue === 'object' &&\n !Array.isArray(targetValue) &&\n !isDate(targetValue)) {\n output[key] = deepMerge(targetValue, sourceValue);\n }\n else {\n // Otherwise, source value overrides target value\n output[key] = sourceValue;\n }\n });\n return output;\n};\n","export const defaultDesignTokens = {\n design_tokens: {\n color: {\n accent: {\n $value: '#0EAFE2',\n $type: 'color',\n },\n neutral: {\n $value: '#7C909B',\n $type: 'color',\n },\n },\n fontFamily: {\n bodyFont: {\n $value: 'Roboto, \"Segoe UI\", Arial, Helvetica, sans-serif',\n $type: 'fontFamily',\n },\n },\n typography: {\n baseFontSize: {\n $value: '14px',\n $type: 'dimension',\n },\n baseLineHeight: {\n $value: '20px',\n $type: 'dimension',\n },\n },\n mode: {\n luminance: {\n $value: 0.23,\n $type: 'number',\n },\n },\n style: {\n density: {\n $value: 0,\n $type: 'number',\n },\n baseHeightMultiplier: {\n $value: 10,\n $type: 'number',\n },\n borderRadius: {\n $value: 4,\n $type: 'number',\n },\n strokeWidth: {\n $value: 1,\n $type: 'number',\n },\n },\n space: {\n designUnit: {\n $value: 4,\n $type: 'number',\n },\n },\n },\n};\n","import { __decorate } from \"tslib\";\nimport { TypeRampValues, deepMerge } from '@genesislcap/foundation-utils';\nimport { parseColorHexRGB } from '@microsoft/fast-colors';\nimport { PaletteRGB, SwatchRGB, accentPalette, controlCornerRadius, designUnit, neutralPalette, baseLayerLuminance, baseHeightMultiplier, density, strokeWidth, bodyFont, typeRampBaseFontSize, typeRampBaseLineHeight, typeRampMinus1FontSize, typeRampMinus1LineHeight, typeRampMinus2FontSize, typeRampMinus2LineHeight, typeRampPlus1FontSize, typeRampPlus1LineHeight, typeRampPlus2FontSize, typeRampPlus2LineHeight, typeRampPlus3FontSize, typeRampPlus3LineHeight, typeRampPlus4FontSize, typeRampPlus4LineHeight, typeRampPlus5FontSize, typeRampPlus5LineHeight, typeRampPlus6FontSize, typeRampPlus6LineHeight, } from '@microsoft/fast-components';\nimport { observable } from '@microsoft/fast-element';\nimport { defaultDesignTokens } from './default-design-tokens';\n/**\n * Observable class for design tokens config that components can subscribe to.\n * @public\n */\nexport class DesignTokensObservable {\n constructor() {\n this.value = null;\n }\n}\n__decorate([\n observable\n], DesignTokensObservable.prototype, \"value\", void 0);\n// Singleton instance for components to subscribe to\nconst designTokensObservable = new DesignTokensObservable();\nexport const provideTokens = (tokens, values, element) => {\n const setToken = element\n ? (token, value) => token.setValueFor(element, value)\n : (token, value) => token.withDefault(value);\n Object.keys(tokens).forEach((token) => {\n const valueKey = `${token}Value`;\n if (values[valueKey]) {\n setToken(tokens[token], values[valueKey]);\n }\n });\n};\nexport function designToken(token) {\n return (source, key) => {\n source[key + 'Changed'] = function (prev, next) {\n if (next !== undefined && next !== null) {\n token.setValueFor(this, next);\n }\n else {\n token.deleteValueFor(this);\n }\n };\n };\n}\nexport const swatchConverter = {\n toView(value) {\n if (value === null || value === undefined) {\n return null;\n }\n return value === null || value === void 0 ? void 0 : value.toColorString();\n },\n fromView(value) {\n if (value === null || value === undefined) {\n return null;\n }\n const color = parseColorHexRGB(value);\n return color ? SwatchRGB.create(color.r, color.g, color.b) : null;\n },\n};\nexport const paletteFromHex = (hexColor) => PaletteRGB.from(SwatchRGB.from(parseColorHexRGB(hexColor)));\n/**\n * Converts custom tokens to CSS custom properties and sets them on the provider element.\n * Supports nested token groups which are flattened into kebab-case CSS variable names.\n *\n * Example:\n * Input: { spacing: { padding: { small: { $value: \"8px\" } } } }\n * Output: --spacing-padding-small: 8px\n *\n * @param provider - The HTML element to set CSS variables on\n * @param customTokens - The custom tokens object to process\n * @param prefix - Internal prefix for nested keys (used during recursion)\n */\nexport const applyCustomTokens = (provider, customTokens, prefix = '') => {\n Object.entries(customTokens).forEach(([key, value]) => {\n const cssVarName = prefix ? `${prefix}-${key}` : key;\n if (value && typeof value === 'object') {\n // If it has $value, this is a leaf token - set it as CSS variable\n if ('$value' in value) {\n provider.style.setProperty(`--${cssVarName}`, String(value.$value));\n }\n else {\n // Otherwise, it's a token group - recurse into nested structure\n applyCustomTokens(provider, value, cssVarName);\n }\n }\n });\n};\nconst defaultExclusions = ['baseClass', 'baseName', 'shadowOptions', 'styles', 'template'];\nexport const getDefaultConfig = (definition, exclusions = defaultExclusions) => {\n const keys = Object.keys(definition).filter((k) => !exclusions.includes(k));\n return keys.reduce((accumulator, key) => {\n accumulator[key] = definition[key];\n return accumulator;\n }, {});\n};\nexport const getExports = (registrationFunction) => {\n const { definition } = registrationFunction();\n const { shadowOptions, styles, template } = definition;\n const defaultConfig = getDefaultConfig(definition);\n return { shadowOptions, styles, template, defaultConfig };\n};\nexport const getTypeRampValue = (baseTypeRamp, value) => {\n const regex = /^(\\d+)([a-z]+)/i;\n const matches = baseTypeRamp.match(regex);\n const baseFontValue = matches[1];\n const baseUnit = matches[2];\n const typeRampSize = Number(baseFontValue) + value;\n return typeRampSize + baseUnit;\n};\n/**\n * Returns an observable object that components can subscribe to for design tokens config updates.\n * @remarks\n * Components can access the `value` property of the returned object, and FAST will automatically\n * track changes. When `configureDesignSystem()` sets the design tokens, all subscribed components\n * will be notified automatically.\n *\n * The `value` property will be `null` initially, then set to the actual config when\n * `configureDesignSystem()` is called with a design tokens config.\n *\n * @returns An observable object with a `value` property containing the design tokens config (or null)\n * @public\n */\nexport const designTokensMap = () => designTokensObservable;\n/**\n * Selects a custom token value from the custom tokens configuration using a path selector.\n *\n * Navigates through nested token groups using the provided path segments to retrieve\n * a specific token's value. Returns the token object with its `$value` and optional `$type`,\n * or `null` if the path doesn't exist or the custom tokens haven't been configured.\n *\n * @param path - Variable number of string arguments representing the path to the token.\n * Each argument represents a level in the nested token structure.\n * @returns The token object containing `$value` and optional `$type`, or `null` if:\n * - The design tokens config hasn't been configured (designTokensObservable.value is null)\n * - The customTokens property doesn't exist in the config\n * - The path doesn't exist in the token structure\n * - The path points to a token group without a `$value` property\n *\n * @example\n * ```json\n * // Example design-tokens.json structure:\n * {\n * \"design_tokens\": { ... },\n * \"customTokens\": {\n * \"spacing\": {\n * \"padding\": {\n * \"small\": { \"$value\": \"8px\", \"$type\": \"dimension\" },\n * \"medium\": { \"$value\": \"16px\", \"$type\": \"dimension\" },\n * \"large\": { \"$value\": \"24px\", \"$type\": \"dimension\" }\n * },\n * \"margin\": {\n * \"small\": { \"$value\": \"4px\", \"$type\": \"dimension\" },\n * \"medium\": { \"$value\": \"12px\", \"$type\": \"dimension\" }\n * }\n * },\n * \"elevation\": {\n * \"low\": { \"$value\": \"0 2px 4px rgba(0,0,0,0.1)\", \"$type\": \"shadow\" },\n * \"medium\": { \"$value\": \"0 4px 8px rgba(0,0,0,0.15)\", \"$type\": \"shadow\" }\n * }\n * }\n * }\n * ```\n *\n * @example\n * ```ts\n * // Select a nested token: spacing.padding.small\n * const token = selectCustomToken(\"spacing\", \"padding\", \"small\");\n * // Returns: { $value: \"8px\", $type: \"dimension\" }\n * ```\n *\n * @example\n * ```ts\n * // Select a single-level token: elevation.low\n * const token = selectCustomToken(\"elevation\", \"low\");\n * // Returns: { $value: \"0 2px 4px rgba(0,0,0,0.1)\", $type: \"shadow\" }\n * ```\n *\n * @example\n * ```ts\n * // Non-existent path returns null\n * const token = selectCustomToken(\"spacing\", \"padding\", \"xlarge\");\n * // Returns: null\n * ```\n *\n * @example\n * ```ts\n * // Returns null when design tokens config hasn't been configured\n * // (before configureDesignSystem is called)\n * const token = selectCustomToken(\"spacing\", \"padding\", \"small\");\n * // Returns: null\n * ```\n * @public\n */\nexport const selectCustomToken = (...path) => {\n const config = designTokensObservable.value;\n if (!(config === null || config === void 0 ? void 0 : config.customTokens) || path.length === 0)\n return null;\n function select(xs, ref) {\n const [selector, ...rest] = xs;\n if (rest.length === 0) {\n const token = ref[selector];\n if (token && token.$value)\n return token;\n return null;\n }\n const nextRef = ref[selector];\n if (!nextRef)\n return null;\n return select(rest, nextRef);\n }\n return select(path, config.customTokens);\n};\n/**\n * Deep merges two design tokens config objects, with the source config taking precedence over defaults.\n * This ensures all required tokens are present even if the incoming config is incomplete.\n *\n * @param defaults - The default design tokens config\n * @param source - The incoming design tokens config to merge\n * @returns A merged DesignTokensConfig with all required tokens\n */\nconst mergeDesignTokens = (defaults, source) => {\n return deepMerge(defaults, source);\n};\nexport const configureDesignSystem = (provider, config) => {\n // Merge incoming config with defaults to ensure all required tokens are present\n const mergedConfig = mergeDesignTokens(defaultDesignTokens, config);\n const designTokens = mergedConfig.design_tokens;\n accentPalette.setValueFor(provider, paletteFromHex(designTokens.color.accent.$value));\n neutralPalette.setValueFor(provider, paletteFromHex(designTokens.color.neutral.$value));\n bodyFont.setValueFor(provider, designTokens.fontFamily.bodyFont.$value);\n baseLayerLuminance.setValueFor(provider, designTokens.mode.luminance.$value);\n density.setValueFor(provider, designTokens.style.density.$value);\n baseHeightMultiplier.setValueFor(provider, designTokens.style.baseHeightMultiplier.$value);\n controlCornerRadius.setValueFor(provider, designTokens.style.borderRadius.$value);\n strokeWidth.setValueFor(provider, designTokens.style.strokeWidth.$value);\n designUnit.setValueFor(provider, designTokens.space.designUnit.$value);\n typeRampBaseFontSize.setValueFor(provider, designTokens.typography.baseFontSize.$value);\n typeRampBaseLineHeight.setValueFor(provider, designTokens.typography.baseLineHeight.$value);\n const baseFontSize = typeRampBaseFontSize.getValueFor(provider);\n const baseLineHeight = typeRampBaseLineHeight.getValueFor(provider);\n typeRampMinus1FontSize.setValueFor(provider, getTypeRampValue(baseFontSize, TypeRampValues.minusOne));\n typeRampMinus1LineHeight.setValueFor(provider, getTypeRampValue(baseLineHeight, TypeRampValues.minusOne));\n typeRampMinus2FontSize.setValueFor(provider, getTypeRampValue(baseFontSize, TypeRampValues.minusTwo));\n typeRampMinus2LineHeight.setValueFor(provider, getTypeRampValue(baseLineHeight, TypeRampValues.minusTwo));\n typeRampPlus1FontSize.setValueFor(provider, getTypeRampValue(baseFontSize, TypeRampValues.plusOne));\n typeRampPlus1LineHeight.setValueFor(provider, getTypeRampValue(baseLineHeight, TypeRampValues.plusOne));\n typeRampPlus2FontSize.setValueFor(provider, getTypeRampValue(baseFontSize, TypeRampValues.plusTwo));\n typeRampPlus2LineHeight.setValueFor(provider, getTypeRampValue(baseLineHeight, TypeRampValues.plusTwo));\n typeRampPlus3FontSize.setValueFor(provider, getTypeRampValue(baseFontSize, TypeRampValues.plusThree));\n typeRampPlus3LineHeight.setValueFor(provider, getTypeRampValue(baseLineHeight, TypeRampValues.plusThree));\n typeRampPlus4FontSize.setValueFor(provider, getTypeRampValue(baseFontSize, TypeRampValues.plusFour));\n typeRampPlus4LineHeight.setValueFor(provider, getTypeRampValue(baseLineHeight, TypeRampValues.plusFour));\n typeRampPlus5FontSize.setValueFor(provider, getTypeRampValue(baseFontSize, TypeRampValues.plusFive));\n typeRampPlus5LineHeight.setValueFor(provider, getTypeRampValue(baseLineHeight, TypeRampValues.plusFive));\n typeRampPlus6FontSize.setValueFor(provider, getTypeRampValue(baseFontSize, TypeRampValues.plusSix));\n typeRampPlus6LineHeight.setValueFor(provider, getTypeRampValue(baseLineHeight, TypeRampValues.plusSix));\n // Apply custom tokens if provided\n if (mergedConfig.customTokens) {\n applyCustomTokens(provider, mergedConfig.customTokens);\n }\n // Update the observable value with full merged config - FAST will automatically notify all subscribers\n designTokensObservable.value = structuredClone(mergedConfig);\n};\n","import { parseColorHexRGB } from '@microsoft/fast-colors';\nimport { PaletteRGB, SwatchRGB } from '@microsoft/fast-components';\n/**\n * @internal\n */\nexport const white = SwatchRGB.create(1, 1, 1);\n/**\n * @internal\n */\nexport const black = SwatchRGB.create(0, 0, 0);\n/**\n * @internal\n */\nconst fuiBGColor = parseColorHexRGB('#585858');\nexport const defaultFillColor = SwatchRGB.create(fuiBGColor.r, fuiBGColor.g, fuiBGColor.b);\n/**\n * @internal\n */\nconst fuiCardBGColor = parseColorHexRGB('#ffffff');\nexport const fuiDefaultCardFillColor = SwatchRGB.create(fuiCardBGColor.r, fuiCardBGColor.g, fuiCardBGColor.b);\nexport const fuiDefaultCardPalette = PaletteRGB.from(fuiDefaultCardFillColor);\n/**\n * @internal\n */\nconst fuiNeutralRGB = parseColorHexRGB('#eeeeee');\nexport const fuiNeutralSwatch = SwatchRGB.create(fuiNeutralRGB.r, fuiNeutralRGB.g, fuiNeutralRGB.b);\nexport const fuiNeutralPalette = PaletteRGB.from(fuiNeutralSwatch);\n/**\n * @internal\n */\nconst fuiAccentRGB = parseColorHexRGB('#08c3a5');\nexport const fuiAccentSwatch = SwatchRGB.create(fuiAccentRGB.r, fuiAccentRGB.g, fuiAccentRGB.b);\nexport const fuiAccentPalette = PaletteRGB.from(fuiAccentSwatch);\n","import { DesignToken } from '@microsoft/fast-foundation';\nimport { defaultFillColor, fuiDefaultCardFillColor, fuiDefaultCardPalette } from '../styles/colors';\nconst { create } = DesignToken;\n/** @public */\nexport const fuiFillColor = create('fui-fill-color').withDefault(defaultFillColor);\n/** @public */\nexport const fuiCardFillColor = create({\n name: 'card-fill-color',\n cssCustomPropertyName: 'fui-card-fill-color',\n}).withDefault(fuiDefaultCardFillColor);\nexport const defaultNeutralForegroundContrast = 14;\nexport function neutralForeground(palette, reference) {\n return palette.colorContrast(reference, defaultNeutralForegroundContrast);\n}\n/** @public */\nexport const fuiCardForegroundColor = create({\n name: 'card-foreground-color',\n cssCustomPropertyName: 'fui-card-foreground-color',\n}).withDefault((element) => {\n const cardPalette = create('fui-card-palette').withDefault(fuiDefaultCardPalette);\n return neutralForeground(cardPalette.getValueFor(element), fuiCardFillColor.getValueFor(element));\n});\n","import { StandardLuminance } from '@microsoft/fast-components';\nimport { paletteFromHex } from '../../design-system-provider/design-system-provider.utils';\nexport const accentPaletteValue = paletteFromHex('#08c3a5');\nexport const neutralPaletteValue = paletteFromHex('#eeeeee');\nexport const baseLayerLuminanceValue = StandardLuminance.DarkMode;\n// export const accentFillRestDeltaValue = 0;\n// export const accentFillHoverDeltaValue = 4;\n// export const accentFillActiveDeltaValue = -5;\n// export const accentFillFocusDeltaValue = 0;\n// export const accentForegroundRestDeltaValue = 0;\n// export const accentForegroundHoverDeltaValue = 6;\n// export const accentForegroundActiveDeltaValue = -4;\n// export const accentForegroundFocusDeltaValue = 0;\n// export const neutralFillRestDeltaValue = 7;\n// export const neutralFillHoverDeltaValue = 10;\n// export const neutralFillActiveDeltaValue = 5;\n// export const neutralFillFocusDeltaValue = 0;\n// export const neutralFillInputRestDeltaValue = 0;\n// export const neutralFillInputHoverDeltaValue = 0;\n// export const neutralFillInputActiveDeltaValue = 0;\n// export const neutralFillInputFocusDeltaValue = 0;\n// export const neutralFillStealthRestDeltaValue = 0;\n// export const neutralFillStealthHoverDeltaValue = 5;\n// export const neutralFillStealthActiveDeltaValue = 3;\n// export const neutralFillStealthFocusDeltaValue = 0;\n// export const neutralFillStrongRestDeltaValue = 0;\n// export const neutralFillStrongHoverDeltaValue = 8;\n// export const neutralFillStrongActiveDeltaValue = -5;\n// export const neutralFillStrongFocusDeltaValue = 0;\n// export const neutralFillLayerRestDeltaValue = 3;\n// export const neutralStrokeRestDeltaValue = 25;\n// export const neutralStrokeHoverDeltaValue = 40;\n// export const neutralStrokeActiveDeltaValue = 16;\n// export const neutralStrokeFocusDeltaValue = 25;\n// export const neutralStrokeDividerRestDeltaValue = 8;\n","import { Direction } from '@microsoft/fast-web-utilities';\n// export const prefix = 'foundation';\nexport const directionValue = Direction.ltr;\n// export const disabledOpacityValue = 0.3;\n// export const strokeWidthValue = 1;\n// export const focusStrokeWidthValue = 2;\n","// export const baseHeightMultiplierValue = 10;\nexport const controlCornerRadiusValue = 4;\n// export const densityValue = 0;\nexport const designUnitValue = 4;\n","import { CSSDirective, cssPartial } from '@microsoft/fast-element';\nexport class CSSVarsTokenMapper extends CSSDirective {\n constructor(tokenMap) {\n super();\n this.tokenMap = tokenMap;\n }\n createTokenPartial(key, value) {\n return cssPartial `${key}: ${value}`;\n }\n createTokensCSS() {\n const styles = [];\n for (const [key, value] of Object.entries(this.tokenMap)) {\n styles.push(this.createTokenPartial(key, value).createCSS());\n }\n return styles;\n }\n createCSS() {\n return this.createTokensCSS().join(';');\n }\n}\n","import { dom, library } from '@fortawesome/fontawesome-svg-core';\nimport { fab } from '@fortawesome/free-brands-svg-icons';\nimport { far } from '@fortawesome/free-regular-svg-icons';\nimport { fas } from '@fortawesome/free-solid-svg-icons';\nexport const getFontawesomeIconsCss = () => {\n // config.autoReplaceSvg = true;\n // config.observeMutations = true;\n library.add(fas, far, fab);\n return dom.css();\n};\n","import { bodyFont } from '@microsoft/fast-components';\nexport const mixinFoundationFontFamily = (style = 'normal', weight = 'normal') => `\n font-family: ${bodyFont};\n font-style: ${style};\n font-weight: ${weight};\n`;\n","import { css } from '@microsoft/fast-element';\nimport { display, forcedColorsStylesheetBehavior, } from '@microsoft/fast-foundation';\nimport { SystemColors } from '@microsoft/fast-web-utilities';\nimport { mixinFoundationFontFamily } from '../_config/styles';\nimport { fuiFillColor } from '../_config/tokens';\nconst baseStyles = css `\n ${display('flex')}\n :host {\n flex: 1;\n }\n`;\nconst backgroundStyles = css `\n :host {\n background-color: ${fuiFillColor};\n }\n`.withBehaviors(forcedColorsStylesheetBehavior(css `\n :host {\n background-color: ${SystemColors.ButtonFace};\n box-shadow: 0 0 0 1px ${SystemColors.CanvasText};\n color: ${SystemColors.ButtonText};\n }\n `));\nconst getHeaderForContext = (context, headingLevel) => css `\n ${context.name} ${'h' + headingLevel} {\n margin: 0;\n }\n`;\nconst typography = (context) => css `\n ${getHeaderForContext(context, '1')}\n ${getHeaderForContext(context, '2')}\n ${getHeaderForContext(context, '3')}\n ${getHeaderForContext(context, '4')}\n ${getHeaderForContext(context, '5')}\n ${getHeaderForContext(context, '6')}\n`;\nexport const designSystemProviderStyles = (context) => {\n const contextualizedTypography = typography(context);\n // Document-level but contextualized overrides (h1, h2, span, etc)\n contextualizedTypography.addStylesTo(document);\n return css `\n ${baseStyles}\n ${backgroundStyles}\n ${contextualizedTypography}\n :host * {\n ${mixinFoundationFontFamily()}\n }\n `;\n};\n","import { __decorate } from \"tslib\";\nimport { DesignSystemProvider as FASTDesignSystemProvider, } from '@microsoft/fast-components';\nimport { attr, html } from '@microsoft/fast-element';\nimport * as tokens from '../_config/tokens';\nimport { fuiCardFillColor, fuiCardForegroundColor } from '../_config/tokens/custom';\nimport * as values from '../_config/values';\nimport { designSystemProviderStyles } from './design-system-provider.styles';\nimport { designToken, provideTokens, swatchConverter } from './design-system-provider.utils';\n/**\n * The Foundation Design System Provider\n * @public\n * @tagname %%prefix%%-design-system-provider\n */\nexport class FoundationDesignSystemProvider extends FASTDesignSystemProvider {\n constructor() {\n super();\n provideTokens(tokens, values, this);\n }\n}\n__decorate([\n attr({\n attribute: 'card-fill-color',\n converter: swatchConverter,\n }),\n designToken(fuiCardFillColor)\n], FoundationDesignSystemProvider.prototype, \"cardFillColor\", void 0);\n__decorate([\n attr({\n attribute: 'card-foreground-color',\n converter: swatchConverter,\n }),\n designToken(fuiCardForegroundColor)\n], FoundationDesignSystemProvider.prototype, \"cardForegroundColor\", void 0);\n/**\n * The Foundation Design System Provider composed element\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-design-system-provider\\>\n */\nexport const foundationDesignSystemProvider = FoundationDesignSystemProvider.compose({\n baseName: 'design-system-provider',\n template: html `\n <slot></slot>\n `,\n styles: designSystemProviderStyles,\n});\n","import { css } from '@microsoft/fast-element';\nexport const foundationDialogStyles = css `\n :host {\n --dialog-close-icon-display: flex;\n --dialog-min-width: 358px;\n --notification-details-min-height: 40px;\n }\n\n dialog[type='error'],\n dialog[type='alert'],\n dialog[type='success'] {\n padding: calc(var(--design-unit) * 2px) calc(var(--design-unit) * 4px)\n calc(var(--design-unit) * 2px) calc(var(--design-unit) * 6px);\n }\n\n dialog[type='error']::before,\n dialog[type='alert']::before,\n dialog[type='success']::before {\n content: '';\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n left: calc(var(--design-unit) * 3px - 2px);\n height: calc(100% - (var(--design-unit) * 4px));\n width: 4px;\n border-radius: 2px;\n }\n\n dialog[type='error']::before {\n background-color: var(--error-color);\n }\n\n dialog[type='alert']::before {\n background-color: var(--warning-color);\n }\n\n dialog[type='success']::before {\n background-color: var(--success-color);\n }\n\n .header-controls {\n display: flex;\n gap: calc(var(--design-unit) * 1px);\n align-items: center;\n }\n\n .close-icon {\n display: var(--dialog-close-icon-display);\n }\n\n .reset-size-icon {\n display: flex;\n }\n\n dialog {\n background-color: var(--dialog-background, var(--fill-color));\n padding: calc(var(--design-unit) * 3px);\n outline: none;\n overflow: inherit;\n z-index: var(--dialog-z-index, auto);\n }\n\n :host([position='left']) dialog {\n margin-left: 0;\n }\n\n :host([position='right']) dialog {\n margin-right: 0;\n }\n\n ::slotted(zero-divider) {\n width: 100%;\n }\n\n .top {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: calc(var(--design-unit) * 2px);\n }\n\n .title {\n margin-top: calc(var(--design-unit) * 2px);\n font-size: 14px;\n }\n\n .details {\n font-size: 12px;\n overflow: hidden;\n min-height: var(--notification-details-min-height);\n white-space: pre-line;\n }\n\n .content-container {\n box-sizing: border-box;\n }\n\n :host([resizable]) dialog {\n position: relative;\n box-sizing: border-box;\n max-width: 100%;\n max-height: 100%;\n }\n\n :host([resizable]) dialog[open] {\n display: flex;\n flex-direction: column;\n }\n\n /* Override design system max-width constraints for resizable dialogs */\n :host([resizable]) dialog .content-wrapper {\n position: relative;\n height: 100%;\n width: 100%;\n max-height: 100%;\n min-width: 100%;\n max-width: 100%;\n resize: none;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n }\n\n :host([resizable]) .content-container {\n flex: 1 1 auto;\n overflow: auto;\n min-height: 0;\n box-sizing: border-box;\n }\n\n :host([resizable]) .top,\n :host([resizable]) .bottom {\n flex: 0 0 auto;\n }\n\n :host([position='right']) dialog .content-wrapper,\n :host([position='left']) dialog .content-wrapper,\n :host([position='left']) dialog,\n :host([position='right']) dialog {\n height: 100%;\n }\n\n /* Resize handles */\n .resize-handle {\n position: absolute;\n z-index: 10;\n }\n\n /* Edge handles */\n .resize-handle-n,\n .resize-handle-s {\n left: 0;\n right: 0;\n height: 8px;\n cursor: ns-resize;\n }\n\n .resize-handle-n {\n top: 0;\n }\n\n .resize-handle-s {\n bottom: 0;\n }\n\n .resize-handle-e,\n .resize-handle-w {\n top: 0;\n bottom: 0;\n width: 8px;\n cursor: ew-resize;\n }\n\n .resize-handle-e {\n right: 0;\n }\n\n .resize-handle-w {\n left: 0;\n }\n\n /* Corner handles */\n .resize-handle-ne,\n .resize-handle-nw,\n .resize-handle-se,\n .resize-handle-sw {\n width: 16px;\n height: 16px;\n }\n\n .resize-handle-ne {\n top: 0;\n right: 0;\n cursor: nesw-resize;\n }\n\n .resize-handle-nw {\n top: 0;\n left: 0;\n cursor: nwse-resize;\n }\n\n .resize-handle-se {\n bottom: 0;\n right: 0;\n cursor: nwse-resize;\n }\n\n .resize-handle-sw {\n bottom: 0;\n left: 0;\n cursor: nesw-resize;\n }\n\n /* Visual indicator for corner handles */\n .resize-handle-se::after,\n .resize-handle-sw::after,\n .resize-handle-ne::after,\n .resize-handle-nw::after {\n content: '';\n position: absolute;\n width: 8px;\n height: 8px;\n border-style: solid;\n border-color: var(--neutral-stroke-divider-rest);\n opacity: 50%;\n transition: opacity 0.2s;\n margin: 2px;\n }\n\n .resize-handle-se::after {\n bottom: 2px;\n right: 2px;\n border-width: 0 3px 3px 0;\n }\n\n .resize-handle-sw::after {\n bottom: 2px;\n left: 2px;\n border-width: 0 0 3px 3px;\n }\n\n .resize-handle-ne::after {\n top: 2px;\n right: 2px;\n border-width: 3px 3px 0 0;\n }\n\n .resize-handle-nw::after {\n top: 2px;\n left: 2px;\n border-width: 3px 0 0 3px;\n }\n\n /* Hover effect */\n .resize-handle:hover::after {\n opacity: 100%;\n }\n\n /* Resizing state */\n dialog.resizing {\n user-select: none;\n pointer-events: auto;\n }\n\n /* Fixed positioning support for resizable dialogs */\n dialog[style*='position: fixed'] {\n margin: 0;\n }\n`;\n","import { whenElse } from '@genesislcap/foundation-utils';\nimport { html, ref, repeat, when } from '@microsoft/fast-element';\nimport { getPrefix } from '../utils';\nconst contentAndPlaceholer = html `\n <slot>\n ${when((x) => x.notification, html `\n <div class=\"details\">\n ${(x) => { var _a; return ((_a = x.notification) === null || _a === void 0 ? void 0 : _a.body) || 'Place holder for notification message'; }}\n </div>\n `)}\n </slot>\n`;\nexport const getDialogTemplate = (prefix) => html `\n <dialog ${ref('mainElement')} part=\"dialog\" type=${(x) => x.type}>\n <div class=\"content-wrapper\" part=\"content\">\n <div part=\"top\" class=\"top\" ${ref('topElement')}>\n <slot name=\"top\" ${ref('topElementSlot')}>\n <h2 slot=\"top\" class=\"title\">${(x) => { var _a; return (_a = x.notification) === null || _a === void 0 ? void 0 : _a.title; }}</h2>\n </slot>\n <div class=\"header-controls\">\n ${when((x) => x.resizable, html `\n <${prefix}-button class=\"reset-size-icon\" part=\"reset-size-icon\" aria-label=\"reset size\" appearance=\"stealth\" @click=${(x) => x.resetSize()}>\n <${prefix}-icon name=\"${(x) => x.resizeIconName}\"></${prefix}-icon>\n </${prefix}-button>\n `)}\n ${when((x) => x.showCloseIcon, html `\n <${prefix}-button class=\"close-icon\" part=\"close-icon\" aria-label=\"close\" appearance=\"stealth\" @click=${(x) => x.close()}>\n <${prefix}-icon name=\"times\" size=\"lg\"></${prefix}-icon>\n </${prefix}-button>\n `)}\n </div>\n </div>\n ${whenElse((x) => x.resizable, html `\n <div class=\"content-container\" part=\"content-container\">${contentAndPlaceholer}</div>\n `, contentAndPlaceholer)}\n <div part=\"bottom\" class=\"bottom\">\n <slot name=\"bottom\">\n ${when((x) => x.notification, html `\n <${prefix}-button appearance=\"lightweight\" @click=${(x) => {\n x.dismiss();\n}}>\n ${(x) => { var _a, _b, _c, _d; return ((_d = (_c = (_b = (_a = x.notification) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.dialog) === null || _c === void 0 ? void 0 : _c.dismissingAction) === null || _d === void 0 ? void 0 : _d.label) || 'Ignore'; }}\n </${prefix}-button>\n `)}\n ${repeat((x) => { var _a, _b; return (_b = (_a = x.notification) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.dialog.confirmingActions; }, html `\n <${prefix}-button\n appearance=\"lightweight\"\n @click=${(x, c) => {\n x === null || x === void 0 ? void 0 : x.action();\n c.parent.closeDialog();\n}}\n >\n ${(x) => x.label}\n </${prefix}-button>\n `)}\n </slot>\n </div>\n </div>\n ${when((x) => x.resizable, html `\n <div class=\"resize-handle resize-handle-n\" data-direction=\"n\"></div>\n <div class=\"resize-handle resize-handle-s\" data-direction=\"s\"></div>\n <div class=\"resize-handle resize-handle-e\" data-direction=\"e\"></div>\n <div class=\"resize-handle resize-handle-w\" data-direction=\"w\"></div>\n <div class=\"resize-handle resize-handle-ne\" data-direction=\"ne\"></div>\n <div class=\"resize-handle resize-handle-nw\" data-direction=\"nw\"></div>\n <div class=\"resize-handle resize-handle-se\" data-direction=\"se\"></div>\n <div class=\"resize-handle resize-handle-sw\" data-direction=\"sw\"></div>\n `)}\n </dialog>\n`;\nexport const foundationDialogTemplate = html `\n ${(x) => getDialogTemplate(getPrefix(x))}\n`;\n","import { __decorate } from \"tslib\";\nimport { attr, observable, volatile } from '@microsoft/fast-element';\nimport { FoundationElement } from '@microsoft/fast-foundation';\nimport dialogPolyfill from 'dialog-polyfill';\nimport { logger } from '../utils';\nimport { foundationDialogStyles as styles } from './dialog.styles';\nimport { foundationDialogTemplate as template } from './dialog.template';\n/**\n * Focus trapping will be addressed as part of https://genesisglobal.atlassian.net/browse/FUI-2083\n */\nconst MIN_WIDTH = 300;\nconst MIN_HEIGHT = 200;\n// explicitly declaring for extensibility\nexport const foundationDialogShadowOptions = {\n mode: 'open',\n delegatesFocus: true,\n};\nexport const defaultDialogConfig = {};\nexport class DialogElement extends FoundationElement {\n constructor() {\n super(...arguments);\n this.type = 'default';\n this.position = 'center';\n /**\n * Whether or not to show the close icon\n */\n this.showCloseIcon = true;\n /**\n * Whether or not the dialog is resizable\n */\n this.resizable = false;\n /**\n * Minimum width for the dialog\n */\n this.minWidth = MIN_WIDTH;\n /**\n * Minimum height for the dialog\n */\n this.minHeight = MIN_HEIGHT;\n // Resize state\n this.isResizing = false;\n this.currentResizeHandle = null;\n this.startX = 0;\n this.startY = 0;\n this.startWidth = 0;\n this.startHeight = 0;\n this.startLeft = 0;\n this.startTop = 0;\n this.resizeOffsetX = 0;\n this.resizeOffsetY = 0;\n // Original size tracking for reset\n this.originalWidth = '';\n this.originalHeight = '';\n this.originalPosition = '';\n this.originalLeft = '';\n this.originalTop = '';\n this.originalMargin = '';\n // Maximize state tracking\n this.isMaximized = false;\n this.hasBeenResized = false;\n }\n notificationChanged() {\n if (this.notification)\n this.showCloseIcon = false;\n }\n connectedCallback() {\n super.connectedCallback();\n if (!window['HTMLDialogElement']) {\n dialogPolyfill.registerDialog(this.mainElement);\n }\n this.mainElement.addEventListener('close', () => {\n if (this.onCloseCallback)\n this.onCloseCallback();\n this.$emit('close');\n });\n if (this.hasAttribute('open')) {\n this.shadowRoot.querySelector('dialog').setAttribute('open', '');\n }\n // Set up resize handlers\n this.setupResizeHandlers();\n }\n disconnectedCallback() {\n super.disconnectedCallback();\n this.removeResizeHandlers();\n }\n setupResizeHandlers() {\n if (!this.resizable)\n return;\n // Get viewport dimensions\n const viewportWidth = window.innerWidth;\n const viewportHeight = window.innerHeight;\n // Calculate effective initial dimensions, ensuring they don't exceed viewport\n // and are at least the minimum values\n let effectiveWidth = this.minWidth;\n let effectiveHeight = this.minHeight;\n if (this.initialWidth !== undefined) {\n // Ensure initial width doesn't exceed viewport width and is at least minWidth\n effectiveWidth = Math.max(this.minWidth, Math.min(this.initialWidth, viewportWidth));\n }\n if (this.initialHeight !== undefined) {\n // Ensure initial height doesn't exceed viewport height and is at least minHeight\n effectiveHeight = Math.max(this.minHeight, Math.min(this.initialHeight, viewportHeight));\n }\n // Store original dimensions and position for reset\n this.originalWidth = this.mainElement.style.width || `${effectiveWidth}px`;\n this.originalHeight = this.mainElement.style.height || `${effectiveHeight}px`;\n this.originalPosition = this.mainElement.style.position || '';\n this.originalLeft = this.mainElement.style.left || '';\n this.originalTop = this.mainElement.style.top || '';\n this.originalMargin = this.mainElement.style.margin || '';\n // Set the dialog dimensions\n this.mainElement.style.height = `${effectiveHeight}px`;\n this.mainElement.style.minHeight = `${this.minHeight}px`;\n this.mainElement.style.width = `${effectiveWidth}px`;\n this.mainElement.style.minWidth = `${this.minWidth}px`;\n // Update original values after setting initial size\n this.originalWidth = this.mainElement.style.width;\n this.originalHeight = this.mainElement.style.height;\n // Add event listeners for resize handles\n const handles = this.shadowRoot.querySelectorAll('.resize-handle');\n handles.forEach((handle) => {\n handle.addEventListener('mousedown', this.handleResizeStart.bind(this));\n handle.addEventListener('dblclick', this.handleEdgeDoubleClick.bind(this));\n });\n }\n removeResizeHandlers() {\n var _a;\n document.removeEventListener('mousemove', this.handleResizeMove.bind(this));\n document.removeEventListener('mouseup', this.handleResizeEnd.bind(this));\n // Remove double-click listeners from handles\n const handles = (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll('.resize-handle');\n handles === null || handles === void 0 ? void 0 : handles.forEach((handle) => {\n handle.removeEventListener('dblclick', this.handleEdgeDoubleClick.bind(this));\n });\n }\n handleEdgeDoubleClick(e) {\n if (!this.resizable)\n return;\n e.preventDefault();\n e.stopPropagation();\n const target = e.target;\n const direction = target.dataset.direction;\n // Only handle edge directions (not corners)\n if (!['n', 's', 'e', 'w'].includes(direction))\n return;\n const rect = this.mainElement.getBoundingClientRect();\n const viewportWidth = window.innerWidth;\n const viewportHeight = window.innerHeight;\n // Convert to fixed positioning if not already\n this.mainElement.style.position = 'fixed';\n this.mainElement.style.margin = '0';\n switch (direction) {\n case 'n': // North - expand to top\n this.mainElement.style.height = `${rect.bottom}px`;\n this.mainElement.style.top = '0px';\n break;\n case 's': // South - expand to bottom\n this.mainElement.style.height = `${viewportHeight - rect.top}px`;\n break;\n case 'e': // East - expand to right\n this.mainElement.style.width = `${viewportWidth - rect.left}px`;\n break;\n case 'w': // West - expand to left\n this.mainElement.style.width = `${rect.right}px`;\n this.mainElement.style.left = '0px';\n break;\n }\n // Mark as resized since dimensions changed\n this.hasBeenResized = true;\n this.$emit('resize', {\n width: this.mainElement.offsetWidth,\n height: this.mainElement.offsetHeight,\n });\n }\n handleResizeStart(e) {\n if (!this.resizable)\n return;\n e.preventDefault();\n e.stopPropagation();\n this.isResizing = true;\n const target = e.target;\n this.currentResizeHandle = target.dataset.direction;\n this.startX = e.clientX;\n this.startY = e.clientY;\n const rect = this.mainElement.getBoundingClientRect();\n this.startWidth = rect.width;\n this.startHeight = rect.height;\n this.startLeft = rect.left;\n this.startTop = rect.top;\n // Calculate offset from click position to actual edge\n // This prevents the initial \"jump\" when starting to drag\n this.resizeOffsetX = 0;\n this.resizeOffsetY = 0;\n switch (this.currentResizeHandle) {\n case 'n':\n this.resizeOffsetY = e.clientY - rect.top;\n break;\n case 's':\n this.resizeOffsetY = e.clientY - rect.bottom;\n break;\n case 'e':\n this.resizeOffsetX = e.clientX - rect.right;\n break;\n case 'w':\n this.resizeOffsetX = e.clientX - rect.left;\n break;\n case 'ne':\n this.resizeOffsetX = e.clientX - rect.right;\n this.resizeOffsetY = e.clientY - rect.top;\n break;\n case 'nw':\n this.resizeOffsetX = e.clientX - rect.left;\n this.resizeOffsetY = e.clientY - rect.top;\n break;\n case 'se':\n this.resizeOffsetX = e.clientX - rect.right;\n this.resizeOffsetY = e.clientY - rect.bottom;\n break;\n case 'sw':\n this.resizeOffsetX = e.clientX - rect.left;\n this.resizeOffsetY = e.clientY - rect.bottom;\n break;\n }\n // Convert to fixed positioning to allow precise position control\n this.mainElement.style.position = 'fixed';\n this.mainElement.style.left = `${rect.left}px`;\n this.mainElement.style.top = `${rect.top}px`;\n this.mainElement.style.margin = '0';\n // Add document-level listeners for smooth resizing\n document.addEventListener('mousemove', this.handleResizeMove.bind(this));\n document.addEventListener('mouseup', this.handleResizeEnd.bind(this));\n // Add resizing class for styling\n this.mainElement.classList.add('resizing');\n }\n // eslint-disable-next-line complexity\n handleResizeMove(e) {\n if (!this.isResizing || !this.currentResizeHandle)\n return;\n e.preventDefault();\n // Apply the offset to eliminate initial jump\n const deltaX = e.clientX - this.startX - this.resizeOffsetX;\n const deltaY = e.clientY - this.startY - this.resizeOffsetY;\n let newWidth = this.startWidth;\n let newHeight = this.startHeight;\n let newLeft = this.startLeft;\n let newTop = this.startTop;\n let shouldUpdatePosition = false;\n // Calculate new dimensions and positions based on resize handle direction\n switch (this.currentResizeHandle) {\n case 'se': // bottom-right\n newWidth = this.startWidth + deltaX;\n newHeight = this.startHeight + deltaY;\n break;\n case 'sw': // bottom-left\n newWidth = this.startWidth - deltaX;\n newHeight = this.startHeight + deltaY;\n newLeft = this.startLeft + deltaX;\n shouldUpdatePosition = true;\n break;\n case 'ne': // top-right\n newWidth = this.startWidth + deltaX;\n newHeight = this.startHeight - deltaY;\n newTop = this.startTop + deltaY;\n shouldUpdatePosition = true;\n break;\n case 'nw': // top-left\n newWidth = this.startWidth - deltaX;\n newHeight = this.startHeight - deltaY;\n newLeft = this.startLeft + deltaX;\n newTop = this.startTop + deltaY;\n shouldUpdatePosition = true;\n break;\n case 'e': // right\n newWidth = this.startWidth + deltaX;\n break;\n case 'w': // left\n newWidth = this.startWidth - deltaX;\n newLeft = this.startLeft + deltaX;\n shouldUpdatePosition = true;\n break;\n case 's': // bottom\n newHeight = this.startHeight + deltaY;\n break;\n case 'n': // top\n newHeight = this.startHeight - deltaY;\n newTop = this.startTop + deltaY;\n shouldUpdatePosition = true;\n break;\n }\n // Get viewport dimensions\n const viewportWidth = window.innerWidth;\n const viewportHeight = window.innerHeight;\n // Apply minimum constraints only when resizable\n if (this.resizable) {\n // Apply minimum width constraint and adjust position if needed\n if (newWidth < this.minWidth) {\n const widthDiff = this.minWidth - newWidth;\n newWidth = this.minWidth;\n // If resizing from left edge, maintain the right edge position\n if (this.currentResizeHandle.includes('w')) {\n newLeft = newLeft - widthDiff;\n }\n }\n // Apply minimum height constraint and adjust position if needed\n if (newHeight < this.minHeight) {\n const heightDiff = this.minHeight - newHeight;\n newHeight = this.minHeight;\n // If resizing from top edge, maintain the bottom edge position\n if (this.currentResizeHandle.includes('n')) {\n newTop = newTop - heightDiff;\n }\n }\n // Apply viewport boundary constraints\n // Prevent resizing beyond the right edge of viewport\n if (this.currentResizeHandle.includes('e')) {\n const maxWidth = viewportWidth - this.startLeft;\n if (newWidth > maxWidth) {\n newWidth = maxWidth;\n }\n }\n // Prevent resizing beyond the bottom edge of viewport\n if (this.currentResizeHandle.includes('s')) {\n const maxHeight = viewportHeight - this.startTop;\n if (newHeight > maxHeight) {\n newHeight = maxHeight;\n }\n }\n // Prevent resizing beyond the left edge of viewport\n if (this.currentResizeHandle.includes('w')) {\n // Ensure left position doesn't go negative\n if (newLeft < 0) {\n newWidth = newWidth + newLeft; // Reduce width by the negative offset\n newLeft = 0;\n }\n // Also ensure we don't exceed the available width from new position\n const maxWidthFromLeft = viewportWidth - newLeft;\n if (newWidth > maxWidthFromLeft) {\n newWidth = maxWidthFromLeft;\n }\n }\n // Prevent resizing beyond the top edge of viewport\n if (this.currentResizeHandle.includes('n')) {\n // Ensure top position doesn't go negative\n if (newTop < 0) {\n newHeight = newHeight + newTop; // Reduce height by the negative offset\n newTop = 0;\n }\n // Also ensure we don't exceed the available height from new position\n const maxHeightFromTop = viewportHeight - newTop;\n if (newHeight > maxHeightFromTop) {\n newHeight = maxHeightFromTop;\n }\n }\n }\n // Apply new dimensions\n this.mainElement.style.width = `${newWidth}px`;\n this.mainElement.style.height = `${newHeight}px`;\n // Always update position when using handles that move edges\n if (shouldUpdatePosition) {\n this.mainElement.style.left = `${newLeft}px`;\n this.mainElement.style.top = `${newTop}px`;\n }\n }\n handleResizeEnd(e) {\n if (!this.isResizing)\n return;\n e.preventDefault();\n this.isResizing = false;\n this.currentResizeHandle = null;\n this.resizeOffsetX = 0;\n this.resizeOffsetY = 0;\n // Remove document-level listeners\n document.removeEventListener('mousemove', this.handleResizeMove.bind(this));\n document.removeEventListener('mouseup', this.handleResizeEnd.bind(this));\n // Remove resizing class\n this.mainElement.classList.remove('resizing');\n // Mark as resized if dimensions changed from original\n const currentWidth = this.mainElement.style.width;\n const currentHeight = this.mainElement.style.height;\n if (currentWidth !== this.originalWidth || currentHeight !== this.originalHeight) {\n this.hasBeenResized = true;\n }\n this.$emit('resize', {\n width: this.mainElement.offsetWidth,\n height: this.mainElement.offsetHeight,\n });\n }\n /**\n * Determine if the dialog is showing or closed.\n */\n get open() {\n return this.mainElement.hasAttribute('open');\n }\n /**\n * Get the appropriate icon name for the resize button\n */\n get resizeIconName() {\n return this.hasBeenResized || this.isMaximized ? 'compress' : 'expand';\n }\n /**\n * Remove the HTMLDialogElement from display\n */\n close() {\n this.mainElement['close']();\n }\n /**\n * Dismiss the Dialog from display and calls the dismissing action.\n */\n dismiss() {\n var _a, _b, _c, _d;\n if ((_d = (_c = (_b = (_a = this.notification) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.dialog) === null || _c === void 0 ? void 0 : _c.dismissingAction) === null || _d === void 0 ? void 0 : _d.action) {\n this.notification.config.dialog.dismissingAction.action();\n }\n this.closeDialog();\n }\n /**\n * Dismiss the Dialog from display.\n */\n closeDialog() {\n try {\n this.mainElement.close();\n this.remove();\n }\n catch (e) {\n logger.error(e);\n }\n }\n /**\n * Maximize the dialog to fill the viewport.\n * @private\n */\n maximize() {\n if (!this.resizable || !this.mainElement)\n return;\n // Convert to fixed positioning for full viewport control\n this.mainElement.style.position = 'fixed';\n this.mainElement.style.left = '0px';\n this.mainElement.style.top = '0px';\n this.mainElement.style.margin = '0';\n this.mainElement.style.width = '100vw';\n this.mainElement.style.height = '100vh';\n this.isMaximized = true;\n this.hasBeenResized = true;\n this.$emit('resize', {\n width: this.mainElement.offsetWidth,\n height: this.mainElement.offsetHeight,\n });\n }\n /**\n * Reset the dialog to its original size and position, or maximize if not resized.\n * @public\n */\n resetSize() {\n if (!this.resizable || !this.mainElement)\n return;\n // If dialog hasn't been resized, maximize it\n if (!this.hasBeenResized && !this.isMaximized) {\n this.maximize();\n return;\n }\n // Otherwise, reset to original size\n this.mainElement.style.width = this.originalWidth;\n this.mainElement.style.height = this.originalHeight;\n this.mainElement.style.position = this.originalPosition;\n this.mainElement.style.left = this.originalLeft;\n this.mainElement.style.top = this.originalTop;\n this.mainElement.style.margin = this.originalMargin;\n this.isMaximized = false;\n this.hasBeenResized = false;\n this.$emit('resize', {\n width: this.mainElement.offsetWidth,\n height: this.mainElement.offsetHeight,\n });\n }\n}\n__decorate([\n observable\n], DialogElement.prototype, \"notification\", void 0);\n__decorate([\n attr({ attribute: 'type' })\n], DialogElement.prototype, \"type\", void 0);\n__decorate([\n attr\n], DialogElement.prototype, \"position\", void 0);\n__decorate([\n attr({ mode: 'boolean', attribute: 'show-close-icon' })\n], DialogElement.prototype, \"showCloseIcon\", void 0);\n__decorate([\n attr({ mode: 'boolean', attribute: 'resizable' })\n], DialogElement.prototype, \"resizable\", void 0);\n__decorate([\n attr({ attribute: 'min-width' })\n], DialogElement.prototype, \"minWidth\", void 0);\n__decorate([\n attr({ attribute: 'min-height' })\n], DialogElement.prototype, \"minHeight\", void 0);\n__decorate([\n attr({ attribute: 'initial-width' })\n], DialogElement.prototype, \"initialWidth\", void 0);\n__decorate([\n attr({ attribute: 'initial-height' })\n], DialogElement.prototype, \"initialHeight\", void 0);\n__decorate([\n observable\n], DialogElement.prototype, \"onShowCallback\", void 0);\n__decorate([\n observable\n], DialogElement.prototype, \"onCloseCallback\", void 0);\n__decorate([\n observable\n], DialogElement.prototype, \"isMaximized\", void 0);\n__decorate([\n observable\n], DialogElement.prototype, \"hasBeenResized\", void 0);\n__decorate([\n volatile\n], DialogElement.prototype, \"open\", null);\n__decorate([\n volatile\n], DialogElement.prototype, \"resizeIconName\", null);\n/**\n * @tagname %%prefix%%-dialog\n */\nexport class Dialog extends DialogElement {\n show() {\n if (this.onShowCallback)\n this.onShowCallback();\n this.mainElement['show']();\n }\n}\n/**\n * The Foundation Dialog\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-dialog\\>\n */\nexport const foundationDialog = Dialog.compose(Object.assign({ baseName: 'dialog', styles,\n template, shadowOptions: foundationDialogShadowOptions }, defaultDialogConfig));\n","import { disclosureTemplate as fastDisclosureTemplate } from '@microsoft/fast-foundation';\nexport const foundationDisclosureTemplate = (context, definition) => fastDisclosureTemplate(context, definition);\n","import { disclosureStyles as fastDisclosureStyles } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationDisclosureStyles = (context, definition) => css `\n ${fastDisclosureStyles(context, definition)}\n`;\n","import { Disclosure as FASTDisclosure } from '@microsoft/fast-foundation';\nimport { foundationDisclosureStyles as styles } from './disclosure.styles';\nimport { foundationDisclosureTemplate as template } from './disclosure.template';\n/**\n * @tagname %%prefix%%-disclosure\n */\nexport class Disclosure extends FASTDisclosure {\n}\n// explicitly declaring for extensibility\nexport const foundationDisclosureShadowOptions = undefined;\nexport const defaultDisclosureConfig = {};\n/**\n * The Foundation Disclosure\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-disclosure\\>\n */\nexport const foundationDisclosure = Disclosure.compose(Object.assign({ baseName: 'disclosure', template,\n styles, shadowOptions: foundationDisclosureShadowOptions }, defaultDisclosureConfig));\n","import { dividerTemplate as fastDividerTemplate } from '@microsoft/fast-foundation';\nexport const foundationDividerTemplate = (context, definition) => fastDividerTemplate(context, definition);\n","import { dividerStyles as fastDividerStyles } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationDividerStyles = (context, definition) => css `\n ${fastDividerStyles(context, definition)}\n`;\n","import { Divider as FASTDivider } from '@microsoft/fast-foundation';\nimport { foundationDividerStyles as styles } from './divider.styles';\nimport { foundationDividerTemplate as template } from './divider.template';\n/**\n * @tagname %%prefix%%-divider\n */\nexport class Divider extends FASTDivider {\n}\n// explicitly declaring for extensibility\nexport const foundationDividerShadowOptions = undefined;\nexport const defaultDividerConfig = {};\n/**\n * The Foundation Divider\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-divider\\>\n */\nexport const foundationDivider = Divider.compose(Object.assign({ baseName: 'divider', template,\n styles, shadowOptions: foundationDividerShadowOptions }, defaultDividerConfig));\n","import { css } from '@microsoft/fast-element';\nexport const dropdownMenuBaseStyles = (prefix, context, definition) => css `\n :host {\n --dropdown-opener-height-multiplier: 0.7px;\n --menu-item-height-multiplier: 0.7px;\n }\n\n .actions-menu {\n display: inline-flex;\n flex-direction: column;\n max-height: calc(\n var(--max-height) -\n ((var(--base-height-multiplier) + var(--density)) * var(--design-unit) * 1px)\n );\n position: absolute;\n z-index: 1;\n gap: calc(var(--design-unit) * 1px);\n }\n\n .hidden {\n display: none;\n }\n\n .actions-opener {\n display: flex;\n justify-content: center;\n height: calc(\n (var(--base-height-multiplier) + var(--density)) * var(--design-unit) *\n var(--dropdown-opener-height-multiplier)\n );\n max-width: 120px;\n }\n\n ${prefix}-menu-item {\n display: flex;\n user-select: none;\n }\n\n ${prefix}-menu-item::part(content) {\n margin-inline: 5px;\n }\n\n ${prefix}-menu-item::part(expand-collapse-glyph-container) {\n margin-inline-end: 5px;\n }\n\n ${prefix}-menu-item::part(expand-collapse) {\n margin-inline-start: 5px;\n }\n\n ${prefix}-menu-item[disabled] {\n pointer-events: none;\n }\n\n ${prefix}-icon {\n padding-left: 5px;\n }\n\n .menu-item {\n max-height: calc(\n (var(--base-height-multiplier) + var(--density)) * var(--design-unit) *\n var(--menu-item-height-multiplier)\n );\n }\n`;\nexport const foundationDropdownMenuStyles = (context, definition) => css `\n ${dropdownMenuBaseStyles('foundation', context, definition)}\n`;\n","import { html, ref, repeat, when } from '@microsoft/fast-element';\nimport { getPrefix } from '../utils/dom';\nexport const extractMenuItems = (items, prefix) => html `\n ${repeat(() => items, html `\n ${when((x) => x.isDisabled && x.isDisabled(), html `\n <${prefix}-menu-item class=\"menu-item\" disabled>${(x) => x.name}</${prefix}-menu-item>\n `)}\n ${when((x) => !x.isDisabled || !x.isDisabled(), html `\n <${prefix}-menu-item\n class=\"menu-item\"\n @click=${(x) => (!x.submenu ? x.callback() : '')}\n style=\"${(x) => (x.color ? `color: ${x.color};` : '')}\"\n >\n ${when((x) => x.icon, html `\n <${prefix}-icon\n name=${(x) => x.icon.name}\n size=${(x) => x.icon.size}\n variant=${(x) => x.icon.variant}\n slot=\"start\"\n ></${prefix}-icon>\n `)}\n ${(x) => x.name}\n ${when((x) => x.submenu, html `\n <${prefix}-menu>${(x) => extractMenuItems(x.submenu, prefix)}</${prefix}-menu>\n `)}\n </${prefix}-menu-item>\n `)}\n `)}\n`;\nexport const getDropdownMenuTemplate = (prefix) => html `\n <div class=\"actions-container\" part=\"actions-container\">\n <${prefix}-button\n id=\"actiosnMenuTrigger\"\n class=\"actions-opener\"\n appearance=\"${(x) => x.buttonAppearance}\"\n part=\"actions-opener\"\n @click=${(x) => x.toggleDropdownMenuVisibility()}\n :disabled=${(x) => x.disabled}\n >\n <slot>${(x) => x.name}</slot>\n </${prefix}-button>\n <${prefix}-menu\n ${ref('dropdownMenu')}\n class=\"actions-menu ${(x) => x.classNames}\"\n part=\"actions-menu\"\n >\n ${(x) => extractMenuItems(x.allItems, prefix)}\n </${prefix}-menu>\n </div>\n`;\nexport const foundationDropdownMenuTemplate = html `\n ${(x) => getDropdownMenuTemplate(getPrefix(x))}\n`;\n","import { __decorate } from \"tslib\";\nimport { attr, observable } from '@microsoft/fast-element';\nimport { FoundationElement } from '@microsoft/fast-foundation';\nimport { classNames } from '@microsoft/fast-web-utilities';\nimport { wasClickOutsideElement } from '../utils';\nimport { foundationDropdownMenuStyles as styles } from './dropdown-menu.styles';\nimport { foundationDropdownMenuTemplate as template } from './dropdown-menu.template';\n/**\n * @tagname %%prefix%%-dropdown-menu\n */\nexport class DropdownMenu extends FoundationElement {\n constructor() {\n super(...arguments);\n this.autoClose = true;\n this.disabled = false;\n this.name = 'Dropdown Menu';\n this.open = false;\n this.clickOutside = (e) => this.handleClickOutside(e);\n }\n connectedCallback() {\n super.connectedCallback();\n this.addEventListener('onMenuClick', this.onDropdownMenuItemClick);\n }\n disconnectedCallback() {\n super.disconnectedCallback();\n document.removeEventListener('mousedown', this.clickOutside);\n }\n handleClickOutside(event) {\n if (wasClickOutsideElement(event, this)) {\n this.open = false;\n }\n }\n openChanged() {\n this.classNames = classNames(['hidden', !this.open]);\n if (this.open) {\n document.addEventListener('mousedown', this.clickOutside);\n }\n else {\n document.removeEventListener('mousedown', this.clickOutside);\n }\n }\n toggleDropdownMenuVisibility() {\n this.open = !this.open;\n }\n onDropdownMenuItemClick() {\n if (this.autoClose)\n this.open = false;\n }\n get allItems() {\n return this.items;\n }\n}\n__decorate([\n observable\n], DropdownMenu.prototype, \"items\", void 0);\n__decorate([\n attr({ attribute: 'auto-close', mode: 'boolean' })\n], DropdownMenu.prototype, \"autoClose\", void 0);\n__decorate([\n attr({ attribute: 'disable-button', mode: 'boolean' })\n], DropdownMenu.prototype, \"disabled\", void 0);\n__decorate([\n observable\n], DropdownMenu.prototype, \"classNames\", void 0);\n__decorate([\n attr\n], DropdownMenu.prototype, \"name\", void 0);\n__decorate([\n attr({ attribute: 'open', mode: 'boolean' })\n], DropdownMenu.prototype, \"open\", void 0);\n__decorate([\n attr\n], DropdownMenu.prototype, \"buttonAppearance\", void 0);\n/**\n * The Foundation Dropdown Menu\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-dropdown-menu\\>\n */\nexport const foundationDropdownMenu = DropdownMenu.compose({\n baseName: 'dropdown-menu',\n styles,\n template,\n});\n","import { css } from '@microsoft/fast-element';\nexport const environmentIndicatorStyles = css `\n .environment-indicator {\n font-size: 12px;\n display: inline-flex;\n align-items: center;\n gap: calc(var(--design-unit) * 1.4px);\n border-radius: calc(var(--design-unit) * 1px);\n height: calc(var(--design-unit) * 6px);\n padding: calc(var(--design-unit) * 0.5px) calc(var(--design-unit) * 2px);\n line-height: 1;\n font-weight: 600;\n text-transform: uppercase;\n }\n\n .environment-indicator.lg {\n border-radius: calc(var(--design-unit) * 4px);\n padding: calc(var(--design-unit) * 1px) calc(var(--design-unit) * 3.5px);\n font-size: calc(var(--design-unit) * 4px);\n }\n\n .environment-indicator .icon {\n font-size: calc(var(--design-unit) * 3px);\n }\n\n .environment-indicator.lg .icon {\n font-size: calc(var(--design-unit) * 3.5px);\n }\n`;\n","import { html, when } from '@microsoft/fast-element';\nimport { getPrefix } from '../utils';\nconst getPrefixedEnvironmentIndicatorTemplate = (prefix) => html `\n ${when((x) => x.config, html `\n <div\n data-test-id=\"environment-indicator\"\n part=\"environment-indicator\"\n class=\"environment-indicator ${({ config }) => config.size}\"\n style=\"${({ config }) => `color: ${config.textColor}; background: ${config.backgroundColor}`}\"\n aria-label=\"Environment indicator: ${({ config }) => config.label}\"\n title=\"Environment: ${({ config }) => config.label}\"\n >\n ${when(({ config }) => config.showIcon && config.icon, html `\n <${prefix}-icon\n name=\"${({ config }) => config.icon}\"\n size=\"${({ config }) => config.iconSize}\"\n aria-hidden=\"true\"\n class=\"icon\"\n ></${prefix}-icon>\n `)}\n <span data-test-id=\"environment-indicator-text\" aria-label=\"Environment label\">\n ${({ config }) => config.label}\n </span>\n </div>\n `)}\n`;\nexport const foundationEnvironmentIndicatorTemplate = html `\n ${(x) => getPrefixedEnvironmentIndicatorTemplate(getPrefix(x))}\n`;\n","import { __awaiter } from \"tslib\";\nimport { createObserver } from '@genesislcap/foundation-utils';\nimport { DI, Registration } from '@microsoft/fast-foundation';\n/**\n * Default environment level\n */\nexport const DEFAULT_ENVIRONMENT_LEVEL = 'default';\n/**\n * Default environment level configuration\n */\nexport const DEFAULT_ENVIRONMENT_LEVEL_CONFIG = {\n level: DEFAULT_ENVIRONMENT_LEVEL,\n showIcon: false,\n iconSize: 'sm',\n backgroundColor: '#2222ff',\n textColor: '#ffffff',\n label: 'DEFAULT',\n};\n/**\n * Default environment configurations\n */\nexport const DEFAULT_ENVIRONMENT_CONFIGS = [\n DEFAULT_ENVIRONMENT_LEVEL_CONFIG,\n {\n level: 'dev',\n showIcon: false,\n icon: 'code',\n backgroundColor: '#ff6b35',\n label: 'DEV',\n },\n {\n level: 'prod',\n showIcon: false,\n icon: 'check-circle',\n backgroundColor: '#28a745',\n label: 'PROD',\n },\n];\n// Global singleton observer\nexport const EnvironmentIndicatorConfigObserver = createObserver();\n// DI token for the observer\nexport const EnvironmentIndicatorConfigObserverToken = DI.createInterface((x) => x.instance(EnvironmentIndicatorConfigObserver), (configurator) => configurator.instance(EnvironmentIndicatorConfigObserver));\n// DI token for the current configuration value\nexport const EnvironmentIndicatorConfigToken = DI.createInterface('EnvironmentIndicatorConfig');\n/**\n * Configure the environment indicator\n * @param options - the options to configure the environment indicator\n */\nexport function configureEnvironmentIndicator() {\n return __awaiter(this, arguments, void 0, function* (options = { configs: [] }) {\n const { configs, currentLevel } = options;\n const value = {\n currentLevel,\n configs: configs && configs.length > 0 ? configs : [DEFAULT_ENVIRONMENT_LEVEL_CONFIG],\n };\n const container = DI.getOrCreateDOMContainer();\n container.register(Registration.instance(EnvironmentIndicatorConfigObserverToken, EnvironmentIndicatorConfigObserver), Registration.instance(EnvironmentIndicatorConfigToken, value));\n EnvironmentIndicatorConfigObserver.publish(value);\n });\n}\n/**\n * Get the current environment indicator configuration from DI\n * @returns the current configuration or default if not found\n */\nexport function getCurrentEnvironmentIndicatorConfig() {\n try {\n const container = DI.getOrCreateDOMContainer();\n const config = container.get(EnvironmentIndicatorConfigToken);\n if (config) {\n return config;\n }\n }\n catch (error) {\n return undefined;\n }\n}\n","import { createLogger } from '@genesislcap/foundation-logger';\nexport const environmentIndicatorLogger = createLogger('EnvironmentIndicator');\n","import { __decorate } from \"tslib\";\nimport { ENVIRONMENT_LEVEL } from '@genesislcap/foundation-utils';\nimport { attr, observable } from '@microsoft/fast-element';\nimport { DI, FoundationElement } from '@microsoft/fast-foundation';\nimport { environmentIndicatorStyles as styles } from './environment-indicator.styles';\nimport { foundationEnvironmentIndicatorTemplate as template } from './environment-indicator.template';\nimport { DEFAULT_ENVIRONMENT_CONFIGS, DEFAULT_ENVIRONMENT_LEVEL, DEFAULT_ENVIRONMENT_LEVEL_CONFIG, EnvironmentIndicatorConfigObserverToken, getCurrentEnvironmentIndicatorConfig, } from './utils/configure';\nimport { environmentIndicatorLogger } from './utils/logger';\n/**\n * @tagname %%prefix%%-environment-indicator\n * @description Displays an environment indicator with a label and an icon\n * @public\n */\nexport class EnvironmentIndicator extends FoundationElement {\n constructor() {\n super(...arguments);\n /**\n * @attr size - the size of the indicator. Can be 'sm' or 'lg'\n */\n this.size = 'sm';\n /**\n * @attr text-color - the text color of the indicator\n */\n this.textColor = '#ffffff';\n /**\n * @attr icon - the icon to display\n */\n this.icon = 'check-circle';\n /**\n * @attr icon-size - the size of the icon\n */\n this.iconSize = 'sm';\n /**\n * @attr use-default-config - whether to use the default config\n */\n this.useDefaultConfig = false;\n /**\n * Current environment configuration\n */\n this.config = DEFAULT_ENVIRONMENT_LEVEL_CONFIG;\n /**\n * Environment configurations\n */\n this.envConfigs = DEFAULT_ENVIRONMENT_CONFIGS;\n }\n envConfigsChanged() {\n this.config = this.getEnvConfigByLevel();\n }\n diConfigChanged() {\n this.config = this.getEnvConfigByLevel();\n }\n subscribeToDiConfig() {\n const container = DI.getOrCreateDOMContainer();\n const observer = container.get(EnvironmentIndicatorConfigObserverToken);\n if (observer && typeof observer.subscribe === 'function') {\n this.unsubscribeConfig = observer.subscribe((configFromDi) => {\n this.diConfig = configFromDi;\n });\n }\n else {\n environmentIndicatorLogger.error('Observer not found or invalid in DI container');\n }\n }\n connectedCallback() {\n super.connectedCallback();\n this.diConfig = getCurrentEnvironmentIndicatorConfig();\n this.subscribeToDiConfig();\n this.config = this.getEnvConfigByLevel();\n }\n disconnectedCallback() {\n super.disconnectedCallback();\n if (this.unsubscribeConfig) {\n this.unsubscribeConfig();\n this.unsubscribeConfig = undefined;\n }\n }\n /**\n * Helper function to get config from attributes\n * @returns the config from attributes\n */\n getAttributesConfig() {\n const configFromAttributes = {};\n ['label', 'size', 'showIcon', 'icon', 'iconSize', 'backgroundColor', 'textColor']\n .filter((key) => !!this[key])\n .forEach((key) => {\n configFromAttributes[key] = this[key];\n });\n return configFromAttributes || {};\n }\n /**\n * Get the current environment level based on priority order\n */\n getCurrentEnvironmentLevel() {\n // 1. Check if level is set via attribute\n if (this.level) {\n return this.level;\n }\n // 2. Check DI\n if (this.diConfig) {\n try {\n const { currentLevel } = this.diConfig;\n if (currentLevel) {\n return currentLevel;\n }\n }\n catch (error) {\n environmentIndicatorLogger.error(error);\n }\n }\n // 3. Return environment levelvariable if it is not default\n if (ENVIRONMENT_LEVEL !== DEFAULT_ENVIRONMENT_LEVEL) {\n return ENVIRONMENT_LEVEL;\n }\n // 4. Return default level if useDefaultConfig is true\n if (this.useDefaultConfig) {\n return DEFAULT_ENVIRONMENT_LEVEL;\n }\n return undefined;\n }\n getEnvConfigByLevel() {\n const attributesConfig = this.getAttributesConfig();\n const currentLevel = this.getCurrentEnvironmentLevel();\n if (!currentLevel) {\n if (this.useDefaultConfig) {\n return DEFAULT_ENVIRONMENT_LEVEL_CONFIG;\n }\n return undefined;\n }\n // If label is set, use attributes as config with current level\n if (this.label) {\n return Object.assign(Object.assign(Object.assign({}, DEFAULT_ENVIRONMENT_LEVEL_CONFIG), { level: currentLevel }), attributesConfig);\n }\n // If there is DI config, return it with attributes config\n if (this.diConfig) {\n const { configs } = this.diConfig;\n if (configs && configs.length > 0) {\n const config = configs.find(({ level }) => level === currentLevel);\n if (config) {\n return Object.assign(Object.assign({}, config), attributesConfig);\n }\n }\n }\n // Try to find config in envConfigs\n const envConfig = this.envConfigs.find(({ level }) => level === currentLevel);\n // If envConfig is found, return it with attributes config\n if (envConfig) {\n return Object.assign(Object.assign({}, envConfig), attributesConfig);\n }\n }\n /**\n * Handle config change when attributes change\n */\n attributeChangedCallback(name, oldValue, newValue) {\n super.attributeChangedCallback(name, oldValue, newValue);\n const watchedAttributes = [\n 'level',\n 'label',\n 'show-icon',\n 'icon-size',\n 'size',\n 'background-color',\n 'text-color',\n 'icon',\n ];\n if (watchedAttributes.includes(name) && oldValue !== newValue) {\n this.config = this.getEnvConfigByLevel();\n }\n }\n /**\n * Set environment configurations\n * @param envConfigs - the environment configurations\n */\n setEnvConfigs(envConfigs) {\n this.envConfigs = envConfigs;\n }\n}\n__decorate([\n attr\n], EnvironmentIndicator.prototype, \"level\", void 0);\n__decorate([\n attr\n], EnvironmentIndicator.prototype, \"label\", void 0);\n__decorate([\n attr({ mode: 'boolean', attribute: 'show-icon' })\n], EnvironmentIndicator.prototype, \"showIcon\", void 0);\n__decorate([\n attr\n], EnvironmentIndicator.prototype, \"size\", void 0);\n__decorate([\n attr({ attribute: 'background-color' })\n], EnvironmentIndicator.prototype, \"backgroundColor\", void 0);\n__decorate([\n attr({ attribute: 'text-color' })\n], EnvironmentIndicator.prototype, \"textColor\", void 0);\n__decorate([\n attr\n], EnvironmentIndicator.prototype, \"icon\", void 0);\n__decorate([\n attr({ attribute: 'icon-size' })\n], EnvironmentIndicator.prototype, \"iconSize\", void 0);\n__decorate([\n attr({ mode: 'boolean', attribute: 'use-default-config' })\n], EnvironmentIndicator.prototype, \"useDefaultConfig\", void 0);\n__decorate([\n observable\n], EnvironmentIndicator.prototype, \"config\", void 0);\n__decorate([\n observable\n], EnvironmentIndicator.prototype, \"envConfigs\", void 0);\n__decorate([\n observable\n], EnvironmentIndicator.prototype, \"diConfig\", void 0);\n/**\n * The Foundation Environment indicator\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-environment-indicator\\>\n */\nexport const foundationEnvironmentIndicator = EnvironmentIndicator.compose({\n baseName: 'environment-indicator',\n template,\n styles,\n});\n","import { html, ref, repeat } from '@microsoft/fast-element';\nimport { getPrefix } from '../utils/dom';\nexport const getPrefixedErrorBanner = (prefix) => html `\n <${prefix}-banner ${ref('banner')}>\n <div slot=\"content\">\n <div>\n ${(x) => { var _a, _b; return ((_a = x.error) === null || _a === void 0 ? void 0 : _a.errorDetails) || ((_b = x.notification) === null || _b === void 0 ? void 0 : _b.body) || 'Place holder for error message'; }}\n </div>\n </div>\n\n <${prefix}-button slot=\"action\" appearance=\"lightweight\" @click=${(x) => x.dismiss()}>\n ${(x) => {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n return ((_d = (_c = (_b = (_a = x.error) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.banner) === null || _c === void 0 ? void 0 : _c.dismissingAction) === null || _d === void 0 ? void 0 : _d.label) ||\n ((_h = (_g = (_f = (_e = x.notification) === null || _e === void 0 ? void 0 : _e.config) === null || _f === void 0 ? void 0 : _f.banner) === null || _g === void 0 ? void 0 : _g.dismissingAction) === null || _h === void 0 ? void 0 : _h.label) ||\n 'Ignore';\n}}\n </${prefix}-button>\n ${repeat((x) => {\n var _a, _b, _c, _d;\n return ((_b = (_a = x.error) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.banner.confirmingActions) ||\n ((_d = (_c = x.notification) === null || _c === void 0 ? void 0 : _c.config) === null || _d === void 0 ? void 0 : _d.banner.confirmingActions);\n}, html `\n <${prefix}-button\n slot=\"action\"\n appearance=\"lightweight\"\n @click=${(x, c) => {\n var _a;\n x === null || x === void 0 ? void 0 : x.action();\n (_a = c.parent) === null || _a === void 0 ? void 0 : _a.dismiss();\n}}\n >\n ${(x) => x.label}\n </${prefix}-button>\n `)}\n </${prefix}-banner>\n`;\nexport const foundationErrorBannerTemplate = html `\n ${(x) => getPrefixedErrorBanner(getPrefix(x))}\n`;\n","import { __awaiter, __decorate } from \"tslib\";\nimport { observable } from '@microsoft/fast-element';\nimport { FoundationElement } from '@microsoft/fast-foundation';\nimport { logger } from '../utils';\nimport { foundationErrorBannerTemplate as template } from './error-banner.template';\nexport const foundationErrorBannerShadowOptions = {\n mode: 'open',\n delegatesFocus: true,\n};\n/**\n * @tagname %%prefix%%-error-banner\n * @deprecated\n */\nexport class ErrorBanner extends FoundationElement {\n connectedCallback() {\n super.connectedCallback();\n logger.deprecated('ErrorBanner', 'Use `${prefix}-banner` instead.');\n }\n /**\n * Dismiss the Error Banner from display.\n */\n dismiss() {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n yield this.banner.dismiss();\n this.remove();\n }\n catch (e) {\n logger.error(e);\n }\n });\n }\n}\n__decorate([\n observable\n], ErrorBanner.prototype, \"error\", void 0);\n__decorate([\n observable\n], ErrorBanner.prototype, \"notification\", void 0);\n/**\n * The Foundation Error Banner\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-error-banner\\>\n */\nexport const foundationErrorBanner = ErrorBanner.compose({\n baseName: 'error-banner',\n template,\n shadowOptions: foundationErrorBannerShadowOptions,\n});\n","import { html, ref } from '@microsoft/fast-element';\nexport const foundationErrorBoundaryTemplate = html `\n <template ${ref('errorBoundary')}>\n <slot></slot>\n </template>\n`;\n","/**\n * @public\n * enum for different types of error boundary events\n */\nexport var ErrorBoundaryEvent;\n(function (ErrorBoundaryEvent) {\n ErrorBoundaryEvent[\"ERROR_BOUNDARY_EVENT\"] = \"error-boundary-event\";\n})(ErrorBoundaryEvent || (ErrorBoundaryEvent = {}));\n","import { LogLevel } from '@genesislcap/foundation-logger';\n/**\n * Retrieves the error details from an ErrorStructure object\n * @public\n * @param details - The ErrorStructure object\n * @returns The title and error details concatenated as a string, or default values ('Error: Something went wrong') if not present\n */\nexport const getErrorDetails = (details) => {\n var _a, _b;\n const title = (_a = details === null || details === void 0 ? void 0 : details.title) !== null && _a !== void 0 ? _a : 'Error';\n const errorDetails = (_b = details === null || details === void 0 ? void 0 : details.errorDetails) !== null && _b !== void 0 ? _b : 'Something went wrong';\n return `${title}: ${errorDetails}`;\n};\n/**\n * Retrieves the log level from an ErrorStructure object\n * @public\n * @param details - The ErrorStructure object\n * @returns The log level or the default value (LogLevel.Error) if not present\n */\nexport const getLoglevel = (details) => {\n var _a;\n return (details === null || details === void 0 ? void 0 : details.logLevel) || ((_a = details === null || details === void 0 ? void 0 : details.config) === null || _a === void 0 ? void 0 : _a.logLevel) || LogLevel.Error;\n};\n/**\n * Get/Create the error container in the DOM\n * @public\n * @param id - The id of the container\n * @param tagName - The tag name to create prefix for the design system provider\n * @returns\n */\nexport const getErrorContainer = (id, tagName) => {\n const tagPrefix = tagName.split('-')[0];\n let container = document.querySelector(`#${id}`);\n if (!container) {\n container = document.createElement('div');\n container.setAttribute('id', id);\n const dsProvider = document.createElement(`${tagPrefix}-design-system-provider`);\n dsProvider.appendChild(container);\n document.body.appendChild(dsProvider);\n }\n return container;\n};\n/**\n * Get the error banner anchor to attach the banner to\n * @public\n * @param element - The element to start searching from\n * @returns\n */\nexport const getErrorBannerAnchor = (element) => {\n var _a, _b;\n while (element && !(element instanceof ShadowRoot)) {\n const anchor = (_a = element === null || element === void 0 ? void 0 : element.getRootNode()) === null || _a === void 0 ? void 0 : _a.getElementById('error-banner-anchor');\n if (anchor) {\n anchor.style.position = 'relative';\n return anchor;\n }\n element = (_b = element === null || element === void 0 ? void 0 : element.getRootNode()) === null || _b === void 0 ? void 0 : _b.host;\n }\n return createErrorBannerContainer();\n};\nconst createErrorBannerContainer = () => {\n const anchor = document.createElement('div');\n anchor.setAttribute('id', 'error-banner-anchor');\n anchor.style.position = 'relative';\n document.body.insertBefore(anchor, document.body.firstChild);\n return anchor;\n};\n","import { createLogger } from '@genesislcap/foundation-logger';\nimport { showBanner } from './banner';\nimport { showDialog } from './dialog';\nimport { getErrorDetails, getLoglevel } from './error-util';\nimport { showNotification } from './notification';\nimport { showSnackbar } from './snackbar';\nconst logger = createLogger('foundation-error');\nconst errorTypeToComponentMap = {\n alert: (error) => {\n alert(getErrorDetails(error));\n },\n notification: showNotification,\n dialog: showDialog,\n snackbar: showSnackbar,\n banner: showBanner,\n};\n/**\n * Shows the error in the appropriate component\n * @public\n * @param error - The ErrorStructure object\n * @param tagName - The tag name to create prefix for the design system provider *\n * @param errorBoundary - The error boundary element\n * @returns\n * */\nexport const showError = (error, tagName, errorBoundary) => {\n logger.log({\n message: getErrorDetails(error),\n level: getLoglevel(error),\n });\n const keys = Object.keys((error === null || error === void 0 ? void 0 : error.config) || {});\n keys.forEach((key) => {\n if (errorTypeToComponentMap[key]) {\n errorTypeToComponentMap[key](error, tagName, errorBoundary);\n }\n });\n};\n","import { getErrorContainer } from '../error-util';\n/**\n * Shows the error notification\n * @internal\n * @param error - The ErrorStructure object\n * @param tagName - The tag name to create prefix for the design system provider & error component\n * @returns\n * */\nexport const showNotification = (error, tagName) => {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;\n const tagPrefix = tagName.split('-')[0];\n const container = getErrorContainer('notify-container', tagName);\n if (container) {\n container.style.position = 'fixed';\n switch ((_b = (_a = error === null || error === void 0 ? void 0 : error.config) === null || _a === void 0 ? void 0 : _a.notification) === null || _b === void 0 ? void 0 : _b.position) {\n case 'top-left':\n container.style.top = '0';\n container.style.left = '0';\n break;\n case 'bottom-left':\n container.style.bottom = '0';\n container.style.left = '0';\n break;\n case 'bottom-right':\n container.style.bottom = '0';\n container.style.right = '0';\n break;\n default:\n container.style.top = '0';\n container.style.right = '0';\n }\n }\n const toastNotify = document.createElement(`${tagPrefix}-toast`);\n const errorTitle = document.createElement('div');\n errorTitle.setAttribute('slot', 'top');\n errorTitle.textContent = (_c = error.title) !== null && _c !== void 0 ? _c : 'Error';\n const errorDetails = document.createElement('div');\n errorDetails.setAttribute('slot', 'content');\n errorDetails.textContent = (error === null || error === void 0 ? void 0 : error.errorDetails) || '';\n const errorDate = document.createElement('div');\n errorDate.setAttribute('slot', 'date');\n errorDate.textContent = new Date().toLocaleTimeString();\n toastNotify.setAttribute('notify', ((_e = (_d = error === null || error === void 0 ? void 0 : error.config) === null || _d === void 0 ? void 0 : _d.notification) === null || _e === void 0 ? void 0 : _e.type) || '');\n ((_g = (_f = error === null || error === void 0 ? void 0 : error.config) === null || _f === void 0 ? void 0 : _f.notification) === null || _g === void 0 ? void 0 : _g.autoClose)\n ? toastNotify.setAttribute('auto-close', `${(_j = (_h = error === null || error === void 0 ? void 0 : error.config) === null || _h === void 0 ? void 0 : _h.notification) === null || _j === void 0 ? void 0 : _j.autoClose}`)\n : '';\n ((_l = (_k = error === null || error === void 0 ? void 0 : error.config) === null || _k === void 0 ? void 0 : _k.notification) === null || _l === void 0 ? void 0 : _l.closeTimeout)\n ? toastNotify.setAttribute('close-timeout', `${(_o = (_m = error === null || error === void 0 ? void 0 : error.config) === null || _m === void 0 ? void 0 : _m.notification) === null || _o === void 0 ? void 0 : _o.closeTimeout}`)\n : '';\n toastNotify.appendChild(errorTitle);\n toastNotify.appendChild(errorDetails);\n toastNotify.appendChild(errorDate);\n container.appendChild(toastNotify);\n};\n","import { getErrorContainer } from '../error-util';\n/**\n * Shows the error dialog\n * @internal\n * @param error - The ErrorStructure object\n * @param tagName - The tag name to create prefix for the design system provider & error component\n * @returns\n * */\nexport const showDialog = (error, tagName) => {\n const tagPrefix = tagName.split('-')[0];\n const dialog = document.createElement(`${tagPrefix}-error-dialog`);\n const container = getErrorContainer('dialog-container', tagName);\n container.appendChild(dialog);\n dialog.error = error;\n dialog.show();\n};\n","import { getErrorContainer } from '../error-util';\n/**\n * Shows the snackbar\n * @internal\n * @param error - The ErrorStructure object\n * @param tagName - The tag name to create prefix for the design system provider & error component\n * @returns\n * */\nexport const showSnackbar = (error, tagName) => {\n const tagPrefix = tagName.split('-')[0];\n const snackbar = document.createElement(`${tagPrefix}-snackbar`);\n const container = getErrorContainer('snack-container', tagName);\n container.appendChild(snackbar);\n snackbar.error = error;\n};\n","import { getErrorBannerAnchor } from '../error-util';\n/**\n * Shows the error dialog\n * @public\n * @param error - The ErrorStructure object\n * @param tagName - The tag name to create prefix for the design system provider & error component\n * @returns\n * */\nexport const showBanner = (error, tagName, errorBoundary) => {\n var _a;\n const tagPrefix = tagName.split('-')[0];\n const banner = document.createElement(`${tagPrefix}-error-banner`);\n const container = getErrorBannerAnchor(errorBoundary);\n if (((_a = container === null || container === void 0 ? void 0 : container.children) === null || _a === void 0 ? void 0 : _a.length) > 0) {\n banner.style.position = 'absolute';\n banner.style.top = '0';\n banner.style.left = '0';\n banner.style.width = '100%';\n }\n container.appendChild(banner);\n banner.error = error;\n};\n","import { LogLevel } from '@genesislcap/foundation-logger';\n/**\n * ErrorBuilder to build ErrorStructure\n * @public\n */\nexport class ErrorBuilder {\n /**\n * Add title to error\n * @public\n * @param title - string\n * @returns\n */\n withTitle(title) {\n this.title = title;\n return this;\n }\n /**\n * Add error details to error\n * @public\n * @param errorDetails - string\n * @returns\n */\n withErrorDetails(errorDetails) {\n this.errorDetails = errorDetails;\n return this;\n }\n /**\n * Add log level to error\n * @public\n * @returns\n */\n withLogLevel(logLevel) {\n this.logLevel = logLevel;\n return this;\n }\n /**\n * Add alert to error\n * @public\n * @param alert - boolean\n * @returns\n */\n withAlert(alert) {\n this.alert = alert;\n return this;\n }\n /**\n * Add notification to error\n * @public\n * @param notification - {@link ErrorNotification}\n * @returns\n */\n withNotification(notification) {\n this.notification = notification;\n return this;\n }\n /**\n * Add banner to error\n * @public\n * @param banner - {@link ErrorBanner}\n * @returns\n */\n withBanner(banner) {\n this.banner = banner;\n return this;\n }\n /**\n * Add snackbar to error\n * @public\n * @param snackbar - {@link Snackbar}\n * @returns\n */\n withSnackbar(snackbar) {\n this.snackbar = snackbar;\n return this;\n }\n /**\n * Add dialog to error\n * @public\n * @param dialog - {@link ErrorDialog}\n * @returns\n */\n withDialog(dialog) {\n this.dialog = dialog;\n return this;\n }\n /**\n * Build ErrorStructure\n * @public\n * @returns\n */\n build() {\n if (!this.title) {\n throw new Error('Title is required');\n }\n if (!this.errorDetails) {\n throw new Error(`Missing required param 'errorDetails'`);\n }\n let errorStructure = {\n title: this.title,\n errorDetails: this.errorDetails,\n };\n let config = {};\n if (this.logLevel in LogLevel) {\n errorStructure = Object.assign({ logLevel: this.logLevel }, errorStructure);\n }\n if (this.alert) {\n config = Object.assign({ alert: this.alert }, config);\n errorStructure = Object.assign({ config }, errorStructure);\n }\n if (this.notification) {\n config = Object.assign({ notification: this.notification }, config);\n errorStructure = Object.assign({ config }, errorStructure);\n }\n if (this.banner) {\n config = Object.assign({ banner: this.banner }, config);\n errorStructure = Object.assign({ config }, errorStructure);\n }\n if (this.snackbar) {\n config = Object.assign({ snackbar: this.snackbar }, config);\n errorStructure = Object.assign({ config }, errorStructure);\n }\n if (this.dialog) {\n config = Object.assign({ dialog: this.dialog }, config);\n errorStructure = Object.assign({ config }, errorStructure);\n }\n return errorStructure;\n }\n}\n/**\n * Returns a new ErrorBuilder instance\n * @public\n */\nexport const getErrorBuilder = () => new ErrorBuilder();\n","/**\n * NotificationBuilder to build ErrorNotification\n * @public\n */\nexport class NotificationBuilder {\n /**\n * Add position to notification\n * @public\n * @param position - {@link ErrorNotificationPosition}\n * @returns\n */\n withPosition(position) {\n this.position = position;\n return this;\n }\n /**\n * Add auto close to notification\n * @public\n * @param autoClose - boolean\n * @returns\n */\n withAutoClose(autoClose) {\n this.autoClose = autoClose;\n return this;\n }\n /**\n * Add close timeout to notification\n * @public\n * @param closeTimeout - number\n * @returns\n */\n withCloseTimeout(closeTimeout) {\n this.closeTimeout = closeTimeout;\n return this;\n }\n /**\n * Add type to notification, if the type is anything other than 'warning' or 'success' do not add it\n * @public\n * @param type - {@link ErrorNotificationType}\n * @returns\n */\n withType(type) {\n this.type = type;\n return this;\n }\n /**\n * Build notification\n * @returns ErrorNotification\n */\n build() {\n let notification = {};\n if (this.position) {\n notification = Object.assign({ position: this.position }, notification);\n }\n if (this.autoClose) {\n notification = Object.assign({ autoClose: this.autoClose }, notification);\n }\n if (this.closeTimeout) {\n notification = Object.assign({ closeTimeout: this.closeTimeout }, notification);\n }\n if (this.type) {\n notification = Object.assign({ type: this.type }, notification);\n }\n return notification;\n }\n}\n/**\n * Get notification builder instance\n * @public\n */\nexport const getNotificationBuilder = () => new NotificationBuilder();\n","import { __awaiter, __decorate } from \"tslib\";\nimport { Datasource } from '@genesislcap/foundation-comms';\nimport { ErrorBoundaryEvent, getErrorBuilder, getNotificationBuilder, showError, } from '@genesislcap/foundation-errors';\nimport { createLogger } from '@genesislcap/foundation-logger';\nimport { attr, nullableNumberConverter, observable } from '@microsoft/fast-element';\nimport { FoundationElement } from '@microsoft/fast-foundation';\nimport { logger } from '../utils';\nimport { foundationErrorBoundaryTemplate as template } from './error-boundary.template';\nexport const foundationErrorBoundaryShadowOptions = {\n mode: 'open',\n delegatesFocus: true,\n};\n/**\n * @deprecated\n * @tagname %%prefix%%-error-boundary\n */\nexport class ErrorBoundary extends FoundationElement {\n constructor() {\n super(...arguments);\n this.logger = createLogger('error-boundary');\n /**\n * Number of milliseconds before toast will disappear. Leave empty or set to 0 to keep toast open indefinitely\n * @public\n */\n this.closeTimeout = 0;\n }\n connectedCallback() {\n const _super = Object.create(null, {\n connectedCallback: { get: () => super.connectedCallback }\n });\n return __awaiter(this, void 0, void 0, function* () {\n var _a;\n _super.connectedCallback.call(this);\n this.addEventListener(ErrorBoundaryEvent.ERROR_BOUNDARY_EVENT, (e) => {\n e.stopImmediatePropagation();\n showError(e.detail, this.tagName, this.errorBoundary);\n });\n if (this.resourceName) {\n const initOK = yield this.datasource.init({\n resourceName: this.resourceName,\n }, true);\n if (!initOK) {\n logger.debug(`Genesis Datasource init failed for ${this.resourceName}`);\n return;\n }\n this.dataSub = (_a = this.datasource.stream) === null || _a === void 0 ? void 0 : _a.subscribe((result) => {\n if (!result.ROW) {\n return;\n }\n const details = result === null || result === void 0 ? void 0 : result.ROW[0];\n if (result.SEQUENCE_ID > 1) {\n const title = details.HEADER;\n const message = details === null || details === void 0 ? void 0 : details.BODY;\n const type = details.NOTIFY_SEVERITY;\n showError(getErrorBuilder()\n .withTitle(title)\n .withErrorDetails(message)\n .withNotification(getNotificationBuilder()\n .withType(type)\n .withAutoClose(!!this.closeTimeout)\n .withCloseTimeout(this.closeTimeout)\n .build())\n .build(), this.tagName, this.errorBoundary);\n }\n });\n }\n });\n }\n disconnectedCallback() {\n var _a, _b;\n super.disconnectedCallback();\n /**\n * Attempt to clean up after ourselves.\n */\n (_a = this.dataSub) === null || _a === void 0 ? void 0 : _a.unsubscribe();\n delete this.dataSub;\n (_b = this.datasource) === null || _b === void 0 ? void 0 : _b.destroy();\n delete this.datasource;\n }\n}\n__decorate([\n observable\n], ErrorBoundary.prototype, \"errorBoundary\", void 0);\n__decorate([\n attr({ attribute: 'resource-name' })\n], ErrorBoundary.prototype, \"resourceName\", void 0);\n__decorate([\n attr({ attribute: 'close-timeout', converter: nullableNumberConverter })\n], ErrorBoundary.prototype, \"closeTimeout\", void 0);\n__decorate([\n Datasource\n], ErrorBoundary.prototype, \"datasource\", void 0);\n/**\n * The Foundation Error Boundary\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-error-boundary\\>\n */\nexport const foundationErrorBoundary = ErrorBoundary.compose({\n baseName: 'error-boundary',\n template,\n shadowOptions: foundationErrorBoundaryShadowOptions,\n});\n","import { html, ref, repeat } from '@microsoft/fast-element';\nimport { getPrefix } from '../utils';\nexport const getErrorDialogTemplate = (prefix) => html `\n <${prefix}-dialog show-close-icon=\"false\" ${ref('dialog')}>\n <h2 slot=\"top\" class=\"title\">${(x) => { var _a; return (_a = x.error) === null || _a === void 0 ? void 0 : _a.title; }}</h2>\n <div class=\"details\">${(x) => { var _a, _b; return ((_a = x.error) === null || _a === void 0 ? void 0 : _a.errorDetails) || ((_b = x.notification) === null || _b === void 0 ? void 0 : _b.body) || 'Place holder for error message'; }}</div>\n <${prefix}-button slot=\"bottom\" appearance=\"lightweight\" @click=${(x) => {\n x.dismiss();\n}}>\n ${(x) => {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n return ((_d = (_c = (_b = (_a = x.error) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.dialog) === null || _c === void 0 ? void 0 : _c.dismissingAction) === null || _d === void 0 ? void 0 : _d.label) ||\n ((_h = (_g = (_f = (_e = x.notification) === null || _e === void 0 ? void 0 : _e.config) === null || _f === void 0 ? void 0 : _f.dialog) === null || _g === void 0 ? void 0 : _g.dismissingAction) === null || _h === void 0 ? void 0 : _h.label) ||\n 'Ignore';\n}}\n </${prefix}-button>\n ${repeat((x) => {\n var _a, _b, _c, _d;\n return ((_b = (_a = x.error) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.dialog.confirmingActions) ||\n ((_d = (_c = x.notification) === null || _c === void 0 ? void 0 : _c.config) === null || _d === void 0 ? void 0 : _d.dialog.confirmingActions);\n}, html `\n <${prefix}-button\n slot=\"bottom\"\n appearance=\"lightweight\"\n @click=${(x, c) => {\n x === null || x === void 0 ? void 0 : x.action();\n c.parent.closeDialog();\n}}\n >\n ${(x) => x.label}\n </${prefix}-button>\n `)}\n </${prefix}-dialog>\n`;\nexport const errorDialogTemplate = html `\n ${(x) => getErrorDialogTemplate(getPrefix(x))}\n`;\n","import { css } from '@microsoft/fast-element';\nexport const foundationErrorDialogStyles = css `\n :host {\n --design-unit: 3;\n --dialog-max-width: 358px;\n --dialog-min-width: 358px;\n --dialog-max-height: 128px;\n --error-details-min-height: 40px;\n }\n\n .title {\n margin-top: calc(var(--design-unit) * 2px);\n font-size: 14px;\n }\n\n .details {\n font-size: 12px;\n overflow: hidden;\n min-height: var(--error-details-min-height);\n }\n`;\n","import { __decorate } from \"tslib\";\nimport { observable } from '@microsoft/fast-element';\nimport { FoundationElement } from '@microsoft/fast-foundation';\nimport { logger } from '../utils';\nimport { foundationErrorDialogStyles as styles } from './error-dialog.styles';\nimport { errorDialogTemplate as template } from './error-dialog.template';\nexport const foundationErrorDialogShadowOptions = {\n mode: 'open',\n delegatesFocus: true,\n};\n/**\n * @tagname %%prefix%%-error-dialog\n * @deprecated\n */\nexport class ErrorDialog extends FoundationElement {\n connectedCallback() {\n super.connectedCallback();\n logger.deprecated('ErrorDialog', 'Use `${prefix}-dialog` instead.');\n }\n /**\n * Show the Error Dialog.\n */\n show() {\n this.dialog.show();\n }\n /**\n * Dismiss the Error Dialog from display and calls the dismissing action.\n */\n dismiss() {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n if ((_d = (_c = (_b = (_a = this.error) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.dialog) === null || _c === void 0 ? void 0 : _c.dismissingAction) === null || _d === void 0 ? void 0 : _d.action) {\n this.error.config.dialog.dismissingAction.action();\n }\n if ((_h = (_g = (_f = (_e = this.notification) === null || _e === void 0 ? void 0 : _e.config) === null || _f === void 0 ? void 0 : _f.dialog) === null || _g === void 0 ? void 0 : _g.dismissingAction) === null || _h === void 0 ? void 0 : _h.action) {\n this.notification.config.dialog.dismissingAction.action();\n }\n this.closeDialog();\n }\n /**\n * Dismiss the Error Dialog from display.\n */\n closeDialog() {\n try {\n this.dialog.close();\n this.remove();\n }\n catch (e) {\n logger.error(e);\n }\n }\n}\n__decorate([\n observable\n], ErrorDialog.prototype, \"error\", void 0);\n__decorate([\n observable\n], ErrorDialog.prototype, \"notification\", void 0);\n/**\n * The Foundation Error Dialog\n *\n * @public\n * @remarks\n * HTML Element: <foundation-error-dialog>\n */\nexport const foundationErrorDialog = ErrorDialog.compose({\n baseName: 'error-dialog',\n template,\n styles,\n shadowOptions: foundationErrorDialogShadowOptions,\n});\n","import { getNotificationContainer, showLoggerLogLevel } from '../notification-util';\n/**\n * Shows the snackbar\n * @internal\n * @param notification - The NotificationStructure object\n * @param tagName - The tag name to create prefix for the design system provider & notification component\n * @returns\n * */\nexport const showSnackbar = (notificationStructure, tagName) => {\n showLoggerLogLevel(notificationStructure);\n const tagPrefix = tagName.split('-')[0];\n const snackbar = document.createElement(`${tagPrefix}-snackbar`);\n const container = getNotificationContainer('snack-container', tagName);\n if (container) {\n container.style.position = 'fixed';\n container.style.bottom = '0';\n container.style.left = '0';\n }\n container.appendChild(snackbar);\n snackbar.notification = notificationStructure;\n};\n","import { getNotificationContainer, showLoggerLogLevel } from '../notification-util';\n/**\n * Shows the notificationStructure\n * @internal\n * @param notificationStructure - The NotificationStructure object\n * @param tagName - The tag name to create prefix for the design system provider & notificationStructure component\n * @param notificationContainer - The notificationStructure container element\n * @returns\n * */\nexport const showToast = (notificationStructure, tagName, notificationContainer) => {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;\n showLoggerLogLevel(notificationStructure);\n const tagPrefix = tagName.split('-')[0];\n const container = notificationContainer !== null && notificationContainer !== void 0 ? notificationContainer : getNotificationContainer('notify-container', tagName);\n if (container) {\n container.style.position = 'fixed';\n switch ((_b = (_a = notificationStructure === null || notificationStructure === void 0 ? void 0 : notificationStructure.config) === null || _a === void 0 ? void 0 : _a.toast) === null || _b === void 0 ? void 0 : _b.position) {\n case 'top-left':\n container.style.top = 'var(--nav-height, 0)';\n container.style.left = '0';\n break;\n case 'bottom-left':\n container.style.bottom = '0';\n container.style.left = '0';\n break;\n case 'bottom-right':\n container.style.bottom = '0';\n container.style.right = '0';\n break;\n default:\n container.style.top = 'var(--nav-height, 0)';\n container.style.right = '0';\n }\n }\n const toastNotify = document.createElement(`${tagPrefix}-toast`);\n const toastTitle = document.createElement('div');\n toastTitle.setAttribute('slot', 'top');\n toastTitle.textContent = notificationStructure.title;\n const toastDetails = document.createElement('div');\n toastDetails.setAttribute('slot', 'content');\n toastDetails.textContent = (notificationStructure === null || notificationStructure === void 0 ? void 0 : notificationStructure.body) || '';\n const toastDate = document.createElement('div');\n toastDate.setAttribute('slot', 'date');\n toastDate.textContent = ((_c = notificationStructure === null || notificationStructure === void 0 ? void 0 : notificationStructure.createdAt) === null || _c === void 0 ? void 0 : _c.toLocaleTimeString()) || '';\n let toastBottom;\n if (((_e = (_d = notificationStructure === null || notificationStructure === void 0 ? void 0 : notificationStructure.config) === null || _d === void 0 ? void 0 : _d.toast) === null || _e === void 0 ? void 0 : _e.buttons) &&\n ((_h = (_g = (_f = notificationStructure === null || notificationStructure === void 0 ? void 0 : notificationStructure.config) === null || _f === void 0 ? void 0 : _f.toast) === null || _g === void 0 ? void 0 : _g.buttons) === null || _h === void 0 ? void 0 : _h.length)) {\n toastBottom = document.createElement('div');\n toastBottom.setAttribute('slot', 'bottom');\n notificationStructure.config.toast.buttons.forEach((button) => {\n const buttonElement = document.createElement(`${tagPrefix}-button`);\n buttonElement.textContent = button.placeholder || 'example placeholder';\n buttonElement.addEventListener('click', () => {\n const { details } = notificationStructure.config.toast;\n if (button.action) {\n return button.action({\n details,\n buttonElement,\n toastElement: toastNotify,\n });\n }\n });\n if (button.appearance) {\n buttonElement.setAttribute('appearance', button.appearance);\n }\n toastBottom.appendChild(buttonElement);\n });\n }\n toastNotify.setAttribute('notify', ((_k = (_j = notificationStructure === null || notificationStructure === void 0 ? void 0 : notificationStructure.config) === null || _j === void 0 ? void 0 : _j.toast) === null || _k === void 0 ? void 0 : _k.type) || '');\n if (notificationStructure.iconName) {\n toastNotify.setAttribute('notification-icon', notificationStructure.iconName);\n }\n ((_m = (_l = notificationStructure === null || notificationStructure === void 0 ? void 0 : notificationStructure.config) === null || _l === void 0 ? void 0 : _l.toast) === null || _m === void 0 ? void 0 : _m.autoClose)\n ? toastNotify.setAttribute('auto-close', `${(_p = (_o = notificationStructure === null || notificationStructure === void 0 ? void 0 : notificationStructure.config) === null || _o === void 0 ? void 0 : _o.toast) === null || _p === void 0 ? void 0 : _p.autoClose}`)\n : '';\n ((_r = (_q = notificationStructure === null || notificationStructure === void 0 ? void 0 : notificationStructure.config) === null || _q === void 0 ? void 0 : _q.toast) === null || _r === void 0 ? void 0 : _r.closeTimeout)\n ? toastNotify.setAttribute('close-timeout', `${(_t = (_s = notificationStructure === null || notificationStructure === void 0 ? void 0 : notificationStructure.config) === null || _s === void 0 ? void 0 : _s.toast) === null || _t === void 0 ? void 0 : _t.closeTimeout}`)\n : '';\n toastNotify.appendChild(toastTitle);\n toastNotify.appendChild(toastDetails);\n toastNotify.appendChild(toastDate);\n if (toastBottom) {\n toastNotify.appendChild(toastBottom);\n }\n container.appendChild(toastNotify);\n};\n","import { showNotificationAlert } from './alert';\nimport { showBanner } from './banner';\nimport { showDialog } from './dialog';\nimport { showSnackbar } from './snackbar';\nimport { showToast } from './toast';\nconst notificationTypeToComponentMap = {\n alert: showNotificationAlert,\n toast: showToast,\n dialog: showDialog,\n snackbar: showSnackbar,\n banner: showBanner,\n};\n/**\n * Shows the notificationStructure in the appropriate component\n * @public\n * @param notificationStructure - The NotificationStructure object\n * @param tagName - The tag name to create prefix for the design system provider *\n * @param notificationBoundary - The notificationStructure boundary element\n * @returns\n * */\nexport const showNotification = (notificationStructure, tagName, notificationBoundary) => {\n const keys = Object.keys((notificationStructure === null || notificationStructure === void 0 ? void 0 : notificationStructure.config) || {});\n keys.forEach((key) => {\n if (notificationTypeToComponentMap[key]) {\n notificationTypeToComponentMap[key](notificationStructure, tagName, notificationBoundary);\n }\n });\n};\n","import { getNotificationDetails, showLoggerLogLevel } from '../notification-util';\n/**\n * Shows the notification alert\n * @public\n */\nexport const showNotificationAlert = (configuration) => {\n showLoggerLogLevel(configuration);\n alert(getNotificationDetails(configuration));\n};\n","import { getBannerAnchor, showLoggerLogLevel } from '../notification-util';\n/**\n * Shows the notificationStructure dialog\n * @public\n * @param notificationStructure - The NotificationStructure object\n * @param tagName - The tag name to create prefix for the design system provider & notificationStructure component\n * @param notificationBoundary - target listener for the notification\n * @returns\n * */\nexport const showBanner = (notificationStructure, tagName, notificationBoundary) => {\n var _a;\n showLoggerLogLevel(notificationStructure);\n const tagPrefix = tagName.split('-')[0];\n const banner = document.createElement(`${tagPrefix}-banner`);\n const container = getBannerAnchor(notificationBoundary);\n if (((_a = container === null || container === void 0 ? void 0 : container.children) === null || _a === void 0 ? void 0 : _a.length) > 0) {\n banner.style.position = 'absolute';\n banner.style.top = '0';\n banner.style.left = '0';\n banner.style.width = '100%';\n }\n container.appendChild(banner);\n banner.notification = notificationStructure;\n};\n","import { __decorate } from \"tslib\";\nimport { showNotification } from '@genesislcap/foundation-notifications';\nimport { attr, observable } from '@microsoft/fast-element';\nimport { FoundationElement } from '@microsoft/fast-foundation';\nconst DEFAULT_FILE_SIZE_LIMIT = 10485760; // 10MB\n/**\n * Abstract base class for file handling components\n * Provides common functionality for file selection, validation, and UI state management\n * @beta\n */\nexport class BaseFileComponent extends FoundationElement {\n constructor() {\n super(...arguments);\n this.selectedFile = null;\n this.accept = '';\n this.fileSizeLimitBytes = DEFAULT_FILE_SIZE_LIMIT;\n this.fileName = '';\n this.isProcessing = false;\n }\n /**\n * Opens the file picker dialog\n * Clears any previous file selection before opening\n */\n handleClick() {\n this.fileInput.value = null;\n this.fileInput.click();\n }\n /**\n * Handles file selection from the file input\n * Validates file size and sets up for processing\n * @param e - The change event from the file input\n */\n onInputChange(e) {\n var _a;\n const target = e === null || e === void 0 ? void 0 : e.target;\n const files = Array.from((_a = target === null || target === void 0 ? void 0 : target.files) !== null && _a !== void 0 ? _a : []);\n // Check if any file exceeds the size limit\n const oversizedFile = files.find((file) => file.size > this.fileSizeLimitBytes);\n if (oversizedFile) {\n const errorMessage = `File \"${oversizedFile.name}\" exceeds size limit of ${this.fileSizeLimitBytes} bytes`;\n this.showError('File Size Error', errorMessage);\n this.$emit('error', new Error(errorMessage));\n return;\n }\n this.onFileSelected(files);\n }\n /**\n * Clears all file selection and processing state\n * Resets the component to its initial state\n */\n clearSelection() {\n this.fileName = '';\n this.selectedFile = null;\n this.isProcessing = false;\n if (this.fileInput) {\n this.fileInput.value = '';\n }\n this.onFileCleared();\n this.$emit('clear');\n }\n /**\n * Gets the currently selected file object\n * @returns The selected File object or null if no file is selected\n */\n getSelectedFile() {\n return this.selectedFile;\n }\n /**\n * Shows an error notification using the unified error handling system\n * @param title - The error title\n * @param message - The error message\n */\n showError(title, message) {\n showNotification({\n title,\n body: message,\n config: {\n toast: { type: 'warning', autoClose: true, closeTimeout: 5000 },\n },\n }, this.tagName);\n }\n}\n__decorate([\n attr\n], BaseFileComponent.prototype, \"label\", void 0);\n__decorate([\n attr\n], BaseFileComponent.prototype, \"accept\", void 0);\n__decorate([\n attr({ attribute: 'file-size-limit-bytes' })\n], BaseFileComponent.prototype, \"fileSizeLimitBytes\", void 0);\n__decorate([\n observable\n], BaseFileComponent.prototype, \"fileName\", void 0);\n__decorate([\n observable\n], BaseFileComponent.prototype, \"isProcessing\", void 0);\n","export const closeIcon = (slot = 'start', fill = '#879ba6') => `\n <svg class=\"svg-icon\" slot=\"${slot}\" width=\"16px\" height=\"16px\">\n <g transform=\"matrix(1 0 0 1 -1865 -3576 )\">\n <path d=\"M 15.8825 14.185499999999998 L 9.697000000000001 8 L 14.825000000000001 2.872 L 15.8825 1.814499999999999 C 16.0385 1.6584999999999992 16.0385 1.4049999999999994 15.8825 1.2489999999999988 L 14.751 0.11749999999999972 C 14.594999999999999 -0.03850000000000087 14.3415 -0.03850000000000087 14.1855 0.11749999999999972 L 8 6.303000000000001 L 1.8145 0.11699999999999999 C 1.6585 -0.03900000000000059 1.4050000000000002 -0.03900000000000059 1.2489999999999999 0.11699999999999999 L 0.11699999999999999 1.2485 C -0.039000000000000014 1.4044999999999996 -0.039000000000000014 1.6579999999999995 0.11699999999999999 1.814 L 6.303000000000001 8 L 0.11699999999999999 14.185499999999998 C -0.039000000000000014 14.3415 -0.039000000000000014 14.594999999999999 0.11699999999999999 14.751000000000001 L 1.2485 15.8825 C 1.4045 16.0385 1.658 16.0385 1.814 15.8825 L 8 9.697 L 13.128 14.825 L 14.1855 15.8825 C 14.3415 16.0385 14.594999999999999 16.0385 14.751 15.8825 L 15.8825 14.751000000000001 C 16.0385 14.594999999999999 16.0385 14.3415 15.8825 14.185499999999998 Z \" fill-rule=\"nonzero\" fill=\"${fill}\" stroke=\"none\" transform=\"matrix(1 0 0 1 1865 3576 )\" />\n </g>\n </svg>\n`;\n","import { css } from '@microsoft/fast-element';\nexport const fileReaderStyles = (prefix, context, definition) => css `\n /* Host */\n :host {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n position: relative;\n }\n\n .file-reader {\n display: flex;\n align-items: end;\n justify-content: start;\n position: relative;\n }\n\n .file-reader > *:not(.processing-overlay) {\n margin: 0;\n }\n\n .file-reader > *:not(.processing-overlay):not(:last-child) {\n margin-right: calc(var(--design-unit) * 2px);\n }\n\n input[type='file'] {\n display: none;\n }\n\n .file-name-input {\n flex: 1;\n }\n\n .clear-icon {\n cursor: pointer;\n }\n\n .processing-overlay {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(0 0 0 / 20%);\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n z-index: 2;\n }\n`;\nexport const foundationFileReaderStyles = (context, definition) => css `\n ${fileReaderStyles('foundation', context, definition)}\n`;\n","import { html, ref, when } from '@microsoft/fast-element';\nimport { getPrefix } from '../utils/dom';\nexport const getPrefixedFileReader = (prefix) => html `\n<template>\n <div class=\"file-reader\">\n ${when((x) => x.isProcessing, html `\n <div class=\"processing-overlay\" part=\"processing-overlay\">\n <${prefix}-progress-ring class=\"processing-spinner\"></${prefix}-progress-ring>\n </div>\n `)}\n <input type=\"file\" ${ref('fileInput')} \n @change=${(x, c) => x.onInputChange(c.event)} \n :accept=\"${(x) => x.accept}\"/>\n \n <${prefix}-text-field \n readOnly \n type=\"text\"\n id=\"fileName\"\n class=\"file-name-input\"\n :value=\"${(x) => x.fileName}\"\n part=\"file-name-input\"\n >\n ${(x) => x.label}\n ${when((x) => x.fileName, html `\n <${prefix}-icon slot=\"end\" class=\"clear-icon\" name=\"xmark\" part=\"clear-icon\"\n @click=${(x) => x.clearSelection()}></${prefix}-icon>\n `)}\n </${prefix}-text-field>\n \n <${prefix}-button @click=${(x) => x.handleClick()} part=\"select-file-button\">\n Browse\n </${prefix}-button>\n ${when((x) => x.fileName && !x.autoProcess, html `\n <${prefix}-button @click=${(x) => x.handleFileProcessing()} part=\"process-file-button\"\n :disabled=\"${(x) => !x.fileName}\">Process file</${prefix}-button>\n `)}\n </div>\n</template>\n`;\nexport const fileReaderTemplate = html `\n ${(x) => getPrefixedFileReader(getPrefix(x))}\n`;\n","import { __awaiter, __decorate } from \"tslib\";\nimport { attr, observable } from '@microsoft/fast-element';\nimport { BaseFileComponent } from '../_common';\nimport { foundationFileReaderStyles as styles } from './file-reader.styles';\nimport { fileReaderTemplate as template } from './file-reader.template';\nconst DEFAULT_PROCESSING_DELAY = 1000; // 1 second default delay\n/**\n * @tagname %%prefix%%-file-reader\n * @beta\n */\nexport class FileReader extends BaseFileComponent {\n constructor() {\n super();\n this.processingTimeout = null;\n this.autoProcess = false;\n this.processingDelayMs = DEFAULT_PROCESSING_DELAY;\n this.fileContent = null;\n // Set default accept for JSON files\n this.accept = '.json,application/json';\n }\n /**\n * Handles file selection and validation\n * @beta - Currently supports single JSON files only. Future versions will support multiple files and additional file types.\n * @param files - The selected files\n */\n onFileSelected(files) {\n var _a, _b;\n const file = files[0];\n if (file && this.accept.includes('json') && !((_b = (_a = file === null || file === void 0 ? void 0 : file.name) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === null || _b === void 0 ? void 0 : _b.endsWith('.json'))) {\n const errorMessage = 'Selected file is not a JSON file';\n this.showError('File Type Error', errorMessage);\n this.$emit('error', new Error(errorMessage));\n return;\n }\n this.selectedFile = file;\n this.fileName = file.name;\n if (this.autoProcess) {\n this.handleFileProcessing();\n }\n }\n onFileCleared() {\n this.fileContent = null;\n if (this.processingTimeout) {\n clearTimeout(this.processingTimeout);\n this.processingTimeout = null;\n }\n }\n /**\n * Processes the selected file and parses its content\n * For JSON files, attempts to parse the content and emit processed data\n * Sets processing state and handles errors appropriately\n */\n handleFileProcessing() {\n return __awaiter(this, void 0, void 0, function* () {\n var _a;\n if (!this.getSelectedFile()) {\n this.showError('No File Selected', 'Please select a file to process');\n return;\n }\n if (this.processingTimeout) {\n clearTimeout(this.processingTimeout);\n }\n this.isProcessing = true;\n try {\n const content = yield this.getSelectedFile().text();\n let parsedContent;\n try {\n parsedContent = JSON.parse(content);\n }\n catch (parseError) {\n this.showError('Invalid JSON Format', 'The selected file contains invalid JSON');\n this.$emit('error', parseError);\n return;\n }\n this.fileContent = parsedContent;\n this.$emit('file-read', {\n fileName: this.fileName,\n content: this.fileContent,\n file: this.getSelectedFile(),\n });\n (_a = this.onFileRead) === null || _a === void 0 ? void 0 : _a.call(this, this.fileContent);\n }\n catch (error) {\n this.showError('File Processing Error', 'An error occurred while processing the file');\n this.$emit('error', error);\n }\n finally {\n this.processingTimeout = window.setTimeout(() => {\n this.isProcessing = false;\n this.processingTimeout = null;\n }, this.processingDelayMs);\n }\n });\n }\n /**\n * Gets the current file content for external access\n * @returns The parsed file content or null if no file is processed\n */\n getFileContent() {\n return this.fileContent;\n }\n /**\n * Disconnected callback to clean up timeouts\n */\n disconnectedCallback() {\n super.disconnectedCallback();\n if (this.processingTimeout) {\n clearTimeout(this.processingTimeout);\n this.processingTimeout = null;\n }\n }\n}\n__decorate([\n attr({ attribute: 'auto-process', mode: 'boolean' })\n], FileReader.prototype, \"autoProcess\", void 0);\n__decorate([\n attr({ attribute: 'processing-delay-ms' })\n], FileReader.prototype, \"processingDelayMs\", void 0);\n__decorate([\n observable\n], FileReader.prototype, \"fileContent\", void 0);\n__decorate([\n observable\n], FileReader.prototype, \"onFileRead\", void 0);\n/**\n * The Foundation File Reader\n *\n * @public\n * @beta\n * @remarks\n * HTML Element: \\<foundation-file-reader\\>\n *\n * A component for selecting and processing files locally without uploading to server.\n * Primarily designed for JSON file processing with optional auto-processing capabilities.\n */\nexport const foundationFileReader = FileReader.compose({\n baseName: 'file-reader',\n styles,\n template,\n});\n","import { css } from '@microsoft/fast-element';\nexport const foundationFileUploadStyles = css `\n /* Host */\n :host {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n }\n\n .file-selection {\n display: flex;\n align-items: end;\n justify-content: start;\n padding-bottom: 10px;\n }\n\n .file-selection :nth-last-child(-n + 2) {\n margin: 0;\n margin-left: 10px;\n }\n\n input[type='file'] {\n display: none;\n }\n\n .clear-icon {\n cursor: pointer;\n }\n\n .uploader-grid {\n overflow-y: auto;\n }\n\n .file-name-input {\n flex: 1;\n }\n\n .download-button-container {\n display: flex;\n }\n\n .download-button {\n height: 22px;\n }\n\n fast-data-grid-row {\n align-items: center;\n }\n`;\n","import { html, ref, when } from '@microsoft/fast-element';\nimport { getPrefix } from '../utils';\nexport const getPrefixedFileUpload = (prefix) => html `\n<template>\n <div class=\"file-selection\">\n <input type=\"file\" multiple ${ref('fileInput')} \n @change=${(x, c) => x.onInputChange(c.event)} :accept=\"${(x) => x.accept}\"/>\n <${prefix}-text-field readOnly type=\"text\" id=\"fileName\" part=\"file-name-input\" class=\"file-name-input\"\n :label=\"${(x) => x.label}\" \n :value=\"${(x) => x.fileName}\">\n ${(x) => x.label} \n ${when((x) => x.fileName, html `\n <${prefix}-icon slot=\"end\" class=\"clear-icon\" name=\"xmark\" \n @click=${(x) => x.clearSelection()}></${prefix}-icon>\n `)}\n </${prefix}-text-field>\n\n <${prefix}-button @click=${(x) => x.handleClick()} part=\"select-file-button\">Browse</${prefix}-button>\n <${prefix}-button @click=${(x) => x.handleFileUpload()} part=\"upload-file-button\"\n :disabled=\"${(x) => !x.fileName}\" >Upload</${prefix}-button>\n </div>\n <div class=\"uploader-grid\">\n <${prefix}-data-grid generate-header=\"sticky\" part=\"uploaded-files-grid\"\n :rowsData=\"${(x) => x.uploadedFilesList}\"\n :columnDefinitions=\"${(x) => x.filesGridColumnDefinitions}\"> \n </${prefix}-data-grid>\n </div>\n</template>\n`;\nexport const foundationFileUploadTemplate = html `\n ${(x) => getPrefixedFileUpload(getPrefix(x))}\n`;\n","import { __awaiter } from \"tslib\";\nimport { showNotification } from '@genesislcap/foundation-notifications';\nimport { logger } from '../utils';\nexport const createFormData = (files) => {\n const formData = new FormData();\n files.forEach((file) => {\n formData.append(file.name, file);\n });\n return formData;\n};\nexport const uploadFiles = (url, formData, authToken, http) => {\n const headers = new Headers();\n headers.append('SESSION_AUTH_TOKEN', authToken);\n return http.post(url, {\n body: formData,\n headers,\n });\n};\nexport const downloadFile = (url, filename, authToken, method = 'GET', showNotifications, body, prefix = 'zero') => {\n const headers = new Headers();\n headers.append('SESSION_AUTH_TOKEN', authToken);\n fetch(url, {\n method,\n body,\n headers,\n credentials: 'include',\n })\n .then((res) => __awaiter(void 0, void 0, void 0, function* () {\n var _a;\n if (res.ok) {\n return res.blob();\n }\n else {\n const error = yield res.json();\n showNotifications\n ? showNotification({\n title: error === null || error === void 0 ? void 0 : error.MESSAGE_TYPE,\n body: (_a = error === null || error === void 0 ? void 0 : error.DETAILS) === null || _a === void 0 ? void 0 : _a.ERROR,\n config: { toast: { autoClose: true, closeTimeout: 5000, type: 'warning' } },\n }, prefix)\n : '';\n logger.error(error || 'An error occurred while downloading the file.');\n }\n }))\n .then((blob) => {\n if (blob) {\n const objectUrl = window.URL.createObjectURL(blob);\n const a = document.createElement('a');\n a.href = objectUrl;\n a.download = filename;\n document.body.appendChild(a);\n a.click();\n a.remove();\n showNotifications\n ? showNotification({\n title: 'Success',\n body: 'File downloaded successfully',\n config: { toast: { autoClose: true, closeTimeout: 5000, type: 'success' } },\n }, prefix)\n : '';\n logger.info('File downloaded successfully');\n }\n })\n .catch((error) => {\n logger.error(error);\n });\n};\n","import { __awaiter, __decorate } from \"tslib\";\nimport { Connect, Http, logger, Session } from '@genesislcap/foundation-comms';\nimport { CriteriaBuilder, ExpressionBuilder } from '@genesislcap/foundation-criteria';\nimport { formatDateTimeTimestamp } from '@genesislcap/foundation-utils';\nimport { attr, html, observable, when } from '@microsoft/fast-element';\nimport { BaseFileComponent } from '../_common';\nimport { foundationFileUploadStyles as styles } from './file-upload.styles';\nimport { foundationFileUploadTemplate as template } from './file-upload.template';\nimport { createFormData, downloadFile, uploadFiles } from './file-upload.utils';\nconst IMAGE_FILE_TYPES = ['image/png', 'image/bmp', 'image/gif', 'image/jpeg', 'image/jpg'];\nconst TEXT_FILE_TYPES = ['text/plain', 'text/csv'];\nconst OFFICE_FILE_TYPES = [\n 'application/vnd.ms-excel',\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n 'application/vnd.ms-powerpoint',\n 'application/vnd.openxmlformats-officedocument.presentationml.presentation',\n 'application/msword',\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n 'application/pdf',\n];\nconst FILE_SIZE_LIMIT = 104857600; // 100MiB as bytes\nconst cellTemplateColumn = html `\n ${when((x) => x.rowData, html `\n ${(x) => x.columnDefinition['type'] === 'DATETIME'\n ? formatDateTimeTimestamp(x.rowData[x.columnDefinition.columnDataKey])\n : x.rowData[x.columnDefinition.columnDataKey]}\n `)}\n`;\n/**\n * @tagname %%prefix%%-file-upload\n */\nexport class FileUpload extends BaseFileComponent {\n constructor() {\n super(...arguments);\n this.acceptedFormats = [];\n this.selectedFiles = [];\n this.uploadedFilesResourceName = 'ALL_FILE_ATTACHMENTS';\n this.uploadEventName = 'gwf/attachment-handler/upload';\n this.gridFields = ''; // list of fieldNames to show in grid\n this.fileName = '';\n this.uploadedFilesList = [];\n this.filesGridColumnDefinitions = [];\n }\n acceptChanged() {\n let acceptedValues = [];\n if (this.accept.length > 0) {\n this.accept.split(',').forEach((el) => {\n if (el === 'image/*') {\n acceptedValues = [...acceptedValues, ...IMAGE_FILE_TYPES];\n }\n else if (el === 'office/*') {\n acceptedValues = [...acceptedValues, ...OFFICE_FILE_TYPES];\n }\n else if (el === 'text/*') {\n acceptedValues = [...acceptedValues, ...TEXT_FILE_TYPES];\n }\n else {\n acceptedValues.push(el);\n }\n });\n }\n this.acceptedFormats = acceptedValues;\n }\n fieldNameChanged() {\n this.setupGrid();\n }\n entityIdChanged() {\n this.setupGrid();\n }\n connectedCallback() {\n const _super = Object.create(null, {\n connectedCallback: { get: () => super.connectedCallback }\n });\n return __awaiter(this, void 0, void 0, function* () {\n var _a;\n _super.connectedCallback.call(this);\n if (!((_a = this.filesGridColumnDefinitions) === null || _a === void 0 ? void 0 : _a.length))\n this.setColumnDefs();\n });\n }\n setupGrid() {\n if (this.entityId !== undefined && this.fieldName !== undefined) {\n this.gridCriteria = new CriteriaBuilder()\n .withExpression(new ExpressionBuilder().withField(this.fieldName).withValue(this.entityId).build())\n .build();\n this.setRowData();\n }\n }\n handleStreamRowOperation(data) {\n let index;\n for (const row of data.ROW) {\n if (!row.DETAILS)\n continue;\n switch (row.DETAILS.OPERATION) {\n case 'INSERT':\n this.uploadedFilesList.unshift(row);\n break;\n case 'MODIFY':\n index = this.uploadedFilesList.findIndex((e) => e.FILE_ATTACHMENT_ID === row.FILE_ATTACHMENT_ID);\n this.uploadedFilesList.splice(index, 1, row);\n break;\n case 'DELETE':\n index = this.uploadedFilesList.findIndex((e) => e.FILE_ATTACHMENT_ID === row.FILE_ATTACHMENT_ID);\n this.uploadedFilesList.splice(index, 1);\n break;\n default:\n logger.error(`Unsupported operation type: ${row.DETAILS.OPERATION}`);\n }\n }\n }\n setRowData() {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.connect.stream(this.uploadedFilesResourceName, (response) => {\n var _a;\n if (response.SEQUENCE_ID === 1) {\n this.uploadedFilesList = (_a = response.ROW) !== null && _a !== void 0 ? _a : [];\n }\n else {\n this.handleStreamRowOperation(response);\n }\n }, (error) => {\n logger.error(error);\n }, { CRITERIA_MATCH: this.gridCriteria });\n });\n }\n setColumnDefs() {\n return __awaiter(this, void 0, void 0, function* () {\n var _a;\n const metadata = yield this.connect.getMetadata(this.uploadedFilesResourceName);\n const columnDefs = [];\n if (this.gridFields.length > 0) {\n this.gridFields.split(' ').forEach((gridField) => {\n var _a;\n const field = (_a = metadata.FIELD) === null || _a === void 0 ? void 0 : _a.find((metadatField) => metadatField.NAME === gridField);\n if (field) {\n columnDefs.push(this.getColumnObject(field));\n }\n else if (gridField === 'DOWNLOAD' && this.downloadEventName) {\n columnDefs.push(this.getDownloadColumn());\n }\n });\n }\n else {\n (_a = metadata.FIELD) === null || _a === void 0 ? void 0 : _a.forEach((field) => {\n columnDefs.push(this.getColumnObject(field));\n });\n if (this.downloadEventName) {\n columnDefs.push(this.getDownloadColumn());\n }\n }\n this.filesGridColumnDefinitions = columnDefs;\n });\n }\n getDownloadColumn() {\n const prefix = this.tagName.toLowerCase().split('-')[0];\n return {\n columnDataKey: 'FILE_NAME',\n title: 'File',\n cellTemplate: html `\n <template>\n <div class=\"download-button-container\">\n <${prefix}-button\n class=\"download-button\"\n @click=\"${(x) => this.handleFileDownload(x.rowData)}\"\n >\n DOWNLOAD\n </${prefix}-button>\n </div>\n </template>\n `,\n };\n }\n getColumnObject(column) {\n return {\n columnDataKey: column.NAME,\n title: column.NAME.toLowerCase()\n .split('_')\n .map((el) => el.charAt(0).toUpperCase() + el.slice(1))\n .join(' '),\n type: column.TYPE,\n cellTemplate: cellTemplateColumn,\n };\n }\n handleClick() {\n this.fileInput.value = null;\n this.fileInput.click();\n }\n onFileSelected(files) {\n const fileArray = Array.isArray(files) ? files : [files];\n // Check file types if accept is specified\n if (fileArray.length > 0 && this.acceptedFormats.length > 0) {\n for (const file of fileArray) {\n if (!(this.accept.split(',').includes('.msg') && file.name && file.name.endsWith('msg'))) {\n if (!this.acceptedFormats.includes(file.type)) {\n this.showError('File Type Error', `Not a valid file type. Accepted Formats are ${this.accept}`);\n return;\n }\n }\n }\n }\n this.selectedFiles = fileArray;\n this.fileName = this.selectedFiles.map((e) => e.name.trim()).join();\n }\n onFileCleared() {\n this.fileName = '';\n this.selectedFiles = [];\n }\n handleFileUpload() {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const formData = createFormData(this.selectedFiles);\n formData.append(this.uploadKey, this.entityId);\n const data = yield uploadFiles(this.uploadEventName, formData, this.session.getItem('authToken', 'session'), this.http);\n if (data.ERROR) {\n logger.error(data.ERROR);\n this.$emit('errorOut', data.ERROR);\n return;\n }\n logger.info(data);\n this.$emit('success', data);\n this.clearSelection();\n }\n catch (ex) {\n this.$emit('errorOut', ex);\n logger.error(ex);\n }\n });\n }\n handleFileDownload(rowData) {\n const prefix = this.tagName.toLowerCase().split('-')[0];\n downloadFile(this.downloadEventName(rowData), rowData.FILE_NAME, this.session.getItem('authToken', 'session'), 'GET', true, undefined, prefix);\n }\n}\n__decorate([\n observable\n], FileUpload.prototype, \"gridCriteria\", void 0);\n__decorate([\n Connect\n], FileUpload.prototype, \"connect\", void 0);\n__decorate([\n Http\n], FileUpload.prototype, \"http\", void 0);\n__decorate([\n Session\n], FileUpload.prototype, \"session\", void 0);\n__decorate([\n attr({ attribute: 'uploaded-files-resource-name' })\n], FileUpload.prototype, \"uploadedFilesResourceName\", void 0);\n__decorate([\n attr({ attribute: 'upload-event-name' })\n], FileUpload.prototype, \"uploadEventName\", void 0);\n__decorate([\n attr({ attribute: 'field-name' })\n], FileUpload.prototype, \"fieldName\", void 0);\n__decorate([\n attr({ attribute: 'entity-id' })\n], FileUpload.prototype, \"entityId\", void 0);\n__decorate([\n attr({ attribute: 'upload-key' })\n], FileUpload.prototype, \"uploadKey\", void 0);\n__decorate([\n attr({ attribute: 'grid-fields' })\n], FileUpload.prototype, \"gridFields\", void 0);\n__decorate([\n observable\n], FileUpload.prototype, \"fileName\", void 0);\n__decorate([\n observable\n], FileUpload.prototype, \"uploadedFilesList\", void 0);\n__decorate([\n observable\n], FileUpload.prototype, \"filesGridColumnDefinitions\", void 0);\n// explicitly declaring for extensibility\nexport const foundationFileUploadShadowOptions = undefined;\nexport const defaultFileUploadConfig = {};\n/**\n * The Foundation File Upload\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-file-upload\\>\n */\nexport const foundationFileUpload = FileUpload.compose(Object.assign({ baseName: 'file-upload', styles,\n template, shadowOptions: foundationFileUploadShadowOptions }, defaultFileUploadConfig));\n","import { css } from '@microsoft/fast-element';\nexport const foundationFilterStyles = css `\n .filter-wrapper {\n border: 1px solid gray;\n border-radius: calc(var(--design-unit) * 2px);\n padding: calc(var(--design-unit) * 1px);\n }\n\n .close-icon {\n display: flex;\n place-content: center;\n align-items: center;\n flex-direction: column;\n align-content: center;\n justify-content: center;\n margin: calc(var(--design-unit) * 1px);\n padding: calc(var(--design-unit) * 1px);\n border: 1px solid transparent;\n border-radius: calc(var(--design-unit) * 2px);\n cursor: pointer;\n }\n\n .close-icon,\n .cloase-icon svg path {\n transition-property: all;\n transition-timing-function: linear;\n transition-duration: 300ms;\n }\n\n .close-icon:hover {\n border-color: red;\n background: rgb(255 0 0 / 25%);\n }\n\n .close-icon:hover svg path {\n fill: red;\n }\n\n .flex-row {\n display: flex;\n flex-direction: row;\n align-content: center;\n justify-content: space-between;\n align-items: center;\n }\n\n .flex-row zero-text-field,\n .flex-row zero-select,\n .flex-row foundation-text-field,\n .flex-row foundation-select {\n flex: 1;\n }\n`;\n","import { sync } from '@genesislcap/foundation-utils';\nimport { html, ref, repeat } from '@microsoft/fast-element';\nimport { closeIcon } from '../_common/icons';\nimport { getPrefix } from '../utils';\nconst closeIconTemplate = html `\n <div class=\"close-icon\" @click=${(x) => x.clear()}>${closeIcon()}</div>\n`;\nconst textFilterTemplate = (prefix) => html `\n <div class=\"flex-row\">\n <div>${(x) => x.label}</div>\n ${closeIconTemplate}\n </div>\n <div class=\"flex-row\">\n <${prefix}-text-field\n ${ref('textFilterField')}\n type=\"text\"\n :value=${sync((x) => x.textFilter)}\n />\n </div>\n`;\nconst numberFilterTemplate = (prefix) => html `\n <div class=\"flex-row\">\n <div>${(x) => x.label}</div>\n ${closeIconTemplate}\n </div>\n <div class=\"flex-row\">\n <${prefix}-text-field\n ${ref('numFilterFieldMin')}\n type=\"number\"\n :value=${sync((x) => x.numFilterMin)}\n placeholder=\"min\"\n ></${prefix}-text-field>\n <${prefix}-text-field\n ${ref('numFilterFieldMax')}\n type=\"number\"\n :value=${sync((x) => x.numFilterMax)}\n placeholder=\"max\"\n ></${prefix}-text-field>\n </div>\n`;\nconst dateFilterTemplate = (prefix) => html `\n <div class=\"flex-row\">\n <div>${(x) => x.label}</div>\n ${closeIconTemplate}\n </div>\n <div class=\"flex-row\">\n <${prefix}-text-field\n ${ref('dateFilterFieldMin')}\n type=\"date\"\n :value=${sync((x) => x.dateFilterMin)}\n ></${prefix}-text-field>\n <${prefix}-text-field\n ${ref('dateFilterFieldMax')}\n type=\"date\"\n :value=${sync((x) => x.dateFilterMax)}\n ></${prefix}-text-field>\n </div>\n`;\nfunction targetValue(ctx) {\n var _a, _b, _c;\n return (_c = (_b = (_a = ctx === null || ctx === void 0 ? void 0 : ctx.event) === null || _a === void 0 ? void 0 : _a.target) === null || _b === void 0 ? void 0 : _b.value) !== null && _c !== void 0 ? _c : 'all';\n}\nconst booleanFilterOptions = [\n { name: 'All', value: 'all', selected: true },\n { name: 'True', value: 'true' },\n { name: 'False', value: 'false' },\n { name: 'N/A', value: 'null' },\n];\nconst booleanFilterTemplate = (prefix) => html `\n <div class=\"flex-row\">\n <div>${(x) => x.label}</div>\n ${closeIconTemplate}\n </div>\n <div class=\"flex-row\">\n <${prefix}-select @change=\"${(x, c) => x.onBooleanFilterSelection(targetValue(c))}}\">\n ${repeat(() => booleanFilterOptions, html `\n <${prefix}-option value=\"${(x) => x.value}\" selected=\"${(x) => x.selected}\">\n ${(x) => x.name}\n </${prefix}-option>\n `)}\n </${prefix}-select>\n </div>\n`;\nconst enumFilterTemplate = (prefix) => html `\n <div class=\"flex-row\">\n <div>${(x) => x.label}</div>\n ${closeIconTemplate}\n </div>\n <div class=\"flex-row\">\n <${prefix}-select @change=\"${(x, c) => x.onEnumFilterSelection(targetValue(c))}}\">\n ${repeat((x) => x.enumFilterOptions, html `\n <${prefix}-option value=\"${(x) => x.value}\" selected=\"${(x) => x.selected}\">\n ${(x) => x.name}\n </${prefix}-option>\n `)}\n </${prefix}-select>\n </div>\n`;\nconst selectTemplate = (x, prefix) => {\n switch (x.type) {\n case 'number':\n return numberFilterTemplate(prefix);\n case 'date':\n return dateFilterTemplate(prefix);\n case 'boolean':\n return booleanFilterTemplate(prefix);\n case 'enum':\n return enumFilterTemplate(prefix);\n default:\n return textFilterTemplate(prefix);\n }\n};\nexport const getPrefixedFilterTemplate = (prefix) => html `\n <div class=\"filter-wrapper\">${(x) => selectTemplate(x, prefix)}</div>\n`;\nexport const foundationFilterTemplate = html `\n ${(x) => getPrefixedFilterTemplate(getPrefix(x))}</div>\n`;\n","import { __decorate } from \"tslib\";\nimport { attr, observable } from '@microsoft/fast-element';\nimport { FoundationElement } from '@microsoft/fast-foundation';\nimport { foundationFilterStyles as styles } from './filter.styles';\nimport { foundationFilterTemplate as template } from './filter.template';\nexport var FilterEvents;\n(function (FilterEvents) {\n FilterEvents[\"change\"] = \"filter-changed\";\n FilterEvents[\"clear\"] = \"filter-cleared\";\n})(FilterEvents || (FilterEvents = {}));\n/**\n * @tagname %%prefix%%-filter\n */\nexport class Filter extends FoundationElement {\n constructor() {\n super(...arguments);\n this.type = 'text';\n this.textFilter = '';\n this.enumFilterOptions = [{ name: 'All', value: 'all', selected: true }];\n }\n textFilterChanged(oldCriteria, newCriteria) {\n if (!(newCriteria === null || newCriteria === void 0 ? void 0 : newCriteria.length)) {\n // treat empty string as clear\n this.$emit(FilterEvents.clear, {\n fieldName: this.fieldName,\n target: this.target,\n });\n return;\n }\n const newFilter = `Expr.containsIgnoreCase(${this.fieldName},'${newCriteria}')`;\n this.$emit(FilterEvents.change, {\n fieldName: this.fieldName,\n filter: newFilter,\n target: this.target,\n });\n }\n numFilterMinChanged(oldMin, newMin) {\n this.numFilterMin = Number.isFinite(Number(newMin)) ? Number(newMin) : undefined;\n this.handleNumericFilter(this.numFilterMin, this.numFilterMax);\n }\n numFilterMaxChanged(oldMax, newMax) {\n this.numFilterMax = Number.isFinite(Number(newMax)) ? Number(newMax) : undefined;\n this.handleNumericFilter(this.numFilterMin, this.numFilterMax);\n }\n handleNumericFilter(min, max) {\n if (!Number.isFinite(min) && !Number.isFinite(max)) {\n this.$emit(FilterEvents.clear, {\n fieldName: this.fieldName,\n target: this.target,\n });\n return;\n }\n const minFilter = `${this.fieldName} >= ${min}`;\n const maxFilter = `${this.fieldName} <= ${max}`;\n const newFilter = !Number.isFinite(min)\n ? maxFilter\n : !Number.isFinite(max)\n ? minFilter\n : `(${minFilter} && ${maxFilter})`;\n this.$emit(FilterEvents.change, {\n fieldName: this.fieldName,\n filter: newFilter,\n target: this.target,\n });\n }\n /**\n * Example: 1634083200000 -> '20211013-00:00:00'\n * @param epoch ms since unix epoch\n * @returns date string compatible with genesis Expr filters\n */\n formatDate(epoch) {\n if (!Number.isFinite(epoch))\n return undefined;\n // eslint-disable-next-line @typescript-eslint/no-magic-numbers\n return new Date(epoch).toISOString().slice(0, 19).replace(/-/g, '').replace('T', '-');\n }\n dateFilterMinChanged(oldMin, newMin) {\n this.dateMinMS = Date.parse(newMin);\n this.handleDateFilter(this.dateMinMS, this.dateMaxMS);\n }\n dateFilterMaxChanged(oldMax, newMax) {\n this.dateMaxMS = Date.parse(newMax);\n this.handleDateFilter(this.dateMinMS, this.dateMaxMS);\n }\n handleDateFilter(min, max) {\n if (!Number.isFinite(min) && !Number.isFinite(max)) {\n this.$emit(FilterEvents.clear, {\n fieldName: this.fieldName,\n });\n return;\n }\n const minFilter = `Expr.dateTimeIsAfter(${this.fieldName}, '${this.formatDate(min)}')`;\n const maxFilter = `Expr.dateTimeIsBefore(${this.fieldName}, '${this.formatDate(max)}')`;\n const newFilter = !Number.isFinite(min)\n ? maxFilter\n : !Number.isFinite(max)\n ? minFilter\n : `(${minFilter} && ${maxFilter})`;\n this.$emit(FilterEvents.change, {\n fieldName: this.fieldName,\n filter: newFilter,\n target: this.target,\n });\n }\n connectedCallback() {\n var _a;\n super.connectedCallback();\n if ((_a = this.enumOptions) === null || _a === void 0 ? void 0 : _a.length) {\n const delimiter = this.enumOptions.includes('|') ? '|' : ','; // TODO: confirm delimiter\n const newOptions = this.enumOptions\n .split(delimiter)\n .map((opt) => ({ name: opt, value: opt }));\n this.enumFilterOptions = [{ name: 'All', value: 'all', selected: true }, ...newOptions];\n }\n }\n clear() {\n switch (this.type) {\n case 'number':\n this.numFilterFieldMin.value = undefined;\n this.numFilterFieldMax.value = undefined;\n this.numFilterMin = undefined;\n this.numFilterMax = undefined;\n break;\n case 'date':\n this.dateFilterFieldMin.value = '';\n this.dateFilterFieldMax.value = '';\n this.dateMinMS = NaN;\n this.dateMaxMS = NaN;\n break;\n case 'text':\n this.textFilterField.value = '';\n }\n this.$emit(FilterEvents.clear, {\n fieldName: this.fieldName,\n target: this.target,\n });\n }\n onBooleanFilterSelection(selection) {\n if (!selection || selection === 'all') {\n this.$emit(FilterEvents.clear, {\n fieldName: this.fieldName,\n target: this.target,\n });\n return;\n }\n this.$emit(FilterEvents.change, {\n fieldName: this.fieldName,\n filter: `${this.fieldName} == ${selection}`,\n target: this.target,\n });\n }\n onEnumFilterSelection(selection) {\n if (!selection || selection === 'all') {\n this.$emit(FilterEvents.clear, {\n fieldName: this.fieldName,\n target: this.target,\n });\n return;\n }\n this.$emit(FilterEvents.change, {\n fieldName: this.fieldName,\n filter: `${this.fieldName} == \"${selection}\"`,\n target: this.target,\n });\n }\n}\n__decorate([\n attr\n], Filter.prototype, \"fieldName\", void 0);\n__decorate([\n attr\n], Filter.prototype, \"type\", void 0);\n__decorate([\n attr\n], Filter.prototype, \"label\", void 0);\n__decorate([\n attr\n], Filter.prototype, \"target\", void 0);\n__decorate([\n observable\n], Filter.prototype, \"textFilter\", void 0);\n__decorate([\n observable\n], Filter.prototype, \"numFilterMin\", void 0);\n__decorate([\n observable\n], Filter.prototype, \"numFilterMax\", void 0);\n__decorate([\n observable\n], Filter.prototype, \"dateFilterMin\", void 0);\n__decorate([\n observable\n], Filter.prototype, \"dateFilterMax\", void 0);\n__decorate([\n attr\n], Filter.prototype, \"enumOptions\", void 0);\n__decorate([\n observable\n], Filter.prototype, \"enumFilterOptions\", void 0);\nexport const foundationFilter = Filter.compose({\n baseName: 'filter',\n template,\n styles,\n});\n","import { css } from '@microsoft/fast-element';\nexport const foundationFilterBarStyles = (context, definition) => css `\n .filter-bar {\n background-color: #2c2f33;\n padding: calc(var(--design-unit) * 2px);\n transition: all 0.5s ease-out;\n }\n\n .filter-grid {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n grid-auto-rows: minmax(64px, auto);\n gap: calc(var(--design-unit) * 1px);\n align-items: end;\n justify-items: stretch;\n }\n\n .toggle {\n display: flex;\n justify-content: center;\n min-height: 20px;\n cursor: pointer;\n border-radius: calc(var(--control-corner-radius) * 1px) calc(var(--control-corner-radius) * 1px)\n 0 0;\n border-top: 2px solid;\n color: #f44378;\n }\n\n .collapsed {\n max-height: 0;\n padding: 0;\n overflow: hidden;\n }\n\n .toggle-collapsed {\n color: #48ed9c;\n }\n`;\n","export const mapType = (TYPE) => {\n switch (TYPE) {\n case 'INT':\n case 'DOUBLE':\n case 'LONG':\n return 'number';\n case 'DATETIME':\n return 'date';\n case 'BOOLEAN':\n return 'boolean';\n case 'ENUM':\n return 'enum';\n case 'TEXT':\n default:\n return 'text';\n }\n};\n","import { html, ref, repeat, when } from '@microsoft/fast-element';\nimport { classNames } from '@microsoft/fast-web-utilities';\nimport { getPrefix } from '../utils';\nimport { mapType } from './filter-bar.utils';\nconst loadingTemplate = html `\n <p>Fetching metadata for ${(x) => x.resource}...</p>\n`;\nconst collapseIcon = (prefix) => html `\n ${when((x) => x.collapsed, html `\n <${prefix}-icon name=\"chevron-up\"></${prefix}-icon>\n `)}\n ${when((x) => !x.collapsed, html `\n <${prefix}-icon name=\"chevron-down\"></${prefix}-icon>\n `)}\n`;\nexport const filterBarTemplate = (prefix) => html `\n <div\n class=${(x) => classNames(['toggle', true], ['toggle-collapsed', x.collapsed])}\n @click=\"${(x) => x.toggle()}\"\n >\n ${collapseIcon(prefix)}\n </div>\n <div class=${(x) => classNames(['filter-bar', true], ['collapsed', x.collapsed])}>\n <div class=\"filter-grid\" ${ref('filterGrid')}>\n ${repeat((x) => x.fields, html `\n <${prefix}-filter\n label=\"${(x) => x.UI_LABEL}\"\n target=\"${(x, c) => { var _a; return (_a = c.parent) === null || _a === void 0 ? void 0 : _a.target; }}\"\n type=\"${(x) => mapType(x.TYPE)}\"\n fieldName=\"${(x) => x.NAME}\"\n enumOptions=\"${(x) => x.VALID_VALUES}\"\n ></${prefix}-filter>\n `)}\n </div>\n </div>\n`;\nexport const foundationFilterBarTemplate = html `\n ${(x) => (x.ready ? filterBarTemplate(getPrefix(x)) : loadingTemplate)}\n`;\n","import { __decorate } from \"tslib\";\nimport { Connect } from '@genesislcap/foundation-comms';\nimport { attr, observable } from '@microsoft/fast-element';\nimport { FoundationElement } from '@microsoft/fast-foundation';\nimport { pascalCase } from '@microsoft/fast-web-utilities';\nimport { logger } from '../utils';\nimport { foundationFilterBarStyles as styles } from './filter-bar.styles';\nimport { foundationFilterBarTemplate as template } from './filter-bar.template';\nexport const DEFUALT_FILTER_BAR_COLUMNS = 5;\n/**\n * @tagname %%prefix%%-filter-bar\n */\nexport class FilterBar extends FoundationElement {\n constructor() {\n super(...arguments);\n this.columns = DEFUALT_FILTER_BAR_COLUMNS;\n this.ready = false;\n this.collapsed = true;\n }\n connectedCallback() {\n super.connectedCallback();\n this.init();\n }\n initLabels() {\n var _a, _b, _c, _d;\n let customLabels = false;\n let labels = [];\n if ((_a = this === null || this === void 0 ? void 0 : this.labels) === null || _a === void 0 ? void 0 : _a.length) {\n labels = (_b = this.labels.split(',')) === null || _b === void 0 ? void 0 : _b.map((l) => l.trim());\n customLabels = ((_c = this.fields) === null || _c === void 0 ? void 0 : _c.length) === (labels === null || labels === void 0 ? void 0 : labels.length);\n }\n for (let i = 0; i < (((_d = this.fields) === null || _d === void 0 ? void 0 : _d.length) || 0); i += 1) {\n const label = customLabels\n ? labels[i]\n : this.camelCasePreserveWhitespace(this.fields[i].NAME.replace(/_/g, ' '));\n this.fields[i].UI_LABEL = label;\n }\n }\n camelCasePreserveWhitespace(input) {\n return input\n .split(' ')\n .map((s) => pascalCase(s))\n .join(' ');\n }\n resourceChanged(oldResource, newResource) {\n if (oldResource === newResource || !(oldResource === null || oldResource === void 0 ? void 0 : oldResource.length))\n return;\n this.init();\n }\n init() {\n this.ready = false;\n this.connect\n .getMetadata(this.resource)\n .then((meta) => {\n var _a, _b;\n this.fields = meta.FIELD;\n if ((_a = this.only) === null || _a === void 0 ? void 0 : _a.length) {\n const desiredFields = this.only.split(',').map((f) => f.trim());\n const maintainOrder = (a, b) => desiredFields.indexOf(a.NAME) > desiredFields.indexOf(b.NAME) ? 1 : -1;\n this.fields = (_b = this.fields) === null || _b === void 0 ? void 0 : _b.filter((f) => desiredFields.includes(f.NAME)).sort(maintainOrder);\n }\n this.ready = true;\n })\n .then(() => this.initLabels())\n .then(() => window.requestAnimationFrame(() => {\n this.adjustColumnStyles();\n }))\n .catch((e) => logger.error(e));\n }\n adjustColumnStyles() {\n if (!this.filterGrid)\n return;\n this.filterGrid.style['grid-template-columns'] = `repeat(${this.columns}, 1fr)`;\n }\n toggle() {\n if (!this.ready)\n return;\n this.collapsed = !this.collapsed;\n }\n}\n__decorate([\n attr\n], FilterBar.prototype, \"resource\", void 0);\n__decorate([\n attr\n], FilterBar.prototype, \"only\", void 0);\n__decorate([\n attr\n], FilterBar.prototype, \"labels\", void 0);\n__decorate([\n attr\n], FilterBar.prototype, \"target\", void 0);\n__decorate([\n attr\n], FilterBar.prototype, \"columns\", void 0);\n__decorate([\n observable\n], FilterBar.prototype, \"ready\", void 0);\n__decorate([\n observable\n], FilterBar.prototype, \"fields\", void 0);\n__decorate([\n Connect\n], FilterBar.prototype, \"connect\", void 0);\n__decorate([\n observable\n], FilterBar.prototype, \"collapsed\", void 0);\n/**\n * The Foundation Filter\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-filter-bar\\>\n */\nexport const foundationFilterBar = FilterBar.compose({\n baseName: 'filter-bar',\n template,\n styles,\n});\n","import { html } from '@microsoft/fast-element';\nexport const foundationFlexLayoutTemplate = html `\n <template>\n <slot></slot>\n </template>\n`;\n","export var FlexMediaQueriesEnum;\n(function (FlexMediaQueriesEnum) {\n FlexMediaQueriesEnum[\"sm\"] = \"(max-width: 640px)\";\n FlexMediaQueriesEnum[\"md\"] = \"(min-width: 641px) and (max-width: 1023px)\";\n FlexMediaQueriesEnum[\"lg\"] = \"(min-width: 1024px)\";\n})(FlexMediaQueriesEnum || (FlexMediaQueriesEnum = {}));\n","import { css } from '@microsoft/fast-element';\nimport { FlexMediaQueriesEnum } from '../flex-layout.types';\nexport const flexLayoutRWDStyles = (breakPoint) => {\n const bp = breakPoint ? `-${breakPoint}` : ``;\n return css `\n ${bp && `@media only screen and ${FlexMediaQueriesEnum[breakPoint]} {`}\n :host(.spacing${bp}-1x) slot {\n gap: calc(var(--design-unit) * 2px);\n }\n\n :host(.spacing${bp}-2x) slot {\n gap: calc(var(--design-unit) * 4px);\n }\n\n :host(.spacing${bp}-3x) slot {\n gap: calc(var(--design-unit) * 6px);\n }\n\n :host(.spacing${bp}-4x) slot {\n gap: calc(var(--design-unit) * 8px);\n }\n\n :host(.spacing${bp}-5x) slot {\n gap: calc(var(--design-unit) * 10px);\n }\n\n :host(.spacing${bp}-6x) slot {\n gap: calc(var(--design-unit) * 12px);\n }\n\n :host(.flex${bp}-column) slot {\n flex-direction: column;\n }\n\n :host(.flex${bp}-column-reverse) slot {\n flex-direction: column-reverse;\n }\n\n :host(.flex${bp}-row) slot {\n flex-direction: row;\n }\n\n :host(.flex${bp}-row-reverse) slot {\n flex-direction: row-reverse;\n }\n\n :host(.flex${bp}-wrap) slot {\n flex-wrap: wrap;\n }\n\n :host(.flex${bp}-wrap-reverse) slot {\n flex-wrap: wrap-reverse;\n }\n\n :host(.justify${bp}-start) slot {\n justify-content: flex-start;\n }\n\n :host(.justify${bp}-end) slot {\n justify-content: flex-end;\n }\n\n :host(.justify${bp}-center) slot {\n justify-content: center;\n }\n\n :host(.justify${bp}-between) slot {\n justify-content: space-between;\n }\n\n :host(.justify${bp}-around) slot {\n justify-content: space-around;\n }\n\n :host(.justify${bp}-evenly) slot {\n justify-content: space-evenly;\n }\n\n :host(.items${bp}-start) slot {\n align-items: flex-start;\n }\n\n :host(.items${bp}-end) slot {\n align-items: flex-end;\n }\n\n :host(.items${bp}-center) slot {\n align-items: center;\n }\n\n :host(.items${bp}-stretch) slot {\n align-items: stretch;\n }\n\n :host(.items${bp}-baseline) slot {\n align-items: baseline;\n }\n\n :host(.content${bp}-start) slot {\n align-content: flex-start;\n }\n\n :host(.content${bp}-end) slot {\n align-content: flex-end;\n }\n\n :host(.content${bp}-center) slot {\n align-content: center;\n }\n\n :host(.content${bp}-between) slot {\n align-content: space-between;\n }\n\n :host(.content${bp}-around) slot {\n align-content: space-around;\n }\n\n :host(.content${bp}-evenly) slot {\n align-content: space-evenly;\n }\n ${bp && `}`}\n `;\n};\n","import { css } from '@microsoft/fast-element';\nimport { flexLayoutRWDStyles } from './responsiveness';\nexport const foundationFlexLayoutStyles = css `\n :host {\n width: 100%;\n height: 100%;\n }\n\n slot {\n width: 100%;\n height: 100%;\n display: flex;\n }\n\n ${flexLayoutRWDStyles()}\n ${flexLayoutRWDStyles('lg')}\n ${flexLayoutRWDStyles('md')}\n ${flexLayoutRWDStyles('sm')}\n`;\n","import { FoundationElement } from '@microsoft/fast-foundation';\nimport { foundationFlexLayoutStyles as styles } from './flex-layout.styles';\nimport { foundationFlexLayoutTemplate as template } from './flex-layout.template';\n// explicitly declaring for extensibility\nexport const foundationFlexLayoutShadowOptions = undefined;\nexport const defaultFlexLayoutConfig = {};\n/**\n * @tagname %%prefix%%-flex-layout\n */\nexport class FlexLayout extends FoundationElement {\n}\n/**\n * The Foundation Flex Layout\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-flex-layout\\>\n */\nexport const foundationFlexLayout = FlexLayout.compose(Object.assign({ baseName: 'flex-layout', styles,\n template, shadowOptions: foundationFlexLayoutShadowOptions }, defaultFlexLayoutConfig));\n","import { flipperTemplate as fastFlipperTemplate } from '@microsoft/fast-foundation';\nexport const foundationFlipperTemplate = (context, definition) => fastFlipperTemplate(context, definition);\n","import { flipperStyles as fastFlipperStyles } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationFlipperStyles = (context, definition) => css `\n ${fastFlipperStyles(context, definition)}\n`;\n","import { Flipper as FASTFlipper } from '@microsoft/fast-components';\nimport { foundationFlipperStyles as styles } from './flipper.styles';\nimport { foundationFlipperTemplate as template } from './flipper.template';\n/**\n * @tagname %%prefix%%-flipper\n */\nexport class Flipper extends FASTFlipper {\n}\n// explicitly declaring for extensibility\nexport const foundationFlipperShadowOptions = undefined;\nexport const defaultFlipperConfig = {\n next: `\n <svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M4.023 15.273L11.29 8 4.023.727l.704-.704L12.71 8l-7.984 7.977-.704-.704z\"\n />\n </svg>\n `,\n previous: `\n <svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M11.273 15.977L3.29 8 11.273.023l.704.704L4.71 8l7.266 7.273-.704.704z\"\n />\n </svg>\n `,\n};\n/**\n * The Foundation Flipper\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-flipper\\>\n */\nexport const foundationFlipper = Flipper.compose(Object.assign({ baseName: 'flipper', template,\n styles, shadowOptions: foundationFlipperShadowOptions }, defaultFlipperConfig));\n","import { css } from '@microsoft/fast-element';\nexport const flyoutAnimationTime = 225;\nexport const foundationFlyoutStyles = css `\n /* Host */\n :host {\n display: inline-block;\n height: 100vh;\n position: absolute;\n width: 100vw;\n }\n\n :host([closed]) {\n display: none;\n }\n\n div.container {\n height: 100%;\n width: 100%;\n }\n\n /* flyout */\n div.flyout {\n background-color: white;\n color: black;\n height: 100%;\n position: absolute;\n /* stylelint-disable-next-line function-name-case */\n transition: transform ${flyoutAnimationTime.toString()}ms ease-in;\n width: 20%;\n z-index: 2001;\n }\n\n :host([position='left']) div.flyout {\n left: 0;\n transform: translateX(0%);\n }\n\n :host([position='right']) div.flyout {\n right: 0;\n transform: translateX(0%);\n }\n\n :host([visuallyhidden][position='left']) div.flyout {\n left: 0;\n transform: translateX(-100%);\n }\n\n :host([visuallyhidden][position='right']) div.flyout {\n right: 0;\n transform: translateX(100%);\n }\n\n div.header {\n align-items: center;\n display: flex;\n padding: calc(var(--design-unit) * 3px) calc(var(--design-unit) * 2px);\n }\n\n div.title {\n flex-grow: 1;\n }\n\n div.footer {\n bottom: 0;\n position: absolute;\n width: 100%;\n }\n\n /* Background */\n div.background {\n background-color: black;\n height: 100%;\n opacity: 50%;\n position: absolute;\n /* stylelint-disable-next-line function-name-case */\n transition: opacity ${flyoutAnimationTime.toString()}ms linear;\n width: 100%;\n z-index: 2000;\n }\n\n :host([visuallyhidden]) div.background {\n opacity: 0%;\n }\n`;\n","import { html, when, ref } from '@microsoft/fast-element';\nimport { getPrefix } from '../utils/dom';\nexport const getPrefixedFlyout = (prefix) => html `\n <div ?closed=${(x) => x.closed} ?visuallyhidden=${(x) => x.visuallyhidden}>\n <div class=\"container\">\n <div class=\"background\" part=\"background\" @click=${(x) => x.closeFlyout()}></div>\n <div class=\"flyout\" part=\"flyout\" @transitionend=${(x) => x.closingFinished()}>\n ${when((x) => x.displayHeader, html `\n <div class=\"header\" part=\"header\">\n <div class=\"title\" part=\"title\">\n <slot name=\"title\"></slot>\n </div>\n <${prefix}-button class=\"exit\" part=\"exit\" aria-label=\"exit\" ${ref('exit')} appearance=\"stealth\" @click=${(x) => x.closeFlyout()}>\n <${prefix}-icon name=\"times\"></${prefix}-icon>\n </${prefix}-button>\n </div>\n `)}\n <div class=\"content\" part=\"content\">\n <slot></slot>\n </div>\n <div class=\"footer\" part=\"footer\">\n <slot name=\"footer\"></slot>\n </div>\n </div>\n </div>\n </div>\n`;\nexport const foundationFlyoutTemplate = html `\n ${(x) => getPrefixedFlyout(getPrefix(x))}\n`;\n","import { __decorate } from \"tslib\";\nimport { attr } from '@microsoft/fast-element';\nimport { FoundationElement } from '@microsoft/fast-foundation';\nimport { foundationFlyoutStyles as styles } from './flyout.styles';\nimport { foundationFlyoutTemplate as template } from './flyout.template';\n/**\n * @tagname %%prefix%%-flyout\n */\nexport class Flyout extends FoundationElement {\n constructor() {\n super(...arguments);\n this.position = 'right';\n this.displayHeader = true;\n this.closed = true;\n this.visuallyhidden = true;\n }\n closedChanged() {\n if (!this.closed) {\n // TODO: timeout shouldn't be necessary here but without it opening transition doesn't work\n setTimeout(() => (this.visuallyhidden = false), 1);\n this.focusExit();\n }\n }\n closeFlyout() {\n this.visuallyhidden = true;\n }\n closingFinished() {\n if (this.visuallyhidden) {\n this.closed = true;\n this.$emit('closed');\n }\n }\n focusExit() {\n this.exit.focus();\n }\n}\n__decorate([\n attr\n], Flyout.prototype, \"position\", void 0);\n__decorate([\n attr({ mode: 'boolean' })\n], Flyout.prototype, \"displayHeader\", void 0);\n__decorate([\n attr({ mode: 'boolean' })\n], Flyout.prototype, \"closed\", void 0);\n__decorate([\n attr({ mode: 'boolean' })\n], Flyout.prototype, \"visuallyhidden\", void 0);\n// explicitly declaring for extensibility\nexport const foundationFlyoutShadowOptions = undefined;\nexport const defaultFlyoutConfig = {};\n/**\n * The Foundation Flyout\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-flyout\\>\n */\nexport const foundationFlyout = Flyout.compose(Object.assign({ baseName: 'flyout', styles,\n template, shadowOptions: foundationFlyoutShadowOptions }, defaultFlyoutConfig));\n","import { html } from '@microsoft/fast-element';\nexport const foundationGridLayoutTemplate = html `\n <template>\n <slot></slot>\n </template>\n`;\n","export var GridMediaQueriesEnum;\n(function (GridMediaQueriesEnum) {\n GridMediaQueriesEnum[\"sm\"] = \"(max-width: 640px)\";\n GridMediaQueriesEnum[\"md\"] = \"(min-width: 641px) and (max-width: 1023px)\";\n GridMediaQueriesEnum[\"lg\"] = \"(min-width: 1024px)\";\n})(GridMediaQueriesEnum || (GridMediaQueriesEnum = {}));\n","import { css } from '@microsoft/fast-element';\nimport { GridMediaQueriesEnum } from '../grid-layout.types';\nexport const gridLayoutRWDStyles = (breakPoint) => {\n const bp = breakPoint ? `-${breakPoint}` : ``;\n return css `\n ${bp && `@media only screen and ${GridMediaQueriesEnum[breakPoint]} {`}\n :host(.spacing${bp}-1x) slot {\n gap: calc(var(--design-unit) * 2px);\n }\n\n :host(.spacing${bp}-2x) slot {\n gap: calc(var(--design-unit) * 4px);\n }\n\n :host(.spacing${bp}-3x) slot {\n gap: calc(var(--design-unit) * 6px);\n }\n\n :host(.spacing${bp}-4x) slot {\n gap: calc(var(--design-unit) * 8px);\n }\n\n :host(.spacing${bp}-5x) slot {\n gap: calc(var(--design-unit) * 10px);\n }\n\n :host(.spacing${bp}-6x) slot {\n gap: calc(var(--design-unit) * 12px);\n }\n\n :host(.flow${bp}-row) slot {\n grid-auto-flow: row;\n }\n\n :host(.flow${bp}-column) slot {\n grid-auto-flow: column;\n }\n\n :host(.flow${bp}-row-dense) slot {\n grid-auto-flow: row dense;\n }\n\n :host(.flow${bp}-column-dense) slot {\n grid-auto-flow: column dense;\n }\n\n :host(.content${bp}-center) slot {\n place-content: center;\n }\n\n :host(.content${bp}-start) slot {\n place-content: start;\n }\n\n :host(.content${bp}-end) slot {\n place-content: end;\n }\n\n :host(.content${bp}-between) slot {\n place-content: space-between;\n }\n\n :host(.content${bp}-around) slot {\n place-content: space-around;\n }\n\n :host(.content${bp}-evenly) slot {\n place-content: space-evenly;\n }\n\n :host(.content${bp}-stretch) slot {\n place-content: stretch;\n }\n\n :host(.place${bp}-items-start) slot {\n place-items: start;\n }\n\n :host(.place${bp}-items-end) slot {\n place-items: end;\n }\n\n :host(.place${bp}-items-center) slot {\n place-items: center;\n }\n\n :host(.place${bp}-items-stretch) slot {\n place-items: stretch;\n }\n ${bp && `}`}\n `;\n};\n","import { css } from '@microsoft/fast-element';\nimport { gridLayoutRWDStyles } from './responsiveness';\nexport const foundationGridLayoutStyles = css `\n slot {\n width: 100%;\n height: 100%;\n display: grid;\n }\n\n ${gridLayoutRWDStyles()}\n ${gridLayoutRWDStyles('lg')}\n ${gridLayoutRWDStyles('md')}\n ${gridLayoutRWDStyles('sm')}\n`;\n","import { __decorate } from \"tslib\";\nimport { attr, css, cssPartial, } from '@microsoft/fast-element';\nimport { FoundationElement } from '@microsoft/fast-foundation';\nimport { foundationGridLayoutStyles as styles } from './grid-layout.styles';\nimport { foundationGridLayoutTemplate as template } from './grid-layout.template';\nimport { GridMediaQueriesEnum } from './grid-layout.types';\nexport const foundationGridLayoutShadowOptions = undefined;\nexport const defaultGridLayoutConfig = {};\nclass ResponsiveGridBehavior {\n constructor(query, cols, rows, width = '1fr', height = '1fr') {\n this.listenerCache = new WeakMap();\n this.query = window.matchMedia(query);\n const colPartial = cols && cssPartial `grid-template-columns: repeat(${cols}, ${width});`;\n const rowPartial = rows && cssPartial `grid-template-rows: repeat(${rows}, ${height});`;\n this.styles = css `\n slot {\n ${rowPartial || ''}\n ${colPartial || ''}\n }\n `;\n }\n bind(source) {\n let attached = false;\n const listener = (event) => {\n const { matches } = event;\n if (matches && !attached) {\n source.$fastController.addStyles(this.styles);\n attached = true;\n }\n else if (!matches && attached) {\n this.styles && source.$fastController.removeStyles(this.styles);\n attached = false;\n }\n };\n listener({ matches: this.query.matches });\n this.query.addEventListener('change', listener);\n this.listenerCache.set(source, listener);\n }\n unbind(source) {\n const listener = this.listenerCache.get(source);\n if (listener) {\n this.query.removeEventListener('change', listener);\n this.listenerCache.delete(source);\n }\n this.styles && source.$fastController.removeStyles(this.styles);\n }\n}\n/**\n * @tagname %%prefix%%-grid-layout\n */\nexport class GridLayout extends FoundationElement {\n constructor() {\n super(...arguments);\n this.behaviors = [];\n }\n connectedCallback() {\n super.connectedCallback();\n this.behaviors = Object.keys(GridMediaQueriesEnum)\n .map((bp) => {\n if (!this[`col-${bp}-count`] && !this[`row-${bp}-count`]) {\n return;\n }\n return new ResponsiveGridBehavior(GridMediaQueriesEnum[bp], this[`col-${bp}-count`], this[`row-${bp}-count`], this[`col-${bp}-width`], this[`row-${bp}-height`]);\n })\n .filter((x) => !!x);\n const rowPartial = this['row-count'] &&\n cssPartial `grid-template-rows: repeat(${this['row-count']}, ${this['row-height'] || '1fr'});`;\n const colPartial = this['col-count'] &&\n cssPartial `grid-template-columns: repeat(${this['col-count']}, ${this['col-width'] || '1fr'});`;\n this.baseStyles = css `\n slot {\n ${rowPartial || ''}\n ${colPartial || ''}\n }\n `;\n this.$fastController.addStyles(this.baseStyles);\n this.$fastController.addBehaviors(this.behaviors);\n }\n disconnectedCallback() {\n super.disconnectedCallback();\n this.$fastController.removeBehaviors(this.behaviors);\n this.baseStyles && this.$fastController.removeStyles(this.baseStyles);\n }\n}\n__decorate([\n attr\n], GridLayout.prototype, 'col-count', void 0);\n__decorate([\n attr\n], GridLayout.prototype, 'col-width', void 0);\n__decorate([\n attr\n], GridLayout.prototype, 'col-lg-count', void 0);\n__decorate([\n attr\n], GridLayout.prototype, 'col-lg-width', void 0);\n__decorate([\n attr\n], GridLayout.prototype, 'col-md-count', void 0);\n__decorate([\n attr\n], GridLayout.prototype, 'col-md-width', void 0);\n__decorate([\n attr\n], GridLayout.prototype, 'col-sm-count', void 0);\n__decorate([\n attr\n], GridLayout.prototype, 'col-sm-width', void 0);\n__decorate([\n attr\n], GridLayout.prototype, 'row-count', void 0);\n__decorate([\n attr\n], GridLayout.prototype, 'row-height', void 0);\n__decorate([\n attr\n], GridLayout.prototype, 'row-lg-count', void 0);\n__decorate([\n attr\n], GridLayout.prototype, 'row-lg-height', void 0);\n__decorate([\n attr\n], GridLayout.prototype, 'row-md-count', void 0);\n__decorate([\n attr\n], GridLayout.prototype, 'row-md-height', void 0);\n__decorate([\n attr\n], GridLayout.prototype, 'row-sm-count', void 0);\n__decorate([\n attr\n], GridLayout.prototype, 'row-sm-height', void 0);\n/**\n * The Foundation Grid Layout\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-grid-layout\\>\n */\nexport const foundationGridLayout = GridLayout.compose(Object.assign({ baseName: 'grid-layout', styles,\n template, shadowOptions: foundationGridLayoutShadowOptions }, defaultGridLayoutConfig));\n","import { html } from '@microsoft/fast-element';\nexport const foundationGridLayoutItemTemplate = html `\n <template>\n <style>\n :host {\n width: 100%;\n height: 100%;\n ${(x) => x.setGridItemProperties(x.colNumber, x.rowNumber, x.width, x.height)}\n }\n\n @media only screen and (min-width: 1025px) {\n :host {\n ${(x) => x.setGridItemProperties(x.colLgNumber, x.rowLgNumber, x.widthLg, x.heightLg)}\n }\n }\n\n @media only screen and (min-width: 641px) and (max-width: 1024px) {\n :host {\n ${(x) => x.setGridItemProperties(x.colMdNumber, x.rowMdNumber, x.widthSm, x.heightMd)}\n }\n }\n\n @media only screen and (max-width: 640px) {\n :host {\n ${(x) => x.setGridItemProperties(x.colSmNumber, x.rowSmNumber, x.widthSm, x.heightSm)}\n }\n }\n </style>\n <slot></slot>\n </template>\n`;\n","import { __decorate } from \"tslib\";\nimport { attr } from '@microsoft/fast-element';\nimport { FoundationElement } from '@microsoft/fast-foundation';\nimport { foundationGridLayoutItemTemplate as template } from './grid-layout-item.template';\nexport const foundationGridLayoutItemShadowOptions = undefined;\nexport const defaultGridLayoutItemConfig = {};\n/**\n * @tagname %%prefix%%-grid-layout-item\n */\nexport class GridLayoutItem extends FoundationElement {\n setGridItemProperties(column, row, width, height) {\n if (row && column && width && height) {\n const gridRow = row === 0 || height === 0 ? 'auto' : `${row} / ${Number(row) + Number(height)}`;\n const gridColumn = column === 0 || width === 0 ? 'auto' : `${column} / ${Number(column) + Number(width)}`;\n return `grid-row: ${gridRow}; grid-column: ${gridColumn}`;\n }\n }\n}\n__decorate([\n attr({ attribute: 'col-number' })\n], GridLayoutItem.prototype, \"colNumber\", void 0);\n__decorate([\n attr({ attribute: 'col-sm-number' })\n], GridLayoutItem.prototype, \"colSmNumber\", void 0);\n__decorate([\n attr({ attribute: 'col-md-number' })\n], GridLayoutItem.prototype, \"colMdNumber\", void 0);\n__decorate([\n attr({ attribute: 'col-lg-number' })\n], GridLayoutItem.prototype, \"colLgNumber\", void 0);\n__decorate([\n attr({ attribute: 'row-number' })\n], GridLayoutItem.prototype, \"rowNumber\", void 0);\n__decorate([\n attr({ attribute: 'row-sm-number' })\n], GridLayoutItem.prototype, \"rowSmNumber\", void 0);\n__decorate([\n attr({ attribute: 'row-md-number' })\n], GridLayoutItem.prototype, \"rowMdNumber\", void 0);\n__decorate([\n attr({ attribute: 'row-lg-number' })\n], GridLayoutItem.prototype, \"rowLgNumber\", void 0);\n__decorate([\n attr({ attribute: 'width' })\n], GridLayoutItem.prototype, \"width\", void 0);\n__decorate([\n attr({ attribute: 'width-sm' })\n], GridLayoutItem.prototype, \"widthSm\", void 0);\n__decorate([\n attr({ attribute: 'width-md' })\n], GridLayoutItem.prototype, \"widthMd\", void 0);\n__decorate([\n attr({ attribute: 'width-lg' })\n], GridLayoutItem.prototype, \"widthLg\", void 0);\n__decorate([\n attr({ attribute: 'height' })\n], GridLayoutItem.prototype, \"height\", void 0);\n__decorate([\n attr({ attribute: 'height-sm' })\n], GridLayoutItem.prototype, \"heightSm\", void 0);\n__decorate([\n attr({ attribute: 'height-md' })\n], GridLayoutItem.prototype, \"heightMd\", void 0);\n__decorate([\n attr({ attribute: 'height-lg' })\n], GridLayoutItem.prototype, \"heightLg\", void 0);\n/**\n * The Foundation Grid Layout Item\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-grid-layout-item\\>\n */\nexport const foundationGridLayoutItem = GridLayoutItem.compose(Object.assign({ baseName: 'grid-layout-item', template, shadowOptions: foundationGridLayoutItemShadowOptions }, defaultGridLayoutItemConfig));\n","import { horizontalScrollTemplate as fastHorizontalScrollTemplate } from '@microsoft/fast-foundation';\nexport const foundationHorizontalScrollTemplate = (context, definition) => fastHorizontalScrollTemplate(context, definition);\n","import { horizontalScrollStyles as fastHorizontalScrollStyles } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationHorizontalScrollStyles = (context, definition) => css `\n ${fastHorizontalScrollStyles(context, definition)}\n`;\n","import { HorizontalScroll as FASTHorizontalScroll } from '@microsoft/fast-components';\nimport { html } from '@microsoft/fast-element';\nimport { foundationHorizontalScrollStyles as styles } from './horizontal-scroll.styles';\nimport { foundationHorizontalScrollTemplate as template } from './horizontal-scroll.template';\n/**\n * @tagname %%prefix%%-horizontal-scroll\n */\nexport class HorizontalScroll extends FASTHorizontalScroll {\n}\n// explicitly declaring for extensibility\nexport const foundationHorizontalScrollShadowOptions = {\n delegatesFocus: true,\n mode: 'open',\n};\nexport const defaultHorizontalScrollConfig = {\n nextFlipper: html `\n <foundation-flipper\n @click=\"${(x) => x.scrollToNext()}\"\n aria-hidden=\"${(x) => x.flippersHiddenFromAT}\"\n ></foundation-flipper>\n `,\n previousFlipper: html `\n <foundation-flipper\n @click=\"${(x) => x.scrollToPrevious()}\"\n direction=\"previous\"\n aria-hidden=\"${(x) => x.flippersHiddenFromAT}\"\n ></foundation-flipper>\n `,\n};\n/**\n * The Foundation HorizontalScroll\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-horizontal-scroll\\>\n */\nexport const foundationHorizontalScroll = HorizontalScroll.compose(Object.assign({ baseName: 'horizontal-scroll', template,\n styles, shadowOptions: foundationHorizontalScrollShadowOptions }, defaultHorizontalScrollConfig));\n","import { css } from '@microsoft/fast-element';\nimport { getFontawesomeIconsCss } from '../_config/styles/external/fontawesome-free';\nexport const foundationIconStyles = (context, definition) => css `\n ${getFontawesomeIconsCss()}\n\n .fa-stack-1x {\n font-size: 1em;\n }\n\n .fa-stack-2x {\n font-size: 2em;\n }\n\n .tooltip-icon {\n color: var(--accent-foreground-rest);\n }\n\n .error-tooltip {\n color: var(--error-color);\n }\n\n .tooltip-element {\n position: absolute;\n z-index: 999;\n width: 300px;\n contain: unset;\n }\n\n .tooltip-element::part(tooltip) {\n padding: calc(var(--design-unit) * 4px);\n background-color: color-mix(in srgb, var(--neutral-layer-4), #000 10%);\n border: 1px solid var(--neutral-layer-3);\n text-align: left;\n color: var(--neutral-foreground-hint);\n box-shadow: 0 4px 10px rgb(0 0 0 / 35%);\n font-size: var(--type-ramp-minus-1-font-size);\n }\n\n .tooltip-title {\n color: var(--neutral-fill-strong-hover);\n margin: 0;\n }\n\n .tooltip-description {\n margin-top: calc(var(--design-unit) * 2px);\n margin-bottom: 0;\n font-size: var(--type-ramp-base-font-size);\n }\n\n .tooltip-second-title-margin {\n margin-top: calc(var(--design-unit) * 2px);\n }\n\n .tooltip-list-padding {\n margin: 0;\n padding: 0 0 0 calc(var(--design-unit) * 4px);\n }\n\n a,\n a:active,\n a:visited {\n color: var(--accent-foreground-rest);\n text-decoration: none;\n }\n\n .warning {\n background: var(--warning-color);\n color: #000;\n }\n\n .info {\n margin-top: calc(var(--design-unit) * 2px);\n padding: 20px;\n margin-bottom: 20px;\n height: auto;\n box-sizing: border-box;\n }\n`;\n","import { html, ref, when } from '@microsoft/fast-element';\nimport { classNames } from '@microsoft/fast-web-utilities';\nimport { getPrefix } from '../utils';\nexport const getPrefixedIcon = (prefix) => html `\n <template>\n <i\n ${ref('iElement')}\n id=\"${(x) => x.tooltipId}\"\n class=${(x) => `fa-${x.name} fa-${x.size} fa-${x.variant} ${classNames(['error-tooltip', !!(x.isError && x.tooltip)], ['tooltip-icon', !!(!x.isError && x.tooltip)])}`}\n part=${(x) => `icon-${x.name}-${x.size}-${x.variant} i-icon`}\n >\n <slot></slot>\n </i>\n ${when((x) => x.tooltip, html `\n <${prefix}-tooltip part=\"tooltip\" class=\"tooltip-element\" show anchor=\"${(x) => x.tooltipId}\">\n ${(x) => html `\n ${x.tooltip}\n `}\n </${prefix}-tooltip>\n `)}\n </template>\n`;\nexport const foundationIconTemplate = html `\n ${(x) => getPrefixedIcon(getPrefix(x))}\n`;\n","import { __decorate } from \"tslib\";\nimport { findIconDefinition, icon } from '@fortawesome/fontawesome-svg-core';\nimport { UUID } from '@genesislcap/foundation-utils';\nimport { attr, observable } from '@microsoft/fast-element';\nimport { FoundationElement } from '@microsoft/fast-foundation';\nimport { foundationIconStyles as styles } from './icon.styles';\nimport { foundationIconTemplate as template } from './icon.template';\n// explicitly declaring for extensibility\nexport const foundationIconShadowOptions = {\n mode: 'open',\n delegatesFocus: true,\n};\nexport const defaultIconConfig = {};\nexport var FaPrefixFromStyle;\n(function (FaPrefixFromStyle) {\n FaPrefixFromStyle[\"solid\"] = \"fas\";\n FaPrefixFromStyle[\"regular\"] = \"far\";\n FaPrefixFromStyle[\"brand\"] = \"fab\";\n})(FaPrefixFromStyle || (FaPrefixFromStyle = {}));\nexport const faSizeValueDefault = '1x';\nexport const faSizeValues = [\n '2xs',\n 'xs',\n 'sm',\n 'lg',\n 'xl',\n '2xl',\n faSizeValueDefault,\n '2x',\n '3x',\n '4x',\n '5x',\n '6x',\n '7x',\n '8x',\n '9x',\n '10x',\n 'stack-1x',\n 'stack-2x',\n];\n/**\n * @tagname %%prefix%%-icon\n */\nexport class Icon extends FoundationElement {\n constructor() {\n super(...arguments);\n this.isError = false;\n this.size = 'sm';\n this.variant = 'solid';\n }\n nameChanged(oldValue, newValue) {\n newValue ? this.loadIcon() : '';\n }\n sizeChanged(oldValue, newValue) {\n newValue ? this.loadIcon() : '';\n }\n variantChanged(oldValue, newValue) {\n newValue ? this.loadIcon() : '';\n }\n connectedCallback() {\n super.connectedCallback();\n this.loadIcon();\n }\n disconnectedCallback() {\n super.disconnectedCallback();\n this.iElement.replaceChildren();\n }\n getDefaultTooltipConfig() {\n if (!this.name) {\n this.name = 'question-circle';\n this.size = '1x';\n this.variant = 'regular';\n }\n }\n loadIcon() {\n if (!this.iElement) {\n return;\n }\n if (this.tooltip) {\n if (!this.tooltipId) {\n this.tooltipId = this.uuid.createId();\n }\n this.getDefaultTooltipConfig();\n }\n const iconDefinition = findIconDefinition({\n prefix: FaPrefixFromStyle[this.variant],\n iconName: this.name,\n });\n const faIcon = icon(iconDefinition);\n if (faIcon && faIcon.node) {\n this.iElement.innerHTML = '';\n Array.from(faIcon.node).map((n) => this.iElement.appendChild(n));\n }\n }\n}\n__decorate([\n observable\n], Icon.prototype, \"iElement\", void 0);\n__decorate([\n UUID\n], Icon.prototype, \"uuid\", void 0);\n__decorate([\n attr({ attribute: 'tooltip-id' })\n], Icon.prototype, \"tooltipId\", void 0);\n__decorate([\n attr\n], Icon.prototype, \"tooltip\", void 0);\n__decorate([\n attr({ attribute: 'error', mode: 'boolean' })\n], Icon.prototype, \"isError\", void 0);\n__decorate([\n attr\n], Icon.prototype, \"name\", void 0);\n__decorate([\n attr\n], Icon.prototype, \"size\", void 0);\n__decorate([\n attr\n], Icon.prototype, \"variant\", void 0);\n/**\n * The Foundation Icon\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-icon\\>\n */\nexport const foundationIcon = Icon.compose(Object.assign({ baseName: 'icon', template,\n styles, shadowOptions: foundationIconShadowOptions }, defaultIconConfig));\n","import { listboxTemplate as fastListboxTemplate } from '@microsoft/fast-foundation';\nexport const foundationListboxTemplate = (context, definition) => fastListboxTemplate(context, definition);\n","import { listboxStyles as fastListboxStyles } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationListboxStyles = (context, definition) => css `\n ${fastListboxStyles(context, definition)}\n\n :host {\n display: flex;\n flex-direction: column;\n max-width: fit-content;\n padding: calc(var(--design-unit) * 1px) 0;\n border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);\n border-radius: calc(var(--control-corner-radius) * 1px);\n }\n`;\n","import { Listbox as FASTListbox } from '@microsoft/fast-components';\nimport { foundationListboxStyles as styles } from './listbox.styles';\nimport { foundationListboxTemplate as template } from './listbox.template';\n/**\n * @tagname %%prefix%%-listbox\n */\nexport class Listbox extends FASTListbox {\n}\n// explicitly declaring for extensibility\nexport const foundationListboxShadowOptions = undefined;\nexport const defaultListboxConfig = {};\nexport const foundationListbox = Listbox.compose(Object.assign({ baseName: 'listbox', template,\n styles, shadowOptions: foundationListboxShadowOptions }, defaultListboxConfig));\n","import { listboxOptionTemplate as fastListboxOptionTemplate } from '@microsoft/fast-foundation';\nexport const foundationListboxOptionTemplate = (context, definition) => fastListboxOptionTemplate(context, definition);\n","import { optionStyles as fastListboxOptionStyles } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationListboxOptionStyles = (context, definition) => css `\n ${fastListboxOptionStyles(context, definition)}\n`;\n","import { ListboxOption as FASTListboxOption } from '@microsoft/fast-components';\nimport { foundationListboxOptionStyles as styles } from './listbox-option.styles';\nimport { foundationListboxOptionTemplate as template } from './listbox-option.template';\n/**\n * @tagname %%prefix%%-option\n */\nexport class ListboxOption extends FASTListboxOption {\n}\n// explicitly declaring for extensibility\nexport const foundationListboxOptionShadowOptions = undefined;\nexport const defaultListboxOptionConfig = {};\nexport const foundationListboxOption = ListboxOption.compose(Object.assign({ baseName: 'option', template,\n styles, shadowOptions: foundationListboxOptionShadowOptions }, defaultListboxOptionConfig));\n","import { menuTemplate as fastMenuTemplate } from '@microsoft/fast-foundation';\nexport const foundationMenuTemplate = (context, definition) => fastMenuTemplate(context, definition);\n","import { menuStyles as fastMenuStyles } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationMenuStyles = (context, definition) => css `\n ${fastMenuStyles(context, definition)}\n`;\n","import { Menu as FASTMenu } from '@microsoft/fast-components';\nimport { foundationMenuStyles as styles } from './menu.styles';\nimport { foundationMenuTemplate as template } from './menu.template';\n/**\n * @tagname %%prefix%%-menu\n */\nexport class Menu extends FASTMenu {\n}\n// explicitly declaring for extensibility\nexport const foundationMenuShadowOptions = undefined;\nexport const defaultMenuConfig = {};\n/**\n * The Foundation Menu\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-menu\\>\n */\nexport const foundationMenu = Menu.compose(Object.assign({ baseName: 'menu', template,\n styles, shadowOptions: foundationMenuShadowOptions }, defaultMenuConfig));\n","import { menuItemTemplate as fastMenuItemTemplate } from '@microsoft/fast-foundation';\nexport const foundationMenuItemTemplate = (context, definition) => fastMenuItemTemplate(context, definition);\n","import { menuItemStyles as fastMenuItemStyles } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationMenuItemStyles = (context, definition) => css `\n ${fastMenuItemStyles(context, definition)}\n\n :host, :host(.indent-0[aria-haspopup='menu']) {\n align-content: center;\n min-height: calc(var(--design-unit) * 8px);\n }\n\n .expand-collapse-glyph {\n max-height: calc(var(--design-unit) * 4px);\n max-width: calc(var(--design-unit) * 4px);\n height: auto;\n width: auto;\n }\n`;\n","import { MenuItem as FASTMenuItem } from '@microsoft/fast-components';\nimport { foundationMenuItemStyles as styles } from './menu-item.styles';\nimport { foundationMenuItemTemplate as template } from './menu-item.template';\n/**\n * @tagname %%prefix%%-menu-item\n */\nexport class MenuItem extends FASTMenuItem {\n connectedCallback() {\n super.connectedCallback();\n this.addEventListener('click', () => this.$emit('onMenuClick'));\n }\n}\n// explicitly declaring for extensibility\nexport const foundationMenuItemShadowOptions = undefined;\nexport const defaultMenuItemConfig = {\n expandCollapseGlyph: `\n <svg\n class=\"expand-collapse-glyph\"\n part=\"expand-collapse-glyph\"\n viewBox=\"0 0 16 16\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M4.023 15.273L11.29 8 4.023.727l.704-.704L12.71 8l-7.984 7.977-.704-.704z\"\n />\n </svg>\n `,\n};\n/**\n * The Foundation Menu Item\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-menu-item\\>\n */\nexport const foundationMenuItem = MenuItem.compose(Object.assign({ baseName: 'menu-item', template,\n styles, shadowOptions: foundationMenuItemShadowOptions }, defaultMenuItemConfig));\n","import { css } from '@microsoft/fast-element';\nimport { foundationDialogStyles } from '../dialog';\nexport const foundationModalStyles = css `\n ${foundationDialogStyles}\n\n :host([draggable])::part(top) {\n cursor: move;\n }\n`;\n","import { html } from '@microsoft/fast-element';\nimport { foundationDialogTemplate } from '../dialog';\nexport const foundationModalTemplate = html `\n ${foundationDialogTemplate}\n`;\n","import { __decorate } from \"tslib\";\nimport { attr } from '@microsoft/fast-element';\nimport { DialogElement } from '../dialog';\nimport { foundationModalStyles as styles } from './modal.styles';\nimport { foundationModalTemplate as template } from './modal.template';\n// explicitly declaring for extensibility\nexport const foundationModalShadowOptions = {\n mode: 'open',\n delegatesFocus: true,\n};\nexport const defaultModalConfig = {};\n/**\n * @tagname %%prefix%%-modal\n */\nexport class Modal extends DialogElement {\n constructor() {\n super(...arguments);\n this.isDragging = false;\n this.offsetX = 0;\n this.offsetY = 0;\n this.modalWidth = 0;\n this.modalHeight = 0;\n this.onMouseDownBound = null;\n this.onMouseMoveBound = null;\n this.onMouseUpBound = null;\n this.draggable = false;\n this.onCloseCallback = () => {\n if (this.draggable && this.mainElement instanceof HTMLElement) {\n Object.assign(this.mainElement.style, {\n position: '',\n left: '',\n top: '',\n margin: '',\n });\n }\n };\n }\n draggableChanged(ignore, newValue) {\n var _a, _b;\n if (newValue) {\n this.onMouseDownBound = this.onMouseDown.bind(this);\n (_a = this.mainElement) === null || _a === void 0 ? void 0 : _a.addEventListener('mousedown', this.onMouseDownBound);\n }\n else {\n if (this.onMouseDownBound) {\n (_b = this.mainElement) === null || _b === void 0 ? void 0 : _b.removeEventListener('mousedown', this.onMouseDownBound);\n this.onMouseDownBound = null;\n }\n this.removeDraggableEventListeners();\n }\n }\n show() {\n var _a, _b;\n (_a = this.onShowCallback) === null || _a === void 0 ? void 0 : _a.call(this);\n (_b = this.mainElement) === null || _b === void 0 ? void 0 : _b.showModal();\n }\n connectedCallback() {\n var _a;\n super.connectedCallback();\n if (this.draggable) {\n this.onMouseDownBound = this.onMouseDown.bind(this);\n (_a = this.mainElement) === null || _a === void 0 ? void 0 : _a.addEventListener('mousedown', this.onMouseDownBound);\n }\n }\n disconnectedCallback() {\n var _a;\n super.disconnectedCallback();\n this.removeDraggableEventListeners();\n if (this.onMouseDownBound) {\n (_a = this.mainElement) === null || _a === void 0 ? void 0 : _a.removeEventListener('mousedown', this.onMouseDownBound);\n this.onMouseDownBound = null;\n }\n }\n isEventTargetInDraggableTarget(event) {\n var _a;\n return (((_a = this.topElement) === null || _a === void 0 ? void 0 : _a.contains(event.target)) || this.isInsideTopSlot(event.target));\n }\n isInsideTopSlot(target) {\n if (!this.topElementSlot)\n return false;\n const assignedNodes = this.topElementSlot.assignedNodes();\n return assignedNodes.some((node) => node === target || node.contains(target));\n }\n onMouseDown(event) {\n if (!this.topElement || !this.isEventTargetInDraggableTarget(event) || this.isDragging)\n return;\n this.isDragging = true;\n const rect = this.mainElement.getBoundingClientRect();\n this.offsetX = event.clientX - rect.left;\n this.offsetY = event.clientY - rect.top;\n // Store the modal’s width and height to minimize calls to getBoundingClientRect\n this.modalWidth = rect.width;\n this.modalHeight = rect.height;\n this.onMouseMoveBound = this.onMouseMove.bind(this);\n this.onMouseUpBound = this.onMouseUp.bind(this);\n document.addEventListener('mousemove', this.onMouseMoveBound);\n document.addEventListener('mouseup', this.onMouseUpBound);\n }\n onMouseMove(event) {\n if (!this.isDragging || !this.mainElement)\n return;\n const viewportWidth = window.innerWidth;\n const viewportHeight = window.innerHeight;\n let newLeft = event.clientX - this.offsetX;\n let newTop = event.clientY - this.offsetY;\n // Ensure modal stays within screen boundaries\n newLeft = Math.max(0, Math.min(viewportWidth - this.modalWidth, newLeft));\n newTop = Math.max(0, Math.min(viewportHeight - this.modalHeight, newTop));\n requestAnimationFrame(() => {\n Object.assign(this.mainElement.style, {\n position: 'absolute',\n left: `${newLeft}px`,\n top: `${newTop}px`,\n margin: '0',\n });\n });\n }\n onMouseUp() {\n this.isDragging = false;\n this.removeDraggableEventListeners();\n }\n removeDraggableEventListeners() {\n if (this.onMouseMoveBound) {\n document.removeEventListener('mousemove', this.onMouseMoveBound);\n this.onMouseMoveBound = null;\n }\n if (this.onMouseUpBound) {\n document.removeEventListener('mouseup', this.onMouseUpBound);\n this.onMouseUpBound = null;\n }\n }\n}\n__decorate([\n attr({ mode: 'boolean' })\n], Modal.prototype, \"draggable\", void 0);\n/**\n * The Foundation Modal\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-modal\\>\n */\nexport const foundationModal = Modal.compose(Object.assign({ baseName: 'modal', template,\n styles, shadowOptions: foundationModalShadowOptions }, defaultModalConfig));\n","import { html, ref, slotted, when } from '@microsoft/fast-element';\nimport { endSlotTemplate, startSlotTemplate, } from '@microsoft/fast-foundation';\n/**\n * @privateRemarks TODO: Raise PR against FAST\n * Unfortunately this template is almost a complete duplicate of the original fast version, just with additional\n * input atts required for auto completion.\n * Taken from `@microsoft/fast-foundation.46.2`\n */\nexport const foundationNumberFieldTemplate = (context, definition) => html `\n <template class=\"${(x) => (x.readOnly ? 'readonly' : '')}\">\n <label\n part=\"label\"\n for=\"${(x) => (x.id ? x.id : 'control')}\"\n class=\"${(x) => x.defaultSlottedNodes && x.defaultSlottedNodes.length ? 'label' : 'label label-hidden'}\"\n >\n <slot ${slotted('defaultSlottedNodes')}></slot>\n </label>\n <div class=\"root\" part=\"root\">\n ${startSlotTemplate(context, definition)}\n <input\n class=\"control\"\n part=\"control\"\n name=\"${(x) => x.name}\"\n autocomplete=\"${(x) => x.autocomplete}\"\n id=\"${(x) => (x.id ? x.id : 'control')}\"\n @input=\"${(x) => x.handleTextInput()}\"\n @change=\"${(x) => x.handleChange()}\"\n @keydown=\"${(x, c) => x.handleKeyDown(c.event)}\"\n @blur=\"${(x, c) => x.handleBlur()}\"\n ?autofocus=\"${(x) => x.autofocus}\"\n ?disabled=\"${(x) => x.disabled}\"\n list=\"${(x) => x.list}\"\n maxlength=\"${(x) => x.maxlength}\"\n minlength=\"${(x) => x.minlength}\"\n placeholder=\"${(x) => x.placeholder}\"\n ?readonly=\"${(x) => x.readOnly}\"\n ?required=\"${(x) => x.required}\"\n size=\"${(x) => x.size}\"\n type=\"text\"\n inputmode=\"numeric\"\n min=\"${(x) => x.min}\"\n max=\"${(x) => x.max}\"\n step=\"${(x) => x.step}\"\n aria-atomic=\"${(x) => x.ariaAtomic}\"\n aria-busy=\"${(x) => x.ariaBusy}\"\n aria-controls=\"${(x) => x.ariaControls}\"\n aria-current=\"${(x) => x.ariaCurrent}\"\n aria-describedby=\"${(x) => x.ariaDescribedby}\"\n aria-details=\"${(x) => x.ariaDetails}\"\n aria-disabled=\"${(x) => x.ariaDisabled}\"\n aria-errormessage=\"${(x) => x.ariaErrormessage}\"\n aria-flowto=\"${(x) => x.ariaFlowto}\"\n aria-haspopup=\"${(x) => x.ariaHaspopup}\"\n aria-hidden=\"${(x) => x.ariaHidden}\"\n aria-invalid=\"${(x) => x.ariaInvalid}\"\n aria-keyshortcuts=\"${(x) => x.ariaKeyshortcuts}\"\n aria-label=\"${(x) => x.ariaLabel}\"\n aria-labelledby=\"${(x) => x.ariaLabelledby}\"\n aria-live=\"${(x) => x.ariaLive}\"\n aria-owns=\"${(x) => x.ariaOwns}\"\n aria-relevant=\"${(x) => x.ariaRelevant}\"\n aria-roledescription=\"${(x) => x.ariaRoledescription}\"\n ${ref('control')}\n />\n ${when((x) => !x.hideStep && !x.readOnly && !x.disabled, html `\n <div class=\"controls\" part=\"controls\">\n <div class=\"step-up\" part=\"step-up\" @click=\"${(x) => x.stepUp()}\">\n <slot name=\"step-up-glyph\">${definition.stepUpGlyph || ''}</slot>\n </div>\n <div class=\"step-down\" part=\"step-down\" @click=\"${(x) => x.stepDown()}\">\n <slot name=\"step-down-glyph\">${definition.stepDownGlyph || ''}</slot>\n </div>\n </div>\n `)}\n ${endSlotTemplate(context, definition)}\n </div>\n </template>\n`;\n","import { numberFieldStyles as fastNumberFieldStyles } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationNumberFieldStyles = (context, definition) => css `\n ${fastNumberFieldStyles(context, definition)}\n ::part(label) {\n color: var(--neutral-foreground-rest);\n }\n\n fast-text-field {\n display: unset;\n }\n\n .controls {\n margin-bottom: auto;\n margin-inline-end: 5px;\n margin-top: auto;\n }\n\n .step-down,\n .step-up {\n display: block;\n fill: var(--neutral-foreground-rest);\n }\n\n .step-down-glyph,\n .step-up-glyph {\n padding: unset;\n }\n\n ::part(end) {\n margin-inline-end: unset;\n }\n\n .label-hidden {\n margin: 0;\n }\n`;\n","const FORMAT_PARTS = 12345.6;\nconst FORMAT_NUMERALS = 9876543210;\n/**\n * @public\n */\nexport class NumberParser {\n constructor(locale) {\n const parts = new Intl.NumberFormat(locale).formatToParts(FORMAT_PARTS);\n const numerals = [\n ...new Intl.NumberFormat(locale, { useGrouping: false }).format(FORMAT_NUMERALS),\n ].reverse();\n const index = new Map(numerals.map((d, i) => [d, i]));\n this._group = new RegExp(`[${parts.find((d) => d.type === 'group').value}]`, 'g');\n this._decimal = new RegExp(`[${parts.find((d) => d.type === 'decimal').value}]`);\n this._separator = new RegExp(`[$${parts.find((d) => d.type === 'decimal').value}](?:0*$|[^0]0+$)`);\n this._numeral = new RegExp(`[${numerals.join('')}]`, 'g');\n this._index = (d) => index.get(d);\n }\n parse(localeNumber) {\n return (localeNumber = localeNumber\n .trim()\n .replace(this._group, '')\n .replace(this._decimal, '.')\n .replace(this._numeral, this._index))\n ? +localeNumber\n : NaN;\n }\n hasSeparator(localeNumber) {\n return this._separator.test(localeNumber);\n }\n}\n","import { NumberParser } from '@genesislcap/foundation-utils';\nconst formattedInputPrecision = 12;\nconst FORMAT_TEST_NUMBER = 12345.6;\nconst DECIMAL_BASE = 10;\nconst MAX_DIGIT = DECIMAL_BASE - 1;\nexport const getSeparatorsFromParser = (value, locale) => {\n var _a;\n const parts = new Intl.NumberFormat(locale).formatToParts(FORMAT_TEST_NUMBER);\n const decimalSeparator = ((_a = parts.find((d) => d.type === 'decimal')) === null || _a === void 0 ? void 0 : _a.value) || '.';\n return { decimalSeparator };\n};\nexport const formatControlValue = (value, locale) => {\n // Get locale-specific decimal separator\n const { decimalSeparator } = getSeparatorsFromParser(value, locale);\n // If locale uses standard '.' separator, no conversion needed\n if (decimalSeparator === '.') {\n return value;\n }\n // Replace '.' with locale-specific decimal separator while preserving trailing zeros\n return value.replace(/\\./g, decimalSeparator);\n};\nexport const sanitiseInputVal = (inputVal, locale) => {\n return String(new NumberParser(locale).parse(String(inputVal)));\n};\nexport const toIntlNumberFormat = (value, locale, options) => {\n return Intl.NumberFormat(locale, options).format(Number(value));\n};\n/**\n * Apply decimal precision limits to a raw numeric value string\n * This ensures the value respects min/max fraction digits without formatting\n * @param value - The raw numeric value string\n * @param options - Intl formatting options containing min/max fraction digits\n * @returns Value string with applied decimal precision limits\n */\nexport const applyDecimalPrecisionLimits = (value, options) => {\n if (!value || value === '')\n return value;\n const numericValue = Number(value);\n if (isNaN(numericValue))\n return value;\n const decimalIndex = value.indexOf('.');\n const hasDecimal = decimalIndex !== -1;\n const currentDecimalPlaces = hasDecimal ? value.length - decimalIndex - 1 : 0;\n const minFractionDigits = options.minimumFractionDigits;\n const maxFractionDigits = options.maximumFractionDigits;\n // If current decimal places are within limits, return as is\n if (currentDecimalPlaces >= minFractionDigits && currentDecimalPlaces <= maxFractionDigits) {\n return value;\n }\n // Apply minimum fraction digits (pad with zeros if needed)\n let result = value;\n if (currentDecimalPlaces < minFractionDigits) {\n if (!hasDecimal) {\n result = value + '.';\n }\n const zerosToAdd = minFractionDigits - currentDecimalPlaces;\n result = result + '0'.repeat(zerosToAdd);\n }\n // Apply maximum fraction digits (truncate if needed)\n if (currentDecimalPlaces > maxFractionDigits) {\n const integerPart = hasDecimal ? value.substring(0, decimalIndex) : value;\n const decimalPart = hasDecimal ? value.substring(decimalIndex + 1) : '';\n const truncatedDecimalPart = decimalPart.substring(0, maxFractionDigits);\n if (maxFractionDigits === 0) {\n result = integerPart;\n }\n else {\n result = `${integerPart}.${truncatedDecimalPart}`;\n }\n }\n return result;\n};\nexport const preserveTrailingZerosAfterParse = (value, parsedValue, locale) => {\n const { decimalSeparator } = getSeparatorsFromParser(value, locale);\n // Check if the original value has trailing zeros after decimal (using locale separator)\n const escapedSeparator = decimalSeparator.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n const trailingZerosRegex = new RegExp(`${escapedSeparator}(\\\\d*?)(0+)$`);\n const trailingZerosMatch = value.match(trailingZerosRegex);\n if (trailingZerosMatch) {\n const significantDigits = trailingZerosMatch[1];\n const trailingZeros = trailingZerosMatch[2];\n const baseNumber = String(parsedValue);\n // If the parsed result is a valid number, restore trailing zeros\n if (!isNaN(Number(parsedValue))) {\n if (baseNumber.includes('.')) {\n // If parsed result has decimal, append needed trailing zeros\n const decimalPart = baseNumber.split('.')[1];\n const neededZeros = Math.max(0, trailingZeros.length - (decimalPart.length - significantDigits.length));\n return baseNumber + '0'.repeat(neededZeros);\n }\n else {\n // If parsed result is integer, add decimal with trailing zeros\n return baseNumber + '.' + significantDigits + trailingZeros;\n }\n }\n }\n return String(parsedValue);\n};\n/**\n * Validates and formats a value based on locale and precision\n * @param value - The value to validate and format\n * @param locale - The locale to use for formatting\n * @param withFormatting - Whether to use locale-specific formatting\n * @param precision - The precision to use for formatting\n * @returns The validated and formatted value\n */\nexport const validateValue = (value, locale, withFormatting = true, precision) => {\n if (value === undefined || value === null || value === '') {\n return '';\n }\n const stringValue = typeof value === 'number' ? value.toString() : value;\n const inputPrecision = precision !== null && precision !== void 0 ? precision : formattedInputPrecision;\n let cleanValue;\n if (withFormatting) {\n cleanValue = sanitiseInputVal(stringValue, locale);\n }\n else {\n const { decimalSeparator } = getSeparatorsFromParser(stringValue, locale);\n if (decimalSeparator !== '.') {\n const normalizedValue = stringValue.replace(new RegExp(`\\\\${decimalSeparator}`, 'g'), '.');\n cleanValue = normalizedValue;\n const decimalIndex = cleanValue.indexOf('.');\n if (decimalIndex !== -1) {\n cleanValue = cleanValue.substring(0, decimalIndex);\n }\n }\n else {\n cleanValue = stringValue;\n }\n }\n // Ensure cleanValue is always a string (single conversion point)\n cleanValue = String(cleanValue);\n const numberRegex = /^-?\\d*\\.?\\d+$/;\n if (!numberRegex.test(cleanValue)) {\n return '';\n }\n if (inputPrecision !== undefined) {\n const cleanValueStr = cleanValue.replace('.', '');\n const significantDigits = cleanValueStr.replace(/^0+/, '').length;\n if (significantDigits > inputPrecision) {\n const decimalIndex = cleanValue.indexOf('.');\n if (decimalIndex !== -1) {\n const integerPart = cleanValue.substring(0, decimalIndex);\n const integerDigits = integerPart.length;\n if (integerDigits >= inputPrecision) {\n return cleanValue.substring(0, inputPrecision);\n }\n else {\n const decimalDigitsNeeded = inputPrecision - integerDigits;\n const decimalPart = cleanValue.substring(decimalIndex + 1);\n const truncatedDecimalPart = decimalPart.substring(0, decimalDigitsNeeded);\n return `${integerPart}.${truncatedDecimalPart}`;\n }\n }\n else {\n return cleanValue.substring(0, inputPrecision);\n }\n }\n }\n return cleanValue;\n};\nexport const validateInput = (value, locale, precision) => {\n const parsedValue = validateValue(value, locale, undefined, precision);\n return preserveTrailingZerosAfterParse(value, parsedValue, locale);\n};\nexport const validateMinMax = (value, locale, withFormatting = true, min, max, precision) => {\n let validValue = parseFloat(validateValue(value, locale, withFormatting, precision));\n if (isNaN(validValue)) {\n validValue = '';\n }\n else {\n validValue = Math.min(validValue, max !== null && max !== void 0 ? max : validValue);\n validValue = Math.max(validValue, min !== null && min !== void 0 ? min : validValue);\n }\n return String(validValue);\n};\n/**\n * Performs high precision addition using Pure JavaScript (NO BigInt needed!)\n * This is the BEST solution for precision arithmetic\n * @param a - First number\n * @param b - Second number\n * @returns Sum with maintained precision\n */\nexport const addWithPrecision = (a, b) => {\n try {\n const aStr = a.toString();\n const bStr = b.toString();\n const aDecimalIndex = aStr.indexOf('.');\n const bDecimalIndex = bStr.indexOf('.');\n const aPrecision = aDecimalIndex === -1 ? 0 : aStr.length - aDecimalIndex - 1;\n const bPrecision = bDecimalIndex === -1 ? 0 : bStr.length - bDecimalIndex - 1;\n const maxPrecision = Math.max(aPrecision, bPrecision);\n const multiplier = Math.pow(DECIMAL_BASE, maxPrecision);\n const aInt = Math.round(a * multiplier);\n const bInt = Math.round(b * multiplier);\n const resultInt = aInt + bInt;\n return resultInt / multiplier;\n }\n catch (error) {\n // fallback\n return a + b;\n }\n};\n/**\n * Performs high precision subtraction using Pure JavaScript\n * @param a - First number\n * @param b - Second number\n * @returns Difference with maintained precision\n */\nexport const subtractWithPrecision = (a, b) => {\n try {\n const aStr = a.toString();\n const bStr = b.toString();\n const aDecimalIndex = aStr.indexOf('.');\n const bDecimalIndex = bStr.indexOf('.');\n const aPrecision = aDecimalIndex === -1 ? 0 : aStr.length - aDecimalIndex - 1;\n const bPrecision = bDecimalIndex === -1 ? 0 : bStr.length - bDecimalIndex - 1;\n const maxPrecision = Math.max(aPrecision, bPrecision);\n const multiplier = Math.pow(DECIMAL_BASE, maxPrecision);\n const aInt = Math.round(a * multiplier);\n const bInt = Math.round(b * multiplier);\n const resultInt = aInt - bInt;\n return resultInt / multiplier;\n }\n catch (error) {\n // fallback\n return a - b;\n }\n};\n/**\n * Increment a value with precision using direct string manipulation\n * @param valueString - The value as a string to maintain precision\n * @param step - The step value to add\n * @returns The incremented value as a string with preserved precision\n */\nexport const incrementWithPrecision = (valueString, step) => {\n try {\n const valueStr = typeof valueString === 'string' ? valueString : valueString.toString();\n const decimalIndex = valueStr.indexOf('.');\n if (decimalIndex === -1) {\n const value = parseInt(valueStr);\n return (value + step).toString();\n }\n const decimalPart = valueStr.substring(decimalIndex + 1);\n const lastDigitIndex = decimalPart.length - 1;\n const lastDigit = parseInt(decimalPart.charAt(lastDigitIndex));\n const newLastDigit = lastDigit + 1;\n if (newLastDigit <= MAX_DIGIT) {\n const newDecimalPart = decimalPart.substring(0, lastDigitIndex) + newLastDigit;\n return valueStr.substring(0, decimalIndex + 1) + newDecimalPart;\n }\n else {\n let newDecimalPart = '';\n let carry = 1;\n for (let i = lastDigitIndex; i >= 0; i -= 1) {\n const digit = parseInt(decimalPart.charAt(i));\n const newDigit = digit + carry;\n if (newDigit <= MAX_DIGIT) {\n newDecimalPart = newDigit + newDecimalPart;\n carry = 0;\n }\n else {\n newDecimalPart = '0' + newDecimalPart;\n carry = 1;\n }\n }\n if (carry === 1) {\n const integerPart = parseInt(valueStr.substring(0, decimalIndex));\n return integerPart + 1 + '.' + newDecimalPart;\n }\n else {\n return valueStr.substring(0, decimalIndex + 1) + newDecimalPart;\n }\n }\n }\n catch (error) {\n const value = typeof valueString === 'string' ? parseFloat(valueString) : valueString;\n return (value + step).toString();\n }\n};\n/**\n * Decrement a value with precision using direct string manipulation\n * @param valueString - The value as a string to maintain precision\n * @param step - The step value to subtract\n * @returns The decremented value as a string with preserved precision\n */\nexport const decrementWithPrecision = (valueString, step) => {\n try {\n const valueStr = typeof valueString === 'string' ? valueString : valueString.toString();\n const decimalIndex = valueStr.indexOf('.');\n if (decimalIndex === -1) {\n const value = parseInt(valueStr);\n return (value - step).toString();\n }\n const decimalPart = valueStr.substring(decimalIndex + 1);\n const lastDigitIndex = decimalPart.length - 1;\n const lastDigit = parseInt(decimalPart.charAt(lastDigitIndex));\n const newLastDigit = lastDigit - 1;\n if (newLastDigit >= 0) {\n const newDecimalPart = decimalPart.substring(0, lastDigitIndex) + newLastDigit;\n return valueStr.substring(0, decimalIndex + 1) + newDecimalPart;\n }\n else {\n let newDecimalPart = '';\n let borrow = 1;\n for (let i = lastDigitIndex; i >= 0; i -= 1) {\n const digit = parseInt(decimalPart.charAt(i));\n const newDigit = digit - borrow;\n if (newDigit >= 0) {\n newDecimalPart = newDigit + newDecimalPart;\n borrow = 0;\n }\n else {\n newDecimalPart = MAX_DIGIT.toString() + newDecimalPart;\n borrow = 1;\n }\n }\n if (borrow === 1) {\n const integerPart = parseInt(valueStr.substring(0, decimalIndex));\n return integerPart - 1 + '.' + newDecimalPart;\n }\n else {\n return valueStr.substring(0, decimalIndex + 1) + newDecimalPart;\n }\n }\n }\n catch (error) {\n const value = typeof valueString === 'string' ? parseFloat(valueString) : valueString;\n return (value - step).toString();\n }\n};\n/**\n * Calculate auto step precision based on decimal places\n * Maintains original step calculation for compatibility\n * @param value - The value to calculate step precision for\n * @returns The calculated step value\n */\nexport const calculateAutoStepPrecision = (value) => {\n try {\n const valueStr = typeof value === 'string' ? value : value.toString();\n const decimalIndex = valueStr.indexOf('.');\n if (decimalIndex === -1) {\n return 1;\n }\n const decimalPart = valueStr.substring(decimalIndex + 1);\n const decimalPlaces = decimalPart.length;\n if (decimalPlaces === 0) {\n return 1;\n }\n const step = Math.pow(DECIMAL_BASE, -decimalPlaces);\n return parseFloat(step.toFixed(decimalPlaces));\n }\n catch (error) {\n const valueStr = typeof value === 'string' ? value : value.toString();\n const decimalIndex = valueStr.indexOf('.');\n if (decimalIndex === -1)\n return 1;\n const decimalPart = valueStr.substring(decimalIndex + 1);\n const decimalPlaces = decimalPart.length;\n if (decimalPlaces === 0)\n return 1;\n const step = Math.pow(DECIMAL_BASE, -decimalPlaces);\n return parseFloat(step.toFixed(decimalPlaces));\n }\n};\n","import { __decorate } from \"tslib\";\nimport { NumberParser } from '@genesislcap/foundation-utils';\nimport { NumberField as FASTNumberField } from '@microsoft/fast-components';\nimport { DOM, attr } from '@microsoft/fast-element';\nimport { foundationNumberFieldStyles as styles } from './number-field.styles';\nimport { foundationNumberFieldTemplate as template } from './number-field.template';\nimport { applyDecimalPrecisionLimits, calculateAutoStepPrecision, decrementWithPrecision, formatControlValue, incrementWithPrecision, toIntlNumberFormat, validateInput, validateMinMax, } from './utils';\nconst MAX_DECIMAL_PLACES = 3;\nconst MAX_INPUT_PRECISION = 12;\n/**\n * @tagname %%prefix%%-number-field\n */\nexport class NumberField extends FASTNumberField {\n constructor() {\n super(...arguments);\n this.autocomplete = 'off';\n this.hideStep = false;\n this.value = '';\n this.withFormatting = false;\n this.locale = 'en-US';\n this.autoStepPrecision = false;\n this.maximumInputPrecision = MAX_INPUT_PRECISION;\n this.options = {\n maximumFractionDigits: MAX_DECIMAL_PLACES,\n minimumFractionDigits: 0,\n };\n }\n autocompleteChanged() {\n if (this.proxy instanceof HTMLInputElement) {\n this.proxy.autocomplete = this.autocomplete;\n }\n }\n stepUp() {\n const isValidNumber = /^-?\\d*\\.?\\d+$/.test(this.value) && this.value !== '';\n if (!isValidNumber) {\n const stepUpValue = this.min > 0 ? this.min : this.max < 0 ? this.max : !this.min ? this.step : 0;\n this.value = stepUpValue.toString();\n }\n else {\n let stepValue;\n if (this.autoStepPrecision) {\n stepValue = calculateAutoStepPrecision(this.value);\n }\n else {\n stepValue = this.step;\n }\n const stepUpValue = incrementWithPrecision(this.value, stepValue);\n this.value = stepUpValue.toString();\n }\n if (this.control) {\n if (this.min !== undefined || this.max !== undefined) {\n this.control.value = validateMinMax(this.value, this.locale, this.withFormatting, this.min, this.max, this.maximumInputPrecision);\n }\n else {\n this.control.value = this.value;\n }\n }\n this.handleTextInput();\n }\n stepDown() {\n // Check if the string represents a valid number without losing precision\n const isValidNumber = /^-?\\d*\\.?\\d+$/.test(this.value) && this.value !== '';\n if (!isValidNumber) {\n // Handle invalid value case\n const stepDownValue = this.min > 0 ? this.min : this.max < 0 ? this.max : !this.min ? 0 - this.step : 0;\n this.value = stepDownValue.toString();\n }\n else {\n // Use precision-aware decrement\n let stepValue;\n if (this.autoStepPrecision) {\n stepValue = calculateAutoStepPrecision(this.value);\n }\n else {\n stepValue = this.step;\n }\n const stepDownValue = decrementWithPrecision(this.value, stepValue);\n this.value = stepDownValue.toString();\n }\n if (this.control) {\n if (this.min !== undefined || this.max !== undefined) {\n this.control.value = validateMinMax(this.value, this.locale, this.withFormatting, this.min, this.max, this.maximumInputPrecision);\n }\n else {\n this.control.value = this.value;\n }\n }\n this.handleTextInput();\n }\n hasSeparatorWithoutDecimals() {\n const regexString = `[.]$`;\n return new RegExp(regexString);\n }\n handleTextInput() {\n if (!this.control)\n return;\n if (this.control.value === '-' || this.control.value === '-0')\n return;\n this['isUserInput'] = true;\n if (this.withFormatting && !new NumberParser(this.locale).hasSeparator(this.control.value)) {\n DOM.queueUpdate(() => {\n const validValue = validateInput(this.control.value, this.locale, this.maximumInputPrecision);\n this.value = applyDecimalPrecisionLimits(validValue, this.options);\n if (this.control) {\n this.control.value = applyDecimalPrecisionLimits(formatControlValue(validValue, this.locale), this.options);\n }\n this.$emit('input');\n });\n }\n else if (!this.withFormatting &&\n !this.hasSeparatorWithoutDecimals().test(this.control.value)) {\n DOM.queueUpdate(() => {\n var _a;\n if (this.control) {\n this.control.value = this.control.value.replace(/[^0-9\\-+e.]/g, '');\n }\n this.value = ((_a = this.control) === null || _a === void 0 ? void 0 : _a.value) || '';\n this.$emit('input');\n });\n }\n }\n valueChanged(previous, next) {\n if ((next === null || next === undefined) && this.control) {\n this.control.value = '';\n return;\n }\n if (next !== undefined && next !== null && next !== previous) {\n if (!this['isUserInput']) {\n this.value = validateMinMax(this.value, this.locale, false, this.min, this.max, this.maximumInputPrecision);\n DOM.queueUpdate(() => {\n if (this.control) {\n this.control.value =\n this.withFormatting && this.value\n ? toIntlNumberFormat(this.value, this.locale, this.options)\n : this.value;\n }\n });\n return;\n }\n const value = next;\n DOM.queueUpdate(() => {\n if (!this.control)\n return;\n if (this.control.value === '' || this.value === '') {\n this.control.value = value;\n return;\n }\n this.control.value = formatControlValue(String(value), this.locale);\n this.value = this.withFormatting\n ? validateInput(this.control.value, this.locale, this.maximumInputPrecision)\n : this.control.value;\n });\n }\n }\n handleBlur() {\n if (!this.control)\n return;\n this['isUserInput'] = false;\n const validatedValue = validateMinMax(this.control.value, this.locale, this.withFormatting, this.min, this.max, this.maximumInputPrecision);\n // Preserve precision by avoiding parseFloat\n if (validatedValue && /^-?\\d*\\.?\\d+$/.test(validatedValue)) {\n // Use the validated string value directly to preserve precision\n this.value = this.withFormatting\n ? applyDecimalPrecisionLimits(validatedValue, this.options)\n : validatedValue;\n }\n this.control.value =\n this.withFormatting && this.value\n ? toIntlNumberFormat(this.value, this.locale, this.options)\n : validatedValue;\n this.$emit('input');\n }\n}\n__decorate([\n attr\n], NumberField.prototype, \"autocomplete\", void 0);\n__decorate([\n attr({ mode: 'boolean' })\n], NumberField.prototype, \"hideStep\", void 0);\n__decorate([\n attr\n], NumberField.prototype, \"value\", void 0);\n__decorate([\n attr({ mode: 'boolean' })\n], NumberField.prototype, \"withFormatting\", void 0);\n__decorate([\n attr\n], NumberField.prototype, \"locale\", void 0);\n__decorate([\n attr({ mode: 'boolean' })\n], NumberField.prototype, \"autoStepPrecision\", void 0);\n__decorate([\n attr\n], NumberField.prototype, \"maximumInputPrecision\", void 0);\nexport const foundationNumberFieldShadowOptions = {\n delegatesFocus: true,\n mode: 'open',\n};\nexport const defaultNumberFieldConfig = {\n stepDownGlyph: `\n <svg class=\"step-down-glyph\" viewBox=\"0 0 24 24\" width=\"1rem\" height=\"1rem\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M6.1018 8C5.02785 8 4.45387 9.2649 5.16108 10.0731L10.6829 16.3838C11.3801 17.1806 12.6197 17.1806 13.3169 16.3838L18.8388 10.0731C19.5459 9.2649 18.972 8 17.898 8H6.1018Z\"/>\n </svg>\n `,\n stepUpGlyph: `\n <svg class=\"step-up-glyph\" viewBox=\"0 0 24 24\" width=\"1rem\" height=\"1rem\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M6.1018 16.9814C5.02785 16.9814 4.45387 15.7165 5.16108 14.9083L10.6829 8.59762C11.3801 7.80079 12.6197 7.80079 13.3169 8.59762L18.8388 14.9083C19.5459 15.7165 18.972 16.9814 17.898 16.9814H6.1018Z\"/>\n </svg>\n `,\n};\n/**\n * The Foundation NumberField\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-number-field\\>\n */\nexport const foundationNumberField = NumberField.compose(Object.assign({ baseName: 'number-field', template,\n styles, shadowOptions: foundationNumberFieldShadowOptions }, defaultNumberFieldConfig));\n","import { __awaiter } from \"tslib\";\nimport { DI } from '@microsoft/fast-foundation';\nimport { getConnect, getSocket } from '../connect';\nimport { MessageType } from '../connect/message';\n/**\n * Default NetworkMonitorConfig DI implementation.\n * @public\n */\nexport const defaultNetworkMonitorConfig = {\n windowEvents: ['online', 'offline', 'pageshow'],\n documentEvents: ['visibilitychange'],\n genesisConnectEvents: ['stream', 'commit'],\n ignoredGenesisResources: [],\n startDelay: 5000,\n checkInterval: 10000,\n checkTimeout: 3000,\n /**\n * The default when a custom check function is not explicitly provided for a resource.\n */\n resourceChecks: (sourceRef) => __awaiter(void 0, void 0, void 0, function* () {\n const connect = getConnect();\n const message = yield connect.getMoreColumns(sourceRef);\n const lastUpdated = Date.now();\n const lastMessage = message;\n const isConnected = message.MESSAGE_TYPE === MessageType.MORE_COLUMNS_ACK;\n return {\n isConnected,\n lastUpdated,\n lastMessage,\n };\n }),\n /**\n * The default when a custom data logon function is not explicitly provided for a resource.\n */\n resourceDataLogon: ({ message, functions }) => {\n const { onMessage, onError } = functions;\n getSocket().sendForStream(message, onMessage, onError);\n },\n};\n/**\n * NetworkMonitorConfig DI key.\n *\n * @internal\n * @privateRemarks\n * Marked as internal to stop api-extractor becoming confused cross-linking tokens with the same name.\n */\nexport const NetworkMonitorConfig = DI.createInterface((x) => x.instance(defaultNetworkMonitorConfig));\n","/**\n * SystemHealthChanged.\n * @public\n */\nexport const SystemHealthChanged = 'system-health-changed';\n","var _a;\nimport { __awaiter, __decorate } from \"tslib\";\nimport { createLogger, LogLevel } from '@genesislcap/foundation-logger';\nimport { User } from '@genesislcap/foundation-user';\nimport { formatDateTimeTimestamp, resolveAfter } from '@genesislcap/foundation-utils';\nimport { observable } from '@microsoft/fast-element';\nimport { DI } from '@microsoft/fast-foundation';\nimport Bowser from 'bowser';\nimport safeStringify from 'fast-safe-stringify';\nimport { StatusCodes } from 'http-status-codes';\nimport { ConnectEvents } from '../connect/connect.events';\nimport { messageHasErrorCode, MessageType } from '../connect/message';\nimport { SocketStatus } from '../connect/socket.status';\nimport { NetworkMonitorConfig } from './config';\nimport { SystemHealthChanged, } from './types';\n/**\n * @public\n */\nexport const networkLogger = createLogger('network-monitor', { level: LogLevel.Info });\n/**\n * @internal\n */\nconst firstUpdated = Date.now();\n/**\n * @internal\n */\nconst browserInformation = ((_a = window.navigator) === null || _a === void 0 ? void 0 : _a.userAgent)\n ? Bowser.parse(window.navigator.userAgent)\n : undefined;\n/**\n * @internal\n */\nconst safeStringifyValue = (value, options = {\n depthLimit: 10,\n edgesLimit: 10,\n}) => {\n if (value instanceof Event) {\n return `'${value.type}' Event`;\n }\n if (typeof value === 'string') {\n return value;\n }\n return safeStringify(value, undefined, 2, options);\n};\n/**\n * Default NetworkMonitor implementation.\n * @public\n */\nexport class DefaultNetworkMonitor {\n constructor() {\n /**\n * @internal\n */\n this.unsubscribableObservers = [];\n /**\n * {@inheritDoc NetworkMonitor.runAllChecks}\n */\n this.runAllChecks = (source, force) => __awaiter(this, void 0, void 0, function* () {\n /**\n * Abort when not ready, or when checks are already running and the call was not forced\n */\n if (!this.isReady || (this.isRunningChecks && !force)) {\n return;\n }\n networkLogger.info(`Run health checks, triggered by`, safeStringifyValue(source), `| Active resources`, this.resources.size);\n this.isRunningChecks = true;\n /**\n * Synchronise check interval given this has multiple non-automated triggers\n */\n this.synchroniseCheckInterval();\n let formattedTimestamp = this.getFormattedTimestamp(this.getNowTimestamp());\n const isOnline = yield this.isOnlineCheck();\n if (isOnline) {\n networkLogger.debug(`Network connected at ${formattedTimestamp}`);\n }\n else {\n networkLogger.warn(`Network disconnected at ${formattedTimestamp}`);\n }\n const socket = this.normaliseSerializedSocketStatus(this.socketStatus.serialize(), isOnline);\n const passedPreFlightSocketChecks = this.preFlightSocketChecks(socket);\n if (!passedPreFlightSocketChecks) {\n networkLogger.debug(`Socket pre-flight checks failed`);\n }\n if (!isOnline || !passedPreFlightSocketChecks) {\n networkLogger.debug(`Aborting remaining health checks`);\n const resources = [...this.resources].reduce((output, [_, metadata]) => {\n const existingEntry = output[metadata.resourceName];\n if (existingEntry) {\n existingEntry.sourceRef = [...existingEntry.sourceRef, metadata.message.SOURCE_REF];\n return output;\n }\n return Object.assign(Object.assign({}, output), { [metadata.resourceName]: this.normaliseResourceHealth({\n name: metadata.resourceName,\n sourceRef: [metadata.message.SOURCE_REF],\n isConnected: metadata.isConnected,\n lastUpdated: metadata.lastUpdated,\n }, isOnline) });\n }, {});\n this.reportSystemHealth({\n isAuthenticated: this.user.isAuthenticated,\n isOnline,\n resources,\n resourcesAllConnected: false,\n socket,\n });\n this.isRunningChecks = false;\n return;\n }\n let resourcesAllConnected = true;\n const allChecks = [];\n this.resources.forEach((meta, resource) => {\n const { resourceName: name, message, functions } = meta;\n const { resourceChecks = this.config.resourceChecks, resourceDataLogon = this.config.resourceDataLogon, } = functions;\n const { SOURCE_REF: sourceRef } = message;\n let isConnected = false;\n let lastUpdated;\n let lastMessage;\n let lastError;\n let timeout;\n let attemptDataLogon;\n const checkEnvelope = () => __awaiter(this, void 0, void 0, function* () {\n var _a;\n try {\n networkLogger.debug(`Running health check against ${name}`);\n const result = yield Promise.race([\n resourceChecks(sourceRef, resource),\n resolveAfter(this.config.checkTimeout, () => ({\n isConnected: false,\n lastUpdated: this.getNowTimestamp(),\n timeout: true,\n })),\n ]);\n isConnected = result.isConnected;\n lastUpdated = result.lastUpdated;\n lastMessage = result.lastMessage;\n timeout = result.timeout;\n }\n catch (e) {\n isConnected = false;\n lastUpdated = this.getNowTimestamp();\n lastError = e;\n lastMessage = (_a = e === null || e === void 0 ? void 0 : e.receivedMessage) !== null && _a !== void 0 ? _a : e;\n }\n attemptDataLogon =\n (lastMessage === null || lastMessage === void 0 ? void 0 : lastMessage.MESSAGE_TYPE) === MessageType.MSG_NACK ||\n messageHasErrorCode(lastMessage, StatusCodes.NOT_FOUND);\n formattedTimestamp = this.getFormattedTimestamp(lastUpdated !== null && lastUpdated !== void 0 ? lastUpdated : this.getNowTimestamp());\n if (isConnected) {\n networkLogger.debug(`${name} is healthy at ${formattedTimestamp}`);\n }\n else {\n networkLogger.warn(`${name} is not healthy at ${formattedTimestamp}`);\n }\n if (lastMessage) {\n networkLogger.debug(`${name} messaged at ${formattedTimestamp}`, safeStringifyValue(lastMessage));\n }\n if (lastError) {\n networkLogger.error(`${name} errored at ${formattedTimestamp}`, safeStringifyValue(lastError));\n }\n if (timeout) {\n networkLogger.warn(`${name} timed out at ${formattedTimestamp}`);\n }\n if (attemptDataLogon) {\n networkLogger.error(`${name} issue, re-attempting data logon at ${formattedTimestamp}`);\n resourceDataLogon(meta);\n }\n /**\n * Apply the last resource's isConnected while `resourcesAllConnected` remains true.\n */\n if (resourcesAllConnected) {\n resourcesAllConnected = isConnected;\n }\n /**\n * Return the resource health\n */\n return {\n name,\n sourceRef: [sourceRef],\n isConnected,\n lastUpdated,\n lastError,\n };\n });\n allChecks.push(checkEnvelope());\n });\n const results = yield Promise.allSettled(allChecks);\n const resources = results.reduce((prev, curr) => {\n if (curr.status === 'fulfilled') {\n const existingEntry = prev[curr.value.name];\n if (existingEntry) {\n existingEntry.sourceRef = [...existingEntry.sourceRef, ...curr.value.sourceRef];\n return prev;\n }\n return Object.assign(Object.assign({}, prev), { [curr.value.name]: this.normaliseResourceHealth(curr.value) });\n }\n networkLogger.warn(`Unexpected promise rejection occurred. Please check any custom resourceChecks return MonitoredResourceChecksResult.`);\n return prev;\n }, {});\n networkLogger.debug('Health checks complete');\n this.reportSystemHealth({\n isAuthenticated: this.user.isAuthenticated,\n isOnline,\n resources,\n resourcesAllConnected,\n socket,\n });\n this.isRunningChecks = false;\n });\n /**\n * Apply log level from config if set\n */\n if (this.config.logLevel !== undefined) {\n networkLogger.level = this.config.logLevel;\n }\n }\n /**\n * {@inheritDoc NetworkMonitor.create}\n */\n create() {\n if (this.resources) {\n networkLogger.warn(`NetworkMonitor already created. If this is intentional, please call NetworkMonitor.destroy first.`);\n return;\n }\n this.addListeners();\n this.resources = new Map();\n setTimeout(() => {\n this.isReady = true;\n this.synchroniseCheckInterval();\n this.runAllChecks(`NetworkMonitor.create()`);\n }, this.config.startDelay);\n }\n /**\n * {@inheritDoc NetworkMonitor.destroy}\n */\n destroy() {\n this.removeListeners();\n clearInterval(this.internalId);\n this.resources.clear();\n this.resources = undefined;\n this.status = undefined;\n this.isReady = undefined;\n }\n /**\n * @internal\n */\n isOnlineCheck() {\n return Promise.resolve(navigator.onLine);\n }\n /**\n * {@inheritDoc NetworkMonitor.addResource}\n */\n addResource(resource, metadata) {\n if (!this.resources) {\n this.create();\n }\n this.resources.set(resource, metadata);\n }\n /**\n * {@inheritDoc NetworkMonitor.removeResource}\n */\n removeResource(resource) {\n this.resources.delete(resource);\n }\n /**\n * @internal\n */\n addListeners() {\n var _a, _b;\n (_a = this.config.windowEvents) === null || _a === void 0 ? void 0 : _a.forEach((eventName) => window.addEventListener(eventName, this.runAllChecks));\n (_b = this.config.documentEvents) === null || _b === void 0 ? void 0 : _b.forEach((eventName) => document.addEventListener(eventName, this.runAllChecks));\n if (this.config.genesisConnectEvents.includes('stream')) {\n this.unsubscribableObservers.push(this.connectEvents.addStreamListener(({ detail }) => {\n const { functions, message, resourceName, stream } = detail;\n if (this.config.ignoredGenesisResources.includes(resourceName)) {\n return;\n }\n this.addResource(stream, {\n functions,\n message,\n resourceName,\n });\n }, ({ detail }) => {\n const { resourceName, stream } = detail;\n if (this.config.ignoredGenesisResources.includes(resourceName)) {\n return;\n }\n this.removeResource(stream);\n }, ({ detail }) => {\n var _a;\n const { resourceName, stream, error } = detail;\n const lastMessage = (_a = error.receivedMessage) !== null && _a !== void 0 ? _a : error;\n let readableError = '';\n if (messageHasErrorCode(lastMessage, StatusCodes.NOT_FOUND)) {\n readableError = `Please check the resource is running.`;\n }\n else if (messageHasErrorCode(lastMessage, StatusCodes.FORBIDDEN)) {\n readableError = `You are not authorised to access this resource, removing it from monitoring.`;\n this.removeResource(stream);\n }\n networkLogger.error(`${resourceName} errored at ${this.getFormattedTimestamp(this.getNowTimestamp())}.`, readableError, error);\n return;\n }));\n }\n if (this.config.genesisConnectEvents.includes('commit')) {\n this.unsubscribableObservers.push(this.connectEvents.addCommitListener((event) => {\n if (this.config.ignoredGenesisResources.includes(event.detail.eventName)) {\n return;\n }\n this.runAllChecks(event);\n }));\n }\n this.unsubscribableObservers.push(this.connectEvents.addMetadataListener(({ detail }) => {\n const { resourceName, error } = detail;\n if (!!error) {\n /**\n * Meta/init failure edge case, data server is already down when the app loads and `connect.getMetadata` fails.\n * In such cases the stream / resource is never actually created, so the `onStreamEvent` is never fired.\n * Meta/init failures are only reported in console logs, however, might be a good idea to show those here.\n */\n networkLogger.error(`${resourceName} had an unrecoverable error at ${this.getFormattedTimestamp(this.getNowTimestamp())}.`, `Please check the resource is running.`, error);\n return;\n }\n }));\n }\n /**\n * @internal\n */\n removeListeners() {\n var _a, _b;\n (_a = this.config.windowEvents) === null || _a === void 0 ? void 0 : _a.forEach((eventName) => window.removeEventListener(eventName, this.runAllChecks));\n (_b = this.config.documentEvents) === null || _b === void 0 ? void 0 : _b.forEach((eventName) => document.removeEventListener(eventName, this.runAllChecks));\n this.unsubscribableObservers.forEach((unsubscribe) => unsubscribe());\n this.unsubscribableObservers.length = 0;\n }\n /**\n * @internal\n */\n reportSystemHealth(detail) {\n var _a;\n const eventEmitter = (_a = this.config.eventEmitter) !== null && _a !== void 0 ? _a : document;\n this.status = this.normaliseEventDetail(detail);\n const loggerFn = this.status.isHealthy ? networkLogger.debug : networkLogger.warn;\n loggerFn(`Emitting 'system-health-changed' event`, safeStringifyValue(this.status));\n eventEmitter === null || eventEmitter === void 0 ? void 0 : eventEmitter.dispatchEvent(new CustomEvent(SystemHealthChanged, {\n detail: this.status,\n bubbles: eventEmitter !== document,\n composed: true,\n }));\n /**\n * Kill the network monitor if the reconnection limit has been reached\n */\n if (this.status.socket.reconnectionLimitReached) {\n networkLogger.debug('Network monitoring no longer required. Please check your network and reload your application.');\n this.destroy();\n }\n }\n /**\n * @internal\n */\n reportStabilityToGenesis(detail) {\n return __awaiter(this, void 0, void 0, function* () {\n networkLogger.debug('User requested report stability to Genesis.');\n networkLogger.info('Please attach this data to your Genesis Support request: \\n', JSON.stringify(detail, null, 2));\n return true;\n });\n }\n /**\n * @remarks\n * Deal with false positives.\n *\n * @privateRemarks\n * There's an argument here for and against normalising ResourceHealth. I think it's more useful to consumers like\n * visual overlays if there is no conflicting information. If we're offline and using the cache, then that should be\n * reflected here.\n *\n * @internal\n */\n normaliseResourceHealth(health, isOnline = true) {\n var _a;\n const isConnected = isOnline ? health.isConnected : false;\n const lastUpdated = (_a = health.lastUpdated) !== null && _a !== void 0 ? _a : this.getNowTimestamp();\n return Object.assign(Object.assign({}, health), { isConnected,\n lastUpdated });\n }\n /**\n * @remarks\n * Deal with false positives.\n *\n * @privateRemarks\n * There's an argument here for and against a normalised SerializedSocketStatus. I think it's more useful to consumers\n * like visual overlays if there is no conflicting information. If we're offline and using the cache, then that\n * should be reflected here.\n *\n * @internal\n */\n normaliseSerializedSocketStatus(socketStatus, isOnline = true) {\n const isConnected = isOnline ? socketStatus.isConnected : false;\n const isDisconnected = !isConnected;\n return Object.assign(Object.assign({}, socketStatus), { isConnected,\n isDisconnected });\n }\n /**\n * @internal\n */\n normaliseEventDetail(detail) {\n var _a, _b, _c, _d;\n const isHealthy = !!(((_a = detail.socket) === null || _a === void 0 ? void 0 : _a.isConfigured)\n ? detail.isOnline && ((_b = detail.socket) === null || _b === void 0 ? void 0 : _b.isConnected) && detail.resourcesAllConnected\n : detail.isOnline);\n const lastUpdated = (_c = detail.lastUpdated) !== null && _c !== void 0 ? _c : this.getNowTimestamp();\n const nextUpdate = (_d = detail.nextUpdate) !== null && _d !== void 0 ? _d : this.getNextTimestamp();\n const username = detail.isAuthenticated && this.user ? this.user.username : undefined;\n const normalisedDetail = Object.assign(Object.assign({}, detail), { browserInformation,\n username,\n isHealthy,\n lastUpdated,\n nextUpdate,\n firstUpdated, runAllChecks: () => {\n networkLogger.debug('User activated run checks command starting.');\n this.runAllChecks('user requested');\n }, reportStabilityToGenesis: () => {\n return this.reportStabilityToGenesis(normalisedDetail);\n } });\n return normalisedDetail;\n }\n /**\n * @returns A flag to indicate if the socket is in a state that allows resource checking.\n * @internal\n */\n preFlightSocketChecks(status) {\n if (!status.isConfigured) {\n networkLogger.debug(`Socket not configured`);\n return false;\n }\n if (status.isReconnecting) {\n networkLogger.debug(`Socket reconnecting`);\n return false;\n }\n if (status.isConnecting) {\n networkLogger.debug(`Socket connecting`);\n return false;\n }\n if (status.isDisconnected) {\n const closedDetails = status.isDisconnectedByServer\n ? `by the server, code: ${status.closedCode}, reason: ${status.closedReason}`\n : '';\n networkLogger.debug(`Socket disconnected ${closedDetails}`);\n if (status.reconnectionLimitReached) {\n networkLogger.debug(`Socket reconnection limit reached`);\n }\n return false;\n }\n /**\n * Socket is okay to run resource checks.\n * Data servers can be set to serve anonymous users, so don't block due to session validity.\n */\n const withOrWithout = this.user.isAuthenticated ? `with` : 'without';\n networkLogger.debug(`Socket connected ${withOrWithout} valid session`);\n return true;\n }\n /**\n * @internal\n */\n getFormattedTimestamp(milliseconds) {\n return formatDateTimeTimestamp(milliseconds);\n }\n /**\n * @internal\n */\n getNowTimestamp() {\n return Date.now();\n }\n /**\n * @internal\n */\n getNextTimestamp() {\n const next = new Date(Date.now() + this.config.checkInterval);\n return next.getTime();\n }\n /**\n * @internal\n */\n synchroniseCheckInterval() {\n clearInterval(this.internalId);\n this.internalId = setInterval(() => this.runAllChecks('check interval'), this.config.checkInterval);\n }\n}\n__decorate([\n NetworkMonitorConfig\n], DefaultNetworkMonitor.prototype, \"config\", void 0);\n__decorate([\n SocketStatus\n], DefaultNetworkMonitor.prototype, \"socketStatus\", void 0);\n__decorate([\n ConnectEvents\n], DefaultNetworkMonitor.prototype, \"connectEvents\", void 0);\n__decorate([\n User\n], DefaultNetworkMonitor.prototype, \"user\", void 0);\n__decorate([\n observable\n], DefaultNetworkMonitor.prototype, \"status\", void 0);\n/**\n * NetworkMonitor DI key.\n *\n * @privateRemarks\n * Marked as internal to stop api-extractor becoming confused cross-linking tokens with the same name.\n *\n * @internal\n */\nexport const NetworkMonitor = DI.createInterface((x) => x.singleton(DefaultNetworkMonitor));\n/**\n * Gets NetworkMonitor from the DI container.\n *\n * @remarks\n * A utility method for host applications that are not using decorators or the DI container.\n *\n * @example\n * ```ts\n * import { getNetworkMonitor } from '@genesislcap/foundation-comms';\n * ...\n * private monitor = getNetworkMonitor();\n * ```\n *\n * @public\n */\nexport function getNetworkMonitor() {\n return DI.getOrCreateDOMContainer().get(NetworkMonitor);\n}\n","/**\n * Resolve a promise after a timeout.\n *\n * @example\n * ```ts\n * const result = await Promise.race([\n * resourceChecks(sourceRef, resource),\n * resolveAfter<MonitoredResourceChecksResult>(this.config.checkTimeout, () => ({\n * isConnected: false,\n * lastUpdated: Date.now(),\n * })),\n * ]);\n * ```\n *\n * @public\n */\nexport const resolveAfter = (ms, valueCreator) => {\n return new Promise((resolve) => {\n setTimeout(() => {\n resolve(valueCreator());\n }, ms);\n });\n};\n","import { progressTemplate as fastProgressTemplate } from '@microsoft/fast-foundation';\nexport const foundationProgressTemplate = (context, definition) => fastProgressTemplate(context, definition);\n","import { progressStyles as fastProgressStyles } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationProgressStyles = (context, definition) => css `\n ${fastProgressStyles(context, definition)}\n :host {\n height: calc(var(--design-unit) * 2px);\n }\n`;\n","import { Progress as FASTProgress } from '@microsoft/fast-components';\nimport { foundationProgressStyles as styles } from './progress.styles';\nimport { foundationProgressTemplate as template } from './progress.template';\n/**\n * @tagname %%prefix%%-progress\n */\nexport class Progress extends FASTProgress {\n}\n// explicitly declaring for extensibility\nexport const foundationProgressShadowOptions = undefined;\nexport const defaultProgressConfig = {\n indeterminateIndicator1: `<span class=\"indeterminate-indicator-1\" part=\"indeterminate-indicator-1\"></span>`,\n indeterminateIndicator2: `<span class=\"indeterminate-indicator-1\" part=\"indeterminate-indicator-1\"></span>`,\n};\n/**\n * The Foundation Progress\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-progress\\>\n */\nexport const foundationProgress = Progress.compose(Object.assign({ baseName: 'progress', template,\n styles, shadowOptions: foundationProgressShadowOptions }, defaultProgressConfig));\n","import { DesignSystem } from '@microsoft/fast-foundation';\nimport * as foundationTokens from './_config/tokens';\nimport * as foundationValues from './_config/values';\nimport { provideTokens } from './design-system-provider';\nexport function createDesignSystemProxy(designSystem) {\n return new Proxy(designSystem, {\n get: (target, prop, ...rest) => {\n if (['withPrefix', 'withShadowRootMode', 'withElementDisambiguation'].includes(prop)) {\n throw new Error('Modification of the Design System is not allowed.');\n }\n return Reflect.get(target, prop, ...rest);\n },\n });\n}\n/**\n * Provides a design system for the specified element either by returning one that was\n * already created for that element or creating one.\n * @param element - The element to root the design system at. By default, this is the body.\n * @param prefix - The prefix for the design system. By default, this is 'foundation'.\n * @param tokens - The tokens for the design system. By default, this is the foundation tokens.\n * @param values - The values for the design system. By default, this is the foundation values.\n * @returns A Foundation Design System\n * @public\n */\nexport const provideDesignSystem = (element, prefix = 'foundation', tokens, values) => {\n if (element) {\n provideTokens(tokens !== null && tokens !== void 0 ? tokens : foundationTokens, values !== null && values !== void 0 ? values : foundationValues, element);\n }\n const designSystem = DesignSystem.getOrCreate(element).withPrefix(prefix);\n return createDesignSystemProxy(designSystem);\n};\n","/**\n * Mode for {@link SystemHealthOverlay}\n * @public\n */\nexport const SystemHealthOverlayMode = {\n app: 'app',\n component: 'component',\n};\n","import { __decorate } from \"tslib\";\nimport { networkLogger, NetworkMonitor, NetworkMonitorConfig, SystemHealthChanged, } from '@genesislcap/foundation-comms';\nimport { formatDateTimeTimestamp } from '@genesislcap/foundation-utils';\nimport { attr, css, html, nullableNumberConverter, observable, repeat, when, } from '@microsoft/fast-element';\nimport { FoundationElement } from '@microsoft/fast-foundation';\nimport { ArrowKeys, classNames, keyEscape, pascalCase } from '@microsoft/fast-web-utilities';\nimport { foundationProgress } from '../../progress';\nimport { provideDesignSystem } from '../../provide-design-system';\nimport { logger } from '../../utils';\nimport { SystemHealthOverlayMode } from './types';\n/**\n * Referenced as used\n */\nprovideDesignSystem().register(foundationProgress({\n prefix: 'next-update',\n}));\n/**\n * SystemHealthOverlay\n * @public\n */\nexport class SystemHealthOverlay extends FoundationElement {\n constructor() {\n super(...arguments);\n this.timeTillNextUpdate = {\n totalMs: 10000,\n remainMs: 10000,\n remainPercent: 100,\n };\n /**\n * Controls the overlay mode, either app or component level.\n * @remarks\n * HTML attribute: mode\n */\n this.mode = SystemHealthOverlayMode.app;\n /**\n * Last known system health status.\n * @privateRemarks\n * This will be updated momentarily when NetworkMonitor.create is called.\n * We may want to delay opening slightly to avoid any overlay flashing during initial resource loading. Noticed at\n * times we may get a temporary health issue on a resource with a NACK stating 'Dataserver subscription does not exist'\n * or similar, which will cause the re-datalogon to occur to try and recover the resource. This might indicate clean\n * up issues elsewhere that need to be addressed.\n */\n this.status = {\n isOnline: true,\n isHealthy: true,\n browserInformation: {},\n socket: {},\n resources: {},\n };\n this.onSystemHealthChanged = (event) => {\n this.status = event.detail;\n this.resourceList = Object.values(this.status.resources).sort((a, b) => Number(b.isConnected) - Number(a.isConnected));\n };\n this.onOpen = (byUser = false) => {\n this.isOpen = true;\n this.wasOpenedByUser = byUser;\n this.isDismissed = false;\n };\n this.onClose = () => {\n this.isOpen = false;\n this.wasOpenedByUser = false;\n this.isDismissed = false;\n };\n this.onDismiss = () => {\n /**\n * Close if the system is healthy, or if this is the second time the user has dismissed the unhealthy overlay.\n */\n if (this.isDismissed || this.status.isHealthy) {\n this.onClose();\n return;\n }\n this.isDismissed = true;\n };\n this.onUpdateStatus = () => {\n this.status.runAllChecks();\n };\n this.onReportStatus = () => {\n this.status.reportStabilityToGenesis();\n };\n this.onReloadWindow = () => {\n location.reload();\n };\n this.onDocumentKeydown = (e) => {\n if (!e.defaultPrevented) {\n switch (e.key) {\n case ArrowKeys.ArrowUp:\n if (e.ctrlKey && e.altKey && !this.isOpen) {\n this.onOpen(true);\n e.preventDefault();\n }\n break;\n case ArrowKeys.ArrowDown:\n if (e.ctrlKey && e.altKey && this.isOpen) {\n this.onClose();\n e.preventDefault();\n }\n break;\n case keyEscape:\n if (this.isOpen) {\n this.onDismiss();\n e.preventDefault();\n }\n break;\n }\n }\n };\n }\n isOpenChanged() {\n this.updateTemplateClassNames();\n }\n isDismissedChanged() {\n this.updateTemplateClassNames();\n }\n modeChanged() {\n if (!this.$fastController.isConnected) {\n return;\n }\n if (this.mode === SystemHealthOverlayMode.component) {\n logger.warn('SystemHealthOverlay has support for app overlays only right now.');\n }\n }\n logLevelChanged() {\n networkLogger.level = this.logLevel;\n }\n statusChanged(prev, next) {\n this.updateClassNames();\n if (!this.$fastController.isConnected) {\n return;\n }\n if ((next === null || next === void 0 ? void 0 : next.isHealthy) === false && !this.isOpen) {\n this.onOpen();\n }\n if ((next === null || next === void 0 ? void 0 : next.isHealthy) === true && this.isOpen && !this.wasOpenedByUser) {\n this.onClose();\n }\n this.startTimeTillNextUpdateCountdown();\n }\n updateClassNames() {\n this.isOnlineClassNames = classNames(['healthy', this.status.isOnline], ['unhealthy', !this.status.isOnline]);\n this.isHealthyClassNames = classNames(['healthy', this.status.isHealthy], ['unhealthy', !this.status.isHealthy]);\n this.isSocketHealthyClassNames = classNames(['healthy', this.isSocketHealthy], ['unhealthy', !this.isSocketHealthy]);\n this.resourcesAllConnectedClassNames = classNames(['healthy', this.status.resourcesAllConnected], ['unhealthy', !this.status.resourcesAllConnected], ['hidden', !this.validResourceList]);\n this.updateTemplateClassNames();\n }\n updateTemplateClassNames() {\n this.templateClassNames = classNames(['open', this.isOpen], ['dismissed', this.isDismissed]);\n this.containerClassNames = classNames(this.isHealthyClassNames, ['open', this.isOpen], ['dismissed', this.isDismissed]);\n }\n startTimeTillNextUpdateCountdown() {\n const oneSecond = 1000;\n const totalMs = this.status.nextUpdate - Date.now();\n let remainMs = totalMs;\n let remainPercent = 100;\n clearInterval(this.timeTillNextUpdateInterval);\n this.timeTillNextUpdate = {\n totalMs,\n remainMs,\n remainPercent,\n };\n this.timeTillNextUpdateInterval = setInterval(() => {\n remainMs -= oneSecond;\n remainPercent = Math.floor((remainMs / totalMs) * 100);\n this.timeTillNextUpdate = {\n totalMs,\n remainMs,\n remainPercent,\n };\n if (remainMs < 0) {\n clearInterval(this.timeTillNextUpdateInterval);\n }\n }, oneSecond);\n }\n connectedCallback() {\n super.connectedCallback();\n this.networkMonitor.create();\n this.addEventListeners();\n }\n disconnectedCallback() {\n super.disconnectedCallback();\n this.networkMonitor.destroy();\n this.removeEventListeners();\n }\n get isSocketHealthy() {\n return (this.status.isOnline &&\n (!this.status.socket.isConfigured ||\n (this.status.socket.isConfigured && this.status.socket.isConnected)));\n }\n get validResourceList() {\n var _a;\n return ((_a = this.resourceList) === null || _a === void 0 ? void 0 : _a.length) > 0;\n }\n /**\n * @internal\n */\n eventBridge() {\n var _a;\n return (_a = this.config.eventEmitter) !== null && _a !== void 0 ? _a : document;\n }\n /**\n * @internal\n */\n addEventListeners() {\n this.eventBridge().addEventListener(SystemHealthChanged, this.onSystemHealthChanged, true);\n document.addEventListener('keydown', this.onDocumentKeydown);\n }\n /**\n * @internal\n */\n removeEventListeners() {\n this.eventBridge().removeEventListener(SystemHealthChanged, this.onSystemHealthChanged, true);\n document.removeEventListener('keydown', this.onDocumentKeydown);\n }\n static getCheckmarkTemplate(isGood) {\n if (isGood) {\n return html `\n <span class=\"checkmark\">✔</span>\n `;\n }\n return html `\n <span class=\"checkmark\">✘</span>\n `;\n }\n}\n__decorate([\n NetworkMonitorConfig\n], SystemHealthOverlay.prototype, \"config\", void 0);\n__decorate([\n NetworkMonitor\n], SystemHealthOverlay.prototype, \"networkMonitor\", void 0);\n__decorate([\n observable\n], SystemHealthOverlay.prototype, \"resourceList\", void 0);\n__decorate([\n observable\n], SystemHealthOverlay.prototype, \"isOpen\", void 0);\n__decorate([\n observable\n], SystemHealthOverlay.prototype, \"wasOpenedByUser\", void 0);\n__decorate([\n observable\n], SystemHealthOverlay.prototype, \"isDismissed\", void 0);\n__decorate([\n observable\n], SystemHealthOverlay.prototype, \"templateClassNames\", void 0);\n__decorate([\n observable\n], SystemHealthOverlay.prototype, \"containerClassNames\", void 0);\n__decorate([\n observable\n], SystemHealthOverlay.prototype, \"isOnlineClassNames\", void 0);\n__decorate([\n observable\n], SystemHealthOverlay.prototype, \"isHealthyClassNames\", void 0);\n__decorate([\n observable\n], SystemHealthOverlay.prototype, \"isSocketHealthyClassNames\", void 0);\n__decorate([\n observable\n], SystemHealthOverlay.prototype, \"resourcesAllConnectedClassNames\", void 0);\n__decorate([\n observable\n], SystemHealthOverlay.prototype, \"timeTillNextUpdate\", void 0);\n__decorate([\n observable\n], SystemHealthOverlay.prototype, \"saveDataCallback\", void 0);\n__decorate([\n attr\n], SystemHealthOverlay.prototype, \"mode\", void 0);\n__decorate([\n attr({ attribute: 'log-level', converter: nullableNumberConverter })\n], SystemHealthOverlay.prototype, \"logLevel\", void 0);\n__decorate([\n observable\n], SystemHealthOverlay.prototype, \"status\", void 0);\n/**\n * Foundation system health overlay template\n *\n * @public\n */\nexport const foundationSystemHealthOverlayTemplate = (context, definition) => html `\n <template class=\"${(x) => x.templateClassNames}\">\n <header class=\"${(x) => x.isHealthyClassNames}\" part=\"header\">\n <h1>System ${(x) => pascalCase(x.isHealthyClassNames)}</h1>\n ${when((x) => !x.status.isHealthy, html `\n <span class=\"data-warning\">Data Validity Unknown</span>\n `)}\n <div class=\"controls\">\n ${when((x) => x.isDismissed, html `\n <a href=\"#\" class=\"open-button\" @click=\"${(x) => x.onOpen(true)}\">View Status</a>\n `)}\n ${when((x) => !x.isDismissed, html `\n <a href=\"#\" class=\"update-status-button\" @click=\"${(x) => x.onUpdateStatus()}\">\n Update Status\n </a>\n <a href=\"#\" class=\"report-status-button\" @click=\"${(x) => x.onReportStatus()}\">\n Report Status\n </a>\n `)}\n ${when((x) => !x.status.isHealthy && x.saveDataCallback, html `\n <a href=\"#\" class=\"save-data-button\" @click=\"${(x) => x.saveDataCallback()}\">\n Save Data\n </a>\n `)}\n <a href=\"#\" class=\"reload-window-button\" @click=\"${(x) => x.onReloadWindow()}\">\n Reload Window\n </a>\n <a href=\"#\" class=\"dismiss-button\" @click=\"${(x) => x.onDismiss()}\">Dismiss (Esc)</a>\n </div>\n </header>\n <div class=\"container ${(x) => x.containerClassNames}\" part=\"container\">\n <section class=\"network-section ${(x) => x.isOnlineClassNames}\" part=\"network-section\">\n <h2>Network ${(x) => pascalCase(x.status.isOnline ? 'online' : 'offline')}</h2>\n <dl class=\"resource-list\">\n <div class=\"resource ${(x) => x.isOnlineClassNames}\">\n <div class=\"attributes\">\n <div class=\"online\">\n <dt>Online</dt>\n <dd>${(x) => x.status.isOnline}</dd>\n </div>\n <div class=\"authenticated\">\n <dt>Authenticated</dt>\n <dd>${(x) => x.status.isAuthenticated}</dd>\n </div>\n ${when((x) => x.status.username, html `\n <div class=\"username\">\n <dt>Username</dt>\n <dd>${(x) => x.status.username}</dd>\n </div>\n `)}\n <div class=\"platform-type\">\n <dt>Platform Type</dt>\n <dd>${(x) => { var _a; return pascalCase((_a = x.status.browserInformation.platform) === null || _a === void 0 ? void 0 : _a.type); }}</dd>\n </div>\n <div class=\"os-name\">\n <dt>OS Name</dt>\n <dd>${(x) => { var _a; return pascalCase((_a = x.status.browserInformation.os) === null || _a === void 0 ? void 0 : _a.name); }}</dd>\n </div>\n <div class=\"os-version\">\n <dt>OS Version</dt>\n <dd>${(x) => { var _a; return (_a = x.status.browserInformation.os) === null || _a === void 0 ? void 0 : _a.version; }}</dd>\n </div>\n </div>\n <div class=\"attributes\">\n <div class=\"browser-name\">\n <dt>Browser Name</dt>\n <dd>${(x) => { var _a; return pascalCase((_a = x.status.browserInformation.browser) === null || _a === void 0 ? void 0 : _a.name); }}</dd>\n </div>\n <div class=\"browser-version\">\n <dt>Browser Version</dt>\n <dd>${(x) => { var _a; return (_a = x.status.browserInformation.browser) === null || _a === void 0 ? void 0 : _a.version; }}</dd>\n </div>\n <div class=\"first-updated\">\n <dt>First updated</dt>\n <dd>${(x) => formatDateTimeTimestamp(x.status.firstUpdated)}</dd>\n </div>\n <div class=\"last-updated\">\n <dt>Last updated</dt>\n <dd>${(x) => formatDateTimeTimestamp(x.status.lastUpdated)}</dd>\n </div>\n ${when((x) => !x.status.socket.reconnectionLimitReached, html `\n <div class=\"next-update\">\n <dt>Next update</dt>\n <dd>${(x) => formatDateTimeTimestamp(x.status.nextUpdate)}</dd>\n </div>\n <div class=\"next-update-progress\">\n <dt></dt>\n <dd>\n <next-update-progress\n value=\"${(x) => x.timeTillNextUpdate.remainPercent}\"\n ></next-update-progress>\n </dd>\n </div>\n `)}\n </div>\n <div class=\"controls\">\n ${(x) => SystemHealthOverlay.getCheckmarkTemplate(x.status.isOnline)}\n </div>\n </div>\n </dl>\n </section>\n <section class=\"socket-section ${(x) => x.isSocketHealthyClassNames}\" part=\"socket-section\">\n <h2>WebSocket ${(x) => pascalCase(x.isSocketHealthyClassNames)}</h2>\n <dl class=\"resource-list\">\n <div class=\"resource ${(x) => x.isSocketHealthyClassNames}\">\n <div class=\"attributes\">\n <div class=\"configured\">\n <dt>Configured</dt>\n <dd>${(x) => x.status.socket.isConfigured}</dd>\n </div>\n <div class=\"connected\">\n <dt>Connected</dt>\n <dd>${(x) => x.status.socket.isConnected}</dd>\n </div>\n <div class=\"reconnecting\">\n <dt>Reconnecting</dt>\n <dd>${(x) => x.status.socket.isReconnecting}</dd>\n </div>\n <div class=\"reconnection-exhausted\">\n <dt>Reconnection exhausted</dt>\n <dd>${(x) => x.status.socket.reconnectionLimitReached}</dd>\n </div>\n </div>\n <div class=\"attributes\">\n <div class=\"disconnected-by-server\">\n <dt>Disconnected by server</dt>\n <dd>${(x) => x.status.socket.isDisconnectedByServer}</dd>\n </div>\n <div class=\"closed-clean\">\n <dt>Closed clean</dt>\n <dd>${(x) => x.status.socket.closedClean}</dd>\n </div>\n <div class=\"closed-code\">\n <dt>Closed code</dt>\n <dd>${(x) => x.status.socket.closedCode}</dd>\n </div>\n <div class=\"closed-reason\">\n <dt>Closed reason</dt>\n <dd>${(x) => x.status.socket.closedReason}</dd>\n </div>\n </div>\n <div class=\"controls\">\n ${(x) => SystemHealthOverlay.getCheckmarkTemplate(x.isSocketHealthy)}\n </div>\n </div>\n </dl>\n </section>\n <section\n class=\"resource-section ${(x) => x.resourcesAllConnectedClassNames}\"\n part=\"resource-section\"\n >\n <h2>Resources ${(x) => pascalCase(x.resourcesAllConnectedClassNames)}</h2>\n <dl class=\"resource-list\">\n ${repeat((x) => x.resourceList, html `\n <div class=\"resource ${(x) => (x.isConnected ? 'healthy' : 'unhealthy')}\">\n <div class=\"attributes\">\n <div class=\"name\">\n <dt>Name</dt>\n <dd>${(x) => x.name}</dd>\n </div>\n <div class=\"status\">\n <dt>Status</dt>\n <dd>${(x) => (x.isConnected ? 'Healthy' : 'Unhealthy')}</dd>\n </div>\n <div class=\"last-checked\">\n <dt>Checked</dt>\n <dd>${(x) => formatDateTimeTimestamp(x.lastUpdated)}</dd>\n </div>\n <div class=\"subscriptions\">\n <dt>Subscriptions</dt>\n <dd>${(x) => { var _a; return (_a = x.sourceRef) === null || _a === void 0 ? void 0 : _a.length; }}</dd>\n </div>\n <div class=\"source-refs\">\n <dt>Source Refs</dt>\n <dd>${(x) => x.sourceRef}</dd>\n </div>\n </div>\n <div class=\"controls\">\n ${(x) => SystemHealthOverlay.getCheckmarkTemplate(x.isConnected)}\n </div>\n </div>\n `)}\n </dl>\n </section>\n </div>\n </template>\n`;\n/**\n * Foundation system health overlay styles\n * @public\n */\nexport const foundationSystemHealthOverlayStyles = (context, definition) => css `\n :host {\n --font-family: Menlo, Consolas, monospace;\n\n --color-background: black;\n --color-healthy: green;\n --color-unhealthy: red;\n\n --opacity-low-percent: 10%;\n --opacity-med-percent: 50%;\n --opacity-high-percent: 90%;\n\n --color-background-opacity-high: rgba(0, 0, 0, 0.9);\n\n --color-healthy-opacity-low: rgba(0, 128, 0, 0.1);\n --color-healthy-opacity-20: rgba(0, 128, 0, 0.2);\n --color-healthy-opacity-med: rgba(0, 128, 0, 0.5);\n\n --color-unhealthy-opacity-low: rgba(255, 0, 0, 0.1);\n --color-unhealthy-opacity-20: rgba(255, 0, 0, 0.2);\n --color-unhealthy-opacity-med: rgba(255, 0, 0, 0.5);\n\n display: none;\n position: fixed;\n inset: 0;\n width: 100vw;\n height: 100vh;\n border: none;\n z-index: 2147483647;\n box-sizing: border-box;\n padding: 2rem 2rem 4rem;\n overflow: auto;\n background-color: var(--color-background-opacity-high);\n line-height: 1.5;\n font-size: 1rem;\n font-family: var(--font-family, Menlo, Consolas, monospace) !important;\n }\n\n @supports (color: color-mix(in srgb, black, black)) {\n :host {\n --color-background-opacity-high: color-mix(\n in srgb,\n var(--color-background) var(--opacity-high-percent),\n transparent\n );\n\n --color-healthy-opacity-low: color-mix(\n in srgb,\n var(--color-healthy) var(--opacity-low-percent),\n transparent\n );\n\n --color-healthy-opacity-20: color-mix(in srgb, var(--color-healthy) 20%, transparent);\n\n --color-healthy-opacity-med: color-mix(\n in srgb,\n var(--color-healthy) var(--opacity-med-percent),\n transparent\n );\n\n --color-unhealthy-opacity-low: color-mix(\n in srgb,\n var(--color-unhealthy) var(--opacity-low-percent),\n transparent\n );\n\n --color-unhealthy-opacity-20: color-mix(in srgb, var(--color-unhealthy) 20%, transparent);\n\n --color-unhealthy-opacity-med: color-mix(\n in srgb,\n var(--color-unhealthy) var(--opacity-med-percent),\n transparent\n );\n }\n }\n\n :host(.open.dismissed) {\n display: block;\n overflow: hidden;\n padding: 0;\n height: fit-content;\n min-height: 45px;\n background-color: var(--color-unhealthy-opacity-low);\n inset: unset;\n position: fixed;\n bottom: 0;\n }\n\n :host(.open.dismissed) header {\n padding: 0 1em;\n }\n\n :host(.open) {\n display: block;\n height: 100vh;\n }\n\n .container {\n padding: 0 1rem 1.5rem;\n }\n\n .container.healthy {\n background-color: var(--color-healthy-opacity-low);\n }\n\n .container.unhealthy {\n background-color: var(--color-unhealthy-opacity-low);\n }\n\n .container.open.dismissed {\n display: none;\n }\n\n header {\n display: flex;\n justify-content: space-between;\n align-items: baseline;\n margin-bottom: 1px;\n padding: 0.5em 1em;\n flex-wrap: wrap;\n flex-direction: row;\n }\n\n header h1 {\n font-size: 1em;\n font-weight: normal;\n }\n\n header .controls a {\n font-size: small;\n padding: 0 1em 0 0;\n }\n\n header.healthy {\n color: var(--color-healthy);\n background-color: var(--color-healthy-opacity-low);\n }\n\n header.unhealthy {\n color: var(--color-unhealthy);\n background-color: var(--color-unhealthy-opacity-low);\n }\n\n section {\n padding-top: 1.5em;\n font-size: x-small;\n }\n\n section h2 {\n font-size: 1.3em;\n margin: 0 0 1em 0;\n text-align: center;\n color: var(--color-unhealthy);\n }\n\n section.unhealthy h2 {\n color: var(--color-unhealthy);\n }\n\n section.healthy h2 {\n color: var(--color-healthy);\n }\n\n .hidden {\n display: none;\n }\n\n .resource-list {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));\n gap: 1rem;\n }\n\n .resource {\n padding: 0.5em 1em;\n display: grid;\n grid-template-columns: 3fr 1fr;\n border-radius: calc(var(--control-corner-radius) * 1px);\n }\n\n .resource.healthy {\n border: var(--color-healthy-opacity-med) 1px solid;\n color: var(--color-healthy);\n }\n\n .resource.unhealthy {\n border: var(--color-unhealthy-opacity-med) 1px solid;\n color: var(--color-unhealthy);\n }\n\n .resource .attributes > div {\n display: grid;\n grid-template-columns: 1fr 2fr;\n }\n\n .resource dt {\n color: inherit;\n opacity: 0.7;\n }\n\n .resource dt:not(:empty)::after {\n content: ': ';\n }\n\n .resource dd {\n margin: 0 0 0 0.1em;\n }\n\n .resource .controls {\n display: grid;\n justify-content: center;\n align-items: center;\n border-left: 1px var(--color-background-opacity-high) solid;\n }\n\n .controls a {\n display: inline-block;\n color: inherit;\n text-underline-offset: 0.2em;\n }\n\n .controls .checkmark {\n font-size: large;\n }\n\n .resource.healthy .controls {\n border-left: 1px var(--color-healthy-opacity-20) solid;\n }\n\n .resource.unhealthy .controls {\n border-left: 1px var(--color-unhealthy-opacity-20) solid;\n }\n\n .network-section .resource-list,\n .socket-section .resource-list {\n display: grid;\n grid-template-columns: 1fr;\n }\n\n .network-section .resource,\n .socket-section .resource {\n grid-template-columns: 2fr 2fr 1fr;\n }\n\n next-update-progress {\n height: 1px;\n margin: 0 1em 0 0;\n }\n\n .resource.healthy next-update-progress::part(determinate) {\n background-color: var(--color-healthy);\n }\n\n .resource.healthy next-update-progress::part(progress) {\n background-color: var(--color-healthy-opacity-20);\n }\n\n .resource.unhealthy next-update-progress::part(determinate) {\n background-color: var(--color-unhealthy);\n }\n\n .resource.unhealthy next-update-progress::part(progress) {\n background-color: var(--color-unhealthy-opacity-20);\n }\n\n .data-warning {\n font-size: small;\n margin: 0 0.5em;\n padding: 0.2em 0.5em;\n background-color: var(--color-unhealthy-opacity-20);\n }\n`;\n/**\n * Foundation system health overlay styles\n * @public\n */\nexport const foundationSystemHealthOverlayShadowOptions = undefined;\n/**\n * Foundation system health overlay styles\n * @public\n */\nexport const defaultSystemHealthOverlayConfig = {};\n/**\n * Foundation system health overlay\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-system-health-overlay\\>\n */\nexport const foundationSystemHealthOverlay = SystemHealthOverlay.compose(Object.assign({ baseName: 'system-health-overlay', template: foundationSystemHealthOverlayTemplate, styles: foundationSystemHealthOverlayStyles, shadowOptions: foundationSystemHealthOverlayShadowOptions }, defaultSystemHealthOverlayConfig));\n","import { __decorate } from \"tslib\";\nimport { attr, html, css } from '@microsoft/fast-element';\nimport { FoundationElement } from '@microsoft/fast-foundation';\nimport { createPopper } from '@popperjs/core';\nexport const jsonConverter = {\n toView(value) {\n return JSON.stringify(value);\n },\n fromView(value) {\n if (value === null || value === undefined)\n return value;\n return JSON.parse(value);\n },\n};\n/**\n * @tagname %%prefix%%-popper\n */\nexport class Popper extends FoundationElement {\n constructor() {\n super(...arguments);\n this.show = false;\n this.event = 'click';\n this.placement = 'bottom';\n this.flip = false;\n }\n selectorChanged(oldValue, newValue) {\n if (newValue === oldValue)\n return;\n if (this.popper)\n this.popper.destroy();\n if (this.target) {\n this.target.removeEventListener(this.event, this.toggle.bind(this));\n }\n this.target = this.getRootNode().querySelector(this.selector);\n this.target.addEventListener(this.event, this.toggle.bind(this));\n this.popper = createPopper(this.target, this, this.buildOptions());\n }\n placementChanged() {\n if (this.popper)\n this.popper.setOptions(this.buildOptions());\n }\n offsetChanged() {\n if (this.popper)\n this.popper.setOptions(this.buildOptions());\n }\n flipChanged() {\n if (this.popper)\n this.popper.setOptions(this.buildOptions());\n }\n buildOptions() {\n const options = {\n placement: this.placement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: this.offset || [0, 0],\n },\n },\n {\n name: 'flip',\n enabled: this.flip,\n },\n ],\n };\n return options;\n }\n toggle() {\n this.show = !this.show;\n }\n disconnectedCallback() {\n super.disconnectedCallback();\n if (this.popper) {\n this.popper.destroy();\n this.popper = null;\n }\n }\n}\n__decorate([\n attr\n], Popper.prototype, \"selector\", void 0);\n__decorate([\n attr({ mode: 'boolean' })\n], Popper.prototype, \"show\", void 0);\n__decorate([\n attr\n], Popper.prototype, \"event\", void 0);\n__decorate([\n attr\n], Popper.prototype, \"placement\", void 0);\n__decorate([\n attr({ converter: jsonConverter })\n], Popper.prototype, \"offset\", void 0);\n__decorate([\n attr({ mode: 'boolean' })\n], Popper.prototype, \"flip\", void 0);\nconst styles = css `\n :host {\n display: none;\n inset: unset !important;\n transform: unset !important;\n }\n\n :host([show]) {\n display: block;\n }\n`;\nconst template = html `\n <template>\n <slot></slot>\n </template>\n`;\n/**\n * The Foundation Popper\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-popper\\>\n */\nexport const foundationPopper = Popper.compose({\n baseName: 'popper',\n styles,\n template,\n});\n","import { progressRingTemplate as fastProgressRingTemplate } from '@microsoft/fast-foundation';\nexport const foundationProgressRingTemplate = (context, definition) => fastProgressRingTemplate(context, definition);\n","import { progressRingStyles as fastProgressRingStyles } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationProgressRingStyles = (context, definition) => css `\n ${fastProgressRingStyles(context, definition)}\n`;\n","import { Progress as FASTProgressRing } from '@microsoft/fast-components';\nimport { foundationProgressRingStyles as styles } from './progress-ring.styles';\nimport { foundationProgressRingTemplate as template } from './progress-ring.template';\n/**\n * @tagname %%prefix%%-progress-ring\n */\nexport class ProgressRing extends FASTProgressRing {\n}\n// explicitly declaring for extensibility\nexport const foundationProgressRingShadowOptions = undefined;\nexport const defaultProgressRingConfig = {\n indeterminateIndicator: `\n <svg class=\"progress\" part=\"progress\" viewBox=\"0 0 16 16\">\n <circle class=\"background\" part=\"background\" cx=\"8px\" cy=\"8px\" r=\"7px\"></circle>\n <circle class=\"indeterminate-indicator-1\" part=\"indeterminate-indicator-1\" cx=\"8px\" cy=\"8px\" r=\"7px\"></circle>\n </svg>\n `,\n};\n/**\n * The Foundation Progress Ring\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-progress-ring\\>\n */\nexport const foundationProgressRing = ProgressRing.compose(Object.assign({ baseName: 'progress-ring', template,\n styles, shadowOptions: foundationProgressRingShadowOptions }, defaultProgressRingConfig));\n","import { radioTemplate as fastRadioTemplate } from '@microsoft/fast-foundation';\nexport const foundationRadioTemplate = (context, definition) => fastRadioTemplate(context, definition);\n","import { radioStyles as fastRadioStyles } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationRadioStyles = (context, definition) => css `\n ${fastRadioStyles(context, definition)}\n`;\n","import { Radio as FASTRadio } from '@microsoft/fast-components';\nimport { foundationRadioStyles as styles } from './radio.styles';\nimport { foundationRadioTemplate as template } from './radio.template';\n/**\n * @tagname %%prefix%%-radio\n */\nexport class Radio extends FASTRadio {\n}\n// explicitly declaring for extensibility\nexport const foundationRadioShadowOptions = undefined;\nexport const defaultRadioConfig = {\n checkedIndicator: `\n <div part=\"checked-indicator\" class=\"checked-indicator\"></div>\n `,\n};\n/**\n * The Foundation Radio\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-radio\\>\n */\nexport const foundationRadio = Radio.compose(Object.assign({ baseName: 'radio', template,\n styles, shadowOptions: foundationRadioShadowOptions }, defaultRadioConfig));\n","import { radioGroupTemplate as fastRadioGroupTemplate } from '@microsoft/fast-foundation';\nexport const foundationRadioGroupTemplate = (context, definition) => fastRadioGroupTemplate(context, definition);\n","import { radioGroupStyles as fastRadioGroupStyles } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationRadioGroupStyles = (context, definition) => css `\n ${fastRadioGroupStyles(context, definition)}\n`;\n","import { RadioGroup as FASTRadioGroup } from '@microsoft/fast-components';\nimport { foundationRadioGroupStyles as styles } from './radio-group.styles';\nimport { foundationRadioGroupTemplate as template } from './radio-group.template';\n/**\n * @tagname %%prefix%%-radio-group\n */\nexport class RadioGroup extends FASTRadioGroup {\n}\n// explicitly declaring for extensibility\nexport const foundationRadioGroupShadowOptions = undefined;\nexport const defaultRadioGroupConfig = {};\n/**\n * The Foundation Radio Group\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-radio-group\\>\n */\nexport const foundationRadioGroup = RadioGroup.compose(Object.assign({ baseName: 'radio-group', template,\n styles, shadowOptions: foundationRadioGroupShadowOptions }, defaultRadioGroupConfig));\n","import { css } from '@microsoft/fast-element';\nexport const schedulerStyles = css `\n /* Host */\n :host {\n display: flex;\n flex-direction: column;\n width: 100%;\n }\n`;\n","import { sync } from '@genesislcap/foundation-utils';\nimport { html } from '@microsoft/fast-element';\nimport { getPrefix } from '../utils';\nexport const getPrefixedScheduler = (prefix) => html `\n <template>\n <${prefix}-scheduler-timezone \n :timezone=${sync((x) => x.timezone)}\n @change=${(x, c) => x.handleChange(c.event, 'timezone')}\n ></${prefix}-scheduler-timezone>\n <${prefix}-scheduler-cron-builder\n :cron=${sync((x) => x.cron)}\n @change=${(x, c) => x.handleChange(c.event, 'cronExpression')}\n ></${prefix}-scheduler-cron-builder>\n </template>\n`;\nexport const foundationSchedulerTemplate = html `\n ${(x) => getPrefixedScheduler(getPrefix(x))}\n`;\n","import { __decorate } from \"tslib\";\nimport { observable } from '@microsoft/fast-element';\nimport { FoundationElement } from '@microsoft/fast-foundation';\nimport { schedulerStyles as styles } from './scheduler.styles';\nimport { foundationSchedulerTemplate as template } from './scheduler.template';\n/**\n * @tagname %%prefix%%-scheduler\n */\nexport class Scheduler extends FoundationElement {\n constructor() {\n super(...arguments);\n this.timezone = '';\n this.cron = '';\n }\n cronConfigChanged() {\n var _a, _b;\n this.timezone = ((_a = this.cronConfig) === null || _a === void 0 ? void 0 : _a.timezone) || '';\n this.cron = ((_b = this.cronConfig) === null || _b === void 0 ? void 0 : _b.cronExpression) || '';\n }\n handleChange(event, key) {\n event.stopPropagation();\n const { value } = event.target;\n this.cronConfig = Object.assign(Object.assign({}, this.cronConfig), { [key]: value });\n this.$emit('change', this.cronConfig);\n }\n}\n__decorate([\n observable\n], Scheduler.prototype, \"timezone\", void 0);\n__decorate([\n observable\n], Scheduler.prototype, \"cron\", void 0);\n__decorate([\n observable\n], Scheduler.prototype, \"cronConfig\", void 0);\n// explicitly declaring for extensibility\nexport const foundationSchedulerShadowOptions = undefined;\nexport const defaultConfig = {};\n/**\n * The Foundation Scheduler Element.\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-scheduler\\>\n */\nexport const foundationScheduler = Scheduler.compose(Object.assign({ baseName: 'scheduler', styles,\n template, shadowOptions: foundationSchedulerShadowOptions }, defaultConfig));\n","import { LogLevel } from '@genesislcap/foundation-logger';\nimport { showToast } from './toast-launcher';\n/**\n * Shows the notification toast\n * @public\n */\nexport const showNotificationToast = (configuration, tagName, notificationContainer) => {\n if (!configuration.title) {\n throw new Error('Title is required');\n }\n if (!configuration.body) {\n throw new Error(`Missing required param 'body'`);\n }\n let notificationStructure = {\n title: configuration.title,\n body: configuration.body,\n iconName: configuration.iconName,\n };\n let config = {};\n if (configuration.createdAt) {\n notificationStructure = Object.assign({ createdAt: configuration.createdAt }, notificationStructure);\n }\n if (configuration.logLevel in LogLevel) {\n notificationStructure = Object.assign({ logLevel: configuration.logLevel }, notificationStructure);\n }\n if (configuration.toast) {\n config = Object.assign({ toast: configuration.toast }, config);\n notificationStructure = Object.assign({ config }, notificationStructure);\n }\n showToast(notificationStructure, tagName, notificationContainer);\n};\n","/**\n * Defines allowed recurrence types including Daily, Weekly, Monthly, Yearly.\n * @internal\n */\nexport var RecurrenceType;\n(function (RecurrenceType) {\n RecurrenceType[\"HOURLY\"] = \"Hourly\";\n RecurrenceType[\"DAILY\"] = \"Daily\";\n RecurrenceType[\"WEEKLY\"] = \"Weekly\";\n RecurrenceType[\"MONTHLY\"] = \"Monthly\";\n RecurrenceType[\"YEARLY\"] = \"Yearly\";\n})(RecurrenceType || (RecurrenceType = {}));\n/** @internal */\nexport var WeekType;\n(function (WeekType) {\n WeekType[\"WEEK\"] = \"Week\";\n WeekType[\"WORK_WEEK\"] = \"Work week\";\n})(WeekType || (WeekType = {}));\n/** @internal */\nexport var DateOrDay;\n(function (DateOrDay) {\n DateOrDay[\"DATE\"] = \"Date\";\n DateOrDay[\"DAY_OF_MONTH\"] = \"Day of month\";\n})(DateOrDay || (DateOrDay = {}));\n/** @internal */\nexport const daysOfWeek = [\n { value: '2', label: 'Monday' },\n { value: '3', label: 'Tuesday' },\n { value: '4', label: 'Wednesday' },\n { value: '5', label: 'Thursday' },\n { value: '6', label: 'Friday' },\n { value: '7', label: 'Saturday' },\n { value: '1', label: 'Sunday' },\n];\n/** @internal */\nexport const weekNumber = [\n { value: '1', label: 'First' },\n { value: '2', label: 'Second' },\n { value: '3', label: 'Third' },\n { value: '4', label: 'Fourth' },\n { value: '-1', label: 'Last' },\n];\n/** @internal */\nexport const months = [\n { value: '1', label: 'January' },\n { value: '2', label: 'February' },\n { value: '3', label: 'March' },\n { value: '4', label: 'April' },\n { value: '5', label: 'May' },\n { value: '6', label: 'June' },\n { value: '7', label: 'July' },\n { value: '8', label: 'August' },\n { value: '9', label: 'September' },\n { value: '10', label: 'October' },\n { value: '11', label: 'November' },\n { value: '12', label: 'December' },\n];\nexport const MAX_MONTHS = 12;\nexport const MAX_DAYS = 31;\nexport const CRON_LENGTH = 6;\nexport const MAX_WEEK_DAYS = 7;\nexport const MAX_HOURS = 24;\nexport const MAX_MINS_SEC = 60;\nexport const MAX_WEEK_NUMBER = 4;\nexport var CronBuilderEvents;\n(function (CronBuilderEvents) {\n CronBuilderEvents[\"updateCronConfig\"] = \"update-cron-config\";\n})(CronBuilderEvents || (CronBuilderEvents = {}));\n","import { CRON_LENGTH, DateOrDay, MAX_DAYS, MAX_HOURS, MAX_MINS_SEC, MAX_MONTHS, MAX_WEEK_DAYS, MAX_WEEK_NUMBER, RecurrenceType, WeekType, } from './types';\nexport const formatFrequency = (freq) => {\n return Number(freq) > 1 ? `/${freq}` : '';\n};\n/**\n * generates a cron expression for RecurrenceType.HOURLY on the basis of provided config\n * @param config {@link HourlyConfig}- the config object that contains Hourly recurrence details\n * @returns The cron expression string (e.g. `\"0 30 0/2 ? * *\"` runs every 2 hours at 30 minutes\n *\n * @example\n * ```ts\n * const cron = getCronExpressionForHourly({\n * seconds: \"0\",\n * minutes: \"30\",\n * frequency: 2,\n * });\n * console.log(cron); // \"0 30 0/2 ? * *\"\n * ```\n * @internal\n */\nexport function getCronExpressionForHourly(config) {\n return `${config.seconds} ${config.minutes} 0/${config.frequency} ? * *`;\n}\n/**\n * generates a cron expression for RecurrenceType.DAILY on the basis of provided config\n * @param config {@link DailyConfig}- the config object that contains Daily recurrence details\n * @returns The cron expression string (e.g. `\"0 30 10 ? * 2-6\"` runs on weekdays from monday-friday at 10:30\n *\n * @example\n * ```ts\n * const cron = getCronExpressionForDaily({\n * seconds: \"0\",\n * hours: \"10\",\n * minutes: \"30\",\n * frequency: 2,\n weekType: 'Work week'\n * });\n * console.log(cron); // \"0 30 10 ? * 2-6\"\n * ```\n * @internal\n */\nexport function getCronExpressionForDaily(config, formatFrequencyInput = formatFrequency) {\n const dayOfMonth = config.weekType === WeekType.WORK_WEEK ? '?' : `*${formatFrequencyInput(config.frequency)}`;\n return `${config.seconds} ${config.minutes} ${config.hours} ${dayOfMonth} * ${config.weekType === WeekType.WORK_WEEK ? '2-6' : '?'}`;\n}\n/**\n * generates a cron expression for RecurrenceType.WEEKLY on the basis of provided config\n * @param config {@link WeeklyConfig}- the config object that contains Weekly recurrence details\n * @returns The cron expression string (e.g. `\"0 30 10 ? * 1,3\"` runs every sunday and tuesday at 10:30\n *\n * @example\n * ```ts\n * const cron = getCronExpressionForWeekly({\n * seconds: \"0\",\n * hours: \"10\",\n * minutes: \"30\",\n selectedDays: new Set(['1','3'])\n * });\n * console.log(cron); // \"0 30 10 ? * 1,3\"\n * ```\n * @internal\n */\nexport function getCronExpressionForWeekly(config) {\n const daysOfWeek = [...config.selectedDays].join(',') || '*';\n return `${config.seconds} ${config.minutes} ${config.hours} ? * ${daysOfWeek}`;\n}\n/**\n * generates a cron expression for RecurrenceType.MONTHLY on the basis of provided config\n * @param config {@link MonthlyConfig}- the config object that contains Monthly recurrence details\n * * allows user to specify either Date of the month when dateOrDay is of 'Date' type or\n * Day of week and weekNumber when dateOrDay is of type 'Day of month'\n * @returns The cron expression string (e.g. `\"0 30 10 15 *'/4 ?\"` runs every 4 months on 15th at 10:30 am)\n *\n * @example with dateOrDay type = 'Date'\n * ```ts\n * const cron = getCronExpressionForMonth({\n * seconds: \"0\",\n * hours: \"10\",\n * minutes: \"30\",\n * frequency: 4,\n * dateOrDay: {\n * type: \"Date\",\n * dayDate: 15,\n * }\n * });\n * console.log(cron); // \"0 30 10 15 *'/4 ?\"\n * ```\n * @example with dateOrDay type = 'Day of month'\n * Runs on second friday of every 4th month at 10:30\n * ```ts\n * const cron = getCronExpressionForMonth({\n * seconds: \"0\",\n * hours: \"10\",\n * minutes: \"30\",\n * frequency: 4,\n * dateOrDay: {\n * type: \"Day of month\",\n * weekNumber: 2,\n * day: '5'\n * }\n * });\n * console.log(cron); // \"0 30 10 ? *'/4 5#2\"\n * ```\n */\n/** @internal */\nexport function getCronExpressionForMonth(config, formatFrequencyInput = formatFrequency) {\n const { dateOrDay, minutes, hours, seconds, frequency: freq } = config;\n const frequency = formatFrequencyInput(freq);\n if (dateOrDay.type === DateOrDay.DATE) {\n return `${seconds} ${minutes} ${hours} ${dateOrDay.dayDate} *${frequency} ?`;\n }\n else if (dateOrDay.weekNumber === '-1') {\n return `${seconds} ${minutes} ${hours} ? *${frequency} ${dateOrDay.day}L`;\n }\n else {\n return `${config.seconds} ${minutes} ${hours} ? *${frequency} ${dateOrDay.day}#${dateOrDay.weekNumber}`;\n }\n}\n/**\n * generates a cron expression for RecurrenceType.YEARLY on the basis of provided config\n * @param config {@link YearlyConfig}- the config object that contains Yearly recurrence details\n * allows user to specify either Date of the month and month when dateOrDay is of 'Date' type or\n * Day of week, weekNumber and month when dateOrDay is of type 'Day of month'\n * @returns The cron expression string (e.g. `\"0 30 10 15 3 ?\"` runs every year on March 15 at 10:30 am)\n *\n * @example with dateOrDay type = 'Date'\n * ```ts\n * const cron = getCronExpressionForYear({\n * seconds: \"0\",\n * hours: \"10\",\n * minutes: \"30\",\n * frequency: 2,\n * dateOrDay: {\n * type: \"Date\",\n * month: '3',\n * dayDate: 15,\n * }\n * });\n * console.log(cron); // \"0 30 10 15 3 ?\"\n * ```\n * @example with dateOrDay type = 'Day of month'\n * Runs on second friday of march, every 2 years\n * ```ts\n * const cron = getCronExpressionForYear({\n * seconds: \"0\",\n * hours: \"10\",\n * minutes: \"30\",\n * frequency: 2,\n * dateOrDay: {\n * type: \"Day of month\",\n * month: '3',\n * weekNumber: 2,\n * day: '5'\n * }\n * });\n * console.log(cron); // \"0 30 10 ? 3 5#2\"\n * ```\n * @internal\n */\nexport function getCronExpressionForYear(config) {\n const { dateOrDay, minutes, seconds, hours } = config;\n if (dateOrDay.type === DateOrDay.DATE) {\n return `${seconds} ${minutes} ${hours} ${dateOrDay.dayDate} ${dateOrDay.month} ?`;\n }\n else if (dateOrDay.weekNumber === '-1') {\n return `${seconds} ${minutes} ${hours} ? ${dateOrDay.month} ${dateOrDay.day}L`;\n }\n else {\n return `${seconds} ${minutes} ${hours} ? ${dateOrDay.month} ${dateOrDay.day}#${dateOrDay.weekNumber}`;\n }\n}\n/**\n * @internal\n */\nexport const isInRange = (val, min, max) => {\n const numVal = Number(val);\n return !isNaN(numVal) && numVal <= max && numVal >= min;\n};\n/**\n * @internal\n */\nexport function isValidValue(val, minVal, maxVal, checkSpecial = false, isValueInRange = isInRange) {\n if (val === '*')\n return true;\n // support for ? and L in day of month\n if (checkSpecial && (val === '?' || val === 'L'))\n return true;\n if (checkSpecial && val.endsWith('L')) {\n return isValueInRange(val.slice(0, -1), minVal, maxVal); // Ensure it's a valid weekday number (0-7)\n }\n // support if it's a step value (*/n)\n if (val.startsWith('*/')) {\n return isValueInRange(val.substring(2), 1, maxVal);\n }\n // support if it's a step value for hourly (0/n)\n if (val.startsWith('0/')) {\n return isValueInRange(val.substring(2), 0, maxVal);\n }\n // Support `Day_of_Week#WeekNumber` (e.g., `6#3` means \"the third Friday of the month\")\n if (checkSpecial && val.includes('#')) {\n const [weekday, weekNumber] = val.split('#');\n return (isValueInRange(weekday, minVal, maxVal) && isValueInRange(weekNumber, 1, MAX_WEEK_NUMBER));\n }\n // Check if it's a single number e.g. 12,13\n if (isValueInRange(val, minVal, maxVal))\n return true;\n // Check if it's a range (e.g., 2-6)\n if (val.includes('-')) {\n const [start, end] = val.split('-');\n return isValueInRange(start, minVal, maxVal) && isValueInRange(end, minVal, maxVal);\n }\n // Check if it's a list (e.g., 1,2,3)\n if (val.includes(',')) {\n return val\n .split(',')\n .every((part) => isValidValue(part, minVal, maxVal, checkSpecial, isValueInRange));\n }\n return false;\n}\n/**\n * used to validate cron expression,\n * checks no of parts should be exactly 6 and verify each part\n * @internal */\nexport const isValidCron = (cron, isValid = isValidValue) => {\n const cronParts = cron.trim().split(' ');\n // Ensure it has exactly 6 part\n if (cronParts.length != CRON_LENGTH)\n return false;\n const [second, minute, hour, dayOfMonth, month, dayOfWeek] = cronParts;\n // Validate each part\n return (isValid(second, 0, MAX_MINS_SEC - 1) &&\n isValid(minute, 0, MAX_MINS_SEC - 1) &&\n isValid(hour, 0, MAX_HOURS - 1) &&\n isValid(dayOfMonth, 1, MAX_DAYS, true) && // Allow `L` and `?`\n isValid(month, 1, MAX_MONTHS) &&\n isValid(dayOfWeek, 0, MAX_WEEK_DAYS, true) // Allow `L`, `?`, and `#`\n );\n};\n/**\n * similar to {@link getCronExpressionForDaily}\n * this is used to generate cronConfig object for Daily recurrence from cron string parts passed as params\n * @internal */\nexport function buildConfigForDailyRecurrence(dayOfMonth, dayOfWeek) {\n return {\n type: RecurrenceType.DAILY,\n frequency: dayOfMonth.startsWith('*/') ? dayOfMonth.split('*/')[1] : '1',\n weekType: dayOfWeek === '?' ? WeekType.WEEK : WeekType.WORK_WEEK,\n };\n}\n/**\n * similar to {@link getCronExpressionForHourly}\n * this is used to generate cronConfig object for Hourly recurrence from cron string parts passed as params\n * @internal */\nexport function buildConfigForHourlyRecurrence(hours) {\n return {\n type: RecurrenceType.HOURLY,\n frequency: hours.includes('/') ? hours.split('/')[1] : '1',\n };\n}\n/**\n * similar to {@link getCronExpressionForWeekly}\n * this is used to generate cronConfig object for weekly recurrence from cron string parts passed as params\n * @internal */\nexport function buildConfigForWeeklyRecurrence(dayOfWeek) {\n return {\n type: RecurrenceType.WEEKLY,\n selectedDays: dayOfWeek !== '*' ? new Set(dayOfWeek.split(',')) : new Set(),\n };\n}\n/**\n * used to build dateOrDay object for yearly and monthly recurrence\n * @internal */\nexport const getDateOrDay = (type, dayOfMonth, mon, dayOfWeek) => {\n let dayOrDate;\n if (dayOfMonth === '?') {\n dayOrDate = {\n type: DateOrDay.DAY_OF_MONTH,\n day: dayOfWeek.split(/[L#]/)[0],\n weekNumber: dayOfWeek.includes('#') ? dayOfWeek.split('#')[1] : '-1',\n };\n }\n else {\n dayOrDate = {\n type: DateOrDay.DATE,\n dayDate: dayOfMonth,\n };\n }\n if (type === RecurrenceType.YEARLY) {\n dayOrDate['month'] = mon;\n }\n return dayOrDate;\n};\n/**\n * similar to {@link getCronExpressionForYearly}\n * this is used to generate cronConfig object for yearly recurrence from cron string parts passed as params\n * @internal */\nexport function buildConfigForYearlyRecurrence(dayOfMonth, mon, dayOfWeek, getDateOrDayConfig = getDateOrDay) {\n return {\n type: RecurrenceType.YEARLY,\n frequency: dayOfWeek.split('/').length === 2 ? dayOfWeek.split('/')[1] : '1',\n dateOrDay: getDateOrDayConfig(RecurrenceType.YEARLY, dayOfMonth, mon, dayOfWeek.split('/')[0]),\n };\n}\n/**\n * similar to {@link getCronExpressionForMonth}\n * this is used to generate cronConfig object for monthly recurrence from cron string parts passed as params\n * @internal */\nexport function buildConfigForMonthlyRecurrence(dayOfMonth, mon, dayOfWeek, getDateOrDayConfig = getDateOrDay) {\n return {\n type: RecurrenceType.MONTHLY,\n frequency: mon.startsWith('*/') ? mon.split('*/')[1] : '1',\n dateOrDay: getDateOrDayConfig(RecurrenceType.MONTHLY, dayOfMonth, mon, dayOfWeek.split('/')[0]),\n };\n}\n/**\n *\n * @param cron - cron expression representing either Daily, weekly, monthly or yearly recurrence\n * @returns the cron config of a specific recurrence after determining the recurrenceType\n *\n * @example\n * ```ts\n * const config = parseCronExpression('0 30 10 ? * 2-6');\n * console.log(config); // {type: 'Daily', frequency: 2, weekType: 'Work week', time: '10:30'}\n * ```\n * @internal\n */\nexport function parseCronExpression(cron, methods) {\n if (!cron)\n return;\n const cronParts = cron.split(' ');\n const [seconds, minutes, hours, dayOfMonth, month, dayOfWeek] = cronParts;\n if (dayOfWeek !== '?' && dayOfMonth !== '?') {\n throw new Error('Support for specifying both a day-of-week AND a day-of-month parameter is not implemented');\n }\n // checks if there is step value in hours i.e. 0/1, */1\n if (/^(0|\\*)\\/\\d+$/.test(hours)) {\n return Object.assign({ minutes,\n seconds }, methods.buildConfigForHourlyRecurrence(hours));\n }\n else if (dayOfWeek === '2-6' ||\n (dayOfWeek === '?' && (dayOfMonth === '*' || dayOfMonth.startsWith('*')))) {\n return Object.assign({ hours,\n minutes,\n seconds }, methods.buildConfigForDailyRecurrence(dayOfMonth, dayOfWeek));\n }\n else if (/^([1-7](,[1-7])*)$/.test(dayOfWeek) || dayOfWeek === '*') {\n return Object.assign({ hours,\n minutes,\n seconds }, methods.buildConfigForWeeklyRecurrence(dayOfWeek));\n }\n else if (dayOfWeek.includes('L') ||\n dayOfWeek.includes('#') ||\n (/^([1-9]|[12]\\d|3[01])$/.test(dayOfMonth) && dayOfWeek === '?')) {\n if (month != '*' && !month.startsWith('*/')) {\n return Object.assign({ hours,\n minutes,\n seconds }, methods.buildConfigForYearlyRecurrence(dayOfMonth, month, dayOfWeek));\n }\n else {\n return Object.assign({ hours,\n minutes,\n seconds }, methods.buildConfigForMonthlyRecurrence(dayOfMonth, month, dayOfWeek));\n }\n }\n else {\n throw new Error('Invalid Cron Expression');\n }\n}\n","import { css } from '@microsoft/fast-element';\nexport const inputControls = css `\n .input-container {\n display: flex;\n flex-direction: column;\n gap: calc(var(--design-unit) * 2px);\n }\n\n .label {\n color: var(--neutral-foreground-hint);\n display: block;\n cursor: pointer;\n font-size: var(--type-ramp-base-font-size);\n line-height: var(--type-ramp-base-line-height);\n font-style: normal;\n }\n\n .row {\n display: flex;\n width: 50%;\n align-items: center;\n gap: calc(var(--design-unit) * 4px);\n }\n`;\nexport const schedulerCronBuilderStyles = css `\n ${inputControls}\n /* Host */\n :host {\n display: flex;\n flex-direction: column;\n width: 100%;\n }\n\n .container {\n padding: calc(var(--design-unit) * 2px) calc(var(--design-unit) * 4px);\n display: flex;\n flex-direction: column;\n gap: calc(var(--design-unit) * 4px);\n }\n\n .flex-row {\n display: flex;\n align-items: center;\n gap: calc(var(--design-unit) * 4px);\n }\n\n .time-select {\n min-width: 110px;\n position: relative;\n }\n\n .frequency-select {\n position: relative;\n }\n\n .frequency-select::part(end),\n .time-select::part(end) {\n min-width: 0;\n width: 0;\n }\n\n .frequency-select::part(listbox),\n .time-select::part(listbox) {\n max-height: 20vh;\n }\n\n .suffix-label {\n position: absolute;\n right: 35px; /* Move it before the icon */\n top: 50%;\n transform: translateY(-50%);\n padding: 0 calc(var(--design-unit) * 1px);\n color: var(--neutral-foreground-hint);\n font-size: var(--type-ramp-minus-1-font-size);\n white-space: nowrap;\n }\n`;\n","import { getBaseEmitArgs, } from '../types';\n/**\n * EventEmitter mixin.\n *\n * @remarks\n * Strongly types the components `$emit` method, allowing only the mapped events to be emitted.\n *\n * @example\n * Apply mixin to the base {@link @microsoft/fast-element#FASTElement | FASTElement}\n *\n * # Import\n * ```ts\n * import { EventEmitter, SomeSystemLevelEventDetailMap } from '@genesislcap/foundation-events';\n * import { StoreEventDetailMap, TradeEntryEventDetailMap } from '../store'; // < custom app level event maps\n * ```\n *\n * # Create event map\n * ```ts\n * type EventMap = SomeSystemLevelEventDetailMap & StoreEventDetailMap & TradeEntryEventDetailMap;\n * ```\n *\n * # Apply Mixin\n * ```ts\n * export class MyComponent extends EventEmitter<EventMap>(FASTElement) {\n * onSomeComponentEvent() {\n * this.$emit('some-allowed-event', { foo: 'expected data structure' });\n * }\n * }\n * ```\n *\n * @example\n * Apply mixin to a class in the inheritance chain requires a second generic type param.\n *\n * # Apply Mixin to MyComponent that extends MyBaseComponent (which might be abstract). Mixin can be applied at different levels.\n * # Please note there's a current limitation on retaining protected member access with this approach, so apply to base where possible.\n * # Also, super classes cannot emit typed events via inheritance. Each level must have an explicit map. Devs can use a Union and Pick to create these.\n * ```ts\n * export class MyComponent extends EventEmitter<EventMap, MyBaseComponent>(MyBaseComponent) {}\n * ```\n *\n * @privateRemarks\n * Failed to retain protected member access when the mixin is applied while keeping the typed emitter, we can revisit if needed.\n * So in the last example, if `MyBaseComponent` had a protected member, `MyComponent` wouldn't be able to access it with the mixin\n * applied. Public members are fine. It may be a limitation of TypeScript. Suggestions welcome, but be warned it's a time sink.\n *\n * @typeParam TEventDetailMap - The {@link EventDetailMap}.\n * @typeParam TTarget - The target class. Defaults to a union of `HTMLElement & FASTElement`.\n * @param Target - The class to apply the mixin to which ultimately extends {@link @microsoft/fast-element#FASTElement | FASTElement}.\n * @public\n */\nexport const EventEmitter = (Target) => {\n // @ts-ignore used here instead of `extends (Target as EventEmitterTarget<FASTElement>)` to avoid modifying return type\n class Mixin extends Target {\n $emit(...args) {\n const [type, detail, options] = getBaseEmitArgs(...args);\n return super.$emit(type, detail, options);\n }\n }\n return Mixin;\n};\n","/**\n * @public\n */\nexport const isEmitOptions = (candidate) => (candidate === null || candidate === void 0 ? void 0 : candidate.hasOwnProperty('bubbles')) ||\n (candidate === null || candidate === void 0 ? void 0 : candidate.hasOwnProperty('cancelable')) ||\n (candidate === null || candidate === void 0 ? void 0 : candidate.hasOwnProperty('composed'));\n/**\n * @public\n */\nexport const getBaseEmitArgs = (...args) => {\n let [type, detailOrOptions, options] = args;\n let detail = detailOrOptions;\n if (isEmitOptions(detailOrOptions)) {\n options = detailOrOptions;\n detail = undefined;\n }\n if (typeof type !== 'string') {\n throw new Error('$emit event types must be typeof string.');\n }\n return [type, detail, options];\n};\n/**\n * @public\n */\nexport const customEvent = (ctx) => ctx.event;\n/**\n * @public\n */\nexport const targetValue = (ctx) => ctx.event.target.value;\n/**\n * @example\n * ```ts\n * import { targetChecked } from '@genesislcap/foundation-events';\n * ...\n * <${checkboxTag}\n * ?checked=\"${(x) => x.store.formEntry.showPassword}\"\n * @change=\"${(x, c) => x.$emit('auth-showPassword-changed', targetChecked(c))}\"\n * name=\"show-password\"\n * data-test-id=\"show-password\"\n * >\n * Show Password\n * </${checkboxTag}>\n * ```\n *\n * @public\n */\nexport const targetChecked = (ctx) => ctx.event.target.checked;\n/**\n * @public\n */\nexport const targetFirstSelectedValue = (ctx) => { var _a, _b; return (_b = (_a = ctx.event.target) === null || _a === void 0 ? void 0 : _a.firstSelectedOption) === null || _b === void 0 ? void 0 : _b.value; };\n/**\n * @internal\n */\nconst createChangeEmitter = (valueGetter) => (type, options) => (x, c) => x.$emit(String(type), valueGetter(c), options);\n/**\n * `<input>` template emit helper.\n *\n * @remarks\n * In some.template.ts file you create the helper upfront by passing in the full event map.\n *\n * @example\n * ```ts\n * const inputEmit = createInputEmitter<EventMap>();\n * ...\n * <zero-text-field @change=\"${inputEmit('some-input-changed')}\">\n * ```\n *\n * @public\n */\nexport const createInputEmitter = () => createChangeEmitter(targetValue);\n/**\n * `<select>` template emit helper.\n *\n * @remarks\n * In some.template.ts file you create the helper upfront by passing in the full event map.\n *\n * @example\n * ```ts\n * const selectEmit = createSelectEmitter<EventMap>();\n * ...\n * <zero-select @change=\"${selectEmit('some-select-changed')}\">\n * ```\n *\n * @public\n */\nexport const createSelectEmitter = () => createChangeEmitter(targetFirstSelectedValue);\n","import { css } from '@microsoft/fast-element';\nimport { inputControls } from '../scheduler-cron-builder.styles';\nexport const dailyRecurrenceStyles = css `\n ${inputControls}\n`;\n","import { sync } from '@genesislcap/foundation-utils';\nimport { html } from '@microsoft/fast-element';\nimport { WeekType } from '../types';\nexport const getPrefixedDailyRecurrence = (prefix) => html `\n <template>\n <div class=\"input-container\">\n <label class=\"label\">Of</label>\n <${prefix}-select\n data-test-id=\"select-week-type\"\n :value=${sync((x) => x.weekType)}\n @change=\"${(x) => x.updateCronConfig()}\"\n >\n <${prefix}-option data-test-id=\"${WeekType.WEEK}\">\n ${WeekType.WEEK}\n </${prefix}-option>\n <${prefix}-option data-test-id=\"${WeekType.WORK_WEEK}\">\n ${WeekType.WORK_WEEK}\n </${prefix}-option>\n </${prefix}-select>\n </div> \n </template>\n`;\nexport const dailyRecurrenceTemplate = html `\n ${(x) => getPrefixedDailyRecurrence(x.prefix)}\n`;\n","import { __decorate } from \"tslib\";\nimport { EventEmitter } from '@genesislcap/foundation-events';\nimport { customElement, observable } from '@microsoft/fast-element';\nimport { FoundationElement } from '@microsoft/fast-foundation';\nimport { WeekType, CronBuilderEvents } from '../types';\nimport { dailyRecurrenceStyles as styles } from './daily-recurrence.styles';\nimport { dailyRecurrenceTemplate as template } from './daily-recurrence.template';\nlet DailyRecurrence = class DailyRecurrence extends EventEmitter(FoundationElement) {\n constructor() {\n super(...arguments);\n /**\n * design system prefix to use for component tags\n * @internal\n * */\n this.prefix = '';\n }\n configChanged() {\n var _a;\n this.weekType = ((_a = this.config) === null || _a === void 0 ? void 0 : _a.weekType) || WeekType.WORK_WEEK;\n }\n /**\n * emits an event to update cron config and cron expression for weekly config\n * @internal\n * */\n updateCronConfig() {\n this.config = Object.assign(Object.assign({}, this.config), { weekType: this.weekType });\n this.$emit(CronBuilderEvents.updateCronConfig, this.config);\n }\n};\n__decorate([\n observable\n], DailyRecurrence.prototype, \"prefix\", void 0);\n__decorate([\n observable\n], DailyRecurrence.prototype, \"config\", void 0);\n__decorate([\n observable\n], DailyRecurrence.prototype, \"weekType\", void 0);\nDailyRecurrence = __decorate([\n customElement({\n name: 'daily-recurrence',\n template,\n styles,\n })\n], DailyRecurrence);\nexport { DailyRecurrence };\n","import { css } from '@microsoft/fast-element';\nimport { inputControls } from '../scheduler-cron-builder.styles';\nexport const monthlyYearlyRecurrenceStyles = css `\n ${inputControls}\n :host {\n display: flex;\n flex-direction: column;\n gap: calc(var(--design-unit) * 4px);\n }\n\n .weekdays-row {\n display: flex;\n gap: calc(var(--design-unit) * 3px);\n }\n\n .day-of-month-row {\n display: flex;\n gap: calc(var(--design-unit) * 4px);\n width: 100%;\n }\n\n .day-date-number-field::part(root) {\n width: 40%;\n }\n`;\n","import { sync, whenElse } from '@genesislcap/foundation-utils';\nimport { html, repeat, when } from '@microsoft/fast-element';\nimport { DateOrDay, daysOfWeek, months, RecurrenceType, weekNumber } from '../types';\nconst dayOrDateTemplate = (prefix) => html `\n<div class=\"input-container\">\n <label class=\"label\">On</label>\n <${prefix}-select\n data-test-id=\"select-day-or-date\"\n :value=${sync((x) => x.dayOrDate)}\n @change=\"${(x) => x.updateCronConfig()}\"\n >\n <${prefix}-option data-test-id=\"${DateOrDay.DATE}\">\n ${DateOrDay.DATE}\n </${prefix}-option>\n <${prefix}-option data-test-id=\"${DateOrDay.DAY_OF_MONTH}\">\n ${DateOrDay.DAY_OF_MONTH}\n </${prefix}-option>\n </${prefix}-select>\n </div> \n`;\nconst monthTemplate = (prefix) => html `\n <div class=\"input-container\">\n <label class=\"label\">Month</label>\n <${prefix}-select data-test-id=\"month-dropdown\" :value=${sync((x) => x.selectedMonth)} @change=\"${(x) => x.updateCronConfig()}\" >\n ${repeat(() => months, html `\n <${prefix}-option value=\"${(x) => x.value}\">\n ${(x) => x.label}\n </${prefix}-option>\n `)}\n </${prefix}-select>\n </div>\n`;\nconst dateTemplate = (prefix) => html `\n <div class=\"row\">\n ${when((x) => x.config.type === RecurrenceType.YEARLY, html `\n ${monthTemplate(prefix)}\n `)}\n <div class=\"input-container\">\n <label class=\"label\"> ${(x) => (x.config.type === RecurrenceType.MONTHLY ? 'Day date' : 'Day')}</label>\n <${prefix}-select data-test-id=\"day-date-dropdown\" :value=${sync((x) => x.dayDate)} @change=\"${(x) => x.updateCronConfig()}\" >\n ${repeat(() => Array.from({ length: 31 }, (_, i) => i + 1), html `\n <${prefix}-option value=\"${(x) => x}\">\n ${(x) => x}\n </${prefix}-option>\n `)}\n </${prefix}-select>\n </div>\n </div>\n\n`;\nconst dayOfMonthTemplate = (prefix) => html `\n <div class=\"day-of-month-row\">\n ${when((x) => x.config.type === RecurrenceType.YEARLY, html `\n ${monthTemplate(prefix)}\n `)}\n <div class=\"input-container\">\n <label class=\"label\">Day of Month</label>\n <${prefix}-select\n data-test-id=\"select-week-number\"\n :value=${sync((x) => x.weekNumber)}\n @change=\"${(x) => x.updateCronConfig()}\"\n >\n ${repeat(() => weekNumber, html `\n <${prefix}-option value=\"${(x) => x.value}\">\n ${(x) => x.label}\n </${prefix}-option>\n `)}\n </${prefix}-select>\n </div> \n <div class=\"input-container\">\n <label class=\"label\">Day</label>\n <${prefix}-select\n data-test-id=\"select-week-day\"\n :value=${sync((x) => x.day)}\n @change=\"${(x) => x.updateCronConfig()}\"\n >\n ${repeat(() => daysOfWeek, html `\n <${prefix}-option value=\"${(x) => x.value}\">\n ${(x) => x.label}\n </${prefix}-option>\n `)}\n </${prefix}-select>\n </div> \n </div>\n`;\nexport const getPrefixedMonthlyYearlyRecurrence = (prefix) => html `\n ${dayOrDateTemplate(prefix)}\n ${whenElse((x) => x.dayOrDate === DateOrDay.DATE, dateTemplate(prefix), dayOfMonthTemplate(prefix))}\n`;\nexport const monthlyYearlyRecurrenceTemplate = html `\n ${(x) => getPrefixedMonthlyYearlyRecurrence(x.prefix)}\n`;\n","import { __decorate } from \"tslib\";\nimport { EventEmitter } from '@genesislcap/foundation-events';\nimport { customElement, observable } from '@microsoft/fast-element';\nimport { FoundationElement } from '@microsoft/fast-foundation';\nimport { CronBuilderEvents, DateOrDay, RecurrenceType, } from '../types';\nimport { monthlyYearlyRecurrenceStyles as styles } from './monthly-yearly-recurrence.styles';\nimport { monthlyYearlyRecurrenceTemplate as template } from './monthly-yearly-recurrence.template';\nlet MonthlyYearlyRecurrence = class MonthlyYearlyRecurrence extends EventEmitter(FoundationElement) {\n constructor() {\n super(...arguments);\n /**\n * design system prefix to use for component tags\n * @internal\n * */\n this.prefix = '';\n /**\n * This variable is used with `MONTHLY` & `YEARLY` recurrence Type\n * Used to determine if the event should occur either at\n * 1. specific date of the month [1-31].(e.g. 2nd of every month)\n * 2. specific day of the week in the provided week (e.g. 2nd(week number) Tuesday of every month)\n *\n * See {@link DateOrDay}\n * @internal\n */\n this.dayOrDate = DateOrDay.DATE;\n /**\n * This variable is used with both `YEARLY` and `MONTHLY` recurrence Type\n * Used to specify the week number when `day of month` option is selected {@link DateOrDay.DAY_OF_MONTH}\n * allows user to select from 1st,2nd,3rd,4th or last week options\n * @defaultValue `1` for First Week\n * @internal\n */\n this.weekNumber = '1';\n /**\n * This variable is used with both `YEARLY` and `MONTHLY` recurrence Type\n * Used to specify the day of week(Mon-Sunday) when `day of month` option is selected {@link DateOrDay.DAY_OF_MONTH}\n * allows user to select from 1st,2nd,3rd,4th or last week options\n * @defaultValue `1` for Monday\n * @internal\n */\n this.day = '1'; // Monday, Tuesday, etc.\n /**\n * This variable is used with `YEARLY` recurrence Type\n * Used to set the month (1-12) on which the event should occur\n * Should be between 1-12 similar to the no of months(Jan-Dec)\n * @defaultValue `1` for January\n * @internal\n */\n this.selectedMonth = '1';\n }\n configChanged() {\n if (this.config.type !== RecurrenceType.YEARLY && this.config.type !== RecurrenceType.MONTHLY)\n return;\n this.dayOrDate = this.config.dateOrDay.type || DateOrDay.DATE;\n this.setFieldsFromConfig();\n }\n /**\n * used to set fields from the parent config,\n * @internal\n * */\n setFieldsFromConfig() {\n if (this.config.type === RecurrenceType.YEARLY) {\n this.selectedMonth = this.config.dateOrDay.month;\n }\n if (this.config.dateOrDay.type === DateOrDay.DAY_OF_MONTH) {\n this.weekNumber = this.config.dateOrDay.weekNumber || '1';\n this.day = this.config.dateOrDay.day || '1';\n }\n else {\n this.dayDate = this.config.dateOrDay.dayDate || '1';\n }\n }\n /**\n * used to construct dateOrDay type for updating cron expression for monthly or yearly recurrence\n * see {@link MonthlyDateDay} {@link YearlyDateDay} for details\n * @internal\n * */\n getDayOrDateConfig() {\n let dayDateConfig;\n if (this.dayOrDate === DateOrDay.DATE) {\n dayDateConfig = {\n type: DateOrDay.DATE,\n dayDate: this.dayDate || '1',\n };\n }\n else {\n dayDateConfig = {\n type: DateOrDay.DAY_OF_MONTH,\n day: this.day || '1',\n weekNumber: this.weekNumber || '1',\n };\n }\n return dayDateConfig;\n }\n /**\n * emits an event to update cron config and cron expression for monthly or yearly config\n * @internal\n * */\n updateCronConfig() {\n if (this.config.type === RecurrenceType.MONTHLY) {\n this.config = Object.assign(Object.assign({}, this.config), { dateOrDay: this.getDayOrDateConfig() });\n }\n else {\n this.config = Object.assign(Object.assign({}, this.config), { dateOrDay: Object.assign(Object.assign({}, this.getDayOrDateConfig()), { month: this.selectedMonth || '1' }) });\n }\n this.$emit(CronBuilderEvents.updateCronConfig, this.config);\n }\n};\n__decorate([\n observable\n], MonthlyYearlyRecurrence.prototype, \"prefix\", void 0);\n__decorate([\n observable\n], MonthlyYearlyRecurrence.prototype, \"config\", void 0);\n__decorate([\n observable\n], MonthlyYearlyRecurrence.prototype, \"dayOrDate\", void 0);\n__decorate([\n observable\n], MonthlyYearlyRecurrence.prototype, \"dayDate\", void 0);\n__decorate([\n observable\n], MonthlyYearlyRecurrence.prototype, \"weekNumber\", void 0);\n__decorate([\n observable\n], MonthlyYearlyRecurrence.prototype, \"day\", void 0);\n__decorate([\n observable\n], MonthlyYearlyRecurrence.prototype, \"selectedMonth\", void 0);\nMonthlyYearlyRecurrence = __decorate([\n customElement({\n name: 'monthly-yearly-recurrence',\n template,\n styles,\n })\n], MonthlyYearlyRecurrence);\nexport { MonthlyYearlyRecurrence };\n","import { css } from '@microsoft/fast-element';\nimport { inputControls } from '../scheduler-cron-builder.styles';\nexport const weeklyRecurrenceStyles = css `\n ${inputControls}\n .weekdays-row {\n display: flex;\n gap: calc(var(--design-unit) * 3px);\n flex-wrap: wrap;\n }\n`;\n","import { html, repeat } from '@microsoft/fast-element';\nimport { daysOfWeek } from '../types';\nexport const getPrefixedWeeklyRecurrence = (prefix) => html `\n <template>\n <div class=\"input-container\">\n <label class=\"label\">On</label>\n <div class=\"weekdays-row\">\n ${repeat(() => daysOfWeek, html `\n <${prefix}-checkbox \n part=\"weekdays-checkbox\"\n class=\"weekdays-checkbox\"\n :value=${(x) => x.value}\n ?checked=${(x, c) => c.parent.selectedDays.has(x.value)}\n @change=${(x, c) => c.parent.checkboxChangeHandler(c.event)}\n > \n ${(x) => x.label}\n </${prefix}-checkbox>\n `)}\n </div>\n </div>\n </template>\n`;\nexport const weeklyRecurrenceTemplate = html `\n ${(x) => getPrefixedWeeklyRecurrence(x.prefix)}\n`;\n","import { __decorate } from \"tslib\";\nimport { EventEmitter } from '@genesislcap/foundation-events';\nimport { customElement, observable } from '@microsoft/fast-element';\nimport { FoundationElement } from '@microsoft/fast-foundation';\nimport { CronBuilderEvents } from '../types';\nimport { weeklyRecurrenceStyles as styles } from './weekly-recurrence.styles';\nimport { weeklyRecurrenceTemplate as template } from './weekly-recurrence.template';\nlet WeeklyRecurrence = class WeeklyRecurrence extends EventEmitter(FoundationElement) {\n constructor() {\n super(...arguments);\n /**\n * design system prefix to use for component tags\n * @internal\n * */\n this.prefix = '';\n /**\n * Used for storing specific Week days (Monday-Sunday) on which the event should occurs\n */\n this.selectedDays = new Set();\n }\n configChanged() {\n var _a;\n this.selectedDays = ((_a = this.config) === null || _a === void 0 ? void 0 : _a.selectedDays)\n ? new Set([...this.config.selectedDays])\n : new Set();\n }\n /**\n * used to add or remove days of week in set on basis of user selection,\n * and update cron expression as well\n * @internal\n * */\n checkboxChangeHandler(event) {\n const { checked, value } = event.target;\n if (checked) {\n this.selectedDays.add(value);\n }\n else {\n this.selectedDays.delete(value);\n }\n this.updateCronConfig();\n }\n /**\n * emits an event to update cron config and cron expression for weekly config\n * @internal\n * */\n updateCronConfig() {\n this.config = Object.assign(Object.assign({}, this.config), { selectedDays: this.selectedDays });\n this.$emit(CronBuilderEvents.updateCronConfig, this.config);\n }\n};\n__decorate([\n observable\n], WeeklyRecurrence.prototype, \"prefix\", void 0);\n__decorate([\n observable\n], WeeklyRecurrence.prototype, \"config\", void 0);\nWeeklyRecurrence = __decorate([\n customElement({\n name: 'weekly-recurrence',\n template,\n styles,\n })\n], WeeklyRecurrence);\nexport { WeeklyRecurrence };\n","import { sync } from '@genesislcap/foundation-utils';\nimport { html, repeat, when } from '@microsoft/fast-element';\nimport { getPrefix } from '../utils';\nimport { DailyRecurrence } from './daily-recurrence/daily-recurrence';\nimport { MonthlyYearlyRecurrence } from './monthly-yearly-recurrence/monthly-yearly-recurrence';\nimport { MAX_HOURS, MAX_MINS_SEC, RecurrenceType } from './types';\nimport { WeeklyRecurrence } from './weekly-recurrence/weekly-recurrence';\nDailyRecurrence;\nWeeklyRecurrence;\nMonthlyYearlyRecurrence;\nconst dailyTemplate = (prefix) => html `\n <daily-recurrence :prefix=${() => prefix} :config=${(x) => x.cronConfig}></daily-recurrence>\n`;\nconst weeklyTemplate = (prefix) => html `\n <weekly-recurrence :prefix=${() => prefix} :config=${(x) => x.cronConfig}></weekly-recurrence>\n`;\nconst monthlyOrYearlyTemplate = (prefix) => html `\n <monthly-yearly-recurrence\n :prefix=${() => prefix}\n :config=${(x) => x.cronConfig}\n ></monthly-yearly-recurrence>\n`;\nexport const getPrefixedCronBuilder = (prefix) => html `\n <template>\n <div class=\"container\">\n <div class=\"input-container\">\n <label class=\"label\">Recurrence</label>\n <${prefix}-select\n data-test-id=\"select-recurrence\"\n :value=${sync((x) => x.recurrence)}\n @change=\"${(x) => x.handleRecurrenceChange()}\"\n >\n <${prefix}-option data-test-id=\"${RecurrenceType.HOURLY}\">\n ${RecurrenceType.HOURLY}\n </${prefix}-option>\n <${prefix}-option data-test-id=\"${RecurrenceType.DAILY}\">\n ${RecurrenceType.DAILY}\n </${prefix}-option>\n <${prefix}-option data-test-id=\"${RecurrenceType.WEEKLY}\">\n ${RecurrenceType.WEEKLY}\n </${prefix}-option>\n <${prefix}-option data-test-id=\"${RecurrenceType.MONTHLY}\">\n ${RecurrenceType.MONTHLY}\n </${prefix}-option>\n <${prefix}-option data-test-id=\"${RecurrenceType.YEARLY}\">\n ${RecurrenceType.YEARLY}\n </${prefix}-option>\n </${prefix}-select>\n </div> \n <div class=\"row\">\n ${when((x) => x.recurrence !== RecurrenceType.WEEKLY && x.recurrence !== RecurrenceType.YEARLY, html `\n <div class=\"input-container\">\n <label class=\"label\"> Frequency in ${(x) => x.frequencySuffix}</label>\n <${prefix}-select class=\"frequency-select\" data-test-id=\"frequency-dropdown\" :value=${sync((x) => x.frequency)} @change=\"${(x) => x.handleChange('frequency')}\" >\n ${repeat((x) => x.frequencyList, html `\n <${prefix}-option value=\"${(x) => x}\">\n ${(x) => x}\n </${prefix}-option>\n `, { recycle: false })}\n <div slot=\"end\" class=\"suffix-label\">${(x) => x.frequencySuffix}</div>\n </${prefix}-select>\n </div>`)}\n <div class=\"input-container\">\n <label class=\"label\">Time </label>\n <div class=\"flex-row\">\n ${when((x) => x.recurrence !== RecurrenceType.HOURLY, html `\n <${prefix}-select class=\"time-select\" data-test-id=\"hours-dropdown\" :value=${sync((x) => x.hours)} @change=\"${(x) => x.handleChange('hours')}\" >\n ${repeat(() => Array.from({ length: MAX_HOURS }, (_, i) => i), html `\n <${prefix}-option value=\"${(x) => x}\">\n ${(x) => x}\n </${prefix}-option>\n `, { recycle: false })}\n <div slot=\"end\" class=\"suffix-label\">hr</div>\n </${prefix}-select>`)}\n <${prefix}-select class=\"time-select\" data-test-id=\"mins-dropdown\" :value=${sync((x) => x.minutes)} @change=\"${(x) => x.handleChange('minutes')}\" >\n ${repeat(() => Array.from({ length: MAX_MINS_SEC }, (_, i) => i), html `\n <${prefix}-option value=\"${(x) => x}\">\n ${(x) => x}\n </${prefix}-option>\n `)}\n <div slot=\"end\" class=\"suffix-label\">min</div>\n </${prefix}-select>\n <${prefix}-select class=\"time-select\" data-test-id=\"seconds-dropdown\" :value=${sync((x) => x.seconds)} @change=\"${(x) => x.handleChange('seconds')}\" >\n ${repeat(() => Array.from({ length: MAX_MINS_SEC }, (_, i) => i), html `\n <${prefix}-option value=\"${(x) => x}\">\n ${(x) => x}\n </${prefix}-option>\n `)}\n <div slot=\"end\" class=\"suffix-label\">sec</div>\n </${prefix}-select>\n </div>\n </div>\n </div>\n\n ${when((x) => x.recurrence === RecurrenceType.DAILY, dailyTemplate(prefix))}\n ${when((x) => x.recurrence === RecurrenceType.WEEKLY, weeklyTemplate(prefix))}\n ${when((x) => x.recurrence === RecurrenceType.MONTHLY || x.recurrence === RecurrenceType.YEARLY, monthlyOrYearlyTemplate(prefix))}\n\n </div>\n\n </template>\n`;\nexport const foundationSchedulerCronBuilderTemplate = html `\n ${(x) => getPrefixedCronBuilder(getPrefix(x))}\n`;\n","import { __decorate, __rest } from \"tslib\";\nimport { showNotificationToast } from '@genesislcap/foundation-notifications';\nimport { attr, observable, volatile } from '@microsoft/fast-element';\nimport { FoundationElement } from '@microsoft/fast-foundation';\nimport { getPrefix } from '../utils';\nimport { buildConfigForDailyRecurrence, buildConfigForHourlyRecurrence, buildConfigForMonthlyRecurrence, buildConfigForWeeklyRecurrence, buildConfigForYearlyRecurrence, formatFrequency, getCronExpressionForDaily, getCronExpressionForHourly, getCronExpressionForMonth, getCronExpressionForWeekly, getCronExpressionForYear, isValidCron, parseCronExpression, } from './helpers';\nimport { schedulerCronBuilderStyles as styles } from './scheduler-cron-builder.styles';\nimport { foundationSchedulerCronBuilderTemplate as template } from './scheduler-cron-builder.template';\nimport { CronBuilderEvents, DateOrDay, MAX_DAYS, MAX_HOURS, MAX_MONTHS, RecurrenceType, WeekType, } from './types';\n/**\n * @tagname %%prefix%%-scheduler-cron-builder\n */\nexport class SchedulerCronBuilder extends FoundationElement {\n constructor() {\n super(...arguments);\n this.getConfigs = {\n buildConfigForHourlyRecurrence,\n buildConfigForDailyRecurrence,\n buildConfigForWeeklyRecurrence,\n buildConfigForMonthlyRecurrence,\n buildConfigForYearlyRecurrence,\n };\n /**\n * Used to store the recurrence type of an event.\n * This variable determines how often an event repeats including Daily, Weekly, Monthly, Yearly.\n * See {@link RecurrenceType}\n * @internal\n */\n this.recurrence = RecurrenceType.DAILY;\n /**\n * used to store the cron string generated as result of selected input\n * @example\n * `\"0 30 10 ? * 2-6\"` runs on weekdays from monday-friday at 10:30\n *\n */\n this.cron = '';\n /**\n * Used to store the cron expression\n * added to make sync directive work as it checks value field in the change event\n * @internal\n */\n this.value = this.cron;\n /**\n * Used to store the config for each recurrence type in form of an object.\n * See {@link CronConfig}\n * @internal\n */\n this.cronConfig = {\n type: RecurrenceType.DAILY,\n weekType: WeekType.WEEK,\n hours: '0',\n minutes: '0',\n seconds: '0',\n };\n /**\n * Used to store the frequency of an event's recurrence\n *\n * Represents the interval between recurrences, based on the {@link RecurrenceType}\n *\n * e.g. a value of '3' means that the event occurs every third occurrence (every 3 months for 'MONTHLY' recurrence)\n * MUST contain a positive value from {@link frequencyList}\n * @internal\n */\n this.frequency = '1';\n /**\n * The hour at which the event should occurs\n * @internal\n */\n this.hours = '0';\n /**\n * The minute at which the event should occurs\n * @internal\n */\n this.minutes = '0';\n /**\n * The second at which the event should occurs\n * @internal\n */\n this.seconds = '0';\n this.timezone = '';\n }\n cronChanged() {\n if (!this.cron)\n return;\n try {\n if (!isValidCron(this.cron)) {\n showNotificationToast({\n title: 'Cron Scheduler',\n body: `Invalid Cron Expression`,\n toast: { type: 'critical' },\n }, getPrefix(this));\n return;\n }\n this.setsFieldsFromCronEx();\n }\n catch (error) {\n console.error('Error:', error);\n showNotificationToast({\n title: 'Cron Scheduler',\n body: error,\n toast: { type: 'critical' },\n }, getPrefix(this));\n return;\n }\n }\n /**\n * The suffix that appears with frequency field\n *\n * @remarks This property updates every time recurrence is changed.\n * Use it to determine the suffix specific to selected recurrence (e.g. `Days` for `DAILY` recurrenceType).\n */\n get frequencySuffix() {\n switch (this.cronConfig.type) {\n case RecurrenceType.HOURLY:\n return 'Hour(s)';\n case RecurrenceType.DAILY:\n return 'Day(s)';\n case RecurrenceType.MONTHLY:\n return 'Month(s)';\n default:\n return '';\n }\n }\n /**\n * The frequency dropdown list\n *\n * @remarks This property updates every time recurrence type is changed.\n * Used to update the list size on basis of recurrence type e.g. 12 for month recurrence\n */\n get frequencyList() {\n switch (this.cronConfig.type) {\n case RecurrenceType.HOURLY:\n return Array.from({ length: MAX_HOURS }, (_, i) => i);\n case RecurrenceType.DAILY:\n return Array.from({ length: MAX_DAYS }, (_, i) => i + 1);\n case RecurrenceType.MONTHLY:\n return Array.from({ length: MAX_MONTHS }, (_, i) => i + 1);\n case RecurrenceType.YEARLY:\n return Array.from({ length: MAX_MONTHS }, (_, i) => i + 1);\n default:\n return [];\n }\n }\n connectedCallback() {\n super.connectedCallback();\n this.addEventListener(CronBuilderEvents.updateCronConfig, this.handleCronConfigUpdate);\n }\n disconnectedCallback() {\n this.removeEventListener(CronBuilderEvents.updateCronConfig, this.handleCronConfigUpdate);\n }\n getBaseConfigFields() {\n return {\n frequency: this.frequency,\n hours: this.hours,\n minutes: this.minutes,\n seconds: this.seconds,\n };\n }\n /**\n * sets default value for recurrence in cronConfig and generates cron expression\n * @internal\n */\n handleRecurrenceChange() {\n switch (this.recurrence) {\n case RecurrenceType.HOURLY:\n const _a = this.getBaseConfigFields(), { hours } = _a, baseConfigFields = __rest(_a, [\"hours\"]);\n this.cronConfig = Object.assign(Object.assign({ type: RecurrenceType.HOURLY }, baseConfigFields), { frequency: '0' });\n this.generateCronExpressionFromConfig(this.cronConfig);\n break;\n case RecurrenceType.DAILY:\n this.cronConfig = Object.assign(Object.assign({ type: RecurrenceType.DAILY }, this.getBaseConfigFields()), { frequency: '1', weekType: WeekType.WEEK });\n this.generateCronExpressionFromConfig(this.cronConfig);\n break;\n case RecurrenceType.WEEKLY:\n this.cronConfig = Object.assign(Object.assign({ type: RecurrenceType.WEEKLY }, this.getBaseConfigFields()), { frequency: '1', selectedDays: new Set() });\n this.generateCronExpressionFromConfig(this.cronConfig);\n break;\n case RecurrenceType.MONTHLY:\n this.cronConfig = Object.assign(Object.assign({ type: RecurrenceType.MONTHLY }, this.getBaseConfigFields()), { frequency: '1', dateOrDay: {\n type: DateOrDay.DATE,\n dayDate: '1',\n } });\n this.generateCronExpressionFromConfig(this.cronConfig);\n break;\n case RecurrenceType.YEARLY:\n this.cronConfig = Object.assign(Object.assign({ type: RecurrenceType.YEARLY }, this.getBaseConfigFields()), { frequency: '1', dateOrDay: {\n type: DateOrDay.DATE,\n dayDate: '1',\n month: '1',\n } });\n this.generateCronExpressionFromConfig(this.cronConfig);\n break;\n default:\n showNotificationToast({\n title: 'Cron Scheduler',\n body: `Recurrence type should be one of the known types: Daily, Weekly,Monthly or Yearly`,\n toast: { type: 'critical' },\n }, getPrefix(this));\n }\n }\n /**\n * change event for each input field including frequency, hours, minutes and seconds\n * @internal\n */\n handleChange(fieldName) {\n this.cronConfig[fieldName] = this[fieldName];\n this.generateCronExpressionFromConfig(this.cronConfig);\n }\n /**\n * event listener used to update cron config and cron expression\n * @internal\n */\n handleCronConfigUpdate({ detail }) {\n this.cronConfig = Object.assign(Object.assign({}, this.getBaseConfigFields()), detail);\n this.generateCronExpressionFromConfig(this.cronConfig);\n }\n /**\n * method that updates cron string on basis of config for each recurrence type\n * @internal\n */\n generateCronExpressionFromConfig(config) {\n switch (config.type) {\n case RecurrenceType.HOURLY:\n this.cron = getCronExpressionForHourly(config);\n break;\n case RecurrenceType.DAILY:\n this.cron = getCronExpressionForDaily(config, formatFrequency);\n break;\n case RecurrenceType.WEEKLY:\n this.cron = getCronExpressionForWeekly(config);\n break;\n case RecurrenceType.MONTHLY:\n this.cron = getCronExpressionForMonth(config, formatFrequency);\n break;\n case RecurrenceType.YEARLY:\n this.cron = getCronExpressionForYear(config);\n break;\n default:\n showNotificationToast({\n title: 'Cron Scheduler',\n body: `Recurrence type should be one of the known types: Daily, Weekly,Monthly or Yearly`,\n toast: { type: 'critical' },\n }, getPrefix(this));\n }\n this.value = this.cron;\n this.$emit('change');\n }\n /**\n * parses a cron expression and sets fields from it\n * @internal\n */\n setsFieldsFromCronEx() {\n this.cronConfig = parseCronExpression(this.cron, this.getConfigs);\n this.recurrence = this.cronConfig.type;\n this.frequency = this.cronConfig.frequency;\n this.minutes = this.cronConfig.minutes;\n this.seconds = this.cronConfig.seconds;\n if (this.cronConfig.type !== RecurrenceType.HOURLY) {\n this.hours = this.cronConfig.hours;\n }\n }\n}\n__decorate([\n observable\n], SchedulerCronBuilder.prototype, \"recurrence\", void 0);\n__decorate([\n observable\n], SchedulerCronBuilder.prototype, \"cron\", void 0);\n__decorate([\n observable\n], SchedulerCronBuilder.prototype, \"cronConfig\", void 0);\n__decorate([\n observable\n], SchedulerCronBuilder.prototype, \"frequency\", void 0);\n__decorate([\n observable\n], SchedulerCronBuilder.prototype, \"hours\", void 0);\n__decorate([\n observable\n], SchedulerCronBuilder.prototype, \"minutes\", void 0);\n__decorate([\n observable\n], SchedulerCronBuilder.prototype, \"seconds\", void 0);\n__decorate([\n volatile\n], SchedulerCronBuilder.prototype, \"frequencySuffix\", null);\n__decorate([\n volatile\n], SchedulerCronBuilder.prototype, \"frequencyList\", null);\n__decorate([\n attr\n], SchedulerCronBuilder.prototype, \"timezone\", void 0);\n// explicitly declaring for extensibility\nexport const foundationSchedulerCronBuilderShadowOptions = undefined;\nexport const defaultCronBuilderConfig = {};\n/**\n * The Foundation Cron Scheduler Builder\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-scheduler-cron-builder\\>\n */\nexport const foundationSchedulerCronBuilder = SchedulerCronBuilder.compose(Object.assign({ baseName: 'scheduler-cron-builder', styles,\n template, shadowOptions: foundationSchedulerCronBuilderShadowOptions }, defaultCronBuilderConfig));\n","import { css } from '@microsoft/fast-element';\nexport const schedulerTimezoneStyles = css `\n /* Host */\n :host {\n display: flex;\n flex-direction: column;\n width: 100%;\n }\n\n .container {\n padding: calc(var(--design-unit) * 2px) calc(var(--design-unit) * 4px);\n display: flex;\n flex-direction: column;\n gap: calc(var(--design-unit) * 2px);\n }\n\n .label {\n color: var(--neutral-foreground-hint);\n display: block;\n cursor: pointer;\n font-size: var(--type-ramp-base-font-size);\n line-height: var(--type-ramp-base-line-height);\n font-style: normal;\n }\n\n .timezone-combobox::part(listbox) {\n max-height: 20vh;\n }\n`;\n","import { sync } from '@genesislcap/foundation-utils';\nimport { html, repeat } from '@microsoft/fast-element';\nimport { getPrefix } from '../utils';\nexport const getPrefixedSchedulerTimezone = (prefix) => html `\n <template>\n <div class=\"container\">\n <label class=\"label\">Time Zone</label>\n <${prefix}-combobox\n data-test-id=\"cron-scheduler-timezone\"\n autocomplete=\"both\"\n class=\"timezone-combobox\"\n value=\"${sync((x) => x.timezone)}\"\n >\n ${repeat((x) => x.timeZones, html `\n <${prefix}-option value=\"${(x) => x}\">${(x) => x}</${prefix}-option>\n `)}\n </${prefix}-combobox>\n </div>\n </template>\n`;\nexport const foundationSchedulerTimezoneTemplate = html `\n ${(x) => getPrefixedSchedulerTimezone(getPrefix(x))}\n`;\n","import { __awaiter, __decorate } from \"tslib\";\nimport { Connect, logger } from '@genesislcap/foundation-comms';\nimport { showNotificationToast } from '@genesislcap/foundation-notifications';\nimport { observable } from '@microsoft/fast-element';\nimport { FoundationElement } from '@microsoft/fast-foundation';\nimport { schedulerTimezoneStyles as styles } from './scheduler-timezone.styles';\nimport { foundationSchedulerTimezoneTemplate as template } from './scheduler-timezone.template';\n/**\n * @tagname %%prefix%%-scheduler-timezone\n */\nexport class SchedulerTimezone extends FoundationElement {\n constructor() {\n super(...arguments);\n this.timezone = '';\n /**\n * Used to store the timezone\n * added to make sync directive work as it checks value field in the change event\n * @internal\n */\n this.value = this.timezone;\n }\n timezoneChanged() {\n this.value = this.timezone;\n this.$emit('change');\n }\n connectedCallback() {\n super.connectedCallback();\n this.getTimeZones();\n }\n getTimeZones() {\n return __awaiter(this, void 0, void 0, function* () {\n const priorityTimezones = ['Europe/London', 'America/New_York'];\n try {\n const response = yield this.connect.request('VALID_TIME_ZONE', {\n REQUEST: {},\n });\n if (!response.REPLY || !Array.isArray(response.REPLY))\n throw new Error('Invalid data returned for Timezones');\n this.timeZones = response.REPLY.map((e) => e.ZONE_ID).sort((a, b) => {\n // If 'a' is in priority list, move it up\n if (priorityTimezones.includes(a) && !priorityTimezones.includes(b))\n return -1;\n // If 'b' is in priority list, move it up\n if (!priorityTimezones.includes(a) && priorityTimezones.includes(b))\n return 1;\n // Otherwise, sort alphabetically\n return a.localeCompare(b);\n });\n }\n catch (e) {\n showNotificationToast({\n title: 'Cron Scheduler',\n body: `Unable to fetch timezones data.`,\n toast: { type: 'critical' },\n }, 'rapid');\n logger.error(e);\n }\n });\n }\n}\n__decorate([\n observable\n], SchedulerTimezone.prototype, \"timezone\", void 0);\n__decorate([\n Connect\n], SchedulerTimezone.prototype, \"connect\", void 0);\n__decorate([\n observable\n], SchedulerTimezone.prototype, \"timeZones\", void 0);\n// explicitly declaring for extensibility\nexport const foundationSchedulerTimezoneShadowOptions = undefined;\nexport const defaultTimezoneConfig = {};\n/**\n * The Foundation Scheduler Timezone Element.\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-scheduler-timezone\\>\n */\nexport const foundationSchedulerTimezone = SchedulerTimezone.compose(Object.assign({ baseName: 'scheduler-timezone', styles,\n template, shadowOptions: foundationSchedulerTimezoneShadowOptions }, defaultTimezoneConfig));\n","import { designUnit } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationSearchBarStyles = css `\n .search-bar-combobox {\n width: 100%;\n min-width: auto;\n }\n\n .padding {\n padding-left: calc(${designUnit} * 1px);\n }\n\n .selected-options {\n display: flex;\n align-items: center;\n overflow: hidden;\n gap: calc(${designUnit} * 1px);\n padding-right: calc(${designUnit} * 1px);\n }\n\n .selected-options:hover {\n overflow-x: overlay;\n }\n\n .selected-options::-webkit-scrollbar {\n height: 7px;\n }\n\n .selected-options::-webkit-scrollbar-thumb {\n border-radius: 10px;\n box-shadow: inset 0 0 6px rgb(0 0 0 / 30%);\n background-color: #484848;\n border: 1px solid #7e7e7e;\n }\n\n .selected-options-divider {\n border-right: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-rest);\n }\n\n .options-button {\n height: fit-content;\n min-width: fit-content;\n }\n\n .label {\n display: block;\n font-size: var(--type-ramp-base-font-size);\n margin: calc(${designUnit} * 2px) 2px;\n }\n\n .label-hidden {\n display: none;\n }\n\n .search-clear-button {\n min-width: 28px;\n min-height: 28px;\n height: 28px;\n margin: 0;\n }\n\n .search-clear-button svg {\n rotate: 45deg;\n }\n\n .search-clear-button::part(control) {\n padding: 0;\n }\n\n .search-clear-button .svg-container {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .tooltip {\n position: absolute;\n z-index: 999;\n }\n\n .tooltip::part(tooltip) {\n background-color: rgb(18 18 18 / 100%);\n border: 1px solid #2e3339;\n display: flex;\n justify-content: center;\n align-items: center;\n box-shadow: 0 4px 10px rgb(0 0 0 / 25%);\n font-size: 10px;\n color: #f1f1f1;\n height: 26px;\n }\n\n .close-icon {\n color: var(--accent-fill-rest);\n }\n`;\n","import { html, ref, repeat, slotted } from '@microsoft/fast-element';\nimport { whitespaceFilter } from '@microsoft/fast-foundation';\nimport { classNames } from '@microsoft/fast-web-utilities';\nimport { getPrefix } from '../utils';\nexport const crossIcon = (slot = 'start') => `\n<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" width=\"10px\" height=\"10px\">\n <g transform=\"matrix(1 0 0 1 -256 -14 )\">\n <path class=\"cross-icon\" fill=\"white\" d=\"M 9.9265625 8.865937499999998 L 6.060625000000001 5 L 9.265625 1.795 L 9.9265625 1.1340624999999993 C 10.0240625 1.0365624999999996 10.0240625 0.8781249999999996 9.9265625 0.7806249999999992 L 9.219375 0.07343749999999982 C 9.121875 -0.024062500000000542 8.9634375 -0.024062500000000542 8.8659375 0.07343749999999982 L 5 3.9393750000000005 L 1.1340625 0.073125 C 1.0365625 -0.02437500000000037 0.8781250000000002 -0.02437500000000037 0.7806249999999999 0.073125 L 0.073125 0.7803125 C -0.024375000000000008 0.8778124999999998 -0.024375000000000008 1.0362499999999997 0.073125 1.13375 L 3.9393750000000005 5 L 0.073125 8.865937499999998 C -0.024375000000000008 8.9634375 -0.024375000000000008 9.121875 0.073125 9.219375000000001 L 0.7803125 9.9265625 C 0.8778125000000001 10.0240625 1.03625 10.0240625 1.13375 9.9265625 L 5 6.060625 L 8.205 9.265625 L 8.8659375 9.9265625 C 8.9634375 10.0240625 9.121875 10.0240625 9.219375 9.9265625 L 9.9265625 9.219375000000001 C 10.0240625 9.121875 10.0240625 8.9634375 9.9265625 8.865937499999998 Z \" fill-rule=\"nonzero\" fill=\"#c9c9c9\" stroke=\"none\" fill-opacity=\"0.8\" transform=\"matrix(1 0 0 1 256 14 )\"/>\n </g>\n</svg>\n`;\nexport const plusIcon = () => `\n<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"currentColor\" width=\"30px\" height=\"30px\" class=\"bi bi-plus\" viewBox=\"0 0 16 16\">\n <path d=\"M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z\"/>\n</svg>`;\nexport const getPrefixedSearchBar = (prefix) => html `\n\n <label part=\"label\" for=\"control\" data-test-id=\"label\" class=${(x) => { var _a; return classNames('label', ['label-hidden', !((_a = x.defaultSlottedNodes) === null || _a === void 0 ? void 0 : _a.length)]); }}\n >\n <slot\n ${slotted({\n property: 'defaultSlottedNodes',\n filter: whitespaceFilter,\n})}\n ></slot>\n </label>\n\n <${prefix}-search-bar-combobox\n ${ref('combobox')}\n position=\"${(x) => x.position}\"\n placeholder=${(x) => x.placeholder}\n disabled=${(x) => x.disabled}\n autocomplete=\"none\"\n minlength=${(x) => x.minlength}\n @inputdeleted=${(x) => x.inputdeleted()}\n @change=${(x) => x.changeHandler()}\n @input=${(x) => x.inputHandler()}\n @paste=${(x, c) => x.pasteHandler(c.event)}\n class=\"search-bar-combobox ${(x) => (x.selectedOptions.length > 0 ? 'padding' : null)}\"\n data-test-id=\"search-bar\"\n >\n <div\n ${ref('selectedOptionsDiv')}\n slot=\"selectedOptions\"\n class=\"selected-options ${(x) => x.selectedOptions.length > 0 ? 'selected-options-divider' : null}\"\n >\n ${repeat((x) => x.selectedOptions, html `\n <${prefix}-button\n class=\"options-button\"\n appearance=${(x, c) => c.parent.appearance}\n disabled=${(x, c) => c.parent.disabled}\n @click=${(x, c) => c.parent.unselectOption(x)}\n >\n ${(x) => x.label}\n <${prefix}-icon\n class=\"close-icon\"\n slot=\"end\"\n name=\"circle-xmark\"\n variant=\"regular\"\n ></${prefix}-icon>\n </${prefix}-button>\n `)}\n </div>\n ${repeat((x) => x.filteredOptions, html `\n <${prefix}-option\n value=\"${(x) => x.field}\"\n :disabled=${(x, ctx) => !x.isEnabled(ctx.parent.searchTerm, ctx.parent.selectedOptions)}\n >\n ${(x, ctx) => x.label(ctx.parent.searchTerm)}\n </${prefix}-option>\n `)}\n <${prefix}-button\n class=\"search-clear-button\"\n @click=${(x) => x.clearSearch()}\n id=\"search-clear-button\"\n slot=\"end\"\n data-test-id=\"clear-search\"\n >\n <div class=\"svg-container\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"currentColor\"\n width=\"26px\"\n height=\"26px\"\n class=\"bi bi-plus\"\n viewBox=\"0 0 16 16\"\n >\n <path\n d=\"M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z\"\n />\n </svg>\n </div>\n </${prefix}-button>\n </${prefix}-search-bar-combobox>\n <${prefix}-tooltip class=\"tooltip\" anchor=\"search-clear-button\">\n Clear Search Terms\n </${prefix}-tooltip>\n`;\nexport const foundationSearchBarTemplate = html `\n ${(x) => getPrefixedSearchBar(getPrefix(x))}\n`;\n","import { CriteriaBuilder, ExpressionBuilder, Serialisers } from '@genesislcap/foundation-criteria';\nexport const SCROLL_TIMEOUT = 10;\nexport const INPUT_MIN_LENGTH = 3;\nexport const COMBO_INPUT_MIN_LENGTH = 1;\nexport const getCriteriaBuilder = (field, term) => {\n return new CriteriaBuilder()\n .withExpression(new ExpressionBuilder()\n .withField(field)\n .withValue(term)\n .withSerialiser(Serialisers.containsIgnoreCase)\n .build())\n .build();\n};\n","import { __awaiter, __decorate } from \"tslib\";\nimport { attr, DOM, observable } from '@microsoft/fast-element';\nimport { FoundationElement } from '@microsoft/fast-foundation';\nimport { Position } from '../multiselect';\nimport { foundationSearchBarStyles as styles } from './search-bar.styles';\nimport { foundationSearchBarTemplate as template } from './search-bar.template';\nimport { INPUT_MIN_LENGTH, SCROLL_TIMEOUT, } from './search-bar.types';\n/**\n * @tagname %%prefix%%-search-bar\n */\nexport class SearchBar extends FoundationElement {\n constructor() {\n super(...arguments);\n this.searchTerm = '';\n this.appearance = 'neutral';\n this.minlength = INPUT_MIN_LENGTH;\n this.position = Position.BELOW;\n this.placeholder = 'Start typing to search';\n this.selectedOptions = [];\n this.normalizeDelimiter = (inputString) => {\n return inputString.trim().replace(/\\t|\\r\\n|\\n|\\r|,/g, ' ');\n };\n this.addOrReplaceSelectedText = (previousText, selectedText, newText) => {\n return (selectedText === null || selectedText === void 0 ? void 0 : selectedText.length) > 0\n ? previousText.replace(selectedText, newText)\n : previousText.concat(newText);\n };\n }\n clear() {\n this.selectedOptions = [];\n this.combobox.currentValue = '';\n this.$emit('selectionChange', []);\n }\n clearSearch() {\n this.clear();\n }\n inputdeleted() {\n if (this.selectedOptions.length > 0) {\n this.unselectOption(this.selectedOptions[this.selectedOptions.length - 1]);\n }\n }\n changeHandler() {\n const newOptions = [];\n this.combobox.selectedOptions.forEach((option) => {\n var _a, _b, _c;\n const field = option.value;\n const trimSearchTerm = this.searchTerm.trim();\n newOptions.push({\n field,\n term: trimSearchTerm,\n label: ((_a = this.options\n .find((availableOption) => availableOption.field === field)) === null || _a === void 0 ? void 0 : _a.label(trimSearchTerm)) || option.text,\n createCriteria: (_b = this.options.find((availableOption) => availableOption.field === field)) === null || _b === void 0 ? void 0 : _b.createCriteria,\n resourceType: (_c = this.options.find((availableOption) => availableOption.field === field)) === null || _c === void 0 ? void 0 : _c.resourceType,\n });\n });\n this.selectedOptions = [...this.selectedOptions, ...newOptions];\n this.selectedOptions = this.selectedOptions.filter((option, index, self) => index ===\n self.findIndex((compareOption) => option.field === compareOption.field && option.term === compareOption.term));\n this.combobox.value = '';\n this.combobox.open = false;\n this.$emit('selectionChange', this.selectedOptions);\n DOM.queueUpdate(() => {\n setTimeout(() => {\n this.selectedOptionsDiv.scrollTo(this.selectedOptionsDiv.scrollWidth, 0);\n }, SCROLL_TIMEOUT);\n });\n }\n pasteHandler(event) {\n var _a;\n this.loading = true;\n const pastedText = event.clipboardData.getData('text/plain');\n const formattedText = this.normalizeDelimiter(pastedText);\n const selectedText = (_a = window.getSelection()) === null || _a === void 0 ? void 0 : _a.toString();\n const newText = this.addOrReplaceSelectedText(this.combobox.value, selectedText, formattedText);\n if ((newText === null || newText === void 0 ? void 0 : newText.length) >= this.minlength) {\n this.combobox.value = newText;\n this.searchTerm = newText;\n this.combobox.open = true;\n }\n this.loading = false;\n }\n hasSelectedOption(term, field) {\n return this.selectedOptions.some((option) => {\n return option.term === term && option.field === field;\n });\n }\n unselectOption(option) {\n this.selectedOptions = this.selectedOptions.filter((x) => x !== option);\n this.$emit('selectionChange', this.selectedOptions);\n }\n inputHandler() {\n return __awaiter(this, void 0, void 0, function* () {\n this.loading = true;\n this.searchTerm = this.combobox.value;\n if (this.combobox.value.length >= this.minlength) {\n this.filterSelectedOptions(this.combobox.value);\n }\n this.loading = false;\n });\n }\n filterSelectedOptions(term) {\n this.filteredOptions = this.options.filter((option) => !this.selectedOptions.find((selectedOption) => selectedOption.field === option.field && selectedOption.term.trim() === term.trim()));\n }\n}\n__decorate([\n observable\n], SearchBar.prototype, \"defaultSlottedNodes\", void 0);\n__decorate([\n observable\n], SearchBar.prototype, \"options\", void 0);\n__decorate([\n observable\n], SearchBar.prototype, \"searchTerm\", void 0);\n__decorate([\n attr\n], SearchBar.prototype, \"appearance\", void 0);\n__decorate([\n attr\n], SearchBar.prototype, \"minlength\", void 0);\n__decorate([\n attr\n], SearchBar.prototype, \"position\", void 0);\n__decorate([\n attr\n], SearchBar.prototype, \"placeholder\", void 0);\n__decorate([\n attr\n], SearchBar.prototype, \"disabled\", void 0);\n__decorate([\n observable\n], SearchBar.prototype, \"loading\", void 0);\n__decorate([\n observable\n], SearchBar.prototype, \"selectedOptions\", void 0);\n__decorate([\n observable\n], SearchBar.prototype, \"filteredOptions\", void 0);\n// explicitly declaring for extensibility\nexport const foundationSearchBarShadowOptions = undefined;\nexport const defaultSearchBarConfig = {};\n/**\n * The Foundation Search Bar\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-search-bar\\>\n */\nexport const foundationSearchBar = SearchBar.compose(Object.assign({ baseName: 'search-bar', template,\n styles, shadowOptions: foundationSearchBarShadowOptions }, defaultSearchBarConfig));\n","import { designUnit } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nimport { foundationComboboxStyles } from '../combobox';\nexport const foundationSearchBarComboboxStyles = (context, definition) => css `\n ${foundationComboboxStyles(context, definition)}\n .control {\n width: auto;\n padding-left: calc(${designUnit} * 1px);\n padding-right: 0;\n }\n\n .end {\n height: 100%;\n min-width: 36px;\n max-width: 36px;\n padding-right: 2px;\n display: flex;\n justify-content: flex-end;\n align-items: center;\n }\n\n .selected-value {\n min-width: 150px;\n max-width: 169px;\n }\n`;\n","import { html, ref, slotted } from '@microsoft/fast-element';\nimport { endSlotTemplate } from '@microsoft/fast-foundation';\nimport { Listbox } from '@microsoft/fast-foundation';\nexport const foundationSearchBarComboboxTemplate = (context, definition) => html `\n <template\n aria-disabled=\"${(x) => x.ariaDisabled}\"\n autocomplete=\"${(x) => x.autocomplete}\"\n class=\"${(x) => (x.open ? 'open' : '')} ${(x) => (x.disabled ? 'disabled' : '')} ${(x) => x.position} body\"\n ?open=\"${(x) => x.open}\"\n tabindex=\"${(x) => (!x.disabled ? '0' : null)}\"\n @click=\"${(x, c) => x.clickHandler(c.event)}\"\n @focusout=\"${(x, c) => x.focusoutHandler(c.event)}\"\n @keydown=\"${(x, c) => x.keydownHandler(c.event)}\"\n data-test-id=\"combobox\"\n >\n <slot name=\"selectedOptions\" data-test-id=\"options\"></slot>\n <div class=\"control\" part=\"control\">\n <slot name=\"control\">\n <input\n aria-activedescendant=\"${(x) => (x.open ? x.ariaActiveDescendant : null)}\"\n aria-autocomplete=\"${(x) => x.ariaAutoComplete}\"\n aria-controls=\"${(x) => x.ariaControls}\"\n aria-disabled=\"${(x) => x.ariaDisabled}\"\n aria-expanded=\"${(x) => x.ariaExpanded}\"\n aria-haspopup=\"listbox\"\n class=\"selected-value\"\n part=\"selected-value\"\n placeholder=\"${(x) => x.placeholder}\"\n role=\"combobox\"\n type=\"text\"\n ?disabled=\"${(x) => x.disabled}\"\n :value=\"${(x) => x.value}\"\n @input=\"${(x, c) => x.inputHandler(c.event)}\"\n @keyup=\"${(x, c) => x.keyupHandler(c.event)}\"\n ${ref('control')}\n data-test-id=\"selected-value\"\n />\n </slot>\n </div>\n ${endSlotTemplate(context, definition)}\n <div\n class=\"listbox\"\n id=\"${(x) => x.listboxId}\"\n part=\"listbox\"\n role=\"listbox\"\n ?disabled=\"${(x) => x.disabled}\"\n ?hidden=\"${(x) => !x.open}\"\n ${ref('listbox')}\n data-test-id=\"listbox\"\n >\n <slot\n ${slotted({\n filter: Listbox.slottedOptionFilter,\n flatten: true,\n property: 'slottedOptions',\n})}\n ></slot>\n </div>\n </template>\n`;\n","import { __decorate } from \"tslib\";\nimport { Combobox } from '@microsoft/fast-components';\nimport { attr } from '@microsoft/fast-element';\nimport { foundationSearchBarComboboxStyles } from './search-bar-combobox.styles';\nimport { foundationSearchBarComboboxTemplate } from './search-bar-combobox.template';\nimport { COMBO_INPUT_MIN_LENGTH } from './search-bar.types';\n/**\n * @tagname %%prefix%%-search-bar-combobox\n */\nexport class SearchBarCombobox extends Combobox {\n constructor() {\n super(...arguments);\n this.minlength = COMBO_INPUT_MIN_LENGTH;\n this.previousLength = -1;\n this.changeListener = (e) => {\n this.previousLength = 0;\n };\n }\n connectedCallback() {\n super.connectedCallback();\n this.addEventListener('change', this.changeListener);\n }\n disconnectedCallback() {\n super.disconnectedCallback();\n this.removeEventListener('change', this.changeListener);\n }\n clickHandler(e) {\n if (this.disabled) {\n return;\n }\n if (this.open) {\n const captured = e.target.closest(`option,[role=option]`);\n if (!captured || captured.disabled) {\n return;\n }\n this.selectedOptions = [captured];\n this.control.value = captured.text;\n this.value = this.control.value;\n this.$emit('change');\n }\n this.control.focus();\n }\n keyupHandler(e) {\n const key = e.key;\n switch (key) {\n case 'Backspace':\n case 'Delete': {\n if (this.previousLength < 0) {\n this.$emit('inputdeleted');\n }\n else {\n this.previousLength = this.previousLength - 1;\n }\n break;\n }\n case 'Enter': {\n if (this.open && this.selectedIndex !== -1) {\n const firstOption = this.slottedOptions[0];\n this.selectedOptions = [firstOption];\n this.control.value = firstOption.text;\n this.value = this.control.value;\n this.$emit('change');\n }\n }\n }\n super.keyupHandler(e);\n }\n keydownHandler(e) {\n const key = e.key;\n switch (key) {\n case 'ArrowUp':\n case 'ArrowDown': {\n if (this.control.value.length < this.minlength) {\n return;\n }\n else {\n return super.keydownHandler(e);\n }\n }\n case 'Enter': {\n if (this.selectedIndex === -1) {\n return false;\n }\n return super.keydownHandler(e);\n }\n case 'Tab': {\n if (!this.open) {\n return true;\n }\n if (e.shiftKey) {\n this.selectPreviousOption();\n }\n else {\n this.selectNextOption();\n }\n break;\n }\n default:\n return super.keydownHandler(e);\n }\n }\n inputHandler(e) {\n if (this.control.value.length >= this.minlength) {\n this.open = true;\n }\n else {\n e.stopImmediatePropagation();\n this.open = false;\n }\n this.value = this.control.value;\n this.previousLength = this.control.value.length;\n }\n openChanged() {\n if (this.open) {\n this.ariaControls = this.listboxId;\n this.ariaExpanded = 'true';\n this.setPositioning();\n this.focusAndScrollOptionIntoView();\n return;\n }\n this.ariaControls = '';\n this.ariaExpanded = 'false';\n }\n}\n__decorate([\n attr\n], SearchBarCombobox.prototype, \"minlength\", void 0);\nexport const foundationSearchBarComboboxShadowOptions = {\n delegatesFocus: true,\n mode: 'open',\n};\nexport const defaultSearchBarComboboxConfig = {};\n/**\n * The Foundation Search Bar Combobox\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-search-bar-combobox\\>\n */\nexport const foundationSearchBarCombobox = SearchBarCombobox.compose(Object.assign({ baseName: 'search-bar-combobox', template: foundationSearchBarComboboxTemplate, styles: foundationSearchBarComboboxStyles, shadowOptions: foundationSearchBarComboboxShadowOptions }, defaultSearchBarComboboxConfig));\n","import { css } from '@microsoft/fast-element';\nexport const foundationSectionNavigatorStyles = css `\n :host {\n display: block;\n width: 100%;\n height: 100%;\n min-height: 400px;\n\n /* Section link marker CSS variables to allow customization of the marker */\n --section-link-marker-width: 2px;\n --section-link-marker-height: 100%;\n --section-link-marker-left: 0;\n --section-link-marker-top: 0;\n --section-link-marker-transition: background-color 0.2s ease;\n --section-link-marker-background-color: transparent;\n --section-link-marker-background-color-hover: var(--neutral-layer-hover);\n --section-link-marker-background-color-active: var(--accent-fill-rest);\n\n /* Section link CSS variables to allow customization of the link */\n --section-link-text-align: left;\n --section-link-text-white-space: initial;\n }\n\n .section-navigator-container {\n display: flex;\n height: 100%;\n max-height: 100%;\n width: 100%;\n }\n\n .section-navigation {\n background-color: var(--neutral-layer-2);\n border-right: 1px solid var(--neutral-stroke-divider);\n overflow-y: auto;\n height: 100%;\n min-width: 20%;\n }\n\n .section-link {\n position: relative;\n display: block;\n width: 100%;\n color: var(--neutral-foreground-rest);\n text-decoration: none;\n border: none;\n background: none;\n text-align: left;\n transition: all 0.2s ease;\n cursor: pointer;\n font-family: inherit;\n font-size: inherit;\n margin: 0;\n border-radius: 0;\n vertical-align: top;\n }\n\n .section-link.active:hover {\n color: var(--neutral-foreground-rest);\n }\n\n .section-link:hover {\n color: var(--accent-foreground-rest);\n }\n\n .section-link::part(control) {\n vertical-align: top;\n white-space: inherit;\n }\n\n .section-link::before {\n content: '';\n position: absolute;\n top: var(--section-link-marker-top);\n left: var(--section-link-marker-left);\n width: var(--section-link-marker-width);\n height: var(--section-link-marker-height);\n background-color: var(--section-link-marker-background-color);\n transition: var(--section-link-marker-transition);\n z-index: 1;\n }\n\n .section-link:hover::before {\n background-color: var(--section-link-marker-background-color-hover);\n }\n\n .section-link.active::before {\n background-color: var(--section-link-marker-background-color-active);\n }\n\n .section-link::part(content) {\n padding: 0;\n text-align: var(--section-link-text-align);\n white-space: var(--section-link-text-white-space);\n }\n\n .section-content-wrapper {\n flex: 1;\n height: 100%;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n }\n\n .section-content {\n flex: 1;\n overflow-y: auto;\n overflow-x: hidden;\n padding: calc(var(--design-unit) * 4px);\n background-color: var(--neutral-layer-1);\n min-height: 0;\n }\n\n .section-content::-webkit-scrollbar {\n width: var(--scrollbar-width);\n }\n\n .section-content::-webkit-scrollbar-track {\n background: var(--neutral-layer-4);\n }\n\n .section-content::-webkit-scrollbar-thumb {\n width: var(--scrollbar-thumb-width); /* 8px */\n border-radius: 10px;\n box-shadow: inset 0 0 6px rgba(0 0 0 / 30%);\n background-color: var(--neutral-layer-2);\n border: 3px solid var(--neutral-layer-4);\n }\n\n .content-section {\n background-color: var(--neutral-layer-1);\n }\n\n .state-icon {\n margin-left: calc(var(--design-unit) * 1px);\n width: 12px;\n height: 12px;\n }\n\n .state-icon[data-state='active'] {\n color: var(--accent-fill-rest);\n }\n\n .state-icon[data-state='inactive'] {\n color: var(--neutral-foreground-rest);\n }\n\n .state-icon[data-state='pending'] {\n color: var(--warning-fill-rest);\n }\n\n .state-icon[data-state='disabled'] {\n color: var(--neutral-foreground-disabled);\n }\n\n .state-icon[data-state='error'] {\n color: var(--error-fill-rest);\n }\n\n .state-icon[data-state='completed'] {\n color: var(--success-fill-rest);\n }\n\n /* Section button state colors */\n .section-link.state-active {\n color: var(--accent-foreground-rest);\n }\n\n .section-link.state-inactive {\n color: var(--neutral-foreground-hint);\n }\n\n .section-link.state-pending {\n color: var(--warning-color);\n }\n\n .section-link.state-disabled {\n color: var(--neutral-foreground-disabled);\n }\n\n .section-link.state-error {\n color: var(--error-color);\n }\n\n .section-link.state-completed {\n color: var(--success-color);\n }\n\n .section-link.state-multiple {\n color: var(--accent-foreground-rest);\n }\n\n .section-link.state-none {\n color: var(--neutral-foreground-rest);\n }\n`;\n","import { html, ref, repeat } from '@microsoft/fast-element';\nimport { getPrefix } from '../utils';\nconst getPrefixedSectionNavigatorTemplate = (prefix) => html `\n <template>\n <div\n class=\"section-navigator-container\"\n part=\"section-navigator-container\"\n ${ref('sectionNavigatorContainer')}\n >\n <nav class=\"section-navigation\" part=\"section-navigator-navigation\">\n ${repeat((x) => x.sectionItems, html `\n <${prefix}-button\n class=\"section-link ${(x, c) => c.parent.activeSection === x.name ? 'active' : ''} ${(x, c) => c.parent.getSectionStateClass(x)}\"\n part=\"section-navigator-section-link ${(x, c) => c.parent.getSectionStateClass(x)}\"\n @click=\"${(x, c) => c.parent.handleSectionClick(x.name)}\"\n >\n ${(x) => x.label}\n ${repeat((x) => x.states || [], html `\n <${prefix}-icon\n class=\"state-icon\"\n part=\"section-navigator-state-icon\"\n title=\"${(stateName, ctx) => ctx.parentContext.parent.getStateTooltip(stateName)}\"\n data-state=\"${(stateName) => stateName}\"\n name=\"${(stateName, ctx) => ctx.parentContext.parent.getStateIcon(stateName).name}\"\n variant=\"${(stateName, ctx) => ctx.parentContext.parent.getStateIcon(stateName).variant}\"\n ></${prefix}-icon>\n `)}\n </${prefix}-button>\n `)}\n </nav>\n <div class=\"section-content-wrapper\" part=\"section-navigator-content-wrapper\">\n <section class=\"section-content\" part=\"section-navigator-content\" ${ref('sectionContent')}>\n ${repeat((x) => x.sectionItems, html `\n <div\n class=\"content-section\"\n part=\"section-navigator-content-section\"\n data-section=\"${(x) => x.name}\"\n >\n <slot name=\"${(x) => x.name}\"></slot>\n </div>\n `)}\n </section>\n </div>\n </div>\n </template>\n`;\nexport const foundationSectionNavigatorTemplate = html `\n ${(x) => getPrefixedSectionNavigatorTemplate(getPrefix(x))}\n`;\n","import { __decorate } from \"tslib\";\nimport { createLogger } from '@genesislcap/foundation-logger';\nimport { attr, observable } from '@microsoft/fast-element';\nimport { FoundationElement } from '@microsoft/fast-foundation';\nimport { foundationSectionNavigatorStyles as styles } from './section-navigator.styles';\nimport { foundationSectionNavigatorTemplate as template } from './section-navigator.template';\nconst logger = createLogger('SectionNavigator');\nconst EVENT_PREFIX = 'section-navigator';\nexport const SECTION_NAVIGATOR_EVENTS = {\n setState: `${EVENT_PREFIX}-set-state`,\n setStates: `${EVENT_PREFIX}-set-states`,\n clearState: `${EVENT_PREFIX}-clear-state`,\n clearAllStates: `${EVENT_PREFIX}-clear-all-states`,\n};\nconst DEFAULT_SECTION_STATES_TOOLTIPS = {\n active: 'Active',\n inactive: 'Inactive',\n pending: 'Pending',\n disabled: 'Disabled',\n error: 'Error',\n completed: 'Completed',\n};\nconst DEFAULT_SECTION_STATES_ICONS = {\n active: {\n name: 'circle-dot',\n variant: 'solid',\n },\n inactive: {\n name: 'times-circle',\n variant: 'regular',\n },\n pending: {\n name: 'clock',\n variant: 'solid',\n },\n disabled: {\n name: 'ban',\n variant: 'solid',\n },\n error: {\n name: 'times',\n variant: 'solid',\n },\n completed: {\n name: 'check',\n variant: 'solid',\n },\n};\n/**\n * Section Navigator Component\n *\n * A component that provides navigation between different sections with support for state management.\n * Each section can have multiple states that are displayed as icons next to the section label.\n *\n * @tagname %%prefix%%-section-navigator\n *\n * @attr sections - Array of section items to display\n * @attr scroll-behavior - Scroll behavior: 'view' or 'top' (default: 'top')\n * @attr state-tooltips - Custom tooltips for state icons\n * @attr state-icons - Custom icons for state types\n * @attr disable-auto-scroll-detection - Disable automatic active section detection during scrolling (default: false)\n * When enabled, automatically updates active section based on scroll position.\n * User clicks are prioritized - clicked section remains active until scroll ends.\n *\n * @listens set-state - Adds a single state to a section\n * Detail: { sectionName: string, stateName: SectionItemStateName }\n *\n * @listens set-states - Adds multiple states to a section\n * Detail: { sectionName: string, stateNames: SectionItemStateName[] }\n *\n * @listens clear-state - Removes a specific state from a section\n * Detail: { sectionName: string, stateName: SectionItemStateName }\n *\n * @listens clear-all-states - Clears all states from a section or all sections\n * Detail: { sectionName?: string } - If sectionName not provided, clears all sections\n *\n * @slot {sectionName} - Content for each section (slot name matches section name)\n *\n * @example\n * ```html\n * <!-- Default behavior with auto-scroll detection enabled -->\n * <foundation-section-navigator .sections=${sections}>\n * <div slot=\"section1\">Section 1 content</div>\n * <div slot=\"section2\">Section 2 content</div>\n * </foundation-section-navigator>\n *\n * <!-- Disable auto-scroll detection -->\n * <foundation-section-navigator .sections=${sections} disable-auto-scroll-detection>\n * <div slot=\"section1\">Section 1 content</div>\n * <div slot=\"section2\">Section 2 content</div>\n * </foundation-section-navigator>\n * ```\n */\nexport class SectionNavigator extends FoundationElement {\n constructor() {\n super(...arguments);\n this.sections = [];\n this.scrollBehavior = 'top';\n this.stateTooltips = DEFAULT_SECTION_STATES_TOOLTIPS;\n this.stateIcons = DEFAULT_SECTION_STATES_ICONS;\n this.disableAutoScrollDetection = false;\n // Auto-scroll detection properties\n this.userClickedSection = false; // Track if user manually clicked a section\n this.isUserScrolling = false; // Track if user is actively scrolling\n this.sectionItems = [];\n this.activeSection = '';\n }\n sectionsChanged() {\n this.setSectionItems();\n this.setActiveSection();\n this.updateScrollDetection();\n }\n disableAutoScrollDetectionChanged() {\n this.updateScrollDetection();\n }\n scrollBehaviorChanged() {\n this.updateSpacer();\n }\n connectedCallback() {\n super.connectedCallback();\n this.setSectionItems();\n this.setActiveSection();\n this.updateSpacer();\n this.setupStateEventListeners();\n this.updateScrollDetection();\n }\n setSectionItems() {\n if (!Array.isArray(this.sections)) {\n logger.warn('Sections must be an array');\n this.sectionItems = [];\n return;\n }\n this.sectionItems = this.sections;\n }\n setActiveSection() {\n if (this.sectionItems.length > 0 && !this.activeSection) {\n this.activeSection = this.sectionItems[0].name;\n }\n }\n handleSectionClick(sectionName) {\n this.activeSection = sectionName;\n this.userClickedSection = true;\n this.scrollToSection(sectionName);\n }\n updateSpacer() {\n var _a;\n if (!this.sectionContent) {\n logger.warn('Section content element not found');\n return;\n }\n // Remove existing spacer\n (_a = this.spacerElement) === null || _a === void 0 ? void 0 : _a.remove();\n this.spacerElement = undefined;\n if (this.scrollBehavior === 'top') {\n try {\n const containerHeight = this.sectionContent.clientHeight;\n const lastSection = this.sectionContent.querySelector('.content-section:last-child');\n if (lastSection) {\n const lastSectionHeight = lastSection.offsetHeight;\n const spacerPadding = 20;\n const spacerHeight = Math.max(0, containerHeight - lastSectionHeight - spacerPadding);\n this.spacerElement = document.createElement('div');\n this.spacerElement.className = 'scroll-spacer';\n this.spacerElement.style.height = `${spacerHeight}px`;\n this.spacerElement.style.pointerEvents = 'none';\n this.sectionContent.appendChild(this.spacerElement);\n }\n }\n catch (error) {\n logger.error('Error updating spacer:', error);\n }\n }\n }\n scrollToSection(sectionName) {\n if (!this.sectionContent) {\n logger.warn('Section content not available');\n return;\n }\n try {\n const targetElement = this.sectionContent.querySelector(`[data-section=\"${sectionName}\"]`);\n if (!targetElement) {\n logger.warn(`Section \"${sectionName}\" not found`);\n return;\n }\n // Always use internal scrolling to prevent parent container from scrolling\n const scrollTop = targetElement.offsetTop - this.sectionContent.offsetTop;\n this.sectionContent.scrollTo({\n top: scrollTop,\n behavior: 'smooth',\n });\n this.setupScrollEndDetection();\n }\n catch (error) {\n logger.error('Error scrolling to section:', error);\n }\n }\n updateScrollDetection() {\n this.cleanupScrollDetection();\n if (!this.disableAutoScrollDetection && this.sectionContent) {\n this.setupScrollDetection();\n }\n }\n setupScrollDetection() {\n if (!this.sectionContent) {\n logger.warn('Section content not available for scroll detection');\n return;\n }\n try {\n this.scrollCheckHandler = () => {\n if (this.isUserScrolling && !this.userClickedSection) {\n // Clear existing timeout\n if (this.scrollDebounceTimeout) {\n clearTimeout(this.scrollDebounceTimeout);\n }\n // Set new timeout for debounced scroll detection\n this.scrollDebounceTimeout = window.setTimeout(() => {\n this.updateActiveSectionBasedOnScrollPosition();\n }, SectionNavigator.SCROLL_DEBOUNCE_TIMEOUT);\n }\n };\n this.sectionContent.addEventListener('scroll', this.scrollCheckHandler, { passive: true });\n const startScrollingHandler = () => {\n this.isUserScrolling = true;\n };\n const endScrollingHandler = () => {\n this.isUserScrolling = false;\n this.userClickedSection = false;\n };\n this.sectionContent.addEventListener('wheel', startScrollingHandler, { passive: true });\n this.sectionContent.addEventListener('touchstart', startScrollingHandler, { passive: true });\n this.sectionContent.addEventListener('mousedown', startScrollingHandler, { passive: true });\n this.sectionContent.addEventListener('scrollend', endScrollingHandler, { passive: true });\n // Fallback for browsers that don't support scrollend\n let scrollEndTimeout;\n this.sectionContent.addEventListener('scroll', () => {\n clearTimeout(scrollEndTimeout);\n scrollEndTimeout = window.setTimeout(endScrollingHandler, SectionNavigator.SCROLL_END_TIMEOUT);\n }, { passive: true });\n }\n catch (error) {\n logger.error('Error setting up scroll detection:', error);\n }\n }\n updateActiveSectionBasedOnScrollPosition() {\n if (!this.sectionContent) {\n return;\n }\n const scrollTop = this.sectionContent.scrollTop;\n const containerHeight = this.sectionContent.clientHeight;\n const centerPoint = scrollTop + containerHeight / 2;\n let closestSection = null;\n let closestDistance = Infinity;\n this.sectionItems.forEach((section) => {\n const element = this.sectionContent.querySelector(`[data-section=\"${section.name}\"]`);\n if (element) {\n const elementCenter = element.offsetTop + element.clientHeight / 2;\n // Calculate distance from element center to viewport center\n const distance = Math.abs(elementCenter - centerPoint);\n if (distance < closestDistance) {\n closestDistance = distance;\n closestSection = section.name;\n }\n }\n });\n if (closestSection && closestSection !== this.activeSection) {\n this.activeSection = closestSection;\n }\n }\n setupScrollEndDetection() {\n if (!this.sectionContent) {\n return;\n }\n this.cleanupScrollEndDetection();\n this.scrollEndHandler = () => {\n this.userClickedSection = false;\n this.cleanupScrollEndDetection();\n };\n this.sectionContent.addEventListener('scroll', this.scrollEndHandler, { passive: true });\n }\n cleanupScrollEndDetection() {\n if (this.scrollEndHandler && this.sectionContent) {\n this.sectionContent.removeEventListener('scroll', this.scrollEndHandler);\n this.scrollEndHandler = undefined;\n }\n }\n cleanupScrollDetection() {\n if (this.scrollCheckHandler && this.sectionContent) {\n this.sectionContent.removeEventListener('scroll', this.scrollCheckHandler);\n this.scrollCheckHandler = undefined;\n }\n // Clear debounce timeout\n if (this.scrollDebounceTimeout) {\n clearTimeout(this.scrollDebounceTimeout);\n this.scrollDebounceTimeout = undefined;\n }\n this.cleanupScrollEndDetection();\n }\n setupStateEventListeners() {\n if (!this.sectionContent) {\n logger.warn('Section content not available for event listeners');\n return;\n }\n // Create event handler references for proper cleanup\n this.handleSetStateRef = (event) => {\n try {\n const { sectionName, stateName } = event.detail;\n this.addState(sectionName, stateName);\n }\n catch (error) {\n logger.error('Error handling set-state event:', error);\n }\n };\n this.handleSetStatesRef = (event) => {\n try {\n const { sectionName, stateNames } = event.detail;\n this.addStates(sectionName, stateNames);\n }\n catch (error) {\n logger.error('Error handling set-states event:', error);\n }\n };\n this.handleClearStateRef = (event) => {\n try {\n const { sectionName, stateName } = event.detail;\n this.clearState(sectionName, stateName);\n }\n catch (error) {\n logger.error('Error handling clear-state event:', error);\n }\n };\n this.handleClearAllStatesRef = (event) => {\n try {\n const { sectionName } = event.detail;\n if (sectionName) {\n this.clearAllStates(sectionName);\n }\n else {\n this.clearAllStatesInAllSections();\n }\n }\n catch (error) {\n logger.error('Error handling clear-all-states event:', error);\n }\n };\n this.handleGenericStateEventRef = (event) => {\n try {\n const eventType = event.type;\n const detail = event.detail;\n if (detail === null || detail === void 0 ? void 0 : detail.sectionName) {\n return;\n }\n const sectionElement = event.target.closest('[data-section]');\n let sectionName = sectionElement === null || sectionElement === void 0 ? void 0 : sectionElement.getAttribute('data-section');\n if (!sectionName) {\n const slotElement = event.target.closest('[slot]');\n sectionName = (slotElement === null || slotElement === void 0 ? void 0 : slotElement.getAttribute('slot')) || this.activeSection;\n }\n if (!sectionName) {\n sectionName = this.activeSection;\n }\n event.stopPropagation();\n event.preventDefault();\n const newDetail = Object.assign(Object.assign({}, detail), { sectionName });\n const newEvent = new CustomEvent(eventType, {\n detail: newDetail,\n bubbles: true,\n cancelable: true,\n });\n this.dispatchEvent(newEvent);\n }\n catch (error) {\n logger.error('Error handling generic state event:', error);\n }\n };\n // Add event listeners with the stored references\n this.addEventListener(SECTION_NAVIGATOR_EVENTS.setState, this.handleSetStateRef);\n this.addEventListener(SECTION_NAVIGATOR_EVENTS.setStates, this.handleSetStatesRef);\n this.addEventListener(SECTION_NAVIGATOR_EVENTS.clearState, this.handleClearStateRef);\n this.addEventListener(SECTION_NAVIGATOR_EVENTS.clearAllStates, this.handleClearAllStatesRef);\n // Add generic listener for events without sectionName on content sections\n this.sectionContent.addEventListener(SECTION_NAVIGATOR_EVENTS.setState, this.handleGenericStateEventRef, true);\n this.sectionContent.addEventListener(SECTION_NAVIGATOR_EVENTS.setStates, this.handleGenericStateEventRef, true);\n this.sectionContent.addEventListener(SECTION_NAVIGATOR_EVENTS.clearState, this.handleGenericStateEventRef, true);\n this.sectionContent.addEventListener(SECTION_NAVIGATOR_EVENTS.clearAllStates, this.handleGenericStateEventRef, true);\n }\n updateSectionStates(sectionName, newStates) {\n const sectionIndex = this.sectionItems.findIndex((item) => item.name === sectionName);\n if (sectionIndex !== -1) {\n // Create new section object with updated states\n const updatedSection = Object.assign(Object.assign({}, this.sectionItems[sectionIndex]), { states: newStates });\n // Replace the section in the array\n this.sectionItems = [\n ...this.sectionItems.slice(0, sectionIndex),\n updatedSection,\n ...this.sectionItems.slice(sectionIndex + 1),\n ];\n }\n }\n addState(sectionName, stateName) {\n if (!sectionName || !stateName) {\n logger.warn('Section name and state name are required');\n return;\n }\n const sectionIndex = this.sectionItems.findIndex((item) => item.name === sectionName);\n if (sectionIndex === -1) {\n logger.warn(`Section \"${sectionName}\" not found`);\n return;\n }\n const currentStates = this.sectionItems[sectionIndex].states || [];\n if (!currentStates.includes(stateName)) {\n const newStates = [...currentStates, stateName];\n this.updateSectionStates(sectionName, newStates);\n }\n }\n addStates(sectionName, stateNames) {\n if (!sectionName || !Array.isArray(stateNames)) {\n logger.warn('Section name and state names array are required');\n return;\n }\n const sectionIndex = this.sectionItems.findIndex((item) => item.name === sectionName);\n if (sectionIndex === -1) {\n logger.warn(`Section \"${sectionName}\" not found`);\n return;\n }\n const currentStates = this.sectionItems[sectionIndex].states || [];\n const newStates = [...currentStates];\n stateNames.forEach((stateName) => {\n if (!newStates.includes(stateName)) {\n newStates.push(stateName);\n }\n });\n this.updateSectionStates(sectionName, newStates);\n }\n clearState(sectionName, stateName) {\n if (!sectionName || !stateName) {\n logger.warn('Section name and state name are required');\n return;\n }\n const sectionIndex = this.sectionItems.findIndex((item) => item.name === sectionName);\n if (sectionIndex === -1) {\n logger.warn(`Section \"${sectionName}\" not found`);\n return;\n }\n const currentStates = this.sectionItems[sectionIndex].states || [];\n const stateIndex = currentStates.indexOf(stateName);\n if (stateIndex > -1) {\n const newStates = currentStates.filter((_, index) => index !== stateIndex);\n this.updateSectionStates(sectionName, newStates);\n }\n }\n clearAllStates(sectionName) {\n if (!sectionName) {\n logger.warn('Section name is required');\n return;\n }\n const sectionIndex = this.sectionItems.findIndex((item) => item.name === sectionName);\n if (sectionIndex === -1) {\n logger.warn(`Section \"${sectionName}\" not found`);\n return;\n }\n this.updateSectionStates(sectionName, []);\n }\n clearAllStatesInAllSections() {\n // Create new sectionItems array with all sections having empty states\n this.sectionItems = this.sectionItems.map((section) => (Object.assign(Object.assign({}, section), { states: [] })));\n }\n getStateTooltip(stateName) {\n if (!stateName) {\n logger.warn('State name is required');\n return '';\n }\n return this.stateTooltips[stateName] || '';\n }\n getSectionStateClass(section) {\n if (!section) {\n logger.warn('Section is required');\n return 'state-none';\n }\n const states = section.states || [];\n if (states.length === 0) {\n return 'state-none';\n }\n if (states.length > 1) {\n return 'state-multiple';\n }\n const state = states[0];\n return `state-${state}`;\n }\n getStateIcon(stateName) {\n if (!stateName) {\n logger.warn('State name is required');\n return DEFAULT_SECTION_STATES_ICONS.active;\n }\n return this.stateIcons[stateName] || DEFAULT_SECTION_STATES_ICONS[stateName];\n }\n disconnectedCallback() {\n var _a;\n super.disconnectedCallback();\n // Clean up event listeners using stored references\n if (this.handleSetStateRef) {\n this.removeEventListener(SECTION_NAVIGATOR_EVENTS.setState, this.handleSetStateRef);\n }\n if (this.handleSetStatesRef) {\n this.removeEventListener(SECTION_NAVIGATOR_EVENTS.setStates, this.handleSetStatesRef);\n }\n if (this.handleClearStateRef) {\n this.removeEventListener(SECTION_NAVIGATOR_EVENTS.clearState, this.handleClearStateRef);\n }\n if (this.handleClearAllStatesRef) {\n this.removeEventListener(SECTION_NAVIGATOR_EVENTS.clearAllStates, this.handleClearAllStatesRef);\n }\n if (this.handleGenericStateEventRef && this.sectionContent) {\n this.sectionContent.removeEventListener(SECTION_NAVIGATOR_EVENTS.setState, this.handleGenericStateEventRef, true);\n this.sectionContent.removeEventListener(SECTION_NAVIGATOR_EVENTS.setStates, this.handleGenericStateEventRef, true);\n this.sectionContent.removeEventListener(SECTION_NAVIGATOR_EVENTS.clearState, this.handleGenericStateEventRef, true);\n this.sectionContent.removeEventListener(SECTION_NAVIGATOR_EVENTS.clearAllStates, this.handleGenericStateEventRef, true);\n }\n // Clean up scroll detection\n this.cleanupScrollDetection();\n // Clean up spacer element\n (_a = this.spacerElement) === null || _a === void 0 ? void 0 : _a.remove();\n this.spacerElement = undefined;\n }\n}\n// Scroll detection constants\nSectionNavigator.SCROLL_END_TIMEOUT = 150;\nSectionNavigator.SCROLL_DEBOUNCE_TIMEOUT = 100;\n__decorate([\n observable\n], SectionNavigator.prototype, \"sections\", void 0);\n__decorate([\n attr({ attribute: 'scroll-behavior' })\n], SectionNavigator.prototype, \"scrollBehavior\", void 0);\n__decorate([\n attr({ attribute: 'state-tooltips' })\n], SectionNavigator.prototype, \"stateTooltips\", void 0);\n__decorate([\n attr({ attribute: 'state-icons' })\n], SectionNavigator.prototype, \"stateIcons\", void 0);\n__decorate([\n attr({ attribute: 'disable-auto-scroll-detection', mode: 'boolean' })\n], SectionNavigator.prototype, \"disableAutoScrollDetection\", void 0);\n__decorate([\n observable\n], SectionNavigator.prototype, \"sectionItems\", void 0);\n__decorate([\n observable\n], SectionNavigator.prototype, \"activeSection\", void 0);\nexport const foundationSectionNavigatorShadowOptions = {\n mode: 'open',\n};\nexport const defaultSectionNavigatorConfig = {};\n/**\n * The Foundation SectionNavigator\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-section-navigator\\>\n */\nexport const foundationSectionNavigator = SectionNavigator.compose(Object.assign({ baseName: 'foundation-section-navigator', template,\n styles, shadowOptions: foundationSectionNavigatorShadowOptions }, defaultSectionNavigatorConfig));\n","import { radioGroupTemplate as fastSegmentedControlTemplate } from '@microsoft/fast-foundation';\nexport const foundationSegmentedControlTemplate = (context, definition) => fastSegmentedControlTemplate(context, definition);\n","import { radioGroupStyles as fastSegmentedControlStyles } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationSegmentedControlStyles = (context, definition) => css `\n ${fastSegmentedControlStyles(context, definition)}\n ::slotted(foundation-segmented-item:first-of-type) {\n border-radius: calc(var(--control-corner-radius) * 1px) 0 0\n calc(var(--control-corner-radius) * 1px);\n border-right-width: 0;\n }\n\n ::slotted(foundation-segmented-item:last-of-type) {\n border-radius: 0 calc(var(--control-corner-radius) * 1px)\n calc(var(--control-corner-radius) * 1px) 0;\n border-left-width: 0;\n }\n`;\n","import { RadioGroup as FASTRadioGroup } from '@microsoft/fast-foundation';\nimport { foundationSegmentedControlStyles as styles } from './segmented-control.styles';\nimport { foundationSegmentedControlTemplate as template } from './segmented-control.template';\n/**\n * @tagname %%prefix%%-segmented-control\n */\nexport class SegmentedControl extends FASTRadioGroup {\n valueChanged() {\n if (this.value === undefined) {\n if (this.slottedRadioButtons) {\n this.slottedRadioButtons.forEach((radio) => {\n radio.checked = false;\n });\n }\n }\n super.valueChanged();\n }\n}\n// explicitly declaring for extensibility\nexport const foundationSegmentedControlShadowOptions = undefined;\nexport const defaultSegmentedControlConfig = {};\n/**\n * The Foundation Segmented Control\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-segmented-control\\>\n */\nexport const foundationSegmentedControl = SegmentedControl.compose(Object.assign({ baseName: 'segmented-control', template,\n styles, shadowOptions: foundationSegmentedControlShadowOptions }, defaultSegmentedControlConfig));\n","import { html } from '@microsoft/fast-element';\nexport const foundationSegmentedItemTemplate = (context, definition) => html `\n <template\n role=\"radio\"\n aria-checked=\"${(x) => x.checked}\"\n aria-required=\"${(x) => x.required}\"\n aria-disabled=\"${(x) => x.disabled}\"\n aria-readonly=\"${(x) => x.readOnly}\"\n @keypress=\"${(x, c) => x.keypressHandler(c.event)}\"\n @click=\"${(x, c) => x.clickHandler(c.event)}\"\n >\n <span>\n <slot></slot>\n </span>\n </template>\n`;\n","import { radioStyles as fastSegmentedItemStyles } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationSegmentedItemStyles = (context, definition) => css `\n ${fastSegmentedItemStyles(context, definition)}\n :host {\n padding: calc(var(--design-unit) * 2px) calc(var(--design-unit) * 4px);\n border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);\n cursor: pointer;\n }\n\n :host([aria-checked='true']) {\n background: var(--accent-foreground-rest);\n }\n`;\n","import { Radio as FASTRadio } from '@microsoft/fast-components';\nimport { foundationSegmentedItemStyles as styles } from './segmented-item.styles';\nimport { foundationSegmentedItemTemplate as template } from './segmented-item.template';\n/**\n * @tagname %%prefix%%-segmented-item\n */\nexport class SegmentedItem extends FASTRadio {\n}\n// explicitly declaring for extensibility\nexport const foundationSegmentedItemShadowOptions = undefined;\nexport const defaultSegmentedItemConfig = {};\n/**\n * The Foundation Segmented item\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-segmented-item\\>\n */\nexport const foundationSegmentedItem = SegmentedItem.compose(Object.assign({ baseName: 'segmented-item', template,\n styles, shadowOptions: foundationSegmentedItemShadowOptions }, defaultSegmentedItemConfig));\n","import { selectTemplate as fastSelectTemplate } from '@microsoft/fast-foundation';\nexport const foundationSelectTemplate = (context, definition) => fastSelectTemplate(context, definition);\n","import { selectStyles as fastSelectStyles } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationSelectStyles = (context, definition) => css `\n ${fastSelectStyles(context, definition)}\n\n :host(:not([size]):not([multiple]):not([open]):focus-visible), :host([multiple]:focus-visible), :host([size]:focus-visible),\n .control:focus-visible {\n box-shadow: none;\n outline: none;\n }\n`;\n","import { Select as FASTSelect } from '@microsoft/fast-components';\nimport { DOM } from '@microsoft/fast-element';\nimport { getRootActiveElement } from '../utils';\nimport { foundationSelectStyles as styles } from './select.styles';\nimport { foundationSelectTemplate as template } from './select.template';\n/**\n * @tagname %%prefix%%-select\n */\nexport class Select extends FASTSelect {\n /**\n * Ensures that the provided option is focused and scrolled into view.\n *\n * @param optionToFocus - The option to focus\n * @internal\n */\n focusAndScrollOptionIntoView(optionToFocus = this.firstSelectedOption) {\n // To ensure that the browser handles both `focus()` and `scrollIntoView()`, the\n // timing here needs to guarantee that they happen on different frames. Since this\n // function is typically called from the `openChanged` observer, `DOM.queueUpdate`\n // causes the calls to be grouped into the same frame. To prevent this,\n // `requestAnimationFrame` is used instead of `DOM.queueUpdate`.\n if (this.contains(getRootActiveElement(this)) && optionToFocus !== null) {\n optionToFocus.focus();\n requestAnimationFrame(() => {\n optionToFocus.scrollIntoView({ block: 'nearest' });\n });\n }\n }\n openChanged(prev, next) {\n if (!this.collapsible) {\n return;\n }\n if (this.open) {\n this.ariaControls = this.listboxId;\n this.ariaExpanded = 'true';\n this.setPositioning();\n this.focusAndScrollOptionIntoView();\n this['indexWhenOpened'] = this.selectedIndex;\n // focus is directed to the element when `open` is changed programmatically\n DOM.queueUpdate(() => this.focus());\n return;\n }\n this.ariaControls = '';\n this.ariaExpanded = 'false';\n }\n keydownHandler(e) {\n const key = e.key;\n switch (key) {\n case 'ArrowDown':\n case 'ArrowUp':\n if (!this.open) {\n this.open = true;\n }\n else {\n const selectedOption = this.options[this.selectedIndex];\n selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.scrollIntoView({ block: 'center', behavior: 'auto' });\n }\n break;\n }\n const result = super.keydownHandler(e);\n return result;\n }\n}\n// explicitly declaring for extensibility\nexport const foundationSelectShadowOptions = undefined;\nexport const defaultSelectConfig = {\n indicator: `\n <svg\n class=\"select-indicator\"\n part=\"select-indicator\"\n viewBox=\"0 0 12 7\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M11.85.65c.2.2.2.5 0 .7L6.4 6.84a.55.55 0 01-.78 0L.14 1.35a.5.5 0 11.71-.7L6 5.8 11.15.65c.2-.2.5-.2.7 0z\"\n />\n </svg>\n `,\n};\n/**\n * The Foundation Select\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-select\\>\n */\nexport const foundationSelect = Select.compose(Object.assign({ baseName: 'select', template,\n styles, shadowOptions: foundationSelectShadowOptions }, defaultSelectConfig));\n","import { skeletonTemplate as fastSkeletonTemplate } from '@microsoft/fast-foundation';\nexport const foundationSkeletonTemplate = (context, definition) => fastSkeletonTemplate(context, definition);\n","import { skeletonStyles as fastSkeletonStyles } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationSkeletonStyles = (context, definition) => css `\n ${fastSkeletonStyles(context, definition)}\n`;\n","import { Skeleton as FASTSkeleton } from '@microsoft/fast-components';\nimport { foundationSkeletonStyles as styles } from './skeleton.styles';\nimport { foundationSkeletonTemplate as template } from './skeleton.template';\n/**\n * @tagname %%prefix%%-skeleton\n */\nexport class Skeleton extends FASTSkeleton {\n}\n// explicitly declaring for extensibility\nexport const foundationSkeletonShadowOptions = undefined;\nexport const defaultSkeletonConfig = {};\n/**\n * The Foundation Skeleton\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-skeleton\\>\n */\nexport const foundationSkeleton = Skeleton.compose(Object.assign({ baseName: 'skeleton', template,\n styles, shadowOptions: foundationSkeletonShadowOptions }, defaultSkeletonConfig));\n","import { html, ref } from '@microsoft/fast-element';\nimport { limit, Orientation } from '@microsoft/fast-web-utilities';\n/**\n * The template for the {@link @microsoft/fast-foundation#(Slider:class)} component.\n * @public\n */\nexport const foundationSliderTemplate = (context, definition) => html `\n <template\n role=\"slider\"\n class=\"${(x) => (x.readOnly ? 'readonly' : '')}\n ${(x) => x.orientation || Orientation.horizontal}\"\n tabindex=\"${(x) => (x.disabled ? null : 0)}\"\n aria-valuetext=\"${(x) => x.valueTextFormatter(x.value)}\"\n aria-valuenow=\"${(x) => x.value}\"\n aria-valuemin=\"${(x) => x.min}\"\n aria-valuemax=\"${(x) => x.max}\"\n aria-disabled=\"${(x) => (x.disabled ? true : void 0)}\"\n aria-readonly=\"${(x) => (x.readOnly ? true : void 0)}\"\n aria-orientation=\"${(x) => x.orientation}\"\n class=\"${(x) => x.orientation}\"\n >\n <div part=\"positioning-region\" class=\"positioning-region\">\n <div ${ref('track')} part=\"track-container\" class=\"track\">\n <div\n class=\"track-progress\"\n style=\"${(x) => {\n const base = 1 - limit(0, 1, (parseInt(x.value) - x.min) / (x.max - x.min));\n const percentage = Math.round((1 - base) * 100);\n if (x.orientation === 'horizontal') {\n return x.isDragging\n ? `height: calc(var(--track-width) * 1px); width: ${percentage}%;`\n : `height: calc(var(--track-width) * 1px); width: ${percentage}%; transition: all 0.2s ease;`;\n }\n else {\n return x.isDragging\n ? `width: calc(var(--track-width) * 1px); height: ${percentage}%;`\n : `width: calc(var(--track-width) * 1px); height: ${percentage}%; transition: all 0.2s ease;`;\n }\n}}\"\n ></div>\n </div>\n <slot></slot>\n <div\n ${ref('thumb')}\n part=\"thumb-container\"\n class=\"thumb-container\"\n style=\"${(x) => x.position}\"\n >\n <slot name=\"thumb\">${definition.thumb || ''}</slot>\n </div>\n </div>\n </template>\n`;\n","import { sliderStyles as fastSliderStyles } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationSliderStyles = (context, definition) => css `\n ${fastSliderStyles(context, definition)}\n .track-progress {\n background-color: var(--accent-fill-rest);\n border-radius: calc(var(--control-corner-radius) * 1px);\n }\n`;\n","import { Slider as FASTSlider } from '@microsoft/fast-components';\nimport { foundationSliderStyles as styles } from './slider.styles';\nimport { foundationSliderTemplate as template } from './slider.template';\n/**\n * @tagname %%prefix%%-slider\n */\nexport class Slider extends FASTSlider {\n}\n// explicitly declaring for extensibility\nexport const foundationSliderShadowOptions = undefined;\nexport const defaultSliderConfig = {\n thumb: `\n <div class=\"thumb-cursor\"></div>\n `,\n};\n/**\n * The Foundation Slider\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-slider\\>\n */\nexport const foundationSlider = Slider.compose(Object.assign({ baseName: 'slider', template,\n styles, shadowOptions: foundationSliderShadowOptions }, defaultSliderConfig));\n","import { sliderLabelTemplate as fastSliderLabelTemplate } from '@microsoft/fast-foundation';\nexport const foundationSliderLabelTemplate = (context, definition) => fastSliderLabelTemplate(context, definition);\n","import { sliderLabelStyles as fastSliderLabelStyles } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationSliderLabelStyles = (context, definition) => css `\n ${fastSliderLabelStyles(context, definition)}\n`;\n","import { SliderLabel as FASTSliderLabel } from '@microsoft/fast-components';\nimport { foundationSliderLabelStyles as styles } from './slider-label.styles';\nimport { foundationSliderLabelTemplate as template } from './slider-label.template';\n/**\n * @tagname %%prefix%%-slider-label\n */\nexport class SliderLabel extends FASTSliderLabel {\n}\n// explicitly declaring for extensibility\nexport const foundationSliderLabelShadowOptions = undefined;\nexport const defaultSliderLabelConfig = {};\n/**\n * The Foundation Slider Label\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-slider-label\\>\n */\nexport const foundationSliderLabel = SliderLabel.compose(Object.assign({ baseName: 'slider-label', template,\n styles, shadowOptions: foundationSliderLabelShadowOptions }, defaultSliderLabelConfig));\n","export const SNACKBAR_TYPE_DEFAULT = 'default';\nexport const SNACKBAR_TYPES = {\n DEFAULT: SNACKBAR_TYPE_DEFAULT,\n ERROR: 'error',\n SUCCESS: 'success',\n};\nexport const SNACKBAR_CLOSE_TIMEOUT = 10000;\nexport const SNACKBAR_EVENTS_NAMES = {\n DISMISS: 'dismiss',\n AUTO_DISMISS: 'autoDismiss',\n};\n","import { css } from '@microsoft/fast-element';\nexport const foundationSnackbarStyles = css `\n @keyframes append-from-left-animate {\n from {\n transform: translateX(100%);\n opacity: 0%;\n }\n\n to {\n transform: translateX(0%);\n opacity: 100%;\n }\n }\n\n @keyframes delete-from-left-animate {\n from {\n transform: translateX(0%);\n opacity: 100%;\n }\n\n to {\n transform: translateX(100%);\n opacity: 0%;\n }\n }\n\n @keyframes append-from-top-animate {\n from {\n transform: translateY(-100%);\n opacity: 0%;\n }\n\n to {\n transform: translateY(0%);\n opacity: 100%;\n }\n }\n\n @keyframes delete-from-top-animate {\n from {\n transform: translateY(0%);\n opacity: 100%;\n }\n\n to {\n transform: translateY(-100%);\n opacity: 0%;\n }\n }\n\n @keyframes delete-fade-animate {\n from {\n opacity: 100%;\n }\n\n to {\n opacity: 0%;\n }\n }\n\n :host {\n --snackbar-min-width: 356px;\n --snackbar-min-height: 55px;\n --snackbar-max-width: 496px;\n --snackbar-max-height: auto;\n --snackbar-animation-name: append-from-left-animate;\n --snackbar-animation-delete-name: delete-from-left-animate;\n }\n\n .snackbar {\n animation: var(--snackbar-animation-name) 0.3s linear;\n max-width: var(--snackbar-max-width);\n min-width: var(--snackbar-min-width);\n min-height: var(--snackbar-min-height);\n max-height: var(--snackbar-max-height);\n background-color: var(--fill-color);\n border-radius: calc(var(--control-corner-radius) * 1px);\n border-width: thin;\n border-color: var(--neutral-fill-rest);\n box-shadow: 0 2px 5px 0 rgb(0 0 0 / 35%);\n box-sizing: border-box;\n display: flex;\n position: relative;\n bottom: 5px;\n flex-direction: row;\n padding: 2px 16px;\n }\n\n .snackbar-delete {\n animation: var(--snackbar-animation-delete-name) 0.3s linear;\n opacity: 0%;\n }\n\n .snackbar::after {\n content: '';\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n left: 0;\n height: calc(100% - 2px);\n width: 2px;\n border-radius: 2px;\n }\n\n .content {\n display: flex;\n align-items: center;\n flex: 2;\n font-size: 12px;\n overflow: hidden;\n overflow-wrap: anywhere;\n white-space: pre-line;\n }\n\n .action {\n display: flex;\n flex-direction: row-reverse;\n align-items: center;\n gap: 10px;\n flex: 1;\n overflow: hidden;\n }\n`;\n","import { html, ref, repeat, when } from '@microsoft/fast-element';\nimport { getPrefix } from '../utils';\nexport const getPrefixedSnackbar = (prefix) => html `\n <div\n role=\"alert\"\n aria-live=\"polite\"\n part=\"snackbar\"\n class=\"snackbar ${(x) => x.deleteAnimation}\"\n ${ref('snackbar')}\n >\n <div part=\"content\" class=\"content\">\n <slot name=\"content\">\n ${(x) => { var _a, _b; return ((_a = x.error) === null || _a === void 0 ? void 0 : _a.errorDetails) || ((_b = x.notification) === null || _b === void 0 ? void 0 : _b.body) || 'Place holder for error message'; }}\n </slot>\n </div>\n ${when((x) => {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n return ((_d = (_c = (_b = (_a = x.error) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.snackbar) === null || _c === void 0 ? void 0 : _c.confirmingActions) === null || _d === void 0 ? void 0 : _d.length) ||\n ((_h = (_g = (_f = (_e = x.notification) === null || _e === void 0 ? void 0 : _e.config) === null || _f === void 0 ? void 0 : _f.snackbar) === null || _g === void 0 ? void 0 : _g.confirmingActions) === null || _h === void 0 ? void 0 : _h.length);\n}, html `\n <div part=\"action\" class=\"action\">\n <slot name=\"action\">\n ${repeat((x) => {\n var _a, _b, _c, _d, _e, _f;\n return ((_c = (_b = (_a = x.error) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.snackbar) === null || _c === void 0 ? void 0 : _c.confirmingActions) ||\n ((_f = (_e = (_d = x.notification) === null || _d === void 0 ? void 0 : _d.config) === null || _e === void 0 ? void 0 : _e.snackbar) === null || _f === void 0 ? void 0 : _f.confirmingActions);\n}, html `\n <${prefix}-button\n slot=\"action\"\n appearance=\"lightweight\"\n @click=${(x, c) => {\n var _a;\n x === null || x === void 0 ? void 0 : x.action();\n (_a = c.parent) === null || _a === void 0 ? void 0 : _a.dismiss();\n}}\n >\n ${(x) => x.label}\n </${prefix}-button>\n `)}\n </slot>\n </div>\n `)}\n </div>\n`;\nexport const foundationSnackbarTemplate = html `\n ${(x) => getPrefixedSnackbar(getPrefix(x))}\n`;\n","import { __decorate } from \"tslib\";\nimport { attr, observable } from '@microsoft/fast-element';\nimport { FoundationElement } from '@microsoft/fast-foundation';\nimport { SNACKBAR_TYPE_DEFAULT, SNACKBAR_CLOSE_TIMEOUT, SNACKBAR_EVENTS_NAMES, } from './snackbar.config';\nimport { foundationSnackbarStyles as styles } from './snackbar.styles';\nimport { foundationSnackbarTemplate as template } from './snackbar.template';\nexport const foundationSnackbarShadowOptions = {\n mode: 'open',\n delegatesFocus: true,\n};\n/**\n * @tagname %%prefix%%-snackbar\n */\nexport class Snackbar extends FoundationElement {\n constructor() {\n super(...arguments);\n this.deleteAnimation = '';\n this.closeTimeout = SNACKBAR_CLOSE_TIMEOUT;\n this.autoClose = true;\n this.type = SNACKBAR_TYPE_DEFAULT;\n this.dismissEventListener = this.handleDissmis.bind(this);\n }\n autoCloseChanged() {\n if (this.autoClose) {\n this.timeoutRef = setTimeout(() => {\n this.handleDissmis(true);\n }, this.closeTimeout);\n }\n if (!this.autoClose && this.timeoutRef) {\n clearTimeout(this.timeoutRef);\n }\n }\n connectedCallback() {\n super.connectedCallback();\n this.addEventListener(SNACKBAR_EVENTS_NAMES.DISMISS, this.dismissEventListener);\n }\n errorChanged(oldValue, newValue) {\n var _a, _b, _c;\n this.type = (_c = (_b = (_a = newValue === null || newValue === void 0 ? void 0 : newValue.config) === null || _a === void 0 ? void 0 : _a.snackbar) === null || _b === void 0 ? void 0 : _b.type) !== null && _c !== void 0 ? _c : SNACKBAR_TYPE_DEFAULT;\n }\n notificationChanged(oldValue, newValue) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\n this.type = (_c = (_b = (_a = newValue === null || newValue === void 0 ? void 0 : newValue.config) === null || _a === void 0 ? void 0 : _a.snackbar) === null || _b === void 0 ? void 0 : _b.type) !== null && _c !== void 0 ? _c : SNACKBAR_TYPE_DEFAULT;\n this.autoClose = (_f = (_e = (_d = newValue === null || newValue === void 0 ? void 0 : newValue.config) === null || _d === void 0 ? void 0 : _d.snackbar) === null || _e === void 0 ? void 0 : _e.autoClose) !== null && _f !== void 0 ? _f : true;\n this.closeTimeout = (_j = (_h = (_g = newValue === null || newValue === void 0 ? void 0 : newValue.config) === null || _g === void 0 ? void 0 : _g.snackbar) === null || _h === void 0 ? void 0 : _h.closeTimeout) !== null && _j !== void 0 ? _j : SNACKBAR_CLOSE_TIMEOUT;\n }\n /**\n * Helper for remove snackbar from display with animation\n */\n handleDissmis(autoDissmis = false) {\n this.deleteAnimation = 'snackbar-delete';\n this.snackbar.onanimationend = () => {\n this.dismiss();\n if (autoDissmis) {\n this.dispatchEvent(new CustomEvent(SNACKBAR_EVENTS_NAMES.AUTO_DISMISS, {\n bubbles: true,\n composed: true,\n detail: this.identifier,\n }));\n }\n };\n }\n /**\n * Remove the snackbar from display.\n */\n dismiss() {\n this.remove();\n if (this.timeoutRef) {\n clearTimeout(this.timeoutRef);\n }\n }\n disconnectedCallback() {\n super.disconnectedCallback();\n this.removeEventListener(SNACKBAR_EVENTS_NAMES.DISMISS, this.dismissEventListener);\n if (this.timeoutRef) {\n clearTimeout(this.timeoutRef);\n }\n }\n}\n__decorate([\n observable\n], Snackbar.prototype, \"error\", void 0);\n__decorate([\n observable\n], Snackbar.prototype, \"notification\", void 0);\n__decorate([\n observable\n], Snackbar.prototype, \"deleteAnimation\", void 0);\n__decorate([\n attr({ attribute: 'identifier' })\n], Snackbar.prototype, \"identifier\", void 0);\n__decorate([\n attr({ attribute: 'close-timeout' })\n], Snackbar.prototype, \"closeTimeout\", void 0);\n__decorate([\n attr({ attribute: 'auto-close', mode: 'boolean' })\n], Snackbar.prototype, \"autoClose\", void 0);\n__decorate([\n attr({ attribute: 'type' })\n], Snackbar.prototype, \"type\", void 0);\n/**\n * The Foundation Snackbar\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-snackbar\\>\n */\nexport const foundationSnackbar = Snackbar.compose({\n baseName: 'snackbar',\n styles,\n template,\n shadowOptions: foundationSnackbarShadowOptions,\n});\n","import { css } from '@microsoft/fast-element';\nimport { getFontawesomeIconsCss } from '../_config/styles/external/fontawesome-free';\nexport const foundationStackingIconsStyles = (context, definition) => css `\n ${getFontawesomeIconsCss()}\n\n .fa-stack {\n display: inline-block;\n text-align: center;\n line-height: 2em;\n height: 2em;\n position: relative;\n width: 2em;\n }\n\n .fa-stack-1x,\n .fa-stack-2x {\n left: 50%;\n position: absolute;\n transform: translateX(-50%);\n }\n\n .fa-stack-2x {\n font-size: 2em;\n }\n\n .fa-stack-1x {\n z-index: 1;\n }\n`;\n","import { html } from '@microsoft/fast-element';\nexport const foundationStackingIconsTemplate = html `\n <span\n class=${(x) => `fa-stack fa-${x.size}`}\n style=${(x) => `vertical-align: ${x['vertical-align']};`}\n >\n <slot></slot>\n </span>\n`;\n","import { __decorate } from \"tslib\";\nimport { attr } from '@microsoft/fast-element';\nimport { FoundationElement } from '@microsoft/fast-foundation';\nimport { faSizeValueDefault } from '../icon';\nimport { foundationStackingIconsStyles as styles } from './stacking-icons.styles';\nimport { foundationStackingIconsTemplate as template } from './stacking-icons.template';\n/**\n * @tagname %%prefix%%-stacking-icons\n */\nexport class StackingIcons extends FoundationElement {\n constructor() {\n super(...arguments);\n this.size = faSizeValueDefault;\n this['vertical-align'] = 'baseline';\n }\n}\n__decorate([\n attr\n], StackingIcons.prototype, \"size\", void 0);\n__decorate([\n attr\n], StackingIcons.prototype, 'vertical-align', void 0);\n/**\n * The Foundation Stacking Icon\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-stacking-icons\\>\n */\nexport const foundationStackingIcons = StackingIcons.compose({\n baseName: 'stacking-icons',\n template,\n styles,\n});\n","import { css } from '@microsoft/fast-element';\nexport const statusPillStyles = css `\n .status-pill {\n font-size: 12px;\n display: inline-flex;\n align-items: center;\n gap: 5px;\n border-radius: 10px;\n height: 20px;\n background: grey;\n color: var(--neutral-foreground-rest);\n padding: 2px 8px;\n line-height: 1;\n }\n\n .status-pill.lg {\n height: 32px;\n border-radius: 16px;\n padding: 2px 12px;\n }\n\n .status-pill-initial {\n height: 14px;\n width: 14px;\n border-radius: 7px;\n font-weight: bold;\n font-size: 12px;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n .status-pill-image {\n height: 14px;\n }\n`;\n","import { html, when } from '@microsoft/fast-element';\nimport { getPrefix } from '../utils';\nconst getPrefixedStatusPillTemplate = (prefix) => html `\n <div\n data-test-id=\"status-pill\"\n part=\"status-pill\"\n class=\"status-pill\"\n style=\"color: ${(x) => x.textColor || ''}; background: ${(x) => x.backgroundColor || ''};\"\n >\n ${when((x) => x.iconName, html `\n <${prefix}-icon name=\"${(x) => x.iconName}\" size=\"${(x) => x.iconSize}\"></${prefix}-icon>\n `)}\n ${when((x) => x.iconSrc, html `\n <img alt=\"${(x) => x.iconSrc}\" class=\"status-pill-image\" src=\"${(x) => x.iconSrc}\" />\n `)}\n ${when((x) => x.iconInitial, html `\n <div\n data-test-id=\"status-pill-initial\"\n class=\"status-pill-initial\"\n style=\"color:${(x) => x.textColor}; background-color: ${(x) => x.iconInitialBackgroundColor}\"\n >\n ${(x) => x.iconInitial.substring(0, 1)}\n </div>\n `)}\n <span data-test-id=\"status-pill-text\">${(x) => x.text}</span>\n ${when((x) => x.countdown, html `\n <span data-test-id=\"status-pill-countdown\">${(x) => x.countdown}</span>\n `)}\n </div>\n`;\nexport const foundationStatusPillTemplate = html `\n ${(x) => getPrefixedStatusPillTemplate(getPrefix(x))}\n`;\n","import { __decorate } from \"tslib\";\nimport { attr, observable } from '@microsoft/fast-element';\nimport { FoundationElement } from '@microsoft/fast-foundation';\nimport { logger } from '../utils';\nimport { statusPillStyles as styles } from './status-pill.styles';\nimport { foundationStatusPillTemplate as template } from './status-pill.template';\nconst ONE_SECOND_IN_MILIS = 1000;\nconst SECONDS_IN_DAY = 86400;\nconst SECONDS_IN_HOUR = 3600;\nconst SECONDS_IN_MINUTE = 60;\n/**\n * @internal\n */\nexport const formatTimeForCountDown = (totalMilliseconds, minUnit = 'second') => {\n let totalSeconds = totalMilliseconds / ONE_SECOND_IN_MILIS;\n const days = Math.floor(totalSeconds / SECONDS_IN_DAY);\n totalSeconds %= SECONDS_IN_DAY;\n const hours = Math.floor(totalSeconds / SECONDS_IN_HOUR);\n totalSeconds %= SECONDS_IN_HOUR;\n const minutes = Math.floor(totalSeconds / SECONDS_IN_MINUTE);\n const seconds = Math.floor(totalSeconds % SECONDS_IN_MINUTE);\n const parts = [];\n if (days)\n parts.push(`${days}d`);\n switch (minUnit) {\n case 'minute':\n if (hours)\n parts.push(`${hours}h`);\n if (minutes)\n parts.push(`${minutes}m`);\n if (!minutes && seconds)\n parts.push('< 1m'); // if less than one minute but remaining minutes show less than 1 minute\n break;\n case 'hour':\n if (hours)\n parts.push(`${hours}h`);\n if (!hours && (minutes || seconds))\n parts.push('< 1h'); // if less than one hour but remaining minutes show less than 1 hour.\n break;\n case 'second':\n default:\n if (hours)\n parts.push(`${hours}h`);\n if (minutes)\n parts.push(`${minutes}m`);\n if (seconds)\n parts.push(`${seconds}s`);\n break;\n }\n return parts.length ? parts.join(' ') : '0s';\n};\n/**\n * @tagname %%prefix%%-status-pill\n */\nexport class StatusPill extends FoundationElement {\n constructor() {\n super(...arguments);\n /**\n * @attr icon-size - sets the size of the icon. Defaults to 'sm'. Can be one of any valid fa icon size, \"2xs\" | \"xs\" | \"sm\" | \"lg\" | \"xl\" | \"2xl\" | \"1x\" | \"2x\" | \"3x\" | \"4x\" | \"5x\" | \"6x\" | \"7x\" | \"8x\" | \"9x\" | \"10x\"\n * @example\n * Status pill with large set\n * ```html\n * <rapid-status-pill size='lg'>\n * </rapid-status-pill>\n * ```\n */\n this.iconSize = 'sm';\n /**\n * @attr date-countdown-completed-message - the string that will be shown when the countdown is complete\n * @example\n * Status pill with countdown completed message\n * ```html\n * <rapid-status-pill date-countdown-completed-message='Market Closed'>\n * </rapid-status-pill>\n * ```\n */\n this.dateCountdownCompletedMessage = `Expired`;\n /**\n * @attr date-countdown-unit - the minimum unit of time shown in the countdown. Defaults to 'seconds'\n * @example\n * Status pill with countdown min unit\n * ```html\n * <rapid-status-pill date-countdown-unit='minutes'>\n * </rapid-status-pill>\n * ```\n */\n this.dateCountdownUnit = 'second';\n }\n /**\n * @internal\n */\n dateCountdownChanged(oldValue, newValue) {\n if (oldValue !== newValue) {\n if (!newValue) {\n this.clearCountdownTimer();\n return;\n }\n this.setUpDateCountdown(newValue);\n }\n }\n disconnectedCallback() {\n this.clearCountdownTimer();\n super.disconnectedCallback();\n }\n setUpDateCountdown(dateCountdown) {\n this.clearCountdownTimer();\n if (!isNaN(parseInt(dateCountdown))) {\n dateCountdown = parseInt(dateCountdown);\n const baseDate = new Date(dateCountdown);\n this.updateCountdown(baseDate);\n this.dateInterval = setInterval(() => this.updateCountdown(baseDate), ONE_SECOND_IN_MILIS);\n }\n else {\n logger.warn('invalid date-countdown value passed. Must be a number');\n }\n }\n updateCountdown(targetDate) {\n const now = new Date().getTime();\n const diff = Math.floor(targetDate.getTime() - now);\n if (diff <= 0) {\n this.countdown = this.dateCountdownCompletedMessage;\n clearInterval(this.dateInterval);\n }\n else {\n this.countdown = formatTimeForCountDown(diff, this.dateCountdownUnit);\n }\n }\n clearCountdownTimer() {\n if (this.dateInterval) {\n clearInterval(this.dateInterval);\n this.dateInterval = null;\n this.countdown = null;\n }\n }\n}\n__decorate([\n attr({ attribute: 'background-color' })\n], StatusPill.prototype, \"backgroundColor\", void 0);\n__decorate([\n attr({ attribute: 'icon-name' })\n], StatusPill.prototype, \"iconName\", void 0);\n__decorate([\n attr({ attribute: 'icon-src' })\n], StatusPill.prototype, \"iconSrc\", void 0);\n__decorate([\n attr({ attribute: 'icon-initial' })\n], StatusPill.prototype, \"iconInitial\", void 0);\n__decorate([\n attr({ attribute: 'icon-initial-background-color' })\n], StatusPill.prototype, \"iconInitialBackgroundColor\", void 0);\n__decorate([\n attr({ attribute: 'icon-size' })\n], StatusPill.prototype, \"iconSize\", void 0);\n__decorate([\n attr({ attribute: 'text-color' })\n], StatusPill.prototype, \"textColor\", void 0);\n__decorate([\n attr\n], StatusPill.prototype, \"text\", void 0);\n__decorate([\n attr({ attribute: 'date-countdown' })\n], StatusPill.prototype, \"dateCountdown\", void 0);\n__decorate([\n attr({ attribute: 'date-countdown-completed-message' })\n], StatusPill.prototype, \"dateCountdownCompletedMessage\", void 0);\n__decorate([\n attr({ attribute: 'date-countdown-unit' })\n], StatusPill.prototype, \"dateCountdownUnit\", void 0);\n__decorate([\n observable\n], StatusPill.prototype, \"countdown\", void 0);\n/**\n * The Foundation Status Pill\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-status-pill\\>\n */\nexport const foundationStatusPill = StatusPill.compose({\n baseName: 'status-pill',\n styles,\n template,\n});\n","import { whenElse } from '@genesislcap/foundation-utils';\nimport { html, ref, when } from '@microsoft/fast-element';\nimport { TabsOrientation } from '@microsoft/fast-foundation';\nimport { classNames } from '@microsoft/fast-web-utilities';\nimport { getPrefix } from '../utils';\nexport const getPrefixedStepperTab = (prefix) => html `\n ${whenElse((x) => x.orientation === TabsOrientation.vertical, html `\n <${prefix}-tree-item ${ref('treeItem')} \n class=${(x) => classNames('tree-item', ['cursor-pointer', x.showCursorPointer])}\n @click=\"${(x, c) => x.$emit('tab-clicked', x.tabPosition - 1)}\">\n ${when((x) => x.completed, html `\n <${prefix}-icon\n name=\"check-circle\"\n variant=\"regular\"\n size=\"lg\"\n class=\"stepper-icon completed-icon\"\n ></${prefix}-icon>\n `)}\n ${when((x) => x.error, html `\n <${prefix}-icon\n name=\"times-circle\"\n variant=\"regular\"\n size=\"lg\"\n class=\"stepper-icon error-icon\"\n ></${prefix}-icon>\n `)}\n <slot></slot>\n </${prefix}-tree-item>\n `, html `\n <div class=${(x) => classNames('step-container', ['selected', x.selected])}>\n <div\n class=${(x) => classNames('step-number-container', ['cursor-pointer', x.showCursorPointer])}\n @click=\"${(x) => x.$emit('tab-clicked', x.tabPosition - 1)}\"\n >\n ${when((x) => !x.hideStepNumber, html `\n <span class=\"step-number\">${(x) => x.tabPosition}</span>\n `)}\n <slot class=\"step-title\"></slot>\n </div>\n ${when((x) => !x.isLast, html `\n <${prefix}-icon\n class=\"stepper-icon angle-icon\"\n name=\"angle-right\"\n variant=\"solid\"\n size=\"lg\"\n ></${prefix}-icon>\n `)}\n </div>\n `)}\n`;\nexport const foundationStepperTabTemplate = html `\n ${(x) => getPrefixedStepperTab(getPrefix(x))}\n`;\n","import { css } from '@microsoft/fast-element';\nexport const foundationStepperTabStyles = (context, definition) => css `\n .tree-item {\n cursor: default;\n }\n\n .tree-item::part(content-region) {\n margin-inline-start: 0;\n }\n\n .tree-item[selected]::part(positioning-region):hover {\n background: var(--neutral-fill-rest);\n }\n\n .tree-item::part(positioning-region):hover {\n background: var(--neutral-fill-stealth-rest);\n }\n\n .stepper-icon {\n margin-right: 5px;\n }\n\n .completed-icon {\n color: #69cd70;\n }\n\n .error-icon {\n color: #f14376;\n }\n\n .step-number {\n display: flex;\n justify-content: center;\n align-items: center;\n margin: 0 5px 0 0;\n width: 24px;\n height: 24px;\n font-size: var(--type-ramp-minus-1-font-size);\n font-weight: 500;\n color: var(--focus-stroke-outer);\n background-color: var(--neutral-fill-input-rest);\n border-radius: 50%;\n border: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-input-rest);\n }\n\n .step-number-container {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n width: 75%;\n }\n\n .angle-icon {\n color: var(--neutral-fill-input-rest);\n margin: 0 calc(var(--design-unit) * 4px);\n }\n\n .step-title {\n font-size: var(--type-ramp-base-font-size);\n color: var(--focus-stroke-outer);\n font-weight: 600;\n }\n\n :host([completed]) .step-number {\n border-color: #69cd70;\n color: white;\n background-color: #69cd70;\n }\n\n :host([completed]) .step-title {\n color: #69cd70;\n }\n\n :host([error]) .step-number {\n border-color: #f14376;\n color: white;\n background-color: #f14376;\n }\n\n :host([error]) .step-title {\n color: #f14376;\n }\n\n :host([orientation='horizontal']) {\n flex: 1 1 0;\n height: 100%;\n }\n\n .cursor-pointer {\n cursor: pointer;\n }\n\n .step-container {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: space-between;\n height: 100%;\n }\n\n .step-container.selected::after {\n content: '';\n position: absolute;\n bottom: 0;\n left: calc(var(--design-unit) * -3px); /* This matches the left padding */\n right: 28px; /* This matches the icon width + right margin */\n height: 2px;\n width: calc(100% - 28px);\n background-color: var(--accent-fill-rest); /* Choose a color */\n }\n`;\n","import { __decorate } from \"tslib\";\nimport { attr } from '@microsoft/fast-element';\nimport { FoundationElement, TabsOrientation } from '@microsoft/fast-foundation';\nimport { foundationStepperTabStyles as styles } from './stepper-tab.styles';\nimport { foundationStepperTabTemplate as template } from './stepper-tab.template';\n/**\n * @tagname %%prefix%%-stepper-tab\n */\nexport class StepperTab extends FoundationElement {\n constructor() {\n super(...arguments);\n this.slot = 'tab';\n this.orientation = TabsOrientation.vertical;\n }\n isCompleted() {\n return this.completed;\n }\n selectedChanged() {\n if (this.treeItem) {\n this.treeItem.selected = this.selected;\n }\n }\n disconnectedCallback() {\n super.disconnectedCallback();\n this.completed = undefined;\n this.error = undefined;\n this.selected = undefined;\n }\n}\n__decorate([\n attr\n], StepperTab.prototype, \"slot\", void 0);\n__decorate([\n attr({ mode: 'boolean' })\n], StepperTab.prototype, \"selected\", void 0);\n__decorate([\n attr({ mode: 'boolean' })\n], StepperTab.prototype, \"completed\", void 0);\n__decorate([\n attr({ mode: 'boolean' })\n], StepperTab.prototype, \"error\", void 0);\n__decorate([\n attr({ mode: 'boolean' })\n], StepperTab.prototype, \"isLast\", void 0);\n__decorate([\n attr({ mode: 'boolean' })\n], StepperTab.prototype, \"hideStepNumber\", void 0);\n__decorate([\n attr({ mode: 'boolean' })\n], StepperTab.prototype, \"showCursorPointer\", void 0);\n__decorate([\n attr({ attribute: 'tab-position' })\n], StepperTab.prototype, \"tabPosition\", void 0);\n__decorate([\n attr\n], StepperTab.prototype, \"orientation\", void 0);\n// explicitly declaring for extensibility\nexport const foundationStepperTabShadowOptions = undefined;\nexport const defaultStepperTabConfig = {};\n/**\n * The Foundation Stepper Tab\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-stepper-tab\\>\n */\nexport const foundationStepperTab = StepperTab.compose(Object.assign({ baseName: 'stepper-tab', template,\n styles, shadowOptions: foundationStepperTabShadowOptions }, defaultStepperTabConfig));\n","import { html } from '@microsoft/fast-element';\nexport const foundationStepperTabPanelTemplate = () => html `\n <template slot=\"tab-panel\" role=\"stepper-tab-panel\">\n <slot></slot>\n </template>\n`;\n","import { FoundationElement } from '@microsoft/fast-foundation';\nimport { foundationStepperTabPanelTemplate as template } from './stepper-tab-panel.template';\n/**\n * @tagname %%prefix%%-stepper-tab-panel\n */\nexport class StepperTabPanel extends FoundationElement {\n}\n// explicitly declaring for extensibility\nexport const foundationStepperTabPanelShadowOptions = undefined;\nexport const defaultStepperTabPanelConfig = {};\n/**\n * The Foundation Stepper Tab Panel\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-stepper-tab-panel\\>\n */\nexport const foundationStepperTabPanel = StepperTabPanel.compose(Object.assign({ baseName: 'stepper-tab-panel', template, shadowOptions: foundationStepperTabPanelShadowOptions }, defaultStepperTabPanelConfig));\n","import { switchTemplate as fastSwitchTemplate } from '@microsoft/fast-foundation';\nexport const foundationSwitchTemplate = (context, definition) => fastSwitchTemplate(context, definition);\n","import { switchStyles as fastSwitchStyles } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationSwitchStyles = (context, definition) => css `\n ${fastSwitchStyles(context, definition)}\n .checked-indicator {\n transform: scale(1.3);\n }\n\n .switch {\n border-radius: calc(var(--control-corner-radius) * 3px);\n }\n\n .checked-indicator {\n border-radius: calc(var(--control-corner-radius) * 2px);\n }\n`;\n","import { Switch as FASTSwitch } from '@microsoft/fast-components';\nimport { foundationSwitchStyles as styles } from './switch.styles';\nimport { foundationSwitchTemplate as template } from './switch.template';\n/**\n * @tagname %%prefix%%-switch\n */\nexport class Switch extends FASTSwitch {\n}\n// explicitly declaring for extensibility\nexport const foundationSwitchShadowOptions = undefined;\nexport const defaultSwitchConfig = {\n switch: `<div class=\"checked-indicator\" part=\"checked-indicator\"></div>`,\n};\n/**\n * The Foundation Switch\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-switch\\>\n */\nexport const foundationSwitch = Switch.compose(Object.assign({ baseName: 'switch', template,\n styles, shadowOptions: foundationSwitchShadowOptions }, defaultSwitchConfig));\n","import { tabTemplate as fastTabTemplate } from '@microsoft/fast-foundation';\nexport const foundationTabTemplate = (context, definition) => fastTabTemplate(context, definition);\n","import { tabStyles as fastTabStyles } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationTabStyles = (context, definition) => css `\n ${fastTabStyles(context, definition)}\n\n :host {\n user-select: none;\n }\n`;\n","import { Tab as FASTTab } from '@microsoft/fast-components';\nimport { foundationTabStyles as styles } from './tab.styles';\nimport { foundationTabTemplate as template } from './tab.template';\n/**\n * @tagname %%prefix%%-tab\n */\nexport class Tab extends FASTTab {\n}\n// explicitly declaring for extensibility\nexport const foundationTabShadowOptions = undefined;\nexport const defaultTabConfig = {};\n/**\n * The Foundation Tab\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-tab\\>\n */\nexport const foundationTab = Tab.compose(Object.assign({ baseName: 'tab', template,\n styles, shadowOptions: foundationTabShadowOptions }, defaultTabConfig));\n","import { tabPanelTemplate as fastTabPanelTemplate } from '@microsoft/fast-foundation';\nexport const foundationTabPanelTemplate = (context, definition) => fastTabPanelTemplate(context, definition);\n","import { tabPanelStyles as fastTabPanelStyles } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationTabPanelStyles = (context, definition) => css `\n ${fastTabPanelStyles(context, definition)}\n\n :host {\n height: 100%;\n padding: 0;\n }\n`;\n","import { TabPanel as FASTTabPanel } from '@microsoft/fast-components';\nimport { foundationTabPanelStyles as styles } from './tab-panel.styles';\nimport { foundationTabPanelTemplate as template } from './tab-panel.template';\n/**\n * @tagname %%prefix%%-tab-panel\n */\nexport class TabPanel extends FASTTabPanel {\n}\n// explicitly declaring for extensibility\nexport const foundationTabPanelShadowOptions = undefined;\nexport const defaultTabPanelConfig = {};\n/**\n * The Foundation Tab Panel\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-tab-panel\\>\n */\nexport const foundationTabPanel = TabPanel.compose(Object.assign({ baseName: 'tab-panel', template,\n styles, shadowOptions: foundationTabPanelShadowOptions }, defaultTabPanelConfig));\n","import { tabsTemplate as fastTabsTemplate } from '@microsoft/fast-foundation';\nexport const foundationTabsTemplate = (context, definition) => fastTabsTemplate(context, definition);\n","import { tabsStyles as fastTabsStyles } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationTabsStyles = (context, definition) => css `\n ${fastTabsStyles(context, definition)}\n\n :host {\n height: 100%;\n width: 100%;\n }\n`;\n","import { Tabs as FASTTabs } from '@microsoft/fast-components';\nimport { foundationTabsStyles as styles } from './tabs.styles';\nimport { foundationTabsTemplate as template } from './tabs.template';\n/**\n * @tagname %%prefix%%-tabs\n */\nexport class Tabs extends FASTTabs {\n /**\n * A zero-index number representing the active tab\n *\n * @privateRemarks\n * Exposes the private `activeTabIndex` from the original class\n */\n get currentTabIndex() {\n const ref = this;\n return ref.activeTabIndex;\n }\n}\n// explicitly declaring for extensibility\nexport const foundationTabsShadowOptions = undefined;\nexport const defaultTabsConfig = {};\n/**\n * The Foundation Tabs\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-tabs\\>\n */\nexport const foundationTabs = Tabs.compose(Object.assign({ baseName: 'tabs', template,\n styles, shadowOptions: foundationTabsShadowOptions }, defaultTabsConfig));\n","import { textAreaTemplate as fastTextAreaTemplate } from '@microsoft/fast-foundation';\nexport const foundationTextAreaTemplate = (context, definition) => fastTextAreaTemplate(context, definition);\n","import { textAreaStyles as fastTextAreaStyles } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationTextAreaStyles = (context, definition) => css `\n ${fastTextAreaStyles(context, definition)}\n :host .control {\n padding: calc(var(--design-unit) * 3px);\n }\n`;\n","import { TextArea as FASTTextArea } from '@microsoft/fast-components';\nimport { foundationTextAreaStyles as styles } from './text-area.styles';\nimport { foundationTextAreaTemplate as template } from './text-area.template';\n/**\n * @tagname %%prefix%%-text-area\n */\nexport class TextArea extends FASTTextArea {\n}\n// explicitly declaring for extensibility\nexport const foundationTextAreaShadowOptions = undefined;\nexport const defaultTextAreaConfig = {};\n/**\n * The Foundation Text Area\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-text-area\\>\n */\nexport const foundationTextArea = TextArea.compose(Object.assign({ baseName: 'text-area', template,\n styles, shadowOptions: foundationTextAreaShadowOptions }, defaultTextAreaConfig));\n","import { html, ref, slotted } from '@microsoft/fast-element';\nimport { endSlotTemplate, startSlotTemplate, whitespaceFilter, } from '@microsoft/fast-foundation';\n/**\n * @privateRemarks TODO: Raise PR against FAST\n * Unfortunately this template is almost a complete duplicate of the original fast version, just with additional\n * input atts required for auto completion.\n * Taken from `@microsoft/fast-foundation.46.2`\n */\nexport const foundationTextFieldTemplate = (context, definition) => html `\n <template\n class=\"\n ${(x) => (x.readOnly ? 'readonly' : '')}\n \"\n >\n <label\n part=\"label\"\n for=\"${(x) => (x.id ? x.id : 'control')}\"\n class=\"${(x) => x.defaultSlottedNodes && x.defaultSlottedNodes.length ? 'label' : 'label label-hidden'}\"\n >\n <slot ${slotted({ property: 'defaultSlottedNodes', filter: whitespaceFilter })}></slot>\n </label>\n <div class=\"root\" part=\"root\">\n ${startSlotTemplate(context, definition)}\n <input\n name=\"${(x) => x.name}\"\n autocomplete=\"${(x) => x.autocomplete}\"\n autocapitalize=\"${(x) => x.autocapitalize}\"\n id=\"${(x) => (x.id ? x.id : 'control')}\"\n class=\"control\"\n part=\"control\"\n @input=\"${(x) => x.handleTextInput()}\"\n @change=\"${(x) => x.handleChange()}\"\n step=\"${(x) => x.step}\"\n ?autofocus=\"${(x) => x.autofocus}\"\n ?disabled=\"${(x) => x.disabled}\"\n list=\"${(x) => x.list}\"\n maxlength=\"${(x) => x.maxlength}\"\n minlength=\"${(x) => x.minlength}\"\n pattern=\"${(x) => x.pattern}\"\n placeholder=\"${(x) => x.placeholder}\"\n ?readonly=\"${(x) => x.readOnly}\"\n ?required=\"${(x) => x.required}\"\n size=\"${(x) => x.size}\"\n ?spellcheck=\"${(x) => x.spellcheck}\"\n :value=\"${(x) => x.value}\"\n type=\"${(x) => x.type}\"\n aria-atomic=\"${(x) => x.ariaAtomic}\"\n aria-busy=\"${(x) => x.ariaBusy}\"\n aria-controls=\"${(x) => x.ariaControls}\"\n aria-current=\"${(x) => x.ariaCurrent}\"\n aria-describedby=\"${(x) => x.ariaDescribedby}\"\n aria-details=\"${(x) => x.ariaDetails}\"\n aria-disabled=\"${(x) => x.ariaDisabled}\"\n aria-errormessage=\"${(x) => x.ariaErrormessage}\"\n aria-flowto=\"${(x) => x.ariaFlowto}\"\n aria-haspopup=\"${(x) => x.ariaHaspopup}\"\n aria-hidden=\"${(x) => x.ariaHidden}\"\n aria-invalid=\"${(x) => x.ariaInvalid}\"\n aria-keyshortcuts=\"${(x) => x.ariaKeyshortcuts}\"\n aria-label=\"${(x) => x.ariaLabel}\"\n aria-labelledby=\"${(x) => x.ariaLabelledby}\"\n aria-live=\"${(x) => x.ariaLive}\"\n aria-owns=\"${(x) => x.ariaOwns}\"\n aria-relevant=\"${(x) => x.ariaRelevant}\"\n aria-roledescription=\"${(x) => x.ariaRoledescription}\"\n ${ref('control')}\n />\n ${endSlotTemplate(context, definition)}\n </div>\n </template>\n`;\n","import { baseLayerLuminance, StandardLuminance } from '@microsoft/fast-components';\nimport { DesignToken } from '@microsoft/fast-foundation';\nconst { create } = DesignToken;\n/**\n * A design token that represents the active color scheme (light or dark).\n * @public\n */\nexport const activeColorScheme = create('active-color-scheme').withDefault(\n/**\n * A callback function that returns the active color scheme based on the base layer luminance of the provided element.\n * @param {HTMLElement} elem The element to get the active color scheme for.\n * @returns {string} The active color scheme ('light' or 'dark').\n */\n(elem) => baseLayerLuminance.getValueFor(elem) === StandardLuminance.LightMode ? 'light' : 'dark');\n","import { activeColorScheme } from '@genesislcap/foundation-utils';\nimport { textFieldStyles as fastTextFieldStyles } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationTextFieldStyles = (context, definition) => css `\n ${fastTextFieldStyles(context, definition)}\n\n input {\n color-scheme: ${activeColorScheme};\n }\n\n .label-hidden {\n margin: 0;\n }\n`;\n","import { __decorate } from \"tslib\";\nimport { TextField as FASTTextField } from '@microsoft/fast-components';\nimport { attr } from '@microsoft/fast-element';\nimport { foundationTextFieldStyles as styles } from './text-field.styles';\nimport { foundationTextFieldTemplate as template } from './text-field.template';\n// TODO: Raise a PR against FAST to get autocomplete stuff in place\n/**\n * @tagname %%prefix%%-text-field\n */\nexport class TextField extends FASTTextField {\n constructor() {\n super(...arguments);\n this.autocomplete = 'off';\n this.autocapitalize = 'off';\n }\n autocompleteChanged() {\n if (this.proxy instanceof HTMLInputElement) {\n this.proxy.autocomplete = this.autocomplete;\n }\n }\n autocapitalizeChanged() {\n if (this.proxy instanceof HTMLInputElement) {\n this.proxy.autocapitalize = this.autocapitalize;\n }\n }\n}\n__decorate([\n attr\n], TextField.prototype, \"autocomplete\", void 0);\n__decorate([\n attr\n], TextField.prototype, \"autocapitalize\", void 0);\n__decorate([\n attr\n], TextField.prototype, \"step\", void 0);\n// explicitly declaring for extensibility\nexport const foundationTextFieldShadowOptions = {\n mode: 'open',\n delegatesFocus: true,\n};\nexport const defaultTextFieldConfig = {};\n/**\n * The Foundation Text Fields\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-text-field\\>\n */\nexport const foundationTextField = TextField.compose(Object.assign({ baseName: 'text-field', template,\n styles, shadowOptions: foundationTextFieldShadowOptions }, defaultTextFieldConfig));\n","import { css } from '@microsoft/fast-element';\nexport const foundationToastStyles = css `\n @keyframes append-animate {\n from {\n transform: translateX(100%);\n opacity: 0%;\n }\n\n to {\n transform: translateX(0%);\n opacity: 100%;\n }\n }\n\n @keyframes delete-animate {\n from {\n transform: translateX(0%);\n opacity: 100%;\n }\n\n to {\n transform: translateX(100%);\n opacity: 0%;\n }\n }\n\n :host {\n --toast-min-width: 356px;\n --toast-min-height: 128px;\n --toast-max-width: 356px;\n --toast-max-height: 272px;\n }\n\n .toast {\n animation: append-animate 0.3s linear;\n max-width: var(--toast-max-width);\n min-width: var(--toast-min-width);\n background-color: var(--fill-color);\n border-radius: calc(var(--control-corner-radius) * 1px);\n border-width: thin;\n border-color: var(--neutral-fill-rest);\n box-shadow: 0 2px 15px 0 rgb(0 0 0 / 35%);\n display: flex;\n position: relative;\n flex-direction: row;\n padding: 8px 8px 8px 15px;\n margin: 5px;\n }\n\n .toast-delete {\n animation: delete-animate 0.3s linear;\n opacity: 0%;\n }\n\n .toast::after {\n content: '';\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n left: 5px;\n height: calc(100% - 10px);\n width: 4px;\n border-radius: 2px;\n background-color: red;\n }\n\n .content-wrapper {\n height: fit-content;\n width: 100%;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-items: stretch;\n }\n\n .bottom {\n width: 70%;\n }\n\n .top {\n width: 100%;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n }\n\n .content {\n width: 85%;\n font-size: 12px;\n overflow-wrap: break-word;\n }\n\n ::slotted(*) {\n white-space: pre-line;\n }\n\n .date {\n color: var(--neutral-foreground-hint);\n font-size: 12px;\n margin: 0 0 5px;\n }\n\n .notification-icon {\n margin-right: 6px;\n }\n\n .close-icon {\n cursor: pointer;\n margin-left: auto;\n color: #879ba6;\n }\n`;\n","import { html, ref, when } from '@microsoft/fast-element';\nimport { getPrefix } from '../utils';\nconst closeIcon = (prefix = 'zero') => html `<${prefix}-icon class=\"close-icon\" size=\"lg\" name=\"xmark\"></prefix-icon>`;\nexport const getPrefixedToast = (prefix = 'zero') => html `\n <div role=\"alert\" aria-live=\"polite\" class=\"toast ${(x) => x.deleteAnimation}\" ${ref('toast')}>\n <div class=\"content-wrapper\">\n <div part=\"top\" class=\"top\">\n ${when((x) => x.notificationIcon, html `\n <${prefix}-icon class=\"notification-icon\" name=\"${(x) => x.notificationIcon}\" size=\"lg\"></prefix-icon>\n `)}\n <slot name=\"top\"></slot>\n <div class=\"close-icon\" @click=${(x) => x.close()}>${closeIcon(prefix)}</div>\n </div>\n <div part=\"content\" class=\"content\">\n <slot name=\"content\"></slot>\n </div>\n <div part=\"date\" class=\"date\">\n <slot name=\"date\"></slot>\n </div>\n <div part=\"bottom\" class=\"bottom\">\n <slot name=\"bottom\"></slot>\n </div>\n </div>\n </div>\n`;\nexport const foundationToastTemplate = html `\n ${(x) => getPrefixedToast(getPrefix(x))}\n`;\n","import { __decorate } from \"tslib\";\nimport { attr, observable } from '@microsoft/fast-element';\nimport { FoundationElement } from '@microsoft/fast-foundation';\nimport { foundationToastStyles as styles } from './toast.styles';\nimport { foundationToastTemplate as template } from './toast.template';\n// explicitly declaring for extensibility\nexport const foundationToastShadowOptions = {\n mode: 'open',\n delegatesFocus: true,\n};\nexport const defaultToastConfig = {};\n/**\n * @tagname %%prefix%%-toast\n */\nexport class Toast extends FoundationElement {\n constructor() {\n super(...arguments);\n this.deleteAnimation = '';\n // eslint-disable-next-line @typescript-eslint/no-magic-numbers\n this.closeTimeout = 10000;\n this.autoClose = false;\n }\n connectedCallback() {\n super.connectedCallback();\n if (this.autoClose) {\n setTimeout(() => {\n this.deleteAnimation = 'toast-delete';\n this.toast.onanimationend = () => {\n this.remove();\n };\n }, this.closeTimeout);\n }\n }\n /**\n * Remove the toast from display.\n */\n close() {\n this.remove();\n }\n}\n__decorate([\n observable\n], Toast.prototype, \"deleteAnimation\", void 0);\n__decorate([\n attr({ attribute: 'close-timeout' })\n], Toast.prototype, \"closeTimeout\", void 0);\n__decorate([\n attr({ attribute: 'auto-close' })\n], Toast.prototype, \"autoClose\", void 0);\n__decorate([\n attr({ attribute: 'notification-icon' })\n], Toast.prototype, \"notificationIcon\", void 0);\n/**\n * The Foundation Toast\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-toast\\>\n */\nexport const foundationToast = Toast.compose(Object.assign({ baseName: 'toast', styles,\n template, shadowOptions: foundationToastShadowOptions }, defaultToastConfig));\n","import { toolbarTemplate as fastToolbarTemplate } from '@microsoft/fast-foundation';\nexport const foundationToolbarTemplate = (context, definition) => fastToolbarTemplate(context, definition);\n","import { toolbarStyles as fastToolbarStyles } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationToolbarStyles = (context, definition) => css `\n ${fastToolbarStyles(context, definition)}\n`;\n","import { Toolbar as FASTToolbar } from '@microsoft/fast-components';\nimport { foundationToolbarStyles as styles } from './toolbar.styles';\nimport { foundationToolbarTemplate as template } from './toolbar.template';\n/**\n * @tagname %%prefix%%-toolbar\n */\nexport class Toolbar extends FASTToolbar {\n}\n// explicitly declaring for extensibility\nexport const foundationToolbarShadowOptions = undefined;\nexport const defaultToolbarConfig = {};\n/**\n * The Foundation Toolbar\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-toolbar\\>\n */\nexport const foundationToolbar = Toolbar.compose(Object.assign({ baseName: 'toolbar', template,\n styles, shadowOptions: foundationToolbarShadowOptions }, defaultToolbarConfig));\n","import { tooltipTemplate as fastTooltipTemplate } from '@microsoft/fast-foundation';\nexport const foundationTooltipTemplate = (context, definition) => fastTooltipTemplate(context, definition);\n","import { tooltipStyles as fastTooltipStyles } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationTooltipStyles = (context, definition) => css `\n ${fastTooltipStyles(context, definition)}\n`;\n","import { Tooltip as FASTTooltip } from '@microsoft/fast-components';\nimport { foundationTooltipStyles as styles } from './tooltip.styles';\nimport { foundationTooltipTemplate as template } from './tooltip.template';\n/**\n * @tagname %%prefix%%-tooltip\n */\nexport class Tooltip extends FASTTooltip {\n}\n// explicitly declaring for extensibility\nexport const foundationTooltipShadowOptions = undefined;\nexport const defaultTooltipConfig = {};\n/**\n * The Foundation Tooltip\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-tooltip\\>\n */\nexport const foundationTooltip = Tooltip.compose(Object.assign({ baseName: 'tooltip', template,\n styles, shadowOptions: foundationTooltipShadowOptions }, defaultTooltipConfig));\n","import { treeItemTemplate as fastTreeItemTemplate } from '@microsoft/fast-foundation';\nexport const foundationTreeItemTemplate = (context, definition) => fastTreeItemTemplate(context, definition);\n","import { treeItemStyles as fastTreeItemStyles } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationTreeItemStyles = (context, definition) => css `\n ${fastTreeItemStyles(context, definition)}\n :host {\n --focus-stroke-width: 0;\n --tree-item-nested-width: 1em;\n }\n\n :host([selected])::after {\n height: calc(((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) * 1px);\n width: 5px;\n top: 0;\n border-radius: 0;\n }\n\n .positioning-region {\n height: calc(((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) * 1px);\n }\n`;\n","import { TreeItem as FASTTreeItem } from '@microsoft/fast-components';\nimport { foundationTreeItemStyles as styles } from './tree-item.styles';\nimport { foundationTreeItemTemplate as template } from './tree-item.template';\n/**\n * %%prefix%%-tree-item\n */\nexport class TreeItem extends FASTTreeItem {\n}\n// explicitly declaring for extensibility\nexport const foundationTreeItemShadowOptions = undefined;\nexport const defaultTreeItemConfig = {\n expandCollapseGlyph: `\n <svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\" class=\"expand-collapse-glyph\">\n <path d=\"M5.00001 12.3263C5.00124 12.5147 5.05566 12.699 5.15699 12.8578C5.25831 13.0167 5.40243 13.1437 5.57273 13.2242C5.74304 13.3047 5.9326 13.3354 6.11959 13.3128C6.30659 13.2902 6.4834 13.2152 6.62967 13.0965L10.8988 8.83532C11.0739 8.69473 11.2153 8.51658 11.3124 8.31402C11.4096 8.11146 11.46 7.88966 11.46 7.66499C11.46 7.44033 11.4096 7.21853 11.3124 7.01597C11.2153 6.81341 11.0739 6.63526 10.8988 6.49467L6.62967 2.22347C6.48274 2.10422 6.30501 2.02912 6.11712 2.00691C5.92923 1.9847 5.73889 2.01628 5.56823 2.09799C5.39757 2.17969 5.25358 2.30817 5.153 2.46849C5.05241 2.62882 4.99936 2.8144 5.00001 3.00369V12.3263Z\"></path>\n </svg>`,\n};\n/**\n * The Foundation Tree item\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-tree-item\\>\n */\nexport const foundationTreeItem = TreeItem.compose(Object.assign({ baseName: 'tree-item', template,\n styles, shadowOptions: foundationTreeItemShadowOptions }, defaultTreeItemConfig));\n","import { treeViewTemplate as fastTreeViewTemplate } from '@microsoft/fast-foundation';\nexport const foundationTreeViewTemplate = (context, definition) => fastTreeViewTemplate(context, definition);\n","import { treeViewStyles as fastTreeViewStyles } from '@microsoft/fast-components';\nimport { css } from '@microsoft/fast-element';\nexport const foundationTreeViewStyles = (context, definition) => css `\n ${fastTreeViewStyles(context, definition)}\n`;\n","import { TreeView as FASTTreeView } from '@microsoft/fast-foundation';\nimport { foundationTreeViewStyles as styles } from './tree-view.styles';\nimport { foundationTreeViewTemplate as template } from './tree-view.template';\n/**\n * @tagname %%prefix%%-tree-view\n */\nexport class TreeView extends FASTTreeView {\n}\n// explicitly declaring for extensibility\nexport const foundationTreeViewShadowOptions = undefined;\nexport const defaultTreeViewConfig = {};\n/**\n * The Foundation Tree View\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-tree-view\\>\n */\nexport const foundationTreeView = TreeView.compose(Object.assign({ baseName: 'tree-view', template,\n styles, shadowOptions: foundationTreeViewShadowOptions }, defaultTreeViewConfig));\n","import { css } from '@microsoft/fast-element';\nexport const foundationUrlInputStyles = (context, definition) => css `\n .container {\n position: relative;\n width: 100%;\n }\n\n .url-input {\n position: relative;\n width: 100%;\n }\n\n .url-input-link {\n position: absolute;\n left: 10px;\n top: 24px;\n max-width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n`;\n","import { html, when } from '@microsoft/fast-element';\nimport { getPrefix } from '../utils/dom';\nexport const getPrefixedUrlInput = (prefix) => html `\n <div class=\"container\" value=${(x) => x.value}>\n <${prefix}-text-field\n class=\"url-input\"\n required\n type=\"url\"\n :value=${(x) => (x.focused && !x.readOnly ? x.value : '')}\n @blur=${(x, c) => { var _a; return (!x.readOnly ? x.saveUrl((_a = c.event) === null || _a === void 0 ? void 0 : _a.target['value']) : ''); }}\n @focus=${(x) => x.focus()}\n :readOnly=${(x) => x.readOnly}\n ></${prefix}-text-field>\n ${when((x) => x.readOnly || !x.focused, html `\n <a class=\"url-input-link\" href=${(x) => x.value} target=\"_blank\">${(x) => x.value}</a>\n `)}\n </div>\n`;\nexport const foundationUrlInputTemplate = html `\n ${(x) => getPrefixedUrlInput(getPrefix(x))}\n`;\n","import { __decorate } from \"tslib\";\nimport { TextField as FASTTextField } from '@microsoft/fast-components';\nimport { observable } from '@microsoft/fast-element';\nimport { foundationUrlInputStyles as styles } from './url-input.styles';\nimport { foundationUrlInputTemplate as template } from './url-input.template';\nexport const foundationUrlInputShadowOptions = undefined;\nexport const defaultUrlInputConfig = {};\n/**\n * @tagname %%prefix%%-url-input\n */\nexport class UrlInput extends FASTTextField {\n constructor() {\n super(...arguments);\n this.value = '';\n }\n saveUrl(url) {\n this.value = url.startsWith('http') ? url : 'https://' + url;\n this.focused = false;\n }\n focus() {\n this.focused = true;\n }\n}\n__decorate([\n observable\n], UrlInput.prototype, \"value\", void 0);\n__decorate([\n observable\n], UrlInput.prototype, \"focused\", void 0);\nexport const foundationUrlInput = UrlInput.compose(Object.assign({ baseName: 'url-input', template,\n styles, shadowOptions: foundationUrlInputShadowOptions }, defaultUrlInputConfig));\n","// Genesis Foundation Zero\nimport { foundationAccordion } from './accordion';\nimport { foundationAccordionItem } from './accordion-item';\nimport { foundationActionsMenu } from './actions-menu';\nimport { foundationAnchor } from './anchor';\nimport { foundationAnchoredRegion } from './anchored-region';\nimport { foundationAvatar } from './avatar';\nimport { foundationBadge } from './badge';\nimport { foundationBanner } from './banner';\nimport { foundationBreadcrumb } from './breadcrumb';\nimport { foundationBreadcrumbItem } from './breadcrumb-item';\nimport { foundationButton } from './button';\nimport { foundationCalendar } from './calendar';\nimport { foundationCard } from './card';\nimport { foundationCategorizedMultiselect } from './categorized-multiselect';\nimport { foundationCheckbox } from './checkbox';\nimport { foundationCombobox } from './combobox';\nimport { foundationConnectionIndicator } from './connection-indicator';\nimport { foundationDataGrid } from './data-grid';\nimport { foundationDataGridCell } from './data-grid-cell';\nimport { foundationDataGridRow } from './data-grid-row';\nimport { foundationDatePicker } from './date-picker';\nimport { foundationDesignSystemProvider } from './design-system-provider';\nimport { foundationDialog } from './dialog';\nimport { foundationDisclosure } from './disclosure';\nimport { foundationDivider } from './divider';\nimport { foundationDropdownMenu } from './dropdown-menu';\nimport { foundationEnvironmentIndicator } from './environment-indicator';\nimport { foundationErrorBanner } from './error-banner';\nimport { foundationErrorBoundary } from './error-boundary';\nimport { foundationErrorDialog } from './error-dialog';\nimport { foundationFileReader } from './file-reader';\nimport { foundationFileUpload } from './file-upload';\nimport { foundationFilter } from './filter';\nimport { foundationFilterBar } from './filter-bar';\nimport { foundationFlexLayout } from './flex-layout';\nimport { foundationFlipper } from './flipper';\nimport { foundationFlyout } from './flyout';\nimport { foundationGridLayout } from './grid-layout';\nimport { foundationGridLayoutItem } from './grid-layout-item';\nimport { foundationHorizontalScroll } from './horizontal-scroll';\nimport { foundationIcon } from './icon';\nimport { foundationListbox } from './listbox';\nimport { foundationListboxOption } from './listbox-option';\nimport { foundationMenu } from './menu';\nimport { foundationMenuItem } from './menu-item';\nimport { foundationModal } from './modal';\nimport { foundationMultiselect } from './multiselect';\nimport { foundationNumberField } from './number-field';\nimport { foundationSystemHealthOverlay } from './overlays';\nimport { foundationPopper } from './popper';\nimport { foundationProgress } from './progress';\nimport { foundationProgressRing } from './progress-ring';\nimport { foundationRadio } from './radio';\nimport { foundationRadioGroup } from './radio-group';\nimport { foundationScheduler } from './scheduler';\nimport { foundationSchedulerCronBuilder } from './scheduler-cron-builder';\nimport { foundationSchedulerTimezone } from './scheduler-timezone';\nimport { foundationSearchBar, foundationSearchBarCombobox } from './search-bar';\nimport { foundationSectionNavigator } from './section-navigator';\nimport { foundationSegmentedControl } from './segmented-control';\nimport { foundationSegmentedItem } from './segmented-item';\nimport { foundationSelect } from './select';\nimport { foundationSkeleton } from './skeleton';\nimport { foundationSlider } from './slider';\nimport { foundationSliderLabel } from './slider-label';\nimport { foundationSnackbar } from './snackbar';\nimport { foundationStackingIcons } from './stacking-icons';\nimport { foundationStatusPill } from './status-pill';\nimport { foundationStepperTab } from './stepper-tab';\nimport { foundationStepperTabPanel } from './stepper-tab-panel';\nimport { foundationSwitch } from './switch';\nimport { foundationTab } from './tab';\nimport { foundationTabPanel } from './tab-panel';\nimport { foundationTabs } from './tabs';\nimport { foundationTextArea } from './text-area';\nimport { foundationTextField } from './text-field';\nimport { foundationToast } from './toast';\nimport { foundationToolbar } from './toolbar';\nimport { foundationTooltip } from './tooltip';\nimport { foundationTreeItem } from './tree-item';\nimport { foundationTreeView } from './tree-view';\nimport { foundationUrlInput } from './url-input';\nexport const baseComponents = {\n foundationAccordion,\n foundationAccordionItem,\n foundationActionsMenu,\n foundationAnchor,\n foundationAnchoredRegion,\n foundationAvatar,\n foundationBadge,\n foundationBanner,\n foundationBreadcrumb,\n foundationBreadcrumbItem,\n foundationButton,\n foundationCalendar,\n foundationCard,\n foundationCategorizedMultiselect,\n foundationCheckbox,\n foundationCombobox,\n foundationConnectionIndicator,\n foundationDataGrid,\n foundationDataGridCell,\n foundationDataGridRow,\n foundationDatePicker,\n foundationDesignSystemProvider,\n foundationDialog,\n foundationDisclosure,\n foundationDivider,\n foundationDropdownMenu,\n foundationErrorBanner,\n foundationErrorBoundary,\n foundationErrorDialog,\n foundationFileReader,\n foundationFileUpload,\n foundationFilter,\n foundationFilterBar,\n foundationFlexLayout,\n foundationFlipper,\n foundationFlyout,\n foundationGridLayout,\n foundationGridLayoutItem,\n foundationHorizontalScroll,\n foundationIcon,\n foundationListbox,\n foundationListboxOption,\n foundationMenu,\n foundationMenuItem,\n foundationModal,\n foundationMultiselect,\n foundationNumberField,\n foundationPopper,\n foundationProgress,\n foundationProgressRing,\n foundationRadio,\n foundationRadioGroup,\n foundationScheduler,\n foundationSchedulerCronBuilder,\n foundationSchedulerTimezone,\n foundationSearchBar,\n foundationSearchBarCombobox,\n foundationSegmentedControl,\n foundationSegmentedItem,\n foundationSelect,\n foundationSkeleton,\n foundationSlider,\n foundationSliderLabel,\n foundationSnackbar,\n foundationStackingIcons,\n foundationStatusPill,\n foundationEnvironmentIndicator,\n foundationStepperTab,\n foundationStepperTabPanel,\n foundationSwitch,\n foundationSystemHealthOverlay,\n foundationTab,\n foundationTabPanel,\n foundationTabs,\n foundationTextArea,\n foundationTextField,\n foundationToast,\n foundationToolbar,\n foundationTooltip,\n foundationTreeItem,\n foundationTreeView,\n foundationUrlInput,\n foundationSectionNavigator,\n register(container, ...rest) {\n if (!container) {\n // preserve backward compatibility with code that loops through\n // the values of this object and calls them as funcs with no args\n return;\n }\n for (const key in this) {\n if (key === 'register') {\n continue;\n }\n this[key]().register(container, ...rest);\n }\n },\n};\n","import { __awaiter, __decorate } from \"tslib\";\nimport { customElement } from '@microsoft/fast-element';\nimport { BaseDatasource, logger } from '../utils';\nlet DataGridDatasource = class DataGridDatasource extends BaseDatasource {\n constructor() {\n super(...arguments);\n this.isSnapshot = true;\n }\n connectedCallback() {\n const _super = Object.create(null, {\n connectedCallback: { get: () => super.connectedCallback }\n });\n return __awaiter(this, void 0, void 0, function* () {\n _super.connectedCallback.call(this);\n this.dataGrid = this.parentElement;\n if (this.dataGrid && this.resourceName && this.connect.isConnected) {\n this.fetchGenesisData();\n }\n });\n }\n getColumnDefs(fieldsMetadata) {\n const colDefsFromGenesisData = fieldsMetadata === null || fieldsMetadata === void 0 ? void 0 : fieldsMetadata.flatMap((field) => {\n if (this.fields && !this.fields.includes(field.name)) {\n return [];\n }\n return { columnDataKey: field.name };\n });\n return colDefsFromGenesisData;\n }\n clearData() {\n logger.debug('clearData - Method not implemented.');\n }\n syncComponentData(snapshotData) {\n const rowData = snapshotData !== null && snapshotData !== void 0 ? snapshotData : Array.from(this.rowsSyncedWithStream.values());\n const columns = this.getColumnDefs(this.datasource.fieldMetadata);\n this.dataGrid.columnDefinitions = columns;\n this.dataGrid.rowsData = rowData;\n }\n handleStreamInserts(insertedRows) {\n logger.debug('handleStreamInserts - Method not implemented.');\n }\n handleStreamDeletes(deletedRows) {\n logger.debug('handleStreamDeletes - Method not implemented.');\n }\n handleStreamUpdates(updatedRows) {\n logger.debug('handleStreamUpdates - Method not implemented.');\n }\n};\nDataGridDatasource = __decorate([\n customElement({\n name: 'data-grid-datasource',\n })\n], DataGridDatasource);\nexport { DataGridDatasource };\n","/**\n * Basic `AND` and `OR` logical combinators which can be used in the model config.\n * @beta\n * */\nexport const BASE_LOGICAL_COMBINATORS = [\n {\n type: 'AND',\n maxRules: 'many',\n },\n {\n type: 'OR',\n maxRules: 'many',\n },\n];\n/**\n * A set of boolean logic combinators which configure the expression builder to produce boolean expressions.\n * @beta\n * */\nexport const LOGICAL_COMBINATORS = [\n ...BASE_LOGICAL_COMBINATORS,\n {\n type: 'NOT',\n maxRules: 2,\n },\n {\n type: 'NAND',\n maxRules: 'many',\n },\n {\n type: 'NOR',\n maxRules: 'many',\n },\n {\n type: 'XOR',\n maxRules: 2,\n },\n];\n/**\n * A combinator which has a null action.\n *\n * If configured as the only combinator then it configures the expression builder to only create a single rule.\n * @beta\n * */\nexport const NULL_COMBINATOR = {\n type: 'NULL',\n maxRules: 1,\n invisible: true,\n};\n","const enumTypes = ['enum'];\nconst numericTypes = ['int', 'short', 'long', 'bigdecimal', 'double'];\nconst stringTypes = ['string'];\nconst dateTypes = ['date', 'date-time'];\nconst booleanTypes = ['boolean'];\nconst allTypes = [\n ...enumTypes,\n ...numericTypes,\n ...stringTypes,\n ...dateTypes,\n ...booleanTypes,\n];\n/** @alpha **/\nexport const BASE_OPERATORS = [\n {\n type: 'equal',\n nbInputs: 1,\n applyTo: allTypes,\n optgroup: 'Equality',\n },\n {\n type: 'not_equal',\n nbInputs: 1,\n applyTo: allTypes,\n optgroup: 'Equality',\n },\n {\n type: 'greater',\n nbInputs: 1,\n applyTo: [...numericTypes, ...dateTypes],\n optgroup: 'Comparison',\n },\n {\n type: 'less',\n nbInputs: 1,\n applyTo: [...numericTypes, ...dateTypes],\n optgroup: 'Comparison',\n },\n {\n type: 'contains',\n nbInputs: 1,\n applyTo: ['string'],\n optgroup: 'String',\n },\n {\n type: 'starts_with',\n nbInputs: 1,\n applyTo: ['string'],\n optgroup: 'String',\n },\n {\n type: 'ends_with',\n nbInputs: 1,\n applyTo: ['string'],\n optgroup: 'String',\n },\n {\n type: 'one_of',\n nbInputs: 'many',\n applyTo: [...allTypes].filter((t) => t !== 'boolean'),\n },\n {\n type: 'not_any_of',\n nbInputs: 'many',\n applyTo: [...allTypes].filter((t) => t !== 'boolean'),\n },\n {\n type: 'within_inclusive',\n nbInputs: 2,\n applyTo: [...numericTypes, ...dateTypes],\n optgroup: 'Range',\n },\n {\n type: 'within_exclusive',\n nbInputs: 2,\n applyTo: [...numericTypes, ...dateTypes],\n optgroup: 'Range',\n },\n {\n type: 'is_null',\n nbInputs: 0,\n applyTo: [...allTypes],\n optgroup: 'Null',\n },\n {\n type: 'not_null',\n nbInputs: 0,\n applyTo: [...allTypes],\n optgroup: 'Null',\n },\n];\n","import rfdc from 'rfdc';\nconst deepClone = rfdc(); // create the fast deep copy function\n/**\n * Finds a group within a model and applies a function to create a new children\n * @param model The root group to start searching from\n * @param groupId The Group ID to find\n * @param fn The function to apply to the children of the found group. A *new* object must be created and returned\n * @returns A *new* root `Group` object which the function has been applied to. If the group isn't found an error is thrown\n */\nexport function findOperateOnGroup(model, groupId, fn) {\n function findAndUpdate(node) {\n const newNode = deepClone(node);\n if (newNode.groupId === groupId) {\n newNode.children = fn(newNode.children);\n return newNode;\n }\n const updatedChildren = [];\n let found = false;\n for (const child of newNode.children) {\n if ('children' in child) {\n const updatedGroup = findAndUpdate(child);\n if (updatedGroup) {\n updatedChildren.push(updatedGroup);\n found = true;\n }\n else {\n updatedChildren.push(child);\n }\n }\n else {\n updatedChildren.push(child);\n }\n }\n newNode.children = updatedChildren;\n // Only return the modified node if a group was found and modified within it\n return found ? newNode : null;\n }\n const newModel = findAndUpdate(model);\n if (!newModel)\n throw new Error(`Unable to find group with groupId ${groupId}`);\n return newModel;\n}\nfunction findNode(model, targetId, predicate) {\n function find(node) {\n for (const child of node.children) {\n if (predicate(child, targetId)) {\n return node; // Found\n }\n if ('children' in child) {\n const found = find(child);\n if (found) {\n return found;\n }\n }\n }\n return null;\n }\n return find(model);\n}\n// Helper function to find the parent\nfunction findParentGroupOfGroup(model, groupId) {\n const predicate = (node, targetId) => {\n return 'children' in node && node.groupId === targetId;\n };\n const res = findNode(model, groupId, predicate);\n if (!res)\n throw new Error(`No parent group found for group with ID ${groupId}`);\n return res;\n}\n// Helper function to find the parent of a Rule\nfunction findParentGroupOfRule(model, ruleId) {\n const predicate = (node, targetId) => {\n return 'ruleId' in node && node.ruleId === targetId;\n };\n const res = findNode(model, ruleId, predicate);\n if (!res)\n throw new Error(`No parent group found for rule with ID ${ruleId}`);\n return res;\n}\nexport function addGroupOrRule(model, parentGroupId, newItem) {\n const addGroupFn = (children) => {\n return [...children, newItem];\n };\n return findOperateOnGroup(model, parentGroupId, addGroupFn);\n}\nexport function deleteGroup(model, groupIdToDelete) {\n const deleteGroupFn = (children) => children.filter((child) => {\n if ('groupId' in child) {\n return child.groupId !== groupIdToDelete;\n }\n return true; // Keep rules\n });\n const parentGroup = findParentGroupOfGroup(model, groupIdToDelete);\n return findOperateOnGroup(model, parentGroup.groupId, deleteGroupFn);\n}\nexport function deleteRule(model, ruleIdToDelete) {\n const deleteRuleFn = (children) => children.filter((child) => {\n if ('ruleId' in child) {\n return child.ruleId !== ruleIdToDelete;\n }\n return true; // Keep Groups\n });\n const parentGroup = findParentGroupOfRule(model, ruleIdToDelete);\n return findOperateOnGroup(model, parentGroup.groupId, deleteRuleFn);\n}\nexport const ROOT_GROUP = 'group-root';\nexport function updateGroupData(model, groupIdToUpdate, newData) {\n if (groupIdToUpdate === ROOT_GROUP) {\n return Object.assign(Object.assign({}, model), newData);\n }\n const updateGroupFn = (children) => children.map((child) => {\n if ('groupId' in child && child.groupId === groupIdToUpdate) {\n return Object.assign(Object.assign({}, child), newData);\n }\n return child;\n });\n const parentGroup = findParentGroupOfGroup(model, groupIdToUpdate);\n return findOperateOnGroup(model, parentGroup.groupId, updateGroupFn);\n}\nexport function updateRuleData(model, ruleIdToUpdate, newData) {\n const updateRuleFn = (children) => children.map((child) => {\n if ('ruleId' in child && child.ruleId === ruleIdToUpdate) {\n return Object.assign(Object.assign({}, child), newData);\n }\n return child;\n });\n const parentGroup = findParentGroupOfRule(model, ruleIdToUpdate);\n return findOperateOnGroup(model, parentGroup.groupId, updateRuleFn);\n}\n","import { ROOT_GROUP } from '../main/expression-builder.helpers';\n/**\n * Converts a Group to a ModelGroup (adds required metadata)\n */\nexport function groupToModelGroup(group, provider) {\n const mapper = (child, level) => 'children' in child ? _groupToModelGroup(child, level) : _ruleToModelRule(child);\n function _groupToModelGroup(_group, level) {\n return Object.assign(Object.assign({}, _group), { level, config: provider.getConfig(), groupId: provider.getGroupId(), children: _group.children.map((child) => mapper(child, level + 1)) });\n }\n function _ruleToModelRule(rule) {\n return Object.assign(Object.assign({}, rule), { ruleId: provider.getRuleId(), config: provider.getConfig() });\n }\n return Object.assign(Object.assign({}, group), { config: provider.getConfig(), level: 1, groupId: ROOT_GROUP, children: group.children.map((child) => mapper(child, 2)) });\n}\n/**\n * Converts a ModelGroup (internal data structure) to a public Group structure.\n * This function recursively processes the rules within the group.\n *\n * @param modelGroup The internal ModelGroup to convert.\n * @returns A public Group object.\n */\nexport function modelGroupToGroup(modelGroup) {\n const children = modelGroup.children.map((child) => {\n if ('children' in child) {\n // It's a nested group, recursively convert it\n return modelGroupToGroup(child);\n }\n else {\n // It's a rule, convert it\n return modelRuleToRule(child);\n }\n });\n return {\n combinator: modelGroup.combinator,\n children: children,\n };\n}\n/**\n * Converts a ModelRule (internal data structure) to a public Rule structure.\n *\n * @param modelRule The internal ModelRule to convert.\n * @returns A public Rule object.\n */\nexport function modelRuleToRule(modelRule) {\n const { operator, field, value } = modelRule;\n return {\n operator,\n field,\n value,\n };\n}\n","/**\n * Gets the string representation from a `Date` which is the format a `date` input uses.\n * `yyyy-mm-dd`.\n * Uses UTC methods to ensure consistent output regardless of timezone.\n *\n * Used to convert a javascript date object into the required string format expected by the expression builder.\n * @beta\n */\nexport const formatDateString = (date) => {\n const year = date.getUTCFullYear();\n const month = String(date.getUTCMonth() + 1).padStart(2, '0'); // Months are 0-indexed\n const day = String(date.getUTCDate()).padStart(2, '0');\n return `${year}-${month}-${day}`;\n};\n/**\n * Gets the string representation from a `Date` which is the format a `datetime-local` input uses.\n * `yyyy-mm-ddThh:mm:ss`.\n * Uses UTC methods to ensure consistent output regardless of timezone.\n *\n * Used to convert a javascript date object into the required string format expected by the expression builder.\n * @beta\n */\nexport const formatDateTimeString = (date) => {\n const datePart = formatDateString(date);\n const hours = String(date.getUTCHours()).padStart(2, '0');\n const minutes = String(date.getUTCMinutes()).padStart(2, '0');\n const seconds = String(date.getUTCSeconds()).padStart(2, '0');\n return `${datePart}T${hours}:${minutes}:${seconds}`;\n};\n","export const getFieldInput = (context) => { var _a, _b, _c; return (_c = (_b = (_a = context.operator) === null || _a === void 0 ? void 0 : _a.valueType) === null || _b === void 0 ? void 0 : _b.input) !== null && _c !== void 0 ? _c : context.field.input; };\nexport const getFieldType = (context) => { var _a, _b, _c; return (_c = (_b = (_a = context.operator) === null || _a === void 0 ? void 0 : _a.valueType) === null || _b === void 0 ? void 0 : _b.type) !== null && _c !== void 0 ? _c : context.field.type; };\nexport const processOptGroups = (xs) => {\n const grouped = {};\n const ungrouped = [];\n // Helper function to sort items consistently\n const sortItems = (items) => {\n return [...items].sort((a, b) => {\n if ('fieldId' in a && 'fieldId' in b) {\n return a.fieldId.localeCompare(b.fieldId);\n }\n else if ('type' in a && 'type' in b) {\n return a.type.localeCompare(b.type);\n }\n return 0;\n });\n };\n xs.forEach((op) => {\n if (op.optgroup) {\n const groupName = op.optgroup;\n if (!grouped[groupName]) {\n grouped[groupName] = [];\n }\n grouped[groupName].push(op);\n }\n else {\n ungrouped.push(op);\n }\n });\n const result = [];\n // Sort group names and each group's contents\n Object.keys(grouped)\n .sort()\n .forEach((groupName) => {\n result.push({\n optgroup: groupName,\n xs: sortItems(grouped[groupName]),\n });\n });\n return [...result, ...sortItems(ungrouped)];\n};\n/**\n * Utility function to add custom styles to a web component's shadow root\n *\n * @param component The web component instance\n * @param styles The styles configuration object\n * @param styleKey The key in styles.customStyles to use for custom styles\n */\nexport function applyCustomStyles(component, styles, styleKey) {\n if (!component.shadowRoot || !(styles === null || styles === void 0 ? void 0 : styles.customStyles))\n return;\n const customStyles = styles.customStyles[styleKey];\n if (customStyles) {\n const styleElement = document.createElement('style');\n styleElement.textContent = customStyles;\n // Insert the style element at the beginning of the shadow DOM\n if (component.shadowRoot.firstChild) {\n component.shadowRoot.insertBefore(styleElement, component.shadowRoot.firstChild);\n }\n else {\n component.shadowRoot.appendChild(styleElement);\n }\n }\n}\n","export var Events;\n(function (Events) {\n Events[\"AddGroup\"] = \"add-group\";\n Events[\"DelGroup\"] = \"del-group\";\n Events[\"AddRule\"] = \"add-rule\";\n Events[\"DelRule\"] = \"del-rule\";\n Events[\"UpdateGroup\"] = \"update-group\";\n Events[\"UpdateRule\"] = \"update-rule\";\n Events[\"FieldSelected\"] = \"field-selected\";\n Events[\"OperatorSelected\"] = \"operator-selected\";\n Events[\"ValueUpdated\"] = \"value-updated\";\n Events[\"RemoveVarArg\"] = \"remove-variadic-operand\";\n})(Events || (Events = {}));\n","import { css } from '@genesislcap/web-core';\n/** @alpha **/\nexport const styles = css `\n :host {\n --item-vertical-spacing: 4px;\n --item-border-radius: 5px;\n --group-background-color: rgb(250 240 210 / 50%);\n --group-border-color: #dcc896;\n --group-border: 1px solid var(--group-border-color);\n --group-padding: 10px;\n --rule-background-color: rgb(255 255 255 / 90%);\n --rule-border-color: #eee;\n --rule-border: 1px solid var(--rule-border-color);\n --rule-padding: 5px;\n --rule-value-separator: 1px solid #ddd;\n --error-icon-color: #f00;\n --error-border-color: #f99;\n --error-background-color: #fdd;\n --ticks-width: 2px;\n --ticks-color: #ccc;\n }\n\n p.test {\n color: black;\n }\n\n .query-builder {\n font-family: sans-serif;\n }\n\n .rules-group-container {\n position: relative;\n margin: var(--item-vertical-spacing) 0;\n border-radius: var(--item-border-radius);\n padding: var(--group-padding);\n border: var(--group-border);\n background: var(--group-background-color);\n }\n\n .rules-group-header {\n margin-bottom: var(--group-padding);\n }\n\n .group-conditions {\n display: inline-block;\n }\n\n .group-conditions .btn {\n padding: 0.25rem 0.5rem;\n font-size: 0.875rem;\n line-height: 1.5;\n border-radius: 0.2rem;\n border: 1px solid #007bff;\n color: #007bff;\n background-color: transparent;\n cursor: pointer;\n }\n\n .group-conditions .btn:hover {\n background-color: #007bff;\n color: #fff;\n }\n\n .group-conditions .btn.active {\n background-color: #007bff;\n color: #fff;\n }\n\n .group-actions {\n display: inline-block;\n float: right;\n }\n\n .rules-list {\n list-style: none;\n padding: 0 0 0 20px; /* Adjusted ticks position */\n margin: 0;\n }\n\n .rule-container {\n position: relative;\n margin: var(--item-vertical-spacing) 0;\n border-radius: var(--item-border-radius);\n padding: var(--rule-padding);\n border: var(--rule-border);\n background: var(--rule-background-color);\n }\n\n .rule-header {\n margin-bottom: 5px;\n }\n\n .rule-actions {\n display: inline-block;\n float: right;\n }\n\n .rule-field-container,\n .rule-operator-container,\n .rule-value-container {\n display: inline-block;\n margin: 0 5px 0 0;\n vertical-align: middle;\n }\n\n .rule-value-container {\n border-left: var(--rule-value-separator);\n padding-left: 5px;\n }\n\n .rule-value-container label {\n margin-bottom: 0;\n font-weight: normal;\n }\n\n .rule-value-container label.block {\n display: block;\n }\n\n .error-container {\n display: none;\n cursor: help;\n color: var(--error-icon-color);\n margin-left: 5px;\n }\n\n .rule-container.has-error,\n .rules-group-container.has-error {\n background-color: var(--error-background-color);\n border-color: var(--error-border-color);\n }\n\n .rule-container.has-error .error-container,\n .rules-group-container.has-error .error-container {\n display: inline-block !important;\n }\n\n /* Ticks */\n .rules-list > * {\n position: relative;\n }\n\n .rules-list > *::before,\n .rules-list > *::after {\n content: '';\n position: absolute;\n left: -10px; /* Adjusted ticks position */\n width: 10px; /* Adjusted ticks position */\n border-color: var(--ticks-color);\n border-style: solid;\n }\n\n .rules-list > *::before {\n top: -2px; /* Adjusted ticks position */\n height: calc(50% + var(--item-vertical-spacing));\n border-width: 0 0 var(--ticks-width) var(--ticks-width);\n }\n\n .rules-list > *::after {\n top: 50%;\n border-width: 0 0 0 var(--ticks-width);\n height: 50%;\n }\n\n .rules-list > *:first-child::before {\n top: calc(-1 * var(--group-padding) - var(--ticks-width));\n height: calc(50% + var(--group-padding) + var(--item-vertical-spacing));\n }\n\n .rules-list > *:last-child::before {\n border-radius: 0 0 0 calc(2 * var(--ticks-width));\n }\n\n .rules-list > *:last-child::after {\n display: none;\n }\n`;\n","import { css } from '@genesislcap/web-core';\nexport const styles = css `\n .rules-group-container {\n border: 1px solid #ccc;\n margin-bottom: 10px;\n padding: 10px;\n }\n\n .rules-group-header {\n margin-bottom: 5px;\n }\n\n .btn-group {\n margin-right: 5px;\n }\n\n .btn {\n padding: 0.25rem 0.5rem;\n font-size: 0.875rem;\n line-height: 1.5;\n border-radius: 0.2rem;\n cursor: pointer;\n }\n\n .btn-success {\n color: #fff;\n background-color: #28a745;\n border-color: #28a745;\n }\n\n .btn-danger {\n color: #fff;\n background-color: #dc3545;\n border-color: #dc3545;\n }\n\n .radio-group-container {\n display: flex;\n }\n\n .rules-list {\n list-style: none;\n padding-left: 0;\n }\n`;\n","/**\n * Directive that allows supplying an \"else\" template to the traditional {@link https://www.fast.design/docs/api/fast-element.when/#when-function} directive\n *\n * @param binding - The condition to test for rendering.\n * @param trueTemplateOrTemplateBinding - The template or a binding that gets the template to render when the condition is true.\n * @param falseTemplateOrTemplateBinding - The template or a binding that gets the template to render when the condition is false.\n * @public\n */\nexport function whenElse(binding, trueTemplateOrTemplateBinding, falseTemplateOrTemplateBinding) {\n const getTemplate = (template) => typeof template === 'function' ? template : () => template;\n const trueTemplate = getTemplate(trueTemplateOrTemplateBinding);\n const falseTemplate = getTemplate(falseTemplateOrTemplateBinding);\n return (source, context) => binding(source, context) ? trueTemplate(source, context) : falseTemplate(source, context);\n}\n","import { html, repeat, when, whenElse } from '@genesislcap/web-core';\nconst combinatorsTemplate = html `\n ${(context) => {\n var _a, _b;\n const maybeRadioBlock = (_b = (_a = context.styles) === null || _a === void 0 ? void 0 : _a.customElements) === null || _b === void 0 ? void 0 : _b.radio;\n const { radioTag, radioGroupTag } = maybeRadioBlock\n ? { radioTag: maybeRadioBlock.input, radioGroupTag: maybeRadioBlock.group }\n : { radioTag: 'input', radioGroupTag: 'div' };\n return html `\n <div class=\"btn-group group-conditions\">\n ${whenElse((_) => radioTag !== 'input', html `\n <${radioGroupTag}\n class=\"radio-group-container\"\n name=\"combinator\"\n @change=\"${(x, c) => x.handleCombinatorChange(c.event)}\"\n value=\"${(x) => { var _a, _b; return (_b = (_a = x.model) === null || _a === void 0 ? void 0 : _a.combinator) === null || _b === void 0 ? void 0 : _b.type; }}\"\n >\n ${repeat((x) => { var _a, _b; return (_b = (_a = x.config) === null || _a === void 0 ? void 0 : _a.combinators) !== null && _b !== void 0 ? _b : []; }, html `\n ${when((x) => !x.invisible, html `\n <${radioTag}\n value=\"${(x) => x.type}\"\n ?checked=${(x, c) => { var _a, _b; return ((_b = (_a = c.parent.model) === null || _a === void 0 ? void 0 : _a.combinator) === null || _b === void 0 ? void 0 : _b.type) === x.type; }}\n >\n ${(x) => { var _a; return (_a = x.label) !== null && _a !== void 0 ? _a : x.type; }}\n </${radioTag}>\n `)}\n `)}\n </${radioGroupTag}>\n `, html `\n <div class=\"radio-group-container\">\n ${repeat((x) => x.config.combinators, html `\n ${when((x) => !x.invisible, html `\n <label class=\"btn btn-sm btn-primary\">\n <input\n type=\"radio\"\n name=\"combinator\"\n value=\"${(x) => x.type}\"\n @change=\"${(_, c) => c.parent.handleCombinatorChange(c.event)}\"\n ?checked=${(x, c) => { var _a, _b; return ((_b = (_a = c.parent.model) === null || _a === void 0 ? void 0 : _a.combinator) === null || _b === void 0 ? void 0 : _b.type) === x.type; }}\n />\n ${(x) => { var _a; return (_a = x.label) !== null && _a !== void 0 ? _a : x.type; }}\n </label>\n `)}\n `)}\n </div>\n `)}\n </div>\n `;\n}}\n`;\nconst controlButtonsTemplate = html `\n ${(context) => {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n const buttonTag = ((_b = (_a = context.styles) === null || _a === void 0 ? void 0 : _a.customElements) === null || _b === void 0 ? void 0 : _b.button) || 'button';\n const ruleTooltip = `Add a new condition with field (e.g. CURRENCY), operator (e.g. EQUALS), and value (e.g. GBP) that will be combined with other conditions in this group using the selected logic (e.g. ${(_e = (_d = (_c = context.config) === null || _c === void 0 ? void 0 : _c.combinators) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.type})`;\n const groupTooltip = `Add a new nested sub-group to create more complex expressions, joined by combinatorial logic (e.g. ${(_h = (_g = (_f = context.config) === null || _f === void 0 ? void 0 : _f.combinators) === null || _g === void 0 ? void 0 : _g[0]) === null || _h === void 0 ? void 0 : _h.type})`;\n return html `\n <div class=\"btn-group float-end group-actions\">\n ${when((x) => x.allowAddRule, html `\n <${buttonTag}\n type=\"button\"\n class=\"btn btn-sm btn-success\"\n data-add=\"rule\"\n @click=\"${(x, c) => x.dispatchAddRule(c.event)}\"\n title=${(_) => ruleTooltip}\n >\n Add Rule\n </${buttonTag}>\n `)}\n ${when((x) => x.allowAddGroup, html `\n <${buttonTag}\n type=\"button\"\n class=\"btn btn-sm btn-success\"\n data-add=\"group\"\n @click=\"${(x, c) => x.dispatchAddGroup(c.event)}\"\n title=\"${(_) => groupTooltip}\"\n >\n Add Group\n </${buttonTag}>\n `)}\n ${when((x) => typeof x.index === 'number', html `\n <${buttonTag}\n type=\"button\"\n class=\"btn btn-sm btn-danger\"\n data-delete=\"group\"\n @click=\"${(x, c) => x.dispatchDeleteGroup(c.event)}\"\n >\n Delete Group\n </${buttonTag}>\n `)}\n </div>\n `;\n}}\n`;\nexport const template = html `\n <div class=\"rules-group-container\">\n <div class=\"rules-group-header\">${controlButtonsTemplate} ${combinatorsTemplate}</div>\n <div class=\"rules-group-body\">\n <div class=\"rules-list\">\n ${repeat((x) => { var _a, _b; return (_b = (_a = x.model) === null || _a === void 0 ? void 0 : _a.children) !== null && _b !== void 0 ? _b : []; }, html `\n ${whenElse((x) => 'children' in x, html `\n <expression-group\n :config=${(_, c) => c.parent.config}\n :styles=${(_, c) => c.parent.styles}\n :model=${(x) => x}\n :index=${(_, c) => c.index}\n ></expression-group>\n `, html `\n <expression-rule\n :config=${(_, c) => c.parent.config}\n :styles=${(_, c) => c.parent.styles}\n :model=${(x) => x}\n :index=${(_, c) => c.index}\n ></expression-rule>\n `)}\n ${when((_, loopCtx) => !loopCtx.isLast, html `\n <p class=\"group-combinator-link\">\n ${(_, innerCtx) => innerCtx.parent.model.combinator.type}\n </p>\n `)}\n `, { recycle: false, positioning: true })}\n </div>\n </div>\n </div>\n`;\n","import { __decorate } from \"tslib\";\nimport { customElement, GenesisElement, observable, volatile } from '@genesislcap/web-core';\nimport { applyCustomStyles } from '../../utils/misc';\nimport { Events } from '../events';\nimport { styles } from './expression-group.styles';\nimport { template } from './expression-group.template';\nlet ExpressionGroup = class ExpressionGroup extends GenesisElement {\n connectedCallback() {\n super.connectedCallback();\n applyCustomStyles(this, this.styles, 'group');\n }\n get allowAddRule() {\n if (!this.model)\n return false;\n if (this.model.combinator.maxRules === 'many')\n return true;\n return this.model.children.length < this.model.combinator.maxRules;\n }\n get allowAddGroup() {\n var _a, _b;\n if (!this.model)\n return false;\n if (this.model.combinator.maxRules === 1)\n return false;\n if (this.model.combinator.maxRules === 2 && this.model.children.length >= 2)\n return false;\n if (!((_a = this.config) === null || _a === void 0 ? void 0 : _a.maxNesting) || ((_b = this.config) === null || _b === void 0 ? void 0 : _b.maxNesting) < 1)\n return true;\n return this.config.maxNesting > this.model.level;\n }\n dispatchAddRule(event) {\n event.stopPropagation();\n if (!this.allowAddRule)\n throw new Error('Cannot add extra rules to group');\n const detail = {\n parentGroupId: this.model.groupId,\n };\n this.dispatchEvent(new CustomEvent(Events.AddRule, { detail, bubbles: true, composed: true }));\n }\n dispatchAddGroup(event) {\n event.stopPropagation();\n if (!this.allowAddGroup)\n throw new Error('Cannot add further nested groups');\n const detail = {\n parentGroupId: this.model.groupId,\n newGroup: {\n level: this.model.level + 1,\n },\n };\n this.dispatchEvent(new CustomEvent(Events.AddGroup, { detail, bubbles: true, composed: true }));\n }\n dispatchDeleteGroup(event) {\n event.stopPropagation();\n const detail = {\n groupId: this.model.groupId,\n };\n this.dispatchEvent(new CustomEvent(Events.DelGroup, { detail, bubbles: true, composed: true }));\n }\n handleCombinatorChange(event) {\n event.stopPropagation();\n const target = event.target;\n const value = target.value;\n this.updateCombinator(value);\n }\n handleCustomCombinatorChange(event) {\n var _a;\n event.stopPropagation();\n if (!((_a = this.model) === null || _a === void 0 ? void 0 : _a.groupId) || !event.target)\n return; // can happen when the radio is first initialised\n const target = event.target;\n const value = target.getAttribute('value');\n if (!value) {\n throw new Error('No value found in the custom radio group event target');\n }\n this.updateCombinator(value);\n }\n updateCombinator(value) {\n var _a, _b;\n const combinator = this.config.combinators.find(({ type }) => type === value);\n if (!combinator) {\n throw new Error(`Cannot find selected combinator ${value}`);\n }\n // Can happen when web component is initialised\n if (((_b = (_a = this.model) === null || _a === void 0 ? void 0 : _a.combinator) === null || _b === void 0 ? void 0 : _b.type) === combinator.type) {\n return;\n }\n this.dispatchGroupDataUpdated(combinator);\n }\n dispatchGroupDataUpdated(combinator) {\n const detail = {\n groupId: this.model.groupId,\n newData: {\n combinator,\n },\n };\n this.dispatchEvent(new CustomEvent(Events.UpdateGroup, { detail, bubbles: true, composed: true }));\n }\n};\n__decorate([\n observable\n], ExpressionGroup.prototype, \"config\", void 0);\n__decorate([\n observable\n], ExpressionGroup.prototype, \"styles\", void 0);\n__decorate([\n observable\n], ExpressionGroup.prototype, \"model\", void 0);\n__decorate([\n observable\n], ExpressionGroup.prototype, \"index\", void 0);\n__decorate([\n volatile\n], ExpressionGroup.prototype, \"allowAddRule\", null);\n__decorate([\n volatile\n], ExpressionGroup.prototype, \"allowAddGroup\", null);\nExpressionGroup = __decorate([\n customElement({\n name: 'expression-group',\n template,\n styles: styles,\n shadowOptions: {\n delegatesFocus: true, // Ensure the element can be focused\n },\n })\n], ExpressionGroup);\nexport { ExpressionGroup };\n","import { html, when } from '@genesislcap/web-core';\nimport { ExpressionGroup } from './expression-group/expression-group';\nExpressionGroup;\n/** @alpha **/\nexport const template = html `\n <div class=\"query-builder\">\n ${when((x) => x.model !== null, html `\n <expression-group\n :model=${(x) => x.model}\n :config=${(x) => x.config}\n :styles=${(x) => x.styles}\n ></expression-group>\n `)}\n </div>\n`;\n","import { html, repeat } from '@genesislcap/web-core';\nexport const template = html `\n ${(context) => {\n var _a, _b, _c, _d;\n const selectTag = ((_b = (_a = context.styles) === null || _a === void 0 ? void 0 : _a.customElements) === null || _b === void 0 ? void 0 : _b.select) || 'select';\n const optionTag = ((_d = (_c = context.styles) === null || _c === void 0 ? void 0 : _c.customElements) === null || _d === void 0 ? void 0 : _d.option) || 'option';\n const optgroupTag = 'optgroup'; // Not supporting custom optgroup for now\n return html `\n <${selectTag}\n class=\"form-select\"\n @change=${(x, c) => x.dispatchFieldsChanged(c.event)}\n value=${(x) => { var _a; return (_a = x.field) === null || _a === void 0 ? void 0 : _a.fieldId; }}\n >\n <${optionTag} value=\"\">Select a field</${optionTag}>\n ${repeat((x) => x.groupedFieldss, html `\n ${(groupOrFields) => {\n if ('xs' in groupOrFields) {\n return html `\n <${optgroupTag} label=\"${(x) => x.optgroup}\">\n ${repeat((x) => x.xs, html `\n <${optionTag}\n value=\"${(x) => x.fieldId}\"\n ?selected=${(x, c) => { var _a, _b; return x.fieldId === ((_b = (_a = c.parentContext.parent) === null || _a === void 0 ? void 0 : _a.field) === null || _b === void 0 ? void 0 : _b.fieldId); }}\n >\n ${(x) => x.label}\n </${optionTag}>\n `)}\n </${optgroupTag}>\n `;\n }\n else {\n return html `\n <${optionTag}\n value=\"${(x) => x.fieldId}\"\n ?selected=${(x, c) => { var _a, _b; return x.fieldId === ((_b = (_a = c.parent) === null || _a === void 0 ? void 0 : _a.field) === null || _b === void 0 ? void 0 : _b.fieldId); }}\n >\n ${(x) => x.label}\n </${optionTag}>\n `;\n }\n }}\n `)}\n </${selectTag}>\n `;\n}}\n`;\n","import { __decorate } from \"tslib\";\nimport { customElement, GenesisElement, observable, volatile } from '@genesislcap/web-core';\nimport { applyCustomStyles, processOptGroups } from '../../utils';\nimport { Events } from '../events';\nimport { template } from './rule-field.template';\nlet RuleField = class RuleField extends GenesisElement {\n constructor() {\n super(...arguments);\n this.fields = [];\n }\n connectedCallback() {\n super.connectedCallback();\n applyCustomStyles(this, this.styles, 'field');\n }\n get groupedFieldss() {\n return processOptGroups(this.fields);\n }\n dispatchFieldsChanged(event) {\n event.stopPropagation();\n const fieldId = event.target.value;\n const detail = {\n fieldId: fieldId,\n };\n this.dispatchEvent(new CustomEvent(Events.FieldSelected, { detail, bubbles: true, composed: true }));\n }\n};\n__decorate([\n observable\n], RuleField.prototype, \"fields\", void 0);\n__decorate([\n observable\n], RuleField.prototype, \"field\", void 0);\n__decorate([\n observable\n], RuleField.prototype, \"config\", void 0);\n__decorate([\n observable\n], RuleField.prototype, \"styles\", void 0);\n__decorate([\n volatile\n], RuleField.prototype, \"groupedFieldss\", null);\nRuleField = __decorate([\n customElement({\n name: 'expression-rule-field',\n template: template,\n })\n], RuleField);\nexport { RuleField };\n","import { html, repeat } from '@genesislcap/web-core';\nexport const template = html `\n ${(context) => {\n var _a, _b, _c, _d;\n const selectTag = ((_b = (_a = context.styles) === null || _a === void 0 ? void 0 : _a.customElements) === null || _b === void 0 ? void 0 : _b.select) || 'select';\n const optionTag = ((_d = (_c = context.styles) === null || _c === void 0 ? void 0 : _c.customElements) === null || _d === void 0 ? void 0 : _d.option) || 'option';\n const optgroupTag = 'optgroup'; // Not supporting custom optgroup for now\n return html `\n <${selectTag}\n class=\"form-select\"\n @change=${(x, c) => x.handleOperatorChange(c.event)}\n value=${(x) => { var _a; return (_a = x.operator) === null || _a === void 0 ? void 0 : _a.type; }}\n >\n <${optionTag} value=\"\">Select an operator</${optionTag}>\n ${repeat((x) => x.groupedOperators, html `\n ${(groupOrOperator) => {\n if ('xs' in groupOrOperator) {\n return html `\n <${optgroupTag} label=\"${groupOrOperator.optgroup}\">\n ${repeat((x) => x.xs, html `\n <${optionTag}\n value=\"${(x) => x.type}\"\n ?selected=${(x, c) => { var _a; return x.type === ((_a = c.parentContext.parent.operator) === null || _a === void 0 ? void 0 : _a.type); }}\n title=${(x) => x.tooltip}\n >\n ${(x) => x.type}\n </${optionTag}>\n `)}\n </${optgroupTag}>\n `;\n }\n else {\n return html `\n <${optionTag}\n value=\"${(x) => x.type}\"\n ?selected=${(x, c) => { var _a; return ((_a = c.parent.operator) === null || _a === void 0 ? void 0 : _a.type) === x.type; }}\n title=${(x) => x.tooltip}\n >\n ${(x) => x.type}\n </${optionTag}>\n `;\n }\n }}\n `)}\n </${selectTag}>\n `;\n}}\n`;\n","import { __decorate } from \"tslib\";\nimport { customElement, GenesisElement, observable, volatile } from '@genesislcap/web-core';\nimport { applyCustomStyles, processOptGroups } from '../../utils';\nimport { Events } from '../events';\nimport { template } from './rule-operator.template';\nlet RuleOperator = class RuleOperator extends GenesisElement {\n constructor() {\n super(...arguments);\n this.operators = [];\n this.field = null;\n }\n connectedCallback() {\n super.connectedCallback();\n applyCustomStyles(this, this.styles, 'operator');\n }\n get allowedOperators() {\n const fieldAllows = (operator) => { var _a, _b, _c; return (_c = (_b = (_a = this.field) === null || _a === void 0 ? void 0 : _a.operators) === null || _b === void 0 ? void 0 : _b.includes(operator.type)) !== null && _c !== void 0 ? _c : true; };\n const operatorAllows = (operator) => { var _a, _b, _c, _d; return (_d = (_b = (_a = operator === null || operator === void 0 ? void 0 : operator.applyTo) === null || _a === void 0 ? void 0 : _a.includes) === null || _b === void 0 ? void 0 : _b.call(_a, (_c = this.field) === null || _c === void 0 ? void 0 : _c.type)) !== null && _d !== void 0 ? _d : true; };\n return this.operators.filter((operator) => fieldAllows(operator) && operatorAllows(operator));\n }\n get groupedOperators() {\n return processOptGroups(this.allowedOperators);\n }\n handleOperatorChange(event) {\n event.stopPropagation();\n const operatorType = event.target.value;\n const detail = {\n operatorId: operatorType,\n };\n this.dispatchEvent(new CustomEvent(Events.OperatorSelected, { detail, bubbles: true, composed: true }));\n }\n};\n__decorate([\n observable\n], RuleOperator.prototype, \"operators\", void 0);\n__decorate([\n observable\n], RuleOperator.prototype, \"operator\", void 0);\n__decorate([\n observable\n], RuleOperator.prototype, \"field\", void 0);\n__decorate([\n observable\n], RuleOperator.prototype, \"config\", void 0);\n__decorate([\n observable\n], RuleOperator.prototype, \"styles\", void 0);\n__decorate([\n volatile\n], RuleOperator.prototype, \"allowedOperators\", null);\n__decorate([\n volatile\n], RuleOperator.prototype, \"groupedOperators\", null);\nRuleOperator = __decorate([\n customElement({\n name: 'expression-rule-operator',\n template: template,\n })\n], RuleOperator);\nexport { RuleOperator };\n","export const isIntType = (type) => ['short', 'int', 'long'].includes(type);\nexport const isFloatType = (type) => ['double', 'bigdecimal'].includes(type);\nexport const pattern = (type) => {\n if (isIntType(type)) {\n return /^[+-]?[0-9]+$/; // Integer pattern: optional leading minus sign, followed by digits\n }\n else if (isFloatType(type)) {\n return /[+-]?([0-9]*[.])?[0-9]+/; // Float pattern: optional leading minus, digits, optional decimal and more digits\n }\n else {\n return null;\n }\n};\nexport const numberPatternValidator = (type, value) => {\n var _a, _b;\n return !((_b = (_a = pattern(type)) === null || _a === void 0 ? void 0 : _a.test(value)) !== null && _b !== void 0 ? _b : true) ? 'Invalid number format' : null;\n};\n","import { css } from '@genesislcap/web-core';\nexport const styles = css `\n .text-input.error {\n color: red;\n }\n\n div.value-and-validation {\n display: inline-grid;\n align-items: center;\n }\n`;\n","import { classNames, html, repeat, when, whenElse } from '@genesislcap/web-core';\nimport { getFieldInput } from '../../utils';\n// Simple input template with custom element tags support\nconst simpleTemplate = html `\n ${(context) => {\n var _a, _b;\n const inputType = getFieldInput(context);\n // Convert datetime-local to datetimeLocal for the config property name\n const configKey = inputType === 'datetime-local' ? 'datetimeLocal' : inputType;\n // Get custom tag if available\n const customTag = (_b = (_a = context.styles) === null || _a === void 0 ? void 0 : _a.customElements) === null || _b === void 0 ? void 0 : _b[configKey];\n // Use custom tag if available, otherwise use standard input\n const tagName = customTag || 'input';\n return html `\n <${tagName}\n ${customTag ? '' : `type=\"${inputType}\"`}\n class=\"text-input ${(x) => classNames(['error', x.validationError])}\"\n value=${(x) => x.value}\n @blur=${(x, c) => x.handleInputChange(c.event)}\n />\n `;\n}}\n`;\n// Select template with custom element tags support\nconst selectTemplate = html `\n ${(context) => {\n var _a, _b, _c, _d;\n const selectTag = ((_b = (_a = context.styles) === null || _a === void 0 ? void 0 : _a.customElements) === null || _b === void 0 ? void 0 : _b.select) || 'select';\n const optionTag = ((_d = (_c = context.styles) === null || _c === void 0 ? void 0 : _c.customElements) === null || _d === void 0 ? void 0 : _d.option) || 'option';\n return html `\n <${selectTag}\n class=\"form-select\"\n @change=${(x, c) => x.handleInputChange(c.event)}\n value=${(x) => x.value}\n >\n ${repeat((x) => {\n var _a, _b, _c, _d;\n // Ensure values is defined and an object before calling Object.entries\n const values = ((_b = (_a = x.operator) === null || _a === void 0 ? void 0 : _a.valueType) === null || _b === void 0 ? void 0 : _b.type) === 'enum' && ((_d = (_c = x === null || x === void 0 ? void 0 : x.operator) === null || _c === void 0 ? void 0 : _c.valueType) === null || _d === void 0 ? void 0 : _d.values)\n ? x.operator.valueType.values\n : x.field.type === 'enum' && x.field.values\n ? x.field.values\n : {};\n return Object.entries(values);\n }, () => html `\n <${optionTag} value=\"${(x) => x[0]}\" ?selected=${(x, c) => x[0] === c.parent.value}>\n ${(x) => x[1]}\n </${optionTag}>\n `)}\n </${selectTag}>\n `;\n}}\n`;\n// Checkbox template with custom element tags support\nconst checkboxTemplate = html `\n ${(context) => {\n var _a, _b;\n // Get custom checkbox tag if available\n const customTag = (_b = (_a = context.styles) === null || _a === void 0 ? void 0 : _a.customElements) === null || _b === void 0 ? void 0 : _b.checkbox;\n // Use custom tag if available, otherwise use standard input\n const tagName = customTag || 'input';\n return html `\n <label>\n <${tagName}\n ${customTag ? '' : 'type=\"checkbox\"'}\n ?checked=${(x) => !!x.value}\n @change=${(x, c) => x.handleInputChange(c.event)}\n role=\"checkbox\"\n />\n True\n </label>\n `;\n}}\n`;\n// Unsupported input template\nconst unsupportedTemplate = html `\n <div>Input type \"${(x) => getFieldInput(x)}\" not yet supported.</div>\n`;\n// Template switcher\nconst templateSwitcher = html `\n ${(context) => {\n const inputFieldType = getFieldInput(context);\n return html `\n <div class=\"value-and-validation\">\n ${when(() => ['text', 'number', 'date', 'datetime-local'].includes(inputFieldType), simpleTemplate)}\n ${when(() => inputFieldType === 'select', selectTemplate)}\n ${when(() => inputFieldType === 'checkbox', checkboxTemplate)}\n ${when(() => !['text', 'number', 'select', 'checkbox', 'date', 'datetime-local'].includes(inputFieldType), unsupportedTemplate)}\n ${when((x) => x.validationMsg, html `\n <p class=\"validation-msg\">${(x) => x.validationMsg}</p>\n `)}\n </div>\n ${when((x) => x.variadic && x.valueIndex !== '0', html `\n ${() => {\n var _a, _b;\n const buttonTag = ((_b = (_a = context.styles) === null || _a === void 0 ? void 0 : _a.customElements) === null || _b === void 0 ? void 0 : _b.button) || 'button';\n return html `\n <${buttonTag}\n type=\"button\"\n class=\"btn btn-sm btn-remove\"\n @click=\"${(x) => x.handleRemoveVariadicOperand()}\"\n >\n -\n </${buttonTag}>\n `;\n }}\n `)}\n `;\n}}\n`;\n// Main template\nexport const ruleValueTemplate = html `\n ${whenElse((x) => x.field, templateSwitcher, html `\n <div>Select a field to set value</div>\n `)}\n`;\n","import { __decorate } from \"tslib\";\nimport { attr, customElement, GenesisElement, observable } from '@genesislcap/web-core';\nimport { applyCustomStyles, getFieldType } from '../../utils/misc';\nimport { Events } from '../events';\nimport { isFloatType, isIntType, numberPatternValidator } from './rule-value.helpers';\nimport { styles } from './rule-value.styles';\nimport { ruleValueTemplate } from './rule-value.template';\nlet RuleValue = class RuleValue extends GenesisElement {\n constructor() {\n super(...arguments);\n this.variadic = false;\n this.validationError = false;\n this.field = null;\n this.operator = null;\n }\n connectedCallback() {\n super.connectedCallback();\n applyCustomStyles(this, this.styles, 'value');\n }\n // Validate the input value\n validateInput(value) {\n if (!this.field)\n return null;\n const errorMsg = [\n 'validation' in this.field ? this.field.validation(value) : null,\n numberPatternValidator(getFieldType(this), value),\n ]\n .filter((v) => !!v)\n .join(', ');\n return errorMsg || null;\n }\n // Handle input change/blur events\n handleInputChange(event) {\n event.stopPropagation();\n const target = event.target;\n // For text-like inputs, validate on blur\n if (target.type !== 'checkbox' && target.type !== 'select-one') {\n const errorMsg = this.validateInput(target.value);\n if (errorMsg) {\n this.validationError = true;\n this.validationMsg = errorMsg;\n return; // Don't proceed if validation fails\n }\n else {\n this.validationError = false;\n this.validationMsg = null;\n }\n }\n // Process the value change\n let newValue;\n if (target.getAttribute('role') === 'checkbox') {\n newValue = target.checked;\n }\n else if (target.type === 'select-one') {\n newValue = event.target.value;\n }\n else if (this.field && isIntType(getFieldType(this))) {\n newValue = parseInt(target.value);\n }\n else if (this.field && isFloatType(getFieldType(this))) {\n newValue = parseFloat(target.value);\n }\n else {\n newValue = target.value;\n }\n this.value = newValue;\n const detail = {\n value: newValue,\n index: parseInt(this.valueIndex),\n };\n this.dispatchEvent(new CustomEvent(Events.ValueUpdated, { detail, bubbles: true, composed: true }));\n }\n handleRemoveVariadicOperand() {\n if (!this.variadic)\n throw new Error('Cannot remove inputs for non-variadic operator');\n const detail = {\n index: parseInt(this.valueIndex),\n };\n this.dispatchEvent(new CustomEvent(Events.RemoveVarArg, { detail, bubbles: true, composed: true }));\n }\n};\n__decorate([\n attr({ attribute: 'value-index' })\n], RuleValue.prototype, \"valueIndex\", void 0);\n__decorate([\n attr({ mode: 'boolean' })\n], RuleValue.prototype, \"variadic\", void 0);\n__decorate([\n attr({ mode: 'boolean', attribute: 'validation-error' })\n], RuleValue.prototype, \"validationError\", void 0);\n__decorate([\n attr({ attribute: 'validation-msg' })\n], RuleValue.prototype, \"validationMsg\", void 0);\n__decorate([\n observable\n], RuleValue.prototype, \"field\", void 0);\n__decorate([\n observable\n], RuleValue.prototype, \"operator\", void 0);\n__decorate([\n observable\n], RuleValue.prototype, \"value\", void 0);\n__decorate([\n observable\n], RuleValue.prototype, \"config\", void 0);\n__decorate([\n observable\n], RuleValue.prototype, \"styles\", void 0);\nRuleValue = __decorate([\n customElement({\n name: 'expression-rule-value',\n template: ruleValueTemplate,\n styles: styles,\n shadowOptions: {\n delegatesFocus: true,\n },\n })\n], RuleValue);\nexport { RuleValue };\n","import { formatDateString, formatDateTimeString, getFieldType } from '../../utils';\n/**\n * Gets the default value for a field accounting for\n * - any default value hard coded on the config\n * - any previous values when appropriate\n * - account for different value types when switching operators\n */\nexport const defaultVal = (newOpt, m) => m.field.defaultValue !== undefined ? m.field.defaultValue : fieldDefault(newOpt, m);\n/**\n * If the user has changed the operator on a rule then we try and remember their value when possible\n * If the operators differ with type (e.g. an operator has a `valueType`) then we always create a new field default via returning null)\n */\nexport const getValue = (newOpt, m) => (index) => {\n var _a, _b, _c;\n // If neither opt uses a value type then we compare null and don't exit early\n if (((_a = newOpt === null || newOpt === void 0 ? void 0 : newOpt.valueType) === null || _a === void 0 ? void 0 : _a.type) !== ((_c = (_b = m.operator) === null || _b === void 0 ? void 0 : _b.valueType) === null || _c === void 0 ? void 0 : _c.type))\n return null;\n if (!('value' in m) || !m.value || !m.operator)\n return null;\n const value = m.operator.nbInputs === 1 ? [m.value] : m.value;\n if (index >= value.length)\n return null;\n return value[index];\n};\nexport const fieldDefault = (newOpt, m) => {\n var _a, _b;\n switch (getFieldType(Object.assign(Object.assign({}, m), { operator: newOpt }))) {\n case 'string':\n return '';\n case 'boolean':\n return false;\n case 'date':\n return formatDateString(new Date());\n case 'date-time':\n return formatDateTimeString(new Date());\n case 'double':\n case 'int':\n case 'bigdecimal':\n case 'short':\n case 'long':\n return 0;\n case 'enum': {\n const values = ((_a = newOpt === null || newOpt === void 0 ? void 0 : newOpt.valueType) === null || _a === void 0 ? void 0 : _a.type) === 'enum'\n ? (_b = newOpt === null || newOpt === void 0 ? void 0 : newOpt.valueType) === null || _b === void 0 ? void 0 : _b.values\n : m.field.type === 'enum'\n ? m.field.values\n : {};\n if (Object.keys(values).length === 0)\n throw new Error('Enums require configured values');\n return Object.keys(values)[0];\n }\n }\n};\nexport const operatorChangedUpdatedModel = (newOperator, model) => {\n var _a, _b, _c, _d;\n const tryPrevVal = getValue(newOperator, model);\n switch (newOperator.nbInputs) {\n case 0:\n return {\n field: model.field,\n operator: newOperator,\n value: undefined,\n };\n case 1:\n return {\n field: model.field,\n operator: newOperator,\n value: (_a = tryPrevVal(0)) !== null && _a !== void 0 ? _a : defaultVal(newOperator, model),\n };\n case 2:\n return {\n field: model.field,\n operator: newOperator,\n value: [\n (_b = tryPrevVal(0)) !== null && _b !== void 0 ? _b : defaultVal(newOperator, model),\n (_c = tryPrevVal(1)) !== null && _c !== void 0 ? _c : defaultVal(newOperator, model),\n ],\n };\n case 'many':\n return {\n field: model.field,\n operator: newOperator,\n // Variadic operators always start with 1 operand\n value: [(_d = tryPrevVal(0)) !== null && _d !== void 0 ? _d : defaultVal(newOperator, model)],\n };\n }\n};\nexport const valueChangedUpdateModel = (model, value, argIndex) => {\n switch (model.operator.nbInputs) {\n case 0:\n throw new Error('Cannot set the value for a UniraryOperator');\n case 1:\n return {\n field: model.field,\n operator: model.operator,\n value,\n };\n case 2:\n case 'many': {\n if (!('value' in model) || !Array.isArray(model.value))\n throw new Error('Invalid value shape for rule');\n return {\n field: model.field,\n operator: model.operator,\n value: model.value.map((v, i) => (i === argIndex ? value : v)),\n };\n }\n }\n};\n/**\n * Test a value considered to be allowed for validation reasons\n * A boolean cast to falsy is considered invalid, except special case\n * that we allow `0` because that's a valid numeric comparison.\n * This will consider blank strings invalid, to test against that explicitly the user\n * should define an operator such as `is_blank`\n * This shouldn't be used on a boolean value\n */\nexport const isValueInvalid = (x) => !x && x !== 0;\nexport const isPartialRuleError = (model) => {\n if (!model.field || !model.operator)\n return true;\n if (model.operator.nbInputs === 0)\n return false;\n if (!('value' in model))\n throw new Error('No value set as required for operator');\n // Checking against either false or true boolean is valid\n if (getFieldType(model) === 'boolean')\n return false;\n const value = Array.isArray(model.value) ? model.value : [model.value];\n if (value.some(isValueInvalid))\n return true;\n return false;\n};\n","import { css } from '@genesislcap/web-core';\nexport const styles = css `\n .rule-container {\n border: 1px solid #eee;\n margin-bottom: 5px;\n padding: 5px;\n display: grid;\n grid-template-columns: auto 1fr;\n }\n\n .rule-container.error {\n border-color: red;\n }\n\n .margin {\n margin-left: calc(var(--design-unit) * 1px);\n margin-right: calc(var(--design-unit) * 1px);\n }\n\n .rule-header {\n margin-bottom: 5px;\n display: flex;\n justify-content: flex-end;\n }\n\n .rule-actions {\n display: inline-block;\n }\n\n .rule-content {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n }\n\n .rule-field-container,\n .rule-operator-container,\n .rule-value-container {\n display: inline-block;\n margin: 0 5px 0 0;\n vertical-align: middle;\n }\n\n .rule-value-container {\n border-left: var(--rule-value-separator);\n padding-left: 5px;\n }\n\n .rule-value-container label {\n margin-bottom: 0;\n font-weight: normal;\n }\n\n .rule-value-container label.block {\n display: block;\n }\n\n expression-rule-value {\n display: flex;\n }\n`;\n","import { classNames, html, repeat, when } from '@genesislcap/web-core';\nexport const template = html `\n ${(context) => {\n var _a, _b;\n const buttonTag = ((_b = (_a = context.styles) === null || _a === void 0 ? void 0 : _a.customElements) === null || _b === void 0 ? void 0 : _b.button) || 'button';\n return html `\n <div class=\"rule-container ${(x) => classNames(['error', x.error])}\">\n <div class=\"rule-content\">\n <expression-rule-field\nclass=\"margin\"\n :fields=${(x) => x.config.fields}\n :field=${(x) => { var _a; return (_a = x.model) === null || _a === void 0 ? void 0 : _a.field; }}\n :config=${(x) => x.config}\n :styles=${(x) => x.styles}\n @field-selected=${(x, c) => x.handleFieldSelected(c.event)}\n ></expression-rule-field>\n <expression-rule-operator\nclass=\"margin\"\n :operators=${(x) => x.config.operators}\n :field=${(x) => x.model.field}\n :operator=${(x) => { var _a; return (_a = x.model) === null || _a === void 0 ? void 0 : _a.operator; }}\n :config=${(x) => x.config}\n :styles=${(x) => x.styles}\n @operator-selected=${(x, c) => x.handleOperatorSelected(c.event)}\n ></expression-rule-operator>\n ${repeat((x) => x.operandIterator, html `\n <expression-rule-value\n class=\"margin\"\n :config=${(_, c) => c.parent.config}\n :styles=${(_, c) => c.parent.styles}\n :field=${(_, c) => c.parent.model.field}\n :operator=${(_, c) => c.parent.model.operator}\n :value=${(_, c) => c.parent.operandValue(c.index)}\n value-index=${(_, c) => c.index}\n ?variadic=${(_, c) => { var _a, _b; return ((_b = (_a = c.parent.model) === null || _a === void 0 ? void 0 : _a.operator) === null || _b === void 0 ? void 0 : _b.nbInputs) === 'many'; }}\n @value-updated=${(_, c) => c.parent.handleValueChanged(c.event)}\n @remove-variadic-operand=${(_, c) => c.parent.handleRemoveVarArg(c.event)}\n ></expression-rule-value>\n `, { positioning: true, recycle: false })}\n ${when((x) => { var _a, _b; return ((_b = (_a = x.model) === null || _a === void 0 ? void 0 : _a.operator) === null || _b === void 0 ? void 0 : _b.nbInputs) === 'many'; }, html `\n <${buttonTag}\n type=\"button\"\n class=\"btn btn-sm btn-accept\"\n @click=\"${(x) => x.dispatchAddVarArg()}\"\n >\n +\n </${buttonTag}>\n `)}\n </div>\n\n <div class=\"rule-header\">\n <div class=\"btn-group rule-actions\">\n <${buttonTag}\n type=\"button\"\n class=\"btn btn-sm btn-danger\"\n data-delete=\"rule\"\n @click=\"${(x, c) => x.dispatchDeleteRule(c.event)}\"\n >\n Delete Rule\n </${buttonTag}>\n </div>\n </div>\n </div>\n `;\n}}\n`;\n","import { __decorate } from \"tslib\";\nimport { attr, customElement, GenesisElement, observable, volatile } from '@genesislcap/web-core';\nimport { applyCustomStyles } from '../../utils/misc';\nimport { Events } from '../events';\nimport { RuleField } from '../rule-field/rule-field';\nimport { RuleOperator } from '../rule-operator/rule-operator';\nimport { RuleValue } from '../rule-value/rule-value';\nimport { operatorChangedUpdatedModel, defaultVal, valueChangedUpdateModel, isPartialRuleError, } from './expression-rule.helpers';\nimport { styles } from './expression-rule.styles';\nimport { template } from './expression-rule.template';\nRuleOperator;\nRuleField;\nRuleValue;\nlet ExpressionRule = class ExpressionRule extends GenesisElement {\n constructor() {\n super(...arguments);\n this.error = false;\n }\n connectedCallback() {\n super.connectedCallback();\n applyCustomStyles(this, this.styles, 'rule');\n if (this.config.partialRuleValidationWarning) {\n this.error = isPartialRuleError(this.model);\n }\n }\n variadicRule(model) {\n return model.operator.nbInputs === 'many' && 'value' in model && Array.isArray(model.value);\n }\n /**\n * @internal\n * Creates an array of length n to represent to number of argument to the operator\n */\n get operandIterator() {\n var _a, _b, _c;\n if (((_a = this.model.operator) === null || _a === void 0 ? void 0 : _a.nbInputs) === 'many') {\n if (!this.variadicRule(this.model))\n throw new Error('Varargs disabled for many nbInputs');\n return Array(this.model.value.length).fill(true);\n }\n return Array((_c = (_b = this.model.operator) === null || _b === void 0 ? void 0 : _b.nbInputs) !== null && _c !== void 0 ? _c : 0).fill(true);\n }\n operandValue(index) {\n if (!this.model.operator)\n return undefined;\n if (this.model.operator.nbInputs === 1 && 'value' in this.model) {\n return this.model.value;\n }\n else if ((this.model.operator.nbInputs === 2 || this.model.operator.nbInputs === 'many') &&\n 'value' in this.model &&\n Array.isArray(this.model.value)) {\n return this.model.value[index];\n }\n throw new Error('Invalid operand lookup');\n }\n dispatchAddVarArg() {\n if (!this.variadicRule(this.model))\n throw new Error('Cannot add inputs for non-variadic operator, or invalid format');\n const detail = {\n ruleId: this.model.ruleId,\n newData: {\n operator: this.model.operator,\n field: this.model.field,\n value: [...this.model.value, defaultVal(this.model.operator, this.model)],\n },\n };\n this.dispatchEvent(new CustomEvent(Events.UpdateRule, { detail, bubbles: true, composed: true }));\n }\n handleRemoveVarArg(event) {\n const { index } = event.detail;\n if (!this.variadicRule(this.model))\n throw new Error('Cannot remove inputs for non-variadic operator, or invalid format');\n const detail = {\n ruleId: this.model.ruleId,\n newData: {\n operator: this.model.operator,\n field: this.model.field,\n value: this.model.value.filter((_, i) => i !== index),\n },\n };\n this.dispatchEvent(new CustomEvent(Events.UpdateRule, { detail, bubbles: true, composed: true }));\n }\n dispatchDeleteRule(event) {\n event.stopPropagation();\n const detail = {\n ruleId: this.model.ruleId,\n };\n this.dispatchEvent(new CustomEvent(Events.DelRule, { detail, bubbles: true, composed: true }));\n }\n handleFieldSelected(event) {\n var _a;\n event.stopPropagation();\n const { fieldId } = event.detail;\n const newFiler = (_a = this.config.fields.find((filter) => filter.fieldId === fieldId)) !== null && _a !== void 0 ? _a : null;\n const detail = {\n ruleId: this.model.ruleId,\n newData: {\n field: newFiler,\n value: null,\n operator: null,\n },\n };\n this.dispatchEvent(new CustomEvent(Events.UpdateRule, { detail, bubbles: true, composed: true }));\n }\n handleValueChanged(event) {\n event.stopPropagation();\n const { value, index } = event.detail;\n const detail = {\n ruleId: this.model.ruleId,\n newData: valueChangedUpdateModel(this.model, value, index),\n };\n this.dispatchEvent(new CustomEvent(Events.UpdateRule, { detail, bubbles: true, composed: true }));\n }\n handleOperatorSelected(event) {\n var _a;\n event.stopPropagation();\n const { operatorId: operatorType } = event.detail;\n if (!operatorType)\n return; // occurs when selecting \"Select an operator\"\n const newOperator = (_a = this.config.operators.find((operator) => operator.type === operatorType)) !== null && _a !== void 0 ? _a : null;\n if (!newOperator) {\n throw new Error(`Unable to find operator of type ${operatorType}`);\n }\n this.dispatchEvent(new CustomEvent(Events.UpdateRule, {\n detail: {\n ruleId: this.model.ruleId,\n newData: operatorChangedUpdatedModel(newOperator, this.model),\n },\n bubbles: true,\n composed: true,\n }));\n }\n};\n__decorate([\n observable\n], ExpressionRule.prototype, \"config\", void 0);\n__decorate([\n observable\n], ExpressionRule.prototype, \"styles\", void 0);\n__decorate([\n observable\n], ExpressionRule.prototype, \"model\", void 0);\n__decorate([\n observable\n], ExpressionRule.prototype, \"index\", void 0);\n__decorate([\n attr({ mode: 'boolean' })\n], ExpressionRule.prototype, \"error\", void 0);\n__decorate([\n volatile\n], ExpressionRule.prototype, \"operandIterator\", null);\nExpressionRule = __decorate([\n customElement({\n name: 'expression-rule',\n template,\n styles: styles,\n shadowOptions: {\n delegatesFocus: true, // Ensure the element can be focused\n },\n })\n], ExpressionRule);\nexport { ExpressionRule };\n","import { __decorate } from \"tslib\";\nimport { customElement, GenesisElement, observable } from '@genesislcap/web-core';\nimport { groupToModelGroup, modelGroupToGroup } from '../utils/data-model';\nimport { Events } from './events';\nimport { addGroupOrRule, deleteGroup, deleteRule, ROOT_GROUP, updateGroupData, updateRuleData, } from './expression-builder.helpers';\nimport { styles } from './expression-builder.styles';\nimport { template } from './expression-builder.template';\nimport { ExpressionGroup } from './expression-group/expression-group';\nimport { ExpressionRule } from './expression-rule/expression-rule';\nExpressionGroup;\nExpressionRule;\n/**\n * Top level component to allow the user to build expressions. It produces a generic payload which doesn't have any system by itself\n * to evaluate or execute the built expression.\n *\n * The basics required to work with this component:\n *\n * {@link ExpressionBuilder.config} property to configure and input data and models into the component.\n *\n * _Event_ change - `Types.Group` emits the model configuration on change. If you create a child component of the expression builder\n * where you want to use a different (e.g. domain specific) model then it will likely override then emit event and instead emit\n * it's own model. To check the underlying `Types.Group` model check the {@link ExpressionBuilder.model} property.\n *\n * @beta\n */\nlet ExpressionBuilder = class ExpressionBuilder extends GenesisElement {\n constructor() {\n super(...arguments);\n /**\n * model - `Types.Group` the current model which completely describes the state of the component.\n *\n * *IMPORTANT* you should not set this yourself via this property directly, you should always set it via the model property on the {@link ExpressionBuilder.config} block.\n *\n * You may want to read from this variable to get the most up to date state, for example if you create a child component which\n * has a model which isn't valid for every single state (e.g. requires a complete rule) you can check this underlying model to\n * verify what field or operator is selected.\n *\n * @beta\n *\n * @example\n * ```ts\n * const model = document.querySelector('expression-builder');\n * // Once you have the model you can read it to check the applied config. While the primary use should be checking the updated model via\n * the emited change event, you can use this to check more specific changes that a domain specific model might not.\n *\n * For example, imagine a RulExpressionBuilder which is an implementation specifically for a boolean logic expression. That component may not\n * model a non-complete rule (a rule without a field, and operator, and value). In that case when it emits the event the payload will only change\n * when the user has completely configured a new rule. But if you need to catch cases earlier when they've changed the field but before they've\n * changed the value you can check the model here.\n * ```\n */\n this.model = null;\n this.ruleCount = 0;\n this.groupCount = 0;\n /**\n * @internal\n * We don't want to dispatch a change event for the model if it's just changed because\n * the user updated it themselves, otherwise if they automatically update the config property\n * on change it'll get into an infinite loop\n */\n this.userUpdatingModel = false;\n this.handleAddGroup = this._handleAddGroup.bind(this);\n this.handleAddRule = this._handleAddRule.bind(this);\n this.handleDeleteGroup = this._handleDeleteGroup.bind(this);\n this.handleDeleteRule = this._handleDeleteRule.bind(this);\n this.handleUpdateGroupData = this._handleUpdateGroupData.bind(this);\n this.handleUpdateRuleData = this._handleUpdateRuleData.bind(this);\n }\n /** @internal */\n configChanged(_, newConfig) {\n if (!this.isValidConfig(newConfig)) {\n console.warn(\"Invalid config passed to ExpressionBuilder. Verify you've defined operators, fields, and combinators.\");\n return;\n }\n if (newConfig.model) {\n this.ruleCount = 0;\n this.groupCount = 0;\n this.userUpdatingModel = true;\n this.model = groupToModelGroup(newConfig.model, this);\n this.userUpdatingModel = false;\n }\n else if (this.model === null) {\n this.initBaseModel();\n }\n }\n /** @internal */\n modelChanged(_, newModel) {\n if (!newModel || this.userUpdatingModel)\n return;\n const group = modelGroupToGroup(newModel);\n this.dispatchChangeEvent(group);\n }\n /**\n * @beta\n * Dispatches the provided model to the DOM.\n *\n * @remarks\n * Override this to change the shape of model the component returns\n */\n dispatchChangeEvent(group) {\n this.dispatchEvent(new CustomEvent('change', {\n detail: group,\n bubbles: true,\n cancelable: true,\n composed: true,\n }));\n }\n // Implement MetadataProvider interface\n /** @internal */\n getConfig() {\n return this.config;\n }\n /** @internal */\n getGroupId() {\n this.groupCount += 1;\n return `group-${this.groupCount}`;\n }\n /** @internal */\n getRuleId() {\n this.ruleCount += 1;\n return `rule-${this.ruleCount}`;\n }\n // Behaviour\n /** @internal */\n connectedCallback() {\n super.connectedCallback();\n this.addEventListener(Events.AddGroup, this.handleAddGroup);\n this.addEventListener(Events.DelGroup, this.handleDeleteGroup);\n this.addEventListener(Events.AddRule, this.handleAddRule);\n this.addEventListener(Events.DelRule, this.handleDeleteRule);\n this.addEventListener(Events.UpdateGroup, this.handleUpdateGroupData);\n this.addEventListener(Events.UpdateRule, this.handleUpdateRuleData);\n // When using other frameworks such as React we cannot guarantee that it sets the property on the component\n // by the time connectedCallback is called, so we need to allow for lazy setting of the config\n if (!this.isValidConfig(this.config)) {\n if (this.config) {\n console.warn(\"Config detected during connectedCallback but it isn't valid\");\n }\n this.config = null;\n return;\n }\n // If the property contains a model then let that be used, via configChanged\n if (this.config.model)\n return;\n // Else, set a blank model\n this.initBaseModel();\n }\n /** @internal */\n disconnectedCallback() {\n super.disconnectedCallback();\n this.removeEventListener(Events.AddGroup, this.handleAddGroup);\n this.removeEventListener(Events.DelGroup, this.handleDeleteGroup);\n this.removeEventListener(Events.AddRule, this.handleAddRule);\n this.removeEventListener(Events.DelRule, this.handleDeleteRule);\n this.removeEventListener(Events.UpdateGroup, this.handleUpdateGroupData);\n this.removeEventListener(Events.UpdateRule, this.handleUpdateRuleData);\n }\n isValidConfig(config) {\n var _a, _b, _c;\n return Boolean(config && ((_a = config.combinators) === null || _a === void 0 ? void 0 : _a.length) && ((_b = config.operators) === null || _b === void 0 ? void 0 : _b.length) && ((_c = config.fields) === null || _c === void 0 ? void 0 : _c.length));\n }\n initBaseModel() {\n if (!this.isValidConfig(this.config)) {\n throw new Error(\"Invalid config set on ExpressionBuilder. Verify you've defined operators, fields, and combinators.\");\n }\n this.model = {\n children: [],\n level: 1,\n groupId: ROOT_GROUP,\n config: this.config,\n combinator: this.config.combinators[0],\n };\n }\n _handleAddGroup(event) {\n const { parentGroupId, newGroup: _newGroup } = event.detail;\n const newGroup = {\n groupId: this.getGroupId(),\n level: _newGroup.level,\n children: [],\n config: this.config,\n combinator: this.config.combinators[0],\n };\n this.model = addGroupOrRule(this.model, parentGroupId, newGroup);\n }\n _handleAddRule(event) {\n const { parentGroupId } = event.detail;\n const newRule = {\n ruleId: this.getRuleId(),\n config: this.config,\n field: null,\n operator: null,\n value: null,\n };\n this.model = addGroupOrRule(this.model, parentGroupId, newRule);\n }\n _handleDeleteGroup(event) {\n const { groupId } = event.detail;\n this.model = deleteGroup(this.model, groupId);\n }\n _handleDeleteRule(event) {\n const { ruleId } = event.detail;\n this.model = deleteRule(this.model, ruleId);\n }\n _handleUpdateGroupData(event) {\n const { groupId, newData } = event.detail;\n this.model = updateGroupData(this.model, groupId, newData);\n }\n _handleUpdateRuleData(event) {\n const { ruleId, newData } = event.detail;\n this.model = updateRuleData(this.model, ruleId, newData);\n }\n};\n__decorate([\n observable\n], ExpressionBuilder.prototype, \"config\", void 0);\n__decorate([\n observable\n], ExpressionBuilder.prototype, \"styles\", void 0);\n__decorate([\n observable\n], ExpressionBuilder.prototype, \"model\", void 0);\nExpressionBuilder = __decorate([\n customElement({\n name: 'expression-builder',\n template,\n styles,\n })\n], ExpressionBuilder);\nexport { ExpressionBuilder };\n","import { __decorate } from \"tslib\";\nimport { ExpressionBuilder, template, styles } from '@genesislcap/expression-builder';\nimport { customElement } from '@microsoft/fast-element';\n/**\n * We don't create the foundation version of the component in the same way as the other components,\n * they're composed from a base FAST component.\n * The reason for this is that we want to have ExpressionBuilder as an independent and open source\n * component, and due to this we don't want to release it as base components that someone needs to use\n * FAST to compose.\n */\nlet FoundationExpressionBuilder = class FoundationExpressionBuilder extends ExpressionBuilder {\n};\nFoundationExpressionBuilder = __decorate([\n customElement({\n name: 'foundation-expression-builder',\n styles: styles,\n template,\n })\n], FoundationExpressionBuilder);\nexport { FoundationExpressionBuilder };\n","import { formatDateString, formatDateTimeString } from '@genesislcap/expression-builder';\nexport const intTypes = ['int', 'short', 'long'];\nexport const floatTypes = ['double', 'bigdecimal'];\nexport const numberTypes = [...intTypes, ...floatTypes];\nexport const dateTypes = ['date', 'date-time'];\nexport const stringTypes = ['string', 'enum'];\nexport const booleanTypes = ['boolean'];\nconst getFieldType = (context) => { var _a, _b, _c; return (_c = (_b = (_a = context.operator) === null || _a === void 0 ? void 0 : _a.valueType) === null || _b === void 0 ? void 0 : _b.type) !== null && _c !== void 0 ? _c : context.field.type; };\n/**\n * Converts a client field type to a server expression type\n *\n * @internal\n **/\nexport function mapFieldTypeToRuleExpressionType(rule) {\n switch (getFieldType(rule)) {\n case 'int':\n case 'long':\n case 'double':\n case 'bigdecimal':\n case 'date':\n case 'date-time':\n case 'short':\n return 'NUMBER';\n case 'string':\n case 'enum':\n return 'STRING';\n case 'boolean':\n return 'BOOLEAN';\n }\n}\n/**\n * Converts a client BinaryOperator to a server BinaryExpression\n *\n * The opposite of `fromBinaryExpression`\n * @internal\n **/\nexport function toBinaryExpression(rule, OPERATION, TYPE) {\n if (!('value' in rule))\n return null;\n return {\n TYPE: 'BINARY_EXPRESSION',\n LEFT: {\n TYPE: 'FIELD',\n NAME: rule.field.fieldId,\n },\n OPERATION,\n RIGHT: {\n TYPE,\n VALUE: rule.value,\n },\n };\n}\n/**\n * Converts a client BinaryOperator to a server BinaryExpression\n *\n * The opposite of `fromBinaryExpression`\n *\n * @privateRemarks\n * Used in specific cases where a server operation doesn't map nicely to a client one,\n * such as IS_NULL being a client UniraryOperation but a server BinaryExpression\n * @internal\n **/\nexport function toSetValueBinaryExpression(rule, OPERATION, RIGHT) {\n return {\n TYPE: 'BINARY_EXPRESSION',\n LEFT: {\n TYPE: 'FIELD',\n NAME: rule.field.fieldId,\n },\n OPERATION,\n RIGHT,\n };\n}\n/**\n * Converts a client BinaryOperator to a server MethodExpression\n *\n * The opposite of `fromMethodExpression`\n *\n * @internal\n **/\nexport function toMethodExpression(rule, METHOD, restParams = []) {\n if (!('value' in rule))\n return null;\n return {\n TYPE: 'METHOD_EXPRESSION',\n PARAMETERS: [\n {\n TYPE: 'FIELD',\n NAME: rule.field.fieldId,\n },\n ...restParams,\n ],\n METHOD,\n };\n}\nexport const MILLIS_TO_SECONDS = 1000;\n/**\n * Converts a client field value to a server field value\n *\n * The opposite to `rebuildRuleValue`\n *\n * @privateRemarks\n * `string` (+`enum`) and `boolean` types are left as they are\n * `number` types are converted to string due to the limitation of BigDecimal values from the server\n * `date` and `datetime-local` converted to epoch time as the server works with numbers\n *\n * @internal\n **/\nexport function transformRuleValue(rule) {\n const transform = (value) => {\n const fieldType = getFieldType(rule);\n if (stringTypes.includes(fieldType))\n return value;\n if (numberTypes.includes(fieldType))\n return value.toString(); // Handle as bigdecimal\n if (booleanTypes.includes(fieldType))\n return value;\n if (Array.isArray(value))\n throw new Error(`Not implemented TernararyOperator or VariadicOperator args in rule value transformer`);\n if (dateTypes.includes(fieldType)) {\n return (new Date(value).getTime() / MILLIS_TO_SECONDS).toString(); // Handle as bigdecimal\n }\n throw new Error('Unhandled transformRuleValue case');\n };\n const validRule = !(!('value' in rule) ||\n typeof rule.value === 'undefined' ||\n rule.value === null);\n return Object.assign(Object.assign({}, rule), (validRule ? { value: transform(rule.value) } : {}));\n}\n/**\n * Converts a client `Group` into the correct server `Expression`\n *\n * @internal\n **/\nexport function groupToRuleExpression(group, ruleToRuleExpression) {\n return {\n TYPE: 'PREDICATE_EXPRESSION',\n OPERATION: group.combinator.type,\n EXPRESSIONS: group.children\n .map((c) => 'children' in c ? groupToRuleExpression(c, ruleToRuleExpression) : ruleToRuleExpression(c))\n .filter(Boolean),\n };\n}\n/**\n * Convert from Genesis to Expression builder\n */\n/**\n * Converts a server field value to a client field value\n *\n * The opposite to `transformRuleValue`\n *\n * @privateRemarks\n * `string` (+`enum`) and `boolean` types are left as they are\n * `date` and `datetime-local` are converted to the string format required for input type=[date|datetime-local]\n * `number` types are parsed as ints or floats as required\n *\n * @internal\n **/\nexport function rebuildRuleValue(rule, rhs) {\n const transform = (value) => {\n const fieldType = getFieldType(rule);\n if (stringTypes.includes(fieldType))\n return value;\n if (intTypes.includes(fieldType))\n return parseInt(value);\n if (floatTypes.includes(fieldType))\n return parseFloat(value);\n if (booleanTypes.includes(fieldType))\n return value;\n if (dateTypes.includes(fieldType)) {\n const dateObj = new Date(parseInt(value) * MILLIS_TO_SECONDS);\n return fieldType === 'date' ? formatDateString(dateObj) : formatDateTimeString(dateObj);\n }\n throw new Error('Unhandled rebuildRuleValue case');\n };\n const operatorNbInputs = rule.operator.nbInputs;\n if (operatorNbInputs === 'many' || operatorNbInputs === 2)\n throw new Error(`Not implemented TernararyOperator or VariadicOperator args in rebuildRuleValue`);\n return Object.assign(Object.assign({}, rule), (operatorNbInputs === 0 ? {} : { value: transform(rhs.VALUE) }));\n}\n","import { Config, template, styles } from '@genesislcap/expression-builder';\nexport { Config as ExpressionBuilderConfig };\nexport const ExpressionBuilderCore = {\n template,\n styles,\n};\n/**\n * Based on the RuleExpression config in Kotlin\n */\nexport var RuleExpression;\n(function (RuleExpression) {\n RuleExpression.methodCall = {\n CONTAINS_IGNORE_CASE: 'CONTAINS_IGNORE_CASE',\n CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE: 'CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE',\n IS_NULL_OR_BLANK: 'IS_NULL_OR_BLANK',\n NOT_NULL_OR_BLANK: 'NOT_NULL_OR_BLANK',\n TRIM: 'TRIM',\n LONG_TO_DATE: 'LONG_TO_DATE',\n LONG_TO_DATE_TIME: 'LONG_TO_DATE_TIME',\n DATE_TIME_IS_IN_RANGE: 'DATE_TIME_IS_IN_RANGE',\n };\n RuleExpression.logicalOperations = {\n AND: 'AND',\n OR: 'OR',\n };\n RuleExpression.operations = Object.assign(Object.assign({}, RuleExpression.logicalOperations), { GREATER_THAN: 'GREATER_THAN', LESS_THAN: 'LESS_THAN', GREATER_THAN_OR_EQUAL: 'GREATER_THAN_OR_EQUAL', LESS_THAN_OR_EQUAL: 'LESS_THAN_OR_EQUAL', EQUALS: 'EQUALS', NOT_EQUALS: 'NOT_EQUALS', PLUS: 'PLUS', MINUS: 'MINUS', MULTIPLY: 'MULTIPLY', DIVIDE: 'DIVIDE', BITWISE_AND: 'BITWISE_AND', BITWISE_OR: 'BITWISE_OR', ASSIGNMENT: 'ASSIGNMENT', IS_CURRENT: 'IS_CURRENT', IS_PREVIOUS: 'IS_PREVIOUS' });\n})(RuleExpression || (RuleExpression = {}));\n","import { __decorate } from \"tslib\";\nimport { ExpressionBuilder, template, styles } from '@genesislcap/expression-builder';\nimport { customElement, observable } from '@microsoft/fast-element';\nimport { booleanTypes, dateTypes, groupToRuleExpression, mapFieldTypeToRuleExpressionType, numberTypes, stringTypes, toBinaryExpression, toMethodExpression, toSetValueBinaryExpression, transformRuleValue, rebuildRuleValue, } from './expressions-shared-helpers';\nimport { RuleExpression } from './types';\n/**\n * CONFIG\n */\n/**\n * Combinators for the server expression\n * @internal\n **/\nconst logicalCombinators = [\n {\n type: RuleExpression.logicalOperations.AND,\n maxRules: 'many',\n },\n {\n type: RuleExpression.logicalOperations.OR,\n maxRules: 'many',\n },\n];\n/**\n * Operator names for the server expression\n * Mapped to the RuleExpression names where possible\n * @internal\n **/\nexport const clientOperators = {\n EQUALS: RuleExpression.operations.EQUALS,\n NOT_EQUALS: RuleExpression.operations.NOT_EQUALS,\n IS_NULL: 'IS_NULL',\n NOT_NULL: 'NOT_NULL',\n IS_NULL_OR_BLANK: 'IS_NULL_OR_BLANK',\n NOT_NULL_OR_BLANK: 'NOT_NULL_OR_BLANK',\n CONTAINS: 'CONTAINS',\n CONTAINS_WORDS_STARTING_WITH: 'CONTAINS_WORDS_STARTING_WITH',\n CONTAINS_WORDS_STARTING_SPLIT_DELIMITER: 'CONTAINS_WORDS_STARTING_SPLIT_DELIMITER',\n GREATER_THAN: RuleExpression.operations.GREATER_THAN,\n GREATER_THAN_OR_EQUAL: RuleExpression.operations.GREATER_THAN_OR_EQUAL,\n LESS_THAN: RuleExpression.operations.LESS_THAN,\n LESS_THAN_OR_EQUAL: RuleExpression.operations.LESS_THAN_OR_EQUAL,\n IS_BEFORE: 'IS_BEFORE',\n IS_AFTER: 'IS_AFTER',\n ON_OR_BEFORE: 'ON_OR_BEFORE',\n ON_OR_AFTER: 'ON_OR_AFTER',\n IS_CURRENT: RuleExpression.operations.IS_CURRENT,\n IS_PREVIOUS: RuleExpression.operations.IS_PREVIOUS,\n};\nconst dateRangeValueType = {\n type: 'enum',\n input: 'select',\n values: {\n HOUR: 'HOUR',\n DAY: 'DAY',\n WEEK: 'WEEK',\n MONTH: 'MONTH',\n YEAR: 'YEAR',\n },\n};\n/**\n * Operators for the server expression\n * @internal\n **/\nconst logicalOperators = [\n {\n type: clientOperators.EQUALS,\n nbInputs: 1,\n applyTo: [...stringTypes, ...booleanTypes, ...numberTypes, ...dateTypes],\n tooltip: 'Check the equality of the field compared to a set value',\n },\n {\n type: clientOperators.NOT_EQUALS,\n nbInputs: 1,\n applyTo: [...stringTypes, ...booleanTypes, ...numberTypes, ...dateTypes],\n tooltip: 'Check that the field is different from a set value',\n },\n {\n type: clientOperators.IS_NULL,\n nbInputs: 0,\n applyTo: ['enum', ...booleanTypes, ...numberTypes, ...dateTypes],\n tooltip: 'Check if the field value is null',\n },\n {\n type: clientOperators.NOT_NULL,\n nbInputs: 0,\n applyTo: ['enum', ...booleanTypes, ...numberTypes, ...dateTypes],\n tooltip: 'Check if the field value is not null',\n },\n {\n type: clientOperators.IS_NULL_OR_BLANK,\n nbInputs: 0,\n applyTo: ['string'],\n tooltip: 'Check if the field value is null or an empty string',\n },\n {\n type: clientOperators.NOT_NULL_OR_BLANK,\n nbInputs: 0,\n applyTo: ['string'],\n tooltip: 'Check if the field value is not null and not an empty string',\n },\n {\n type: clientOperators.CONTAINS,\n nbInputs: 1,\n applyTo: ['string'],\n tooltip: 'Check if the field contains the specified text (case insensitive)',\n },\n {\n type: clientOperators.CONTAINS_WORDS_STARTING_WITH,\n nbInputs: 1,\n applyTo: ['string'],\n tooltip: 'Check if the field contains words that start with the specified text, split by whitespace (case insensitive)',\n },\n {\n type: clientOperators.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER,\n nbInputs: 2,\n applyTo: ['string'],\n tooltip: 'Check if field contains words starting with text, split by a delimiter (case insensitive)',\n },\n {\n type: clientOperators.GREATER_THAN,\n nbInputs: 1,\n applyTo: [...numberTypes],\n tooltip: 'Check if the field value is greater than a specified number',\n },\n {\n type: clientOperators.GREATER_THAN_OR_EQUAL,\n nbInputs: 1,\n applyTo: [...numberTypes],\n tooltip: 'Check if the field value is greater than or equal to a specified number',\n },\n {\n type: clientOperators.LESS_THAN,\n nbInputs: 1,\n applyTo: [...numberTypes],\n tooltip: 'Check if the field value is less than a specified number',\n },\n {\n type: clientOperators.LESS_THAN_OR_EQUAL,\n nbInputs: 1,\n applyTo: [...numberTypes],\n tooltip: 'Check if the field value is less than or equal to a specified number',\n },\n {\n type: clientOperators.IS_BEFORE,\n nbInputs: 1,\n applyTo: [...dateTypes],\n tooltip: 'Check if the field is before a specified date/time',\n },\n {\n type: clientOperators.IS_AFTER,\n nbInputs: 1,\n applyTo: [...dateTypes],\n tooltip: 'Check if the field is after a specified date/time',\n },\n {\n type: clientOperators.ON_OR_BEFORE,\n nbInputs: 1,\n applyTo: [...dateTypes],\n tooltip: 'Check if the field is on or before a specified date/time',\n },\n {\n type: clientOperators.ON_OR_AFTER,\n nbInputs: 1,\n applyTo: [...dateTypes],\n tooltip: 'Check if the field is on or after a specified date/time',\n },\n {\n type: clientOperators.IS_CURRENT,\n nbInputs: 1,\n applyTo: [...dateTypes],\n tooltip: 'Check whether the current date/time matches the current hour/day/week/month/year',\n valueType: dateRangeValueType,\n },\n {\n type: clientOperators.IS_PREVIOUS,\n nbInputs: 1,\n applyTo: [...dateTypes],\n tooltip: 'Check whether the current date/time matches the previous hour/day/week/month/year',\n valueType: dateRangeValueType,\n },\n];\n/**\n * Converts a client operator name to a server operator name\n *\n * The opposite to `transformServerNameToOperatorName`\n *\n * @privateRemarks\n * Most names are the same, but this handles cases where date comparison operator names are different\n * on the display to their server name\n *\n * TODO: We could clean this up if we support labels/aliases on the client component\n *\n * @internal\n **/\nexport function transformOperatorNameToServerName(op) {\n switch (op) {\n case 'IS_BEFORE':\n return 'LESS_THAN';\n case 'IS_AFTER':\n return 'GREATER_THAN';\n case 'ON_OR_BEFORE':\n return 'LESS_THAN_OR_EQUAL';\n case 'ON_OR_AFTER':\n return 'GREATER_THAN_OR_EQUAL';\n default:\n return op;\n }\n}\n/**\n * Converts a client `Rule` into the correct server `MethodExpression`\n *\n * @internal\n **/\nexport function ruleToRuleMethodExpression(rule, operatorName) {\n switch (operatorName) {\n case clientOperators.IS_NULL_OR_BLANK:\n return toMethodExpression(rule, RuleExpression.methodCall.IS_NULL_OR_BLANK, []);\n case clientOperators.NOT_NULL_OR_BLANK:\n return toMethodExpression(rule, RuleExpression.methodCall.NOT_NULL_OR_BLANK, []);\n case clientOperators.CONTAINS:\n if (!('value' in rule))\n throw new Error(`Invalid shape for operator CONTAINS`);\n return toMethodExpression(rule, RuleExpression.methodCall.CONTAINS_IGNORE_CASE, [\n { TYPE: 'STRING', VALUE: rule.value },\n ]);\n case clientOperators.CONTAINS_WORDS_STARTING_WITH:\n if (!('value' in rule))\n throw new Error(`Invalid shape for operator CONTAINS_WORDS_STARTING_WITH`);\n return toMethodExpression(rule, RuleExpression.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE, [{ TYPE: 'STRING', VALUE: rule.value }]);\n case clientOperators.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:\n if (!('value' in rule) || !Array.isArray(rule.value) || rule.value.length !== 2)\n throw new Error('Invalid shape for CONTAINS_WORDS_STARTING_SPLIT_DELIMITER');\n return toMethodExpression(rule, RuleExpression.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE, rule.value.map((v) => ({ TYPE: 'STRING', VALUE: v })));\n case clientOperators.IS_CURRENT:\n case clientOperators.IS_PREVIOUS:\n if (!('value' in rule))\n throw new Error(`Invalid shape for operator IS_CURRENT | IS_PREVIOUS`);\n return toMethodExpression(rule, RuleExpression.methodCall.DATE_TIME_IS_IN_RANGE, [\n { TYPE: 'STRING', VALUE: rule.value },\n {\n TYPE: 'STRING',\n VALUE: operatorName === clientOperators.IS_CURRENT ? 'CURRENT' : 'PREVIOUS',\n },\n ]);\n default:\n throw new Error('Unreachable default case');\n }\n}\n/**\n * Converts a client `Rule` into the correct server `Expression`\n *\n * @privateRemarks\n * The server doesn't have a concept for a partial expression so if the user doesn't fill out all values\n * (e.g. chooses a field but not an operator) that would be lost via this process\n *\n * @internal\n **/\nexport function ruleToRuleExpression(ruleInput) {\n var _a, _b;\n // If the user hasn't fully filled out the rule then we just ignore it for the condition\n if (!(((_a = ruleInput.operator) === null || _a === void 0 ? void 0 : _a.type) && ((_b = ruleInput.field) === null || _b === void 0 ? void 0 : _b.fieldId)))\n return null;\n const rule = transformRuleValue(ruleInput);\n const rhsType = mapFieldTypeToRuleExpressionType(rule);\n const operatorName = transformOperatorNameToServerName(rule.operator.type);\n switch (operatorName) {\n case clientOperators.EQUALS:\n case clientOperators.NOT_EQUALS:\n case clientOperators.GREATER_THAN:\n case clientOperators.GREATER_THAN_OR_EQUAL:\n case clientOperators.LESS_THAN:\n case clientOperators.LESS_THAN_OR_EQUAL:\n return toBinaryExpression(rule, operatorName, rhsType);\n case clientOperators.IS_NULL:\n return toSetValueBinaryExpression(rule, RuleExpression.operations.EQUALS, { TYPE: 'NULL' });\n case clientOperators.NOT_NULL:\n return toSetValueBinaryExpression(rule, RuleExpression.operations.NOT_EQUALS, {\n TYPE: 'NULL',\n });\n case clientOperators.IS_NULL_OR_BLANK:\n case clientOperators.NOT_NULL_OR_BLANK:\n case clientOperators.CONTAINS:\n case clientOperators.CONTAINS_WORDS_STARTING_WITH:\n case clientOperators.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:\n case clientOperators.IS_CURRENT:\n case clientOperators.IS_PREVIOUS:\n return ruleToRuleMethodExpression(rule, operatorName);\n default:\n throw new Error(`Unmatched case for operator name: ${operatorName}`);\n }\n}\n/**\n * Converts a server operator name to a client operator name\n *\n * The opposite to `transformOperatorNameToServerName`\n *\n * @privateRemarks\n * Most names are the same, but this handles cases where date comparison operator names are different\n * on the display to their server name\n *\n * TODO: We could clean this up if we support labels/aliases on the client component\n *\n * @internal\n **/\nexport function transformServerNameToOperatorName(op, rulePartialField) {\n const useDateOperatorNames = rulePartialField.field.type === 'date' || rulePartialField.field.type === 'date-time';\n if (!useDateOperatorNames)\n return op;\n switch (op) {\n case 'LESS_THAN':\n return 'IS_BEFORE';\n case 'GREATER_THAN':\n return 'IS_AFTER';\n case 'LESS_THAN_OR_EQUAL':\n return 'ON_OR_BEFORE';\n case 'GREATER_THAN_OR_EQUAL':\n return 'ON_OR_AFTER';\n default:\n return op;\n }\n}\n/**\n * Handles operator names which have a special client name, but serialised to a normal operator on the server\n *\n * @privateRemarks\n * e.g. `NOT_NULL` is a standard NOT_EQUAL BinaryExpression on the server, but a special UniraryOperation on the client\n *\n * @internal\n **/\nexport function rebuildOperator(rulePartialField, binExpr) {\n const operator = (() => {\n if (binExpr.RIGHT.TYPE === 'NULL') {\n const op = binExpr.OPERATION === 'EQUALS'\n ? clientOperators[clientOperators.IS_NULL]\n : clientOperators[clientOperators.NOT_NULL];\n return logicalOperators.find((o) => o.type === op);\n }\n const clientOperatorName = transformServerNameToOperatorName(binExpr.OPERATION, rulePartialField);\n return logicalOperators.find((o) => o.type === clientOperatorName);\n })();\n return Object.assign(Object.assign({}, rulePartialField), { operator });\n}\n/**\n * Converts a server BinaryExpression to a client BinaryOperator\n *\n * The opposite of `toBinaryExpression`\n * @internal\n **/\nexport function fromBinaryExpression(fields, binExpr) {\n if (binExpr.LEFT.TYPE !== 'FIELD')\n throw new Error('BinaryExpression LHS must be TYPE === FIELD');\n if (!['STRING', 'NUMBER', 'BOOLEAN', 'NULL'].includes(binExpr.RIGHT.TYPE))\n throw new Error('BinaryExpression RHS must be TYPE === NUMBER | STRING | BOOLEAN | NULL');\n return rebuildRuleValue(rebuildOperator({\n field: fields.find((f) => f.fieldId === binExpr.LEFT.NAME),\n }, binExpr), binExpr.RIGHT);\n}\nconst TERNARARY_FUNCTION_OPERANDS = 3;\n/**\n * Converts a server MethodExpression to a client BinaryOperator\n *\n * The opposite of `toMethodExpression`\n *\n * @internal\n **/\nexport function fromMethodExpression(fields, methodExpr) {\n const [clientOperatorName, value] = (() => {\n switch (true) {\n case methodExpr.METHOD === 'IS_NULL_OR_BLANK':\n return [clientOperators[clientOperators.IS_NULL_OR_BLANK], undefined];\n case methodExpr.METHOD === 'NOT_NULL_OR_BLANK':\n return [clientOperators[clientOperators.NOT_NULL_OR_BLANK], undefined];\n case methodExpr.METHOD === 'CONTAINS_IGNORE_CASE':\n return [\n clientOperators[clientOperators.CONTAINS],\n methodExpr.PARAMETERS[1].VALUE,\n ];\n case methodExpr.METHOD === 'CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE' &&\n methodExpr.PARAMETERS.length === 2:\n return [\n clientOperators[clientOperators.CONTAINS_WORDS_STARTING_WITH],\n methodExpr.PARAMETERS[1].VALUE,\n ];\n case methodExpr.METHOD === 'CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE' &&\n methodExpr.PARAMETERS.length === TERNARARY_FUNCTION_OPERANDS:\n return [\n clientOperators[clientOperators.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER],\n methodExpr.PARAMETERS.slice(1).map((x) => x.VALUE),\n ];\n case methodExpr.METHOD === RuleExpression.methodCall.DATE_TIME_IS_IN_RANGE &&\n methodExpr.PARAMETERS.length === TERNARARY_FUNCTION_OPERANDS &&\n methodExpr.PARAMETERS[2].TYPE === 'STRING' &&\n (methodExpr.PARAMETERS[2].VALUE === 'CURRENT' ||\n methodExpr.PARAMETERS[2].VALUE === 'PREVIOUS'):\n return [\n clientOperators[methodExpr.PARAMETERS[2].VALUE === 'CURRENT'\n ? clientOperators.IS_CURRENT\n : clientOperators.IS_PREVIOUS],\n methodExpr.PARAMETERS[1].VALUE,\n ];\n default:\n throw new Error('Unhandled fromMethodExpression case');\n }\n })();\n return {\n field: fields.find((f) => f.fieldId === methodExpr.PARAMETERS[0].NAME),\n operator: logicalOperators.find((o) => o.type === clientOperatorName),\n value,\n };\n}\n/**\n * Converts recursively from a PREDICATE_EXPRESSION to client Groups and Rules\n *\n * @internal\n **/\nexport function ruleExpressionToGroup(fields, expr) {\n return {\n combinator: logicalCombinators.find((combinator) => combinator.type === expr.OPERATION),\n children: expr.EXPRESSIONS.map((condition) => {\n if (!('TYPE' in condition))\n throw new Error('RuleExpression format not yet supported - no TYPE');\n if (condition.TYPE === 'PREDICATE_EXPRESSION')\n return ruleExpressionToGroup(fields, condition);\n if (condition.TYPE === 'BINARY_EXPRESSION')\n return fromBinaryExpression(fields, condition);\n if (condition.TYPE === 'METHOD_EXPRESSION')\n return fromMethodExpression(fields, condition);\n throw new Error('RuleExpression format not yet supported - unsupported TYPE');\n }),\n };\n}\n/**\n * We don't create the foundation version of the component in the same way as the other components,\n * they're composed from a base FAST component.\n * The reason for this is that we want to have ExpressionBuilder as an independent and open source\n * component, and due to this we don't want to release it as base components that someone needs to use\n * FAST to compose.\n */\nlet FoundationRuleExpressionBuilder = class FoundationRuleExpressionBuilder extends ExpressionBuilder {\n ruleConfigChanged(_, newConfig) {\n this.config = Object.assign({ combinators: logicalCombinators, operators: logicalOperators, fields: newConfig.fields, maxNesting: newConfig.maxNesting, partialRuleValidationWarning: newConfig.partialRuleValidationWarning }, ((newConfig === null || newConfig === void 0 ? void 0 : newConfig.model)\n ? {\n model: ruleExpressionToGroup(newConfig.fields, newConfig.model),\n }\n : {}));\n }\n configChanged(oldConfig, newConfig) {\n if (newConfig === null)\n return; // handle lazy loading of config\n if (!newConfig.operators || !newConfig.combinators) {\n throw new Error('Unable to detect operators or combinators. Did you set the config on the rule builder via the config property? Use the ruleConfig property instead');\n }\n super.configChanged(oldConfig, newConfig);\n }\n dispatchChangeEvent(group) {\n const ruleExpr = groupToRuleExpression(group, ruleToRuleExpression);\n this.dispatchEvent(new CustomEvent('change', {\n detail: ruleExpr,\n bubbles: true,\n cancelable: true,\n composed: true,\n }));\n }\n};\n__decorate([\n observable\n], FoundationRuleExpressionBuilder.prototype, \"ruleConfig\", void 0);\nFoundationRuleExpressionBuilder = __decorate([\n customElement({\n name: 'foundation-rule-expression-builder',\n styles: styles,\n template,\n })\n], FoundationRuleExpressionBuilder);\nexport { FoundationRuleExpressionBuilder };\n","import { __decorate } from \"tslib\";\nimport { ExpressionBuilder, template, styles, Config } from '@genesislcap/expression-builder';\nimport { customElement, observable } from '@microsoft/fast-element';\nimport { mapFieldTypeToRuleExpressionType, numberTypes, toBinaryExpression, toMethodExpression, transformRuleValue, rebuildRuleValue, } from './expressions-shared-helpers';\nimport { RuleExpression } from './types';\n/**\n * CONFIG\n * TODO: this file doesn't have unit tests, as the unit tests are basically identical to the rule-expression-builder file. Once we properly\n * split responsibilities then everything can receive tests\n */\n/**\n * Operator names for the server expression\n * Mapped to the RuleExpression names where possible\n * @internal\n **/\nconst valueOperatorNames = {\n TRIM: 'TRIM',\n PLUS: 'PLUS',\n MINUS: 'MINUS',\n MULTIPLY: 'MULTIPLY',\n DIVIDE: 'DIVIDE',\n CONVERT_TO_DATE: 'CONVERT_TO_DATE',\n CONVERT_TO_DATE_TIME: 'CONVERT_TO_DATE_TIME',\n};\n/**\n * Operators for the server expression\n * @internal\n **/\nconst valueOperators = [\n // {\n // type: valueOperatorNames.TRIM,\n // applyTo: ['string'],\n // nbInputs: 0,\n // tooltip:\n // \"Returns a string whose value is this string, with all leading and trailing space removed, where space is defined as any character whose codepoint is less than or equal to 'U+0020' (the space character)\",\n // },\n {\n type: valueOperatorNames.PLUS,\n applyTo: [...numberTypes],\n nbInputs: 1,\n tooltip: 'Returns the result of the field value mathematically added to the specified rule value. FIELD + VALUE',\n },\n {\n type: valueOperatorNames.MINUS,\n applyTo: [...numberTypes],\n nbInputs: 1,\n tooltip: 'Returns the result of the field value mathematically subtracted by the specified rule value. FIELD - VALUE',\n },\n {\n type: valueOperatorNames.MULTIPLY,\n applyTo: [...numberTypes],\n nbInputs: 1,\n tooltip: 'Returns the result of the field value mathematically multiplied by the specified rule value. FIELD * VALUE',\n },\n {\n type: valueOperatorNames.DIVIDE,\n applyTo: [...numberTypes],\n nbInputs: 1,\n tooltip: 'Returns the result of the field value mathematically divided by the specified rule value. FIELD / VALUE',\n },\n {\n type: valueOperatorNames.CONVERT_TO_DATE,\n applyTo: ['date'],\n nbInputs: 0,\n tooltip: 'Returns the date, which is stored as the epoch time, as a formatted date YYYY/dd/mm',\n },\n {\n type: valueOperatorNames.CONVERT_TO_DATE_TIME,\n applyTo: ['date-time'],\n nbInputs: 0,\n tooltip: 'Returns the date-time, which is stored as the epoch time, as a formatted date YYYY/dd/mm HH:mm:ss',\n },\n];\n/**\n * Converts a client operator name to a server operator name\n *\n * The opposite to `transformServerNameToOperatorName`\n *\n * @privateRemarks\n * Most names are the same, but this handles cases where date comparison operator names are different\n * on the display to their server name\n *\n * TODO: We could clean this up if we support labels/aliases on the client component\n *\n * @internal\n **/\nfunction transformOperatorNameToServerName(op) {\n switch (op) {\n default:\n return op;\n }\n}\n/**\n * Converts a client `Rule` into the correct server `MethodExpression`\n *\n * @internal\n **/\nfunction ruleToRuleMethodExpression(rule, operatorName) {\n switch (operatorName) {\n case valueOperatorNames.TRIM:\n return toMethodExpression(rule, RuleExpression.methodCall.TRIM, []);\n case valueOperatorNames.CONVERT_TO_DATE:\n return toMethodExpression(rule, RuleExpression.methodCall.LONG_TO_DATE, []);\n case valueOperatorNames.CONVERT_TO_DATE_TIME:\n return toMethodExpression(rule, RuleExpression.methodCall.LONG_TO_DATE_TIME, []);\n }\n}\n/**\n * Converts a client `Rule` into the correct server `Expression`\n *\n * @privateRemarks\n * The server doesn't have a concept for a partial expression so if the user doesn't fill out all values\n * (e.g. chooses a field but not an operator) that would be lost via this process\n *\n * @internal\n **/\nfunction ruleToRuleExpression(ruleInput) {\n var _a, _b;\n // If the user hasn't fully filled out the rule then we just ignore it for the condition\n if (!(((_a = ruleInput.operator) === null || _a === void 0 ? void 0 : _a.type) && ((_b = ruleInput.field) === null || _b === void 0 ? void 0 : _b.fieldId)))\n return null;\n const rule = transformRuleValue(ruleInput);\n const rhsType = mapFieldTypeToRuleExpressionType(rule);\n const operatorName = transformOperatorNameToServerName(rule.operator.type);\n switch (operatorName) {\n case valueOperatorNames.TRIM:\n case valueOperatorNames.CONVERT_TO_DATE:\n case valueOperatorNames.CONVERT_TO_DATE_TIME:\n return ruleToRuleMethodExpression(rule, operatorName);\n case valueOperatorNames.PLUS:\n case valueOperatorNames.MINUS:\n case valueOperatorNames.DIVIDE:\n case valueOperatorNames.MULTIPLY:\n return toBinaryExpression(rule, operatorName, rhsType);\n default:\n throw new Error(`Unmatched case for operator name: ${operatorName}`);\n }\n}\n/**\n * Convert from Genesis to Expression builder\n */\n/**\n * Converts a server operator name to a client operator name\n *\n * The opposite to `transformOperatorNameToServerName`\n *\n * @privateRemarks\n * Most names are the same, but this handles cases where date comparison operator names are different\n * on the display to their server name\n *\n * TODO: We could clean this up if we support labels/aliases on the client component\n *\n * @internal\n **/\nfunction transformServerNameToOperatorName(op, rulePartialField) {\n // TODO: this function usage doens't need to do anything because all binary expression operator names match on client and server\n // for now\n const useDateOperatorNames = rulePartialField.field.type === 'date' || rulePartialField.field.type === 'date-time';\n if (!useDateOperatorNames)\n return op;\n switch (op) {\n default:\n return op;\n }\n}\n/**\n * Handles operator names which have a special client name, but serialised to a normal operator on the server\n *\n * @internal\n **/\nfunction rebuildOperator(rulePartialField, binExpr) {\n const operator = (() => {\n const clientOperatorName = transformServerNameToOperatorName(binExpr.OPERATION, rulePartialField);\n return valueOperators.find((o) => o.type === clientOperatorName);\n })();\n return Object.assign(Object.assign({}, rulePartialField), { operator });\n}\n/**\n * Converts a server BinaryExpression to a client BinaryOperator\n *\n * The opposite of `toBinaryExpression`\n * @internal\n **/\nfunction fromBinaryExpression(fields, binExpr) {\n if (binExpr.LEFT.TYPE !== 'FIELD')\n throw new Error('BinaryExpression LHS must be TYPE === FIELD');\n if (!['STRING', 'NUMBER', 'BOOLEAN', 'NULL'].includes(binExpr.RIGHT.TYPE))\n throw new Error('BinaryExpression RHS must be TYPE === NUMBER | STRING | BOOLEAN | NULL');\n return rebuildRuleValue(rebuildOperator({\n field: fields.find((f) => f.fieldId === binExpr.LEFT.NAME),\n }, binExpr), binExpr.RIGHT);\n}\n/**\n * Converts a server MethodExpression to a client BinaryOperator\n *\n * The opposite of `toMethodExpression`\n *\n * @internal\n **/\nfunction fromMethodExpression(fields, methodExpr) {\n const [clientOperatorName, value] = (() => {\n switch (true) {\n case methodExpr.METHOD === 'TRIM':\n return [valueOperatorNames[valueOperatorNames.TRIM], undefined];\n case methodExpr.METHOD === 'LONG_TO_DATE':\n return [valueOperatorNames[valueOperatorNames.CONVERT_TO_DATE], undefined];\n case methodExpr.METHOD === 'LONG_TO_DATE_TIME':\n return [valueOperatorNames[valueOperatorNames.CONVERT_TO_DATE_TIME], undefined];\n default:\n throw new Error('Unhandled fromMethodExpression case');\n }\n })();\n return {\n field: fields.find((f) => f.fieldId === methodExpr.PARAMETERS[0].NAME),\n operator: valueOperators.find((o) => o.type === clientOperatorName),\n value,\n };\n}\n/**\n * Converts recursively from a PREDICATE_EXPRESSION to client Groups and Rules\n *\n * @internal\n **/\nfunction ruleExpressionToGroup(fields, expr) {\n return {\n combinator: Config.NULL_COMBINATOR,\n children: expr.EXPRESSIONS.map((condition) => {\n if (!('TYPE' in condition))\n throw new Error('RuleExpression format not yet supported - no TYPE');\n if (condition.TYPE === 'PREDICATE_EXPRESSION')\n return ruleExpressionToGroup(fields, condition);\n if (condition.TYPE === 'BINARY_EXPRESSION')\n return fromBinaryExpression(fields, condition);\n if (condition.TYPE === 'METHOD_EXPRESSION')\n return fromMethodExpression(fields, condition);\n throw new Error('RuleExpression format not yet supported - unsupported TYPE');\n }),\n };\n}\n/**\n * We don't create the foundation version of the component in the same way as the other components,\n * they're composed from a base FAST component.\n * The reason for this is that we want to have ExpressionBuilder as an independent and open source\n * component, and due to this we don't want to release it as base components that someone needs to use\n * FAST to compose.\n */\nlet FoundationValueExpressionBuilder = class FoundationValueExpressionBuilder extends ExpressionBuilder {\n valueConfigChanged(_, newConfig) {\n const topLevelPredicateExpr = {\n TYPE: 'PREDICATE_EXPRESSION',\n OPERATION: 'NULL',\n EXPRESSIONS: newConfig.model ? [newConfig.model] : [],\n };\n const model = ruleExpressionToGroup(newConfig.fields, topLevelPredicateExpr);\n this.config = {\n combinators: [Config.NULL_COMBINATOR],\n operators: valueOperators,\n fields: newConfig.fields,\n model,\n maxNesting: newConfig.maxNesting,\n partialRuleValidationWarning: newConfig.partialRuleValidationWarning,\n };\n }\n configChanged(oldConfig, newConfig) {\n if (newConfig === null)\n return; // handle lazy loading of config\n if (!newConfig.operators || !newConfig.combinators) {\n throw new Error('Unable to detect operators or combinators. Did you set the config on the rule builder via the config property? Use the valueConfig property instead');\n }\n super.configChanged(oldConfig, newConfig);\n }\n dispatchChangeEvent(group) {\n if (!('children' in group))\n throw new Error('Invalid top level group hierarchy');\n if (group.children.length > 1)\n throw new Error('Value expressions should not have multiple rules');\n if (group.children[0] && 'children' in group.children[0])\n throw new Error('Trying to convert group to rule');\n const maybeValueExpr = group.children.length === 0\n ? undefined\n : ruleToRuleExpression(group.children[0]);\n this.dispatchEvent(new CustomEvent('change', {\n detail: maybeValueExpr,\n bubbles: true,\n cancelable: true,\n composed: true,\n }));\n }\n};\n__decorate([\n observable\n], FoundationValueExpressionBuilder.prototype, \"valueConfig\", void 0);\nFoundationValueExpressionBuilder = __decorate([\n customElement({\n name: 'foundation-value-expression-builder',\n styles: styles,\n template,\n })\n], FoundationValueExpressionBuilder);\nexport { FoundationValueExpressionBuilder };\n","import { html, ref } from '@microsoft/fast-element';\nexport const foundationNotificationListenerTemplate = html `\n <template ${ref('notificationListener')}>\n <slot></slot>\n </template>\n`;\n","/**\n * @public\n * enum for different types of notification events\n */\nexport var NotificationEvent;\n(function (NotificationEvent) {\n NotificationEvent[\"NOTIFICATION_EVENT\"] = \"notification-event\";\n})(NotificationEvent || (NotificationEvent = {}));\n","import { __awaiter, __decorate } from \"tslib\";\nimport { Datasource, dataServerResultFilter, Connect, } from '@genesislcap/foundation-comms';\nimport { showNotificationToast } from '@genesislcap/foundation-notifications';\nimport { NotificationEvent, showNotification, } from '@genesislcap/foundation-notifications';\nimport { attr, nullableNumberConverter, observable } from '@microsoft/fast-element';\nimport { FoundationElement } from '@microsoft/fast-foundation';\nimport { logger } from '../utils';\nimport { foundationNotificationListenerTemplate as template } from './notification-listener.template';\nexport const foundationNotificationListenerShadowOptions = {\n mode: 'open',\n delegatesFocus: true,\n};\n/**\n * @tagname %%prefix%%-notification-listener\n */\nexport class NotificationListener extends FoundationElement {\n constructor() {\n super(...arguments);\n /**\n * Number of milliseconds before toast will disappear. Leave empty or set to 0 to keep toast open indefinitely\n * @public\n */\n this.closeTimeout = 0;\n /**\n * Array of buttons for notification toasts\n * @public\n */\n this.toastButtons = [];\n }\n connectedCallback() {\n const _super = Object.create(null, {\n connectedCallback: { get: () => super.connectedCallback }\n });\n return __awaiter(this, void 0, void 0, function* () {\n _super.connectedCallback.call(this);\n this.addEventListener(NotificationEvent.NOTIFICATION_EVENT, (e) => {\n e.stopImmediatePropagation();\n showNotification(e.detail, this.tagName, this.notificationListener);\n });\n this.connectionSub = this.connect.isConnected$.subscribe((isConnected) => __awaiter(this, void 0, void 0, function* () {\n if (isConnected) {\n yield this.handleReconnection();\n }\n }));\n });\n }\n /**\n * Handles reconnection logic when the connection is established\n * @private\n */\n handleReconnection() {\n return __awaiter(this, void 0, void 0, function* () {\n if (!this.resourceName) {\n return;\n }\n yield this.initializeDatasource();\n this.setupDataSubscription();\n });\n }\n /**\n * Initializes the datasource for the notification resource\n * @private\n */\n initializeDatasource() {\n return __awaiter(this, void 0, void 0, function* () {\n var _a;\n if ((_a = this.datasource) === null || _a === void 0 ? void 0 : _a.initialized) {\n this.datasource.destroy();\n }\n const initOK = yield this.datasource.init({ resourceName: this.resourceName }, true);\n if (!initOK) {\n throw new Error(`Failed to initialize datasource for ${this.resourceName}`);\n }\n });\n }\n /**\n * Sets up the data subscription to handle incoming notifications\n * @private\n */\n setupDataSubscription() {\n if (!this.datasource.stream) {\n logger.warn(`No stream available for ${this.resourceName}`);\n return;\n }\n this.dataSub = this.datasource.stream.subscribe((result) => {\n if (result.ROW && result.SEQUENCE_ID > 1) {\n this.handleStreamUpdate(dataServerResultFilter(result));\n }\n });\n }\n disconnectedCallback() {\n var _a, _b, _c;\n super.disconnectedCallback();\n /**\n * Attempt to clean up after ourselves.\n */\n (_a = this.dataSub) === null || _a === void 0 ? void 0 : _a.unsubscribe();\n delete this.dataSub;\n (_b = this.connectionSub) === null || _b === void 0 ? void 0 : _b.unsubscribe();\n delete this.connectionSub;\n (_c = this.datasource) === null || _c === void 0 ? void 0 : _c.destroy();\n delete this.datasource;\n }\n handleStreamUpdate(dataServerResult) {\n const rows = dataServerResult.inserts;\n if (rows.length > 0) {\n rows.forEach((row) => {\n this.showNotificationToast(row);\n });\n }\n }\n showNotificationToast(row) {\n const { HEADER: title, MESSAGE: message, NOTIFY_SEVERITY: type } = row;\n const createdAt = row.CREATED_AT ? new Date(row.CREATED_AT) : undefined;\n const expiry = row.EXPIRY ? row.EXPIRY - row.CREATED_AT : undefined;\n let buttons = [];\n if (this.toastButtons && this.toastButtons.length > 0) {\n buttons = this.toastButtons.filter(({ condition }) => !!condition ? condition({ details: row }) : true);\n }\n const toastStructure = {\n title: title,\n body: message,\n createdAt: createdAt,\n toast: {\n details: row,\n type: type === null || type === void 0 ? void 0 : type.toLowerCase(),\n buttons: buttons,\n autoClose: expiry !== undefined ? !!expiry : !!this.closeTimeout,\n closeTimeout: expiry !== null && expiry !== void 0 ? expiry : this.closeTimeout,\n position: this.toastPosition,\n },\n };\n showNotificationToast(toastStructure, this.tagName);\n }\n}\n__decorate([\n observable\n], NotificationListener.prototype, \"notificationListener\", void 0);\n__decorate([\n Connect\n], NotificationListener.prototype, \"connect\", void 0);\n__decorate([\n attr({ attribute: 'resource-name' })\n], NotificationListener.prototype, \"resourceName\", void 0);\n__decorate([\n attr({ attribute: 'close-timeout', converter: nullableNumberConverter })\n], NotificationListener.prototype, \"closeTimeout\", void 0);\n__decorate([\n observable\n], NotificationListener.prototype, \"toastButtons\", void 0);\n__decorate([\n attr({ attribute: 'toast-position' })\n], NotificationListener.prototype, \"toastPosition\", void 0);\n__decorate([\n Datasource\n], NotificationListener.prototype, \"datasource\", void 0);\n/**\n * The Foundation Notification Listener\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-notification-listener\\>\n */\nexport const foundationNotificationListener = NotificationListener.compose({\n baseName: 'notification-listener',\n template,\n shadowOptions: foundationNotificationListenerShadowOptions,\n});\n","import { FASTElement } from '@microsoft/fast-element';\nconst defaultDefinitionOverrider = (base) => (override) => (Object.assign(Object.assign({}, base), override));\n/**\n * Defines a platform custom element based on the provided type and definition.\n *\n * @example\n * An example using custom definition merge logic, useful if you need to impose hard restrictions.\n * ```ts\n * const definitionOverrider = (definition) => ({\n * ...baseDefinition,\n * ...definition,\n * styles: baseDefinition.styles,\n * shadowOptions: {\n * mode: 'closed,\n * },\n * });\n * export const define = defineFactory(LoginForm, definitionOverrider);\n * ```\n *\n * @example\n * You can provide the base definition if you're happy with the default spread operator merge logic.\n * ```ts\n * export const define = defineFactory(LoginForm, baseDefinition);\n * ```\n *\n * @param Type - The custom element Type / Class to define.\n * @param overriderOrBase - A function that merges definitions, or the base definition if custom merging is not needed.\n * @returns The type class.\n */\nexport const defineFactory = (Type, overriderOrBase) => (definition) => {\n const overrider = typeof overriderOrBase === 'function'\n ? overriderOrBase\n : defaultDefinitionOverrider(overriderOrBase);\n return FASTElement.define(class extends Type {\n }, overrider(definition));\n};\n","// TODO: Remove after upgrade to latest fast-element or proxy the underlying version\nimport { FASTElementDefinition } from '@microsoft/fast-element';\n/**\n * Determines what HTML tag name to use for the dependency.\n * @param dependency - The dependency the template is dependent on.\n * @returns The tag name to use in markup.\n * @beta\n */\nexport function tagFor(dependency) {\n if (typeof dependency === 'string') {\n return dependency;\n }\n if (typeof dependency === 'function') {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n dependency = FASTElementDefinition.forType(dependency); // < using forType instead of getByType for now...\n if (!dependency) {\n throw new Error('Missing FASTElement definition.');\n }\n }\n return dependency.name;\n}\n","import { DI } from '@microsoft/fast-foundation';\nimport Analytics from 'analytics';\nimport { logger } from '../utils';\n/**\n * Analytics event types\n * @public\n */\nexport var FoundationAnalyticsEventType;\n(function (FoundationAnalyticsEventType) {\n FoundationAnalyticsEventType[\"controlClicked\"] = \"controlClicked\";\n FoundationAnalyticsEventType[\"routeChanged\"] = \"routeChanged\";\n})(FoundationAnalyticsEventType || (FoundationAnalyticsEventType = {}));\n/**\n * The default implementation for the FoundationAnalytics interface.\n * @public\n */\nexport class DefaultFoundationAnalytics {\n /**\n * TODO: Remove the static config.\n * We could register a config with the container at startup and have it injected here or remove the constructor and\n * define a method call.\n */\n constructor(config) {\n this.analytics = Analytics(config);\n }\n trackEvent(eventName, payload) {\n logger.debug(`FoundationAnalytics.trackEvent ${eventName} : ${JSON.stringify(payload)}`);\n this.analytics.track(eventName, payload);\n }\n}\n/**\n * The DI token for the FouundationAnalytics interface.\n * @internal\n */\nexport const FoundationAnalytics = DI.createInterface((x) => x.singleton(DefaultFoundationAnalytics));\n/**\n * Manual usage example:\n *\n * FoundationAnalyticsService.trackEvent(FoundationAnalyticsEventType.routeChanged, {\n * path: \"settings\",\n * });\n *\n * See login mf.\n */\n","import { createLogger } from '@genesislcap/foundation-logger';\n/**\n * @beta\n */\nexport const routerLogger = createLogger('foundation-router');\n","import { DefaultRouter as DefaultFASTRouter, Router as FASTRouter, } from '@microsoft/fast-router';\n/**\n * @beta\n */\nexport const routerProperty = '$router';\n/**\n * @beta\n */\nexport const Router = Object.freeze({\n getOrCreateFor: (element) => {\n const router = element[routerProperty];\n if (router !== void 0) {\n return router;\n }\n return (element[routerProperty] = new DefaultRouter(element));\n },\n find: (element) => FASTRouter.find(element),\n from: (BaseType) => FASTRouter.from(BaseType),\n});\n/**\n * @beta\n */\nexport class DefaultRouter extends DefaultFASTRouter {\n}\n","import { childRouteParameter, RouterConfiguration } from '@microsoft/fast-router';\nimport { Router } from './router';\n/**\n * @remarks\n * Cached regex for detecting if a URL is absolute,\n * i.e., starts with a scheme or is scheme-relative.\n * See http://www.ietf.org/rfc/rfc2396.txt section 3.1 for valid scheme format\n */\nconst absoluteUrl = /^([a-z][a-z0-9+\\-.]*:)?\\/\\//i;\n/**\n * @beta\n */\nexport function isAbsoluteUrl(url) {\n return absoluteUrl.test(url);\n}\n/**\n * @beta\n * @privateRemarks\n * This function not only finds config it checks if it's a RouterConfiguration instance.\n */\nexport function findRouter(relativeTo) {\n return relativeTo['config'] instanceof RouterConfiguration\n ? relativeTo\n : Router.find(relativeTo);\n}\n/**\n * @beta\n */\nexport function findParentRouter(relativeTo) {\n return findRouter(relativeTo).parent;\n}\n/**\n * @beta\n */\nexport function findTopLevelRouter(relativeTo) {\n let router = findRouter(relativeTo);\n while (router && router.level > 0) {\n router = router.parent;\n }\n return router;\n}\n/**\n * @beta\n */\nexport function pathJoin(parts, separator = '/', allowTrailingSeparator = false) {\n const fullPath = parts.join(separator).replace(new RegExp(separator + '{1,}', 'g'), separator);\n if (!allowTrailingSeparator && fullPath.endsWith(separator)) {\n return fullPath.slice(0, -1);\n }\n return fullPath;\n}\n/**\n * @beta\n *\n * @example\n * ```text\n * /app/auth/forgot-password >> /app/auth\n * /app/auth >> /app\n * /app >> /app\n * ```\n */\nexport function removeLastPathSegment(path, separator = '/') {\n const segments = path.split(separator);\n /**\n * Handle one slash input like /app, just return it as is\n */\n if (segments.length === 2 && segments[0] === '' && segments[1] !== '') {\n return path;\n }\n if (segments.length > 1) {\n segments.pop();\n }\n return segments.join(separator);\n}\n/**\n * @beta\n *\n * @example\n * ```text\n * /app/auth/*fast-child-route >> /app/auth\n * ```\n */\nexport function removeChildRouteParameter(path) {\n return path.replace(`/*${childRouteParameter}`, '');\n}\n","import { __awaiter } from \"tslib\";\n/* eslint-disable no-await-in-loop */\nimport { Route as FASTRoute } from '@microsoft/fast-router';\nimport { findRouter, isAbsoluteUrl } from './utils';\n/**\n * @beta\n * @privateRemarks\n * Many micro frontends inject a `config`, and this property will clash with internal router logic where this property\n * name is expected to be router configuration. Using a refined `findRouter` util to obtain the actual router reference.\n * The Route API from fast-router is frozen, so unfortunately we'll need to patch it in a new export.\n */\nexport const FoundationRouteNav = Object.freeze({\n path: Object.freeze({\n get current() {\n return FASTRoute.path.current;\n },\n generateRoute: (relativeTo_1, path_1, ...args_1) => __awaiter(void 0, [relativeTo_1, path_1, ...args_1], void 0, function* (relativeTo, path, params = {}) {\n let router = findRouter(relativeTo);\n while (router !== null) {\n const p = yield router.config.generateRouteFromPath(path, params);\n if (p !== null) {\n return p;\n }\n router = router.parent;\n }\n return null;\n }),\n push: (path, trigger = true) => {\n if (path && isAbsoluteUrl(path)) {\n location.href = path;\n return;\n }\n history.pushState({}, document.title, path);\n if (trigger) {\n FoundationRouteNav.path.trigger(path);\n }\n },\n replace: (path, trigger = true) => {\n if (path && isAbsoluteUrl(path)) {\n location.href = path;\n return;\n }\n history.replaceState({}, document.title, path);\n if (trigger) {\n FoundationRouteNav.path.trigger(path);\n }\n },\n trigger: (path) => {\n FASTRoute.path.trigger(path);\n },\n }),\n name: Object.freeze({\n generateRoute: (relativeTo_1, name_1, ...args_1) => __awaiter(void 0, [relativeTo_1, name_1, ...args_1], void 0, function* (relativeTo, name, params = {}) {\n let router = findRouter(relativeTo);\n while (router !== null) {\n const path = yield router.config.generateRouteFromName(name, params);\n if (path !== null) {\n return path;\n }\n router = router.parent;\n }\n return null;\n }),\n push: (relativeTo_1, name_1, ...args_1) => __awaiter(void 0, [relativeTo_1, name_1, ...args_1], void 0, function* (relativeTo, name, params = {}, trigger = true) {\n const path = yield FoundationRouteNav.name.generateRoute(relativeTo, name, params);\n if (path !== null) {\n FoundationRouteNav.path.push(path, trigger);\n }\n }),\n replace: (relativeTo_1, name_1, ...args_1) => __awaiter(void 0, [relativeTo_1, name_1, ...args_1], void 0, function* (relativeTo, name, params = {}, trigger = true) {\n const path = yield FoundationRouteNav.name.generateRoute(relativeTo, name, params);\n if (path !== null) {\n FoundationRouteNav.path.replace(path, trigger);\n }\n }),\n trigger: (relativeTo_1, name_1, ...args_1) => __awaiter(void 0, [relativeTo_1, name_1, ...args_1], void 0, function* (relativeTo, name, params = {}) {\n const path = yield FoundationRouteNav.name.generateRoute(relativeTo, name, params);\n if (path !== null) {\n FoundationRouteNav.path.trigger(path);\n }\n }),\n }),\n});\n","/**\n * @beta\n */\nexport const defaultNavItemPredicate = (item) => !item.navId || item.navId === 'header' || item.navId === 'side-nav';\n/**\n * @beta\n */\nexport const defaultPlacementIndexPadding = 10;\n/**\n * Get navigation items from routes.\n * @beta\n */\nexport function getNavItems(routes, predicate = defaultNavItemPredicate, placementIndexPadding = defaultPlacementIndexPadding) {\n const items = [];\n routes\n .filter((route) => route.navItems && route.navItems.some(predicate))\n .forEach((route, routeIndex) => {\n route.navItems\n .filter(predicate)\n .map((item, navItemIndex) => {\n var _a, _b, _c, _d;\n /**\n * Best guess placementIndex\n */\n const placementIndex = (_a = item.placementIndex) !== null && _a !== void 0 ? _a : routeIndex * placementIndexPadding + navItemIndex;\n /**\n * Map metadata not explicitly set\n */\n return Object.assign(Object.assign({}, item), { navId: (_b = item.navId) !== null && _b !== void 0 ? _b : 'header', placementIndex, routePath: (_c = item.routePath) !== null && _c !== void 0 ? _c : route.path, routeName: (_d = item.routeName) !== null && _d !== void 0 ? _d : route.name });\n })\n .forEach((item) => items.push(item));\n });\n /**\n * Returned sorted items based on placementIndex\n */\n return items.sort((a, b) => a.placementIndex - b.placementIndex);\n}\n","import { __decorate } from \"tslib\";\nimport { observable } from '@microsoft/fast-element';\nimport { RouteCollection } from '@microsoft/fast-router';\nimport { routerLogger } from './logger';\n/**\n * @beta\n */\nexport class FoundationRouteCollection extends RouteCollection {\n constructor() {\n super(...arguments);\n this.definitions = [];\n }\n map(...routes) {\n const owner = this['owner'];\n const parent = owner.parent;\n const isTopLevelRouter = !parent;\n const basename = owner.basename;\n const isOnSubPath = basename !== '' && basename !== '/';\n const isRoutePathRemapRequired = isTopLevelRouter && isOnSubPath;\n if (isRoutePathRemapRequired) {\n routerLogger.debug(`Route paths remap required due to detected sub-path deployment`);\n routes = routes.map((route) => {\n if (!route.path) {\n return route;\n }\n if (route.path.startsWith(basename)) {\n routerLogger.debug(`'${route.path}' path okay as is`);\n return route;\n }\n const delim = route.path.charAt(0) !== '/' ? '/' : '';\n const modifiedPath = `${basename}${delim}${route.path}`;\n routerLogger.debug(`'${route.path}' path modified to '${modifiedPath}'`);\n return Object.assign(Object.assign({}, route), { path: modifiedPath });\n });\n }\n this.definitions = [...routes, ...this.definitions];\n super.map(...routes);\n }\n}\n__decorate([\n observable\n], FoundationRouteCollection.prototype, \"definitions\", void 0);\n","import { __awaiter, __decorate } from \"tslib\";\nimport { FoundationAnalytics, FoundationAnalyticsEventType, Session, } from '@genesislcap/foundation-comms';\nimport { User } from '@genesislcap/foundation-user';\nimport { PUBLIC_PATH } from '@genesislcap/foundation-utils';\nimport { Container } from '@microsoft/fast-foundation';\nimport { RouterConfiguration, QueryString } from '@microsoft/fast-router';\nimport { routerLogger } from './logger';\nimport { FoundationRouteNav } from './navigation';\nimport { defaultNavItemPredicate, getNavItems, } from './navItems';\nimport { FoundationRouteCollection } from './routes';\nimport { pathJoin, removeChildRouteParameter } from './utils';\n/**\n * @beta\n */\nexport class FoundationRouterConfiguration extends RouterConfiguration {\n constructor() {\n super();\n this.logger = routerLogger;\n this.loginPath = 'login';\n this.notFoundPath = 'not-found';\n this.notPermittedPath = 'not-permitted';\n this.routes = new FoundationRouteCollection(this);\n /**\n * @privateRemarks\n * PBC routes are added to the routes collection before a foundation-router is connected to the dom. As such, we\n * can't rely on foundation-router to configure the basename ahead of mapping.\n */\n this.basename = PUBLIC_PATH;\n this.routes = new FoundationRouteCollection(this);\n }\n /**\n * @remarks\n * Get navigation items from the route definitions.\n */\n getNavItems(predicate = defaultNavItemPredicate) {\n return getNavItems(this.routes.definitions, predicate);\n }\n /**\n * @remarks\n * Applies the analytics service to the navigate phase.\n */\n configureAnalytics() {\n this.contributors.push({\n navigate: (phase) => __awaiter(this, void 0, void 0, function* () {\n this.analytics.trackEvent(FoundationAnalyticsEventType.routeChanged, {\n path: phase.route.endpoint.path,\n });\n }),\n });\n }\n /**\n * @remarks\n * Adds route permitted checks to the navigate phase.\n */\n configureRoutePermittedChecks() {\n this.contributors.push({\n navigate: (phase) => __awaiter(this, void 0, void 0, function* () {\n var _a;\n const { settings } = phase.route;\n if (((_a = settings === null || settings === void 0 ? void 0 : settings.isPermitted) === null || _a === void 0 ? void 0 : _a.call(settings)) === false) {\n phase.cancel(() => {\n var _a, _b;\n if (!this.user.isAuthenticated) {\n this.user.trackPath();\n FoundationRouteNav.name.replace(phase.router, this.loginPath);\n }\n else {\n const path = (_b = (_a = settings.notPermittedPath) === null || _a === void 0 ? void 0 : _a.call(settings)) !== null && _b !== void 0 ? _b : this.notPermittedPath;\n this.logger.debug(`User not permitted to access route. Re-routing to ${path}.`);\n FoundationRouteNav.name.replace(phase.router, path);\n }\n });\n }\n }),\n });\n }\n /**\n * @remarks\n * Adds a fallback route.\n */\n configureFallbackRouteDefinition() {\n this.routes.fallback(() => {\n let redirect = { redirect: this.notFoundPath };\n if (!this.user.isAuthenticated) {\n this.user.trackPath();\n this._session.captureReturnUrl(); // < will be removed during v15 cleanup\n redirect = { redirect: this.loginPath };\n }\n this.logger.debug(`Route unresolved. Re-routing to ${redirect.redirect}.`);\n return redirect;\n });\n }\n /**\n * @remarks\n * Navigate to the login page during a NavigationPhase.\n */\n navigationPhaseLoginRedirect(phase) {\n phase.cancel(() => {\n this.user.trackPath();\n this._session.captureReturnUrl(); // < will be removed during v15 cleanup\n FoundationRouteNav.name.replace(phase.router, this.loginPath);\n });\n }\n /**\n * @privateRemarks\n * Note that this method is called on the router closest to the caller. It will apply the basename at this level to\n * the path that is generated based the local name provided. Navigating with the Route.name APIs instead of\n * the Route.path APIs is preferred, as it removes path complexity from callers in sub path deployment contexts.\n */\n generateRouteFromName(name, params) {\n const _super = Object.create(null, {\n generateRouteFromName: { get: () => super.generateRouteFromName }\n });\n return __awaiter(this, void 0, void 0, function* () {\n const path = yield _super.generateRouteFromName.call(this, name, params);\n return path ? this.generateNavigationPath(path) : null;\n });\n }\n navigateTo(config) {\n return __awaiter(this, void 0, void 0, function* () {\n if (config.name) {\n if (!this.relativeTo) {\n this.logger.error('unable to navigate by name as the relativeTo router is not set');\n }\n yield FoundationRouteNav.name.push(this.relativeTo, config.name, config.params, config.trigger);\n return;\n }\n if (config.path) {\n FoundationRouteNav.path.push(this.generateNavigationPath(config.path, config.params), config.trigger);\n return;\n }\n });\n }\n /**\n * @privateRemarks\n * See notes on generateRouteFromName above.\n */\n generateNavigationPath(path, params) {\n const basename = this.getNavigationPathBasename();\n const queryString = QueryString.build(params);\n let fullPath = basename && !path.startsWith(basename) ? pathJoin([basename, path]) : path;\n fullPath = queryString ? `${fullPath}?${queryString}` : fullPath;\n return fullPath;\n }\n getNavigationPathBasename() {\n var _a, _b;\n const parent = this.parent;\n const parentRoutePath = (_b = (_a = parent === null || parent === void 0 ? void 0 : parent.relativeTo) === null || _a === void 0 ? void 0 : _a.route) === null || _b === void 0 ? void 0 : _b.endpoint.route.path;\n if (parentRoutePath) {\n return removeChildRouteParameter(parentRoutePath);\n }\n if (this.basename) {\n return this.basename;\n }\n return '';\n }\n construct(Type) {\n return this.container.get(Type);\n }\n}\n__decorate([\n Container\n], FoundationRouterConfiguration.prototype, \"container\", void 0);\n__decorate([\n FoundationAnalytics\n], FoundationRouterConfiguration.prototype, \"analytics\", void 0);\n__decorate([\n User\n], FoundationRouterConfiguration.prototype, \"user\", void 0);\n__decorate([\n Session\n], FoundationRouterConfiguration.prototype, \"_session\", void 0);\n","/**\n * @beta\n */\nexport const NavigateToEventType = 'navigate-to';\n/**\n * @beta\n */\nexport const GenerateNavigationPathEventType = 'generate-navigation-path';\n","import { __awaiter, __decorate } from \"tslib\";\nimport { customElement, DOM, FASTElement } from '@microsoft/fast-element';\nimport { GenerateNavigationPathEventType, NavigateToEventType, } from './events';\nimport { routerLogger } from './logger';\nimport { Router, routerProperty } from './router';\n/**\n * @beta\n * @privateRemarks\n * Created to patch an issue and act as a placeholder to improve the api ahead of upgrading to the latest. Depending on\n * how much we build on this, we may want to promote it to its own package.\n */\nlet FoundationRouter = class FoundationRouter extends Router.from(FASTElement) {\n constructor() {\n super(...arguments);\n this.logger = routerLogger;\n this.onNavigateTo = (event) => {\n event.stopImmediatePropagation();\n this.config.navigateTo(event.detail);\n };\n this.onGenerateNavigationPath = (event) => {\n /**\n * May need to continue to the top most router\n */\n event.stopImmediatePropagation();\n const { path, params, callback } = event.detail;\n if (!callback) {\n return;\n }\n const fullPath = this.config.generateNavigationPath(path, params);\n callback(fullPath);\n };\n }\n get router() {\n return this[routerProperty];\n }\n connectedCallback() {\n var _a;\n var _b;\n super.connectedCallback();\n if (this.config['isConfigured']) {\n return;\n }\n /**\n * Provide relative router access to the config for navigation purposes\n */\n (_a = (_b = this.config).relativeTo) !== null && _a !== void 0 ? _a : (_b.relativeTo = this.router);\n /**\n * Tactical patch for Safari 16\n * {@link https://genesisglobal.atlassian.net/browse/PA-226}\n *\n * Explicitly set the config on the $router property when we connect to the DOM and ensure connect() is called.\n */\n DOM.queueUpdate(() => __awaiter(this, void 0, void 0, function* () {\n if (!this.router.config) {\n this.router.config = this.config; // < calls connect()\n }\n else {\n this.router.connect();\n }\n }));\n this.addEventListeners();\n }\n disconnectedCallback() {\n super.disconnectedCallback();\n this.removeEventListeners();\n }\n addEventListeners() {\n this.addEventListener(NavigateToEventType, this.onNavigateTo);\n this.addEventListener(GenerateNavigationPathEventType, this.onGenerateNavigationPath);\n }\n removeEventListeners() {\n this.removeEventListener(NavigateToEventType, this.onNavigateTo);\n this.removeEventListener(GenerateNavigationPathEventType, this.onGenerateNavigationPath);\n }\n};\nFoundationRouter = __decorate([\n customElement({\n name: 'foundation-router',\n })\n], FoundationRouter);\nexport { FoundationRouter };\n","import { html, slotted, when } from '@microsoft/fast-element';\nimport { TabsOrientation } from '@microsoft/fast-foundation';\nimport { classNames } from '@microsoft/fast-web-utilities';\nimport { getPrefix } from '../utils';\nexport const getPrefixedStepper = (prefix) => html `\n\n<${prefix}-card class=${(x) => classNames('stepper-tab', ['stepper-tab-hidden', x.hideTabs])} part=\"stepper-tab\" @tab-clicked=\"${(x, c) => x.handleStepClick(c.event.detail)}\" role=\"stepper-tab\" data-test-id=\"stepper-tab\">\n <div class=${(x) => classNames('stepper-tab-menu', ['stepper-tab-menu-hidden', x.hideTabs])} part=\"stepper-tab-menu\">\n <slot name=\"tab\" ${slotted('tabs')} ></slot>\n </div>\n ${when((x) => x.orientation === TabsOrientation.vertical, html `\n <div class=\"stepper-tab-progress\" part=\"stepper-tab-progress\">\n <${prefix}-progress-ring class=\"progress-ring\" part=\"progress-ring\" value=${(x) => x.progressValue}></${prefix}-progress-ring>\n <label>You have completed ${(x) => x.progressValue}% of the fields required to create a project</label>\n </div>`)}\n </${prefix}-card>\n <${prefix}-card class=\"stepper-tab-panel\" part=\"stepper-tab-panel\" data-test-id=\"stepper-tab-panel\">\n <div class=\"stepper-panel-container\" part=\"stepper-panel-container\">\n <slot name=\"tab-panel\" ${slotted('tabpanels')}></slot>\n </div>\n ${when((x) => !x.hideAllButtons, html `\n <div class=\"action-buttons-container\" part=\"action-buttons-container\">\n <slot name=\"action-buttons\">\n <${prefix}-button @click=${(x) => x.previousStep()} ?disabled=${(x) => x.disabledPreviousStep}>Back</${prefix}-button>\n ${when((x) => x.isLastStep && !x.hideSubmitButton, html `\n <${prefix}-button @click=${(x) => x._submit()} ?disabled=${(x) => x.islastStepValid} data-test-id=\"submit-button\">\n Submit\n </${prefix}-button>\n `)}\n ${when((x) => !x.isLastStep, html `\n <${prefix}-button @click=${(x) => x.nextStep()} data-test-id=\"next-button\">Next</${prefix}-button>`)}\n </slot>\n </div>\n `)}\n </${prefix}-card>\n`;\nexport const foundationStepperTemplate = html `\n ${(x) => getPrefixedStepper(getPrefix(x))}\n`;\n","import { css } from '@microsoft/fast-element';\nexport const foundationStepperStyles = css `\n :host {\n display: flex;\n height: 100%;\n width: 100%;\n }\n\n :host([orientation='horizontal']) {\n flex-direction: column;\n }\n\n .stepper-tab {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n max-width: 280px;\n border-radius: 0;\n }\n\n .action-buttons-container {\n width: 100%;\n display: flex;\n justify-content: flex-end;\n }\n\n .stepper-panel-container {\n height: 100%;\n overflow: hidden;\n padding: 15px;\n }\n\n .stepper-tab-menu {\n display: flex;\n flex-direction: column;\n width: 100%;\n margin-bottom: 30px;\n }\n\n .stepper-tab-menu-hidden {\n display: none;\n }\n\n .stepper-tab-progress {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: start;\n flex: 1;\n }\n\n .stepper-tab-progress .progress-ring {\n --design-unit: 10;\n\n margin: 0;\n }\n\n .stepper-tab-panel {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n width: 100%;\n min-width: 370px;\n border-radius: 0;\n }\n\n label {\n padding: 0 10px;\n color: rgb(135 155 166);\n display: block;\n cursor: pointer;\n text-align: center;\n font-size: var(--type-ramp-base-font-size);\n line-height: var(--type-ramp-base-line-height);\n font-style: normal;\n margin: calc(var(--design-unit) * 2px) 0;\n }\n\n :host([orientation='horizontal']) .stepper-tab-menu {\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: row;\n margin-bottom: 0;\n align-items: center;\n justify-content: center;\n gap: calc(var(--design-unit) * 4px);\n padding: 0 calc(var(--design-unit) * 4px);\n }\n\n :host([orientation='horizontal']) .stepper-tab-hidden {\n display: none;\n }\n\n :host([orientation='horizontal']) .stepper-tab {\n max-width: 100%;\n max-height: 70px;\n height: 70px;\n }\n`;\n","import { __decorate } from \"tslib\";\nimport { attr, observable, volatile } from '@microsoft/fast-element';\nimport { FoundationElement, TabsOrientation } from '@microsoft/fast-foundation';\nimport { uniqueId } from '@microsoft/fast-web-utilities';\nimport { logger } from '../utils/logger';\nimport { foundationStepperStyles as styles } from './stepper.styles';\nimport { foundationStepperTemplate as template } from './stepper.template';\n/**\n * @tagname %%prefix%%-stepper\n */\nexport class Stepper extends FoundationElement {\n constructor() {\n super(...arguments);\n this.allowBackwardJumps = false;\n this.allowForwardJumps = false;\n this.hideAllButtons = false;\n this.hideTabs = false;\n this.orientation = TabsOrientation.vertical;\n this.progressValue = 0;\n this.activeTabIndex = 0;\n this.pendingNextStep = false;\n this.slotsInitialized = false;\n this.setTabs = () => {\n this.activeTabIndex = this.getActiveIndex();\n this.tabs.forEach((tab, index) => {\n if (tab.slot === 'tab') {\n const isActiveTab = this.activeTabIndex === index;\n const isLast = index + 1 === this.tabIds.length;\n const tabId = this.tabIds[index];\n const tabpanelId = this.tabpanelIds[index];\n tab.setAttribute('id', tabId);\n tab.setAttribute('aria-selected', isActiveTab ? 'true' : 'false');\n tab.setAttribute('aria-disabled', isActiveTab ? 'false' : 'true');\n tab.setAttribute('selected', isActiveTab ? 'true' : 'false');\n tab.setAttribute('orientation', this.orientation);\n tab.setAttribute('aria-controls', tabpanelId);\n tab.setAttribute('aria-controls', tabpanelId);\n tab.setAttribute('tab-position', String(index + 1));\n tab.setAttribute('isLast', String(isLast));\n tab.setAttribute('hideStepNumber', String(this.hideStepNumber === true));\n tab.setAttribute('tabindex', isActiveTab ? '0' : '-1');\n tab.setAttribute('showCursorPointer', String((index <= this.activeTabIndex && this.allowBackwardJumps) ||\n (index > this.activeTabIndex && this.allowForwardJumps)));\n if (isActiveTab) {\n this.activetab = tab;\n this.activeid = tabId;\n }\n }\n });\n if (this.activeTabIndex === 0)\n this.resetCompletedState();\n };\n this.getCompletedTabs = () => {\n let completedCount = 0;\n this.tabs.forEach((tab) => {\n const isCompleted = tab.isCompleted();\n if (isCompleted) {\n completedCount += 1;\n }\n });\n this.progressValue = Math.round((completedCount / this.tabpanels.length) * 100);\n };\n this.setTabPanels = () => {\n this.tabpanels.forEach((tabpanel, index) => {\n const tabId = this.tabIds[index];\n const tabpanelId = this.tabpanelIds[index];\n tabpanel.setAttribute('id', tabpanelId);\n tabpanel.setAttribute('aria-labelledby', tabId);\n this.activeTabIndex !== index\n ? tabpanel.setAttribute('hidden', '')\n : tabpanel.removeAttribute('hidden');\n });\n };\n }\n orientationChanged() {\n if (this.$fastController.isConnected) {\n this.setTabs();\n this.setTabPanels();\n }\n }\n activeidChanged(oldValue, newValue) {\n if (this.$fastController.isConnected && this.tabs.length <= this.tabpanels.length) {\n this.setTabs();\n this.setTabPanels();\n this.getCompletedTabs();\n }\n }\n tabsChanged() {\n if (this.$fastController.isConnected && this.tabs.length <= this.tabpanels.length) {\n this.setTabsAndTabPanels();\n this.checkAndExecutePendingNextStep();\n }\n }\n tabpanelsChanged() {\n if (this.$fastController.isConnected && this.tabpanels.length <= this.tabs.length) {\n this.setTabsAndTabPanels();\n this.checkAndExecutePendingNextStep();\n }\n }\n connectedCallback() {\n super.connectedCallback();\n this.tabIds = this.getTabIds();\n this.tabpanelIds = this.getTabPanelIds();\n this.activeTabIndex = this.getActiveIndex();\n }\n setTabsAndTabPanels() {\n this.tabIds = this.getTabIds();\n this.tabpanelIds = this.getTabPanelIds();\n this.setTabs();\n this.setTabPanels();\n this.getCompletedTabs();\n this.slotsInitialized = this.tabs.length > 0 && this.tabpanels.length > 0;\n }\n checkAndExecutePendingNextStep() {\n if (this.pendingNextStep && this.slotsInitialized) {\n this.pendingNextStep = false;\n this.nextStep();\n }\n }\n getActiveIndex() {\n const id = this.activeid;\n if (id !== undefined) {\n return this.tabIds.indexOf(this.activeid) === -1 ? 0 : this.tabIds.indexOf(this.activeid);\n }\n else {\n return 0;\n }\n }\n /**\n * Go to a specific step by step number (1-based indexing)\n * @param stepNumber - The step number to go to (1-based)\n * @param bypassJumpRestrictions - If true, ignores UI jump restrictions (default: false)\n * @returns true if successful, false if step number is invalid or already on that step\n */\n goToStep(stepNumber, bypassJumpRestrictions = false) {\n // Convert to 0-based index\n const targetIndex = stepNumber - 1;\n // Validate step number bounds\n if (stepNumber < 1 || stepNumber > this.tabs.length) {\n logger.warn(`[Stepper] Invalid step number: ${stepNumber}. Must be between 1 and ${this.tabs.length}`);\n return false;\n }\n // If going to the same step, do nothing\n if (targetIndex === this.activeTabIndex) {\n return false;\n }\n // If bypassing jump restrictions, allow any jump\n if (bypassJumpRestrictions) {\n if (targetIndex < this.activeTabIndex) {\n return this.handleBackwardJump(targetIndex);\n }\n else if (targetIndex > this.activeTabIndex) {\n return this.handleForwardJump(targetIndex);\n }\n }\n // Handle backward jumps with UI restrictions\n if (targetIndex < this.activeTabIndex && this.allowBackwardJumps) {\n const backwardJumpResult = this.handleBackwardJump(targetIndex);\n return backwardJumpResult;\n }\n // Handle forward jumps with UI restrictions\n if (targetIndex > this.activeTabIndex && this.allowForwardJumps) {\n const forwardJumpResult = this.handleForwardJump(targetIndex);\n return forwardJumpResult;\n }\n // If jumps are not allowed, only allow going to the next step\n if (targetIndex === this.activeTabIndex + 1) {\n this.nextStep();\n return true;\n }\n logger.warn(`[Stepper] Cannot jump to step ${stepNumber}. Jumps are not allowed or step is not adjacent.`);\n return false;\n }\n /**\n * Go to the first step (step 1)\n * @returns true if successful, false if already on first step\n */\n goToFirstStep() {\n return this.goToStep(1, true);\n }\n /**\n * Go to the last step\n * @returns true if successful, false if already on last step\n */\n goToLastStep() {\n return this.goToStep(this.tabs.length, true);\n }\n handleStepClick(stepIndex) {\n if (stepIndex < this.activeTabIndex && this.allowBackwardJumps) {\n this.handleBackwardJump(stepIndex);\n }\n else if (stepIndex > this.activeTabIndex && this.allowForwardJumps) {\n this.handleForwardJump(stepIndex);\n }\n }\n handleBackwardJump(targetStepIndex) {\n // Reset completion status for all steps after the clicked step\n for (let i = targetStepIndex + 1; i <= this.activeTabIndex; i = i + 1) {\n this.tabs[i].completed = false;\n }\n this.activeTabIndex = targetStepIndex;\n this.activetab = this.tabs[targetStepIndex];\n this.activeid = this.tabIds[targetStepIndex];\n this.$emit('step-click', {\n activetab: this.activetab,\n activeid: this.activeid,\n });\n return true;\n }\n handleForwardJump(targetStepIndex) {\n // Validate intermediate steps (exclusive of target)\n for (let i = this.activeTabIndex; i < targetStepIndex; i += 1) {\n if (this.validation && this.validation[i]) {\n if (!this.validation[i].isValid()) {\n this.tabs[i].completed = false;\n this.tabs[i].error = true;\n this.getCompletedTabs();\n this.$emit('validation-failure', {\n stepIndex: i,\n stepId: this.tabIds[i],\n message: `Validation failed for step ${i + 1}`,\n });\n return false;\n }\n this.tabs[i].error = false;\n }\n }\n for (let i = this.activeTabIndex; i < targetStepIndex; i += 1) {\n this.tabs[i].completed = true;\n this.tabs[i].error = false;\n }\n this.tabs[targetStepIndex].completed = false;\n this.tabs[targetStepIndex].error = false;\n this.activeTabIndex = targetStepIndex;\n this.activetab = this.tabs[targetStepIndex];\n this.activeid = this.tabIds[targetStepIndex];\n this.getCompletedTabs();\n this.$emit('step-click', {\n activetab: this.activetab,\n activeid: this.activeid,\n });\n return true;\n }\n get disabledPreviousStep() {\n return this.activeTabIndex === 0 ? true : false;\n }\n get isLastStep() {\n return this.activeTabIndex + 1 === this.tabs.length ? true : false;\n }\n get islastStepValid() {\n var _a;\n const lastStepIndex = this.tabs.length - 1;\n const isLastStep = this.activeTabIndex === lastStepIndex;\n if (isLastStep &&\n ((this.validation && ((_a = this.validation[lastStepIndex]) === null || _a === void 0 ? void 0 : _a.isValid())) ||\n !this.validation ||\n !this.validation[lastStepIndex])) {\n this.tabs[lastStepIndex].completed = true;\n this.getCompletedTabs();\n return false;\n }\n else {\n this.tabs[lastStepIndex].completed = false;\n this.getCompletedTabs();\n return true;\n }\n }\n _submit() {\n this.$emit('submit');\n }\n nextStep() {\n var _a;\n if (!this.slotsInitialized) {\n this.pendingNextStep = true;\n return;\n }\n if (this.validation && this.validation[this.activeTabIndex]) {\n if (!this.validation[this.activeTabIndex].isValid()) {\n this.tabs[this.activeTabIndex].completed = false;\n this.tabs[this.activeTabIndex].error = true;\n this.getCompletedTabs();\n return;\n }\n this.tabs[this.activeTabIndex].error = false;\n }\n if (this.activeTabIndex + 2 <= this.tabIds.length) {\n this.tabs[this.activeTabIndex].completed = true;\n this.activeTabIndex = this.activeTabIndex + 1;\n this.activeid = this.tabIds[this.activeTabIndex];\n this.$emit('next-step');\n this.$emit('validation-success');\n }\n const lastStepIndex = this.tabs.length - 1;\n const isLastStep = this.activeTabIndex === lastStepIndex;\n if (this.hideSubmitButton &&\n isLastStep &&\n ((this.validation && ((_a = this.validation[lastStepIndex]) === null || _a === void 0 ? void 0 : _a.isValid())) ||\n !this.validation ||\n !this.validation[lastStepIndex])) {\n this.tabs[lastStepIndex].completed = true;\n this.getCompletedTabs();\n }\n else {\n this.tabs[lastStepIndex].completed = false;\n this.getCompletedTabs();\n }\n }\n previousStep() {\n if (this.activeTabIndex !== 0) {\n this.tabs[this.activeTabIndex].completed = false;\n this.activeTabIndex = this.activeTabIndex - 1;\n this.activeid = this.tabIds[this.activeTabIndex];\n }\n }\n getTabIds() {\n return this.tabs.map((tab) => {\n var _a;\n return (_a = tab.getAttribute('id')) !== null && _a !== void 0 ? _a : `tab-${uniqueId()}`;\n });\n }\n getTabPanelIds() {\n return this.tabpanels.map((tabPanel) => {\n var _a;\n return (_a = tabPanel.getAttribute('id')) !== null && _a !== void 0 ? _a : `panel-${uniqueId()}`;\n });\n }\n resetCompletedState() {\n this.tabs.forEach((tab) => (tab.completed = false));\n }\n}\n__decorate([\n attr({ attribute: 'hide-submit-button', mode: 'boolean' })\n], Stepper.prototype, \"hideSubmitButton\", void 0);\n__decorate([\n attr({ attribute: 'hide-step-number', mode: 'boolean' })\n], Stepper.prototype, \"hideStepNumber\", void 0);\n__decorate([\n attr({ attribute: 'allow-backward-jumps', mode: 'boolean' })\n], Stepper.prototype, \"allowBackwardJumps\", void 0);\n__decorate([\n attr({ attribute: 'allow-forward-jumps', mode: 'boolean' })\n], Stepper.prototype, \"allowForwardJumps\", void 0);\n__decorate([\n attr({ attribute: 'hide-all-buttons', mode: 'boolean' })\n], Stepper.prototype, \"hideAllButtons\", void 0);\n__decorate([\n attr({ attribute: 'hide-tabs', mode: 'boolean' })\n], Stepper.prototype, \"hideTabs\", void 0);\n__decorate([\n attr\n], Stepper.prototype, \"orientation\", void 0);\n__decorate([\n attr\n], Stepper.prototype, \"activeid\", void 0);\n__decorate([\n observable\n], Stepper.prototype, \"tabs\", void 0);\n__decorate([\n observable\n], Stepper.prototype, \"tabpanels\", void 0);\n__decorate([\n observable\n], Stepper.prototype, \"validation\", void 0);\n__decorate([\n observable\n], Stepper.prototype, \"progressValue\", void 0);\n__decorate([\n observable\n], Stepper.prototype, \"activeTabIndex\", void 0);\n__decorate([\n volatile\n], Stepper.prototype, \"disabledPreviousStep\", null);\n__decorate([\n volatile\n], Stepper.prototype, \"isLastStep\", null);\n__decorate([\n volatile\n], Stepper.prototype, \"islastStepValid\", null);\n// explicitly declaring for extensibility\nexport const foundationStepperShadowOptions = undefined;\nexport const defaultStepperConfig = {};\n/**\n * The Foundation Stepper\n *\n * @public\n * @remarks\n * HTML Element: \\<foundation-stepper\\>\n */\nexport const foundationStepper = Stepper.compose(Object.assign({ baseName: 'stepper', template,\n styles, shadowOptions: foundationStepperShadowOptions }, defaultStepperConfig));\n","import { baseComponents } from './base-components';\nimport { createDesignSystemProxy, provideDesignSystem } from './provide-design-system';\nexport { baseComponents, createDesignSystemProxy, provideDesignSystem };\nexport const registerFoundationDesignSystem = () => provideDesignSystem().register(baseComponents);\nexport * from './_common';\nexport * from './_config';\nexport * from './accordion';\nexport * from './accordion-item';\nexport * from './actions-menu';\nexport * from './anchor';\nexport * from './anchored-region';\nexport * from './avatar';\nexport * from './badge';\nexport * from './banner';\nexport * from './breadcrumb';\nexport * from './breadcrumb-item';\nexport * from './button';\nexport * from './calendar';\nexport * from './card';\nexport * from './categorized-multiselect';\nexport * from './checkbox';\nexport * from './combobox';\nexport * from './connection-indicator';\nexport * from './context';\nexport * from './data-grid';\nexport * from './data-grid-cell';\nexport * from './data-grid-datasource';\nexport * from './data-grid-row';\nexport * from './date-picker';\nexport * from './design-system-provider';\nexport * from './dialog';\nexport * from './disclosure';\nexport * from './divider';\nexport * from './dropdown-menu';\nexport * from './environment-indicator';\nexport * from './error-banner';\nexport * from './error-boundary';\nexport * from './error-dialog';\nexport * from './expression-builder';\nexport * from './file-reader';\nexport * from './file-upload';\nexport * from './filter';\nexport * from './filter-bar';\nexport * from './flex-layout';\nexport * from './flipper';\nexport * from './flyout';\nexport * from './grid-layout';\nexport * from './grid-layout-item';\nexport * from './horizontal-scroll';\nexport * from './icon';\nexport * from './listbox';\nexport * from './listbox-option';\nexport * from './menu';\nexport * from './menu-item';\nexport * from './modal';\nexport * from './multiselect';\nexport * from './notification-listener';\nexport * from './number-field';\nexport * from './options-datasource';\nexport * from './overlays';\nexport * from './patterns';\nexport * from './popper';\nexport * from './progress';\nexport * from './progress-ring';\nexport * from './radio';\nexport * from './radio-group';\nexport * from './router';\nexport * from './scheduler';\nexport * from './scheduler-cron-builder';\nexport * from './scheduler-timezone';\nexport * from './search-bar';\nexport * from './section-navigator';\nexport * from './segmented-control';\nexport * from './segmented-item';\nexport * from './select';\nexport * from './skeleton';\nexport * from './slider';\nexport * from './slider-label';\nexport * from './snackbar';\nexport * from './stacking-icons';\nexport * from './status-pill';\nexport * from './stepper';\nexport * from './stepper-tab';\nexport * from './stepper-tab-panel';\nexport * from './switch';\nexport * from './tab';\nexport * from './tab-panel';\nexport * from './tabs';\nexport * from './text-area';\nexport * from './text-field';\nexport * from './toast';\nexport * from './toolbar';\nexport * from './tooltip';\nexport * from './tree-item';\nexport * from './tree-view';\nexport * from './url-input';\nexport * from './utils/base-datasource';\nexport { getPrefix as getDesignSystemPrefix } from './utils/dom';\n","import { insertDocumentCSSRule } from '../utils/dom';\n/**\n * Loads font faces by inserting a style element with the specified font face rules into the document.\n * @param fontFaceRules - The CSS rules for the font faces.\n * @param styleElementId - The ID of the style element to insert into the document.\n * @public\n */\nexport const loadFontFaces = (fontFaceRules, styleElementId) => {\n insertDocumentCSSRule(fontFaceRules, styleElementId);\n};\n/**\n * An enum of possible font styles.\n * @public\n */\nexport var FontStyle;\n(function (FontStyle) {\n FontStyle[\"Italic\"] = \"italic\";\n FontStyle[\"Normal\"] = \"normal\";\n})(FontStyle || (FontStyle = {}));\n/**\n * An enum of possible font weights.\n * @public\n */\nexport var FontWeight;\n(function (FontWeight) {\n FontWeight[FontWeight[\"Thin\"] = 100] = \"Thin\";\n FontWeight[FontWeight[\"Light\"] = 300] = \"Light\";\n FontWeight[FontWeight[\"Regular\"] = 400] = \"Regular\";\n FontWeight[FontWeight[\"Medium\"] = 500] = \"Medium\";\n FontWeight[FontWeight[\"Bold\"] = 700] = \"Bold\";\n FontWeight[FontWeight[\"Black\"] = 900] = \"Black\";\n})(FontWeight || (FontWeight = {}));\n/**\n * Generates a CSS mixin for the specified font family, style, and weight.\n * @param family - The font family.\n * @param style - Optional. The font style. Defaults to FontStyle.Normal.\n * @param weight - Optional. The font weight. Defaults to FontWeight.Regular.\n * @returns The generated CSS mixin.\n * @public\n */\nexport const getFontMixin = (family, style = FontStyle.Normal, weight = FontWeight.Regular) => `\n font-family: ${family};\n font-style: ${style};\n font-weight: ${weight};\n`;\n/**\n * An object containing type ramp values.\n * @public\n */\nexport const TypeRampValues = {\n minusOne: -1,\n minusTwo: -2,\n plusOne: 1,\n plusTwo: 2,\n plusThree: 3,\n plusFour: 4,\n plusFive: 5,\n plusSix: 6,\n};\n"],"names":["showDialog","notificationStructure","tagName","notificationBoundary","tagPrefix","split","dialog","document","createElement","container","boundaryContainer","querySelector","setAttribute","style","position","appendChild","getBoundaryContainer","notification","show","logger","createLogger","cachedProvider","cachedContainers","Map","getNotificationDetails","details","_a","_b","title","body","showLoggerLogLevel","log","message","level","logLevel","config","LogLevel","Debug","getNotificationContainer","id","has","get","found","find","el","set","zIndex","element","providerElement","prefix","currentPrefix","dsProvider","getBannerAnchor","ShadowRoot","anchor","getRootNode","getElementById","host","createBannerContainer","insertBefore","firstChild","whenElse","binding","trueTemplateOrTemplateBinding","falseTemplateOrTemplateBinding","getTemplate","template","trueTemplate","falseTemplate","source","context","foundationAccordionTemplate","definition","foundationAccordionStyles","css","Accordion","foundationAccordionShadowOptions","delegatesFocus","mode","defaultAccordionConfig","foundationAccordion","compose","Object","assign","baseName","styles","foundationAccordionItemTemplate","foundationAccordionItemStyles","AccordionItem","foundationAccordionItemShadowOptions","defaultAccordionItemConfig","collapsedIcon","expandedIcon","foundationAccordionItem","actionsMenuBaseStyles","foundationActionsMenuStyles","BaseDatasource","FoundationElement","constructor","super","arguments","this","withGridInit","isSnapshot","maxRows","MAX_ROWS_250","maxView","MAX_VIEW_1000","resourceName","reverse","rowId","withTimestampFormatting","requiresFullDataRefresh","rowsSyncedWithStream","dataSubWasLoggedOff","criteriaFromFilters","update","BehaviorSubject","criteriaChanged","oldCriteria","newCriteria","criteriaIsNotDuplicate","normaliseCriteria","datasource","initialized","dataSub","unsubscribe","undefined","fetchGenesisData","dataChanged","oldValue","clearData","reset","datasourceConfig","keys","forEach","key","disconnectedCallback","destroy","withFullInit","data","syncComponentData","requiresMetadataFetch","connect","dataLogoff","sourceRef","init","datasourceOptions","rowData","snapshotFiltered","debug","stream","subscribe","result","DISCONNECTED","handleError","loggerType","SOURCE_REF","messageType","MESSAGE_TYPE","LOGOFF_ACK","ROW","nextMessage","dataServerResultFilter","d","handleStreamUpdate","initDatasource","criteria","buildCriteria","fields","orderBy","request","hasOwnProperty","applyRequestServerData","applyDataserverData","requestServerResult","Array","isArray","REPLY","startsWith","loggerArgs","insertData","size","from","values","handleStreamInserts","rowsToDelete","filter","row","includes","handleStreamDeletes","dataServerResult","_c","_d","inserts","length","deletes","updates","handleStreamUpdates","initialCriteria","join","setFilter","fieldName","newFilter","next","removeFilter","delete","params","getFieldMetadata","fieldMetadata","fm","name","getDefaultLabelFormat","field","type","DATE","DATETIME","prototype","attr","observable","attribute","wasClickOutsideElement","event","target","composedPath","wasClickInsideElement","getPrefix","toLowerCase","Operator","Join","$$operator","And","AND","Or","OR","Not","NOT","GreaterThan","GT","GreaterThanOrEqual","GE","LessThan","LT","LessThanOrEqual","LE","NotEqual","NE","Equal","EQ","operator","DEFAULT_GROUP","CriteriaBuilder","expressions","expression","options","withExpression","groupJoin","condition","optionsJoin","groupName","addExpressionToGroup","e","gName","prev","withoutInline","isJoin","warn","exp","joined","obj","flat","flatMap","value","index","array","group","build","outputFn","parsedExpressions","entries","reduce","acc","map","arr","parseExpression","previous","push","idx","Error","serialiser","getValue","valueGetter","createSerialiser","ExpressionBuilder","opts","withField","withValue","withSerialiser","withParams","withValueGetter","withGroup","dataserverCriteriaBuilder","criteriaBuilder","labelField","valueField","baseCriteria","menuTemplate","html","x","open","buttonAppearance","toggleActionsMenuVisibility","ref","classNames","repeat","allActions","when","isDisabled","parent","ctx","hideDisabled","getLabel","onActionMenuItemClick","callback","color","positioning","singleOptionTemplate","singleOption","foundationActionsMenuTemplate","isVertical","ActionsMenu","addDefaultActions","autoCloseOnAction","hideMenuSingleOption","definitionChanged","newValue","actions","buttonText","customButtonText","openChanged","defaultActions","node","enabledRows","action","foundationActionsMenu","foundationAnchorTemplate","foundationAnchorStyles","Anchor","foundationAnchorShadowOptions","defaultAnchorConfig","foundationAnchor","foundationAnchoredRegionTemplate","foundationAnchoredRegionStyles","AnchoredRegion","foundationAnchoredRegionShadowOptions","defaultAnchoredRegionConfig","foundationAnchoredRegion","foundationAvatarTemplate","media","imgSrc","alt","foundationAvatarStyles","Avatar","foundationAvatarShadowOptions","defaultAvatarConfig","foundationAvatar","foundationBadgeTemplate","foundationBadgeStyles","Badge","foundationBadgeShadowOptions","defaultBadgeConfig","foundationBadge","foundationBannerStyles","getBannerTemplate","dismissAnimation","dismiss","banner","dismissingAction","label","confirmingActions","c","dismissNotification","foundationBannerTemplate","foundationBannerShadowOptions","Banner","connectedCallback","Promise","resolve","onanimationend","remove","error","foundationBanner","shadowOptions","foundationBreadcrumbTemplate","foundationBreadcrumbStyles","Breadcrumb","foundationBreadcrumbShadowOptions","defaultBreadcrumbConfig","foundationBreadcrumb","foundationBreadcrumbItemTemplate","foundationBreadcrumbItemStyles","BreadcrumbItem","foundationBreadcrumbItemShadowOptions","defaultBreadcrumbItemConfig","separator","foundationBreadcrumbItem","foundationButtonTemplate","foundationButtonStyles","Button","foundationButtonShadowOptions","defaultButtonConfig","foundationButton","foundationCalendarStyles","foundationCalendarTemplate","Calendar","foundationCalendarShadowOptions","defaultCalendarConfig","foundationCalendar","foundationCardTemplate","foundationCardStyles","Card","foundationCardShadowOptions","defaultCardConfig","foundationCard","Position","maxheight","multiselectStyles","toString","OptionsDatasource_1","OptionsDatasource","emptyDataLabel","allowCustomOptions","initalSelectedValueInitialized","resizeObserverCallback","resizeObserverEntry","checkOverflow","selectChangeHandler","selectedOption","option","String","select","$emit","initialSelectedValueChanged","fetchData","_super","create","call","concat","parentElement","optionElement","addEventListener","resizeObserver","ResizeObserver","disconnect","removeEventListener","isConnected","async","initialSelectedValue","asyncModeIntialization","children","removeChild","initialValue","content","shadowRoot","scrollWidth","clientWidth","textContent","removeAttribute","snapshotData","labelRowFormatter","labelFormatter","observe","resetCombobox","initialLabel","getInitialLabel","DOM","queueUpdate","disabled","insertedRows","deletedRows","updatedRows","customElement","MultiselectDatasource","loading","getPrefixedMultiselect","defaultSlottedNodes","slotted","property","whitespaceFilter","keydownHandler","tabindex","search","toggle","sync","filterSearchValue","getDisplayValue","inputHandler","changeHandler","selectedOptions","resizable","handleResizeStart","all","selectCheckboxAll","isAllOptionsDisabled","optionsHeaderSlottedNodes","filteredAvailableOptions","getItemLabel","checkboxKeyDown","selectCheckboxOne","isOptionSelected","isOptionDisabled","itemRenderer","showCreatable","addOption","multiselectTemplate","foundationMultiselectShadowOptions","defaultMultiselectConfig","Multiselect","autoPosition","allSelected","creatable","debounce","filterByContains","clickOutside","handleClickOutside","BELOW","defaultItemRenderer","initialisedOptions","isResizing","startX","startY","startWidth","startHeight","multiselectDropdown","preventDefault","stopPropagation","clientX","clientY","offsetWidth","offsetHeight","classList","add","handleResizeMove","handleResizeEnd","deltaX","deltaY","newWidth","Math","max","newHeight","width","maxHeight","setProperty","removeProperty","debounceChanged","debouncedInputHandler","asyncSetFilter","arrowIcon","ABOVE","optionLabelText","labelStyle","setDropdownPosition","optionsChanged","optionValueGetter","selectedOptionsChanged","$fastController","calculatedPosition","multiselectRect","getBoundingClientRect","viewportHeight","window","innerHeight","spaceAbove","top","spaceBelow","bottom","optionLabelGetter","valueFormatter","displayText","getPlaceholder","trim","findExactMatchOptions","normalizedOption","some","selectedValue","JSON","stringify","isIncluded","getEnabledOptionsCount","prevAllChecked","opt","onAllSelectedCallback","filterSearchValueLower","optionValue","searchValue","val","slottedDatasource","stopImmediatePropagation","ctrlKey","shiftKey","clear","clearSelectedValues","clearFilterText","filterSearchInput","volatile","foundationMultiselect","optionsMaxheight","categorizedMultiselectStyles","getPrefixedCategorizedMultiselect","parentContext","icon","svg","iconColor","description","categorizedMultiselectTemplate","foundationCategorizedMultiselectShadowOptions","defaultCategorizedMultiselectConfig","CategorizedMultiselect","optionsElement","sortFilteredOptions","sortedData","curr","assignedSlot","contains","containerRect","thisRect","midPoint","height","optionGetter","splice","indexOf","filteredOptions","optionDescription","foundationCategorizedMultiselect","foundationCheckboxTemplate","foundationCheckboxStyles","Checkbox","foundationCheckboxShadowOptions","defaultCheckboxConfig","checkedIndicator","indeterminateIndicator","foundationCheckbox","foundationComboboxStyles","foundationComboboxTemplate","activeDescendant","clickHandler","focusoutHandler","startSlotTemplate","ariaAutoComplete","autocomplete","ariaControls","listboxId","ariaLabelledby","ariaLabel","placeholder","keyupHandler","indicator","endSlotTemplate","Listbox","slottedOptionFilter","flatten","_Combobox_indicator","_Combobox_wasOpenOnEnterDown","Combobox","needManualChangeEventDispatch","caseSensitive","ignoreInputClick","filterMode","scrollToSelectedWhenOpening","scrollToSelectedWhenOpeningOptions","behavior","block","scrollWhenSelectionChanges","scrollWhenSelectionChangesOptions","selectedIndex","control","filterOptions","ariaActiveDescendant","setTimeout","scrollIntoView","manuallyDispatchChangeEvent","Observable","track","_ourValue","searchFunc","text","findIndex","prevSelectedValue","nextSelectedValue","firstSelectedOption","valueChanged","notify","slottedOptionsChanged","shouldEmit","ComboboxAutocomplete","none","innerFilter","_options","o","hidden","focus","currentValue","selectItemByValue","both","i","selected","cachedControlValue","datasourceNode","assignedNodes","dispatchEvent","Event","bubbles","WeakMap","foundationComboboxShadowOptions","defaultComboboxConfig","foundationCombobox","foundationConnectionIndicatorStyles","foundationConnectionIndicatorTemplate","colour","showLabel","ConnectionIndicator","subscription","isConnectedSubject","connected","session","getSessionStorageItem","foundationConnectionIndicator","foundationDataGridTemplate","foundationDataGridStyles","defintion","DataGrid","foundationDataGridShadowOptions","defaultDataGridConfig","foundationDataGrid","foundationDataGridCellStyles","DataGridCell","foundationDataGridCellShadowOptions","defaultDataGridCellConfig","foundationDataGridCell","foundationDataGridRowStyles","DataGridRow","foundationDataGridRowShadowOptions","defaultDataGridRowConfig","foundationDataGridRow","foundationDatePickerStyles","WEEKEND_DAY_INDICES","getPrefixedDatePicker","formatDate","toggleCalendar","calendarDropdownClasses","currentMonth","currentYear","prevMonth","nextMonth","hideWeekends","calendar","weekDays","disabledDaysOfWeek","substring","substringNumber","monthList","dayNumber","isSelectedDate","monthNumber","month","number","selectDay","date","foundationDatePickerTemplate","Day","lang","Date","getDate","day","toLocaleString","weekday","getDay","dayShort","year","getFullYear","yearShort","Number","monthShort","getMonth","timestamp","getTime","Month","numberOfDays","isLeapYear","today","item","getPreviousMonth","getNextMonth","goToDate","goToNextYear","goToPreviousYear","goToNextMonth","goToPreviousMonth","daysOfWeek","getNextEnabledDay","currentDate","enabledDays","nextDayNumber","min","rollDays","numDays","tomorrow","setDate","getNextDay","foundationDatePickerShadowOptions","defaultDatePickerConfig","DatePicker","format","visible","formatChanged","inlineCalendarChanged","toggleVisibility","hideWeekendsCalendarChanged","localeFormat","localeData","longDateFormat","toDate","updateHeaderText","getMonthDaysGrid","dateString","dayjsDate","isCurrentCalendarMonth","inlineCalendar","isSame","firstDayOfTheMonth","totalLastMonthFinalDays","totalDays","inverted","foundationDatePicker","deepMerge","output","structuredClone","sourceValue","targetValue","isDate","defaultDesignTokens","design_tokens","accent","$value","$type","neutral","fontFamily","bodyFont","typography","baseFontSize","baseLineHeight","luminance","density","baseHeightMultiplier","borderRadius","strokeWidth","space","designUnit","DesignTokensObservable","designTokensObservable","provideTokens","tokens","setToken","token","setValueFor","withDefault","valueKey","designToken","deleteValueFor","swatchConverter","toView","toColorString","fromView","parseColorHexRGB","SwatchRGB","r","g","b","paletteFromHex","hexColor","PaletteRGB","applyCustomTokens","provider","customTokens","cssVarName","defaultExclusions","getDefaultConfig","exclusions","k","accumulator","getExports","registrationFunction","defaultConfig","getTypeRampValue","baseTypeRamp","matches","match","baseFontValue","baseUnit","designTokensMap","selectCustomToken","path","xs","selector","rest","nextRef","configureDesignSystem","mergedConfig","designTokens","accentPalette","neutralPalette","baseLayerLuminance","controlCornerRadius","typeRampBaseFontSize","typeRampBaseLineHeight","getValueFor","typeRampMinus1FontSize","minusOne","typeRampMinus1LineHeight","typeRampMinus2FontSize","minusTwo","typeRampMinus2LineHeight","typeRampPlus1FontSize","plusOne","typeRampPlus1LineHeight","typeRampPlus2FontSize","plusTwo","typeRampPlus2LineHeight","typeRampPlus3FontSize","plusThree","typeRampPlus3LineHeight","typeRampPlus4FontSize","plusFour","typeRampPlus4LineHeight","typeRampPlus5FontSize","plusFive","typeRampPlus5LineHeight","typeRampPlus6FontSize","plusSix","typeRampPlus6LineHeight","white","black","fuiBGColor","defaultFillColor","fuiCardBGColor","fuiDefaultCardFillColor","fuiDefaultCardPalette","fuiNeutralRGB","fuiNeutralSwatch","fuiNeutralPalette","fuiAccentRGB","fuiAccentSwatch","fuiAccentPalette","DesignToken","fuiFillColor","fuiCardFillColor","cssCustomPropertyName","defaultNeutralForegroundContrast","neutralForeground","palette","reference","colorContrast","fuiCardForegroundColor","accentPaletteValue","neutralPaletteValue","baseLayerLuminanceValue","StandardLuminance","DarkMode","directionValue","ltr","controlCornerRadiusValue","designUnitValue","CSSVarsTokenMapper","CSSDirective","tokenMap","createTokenPartial","cssPartial","createTokensCSS","createCSS","getFontawesomeIconsCss","mixinFoundationFontFamily","weight","baseStyles","display","backgroundStyles","withBehaviors","forcedColorsStylesheetBehavior","ButtonFace","CanvasText","ButtonText","getHeaderForContext","headingLevel","FoundationDesignSystemProvider","converter","foundationDesignSystemProvider","contextualizedTypography","addStylesTo","foundationDialogStyles","contentAndPlaceholer","getDialogTemplate","resetSize","resizeIconName","showCloseIcon","close","closeDialog","foundationDialogTemplate","foundationDialogShadowOptions","defaultDialogConfig","DialogElement","minWidth","minHeight","currentResizeHandle","startLeft","startTop","resizeOffsetX","resizeOffsetY","originalWidth","originalHeight","originalPosition","originalLeft","originalTop","originalMargin","isMaximized","hasBeenResized","notificationChanged","registerDialog","mainElement","onCloseCallback","hasAttribute","setupResizeHandlers","removeResizeHandlers","viewportWidth","innerWidth","effectiveWidth","effectiveHeight","initialWidth","initialHeight","left","margin","querySelectorAll","handle","bind","handleEdgeDoubleClick","handles","direction","dataset","rect","right","newLeft","newTop","shouldUpdatePosition","widthDiff","heightDiff","maxWidth","maxWidthFromLeft","maxHeightFromTop","currentWidth","currentHeight","maximize","Dialog","onShowCallback","foundationDialog","foundationDisclosureTemplate","foundationDisclosureStyles","Disclosure","foundationDisclosureShadowOptions","defaultDisclosureConfig","foundationDisclosure","foundationDividerTemplate","foundationDividerStyles","Divider","foundationDividerShadowOptions","defaultDividerConfig","foundationDivider","dropdownMenuBaseStyles","foundationDropdownMenuStyles","extractMenuItems","items","submenu","variant","getDropdownMenuTemplate","toggleDropdownMenuVisibility","allItems","foundationDropdownMenuTemplate","DropdownMenu","autoClose","onDropdownMenuItemClick","foundationDropdownMenu","environmentIndicatorStyles","foundationEnvironmentIndicatorTemplate","getPrefixedEnvironmentIndicatorTemplate","textColor","backgroundColor","showIcon","iconSize","DEFAULT_ENVIRONMENT_LEVEL","DEFAULT_ENVIRONMENT_LEVEL_CONFIG","DEFAULT_ENVIRONMENT_CONFIGS","EnvironmentIndicatorConfigObserver","EnvironmentIndicatorConfigObserverToken","DI","createInterface","instance","configurator","EnvironmentIndicatorConfigToken","configureEnvironmentIndicator","configs","currentLevel","getOrCreateDOMContainer","register","Registration","publish","environmentIndicatorLogger","EnvironmentIndicator","useDefaultConfig","envConfigs","envConfigsChanged","getEnvConfigByLevel","diConfigChanged","subscribeToDiConfig","observer","unsubscribeConfig","configFromDi","diConfig","getCurrentEnvironmentIndicatorConfig","getAttributesConfig","configFromAttributes","getCurrentEnvironmentLevel","attributesConfig","envConfig","attributeChangedCallback","setEnvConfigs","foundationEnvironmentIndicator","getPrefixedErrorBanner","errorDetails","_e","_f","_g","_h","foundationErrorBannerTemplate","foundationErrorBannerShadowOptions","ErrorBanner","deprecated","foundationErrorBanner","foundationErrorBoundaryTemplate","ErrorBoundaryEvent","getErrorDetails","getLoglevel","getErrorContainer","createErrorBannerContainer","errorTypeToComponentMap","alert","_j","_k","_l","_m","_o","toastNotify","errorTitle","errorDate","toLocaleTimeString","closeTimeout","snackbar","errorBoundary","getErrorBannerAnchor","showError","ErrorBuilder","withTitle","withErrorDetails","withLogLevel","withAlert","withNotification","withBanner","withSnackbar","withDialog","errorStructure","NotificationBuilder","withPosition","withAutoClose","withCloseTimeout","withType","foundationErrorBoundaryShadowOptions","ErrorBoundary","ERROR_BOUNDARY_EVENT","detail","SEQUENCE_ID","HEADER","BODY","NOTIFY_SEVERITY","nullableNumberConverter","foundationErrorBoundary","getErrorDialogTemplate","errorDialogTemplate","foundationErrorDialogStyles","foundationErrorDialogShadowOptions","ErrorDialog","foundationErrorDialog","showToast","notificationContainer","_p","_q","_r","_s","_t","toast","toastTitle","toastDetails","toastDate","toastBottom","createdAt","buttons","button","buttonElement","toastElement","appearance","iconName","notificationTypeToComponentMap","configuration","BaseFileComponent","selectedFile","accept","fileSizeLimitBytes","fileName","isProcessing","handleClick","fileInput","click","onInputChange","files","oversizedFile","file","errorMessage","onFileSelected","clearSelection","onFileCleared","getSelectedFile","closeIcon","slot","fill","fileReaderStyles","foundationFileReaderStyles","getPrefixedFileReader","autoProcess","handleFileProcessing","fileReaderTemplate","FileReader","processingTimeout","processingDelayMs","fileContent","endsWith","clearTimeout","parsedContent","parse","parseError","onFileRead","getFileContent","foundationFileReader","foundationFileUploadStyles","getPrefixedFileUpload","handleFileUpload","uploadedFilesList","filesGridColumnDefinitions","foundationFileUploadTemplate","createFormData","formData","FormData","append","uploadFiles","url","authToken","http","headers","Headers","post","downloadFile","filename","method","showNotifications","fetch","credentials","then","res","ok","blob","json","DETAILS","ERROR","objectUrl","URL","createObjectURL","a","href","download","info","catch","IMAGE_FILE_TYPES","TEXT_FILE_TYPES","OFFICE_FILE_TYPES","cellTemplateColumn","columnDefinition","columnDataKey","FileUpload","acceptedFormats","selectedFiles","uploadedFilesResourceName","uploadEventName","gridFields","acceptChanged","acceptedValues","fieldNameChanged","setupGrid","entityIdChanged","setColumnDefs","entityId","gridCriteria","setRowData","handleStreamRowOperation","OPERATION","unshift","FILE_ATTACHMENT_ID","response","CRITERIA_MATCH","metadata","getMetadata","columnDefs","gridField","FIELD","metadatField","NAME","getColumnObject","downloadEventName","getDownloadColumn","cellTemplate","handleFileDownload","column","charAt","toUpperCase","slice","TYPE","fileArray","uploadKey","getItem","ex","FILE_NAME","foundationFileUploadShadowOptions","defaultFileUploadConfig","foundationFileUpload","foundationFilterStyles","closeIconTemplate","booleanFilterOptions","selectTemplate","numFilterMin","numFilterMax","numberFilterTemplate","dateFilterMin","dateFilterMax","dateFilterTemplate","onBooleanFilterSelection","booleanFilterTemplate","onEnumFilterSelection","enumFilterOptions","enumFilterTemplate","textFilter","textFilterTemplate","getPrefixedFilterTemplate","foundationFilterTemplate","FilterEvents","Filter","textFilterChanged","change","numFilterMinChanged","oldMin","newMin","isFinite","handleNumericFilter","numFilterMaxChanged","oldMax","newMax","minFilter","maxFilter","epoch","toISOString","replace","dateFilterMinChanged","dateMinMS","handleDateFilter","dateMaxMS","dateFilterMaxChanged","enumOptions","delimiter","newOptions","numFilterFieldMin","numFilterFieldMax","dateFilterFieldMin","dateFilterFieldMax","NaN","textFilterField","selection","foundationFilter","foundationFilterBarStyles","mapType","loadingTemplate","resource","filterBarTemplate","collapsed","collapseIcon","UI_LABEL","VALID_VALUES","foundationFilterBarTemplate","ready","DEFUALT_FILTER_BAR_COLUMNS","FilterBar","columns","initLabels","customLabels","labels","l","camelCasePreserveWhitespace","input","s","resourceChanged","oldResource","newResource","meta","only","desiredFields","f","maintainOrder","sort","requestAnimationFrame","adjustColumnStyles","filterGrid","foundationFilterBar","foundationFlexLayoutTemplate","FlexMediaQueriesEnum","flexLayoutRWDStyles","breakPoint","bp","foundationFlexLayoutStyles","foundationFlexLayoutShadowOptions","defaultFlexLayoutConfig","FlexLayout","foundationFlexLayout","foundationFlipperTemplate","foundationFlipperStyles","Flipper","foundationFlipperShadowOptions","defaultFlipperConfig","foundationFlipper","flyoutAnimationTime","foundationFlyoutStyles","getPrefixedFlyout","closed","visuallyhidden","closeFlyout","closingFinished","displayHeader","foundationFlyoutTemplate","Flyout","closedChanged","focusExit","exit","foundationFlyoutShadowOptions","defaultFlyoutConfig","foundationFlyout","foundationGridLayoutTemplate","GridMediaQueriesEnum","gridLayoutRWDStyles","foundationGridLayoutStyles","foundationGridLayoutShadowOptions","defaultGridLayoutConfig","ResponsiveGridBehavior","query","cols","rows","listenerCache","matchMedia","colPartial","rowPartial","attached","listener","addStyles","removeStyles","unbind","GridLayout","behaviors","addBehaviors","removeBehaviors","foundationGridLayout","foundationGridLayoutItemTemplate","setGridItemProperties","colNumber","rowNumber","colLgNumber","rowLgNumber","widthLg","heightLg","colMdNumber","rowMdNumber","widthSm","heightMd","colSmNumber","rowSmNumber","heightSm","foundationGridLayoutItemShadowOptions","defaultGridLayoutItemConfig","GridLayoutItem","foundationGridLayoutItem","foundationHorizontalScrollTemplate","foundationHorizontalScrollStyles","HorizontalScroll","foundationHorizontalScrollShadowOptions","defaultHorizontalScrollConfig","nextFlipper","scrollToNext","flippersHiddenFromAT","previousFlipper","scrollToPrevious","foundationHorizontalScroll","foundationIconStyles","getPrefixedIcon","tooltipId","isError","tooltip","foundationIconTemplate","foundationIconShadowOptions","defaultIconConfig","FaPrefixFromStyle","faSizeValueDefault","faSizeValues","Icon","nameChanged","loadIcon","sizeChanged","variantChanged","iElement","replaceChildren","getDefaultTooltipConfig","uuid","createId","iconDefinition","faIcon","innerHTML","n","foundationIcon","foundationListboxTemplate","foundationListboxStyles","foundationListboxShadowOptions","defaultListboxConfig","foundationListbox","foundationListboxOptionTemplate","foundationListboxOptionStyles","ListboxOption","foundationListboxOptionShadowOptions","defaultListboxOptionConfig","foundationListboxOption","foundationMenuTemplate","foundationMenuStyles","Menu","foundationMenuShadowOptions","defaultMenuConfig","foundationMenu","foundationMenuItemTemplate","foundationMenuItemStyles","MenuItem","foundationMenuItemShadowOptions","defaultMenuItemConfig","expandCollapseGlyph","foundationMenuItem","foundationModalStyles","foundationModalTemplate","foundationModalShadowOptions","defaultModalConfig","Modal","isDragging","offsetX","offsetY","modalWidth","modalHeight","onMouseDownBound","onMouseMoveBound","onMouseUpBound","draggable","HTMLElement","draggableChanged","ignore","onMouseDown","removeDraggableEventListeners","showModal","isEventTargetInDraggableTarget","topElement","isInsideTopSlot","topElementSlot","onMouseMove","onMouseUp","foundationModal","foundationNumberFieldTemplate","readOnly","handleTextInput","handleChange","handleKeyDown","handleBlur","autofocus","list","maxlength","minlength","required","step","ariaAtomic","ariaBusy","ariaCurrent","ariaDescribedby","ariaDetails","ariaDisabled","ariaErrormessage","ariaFlowto","ariaHaspopup","ariaHidden","ariaInvalid","ariaKeyshortcuts","ariaLive","ariaOwns","ariaRelevant","ariaRoledescription","hideStep","stepUp","stepUpGlyph","stepDown","stepDownGlyph","foundationNumberFieldStyles","NumberParser","locale","parts","Intl","NumberFormat","formatToParts","numerals","useGrouping","_group","RegExp","_decimal","_separator","_numeral","_index","localeNumber","hasSeparator","test","MAX_DIGIT","DECIMAL_BASE","getSeparatorsFromParser","decimalSeparator","formatControlValue","toIntlNumberFormat","applyDecimalPrecisionLimits","numericValue","isNaN","decimalIndex","hasDecimal","currentDecimalPlaces","minFractionDigits","minimumFractionDigits","maxFractionDigits","maximumFractionDigits","integerPart","truncatedDecimalPart","validateValue","withFormatting","precision","stringValue","inputPrecision","cleanValue","inputVal","sanitiseInputVal","integerDigits","decimalDigitsNeeded","validateInput","parsedValue","escapedSeparator","trailingZerosRegex","trailingZerosMatch","significantDigits","trailingZeros","baseNumber","decimalPart","neededZeros","preserveTrailingZerosAfterParse","validateMinMax","validValue","parseFloat","calculateAutoStepPrecision","valueStr","decimalPlaces","pow","toFixed","NumberField","autoStepPrecision","maximumInputPrecision","autocompleteChanged","proxy","HTMLInputElement","stepValue","stepUpValue","valueString","parseInt","lastDigitIndex","newLastDigit","newDecimalPart","carry","newDigit","incrementWithPrecision","stepDownValue","borrow","decrementWithPrecision","hasSeparatorWithoutDecimals","validatedValue","foundationNumberFieldShadowOptions","defaultNumberFieldConfig","foundationNumberField","defaultNetworkMonitorConfig","windowEvents","documentEvents","genesisConnectEvents","ignoredGenesisResources","startDelay","checkInterval","checkTimeout","resourceChecks","getMoreColumns","lastUpdated","now","lastMessage","MORE_COLUMNS_ACK","resourceDataLogon","functions","onMessage","onError","sendForStream","NetworkMonitorConfig","SystemHealthChanged","networkLogger","Info","firstUpdated","browserInformation","navigator","userAgent","safeStringifyValue","depthLimit","edgesLimit","DefaultNetworkMonitor","unsubscribableObservers","runAllChecks","force","isReady","isRunningChecks","resources","synchroniseCheckInterval","formattedTimestamp","getFormattedTimestamp","getNowTimestamp","isOnline","isOnlineCheck","socket","normaliseSerializedSocketStatus","socketStatus","serialize","passedPreFlightSocketChecks","preFlightSocketChecks","_","existingEntry","normaliseResourceHealth","reportSystemHealth","isAuthenticated","user","resourcesAllConnected","allChecks","lastError","timeout","attemptDataLogon","ms","valueCreator","race","receivedMessage","MSG_NACK","NOT_FOUND","checkEnvelope","allSettled","status","addListeners","removeListeners","clearInterval","internalId","onLine","addResource","removeResource","eventName","connectEvents","addStreamListener","readableError","FORBIDDEN","addCommitListener","addMetadataListener","eventEmitter","normaliseEventDetail","isHealthy","CustomEvent","composed","reconnectionLimitReached","reportStabilityToGenesis","health","isDisconnected","isConfigured","nextUpdate","getNextTimestamp","username","normalisedDetail","isReconnecting","isConnecting","closedDetails","isDisconnectedByServer","closedCode","closedReason","withOrWithout","milliseconds","setInterval","NetworkMonitor","singleton","foundationProgressTemplate","foundationProgressStyles","Progress","foundationProgressShadowOptions","defaultProgressConfig","indeterminateIndicator1","indeterminateIndicator2","foundationProgress","createDesignSystemProxy","designSystem","Proxy","prop","Reflect","provideDesignSystem","DesignSystem","getOrCreate","withPrefix","SystemHealthOverlayMode","SystemHealthOverlay","timeTillNextUpdate","totalMs","remainMs","remainPercent","onSystemHealthChanged","resourceList","onOpen","byUser","isOpen","wasOpenedByUser","isDismissed","onClose","onDismiss","onUpdateStatus","onReportStatus","onReloadWindow","location","reload","onDocumentKeydown","defaultPrevented","ArrowUp","altKey","ArrowDown","isOpenChanged","updateTemplateClassNames","isDismissedChanged","modeChanged","logLevelChanged","statusChanged","updateClassNames","startTimeTillNextUpdateCountdown","isOnlineClassNames","isHealthyClassNames","isSocketHealthyClassNames","isSocketHealthy","resourcesAllConnectedClassNames","validResourceList","templateClassNames","containerClassNames","timeTillNextUpdateInterval","floor","networkMonitor","addEventListeners","removeEventListeners","eventBridge","getCheckmarkTemplate","isGood","foundationSystemHealthOverlayTemplate","saveDataCallback","platform","os","version","browser","closedClean","foundationSystemHealthOverlayStyles","foundationSystemHealthOverlayShadowOptions","defaultSystemHealthOverlayConfig","foundationSystemHealthOverlay","jsonConverter","Popper","placement","flip","selectorChanged","popper","buildOptions","placementChanged","setOptions","offsetChanged","flipChanged","modifiers","offset","enabled","foundationPopper","foundationProgressRingTemplate","foundationProgressRingStyles","ProgressRing","foundationProgressRingShadowOptions","defaultProgressRingConfig","foundationProgressRing","foundationRadioTemplate","foundationRadioStyles","Radio","foundationRadioShadowOptions","defaultRadioConfig","foundationRadio","foundationRadioGroupTemplate","foundationRadioGroupStyles","RadioGroup","foundationRadioGroupShadowOptions","defaultRadioGroupConfig","foundationRadioGroup","schedulerStyles","getPrefixedScheduler","timezone","cron","foundationSchedulerTemplate","Scheduler","cronConfigChanged","cronConfig","cronExpression","foundationSchedulerShadowOptions","foundationScheduler","showNotificationToast","RecurrenceType","WeekType","DateOrDay","weekNumber","months","CronBuilderEvents","formatFrequency","freq","isInRange","numVal","isValidValue","minVal","maxVal","checkSpecial","isValueInRange","start","end","every","part","buildConfigForDailyRecurrence","dayOfMonth","dayOfWeek","DAILY","frequency","weekType","WEEK","WORK_WEEK","buildConfigForHourlyRecurrence","hours","HOURLY","buildConfigForWeeklyRecurrence","WEEKLY","selectedDays","Set","getDateOrDay","mon","dayOrDate","DAY_OF_MONTH","dayDate","YEARLY","buildConfigForYearlyRecurrence","getDateOrDayConfig","dateOrDay","buildConfigForMonthlyRecurrence","MONTHLY","inputControls","schedulerCronBuilderStyles","EventEmitter","Target","args","detailOrOptions","candidate","getBaseEmitArgs","dailyRecurrenceStyles","dailyRecurrenceTemplate","getPrefixedDailyRecurrence","updateCronConfig","DailyRecurrence","configChanged","monthlyYearlyRecurrenceStyles","monthTemplate","selectedMonth","getPrefixedMonthlyYearlyRecurrence","dayOrDateTemplate","dateTemplate","dayOfMonthTemplate","monthlyYearlyRecurrenceTemplate","MonthlyYearlyRecurrence","setFieldsFromConfig","getDayOrDateConfig","dayDateConfig","weeklyRecurrenceStyles","weeklyRecurrenceTemplate","getPrefixedWeeklyRecurrence","checkboxChangeHandler","WeeklyRecurrence","checked","getPrefixedCronBuilder","recurrence","handleRecurrenceChange","frequencySuffix","frequencyList","recycle","minutes","seconds","dailyTemplate","weeklyTemplate","monthlyOrYearlyTemplate","foundationSchedulerCronBuilderTemplate","SchedulerCronBuilder","getConfigs","cronChanged","isValid","cronParts","second","minute","hour","MAX_MINS_SEC","MAX_HOURS","isValidCron","setsFieldsFromCronEx","console","handleCronConfigUpdate","getBaseConfigFields","baseConfigFields","generateCronExpressionFromConfig","getCronExpressionForHourly","formatFrequencyInput","getCronExpressionForDaily","getCronExpressionForWeekly","getCronExpressionForMonth","getCronExpressionForYear","methods","parseCronExpression","foundationSchedulerCronBuilderShadowOptions","defaultCronBuilderConfig","foundationSchedulerCronBuilder","schedulerTimezoneStyles","getPrefixedSchedulerTimezone","timeZones","foundationSchedulerTimezoneTemplate","SchedulerTimezone","timezoneChanged","getTimeZones","priorityTimezones","REQUEST","ZONE_ID","localeCompare","foundationSchedulerTimezoneShadowOptions","defaultTimezoneConfig","foundationSchedulerTimezone","foundationSearchBarStyles","crossIcon","plusIcon","getPrefixedSearchBar","inputdeleted","pasteHandler","unselectOption","isEnabled","searchTerm","clearSearch","foundationSearchBarTemplate","SCROLL_TIMEOUT","INPUT_MIN_LENGTH","COMBO_INPUT_MIN_LENGTH","getCriteriaBuilder","term","SearchBar","normalizeDelimiter","inputString","addOrReplaceSelectedText","previousText","selectedText","newText","combobox","trimSearchTerm","availableOption","createCriteria","resourceType","self","compareOption","selectedOptionsDiv","scrollTo","pastedText","clipboardData","getData","formattedText","getSelection","hasSelectedOption","filterSelectedOptions","foundationSearchBarShadowOptions","defaultSearchBarConfig","foundationSearchBar","foundationSearchBarComboboxStyles","foundationSearchBarComboboxTemplate","ariaExpanded","SearchBarCombobox","previousLength","changeListener","captured","closest","firstOption","slottedOptions","selectPreviousOption","selectNextOption","setPositioning","focusAndScrollOptionIntoView","foundationSearchBarComboboxShadowOptions","defaultSearchBarComboboxConfig","foundationSearchBarCombobox","foundationSectionNavigatorStyles","foundationSectionNavigatorTemplate","getPrefixedSectionNavigatorTemplate","sectionItems","activeSection","getSectionStateClass","handleSectionClick","states","stateName","getStateTooltip","getStateIcon","EVENT_PREFIX","SECTION_NAVIGATOR_EVENTS","setState","setStates","clearState","clearAllStates","DEFAULT_SECTION_STATES_TOOLTIPS","active","inactive","pending","completed","DEFAULT_SECTION_STATES_ICONS","SectionNavigator","sections","scrollBehavior","stateTooltips","stateIcons","disableAutoScrollDetection","userClickedSection","isUserScrolling","sectionsChanged","setSectionItems","setActiveSection","updateScrollDetection","disableAutoScrollDetectionChanged","scrollBehaviorChanged","updateSpacer","setupStateEventListeners","sectionName","scrollToSection","sectionContent","spacerElement","containerHeight","clientHeight","lastSection","lastSectionHeight","spacerPadding","spacerHeight","className","pointerEvents","targetElement","scrollTop","offsetTop","setupScrollEndDetection","cleanupScrollDetection","setupScrollDetection","scrollCheckHandler","scrollDebounceTimeout","updateActiveSectionBasedOnScrollPosition","SCROLL_DEBOUNCE_TIMEOUT","passive","startScrollingHandler","endScrollingHandler","scrollEndTimeout","SCROLL_END_TIMEOUT","centerPoint","closestSection","closestDistance","Infinity","section","elementCenter","distance","abs","cleanupScrollEndDetection","scrollEndHandler","handleSetStateRef","addState","handleSetStatesRef","stateNames","addStates","handleClearStateRef","handleClearAllStatesRef","clearAllStatesInAllSections","handleGenericStateEventRef","eventType","sectionElement","getAttribute","slotElement","newDetail","newEvent","cancelable","updateSectionStates","newStates","sectionIndex","updatedSection","currentStates","stateIndex","foundationSectionNavigatorShadowOptions","defaultSectionNavigatorConfig","foundationSectionNavigator","foundationSegmentedControlTemplate","foundationSegmentedControlStyles","SegmentedControl","slottedRadioButtons","radio","foundationSegmentedControlShadowOptions","defaultSegmentedControlConfig","foundationSegmentedControl","foundationSegmentedItemTemplate","keypressHandler","foundationSegmentedItemStyles","SegmentedItem","foundationSegmentedItemShadowOptions","defaultSegmentedItemConfig","foundationSegmentedItem","foundationSelectTemplate","foundationSelectStyles","Select","optionToFocus","rootNode","activeElement","getRootActiveElement","collapsible","foundationSelectShadowOptions","defaultSelectConfig","foundationSelect","foundationSkeletonTemplate","foundationSkeletonStyles","Skeleton","foundationSkeletonShadowOptions","defaultSkeletonConfig","foundationSkeleton","foundationSliderTemplate","orientation","horizontal","valueTextFormatter","base","percentage","round","thumb","foundationSliderStyles","Slider","foundationSliderShadowOptions","defaultSliderConfig","foundationSlider","foundationSliderLabelTemplate","foundationSliderLabelStyles","SliderLabel","foundationSliderLabelShadowOptions","defaultSliderLabelConfig","foundationSliderLabel","SNACKBAR_TYPE_DEFAULT","SNACKBAR_TYPES","DEFAULT","SUCCESS","SNACKBAR_CLOSE_TIMEOUT","SNACKBAR_EVENTS_NAMES","DISMISS","AUTO_DISMISS","foundationSnackbarStyles","getPrefixedSnackbar","deleteAnimation","foundationSnackbarTemplate","foundationSnackbarShadowOptions","Snackbar","dismissEventListener","handleDissmis","autoCloseChanged","timeoutRef","errorChanged","autoDissmis","identifier","foundationSnackbar","foundationStackingIconsStyles","foundationStackingIconsTemplate","StackingIcons","foundationStackingIcons","statusPillStyles","foundationStatusPillTemplate","getPrefixedStatusPillTemplate","iconSrc","iconInitial","iconInitialBackgroundColor","countdown","formatTimeForCountDown","totalMilliseconds","minUnit","totalSeconds","days","StatusPill","dateCountdownCompletedMessage","dateCountdownUnit","dateCountdownChanged","clearCountdownTimer","setUpDateCountdown","dateCountdown","baseDate","updateCountdown","dateInterval","targetDate","diff","foundationStatusPill","getPrefixedStepperTab","TabsOrientation","vertical","showCursorPointer","tabPosition","hideStepNumber","isLast","foundationStepperTabTemplate","foundationStepperTabStyles","StepperTab","isCompleted","selectedChanged","treeItem","foundationStepperTabShadowOptions","defaultStepperTabConfig","foundationStepperTab","foundationStepperTabPanelTemplate","StepperTabPanel","foundationStepperTabPanelShadowOptions","defaultStepperTabPanelConfig","foundationStepperTabPanel","foundationSwitchTemplate","foundationSwitchStyles","Switch","foundationSwitchShadowOptions","defaultSwitchConfig","switch","foundationSwitch","foundationTabTemplate","foundationTabStyles","Tab","foundationTabShadowOptions","defaultTabConfig","foundationTab","foundationTabPanelTemplate","foundationTabPanelStyles","TabPanel","foundationTabPanelShadowOptions","defaultTabPanelConfig","foundationTabPanel","foundationTabsTemplate","foundationTabsStyles","Tabs","currentTabIndex","activeTabIndex","foundationTabsShadowOptions","defaultTabsConfig","foundationTabs","foundationTextAreaTemplate","foundationTextAreaStyles","TextArea","foundationTextAreaShadowOptions","defaultTextAreaConfig","foundationTextArea","foundationTextFieldTemplate","autocapitalize","pattern","spellcheck","activeColorScheme","elem","LightMode","foundationTextFieldStyles","TextField","autocapitalizeChanged","foundationTextFieldShadowOptions","defaultTextFieldConfig","foundationTextField","foundationToastStyles","getPrefixedToast","notificationIcon","foundationToastTemplate","foundationToastShadowOptions","defaultToastConfig","Toast","foundationToast","foundationToolbarTemplate","foundationToolbarStyles","Toolbar","foundationToolbarShadowOptions","defaultToolbarConfig","foundationToolbar","foundationTooltipTemplate","foundationTooltipStyles","Tooltip","foundationTooltipShadowOptions","defaultTooltipConfig","foundationTooltip","foundationTreeItemTemplate","foundationTreeItemStyles","TreeItem","foundationTreeItemShadowOptions","defaultTreeItemConfig","foundationTreeItem","foundationTreeViewTemplate","foundationTreeViewStyles","TreeView","foundationTreeViewShadowOptions","defaultTreeViewConfig","foundationTreeView","foundationUrlInputStyles","getPrefixedUrlInput","focused","saveUrl","foundationUrlInputTemplate","foundationUrlInputShadowOptions","defaultUrlInputConfig","UrlInput","foundationUrlInput","baseComponents","DataGridDatasource","dataGrid","getColumnDefs","fieldsMetadata","columnDefinitions","rowsData","BASE_LOGICAL_COMBINATORS","maxRules","LOGICAL_COMBINATORS","NULL_COMBINATOR","invisible","numericTypes","dateTypes","allTypes","BASE_OPERATORS","nbInputs","applyTo","optgroup","t","deepClone","findOperateOnGroup","model","groupId","fn","newModel","findAndUpdate","newNode","updatedChildren","child","updatedGroup","findNode","targetId","predicate","findParentGroupOfGroup","findParentGroupOfRule","ruleId","addGroupOrRule","parentGroupId","newItem","ROOT_GROUP","groupToModelGroup","mapper","getConfig","getGroupId","_groupToModelGroup","rule","getRuleId","modelGroupToGroup","modelGroup","modelRule","modelRuleToRule","combinator","formatDateString","getUTCFullYear","getUTCMonth","padStart","getUTCDate","formatDateTimeString","getUTCHours","getUTCMinutes","getUTCSeconds","getFieldInput","valueType","getFieldType","processOptGroups","grouped","ungrouped","sortItems","fieldId","op","applyCustomStyles","component","styleKey","customStyles","styleElement","Events","combinatorsTemplate","maybeRadioBlock","customElements","radioTag","radioGroupTag","handleCombinatorChange","combinators","controlButtonsTemplate","buttonTag","ruleTooltip","groupTooltip","allowAddRule","dispatchAddRule","allowAddGroup","dispatchAddGroup","dispatchDeleteGroup","loopCtx","innerCtx","ExpressionGroup","maxNesting","AddRule","newGroup","AddGroup","DelGroup","updateCombinator","handleCustomCombinatorChange","dispatchGroupDataUpdated","newData","UpdateGroup","selectTag","optionTag","optgroupTag","dispatchFieldsChanged","groupedFieldss","groupOrFields","RuleField","FieldSelected","handleOperatorChange","groupedOperators","groupOrOperator","RuleOperator","operators","allowedOperators","fieldAllows","operatorAllows","operatorId","OperatorSelected","isIntType","isFloatType","numberPatternValidator","simpleTemplate","inputType","configKey","customTag","validationError","handleInputChange","checkboxTemplate","checkbox","unsupportedTemplate","templateSwitcher","inputFieldType","validationMsg","variadic","valueIndex","handleRemoveVariadicOperand","ruleValueTemplate","RuleValue","validation","v","errorMsg","ValueUpdated","RemoveVarArg","defaultVal","newOpt","m","defaultValue","fieldDefault","operatorChangedUpdatedModel","newOperator","tryPrevVal","valueChangedUpdateModel","argIndex","isValueInvalid","handleFieldSelected","handleOperatorSelected","operandIterator","operandValue","handleValueChanged","handleRemoveVarArg","dispatchAddVarArg","dispatchDeleteRule","ExpressionRule","partialRuleValidationWarning","isPartialRuleError","variadicRule","UpdateRule","DelRule","newFiler","operatorType","ruleCount","groupCount","userUpdatingModel","handleAddGroup","_handleAddGroup","handleAddRule","_handleAddRule","handleDeleteGroup","_handleDeleteGroup","handleDeleteRule","_handleDeleteRule","handleUpdateGroupData","_handleUpdateGroupData","handleUpdateRuleData","_handleUpdateRuleData","newConfig","isValidConfig","initBaseModel","modelChanged","dispatchChangeEvent","Boolean","_newGroup","newRule","groupIdToDelete","ruleIdToDelete","groupIdToUpdate","updateGroupData","ruleIdToUpdate","updateRuleData","FoundationExpressionBuilder","intTypes","floatTypes","numberTypes","mapFieldTypeToRuleExpressionType","toBinaryExpression","LEFT","RIGHT","VALUE","toSetValueBinaryExpression","toMethodExpression","METHOD","restParams","PARAMETERS","MILLIS_TO_SECONDS","transformRuleValue","validRule","fieldType","transform","groupToRuleExpression","ruleToRuleExpression","EXPRESSIONS","rebuildRuleValue","rhs","operatorNbInputs","dateObj","ExpressionBuilderCore","RuleExpression","methodCall","CONTAINS_IGNORE_CASE","CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE","IS_NULL_OR_BLANK","NOT_NULL_OR_BLANK","TRIM","LONG_TO_DATE","LONG_TO_DATE_TIME","DATE_TIME_IS_IN_RANGE","logicalOperations","operations","GREATER_THAN","LESS_THAN","GREATER_THAN_OR_EQUAL","LESS_THAN_OR_EQUAL","EQUALS","NOT_EQUALS","PLUS","MINUS","MULTIPLY","DIVIDE","BITWISE_AND","BITWISE_OR","ASSIGNMENT","IS_CURRENT","IS_PREVIOUS","logicalCombinators","clientOperators","IS_NULL","NOT_NULL","CONTAINS","CONTAINS_WORDS_STARTING_WITH","CONTAINS_WORDS_STARTING_SPLIT_DELIMITER","IS_BEFORE","IS_AFTER","ON_OR_BEFORE","ON_OR_AFTER","dateRangeValueType","HOUR","DAY","MONTH","YEAR","logicalOperators","transformOperatorNameToServerName","ruleToRuleMethodExpression","operatorName","ruleInput","rhsType","transformServerNameToOperatorName","rulePartialField","rebuildOperator","binExpr","clientOperatorName","fromBinaryExpression","TERNARARY_FUNCTION_OPERANDS","fromMethodExpression","methodExpr","ruleExpressionToGroup","expr","FoundationRuleExpressionBuilder","ruleConfigChanged","oldConfig","ruleExpr","valueOperatorNames","CONVERT_TO_DATE","CONVERT_TO_DATE_TIME","valueOperators","FoundationValueExpressionBuilder","valueConfigChanged","topLevelPredicateExpr","maybeValueExpr","foundationNotificationListenerTemplate","NotificationEvent","foundationNotificationListenerShadowOptions","NotificationListener","toastButtons","NOTIFICATION_EVENT","notificationListener","connectionSub","isConnected$","handleReconnection","initializeDatasource","setupDataSubscription","MESSAGE","CREATED_AT","expiry","EXPIRY","toastStructure","toastPosition","foundationNotificationListener","defineFactory","Type","overriderOrBase","overrider","override","FASTElement","define","tagFor","dependency","FASTElementDefinition","forType","FoundationAnalyticsEventType","DefaultFoundationAnalytics","analytics","trackEvent","payload","FoundationAnalytics","routerLogger","routerProperty","Router","freeze","getOrCreateFor","router","DefaultRouter","BaseType","absoluteUrl","isAbsoluteUrl","findRouter","relativeTo","findParentRouter","findTopLevelRouter","pathJoin","allowTrailingSeparator","fullPath","removeLastPathSegment","segments","pop","removeChildRouteParameter","FoundationRouteNav","current","generateRoute","relativeTo_1","path_1","args_1","p","generateRouteFromPath","trigger","history","pushState","replaceState","name_1","generateRouteFromName","defaultNavItemPredicate","navId","defaultPlacementIndexPadding","getNavItems","routes","placementIndexPadding","route","navItems","routeIndex","navItemIndex","placementIndex","routePath","routeName","FoundationRouteCollection","definitions","owner","isTopLevelRouter","basename","delim","modifiedPath","FoundationRouterConfiguration","loginPath","notFoundPath","notPermittedPath","configureAnalytics","contributors","navigate","phase","routeChanged","endpoint","configureRoutePermittedChecks","settings","isPermitted","cancel","trackPath","configureFallbackRouteDefinition","fallback","redirect","_session","captureReturnUrl","navigationPhaseLoginRedirect","generateNavigationPath","navigateTo","getNavigationPathBasename","queryString","parentRoutePath","construct","Container","NavigateToEventType","GenerateNavigationPathEventType","FoundationRouter","onNavigateTo","onGenerateNavigationPath","getPrefixedStepper","hideTabs","handleStepClick","progressValue","hideAllButtons","previousStep","disabledPreviousStep","isLastStep","hideSubmitButton","_submit","islastStepValid","nextStep","foundationStepperTemplate","foundationStepperStyles","Stepper","allowBackwardJumps","allowForwardJumps","pendingNextStep","slotsInitialized","setTabs","getActiveIndex","tabs","tab","isActiveTab","tabIds","tabId","tabpanelId","tabpanelIds","activetab","activeid","resetCompletedState","getCompletedTabs","completedCount","tabpanels","setTabPanels","tabpanel","orientationChanged","activeidChanged","tabsChanged","setTabsAndTabPanels","checkAndExecutePendingNextStep","tabpanelsChanged","getTabIds","getTabPanelIds","goToStep","stepNumber","bypassJumpRestrictions","targetIndex","handleBackwardJump","handleForwardJump","goToFirstStep","goToLastStep","stepIndex","targetStepIndex","stepId","lastStepIndex","tabPanel","foundationStepperShadowOptions","defaultStepperConfig","foundationStepper","registerFoundationDesignSystem","loadFontFaces","fontFaceRules","styleElementId","FontStyle","FontWeight","getFontMixin","family","Normal","Regular","TypeRampValues"],"sourceRoot":""}
|