@microsoft/fast-element 2.10.3 → 3.0.0-rc.1
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/ARCHITECTURE_HTML_TAGGED_TEMPLATE_LITERAL.md +1 -1
- package/ARCHITECTURE_OVERVIEW.md +2 -2
- package/CHANGELOG.json +31 -1
- package/CHANGELOG.md +10 -2
- package/DECLARATIVE_DESIGN.md +806 -0
- package/DECLARATIVE_HTML.md +470 -0
- package/DECLARATIVE_MIGRATION.md +215 -0
- package/DECLARATIVE_RENDERING.md +530 -0
- package/DECLARATIVE_RENDERING_LIFECYCLE.md +288 -0
- package/DECLARATIVE_SCHEMA_OBSERVER_MAP.md +489 -0
- package/DESIGN.md +143 -34
- package/MIGRATION.md +387 -0
- package/README.md +208 -1
- package/SIZES.md +25 -0
- package/api-extractor.arrays.json +15 -0
- package/api-extractor.context.json +1 -0
- package/api-extractor.declarative.json +15 -0
- package/api-extractor.di.json +1 -0
- package/api-extractor.hydration.json +15 -0
- package/api-extractor.styles.json +15 -0
- package/dist/arrays/arrays.api.json +2621 -0
- package/dist/context/context.api.json +1 -1
- package/dist/declarative/declarative.api.json +7844 -0
- package/dist/di/di.api.json +2 -2
- package/dist/dts/array-observer.d.ts +2 -0
- package/dist/dts/arrays.d.ts +2 -0
- package/dist/dts/attr.d.ts +1 -0
- package/dist/dts/binding/signal.d.ts +6 -6
- package/dist/dts/binding/two-way.d.ts +1 -0
- package/dist/dts/binding.d.ts +7 -0
- package/dist/dts/components/attributes.d.ts +2 -5
- package/dist/dts/components/definition-schema-transforms.d.ts +9 -0
- package/dist/dts/components/element-controller.d.ts +80 -114
- package/dist/dts/components/element-hydration.d.ts +1 -1
- package/dist/dts/components/enable-hydration.d.ts +34 -0
- package/dist/dts/components/fast-definitions.d.ts +91 -42
- package/dist/dts/components/fast-element.d.ts +5 -8
- package/dist/dts/components/hydration-tracker.d.ts +40 -0
- package/dist/dts/components/hydration.d.ts +18 -53
- package/dist/dts/components/schema.d.ts +205 -0
- package/dist/dts/context.d.ts +6 -6
- package/dist/dts/css.d.ts +3 -0
- package/dist/dts/debug.d.ts +5 -1
- package/dist/dts/declarative/attribute-map.d.ts +58 -0
- package/dist/dts/declarative/debug.d.ts +5 -0
- package/dist/dts/declarative/index.d.ts +13 -0
- package/dist/dts/declarative/interfaces.d.ts +9 -0
- package/dist/dts/declarative/observer-map-utilities.d.ts +58 -0
- package/dist/dts/declarative/observer-map.d.ts +89 -0
- package/dist/dts/declarative/runtime.d.ts +5 -0
- package/dist/dts/declarative/syntax.d.ts +21 -0
- package/dist/dts/declarative/template-bridge.d.ts +33 -0
- package/dist/dts/declarative/template-parser.d.ts +98 -0
- package/dist/dts/declarative/template.d.ts +9 -0
- package/dist/dts/declarative/utilities.d.ts +312 -0
- package/dist/dts/di/di.d.ts +1 -1
- package/dist/dts/directives/children.d.ts +2 -0
- package/dist/dts/directives/node-observation.d.ts +2 -0
- package/dist/dts/directives/ref.d.ts +2 -0
- package/dist/dts/directives/repeat.d.ts +4 -0
- package/dist/dts/directives/slotted.d.ts +2 -0
- package/dist/dts/directives/when.d.ts +3 -0
- package/dist/dts/dom-policy.d.ts +1 -1
- package/dist/dts/html.d.ts +5 -0
- package/dist/dts/hydration/runtime.d.ts +7 -0
- package/dist/dts/hydration/target-builder.d.ts +15 -12
- package/dist/dts/hydration.d.ts +14 -0
- package/dist/dts/index.d.ts +38 -42
- package/dist/dts/index.debug.d.ts +0 -1
- package/dist/dts/index.rollup.debug.d.ts +0 -1
- package/dist/dts/interfaces.d.ts +1 -49
- package/dist/dts/observable.d.ts +3 -6
- package/dist/dts/observation/arrays.d.ts +1 -1
- package/dist/dts/observation/update-queue.d.ts +1 -1
- package/dist/dts/platform.d.ts +25 -4
- package/dist/dts/render.d.ts +7 -0
- package/dist/dts/schema.d.ts +1 -0
- package/dist/dts/state/exports.d.ts +1 -1
- package/dist/dts/state/state.d.ts +2 -2
- package/dist/dts/styles/css-directive.d.ts +5 -12
- package/dist/dts/styles/css.d.ts +5 -7
- package/dist/dts/styles/element-styles.d.ts +0 -10
- package/dist/dts/styles.d.ts +6 -0
- package/dist/dts/templating/children.d.ts +1 -1
- package/dist/dts/templating/html-binding-directive.d.ts +10 -0
- package/dist/dts/templating/html-directive.d.ts +17 -0
- package/dist/dts/templating/hydration-view.d.ts +109 -0
- package/dist/dts/templating/ref.d.ts +1 -1
- package/dist/dts/templating/render.d.ts +8 -2
- package/dist/dts/templating/repeat.d.ts +2 -2
- package/dist/dts/templating/slotted.d.ts +1 -1
- package/dist/dts/templating/template.d.ts +17 -9
- package/dist/dts/templating/view.d.ts +25 -102
- package/dist/dts/templating/when.d.ts +1 -1
- package/dist/dts/templating.d.ts +10 -0
- package/dist/dts/testing/exports.d.ts +2 -2
- package/dist/dts/tsdoc-metadata.json +1 -1
- package/dist/dts/updates.d.ts +1 -0
- package/dist/dts/volatile.d.ts +2 -0
- package/dist/esm/array-observer.js +1 -0
- package/dist/esm/arrays.js +1 -0
- package/dist/esm/attr.js +1 -0
- package/dist/esm/binding/normalize.js +1 -1
- package/dist/esm/binding/signal.js +4 -4
- package/dist/esm/binding/two-way.js +2 -1
- package/dist/esm/binding.js +4 -0
- package/dist/esm/components/attributes.js +8 -5
- package/dist/esm/components/definition-schema-transforms.js +23 -0
- package/dist/esm/components/element-controller.js +200 -269
- package/dist/esm/components/element-hydration.js +1 -1
- package/dist/esm/components/enable-hydration.js +100 -0
- package/dist/esm/components/fast-definitions.js +211 -49
- package/dist/esm/components/fast-element.js +18 -27
- package/dist/esm/components/hydration-tracker.js +93 -0
- package/dist/esm/components/hydration.js +62 -144
- package/dist/esm/components/schema.js +253 -0
- package/dist/esm/context.js +6 -6
- package/dist/esm/css.js +3 -0
- package/dist/esm/debug.js +26 -26
- package/dist/esm/declarative/attribute-map.js +121 -0
- package/dist/esm/declarative/debug.js +5 -0
- package/dist/esm/declarative/index.js +3 -0
- package/dist/esm/declarative/interfaces.js +10 -0
- package/dist/esm/declarative/observer-map-utilities.js +562 -0
- package/dist/esm/declarative/observer-map.js +216 -0
- package/dist/esm/declarative/runtime.js +14 -0
- package/dist/esm/declarative/syntax.js +36 -0
- package/dist/esm/declarative/template-bridge.js +170 -0
- package/dist/esm/declarative/template-parser.js +306 -0
- package/dist/esm/declarative/template.js +142 -0
- package/dist/esm/declarative/utilities.js +834 -0
- package/dist/esm/di/di.js +6 -8
- package/dist/esm/directives/children.js +1 -0
- package/dist/esm/directives/node-observation.js +1 -0
- package/dist/esm/directives/ref.js +1 -0
- package/dist/esm/directives/repeat.js +1 -0
- package/dist/esm/directives/slotted.js +1 -0
- package/dist/esm/directives/when.js +1 -0
- package/dist/esm/dom-policy.js +2 -2
- package/dist/esm/dom.js +1 -1
- package/dist/esm/html.js +2 -0
- package/dist/esm/hydration/runtime.js +33 -0
- package/dist/esm/hydration/target-builder.js +97 -90
- package/dist/esm/hydration.js +4 -0
- package/dist/esm/index.debug.js +2 -1
- package/dist/esm/index.js +34 -29
- package/dist/esm/index.rollup.debug.js +3 -2
- package/dist/esm/index.rollup.js +1 -1
- package/dist/esm/interfaces.js +1 -45
- package/dist/esm/observable.js +1 -4
- package/dist/esm/observation/arrays.js +1 -1
- package/dist/esm/observation/observable.js +5 -5
- package/dist/esm/observation/update-queue.js +47 -58
- package/dist/esm/platform.js +31 -30
- package/dist/esm/render.js +1 -0
- package/dist/esm/schema.js +1 -0
- package/dist/esm/state/exports.js +1 -1
- package/dist/esm/styles/css-directive.js +1 -2
- package/dist/esm/styles/css.js +15 -56
- package/dist/esm/styles/element-styles.js +69 -15
- package/dist/esm/styles.js +2 -0
- package/dist/esm/templating/html-binding-directive.js +24 -10
- package/dist/esm/templating/hydration-view.js +235 -0
- package/dist/esm/templating/render.js +13 -2
- package/dist/esm/templating/repeat.js +36 -34
- package/dist/esm/templating/template.js +7 -7
- package/dist/esm/templating/view.js +24 -233
- package/dist/esm/templating.js +7 -0
- package/dist/esm/testing/exports.js +2 -2
- package/dist/esm/updates.js +1 -0
- package/dist/esm/volatile.js +1 -0
- package/dist/fast-element.api.json +9017 -6996
- package/dist/fast-element.d.ts +3557 -796
- package/dist/fast-element.debug.js +5093 -4419
- package/dist/fast-element.debug.min.js +2 -2
- package/dist/fast-element.js +5398 -4655
- package/dist/fast-element.min.js +2 -2
- package/dist/fast-element.untrimmed.d.ts +881 -481
- package/dist/hydration/hydration.api.json +5237 -0
- package/dist/styles/styles.api.json +2672 -0
- package/docs/api-report.api.md +344 -167
- package/docs/arrays/api-report.api.md +114 -0
- package/docs/declarative/api-report.api.md +397 -0
- package/docs/hydration/api-report.api.md +285 -0
- package/docs/styles/api-report.api.md +135 -0
- package/package.json +149 -40
- package/playwright.declarative.config.ts +26 -0
- package/playwright.declarative.webui.config.ts +20 -0
- package/scripts/declarative/build-fixtures-with-webui.js +135 -0
- package/scripts/declarative/build-fixtures.js +49 -0
- package/scripts/declarative/build-fixtures.utilities.js +101 -0
- package/scripts/measure-sizes.js +219 -0
- package/scripts/run-api-extractor.js +39 -20
- package/test/declarative/fixtures/README.md +72 -0
- package/test/declarative/fixtures/WRITING_FIXTURES.md +330 -0
- package/test/declarative/fixtures/bindings/README.md +12 -0
- package/test/declarative/fixtures/bindings/attribute/entry.html +13 -0
- package/test/declarative/fixtures/bindings/attribute/fast-build.config.json +6 -0
- package/test/declarative/fixtures/bindings/attribute/index.html +25 -0
- package/test/declarative/fixtures/bindings/attribute/main.ts +41 -0
- package/test/declarative/fixtures/bindings/attribute/state.json +8 -0
- package/test/declarative/fixtures/bindings/attribute/templates.html +11 -0
- package/test/declarative/fixtures/bindings/content/entry.html +12 -0
- package/test/declarative/fixtures/bindings/content/fast-build.config.json +6 -0
- package/test/declarative/fixtures/bindings/content/index.html +19 -0
- package/test/declarative/fixtures/bindings/content/main.ts +27 -0
- package/test/declarative/fixtures/bindings/content/state.json +4 -0
- package/test/declarative/fixtures/bindings/content/templates.html +6 -0
- package/test/declarative/fixtures/bindings/dot-syntax/entry.html +11 -0
- package/test/declarative/fixtures/bindings/dot-syntax/fast-build.config.json +6 -0
- package/test/declarative/fixtures/bindings/dot-syntax/index.html +47 -0
- package/test/declarative/fixtures/bindings/dot-syntax/main.ts +59 -0
- package/test/declarative/fixtures/bindings/dot-syntax/state.json +16 -0
- package/test/declarative/fixtures/bindings/dot-syntax/templates.html +17 -0
- package/test/declarative/fixtures/bindings/event/entry.html +11 -0
- package/test/declarative/fixtures/bindings/event/fast-build.config.json +6 -0
- package/test/declarative/fixtures/bindings/event/index.html +43 -0
- package/test/declarative/fixtures/bindings/event/main.ts +43 -0
- package/test/declarative/fixtures/bindings/event/state.json +3 -0
- package/test/declarative/fixtures/bindings/event/templates.html +18 -0
- package/test/declarative/fixtures/bindings/host/entry.html +40 -0
- package/test/declarative/fixtures/bindings/host/fast-build.config.json +6 -0
- package/test/declarative/fixtures/bindings/host/index.html +96 -0
- package/test/declarative/fixtures/bindings/host/main.ts +222 -0
- package/test/declarative/fixtures/bindings/host/state.json +9 -0
- package/test/declarative/fixtures/bindings/host/templates.html +55 -0
- package/test/declarative/fixtures/directives/README.md +12 -0
- package/test/declarative/fixtures/directives/children/entry.html +11 -0
- package/test/declarative/fixtures/directives/children/fast-build.config.json +6 -0
- package/test/declarative/fixtures/directives/children/index.html +15 -0
- package/test/declarative/fixtures/directives/children/main.ts +22 -0
- package/test/declarative/fixtures/directives/children/state.json +3 -0
- package/test/declarative/fixtures/directives/children/templates.html +3 -0
- package/test/declarative/fixtures/directives/ref/entry.html +11 -0
- package/test/declarative/fixtures/directives/ref/fast-build.config.json +6 -0
- package/test/declarative/fixtures/directives/ref/index.html +15 -0
- package/test/declarative/fixtures/directives/ref/main.ts +17 -0
- package/test/declarative/fixtures/directives/ref/state.json +1 -0
- package/test/declarative/fixtures/directives/ref/templates.html +3 -0
- package/test/declarative/fixtures/directives/repeat/entry.html +21 -0
- package/test/declarative/fixtures/directives/repeat/fast-build.config.json +6 -0
- package/test/declarative/fixtures/directives/repeat/index.html +133 -0
- package/test/declarative/fixtures/directives/repeat/main.ts +110 -0
- package/test/declarative/fixtures/directives/repeat/sprites.svg +8 -0
- package/test/declarative/fixtures/directives/repeat/state.json +10 -0
- package/test/declarative/fixtures/directives/repeat/templates.html +75 -0
- package/test/declarative/fixtures/directives/slotted/entry.html +17 -0
- package/test/declarative/fixtures/directives/slotted/fast-build.config.json +6 -0
- package/test/declarative/fixtures/directives/slotted/index.html +27 -0
- package/test/declarative/fixtures/directives/slotted/main.ts +29 -0
- package/test/declarative/fixtures/directives/slotted/state.json +1 -0
- package/test/declarative/fixtures/directives/slotted/templates.html +7 -0
- package/test/declarative/fixtures/directives/when/entry.html +51 -0
- package/test/declarative/fixtures/directives/when/fast-build.config.json +6 -0
- package/test/declarative/fixtures/directives/when/index.html +136 -0
- package/test/declarative/fixtures/directives/when/main.ts +172 -0
- package/test/declarative/fixtures/directives/when/state.json +12 -0
- package/test/declarative/fixtures/directives/when/templates.html +75 -0
- package/test/declarative/fixtures/ecosystem/README.md +11 -0
- package/test/declarative/fixtures/ecosystem/declarative-no-hydration/entry.html +12 -0
- package/test/declarative/fixtures/ecosystem/declarative-no-hydration/fast-build.config.json +6 -0
- package/test/declarative/fixtures/ecosystem/declarative-no-hydration/index.html +20 -0
- package/test/declarative/fixtures/ecosystem/declarative-no-hydration/main.ts +68 -0
- package/test/declarative/fixtures/ecosystem/declarative-no-hydration/state.json +4 -0
- package/test/declarative/fixtures/ecosystem/declarative-no-hydration/templates.html +7 -0
- package/test/declarative/fixtures/ecosystem/errors/entry.html +12 -0
- package/test/declarative/fixtures/ecosystem/errors/fast-build.config.json +6 -0
- package/test/declarative/fixtures/ecosystem/errors/index.html +20 -0
- package/test/declarative/fixtures/ecosystem/errors/main.ts +17 -0
- package/test/declarative/fixtures/ecosystem/errors/state.json +1 -0
- package/test/declarative/fixtures/ecosystem/errors/templates.html +7 -0
- package/test/declarative/fixtures/ecosystem/lifecycle-callbacks/entry.html +17 -0
- package/test/declarative/fixtures/ecosystem/lifecycle-callbacks/fast-build.config.json +6 -0
- package/test/declarative/fixtures/ecosystem/lifecycle-callbacks/index.html +56 -0
- package/test/declarative/fixtures/ecosystem/lifecycle-callbacks/main.ts +134 -0
- package/test/declarative/fixtures/ecosystem/lifecycle-callbacks/state.json +12 -0
- package/test/declarative/fixtures/ecosystem/lifecycle-callbacks/templates.html +34 -0
- package/test/declarative/fixtures/ecosystem/performance-metrics/entry.html +25 -0
- package/test/declarative/fixtures/ecosystem/performance-metrics/fast-build.config.json +6 -0
- package/test/declarative/fixtures/ecosystem/performance-metrics/fast-card.css +10 -0
- package/test/declarative/fixtures/ecosystem/performance-metrics/index.html +181 -0
- package/test/declarative/fixtures/ecosystem/performance-metrics/main.ts +58 -0
- package/test/declarative/fixtures/ecosystem/performance-metrics/state.json +6 -0
- package/test/declarative/fixtures/ecosystem/performance-metrics/templates.html +15 -0
- package/test/declarative/fixtures/extensions/README.md +15 -0
- package/test/declarative/fixtures/extensions/attribute-map/entry.html +14 -0
- package/test/declarative/fixtures/extensions/attribute-map/fast-build.config.json +6 -0
- package/test/declarative/fixtures/extensions/attribute-map/index.html +31 -0
- package/test/declarative/fixtures/extensions/attribute-map/main.ts +40 -0
- package/test/declarative/fixtures/extensions/attribute-map/state.json +4 -0
- package/test/declarative/fixtures/extensions/attribute-map/templates.html +14 -0
- package/test/declarative/fixtures/extensions/attribute-map-naming-strategy/entry.html +12 -0
- package/test/declarative/fixtures/extensions/attribute-map-naming-strategy/fast-build.config.json +7 -0
- package/test/declarative/fixtures/extensions/attribute-map-naming-strategy/index.html +25 -0
- package/test/declarative/fixtures/extensions/attribute-map-naming-strategy/main.ts +31 -0
- package/test/declarative/fixtures/extensions/attribute-map-naming-strategy/state.json +5 -0
- package/test/declarative/fixtures/extensions/attribute-map-naming-strategy/templates.html +11 -0
- package/test/declarative/fixtures/extensions/attribute-map-naming-strategy-camel-case/entry.html +13 -0
- package/test/declarative/fixtures/extensions/attribute-map-naming-strategy-camel-case/fast-build.config.json +7 -0
- package/test/declarative/fixtures/extensions/attribute-map-naming-strategy-camel-case/index.html +23 -0
- package/test/declarative/fixtures/extensions/attribute-map-naming-strategy-camel-case/main.ts +37 -0
- package/test/declarative/fixtures/extensions/attribute-map-naming-strategy-camel-case/state.json +1 -0
- package/test/declarative/fixtures/extensions/attribute-map-naming-strategy-camel-case/templates.html +9 -0
- package/test/declarative/fixtures/extensions/observer-map/entry.html +15 -0
- package/test/declarative/fixtures/extensions/observer-map/fast-build.config.json +6 -0
- package/test/declarative/fixtures/extensions/observer-map/index.html +442 -0
- package/test/declarative/fixtures/extensions/observer-map/main.ts +482 -0
- package/test/declarative/fixtures/extensions/observer-map/state.json +158 -0
- package/test/declarative/fixtures/extensions/observer-map/templates.html +172 -0
- package/test/declarative/fixtures/extensions/observer-map-config-object/entry.html +16 -0
- package/test/declarative/fixtures/extensions/observer-map-config-object/fast-build.config.json +6 -0
- package/test/declarative/fixtures/extensions/observer-map-config-object/index.html +27 -0
- package/test/declarative/fixtures/extensions/observer-map-config-object/main.ts +53 -0
- package/test/declarative/fixtures/extensions/observer-map-config-object/state.json +9 -0
- package/test/declarative/fixtures/extensions/observer-map-config-object/templates.html +12 -0
- package/test/declarative/fixtures/extensions/observer-map-deep-merge/README.md +98 -0
- package/test/declarative/fixtures/extensions/observer-map-deep-merge/entry.html +156 -0
- package/test/declarative/fixtures/extensions/observer-map-deep-merge/fast-build.config.json +6 -0
- package/test/declarative/fixtures/extensions/observer-map-deep-merge/index.html +376 -0
- package/test/declarative/fixtures/extensions/observer-map-deep-merge/main.ts +366 -0
- package/test/declarative/fixtures/extensions/observer-map-deep-merge/state.json +69 -0
- package/test/declarative/fixtures/extensions/observer-map-deep-merge/templates.html +91 -0
- package/test/declarative/fixtures/extensions/observer-map-properties/entry.html +14 -0
- package/test/declarative/fixtures/extensions/observer-map-properties/fast-build.config.json +6 -0
- package/test/declarative/fixtures/extensions/observer-map-properties/index.html +110 -0
- package/test/declarative/fixtures/extensions/observer-map-properties/main.ts +175 -0
- package/test/declarative/fixtures/extensions/observer-map-properties/state.json +29 -0
- package/test/declarative/fixtures/extensions/observer-map-properties/templates.html +55 -0
- package/test/declarative/fixtures/scenarios/README.md +7 -0
- package/test/declarative/fixtures/scenarios/nested-elements/entry.html +16 -0
- package/test/declarative/fixtures/scenarios/nested-elements/fast-build.config.json +6 -0
- package/test/declarative/fixtures/scenarios/nested-elements/index.html +126 -0
- package/test/declarative/fixtures/scenarios/nested-elements/main.ts +214 -0
- package/test/declarative/fixtures/scenarios/nested-elements/state.json +10 -0
- package/test/declarative/fixtures/scenarios/nested-elements/templates.html +54 -0
- package/test/declarative/index.html +12 -0
- package/test/declarative/vite.config.ts +55 -0
- package/test/declarative-main.ts +6 -0
- package/test/extension-subpaths-main.ts +9 -0
- package/test/main.ts +38 -33
- package/test/pure-declarative-main.ts +1 -0
- package/dist/dts/components/install-hydration.d.ts +0 -1
- package/dist/dts/pending-task.d.ts +0 -32
- package/dist/dts/polyfills.d.ts +0 -0
- package/dist/dts/styles/css-binding-directive.d.ts +0 -60
- package/dist/dts/templating/install-hydratable-view-templates.d.ts +0 -1
- package/dist/esm/components/install-hydration.js +0 -3
- package/dist/esm/pending-task.js +0 -28
- package/dist/esm/polyfills.js +0 -60
- package/dist/esm/styles/css-binding-directive.js +0 -76
- package/dist/esm/templating/install-hydratable-view-templates.js +0 -23
package/dist/fast-element.min.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
let e;const t="fast-kernel";try{if(document.currentScript)e=document.currentScript.getAttribute(t);else{const s=document.getElementsByTagName("script");e=s[s.length-1].getAttribute(t)}}catch(t){e="isolate"}let s;switch(e){case"share":s=Object.freeze({updateQueue:1,observable:2,contextEvent:3,elementRegistry:4});break;case"share-v2":s=Object.freeze({updateQueue:1.2,observable:2.2,contextEvent:3.2,elementRegistry:4.2});break;default:const e=`-${Math.random().toString(36).substring(2,8)}`;s=Object.freeze({updateQueue:`1.2${e}`,observable:`2.2${e}`,contextEvent:`3.2${e}`,elementRegistry:`4.2${e}`})}var i;!function(e){e[e.needsArrayObservation=1101]="needsArrayObservation",e[e.onlySetDOMPolicyOnce=1201]="onlySetDOMPolicyOnce",e[e.bindingInnerHTMLRequiresTrustedTypes=1202]="bindingInnerHTMLRequiresTrustedTypes",e[e.twoWayBindingRequiresObservables=1203]="twoWayBindingRequiresObservables",e[e.hostBindingWithoutHost=1204]="hostBindingWithoutHost",e[e.unsupportedBindingBehavior=1205]="unsupportedBindingBehavior",e[e.directCallToHTMLTagNotAllowed=1206]="directCallToHTMLTagNotAllowed",e[e.onlySetTemplatePolicyOnce=1207]="onlySetTemplatePolicyOnce",e[e.cannotSetTemplatePolicyAfterCompilation=1208]="cannotSetTemplatePolicyAfterCompilation",e[e.blockedByDOMPolicy=1209]="blockedByDOMPolicy",e[e.missingElementDefinition=1401]="missingElementDefinition",e[e.noRegistrationForContext=1501]="noRegistrationForContext",e[e.noFactoryForResolver=1502]="noFactoryForResolver",e[e.invalidResolverStrategy=1503]="invalidResolverStrategy",e[e.cannotAutoregisterDependency=1504]="cannotAutoregisterDependency",e[e.cannotResolveKey=1505]="cannotResolveKey",e[e.cannotConstructNativeFunction=1506]="cannotConstructNativeFunction",e[e.cannotJITRegisterNonConstructor=1507]="cannotJITRegisterNonConstructor",e[e.cannotJITRegisterIntrinsic=1508]="cannotJITRegisterIntrinsic",e[e.cannotJITRegisterInterface=1509]="cannotJITRegisterInterface",e[e.invalidResolver=1510]="invalidResolver",e[e.invalidKey=1511]="invalidKey",e[e.noDefaultResolver=1512]="noDefaultResolver",e[e.cyclicDependency=1513]="cyclicDependency",e[e.connectUpdateRequiresController=1514]="connectUpdateRequiresController"}(i||(i={}));const n=e=>"function"==typeof e,r=e=>"string"==typeof e,o=()=>{};!function(){if("undefined"==typeof globalThis)if("undefined"!=typeof global)global.globalThis=global;else if("undefined"!=typeof self)self.globalThis=self;else if("undefined"!=typeof window)window.globalThis=window;else{const e=new Function("return this")();e.globalThis=e}}(),"requestIdleCallback"in globalThis||(globalThis.requestIdleCallback=function(e,t){const s=Date.now();return setTimeout((()=>{e({didTimeout:!!(null==t?void 0:t.timeout)&&Date.now()-s>=t.timeout,timeRemaining:()=>0})}),1)},globalThis.cancelIdleCallback=function(e){clearTimeout(e)});const a={configurable:!1,enumerable:!1,writable:!1};void 0===globalThis.FAST&&Reflect.defineProperty(globalThis,"FAST",Object.assign({value:Object.create(null)},a));const l=globalThis.FAST;if(void 0===l.getById){const e=Object.create(null);Reflect.defineProperty(l,"getById",Object.assign({value(t,s){let i=e[t];return void 0===i&&(i=s?e[t]=s():null),i}},a))}void 0===l.error&&Object.assign(l,{warn(){},error:e=>new Error(`Error ${e}`),addMessages(){}});const c=Object.freeze([]);function d(){const e=new Map;return Object.freeze({register:t=>!e.has(t.type)&&(e.set(t.type,t),!0),getByType:t=>e.get(t),getForInstance(t){if(null!=t)return e.get(t.constructor)}})}function h(){const e=new WeakMap;return function(t){let s=e.get(t);if(void 0===s){let i=Reflect.getPrototypeOf(t);for(;void 0===s&&null!==i;)s=e.get(i),i=Reflect.getPrototypeOf(i);s=void 0===s?[]:s.slice(0),e.set(t,s)}return s}}function u(e){e.prototype.toJSON=o}const f=Object.freeze({none:0,attribute:1,booleanAttribute:2,property:3,content:4,tokenList:5,event:6}),p=e=>e,g=globalThis.trustedTypes?globalThis.trustedTypes.createPolicy("fast-html",{createHTML:p}):{createHTML:p};let b=Object.freeze({createHTML:e=>g.createHTML(e),protect:(e,t,s,i)=>i});const v=b,m=Object.freeze({get policy(){return b},setPolicy(e){if(b!==v)throw l.error(i.onlySetDOMPolicyOnce);b=e},setAttribute(e,t,s){null==s?e.removeAttribute(t):e.setAttribute(t,s)},setBooleanAttribute(e,t,s){s?e.setAttribute(t,""):e.removeAttribute(t)}});function y(e,t,s,i){return(e,t,s,...n)=>{r(s)&&(s=s.replace(/(javascript:|vbscript:|data:)/,"")),i(e,t,s,...n)}}function w(e,t,s,n){throw l.error(i.blockedByDOMPolicy,{aspectName:s,tagName:null!=e?e:"text"})}const C={onabort:w,onauxclick:w,onbeforeinput:w,onbeforematch:w,onblur:w,oncancel:w,oncanplay:w,oncanplaythrough:w,onchange:w,onclick:w,onclose:w,oncontextlost:w,oncontextmenu:w,oncontextrestored:w,oncopy:w,oncuechange:w,oncut:w,ondblclick:w,ondrag:w,ondragend:w,ondragenter:w,ondragleave:w,ondragover:w,ondragstart:w,ondrop:w,ondurationchange:w,onemptied:w,onended:w,onerror:w,onfocus:w,onformdata:w,oninput:w,oninvalid:w,onkeydown:w,onkeypress:w,onkeyup:w,onload:w,onloadeddata:w,onloadedmetadata:w,onloadstart:w,onmousedown:w,onmouseenter:w,onmouseleave:w,onmousemove:w,onmouseout:w,onmouseover:w,onmouseup:w,onpaste:w,onpause:w,onplay:w,onplaying:w,onprogress:w,onratechange:w,onreset:w,onresize:w,onscroll:w,onsecuritypolicyviolation:w,onseeked:w,onseeking:w,onselect:w,onslotchange:w,onstalled:w,onsubmit:w,onsuspend:w,ontimeupdate:w,ontoggle:w,onvolumechange:w,onwaiting:w,onwebkitanimationend:w,onwebkitanimationiteration:w,onwebkitanimationstart:w,onwebkittransitionend:w,onwheel:w},S={elements:{a:{[f.attribute]:{href:y},[f.property]:{href:y}},area:{[f.attribute]:{href:y},[f.property]:{href:y}},button:{[f.attribute]:{formaction:y},[f.property]:{formAction:y}},embed:{[f.attribute]:{src:w},[f.property]:{src:w}},form:{[f.attribute]:{action:y},[f.property]:{action:y}},frame:{[f.attribute]:{src:y},[f.property]:{src:y}},iframe:{[f.attribute]:{src:y},[f.property]:{src:y,srcdoc:w}},input:{[f.attribute]:{formaction:y},[f.property]:{formAction:y}},link:{[f.attribute]:{href:w},[f.property]:{href:w}},object:{[f.attribute]:{codebase:w,data:w},[f.property]:{codeBase:w,data:w}},script:{[f.attribute]:{src:w,text:w},[f.property]:{src:w,text:w,innerText:w,textContent:w}},style:{[f.property]:{innerText:w,textContent:w}}},aspects:{[f.attribute]:Object.assign({},C),[f.property]:Object.assign({innerHTML:w},C),[f.event]:Object.assign({},C)}};function T(e,t){const s={};for(const i in t){const n=e[i],r=t[i];switch(n){case null:break;case void 0:s[i]=r;break;default:s[i]=n}}for(const t in e)t in s||(s[t]=e[t]);return Object.freeze(s)}function x(e,t){const s={};for(const i in t){const n=e[i],r=t[i];switch(n){case null:break;case void 0:s[i]=T(r,{});break;default:s[i]=T(n,r)}}for(const t in e)t in s||(s[t]=T(e[t],{}));return Object.freeze(s)}function O(e,t){const s={};for(const i in t){const n=e[i],r=t[i];switch(n){case null:break;case void 0:s[i]=x(n,{});break;default:s[i]=x(n,r)}}for(const t in e)t in s||(s[t]=x(e[t],{}));return Object.freeze(s)}function B(e,t,s,i,n){const r=e[s];if(r){const e=r[i];if(e)return e(t,s,i,n)}}const $=Object.freeze({create(e={}){var t,s;const i=null!==(t=e.trustedType)&&void 0!==t?t:function(){const e=e=>e;return globalThis.trustedTypes?globalThis.trustedTypes.createPolicy("fast-html",{createHTML:e}):{createHTML:e}}(),n=(r=null!==(s=e.guards)&&void 0!==s?s:{},o=S,Object.freeze({elements:r.elements?O(r.elements,o.elements):o.elements,aspects:r.aspects?x(r.aspects,o.aspects):o.aspects}));var r,o;return Object.freeze({createHTML:e=>i.createHTML(e),protect(e,t,s,i){var r;const o=(null!=e?e:"").toLowerCase(),a=n.elements[o];if(a){const n=B(a,e,t,s,i);if(n)return n}return null!==(r=B(n.aspects,e,t,s,i))&&void 0!==r?r:i}})}});class N{constructor(e,t){this.sub1=void 0,this.sub2=void 0,this.spillover=void 0,this.subject=e,this.sub1=t}has(e){return void 0===this.spillover?this.sub1===e||this.sub2===e:-1!==this.spillover.indexOf(e)}subscribe(e){const t=this.spillover;if(void 0===t){if(this.has(e))return;if(void 0===this.sub1)return void(this.sub1=e);if(void 0===this.sub2)return void(this.sub2=e);this.spillover=[this.sub1,this.sub2,e],this.sub1=void 0,this.sub2=void 0}else{-1===t.indexOf(e)&&t.push(e)}}unsubscribe(e){const t=this.spillover;if(void 0===t)this.sub1===e?this.sub1=void 0:this.sub2===e&&(this.sub2=void 0);else{const s=t.indexOf(e);-1!==s&&t.splice(s,1)}}notify(e){const t=this.spillover,s=this.subject;if(void 0===t){const t=this.sub1,i=this.sub2;void 0!==t&&t.handleChange(s,e),void 0!==i&&i.handleChange(s,e)}else for(let i=0,n=t.length;i<n;++i)t[i].handleChange(s,e)}}class k{constructor(e){this.subscribers={},this.subjectSubscribers=null,this.subject=e}notify(e){var t,s;null===(t=this.subscribers[e])||void 0===t||t.notify(e),null===(s=this.subjectSubscribers)||void 0===s||s.notify(e)}subscribe(e,t){var s,i;let n;n=t?null!==(s=this.subscribers[t])&&void 0!==s?s:this.subscribers[t]=new N(this.subject):null!==(i=this.subjectSubscribers)&&void 0!==i?i:this.subjectSubscribers=new N(this.subject),n.subscribe(e)}unsubscribe(e,t){var s,i;t?null===(s=this.subscribers[t])||void 0===s||s.unsubscribe(e):null===(i=this.subjectSubscribers)||void 0===i||i.unsubscribe(e)}}const A=l.getById(s.updateQueue,(()=>{const e=[],t=[],s=globalThis.requestAnimationFrame;let i=!0;function n(){if(t.length)throw t.shift()}function r(s){try{s.call()}catch(s){if(!i)throw e.length=0,s;t.push(s),setTimeout(n,0)}}function o(){let t=0;for(;t<e.length;)if(r(e[t]),t++,t>1024){for(let s=0,i=e.length-t;s<i;s++)e[s]=e[s+t];e.length-=t,t=0}e.length=0}function a(t){e.push(t),e.length<2&&(i?s(o):o())}return Object.freeze({enqueue:a,next:()=>new Promise(a),process:o,setMode:e=>i=e})})),E=Object.freeze({unknown:void 0,coupled:1}),M=l.getById(s.observable,(()=>{const e=A.enqueue,t=/(:|&&|\|\||if|\?\.)/,s=new WeakMap;let o,a=e=>{throw l.error(i.needsArrayObservation)};function c(e){var t;let i=null!==(t=e.$fastController)&&void 0!==t?t:s.get(e);return void 0===i&&(Array.isArray(e)?i=a(e):s.set(e,i=new k(e))),i}const d=h();class f{constructor(e){this.name=e,this.field=`_${e}`,this.callback=`${e}Changed`}getValue(e){return void 0!==o&&o.watch(e,this.name),e[this.field]}setValue(e,t){const s=this.field,i=e[s];if(i!==t){e[s]=t;const r=e[this.callback];n(r)&&r.call(e,i,t),c(e).notify(this.name)}}}class p extends N{constructor(e,t,s=!1){super(e,t),this.expression=e,this.isVolatileBinding=s,this.needsRefresh=!0,this.needsQueue=!0,this.isAsync=!0,this.first=this,this.last=null,this.propertySource=void 0,this.propertyName=void 0,this.notifier=void 0,this.next=void 0}setMode(e){this.isAsync=this.needsQueue=e}bind(e){this.controller=e;const t=this.observe(e.source,e.context);return!e.isBound&&this.requiresUnbind(e)&&e.onUnbind(this),t}requiresUnbind(e){return e.sourceLifetime!==E.coupled||this.first!==this.last||this.first.propertySource!==e.source}unbind(e){this.dispose()}observe(e,t){this.needsRefresh&&null!==this.last&&this.dispose();const s=o;let i;o=this.needsRefresh?this:void 0,this.needsRefresh=this.isVolatileBinding;try{i=this.expression(e,t)}finally{o=s}return i}disconnect(){this.dispose()}dispose(){if(null!==this.last){let e=this.first;for(;void 0!==e;)e.notifier.unsubscribe(this,e.propertyName),e=e.next;this.last=null,this.needsRefresh=this.needsQueue=this.isAsync}}watch(e,t){const s=this.last,i=c(e),n=null===s?this.first:{};if(n.propertySource=e,n.propertyName=t,n.notifier=i,i.subscribe(this,t),null!==s){if(!this.needsRefresh){let t;o=void 0,t=s.propertySource[s.propertyName],o=this,e===t&&(this.needsRefresh=!0)}s.next=n}this.last=n}handleChange(){this.needsQueue?(this.needsQueue=!1,e(this)):this.isAsync||this.call()}call(){null!==this.last&&(this.needsQueue=this.isAsync,this.notify(this))}*records(){let e=this.first;for(;void 0!==e;)yield e,e=e.next}}return u(p),Object.freeze({setArrayObserverFactory(e){a=e},getNotifier:c,track(e,t){o&&o.watch(e,t)},trackVolatile(){o&&(o.needsRefresh=!0)},notify(e,t){c(e).notify(t)},defineProperty(e,t){r(t)&&(t=new f(t)),d(e).push(t),Reflect.defineProperty(e,t.name,{enumerable:!0,get(){return t.getValue(this)},set(e){t.setValue(this,e)}})},getAccessors:d,binding(e,t,s=this.isVolatileBinding(e)){return new p(e,t,s)},isVolatileBinding:e=>t.test(e.toString())})}));function I(e,t){M.defineProperty(e,t)}function R(e,t,s){return Object.assign({},s,{get(){return M.trackVolatile(),s.get.apply(this)}})}const j=l.getById(s.contextEvent,(()=>{let e=null;return{get:()=>e,set(t){e=t}}})),V=Object.freeze({default:{index:0,length:0,get event(){return V.getEvent()},eventDetail(){return this.event.detail},eventTarget(){return this.event.target}},getEvent:()=>j.get(),setEvent(e){j.set(e)}});class _{constructor(e,t,s){this.index=e,this.removed=t,this.addedCount=s}adjustTo(e){let t=this.index;const s=e.length;return t>s?t=s-this.addedCount:t<0&&(t=s+this.removed.length+t-this.addedCount),this.index=t<0?0:t,this}}class L{constructor(e){this.sorted=e}}const H=Object.freeze({reset:1,splice:2,optimized:3}),z=new _(0,c,0);z.reset=!0;const F=[z];var D;function P(e,t,s,i,n,r){let o=0,a=0;const l=Math.min(s-t,r-n);if(0===t&&0===n&&(o=function(e,t,s){for(let i=0;i<s;++i)if(e[i]!==t[i])return i;return s}(e,i,l)),s===e.length&&r===i.length&&(a=function(e,t,s){let i=e.length,n=t.length,r=0;for(;r<s&&e[--i]===t[--n];)r++;return r}(e,i,l-o)),n+=o,r-=a,(s-=a)-(t+=o)==0&&r-n==0)return c;if(t===s){const e=new _(t,[],0);for(;n<r;)e.removed.push(i[n++]);return[e]}if(n===r)return[new _(t,[],s-t)];const d=function(e){let t=e.length-1,s=e[0].length-1,i=e[t][s];const n=[];for(;t>0||s>0;){if(0===t){n.push(D.add),s--;continue}if(0===s){n.push(D.delete),t--;continue}const r=e[t-1][s-1],o=e[t-1][s],a=e[t][s-1];let l;l=o<a?o<r?o:r:a<r?a:r,l===r?(r===i?n.push(D.leave):(n.push(D.update),i=r),t--,s--):l===o?(n.push(D.delete),t--,i=o):(n.push(D.add),s--,i=a)}return n.reverse()}(function(e,t,s,i,n,r){const o=r-n+1,a=s-t+1,l=new Array(o);let c,d;for(let e=0;e<o;++e)l[e]=new Array(a),l[e][0]=e;for(let e=0;e<a;++e)l[0][e]=e;for(let s=1;s<o;++s)for(let r=1;r<a;++r)e[t+r-1]===i[n+s-1]?l[s][r]=l[s-1][r-1]:(c=l[s-1][r]+1,d=l[s][r-1]+1,l[s][r]=c<d?c:d);return l}(e,t,s,i,n,r)),h=[];let u,f=t,p=n;for(let e=0;e<d.length;++e)switch(d[e]){case D.leave:void 0!==u&&(h.push(u),u=void 0),f++,p++;break;case D.update:void 0===u&&(u=new _(f,[],0)),u.addedCount++,f++,u.removed.push(i[p]),p++;break;case D.add:void 0===u&&(u=new _(f,[],0)),u.addedCount++,f++;break;case D.delete:void 0===u&&(u=new _(f,[],0)),u.removed.push(i[p]),p++}return void 0!==u&&h.push(u),h}function q(e,t){let s=!1,i=0;for(let l=0;l<t.length;l++){const c=t[l];if(c.index+=i,s)continue;const d=(n=e.index,r=e.index+e.removed.length,o=c.index,a=c.index+c.addedCount,r<o||a<n?-1:r===o||a===n?0:n<o?r<a?r-o:a-o:a<r?a-n:r-n);if(d>=0){t.splice(l,1),l--,i-=c.addedCount-c.removed.length,e.addedCount+=c.addedCount-d;const n=e.removed.length+c.removed.length-d;if(e.addedCount||n){let t=c.removed;if(e.index<c.index){const s=e.removed.slice(0,c.index-e.index);s.push(...t),t=s}if(e.index+e.removed.length>c.index+c.addedCount){const s=e.removed.slice(c.index+c.addedCount-e.index);t.push(...s)}e.removed=t,c.index<e.index&&(e.index=c.index)}else s=!0}else if(e.index<c.index){s=!0,t.splice(l,0,e),l++;const n=e.addedCount-e.removed.length;c.index+=n,i+=n}}var n,r,o,a;s||t.push(e)}!function(e){e[e.leave=0]="leave",e[e.update=1]="update",e[e.add=2]="add",e[e.delete=3]="delete"}(D||(D={}));let U=Object.freeze({support:H.optimized,normalize:(e,t,s)=>void 0===e?void 0===s?c:function(e,t){let s=[];const i=[];for(let e=0,s=t.length;e<s;e++)q(t[e],i);for(let t=0,n=i.length;t<n;++t){const n=i[t];1!==n.addedCount||1!==n.removed.length?s=s.concat(P(e,n.index,n.index+n.addedCount,n.removed,0,n.removed.length)):n.removed[0]!==e[n.index]&&s.push(n)}return s}(t,s):F,pop(e,t,s,i){const n=e.length>0,r=s.apply(e,i);return n&&t.addSplice(new _(e.length,[r],0)),r},push(e,t,s,i){const n=s.apply(e,i);return t.addSplice(new _(e.length-i.length,[],i.length).adjustTo(e)),n},reverse(e,t,s,i){const n=s.apply(e,i);e.sorted++;const r=[];for(let t=e.length-1;t>=0;t--)r.push(t);return t.addSort(new L(r)),n},shift(e,t,s,i){const n=e.length>0,r=s.apply(e,i);return n&&t.addSplice(new _(0,[r],0)),r},sort(e,t,s,i){const n=new Map;for(let t=0,s=e.length;t<s;++t){const s=n.get(e[t])||[];n.set(e[t],[...s,t])}const r=s.apply(e,i);e.sorted++;const o=[];for(let t=0,s=e.length;t<s;++t){const s=n.get(e[t]);o.push(s[0]),n.set(e[t],s.splice(1))}return t.addSort(new L(o)),r},splice(e,t,s,i){const n=s.apply(e,i);return t.addSplice(new _(+i[0],n,i.length>2?i.length-2:0).adjustTo(e)),n},unshift(e,t,s,i){const n=s.apply(e,i);return t.addSplice(new _(0,[],i.length).adjustTo(e)),n}});const W=Object.freeze({reset:F,setDefaultStrategy(e){U=e}});function Q(e,t,s,i=!0){Reflect.defineProperty(e,t,{value:s,enumerable:!1,writable:i})}class J extends N{get strategy(){return this._strategy}set strategy(e){this._strategy=e}get lengthObserver(){let e=this._lengthObserver;if(void 0===e){const t=this.subject;this._lengthObserver=e={length:t.length,handleChange(){this.length!==t.length&&(this.length=t.length,M.notify(e,"length"))}},this.subscribe(e)}return e}get sortObserver(){let e=this._sortObserver;if(void 0===e){const t=this.subject;this._sortObserver=e={sorted:t.sorted,handleChange(){this.sorted!==t.sorted&&(this.sorted=t.sorted,M.notify(e,"sorted"))}},this.subscribe(e)}return e}constructor(e){super(e),this.oldCollection=void 0,this.splices=void 0,this.sorts=void 0,this.needsQueue=!0,this._strategy=null,this._lengthObserver=void 0,this._sortObserver=void 0,this.call=this.flush,Q(e,"$fastController",this)}subscribe(e){this.flush(),super.subscribe(e)}addSplice(e){void 0===this.splices?this.splices=[e]:this.splices.push(e),this.enqueue()}addSort(e){void 0===this.sorts?this.sorts=[e]:this.sorts.push(e),this.enqueue()}reset(e){this.oldCollection=e,this.enqueue()}flush(){var e;const t=this.splices,s=this.sorts,i=this.oldCollection;void 0===t&&void 0===i&&void 0===s||(this.needsQueue=!0,this.splices=void 0,this.sorts=void 0,this.oldCollection=void 0,void 0!==s?this.notify(s):this.notify((null!==(e=this._strategy)&&void 0!==e?e:U).normalize(i,this.subject,t)))}enqueue(){this.needsQueue&&(this.needsQueue=!1,A.enqueue(this))}}let K=!1;const X=Object.freeze({sorted:0,enable(){if(K)return;K=!0,M.setArrayObserverFactory((e=>new J(e)));const e=Array.prototype;e.$fastPatch||(Q(e,"$fastPatch",1),Q(e,"sorted",0),[e.pop,e.push,e.reverse,e.shift,e.sort,e.splice,e.unshift].forEach((t=>{e[t.name]=function(...e){var s;const i=this.$fastController;return void 0===i?t.apply(this,e):(null!==(s=i.strategy)&&void 0!==s?s:U)[t.name](this,i,t,e)}})))}});function G(e){if(!e)return 0;let t=e.$fastController;return void 0===t&&(X.enable(),t=M.getNotifier(e)),M.track(t.lengthObserver,"length"),e.length}function Y(e){if(!e)return 0;let t=e.$fastController;return void 0===t&&(X.enable(),t=M.getNotifier(e)),M.track(t.sortObserver,"sorted"),e.sorted}class Z{constructor(e,t,s=!1){this.evaluate=e,this.policy=t,this.isVolatile=s}}class ee extends Z{createObserver(e){return M.binding(this.evaluate,e,this.isVolatile)}}function te(e,t,s=M.isVolatileBinding(e)){return new ee(e,t,s)}function se(e,t){const s=new ee(e);return s.options=t,s}class ie extends Z{createObserver(){return this}bind(e){return this.evaluate(e.source,e.context)}}function ne(e,t){return new ie(e,t)}function re(e){return n(e)?te(e):e instanceof Z?e:ne((()=>e))}u(ie);const oe=d(),ae=Object.freeze({getForInstance:oe.getForInstance,getByType:oe.getByType,define:e=>(oe.register({type:e}),e)});function le(){return function(e){ae.define(e)}}function ce(e,t,s){t.source.style.setProperty(e.targetAspect,s.bind(t))}class de{constructor(e,t){this.dataBinding=e,this.targetAspect=t}createCSS(e){return e(this),`var(${this.targetAspect})`}addedCallback(e){var t;const s=e.source;if(!s.$cssBindings){s.$cssBindings=new Map;const e=s.setAttribute;s.setAttribute=(t,i)=>{e.call(s,t,i),"style"===t&&s.$cssBindings.forEach(((e,t)=>ce(t,e.controller,e.observer)))}}const i=null!==(t=e[this.targetAspect])&&void 0!==t?t:e[this.targetAspect]=this.dataBinding.createObserver(this,this);i.controller=e,e.source.$cssBindings.set(this,{controller:e,observer:i})}connectedCallback(e){ce(this,e,e[this.targetAspect])}removedCallback(e){e.source.$cssBindings&&e.source.$cssBindings.delete(this)}handleChange(e,t){ce(this,t.controller,t)}}let he;function ue(e){return e.map((e=>e instanceof fe?ue(e.styles):[e])).reduce(((e,t)=>e.concat(t)),[])}ae.define(de);class fe{get strategy(){return null===this._strategy&&this.withStrategy(he),this._strategy}constructor(e){this.styles=e,this.targets=new WeakSet,this._strategy=null,this.behaviors=e.map((e=>e instanceof fe?e.behaviors:null)).reduce(((e,t)=>null===t?e:null===e?t:e.concat(t)),null)}addStylesTo(e){this.strategy.addStylesTo(e),this.targets.add(e)}removeStylesFrom(e){this.strategy.removeStylesFrom(e),this.targets.delete(e)}isAttachedTo(e){return this.targets.has(e)}withBehaviors(...e){return this.behaviors=null===this.behaviors?e:this.behaviors.concat(e),this}withStrategy(e){return this._strategy=new e(ue(this.styles)),this}static setDefaultStrategy(e){he=e}static normalize(e){return void 0===e?void 0:Array.isArray(e)?new fe(e):e instanceof fe?e:new fe([e])}}fe.supportsAdoptedStyleSheets=Array.isArray(document.adoptedStyleSheets)&&"replace"in CSSStyleSheet.prototype;const pe=`${Math.random().toString(36).substring(2,8)}`;let ge=0;const be=()=>`--v${pe}${++ge}`;function ve(e,t){const s=[];let i="";const r=[],o=e=>{r.push(e)};for(let r=0,a=e.length-1;r<a;++r){i+=e[r];let a=t[r];n(a)?a=new de(te(a),be()).createCSS(o):a instanceof Z?a=new de(a,be()).createCSS(o):void 0!==ae.getForInstance(a)&&(a=a.createCSS(o)),a instanceof fe||a instanceof CSSStyleSheet?(""!==i.trim()&&(s.push(i),i=""),s.push(a)):i+=a}return i+=e[e.length-1],""!==i.trim()&&s.push(i),{styles:s,behaviors:r}}const me=(e,...t)=>{const{styles:s,behaviors:i}=ve(e,t),n=new fe(s);return i.length?n.withBehaviors(...i):n};class ye{constructor(e,t){this.behaviors=t,this.css="";const s=e.reduce(((e,t)=>(r(t)?this.css+=t:e.push(t),e)),[]);s.length&&(this.styles=new fe(s))}createCSS(e){return this.behaviors.forEach(e),this.styles&&e(this),this.css}addedCallback(e){e.addStyles(this.styles)}removedCallback(e){e.removeStyles(this.styles)}}ae.define(ye),me.partial=(e,...t)=>{const{styles:s,behaviors:i}=ve(e,t);return new ye(s,i)};const we=`fast-${Math.random().toString(36).substring(2,8)}`,Ce=`${we}{`,Se=`}${we}`,Te=Se.length;let xe=0;const Oe=()=>`${we}-${++xe}`,Be=Object.freeze({interpolation:e=>`${Ce}${e}${Se}`,attribute:e=>`${Oe()}="${Ce}${e}${Se}"`,comment:e=>`\x3c!--${Ce}${e}${Se}--\x3e`}),$e=Object.freeze({parse(e,t){const s=e.split(Ce);if(1===s.length)return null;const i=[];for(let e=0,n=s.length;e<n;++e){const n=s[e],r=n.indexOf(Se);let o;if(-1===r)o=n;else{const e=n.substring(0,r);i.push(t[e]),o=n.substring(r+Te)}""!==o&&i.push(o)}return i}}),Ne=d(),ke=Object.freeze({getForInstance:Ne.getForInstance,getByType:Ne.getByType,define:(e,t)=>((t=t||{}).type=e,Ne.register(t),e),assignAspect(e,t){if(t)switch(e.sourceAspect=t,t[0]){case":":e.targetAspect=t.substring(1),e.aspectType="classList"===e.targetAspect?f.tokenList:f.property;break;case"?":e.targetAspect=t.substring(1),e.aspectType=f.booleanAttribute;break;case"@":e.targetAspect=t.substring(1),e.aspectType=f.event;break;default:e.targetAspect=t,e.aspectType=f.attribute}else e.aspectType=f.content}});function Ae(e){return function(t){ke.define(t,e)}}class Ee{constructor(e){this.options=e}createHTML(e){return Be.attribute(e(this))}createBehavior(){return this}}u(Ee);const Me=e=>1===e.nodeType,Ie=e=>e?t=>1===t.nodeType&&t.matches(e):Me;class Re extends Ee{get id(){return this._id}set id(e){this._id=e,this._controllerProperty=`${e}-c`}bind(e){const t=e.targets[this.targetNodeId];t[this._controllerProperty]=e,this.updateTarget(e.source,this.computeNodes(t)),this.observe(t),e.onUnbind(this)}unbind(e){const t=e.targets[this.targetNodeId];this.updateTarget(e.source,c),this.disconnect(t),t[this._controllerProperty]=null}getSource(e){return e[this._controllerProperty].source}updateTarget(e,t){e[this.options.property]=t}computeNodes(e){let t=this.getNodes(e);return"filter"in this.options&&(t=t.filter(this.options.filter)),t}}class je extends Re{constructor(e){super(e),this.observerProperty=Symbol(),e.childList=!0}observe(e){let t=e[this.observerProperty];if(!t){t=new MutationObserver(((t,s)=>{this.updateTarget(this.getSource(e),this.computeNodes(e))})),t.toJSON=o,e[this.observerProperty]=t}t.observe(e,this.options)}disconnect(e){e[this.observerProperty].disconnect()}getNodes(e){return"selector"in this.options?Array.from(e.querySelectorAll(this.options.selector)):Array.from(e.childNodes)}}function Ve(e){return r(e)&&(e={property:e}),new je(e)}ke.define(je);const _e=/fe-b\$\$start\$\$(\d+)\$\$(.+)\$\$fe-b/,Le=/fe-b\$\$end\$\$(\d+)\$\$(.+)\$\$fe-b/,He=/fe-repeat\$\$start\$\$(\d+)\$\$fe-repeat/,ze=/fe-repeat\$\$end\$\$(\d+)\$\$fe-repeat/,Fe=/^(?:.{0,1000})fe-eb\$\$start\$\$(.+?)\$\$fe-eb/,De=/fe-eb\$\$end\$\$(.{0,1000})\$\$fe-eb(?:.{0,1000})$/;function Pe(e){return e&&e.nodeType===Node.COMMENT_NODE}const qe=Object.freeze({attributeMarkerName:"data-fe-b",compactAttributeMarkerName:"data-fe-c",attributeBindingSeparator:" ",contentBindingStartMarker:(e,t)=>`fe-b$$start$$${e}$$${t}$$fe-b`,contentBindingEndMarker:(e,t)=>`fe-b$$end$$${e}$$${t}$$fe-b`,repeatStartMarker:e=>`fe-repeat$$start$$${e}$$fe-repeat`,repeatEndMarker:e=>`fe-repeat$$end$$${e}$$fe-repeat`,isContentBindingStartMarker:e=>_e.test(e),isContentBindingEndMarker:e=>Le.test(e),isRepeatViewStartMarker:e=>He.test(e),isRepeatViewEndMarker:e=>ze.test(e),isElementBoundaryStartMarker:e=>Pe(e)&&Fe.test(e.data.trim()),isElementBoundaryEndMarker:e=>Pe(e)&&De.test(e.data),parseAttributeBinding(e){const t=e.getAttribute(this.attributeMarkerName);return null===t?t:t.split(this.attributeBindingSeparator).map((e=>parseInt(e)))},parseEnumeratedAttributeBinding(e){const t=[],s=this.attributeMarkerName.length+1,i=`${this.attributeMarkerName}-`;for(const n of e.getAttributeNames())if(n.startsWith(i)){const e=Number(n.slice(s));if(Number.isNaN(e))throw l.error(1601,{name:n,expectedFormat:`${i}<number>`});t.push(e)}return 0===t.length?null:t},parseCompactAttributeBinding(e){const t=`${this.compactAttributeMarkerName}-`,s=e.getAttributeNames().find((e=>e.startsWith(t)));if(!s)return null;const i=s.slice(t.length).split("-"),n=parseInt(i[0],10),r=parseInt(i[1],10);if(2!==i.length||Number.isNaN(n)||Number.isNaN(r)||n<0||r<1)throw l.error(1604,{name:s,expectedFormat:`${this.compactAttributeMarkerName}-{index}-{count}`});const o=[];for(let e=0;e<r;e++)o.push(n+e);return o},parseContentBindingStartMarker:e=>Qe(_e,e),parseContentBindingEndMarker:e=>Qe(Le,e),parseRepeatStartMarker:e=>Ue(He,e),parseRepeatEndMarker:e=>Ue(ze,e),parseElementBoundaryStartMarker:e=>We(Fe,e.trim()),parseElementBoundaryEndMarker:e=>We(De,e)});function Ue(e,t){const s=e.exec(t);return null===s?s:parseInt(s[1])}function We(e,t){const s=e.exec(t);return null===s?s:s[1]}function Qe(e,t){const s=e.exec(t);return null===s?s:[parseInt(s[1]),s[2]]}const Je=Symbol.for("fe-hydration");function Ke(e){return e[Je]===Je}const Xe="defer-hydration";class Ge extends Error{constructor(e,t,s){super(e),this.factories=t,this.node=s}}function Ye(e){return e.nodeType===Node.COMMENT_NODE}function Ze(e){return e.nodeType===Node.TEXT_NODE}function et(e,t){const s=document.createRange();return s.setStart(e,0),s.setEnd(t,Ye(t)||Ze(t)?t.data.length:t.childNodes.length),s}function tt(e,t,s,i){var n,r;const o=null!==(r=null!==(n=qe.parseAttributeBinding(e))&&void 0!==n?n:qe.parseEnumeratedAttributeBinding(e))&&void 0!==r?r:qe.parseCompactAttributeBinding(e);if(null!==o){for(const n of o){const r=t[n+i];if(!r)throw new Ge(`HydrationView was unable to successfully target factory on ${e.nodeName} inside ${e.getRootNode().host.nodeName}. This likely indicates a template mismatch between SSR rendering and hydration.`,t,e);it(r,e,s)}e.removeAttribute(qe.attributeMarkerName)}}function st(e,t,s,i,n,r){if(qe.isElementBoundaryStartMarker(e))!function(e,t){const s=qe.parseElementBoundaryStartMarker(e.data);let i=t.nextSibling();for(;null!==i;){if(Ye(i)){const e=qe.parseElementBoundaryEndMarker(i.data);if(e&&e===s)break}i=t.nextSibling()}}(e,t);else if(qe.isContentBindingStartMarker(e.data)){const o=qe.parseContentBindingStartMarker(e.data);if(null===o)return;const[a,l]=o,c=s[a+r],d=[];let h=t.nextSibling();e.data="";const u=h;for(;null!==h;){if(Ye(h)){const e=qe.parseContentBindingEndMarker(h.data);if(e&&e[1]===l)break}d.push(h),h=t.nextSibling()}if(null===h){const t=e.getRootNode();throw new Error(`Error hydrating Comment node inside "${function(e){return e instanceof DocumentFragment&&"mode"in e}(t)?t.host.nodeName:t.nodeName}".`)}if(h.data="",1===d.length&&Ze(d[0]))it(c,d[0],i);else{h!==u&&null!==h.previousSibling&&(n[c.targetNodeId]={first:u,last:h.previousSibling});it(c,h.parentNode.insertBefore(document.createTextNode(""),h),i)}}}function it(e,t,s){if(void 0===e.targetNodeId)throw new Error("Factory could not be target to the node");s[e.targetNodeId]=t}var nt;function rt(e,t){const s=e.parentNode;let i,n=e;for(;n!==t;){if(i=n.nextSibling,!i)throw new Error(`Unmatched first/last child inside "${t.getRootNode().host.nodeName}".`);s.removeChild(n),n=i}s.removeChild(t)}class ot{constructor(){this.index=0,this.length=0}get event(){return V.getEvent()}get isEven(){return this.index%2==0}get isOdd(){return this.index%2!=0}get isFirst(){return 0===this.index}get isInMiddle(){return!this.isFirst&&!this.isLast}get isLast(){return this.index===this.length-1}eventDetail(){return this.event.detail}eventTarget(){return this.event.target}}class at extends ot{constructor(e,t,s){super(),this.fragment=e,this.factories=t,this.targets=s,this.behaviors=null,this.unbindables=[],this.source=null,this.isBound=!1,this.sourceLifetime=E.unknown,this.context=this,this.firstChild=e.firstChild,this.lastChild=e.lastChild}appendTo(e){e.appendChild(this.fragment)}insertBefore(e){if(this.fragment.hasChildNodes())e.parentNode.insertBefore(this.fragment,e);else{const t=this.lastChild;if(e.previousSibling===t)return;const s=e.parentNode;let i,n=this.firstChild;for(;n!==t;)i=n.nextSibling,s.insertBefore(n,e),n=i;s.insertBefore(t,e)}}remove(){const e=this.fragment,t=this.lastChild;let s,i=this.firstChild;for(;i!==t;)s=i.nextSibling,e.appendChild(i),i=s;e.appendChild(t)}dispose(){rt(this.firstChild,this.lastChild),this.unbind()}onUnbind(e){this.unbindables.push(e)}bind(e,t=this){if(this.source===e)return;let s=this.behaviors;if(null===s){this.source=e,this.context=t,this.behaviors=s=new Array(this.factories.length);const i=this.factories;for(let e=0,t=i.length;e<t;++e){const t=i[e].createBehavior();t.bind(this),s[e]=t}}else{null!==this.source&&this.evaluateUnbindables(),this.isBound=!1,this.source=e,this.context=t;for(let e=0,t=s.length;e<t;++e)s[e].bind(this)}this.isBound=!0}unbind(){this.isBound&&null!==this.source&&(this.evaluateUnbindables(),this.source=null,this.context=this,this.isBound=!1)}evaluateUnbindables(){const e=this.unbindables;for(let t=0,s=e.length;t<s;++t)e[t].unbind(this);e.length=0}static disposeContiguousBatch(e){if(0!==e.length){rt(e[0].firstChild,e[e.length-1].lastChild);for(let t=0,s=e.length;t<s;++t)e[t].unbind()}}}u(at),M.defineProperty(at.prototype,"index"),M.defineProperty(at.prototype,"length");const lt="unhydrated",ct="hydrating",dt="hydrated";class ht extends Error{constructor(e,t,s,i){super(e),this.factory=t,this.fragment=s,this.templateString=i}}nt=Je,u(class extends ot{get hydrationStage(){return this._hydrationStage}get targets(){return this._targets}get bindingViewBoundaries(){return this._bindingViewBoundaries}constructor(e,t,s,i){super(),this.firstChild=e,this.lastChild=t,this.sourceTemplate=s,this.hostBindingTarget=i,this[nt]=Je,this.context=this,this.source=null,this.isBound=!1,this.sourceLifetime=E.unknown,this.unbindables=[],this.fragment=null,this.behaviors=null,this._hydrationStage=lt,this._bindingViewBoundaries={},this._targets={},this.factories=s.compile().factories}insertBefore(e){if(null!==this.fragment)if(this.fragment.hasChildNodes())e.parentNode.insertBefore(this.fragment,e);else{const t=this.lastChild;if(e.previousSibling===t)return;const s=e.parentNode;let i,n=this.firstChild;for(;n!==t;)i=n.nextSibling,s.insertBefore(n,e),n=i;s.insertBefore(t,e)}}appendTo(e){null!==this.fragment&&e.appendChild(this.fragment)}remove(){const e=this.fragment||(this.fragment=document.createDocumentFragment()),t=this.lastChild;let s,i=this.firstChild;for(;i!==t;){if(s=i.nextSibling,!s)throw new Error(`Unmatched first/last child inside "${t.getRootNode().host.nodeName}".`);e.appendChild(i),i=s}e.appendChild(t)}bind(e,t=this){var s;if(this.hydrationStage!==dt&&(this._hydrationStage=ct),this.source===e)return;let i=this.behaviors;if(null===i){this.source=e,this.context=t;try{const{targets:e,boundaries:t}=function(e,t,s){const i=et(e,t),n=i.commonAncestorContainer,r=function(e){let t=0;for(let s=0,i=e.length;s<i&&"h"===e[s].targetNodeId;++s)t++;return t}(s),o=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT+NodeFilter.SHOW_COMMENT+NodeFilter.SHOW_TEXT,{acceptNode:e=>0===i.comparePoint(e,0)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}),a={},l={};let c=o.currentNode=e;for(;null!==c;){switch(c.nodeType){case Node.ELEMENT_NODE:tt(c,s,a,r);break;case Node.COMMENT_NODE:st(c,o,s,a,l,r)}c=o.nextNode()}return i.detach(),{targets:a,boundaries:l}}(this.firstChild,this.lastChild,this.factories);this._targets=e,this._bindingViewBoundaries=t}catch(e){if(e instanceof Ge){let t=this.sourceTemplate.html;"string"!=typeof t&&(t=t.innerHTML),e.templateString=t}throw e}this.behaviors=i=new Array(this.factories.length);const n=this.factories;for(let e=0,t=n.length;e<t;++e){const t=n[e];if("h"===t.targetNodeId&&this.hostBindingTarget&&it(t,this.hostBindingTarget,this._targets),!(t.targetNodeId in this.targets)){let e=this.sourceTemplate.html;"string"!=typeof e&&(e=e.innerHTML);const i=(null===(s=this.firstChild)||void 0===s?void 0:s.getRootNode()).host,n=t,r=[`HydrationView was unable to successfully target bindings inside "<${((null==i?void 0:i.nodeName)||"unknown").toLowerCase()}>".`,"\nMismatch Details:",` - Expected target node ID: "${t.targetNodeId}"`,` - Available target IDs: [${Object.keys(this.targets).join(", ")||"none"}]`];throw t.targetTagName&&r.push(` - Expected tag name: "${t.targetTagName}"`),n.sourceAspect&&r.push(` - Source aspect: "${n.sourceAspect}"`),void 0!==n.aspectType&&r.push(` - Aspect type: ${n.aspectType}`),r.push("\nThis usually means:"," 1. The server-rendered HTML doesn't match the client template"," 2. The hydration markers are missing or corrupted"," 3. The DOM structure was modified before hydration",`\nTemplate: ${e.slice(0,200)}${e.length>200?"...":""}`),new ht(r.join("\n"),t,et(this.firstChild,this.lastChild).cloneContents(),e)}{const s=t.createBehavior();s.bind(this),i[e]=s}}}else{null!==this.source&&this.evaluateUnbindables(),this.isBound=!1,this.source=e,this.context=t;for(let e=0,t=i.length;e<t;++e)i[e].bind(this)}this.isBound=!0,this._hydrationStage=dt}unbind(){this.isBound&&null!==this.source&&(this.evaluateUnbindables(),this.source=null,this.context=this,this.isBound=!1)}dispose(){rt(this.firstChild,this.lastChild),this.unbind()}onUnbind(e){this.unbindables.push(e)}evaluateUnbindables(){const e=this.unbindables;for(let t=0,s=e.length;t<s;++t)e[t].unbind(this);e.length=0}});const ut={[f.attribute]:m.setAttribute,[f.booleanAttribute]:m.setBooleanAttribute,[f.property]:(e,t,s)=>e[t]=s,[f.content]:function(e,t,s,i){if(null==s&&(s=""),function(e){return void 0!==e.create}(s)){e.textContent="";let t=e.$fastView;if(void 0===t)if(Ke(i)&&Ke(s)&&void 0!==i.bindingViewBoundaries[this.targetNodeId]&&i.hydrationStage!==dt){const e=i.bindingViewBoundaries[this.targetNodeId];t=s.hydrate(e.first,e.last)}else t=s.create();else e.$fastTemplate!==s&&(t.isComposed&&(t.remove(),t.unbind()),t=s.create());t.isComposed?t.needsBindOnly&&(t.needsBindOnly=!1,t.bind(i.source,i.context)):(t.isComposed=!0,t.bind(i.source,i.context),t.insertBefore(e),e.$fastView=t,e.$fastTemplate=s)}else{const t=e.$fastView;void 0!==t&&t.isComposed&&(t.isComposed=!1,t.remove(),t.needsBindOnly?t.needsBindOnly=!1:t.unbind()),e.textContent=s}},[f.tokenList]:function(e,t,s){var i;const n=`${this.id}-t`,r=null!==(i=e[n])&&void 0!==i?i:e[n]={v:0,cv:Object.create(null)},o=r.cv;let a=r.v;const l=e[t];if(null!=s&&s.length){const e=s.split(/\s+/);for(let t=0,s=e.length;t<s;++t){const s=e[t];""!==s&&(o[s]=a,l.add(s))}}if(r.v=a+1,0!==a){a-=1;for(const e in o)o[e]===a&&l.remove(e)}},[f.event]:()=>{}};class ft{constructor(e){this.dataBinding=e,this.updateTarget=null,this.aspectType=f.content}createHTML(e){return Be.interpolation(e(this))}createBehavior(){var e;if(null===this.updateTarget){const t=ut[this.aspectType],s=null!==(e=this.dataBinding.policy)&&void 0!==e?e:this.policy;if(!t)throw l.error(i.unsupportedBindingBehavior);this.data=`${this.id}-d`,this.updateTarget=s.protect(this.targetTagName,this.aspectType,this.targetAspect,t)}return this}bind(e){var t;const s=e.targets[this.targetNodeId],i=Ke(e)&&e.hydrationStage&&e.hydrationStage!==dt;switch(this.aspectType){case f.event:s[this.data]=e,s.addEventListener(this.targetAspect,this,this.dataBinding.options);break;case f.content:e.onUnbind(this);default:const n=null!==(t=s[this.data])&&void 0!==t?t:s[this.data]=this.dataBinding.createObserver(this,this);if(n.target=s,n.controller=e,i&&(this.aspectType===f.attribute||this.aspectType===f.booleanAttribute)){n.bind(e);break}this.updateTarget(s,this.targetAspect,n.bind(e),e)}}unbind(e){const t=e.targets[this.targetNodeId].$fastView;void 0!==t&&t.isComposed&&(t.unbind(),t.needsBindOnly=!0)}handleEvent(e){const t=e.currentTarget[this.data];if(t.isBound){V.setEvent(e);const s=this.dataBinding.evaluate(t.source,t.context);V.setEvent(null),!0!==s&&e.preventDefault()}}handleChange(e,t){const s=t.target,i=t.controller;this.updateTarget(s,this.targetAspect,t.bind(i),i)}}ke.define(ft,{aspected:!0});const pt=(e,t)=>`${e}.${t}`,gt={},bt={index:0,node:null};function vt(e){e.startsWith("fast-")||l.warn(i.hostBindingWithoutHost,{name:e})}const mt=new Proxy(document.createElement("div"),{get(e,t){vt(t);const s=Reflect.get(e,t);return n(s)?s.bind(e):s},set:(e,t,s)=>(vt(t),Reflect.set(e,t,s))});class yt{constructor(e,t,s){this.fragment=e,this.directives=t,this.policy=s,this.proto=null,this.nodeIds=new Set,this.descriptors={},this.factories=[]}addFactory(e,t,s,i,n){var r,o;this.nodeIds.has(s)||(this.nodeIds.add(s),this.addTargetDescriptor(t,s,i)),e.id=null!==(r=e.id)&&void 0!==r?r:Oe(),e.targetNodeId=s,e.targetTagName=n,e.policy=null!==(o=e.policy)&&void 0!==o?o:this.policy,this.factories.push(e)}freeze(){return this.proto=Object.create(null,this.descriptors),this}addTargetDescriptor(e,t,s){const i=this.descriptors;if("r"===t||"h"===t||i[t])return;if(!i[e]){const t=e.lastIndexOf("."),s=e.substring(0,t),i=parseInt(e.substring(t+1),10);this.addTargetDescriptor(s,e,i)}let n=gt[t];if(!n){const i=`_${t}`;gt[t]=n={get(){var t;return null!==(t=this[i])&&void 0!==t?t:this[i]=this[e].childNodes[s]}}}i[t]=n}createView(e){const t=this.fragment.cloneNode(!0),s=Object.create(this.proto);s.r=t,s.h=null!=e?e:mt;for(const e of this.nodeIds)Reflect.get(s,e);return new at(t,this.factories,s)}}function wt(e,t,s,i,n,r=!1){const o=s.attributes,a=e.directives;for(let l=0,c=o.length;l<c;++l){const d=o[l],h=d.value,u=$e.parse(h,a);let f=null;null===u?r&&(f=new ft(ne((()=>h),e.policy)),ke.assignAspect(f,d.name)):f=xt.aggregate(u,e.policy),null!==f&&(s.removeAttributeNode(d),l--,c--,e.addFactory(f,t,i,n,s.tagName))}}function Ct(e,t,s){let i=0,n=t.firstChild;for(;n;){const t=St(e,s,n,i);n=t.node,i=t.index}}function St(e,t,s,i){const n=pt(t,i);switch(s.nodeType){case 1:wt(e,t,s,n,i),Ct(e,s,n);break;case 3:return function(e,t,s,i,n){const o=$e.parse(t.textContent,e.directives);if(null===o)return bt.node=t.nextSibling,bt.index=n+1,bt;let a,l=a=t;for(let t=0,c=o.length;t<c;++t){const c=o[t];0!==t&&(n++,i=pt(s,n),a=l.parentNode.insertBefore(document.createTextNode(""),l.nextSibling)),r(c)?a.textContent=c:(a.textContent=" ",ke.assignAspect(c),e.addFactory(c,s,i,n,null)),l=a}return bt.index=n+1,bt.node=l.nextSibling,bt}(e,s,t,n,i);case 8:{const r=$e.parse(s.data,e.directives);null!==r&&e.addFactory(xt.aggregate(r),t,n,i,null);break}}return bt.index=i+1,bt.node=s.nextSibling,bt}const Tt="TEMPLATE",xt={compile(e,t,s=m.policy){let i;if(r(e)){i=document.createElement(Tt),i.innerHTML=s.createHTML(e);const t=i.content.firstElementChild;null!==t&&t.tagName===Tt&&(i=t)}else i=e;i.content.firstChild||i.content.lastChild||i.content.appendChild(document.createComment(""));const n=document.adoptNode(i.content),o=new yt(n,t,s);var a,l;return wt(o,"",i,"h",0,!0),a=n.firstChild,l=t,(a&&8===a.nodeType&&null!==$e.parse(a.data,l)||1===n.childNodes.length&&Object.keys(t).length>0)&&n.insertBefore(document.createComment(""),n.firstChild),Ct(o,n,"r"),bt.node=null,o.freeze()},setDefaultStrategy(e){this.compile=e},aggregate(e,t=m.policy){if(1===e.length)return e[0];let s,i,n=!1;const o=e.length,a=e.map((e=>r(e)?()=>e:(s=e.sourceAspect||s,n=n||e.dataBinding.isVolatile,i=i||e.dataBinding.policy,e.dataBinding.evaluate))),l=new ft(te(((e,t)=>{let s="";for(let i=0;i<o;++i)s+=a[i](e,t);return s}),null!=i?i:t,n));return ke.assignAspect(l,s),l}};class Ot extends Ee{bind(e){e.source[this.options]=e.targets[this.targetNodeId]}}ke.define(Ot);const Bt=e=>new Ot(e);function $t(e,t,s,i){return new(s||(s=Promise))((function(n,r){function o(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(o,a)}l((i=i.apply(e,t||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;const Nt="boolean",kt="reflect",At=Object.freeze({locate:h()}),Et={toView:e=>e?"true":"false",fromView:e=>!(null==e||"false"===e||!1===e||0===e)},Mt={toView:e=>"boolean"==typeof e?e.toString():"",fromView:e=>[null,void 0,void 0].includes(e)?null:Et.fromView(e)};function It(e){if(null==e)return null;const t=1*e;return isNaN(t)?null:t}const Rt={toView(e){const t=It(e);return t?t.toString():t},fromView:It};class jt{constructor(e,t,s=t.toLowerCase(),i=kt,n){this.guards=new Set,this.Owner=e,this.name=t,this.attribute=s,this.mode=i,this.converter=n,this.fieldName=`_${t}`,this.callbackName=`${t}Changed`,this.hasCallback=this.callbackName in e.prototype,i===Nt&&void 0===n&&(this.converter=Et)}setValue(e,t){const s=e[this.fieldName],i=this.converter;void 0!==i&&(t=i.fromView(t)),s!==t&&(e[this.fieldName]=t,this.tryReflectToAttribute(e),this.hasCallback&&e[this.callbackName](s,t),e.$fastController.notify(this.name))}getValue(e){return M.track(e,this.name),e[this.fieldName]}onAttributeChangedCallback(e,t){this.guards.has(e)||(this.guards.add(e),this.setValue(e,t),this.guards.delete(e))}tryReflectToAttribute(e){const t=this.mode,s=this.guards;s.has(e)||"fromView"===t||A.enqueue((()=>{s.add(e);const i=e[this.fieldName];switch(t){case kt:const t=this.converter;m.setAttribute(e,this.attribute,void 0!==t?t.toView(i):i);break;case Nt:m.setBooleanAttribute(e,this.attribute,i)}s.delete(e)}))}static collect(e,...t){const s=[];t.push(At.locate(e));for(let i=0,n=t.length;i<n;++i){const n=t[i];if(void 0!==n)for(let t=0,i=n.length;t<i;++t){const i=n[t];r(i)?s.push(new jt(e,i)):s.push(new jt(e,i.property,i.attribute,i.mode,i.converter))}}return s}}function Vt(e,t){let s;function i(e,t){arguments.length>1&&(s.property=t),At.locate(e.constructor).push(s)}return arguments.length>1?(s={},void i(e,t)):(s=void 0===e?{}:e,i)}var _t;const Lt={mode:"open"},Ht={},zt=new Set,Ft=l.getById(s.elementRegistry,(()=>d())),Dt={deferAndHydrate:"defer-and-hydrate"};class Pt{get isDefined(){return this.platformDefined}constructor(e,t=e.definition){var s;this.platformDefined=!1,r(t)&&(t={name:t}),this.type=e,this.name=t.name,this.template=t.template,this.templateOptions=t.templateOptions,this.registry=null!==(s=t.registry)&&void 0!==s?s:customElements;const i=e.prototype,n=jt.collect(e,t.attributes),o=new Array(n.length),a={},l={};for(let e=0,t=n.length;e<t;++e){const t=n[e];o[e]=t.attribute,a[t.name]=t,l[t.attribute]=t,M.defineProperty(i,t)}Reflect.defineProperty(e,"observedAttributes",{value:o,enumerable:!0}),this.attributes=n,this.propertyLookup=a,this.attributeLookup=l,this.shadowOptions=void 0===t.shadowOptions?Lt:null===t.shadowOptions?void 0:Object.assign(Object.assign({},Lt),t.shadowOptions),this.elementOptions=void 0===t.elementOptions?Ht:Object.assign(Object.assign({},Ht),t.elementOptions),this.styles=fe.normalize(t.styles),Ft.register(this),M.defineProperty(_t.isRegistered,this.name),_t.isRegistered[this.name]=this.type}define(e=this.registry){var t,s;const i=this.type;return e.get(this.name)||(this.platformDefined=!0,e.define(this.name,i,this.elementOptions),null===(s=null===(t=this.lifecycleCallbacks)||void 0===t?void 0:t.elementDidDefine)||void 0===s||s.call(t,this.name)),this}static compose(e,t){return zt.has(e)||Ft.getByType(e)?new _t(class extends e{},t):new _t(e,t)}static registerBaseType(e){zt.add(e)}static composeAsync(e,t){return new Promise((s=>{(zt.has(e)||Ft.getByType(e))&&s(new _t(class extends e{},t));const i=new _t(e,t);M.getNotifier(i).subscribe({handleChange:()=>{var e,t;null===(t=null===(e=i.lifecycleCallbacks)||void 0===e?void 0:e.templateDidUpdate)||void 0===t||t.call(e,i.name),s(i)}},"template")}))}}_t=Pt,Pt.isRegistered={},Pt.getByType=Ft.getByType,Pt.getForInstance=Ft.getForInstance,Pt.registerAsync=e=>$t(void 0,void 0,void 0,(function*(){return new Promise((t=>{_t.isRegistered[e]&&t(_t.isRegistered[e]),M.getNotifier(_t.isRegistered).subscribe({handleChange:()=>t(_t.isRegistered[e])},e)}))})),M.defineProperty(Pt.prototype,"template");const qt=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/,Ut=Object.create(null);class Wt{constructor(e,t=Ut){this.html=e,this.factories=t}createHTML(e){const t=this.factories;for(const s in t)e(t[s]);return this.html}}function Qt(e,t,s,i=ke.getForInstance(e)){if(i.aspected){const s=qt.exec(t);null!==s&&ke.assignAspect(e,s[2])}return e.createHTML(s)}Wt.empty=new Wt(""),ke.define(Wt);class Jt{constructor(e,t={},s){this.policy=s,this.result=null,this.html=e,this.factories=t}compile(){return null===this.result&&(this.result=xt.compile(this.html,this.factories,this.policy)),this.result}create(e){return this.compile().createView(e)}inline(){return new Wt(r(this.html)?this.html:this.html.innerHTML,this.factories)}withPolicy(e){if(this.result)throw l.error(i.cannotSetTemplatePolicyAfterCompilation);if(this.policy)throw l.error(i.onlySetTemplatePolicyOnce);return this.policy=e,this}render(e,t,s){const i=this.create(s);return i.bind(e),i.appendTo(t),i}static create(e,t,s){let i="";const r=Object.create(null),o=e=>{var t;const s=null!==(t=e.id)&&void 0!==t?t:e.id=Oe();return r[s]=e,s};for(let s=0,r=e.length-1;s<r;++s){const r=e[s];let a,l=t[s];if(i+=r,n(l))l=new ft(te(l));else if(l instanceof Z)l=new ft(l);else if(!(a=ke.getForInstance(l))){const e=l;l=new ft(ne((()=>e)))}i+=Qt(l,r,o,a)}return new Jt(i+e[e.length-1],r,s)}}u(Jt);const Kt=(e,...t)=>{if(Array.isArray(e)&&Array.isArray(e.raw))return Jt.create(e,t);throw l.error(i.directCallToHTMLTagNotAllowed)};Kt.partial=e=>new Wt(e);class Xt{constructor(e){this.directive=e,this.location=null,this.controller=null,this.view=null,this.data=null,this.dataBindingObserver=e.dataBinding.createObserver(this,e),this.templateBindingObserver=e.templateBinding.createObserver(this,e)}bind(e){if(this.location=e.targets[this.directive.targetNodeId],this.controller=e,this.data=this.dataBindingObserver.bind(e),this.template=this.templateBindingObserver.bind(e),e.onUnbind(this),Ke(this.template)&&Ke(e)&&e.hydrationStage!==dt&&!this.view){const t=e.bindingViewBoundaries[this.directive.targetNodeId];t&&(this.view=this.template.hydrate(t.first,t.last),this.bindView(this.view))}else this.refreshView()}unbind(e){const t=this.view;null!==t&&t.isComposed&&(t.unbind(),t.needsBindOnly=!0)}handleChange(e,t){t===this.dataBindingObserver&&(this.data=this.dataBindingObserver.bind(this.controller)),(this.directive.templateBindingDependsOnData||t===this.templateBindingObserver)&&(this.template=this.templateBindingObserver.bind(this.controller)),this.refreshView()}bindView(e){e.isComposed?e.needsBindOnly&&(e.needsBindOnly=!1,e.bind(this.data)):(e.isComposed=!0,e.bind(this.data),e.insertBefore(this.location),e.$fastTemplate=this.template)}refreshView(){let e=this.view;const t=this.template;null===e?(this.view=e=t.create(),this.view.context.parent=this.controller.source,this.view.context.parentContext=this.controller.context):e.$fastTemplate!==t&&(e.isComposed&&(e.remove(),e.unbind()),this.view=e=t.create(),this.view.context.parent=this.controller.source,this.view.context.parentContext=this.controller.context),this.bindView(e)}}class Gt{constructor(e,t,s){this.dataBinding=e,this.templateBinding=t,this.templateBindingDependsOnData=s}createHTML(e){return Be.comment(e(this))}createBehavior(){return new Xt(this)}}ke.define(Gt);const Yt=new Map,Zt="default-view",es=Kt`
|
|
1
|
+
var e;!function(e){e[e.needsArrayObservation=1101]="needsArrayObservation",e[e.onlySetDOMPolicyOnce=1201]="onlySetDOMPolicyOnce",e[e.bindingInnerHTMLRequiresTrustedTypes=1202]="bindingInnerHTMLRequiresTrustedTypes",e[e.twoWayBindingRequiresObservables=1203]="twoWayBindingRequiresObservables",e[e.hostBindingWithoutHost=1204]="hostBindingWithoutHost",e[e.unsupportedBindingBehavior=1205]="unsupportedBindingBehavior",e[e.directCallToHTMLTagNotAllowed=1206]="directCallToHTMLTagNotAllowed",e[e.onlySetTemplatePolicyOnce=1207]="onlySetTemplatePolicyOnce",e[e.cannotSetTemplatePolicyAfterCompilation=1208]="cannotSetTemplatePolicyAfterCompilation",e[e.blockedByDOMPolicy=1209]="blockedByDOMPolicy",e[e.invalidHydrationAttributeMarker=1210]="invalidHydrationAttributeMarker",e[e.missingElementDefinition=1401]="missingElementDefinition",e[e.noRegistrationForContext=1501]="noRegistrationForContext",e[e.noFactoryForResolver=1502]="noFactoryForResolver",e[e.invalidResolverStrategy=1503]="invalidResolverStrategy",e[e.cannotAutoregisterDependency=1504]="cannotAutoregisterDependency",e[e.cannotResolveKey=1505]="cannotResolveKey",e[e.cannotConstructNativeFunction=1506]="cannotConstructNativeFunction",e[e.cannotJITRegisterNonConstructor=1507]="cannotJITRegisterNonConstructor",e[e.cannotJITRegisterIntrinsic=1508]="cannotJITRegisterIntrinsic",e[e.cannotJITRegisterInterface=1509]="cannotJITRegisterInterface",e[e.invalidResolver=1510]="invalidResolver",e[e.invalidKey=1511]="invalidKey",e[e.noDefaultResolver=1512]="noDefaultResolver",e[e.cyclicDependency=1513]="cyclicDependency",e[e.connectUpdateRequiresController=1514]="connectUpdateRequiresController"}(e||(e={}));const t=e=>"function"==typeof e,n=e=>"string"==typeof e,i=()=>{},s=Object.create(null),r={warn(e,t){},error:(e,t)=>new Error(`Error ${e}`),addMessages(e){Object.assign(s,e)}};function o(){return s}const a=Object.freeze([]);function l(){const e=new Map;return Object.freeze({register:t=>!e.has(t.type)&&(e.set(t.type,t),!0),getByType:t=>e.get(t),getForInstance(t){if(null!=t)return e.get(t.constructor)}})}function c(){const e=new WeakMap;return function(t){let n=e.get(t);if(void 0===n){let i=Reflect.getPrototypeOf(t);for(;void 0===n&&null!==i;)n=e.get(i),i=Reflect.getPrototypeOf(i);n=void 0===n?[]:n.slice(0),e.set(t,n)}return n}}function d(e){e.prototype.toJSON=i}const h=Object.freeze({none:0,attribute:1,booleanAttribute:2,property:3,content:4,tokenList:5,event:6}),u=e=>e,p=globalThis.trustedTypes?globalThis.trustedTypes.createPolicy("fast-element",{createHTML:u}):{createHTML:u};let f=Object.freeze({createHTML:e=>p.createHTML(e),protect:(e,t,n,i)=>i});const g=f,b=Object.freeze({get policy(){return f},setPolicy(t){if(f!==g)throw r.error(e.onlySetDOMPolicyOnce);f=t},setAttribute(e,t,n){null==n?e.removeAttribute(t):e.setAttribute(t,n)},setBooleanAttribute(e,t,n){n?e.setAttribute(t,""):e.removeAttribute(t)}});function v(e,t,i,s){return(e,t,i,...r)=>{n(i)&&(i=i.replace(/(javascript:|vbscript:|data:)/,"")),s(e,t,i,...r)}}function m(t,n,i,s){throw r.error(e.blockedByDOMPolicy,{aspectName:i,tagName:null!=t?t:"text"})}const y={onabort:m,onauxclick:m,onbeforeinput:m,onbeforematch:m,onblur:m,oncancel:m,oncanplay:m,oncanplaythrough:m,onchange:m,onclick:m,onclose:m,oncontextlost:m,oncontextmenu:m,oncontextrestored:m,oncopy:m,oncuechange:m,oncut:m,ondblclick:m,ondrag:m,ondragend:m,ondragenter:m,ondragleave:m,ondragover:m,ondragstart:m,ondrop:m,ondurationchange:m,onemptied:m,onended:m,onerror:m,onfocus:m,onformdata:m,oninput:m,oninvalid:m,onkeydown:m,onkeypress:m,onkeyup:m,onload:m,onloadeddata:m,onloadedmetadata:m,onloadstart:m,onmousedown:m,onmouseenter:m,onmouseleave:m,onmousemove:m,onmouseout:m,onmouseover:m,onmouseup:m,onpaste:m,onpause:m,onplay:m,onplaying:m,onprogress:m,onratechange:m,onreset:m,onresize:m,onscroll:m,onsecuritypolicyviolation:m,onseeked:m,onseeking:m,onselect:m,onslotchange:m,onstalled:m,onsubmit:m,onsuspend:m,ontimeupdate:m,ontoggle:m,onvolumechange:m,onwaiting:m,onwebkitanimationend:m,onwebkitanimationiteration:m,onwebkitanimationstart:m,onwebkittransitionend:m,onwheel:m},w={elements:{a:{[h.attribute]:{href:v},[h.property]:{href:v}},area:{[h.attribute]:{href:v},[h.property]:{href:v}},button:{[h.attribute]:{formaction:v},[h.property]:{formAction:v}},embed:{[h.attribute]:{src:m},[h.property]:{src:m}},form:{[h.attribute]:{action:v},[h.property]:{action:v}},frame:{[h.attribute]:{src:v},[h.property]:{src:v}},iframe:{[h.attribute]:{src:v},[h.property]:{src:v,srcdoc:m}},input:{[h.attribute]:{formaction:v},[h.property]:{formAction:v}},link:{[h.attribute]:{href:m},[h.property]:{href:m}},object:{[h.attribute]:{codebase:m,data:m},[h.property]:{codeBase:m,data:m}},script:{[h.attribute]:{src:m,text:m},[h.property]:{src:m,text:m,innerText:m,textContent:m}},style:{[h.property]:{innerText:m,textContent:m}}},aspects:{[h.attribute]:Object.assign({},y),[h.property]:Object.assign({innerHTML:m},y),[h.event]:Object.assign({},y)}};function C(e,t){const n={};for(const i in t){const s=e[i],r=t[i];switch(s){case null:break;case void 0:n[i]=r;break;default:n[i]=s}}for(const t in e)t in n||(n[t]=e[t]);return Object.freeze(n)}function S(e,t){const n={};for(const i in t){const s=e[i],r=t[i];switch(s){case null:break;case void 0:n[i]=C(r,{});break;default:n[i]=C(s,r)}}for(const t in e)t in n||(n[t]=C(e[t],{}));return Object.freeze(n)}function O(e,t){const n={};for(const i in t){const s=e[i],r=t[i];switch(s){case null:break;case void 0:n[i]=S(s,{});break;default:n[i]=S(s,r)}}for(const t in e)t in n||(n[t]=S(e[t],{}));return Object.freeze(n)}function T(e,t,n,i,s){const r=e[n];if(r){const e=r[i];if(e)return e(t,n,i,s)}}const x=Object.freeze({create(e={}){var t,n;const i=null!==(t=e.trustedType)&&void 0!==t?t:function(){const e=e=>e;return globalThis.trustedTypes?globalThis.trustedTypes.createPolicy("fast-element",{createHTML:e}):{createHTML:e}}(),s=(r=null!==(n=e.guards)&&void 0!==n?n:{},o=w,Object.freeze({elements:r.elements?O(r.elements,o.elements):o.elements,aspects:r.aspects?S(r.aspects,o.aspects):o.aspects}));var r,o;return Object.freeze({createHTML:e=>i.createHTML(e),protect(e,t,n,i){var r;const o=(null!=e?e:"").toLowerCase(),a=s.elements[o];if(a){const s=T(a,e,t,n,i);if(s)return s}return null!==(r=T(s.aspects,e,t,n,i))&&void 0!==r?r:i}})}});class N{constructor(e,t){this.sub1=void 0,this.sub2=void 0,this.spillover=void 0,this.subject=e,this.sub1=t}has(e){return void 0===this.spillover?this.sub1===e||this.sub2===e:-1!==this.spillover.indexOf(e)}subscribe(e){const t=this.spillover;if(void 0===t){if(this.has(e))return;if(void 0===this.sub1)return void(this.sub1=e);if(void 0===this.sub2)return void(this.sub2=e);this.spillover=[this.sub1,this.sub2,e],this.sub1=void 0,this.sub2=void 0}else{-1===t.indexOf(e)&&t.push(e)}}unsubscribe(e){const t=this.spillover;if(void 0===t)this.sub1===e?this.sub1=void 0:this.sub2===e&&(this.sub2=void 0);else{const n=t.indexOf(e);-1!==n&&t.splice(n,1)}}notify(e){const t=this.spillover,n=this.subject;if(void 0===t){const t=this.sub1,i=this.sub2;void 0!==t&&t.handleChange(n,e),void 0!==i&&i.handleChange(n,e)}else for(let i=0,s=t.length;i<s;++i)t[i].handleChange(n,e)}}class B{constructor(e){this.subscribers={},this.subjectSubscribers=null,this.subject=e}notify(e){var t,n;null===(t=this.subscribers[e])||void 0===t||t.notify(e),null===(n=this.subjectSubscribers)||void 0===n||n.notify(e)}subscribe(e,t){var n,i;let s;s=t?null!==(n=this.subscribers[t])&&void 0!==n?n:this.subscribers[t]=new N(this.subject):null!==(i=this.subjectSubscribers)&&void 0!==i?i:this.subjectSubscribers=new N(this.subject),s.subscribe(e)}unsubscribe(e,t){var n,i;t?null===(n=this.subscribers[t])||void 0===n||n.unsubscribe(e):null===(i=this.subjectSubscribers)||void 0===i||i.unsubscribe(e)}}const k=[],A=[],j=globalThis.requestAnimationFrame;let M=!0;function E(){if(A.length)throw A.shift()}function $(e){try{e.call()}catch(e){if(!M)throw k.length=0,e;A.push(e),setTimeout(E,0)}}function P(){let e=0;for(;e<k.length;)if($(k[e]),e++,e>1024){for(let t=0,n=k.length-e;t<n;t++)k[t]=k[t+e];k.length-=e,e=0}k.length=0}function R(e){k.push(e),k.length<2&&(M?j(P):P())}const I=Object.freeze({enqueue:R,next:()=>new Promise(R),process:P,setMode:e=>M=e}),_=Object.freeze({unknown:void 0,coupled:1}),V=(()=>{const i=I.enqueue,s=/(:|&&|\|\||if|\?\.)/,o=new WeakMap;let a,l=t=>{throw r.error(e.needsArrayObservation)};function h(e){var t;let n=null!==(t=e.$fastController)&&void 0!==t?t:o.get(e);return void 0===n&&(Array.isArray(e)?n=l(e):o.set(e,n=new B(e))),n}const u=c();class p{constructor(e){this.name=e,this.field=`_${e}`,this.callback=`${e}Changed`}getValue(e){return void 0!==a&&a.watch(e,this.name),e[this.field]}setValue(e,n){const i=this.field,s=e[i];if(s!==n){e[i]=n;const r=e[this.callback];t(r)&&r.call(e,s,n),h(e).notify(this.name)}}}class f extends N{constructor(e,t,n=!1){super(e,t),this.expression=e,this.isVolatileBinding=n,this.needsRefresh=!0,this.needsQueue=!0,this.isAsync=!0,this.first=this,this.last=null,this.propertySource=void 0,this.propertyName=void 0,this.notifier=void 0,this.next=void 0}setMode(e){this.isAsync=this.needsQueue=e}bind(e){this.controller=e;const t=this.observe(e.source,e.context);return!e.isBound&&this.requiresUnbind(e)&&e.onUnbind(this),t}requiresUnbind(e){return e.sourceLifetime!==_.coupled||this.first!==this.last||this.first.propertySource!==e.source}unbind(e){this.dispose()}observe(e,t){this.needsRefresh&&null!==this.last&&this.dispose();const n=a;let i;a=this.needsRefresh?this:void 0,this.needsRefresh=this.isVolatileBinding;try{i=this.expression(e,t)}finally{a=n}return i}disconnect(){this.dispose()}dispose(){if(null!==this.last){let e=this.first;for(;void 0!==e;)e.notifier.unsubscribe(this,e.propertyName),e=e.next;this.last=null,this.needsRefresh=this.needsQueue=this.isAsync}}watch(e,t){const n=this.last,i=h(e),s=null===n?this.first:{};if(s.propertySource=e,s.propertyName=t,s.notifier=i,i.subscribe(this,t),null!==n){if(!this.needsRefresh){let t;a=void 0,t=n.propertySource[n.propertyName],a=this,e===t&&(this.needsRefresh=!0)}n.next=s}this.last=s}handleChange(){this.needsQueue?(this.needsQueue=!1,i(this)):this.isAsync||this.call()}call(){null!==this.last&&(this.needsQueue=this.isAsync,this.notify(this))}*records(){let e=this.first;for(;void 0!==e;)yield e,e=e.next}}return d(f),Object.freeze({setArrayObserverFactory(e){l=e},getNotifier:h,track(e,t){a&&a.watch(e,t)},trackVolatile(){a&&(a.needsRefresh=!0)},notify(e,t){h(e).notify(t)},defineProperty(e,t){n(t)&&(t=new p(t)),u(e).push(t),Reflect.defineProperty(e,t.name,{enumerable:!0,get(){return t.getValue(this)},set(e){t.setValue(this,e)}})},getAccessors:u,binding(e,t,n=this.isVolatileBinding(e)){return new f(e,t,n)},isVolatileBinding:e=>s.test(e.toString())})})();function L(e,t){V.defineProperty(e,t)}function D(e,t,n){return Object.assign({},n,{get(){return V.trackVolatile(),n.get.apply(this)}})}const H=(()=>{let e=null;return{get:()=>e,set(t){e=t}}})(),z=Object.freeze({default:{index:0,length:0,get event(){return z.getEvent()},eventDetail(){return this.event.detail},eventTarget(){return this.event.target}},getEvent:()=>H.get(),setEvent(e){H.set(e)}}),F="boolean",U="reflect",W=Object.freeze({locate:c()}),q={toView:e=>e?"true":"false",fromView:e=>!(null==e||"false"===e||!1===e||0===e)},Q={toView:e=>"boolean"==typeof e?e.toString():"",fromView:e=>[null,void 0,void 0].includes(e)?null:q.fromView(e)};function J(e){if(null==e)return null;const t=1*e;return isNaN(t)?null:t}const K={toView(e){const t=J(e);return t?t.toString():t},fromView:J};class X{constructor(e,t,n=t.toLowerCase(),i=U,s){this.guards=new Set,this.Owner=e,this.name=t,this.attribute=n,this.mode=i,this.converter=s,this.fieldName=`_${t}`,this.callbackName=`${t}Changed`,this.hasCallback=this.callbackName in e.prototype,i===F&&void 0===s&&(this.converter=q)}setValue(e,t){const n=e[this.fieldName],i=this.converter;void 0!==i&&(t=i.fromView(t)),n!==t&&(e[this.fieldName]=t,this.tryReflectToAttribute(e),this.hasCallback&&e[this.callbackName](n,t),e.$fastController.notify(this.name))}getValue(e){return V.track(e,this.name),e[this.fieldName]}onAttributeChangedCallback(e,t){this.guards.has(e)||(this.guards.add(e),this.setValue(e,t),this.guards.delete(e))}tryReflectToAttribute(e){const t=this.mode,n=this.guards;n.has(e)||"fromView"===t||I.enqueue(()=>{n.add(e);const i=e[this.fieldName];switch(t){case U:{const t=this.converter;b.setAttribute(e,this.attribute,void 0!==t?t.toView(i):i);break}case F:b.setBooleanAttribute(e,this.attribute,i)}n.delete(e)})}static collect(e,...t){const i=[];t.push(W.locate(e));for(let s=0,r=t.length;s<r;++s){const r=t[s];if(void 0!==r)for(let t=0,s=r.length;t<s;++t){const s=r[t];n(s)?i.push(new X(e,s)):i.push(new X(e,s.property,s.attribute,s.mode,s.converter))}}return i}}function G(e,t){let n;function i(e,t){arguments.length>1&&(n.property=t),W.locate(e.constructor).push(n)}return arguments.length>1?(n={},void i(e,t)):(n=void 0===e?{}:e,i)}class Y{constructor(e,t,n=!1){this.evaluate=e,this.policy=t,this.isVolatile=n}}class Z extends Y{createObserver(){return this}bind(e){return this.evaluate(e.source,e.context)}}function ee(e,t){return new Z(e,t)}d(Z);class te extends Y{createObserver(e){return V.binding(this.evaluate,e,this.isVolatile)}}function ne(e,t,n=V.isVolatileBinding(e)){return new te(e,t,n)}function ie(e,t){const n=new te(e);return n.options=t,n}function se(e){return t(e)?ne(e):e instanceof Y?e:ee(()=>e)}const re=Object.create(null),oe=Object.freeze({subscribe(e,t){const n=re[e];n?n instanceof Set?n.add(t):re[e]=new Set([n,t]):re[e]=t},unsubscribe(e,t){const n=re[e];n&&n instanceof Set?n.delete(t):re[e]=void 0},send(e){const t=re[e];t&&(t instanceof Set?t.forEach(n=>n.handleChange(t,e)):t.handleChange(this,e))}});class ae{constructor(e,t){this.dataBinding=e,this.subscriber=t,this.isNotBound=!0}bind(e){return this.isNotBound&&(oe.subscribe(this.getSignal(e),this),e.onUnbind(this),this.isNotBound=!1),this.dataBinding.evaluate(e.source,e.context)}unbind(e){this.isNotBound=!0,oe.unsubscribe(this.getSignal(e),this)}handleChange(){this.subscriber.handleChange(this.dataBinding.evaluate,this)}getSignal(e){const t=this.dataBinding.options;return n(t)?t:t(e.source,e.context)}}d(ae);class le extends Y{createObserver(e){return new ae(this,e)}}function ce(e,t,n){const i=new le(e,n);return i.options=t,i}const de={fromView:e=>e};let he={determineChangeEvent:()=>"change"};const ue=Object.freeze({configure(e){he=e}});class pe{constructor(e,t,n){this.directive=e,this.subscriber=t,this.dataBinding=n,this.isNotBound=!0,this.notifier=V.binding(n.evaluate,this,n.isVolatile)}bind(e){var t;return this.changeEvent||(this.changeEvent=null!==(t=this.dataBinding.options.changeEvent)&&void 0!==t?t:he.determineChangeEvent(this.directive,this.target)),this.isNotBound&&(this.target.addEventListener(this.changeEvent,this),e.onUnbind(this),this.isNotBound=!1),this.notifier.bind(e)}unbind(e){this.isNotBound=!0,this.target.removeEventListener(this.changeEvent,this)}handleChange(e,t){this.subscriber.handleChange(this.dataBinding.evaluate,this)}handleEvent(t){const n=this.directive,i=t.currentTarget,s=this.notifier.last;if(!s)return void r.warn(e.twoWayBindingRequiresObservables);let o;switch(n.aspectType){case 1:o=i.getAttribute(n.targetAspect);break;case 2:o=i.hasAttribute(n.targetAspect);break;case 4:o=i.innerText;break;default:o=i[n.targetAspect]}s.propertySource[s.propertyName]=this.dataBinding.options.fromView(o)}}d(pe);class fe extends Y{createObserver(e,t){return new pe(t,e,this)}}function ge(e,t,i,s=V.isVolatileBinding(e)){n(t)&&(t={changeEvent:t}),t?t.fromView||(t.fromView=de.fromView):t=de;const r=new fe(e,i,s);return r.options=t,r}let be;function ve(e){return e.reduce((e,t)=>(t instanceof me?e.push(...ve(t.styles)):e.push(t),e),[])}class me{get strategy(){return null===this._strategy&&(be||me.setDefaultStrategy(me.supportsAdoptedStyleSheets?function(){const e=new Map;return class{constructor(t){this.sheets=t.map(t=>{if(t instanceof CSSStyleSheet)return t;let n=e.get(t);return void 0===n&&(n=new CSSStyleSheet,n.replaceSync(t),e.set(t,n)),n})}addStylesTo(e){const t=e;t.adoptedStyleSheets=[...t.adoptedStyleSheets,...this.sheets]}removeStylesFrom(e){const t=e;t.adoptedStyleSheets=t.adoptedStyleSheets.filter(e=>-1===this.sheets.indexOf(e))}}}():class{constructor(e){this.styles=e,this.styleClass="fast-"+ ++ye}addStylesTo(e){const t=e===document?document.body:e;for(let e=0;e<this.styles.length;e++){const n=document.createElement("style");n.innerHTML=this.styles[e],n.className=this.styleClass,t.append(n)}}removeStylesFrom(e){const t=e===document?document.body:e,n=t.querySelectorAll(`.${this.styleClass}`);for(let e=0,i=n.length;e<i;++e)t.removeChild(n[e])}}),this.withStrategy(be)),this._strategy}constructor(e){this.styles=e,this.targets=new WeakSet,this._strategy=null}addStylesTo(e){this.strategy.addStylesTo(e),this.targets.add(e)}removeStylesFrom(e){this.strategy.removeStylesFrom(e),this.targets.delete(e)}isAttachedTo(e){return this.targets.has(e)}withStrategy(e){return this._strategy=new e(ve(this.styles)),this}static setDefaultStrategy(e){be=e}static normalize(e){return void 0===e?void 0:Array.isArray(e)?new me(e):e instanceof me?e:new me([e])}}me.supportsAdoptedStyleSheets=Array.isArray(document.adoptedStyleSheets)&&"replace"in CSSStyleSheet.prototype;let ye=0;function we(e,t,n,i){return new(n||(n=Promise))(function(s,r){function o(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,a)}l((i=i.apply(e,t||[])).next())})}var Ce;"function"==typeof SuppressedError&&SuppressedError;const Se={mode:"open"},Oe={},Te=new Set,xe=l(),Ne=new WeakMap,Be=new WeakMap,ke=new WeakMap,Ae=new WeakMap,je=new WeakMap,Me=new WeakMap;function Ee(e=customElements){if(e===customElements)return _e.isRegistered;let t=Ae.get(e);return t||(t={},Ae.set(e,t)),t}function $e(e,t){var n,i;if(Be.delete(e),void 0===e.template&&void 0!==t&&(e.template=t,null===(i=null===(n=e.lifecycleCallbacks)||void 0===n?void 0:n.templateDidUpdate)||void 0===i||i.call(n,e.name)),void 0!==e.template)return ke.delete(e),Ne.delete(e),e.template}function Pe(e,t=e.registry,n){if(!(null==n?void 0:n.length))return;const i=e;let s=je.get(i);if(!(null==s?void 0:s.has(t))){void 0===s&&(s=new WeakSet,je.set(i,s)),s.add(t);for(const t of n)t(e)}}function Re(e){var t;return null!==(t=Me.get(e))&&void 0!==t?t:null}function Ie(e){if(void 0!==e.template)return ke.delete(e),e.template;const t=Be.get(e);if(t)return t;const n=Ne.get(e);if(!n)return;let i;ke.delete(e);try{i=n(e)}catch(t){throw ke.set(e,t),t}if("function"==typeof(null==(s=i)?void 0:s.then)){const t=Promise.resolve(i).then(t=>$e(e,t)).catch(t=>{throw Be.delete(e),ke.set(e,t),t});return Be.set(e,t),t}var s;return $e(e,i)}class _e{get isDefined(){return this.platformDefined}constructor(e,i=e.definition){var s,r;this.platformDefined=!1,n(i)&&(i={name:i}),this.type=e,this.name=i.name,this.registry=null!==(s=i.registry)&&void 0!==s?s:customElements,r=i.template,t(r)?Ne.set(this,i.template):this.template=i.template;const o=e.prototype,a=X.collect(e,i.attributes),l=new Array(a.length),c={},d={};for(let e=0,t=a.length;e<t;++e){const t=a[e];l[e]=t.attribute,c[t.name]=t,d[t.attribute]=t,V.defineProperty(o,t)}Reflect.defineProperty(e,"observedAttributes",{value:l,enumerable:!0}),this.attributes=a,this.propertyLookup=c,this.attributeLookup=d,this.shadowOptions=void 0===i.shadowOptions?Se:null===i.shadowOptions?void 0:Object.assign(Object.assign({},Se),i.shadowOptions),this.elementOptions=void 0===i.elementOptions?Oe:Object.assign(Object.assign({},Oe),i.elementOptions),this.styles=me.normalize(i.styles),this.schema=i.schema,xe.register(this);const h=Ee(this.registry);Object.prototype.hasOwnProperty.call(h,this.name)||V.defineProperty(h,this.name),h[this.name]=this.type}define(e=this.registry,t){var n,i;const s=this.type;if(!e.get(this.name)){if(Pe(this,e,t),void 0===this.template&&Ne.has(this))return Promise.resolve().then(()=>Ie(this)).then(t=>{var n,i;void 0===t||e.get(this.name)||(this.platformDefined=!0,e.define(this.name,s,this.elementOptions),null===(i=null===(n=this.lifecycleCallbacks)||void 0===n?void 0:n.elementDidDefine)||void 0===i||i.call(n,this.name))}).catch(e=>{!function(e,t){const n=e;void 0!==t?ke.set(n,t):ke.delete(n)}(this,e),V.notify(this,"template")}),this;this.platformDefined=!0,e.define(this.name,s,this.elementOptions),null===(i=null===(n=this.lifecycleCallbacks)||void 0===n?void 0:n.elementDidDefine)||void 0===i||i.call(n,this.name)}return this}static compose(e,t){const n=Te.has(e)||xe.getByType(e)?new Ce(class extends e{},t):new Ce(e,t);return Promise.resolve(n)}static registerBaseType(e){Te.add(e)}}Ce=_e,_e.isRegistered={},_e.getByType=xe.getByType,_e.getForInstance=xe.getForInstance,_e.register=(e,t=customElements)=>we(void 0,void 0,void 0,function*(){const n=Ee(t);return Object.prototype.hasOwnProperty.call(n,e)||V.defineProperty(n,e),new Promise(t=>{if(n[e])return void t(n[e]);const i=V.getNotifier(n),s={handleChange:()=>{const r=n[e];r&&(i.unsubscribe(s,e),t(r))}};i.subscribe(s,e)})}),V.defineProperty(_e.prototype,"template");const Ve={bubbles:!0,composed:!0,cancelable:!0},Le="isConnected",De=new WeakMap,He=Symbol("fast-late-attribute-observer");function ze(e){var t,n;return null!==(n=null!==(t=e.shadowRoot)&&void 0!==t?t:De.get(e))&&void 0!==n?n:null}let Fe;var Ue;!function(e){e[e.connecting=0]="connecting",e[e.connected=1]="connected",e[e.disconnecting=2]="disconnecting",e[e.disconnected=3]="disconnected"}(Ue||(Ue={}));class We{get isConnected(){return V.track(this,Le),this.stage===Ue.connected}get context(){var e,t;return null!==(t=null===(e=this.view)||void 0===e?void 0:e.context)&&void 0!==t?t:z.default}get isBound(){var e,t;return null!==(t=null===(e=this.view)||void 0===e?void 0:e.isBound)&&void 0!==t&&t}get sourceLifetime(){var e;return null===(e=this.view)||void 0===e?void 0:e.sourceLifetime}get template(){var e;if(null===this._template){const t=this.definition;this.source.resolveTemplate?this._template=this.source.resolveTemplate():t.template&&(this._template=null!==(e=t.template)&&void 0!==e?e:null)}return this._template}set template(e){this._template!==e&&(this._template=e,this.needsInitialization||this.renderTemplate(e))}get shadowOptions(){return this._shadowRootOptions}set shadowOptions(e){if(void 0===this._shadowRootOptions&&void 0!==e){this._shadowRootOptions=e;let t=this.source.shadowRoot;t?this.hasExistingShadowRoot=!0:(t=this.source.attachShadow(e),"closed"===e.mode&&De.set(this.source,t))}}get mainStyles(){var e;if(null===this._mainStyles){const t=this.definition;this.source.resolveStyles?this._mainStyles=this.source.resolveStyles():t.styles&&(this._mainStyles=null!==(e=t.styles)&&void 0!==e?e:null)}return this._mainStyles}set mainStyles(e){this._mainStyles!==e&&(null!==this._mainStyles&&this.removeStyles(this._mainStyles),this._mainStyles=e,this.needsInitialization||this.addStyles(e))}constructor(e,t){this.boundObservables=null,this.needsInitialization=!0,this.hasExistingShadowRoot=!1,this.isPrerendered=new Promise(e=>{this._resolvePrerendered=e}),this.isHydrated=new Promise(e=>{this._resolveHydrated=e}),this._template=null,this.stage=Ue.disconnected,this.guardBehaviorConnection=!1,this.behaviors=null,this.behaviorsConnected=!1,this._mainStyles=null,this.$fastController=this,this.view=null,this._notifier=new B(e),this.source=e,this.definition=t,this.shadowOptions=t.shadowOptions;const n=Reflect.getPrototypeOf(e),i=null===n?[]:V.getAccessors(n);if(i.length>0){const t=this.boundObservables=Object.create(null);for(let n=0,s=i.length;n<s;++n){const s=i[n].name,r=e[s];void 0!==r&&(delete e[s],t[s]=r)}0===Object.keys(t).length&&(this.boundObservables=null)}this.captureBoundObservables()}get subject(){return this._notifier.subject}notify(e){this._notifier.notify(e)}subscribe(e,t){this._notifier.subscribe(e,t)}unsubscribe(e,t){this._notifier.unsubscribe(e,t)}onUnbind(e){var t;null===(t=this.view)||void 0===t||t.onUnbind(e)}addBehavior(e){var t,n;const i=null!==(t=this.behaviors)&&void 0!==t?t:this.behaviors=new Map,s=null!==(n=i.get(e))&&void 0!==n?n:0;0===s?(i.set(e,1),e.addedCallback&&e.addedCallback(this),!e.connectedCallback||this.guardBehaviorConnection||this.stage!==Ue.connected&&this.stage!==Ue.connecting||e.connectedCallback(this)):i.set(e,s+1)}removeBehavior(e,t=!1){const n=this.behaviors;if(null===n)return;const i=n.get(e);void 0!==i&&(1===i||t?(n.delete(e),e.disconnectedCallback&&this.stage!==Ue.disconnected&&e.disconnectedCallback(this),e.removedCallback&&e.removedCallback(this)):n.set(e,i-1))}addStyles(e){var t;if(!e)return;const n=this.source;if(e instanceof HTMLElement){(null!==(t=ze(n))&&void 0!==t?t:this.source).append(e)}else e.isAttachedTo(n)||e.addStylesTo(n)}removeStyles(e){var t;if(!e)return;const n=this.source;if(e instanceof HTMLElement){(null!==(t=ze(n))&&void 0!==t?t:n).removeChild(e)}else e.isAttachedTo(n)&&e.removeStylesFrom(n)}connect(){this.stage===Ue.disconnected&&(this.stage=Ue.connecting,this.captureBoundObservables(),this.syncLateAttributes(),this.observeLateAttributes(),this.bindObservables(),this.connectBehaviors(),this.needsInitialization?(this.renderTemplate(this.template),this.addStyles(this.mainStyles),this.needsInitialization=!1):null!==this.view&&this.view.bind(this.source),this.stage=Ue.connected,V.notify(this,Le))}bindObservables(){if(null!==this.boundObservables){const e=this.source,t=this.boundObservables,n=Object.keys(t);for(let i=0,s=n.length;i<s;++i){const s=n[i];e[s]=t[s]}this.boundObservables=null}}captureBoundObservables(){const e=this.source,t=Object.getOwnPropertyNames(e),n=t=>{let n=Reflect.getPrototypeOf(e);for(;null!==n;){const e=Reflect.getOwnPropertyDescriptor(n,t);if((null==e?void 0:e.get)||(null==e?void 0:e.set))return!0;n=Reflect.getPrototypeOf(n)}return!1};let i=this.boundObservables;for(let s=0,r=t.length;s<r;++s){const r=t[s],o="_"===r[0]?r.slice(1):r;if(!n(o))continue;const a=e[o],l=r!==o,c=!(null===a||"object"!=typeof a||(null==a?void 0:a.$isProxy)||Array.isArray(a)&&(null==a?void 0:a.$fastController));void 0!==a?l&&!c||(delete e[r],(null!=i?i:i=this.boundObservables=Object.create(null))[o]=a):l||delete e[r]}}syncLateAttributes(){const e=Re(this.definition);if(null!==e)for(const t of Object.keys(e))this.source.hasAttribute(t)&&this.onAttributeChangedCallback(t,null,this.source.getAttribute(t))}observeLateAttributes(){if(null===Re(this.definition))return;const e=this.source;void 0===e[He]&&(e[He]=new MutationObserver(t=>{const n=e.$fastController,i=Re(n.definition);if(null!==i)for(let s=0,r=t.length;s<r;++s){const r=t[s].attributeName;null!==r&&void 0!==i[r]&&n.onAttributeChangedCallback(r,null,e.getAttribute(r))}}),e[He].observe(e,{attributes:!0}))}connectBehaviors(){if(!1===this.behaviorsConnected){const e=this.behaviors;if(null!==e){this.guardBehaviorConnection=!0;for(const t of e.keys())t.connectedCallback&&t.connectedCallback(this);this.guardBehaviorConnection=!1}this.behaviorsConnected=!0}}disconnectBehaviors(){if(!0===this.behaviorsConnected){const e=this.behaviors;if(null!==e)for(const t of e.keys())t.disconnectedCallback&&t.disconnectedCallback(this);this.behaviorsConnected=!1}}disconnect(){this.stage===Ue.connected&&(this.stage=Ue.disconnecting,V.notify(this,Le),null!==this.view&&this.view.unbind(),this.disconnectBehaviors(),this.stage=Ue.disconnected)}onAttributeChangedCallback(e,t,n){const i=this.definition.attributeLookup[e];void 0!==i&&i.onAttributeChangedCallback(this.source,n)}emit(e,t,n){return this.stage===Ue.connected&&this.source.dispatchEvent(new CustomEvent(e,Object.assign(Object.assign({detail:t},Ve),n)))}renderTemplate(e){var t;const n=this.source,i=null!==(t=ze(n))&&void 0!==t?t:n;if(null!==this.view)this.view.dispose(),this.view=null;else if((!this.needsInitialization||this.hasExistingShadowRoot)&&(!this.hasExistingShadowRoot||!this.needsInitialization))for(let e=i.firstChild;null!==e;e=i.firstChild)i.removeChild(e);if(e){const t=this.hasExistingShadowRoot&&this.needsInitialization;let s=!1;t&&We.hydrationHook&&(s=We.hydrationHook(this,e,n,i)),s||this.renderClientSide(e,n,i),this._resolvePrerendered(t),this._resolveHydrated(s)}else this.needsInitialization&&(this._resolvePrerendered(!1),this._resolveHydrated(!1))}renderClientSide(e,t,n){if(this.hasExistingShadowRoot){for(let e=n.firstChild;null!==e;e=n.firstChild)n.removeChild(e);this.hasExistingShadowRoot=!1}this.view=e.render(t,n,t),this.view.sourceLifetime=_.coupled}static forCustomElement(t,n=!1){const i=t.$fastController;if(void 0!==i&&!n)return i;const s=_e.getForInstance(t);if(void 0===s)throw r.error(e.missingElementDefinition);return V.getNotifier(s).subscribe({handleChange:()=>{We.forCustomElement(t,!0),t.$fastController.connect()}},"template"),V.getNotifier(s).subscribe({handleChange:()=>{We.forCustomElement(t,!0),t.$fastController.connect()}},"shadowOptions"),t.$fastController=new Fe(t,s)}static setStrategy(e){Fe=e}static installHydrationHook(e){We.hydrationHook=e}}function qe(e){var t;return"adoptedStyleSheets"in e?e:null!==(t=ze(e))&&void 0!==t?t:e.getRootNode()}We.hydrationHook=null,d(We),We.setStrategy(We);class Qe{constructor(e){const t=Qe.styleSheetCache;this.sheets=e.map(e=>{if(e instanceof CSSStyleSheet)return e;let n=t.get(e);return void 0===n&&(n=new CSSStyleSheet,n.replaceSync(e),t.set(e,n)),n})}addStylesTo(e){Ge(qe(e),this.sheets)}removeStylesFrom(e){Ye(qe(e),this.sheets)}}Qe.styleSheetCache=new Map;let Je=0;function Ke(e){return e===document?document.body:e}class Xe{constructor(e){this.styles=e,this.styleClass="fast-"+ ++Je}addStylesTo(e){e=Ke(qe(e));const t=this.styles,n=this.styleClass;for(let i=0;i<t.length;i++){const s=document.createElement("style");s.innerHTML=t[i],s.className=n,e.append(s)}}removeStylesFrom(e){const t=(e=Ke(qe(e))).querySelectorAll(`.${this.styleClass}`);for(let n=0,i=t.length;n<i;++n)e.removeChild(t[n])}}let Ge=(e,t)=>{e.adoptedStyleSheets=[...e.adoptedStyleSheets,...t]},Ye=(e,t)=>{e.adoptedStyleSheets=e.adoptedStyleSheets.filter(e=>-1===t.indexOf(e))};if(me.supportsAdoptedStyleSheets){try{document.adoptedStyleSheets.push(),document.adoptedStyleSheets.splice(),Ge=(e,t)=>{e.adoptedStyleSheets.push(...t)},Ye=(e,t)=>{for(const n of t){const t=e.adoptedStyleSheets.indexOf(n);-1!==t&&e.adoptedStyleSheets.splice(t,1)}}}catch(e){}me.setDefaultStrategy(Qe)}else me.setDefaultStrategy(Xe);function Ze(e){const t=class extends e{constructor(){super(),We.forCustomElement(this)}$emit(e,t,n){return this.$fastController.emit(e,t,n)}connectedCallback(){this.$fastController.connect()}disconnectedCallback(){this.$fastController.disconnect()}attributeChangedCallback(e,t,n){this.$fastController.onAttributeChangedCallback(e,t,n)}};return _e.registerBaseType(t),t}function et(e,n,i){Array.isArray(n)&&(i=n,n=void 0);return(t(e)?_e.compose(e,n):_e.compose(this,e)).then(e=>{Pe(e,e.registry,i);const t=Ie(e);return"function"==typeof(null==(n=t)?void 0:n.then)?t.then(()=>e.define().type):e.define().type;var n})}const tt=Object.assign(Ze(HTMLElement),{from:function(e){return Ze(e)},define:et,compose:function(e,n){return t(e)?_e.compose(e,n):_e.compose(this,e)}});function nt(e){return function(t){et(t,e)}}const it={1101:"Must call ArrayObserver.enable() before observing arrays.",1201:"The DOM Policy can only be set once.",1202:"To bind innerHTML, you must use a TrustedTypesPolicy.",1203:"View=>Model update skipped. To use twoWay binding, the target property must be observable.",1204:"No host element is present. Cannot bind host with ${name}.",1205:"The requested binding behavior is not supported by the binding engine.",1206:"Calling html`` as a normal function invalidates the security guarantees provided by FAST.",1207:"The DOM Policy for an HTML template can only be set once.",1208:"The DOM Policy cannot be set after a template is compiled.",1209:"'${aspectName}' on '${tagName}' is blocked by the current DOMPolicy.",1210:"Invalid data-fe attribute value '${value}'. Expected a positive integer.",1401:"Missing FASTElement definition.",1501:"No registration for Context/Interface '${name}'.",1502:"Dependency injection resolver for '${key}' returned a null factory.",1503:"Invalid dependency injection resolver strategy specified '${strategy}'.",1504:"Unable to autoregister dependency.",1505:"Unable to resolve dependency injection key '${key}'.",1506:"'${name}' is a native function and therefore cannot be safely constructed by DI. If this is intentional, please use a callback or cachedCallback resolver.",1507:"Attempted to jitRegister something that is not a constructor '${value}'. Did you forget to register this dependency?",1508:"Attempted to jitRegister an intrinsic type '${value}'. Did you forget to add @inject(Key)?",1509:"Attempted to jitRegister an interface '${value}'.",1510:"A valid resolver was not returned from the register method.",1511:"Key/value cannot be null or undefined. Are you trying to inject/register something that doesn't exist with DI?",1512:"'${key}' not registered. Did you forget to add @singleton()?",1513:"Cyclic dependency found '${name}'.",1514:"Injected properties that are updated on changes to DOM connectivity require the target object to be an instance of FASTElement.",1601:"Invalid attribute marker name: ${name}. Expected format is ${expectedFormat}.",1602:"Invalid compact attribute marker values in ${markerName}. Both index and count must be positive integers.",1604:"Invalid compact attribute marker name: ${name}. Expected format is ${expectedFormat}."},st=/(\$\{\w+?})/g,rt=/\$\{(\w+?)}/g,ot=Object.freeze({});function at(e,t){return e.split(st).map(e=>{var n;const i=e.replace(rt,"$1");return String(null!==(n=t[i])&&void 0!==n?n:e)}).join("")}function lt(){const e=o();Object.assign(e,it),Object.assign(r,{addMessages(t){Object.assign(e,t)},warn(t,n=ot){var i;const s=null!==(i=e[t])&&void 0!==i?i:"Unknown Warning";console.warn(at(s,n))},error(t,n=ot){var i;const s=null!==(i=e[t])&&void 0!==i?i:"Unknown Error";return new Error(at(s,n))}})}const ct=`fast-${Math.random().toString(36).substring(2,8)}`,dt=`${ct}{`,ht=`}${ct}`,ut=ht.length;let pt=0;const ft=()=>`${ct}-${++pt}`,gt=Object.freeze({interpolation:e=>`${dt}${e}${ht}`,attribute:e=>`${ft()}="${dt}${e}${ht}"`,comment:e=>`\x3c!--${dt}${e}${ht}--\x3e`}),bt=Object.freeze({parse(e,t){const n=e.split(dt);if(1===n.length)return null;const i=[];for(let e=0,s=n.length;e<s;++e){const s=n[e],r=s.indexOf(ht);let o;if(-1===r)o=s;else{const e=s.substring(0,r);i.push(t[e]),o=s.substring(r+ut)}""!==o&&i.push(o)}return i}}),vt=l(),mt=Object.freeze({getForInstance:vt.getForInstance,getByType:vt.getByType,define:(e,t)=>((t=t||{}).type=e,vt.register(t),e),assignAspect(e,t){if(t)switch(e.sourceAspect=t,t[0]){case":":e.targetAspect=t.substring(1),e.aspectType="classList"===e.targetAspect?h.tokenList:h.property;break;case"?":e.targetAspect=t.substring(1),e.aspectType=h.booleanAttribute;break;case"@":e.targetAspect=t.substring(1),e.aspectType=h.event;break;default:e.targetAspect=t,e.aspectType=h.attribute}else e.aspectType=h.content}});function yt(e){return function(t){mt.define(t,e)}}class wt{constructor(e){this.options=e}createHTML(e){return gt.attribute(e(this))}createBehavior(){return this}}d(wt);const Ct=e=>1===e.nodeType,St=e=>e?t=>1===t.nodeType&&t.matches(e):Ct;class Ot extends wt{get id(){return this._id}set id(e){this._id=e,this._controllerProperty=`${e}-c`}bind(e){const t=e.targets[this.targetNodeId];t[this._controllerProperty]=e,this.updateTarget(e.source,this.computeNodes(t)),this.observe(t),e.onUnbind(this)}unbind(e){const t=e.targets[this.targetNodeId];this.updateTarget(e.source,a),this.disconnect(t),t[this._controllerProperty]=null}getSource(e){return e[this._controllerProperty].source}updateTarget(e,t){e[this.options.property]=t}computeNodes(e){let t=this.getNodes(e);return"filter"in this.options&&(t=t.filter(this.options.filter)),t}}class Tt extends Ot{constructor(e){super(e),this.observerProperty=Symbol(),e.childList=!0}observe(e){let t=e[this.observerProperty];if(!t){t=new MutationObserver((t,n)=>{this.updateTarget(this.getSource(e),this.computeNodes(e))}),t.toJSON=i,e[this.observerProperty]=t}t.observe(e,this.options)}disconnect(e){e[this.observerProperty].disconnect()}getNodes(e){return"selector"in this.options?Array.from(e.querySelectorAll(this.options.selector)):Array.from(e.childNodes)}}function xt(e){return n(e)&&(e={property:e}),new Tt(e)}mt.define(Tt);class Nt extends wt{bind(e){e.source[this.options]=e.targets[this.targetNodeId]}}mt.define(Nt);const Bt=e=>new Nt(e);function kt(e){return e&&e.nodeType===Node.COMMENT_NODE}const At=Object.freeze({attributeMarkerName:"data-fe",contentBindingStartMarker:()=>"fe:b",contentBindingEndMarker:()=>"fe:/b",repeatStartMarker:()=>"fe:r",repeatEndMarker:()=>"fe:/r",elementBoundaryStartMarker:()=>"fe:e",elementBoundaryEndMarker:()=>"fe:/e",isContentBindingStartMarker:e=>"fe:b"===e,isContentBindingEndMarker:e=>"fe:/b"===e,isRepeatViewStartMarker:e=>"fe:r"===e,isRepeatViewEndMarker:e=>"fe:/r"===e,isElementBoundaryStartMarker:e=>kt(e)&&"fe:e"===e.data,isElementBoundaryEndMarker:e=>kt(e)&&"fe:/e"===e.data,parseAttributeBindingCount(t){const n=t.getAttribute(this.attributeMarkerName);if(null===n)return null;const i=n.trim();if(!/^\d+$/.test(i))throw r.error(e.invalidHydrationAttributeMarker,{value:n});const s=parseInt(i,10);if(s<1)throw r.error(e.invalidHydrationAttributeMarker,{value:n});return s}}),jt=Symbol.for("fe-hydration");function Mt(e){return e[jt]===jt}class Et{constructor(e,t,n){this.index=e,this.removed=t,this.addedCount=n}adjustTo(e){let t=this.index;const n=e.length;return t>n?t=n-this.addedCount:t<0&&(t=n+this.removed.length+t-this.addedCount),this.index=t<0?0:t,this}}class $t{constructor(e){this.sorted=e}}const Pt=Object.freeze({reset:1,splice:2,optimized:3}),Rt=new Et(0,a,0);Rt.reset=!0;const It=[Rt];var _t;function Vt(e,t,n,i){return t<n||i<e?-1:t===n||i===e?0:e<n?t<i?t-n:i-n:i<t?i-e:t-e}function Lt(e,t,n,i,s,r){let o=0,l=0;const c=Math.min(n-t,r-s);if(0===t&&0===s&&(o=function(e,t,n){for(let i=0;i<n;++i)if(e[i]!==t[i])return i;return n}(e,i,c)),n===e.length&&r===i.length&&(l=function(e,t,n){let i=e.length,s=t.length,r=0;for(;r<n&&e[--i]===t[--s];)r++;return r}(e,i,c-o)),s+=o,r-=l,(n-=l)-(t+=o)===0&&r-s===0)return a;if(t===n){const e=new Et(t,[],0);for(;s<r;)e.removed.push(i[s++]);return[e]}if(s===r)return[new Et(t,[],n-t)];const d=function(e){let t=e.length-1,n=e[0].length-1,i=e[t][n];const s=[];for(;t>0||n>0;){if(0===t){s.push(_t.add),n--;continue}if(0===n){s.push(_t.delete),t--;continue}const r=e[t-1][n-1],o=e[t-1][n],a=e[t][n-1];let l;l=o<a?o<r?o:r:a<r?a:r,l===r?(r===i?s.push(_t.leave):(s.push(_t.update),i=r),t--,n--):l===o?(s.push(_t.delete),t--,i=o):(s.push(_t.add),n--,i=a)}return s.reverse()}(function(e,t,n,i,s,r){const o=r-s+1,a=n-t+1,l=new Array(o);let c,d;for(let e=0;e<o;++e)l[e]=new Array(a),l[e][0]=e;for(let e=0;e<a;++e)l[0][e]=e;for(let n=1;n<o;++n)for(let r=1;r<a;++r)e[t+r-1]===i[s+n-1]?l[n][r]=l[n-1][r-1]:(c=l[n-1][r]+1,d=l[n][r-1]+1,l[n][r]=c<d?c:d);return l}(e,t,n,i,s,r)),h=[];let u,p=t,f=s;for(let e=0;e<d.length;++e)switch(d[e]){case _t.leave:void 0!==u&&(h.push(u),u=void 0),p++,f++;break;case _t.update:void 0===u&&(u=new Et(p,[],0)),u.addedCount++,p++,u.removed.push(i[f]),f++;break;case _t.add:void 0===u&&(u=new Et(p,[],0)),u.addedCount++,p++;break;case _t.delete:void 0===u&&(u=new Et(p,[],0)),u.removed.push(i[f]),f++}return void 0!==u&&h.push(u),h}function Dt(e,t){let n=!1,i=0;for(let s=0;s<t.length;s++){const r=t[s];if(r.index+=i,n)continue;const o=Vt(e.index,e.index+e.removed.length,r.index,r.index+r.addedCount);if(o>=0){t.splice(s,1),s--,i-=r.addedCount-r.removed.length,e.addedCount+=r.addedCount-o;const a=e.removed.length+r.removed.length-o;if(e.addedCount||a){let t=r.removed;if(e.index<r.index){const n=e.removed.slice(0,r.index-e.index);n.push(...t),t=n}if(e.index+e.removed.length>r.index+r.addedCount){const n=e.removed.slice(r.index+r.addedCount-e.index);t.push(...n)}e.removed=t,r.index<e.index&&(e.index=r.index)}else n=!0}else if(e.index<r.index){n=!0,t.splice(s,0,e),s++;const o=e.addedCount-e.removed.length;r.index+=o,i+=o}}n||t.push(e)}!function(e){e[e.leave=0]="leave",e[e.update=1]="update",e[e.add=2]="add",e[e.delete=3]="delete"}(_t||(_t={}));let Ht=Object.freeze({support:Pt.optimized,normalize:(e,t,n)=>void 0===e?void 0===n?a:function(e,t){let n=[];const i=[];for(let e=0,n=t.length;e<n;e++)Dt(t[e],i);for(let t=0,s=i.length;t<s;++t){const s=i[t];1!==s.addedCount||1!==s.removed.length?n=n.concat(Lt(e,s.index,s.index+s.addedCount,s.removed,0,s.removed.length)):s.removed[0]!==e[s.index]&&n.push(s)}return n}(t,n):It,pop(e,t,n,i){const s=e.length>0,r=n.apply(e,i);return s&&t.addSplice(new Et(e.length,[r],0)),r},push(e,t,n,i){const s=n.apply(e,i);return t.addSplice(new Et(e.length-i.length,[],i.length).adjustTo(e)),s},reverse(e,t,n,i){const s=n.apply(e,i);e.sorted++;const r=[];for(let t=e.length-1;t>=0;t--)r.push(t);return t.addSort(new $t(r)),s},shift(e,t,n,i){const s=e.length>0,r=n.apply(e,i);return s&&t.addSplice(new Et(0,[r],0)),r},sort(e,t,n,i){const s=new Map;for(let t=0,n=e.length;t<n;++t){const n=s.get(e[t])||[];s.set(e[t],[...n,t])}const r=n.apply(e,i);e.sorted++;const o=[];for(let t=0,n=e.length;t<n;++t){const n=s.get(e[t]);o.push(n[0]),s.set(e[t],n.splice(1))}return t.addSort(new $t(o)),r},splice(e,t,n,i){const s=n.apply(e,i);return t.addSplice(new Et(+i[0],s,i.length>2?i.length-2:0).adjustTo(e)),s},unshift(e,t,n,i){const s=n.apply(e,i);return t.addSplice(new Et(0,[],i.length).adjustTo(e)),s}});const zt=Object.freeze({reset:It,setDefaultStrategy(e){Ht=e}});function Ft(e,t,n,i=!0){Reflect.defineProperty(e,t,{value:n,enumerable:!1,writable:i})}class Ut extends N{get strategy(){return this._strategy}set strategy(e){this._strategy=e}get lengthObserver(){let e=this._lengthObserver;if(void 0===e){const t=this.subject;this._lengthObserver=e={length:t.length,handleChange(){this.length!==t.length&&(this.length=t.length,V.notify(e,"length"))}},this.subscribe(e)}return e}get sortObserver(){let e=this._sortObserver;if(void 0===e){const t=this.subject;this._sortObserver=e={sorted:t.sorted,handleChange(){this.sorted!==t.sorted&&(this.sorted=t.sorted,V.notify(e,"sorted"))}},this.subscribe(e)}return e}constructor(e){super(e),this.oldCollection=void 0,this.splices=void 0,this.sorts=void 0,this.needsQueue=!0,this._strategy=null,this._lengthObserver=void 0,this._sortObserver=void 0,this.call=this.flush,Ft(e,"$fastController",this)}subscribe(e){this.flush(),super.subscribe(e)}addSplice(e){void 0===this.splices?this.splices=[e]:this.splices.push(e),this.enqueue()}addSort(e){void 0===this.sorts?this.sorts=[e]:this.sorts.push(e),this.enqueue()}reset(e){this.oldCollection=e,this.enqueue()}flush(){var e;const t=this.splices,n=this.sorts,i=this.oldCollection;void 0===t&&void 0===i&&void 0===n||(this.needsQueue=!0,this.splices=void 0,this.sorts=void 0,this.oldCollection=void 0,void 0!==n?this.notify(n):this.notify((null!==(e=this._strategy)&&void 0!==e?e:Ht).normalize(i,this.subject,t)))}enqueue(){this.needsQueue&&(this.needsQueue=!1,I.enqueue(this))}}let Wt=!1;const qt=Object.freeze({sorted:0,enable(){if(Wt)return;Wt=!0,V.setArrayObserverFactory(e=>new Ut(e));const e=Array.prototype;e.$fastPatch||(Ft(e,"$fastPatch",1),Ft(e,"sorted",0),[e.pop,e.push,e.reverse,e.shift,e.sort,e.splice,e.unshift].forEach(t=>{e[t.name]=function(...e){var n;const i=this.$fastController;return void 0===i?t.apply(this,e):(null!==(n=i.strategy)&&void 0!==n?n:Ht)[t.name](this,i,t,e)}}))}});function Qt(e){if(!e)return 0;let t=e.$fastController;return void 0===t&&(qt.enable(),t=V.getNotifier(e)),V.track(t.lengthObserver,"length"),e.length}function Jt(e){if(!e)return 0;let t=e.$fastController;return void 0===t&&(qt.enable(),t=V.getNotifier(e)),V.track(t.sortObserver,"sorted"),e.sorted}class Kt extends Error{constructor(e,t,n){super(e),this.factories=t,this.node=n}}function Xt(e){return e.nodeType===Node.COMMENT_NODE}function Gt(e){return e.nodeType===Node.TEXT_NODE}function Yt(e,t){const n=document.createRange();return n.setStart(e,0),n.setEnd(t,Xt(t)||Gt(t)?t.data.length:t.childNodes.length),n}function Zt(e,t,n,i,s,r){var o,a,l,c;const d=[];let h=t.nextSibling();if(e.data="",null===h)throw new Kt(`Error hydrating content binding inside "${null!==(a=null===(o=e.getRootNode().host)||void 0===o?void 0:o.nodeName)&&void 0!==a?a:"unknown"}": no sibling found after content binding start marker.`,i,e);const u=h;let p=0;for(;null!==h;){if(Xt(h))if("fe:b"===h.data)p++;else if("fe:/b"===h.data){if(0===p)break;p--}d.push(h),h=t.nextSibling()}if(null===h)throw new Kt(`Error hydrating content binding inside "${null!==(c=null===(l=e.getRootNode().host)||void 0===l?void 0:l.nodeName)&&void 0!==c?c:"unknown"}": missing fe:/b end marker.`,i,e);if(h.data="",1===d.length&&Gt(d[0]))tn(n,d[0],s);else{h!==u&&null!==h.previousSibling&&(r[n.targetNodeId]={first:u,last:h.previousSibling});tn(n,h.parentNode.insertBefore(document.createTextNode(""),h),s)}}function en(e,t,n){var i,s;let r=0,o=e.nextSibling();for(;null!==o;){if(Xt(o))if("fe:e"===o.data)o.data="",r++;else if("fe:/e"===o.data){if(0===r)return void(o.data="");o.data="",r--}o=e.nextSibling()}throw new Kt(`HydrationView could not find the end of an element boundary inside ${null!==(s=null===(i=n.getRootNode().host)||void 0===i?void 0:i.nodeName)&&void 0!==s?s:"unknown"}. This likely indicates a template mismatch between SSR rendering and hydration.`,t,n)}function tn(e,t,n){if(void 0===e.targetNodeId)throw new Error("Factory could not be target to the node");n[e.targetNodeId]=t}function nn(e,t){const n=e.parentNode;let i,s=e;for(;s!==t;){if(i=s.nextSibling,!i)throw new Error(`Unmatched first/last child inside "${t.getRootNode().host.nodeName}".`);n.removeChild(s),s=i}n.removeChild(t)}class sn{constructor(){this.index=0,this.length=0}get event(){return z.getEvent()}get isEven(){return this.index%2==0}get isOdd(){return this.index%2!=0}get isFirst(){return 0===this.index}get isInMiddle(){return!this.isFirst&&!this.isLast}get isLast(){return this.index===this.length-1}eventDetail(){return this.event.detail}eventTarget(){return this.event.target}}class rn extends sn{constructor(e,t,n){super(),this.fragment=e,this.factories=t,this.targets=n,this.behaviors=null,this.unbindables=[],this.source=null,this.isBound=!1,this.sourceLifetime=_.unknown,this._skipAttrUpdates=!1,this.isPrerendered=Promise.resolve(!1),this.isHydrated=Promise.resolve(!1),this.context=this,this.firstChild=e.firstChild,this.lastChild=e.lastChild}appendTo(e){e.appendChild(this.fragment)}insertBefore(e){if(this.fragment.hasChildNodes())e.parentNode.insertBefore(this.fragment,e);else{const t=this.lastChild;if(e.previousSibling===t)return;const n=e.parentNode;let i,s=this.firstChild;for(;s!==t;)i=s.nextSibling,n.insertBefore(s,e),s=i;n.insertBefore(t,e)}}remove(){const e=this.fragment,t=this.lastChild;let n,i=this.firstChild;for(;i!==t;)n=i.nextSibling,e.appendChild(i),i=n;e.appendChild(t)}dispose(){nn(this.firstChild,this.lastChild),this.unbind()}onUnbind(e){this.unbindables.push(e)}bind(e,t=this){if(this.source===e)return;let n=this.behaviors;if(null===n){this.source=e,this.context=t,this.behaviors=n=new Array(this.factories.length);const i=this.factories;for(let e=0,t=i.length;e<t;++e){const t=i[e].createBehavior();t.bind(this),n[e]=t}}else{null!==this.source&&this.evaluateUnbindables(),this.isBound=!1,this.source=e,this.context=t;for(let e=0,t=n.length;e<t;++e)n[e].bind(this)}this.isBound=!0}unbind(){this.isBound&&null!==this.source&&(this.evaluateUnbindables(),this.source=null,this.context=this,this.isBound=!1)}evaluateUnbindables(){const e=this.unbindables;for(let t=0,n=e.length;t<n;++t)e[t].unbind(this);e.length=0}static disposeContiguousBatch(e){if(0!==e.length){nn(e[0].firstChild,e[e.length-1].lastChild);for(let t=0,n=e.length;t<n;++t)e[t].unbind()}}}var on;d(rn),V.defineProperty(rn.prototype,"index"),V.defineProperty(rn.prototype,"length");const an="unhydrated",ln="hydrating",cn="hydrated";class dn extends Error{constructor(e,t,n,i){super(e),this.factory=t,this.fragment=n,this.templateString=i}}on=jt,d(class extends sn{get hydrationStage(){return this._hydrationStage}get targets(){return this._targets}get bindingViewBoundaries(){return this._bindingViewBoundaries}constructor(e,t,n,i){super(),this.firstChild=e,this.lastChild=t,this.sourceTemplate=n,this.hostBindingTarget=i,this[on]=jt,this.context=this,this.source=null,this.isBound=!1,this.sourceLifetime=_.unknown,this.unbindables=[],this.fragment=null,this.behaviors=null,this._hydrationStage=an,this._bindingViewBoundaries={},this._targets={},this.factories=n.compile().factories}insertBefore(e){if(null!==this.fragment)if(this.fragment.hasChildNodes())e.parentNode.insertBefore(this.fragment,e);else{const t=this.lastChild;if(e.previousSibling===t)return;const n=e.parentNode;let i,s=this.firstChild;for(;s!==t;)i=s.nextSibling,n.insertBefore(s,e),s=i;n.insertBefore(t,e)}}appendTo(e){null!==this.fragment&&e.appendChild(this.fragment)}remove(){const e=this.fragment||(this.fragment=document.createDocumentFragment()),t=this.lastChild;let n,i=this.firstChild;for(;i!==t;){if(n=i.nextSibling,!n)throw new Error(`Unmatched first/last child inside "${t.getRootNode().host.nodeName}".`);e.appendChild(i),i=n}e.appendChild(t)}bind(e,t=this){var n;if(this.hydrationStage!==cn&&(this._hydrationStage=ln),this.source===e)return;let i=this.behaviors;if(null===i){this.source=e,this.context=t;try{const{targets:e,boundaries:t}=function(e,t,n){var i,s;const r=Yt(e,t),o=r.commonAncestorContainer,a=document.createTreeWalker(o,NodeFilter.SHOW_ELEMENT+NodeFilter.SHOW_COMMENT+NodeFilter.SHOW_TEXT,{acceptNode:e=>0===r.comparePoint(e,0)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}),l={},c={};let d=function(e){let t=0;for(let n=0,i=e.length;n<i&&"h"===e[n].targetNodeId;++n)t++;return t}(n),h=a.currentNode=e;for(;null!==h;){switch(h.nodeType){case Node.ELEMENT_NODE:{const e=At.parseAttributeBindingCount(h);if(null!==e){for(let t=0;t<e;t++){const e=n[d++];if(!e)throw new Kt(`HydrationView was unable to successfully target factory on ${h.nodeName} inside ${h.getRootNode().host.nodeName}. This likely indicates a template mismatch between SSR rendering and hydration.`,n,h);tn(e,h,l)}h.removeAttribute(At.attributeMarkerName)}break}case Node.COMMENT_NODE:{const e=h.data;if("fe:e"===e)h.data="",en(a,n,h);else if("fe:b"===e){const e=n[d++];if(!e)throw new Kt(`HydrationView ran out of factories while processing a content binding marker inside ${null!==(s=null===(i=h.getRootNode().host)||void 0===i?void 0:i.nodeName)&&void 0!==s?s:"unknown"}. This likely indicates a template mismatch between SSR rendering and hydration.`,n,h);Zt(h,a,e,n,l,c)}break}}h=a.nextNode()}return r.detach(),{targets:l,boundaries:c}}(this.firstChild,this.lastChild,this.factories);this._targets=e,this._bindingViewBoundaries=t}catch(e){if(e instanceof Kt){let t=this.sourceTemplate.html;"string"!=typeof t&&(t=t.innerHTML),e.templateString=t}throw e}this.behaviors=i=new Array(this.factories.length);const s=this.factories;for(let e=0,t=s.length;e<t;++e){const t=s[e];if("h"===t.targetNodeId&&this.hostBindingTarget&&tn(t,this.hostBindingTarget,this._targets),!(t.targetNodeId in this.targets)){let e=this.sourceTemplate.html;"string"!=typeof e&&(e=e.innerHTML);const i=(null===(n=this.firstChild)||void 0===n?void 0:n.getRootNode()).host,s=t,r=[`HydrationView was unable to successfully target bindings inside "<${((null==i?void 0:i.nodeName)||"unknown").toLowerCase()}>".`,"\nMismatch Details:",` - Expected target node ID: "${t.targetNodeId}"`,` - Available target IDs: [${Object.keys(this.targets).join(", ")||"none"}]`];throw t.targetTagName&&r.push(` - Expected tag name: "${t.targetTagName}"`),s.sourceAspect&&r.push(` - Source aspect: "${s.sourceAspect}"`),void 0!==s.aspectType&&r.push(` - Aspect type: ${s.aspectType}`),r.push("\nThis usually means:"," 1. The server-rendered HTML doesn't match the client template"," 2. The hydration markers are missing or corrupted"," 3. The DOM structure was modified before hydration",`\nTemplate: ${e.slice(0,200)}${e.length>200?"...":""}`),new dn(r.join("\n"),t,Yt(this.firstChild,this.lastChild).cloneContents(),e)}{const n=t.createBehavior();n.bind(this),i[e]=n}}}else{null!==this.source&&this.evaluateUnbindables(),this.isBound=!1,this.source=e,this.context=t;for(let e=0,t=i.length;e<t;++e)i[e].bind(this)}this.isBound=!0,this._hydrationStage=cn}unbind(){this.isBound&&null!==this.source&&(this.evaluateUnbindables(),this.source=null,this.context=this,this.isBound=!1)}dispose(){nn(this.firstChild,this.lastChild),this.unbind()}onUnbind(e){this.unbindables.push(e)}evaluateUnbindables(){const e=this.unbindables;for(let t=0,n=e.length;t<n;++t)e[t].unbind(this);e.length=0}});const hn=Object.freeze({positioning:!1,recycle:!0});function un(e,t,n,i){e.context.parent=i.source,e.context.parentContext=i.context,e.bind(t[n])}function pn(e,t,n,i){e.context.parent=i.source,e.context.parentContext=i.context,e.context.length=t.length,e.context.index=n,e.bind(t[n])}function fn(e){return e.nodeType===Node.COMMENT_NODE}class gn extends Error{constructor(e,t){super(e),this.propertyBag=t}}class bn{constructor(e){this.directive=e,this.items=null,this.itemsObserver=null,this.bindView=un,this.views=[],this.itemsBindingObserver=e.dataBinding.createObserver(this,e),this.templateBindingObserver=e.templateBinding.createObserver(this,e),e.options.positioning&&(this.bindView=pn)}bind(e){this.location=e.targets[this.directive.targetNodeId],this.controller=e,this.items=this.itemsBindingObserver.bind(e),this.template=this.templateBindingObserver.bind(e),this.observeItems(!0),Mt(this.template)&&Mt(e)&&e.hydrationStage!==cn?this.hydrateViews(this.template):this.refreshAllViews(),e.onUnbind(this)}unbind(){null!==this.itemsObserver&&this.itemsObserver.unsubscribe(this),this.unbindAllViews()}handleChange(e,t){if(t===this.itemsBindingObserver)this.items=this.itemsBindingObserver.bind(this.controller),this.observeItems(),this.refreshAllViews();else if(t===this.templateBindingObserver)this.template=this.templateBindingObserver.bind(this.controller),this.refreshAllViews(!0);else{if(!t[0])return;t[0].reset?this.refreshAllViews():t[0].sorted?this.updateSortedViews(t):this.updateSplicedViews(t)}}observeItems(e=!1){if(!this.items)return void(this.items=a);const t=this.itemsObserver,n=this.itemsObserver=V.getNotifier(this.items),i=t!==n;i&&null!==t&&t.unsubscribe(this),(i||e)&&n.subscribe(this)}updateSortedViews(e){const t=this.views;for(let n=0,i=e.length;n<i;++n){const i=e[n].sorted.slice(),s=i.slice().sort();for(let e=0,n=i.length;e<n;++e){const n=i.find(t=>i[e]===s[t]);if(n!==e){const i=s.splice(n,1);s.splice(e,0,...i);const r=t[e],o=r?r.firstChild:this.location;t[n].remove(),t[n].insertBefore(o);const a=t.splice(n,1);t.splice(e,0,...a)}}}}updateSplicedViews(e){const t=this.views,n=this.bindView,i=this.items,s=this.template,r=this.controller,o=this.directive.options.recycle,a=[];let l=0,c=0;for(let d=0,h=e.length;d<h;++d){const h=e[d],u=h.removed;let p=0,f=h.index;const g=f+h.addedCount,b=t.splice(h.index,u.length),v=c=a.length+b.length;for(;f<g;++f){const e=t[f],d=e?e.firstChild:this.location;let h;o&&c>0?(p<=v&&b.length>0?(h=b[p],p++):(h=a[l],l++),c--):h=s.create(),t.splice(f,0,h),n(h,i,f,r),h.insertBefore(d)}b[p]&&a.push(...b.slice(p))}for(let e=l,t=a.length;e<t;++e)a[e].dispose();if(this.directive.options.positioning)for(let e=0,n=t.length;e<n;++e){const i=t[e].context;i.length=n,i.index=e}}refreshAllViews(e=!1){const t=this.items,n=this.template,i=this.location,s=this.bindView,r=this.controller;let o=t.length,a=this.views,l=a.length;if(0!==o&&!e&&this.directive.options.recycle||(rn.disposeContiguousBatch(a),l=0),0===l){this.views=a=new Array(o);for(let e=0;e<o;++e){const o=n.create();s(o,t,e,r),a[e]=o,o.insertBefore(i)}}else{let e=0;for(;e<o;++e)if(e<l){const i=a[e];if(!i){const t=new XMLSerializer;throw new gn(`View is null or undefined inside "${this.location.getRootNode().host.nodeName}".`,{index:e,hydrationStage:this.controller.hydrationStage,itemsLength:o,viewsState:a.map(e=>e?"hydrated":"empty"),viewTemplateString:t.serializeToString(n.create().fragment),rootNodeContent:t.serializeToString(this.location.getRootNode())})}s(i,t,e,r)}else{const o=n.create();s(o,t,e,r),a.push(o),o.insertBefore(i)}const c=a.splice(e,l-e);for(e=0,o=c.length;e<o;++e)c[e].dispose()}}unbindAllViews(){const e=this.views;for(let t=0,n=e.length;t<n;++t){const n=e[t];if(!n){const n=new XMLSerializer;throw new gn(`View is null or undefined inside "${this.location.getRootNode().host.nodeName}".`,{index:t,hydrationStage:this.controller.hydrationStage,viewsState:e.map(e=>e?"hydrated":"empty"),rootNodeContent:n.serializeToString(this.location.getRootNode())})}n.unbind()}}hydrateViews(e){if(!this.items)return;const t=this.items.length;this.views=new Array(t);const n=[];let i=this.location.previousSibling;for(;null!==i;){if(!fn(i)||"fe:/r"!==i.data){i=i.previousSibling;continue}i.data="";const e=i.previousSibling;if(!e)throw new Error(`Error when hydrating inside "${this.location.getRootNode().host.nodeName}": end should never be null.`);let t=e,s=0;for(;null!==t;){if(fn(t))if("fe:/r"===t.data)s++;else if("fe:r"===t.data){if(0===s){const s=t;s.data="",i=s.previousSibling;const r=s.nextSibling,o=e===s?r:e;n.push({start:r,end:o});break}s--}t=t.previousSibling}if(!t)throw new Error(`Error when hydrating inside "${this.location.getRootNode().host.nodeName}": repeat start marker not found.`)}n.reverse();for(let i=0;i<n.length&&i<t;i++){const{start:t,end:s}=n[i],r=e.hydrate(t,s);this.views[i]=r,this.bindView(r,this.items,i,this.controller)}}}class vn{createHTML(e){return gt.comment(e(this))}constructor(e,t,n){this.dataBinding=e,this.templateBinding=t,this.options=n,qt.enable()}createBehavior(){return new bn(this)}}function mn(e,t,n=hn){const i=se(e),s=se(t);return new vn(i,s,Object.assign(Object.assign({},hn),n))}mt.define(vn);const yn="slotchange";class wn extends Ot{observe(e){e.addEventListener(yn,this)}disconnect(e){e.removeEventListener(yn,this)}getNodes(e){return e.assignedNodes(this.options)}handleEvent(e){const t=e.currentTarget;this.updateTarget(this.getSource(t),this.computeNodes(t))}}function Cn(e){return n(e)&&(e={property:e}),new wn(e)}mt.define(wn);const Sn=()=>null;function On(e){return void 0===e?Sn:t(e)?e:()=>e}function Tn(e,n,i){const s=t(e)?e:()=>e,r=On(n),o=On(i);return(e,t)=>s(e,t)?r(e,t):o(e,t)}const xn="$fast_context",Nn="$fast_parent_contexts",Bn="$defs",kn="$ref",An=new Map;class jn{constructor(e){this.customElementName=e,this.schemaMap=new Map,An.set(e,this.schemaMap)}addPath(e){var t,n,i;const s=this.getSplitPath(e.pathConfig.path);let r=this.schemaMap.get(e.rootPropertyName),o=null;switch(r||(this.addNewSchema(e.rootPropertyName),r=this.schemaMap.get(e.rootPropertyName)),e.childrenMap&&(o=this.getSchemaId(e.childrenMap.customElementName,e.childrenMap.attributeName),1===s.length&&(r.anyOf?r.anyOf.push({[kn]:o}):r.anyOf=[{[kn]:o}])),e.pathConfig.type){case"default":case"access":s.length>1&&(null===e.pathConfig.currentContext?this.addPropertiesToAnObject(r,s.slice(1),e.pathConfig.currentContext,o):((null===(t=r[Bn])||void 0===t?void 0:t[s[0]])||(r[Bn]=Object.assign(Object.assign({},r[Bn]),{[s[0]]:{}})),this.addPropertiesToAContext(r[Bn][s[0]],s.slice(1),e.pathConfig.currentContext,o)));break;case"repeat":if(this.addContext(r,s[s.length-1],e.pathConfig.currentContext,e.pathConfig.parentContext),s.length>2){let t=r;const i=!!e.pathConfig.parentContext;i&&(t=this.addPropertiesToAnObject(null===(n=r[Bn])||void 0===n?void 0:n[e.pathConfig.parentContext],s.slice(1,-1),e.pathConfig.parentContext,o)),this.addPropertiesToAnObject(t,i?s.slice(2):s.slice(1),e.pathConfig.currentContext,o,"array")}else if(s.length>1){let t;e.pathConfig.parentContext&&(t=null===(i=null==r?void 0:r[Bn])||void 0===i?void 0:i[e.pathConfig.parentContext]),this.addPropertiesToAnObject(null!=t?t:r,s.slice(1),e.pathConfig.currentContext,o,"array")}else r.type="array",r[kn]=this.getDefsPath(e.pathConfig.currentContext)}}getSchema(e){var t;return null!==(t=this.schemaMap.get(e))&&void 0!==t?t:null}getRootProperties(){return this.schemaMap.keys()}getSplitPath(e){return e.split(".")}getDefsPath(e){return`#/${Bn}/${e}`}getSchemaId(e,t){return`https://fast.design/schemas/${e}/${t}.json`}addNewSchema(e){this.schemaMap.set(e,{$schema:"https://json-schema.org/draft/2019-09/schema",$id:this.getSchemaId(this.customElementName,e),[Bn]:{}})}addPropertiesToAContext(e,t,n,i){e.type="object",e.properties&&!e.properties[t[0]]?e.properties[t[0]]={}:e.properties||(e.properties={[t[0]]:{}}),t.length>1?this.addPropertiesToAnObject(e.properties[t[0]],t.slice(1),n,i):i&&(e.properties[t[0]].anyOf?e.properties[t[0]].anyOf.push({[kn]:i}):e.properties[t[0]].anyOf=[{[kn]:i}])}addPropertiesToAnObject(e,t,n,i,s="object"){return e.type="object",e.properties&&!e.properties[t[0]]?e.properties[t[0]]={}:e.properties||(e.properties={[t[0]]:{}}),"object"===s&&t.length>1?this.addPropertiesToAnObject(e.properties[t[0]],t.slice(1),n,i,s):"array"===s?t.length>1?this.addPropertiesToAnObject(e.properties[t[0]],t.slice(1),n,i,s):this.addArrayToAnObject(e.properties[t[0]],n):(e.properties[t[0]].anyOf&&i?e.properties[t[0]].anyOf.push({[kn]:i}):i&&(e.properties[t[0]].anyOf=[{[kn]:i}]),e.properties[t[0]])}addArrayToAnObject(e,t){return e.type="array",e.items={[kn]:this.getDefsPath(t)},e.items}addContext(e,t,n,i){e[Bn][n]||(e[Bn][n]={[xn]:t,[Nn]:this.getParentContexts(e,i)})}getParentContexts(e,t,n=[]){var i;if(null===t)return[null,...n];const s=null===(i=null==e?void 0:e[Bn])||void 0===i?void 0:i[t][Nn];return this.getParentContexts(e,s[s.length-1],[t,...n])}}function Mn(e,t,n,i,s){if(function(e,t){return null!=e&&"object"==typeof e&&!t.has(e)}(e,s))if(s.add(e),Array.isArray(e)){n.visitArray(e,i);for(const r of e)Mn(r,t,n,i,s)}else{n.visitObject(e,i);for(const r in e){const o=e[r];n.visitProperty(e,r,o,i),t&&Mn(o,t,n,i,s)}}}const En=new WeakSet,$n={visitObject:i,visitArray:i,visitProperty(e,t,n){Reflect.defineProperty(e,t,{enumerable:!0,get:()=>(V.track(e,t),n),set(i){n!==i&&(n=i,V.notify(e,t))}})}};function Pn(e,t=!1){return Mn(e,t,$n,void 0,En),e}const Rn={deep:!1};function In(e,t=Rn){var i;n(t)&&(t={deep:!1,name:t});const s=Pn({value:e},t.deep),r=()=>s.value;return Object.defineProperty(r,"current",{get:()=>s.value,set:e=>s.value=e}),Object.defineProperty(r,"name",{value:null!==(i=t.name)&&void 0!==i?i:"SharedState"}),r.set=e=>s.value=e,r.asReadonly=()=>{const e=()=>s.value;return Object.defineProperty(e,"current",{get:()=>s.value}),Object.defineProperty(e,"name",{value:`${r.name} (Readonly)`}),Object.freeze(e)},r}function _n(e,i=Rn){var s;if(n(i)&&(i={deep:!1,name:i}),!t(e)){const t=e;e=()=>t}const r=new WeakMap,o=t=>{let n=r.get(t);return void 0===n&&(n=Pn({value:e()},i.deep),r.set(t,n)),n},a=e=>o(e).value;return Object.defineProperty(a,"name",{value:null!==(s=i.name)&&void 0!==s?s:"OwnedState"}),a.set=(e,t)=>o(e).value=t,a.asReadonly=()=>{const e=e=>o(e).value;return Object.defineProperty(e,"name",{value:`${a.name} (Readonly)`}),Object.freeze(e)},a}function Vn(e,t="ComputedState"){let n=null;const i=e({on:{setup(e){n=e}}}),s=Pn({value:null},!1),r=()=>s.value;let o;Object.defineProperty(r,"current",{get:()=>s.value}),Object.defineProperty(r,"name",{value:t});const a={handleChange(){s.value=o.observe(null)}};let l,c;if(o=V.binding(i,a),o.setMode(!1),n){const e={handleChange(){l&&l(),l=c.observe(null),s.value=i()}};c=V.binding(n,e),c.setMode(!1),l=c.observe(null)}return s.value=o.observe(null),r.dispose=()=>{l&&l(),c&&c.dispose(),o.dispose()},r.subscribe=e=>{o.subscribe(e)},r.unsubscribe=e=>{o.unsubscribe(e)},r}function Ln(e,t){const n=V.getNotifier(e);n.subscribe(t.subscriber),t.notifiers.push(n)}const Dn={visitProperty:i,visitObject:Ln,visitArray:Ln};function Hn(e,n){const i={notifiers:[],subscriber:t(n)?{handleChange:n}:n};return qt.enable(),Mn(e,!0,Dn,i,new Set),{dispose(){for(const e of i.notifiers)e.unsubscribe(i.subscriber)}}}const zn=l(),Fn=Object.freeze({getForInstance:zn.getForInstance,getByType:zn.getByType,define:e=>(zn.register({type:e}),e)});function Un(){return function(e){Fn.define(e)}}function Wn(e,t){const n=[];let i="";for(let s=0,r=e.length-1;s<r;++s){i+=e[s];let r=t[s];void 0!==Fn.getForInstance(r)&&(r=r.createCSS()),r instanceof me||r instanceof CSSStyleSheet?(""!==i.trim()&&(n.push(i),i=""),n.push(r)):i+=r}return i+=e[e.length-1],""!==i.trim()&&n.push(i),n}const qn=(e,...t)=>new me(Wn(e,t));class Qn{constructor(e){this.value=0===e.length?"":1===e.length?e[0]:new me(e)}createCSS(){return this.value}}Fn.define(Qn),qn.partial=(e,...t)=>new Qn(Wn(e,t));const Jn={[h.attribute]:b.setAttribute,[h.booleanAttribute]:b.setBooleanAttribute,[h.property]:(e,t,n)=>e[t]=n,[h.content]:function(e,t,n,i){if(null==n&&(n=""),function(e){return void 0!==e.create}(n)){e.textContent="";let t=e.$fastView;if(void 0===t)if(Mt(i)&&Mt(n)&&void 0!==i.bindingViewBoundaries[this.targetNodeId]&&i.hydrationStage!==cn){const e=i.bindingViewBoundaries[this.targetNodeId];t=n.hydrate(e.first,e.last)}else t=n.create();else e.$fastTemplate!==n&&(t.isComposed&&(t.remove(),t.unbind()),t=n.create());t.isComposed?t.needsBindOnly&&(t.needsBindOnly=!1,t.bind(i.source,i.context)):(t.isComposed=!0,t.bind(i.source,i.context),t.insertBefore(e),e.$fastView=t,e.$fastTemplate=n)}else{const t=e.$fastView;void 0!==t&&t.isComposed&&(t.isComposed=!1,t.remove(),t.needsBindOnly?t.needsBindOnly=!1:t.unbind()),e.textContent=n}},[h.tokenList]:function(e,t,n){var i;const s=`${this.id}-t`,r=null!==(i=e[s])&&void 0!==i?i:e[s]={v:0,cv:Object.create(null)},o=r.cv;let a=r.v;const l=e[t];if(null!=n&&n.length){const e=n.split(/\s+/);for(let t=0,n=e.length;t<n;++t){const n=e[t];""!==n&&(o[n]=a,l.add(n))}}if(r.v=a+1,0!==a){a-=1;for(const e in o)o[e]===a&&l.remove(e)}},[h.event]:()=>{}};class Kn{constructor(e){this.dataBinding=e,this.updateTarget=null,this.aspectType=h.content}createHTML(e){return gt.interpolation(e(this))}createBehavior(){var t;if(null===this.updateTarget){const n=Jn[this.aspectType],i=null!==(t=this.dataBinding.policy)&&void 0!==t?t:this.policy;if(!n)throw r.error(e.unsupportedBindingBehavior);this.data=`${this.id}-d`,this.updateTarget=i.protect(this.targetTagName,this.aspectType,this.targetAspect,n)}return this}bind(e){var t;const n=e.targets[this.targetNodeId];switch(this.aspectType){case h.event:n[this.data]=e,n.addEventListener(this.targetAspect,this,this.dataBinding.options);break;case h.content:e.onUnbind(this);default:{const i=null!==(t=n[this.data])&&void 0!==t?t:n[this.data]=this.dataBinding.createObserver(this,this);i.target=n,i.controller=e;const s=i.bind(e);if(e._skipAttrUpdates&&(this.aspectType===h.attribute||this.aspectType===h.booleanAttribute))break;this.updateTarget(n,this.targetAspect,s,e);break}}}unbind(e){const t=e.targets[this.targetNodeId].$fastView;void 0!==t&&t.isComposed&&(t.unbind(),t.needsBindOnly=!0)}handleEvent(e){const t=e.currentTarget[this.data];if(t.isBound){z.setEvent(e);const n=this.dataBinding.evaluate(t.source,t.context);z.setEvent(null),!0!==n&&e.preventDefault()}}handleChange(e,t){const n=t.controller;if(!n.isBound)return;const i=t.target;this.updateTarget(i,this.targetAspect,t.bind(n),n)}}mt.define(Kn,{aspected:!0});const Xn=(e,t)=>`${e}.${t}`,Gn={},Yn={index:0,node:null};function Zn(t){t.startsWith("fast-")||r.warn(e.hostBindingWithoutHost,{name:t})}const ei=new Proxy(document.createElement("div"),{get(e,n){Zn(n);const i=Reflect.get(e,n);return t(i)?i.bind(e):i},set:(e,t,n)=>(Zn(t),Reflect.set(e,t,n))});class ti{constructor(e,t,n){this.fragment=e,this.directives=t,this.policy=n,this.proto=null,this.nodeIds=new Set,this.descriptors={},this.factories=[]}addFactory(e,t,n,i,s){var r,o;this.nodeIds.has(n)||(this.nodeIds.add(n),this.addTargetDescriptor(t,n,i)),e.id=null!==(r=e.id)&&void 0!==r?r:ft(),e.targetNodeId=n,e.targetTagName=s,e.policy=null!==(o=e.policy)&&void 0!==o?o:this.policy,this.factories.push(e)}freeze(){return this.proto=Object.create(null,this.descriptors),this}addTargetDescriptor(e,t,n){const i=this.descriptors;if("r"===t||"h"===t||i[t])return;if(!i[e]){const t=e.lastIndexOf("."),n=e.substring(0,t),i=parseInt(e.substring(t+1),10);this.addTargetDescriptor(n,e,i)}let s=Gn[t];if(!s){const i=`_${t}`;Gn[t]=s={get(){var t;return null!==(t=this[i])&&void 0!==t?t:this[i]=this[e].childNodes[n]}}}i[t]=s}createView(e){const t=this.fragment.cloneNode(!0),n=Object.create(this.proto);n.r=t,n.h=null!=e?e:ei;for(const e of this.nodeIds)Reflect.get(n,e);return new rn(t,this.factories,n)}}function ni(e,t,n,i,s,r=!1){const o=n.attributes,a=e.directives;for(let l=0,c=o.length;l<c;++l){const d=o[l],h=d.value,u=bt.parse(h,a);let p=null;null===u?r&&(p=new Kn(ee(()=>h,e.policy)),mt.assignAspect(p,d.name)):p=oi.aggregate(u,e.policy),null!==p&&(n.removeAttributeNode(d),l--,c--,e.addFactory(p,t,i,s,n.tagName))}}function ii(e,t,n){let i=0,s=t.firstChild;for(;s;){const t=si(e,n,s,i);s=t.node,i=t.index}}function si(e,t,i,s){const r=Xn(t,s);switch(i.nodeType){case 1:ni(e,t,i,r,s),ii(e,i,r);break;case 3:return function(e,t,i,s,r){const o=bt.parse(t.textContent,e.directives);if(null===o)return Yn.node=t.nextSibling,Yn.index=r+1,Yn;let a,l=a=t;for(let t=0,c=o.length;t<c;++t){const c=o[t];0!==t&&(r++,s=Xn(i,r),a=l.parentNode.insertBefore(document.createTextNode(""),l.nextSibling)),n(c)?a.textContent=c:(a.textContent=" ",mt.assignAspect(c),e.addFactory(c,i,s,r,null)),l=a}return Yn.index=r+1,Yn.node=l.nextSibling,Yn}(e,i,t,r,s);case 8:{const n=bt.parse(i.data,e.directives);null!==n&&e.addFactory(oi.aggregate(n),t,r,s,null);break}}return Yn.index=s+1,Yn.node=i.nextSibling,Yn}const ri="TEMPLATE",oi={compile(e,t,i=b.policy){let s;if(n(e)){s=document.createElement(ri),s.innerHTML=i.createHTML(e);const t=s.content.firstElementChild;null!==t&&t.tagName===ri&&(s=t)}else s=e;s.content.firstChild||s.content.lastChild||s.content.appendChild(document.createComment(""));const r=document.adoptNode(s.content),o=new ti(r,t,i);var a,l;return ni(o,"",s,"h",0,!0),a=r.firstChild,l=t,(a&&8===a.nodeType&&null!==bt.parse(a.data,l)||1===r.childNodes.length&&Object.keys(t).length>0)&&r.insertBefore(document.createComment(""),r.firstChild),ii(o,r,"r"),Yn.node=null,o.freeze()},setDefaultStrategy(e){this.compile=e},aggregate(e,t=b.policy){if(1===e.length)return e[0];let i,s,r=!1;const o=e.length,a=e.map(e=>n(e)?()=>e:(i=e.sourceAspect||i,r=r||e.dataBinding.isVolatile,s=s||e.dataBinding.policy,e.dataBinding.evaluate)),l=new Kn(ne((e,t)=>{let n="";for(let i=0;i<o;++i)n+=a[i](e,t);return n},null!=s?s:t,r));return mt.assignAspect(l,i),l}},ai=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/,li=Object.create(null);class ci{constructor(e,t=li){this.html=e,this.factories=t}createHTML(e){const t=this.factories;for(const n in t)e(t[n]);return this.html}}function di(e,t,n,i=mt.getForInstance(e)){if(i.aspected){const n=ai.exec(t);null!==n&&mt.assignAspect(e,n[2])}return e.createHTML(n)}ci.empty=new ci(""),mt.define(ci);class hi{constructor(e,t={},n){this.policy=n,this.result=null,this.html=e,this.factories=t}compile(){return null===this.result&&(this.result=oi.compile(this.html,this.factories,this.policy)),this.result}inline(){return new ci(n(this.html)?this.html:this.html.innerHTML,this.factories)}withPolicy(t){if(this.result)throw r.error(e.cannotSetTemplatePolicyAfterCompilation);if(this.policy)throw r.error(e.onlySetTemplatePolicyOnce);return this.policy=t,this}render(e,t,n){const i=this.create(n);return i.bind(e),i.appendTo(t),i}create(e){return this.compile().createView(e)}static create(e,n,i){let s="";const r=Object.create(null),o=e=>{var t;const n=null!==(t=e.id)&&void 0!==t?t:e.id=ft();return r[n]=e,n};for(let i=0,r=e.length-1;i<r;++i){const r=e[i];let a,l=n[i];if(s+=r,t(l))l=new Kn(ne(l));else if(l instanceof Y)l=new Kn(l);else if(!(a=mt.getForInstance(l))){const e=l;l=new Kn(ee(()=>e))}s+=di(l,r,o,a)}return new hi(s+e[e.length-1],r,i)}}d(hi);const ui=(t,...n)=>{if(Array.isArray(t)&&Array.isArray(t.raw))return hi.create(t,n);throw r.error(e.directCallToHTMLTagNotAllowed)};ui.partial=e=>new ci(e);class pi{constructor(e){this.directive=e,this.location=null,this.controller=null,this.view=null,this.data=null,this.dataBindingObserver=e.dataBinding.createObserver(this,e),this.templateBindingObserver=e.templateBinding.createObserver(this,e)}bind(e){if(this.location=e.targets[this.directive.targetNodeId],this.controller=e,this.data=this.dataBindingObserver.bind(e),this.template=this.templateBindingObserver.bind(e),e.onUnbind(this),Mt(this.template)&&Mt(e)&&e.hydrationStage!==cn&&!this.view){const t=e.bindingViewBoundaries[this.directive.targetNodeId];t&&(this.view=this.template.hydrate(t.first,t.last),this.bindView(this.view))}else this.refreshView()}unbind(e){const t=this.view;null!==t&&t.isComposed&&(t.unbind(),t.needsBindOnly=!0)}handleChange(e,t){this.controller.isBound&&(t===this.dataBindingObserver&&(this.data=this.dataBindingObserver.bind(this.controller)),(this.directive.templateBindingDependsOnData||t===this.templateBindingObserver)&&(this.template=this.templateBindingObserver.bind(this.controller)),this.refreshView())}bindView(e){e.isComposed?e.needsBindOnly&&(e.needsBindOnly=!1,e.bind(this.data)):(e.isComposed=!0,e.bind(this.data),e.insertBefore(this.location),e.$fastTemplate=this.template)}refreshView(){let e=this.view;const t=this.template;null===e?(this.view=e=t.create(),this.view.context.parent=this.controller.source,this.view.context.parentContext=this.controller.context):e.$fastTemplate!==t&&(e.isComposed&&(e.remove(),e.unbind()),this.view=e=t.create(),this.view.context.parent=this.controller.source,this.view.context.parentContext=this.controller.context),this.bindView(e)}}class fi{constructor(e,t,n){this.dataBinding=e,this.templateBinding=t,this.templateBindingDependsOnData=n}createHTML(e){return gt.comment(e(this))}createBehavior(){return new pi(this)}}mt.define(fi);const gi=new Map,bi=ui`
|
|
2
2
|
|
|
3
|
-
`;function ts(e){return void 0===e?es:e.template}function ss(e,t){if(e)return function(e,t){const s=Yt.get(e);if(void 0!==s)return s[null!=t?t:Zt]}(e.constructor,t)}class is{constructor(e){this.node=e,e.$fastTemplate=this}get context(){return this}bind(e){}unbind(){}insertBefore(e){e.parentNode.insertBefore(this.node,e)}remove(){this.node.parentNode.removeChild(this.node)}create(){return this}hydrate(e,t){return this}}function ns(e,t){let s,i;s=void 0===e?ne((e=>e)):re(e);let o=!1;if(void 0===t)o=!0,i=ne(((e,t)=>{var i;const n=s.evaluate(e,t);return n instanceof Node?null!==(i=n.$fastTemplate)&&void 0!==i?i:new is(n):ts(ss(n))}));else if(n(t))i=te(((e,i)=>{var n;let o=t(e,i);return r(o)?o=ts(ss(s.evaluate(e,i),o)):o instanceof Node&&(o=null!==(n=o.$fastTemplate)&&void 0!==n?n:new is(o)),o}),void 0,!0);else if(r(t))o=!0,i=ne(((e,i)=>{var n;const r=s.evaluate(e,i);return r instanceof Node?null!==(n=r.$fastTemplate)&&void 0!==n?n:new is(r):ts(ss(r,t))}));else if(t instanceof Z){const e=t.evaluate;t.evaluate=(t,i)=>{var n;let o=e(t,i);return r(o)?o=ts(ss(s.evaluate(t,i),o)):o instanceof Node&&(o=null!==(n=o.$fastTemplate)&&void 0!==n?n:new is(o)),o},i=t}else i=ne(((e,s)=>t));return new Gt(s,i,o)}const rs=Object.freeze({positioning:!1,recycle:!0});function os(e,t,s,i){e.context.parent=i.source,e.context.parentContext=i.context,e.bind(t[s])}function as(e,t,s,i){e.context.parent=i.source,e.context.parentContext=i.context,e.context.length=t.length,e.context.index=s,e.bind(t[s])}function ls(e){return e.nodeType===Node.COMMENT_NODE}class cs extends Error{constructor(e,t){super(e),this.propertyBag=t}}class ds{constructor(e){this.directive=e,this.items=null,this.itemsObserver=null,this.bindView=os,this.views=[],this.itemsBindingObserver=e.dataBinding.createObserver(this,e),this.templateBindingObserver=e.templateBinding.createObserver(this,e),e.options.positioning&&(this.bindView=as)}bind(e){this.location=e.targets[this.directive.targetNodeId],this.controller=e,this.items=this.itemsBindingObserver.bind(e),this.template=this.templateBindingObserver.bind(e),this.observeItems(!0),Ke(this.template)&&Ke(e)&&e.hydrationStage!==dt?this.hydrateViews(this.template):this.refreshAllViews(),e.onUnbind(this)}unbind(){null!==this.itemsObserver&&this.itemsObserver.unsubscribe(this),this.unbindAllViews()}handleChange(e,t){if(t===this.itemsBindingObserver)this.items=this.itemsBindingObserver.bind(this.controller),this.observeItems(),this.refreshAllViews();else if(t===this.templateBindingObserver)this.template=this.templateBindingObserver.bind(this.controller),this.refreshAllViews(!0);else{if(!t[0])return;t[0].reset?this.refreshAllViews():t[0].sorted?this.updateSortedViews(t):this.updateSplicedViews(t)}}observeItems(e=!1){if(!this.items)return void(this.items=c);const t=this.itemsObserver,s=this.itemsObserver=M.getNotifier(this.items),i=t!==s;i&&null!==t&&t.unsubscribe(this),(i||e)&&s.subscribe(this)}updateSortedViews(e){const t=this.views;for(let s=0,i=e.length;s<i;++s){const i=e[s].sorted.slice(),n=i.slice().sort();for(let e=0,s=i.length;e<s;++e){const s=i.find((t=>i[e]===n[t]));if(s!==e){const i=n.splice(s,1);n.splice(e,0,...i);const r=t[e],o=r?r.firstChild:this.location;t[s].remove(),t[s].insertBefore(o);const a=t.splice(s,1);t.splice(e,0,...a)}}}}updateSplicedViews(e){const t=this.views,s=this.bindView,i=this.items,n=this.template,r=this.controller,o=this.directive.options.recycle,a=[];let l=0,c=0;for(let d=0,h=e.length;d<h;++d){const h=e[d],u=h.removed;let f=0,p=h.index;const g=p+h.addedCount,b=t.splice(h.index,u.length),v=c=a.length+b.length;for(;p<g;++p){const e=t[p],d=e?e.firstChild:this.location;let h;o&&c>0?(f<=v&&b.length>0?(h=b[f],f++):(h=a[l],l++),c--):h=n.create(),t.splice(p,0,h),s(h,i,p,r),h.insertBefore(d)}b[f]&&a.push(...b.slice(f))}for(let e=l,t=a.length;e<t;++e)a[e].dispose();if(this.directive.options.positioning)for(let e=0,s=t.length;e<s;++e){const i=t[e].context;i.length=s,i.index=e}}refreshAllViews(e=!1){const t=this.items,s=this.template,i=this.location,n=this.bindView,r=this.controller;let o=t.length,a=this.views,l=a.length;if(0!==o&&!e&&this.directive.options.recycle||(at.disposeContiguousBatch(a),l=0),0===l){this.views=a=new Array(o);for(let e=0;e<o;++e){const o=s.create();n(o,t,e,r),a[e]=o,o.insertBefore(i)}}else{let e=0;for(;e<o;++e)if(e<l){const i=a[e];if(!i){const t=new XMLSerializer;throw new cs(`View is null or undefined inside "${this.location.getRootNode().host.nodeName}".`,{index:e,hydrationStage:this.controller.hydrationStage,itemsLength:o,viewsState:a.map((e=>e?"hydrated":"empty")),viewTemplateString:t.serializeToString(s.create().fragment),rootNodeContent:t.serializeToString(this.location.getRootNode())})}n(i,t,e,r)}else{const o=s.create();n(o,t,e,r),a.push(o),o.insertBefore(i)}const c=a.splice(e,l-e);for(e=0,o=c.length;e<o;++e)c[e].dispose()}}unbindAllViews(){const e=this.views;for(let t=0,s=e.length;t<s;++t){const s=e[t];if(!s){const s=new XMLSerializer;throw new cs(`View is null or undefined inside "${this.location.getRootNode().host.nodeName}".`,{index:t,hydrationStage:this.controller.hydrationStage,viewsState:e.map((e=>e?"hydrated":"empty")),rootNodeContent:s.serializeToString(this.location.getRootNode())})}s.unbind()}}hydrateViews(e){if(!this.items)return;this.views=new Array(this.items.length);let t=this.location.previousSibling;for(;null!==t;){if(!ls(t)){t=t.previousSibling;continue}const s=qe.parseRepeatEndMarker(t.data);if(null===s){t=t.previousSibling;continue}t.data="";const i=t.previousSibling;if(!i)throw new Error(`Error when hydrating inside "${this.location.getRootNode().host.nodeName}": end should never be null.`);let n=i,r=0;for(;null!==n;){if(ls(n))if(qe.isRepeatViewEndMarker(n.data))r++;else if(qe.isRepeatViewStartMarker(n.data)){if(!r){if(qe.parseRepeatStartMarker(n.data)!==s)throw new Error(`Error when hydrating inside "${this.location.getRootNode().host.nodeName}": Mismatched start and end markers.`);n.data="",t=n.previousSibling,n=n.nextSibling;const r=e.hydrate(n,i);this.views[s]=r,this.bindView(r,this.items,s,this.controller);break}r--}n=n.previousSibling}if(!n)throw new Error(`Error when hydrating inside "${this.location.getRootNode().host.nodeName}": start should never be null.`)}}}class hs{createHTML(e){return Be.comment(e(this))}constructor(e,t,s){this.dataBinding=e,this.templateBinding=t,this.options=s,X.enable()}createBehavior(){return new ds(this)}}function us(e,t,s=rs){const i=re(e),n=re(t);return new hs(i,n,Object.assign(Object.assign({},rs),s))}ke.define(hs);const fs="slotchange";class ps extends Re{observe(e){e.addEventListener(fs,this)}disconnect(e){e.removeEventListener(fs,this)}getNodes(e){return e.assignedNodes(this.options)}handleEvent(e){const t=e.currentTarget;this.updateTarget(this.getSource(t),this.computeNodes(t))}}function gs(e){return r(e)&&(e={property:e}),new ps(e)}ke.define(ps);const bs=()=>null;function vs(e){return void 0===e?bs:n(e)?e:()=>e}function ms(e,t,s){const i=n(e)?e:()=>e,r=vs(t),o=vs(s);return(e,t)=>i(e,t)?r(e,t):o(e,t)}class ys extends MutationObserver{constructor(e){super((function(e){this.callback.call(null,e.filter((e=>this.observedNodes.has(e.target))))})),this.callback=e,this.observedNodes=new Set}observe(e,t){this.observedNodes.add(e),super.observe(e,t)}unobserve(e){this.observedNodes.delete(e),this.observedNodes.size<1&&this.disconnect()}}const ws={bubbles:!0,composed:!0,cancelable:!0},Cs="isConnected",Ss=new WeakMap;function Ts(e){var t,s;return null!==(s=null!==(t=e.shadowRoot)&&void 0!==t?t:Ss.get(e))&&void 0!==s?s:null}let xs;var Os;!function(e){e[e.connecting=0]="connecting",e[e.connected=1]="connected",e[e.disconnecting=2]="disconnecting",e[e.disconnected=3]="disconnected"}(Os||(Os={}));class Bs extends k{get isConnected(){return M.track(this,Cs),this.stage===Os.connected}get context(){var e,t;return null!==(t=null===(e=this.view)||void 0===e?void 0:e.context)&&void 0!==t?t:V.default}get isBound(){var e,t;return null!==(t=null===(e=this.view)||void 0===e?void 0:e.isBound)&&void 0!==t&&t}get sourceLifetime(){var e;return null===(e=this.view)||void 0===e?void 0:e.sourceLifetime}get template(){var e;if(null===this._template){const t=this.definition;this.source.resolveTemplate?this._template=this.source.resolveTemplate():t.template&&(this._template=null!==(e=t.template)&&void 0!==e?e:null)}return this._template}set template(e){this._template!==e&&(this._template=e,this.needsInitialization||this.renderTemplate(e))}get shadowOptions(){return this._shadowRootOptions}set shadowOptions(e){if(void 0===this._shadowRootOptions&&void 0!==e){this._shadowRootOptions=e;let t=this.source.shadowRoot;t?this.hasExistingShadowRoot=!0:(t=this.source.attachShadow(e),"closed"===e.mode&&Ss.set(this.source,t))}}get mainStyles(){var e;if(null===this._mainStyles){const t=this.definition;this.source.resolveStyles?this._mainStyles=this.source.resolveStyles():t.styles&&(this._mainStyles=null!==(e=t.styles)&&void 0!==e?e:null)}return this._mainStyles}set mainStyles(e){this._mainStyles!==e&&(null!==this._mainStyles&&this.removeStyles(this._mainStyles),this._mainStyles=e,this.needsInitialization||this.addStyles(e))}constructor(e,t){super(e),this.boundObservables=null,this.needsInitialization=!0,this.hasExistingShadowRoot=!1,this._template=null,this.stage=Os.disconnected,this.guardBehaviorConnection=!1,this.behaviors=null,this.behaviorsConnected=!1,this._mainStyles=null,this.$fastController=this,this.view=null,this.source=e,this.definition=t,this.shadowOptions=t.shadowOptions;const s=M.getAccessors(e);if(s.length>0){const t=this.boundObservables=Object.create(null);for(let i=0,n=s.length;i<n;++i){const n=s[i].name,r=e[n];void 0!==r&&(delete e[n],t[n]=r)}}}onUnbind(e){var t;null===(t=this.view)||void 0===t||t.onUnbind(e)}addBehavior(e){var t,s;const i=null!==(t=this.behaviors)&&void 0!==t?t:this.behaviors=new Map,n=null!==(s=i.get(e))&&void 0!==s?s:0;0===n?(i.set(e,1),e.addedCallback&&e.addedCallback(this),!e.connectedCallback||this.guardBehaviorConnection||this.stage!==Os.connected&&this.stage!==Os.connecting||e.connectedCallback(this)):i.set(e,n+1)}removeBehavior(e,t=!1){const s=this.behaviors;if(null===s)return;const i=s.get(e);void 0!==i&&(1===i||t?(s.delete(e),e.disconnectedCallback&&this.stage!==Os.disconnected&&e.disconnectedCallback(this),e.removedCallback&&e.removedCallback(this)):s.set(e,i-1))}addStyles(e){var t;if(!e)return;const s=this.source;if(e instanceof HTMLElement){(null!==(t=Ts(s))&&void 0!==t?t:this.source).append(e)}else if(!e.isAttachedTo(s)){const t=e.behaviors;if(e.addStylesTo(s),null!==t)for(let e=0,s=t.length;e<s;++e)this.addBehavior(t[e])}}removeStyles(e){var t;if(!e)return;const s=this.source;if(e instanceof HTMLElement){(null!==(t=Ts(s))&&void 0!==t?t:s).removeChild(e)}else if(e.isAttachedTo(s)){const t=e.behaviors;if(e.removeStylesFrom(s),null!==t)for(let e=0,s=t.length;e<s;++e)this.removeBehavior(t[e])}}connect(){this.stage===Os.disconnected&&(this.stage=Os.connecting,this.bindObservables(),this.connectBehaviors(),this.needsInitialization?(this.renderTemplate(this.template),this.addStyles(this.mainStyles),this.needsInitialization=!1):null!==this.view&&this.view.bind(this.source),this.stage=Os.connected,M.notify(this,Cs))}bindObservables(){if(null!==this.boundObservables){const e=this.source,t=this.boundObservables,s=Object.keys(t);for(let i=0,n=s.length;i<n;++i){const n=s[i];e[n]=t[n]}this.boundObservables=null}}connectBehaviors(){if(!1===this.behaviorsConnected){const e=this.behaviors;if(null!==e){this.guardBehaviorConnection=!0;for(const t of e.keys())t.connectedCallback&&t.connectedCallback(this);this.guardBehaviorConnection=!1}this.behaviorsConnected=!0}}disconnectBehaviors(){if(!0===this.behaviorsConnected){const e=this.behaviors;if(null!==e)for(const t of e.keys())t.disconnectedCallback&&t.disconnectedCallback(this);this.behaviorsConnected=!1}}disconnect(){this.stage===Os.connected&&(this.stage=Os.disconnecting,M.notify(this,Cs),null!==this.view&&this.view.unbind(),this.disconnectBehaviors(),this.stage=Os.disconnected)}onAttributeChangedCallback(e,t,s){const i=this.definition.attributeLookup[e];void 0!==i&&i.onAttributeChangedCallback(this.source,s)}emit(e,t,s){return this.stage===Os.connected&&this.source.dispatchEvent(new CustomEvent(e,Object.assign(Object.assign({detail:t},ws),s)))}renderTemplate(e){var t;const s=this.source,i=null!==(t=Ts(s))&&void 0!==t?t:s;if(null!==this.view)this.view.dispose(),this.view=null;else if(!this.needsInitialization||this.hasExistingShadowRoot){this.hasExistingShadowRoot=!1;for(let e=i.firstChild;null!==e;e=i.firstChild)i.removeChild(e)}e&&(this.view=e.render(s,i,s),this.view.sourceLifetime=E.coupled)}static forCustomElement(e,t=!1){const s=e.$fastController;if(void 0!==s&&!t)return s;const n=Pt.getForInstance(e);if(void 0===n)throw l.error(i.missingElementDefinition);return M.getNotifier(n).subscribe({handleChange:()=>{Bs.forCustomElement(e,!0),e.$fastController.connect()}},"template"),M.getNotifier(n).subscribe({handleChange:()=>{Bs.forCustomElement(e,!0),e.$fastController.connect()}},"shadowOptions"),e.$fastController=new xs(e,n)}static setStrategy(e){xs=e}}function $s(e){var t;return"adoptedStyleSheets"in e?e:null!==(t=Ts(e))&&void 0!==t?t:e.getRootNode()}u(Bs),Bs.setStrategy(Bs);class Ns{constructor(e){const t=Ns.styleSheetCache;this.sheets=e.map((e=>{if(e instanceof CSSStyleSheet)return e;let s=t.get(e);return void 0===s&&(s=new CSSStyleSheet,s.replaceSync(e),t.set(e,s)),s}))}addStylesTo(e){Ms($s(e),this.sheets)}removeStylesFrom(e){Is($s(e),this.sheets)}}Ns.styleSheetCache=new Map;let ks=0;function As(e){return e===document?document.body:e}class Es{constructor(e){this.styles=e,this.styleClass="fast-"+ ++ks}addStylesTo(e){e=As($s(e));const t=this.styles,s=this.styleClass;for(let i=0;i<t.length;i++){const n=document.createElement("style");n.innerHTML=t[i],n.className=s,e.append(n)}}removeStylesFrom(e){const t=(e=As($s(e))).querySelectorAll(`.${this.styleClass}`);for(let s=0,i=t.length;s<i;++s)e.removeChild(t[s])}}let Ms=(e,t)=>{e.adoptedStyleSheets=[...e.adoptedStyleSheets,...t]},Is=(e,t)=>{e.adoptedStyleSheets=e.adoptedStyleSheets.filter((e=>-1===t.indexOf(e)))};if(fe.supportsAdoptedStyleSheets){try{document.adoptedStyleSheets.push(),document.adoptedStyleSheets.splice(),Ms=(e,t)=>{e.adoptedStyleSheets.push(...t)},Is=(e,t)=>{for(const s of t){const t=e.adoptedStyleSheets.indexOf(s);-1!==t&&e.adoptedStyleSheets.splice(t,1)}}}catch(e){}fe.setDefaultStrategy(Ns)}else fe.setDefaultStrategy(Es);const Rs="needs-hydration";class js extends Bs{get shadowOptions(){return super.shadowOptions}set shadowOptions(e){super.shadowOptions=e,(this.hasExistingShadowRoot||void 0!==e&&!this.template)&&this.definition.templateOptions===Dt.deferAndHydrate&&(this.source.toggleAttribute(Xe,!0),this.source.toggleAttribute(Rs,!0))}addHydratingInstance(){if(!js.hydratingInstances)return;const e=this.definition.name;let t=js.hydratingInstances.get(e);t||(t=new Set,js.hydratingInstances.set(e,t)),t.add(this.source)}static config(e){return js.lifecycleCallbacks=e,this}static hydrationObserverHandler(e){for(const t of e)t.target.hasAttribute(Xe)||(js.hydrationObserver.unobserve(t.target),t.target.$fastController.connect())}static checkHydrationComplete(e){var t,s,i;if(e.didTimeout)js.idleCallbackId=requestIdleCallback(js.checkHydrationComplete,{timeout:50});else if(0===(null===(t=js.hydratingInstances)||void 0===t?void 0:t.size)){try{null===(i=(s=js.lifecycleCallbacks).hydrationComplete)||void 0===i||i.call(s)}catch(e){}Bs.setStrategy(Bs)}}connect(){var e,t,s,i,n,r,o;if(this.needsHydration=null!==(e=this.needsHydration)&&void 0!==e?e:this.source.hasAttribute(Rs),this.needsHydration&&this.addHydratingInstance(),this.source.hasAttribute(Xe))return this.addHydratingInstance(),void js.hydrationObserver.observe(this.source,{attributeFilter:[Xe]});if(!this.needsHydration)return super.connect(),void this.removeHydratingInstance();if(this.stage===Os.disconnected){if(!js.hydrationStarted){js.hydrationStarted=!0;try{null===(s=(t=js.lifecycleCallbacks).hydrationStarted)||void 0===s||s.call(t)}catch(e){}}try{null===(n=(i=js.lifecycleCallbacks).elementWillHydrate)||void 0===n||n.call(i,this.source)}catch(e){}if(this.stage=Os.connecting,this.bindObservables(),this.connectBehaviors(),this.template)if(Ke(this.template)){const e=this.source,t=null!==(r=Ts(e))&&void 0!==r?r:e;let s=t.firstChild,i=t.lastChild;null===e.shadowRoot&&(qe.isElementBoundaryStartMarker(s)&&(s.data="",s=s.nextSibling),qe.isElementBoundaryEndMarker(i)&&(i.data="",i=i.previousSibling)),this.view=this.template.hydrate(s,i,e),null===(o=this.view)||void 0===o||o.bind(this.source)}else this.renderTemplate(this.template);this.addStyles(this.mainStyles),this.stage=Os.connected,this.source.removeAttribute(Rs),this.needsInitialization=this.needsHydration=!1,this.removeHydratingInstance(),M.notify(this,Cs)}}removeHydratingInstance(){var e,t;if(!js.hydratingInstances)return;try{null===(t=(e=js.lifecycleCallbacks).elementDidHydrate)||void 0===t||t.call(e,this.source)}catch(e){}const s=this.definition.name,i=js.hydratingInstances.get(s);i&&(i.delete(this.source),i.size||js.hydratingInstances.delete(s),js.idleCallbackId&&cancelIdleCallback(js.idleCallbackId),js.idleCallbackId=requestIdleCallback(js.checkHydrationComplete,{timeout:50}))}disconnect(){super.disconnect(),js.hydrationObserver.unobserve(this.source)}static install(){Bs.setStrategy(js)}}function Vs(e){const t=class extends e{constructor(){super(),Bs.forCustomElement(this)}$emit(e,t,s){return this.$fastController.emit(e,t,s)}connectedCallback(){this.$fastController.connect()}disconnectedCallback(){this.$fastController.disconnect()}attributeChangedCallback(e,t,s){this.$fastController.onAttributeChangedCallback(e,t,s)}};return Pt.registerBaseType(t),t}function _s(e,t){return n(e)?Pt.compose(e,t).define().type:Pt.compose(this,e).define().type}js.hydrationObserver=new ys(js.hydrationObserverHandler),js.lifecycleCallbacks={},js.hydrationStarted=!1,js.idleCallbackId=null,js.hydratingInstances=new Map;const Ls=Object.assign(Vs(HTMLElement),{from:function(e){return Vs(e)},define:_s,compose:function(e,t){return n(e)?Pt.compose(e,t):Pt.compose(this,e)},defineAsync:function(e,t){return n(e)?new Promise((s=>{Pt.composeAsync(e,t).then((e=>{s(e)}))})).then((e=>e.define().type)):new Promise((t=>{Pt.composeAsync(this,e).then((e=>{t(e)}))})).then((e=>e.define().type))}});function Hs(e){return function(t){_s(t,e)}}m.setPolicy($.create());export{X as ArrayObserver,At as AttributeConfiguration,jt as AttributeDefinition,Z as Binding,de as CSSBindingDirective,ae as CSSDirective,je as ChildrenDirective,xt as Compiler,m as DOM,f as DOMAspect,Bs as ElementController,fe as ElementStyles,V as ExecutionContext,l as FAST,Ls as FASTElement,Pt as FASTElementDefinition,ft as HTMLBindingDirective,ke as HTMLDirective,at as HTMLView,js as HydratableElementController,ht as HydrationBindingError,Wt as InlineTemplateDirective,Be as Markup,Re as NodeObservationDirective,M as Observable,$e as Parser,k as PropertyChangeNotifier,Ot as RefDirective,Xt as RenderBehavior,Gt as RenderDirective,ds as RepeatBehavior,hs as RepeatDirective,ps as SlottedDirective,L as Sort,E as SourceLifetime,_ as Splice,W as SpliceStrategy,H as SpliceStrategySupport,Os as Stages,Ee as StatelessAttachedAttributeDirective,N as SubscriberSet,Dt as TemplateOptions,A as Updates,Jt as ViewTemplate,Vt as attr,Et as booleanConverter,Ve as children,me as css,le as cssDirective,Hs as customElement,Xe as deferHydrationAttribute,Ie as elements,c as emptyArray,Ft as fastElementRegistry,Kt as html,Ae as htmlDirective,Ke as isHydratable,G as lengthOf,se as listener,Rs as needsHydrationAttribute,re as normalizeBinding,Mt as nullableBooleanConverter,Rt as nullableNumberConverter,I as observable,ne as oneTime,te as oneWay,Bt as ref,ns as render,us as repeat,gs as slotted,Y as sortedCount,R as volatile,ms as when};
|
|
3
|
+
`;function vi(e){return void 0===e?bi:e.template}function mi(e,t){if(e)return function(e,t){const n=gi.get(e);if(void 0!==n)return n[null!=t?t:"default-view"]}(e.constructor,t)}class yi{constructor(e){this.node=e,e.$fastTemplate=this}get context(){return this}bind(e){}unbind(){}insertBefore(e){e.parentNode.insertBefore(this.node,e)}remove(){this.node.parentNode.removeChild(this.node)}create(){return this}hydrate(e,t){return this}}function wi(e,i){let s,r;s=void 0===e?ee(e=>e):se(e);let o=!1;if(void 0===i)o=!0,r=ee((e,t)=>{var n;const i=s.evaluate(e,t);return i instanceof Node?null!==(n=i.$fastTemplate)&&void 0!==n?n:new yi(i):vi(mi(i))});else if(t(i))r=ne((e,t)=>{var r;let o=i(e,t);return n(o)?o=vi(mi(s.evaluate(e,t),o)):o instanceof Node&&(o=null!==(r=o.$fastTemplate)&&void 0!==r?r:new yi(o)),o},void 0,!0);else if(n(i))o=!0,r=ee((e,t)=>{var n;const r=s.evaluate(e,t);return r instanceof Node?null!==(n=r.$fastTemplate)&&void 0!==n?n:new yi(r):vi(mi(r,i))});else if(i instanceof Y){const e=i.evaluate;i.evaluate=(t,i)=>{var r;let o=e(t,i);return n(o)?o=vi(mi(s.evaluate(t,i),o)):o instanceof Node&&(o=null!==(r=o.$fastTemplate)&&void 0!==r?r:new yi(o)),o},r=i}else r=ee((e,t)=>i);return new fi(s,r,o)}function Ci(e){const t=e.parentElement;if(t)return t;{const t=e.getRootNode();if(t.host instanceof HTMLElement)return t.host}return null}function Si(e,t){let n=t;for(;null!==n;){if(n===e)return!0;n=Ci(n)}return!1}class Oi extends MutationObserver{constructor(e){super(function(e){this.callback.call(null,e.filter(e=>this.observedNodes.has(e.target)))}),this.callback=e,this.observedNodes=new Set}observe(e,t){this.observedNodes.add(e),super.observe(e,t)}unobserve(e){this.observedNodes.delete(e),this.observedNodes.size<1&&this.disconnect()}}const Ti=Object.freeze({create(e){const t=[],n={};let i=null,s=!1;return{source:e,context:z.default,targets:n,get isBound(){return s},addBehaviorFactory(e,t){var n,i,s,r;const o=e;o.id=null!==(n=o.id)&&void 0!==n?n:ft(),o.targetNodeId=null!==(i=o.targetNodeId)&&void 0!==i?i:ft(),o.targetTagName=null!==(s=t.tagName)&&void 0!==s?s:null,o.policy=null!==(r=o.policy)&&void 0!==r?r:b.policy,this.addTarget(o.targetNodeId,t),this.addBehavior(o.createBehavior())},addTarget(e,t){n[e]=t},addBehavior(e){t.push(e),s&&e.bind(this)},onUnbind(e){null===i&&(i=[]),i.push(e)},connectedCallback(e){s||(s=!0,t.forEach(e=>e.bind(this)))},disconnectedCallback(e){s&&(s=!1,null!==i&&i.forEach(e=>e.unbind(this)))}}}});b.setPolicy(x.create());export{qt as ArrayObserver,W as AttributeConfiguration,X as AttributeDefinition,Y as Binding,Fn as CSSDirective,Tt as ChildrenDirective,oi as Compiler,b as DOM,h as DOMAspect,x as DOMPolicy,sn as DefaultExecutionContext,We as ElementController,me as ElementStyles,z as ExecutionContext,r as FAST,tt as FASTElement,_e as FASTElementDefinition,Kn as HTMLBindingDirective,mt as HTMLDirective,rn as HTMLView,ci as InlineTemplateDirective,gt as Markup,Ot as NodeObservationDirective,V as Observable,bt as Parser,B as PropertyChangeNotifier,Nt as RefDirective,pi as RenderBehavior,fi as RenderDirective,bn as RepeatBehavior,vn as RepeatDirective,jn as Schema,oe as Signal,wn as SlottedDirective,$t as Sort,_ as SourceLifetime,Et as Splice,zt as SpliceStrategy,Pt as SpliceStrategySupport,Ue as Stages,wt as StatelessAttachedAttributeDirective,N as SubscriberSet,ue as TwoWaySettings,Oi as UnobservableMutationObserver,I as Updates,Ti as ViewBehaviorOrchestrator,hi as ViewTemplate,G as attr,q as booleanConverter,xt as children,Si as composedContains,Ci as composedParent,Vn as computedState,qn as css,Un as cssDirective,nt as customElement,St as elements,a as emptyArray,lt as enableDebug,xe as fastElementRegistry,ui as html,yt as htmlDirective,Qt as lengthOf,ie as listener,se as normalizeBinding,Q as nullableBooleanConverter,K as nullableNumberConverter,L as observable,ee as oneTime,ne as oneWay,_n as ownedState,Pn as reactive,Bt as ref,wi as render,mn as repeat,An as schemaRegistry,ce as signal,Cn as slotted,Jt as sortedCount,In as state,ge as twoWay,D as volatile,Hn as watch,Tn as when};
|