@microsoft/fast-element 2.0.0-beta.18 → 2.0.0-beta.19
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/CHANGELOG.json +15 -0
- package/CHANGELOG.md +9 -1
- package/dist/dts/interfaces.d.ts +9 -7
- package/dist/esm/components/fast-definitions.js +2 -2
- package/dist/esm/interfaces.js +45 -0
- package/dist/esm/observation/observable.js +3 -3
- package/dist/esm/observation/update-queue.js +2 -2
- package/dist/fast-element.debug.js +48 -4
- package/dist/fast-element.debug.min.js +1 -1
- package/dist/fast-element.js +48 -4
- package/dist/fast-element.min.js +1 -1
- package/package.json +1 -1
- package/yarn-error.log +0 -177
package/CHANGELOG.json
CHANGED
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/fast-element",
|
|
3
3
|
"entries": [
|
|
4
|
+
{
|
|
5
|
+
"date": "Fri, 02 Dec 2022 01:18:22 GMT",
|
|
6
|
+
"tag": "@microsoft/fast-element_v2.0.0-beta.19",
|
|
7
|
+
"version": "2.0.0-beta.19",
|
|
8
|
+
"comments": {
|
|
9
|
+
"prerelease": [
|
|
10
|
+
{
|
|
11
|
+
"author": "roeisenb@microsoft.com",
|
|
12
|
+
"package": "@microsoft/fast-element",
|
|
13
|
+
"commit": "e576aa70c22780fffba03097277e2db9a2ec1cd8",
|
|
14
|
+
"comment": "feat: add kernel mode with isolation by default"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
4
19
|
{
|
|
5
20
|
"date": "Tue, 15 Nov 2022 02:40:34 GMT",
|
|
6
21
|
"tag": "@microsoft/fast-element_v2.0.0-beta.18",
|
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
# Change Log - @microsoft/fast-element
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Fri, 02 Dec 2022 01:18:22 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 2.0.0-beta.19
|
|
8
|
+
|
|
9
|
+
Fri, 02 Dec 2022 01:18:22 GMT
|
|
10
|
+
|
|
11
|
+
### Changes
|
|
12
|
+
|
|
13
|
+
- feat: add kernel mode with isolation by default (roeisenb@microsoft.com)
|
|
14
|
+
|
|
7
15
|
## 2.0.0-beta.18
|
|
8
16
|
|
|
9
17
|
Tue, 15 Nov 2022 02:40:34 GMT
|
package/dist/dts/interfaces.d.ts
CHANGED
|
@@ -82,15 +82,17 @@ export interface FASTGlobal {
|
|
|
82
82
|
addMessages(messages: Record<number, string>): void;
|
|
83
83
|
}
|
|
84
84
|
/**
|
|
85
|
-
* Core services shared across FAST instances.
|
|
85
|
+
* Core services that can be shared across FAST instances.
|
|
86
86
|
* @internal
|
|
87
87
|
*/
|
|
88
|
-
|
|
89
|
-
updateQueue
|
|
90
|
-
observable
|
|
91
|
-
contextEvent
|
|
92
|
-
elementRegistry
|
|
93
|
-
}
|
|
88
|
+
declare type KernelServiceId = {
|
|
89
|
+
readonly updateQueue: string | number;
|
|
90
|
+
readonly observable: string | number;
|
|
91
|
+
readonly contextEvent: string | number;
|
|
92
|
+
readonly elementRegistry: string | number;
|
|
93
|
+
};
|
|
94
|
+
declare let KernelServiceId: KernelServiceId;
|
|
95
|
+
export { KernelServiceId };
|
|
94
96
|
/**
|
|
95
97
|
* A node that can be targeted by styles.
|
|
96
98
|
* @public
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isString } from "../interfaces.js";
|
|
1
|
+
import { isString, KernelServiceId } from "../interfaces.js";
|
|
2
2
|
import { Observable } from "../observation/observable.js";
|
|
3
3
|
import { createTypeRegistry, FAST } from "../platform.js";
|
|
4
4
|
import { ElementStyles } from "../styles/element-styles.js";
|
|
@@ -6,7 +6,7 @@ import { AttributeDefinition } from "./attributes.js";
|
|
|
6
6
|
const defaultShadowOptions = { mode: "open" };
|
|
7
7
|
const defaultElementOptions = {};
|
|
8
8
|
const fastElementBaseTypes = new Set();
|
|
9
|
-
const fastElementRegistry = FAST.getById(
|
|
9
|
+
const fastElementRegistry = FAST.getById(KernelServiceId.elementRegistry, () => createTypeRegistry());
|
|
10
10
|
/**
|
|
11
11
|
* Defines metadata for a FASTElement.
|
|
12
12
|
* @public
|
package/dist/esm/interfaces.js
CHANGED
|
@@ -1,3 +1,48 @@
|
|
|
1
|
+
let kernelMode;
|
|
2
|
+
const kernelAttr = "fast-kernel";
|
|
3
|
+
try {
|
|
4
|
+
if (document.currentScript) {
|
|
5
|
+
kernelMode = document.currentScript.getAttribute(kernelAttr);
|
|
6
|
+
}
|
|
7
|
+
else {
|
|
8
|
+
const scripts = document.getElementsByTagName("script");
|
|
9
|
+
const currentScript = scripts[scripts.length - 1];
|
|
10
|
+
kernelMode = currentScript.getAttribute(kernelAttr);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
catch (e) {
|
|
14
|
+
kernelMode = "isolate";
|
|
15
|
+
}
|
|
16
|
+
let KernelServiceId;
|
|
17
|
+
switch (kernelMode) {
|
|
18
|
+
case "share": // share the kernel across major versions
|
|
19
|
+
KernelServiceId = Object.freeze({
|
|
20
|
+
updateQueue: 1,
|
|
21
|
+
observable: 2,
|
|
22
|
+
contextEvent: 3,
|
|
23
|
+
elementRegistry: 4,
|
|
24
|
+
});
|
|
25
|
+
break;
|
|
26
|
+
case "share-v2": // only share the kernel with other v2 instances
|
|
27
|
+
KernelServiceId = Object.freeze({
|
|
28
|
+
updateQueue: 1.2,
|
|
29
|
+
observable: 2.2,
|
|
30
|
+
contextEvent: 3.2,
|
|
31
|
+
elementRegistry: 4.2,
|
|
32
|
+
});
|
|
33
|
+
break;
|
|
34
|
+
default:
|
|
35
|
+
// fully isolate the kernel from all other FAST instances
|
|
36
|
+
const postfix = `-${Math.random().toString(36).substring(2, 8)}`;
|
|
37
|
+
KernelServiceId = Object.freeze({
|
|
38
|
+
updateQueue: `1.2${postfix}`,
|
|
39
|
+
observable: `2.2${postfix}`,
|
|
40
|
+
contextEvent: `3.2${postfix}`,
|
|
41
|
+
elementRegistry: `4.2${postfix}`,
|
|
42
|
+
});
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
export { KernelServiceId };
|
|
1
46
|
/**
|
|
2
47
|
* @internal
|
|
3
48
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isFunction, isString, noop, } from "../interfaces.js";
|
|
1
|
+
import { isFunction, isString, KernelServiceId, noop, } from "../interfaces.js";
|
|
2
2
|
import { createMetadataLocator, FAST } from "../platform.js";
|
|
3
3
|
import { Updates } from "./update-queue.js";
|
|
4
4
|
import { PropertyChangeNotifier, SubscriberSet } from "./notifier.js";
|
|
@@ -21,7 +21,7 @@ export const SourceLifetime = Object.freeze({
|
|
|
21
21
|
* Common Observable APIs.
|
|
22
22
|
* @public
|
|
23
23
|
*/
|
|
24
|
-
export const Observable = FAST.getById(
|
|
24
|
+
export const Observable = FAST.getById(KernelServiceId.observable, () => {
|
|
25
25
|
const queueUpdate = Updates.enqueue;
|
|
26
26
|
const volatileRegex = /(:|&&|\|\||if)/;
|
|
27
27
|
const notifierLookup = new WeakMap();
|
|
@@ -292,7 +292,7 @@ export function volatile(target, name, descriptor) {
|
|
|
292
292
|
},
|
|
293
293
|
});
|
|
294
294
|
}
|
|
295
|
-
const contextEvent = FAST.getById(
|
|
295
|
+
const contextEvent = FAST.getById(KernelServiceId.contextEvent, () => {
|
|
296
296
|
let current = null;
|
|
297
297
|
return {
|
|
298
298
|
get() {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "../interfaces.js";
|
|
1
|
+
import { KernelServiceId } from "../interfaces.js";
|
|
2
2
|
import { FAST } from "../platform.js";
|
|
3
3
|
/**
|
|
4
4
|
* The default UpdateQueue.
|
|
5
5
|
* @public
|
|
6
6
|
*/
|
|
7
|
-
export const Updates = FAST.getById(
|
|
7
|
+
export const Updates = FAST.getById(KernelServiceId.updateQueue, () => {
|
|
8
8
|
const tasks = [];
|
|
9
9
|
const pendingErrors = [];
|
|
10
10
|
const rAF = globalThis.requestAnimationFrame;
|
|
@@ -62,6 +62,50 @@ Object.assign(FAST$1, {
|
|
|
62
62
|
},
|
|
63
63
|
});
|
|
64
64
|
|
|
65
|
+
let kernelMode;
|
|
66
|
+
const kernelAttr = "fast-kernel";
|
|
67
|
+
try {
|
|
68
|
+
if (document.currentScript) {
|
|
69
|
+
kernelMode = document.currentScript.getAttribute(kernelAttr);
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
const scripts = document.getElementsByTagName("script");
|
|
73
|
+
const currentScript = scripts[scripts.length - 1];
|
|
74
|
+
kernelMode = currentScript.getAttribute(kernelAttr);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
catch (e) {
|
|
78
|
+
kernelMode = "isolate";
|
|
79
|
+
}
|
|
80
|
+
let KernelServiceId;
|
|
81
|
+
switch (kernelMode) {
|
|
82
|
+
case "share": // share the kernel across major versions
|
|
83
|
+
KernelServiceId = Object.freeze({
|
|
84
|
+
updateQueue: 1,
|
|
85
|
+
observable: 2,
|
|
86
|
+
contextEvent: 3,
|
|
87
|
+
elementRegistry: 4,
|
|
88
|
+
});
|
|
89
|
+
break;
|
|
90
|
+
case "share-v2": // only share the kernel with other v2 instances
|
|
91
|
+
KernelServiceId = Object.freeze({
|
|
92
|
+
updateQueue: 1.2,
|
|
93
|
+
observable: 2.2,
|
|
94
|
+
contextEvent: 3.2,
|
|
95
|
+
elementRegistry: 4.2,
|
|
96
|
+
});
|
|
97
|
+
break;
|
|
98
|
+
default:
|
|
99
|
+
// fully isolate the kernel from all other FAST instances
|
|
100
|
+
const postfix = `-${Math.random().toString(36).substring(2, 8)}`;
|
|
101
|
+
KernelServiceId = Object.freeze({
|
|
102
|
+
updateQueue: `1.2${postfix}`,
|
|
103
|
+
observable: `2.2${postfix}`,
|
|
104
|
+
contextEvent: `3.2${postfix}`,
|
|
105
|
+
elementRegistry: `4.2${postfix}`,
|
|
106
|
+
});
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
65
109
|
/**
|
|
66
110
|
* @internal
|
|
67
111
|
*/
|
|
@@ -195,7 +239,7 @@ function createMetadataLocator() {
|
|
|
195
239
|
* The default UpdateQueue.
|
|
196
240
|
* @public
|
|
197
241
|
*/
|
|
198
|
-
const Updates = FAST.getById(
|
|
242
|
+
const Updates = FAST.getById(KernelServiceId.updateQueue, () => {
|
|
199
243
|
const tasks = [];
|
|
200
244
|
const pendingErrors = [];
|
|
201
245
|
const rAF = globalThis.requestAnimationFrame;
|
|
@@ -891,7 +935,7 @@ const SourceLifetime = Object.freeze({
|
|
|
891
935
|
* Common Observable APIs.
|
|
892
936
|
* @public
|
|
893
937
|
*/
|
|
894
|
-
const Observable = FAST.getById(
|
|
938
|
+
const Observable = FAST.getById(KernelServiceId.observable, () => {
|
|
895
939
|
const queueUpdate = Updates.enqueue;
|
|
896
940
|
const volatileRegex = /(:|&&|\|\||if)/;
|
|
897
941
|
const notifierLookup = new WeakMap();
|
|
@@ -1162,7 +1206,7 @@ function volatile(target, name, descriptor) {
|
|
|
1162
1206
|
},
|
|
1163
1207
|
});
|
|
1164
1208
|
}
|
|
1165
|
-
const contextEvent = FAST.getById(
|
|
1209
|
+
const contextEvent = FAST.getById(KernelServiceId.contextEvent, () => {
|
|
1166
1210
|
let current = null;
|
|
1167
1211
|
return {
|
|
1168
1212
|
get() {
|
|
@@ -3819,7 +3863,7 @@ function attr(configOrTarget, prop) {
|
|
|
3819
3863
|
const defaultShadowOptions = { mode: "open" };
|
|
3820
3864
|
const defaultElementOptions = {};
|
|
3821
3865
|
const fastElementBaseTypes = new Set();
|
|
3822
|
-
const fastElementRegistry = FAST.getById(
|
|
3866
|
+
const fastElementRegistry = FAST.getById(KernelServiceId.elementRegistry, () => createTypeRegistry());
|
|
3823
3867
|
/**
|
|
3824
3868
|
* Defines metadata for a FASTElement.
|
|
3825
3869
|
* @public
|
|
@@ -1 +1 @@
|
|
|
1
|
-
void 0===globalThis.FAST&&Reflect.defineProperty(globalThis,"FAST",{value:Object.create(null),configurable:!1,enumerable:!1,writable:!1});const e=globalThis.FAST,t={1101:"Must call enableArrayObservation 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.",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."},s=/(\$\{\w+?})/g,n=/\$\{(\w+?)}/g,i=Object.freeze({});function r(e,t){return e.split(s).map((e=>{var s;const i=e.replace(n,"$1");return String(null!==(s=t[i])&&void 0!==s?s:e)})).join("")}Object.assign(e,{addMessages(e){Object.assign(t,e)},warn(e,s=i){var n;const o=null!==(n=t[e])&&void 0!==n?n:"Unknown Warning";console.warn(r(o,s))},error(e,s=i){var n;const o=null!==(n=t[e])&&void 0!==n?n:"Unknown Error";return new Error(r(o,s))}});const o=e=>"function"==typeof e,l=e=>"string"==typeof e,a=()=>{};!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}}();const c={configurable:!1,enumerable:!1,writable:!1};void 0===globalThis.FAST&&Reflect.defineProperty(globalThis,"FAST",Object.assign({value:Object.create(null)},c));const h=globalThis.FAST;if(void 0===h.getById){const e=Object.create(null);Reflect.defineProperty(h,"getById",Object.assign({value(t,s){let n=e[t];return void 0===n&&(n=s?e[t]=s():null),n}},c))}void 0===h.error&&Object.assign(h,{warn(){},error:e=>new Error(`Error ${e}`),addMessages(){}});const d=Object.freeze([]);function u(){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 f(){const e=new WeakMap;return function(t){let s=e.get(t);if(void 0===s){let n=Reflect.getPrototypeOf(t);for(;void 0===s&&null!==n;)s=e.get(n),n=Reflect.getPrototypeOf(n);s=void 0===s?[]:s.slice(0),e.set(t,s)}return s}}const p=h.getById(1,(()=>{const e=[],t=[],s=globalThis.requestAnimationFrame;let n=!0;function i(){if(t.length)throw t.shift()}function r(s){try{s.call()}catch(s){if(!n)throw e.length=0,s;t.push(s),setTimeout(i,0)}}function o(){let t=0;for(;t<e.length;)if(r(e[t]),t++,t>1024){for(let s=0,n=e.length-t;s<n;s++)e[s]=e[s+t];e.length-=t,t=0}e.length=0}function l(t){e.push(t),e.length<2&&(n?s(o):o())}return Object.freeze({enqueue:l,next:()=>new Promise(l),process:o,setMode:e=>n=e})})),g=Object.freeze({none:0,attribute:1,booleanAttribute:2,property:3,content:4,tokenList:5,event:6}),b=e=>e,v=globalThis.trustedTypes?globalThis.trustedTypes.createPolicy("fast-html",{createHTML:b}):{createHTML:b};let y=Object.freeze({createHTML:e=>v.createHTML(e),protect:(e,t,s,n)=>n});const m=y,w=Object.freeze({queueUpdate:p.enqueue,nextUpdate:p.next,processUpdates:p.process,get policy(){return y},setPolicy(e){if(y!==m)throw h.error(1201);y=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 C(e,t,s,n){return(e,t,s,...i)=>{l(s)&&(s=s.replace("javascript:","")),n(e,t,s,...i)}}function x(e,t,s,n){throw new Error(`${s} on ${null!=e?e:"text"} is blocked by the current DOMPolicy.`)}const S={onabort:x,onauxclick:x,onbeforeinput:x,onbeforematch:x,onblur:x,oncancel:x,oncanplay:x,oncanplaythrough:x,onchange:x,onclick:x,onclose:x,oncontextlost:x,oncontextmenu:x,oncontextrestored:x,oncopy:x,oncuechange:x,oncut:x,ondblclick:x,ondrag:x,ondragend:x,ondragenter:x,ondragleave:x,ondragover:x,ondragstart:x,ondrop:x,ondurationchange:x,onemptied:x,onended:x,onerror:x,onfocus:x,onformdata:x,oninput:x,oninvalid:x,onkeydown:x,onkeypress:x,onkeyup:x,onload:x,onloadeddata:x,onloadedmetadata:x,onloadstart:x,onmousedown:x,onmouseenter:x,onmouseleave:x,onmousemove:x,onmouseout:x,onmouseover:x,onmouseup:x,onpaste:x,onpause:x,onplay:x,onplaying:x,onprogress:x,onratechange:x,onreset:x,onresize:x,onscroll:x,onsecuritypolicyviolation:x,onseeked:x,onseeking:x,onselect:x,onslotchange:x,onstalled:x,onsubmit:x,onsuspend:x,ontimeupdate:x,ontoggle:x,onvolumechange:x,onwaiting:x,onwebkitanimationend:x,onwebkitanimationiteration:x,onwebkitanimationstart:x,onwebkittransitionend:x,onwheel:x},T={elements:{a:{[g.attribute]:{href:C},[g.property]:{href:C}},area:{[g.attribute]:{href:C},[g.property]:{href:C}},button:{[g.attribute]:{formaction:C},[g.property]:{formAction:C}},embed:{[g.attribute]:{src:x},[g.property]:{src:x}},form:{[g.attribute]:{action:C},[g.property]:{action:C}},frame:{[g.attribute]:{src:C},[g.property]:{src:C}},iframe:{[g.attribute]:{src:C},[g.property]:{src:C,srcdoc:x}},input:{[g.attribute]:{formaction:C},[g.property]:{formAction:C}},link:{[g.attribute]:{href:x},[g.property]:{href:x}},object:{[g.attribute]:{codebase:x,data:x},[g.property]:{codeBase:x,data:x}},script:{[g.attribute]:{src:x,text:x},[g.property]:{src:x,text:x,innerText:x,textContent:x}},style:{[g.property]:{innerText:x,textContent:x}}},aspects:{[g.attribute]:Object.assign({},S),[g.property]:Object.assign({innerHTML:x},S),[g.event]:Object.assign({},S)}};function O(e,t){const s={};for(const n in t){const i=e[n],r=t[n];switch(i){case null:break;case void 0:s[n]=r;break;default:s[n]=i}}for(const t in e)t in s||(s[t]=e[t]);return Object.freeze(s)}function A(e,t){const s={};for(const n in t){const i=e[n],r=t[n];switch(i){case null:break;case void 0:s[n]=O(r,{});break;default:s[n]=O(i,r)}}for(const t in e)t in s||(s[t]=O(e[t],{}));return Object.freeze(s)}function k(e,t){const s={};for(const n in t){const i=e[n],r=t[n];switch(i){case null:break;case void 0:s[n]=A(i,{});break;default:s[n]=A(i,r)}}for(const t in e)t in s||(s[t]=A(e[t],{}));return Object.freeze(s)}function B(e,t,s,n,i){const r=e[s];if(r){const e=r[n];if(e)return e(t,s,n,i)}}const j=Object.freeze({create(e={}){var t,s;const n=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}}(),i=(r=null!==(s=e.guards)&&void 0!==s?s:{},o=T,Object.freeze({elements:r.elements?k(r.elements,o.elements):o.elements,aspects:r.aspects?A(r.aspects,o.aspects):o.aspects}));var r,o;return Object.freeze({createHTML:e=>n.createHTML(e),protect(e,t,s,n){var r;const o=(null!=e?e:"").toLowerCase(),l=i.elements[o];if(l){const i=B(l,e,t,s,n);if(i)return i}return null!==(r=B(i.aspects,e,t,s,n))&&void 0!==r?r:n}})}});class ${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,n=this.sub2;void 0!==t&&t.handleChange(s,e),void 0!==n&&n.handleChange(s,e)}else for(let n=0,i=t.length;n<i;++n)t[n].handleChange(s,e)}}class N{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,n;let i;i=t?null!==(s=this.subscribers[t])&&void 0!==s?s:this.subscribers[t]=new $(this.subject):null!==(n=this.subjectSubscribers)&&void 0!==n?n:this.subjectSubscribers=new $(this.subject),i.subscribe(e)}unsubscribe(e,t){var s,n;t?null===(s=this.subscribers[t])||void 0===s||s.unsubscribe(e):null===(n=this.subjectSubscribers)||void 0===n||n.unsubscribe(e)}}const I=Object.freeze({unknown:void 0,coupled:1}),M=h.getById(2,(()=>{const e=p.enqueue,t=/(:|&&|\|\||if)/,s=new WeakMap;let n,i=e=>{throw h.error(1101)};function r(e){var t;let n=null!==(t=e.$fastController)&&void 0!==t?t:s.get(e);return void 0===n&&(Array.isArray(e)?n=i(e):s.set(e,n=new N(e))),n}const c=f();class d{constructor(e){this.name=e,this.field=`_${e}`,this.callback=`${e}Changed`}getValue(e){return void 0!==n&&n.watch(e,this.name),e[this.field]}setValue(e,t){const s=this.field,n=e[s];if(n!==t){e[s]=t;const i=e[this.callback];o(i)&&i.call(e,n,t),r(e).notify(this.name)}}}class u extends ${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,this.toJSON=a}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!==I.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=n;let i;n=this.needsRefresh?this:void 0,this.needsRefresh=this.isVolatileBinding;try{i=this.expression(e,t)}finally{n=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=r(e),o=null===s?this.first:{};if(o.propertySource=e,o.propertyName=t,o.notifier=i,i.subscribe(this,t),null!==s){if(!this.needsRefresh){let t;n=void 0,t=s.propertySource[s.propertyName],n=this,e===t&&(this.needsRefresh=!0)}s.next=o}this.last=o}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 Object.freeze({setArrayObserverFactory(e){i=e},getNotifier:r,track(e,t){n&&n.watch(e,t)},trackVolatile(){n&&(n.needsRefresh=!0)},notify(e,t){r(e).notify(t)},defineProperty(e,t){l(t)&&(t=new d(t)),c(e).push(t),Reflect.defineProperty(e,t.name,{enumerable:!0,get(){return t.getValue(this)},set(e){t.setValue(this,e)}})},getAccessors:c,binding(e,t,s=this.isVolatileBinding(e)){return new u(e,t,s)},isVolatileBinding:e=>t.test(e.toString())})}));function V(e,t){M.defineProperty(e,t)}function E(e,t,s){return Object.assign({},s,{get(){return M.trackVolatile(),s.get.apply(this)}})}const L=h.getById(3,(()=>{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:()=>L.get(),setEvent(e){L.set(e)}});class F{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}}const P=Object.freeze({reset:1,splice:2,optimized:3}),_=new F(0,d,0);_.reset=!0;const R=[_];function D(e,t,s,n,i,r){let o=0,l=0;const a=Math.min(s-t,r-i);if(0===t&&0===i&&(o=function(e,t,s){for(let n=0;n<s;++n)if(e[n]!==t[n])return n;return s}(e,n,a)),s===e.length&&r===n.length&&(l=function(e,t,s){let n=e.length,i=t.length,r=0;for(;r<s&&e[--n]===t[--i];)r++;return r}(e,n,a-o)),i+=o,r-=l,(s-=l)-(t+=o)==0&&r-i==0)return d;if(t===s){const e=new F(t,[],0);for(;i<r;)e.removed.push(n[i++]);return[e]}if(i===r)return[new F(t,[],s-t)];const c=function(e){let t=e.length-1,s=e[0].length-1,n=e[t][s];const i=[];for(;t>0||s>0;){if(0===t){i.push(2),s--;continue}if(0===s){i.push(3),t--;continue}const r=e[t-1][s-1],o=e[t-1][s],l=e[t][s-1];let a;a=o<l?o<r?o:r:l<r?l:r,a===r?(r===n?i.push(0):(i.push(1),n=r),t--,s--):a===o?(i.push(3),t--,n=o):(i.push(2),s--,n=l)}return i.reverse()}(function(e,t,s,n,i,r){const o=r-i+1,l=s-t+1,a=new Array(o);let c,h;for(let e=0;e<o;++e)a[e]=new Array(l),a[e][0]=e;for(let e=0;e<l;++e)a[0][e]=e;for(let s=1;s<o;++s)for(let r=1;r<l;++r)e[t+r-1]===n[i+s-1]?a[s][r]=a[s-1][r-1]:(c=a[s-1][r]+1,h=a[s][r-1]+1,a[s][r]=c<h?c:h);return a}(e,t,s,n,i,r)),h=[];let u,f=t,p=i;for(let e=0;e<c.length;++e)switch(c[e]){case 0:void 0!==u&&(h.push(u),u=void 0),f++,p++;break;case 1:void 0===u&&(u=new F(f,[],0)),u.addedCount++,f++,u.removed.push(n[p]),p++;break;case 2:void 0===u&&(u=new F(f,[],0)),u.addedCount++,f++;break;case 3:void 0===u&&(u=new F(f,[],0)),u.removed.push(n[p]),p++}return void 0!==u&&h.push(u),h}function H(e,t){let s=!1,n=0;for(let a=0;a<t.length;a++){const c=t[a];if(c.index+=n,s)continue;const h=(i=e.index,r=e.index+e.removed.length,o=c.index,l=c.index+c.addedCount,r<o||l<i?-1:r===o||l===i?0:i<o?r<l?r-o:l-o:l<r?l-i:r-i);if(h>=0){t.splice(a,1),a--,n-=c.addedCount-c.removed.length,e.addedCount+=c.addedCount-h;const i=e.removed.length+c.removed.length-h;if(e.addedCount||i){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(a,0,e),a++;const i=e.addedCount-e.removed.length;c.index+=i,n+=i}}var i,r,o,l;s||t.push(e)}let U=Object.freeze({support:P.optimized,normalize:(e,t,s)=>void 0===e?void 0===s?d:s.length>1?function(e,t){let s=[];const n=[];for(let e=0,s=t.length;e<s;e++)H(t[e],n);for(let t=0,i=n.length;t<i;++t){const i=n[t];1!==i.addedCount||1!==i.removed.length?s=s.concat(D(e,i.index,i.index+i.addedCount,i.removed,0,i.removed.length)):i.removed[0]!==e[i.index]&&s.push(i)}return s}(t,s):s:R,pop(e,t,s,n){const i=e.length>0,r=s.apply(e,n);return i&&t.addSplice(new F(e.length,[r],0)),r},push(e,t,s,n){const i=s.apply(e,n);return t.addSplice(new F(e.length-n.length,[],n.length).adjustTo(e)),i},reverse(e,t,s,n){const i=s.apply(e,n);return t.reset(e),i},shift(e,t,s,n){const i=e.length>0,r=s.apply(e,n);return i&&t.addSplice(new F(0,[r],0)),r},sort(e,t,s,n){const i=s.apply(e,n);return t.reset(e),i},splice(e,t,s,n){const i=s.apply(e,n);return t.addSplice(new F(+n[0],i,n.length>2?n.length-2:0).adjustTo(e)),i},unshift(e,t,s,n){const i=s.apply(e,n);return t.addSplice(new F(0,[],n.length).adjustTo(e)),i}});const q=Object.freeze({reset:R,setDefaultStrategy(e){U=e}});function Q(e,t,s){Reflect.defineProperty(e,t,{value:s,enumerable:!1})}class J extends ${constructor(e){super(e),this.oldCollection=void 0,this.splices=void 0,this.needsQueue=!0,this._strategy=null,this._lengthObserver=void 0,this.call=this.flush,Q(e,"$fastController",this)}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}subscribe(e){this.flush(),super.subscribe(e)}addSplice(e){void 0===this.splices?this.splices=[e]:this.splices.push(e),this.enqueue()}reset(e){this.oldCollection=e,this.enqueue()}flush(){var e;const t=this.splices,s=this.oldCollection;void 0===t&&void 0===s||(this.needsQueue=!0,this.splices=void 0,this.oldCollection=void 0,this.notify((null!==(e=this._strategy)&&void 0!==e?e:U).normalize(s,this.subject,t)))}enqueue(){this.needsQueue&&(this.needsQueue=!1,p.enqueue(this))}}let W=!1;const K=Object.freeze({enable(){if(W)return;W=!0,M.setArrayObserverFactory((e=>new J(e)));const e=Array.prototype;e.$fastPatch||(Q(e,"$fastPatch",1),[e.pop,e.push,e.reverse,e.shift,e.sort,e.splice,e.unshift].forEach((t=>{e[t.name]=function(...e){var s;const n=this.$fastController;return void 0===n?t.apply(this,e):(null!==(s=n.strategy)&&void 0!==s?s:U)[t.name](this,n,t,e)}})))}});function G(e){if(!e)return 0;let t=e.$fastController;return void 0===t&&(K.enable(),t=M.getNotifier(e)),M.track(t.lengthObserver,"length"),e.length}let X;function Y(e){return e.map((e=>e instanceof Z?Y(e.styles):[e])).reduce(((e,t)=>e.concat(t)),[])}class Z{constructor(e){this.styles=e,this.targets=new WeakSet,this._strategy=null,this.behaviors=e.map((e=>e instanceof Z?e.behaviors:null)).reduce(((e,t)=>null===t?e:null===e?t:e.concat(t)),null)}get strategy(){return null===this._strategy&&this.withStrategy(X),this._strategy}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(Y(this.styles)),this}static setDefaultStrategy(e){X=e}static normalize(e){return void 0===e?void 0:Array.isArray(e)?new Z(e):e instanceof Z?e:new Z([e])}}Z.supportsAdoptedStyleSheets=Array.isArray(document.adoptedStyleSheets)&&"replace"in CSSStyleSheet.prototype;const ee=u(),te=Object.freeze({getForInstance:ee.getForInstance,getByType:ee.getByType,define:e=>(ee.register({type:e}),e)});function se(){return function(e){te.define(e)}}function ne(e,t){const s=[];let n="";const i=[],r=e=>{i.push(e)};for(let i=0,o=e.length-1;i<o;++i){n+=e[i];let o=t[i];void 0!==te.getForInstance(o)&&(o=o.createCSS(r)),o instanceof Z||o instanceof CSSStyleSheet?(""!==n.trim()&&(s.push(n),n=""),s.push(o)):n+=o}return n+=e[e.length-1],""!==n.trim()&&s.push(n),{styles:s,behaviors:i}}const ie=(e,...t)=>{const{styles:s,behaviors:n}=ne(e,t),i=new Z(s);return n.length?i.withBehaviors(...n):i};class re{constructor(e,t){this.behaviors=t,this.css="";const s=e.reduce(((e,t)=>(l(t)?this.css+=t:e.push(t),e)),[]);s.length&&(this.styles=new Z(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)}}te.define(re);const oe=ie.partial=(e,...t)=>{const{styles:s,behaviors:n}=ne(e,t);return new re(s,n)},le=`fast-${Math.random().toString(36).substring(2,8)}`,ae=`${le}{`,ce=`}${le}`,he=ce.length;let de=0;const ue=()=>`${le}-${++de}`,fe=Object.freeze({interpolation:e=>`${ae}${e}${ce}`,attribute:e=>`${ue()}="${ae}${e}${ce}"`,comment:e=>`\x3c!--${ae}${e}${ce}--\x3e`}),pe=Object.freeze({parse(e,t){const s=e.split(ae);if(1===s.length)return null;const n=[];for(let e=0,i=s.length;e<i;++e){const i=s[e],r=i.indexOf(ce);let o;if(-1===r)o=i;else{const e=i.substring(0,r);n.push(t[e]),o=i.substring(r+he)}""!==o&&n.push(o)}return n}}),ge=u(),be=Object.freeze({getForInstance:ge.getForInstance,getByType:ge.getByType,define:(e,t)=>((t=t||{}).type=e,ge.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?g.tokenList:g.property;break;case"?":e.targetAspect=t.substring(1),e.aspectType=g.booleanAttribute;break;case"@":e.targetAspect=t.substring(1),e.aspectType=g.event;break;default:e.targetAspect=t,e.aspectType=g.attribute}else e.aspectType=g.content}});function ve(e){return function(t){be.define(t,e)}}class ye{constructor(e,t,s=!1){this.evaluate=e,this.policy=t,this.isVolatile=s}}class me{constructor(e){this.options=e,this.toJSON=a}createHTML(e){return fe.attribute(e(this))}createBehavior(){return this}}class we extends ye{createObserver(e,t){return M.binding(this.evaluate,t,this.isVolatile)}}class Ce extends ye{constructor(){super(...arguments),this.toJSON=a}createObserver(){return this}bind(e){return this.evaluate(e.source,e.context)}}const xe={[g.attribute]:w.setAttribute,[g.booleanAttribute]:w.setBooleanAttribute,[g.property]:(e,t,s)=>e[t]=s,[g.content]:function(e,t,s,n){if(null==s&&(s=""),s.create){e.textContent="";let t=e.$fastView;void 0===t?t=s.create():e.$fastTemplate!==s&&(t.isComposed&&(t.remove(),t.unbind()),t=s.create()),t.isComposed?t.needsBindOnly&&(t.needsBindOnly=!1,t.bind(n.source,n.context)):(t.isComposed=!0,t.bind(n.source,n.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}},[g.tokenList]:function(e,t,s){var n;const i=`${this.id}-t`,r=null!==(n=e[i])&&void 0!==n?n:e[i]={v:0,cv:Object.create(null)},o=r.cv;let l=r.v;const a=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]=l,a.add(s))}}if(r.v=l+1,0!==l){l-=1;for(const e in o)o[e]===l&&a.remove(e)}},[g.event]:()=>{}};class Se{constructor(e){this.dataBinding=e,this.updateTarget=null,this.aspectType=g.content}createHTML(e){return fe.interpolation(e(this))}createBehavior(){var e;if(null===this.updateTarget){const t=xe[this.aspectType],s=null!==(e=this.dataBinding.policy)&&void 0!==e?e:this.policy;if(!t)throw h.error(1205);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];switch(this.aspectType){case g.event:s[this.data]=e,s.addEventListener(this.targetAspect,this,this.dataBinding.options);break;case g.content:e.onUnbind(this);default:const n=null!==(t=s[this.data])&&void 0!==t?t:s[this.data]=this.dataBinding.createObserver(this,this);n.target=s,n.controller=e,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){z.setEvent(e);const s=this.dataBinding.evaluate(t.source,t.context);z.setEvent(null),!0!==s&&e.preventDefault()}}handleChange(e,t){const s=t.target,n=t.controller;this.updateTarget(s,this.targetAspect,t.bind(n),n)}}function Te(e,t,s=M.isVolatileBinding(e)){return new we(e,t,s)}function Oe(e,t){return new Ce(e,t)}function Ae(e,t){const s=new we(e);return s.options=t,s}function ke(e){return o(e)?Te(e):e instanceof ye?e:Oe((()=>e))}function Be(e,t){const s=e.parentNode;let n,i=e;for(;i!==t;)n=i.nextSibling,s.removeChild(i),i=n;s.removeChild(t)}be.define(Se,{aspected:!0});class je{constructor(e,t,s){this.fragment=e,this.factories=t,this.targets=s,this.behaviors=null,this.unbindables=[],this.source=null,this.isBound=!1,this.sourceLifetime=I.unknown,this.context=this,this.index=0,this.length=0,this.toJSON=a,this.firstChild=e.firstChild,this.lastChild=e.lastChild}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}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 n,i=this.firstChild;for(;i!==t;)n=i.nextSibling,s.insertBefore(i,e),i=n;s.insertBefore(t,e)}}remove(){const e=this.fragment,t=this.lastChild;let s,n=this.firstChild;for(;n!==t;)s=n.nextSibling,e.appendChild(n),n=s;e.appendChild(t)}dispose(){Be(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 n=this.factories;for(let e=0,t=n.length;e<t;++e){const t=n[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){Be(e[0].firstChild,e[e.length-1].lastChild);for(let t=0,s=e.length;t<s;++t)e[t].unbind()}}}M.defineProperty(je.prototype,"index"),M.defineProperty(je.prototype,"length");const $e=(e,t)=>`${e}.${t}`,Ne={},Ie={index:0,node:null};function Me(e){e.startsWith("fast-")||h.warn(1204,{name:e})}const Ve=new Proxy(document.createElement("div"),{get(e,t){Me(t);const s=Reflect.get(e,t);return o(s)?s.bind(e):s},set:(e,t,s)=>(Me(t),Reflect.set(e,t,s))});class Ee{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,n,i){var r,o;this.nodeIds.has(s)||(this.nodeIds.add(s),this.addTargetDescriptor(t,s,n)),e.id=null!==(r=e.id)&&void 0!==r?r:ue(),e.targetNodeId=s,e.targetTagName=i,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 n=this.descriptors;if("r"===t||"h"===t||n[t])return;if(!n[e]){const t=e.lastIndexOf("."),s=e.substring(0,t),n=parseInt(e.substring(t+1));this.addTargetDescriptor(s,e,n)}let i=Ne[t];if(!i){const n=`_${t}`;Ne[t]=i={get(){var t;return null!==(t=this[n])&&void 0!==t?t:this[n]=this[e].childNodes[s]}}}n[t]=i}createView(e){const t=this.fragment.cloneNode(!0),s=Object.create(this.proto);s.r=t,s.h=null!=e?e:Ve;for(const e of this.nodeIds)s[e];return new je(t,this.factories,s)}}function Le(e,t,s,n,i,r=!1){const o=s.attributes,l=e.directives;for(let a=0,c=o.length;a<c;++a){const h=o[a],d=h.value,u=pe.parse(d,l);let f=null;null===u?r&&(f=new Se(Oe((()=>d),e.policy)),be.assignAspect(f,h.name)):f=Pe.aggregate(u,e.policy),null!==f&&(s.removeAttributeNode(h),a--,c--,e.addFactory(f,t,n,i,s.tagName))}}function ze(e,t,s){let n=0,i=t.firstChild;for(;i;){const t=Fe(e,s,i,n);i=t.node,n=t.index}}function Fe(e,t,s,n){const i=$e(t,n);switch(s.nodeType){case 1:Le(e,t,s,i,n),ze(e,s,i);break;case 3:return function(e,t,s,n,i){const r=pe.parse(t.textContent,e.directives);if(null===r)return Ie.node=t.nextSibling,Ie.index=i+1,Ie;let o,a=o=t;for(let t=0,c=r.length;t<c;++t){const c=r[t];0!==t&&(i++,n=$e(s,i),o=a.parentNode.insertBefore(document.createTextNode(""),a.nextSibling)),l(c)?o.textContent=c:(o.textContent=" ",be.assignAspect(c),e.addFactory(c,s,n,i,null)),a=o}return Ie.index=i+1,Ie.node=a.nextSibling,Ie}(e,s,t,i,n);case 8:const r=pe.parse(s.data,e.directives);null!==r&&e.addFactory(Pe.aggregate(r),t,i,n,null)}return Ie.index=n+1,Ie.node=s.nextSibling,Ie}const Pe={compile(e,t,s=w.policy){let n;if(l(e)){n=document.createElement("TEMPLATE"),n.innerHTML=s.createHTML(e);const t=n.content.firstElementChild;null!==t&&"TEMPLATE"===t.tagName&&(n=t)}else n=e;const i=document.adoptNode(n.content),r=new Ee(i,t,s);var o,a;return Le(r,"",n,"h",0,!0),o=i.firstChild,a=t,(o&&8==o.nodeType&&null!==pe.parse(o.data,a)||1===i.childNodes.length&&Object.keys(t).length>0)&&i.insertBefore(document.createComment(""),i.firstChild),ze(r,i,"r"),Ie.node=null,r.freeze()},setDefaultStrategy(e){this.compile=e},aggregate(e,t=w.policy){if(1===e.length)return e[0];let s,n,i,r=!1;const o=e.length,a=e.map((e=>l(e)?()=>e:(s=e.sourceAspect||s,n=e.dataBinding||n,r=r||e.dataBinding.isVolatile,i=i||e.dataBinding.policy,e.dataBinding.evaluate)));n.evaluate=(e,t)=>{let s="";for(let n=0;n<o;++n)s+=a[n](e,t);return s},n.isVolatile=r,n.policy=null!=i?i:t;const c=new Se(n);return be.assignAspect(c,s),c}},_e=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;function Re(e,t,s,n=be.getForInstance(e)){if(n.aspected){const s=_e.exec(t);null!==s&&be.assignAspect(e,s[2])}return e.createHTML(s)}class De{constructor(e,t={},s){this.policy=s,this.result=null,this.toJSON=a,this.html=e,this.factories=t}create(e){return null===this.result&&(this.result=Pe.compile(this.html,this.factories,this.policy)),this.result.createView(e)}withPolicy(e){if(this.result)throw h.error(1208);if(this.policy)throw h.error(1207);return this.policy=e,this}render(e,t,s){const n=this.create(s);return n.bind(e),n.appendTo(t),n}static create(e,t,s){let n="";const i=Object.create(null),r=e=>{var t;const s=null!==(t=e.id)&&void 0!==t?t:e.id=ue();return i[s]=e,s};for(let s=0,i=e.length-1;s<i;++s){const i=e[s];let l,a=t[s];if(n+=i,o(a))a=new Se(Te(a));else if(a instanceof ye)a=new Se(a);else if(!(l=be.getForInstance(a))){const e=a;a=new Se(Oe((()=>e)))}n+=Re(a,i,r,l)}return new De(n+e[e.length-1],i,s)}}function He(e,...t){if(Array.isArray(e)&&Array.isArray(e.raw))return De.create(e,t);throw h.error(1206)}class Ue extends me{bind(e){e.source[this.options]=e.targets[this.targetNodeId]}}be.define(Ue);const qe=e=>new Ue(e);function Qe(e,t){const s=o(e)?e:()=>e,n=o(t)?t:()=>t;return(e,t)=>s(e,t)?n(e,t):null}const Je=Object.freeze({positioning:!1,recycle:!0});function We(e,t,s,n){e.context.parent=n.source,e.context.parentContext=n.context,e.bind(t[s])}function Ke(e,t,s,n){e.context.parent=n.source,e.context.parentContext=n.context,e.context.length=t.length,e.context.index=s,e.bind(t[s])}class Ge{constructor(e){this.directive=e,this.items=null,this.itemsObserver=null,this.bindView=We,this.views=[],this.itemsBindingObserver=e.dataBinding.createObserver(e,this),this.templateBindingObserver=e.templateBinding.createObserver(e,this),e.options.positioning&&(this.bindView=Ke)}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),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():this.updateViews(t)}}observeItems(e=!1){if(!this.items)return void(this.items=d);const t=this.itemsObserver,s=this.itemsObserver=M.getNotifier(this.items),n=t!==s;n&&null!==t&&t.unsubscribe(this),(n||e)&&s.subscribe(this)}updateViews(e){const t=this.views,s=this.bindView,n=this.items,i=this.template,r=this.controller,o=this.directive.options.recycle,l=[];let a=0,c=0;for(let h=0,d=e.length;h<d;++h){const d=e[h],u=d.removed;let f=0,p=d.index;const g=p+d.addedCount,b=t.splice(d.index,u.length),v=c=l.length+b.length;for(;p<g;++p){const e=t[p],h=e?e.firstChild:this.location;let d;o&&c>0?(f<=v&&b.length>0?(d=b[f],f++):(d=l[a],a++),c--):d=i.create(),t.splice(p,0,d),s(d,n,p,r),d.insertBefore(h)}b[f]&&l.push(...b.slice(f))}for(let e=a,t=l.length;e<t;++e)l[e].dispose();if(this.directive.options.positioning)for(let e=0,s=t.length;e<s;++e){const n=t[e].context;n.length=s,n.index=e}}refreshAllViews(e=!1){const t=this.items,s=this.template,n=this.location,i=this.bindView,r=this.controller;let o=t.length,l=this.views,a=l.length;if(0!==o&&!e&&this.directive.options.recycle||(je.disposeContiguousBatch(l),a=0),0===a){this.views=l=new Array(o);for(let e=0;e<o;++e){const o=s.create();i(o,t,e,r),l[e]=o,o.insertBefore(n)}}else{let e=0;for(;e<o;++e)if(e<a){i(l[e],t,e,r)}else{const o=s.create();i(o,t,e,r),l.push(o),o.insertBefore(n)}const c=l.splice(e,a-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)e[t].unbind()}}class Xe{constructor(e,t,s){this.dataBinding=e,this.templateBinding=t,this.options=s,K.enable()}createHTML(e){return fe.comment(e(this))}createBehavior(){return new Ge(this)}}function Ye(e,t,s=Je){const n=ke(e),i=ke(t);return new Xe(n,i,Object.assign(Object.assign({},Je),s))}be.define(Xe);const Ze=e=>1===e.nodeType,et=e=>e?t=>1===t.nodeType&&t.matches(e):Ze;class tt extends me{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,d),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 st extends tt{observe(e){e.addEventListener("slotchange",this)}disconnect(e){e.removeEventListener("slotchange",this)}getNodes(e){return e.assignedNodes(this.options)}handleEvent(e){const t=e.currentTarget;this.updateTarget(this.getSource(t),this.computeNodes(t))}}function nt(e){return l(e)&&(e={property:e}),new st(e)}be.define(st);class it extends tt{constructor(e){super(e),this.observerProperty=`${this.id}-o`,this.handleEvent=(e,t)=>{const s=t.target;this.updateTarget(this.getSource(s),this.computeNodes(s))},e.childList=!0}observe(e){let t=e[this.observerProperty];t||(t=new MutationObserver(this.handleEvent),t.toJSON=a,t.target=e,e[this.observerProperty]=t),t.observe(e,this.options)}disconnect(e){const t=e[this.observerProperty];t.target=null,t.disconnect()}getNodes(e){return"selector"in this.options?Array.from(e.querySelectorAll(this.options.selector)):Array.from(e.childNodes)}}function rt(e){return l(e)&&(e={property:e}),new it(e)}be.define(it);class ot{constructor(e){this.html=e}createHTML(){return this.html}}function lt(e){return new ot(e)}be.define(ot);const at=Object.freeze({locate:f()}),ct={toView:e=>e?"true":"false",fromView:e=>null!=e&&"false"!==e&&!1!==e&&0!==e};function ht(e){if(null==e)return null;const t=1*e;return isNaN(t)?null:t}const dt={toView(e){const t=ht(e);return t?t.toString():t},fromView:ht};class ut{constructor(e,t,s=t.toLowerCase(),n="reflect",i){this.guards=new Set,this.Owner=e,this.name=t,this.attribute=s,this.mode=n,this.converter=i,this.fieldName=`_${t}`,this.callbackName=`${t}Changed`,this.hasCallback=this.callbackName in e.prototype,"boolean"===n&&void 0===i&&(this.converter=ct)}setValue(e,t){const s=e[this.fieldName],n=this.converter;void 0!==n&&(t=n.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||p.enqueue((()=>{s.add(e);const n=e[this.fieldName];switch(t){case"reflect":const t=this.converter;w.setAttribute(e,this.attribute,void 0!==t?t.toView(n):n);break;case"boolean":w.setBooleanAttribute(e,this.attribute,n)}s.delete(e)}))}static collect(e,...t){const s=[];t.push(at.locate(e));for(let n=0,i=t.length;n<i;++n){const i=t[n];if(void 0!==i)for(let t=0,n=i.length;t<n;++t){const n=i[t];l(n)?s.push(new ut(e,n)):s.push(new ut(e,n.property,n.attribute,n.mode,n.converter))}}return s}}function ft(e,t){let s;function n(e,t){arguments.length>1&&(s.property=t),at.locate(e.constructor).push(s)}return arguments.length>1?(s={},void n(e,t)):(s=void 0===e?{}:e,n)}const pt={mode:"open"},gt={},bt=new Set,vt=h.getById(4,(()=>u()));class yt{constructor(e,t=e.definition){var s;this.platformDefined=!1,l(t)&&(t={name:t}),this.type=e,this.name=t.name,this.template=t.template,this.registry=null!==(s=t.registry)&&void 0!==s?s:customElements;const n=e.prototype,i=ut.collect(e,t.attributes),r=new Array(i.length),o={},a={};for(let e=0,t=i.length;e<t;++e){const t=i[e];r[e]=t.attribute,o[t.name]=t,a[t.attribute]=t,M.defineProperty(n,t)}Reflect.defineProperty(e,"observedAttributes",{value:r,enumerable:!0}),this.attributes=i,this.propertyLookup=o,this.attributeLookup=a,this.shadowOptions=void 0===t.shadowOptions?pt:null===t.shadowOptions?void 0:Object.assign(Object.assign({},pt),t.shadowOptions),this.elementOptions=void 0===t.elementOptions?gt:Object.assign(Object.assign({},gt),t.elementOptions),this.styles=Z.normalize(t.styles),vt.register(this)}get isDefined(){return this.platformDefined}define(e=this.registry){const t=this.type;return e.get(this.name)||(this.platformDefined=!0,e.define(this.name,t,this.elementOptions)),this}static compose(e,t){return bt.has(e)||vt.getByType(e)?new yt(class extends e{},t):new yt(e,t)}static registerBaseType(e){bt.add(e)}}yt.getByType=vt.getByType,yt.getForInstance=vt.getForInstance;const mt={bubbles:!0,composed:!0,cancelable:!0},wt=new WeakMap;function Ct(e){var t,s;return null!==(s=null!==(t=e.shadowRoot)&&void 0!==t?t:wt.get(e))&&void 0!==s?s:null}let xt;class St extends N{constructor(e,t){super(e),this.boundObservables=null,this.needsInitialization=!0,this.hasExistingShadowRoot=!1,this._template=null,this.stage=3,this.guardBehaviorConnection=!1,this.behaviors=null,this._mainStyles=null,this.$fastController=this,this.view=null,this.toJSON=a,this.source=e,this.definition=t;const s=t.shadowOptions;if(void 0!==s){let t=e.shadowRoot;t?this.hasExistingShadowRoot=!0:(t=e.attachShadow(s),"closed"===s.mode&&wt.set(e,t))}const n=M.getAccessors(e);if(n.length>0){const t=this.boundObservables=Object.create(null);for(let s=0,i=n.length;s<i;++s){const i=n[s].name,r=e[i];void 0!==r&&(delete e[i],t[i]=r)}}}get isConnected(){return M.track(this,"isConnected"),1===this.stage}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 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))}addBehavior(e){var t,s;const n=null!==(t=this.behaviors)&&void 0!==t?t:this.behaviors=new Map,i=null!==(s=n.get(e))&&void 0!==s?s:0;0===i?(n.set(e,1),e.addedCallback&&e.addedCallback(this),!e.connectedCallback||this.guardBehaviorConnection||1!==this.stage&&0!==this.stage||e.connectedCallback(this)):n.set(e,i+1)}removeBehavior(e,t=!1){const s=this.behaviors;if(null===s)return;const n=s.get(e);void 0!==n&&(1===n||t?(s.delete(e),e.disconnectedCallback&&3!==this.stage&&e.disconnectedCallback(this),e.removedCallback&&e.removedCallback(this)):s.set(e,n-1))}addStyles(e){var t;if(!e)return;const s=this.source;if(e instanceof HTMLElement){(null!==(t=Ct(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=Ct(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.addBehavior(t[e])}}connect(){if(3!==this.stage)return;if(this.stage=0,null!==this.boundObservables){const e=this.source,t=this.boundObservables,s=Object.keys(t);for(let n=0,i=s.length;n<i;++n){const i=s[n];e[i]=t[i]}this.boundObservables=null}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.needsInitialization?(this.renderTemplate(this.template),this.addStyles(this.mainStyles),this.needsInitialization=!1):null!==this.view&&this.view.bind(this.source),this.stage=1,M.notify(this,"isConnected")}disconnect(){if(1!==this.stage)return;this.stage=2,M.notify(this,"isConnected"),null!==this.view&&this.view.unbind();const e=this.behaviors;if(null!==e)for(const t of e.keys())t.disconnectedCallback&&t.disconnectedCallback(this);this.stage=3}onAttributeChangedCallback(e,t,s){const n=this.definition.attributeLookup[e];void 0!==n&&n.onAttributeChangedCallback(this.source,s)}emit(e,t,s){return 1===this.stage&&this.source.dispatchEvent(new CustomEvent(e,Object.assign(Object.assign({detail:t},mt),s)))}renderTemplate(e){var t;const s=this.source,n=null!==(t=Ct(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=n.firstChild;null!==e;e=n.firstChild)n.removeChild(e)}e&&(this.view=e.render(s,n,s),this.view.sourceLifetime=I.coupled)}static forCustomElement(e){const t=e.$fastController;if(void 0!==t)return t;const s=yt.getForInstance(e);if(void 0===s)throw h.error(1401);return e.$fastController=new xt(e,s)}static setStrategy(e){xt=e}}function Tt(e){var t;return"adoptedStyleSheets"in e?e:null!==(t=Ct(e))&&void 0!==t?t:e.getRootNode()}St.setStrategy(St);class Ot{constructor(e){const t=Ot.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){const t=Tt(e);t.adoptedStyleSheets=[...t.adoptedStyleSheets,...this.sheets]}removeStylesFrom(e){const t=Tt(e),s=this.sheets;t.adoptedStyleSheets=t.adoptedStyleSheets.filter((e=>-1===s.indexOf(e)))}}Ot.styleSheetCache=new Map;let At=0;function kt(e){return e===document?document.body:e}function Bt(e){const t=class extends e{constructor(){super(),St.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 yt.registerBaseType(t),t}function jt(e,t){return o(e)?yt.compose(e,t).define().type:yt.compose(this,e).define().type}Z.setDefaultStrategy(Z.supportsAdoptedStyleSheets?Ot:class{constructor(e){this.styles=e,this.styleClass="fast-"+ ++At}addStylesTo(e){e=kt(Tt(e));const t=this.styles,s=this.styleClass;for(let n=0;n<t.length;n++){const i=document.createElement("style");i.innerHTML=t[n],i.className=s,e.append(i)}}removeStylesFrom(e){const t=(e=kt(Tt(e))).querySelectorAll(`.${this.styleClass}`);t[0].parentNode;for(let s=0,n=t.length;s<n;++s)e.removeChild(t[s])}});const $t=Object.assign(Bt(HTMLElement),{from:function(e){return Bt(e)},define:jt,compose:function(e,t){return o(e)?yt.compose(e,t):yt.compose(this,e)}});function Nt(e){return function(t){jt(t,e)}}w.setPolicy(j.create());export{K as ArrayObserver,at as AttributeConfiguration,ut as AttributeDefinition,ye as Binding,te as CSSDirective,it as ChildrenDirective,Pe as Compiler,w as DOM,g as DOMAspect,ot as DangerousHTMLDirective,St as ElementController,Z as ElementStyles,z as ExecutionContext,h as FAST,$t as FASTElement,yt as FASTElementDefinition,Se as HTMLBindingDirective,be as HTMLDirective,je as HTMLView,fe as Markup,tt as NodeObservationDirective,M as Observable,pe as Parser,N as PropertyChangeNotifier,Ue as RefDirective,Ge as RepeatBehavior,Xe as RepeatDirective,st as SlottedDirective,I as SourceLifetime,F as Splice,q as SpliceStrategy,P as SpliceStrategySupport,me as StatelessAttachedAttributeDirective,$ as SubscriberSet,p as Updates,De as ViewTemplate,ft as attr,Te as bind,ct as booleanConverter,rt as children,f as createMetadataLocator,u as createTypeRegistry,ie as css,se as cssDirective,oe as cssPartial,Nt as customElement,lt as dangerousHTML,et as elements,d as emptyArray,He as html,ve as htmlDirective,G as lengthOf,Ae as listener,ke as normalizeBinding,dt as nullableNumberConverter,V as observable,Oe as oneTime,qe as ref,Ye as repeat,nt as slotted,E as volatile,Qe as when};
|
|
1
|
+
void 0===globalThis.FAST&&Reflect.defineProperty(globalThis,"FAST",{value:Object.create(null),configurable:!1,enumerable:!1,writable:!1});const e=globalThis.FAST,t={1101:"Must call enableArrayObservation 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.",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."},s=/(\$\{\w+?})/g,n=/\$\{(\w+?)}/g,i=Object.freeze({});function r(e,t){return e.split(s).map((e=>{var s;const i=e.replace(n,"$1");return String(null!==(s=t[i])&&void 0!==s?s:e)})).join("")}let o;Object.assign(e,{addMessages(e){Object.assign(t,e)},warn(e,s=i){var n;const o=null!==(n=t[e])&&void 0!==n?n:"Unknown Warning";console.warn(r(o,s))},error(e,s=i){var n;const o=null!==(n=t[e])&&void 0!==n?n:"Unknown Error";return new Error(r(o,s))}});try{if(document.currentScript)o=document.currentScript.getAttribute("fast-kernel");else{const e=document.getElementsByTagName("script");o=e[e.length-1].getAttribute("fast-kernel")}}catch(e){o="isolate"}let l;switch(o){case"share":l=Object.freeze({updateQueue:1,observable:2,contextEvent:3,elementRegistry:4});break;case"share-v2":l=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)}`;l=Object.freeze({updateQueue:`1.2${e}`,observable:`2.2${e}`,contextEvent:`3.2${e}`,elementRegistry:`4.2${e}`})}const a=e=>"function"==typeof e,c=e=>"string"==typeof e,h=()=>{};!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}}();const d={configurable:!1,enumerable:!1,writable:!1};void 0===globalThis.FAST&&Reflect.defineProperty(globalThis,"FAST",Object.assign({value:Object.create(null)},d));const u=globalThis.FAST;if(void 0===u.getById){const e=Object.create(null);Reflect.defineProperty(u,"getById",Object.assign({value(t,s){let n=e[t];return void 0===n&&(n=s?e[t]=s():null),n}},d))}void 0===u.error&&Object.assign(u,{warn(){},error:e=>new Error(`Error ${e}`),addMessages(){}});const f=Object.freeze([]);function p(){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 g(){const e=new WeakMap;return function(t){let s=e.get(t);if(void 0===s){let n=Reflect.getPrototypeOf(t);for(;void 0===s&&null!==n;)s=e.get(n),n=Reflect.getPrototypeOf(n);s=void 0===s?[]:s.slice(0),e.set(t,s)}return s}}const b=u.getById(l.updateQueue,(()=>{const e=[],t=[],s=globalThis.requestAnimationFrame;let n=!0;function i(){if(t.length)throw t.shift()}function r(s){try{s.call()}catch(s){if(!n)throw e.length=0,s;t.push(s),setTimeout(i,0)}}function o(){let t=0;for(;t<e.length;)if(r(e[t]),t++,t>1024){for(let s=0,n=e.length-t;s<n;s++)e[s]=e[s+t];e.length-=t,t=0}e.length=0}function l(t){e.push(t),e.length<2&&(n?s(o):o())}return Object.freeze({enqueue:l,next:()=>new Promise(l),process:o,setMode:e=>n=e})})),v=Object.freeze({none:0,attribute:1,booleanAttribute:2,property:3,content:4,tokenList:5,event:6}),y=e=>e,m=globalThis.trustedTypes?globalThis.trustedTypes.createPolicy("fast-html",{createHTML:y}):{createHTML:y};let w=Object.freeze({createHTML:e=>m.createHTML(e),protect:(e,t,s,n)=>n});const x=w,C=Object.freeze({queueUpdate:b.enqueue,nextUpdate:b.next,processUpdates:b.process,get policy(){return w},setPolicy(e){if(w!==x)throw u.error(1201);w=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 S(e,t,s,n){return(e,t,s,...i)=>{c(s)&&(s=s.replace("javascript:","")),n(e,t,s,...i)}}function T(e,t,s,n){throw new Error(`${s} on ${null!=e?e:"text"} is blocked by the current DOMPolicy.`)}const O={onabort:T,onauxclick:T,onbeforeinput:T,onbeforematch:T,onblur:T,oncancel:T,oncanplay:T,oncanplaythrough:T,onchange:T,onclick:T,onclose:T,oncontextlost:T,oncontextmenu:T,oncontextrestored:T,oncopy:T,oncuechange:T,oncut:T,ondblclick:T,ondrag:T,ondragend:T,ondragenter:T,ondragleave:T,ondragover:T,ondragstart:T,ondrop:T,ondurationchange:T,onemptied:T,onended:T,onerror:T,onfocus:T,onformdata:T,oninput:T,oninvalid:T,onkeydown:T,onkeypress:T,onkeyup:T,onload:T,onloadeddata:T,onloadedmetadata:T,onloadstart:T,onmousedown:T,onmouseenter:T,onmouseleave:T,onmousemove:T,onmouseout:T,onmouseover:T,onmouseup:T,onpaste:T,onpause:T,onplay:T,onplaying:T,onprogress:T,onratechange:T,onreset:T,onresize:T,onscroll:T,onsecuritypolicyviolation:T,onseeked:T,onseeking:T,onselect:T,onslotchange:T,onstalled:T,onsubmit:T,onsuspend:T,ontimeupdate:T,ontoggle:T,onvolumechange:T,onwaiting:T,onwebkitanimationend:T,onwebkitanimationiteration:T,onwebkitanimationstart:T,onwebkittransitionend:T,onwheel:T},A={elements:{a:{[v.attribute]:{href:S},[v.property]:{href:S}},area:{[v.attribute]:{href:S},[v.property]:{href:S}},button:{[v.attribute]:{formaction:S},[v.property]:{formAction:S}},embed:{[v.attribute]:{src:T},[v.property]:{src:T}},form:{[v.attribute]:{action:S},[v.property]:{action:S}},frame:{[v.attribute]:{src:S},[v.property]:{src:S}},iframe:{[v.attribute]:{src:S},[v.property]:{src:S,srcdoc:T}},input:{[v.attribute]:{formaction:S},[v.property]:{formAction:S}},link:{[v.attribute]:{href:T},[v.property]:{href:T}},object:{[v.attribute]:{codebase:T,data:T},[v.property]:{codeBase:T,data:T}},script:{[v.attribute]:{src:T,text:T},[v.property]:{src:T,text:T,innerText:T,textContent:T}},style:{[v.property]:{innerText:T,textContent:T}}},aspects:{[v.attribute]:Object.assign({},O),[v.property]:Object.assign({innerHTML:T},O),[v.event]:Object.assign({},O)}};function k(e,t){const s={};for(const n in t){const i=e[n],r=t[n];switch(i){case null:break;case void 0:s[n]=r;break;default:s[n]=i}}for(const t in e)t in s||(s[t]=e[t]);return Object.freeze(s)}function j(e,t){const s={};for(const n in t){const i=e[n],r=t[n];switch(i){case null:break;case void 0:s[n]=k(r,{});break;default:s[n]=k(i,r)}}for(const t in e)t in s||(s[t]=k(e[t],{}));return Object.freeze(s)}function B(e,t){const s={};for(const n in t){const i=e[n],r=t[n];switch(i){case null:break;case void 0:s[n]=j(i,{});break;default:s[n]=j(i,r)}}for(const t in e)t in s||(s[t]=j(e[t],{}));return Object.freeze(s)}function $(e,t,s,n,i){const r=e[s];if(r){const e=r[n];if(e)return e(t,s,n,i)}}const N=Object.freeze({create(e={}){var t,s;const n=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}}(),i=(r=null!==(s=e.guards)&&void 0!==s?s:{},o=A,Object.freeze({elements:r.elements?B(r.elements,o.elements):o.elements,aspects:r.aspects?j(r.aspects,o.aspects):o.aspects}));var r,o;return Object.freeze({createHTML:e=>n.createHTML(e),protect(e,t,s,n){var r;const o=(null!=e?e:"").toLowerCase(),l=i.elements[o];if(l){const i=$(l,e,t,s,n);if(i)return i}return null!==(r=$(i.aspects,e,t,s,n))&&void 0!==r?r:n}})}});class E{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,n=this.sub2;void 0!==t&&t.handleChange(s,e),void 0!==n&&n.handleChange(s,e)}else for(let n=0,i=t.length;n<i;++n)t[n].handleChange(s,e)}}class M{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,n;let i;i=t?null!==(s=this.subscribers[t])&&void 0!==s?s:this.subscribers[t]=new E(this.subject):null!==(n=this.subjectSubscribers)&&void 0!==n?n:this.subjectSubscribers=new E(this.subject),i.subscribe(e)}unsubscribe(e,t){var s,n;t?null===(s=this.subscribers[t])||void 0===s||s.unsubscribe(e):null===(n=this.subjectSubscribers)||void 0===n||n.unsubscribe(e)}}const I=Object.freeze({unknown:void 0,coupled:1}),V=u.getById(l.observable,(()=>{const e=b.enqueue,t=/(:|&&|\|\||if)/,s=new WeakMap;let n,i=e=>{throw u.error(1101)};function r(e){var t;let n=null!==(t=e.$fastController)&&void 0!==t?t:s.get(e);return void 0===n&&(Array.isArray(e)?n=i(e):s.set(e,n=new M(e))),n}const o=g();class l{constructor(e){this.name=e,this.field=`_${e}`,this.callback=`${e}Changed`}getValue(e){return void 0!==n&&n.watch(e,this.name),e[this.field]}setValue(e,t){const s=this.field,n=e[s];if(n!==t){e[s]=t;const i=e[this.callback];a(i)&&i.call(e,n,t),r(e).notify(this.name)}}}class d extends E{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,this.toJSON=h}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!==I.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=n;let i;n=this.needsRefresh?this:void 0,this.needsRefresh=this.isVolatileBinding;try{i=this.expression(e,t)}finally{n=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=r(e),o=null===s?this.first:{};if(o.propertySource=e,o.propertyName=t,o.notifier=i,i.subscribe(this,t),null!==s){if(!this.needsRefresh){let t;n=void 0,t=s.propertySource[s.propertyName],n=this,e===t&&(this.needsRefresh=!0)}s.next=o}this.last=o}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 Object.freeze({setArrayObserverFactory(e){i=e},getNotifier:r,track(e,t){n&&n.watch(e,t)},trackVolatile(){n&&(n.needsRefresh=!0)},notify(e,t){r(e).notify(t)},defineProperty(e,t){c(t)&&(t=new l(t)),o(e).push(t),Reflect.defineProperty(e,t.name,{enumerable:!0,get(){return t.getValue(this)},set(e){t.setValue(this,e)}})},getAccessors:o,binding(e,t,s=this.isVolatileBinding(e)){return new d(e,t,s)},isVolatileBinding:e=>t.test(e.toString())})}));function z(e,t){V.defineProperty(e,t)}function L(e,t,s){return Object.assign({},s,{get(){return V.trackVolatile(),s.get.apply(this)}})}const F=u.getById(l.contextEvent,(()=>{let e=null;return{get:()=>e,set(t){e=t}}})),P=Object.freeze({default:{index:0,length:0,get event(){return P.getEvent()},eventDetail(){return this.event.detail},eventTarget(){return this.event.target}},getEvent:()=>F.get(),setEvent(e){F.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}}const R=Object.freeze({reset:1,splice:2,optimized:3}),D=new _(0,f,0);D.reset=!0;const H=[D];function U(e,t,s,n,i,r){let o=0,l=0;const a=Math.min(s-t,r-i);if(0===t&&0===i&&(o=function(e,t,s){for(let n=0;n<s;++n)if(e[n]!==t[n])return n;return s}(e,n,a)),s===e.length&&r===n.length&&(l=function(e,t,s){let n=e.length,i=t.length,r=0;for(;r<s&&e[--n]===t[--i];)r++;return r}(e,n,a-o)),i+=o,r-=l,(s-=l)-(t+=o)==0&&r-i==0)return f;if(t===s){const e=new _(t,[],0);for(;i<r;)e.removed.push(n[i++]);return[e]}if(i===r)return[new _(t,[],s-t)];const c=function(e){let t=e.length-1,s=e[0].length-1,n=e[t][s];const i=[];for(;t>0||s>0;){if(0===t){i.push(2),s--;continue}if(0===s){i.push(3),t--;continue}const r=e[t-1][s-1],o=e[t-1][s],l=e[t][s-1];let a;a=o<l?o<r?o:r:l<r?l:r,a===r?(r===n?i.push(0):(i.push(1),n=r),t--,s--):a===o?(i.push(3),t--,n=o):(i.push(2),s--,n=l)}return i.reverse()}(function(e,t,s,n,i,r){const o=r-i+1,l=s-t+1,a=new Array(o);let c,h;for(let e=0;e<o;++e)a[e]=new Array(l),a[e][0]=e;for(let e=0;e<l;++e)a[0][e]=e;for(let s=1;s<o;++s)for(let r=1;r<l;++r)e[t+r-1]===n[i+s-1]?a[s][r]=a[s-1][r-1]:(c=a[s-1][r]+1,h=a[s][r-1]+1,a[s][r]=c<h?c:h);return a}(e,t,s,n,i,r)),h=[];let d,u=t,p=i;for(let e=0;e<c.length;++e)switch(c[e]){case 0:void 0!==d&&(h.push(d),d=void 0),u++,p++;break;case 1:void 0===d&&(d=new _(u,[],0)),d.addedCount++,u++,d.removed.push(n[p]),p++;break;case 2:void 0===d&&(d=new _(u,[],0)),d.addedCount++,u++;break;case 3:void 0===d&&(d=new _(u,[],0)),d.removed.push(n[p]),p++}return void 0!==d&&h.push(d),h}function q(e,t){let s=!1,n=0;for(let a=0;a<t.length;a++){const c=t[a];if(c.index+=n,s)continue;const h=(i=e.index,r=e.index+e.removed.length,o=c.index,l=c.index+c.addedCount,r<o||l<i?-1:r===o||l===i?0:i<o?r<l?r-o:l-o:l<r?l-i:r-i);if(h>=0){t.splice(a,1),a--,n-=c.addedCount-c.removed.length,e.addedCount+=c.addedCount-h;const i=e.removed.length+c.removed.length-h;if(e.addedCount||i){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(a,0,e),a++;const i=e.addedCount-e.removed.length;c.index+=i,n+=i}}var i,r,o,l;s||t.push(e)}let Q=Object.freeze({support:R.optimized,normalize:(e,t,s)=>void 0===e?void 0===s?f:s.length>1?function(e,t){let s=[];const n=[];for(let e=0,s=t.length;e<s;e++)q(t[e],n);for(let t=0,i=n.length;t<i;++t){const i=n[t];1!==i.addedCount||1!==i.removed.length?s=s.concat(U(e,i.index,i.index+i.addedCount,i.removed,0,i.removed.length)):i.removed[0]!==e[i.index]&&s.push(i)}return s}(t,s):s:H,pop(e,t,s,n){const i=e.length>0,r=s.apply(e,n);return i&&t.addSplice(new _(e.length,[r],0)),r},push(e,t,s,n){const i=s.apply(e,n);return t.addSplice(new _(e.length-n.length,[],n.length).adjustTo(e)),i},reverse(e,t,s,n){const i=s.apply(e,n);return t.reset(e),i},shift(e,t,s,n){const i=e.length>0,r=s.apply(e,n);return i&&t.addSplice(new _(0,[r],0)),r},sort(e,t,s,n){const i=s.apply(e,n);return t.reset(e),i},splice(e,t,s,n){const i=s.apply(e,n);return t.addSplice(new _(+n[0],i,n.length>2?n.length-2:0).adjustTo(e)),i},unshift(e,t,s,n){const i=s.apply(e,n);return t.addSplice(new _(0,[],n.length).adjustTo(e)),i}});const J=Object.freeze({reset:H,setDefaultStrategy(e){Q=e}});function W(e,t,s){Reflect.defineProperty(e,t,{value:s,enumerable:!1})}class K extends E{constructor(e){super(e),this.oldCollection=void 0,this.splices=void 0,this.needsQueue=!0,this._strategy=null,this._lengthObserver=void 0,this.call=this.flush,W(e,"$fastController",this)}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}subscribe(e){this.flush(),super.subscribe(e)}addSplice(e){void 0===this.splices?this.splices=[e]:this.splices.push(e),this.enqueue()}reset(e){this.oldCollection=e,this.enqueue()}flush(){var e;const t=this.splices,s=this.oldCollection;void 0===t&&void 0===s||(this.needsQueue=!0,this.splices=void 0,this.oldCollection=void 0,this.notify((null!==(e=this._strategy)&&void 0!==e?e:Q).normalize(s,this.subject,t)))}enqueue(){this.needsQueue&&(this.needsQueue=!1,b.enqueue(this))}}let G=!1;const X=Object.freeze({enable(){if(G)return;G=!0,V.setArrayObserverFactory((e=>new K(e)));const e=Array.prototype;e.$fastPatch||(W(e,"$fastPatch",1),[e.pop,e.push,e.reverse,e.shift,e.sort,e.splice,e.unshift].forEach((t=>{e[t.name]=function(...e){var s;const n=this.$fastController;return void 0===n?t.apply(this,e):(null!==(s=n.strategy)&&void 0!==s?s:Q)[t.name](this,n,t,e)}})))}});function Y(e){if(!e)return 0;let t=e.$fastController;return void 0===t&&(X.enable(),t=V.getNotifier(e)),V.track(t.lengthObserver,"length"),e.length}let Z;function ee(e){return e.map((e=>e instanceof te?ee(e.styles):[e])).reduce(((e,t)=>e.concat(t)),[])}class te{constructor(e){this.styles=e,this.targets=new WeakSet,this._strategy=null,this.behaviors=e.map((e=>e instanceof te?e.behaviors:null)).reduce(((e,t)=>null===t?e:null===e?t:e.concat(t)),null)}get strategy(){return null===this._strategy&&this.withStrategy(Z),this._strategy}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(ee(this.styles)),this}static setDefaultStrategy(e){Z=e}static normalize(e){return void 0===e?void 0:Array.isArray(e)?new te(e):e instanceof te?e:new te([e])}}te.supportsAdoptedStyleSheets=Array.isArray(document.adoptedStyleSheets)&&"replace"in CSSStyleSheet.prototype;const se=p(),ne=Object.freeze({getForInstance:se.getForInstance,getByType:se.getByType,define:e=>(se.register({type:e}),e)});function ie(){return function(e){ne.define(e)}}function re(e,t){const s=[];let n="";const i=[],r=e=>{i.push(e)};for(let i=0,o=e.length-1;i<o;++i){n+=e[i];let o=t[i];void 0!==ne.getForInstance(o)&&(o=o.createCSS(r)),o instanceof te||o instanceof CSSStyleSheet?(""!==n.trim()&&(s.push(n),n=""),s.push(o)):n+=o}return n+=e[e.length-1],""!==n.trim()&&s.push(n),{styles:s,behaviors:i}}const oe=(e,...t)=>{const{styles:s,behaviors:n}=re(e,t),i=new te(s);return n.length?i.withBehaviors(...n):i};class le{constructor(e,t){this.behaviors=t,this.css="";const s=e.reduce(((e,t)=>(c(t)?this.css+=t:e.push(t),e)),[]);s.length&&(this.styles=new te(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)}}ne.define(le);const ae=oe.partial=(e,...t)=>{const{styles:s,behaviors:n}=re(e,t);return new le(s,n)},ce=`fast-${Math.random().toString(36).substring(2,8)}`,he=`${ce}{`,de=`}${ce}`,ue=de.length;let fe=0;const pe=()=>`${ce}-${++fe}`,ge=Object.freeze({interpolation:e=>`${he}${e}${de}`,attribute:e=>`${pe()}="${he}${e}${de}"`,comment:e=>`\x3c!--${he}${e}${de}--\x3e`}),be=Object.freeze({parse(e,t){const s=e.split(he);if(1===s.length)return null;const n=[];for(let e=0,i=s.length;e<i;++e){const i=s[e],r=i.indexOf(de);let o;if(-1===r)o=i;else{const e=i.substring(0,r);n.push(t[e]),o=i.substring(r+ue)}""!==o&&n.push(o)}return n}}),ve=p(),ye=Object.freeze({getForInstance:ve.getForInstance,getByType:ve.getByType,define:(e,t)=>((t=t||{}).type=e,ve.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?v.tokenList:v.property;break;case"?":e.targetAspect=t.substring(1),e.aspectType=v.booleanAttribute;break;case"@":e.targetAspect=t.substring(1),e.aspectType=v.event;break;default:e.targetAspect=t,e.aspectType=v.attribute}else e.aspectType=v.content}});function me(e){return function(t){ye.define(t,e)}}class we{constructor(e,t,s=!1){this.evaluate=e,this.policy=t,this.isVolatile=s}}class xe{constructor(e){this.options=e,this.toJSON=h}createHTML(e){return ge.attribute(e(this))}createBehavior(){return this}}class Ce extends we{createObserver(e,t){return V.binding(this.evaluate,t,this.isVolatile)}}class Se extends we{constructor(){super(...arguments),this.toJSON=h}createObserver(){return this}bind(e){return this.evaluate(e.source,e.context)}}const Te={[v.attribute]:C.setAttribute,[v.booleanAttribute]:C.setBooleanAttribute,[v.property]:(e,t,s)=>e[t]=s,[v.content]:function(e,t,s,n){if(null==s&&(s=""),s.create){e.textContent="";let t=e.$fastView;void 0===t?t=s.create():e.$fastTemplate!==s&&(t.isComposed&&(t.remove(),t.unbind()),t=s.create()),t.isComposed?t.needsBindOnly&&(t.needsBindOnly=!1,t.bind(n.source,n.context)):(t.isComposed=!0,t.bind(n.source,n.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}},[v.tokenList]:function(e,t,s){var n;const i=`${this.id}-t`,r=null!==(n=e[i])&&void 0!==n?n:e[i]={v:0,cv:Object.create(null)},o=r.cv;let l=r.v;const a=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]=l,a.add(s))}}if(r.v=l+1,0!==l){l-=1;for(const e in o)o[e]===l&&a.remove(e)}},[v.event]:()=>{}};class Oe{constructor(e){this.dataBinding=e,this.updateTarget=null,this.aspectType=v.content}createHTML(e){return ge.interpolation(e(this))}createBehavior(){var e;if(null===this.updateTarget){const t=Te[this.aspectType],s=null!==(e=this.dataBinding.policy)&&void 0!==e?e:this.policy;if(!t)throw u.error(1205);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];switch(this.aspectType){case v.event:s[this.data]=e,s.addEventListener(this.targetAspect,this,this.dataBinding.options);break;case v.content:e.onUnbind(this);default:const n=null!==(t=s[this.data])&&void 0!==t?t:s[this.data]=this.dataBinding.createObserver(this,this);n.target=s,n.controller=e,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){P.setEvent(e);const s=this.dataBinding.evaluate(t.source,t.context);P.setEvent(null),!0!==s&&e.preventDefault()}}handleChange(e,t){const s=t.target,n=t.controller;this.updateTarget(s,this.targetAspect,t.bind(n),n)}}function Ae(e,t,s=V.isVolatileBinding(e)){return new Ce(e,t,s)}function ke(e,t){return new Se(e,t)}function je(e,t){const s=new Ce(e);return s.options=t,s}function Be(e){return a(e)?Ae(e):e instanceof we?e:ke((()=>e))}function $e(e,t){const s=e.parentNode;let n,i=e;for(;i!==t;)n=i.nextSibling,s.removeChild(i),i=n;s.removeChild(t)}ye.define(Oe,{aspected:!0});class Ne{constructor(e,t,s){this.fragment=e,this.factories=t,this.targets=s,this.behaviors=null,this.unbindables=[],this.source=null,this.isBound=!1,this.sourceLifetime=I.unknown,this.context=this,this.index=0,this.length=0,this.toJSON=h,this.firstChild=e.firstChild,this.lastChild=e.lastChild}get event(){return P.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}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 n,i=this.firstChild;for(;i!==t;)n=i.nextSibling,s.insertBefore(i,e),i=n;s.insertBefore(t,e)}}remove(){const e=this.fragment,t=this.lastChild;let s,n=this.firstChild;for(;n!==t;)s=n.nextSibling,e.appendChild(n),n=s;e.appendChild(t)}dispose(){$e(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 n=this.factories;for(let e=0,t=n.length;e<t;++e){const t=n[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){$e(e[0].firstChild,e[e.length-1].lastChild);for(let t=0,s=e.length;t<s;++t)e[t].unbind()}}}V.defineProperty(Ne.prototype,"index"),V.defineProperty(Ne.prototype,"length");const Ee=(e,t)=>`${e}.${t}`,Me={},Ie={index:0,node:null};function Ve(e){e.startsWith("fast-")||u.warn(1204,{name:e})}const ze=new Proxy(document.createElement("div"),{get(e,t){Ve(t);const s=Reflect.get(e,t);return a(s)?s.bind(e):s},set:(e,t,s)=>(Ve(t),Reflect.set(e,t,s))});class Le{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,n,i){var r,o;this.nodeIds.has(s)||(this.nodeIds.add(s),this.addTargetDescriptor(t,s,n)),e.id=null!==(r=e.id)&&void 0!==r?r:pe(),e.targetNodeId=s,e.targetTagName=i,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 n=this.descriptors;if("r"===t||"h"===t||n[t])return;if(!n[e]){const t=e.lastIndexOf("."),s=e.substring(0,t),n=parseInt(e.substring(t+1));this.addTargetDescriptor(s,e,n)}let i=Me[t];if(!i){const n=`_${t}`;Me[t]=i={get(){var t;return null!==(t=this[n])&&void 0!==t?t:this[n]=this[e].childNodes[s]}}}n[t]=i}createView(e){const t=this.fragment.cloneNode(!0),s=Object.create(this.proto);s.r=t,s.h=null!=e?e:ze;for(const e of this.nodeIds)s[e];return new Ne(t,this.factories,s)}}function Fe(e,t,s,n,i,r=!1){const o=s.attributes,l=e.directives;for(let a=0,c=o.length;a<c;++a){const h=o[a],d=h.value,u=be.parse(d,l);let f=null;null===u?r&&(f=new Oe(ke((()=>d),e.policy)),ye.assignAspect(f,h.name)):f=Re.aggregate(u,e.policy),null!==f&&(s.removeAttributeNode(h),a--,c--,e.addFactory(f,t,n,i,s.tagName))}}function Pe(e,t,s){let n=0,i=t.firstChild;for(;i;){const t=_e(e,s,i,n);i=t.node,n=t.index}}function _e(e,t,s,n){const i=Ee(t,n);switch(s.nodeType){case 1:Fe(e,t,s,i,n),Pe(e,s,i);break;case 3:return function(e,t,s,n,i){const r=be.parse(t.textContent,e.directives);if(null===r)return Ie.node=t.nextSibling,Ie.index=i+1,Ie;let o,l=o=t;for(let t=0,a=r.length;t<a;++t){const a=r[t];0!==t&&(i++,n=Ee(s,i),o=l.parentNode.insertBefore(document.createTextNode(""),l.nextSibling)),c(a)?o.textContent=a:(o.textContent=" ",ye.assignAspect(a),e.addFactory(a,s,n,i,null)),l=o}return Ie.index=i+1,Ie.node=l.nextSibling,Ie}(e,s,t,i,n);case 8:const r=be.parse(s.data,e.directives);null!==r&&e.addFactory(Re.aggregate(r),t,i,n,null)}return Ie.index=n+1,Ie.node=s.nextSibling,Ie}const Re={compile(e,t,s=C.policy){let n;if(c(e)){n=document.createElement("TEMPLATE"),n.innerHTML=s.createHTML(e);const t=n.content.firstElementChild;null!==t&&"TEMPLATE"===t.tagName&&(n=t)}else n=e;const i=document.adoptNode(n.content),r=new Le(i,t,s);var o,l;return Fe(r,"",n,"h",0,!0),o=i.firstChild,l=t,(o&&8==o.nodeType&&null!==be.parse(o.data,l)||1===i.childNodes.length&&Object.keys(t).length>0)&&i.insertBefore(document.createComment(""),i.firstChild),Pe(r,i,"r"),Ie.node=null,r.freeze()},setDefaultStrategy(e){this.compile=e},aggregate(e,t=C.policy){if(1===e.length)return e[0];let s,n,i,r=!1;const o=e.length,l=e.map((e=>c(e)?()=>e:(s=e.sourceAspect||s,n=e.dataBinding||n,r=r||e.dataBinding.isVolatile,i=i||e.dataBinding.policy,e.dataBinding.evaluate)));n.evaluate=(e,t)=>{let s="";for(let n=0;n<o;++n)s+=l[n](e,t);return s},n.isVolatile=r,n.policy=null!=i?i:t;const a=new Oe(n);return ye.assignAspect(a,s),a}},De=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;function He(e,t,s,n=ye.getForInstance(e)){if(n.aspected){const s=De.exec(t);null!==s&&ye.assignAspect(e,s[2])}return e.createHTML(s)}class Ue{constructor(e,t={},s){this.policy=s,this.result=null,this.toJSON=h,this.html=e,this.factories=t}create(e){return null===this.result&&(this.result=Re.compile(this.html,this.factories,this.policy)),this.result.createView(e)}withPolicy(e){if(this.result)throw u.error(1208);if(this.policy)throw u.error(1207);return this.policy=e,this}render(e,t,s){const n=this.create(s);return n.bind(e),n.appendTo(t),n}static create(e,t,s){let n="";const i=Object.create(null),r=e=>{var t;const s=null!==(t=e.id)&&void 0!==t?t:e.id=pe();return i[s]=e,s};for(let s=0,i=e.length-1;s<i;++s){const i=e[s];let o,l=t[s];if(n+=i,a(l))l=new Oe(Ae(l));else if(l instanceof we)l=new Oe(l);else if(!(o=ye.getForInstance(l))){const e=l;l=new Oe(ke((()=>e)))}n+=He(l,i,r,o)}return new Ue(n+e[e.length-1],i,s)}}function qe(e,...t){if(Array.isArray(e)&&Array.isArray(e.raw))return Ue.create(e,t);throw u.error(1206)}class Qe extends xe{bind(e){e.source[this.options]=e.targets[this.targetNodeId]}}ye.define(Qe);const Je=e=>new Qe(e);function We(e,t){const s=a(e)?e:()=>e,n=a(t)?t:()=>t;return(e,t)=>s(e,t)?n(e,t):null}const Ke=Object.freeze({positioning:!1,recycle:!0});function Ge(e,t,s,n){e.context.parent=n.source,e.context.parentContext=n.context,e.bind(t[s])}function Xe(e,t,s,n){e.context.parent=n.source,e.context.parentContext=n.context,e.context.length=t.length,e.context.index=s,e.bind(t[s])}class Ye{constructor(e){this.directive=e,this.items=null,this.itemsObserver=null,this.bindView=Ge,this.views=[],this.itemsBindingObserver=e.dataBinding.createObserver(e,this),this.templateBindingObserver=e.templateBinding.createObserver(e,this),e.options.positioning&&(this.bindView=Xe)}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),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():this.updateViews(t)}}observeItems(e=!1){if(!this.items)return void(this.items=f);const t=this.itemsObserver,s=this.itemsObserver=V.getNotifier(this.items),n=t!==s;n&&null!==t&&t.unsubscribe(this),(n||e)&&s.subscribe(this)}updateViews(e){const t=this.views,s=this.bindView,n=this.items,i=this.template,r=this.controller,o=this.directive.options.recycle,l=[];let a=0,c=0;for(let h=0,d=e.length;h<d;++h){const d=e[h],u=d.removed;let f=0,p=d.index;const g=p+d.addedCount,b=t.splice(d.index,u.length),v=c=l.length+b.length;for(;p<g;++p){const e=t[p],h=e?e.firstChild:this.location;let d;o&&c>0?(f<=v&&b.length>0?(d=b[f],f++):(d=l[a],a++),c--):d=i.create(),t.splice(p,0,d),s(d,n,p,r),d.insertBefore(h)}b[f]&&l.push(...b.slice(f))}for(let e=a,t=l.length;e<t;++e)l[e].dispose();if(this.directive.options.positioning)for(let e=0,s=t.length;e<s;++e){const n=t[e].context;n.length=s,n.index=e}}refreshAllViews(e=!1){const t=this.items,s=this.template,n=this.location,i=this.bindView,r=this.controller;let o=t.length,l=this.views,a=l.length;if(0!==o&&!e&&this.directive.options.recycle||(Ne.disposeContiguousBatch(l),a=0),0===a){this.views=l=new Array(o);for(let e=0;e<o;++e){const o=s.create();i(o,t,e,r),l[e]=o,o.insertBefore(n)}}else{let e=0;for(;e<o;++e)if(e<a){i(l[e],t,e,r)}else{const o=s.create();i(o,t,e,r),l.push(o),o.insertBefore(n)}const c=l.splice(e,a-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)e[t].unbind()}}class Ze{constructor(e,t,s){this.dataBinding=e,this.templateBinding=t,this.options=s,X.enable()}createHTML(e){return ge.comment(e(this))}createBehavior(){return new Ye(this)}}function et(e,t,s=Ke){const n=Be(e),i=Be(t);return new Ze(n,i,Object.assign(Object.assign({},Ke),s))}ye.define(Ze);const tt=e=>1===e.nodeType,st=e=>e?t=>1===t.nodeType&&t.matches(e):tt;class nt extends xe{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,f),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 it extends nt{observe(e){e.addEventListener("slotchange",this)}disconnect(e){e.removeEventListener("slotchange",this)}getNodes(e){return e.assignedNodes(this.options)}handleEvent(e){const t=e.currentTarget;this.updateTarget(this.getSource(t),this.computeNodes(t))}}function rt(e){return c(e)&&(e={property:e}),new it(e)}ye.define(it);class ot extends nt{constructor(e){super(e),this.observerProperty=`${this.id}-o`,this.handleEvent=(e,t)=>{const s=t.target;this.updateTarget(this.getSource(s),this.computeNodes(s))},e.childList=!0}observe(e){let t=e[this.observerProperty];t||(t=new MutationObserver(this.handleEvent),t.toJSON=h,t.target=e,e[this.observerProperty]=t),t.observe(e,this.options)}disconnect(e){const t=e[this.observerProperty];t.target=null,t.disconnect()}getNodes(e){return"selector"in this.options?Array.from(e.querySelectorAll(this.options.selector)):Array.from(e.childNodes)}}function lt(e){return c(e)&&(e={property:e}),new ot(e)}ye.define(ot);class at{constructor(e){this.html=e}createHTML(){return this.html}}function ct(e){return new at(e)}ye.define(at);const ht=Object.freeze({locate:g()}),dt={toView:e=>e?"true":"false",fromView:e=>null!=e&&"false"!==e&&!1!==e&&0!==e};function ut(e){if(null==e)return null;const t=1*e;return isNaN(t)?null:t}const ft={toView(e){const t=ut(e);return t?t.toString():t},fromView:ut};class pt{constructor(e,t,s=t.toLowerCase(),n="reflect",i){this.guards=new Set,this.Owner=e,this.name=t,this.attribute=s,this.mode=n,this.converter=i,this.fieldName=`_${t}`,this.callbackName=`${t}Changed`,this.hasCallback=this.callbackName in e.prototype,"boolean"===n&&void 0===i&&(this.converter=dt)}setValue(e,t){const s=e[this.fieldName],n=this.converter;void 0!==n&&(t=n.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 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,s=this.guards;s.has(e)||"fromView"===t||b.enqueue((()=>{s.add(e);const n=e[this.fieldName];switch(t){case"reflect":const t=this.converter;C.setAttribute(e,this.attribute,void 0!==t?t.toView(n):n);break;case"boolean":C.setBooleanAttribute(e,this.attribute,n)}s.delete(e)}))}static collect(e,...t){const s=[];t.push(ht.locate(e));for(let n=0,i=t.length;n<i;++n){const i=t[n];if(void 0!==i)for(let t=0,n=i.length;t<n;++t){const n=i[t];c(n)?s.push(new pt(e,n)):s.push(new pt(e,n.property,n.attribute,n.mode,n.converter))}}return s}}function gt(e,t){let s;function n(e,t){arguments.length>1&&(s.property=t),ht.locate(e.constructor).push(s)}return arguments.length>1?(s={},void n(e,t)):(s=void 0===e?{}:e,n)}const bt={mode:"open"},vt={},yt=new Set,mt=u.getById(l.elementRegistry,(()=>p()));class wt{constructor(e,t=e.definition){var s;this.platformDefined=!1,c(t)&&(t={name:t}),this.type=e,this.name=t.name,this.template=t.template,this.registry=null!==(s=t.registry)&&void 0!==s?s:customElements;const n=e.prototype,i=pt.collect(e,t.attributes),r=new Array(i.length),o={},l={};for(let e=0,t=i.length;e<t;++e){const t=i[e];r[e]=t.attribute,o[t.name]=t,l[t.attribute]=t,V.defineProperty(n,t)}Reflect.defineProperty(e,"observedAttributes",{value:r,enumerable:!0}),this.attributes=i,this.propertyLookup=o,this.attributeLookup=l,this.shadowOptions=void 0===t.shadowOptions?bt:null===t.shadowOptions?void 0:Object.assign(Object.assign({},bt),t.shadowOptions),this.elementOptions=void 0===t.elementOptions?vt:Object.assign(Object.assign({},vt),t.elementOptions),this.styles=te.normalize(t.styles),mt.register(this)}get isDefined(){return this.platformDefined}define(e=this.registry){const t=this.type;return e.get(this.name)||(this.platformDefined=!0,e.define(this.name,t,this.elementOptions)),this}static compose(e,t){return yt.has(e)||mt.getByType(e)?new wt(class extends e{},t):new wt(e,t)}static registerBaseType(e){yt.add(e)}}wt.getByType=mt.getByType,wt.getForInstance=mt.getForInstance;const xt={bubbles:!0,composed:!0,cancelable:!0},Ct=new WeakMap;function St(e){var t,s;return null!==(s=null!==(t=e.shadowRoot)&&void 0!==t?t:Ct.get(e))&&void 0!==s?s:null}let Tt;class Ot extends M{constructor(e,t){super(e),this.boundObservables=null,this.needsInitialization=!0,this.hasExistingShadowRoot=!1,this._template=null,this.stage=3,this.guardBehaviorConnection=!1,this.behaviors=null,this._mainStyles=null,this.$fastController=this,this.view=null,this.toJSON=h,this.source=e,this.definition=t;const s=t.shadowOptions;if(void 0!==s){let t=e.shadowRoot;t?this.hasExistingShadowRoot=!0:(t=e.attachShadow(s),"closed"===s.mode&&Ct.set(e,t))}const n=V.getAccessors(e);if(n.length>0){const t=this.boundObservables=Object.create(null);for(let s=0,i=n.length;s<i;++s){const i=n[s].name,r=e[i];void 0!==r&&(delete e[i],t[i]=r)}}}get isConnected(){return V.track(this,"isConnected"),1===this.stage}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 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))}addBehavior(e){var t,s;const n=null!==(t=this.behaviors)&&void 0!==t?t:this.behaviors=new Map,i=null!==(s=n.get(e))&&void 0!==s?s:0;0===i?(n.set(e,1),e.addedCallback&&e.addedCallback(this),!e.connectedCallback||this.guardBehaviorConnection||1!==this.stage&&0!==this.stage||e.connectedCallback(this)):n.set(e,i+1)}removeBehavior(e,t=!1){const s=this.behaviors;if(null===s)return;const n=s.get(e);void 0!==n&&(1===n||t?(s.delete(e),e.disconnectedCallback&&3!==this.stage&&e.disconnectedCallback(this),e.removedCallback&&e.removedCallback(this)):s.set(e,n-1))}addStyles(e){var t;if(!e)return;const s=this.source;if(e instanceof HTMLElement){(null!==(t=St(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=St(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.addBehavior(t[e])}}connect(){if(3!==this.stage)return;if(this.stage=0,null!==this.boundObservables){const e=this.source,t=this.boundObservables,s=Object.keys(t);for(let n=0,i=s.length;n<i;++n){const i=s[n];e[i]=t[i]}this.boundObservables=null}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.needsInitialization?(this.renderTemplate(this.template),this.addStyles(this.mainStyles),this.needsInitialization=!1):null!==this.view&&this.view.bind(this.source),this.stage=1,V.notify(this,"isConnected")}disconnect(){if(1!==this.stage)return;this.stage=2,V.notify(this,"isConnected"),null!==this.view&&this.view.unbind();const e=this.behaviors;if(null!==e)for(const t of e.keys())t.disconnectedCallback&&t.disconnectedCallback(this);this.stage=3}onAttributeChangedCallback(e,t,s){const n=this.definition.attributeLookup[e];void 0!==n&&n.onAttributeChangedCallback(this.source,s)}emit(e,t,s){return 1===this.stage&&this.source.dispatchEvent(new CustomEvent(e,Object.assign(Object.assign({detail:t},xt),s)))}renderTemplate(e){var t;const s=this.source,n=null!==(t=St(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=n.firstChild;null!==e;e=n.firstChild)n.removeChild(e)}e&&(this.view=e.render(s,n,s),this.view.sourceLifetime=I.coupled)}static forCustomElement(e){const t=e.$fastController;if(void 0!==t)return t;const s=wt.getForInstance(e);if(void 0===s)throw u.error(1401);return e.$fastController=new Tt(e,s)}static setStrategy(e){Tt=e}}function At(e){var t;return"adoptedStyleSheets"in e?e:null!==(t=St(e))&&void 0!==t?t:e.getRootNode()}Ot.setStrategy(Ot);class kt{constructor(e){const t=kt.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){const t=At(e);t.adoptedStyleSheets=[...t.adoptedStyleSheets,...this.sheets]}removeStylesFrom(e){const t=At(e),s=this.sheets;t.adoptedStyleSheets=t.adoptedStyleSheets.filter((e=>-1===s.indexOf(e)))}}kt.styleSheetCache=new Map;let jt=0;function Bt(e){return e===document?document.body:e}function $t(e){const t=class extends e{constructor(){super(),Ot.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 wt.registerBaseType(t),t}function Nt(e,t){return a(e)?wt.compose(e,t).define().type:wt.compose(this,e).define().type}te.setDefaultStrategy(te.supportsAdoptedStyleSheets?kt:class{constructor(e){this.styles=e,this.styleClass="fast-"+ ++jt}addStylesTo(e){e=Bt(At(e));const t=this.styles,s=this.styleClass;for(let n=0;n<t.length;n++){const i=document.createElement("style");i.innerHTML=t[n],i.className=s,e.append(i)}}removeStylesFrom(e){const t=(e=Bt(At(e))).querySelectorAll(`.${this.styleClass}`);t[0].parentNode;for(let s=0,n=t.length;s<n;++s)e.removeChild(t[s])}});const Et=Object.assign($t(HTMLElement),{from:function(e){return $t(e)},define:Nt,compose:function(e,t){return a(e)?wt.compose(e,t):wt.compose(this,e)}});function Mt(e){return function(t){Nt(t,e)}}C.setPolicy(N.create());export{X as ArrayObserver,ht as AttributeConfiguration,pt as AttributeDefinition,we as Binding,ne as CSSDirective,ot as ChildrenDirective,Re as Compiler,C as DOM,v as DOMAspect,at as DangerousHTMLDirective,Ot as ElementController,te as ElementStyles,P as ExecutionContext,u as FAST,Et as FASTElement,wt as FASTElementDefinition,Oe as HTMLBindingDirective,ye as HTMLDirective,Ne as HTMLView,ge as Markup,nt as NodeObservationDirective,V as Observable,be as Parser,M as PropertyChangeNotifier,Qe as RefDirective,Ye as RepeatBehavior,Ze as RepeatDirective,it as SlottedDirective,I as SourceLifetime,_ as Splice,J as SpliceStrategy,R as SpliceStrategySupport,xe as StatelessAttachedAttributeDirective,E as SubscriberSet,b as Updates,Ue as ViewTemplate,gt as attr,Ae as bind,dt as booleanConverter,lt as children,g as createMetadataLocator,p as createTypeRegistry,oe as css,ie as cssDirective,ae as cssPartial,Mt as customElement,ct as dangerousHTML,st as elements,f as emptyArray,qe as html,me as htmlDirective,Y as lengthOf,je as listener,Be as normalizeBinding,ft as nullableNumberConverter,z as observable,ke as oneTime,Je as ref,et as repeat,rt as slotted,L as volatile,We as when};
|
package/dist/fast-element.js
CHANGED
|
@@ -1,3 +1,47 @@
|
|
|
1
|
+
let kernelMode;
|
|
2
|
+
const kernelAttr = "fast-kernel";
|
|
3
|
+
try {
|
|
4
|
+
if (document.currentScript) {
|
|
5
|
+
kernelMode = document.currentScript.getAttribute(kernelAttr);
|
|
6
|
+
}
|
|
7
|
+
else {
|
|
8
|
+
const scripts = document.getElementsByTagName("script");
|
|
9
|
+
const currentScript = scripts[scripts.length - 1];
|
|
10
|
+
kernelMode = currentScript.getAttribute(kernelAttr);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
catch (e) {
|
|
14
|
+
kernelMode = "isolate";
|
|
15
|
+
}
|
|
16
|
+
let KernelServiceId;
|
|
17
|
+
switch (kernelMode) {
|
|
18
|
+
case "share": // share the kernel across major versions
|
|
19
|
+
KernelServiceId = Object.freeze({
|
|
20
|
+
updateQueue: 1,
|
|
21
|
+
observable: 2,
|
|
22
|
+
contextEvent: 3,
|
|
23
|
+
elementRegistry: 4,
|
|
24
|
+
});
|
|
25
|
+
break;
|
|
26
|
+
case "share-v2": // only share the kernel with other v2 instances
|
|
27
|
+
KernelServiceId = Object.freeze({
|
|
28
|
+
updateQueue: 1.2,
|
|
29
|
+
observable: 2.2,
|
|
30
|
+
contextEvent: 3.2,
|
|
31
|
+
elementRegistry: 4.2,
|
|
32
|
+
});
|
|
33
|
+
break;
|
|
34
|
+
default:
|
|
35
|
+
// fully isolate the kernel from all other FAST instances
|
|
36
|
+
const postfix = `-${Math.random().toString(36).substring(2, 8)}`;
|
|
37
|
+
KernelServiceId = Object.freeze({
|
|
38
|
+
updateQueue: `1.2${postfix}`,
|
|
39
|
+
observable: `2.2${postfix}`,
|
|
40
|
+
contextEvent: `3.2${postfix}`,
|
|
41
|
+
elementRegistry: `4.2${postfix}`,
|
|
42
|
+
});
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
1
45
|
/**
|
|
2
46
|
* @internal
|
|
3
47
|
*/
|
|
@@ -131,7 +175,7 @@ function createMetadataLocator() {
|
|
|
131
175
|
* The default UpdateQueue.
|
|
132
176
|
* @public
|
|
133
177
|
*/
|
|
134
|
-
const Updates = FAST.getById(
|
|
178
|
+
const Updates = FAST.getById(KernelServiceId.updateQueue, () => {
|
|
135
179
|
const tasks = [];
|
|
136
180
|
const pendingErrors = [];
|
|
137
181
|
const rAF = globalThis.requestAnimationFrame;
|
|
@@ -827,7 +871,7 @@ const SourceLifetime = Object.freeze({
|
|
|
827
871
|
* Common Observable APIs.
|
|
828
872
|
* @public
|
|
829
873
|
*/
|
|
830
|
-
const Observable = FAST.getById(
|
|
874
|
+
const Observable = FAST.getById(KernelServiceId.observable, () => {
|
|
831
875
|
const queueUpdate = Updates.enqueue;
|
|
832
876
|
const volatileRegex = /(:|&&|\|\||if)/;
|
|
833
877
|
const notifierLookup = new WeakMap();
|
|
@@ -1098,7 +1142,7 @@ function volatile(target, name, descriptor) {
|
|
|
1098
1142
|
},
|
|
1099
1143
|
});
|
|
1100
1144
|
}
|
|
1101
|
-
const contextEvent = FAST.getById(
|
|
1145
|
+
const contextEvent = FAST.getById(KernelServiceId.contextEvent, () => {
|
|
1102
1146
|
let current = null;
|
|
1103
1147
|
return {
|
|
1104
1148
|
get() {
|
|
@@ -3755,7 +3799,7 @@ function attr(configOrTarget, prop) {
|
|
|
3755
3799
|
const defaultShadowOptions = { mode: "open" };
|
|
3756
3800
|
const defaultElementOptions = {};
|
|
3757
3801
|
const fastElementBaseTypes = new Set();
|
|
3758
|
-
const fastElementRegistry = FAST.getById(
|
|
3802
|
+
const fastElementRegistry = FAST.getById(KernelServiceId.elementRegistry, () => createTypeRegistry());
|
|
3759
3803
|
/**
|
|
3760
3804
|
* Defines metadata for a FASTElement.
|
|
3761
3805
|
* @public
|
package/dist/fast-element.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=e=>"function"==typeof e,t=e=>"string"==typeof e,s=()=>{};!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}}();const i={configurable:!1,enumerable:!1,writable:!1};void 0===globalThis.FAST&&Reflect.defineProperty(globalThis,"FAST",Object.assign({value:Object.create(null)},i));const n=globalThis.FAST;if(void 0===n.getById){const e=Object.create(null);Reflect.defineProperty(n,"getById",Object.assign({value(t,s){let i=e[t];return void 0===i&&(i=s?e[t]=s():null),i}},i))}void 0===n.error&&Object.assign(n,{warn(){},error:e=>new Error(`Error ${e}`),addMessages(){}});const r=Object.freeze([]);function o(){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 l(){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}}const a=n.getById(1,(()=>{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 l(t){e.push(t),e.length<2&&(i?s(o):o())}return Object.freeze({enqueue:l,next:()=>new Promise(l),process:o,setMode:e=>i=e})})),c=Object.freeze({none:0,attribute:1,booleanAttribute:2,property:3,content:4,tokenList:5,event:6}),h=e=>e,d=globalThis.trustedTypes?globalThis.trustedTypes.createPolicy("fast-html",{createHTML:h}):{createHTML:h};let u=Object.freeze({createHTML:e=>d.createHTML(e),protect:(e,t,s,i)=>i});const f=u,p=Object.freeze({queueUpdate:a.enqueue,nextUpdate:a.next,processUpdates:a.process,get policy(){return u},setPolicy(e){if(u!==f)throw n.error(1201);u=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 g(e,s,i,n){return(e,s,i,...r)=>{t(i)&&(i=i.replace("javascript:","")),n(e,s,i,...r)}}function b(e,t,s,i){throw new Error(`${s} on ${null!=e?e:"text"} is blocked by the current DOMPolicy.`)}const v={onabort:b,onauxclick:b,onbeforeinput:b,onbeforematch:b,onblur:b,oncancel:b,oncanplay:b,oncanplaythrough:b,onchange:b,onclick:b,onclose:b,oncontextlost:b,oncontextmenu:b,oncontextrestored:b,oncopy:b,oncuechange:b,oncut:b,ondblclick:b,ondrag:b,ondragend:b,ondragenter:b,ondragleave:b,ondragover:b,ondragstart:b,ondrop:b,ondurationchange:b,onemptied:b,onended:b,onerror:b,onfocus:b,onformdata:b,oninput:b,oninvalid:b,onkeydown:b,onkeypress:b,onkeyup:b,onload:b,onloadeddata:b,onloadedmetadata:b,onloadstart:b,onmousedown:b,onmouseenter:b,onmouseleave:b,onmousemove:b,onmouseout:b,onmouseover:b,onmouseup:b,onpaste:b,onpause:b,onplay:b,onplaying:b,onprogress:b,onratechange:b,onreset:b,onresize:b,onscroll:b,onsecuritypolicyviolation:b,onseeked:b,onseeking:b,onselect:b,onslotchange:b,onstalled:b,onsubmit:b,onsuspend:b,ontimeupdate:b,ontoggle:b,onvolumechange:b,onwaiting:b,onwebkitanimationend:b,onwebkitanimationiteration:b,onwebkitanimationstart:b,onwebkittransitionend:b,onwheel:b},y={elements:{a:{[c.attribute]:{href:g},[c.property]:{href:g}},area:{[c.attribute]:{href:g},[c.property]:{href:g}},button:{[c.attribute]:{formaction:g},[c.property]:{formAction:g}},embed:{[c.attribute]:{src:b},[c.property]:{src:b}},form:{[c.attribute]:{action:g},[c.property]:{action:g}},frame:{[c.attribute]:{src:g},[c.property]:{src:g}},iframe:{[c.attribute]:{src:g},[c.property]:{src:g,srcdoc:b}},input:{[c.attribute]:{formaction:g},[c.property]:{formAction:g}},link:{[c.attribute]:{href:b},[c.property]:{href:b}},object:{[c.attribute]:{codebase:b,data:b},[c.property]:{codeBase:b,data:b}},script:{[c.attribute]:{src:b,text:b},[c.property]:{src:b,text:b,innerText:b,textContent:b}},style:{[c.property]:{innerText:b,textContent:b}}},aspects:{[c.attribute]:Object.assign({},v),[c.property]:Object.assign({innerHTML:b},v),[c.event]:Object.assign({},v)}};function m(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 w(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]=m(r,{});break;default:s[i]=m(n,r)}}for(const t in e)t in s||(s[t]=m(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]=w(n,{});break;default:s[i]=w(n,r)}}for(const t in e)t in s||(s[t]=w(e[t],{}));return Object.freeze(s)}function C(e,t,s,i,n){const r=e[s];if(r){const e=r[i];if(e)return e(t,s,i,n)}}const S=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=y,Object.freeze({elements:r.elements?x(r.elements,o.elements):o.elements,aspects:r.aspects?w(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(),l=n.elements[o];if(l){const n=C(l,e,t,s,i);if(n)return n}return null!==(r=C(n.aspects,e,t,s,i))&&void 0!==r?r:i}})}});class T{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 O{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 T(this.subject):null!==(i=this.subjectSubscribers)&&void 0!==i?i:this.subjectSubscribers=new T(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=Object.freeze({unknown:void 0,coupled:1}),B=n.getById(2,(()=>{const i=a.enqueue,r=/(:|&&|\|\||if)/,o=new WeakMap;let c,h=e=>{throw n.error(1101)};function d(e){var t;let s=null!==(t=e.$fastController)&&void 0!==t?t:o.get(e);return void 0===s&&(Array.isArray(e)?s=h(e):o.set(e,s=new O(e))),s}const u=l();class f{constructor(e){this.name=e,this.field=`_${e}`,this.callback=`${e}Changed`}getValue(e){return void 0!==c&&c.watch(e,this.name),e[this.field]}setValue(t,s){const i=this.field,n=t[i];if(n!==s){t[i]=s;const r=t[this.callback];e(r)&&r.call(t,n,s),d(t).notify(this.name)}}}class p extends T{constructor(e,t,i=!1){super(e,t),this.expression=e,this.isVolatileBinding=i,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,this.toJSON=s}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!==A.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=c;let i;c=this.needsRefresh?this:void 0,this.needsRefresh=this.isVolatileBinding;try{i=this.expression(e,t)}finally{c=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=d(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;c=void 0,t=s.propertySource[s.propertyName],c=this,e===t&&(this.needsRefresh=!0)}s.next=n}this.last=n}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 Object.freeze({setArrayObserverFactory(e){h=e},getNotifier:d,track(e,t){c&&c.watch(e,t)},trackVolatile(){c&&(c.needsRefresh=!0)},notify(e,t){d(e).notify(t)},defineProperty(e,s){t(s)&&(s=new f(s)),u(e).push(s),Reflect.defineProperty(e,s.name,{enumerable:!0,get(){return s.getValue(this)},set(e){s.setValue(this,e)}})},getAccessors:u,binding(e,t,s=this.isVolatileBinding(e)){return new p(e,t,s)},isVolatileBinding:e=>r.test(e.toString())})}));function k(e,t){B.defineProperty(e,t)}function j(e,t,s){return Object.assign({},s,{get(){return B.trackVolatile(),s.get.apply(this)}})}const N=n.getById(3,(()=>{let e=null;return{get:()=>e,set(t){e=t}}})),$=Object.freeze({default:{index:0,length:0,get event(){return $.getEvent()},eventDetail(){return this.event.detail},eventTarget(){return this.event.target}},getEvent:()=>N.get(),setEvent(e){N.set(e)}});class V{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}}const z=Object.freeze({reset:1,splice:2,optimized:3}),I=new V(0,r,0);I.reset=!0;const L=[I];function E(e,t,s,i,n,o){let l=0,a=0;const c=Math.min(s-t,o-n);if(0===t&&0===n&&(l=function(e,t,s){for(let i=0;i<s;++i)if(e[i]!==t[i])return i;return s}(e,i,c)),s===e.length&&o===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,c-l)),n+=l,o-=a,(s-=a)-(t+=l)==0&&o-n==0)return r;if(t===s){const e=new V(t,[],0);for(;n<o;)e.removed.push(i[n++]);return[e]}if(n===o)return[new V(t,[],s-t)];const h=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(2),s--;continue}if(0===s){n.push(3),t--;continue}const r=e[t-1][s-1],o=e[t-1][s],l=e[t][s-1];let a;a=o<l?o<r?o:r:l<r?l:r,a===r?(r===i?n.push(0):(n.push(1),i=r),t--,s--):a===o?(n.push(3),t--,i=o):(n.push(2),s--,i=l)}return n.reverse()}(function(e,t,s,i,n,r){const o=r-n+1,l=s-t+1,a=new Array(o);let c,h;for(let e=0;e<o;++e)a[e]=new Array(l),a[e][0]=e;for(let e=0;e<l;++e)a[0][e]=e;for(let s=1;s<o;++s)for(let r=1;r<l;++r)e[t+r-1]===i[n+s-1]?a[s][r]=a[s-1][r-1]:(c=a[s-1][r]+1,h=a[s][r-1]+1,a[s][r]=c<h?c:h);return a}(e,t,s,i,n,o)),d=[];let u,f=t,p=n;for(let e=0;e<h.length;++e)switch(h[e]){case 0:void 0!==u&&(d.push(u),u=void 0),f++,p++;break;case 1:void 0===u&&(u=new V(f,[],0)),u.addedCount++,f++,u.removed.push(i[p]),p++;break;case 2:void 0===u&&(u=new V(f,[],0)),u.addedCount++,f++;break;case 3:void 0===u&&(u=new V(f,[],0)),u.removed.push(i[p]),p++}return void 0!==u&&d.push(u),d}function M(e,t){let s=!1,i=0;for(let a=0;a<t.length;a++){const c=t[a];if(c.index+=i,s)continue;const h=(n=e.index,r=e.index+e.removed.length,o=c.index,l=c.index+c.addedCount,r<o||l<n?-1:r===o||l===n?0:n<o?r<l?r-o:l-o:l<r?l-n:r-n);if(h>=0){t.splice(a,1),a--,i-=c.addedCount-c.removed.length,e.addedCount+=c.addedCount-h;const n=e.removed.length+c.removed.length-h;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(a,0,e),a++;const n=e.addedCount-e.removed.length;c.index+=n,i+=n}}var n,r,o,l;s||t.push(e)}let _=Object.freeze({support:z.optimized,normalize:(e,t,s)=>void 0===e?void 0===s?r:s.length>1?function(e,t){let s=[];const i=[];for(let e=0,s=t.length;e<s;e++)M(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(E(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):s:L,pop(e,t,s,i){const n=e.length>0,r=s.apply(e,i);return n&&t.addSplice(new V(e.length,[r],0)),r},push(e,t,s,i){const n=s.apply(e,i);return t.addSplice(new V(e.length-i.length,[],i.length).adjustTo(e)),n},reverse(e,t,s,i){const n=s.apply(e,i);return t.reset(e),n},shift(e,t,s,i){const n=e.length>0,r=s.apply(e,i);return n&&t.addSplice(new V(0,[r],0)),r},sort(e,t,s,i){const n=s.apply(e,i);return t.reset(e),n},splice(e,t,s,i){const n=s.apply(e,i);return t.addSplice(new V(+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 V(0,[],i.length).adjustTo(e)),n}});const F=Object.freeze({reset:L,setDefaultStrategy(e){_=e}});function P(e,t,s){Reflect.defineProperty(e,t,{value:s,enumerable:!1})}class R extends T{constructor(e){super(e),this.oldCollection=void 0,this.splices=void 0,this.needsQueue=!0,this._strategy=null,this._lengthObserver=void 0,this.call=this.flush,P(e,"$fastController",this)}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,B.notify(e,"length"))}},this.subscribe(e)}return e}subscribe(e){this.flush(),super.subscribe(e)}addSplice(e){void 0===this.splices?this.splices=[e]:this.splices.push(e),this.enqueue()}reset(e){this.oldCollection=e,this.enqueue()}flush(){var e;const t=this.splices,s=this.oldCollection;void 0===t&&void 0===s||(this.needsQueue=!0,this.splices=void 0,this.oldCollection=void 0,this.notify((null!==(e=this._strategy)&&void 0!==e?e:_).normalize(s,this.subject,t)))}enqueue(){this.needsQueue&&(this.needsQueue=!1,a.enqueue(this))}}let H=!1;const D=Object.freeze({enable(){if(H)return;H=!0,B.setArrayObserverFactory((e=>new R(e)));const e=Array.prototype;e.$fastPatch||(P(e,"$fastPatch",1),[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:_)[t.name](this,i,t,e)}})))}});function q(e){if(!e)return 0;let t=e.$fastController;return void 0===t&&(D.enable(),t=B.getNotifier(e)),B.track(t.lengthObserver,"length"),e.length}let U;function Q(e){return e.map((e=>e instanceof J?Q(e.styles):[e])).reduce(((e,t)=>e.concat(t)),[])}class J{constructor(e){this.styles=e,this.targets=new WeakSet,this._strategy=null,this.behaviors=e.map((e=>e instanceof J?e.behaviors:null)).reduce(((e,t)=>null===t?e:null===e?t:e.concat(t)),null)}get strategy(){return null===this._strategy&&this.withStrategy(U),this._strategy}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(Q(this.styles)),this}static setDefaultStrategy(e){U=e}static normalize(e){return void 0===e?void 0:Array.isArray(e)?new J(e):e instanceof J?e:new J([e])}}J.supportsAdoptedStyleSheets=Array.isArray(document.adoptedStyleSheets)&&"replace"in CSSStyleSheet.prototype;const W=o(),G=Object.freeze({getForInstance:W.getForInstance,getByType:W.getByType,define:e=>(W.register({type:e}),e)});function K(){return function(e){G.define(e)}}function X(e,t){const s=[];let i="";const n=[],r=e=>{n.push(e)};for(let n=0,o=e.length-1;n<o;++n){i+=e[n];let o=t[n];void 0!==G.getForInstance(o)&&(o=o.createCSS(r)),o instanceof J||o instanceof CSSStyleSheet?(""!==i.trim()&&(s.push(i),i=""),s.push(o)):i+=o}return i+=e[e.length-1],""!==i.trim()&&s.push(i),{styles:s,behaviors:n}}const Y=(e,...t)=>{const{styles:s,behaviors:i}=X(e,t),n=new J(s);return i.length?n.withBehaviors(...i):n};class Z{constructor(e,s){this.behaviors=s,this.css="";const i=e.reduce(((e,s)=>(t(s)?this.css+=s:e.push(s),e)),[]);i.length&&(this.styles=new J(i))}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)}}G.define(Z);const ee=Y.partial=(e,...t)=>{const{styles:s,behaviors:i}=X(e,t);return new Z(s,i)},te=`fast-${Math.random().toString(36).substring(2,8)}`,se=`${te}{`,ie=`}${te}`,ne=ie.length;let re=0;const oe=()=>`${te}-${++re}`,le=Object.freeze({interpolation:e=>`${se}${e}${ie}`,attribute:e=>`${oe()}="${se}${e}${ie}"`,comment:e=>`\x3c!--${se}${e}${ie}--\x3e`}),ae=Object.freeze({parse(e,t){const s=e.split(se);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(ie);let o;if(-1===r)o=n;else{const e=n.substring(0,r);i.push(t[e]),o=n.substring(r+ne)}""!==o&&i.push(o)}return i}}),ce=o(),he=Object.freeze({getForInstance:ce.getForInstance,getByType:ce.getByType,define:(e,t)=>((t=t||{}).type=e,ce.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?c.tokenList:c.property;break;case"?":e.targetAspect=t.substring(1),e.aspectType=c.booleanAttribute;break;case"@":e.targetAspect=t.substring(1),e.aspectType=c.event;break;default:e.targetAspect=t,e.aspectType=c.attribute}else e.aspectType=c.content}});function de(e){return function(t){he.define(t,e)}}class ue{constructor(e,t,s=!1){this.evaluate=e,this.policy=t,this.isVolatile=s}}class fe{constructor(e){this.options=e,this.toJSON=s}createHTML(e){return le.attribute(e(this))}createBehavior(){return this}}class pe extends ue{createObserver(e,t){return B.binding(this.evaluate,t,this.isVolatile)}}class ge extends ue{constructor(){super(...arguments),this.toJSON=s}createObserver(){return this}bind(e){return this.evaluate(e.source,e.context)}}const be={[c.attribute]:p.setAttribute,[c.booleanAttribute]:p.setBooleanAttribute,[c.property]:(e,t,s)=>e[t]=s,[c.content]:function(e,t,s,i){if(null==s&&(s=""),s.create){e.textContent="";let t=e.$fastView;void 0===t?t=s.create():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}},[c.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 l=r.v;const a=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]=l,a.add(s))}}if(r.v=l+1,0!==l){l-=1;for(const e in o)o[e]===l&&a.remove(e)}},[c.event]:()=>{}};class ve{constructor(e){this.dataBinding=e,this.updateTarget=null,this.aspectType=c.content}createHTML(e){return le.interpolation(e(this))}createBehavior(){var e;if(null===this.updateTarget){const t=be[this.aspectType],s=null!==(e=this.dataBinding.policy)&&void 0!==e?e:this.policy;if(!t)throw n.error(1205);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];switch(this.aspectType){case c.event:s[this.data]=e,s.addEventListener(this.targetAspect,this,this.dataBinding.options);break;case c.content:e.onUnbind(this);default:const i=null!==(t=s[this.data])&&void 0!==t?t:s[this.data]=this.dataBinding.createObserver(this,this);i.target=s,i.controller=e,this.updateTarget(s,this.targetAspect,i.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){$.setEvent(e);const s=this.dataBinding.evaluate(t.source,t.context);$.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)}}function ye(e,t,s=B.isVolatileBinding(e)){return new pe(e,t,s)}function me(e,t){return new ge(e,t)}function we(e,t){const s=new pe(e);return s.options=t,s}function xe(t){return e(t)?ye(t):t instanceof ue?t:me((()=>t))}function Ce(e,t){const s=e.parentNode;let i,n=e;for(;n!==t;)i=n.nextSibling,s.removeChild(n),n=i;s.removeChild(t)}he.define(ve,{aspected:!0});class Se{constructor(e,t,i){this.fragment=e,this.factories=t,this.targets=i,this.behaviors=null,this.unbindables=[],this.source=null,this.isBound=!1,this.sourceLifetime=A.unknown,this.context=this,this.index=0,this.length=0,this.toJSON=s,this.firstChild=e.firstChild,this.lastChild=e.lastChild}get event(){return $.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}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(){Ce(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){Ce(e[0].firstChild,e[e.length-1].lastChild);for(let t=0,s=e.length;t<s;++t)e[t].unbind()}}}B.defineProperty(Se.prototype,"index"),B.defineProperty(Se.prototype,"length");const Te=(e,t)=>`${e}.${t}`,Oe={},Ae={index:0,node:null};function Be(e){e.startsWith("fast-")||n.warn(1204,{name:e})}const ke=new Proxy(document.createElement("div"),{get(t,s){Be(s);const i=Reflect.get(t,s);return e(i)?i.bind(t):i},set:(e,t,s)=>(Be(t),Reflect.set(e,t,s))});class je{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));this.addTargetDescriptor(s,e,i)}let n=Oe[t];if(!n){const i=`_${t}`;Oe[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:ke;for(const e of this.nodeIds)s[e];return new Se(t,this.factories,s)}}function Ne(e,t,s,i,n,r=!1){const o=s.attributes,l=e.directives;for(let a=0,c=o.length;a<c;++a){const h=o[a],d=h.value,u=ae.parse(d,l);let f=null;null===u?r&&(f=new ve(me((()=>d),e.policy)),he.assignAspect(f,h.name)):f=ze.aggregate(u,e.policy),null!==f&&(s.removeAttributeNode(h),a--,c--,e.addFactory(f,t,i,n,s.tagName))}}function $e(e,t,s){let i=0,n=t.firstChild;for(;n;){const t=Ve(e,s,n,i);n=t.node,i=t.index}}function Ve(e,s,i,n){const r=Te(s,n);switch(i.nodeType){case 1:Ne(e,s,i,r,n),$e(e,i,r);break;case 3:return function(e,s,i,n,r){const o=ae.parse(s.textContent,e.directives);if(null===o)return Ae.node=s.nextSibling,Ae.index=r+1,Ae;let l,a=l=s;for(let s=0,c=o.length;s<c;++s){const c=o[s];0!==s&&(r++,n=Te(i,r),l=a.parentNode.insertBefore(document.createTextNode(""),a.nextSibling)),t(c)?l.textContent=c:(l.textContent=" ",he.assignAspect(c),e.addFactory(c,i,n,r,null)),a=l}return Ae.index=r+1,Ae.node=a.nextSibling,Ae}(e,i,s,r,n);case 8:const o=ae.parse(i.data,e.directives);null!==o&&e.addFactory(ze.aggregate(o),s,r,n,null)}return Ae.index=n+1,Ae.node=i.nextSibling,Ae}const ze={compile(e,s,i=p.policy){let n;if(t(e)){n=document.createElement("TEMPLATE"),n.innerHTML=i.createHTML(e);const t=n.content.firstElementChild;null!==t&&"TEMPLATE"===t.tagName&&(n=t)}else n=e;const r=document.adoptNode(n.content),o=new je(r,s,i);var l,a;return Ne(o,"",n,"h",0,!0),l=r.firstChild,a=s,(l&&8==l.nodeType&&null!==ae.parse(l.data,a)||1===r.childNodes.length&&Object.keys(s).length>0)&&r.insertBefore(document.createComment(""),r.firstChild),$e(o,r,"r"),Ae.node=null,o.freeze()},setDefaultStrategy(e){this.compile=e},aggregate(e,s=p.policy){if(1===e.length)return e[0];let i,n,r,o=!1;const l=e.length,a=e.map((e=>t(e)?()=>e:(i=e.sourceAspect||i,n=e.dataBinding||n,o=o||e.dataBinding.isVolatile,r=r||e.dataBinding.policy,e.dataBinding.evaluate)));n.evaluate=(e,t)=>{let s="";for(let i=0;i<l;++i)s+=a[i](e,t);return s},n.isVolatile=o,n.policy=null!=r?r:s;const c=new ve(n);return he.assignAspect(c,i),c}},Ie=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;function Le(e,t,s,i=he.getForInstance(e)){if(i.aspected){const s=Ie.exec(t);null!==s&&he.assignAspect(e,s[2])}return e.createHTML(s)}class Ee{constructor(e,t={},i){this.policy=i,this.result=null,this.toJSON=s,this.html=e,this.factories=t}create(e){return null===this.result&&(this.result=ze.compile(this.html,this.factories,this.policy)),this.result.createView(e)}withPolicy(e){if(this.result)throw n.error(1208);if(this.policy)throw n.error(1207);return this.policy=e,this}render(e,t,s){const i=this.create(s);return i.bind(e),i.appendTo(t),i}static create(t,s,i){let n="";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 i=0,r=t.length-1;i<r;++i){const r=t[i];let l,a=s[i];if(n+=r,e(a))a=new ve(ye(a));else if(a instanceof ue)a=new ve(a);else if(!(l=he.getForInstance(a))){const e=a;a=new ve(me((()=>e)))}n+=Le(a,r,o,l)}return new Ee(n+t[t.length-1],r,i)}}function Me(e,...t){if(Array.isArray(e)&&Array.isArray(e.raw))return Ee.create(e,t);throw n.error(1206)}class _e extends fe{bind(e){e.source[this.options]=e.targets[this.targetNodeId]}}he.define(_e);const Fe=e=>new _e(e);function Pe(t,s){const i=e(t)?t:()=>t,n=e(s)?s:()=>s;return(e,t)=>i(e,t)?n(e,t):null}const Re=Object.freeze({positioning:!1,recycle:!0});function He(e,t,s,i){e.context.parent=i.source,e.context.parentContext=i.context,e.bind(t[s])}function De(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])}class qe{constructor(e){this.directive=e,this.items=null,this.itemsObserver=null,this.bindView=He,this.views=[],this.itemsBindingObserver=e.dataBinding.createObserver(e,this),this.templateBindingObserver=e.templateBinding.createObserver(e,this),e.options.positioning&&(this.bindView=De)}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),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():this.updateViews(t)}}observeItems(e=!1){if(!this.items)return void(this.items=r);const t=this.itemsObserver,s=this.itemsObserver=B.getNotifier(this.items),i=t!==s;i&&null!==t&&t.unsubscribe(this),(i||e)&&s.subscribe(this)}updateViews(e){const t=this.views,s=this.bindView,i=this.items,n=this.template,r=this.controller,o=this.directive.options.recycle,l=[];let a=0,c=0;for(let h=0,d=e.length;h<d;++h){const d=e[h],u=d.removed;let f=0,p=d.index;const g=p+d.addedCount,b=t.splice(d.index,u.length),v=c=l.length+b.length;for(;p<g;++p){const e=t[p],h=e?e.firstChild:this.location;let d;o&&c>0?(f<=v&&b.length>0?(d=b[f],f++):(d=l[a],a++),c--):d=n.create(),t.splice(p,0,d),s(d,i,p,r),d.insertBefore(h)}b[f]&&l.push(...b.slice(f))}for(let e=a,t=l.length;e<t;++e)l[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,l=this.views,a=l.length;if(0!==o&&!e&&this.directive.options.recycle||(Se.disposeContiguousBatch(l),a=0),0===a){this.views=l=new Array(o);for(let e=0;e<o;++e){const o=s.create();n(o,t,e,r),l[e]=o,o.insertBefore(i)}}else{let e=0;for(;e<o;++e)if(e<a){n(l[e],t,e,r)}else{const o=s.create();n(o,t,e,r),l.push(o),o.insertBefore(i)}const c=l.splice(e,a-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)e[t].unbind()}}class Ue{constructor(e,t,s){this.dataBinding=e,this.templateBinding=t,this.options=s,D.enable()}createHTML(e){return le.comment(e(this))}createBehavior(){return new qe(this)}}function Qe(e,t,s=Re){const i=xe(e),n=xe(t);return new Ue(i,n,Object.assign(Object.assign({},Re),s))}he.define(Ue);const Je=e=>1===e.nodeType,We=e=>e?t=>1===t.nodeType&&t.matches(e):Je;class Ge extends fe{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,r),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 Ke extends Ge{observe(e){e.addEventListener("slotchange",this)}disconnect(e){e.removeEventListener("slotchange",this)}getNodes(e){return e.assignedNodes(this.options)}handleEvent(e){const t=e.currentTarget;this.updateTarget(this.getSource(t),this.computeNodes(t))}}function Xe(e){return t(e)&&(e={property:e}),new Ke(e)}he.define(Ke);class Ye extends Ge{constructor(e){super(e),this.observerProperty=`${this.id}-o`,this.handleEvent=(e,t)=>{const s=t.target;this.updateTarget(this.getSource(s),this.computeNodes(s))},e.childList=!0}observe(e){let t=e[this.observerProperty];t||(t=new MutationObserver(this.handleEvent),t.toJSON=s,t.target=e,e[this.observerProperty]=t),t.observe(e,this.options)}disconnect(e){const t=e[this.observerProperty];t.target=null,t.disconnect()}getNodes(e){return"selector"in this.options?Array.from(e.querySelectorAll(this.options.selector)):Array.from(e.childNodes)}}function Ze(e){return t(e)&&(e={property:e}),new Ye(e)}he.define(Ye);class et{constructor(e){this.html=e}createHTML(){return this.html}}function tt(e){return new et(e)}he.define(et);const st=Object.freeze({locate:l()}),it={toView:e=>e?"true":"false",fromView:e=>null!=e&&"false"!==e&&!1!==e&&0!==e};function nt(e){if(null==e)return null;const t=1*e;return isNaN(t)?null:t}const rt={toView(e){const t=nt(e);return t?t.toString():t},fromView:nt};class ot{constructor(e,t,s=t.toLowerCase(),i="reflect",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,"boolean"===i&&void 0===n&&(this.converter=it)}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 B.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"reflect":const t=this.converter;p.setAttribute(e,this.attribute,void 0!==t?t.toView(i):i);break;case"boolean":p.setBooleanAttribute(e,this.attribute,i)}s.delete(e)}))}static collect(e,...s){const i=[];s.push(st.locate(e));for(let n=0,r=s.length;n<r;++n){const r=s[n];if(void 0!==r)for(let s=0,n=r.length;s<n;++s){const n=r[s];t(n)?i.push(new ot(e,n)):i.push(new ot(e,n.property,n.attribute,n.mode,n.converter))}}return i}}function lt(e,t){let s;function i(e,t){arguments.length>1&&(s.property=t),st.locate(e.constructor).push(s)}return arguments.length>1?(s={},void i(e,t)):(s=void 0===e?{}:e,i)}const at={mode:"open"},ct={},ht=new Set,dt=n.getById(4,(()=>o()));class ut{constructor(e,s=e.definition){var i;this.platformDefined=!1,t(s)&&(s={name:s}),this.type=e,this.name=s.name,this.template=s.template,this.registry=null!==(i=s.registry)&&void 0!==i?i:customElements;const n=e.prototype,r=ot.collect(e,s.attributes),o=new Array(r.length),l={},a={};for(let e=0,t=r.length;e<t;++e){const t=r[e];o[e]=t.attribute,l[t.name]=t,a[t.attribute]=t,B.defineProperty(n,t)}Reflect.defineProperty(e,"observedAttributes",{value:o,enumerable:!0}),this.attributes=r,this.propertyLookup=l,this.attributeLookup=a,this.shadowOptions=void 0===s.shadowOptions?at:null===s.shadowOptions?void 0:Object.assign(Object.assign({},at),s.shadowOptions),this.elementOptions=void 0===s.elementOptions?ct:Object.assign(Object.assign({},ct),s.elementOptions),this.styles=J.normalize(s.styles),dt.register(this)}get isDefined(){return this.platformDefined}define(e=this.registry){const t=this.type;return e.get(this.name)||(this.platformDefined=!0,e.define(this.name,t,this.elementOptions)),this}static compose(e,t){return ht.has(e)||dt.getByType(e)?new ut(class extends e{},t):new ut(e,t)}static registerBaseType(e){ht.add(e)}}ut.getByType=dt.getByType,ut.getForInstance=dt.getForInstance;const ft={bubbles:!0,composed:!0,cancelable:!0},pt=new WeakMap;function gt(e){var t,s;return null!==(s=null!==(t=e.shadowRoot)&&void 0!==t?t:pt.get(e))&&void 0!==s?s:null}let bt;class vt extends O{constructor(e,t){super(e),this.boundObservables=null,this.needsInitialization=!0,this.hasExistingShadowRoot=!1,this._template=null,this.stage=3,this.guardBehaviorConnection=!1,this.behaviors=null,this._mainStyles=null,this.$fastController=this,this.view=null,this.toJSON=s,this.source=e,this.definition=t;const i=t.shadowOptions;if(void 0!==i){let t=e.shadowRoot;t?this.hasExistingShadowRoot=!0:(t=e.attachShadow(i),"closed"===i.mode&&pt.set(e,t))}const n=B.getAccessors(e);if(n.length>0){const t=this.boundObservables=Object.create(null);for(let s=0,i=n.length;s<i;++s){const i=n[s].name,r=e[i];void 0!==r&&(delete e[i],t[i]=r)}}}get isConnected(){return B.track(this,"isConnected"),1===this.stage}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 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))}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||1!==this.stage&&0!==this.stage||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&&3!==this.stage&&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=gt(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=gt(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.addBehavior(t[e])}}connect(){if(3!==this.stage)return;if(this.stage=0,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}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.needsInitialization?(this.renderTemplate(this.template),this.addStyles(this.mainStyles),this.needsInitialization=!1):null!==this.view&&this.view.bind(this.source),this.stage=1,B.notify(this,"isConnected")}disconnect(){if(1!==this.stage)return;this.stage=2,B.notify(this,"isConnected"),null!==this.view&&this.view.unbind();const e=this.behaviors;if(null!==e)for(const t of e.keys())t.disconnectedCallback&&t.disconnectedCallback(this);this.stage=3}onAttributeChangedCallback(e,t,s){const i=this.definition.attributeLookup[e];void 0!==i&&i.onAttributeChangedCallback(this.source,s)}emit(e,t,s){return 1===this.stage&&this.source.dispatchEvent(new CustomEvent(e,Object.assign(Object.assign({detail:t},ft),s)))}renderTemplate(e){var t;const s=this.source,i=null!==(t=gt(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=A.coupled)}static forCustomElement(e){const t=e.$fastController;if(void 0!==t)return t;const s=ut.getForInstance(e);if(void 0===s)throw n.error(1401);return e.$fastController=new bt(e,s)}static setStrategy(e){bt=e}}function yt(e){var t;return"adoptedStyleSheets"in e?e:null!==(t=gt(e))&&void 0!==t?t:e.getRootNode()}vt.setStrategy(vt);class mt{constructor(e){const t=mt.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){const t=yt(e);t.adoptedStyleSheets=[...t.adoptedStyleSheets,...this.sheets]}removeStylesFrom(e){const t=yt(e),s=this.sheets;t.adoptedStyleSheets=t.adoptedStyleSheets.filter((e=>-1===s.indexOf(e)))}}mt.styleSheetCache=new Map;let wt=0;function xt(e){return e===document?document.body:e}function Ct(e){const t=class extends e{constructor(){super(),vt.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 ut.registerBaseType(t),t}function St(t,s){return e(t)?ut.compose(t,s).define().type:ut.compose(this,t).define().type}J.setDefaultStrategy(J.supportsAdoptedStyleSheets?mt:class{constructor(e){this.styles=e,this.styleClass="fast-"+ ++wt}addStylesTo(e){e=xt(yt(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=xt(yt(e))).querySelectorAll(`.${this.styleClass}`);t[0].parentNode;for(let s=0,i=t.length;s<i;++s)e.removeChild(t[s])}});const Tt=Object.assign(Ct(HTMLElement),{from:function(e){return Ct(e)},define:St,compose:function(t,s){return e(t)?ut.compose(t,s):ut.compose(this,t)}});function Ot(e){return function(t){St(t,e)}}p.setPolicy(S.create());export{D as ArrayObserver,st as AttributeConfiguration,ot as AttributeDefinition,ue as Binding,G as CSSDirective,Ye as ChildrenDirective,ze as Compiler,p as DOM,c as DOMAspect,et as DangerousHTMLDirective,vt as ElementController,J as ElementStyles,$ as ExecutionContext,n as FAST,Tt as FASTElement,ut as FASTElementDefinition,ve as HTMLBindingDirective,he as HTMLDirective,Se as HTMLView,le as Markup,Ge as NodeObservationDirective,B as Observable,ae as Parser,O as PropertyChangeNotifier,_e as RefDirective,qe as RepeatBehavior,Ue as RepeatDirective,Ke as SlottedDirective,A as SourceLifetime,V as Splice,F as SpliceStrategy,z as SpliceStrategySupport,fe as StatelessAttachedAttributeDirective,T as SubscriberSet,a as Updates,Ee as ViewTemplate,lt as attr,ye as bind,it as booleanConverter,Ze as children,l as createMetadataLocator,o as createTypeRegistry,Y as css,K as cssDirective,ee as cssPartial,Ot as customElement,tt as dangerousHTML,We as elements,r as emptyArray,Me as html,de as htmlDirective,q as lengthOf,we as listener,xe as normalizeBinding,rt as nullableNumberConverter,k as observable,me as oneTime,Fe as ref,Qe as repeat,Xe as slotted,j as volatile,Pe as when};
|
|
1
|
+
let e;try{if(document.currentScript)e=document.currentScript.getAttribute("fast-kernel");else{const t=document.getElementsByTagName("script");e=t[t.length-1].getAttribute("fast-kernel")}}catch(t){e="isolate"}let t;switch(e){case"share":t=Object.freeze({updateQueue:1,observable:2,contextEvent:3,elementRegistry:4});break;case"share-v2":t=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)}`;t=Object.freeze({updateQueue:`1.2${e}`,observable:`2.2${e}`,contextEvent:`3.2${e}`,elementRegistry:`4.2${e}`})}const s=e=>"function"==typeof e,n=e=>"string"==typeof e,i=()=>{};!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}}();const r={configurable:!1,enumerable:!1,writable:!1};void 0===globalThis.FAST&&Reflect.defineProperty(globalThis,"FAST",Object.assign({value:Object.create(null)},r));const o=globalThis.FAST;if(void 0===o.getById){const e=Object.create(null);Reflect.defineProperty(o,"getById",Object.assign({value(t,s){let n=e[t];return void 0===n&&(n=s?e[t]=s():null),n}},r))}void 0===o.error&&Object.assign(o,{warn(){},error:e=>new Error(`Error ${e}`),addMessages(){}});const l=Object.freeze([]);function a(){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 s=e.get(t);if(void 0===s){let n=Reflect.getPrototypeOf(t);for(;void 0===s&&null!==n;)s=e.get(n),n=Reflect.getPrototypeOf(n);s=void 0===s?[]:s.slice(0),e.set(t,s)}return s}}const h=o.getById(t.updateQueue,(()=>{const e=[],t=[],s=globalThis.requestAnimationFrame;let n=!0;function i(){if(t.length)throw t.shift()}function r(s){try{s.call()}catch(s){if(!n)throw e.length=0,s;t.push(s),setTimeout(i,0)}}function o(){let t=0;for(;t<e.length;)if(r(e[t]),t++,t>1024){for(let s=0,n=e.length-t;s<n;s++)e[s]=e[s+t];e.length-=t,t=0}e.length=0}function l(t){e.push(t),e.length<2&&(n?s(o):o())}return Object.freeze({enqueue:l,next:()=>new Promise(l),process:o,setMode:e=>n=e})})),d=Object.freeze({none:0,attribute:1,booleanAttribute:2,property:3,content:4,tokenList:5,event:6}),u=e=>e,f=globalThis.trustedTypes?globalThis.trustedTypes.createPolicy("fast-html",{createHTML:u}):{createHTML:u};let p=Object.freeze({createHTML:e=>f.createHTML(e),protect:(e,t,s,n)=>n});const g=p,b=Object.freeze({queueUpdate:h.enqueue,nextUpdate:h.next,processUpdates:h.process,get policy(){return p},setPolicy(e){if(p!==g)throw o.error(1201);p=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 v(e,t,s,i){return(e,t,s,...r)=>{n(s)&&(s=s.replace("javascript:","")),i(e,t,s,...r)}}function y(e,t,s,n){throw new Error(`${s} on ${null!=e?e:"text"} is blocked by the current DOMPolicy.`)}const m={onabort:y,onauxclick:y,onbeforeinput:y,onbeforematch:y,onblur:y,oncancel:y,oncanplay:y,oncanplaythrough:y,onchange:y,onclick:y,onclose:y,oncontextlost:y,oncontextmenu:y,oncontextrestored:y,oncopy:y,oncuechange:y,oncut:y,ondblclick:y,ondrag:y,ondragend:y,ondragenter:y,ondragleave:y,ondragover:y,ondragstart:y,ondrop:y,ondurationchange:y,onemptied:y,onended:y,onerror:y,onfocus:y,onformdata:y,oninput:y,oninvalid:y,onkeydown:y,onkeypress:y,onkeyup:y,onload:y,onloadeddata:y,onloadedmetadata:y,onloadstart:y,onmousedown:y,onmouseenter:y,onmouseleave:y,onmousemove:y,onmouseout:y,onmouseover:y,onmouseup:y,onpaste:y,onpause:y,onplay:y,onplaying:y,onprogress:y,onratechange:y,onreset:y,onresize:y,onscroll:y,onsecuritypolicyviolation:y,onseeked:y,onseeking:y,onselect:y,onslotchange:y,onstalled:y,onsubmit:y,onsuspend:y,ontimeupdate:y,ontoggle:y,onvolumechange:y,onwaiting:y,onwebkitanimationend:y,onwebkitanimationiteration:y,onwebkitanimationstart:y,onwebkittransitionend:y,onwheel:y},w={elements:{a:{[d.attribute]:{href:v},[d.property]:{href:v}},area:{[d.attribute]:{href:v},[d.property]:{href:v}},button:{[d.attribute]:{formaction:v},[d.property]:{formAction:v}},embed:{[d.attribute]:{src:y},[d.property]:{src:y}},form:{[d.attribute]:{action:v},[d.property]:{action:v}},frame:{[d.attribute]:{src:v},[d.property]:{src:v}},iframe:{[d.attribute]:{src:v},[d.property]:{src:v,srcdoc:y}},input:{[d.attribute]:{formaction:v},[d.property]:{formAction:v}},link:{[d.attribute]:{href:y},[d.property]:{href:y}},object:{[d.attribute]:{codebase:y,data:y},[d.property]:{codeBase:y,data:y}},script:{[d.attribute]:{src:y,text:y},[d.property]:{src:y,text:y,innerText:y,textContent:y}},style:{[d.property]:{innerText:y,textContent:y}}},aspects:{[d.attribute]:Object.assign({},m),[d.property]:Object.assign({innerHTML:y},m),[d.event]:Object.assign({},m)}};function x(e,t){const s={};for(const n in t){const i=e[n],r=t[n];switch(i){case null:break;case void 0:s[n]=r;break;default:s[n]=i}}for(const t in e)t in s||(s[t]=e[t]);return Object.freeze(s)}function C(e,t){const s={};for(const n in t){const i=e[n],r=t[n];switch(i){case null:break;case void 0:s[n]=x(r,{});break;default:s[n]=x(i,r)}}for(const t in e)t in s||(s[t]=x(e[t],{}));return Object.freeze(s)}function S(e,t){const s={};for(const n in t){const i=e[n],r=t[n];switch(i){case null:break;case void 0:s[n]=C(i,{});break;default:s[n]=C(i,r)}}for(const t in e)t in s||(s[t]=C(e[t],{}));return Object.freeze(s)}function O(e,t,s,n,i){const r=e[s];if(r){const e=r[n];if(e)return e(t,s,n,i)}}const T=Object.freeze({create(e={}){var t,s;const n=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}}(),i=(r=null!==(s=e.guards)&&void 0!==s?s:{},o=w,Object.freeze({elements:r.elements?S(r.elements,o.elements):o.elements,aspects:r.aspects?C(r.aspects,o.aspects):o.aspects}));var r,o;return Object.freeze({createHTML:e=>n.createHTML(e),protect(e,t,s,n){var r;const o=(null!=e?e:"").toLowerCase(),l=i.elements[o];if(l){const i=O(l,e,t,s,n);if(i)return i}return null!==(r=O(i.aspects,e,t,s,n))&&void 0!==r?r:n}})}});class A{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,n=this.sub2;void 0!==t&&t.handleChange(s,e),void 0!==n&&n.handleChange(s,e)}else for(let n=0,i=t.length;n<i;++n)t[n].handleChange(s,e)}}class B{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,n;let i;i=t?null!==(s=this.subscribers[t])&&void 0!==s?s:this.subscribers[t]=new A(this.subject):null!==(n=this.subjectSubscribers)&&void 0!==n?n:this.subjectSubscribers=new A(this.subject),i.subscribe(e)}unsubscribe(e,t){var s,n;t?null===(s=this.subscribers[t])||void 0===s||s.unsubscribe(e):null===(n=this.subjectSubscribers)||void 0===n||n.unsubscribe(e)}}const k=Object.freeze({unknown:void 0,coupled:1}),j=o.getById(t.observable,(()=>{const e=h.enqueue,t=/(:|&&|\|\||if)/,r=new WeakMap;let l,a=e=>{throw o.error(1101)};function d(e){var t;let s=null!==(t=e.$fastController)&&void 0!==t?t:r.get(e);return void 0===s&&(Array.isArray(e)?s=a(e):r.set(e,s=new B(e))),s}const u=c();class f{constructor(e){this.name=e,this.field=`_${e}`,this.callback=`${e}Changed`}getValue(e){return void 0!==l&&l.watch(e,this.name),e[this.field]}setValue(e,t){const n=this.field,i=e[n];if(i!==t){e[n]=t;const r=e[this.callback];s(r)&&r.call(e,i,t),d(e).notify(this.name)}}}class p extends A{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,this.toJSON=i}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!==k.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=l;let n;l=this.needsRefresh?this:void 0,this.needsRefresh=this.isVolatileBinding;try{n=this.expression(e,t)}finally{l=s}return n}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,n=d(e),i=null===s?this.first:{};if(i.propertySource=e,i.propertyName=t,i.notifier=n,n.subscribe(this,t),null!==s){if(!this.needsRefresh){let t;l=void 0,t=s.propertySource[s.propertyName],l=this,e===t&&(this.needsRefresh=!0)}s.next=i}this.last=i}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 Object.freeze({setArrayObserverFactory(e){a=e},getNotifier:d,track(e,t){l&&l.watch(e,t)},trackVolatile(){l&&(l.needsRefresh=!0)},notify(e,t){d(e).notify(t)},defineProperty(e,t){n(t)&&(t=new f(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,s=this.isVolatileBinding(e)){return new p(e,t,s)},isVolatileBinding:e=>t.test(e.toString())})}));function N(e,t){j.defineProperty(e,t)}function $(e,t,s){return Object.assign({},s,{get(){return j.trackVolatile(),s.get.apply(this)}})}const E=o.getById(t.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:()=>E.get(),setEvent(e){E.set(e)}});class z{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}}const I=Object.freeze({reset:1,splice:2,optimized:3}),L=new z(0,l,0);L.reset=!0;const M=[L];function _(e,t,s,n,i,r){let o=0,a=0;const c=Math.min(s-t,r-i);if(0===t&&0===i&&(o=function(e,t,s){for(let n=0;n<s;++n)if(e[n]!==t[n])return n;return s}(e,n,c)),s===e.length&&r===n.length&&(a=function(e,t,s){let n=e.length,i=t.length,r=0;for(;r<s&&e[--n]===t[--i];)r++;return r}(e,n,c-o)),i+=o,r-=a,(s-=a)-(t+=o)==0&&r-i==0)return l;if(t===s){const e=new z(t,[],0);for(;i<r;)e.removed.push(n[i++]);return[e]}if(i===r)return[new z(t,[],s-t)];const h=function(e){let t=e.length-1,s=e[0].length-1,n=e[t][s];const i=[];for(;t>0||s>0;){if(0===t){i.push(2),s--;continue}if(0===s){i.push(3),t--;continue}const r=e[t-1][s-1],o=e[t-1][s],l=e[t][s-1];let a;a=o<l?o<r?o:r:l<r?l:r,a===r?(r===n?i.push(0):(i.push(1),n=r),t--,s--):a===o?(i.push(3),t--,n=o):(i.push(2),s--,n=l)}return i.reverse()}(function(e,t,s,n,i,r){const o=r-i+1,l=s-t+1,a=new Array(o);let c,h;for(let e=0;e<o;++e)a[e]=new Array(l),a[e][0]=e;for(let e=0;e<l;++e)a[0][e]=e;for(let s=1;s<o;++s)for(let r=1;r<l;++r)e[t+r-1]===n[i+s-1]?a[s][r]=a[s-1][r-1]:(c=a[s-1][r]+1,h=a[s][r-1]+1,a[s][r]=c<h?c:h);return a}(e,t,s,n,i,r)),d=[];let u,f=t,p=i;for(let e=0;e<h.length;++e)switch(h[e]){case 0:void 0!==u&&(d.push(u),u=void 0),f++,p++;break;case 1:void 0===u&&(u=new z(f,[],0)),u.addedCount++,f++,u.removed.push(n[p]),p++;break;case 2:void 0===u&&(u=new z(f,[],0)),u.addedCount++,f++;break;case 3:void 0===u&&(u=new z(f,[],0)),u.removed.push(n[p]),p++}return void 0!==u&&d.push(u),d}function F(e,t){let s=!1,n=0;for(let a=0;a<t.length;a++){const c=t[a];if(c.index+=n,s)continue;const h=(i=e.index,r=e.index+e.removed.length,o=c.index,l=c.index+c.addedCount,r<o||l<i?-1:r===o||l===i?0:i<o?r<l?r-o:l-o:l<r?l-i:r-i);if(h>=0){t.splice(a,1),a--,n-=c.addedCount-c.removed.length,e.addedCount+=c.addedCount-h;const i=e.removed.length+c.removed.length-h;if(e.addedCount||i){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(a,0,e),a++;const i=e.addedCount-e.removed.length;c.index+=i,n+=i}}var i,r,o,l;s||t.push(e)}let P=Object.freeze({support:I.optimized,normalize:(e,t,s)=>void 0===e?void 0===s?l:s.length>1?function(e,t){let s=[];const n=[];for(let e=0,s=t.length;e<s;e++)F(t[e],n);for(let t=0,i=n.length;t<i;++t){const i=n[t];1!==i.addedCount||1!==i.removed.length?s=s.concat(_(e,i.index,i.index+i.addedCount,i.removed,0,i.removed.length)):i.removed[0]!==e[i.index]&&s.push(i)}return s}(t,s):s:M,pop(e,t,s,n){const i=e.length>0,r=s.apply(e,n);return i&&t.addSplice(new z(e.length,[r],0)),r},push(e,t,s,n){const i=s.apply(e,n);return t.addSplice(new z(e.length-n.length,[],n.length).adjustTo(e)),i},reverse(e,t,s,n){const i=s.apply(e,n);return t.reset(e),i},shift(e,t,s,n){const i=e.length>0,r=s.apply(e,n);return i&&t.addSplice(new z(0,[r],0)),r},sort(e,t,s,n){const i=s.apply(e,n);return t.reset(e),i},splice(e,t,s,n){const i=s.apply(e,n);return t.addSplice(new z(+n[0],i,n.length>2?n.length-2:0).adjustTo(e)),i},unshift(e,t,s,n){const i=s.apply(e,n);return t.addSplice(new z(0,[],n.length).adjustTo(e)),i}});const R=Object.freeze({reset:M,setDefaultStrategy(e){P=e}});function H(e,t,s){Reflect.defineProperty(e,t,{value:s,enumerable:!1})}class D extends A{constructor(e){super(e),this.oldCollection=void 0,this.splices=void 0,this.needsQueue=!0,this._strategy=null,this._lengthObserver=void 0,this.call=this.flush,H(e,"$fastController",this)}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,j.notify(e,"length"))}},this.subscribe(e)}return e}subscribe(e){this.flush(),super.subscribe(e)}addSplice(e){void 0===this.splices?this.splices=[e]:this.splices.push(e),this.enqueue()}reset(e){this.oldCollection=e,this.enqueue()}flush(){var e;const t=this.splices,s=this.oldCollection;void 0===t&&void 0===s||(this.needsQueue=!0,this.splices=void 0,this.oldCollection=void 0,this.notify((null!==(e=this._strategy)&&void 0!==e?e:P).normalize(s,this.subject,t)))}enqueue(){this.needsQueue&&(this.needsQueue=!1,h.enqueue(this))}}let q=!1;const Q=Object.freeze({enable(){if(q)return;q=!0,j.setArrayObserverFactory((e=>new D(e)));const e=Array.prototype;e.$fastPatch||(H(e,"$fastPatch",1),[e.pop,e.push,e.reverse,e.shift,e.sort,e.splice,e.unshift].forEach((t=>{e[t.name]=function(...e){var s;const n=this.$fastController;return void 0===n?t.apply(this,e):(null!==(s=n.strategy)&&void 0!==s?s:P)[t.name](this,n,t,e)}})))}});function U(e){if(!e)return 0;let t=e.$fastController;return void 0===t&&(Q.enable(),t=j.getNotifier(e)),j.track(t.lengthObserver,"length"),e.length}let J;function W(e){return e.map((e=>e instanceof G?W(e.styles):[e])).reduce(((e,t)=>e.concat(t)),[])}class G{constructor(e){this.styles=e,this.targets=new WeakSet,this._strategy=null,this.behaviors=e.map((e=>e instanceof G?e.behaviors:null)).reduce(((e,t)=>null===t?e:null===e?t:e.concat(t)),null)}get strategy(){return null===this._strategy&&this.withStrategy(J),this._strategy}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(W(this.styles)),this}static setDefaultStrategy(e){J=e}static normalize(e){return void 0===e?void 0:Array.isArray(e)?new G(e):e instanceof G?e:new G([e])}}G.supportsAdoptedStyleSheets=Array.isArray(document.adoptedStyleSheets)&&"replace"in CSSStyleSheet.prototype;const K=a(),X=Object.freeze({getForInstance:K.getForInstance,getByType:K.getByType,define:e=>(K.register({type:e}),e)});function Y(){return function(e){X.define(e)}}function Z(e,t){const s=[];let n="";const i=[],r=e=>{i.push(e)};for(let i=0,o=e.length-1;i<o;++i){n+=e[i];let o=t[i];void 0!==X.getForInstance(o)&&(o=o.createCSS(r)),o instanceof G||o instanceof CSSStyleSheet?(""!==n.trim()&&(s.push(n),n=""),s.push(o)):n+=o}return n+=e[e.length-1],""!==n.trim()&&s.push(n),{styles:s,behaviors:i}}const ee=(e,...t)=>{const{styles:s,behaviors:n}=Z(e,t),i=new G(s);return n.length?i.withBehaviors(...n):i};class te{constructor(e,t){this.behaviors=t,this.css="";const s=e.reduce(((e,t)=>(n(t)?this.css+=t:e.push(t),e)),[]);s.length&&(this.styles=new G(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)}}X.define(te);const se=ee.partial=(e,...t)=>{const{styles:s,behaviors:n}=Z(e,t);return new te(s,n)},ne=`fast-${Math.random().toString(36).substring(2,8)}`,ie=`${ne}{`,re=`}${ne}`,oe=re.length;let le=0;const ae=()=>`${ne}-${++le}`,ce=Object.freeze({interpolation:e=>`${ie}${e}${re}`,attribute:e=>`${ae()}="${ie}${e}${re}"`,comment:e=>`\x3c!--${ie}${e}${re}--\x3e`}),he=Object.freeze({parse(e,t){const s=e.split(ie);if(1===s.length)return null;const n=[];for(let e=0,i=s.length;e<i;++e){const i=s[e],r=i.indexOf(re);let o;if(-1===r)o=i;else{const e=i.substring(0,r);n.push(t[e]),o=i.substring(r+oe)}""!==o&&n.push(o)}return n}}),de=a(),ue=Object.freeze({getForInstance:de.getForInstance,getByType:de.getByType,define:(e,t)=>((t=t||{}).type=e,de.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?d.tokenList:d.property;break;case"?":e.targetAspect=t.substring(1),e.aspectType=d.booleanAttribute;break;case"@":e.targetAspect=t.substring(1),e.aspectType=d.event;break;default:e.targetAspect=t,e.aspectType=d.attribute}else e.aspectType=d.content}});function fe(e){return function(t){ue.define(t,e)}}class pe{constructor(e,t,s=!1){this.evaluate=e,this.policy=t,this.isVolatile=s}}class ge{constructor(e){this.options=e,this.toJSON=i}createHTML(e){return ce.attribute(e(this))}createBehavior(){return this}}class be extends pe{createObserver(e,t){return j.binding(this.evaluate,t,this.isVolatile)}}class ve extends pe{constructor(){super(...arguments),this.toJSON=i}createObserver(){return this}bind(e){return this.evaluate(e.source,e.context)}}const ye={[d.attribute]:b.setAttribute,[d.booleanAttribute]:b.setBooleanAttribute,[d.property]:(e,t,s)=>e[t]=s,[d.content]:function(e,t,s,n){if(null==s&&(s=""),s.create){e.textContent="";let t=e.$fastView;void 0===t?t=s.create():e.$fastTemplate!==s&&(t.isComposed&&(t.remove(),t.unbind()),t=s.create()),t.isComposed?t.needsBindOnly&&(t.needsBindOnly=!1,t.bind(n.source,n.context)):(t.isComposed=!0,t.bind(n.source,n.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}},[d.tokenList]:function(e,t,s){var n;const i=`${this.id}-t`,r=null!==(n=e[i])&&void 0!==n?n:e[i]={v:0,cv:Object.create(null)},o=r.cv;let l=r.v;const a=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]=l,a.add(s))}}if(r.v=l+1,0!==l){l-=1;for(const e in o)o[e]===l&&a.remove(e)}},[d.event]:()=>{}};class me{constructor(e){this.dataBinding=e,this.updateTarget=null,this.aspectType=d.content}createHTML(e){return ce.interpolation(e(this))}createBehavior(){var e;if(null===this.updateTarget){const t=ye[this.aspectType],s=null!==(e=this.dataBinding.policy)&&void 0!==e?e:this.policy;if(!t)throw o.error(1205);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];switch(this.aspectType){case d.event:s[this.data]=e,s.addEventListener(this.targetAspect,this,this.dataBinding.options);break;case d.content:e.onUnbind(this);default:const n=null!==(t=s[this.data])&&void 0!==t?t:s[this.data]=this.dataBinding.createObserver(this,this);n.target=s,n.controller=e,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,n=t.controller;this.updateTarget(s,this.targetAspect,t.bind(n),n)}}function we(e,t,s=j.isVolatileBinding(e)){return new be(e,t,s)}function xe(e,t){return new ve(e,t)}function Ce(e,t){const s=new be(e);return s.options=t,s}function Se(e){return s(e)?we(e):e instanceof pe?e:xe((()=>e))}function Oe(e,t){const s=e.parentNode;let n,i=e;for(;i!==t;)n=i.nextSibling,s.removeChild(i),i=n;s.removeChild(t)}ue.define(me,{aspected:!0});class Te{constructor(e,t,s){this.fragment=e,this.factories=t,this.targets=s,this.behaviors=null,this.unbindables=[],this.source=null,this.isBound=!1,this.sourceLifetime=k.unknown,this.context=this,this.index=0,this.length=0,this.toJSON=i,this.firstChild=e.firstChild,this.lastChild=e.lastChild}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}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 n,i=this.firstChild;for(;i!==t;)n=i.nextSibling,s.insertBefore(i,e),i=n;s.insertBefore(t,e)}}remove(){const e=this.fragment,t=this.lastChild;let s,n=this.firstChild;for(;n!==t;)s=n.nextSibling,e.appendChild(n),n=s;e.appendChild(t)}dispose(){Oe(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 n=this.factories;for(let e=0,t=n.length;e<t;++e){const t=n[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){Oe(e[0].firstChild,e[e.length-1].lastChild);for(let t=0,s=e.length;t<s;++t)e[t].unbind()}}}j.defineProperty(Te.prototype,"index"),j.defineProperty(Te.prototype,"length");const Ae=(e,t)=>`${e}.${t}`,Be={},ke={index:0,node:null};function je(e){e.startsWith("fast-")||o.warn(1204,{name:e})}const Ne=new Proxy(document.createElement("div"),{get(e,t){je(t);const n=Reflect.get(e,t);return s(n)?n.bind(e):n},set:(e,t,s)=>(je(t),Reflect.set(e,t,s))});class $e{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,n,i){var r,o;this.nodeIds.has(s)||(this.nodeIds.add(s),this.addTargetDescriptor(t,s,n)),e.id=null!==(r=e.id)&&void 0!==r?r:ae(),e.targetNodeId=s,e.targetTagName=i,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 n=this.descriptors;if("r"===t||"h"===t||n[t])return;if(!n[e]){const t=e.lastIndexOf("."),s=e.substring(0,t),n=parseInt(e.substring(t+1));this.addTargetDescriptor(s,e,n)}let i=Be[t];if(!i){const n=`_${t}`;Be[t]=i={get(){var t;return null!==(t=this[n])&&void 0!==t?t:this[n]=this[e].childNodes[s]}}}n[t]=i}createView(e){const t=this.fragment.cloneNode(!0),s=Object.create(this.proto);s.r=t,s.h=null!=e?e:Ne;for(const e of this.nodeIds)s[e];return new Te(t,this.factories,s)}}function Ee(e,t,s,n,i,r=!1){const o=s.attributes,l=e.directives;for(let a=0,c=o.length;a<c;++a){const h=o[a],d=h.value,u=he.parse(d,l);let f=null;null===u?r&&(f=new me(xe((()=>d),e.policy)),ue.assignAspect(f,h.name)):f=Ie.aggregate(u,e.policy),null!==f&&(s.removeAttributeNode(h),a--,c--,e.addFactory(f,t,n,i,s.tagName))}}function Ve(e,t,s){let n=0,i=t.firstChild;for(;i;){const t=ze(e,s,i,n);i=t.node,n=t.index}}function ze(e,t,s,i){const r=Ae(t,i);switch(s.nodeType){case 1:Ee(e,t,s,r,i),Ve(e,s,r);break;case 3:return function(e,t,s,i,r){const o=he.parse(t.textContent,e.directives);if(null===o)return ke.node=t.nextSibling,ke.index=r+1,ke;let l,a=l=t;for(let t=0,c=o.length;t<c;++t){const c=o[t];0!==t&&(r++,i=Ae(s,r),l=a.parentNode.insertBefore(document.createTextNode(""),a.nextSibling)),n(c)?l.textContent=c:(l.textContent=" ",ue.assignAspect(c),e.addFactory(c,s,i,r,null)),a=l}return ke.index=r+1,ke.node=a.nextSibling,ke}(e,s,t,r,i);case 8:const o=he.parse(s.data,e.directives);null!==o&&e.addFactory(Ie.aggregate(o),t,r,i,null)}return ke.index=i+1,ke.node=s.nextSibling,ke}const Ie={compile(e,t,s=b.policy){let i;if(n(e)){i=document.createElement("TEMPLATE"),i.innerHTML=s.createHTML(e);const t=i.content.firstElementChild;null!==t&&"TEMPLATE"===t.tagName&&(i=t)}else i=e;const r=document.adoptNode(i.content),o=new $e(r,t,s);var l,a;return Ee(o,"",i,"h",0,!0),l=r.firstChild,a=t,(l&&8==l.nodeType&&null!==he.parse(l.data,a)||1===r.childNodes.length&&Object.keys(t).length>0)&&r.insertBefore(document.createComment(""),r.firstChild),Ve(o,r,"r"),ke.node=null,o.freeze()},setDefaultStrategy(e){this.compile=e},aggregate(e,t=b.policy){if(1===e.length)return e[0];let s,i,r,o=!1;const l=e.length,a=e.map((e=>n(e)?()=>e:(s=e.sourceAspect||s,i=e.dataBinding||i,o=o||e.dataBinding.isVolatile,r=r||e.dataBinding.policy,e.dataBinding.evaluate)));i.evaluate=(e,t)=>{let s="";for(let n=0;n<l;++n)s+=a[n](e,t);return s},i.isVolatile=o,i.policy=null!=r?r:t;const c=new me(i);return ue.assignAspect(c,s),c}},Le=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;function Me(e,t,s,n=ue.getForInstance(e)){if(n.aspected){const s=Le.exec(t);null!==s&&ue.assignAspect(e,s[2])}return e.createHTML(s)}class _e{constructor(e,t={},s){this.policy=s,this.result=null,this.toJSON=i,this.html=e,this.factories=t}create(e){return null===this.result&&(this.result=Ie.compile(this.html,this.factories,this.policy)),this.result.createView(e)}withPolicy(e){if(this.result)throw o.error(1208);if(this.policy)throw o.error(1207);return this.policy=e,this}render(e,t,s){const n=this.create(s);return n.bind(e),n.appendTo(t),n}static create(e,t,n){let i="";const r=Object.create(null),o=e=>{var t;const s=null!==(t=e.id)&&void 0!==t?t:e.id=ae();return r[s]=e,s};for(let n=0,r=e.length-1;n<r;++n){const r=e[n];let l,a=t[n];if(i+=r,s(a))a=new me(we(a));else if(a instanceof pe)a=new me(a);else if(!(l=ue.getForInstance(a))){const e=a;a=new me(xe((()=>e)))}i+=Me(a,r,o,l)}return new _e(i+e[e.length-1],r,n)}}function Fe(e,...t){if(Array.isArray(e)&&Array.isArray(e.raw))return _e.create(e,t);throw o.error(1206)}class Pe extends ge{bind(e){e.source[this.options]=e.targets[this.targetNodeId]}}ue.define(Pe);const Re=e=>new Pe(e);function He(e,t){const n=s(e)?e:()=>e,i=s(t)?t:()=>t;return(e,t)=>n(e,t)?i(e,t):null}const De=Object.freeze({positioning:!1,recycle:!0});function qe(e,t,s,n){e.context.parent=n.source,e.context.parentContext=n.context,e.bind(t[s])}function Qe(e,t,s,n){e.context.parent=n.source,e.context.parentContext=n.context,e.context.length=t.length,e.context.index=s,e.bind(t[s])}class Ue{constructor(e){this.directive=e,this.items=null,this.itemsObserver=null,this.bindView=qe,this.views=[],this.itemsBindingObserver=e.dataBinding.createObserver(e,this),this.templateBindingObserver=e.templateBinding.createObserver(e,this),e.options.positioning&&(this.bindView=Qe)}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),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():this.updateViews(t)}}observeItems(e=!1){if(!this.items)return void(this.items=l);const t=this.itemsObserver,s=this.itemsObserver=j.getNotifier(this.items),n=t!==s;n&&null!==t&&t.unsubscribe(this),(n||e)&&s.subscribe(this)}updateViews(e){const t=this.views,s=this.bindView,n=this.items,i=this.template,r=this.controller,o=this.directive.options.recycle,l=[];let a=0,c=0;for(let h=0,d=e.length;h<d;++h){const d=e[h],u=d.removed;let f=0,p=d.index;const g=p+d.addedCount,b=t.splice(d.index,u.length),v=c=l.length+b.length;for(;p<g;++p){const e=t[p],h=e?e.firstChild:this.location;let d;o&&c>0?(f<=v&&b.length>0?(d=b[f],f++):(d=l[a],a++),c--):d=i.create(),t.splice(p,0,d),s(d,n,p,r),d.insertBefore(h)}b[f]&&l.push(...b.slice(f))}for(let e=a,t=l.length;e<t;++e)l[e].dispose();if(this.directive.options.positioning)for(let e=0,s=t.length;e<s;++e){const n=t[e].context;n.length=s,n.index=e}}refreshAllViews(e=!1){const t=this.items,s=this.template,n=this.location,i=this.bindView,r=this.controller;let o=t.length,l=this.views,a=l.length;if(0!==o&&!e&&this.directive.options.recycle||(Te.disposeContiguousBatch(l),a=0),0===a){this.views=l=new Array(o);for(let e=0;e<o;++e){const o=s.create();i(o,t,e,r),l[e]=o,o.insertBefore(n)}}else{let e=0;for(;e<o;++e)if(e<a){i(l[e],t,e,r)}else{const o=s.create();i(o,t,e,r),l.push(o),o.insertBefore(n)}const c=l.splice(e,a-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)e[t].unbind()}}class Je{constructor(e,t,s){this.dataBinding=e,this.templateBinding=t,this.options=s,Q.enable()}createHTML(e){return ce.comment(e(this))}createBehavior(){return new Ue(this)}}function We(e,t,s=De){const n=Se(e),i=Se(t);return new Je(n,i,Object.assign(Object.assign({},De),s))}ue.define(Je);const Ge=e=>1===e.nodeType,Ke=e=>e?t=>1===t.nodeType&&t.matches(e):Ge;class Xe extends ge{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,l),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 Ye extends Xe{observe(e){e.addEventListener("slotchange",this)}disconnect(e){e.removeEventListener("slotchange",this)}getNodes(e){return e.assignedNodes(this.options)}handleEvent(e){const t=e.currentTarget;this.updateTarget(this.getSource(t),this.computeNodes(t))}}function Ze(e){return n(e)&&(e={property:e}),new Ye(e)}ue.define(Ye);class et extends Xe{constructor(e){super(e),this.observerProperty=`${this.id}-o`,this.handleEvent=(e,t)=>{const s=t.target;this.updateTarget(this.getSource(s),this.computeNodes(s))},e.childList=!0}observe(e){let t=e[this.observerProperty];t||(t=new MutationObserver(this.handleEvent),t.toJSON=i,t.target=e,e[this.observerProperty]=t),t.observe(e,this.options)}disconnect(e){const t=e[this.observerProperty];t.target=null,t.disconnect()}getNodes(e){return"selector"in this.options?Array.from(e.querySelectorAll(this.options.selector)):Array.from(e.childNodes)}}function tt(e){return n(e)&&(e={property:e}),new et(e)}ue.define(et);class st{constructor(e){this.html=e}createHTML(){return this.html}}function nt(e){return new st(e)}ue.define(st);const it=Object.freeze({locate:c()}),rt={toView:e=>e?"true":"false",fromView:e=>null!=e&&"false"!==e&&!1!==e&&0!==e};function ot(e){if(null==e)return null;const t=1*e;return isNaN(t)?null:t}const lt={toView(e){const t=ot(e);return t?t.toString():t},fromView:ot};class at{constructor(e,t,s=t.toLowerCase(),n="reflect",i){this.guards=new Set,this.Owner=e,this.name=t,this.attribute=s,this.mode=n,this.converter=i,this.fieldName=`_${t}`,this.callbackName=`${t}Changed`,this.hasCallback=this.callbackName in e.prototype,"boolean"===n&&void 0===i&&(this.converter=rt)}setValue(e,t){const s=e[this.fieldName],n=this.converter;void 0!==n&&(t=n.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 j.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||h.enqueue((()=>{s.add(e);const n=e[this.fieldName];switch(t){case"reflect":const t=this.converter;b.setAttribute(e,this.attribute,void 0!==t?t.toView(n):n);break;case"boolean":b.setBooleanAttribute(e,this.attribute,n)}s.delete(e)}))}static collect(e,...t){const s=[];t.push(it.locate(e));for(let i=0,r=t.length;i<r;++i){const r=t[i];if(void 0!==r)for(let t=0,i=r.length;t<i;++t){const i=r[t];n(i)?s.push(new at(e,i)):s.push(new at(e,i.property,i.attribute,i.mode,i.converter))}}return s}}function ct(e,t){let s;function n(e,t){arguments.length>1&&(s.property=t),it.locate(e.constructor).push(s)}return arguments.length>1?(s={},void n(e,t)):(s=void 0===e?{}:e,n)}const ht={mode:"open"},dt={},ut=new Set,ft=o.getById(t.elementRegistry,(()=>a()));class pt{constructor(e,t=e.definition){var s;this.platformDefined=!1,n(t)&&(t={name:t}),this.type=e,this.name=t.name,this.template=t.template,this.registry=null!==(s=t.registry)&&void 0!==s?s:customElements;const i=e.prototype,r=at.collect(e,t.attributes),o=new Array(r.length),l={},a={};for(let e=0,t=r.length;e<t;++e){const t=r[e];o[e]=t.attribute,l[t.name]=t,a[t.attribute]=t,j.defineProperty(i,t)}Reflect.defineProperty(e,"observedAttributes",{value:o,enumerable:!0}),this.attributes=r,this.propertyLookup=l,this.attributeLookup=a,this.shadowOptions=void 0===t.shadowOptions?ht:null===t.shadowOptions?void 0:Object.assign(Object.assign({},ht),t.shadowOptions),this.elementOptions=void 0===t.elementOptions?dt:Object.assign(Object.assign({},dt),t.elementOptions),this.styles=G.normalize(t.styles),ft.register(this)}get isDefined(){return this.platformDefined}define(e=this.registry){const t=this.type;return e.get(this.name)||(this.platformDefined=!0,e.define(this.name,t,this.elementOptions)),this}static compose(e,t){return ut.has(e)||ft.getByType(e)?new pt(class extends e{},t):new pt(e,t)}static registerBaseType(e){ut.add(e)}}pt.getByType=ft.getByType,pt.getForInstance=ft.getForInstance;const gt={bubbles:!0,composed:!0,cancelable:!0},bt=new WeakMap;function vt(e){var t,s;return null!==(s=null!==(t=e.shadowRoot)&&void 0!==t?t:bt.get(e))&&void 0!==s?s:null}let yt;class mt extends B{constructor(e,t){super(e),this.boundObservables=null,this.needsInitialization=!0,this.hasExistingShadowRoot=!1,this._template=null,this.stage=3,this.guardBehaviorConnection=!1,this.behaviors=null,this._mainStyles=null,this.$fastController=this,this.view=null,this.toJSON=i,this.source=e,this.definition=t;const s=t.shadowOptions;if(void 0!==s){let t=e.shadowRoot;t?this.hasExistingShadowRoot=!0:(t=e.attachShadow(s),"closed"===s.mode&&bt.set(e,t))}const n=j.getAccessors(e);if(n.length>0){const t=this.boundObservables=Object.create(null);for(let s=0,i=n.length;s<i;++s){const i=n[s].name,r=e[i];void 0!==r&&(delete e[i],t[i]=r)}}}get isConnected(){return j.track(this,"isConnected"),1===this.stage}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 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))}addBehavior(e){var t,s;const n=null!==(t=this.behaviors)&&void 0!==t?t:this.behaviors=new Map,i=null!==(s=n.get(e))&&void 0!==s?s:0;0===i?(n.set(e,1),e.addedCallback&&e.addedCallback(this),!e.connectedCallback||this.guardBehaviorConnection||1!==this.stage&&0!==this.stage||e.connectedCallback(this)):n.set(e,i+1)}removeBehavior(e,t=!1){const s=this.behaviors;if(null===s)return;const n=s.get(e);void 0!==n&&(1===n||t?(s.delete(e),e.disconnectedCallback&&3!==this.stage&&e.disconnectedCallback(this),e.removedCallback&&e.removedCallback(this)):s.set(e,n-1))}addStyles(e){var t;if(!e)return;const s=this.source;if(e instanceof HTMLElement){(null!==(t=vt(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=vt(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.addBehavior(t[e])}}connect(){if(3!==this.stage)return;if(this.stage=0,null!==this.boundObservables){const e=this.source,t=this.boundObservables,s=Object.keys(t);for(let n=0,i=s.length;n<i;++n){const i=s[n];e[i]=t[i]}this.boundObservables=null}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.needsInitialization?(this.renderTemplate(this.template),this.addStyles(this.mainStyles),this.needsInitialization=!1):null!==this.view&&this.view.bind(this.source),this.stage=1,j.notify(this,"isConnected")}disconnect(){if(1!==this.stage)return;this.stage=2,j.notify(this,"isConnected"),null!==this.view&&this.view.unbind();const e=this.behaviors;if(null!==e)for(const t of e.keys())t.disconnectedCallback&&t.disconnectedCallback(this);this.stage=3}onAttributeChangedCallback(e,t,s){const n=this.definition.attributeLookup[e];void 0!==n&&n.onAttributeChangedCallback(this.source,s)}emit(e,t,s){return 1===this.stage&&this.source.dispatchEvent(new CustomEvent(e,Object.assign(Object.assign({detail:t},gt),s)))}renderTemplate(e){var t;const s=this.source,n=null!==(t=vt(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=n.firstChild;null!==e;e=n.firstChild)n.removeChild(e)}e&&(this.view=e.render(s,n,s),this.view.sourceLifetime=k.coupled)}static forCustomElement(e){const t=e.$fastController;if(void 0!==t)return t;const s=pt.getForInstance(e);if(void 0===s)throw o.error(1401);return e.$fastController=new yt(e,s)}static setStrategy(e){yt=e}}function wt(e){var t;return"adoptedStyleSheets"in e?e:null!==(t=vt(e))&&void 0!==t?t:e.getRootNode()}mt.setStrategy(mt);class xt{constructor(e){const t=xt.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){const t=wt(e);t.adoptedStyleSheets=[...t.adoptedStyleSheets,...this.sheets]}removeStylesFrom(e){const t=wt(e),s=this.sheets;t.adoptedStyleSheets=t.adoptedStyleSheets.filter((e=>-1===s.indexOf(e)))}}xt.styleSheetCache=new Map;let Ct=0;function St(e){return e===document?document.body:e}function Ot(e){const t=class extends e{constructor(){super(),mt.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 Tt(e,t){return s(e)?pt.compose(e,t).define().type:pt.compose(this,e).define().type}G.setDefaultStrategy(G.supportsAdoptedStyleSheets?xt:class{constructor(e){this.styles=e,this.styleClass="fast-"+ ++Ct}addStylesTo(e){e=St(wt(e));const t=this.styles,s=this.styleClass;for(let n=0;n<t.length;n++){const i=document.createElement("style");i.innerHTML=t[n],i.className=s,e.append(i)}}removeStylesFrom(e){const t=(e=St(wt(e))).querySelectorAll(`.${this.styleClass}`);t[0].parentNode;for(let s=0,n=t.length;s<n;++s)e.removeChild(t[s])}});const At=Object.assign(Ot(HTMLElement),{from:function(e){return Ot(e)},define:Tt,compose:function(e,t){return s(e)?pt.compose(e,t):pt.compose(this,e)}});function Bt(e){return function(t){Tt(t,e)}}b.setPolicy(T.create());export{Q as ArrayObserver,it as AttributeConfiguration,at as AttributeDefinition,pe as Binding,X as CSSDirective,et as ChildrenDirective,Ie as Compiler,b as DOM,d as DOMAspect,st as DangerousHTMLDirective,mt as ElementController,G as ElementStyles,V as ExecutionContext,o as FAST,At as FASTElement,pt as FASTElementDefinition,me as HTMLBindingDirective,ue as HTMLDirective,Te as HTMLView,ce as Markup,Xe as NodeObservationDirective,j as Observable,he as Parser,B as PropertyChangeNotifier,Pe as RefDirective,Ue as RepeatBehavior,Je as RepeatDirective,Ye as SlottedDirective,k as SourceLifetime,z as Splice,R as SpliceStrategy,I as SpliceStrategySupport,ge as StatelessAttachedAttributeDirective,A as SubscriberSet,h as Updates,_e as ViewTemplate,ct as attr,we as bind,rt as booleanConverter,tt as children,c as createMetadataLocator,a as createTypeRegistry,ee as css,Y as cssDirective,se as cssPartial,Bt as customElement,nt as dangerousHTML,Ke as elements,l as emptyArray,Fe as html,fe as htmlDirective,U as lengthOf,Ce as listener,Se as normalizeBinding,lt as nullableNumberConverter,N as observable,xe as oneTime,Re as ref,We as repeat,Ze as slotted,$ as volatile,He as when};
|
package/package.json
CHANGED
package/yarn-error.log
DELETED
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
Arguments:
|
|
2
|
-
/Users/christopherholt/.nvm/versions/node/v16.14.2/bin/node /Users/christopherholt/repos/fast-dna/.yarn/releases/yarn-1.22.11.cjs clean:dist
|
|
3
|
-
|
|
4
|
-
PATH:
|
|
5
|
-
/Users/christopherholt/repos/fast-dna/packages/web-components/fast-element/node_modules/.bin:/Users/christopherholt/repos/fast-dna/packages/web-components/node_modules/.bin:/Users/christopherholt/repos/fast-dna/packages/node_modules/.bin:/Users/christopherholt/repos/fast-dna/node_modules/.bin:/Users/christopherholt/repos/node_modules/.bin:/Users/christopherholt/node_modules/.bin:/Users/node_modules/.bin:/node_modules/.bin:/Users/christopherholt/.nvm/versions/node/v16.14.2/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/Users/christopherholt/.nvm/versions/node/v16.14.2/bin:/usr/local/opt/openssl/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin
|
|
6
|
-
|
|
7
|
-
Yarn version:
|
|
8
|
-
1.22.11
|
|
9
|
-
|
|
10
|
-
Node version:
|
|
11
|
-
16.14.2
|
|
12
|
-
|
|
13
|
-
Platform:
|
|
14
|
-
darwin x64
|
|
15
|
-
|
|
16
|
-
Trace:
|
|
17
|
-
SyntaxError: /Users/christopherholt/repos/fast-dna/package.json: Unexpected token / in JSON at position 353
|
|
18
|
-
at JSON.parse (<anonymous>)
|
|
19
|
-
at /Users/christopherholt/repos/fast-dna/.yarn/releases/yarn-1.22.11.cjs:1098:57
|
|
20
|
-
at Generator.next (<anonymous>)
|
|
21
|
-
at step (/Users/christopherholt/repos/fast-dna/.yarn/releases/yarn-1.22.11.cjs:310:30)
|
|
22
|
-
at /Users/christopherholt/repos/fast-dna/.yarn/releases/yarn-1.22.11.cjs:321:13
|
|
23
|
-
|
|
24
|
-
npm manifest:
|
|
25
|
-
{
|
|
26
|
-
"name": "@microsoft/fast-element",
|
|
27
|
-
"description": "A library for constructing Web Components",
|
|
28
|
-
"version": "2.0.0-beta.14",
|
|
29
|
-
"author": {
|
|
30
|
-
"name": "Microsoft",
|
|
31
|
-
"url": "https://discord.gg/FcSNfg4"
|
|
32
|
-
},
|
|
33
|
-
"homepage": "https://www.fast.design/",
|
|
34
|
-
"license": "MIT",
|
|
35
|
-
"repository": {
|
|
36
|
-
"type": "git",
|
|
37
|
-
"url": "git+https://github.com/Microsoft/fast.git",
|
|
38
|
-
"directory": "packages/web-components/fast-element"
|
|
39
|
-
},
|
|
40
|
-
"bugs": {
|
|
41
|
-
"url": "https://github.com/Microsoft/fast/issues/new/choose"
|
|
42
|
-
},
|
|
43
|
-
"type": "module",
|
|
44
|
-
"main": "dist/esm/index.js",
|
|
45
|
-
"types": "dist/dts/index.d.ts",
|
|
46
|
-
"exports": {
|
|
47
|
-
".": {
|
|
48
|
-
"types": "./dist/dts/index.d.ts",
|
|
49
|
-
"production": "./dist/esm/index.js",
|
|
50
|
-
"development": "./dist/esm/index.debug.js",
|
|
51
|
-
"default": "./dist/esm/index.js"
|
|
52
|
-
},
|
|
53
|
-
"./debug": {
|
|
54
|
-
"types": "./dist/dts/debug.d.ts",
|
|
55
|
-
"default": "./dist/esm/debug.js"
|
|
56
|
-
},
|
|
57
|
-
"./binding/two-way": {
|
|
58
|
-
"types": "./dist/dts/templating/binding-two-way.d.ts",
|
|
59
|
-
"default": "./dist/esm/templating/binding-two-way.js"
|
|
60
|
-
},
|
|
61
|
-
"./binding/signal": {
|
|
62
|
-
"types": "./dist/dts/templating/binding-signal.d.ts",
|
|
63
|
-
"default": "./dist/esm/templating/binding-signal.js"
|
|
64
|
-
},
|
|
65
|
-
"./render": {
|
|
66
|
-
"types": "./dist/dts/templating/render.d.ts",
|
|
67
|
-
"default": "./dist/esm/templating/render.js"
|
|
68
|
-
},
|
|
69
|
-
"./utilities": {
|
|
70
|
-
"types": "./dist/dts/utilities.d.ts",
|
|
71
|
-
"default": "./dist/esm/utilities.js"
|
|
72
|
-
},
|
|
73
|
-
"./state": {
|
|
74
|
-
"types": "./dist/dts/state/exports.d.ts",
|
|
75
|
-
"default": "./dist/esm/state/exports.js"
|
|
76
|
-
},
|
|
77
|
-
"./context": {
|
|
78
|
-
"types": "./dist/dts/context.d.ts",
|
|
79
|
-
"default": "./dist/esm/context.js"
|
|
80
|
-
},
|
|
81
|
-
"./metadata": {
|
|
82
|
-
"types": "./dist/dts/metadata.d.ts",
|
|
83
|
-
"default": "./dist/esm/metadata.js"
|
|
84
|
-
},
|
|
85
|
-
"./testing": {
|
|
86
|
-
"types": "./dist/dts/testing/exports.d.ts",
|
|
87
|
-
"default": "./dist/esm/testing/exports.js"
|
|
88
|
-
},
|
|
89
|
-
"./di": {
|
|
90
|
-
"types": "./dist/dts/di/di.d.ts",
|
|
91
|
-
"default": "./dist/esm/di/di.js"
|
|
92
|
-
},
|
|
93
|
-
"./pending-task": {
|
|
94
|
-
"types": "./dist/dts/pending-task.d.ts",
|
|
95
|
-
"default": "./dist/esm/pending-task.js"
|
|
96
|
-
},
|
|
97
|
-
"./package.json": "./package.json"
|
|
98
|
-
},
|
|
99
|
-
"unpkg": "dist/fast-element.min.js",
|
|
100
|
-
"sideEffects": [
|
|
101
|
-
"./dist/esm/debug.js",
|
|
102
|
-
"./dist/esm/polyfills.js"
|
|
103
|
-
],
|
|
104
|
-
"scripts": {
|
|
105
|
-
"clean:dist": "node ../../../build/clean.js dist",
|
|
106
|
-
"doc": "api-extractor run --local",
|
|
107
|
-
"doc:ci": "api-extractor run",
|
|
108
|
-
"build": "yarn build:tsc && yarn build:rollup && yarn doc",
|
|
109
|
-
"build:rollup": "rollup -c",
|
|
110
|
-
"build:tsc": "tsc -p ./tsconfig.json",
|
|
111
|
-
"dev": "tsc -p ./tsconfig.json -w",
|
|
112
|
-
"tdd": "yarn dev & yarn test-chrome:watch",
|
|
113
|
-
"prepare": "yarn clean:dist && yarn build",
|
|
114
|
-
"prettier": "prettier --config ../../../.prettierrc --write \"**/*.ts\"",
|
|
115
|
-
"prettier:diff": "prettier --config ../../../.prettierrc \"**/*.ts\" --list-different",
|
|
116
|
-
"eslint": "eslint . --ext .ts",
|
|
117
|
-
"eslint:fix": "eslint . --ext .ts --fix",
|
|
118
|
-
"test": "yarn eslint && yarn test-chrome:verbose && yarn doc:ci",
|
|
119
|
-
"test-node": "mocha --reporter min --exit dist/esm/__test__/setup-node.js './dist/esm/**/*.spec.js'",
|
|
120
|
-
"test-node:verbose": "mocha --reporter spec --exit dist/esm/__test__/setup-node.js './dist/esm/**/*.spec.js'",
|
|
121
|
-
"test-chrome": "karma start karma.conf.cjs --browsers=ChromeHeadlessOpt --single-run --coverage",
|
|
122
|
-
"test-chrome:verbose": "karma start karma.conf.cjs --browsers=ChromeHeadlessOpt --single-run --coverage --reporter=mocha",
|
|
123
|
-
"test-chrome:watch": "karma start karma.conf.cjs --browsers=ChromeHeadlessOpt --coverage --watch-extensions js",
|
|
124
|
-
"test-chrome:debugger": "karma start karma.conf.cjs --browsers=ChromeDebugging",
|
|
125
|
-
"test-chrome:verbose:watch": "karma start karma.conf.cjs --browsers=ChromeHeadlessOpt --coverage --watch-extensions js --reporter=mocha",
|
|
126
|
-
"test-chrome:verbose:debugger": "karma start karma.conf.cjs --browsers=ChromeDebugging --reporter=mocha",
|
|
127
|
-
"test-firefox": "karma start karma.conf.cjs --browsers=FirefoxHeadless --single-run --coverage",
|
|
128
|
-
"test-firefox:verbose": "karma start karma.conf.cjs --browsers=FirefoxHeadless --single-run --coverage --reporter=mocha"
|
|
129
|
-
},
|
|
130
|
-
"devDependencies": {
|
|
131
|
-
"@microsoft/api-extractor": "7.24.2",
|
|
132
|
-
"@types/chai": "^4.2.11",
|
|
133
|
-
"@types/chai-spies": "^1.0.3",
|
|
134
|
-
"@types/karma": "^6.3.3",
|
|
135
|
-
"@types/mocha": "^7.0.2",
|
|
136
|
-
"@types/webpack-env": "^1.15.2",
|
|
137
|
-
"chai": "^4.2.0",
|
|
138
|
-
"chai-spies": "^1.0.0",
|
|
139
|
-
"esm": "^3.2.25",
|
|
140
|
-
"ignore-loader": "^0.1.2",
|
|
141
|
-
"istanbul": "^0.4.5",
|
|
142
|
-
"istanbul-instrumenter-loader": "^3.0.1",
|
|
143
|
-
"jsdom": "^16.2.2",
|
|
144
|
-
"jsdom-global": "3.0.2",
|
|
145
|
-
"karma": "^6.4.1",
|
|
146
|
-
"karma-chrome-launcher": "^3.1.0",
|
|
147
|
-
"karma-coverage": "^2.0.2",
|
|
148
|
-
"karma-coverage-istanbul-reporter": "^3.0.0",
|
|
149
|
-
"karma-firefox-launcher": "^2.1.0",
|
|
150
|
-
"karma-mocha": "^2.0.1",
|
|
151
|
-
"karma-mocha-reporter": "^2.2.5",
|
|
152
|
-
"karma-source-map-support": "^1.4.0",
|
|
153
|
-
"karma-sourcemap-loader": "^0.3.7",
|
|
154
|
-
"karma-webpack": "^5.0.0",
|
|
155
|
-
"mocha": "^7.1.2",
|
|
156
|
-
"prettier": "2.0.2",
|
|
157
|
-
"rollup": "^2.71.1",
|
|
158
|
-
"rollup-plugin-filesize": "^9.1.2",
|
|
159
|
-
"rollup-plugin-terser": "^7.0.2",
|
|
160
|
-
"@rollup/plugin-typescript": "^8.3.2",
|
|
161
|
-
"source-map": "^0.7.3",
|
|
162
|
-
"source-map-loader": "^0.2.4",
|
|
163
|
-
"ts-loader": "^7.0.2",
|
|
164
|
-
"ts-node": "^8.9.1",
|
|
165
|
-
"tsconfig-paths": "^3.9.0",
|
|
166
|
-
"tslib": "^2.4.0",
|
|
167
|
-
"typescript": "^4.7.0",
|
|
168
|
-
"webpack": "^5.72.0",
|
|
169
|
-
"webpack-cli": "^4.9.2"
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
yarn manifest:
|
|
174
|
-
No manifest
|
|
175
|
-
|
|
176
|
-
Lockfile:
|
|
177
|
-
No lockfile
|