@graview/guest 0.1.26 → 0.1.27
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/README.md +18 -1
- package/dist/headless/describe.d.ts.map +1 -1
- package/dist/headless/describe.js +5 -3
- package/dist/headless/describe.js.map +1 -1
- package/dist/headless/judge.d.ts.map +1 -1
- package/dist/headless/judge.js +5 -3
- package/dist/headless/judge.js.map +1 -1
- package/dist/headless/runtime.generated.d.ts.map +1 -1
- package/dist/headless/runtime.generated.js +1 -1
- package/dist/headless/runtime.generated.js.map +1 -1
- package/dist/host/links.d.ts +9 -1
- package/dist/host/links.d.ts.map +1 -1
- package/dist/host/links.js +13 -2
- package/dist/host/links.js.map +1 -1
- package/dist/host/open-draw.d.ts +2 -0
- package/dist/host/open-draw.d.ts.map +1 -1
- package/dist/host/open-draw.js +1 -0
- package/dist/host/open-draw.js.map +1 -1
- package/dist/host/open-judge.d.ts +6 -0
- package/dist/host/open-judge.d.ts.map +1 -1
- package/dist/host/open-judge.js +8 -0
- package/dist/host/open-judge.js.map +1 -1
- package/dist/host/view-runtime.generated.d.ts.map +1 -1
- package/dist/host/view-runtime.generated.js +1 -1
- package/dist/host/view-runtime.generated.js.map +1 -1
- package/dist/host/view.d.ts +13 -0
- package/dist/host/view.d.ts.map +1 -1
- package/dist/host/view.js +15 -5
- package/dist/host/view.js.map +1 -1
- package/dist/host/worker-react.d.ts +4 -0
- package/dist/host/worker-react.d.ts.map +1 -1
- package/dist/host/worker-react.js +2 -0
- package/dist/host/worker-react.js.map +1 -1
- package/dist/host/writes.js +1 -1
- package/dist/host/writes.js.map +1 -1
- package/dist/protocol.d.ts +7 -1
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +1 -0
- package/dist/protocol.js.map +1 -1
- package/dist/worker/view-global.d.ts.map +1 -1
- package/dist/worker/view-global.js +14 -0
- package/dist/worker/view-global.js.map +1 -1
- package/dist/worker/view.js +1 -1
- package/package.json +3 -3
package/dist/host/links.d.ts
CHANGED
|
@@ -11,14 +11,22 @@ export interface LinksOptions {
|
|
|
11
11
|
readonly places: () => readonly GuestPlace[];
|
|
12
12
|
/** Go: the face's own way to a record or a place. */
|
|
13
13
|
readonly onNavigate?: (to: Destination) => void;
|
|
14
|
+
/** It went nowhere: the sentence saying why. */
|
|
15
|
+
readonly onLost?: (said: string) => void;
|
|
14
16
|
}
|
|
15
17
|
export interface Links {
|
|
16
18
|
/** An `<a>` the view drew, or changed: a link if it names a record or a place, text if not. */
|
|
17
19
|
link(anchor: Element): void;
|
|
18
20
|
/** The viewer followed a link the host made. */
|
|
19
21
|
follow(anchor: Element): void;
|
|
20
|
-
/** Go somewhere
|
|
22
|
+
/** Go somewhere: a record the viewer may see, else a place by that slug. Whether it went; where it did not, `onLost` hears why. */
|
|
21
23
|
go(to: Destination): boolean;
|
|
22
24
|
}
|
|
25
|
+
/** The app's places, as a sentence ends with them. */
|
|
26
|
+
export declare const placesSaid: (slugs: readonly string[]) => string;
|
|
27
|
+
/** At most 80 characters of what a view asked for, ending "…" where it was cut: the sentence reaches the host's problems, and a view may ask for anything. */
|
|
28
|
+
export declare const quoted: (asked: string) => string;
|
|
29
|
+
/** Why a destination goes nowhere, naming where it could go. */
|
|
30
|
+
export declare const nowhere: (to: Destination, slugs: readonly string[]) => string;
|
|
23
31
|
export declare function createLinks(options: LinksOptions): Links;
|
|
24
32
|
//# sourceMappingURL=links.d.ts.map
|
package/dist/host/links.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"links.d.ts","sourceRoot":"","sources":["../../src/host/links.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"links.d.ts","sourceRoot":"","sources":["../../src/host/links.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAqBjD,MAAM,MAAM,WAAW,GAAG;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnF,MAAM,WAAW,YAAY;IAC3B,2CAA2C;IAC3C,QAAQ,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC;IACvC,8BAA8B;IAC9B,QAAQ,CAAC,MAAM,EAAE,MAAM,SAAS,UAAU,EAAE,CAAC;IAC7C,qDAAqD;IACrD,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,WAAW,KAAK,IAAI,CAAC;IAChD,gDAAgD;IAChD,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1C;AAED,MAAM,WAAW,KAAK;IACpB,+FAA+F;IAC/F,IAAI,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;IAC5B,gDAAgD;IAChD,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;IAC9B,mIAAmI;IACnI,EAAE,CAAC,EAAE,EAAE,WAAW,GAAG,OAAO,CAAC;CAC9B;AAED,sDAAsD;AACtD,eAAO,MAAM,UAAU,GAAI,OAAO,SAAS,MAAM,EAAE,WAA6E,CAAC;AAEjI,8JAA8J;AAC9J,eAAO,MAAM,MAAM,GAAI,OAAO,MAAM,WAAgE,CAAC;AAErG,gEAAgE;AAChE,eAAO,MAAM,OAAO,GAAI,IAAI,WAAW,EAAE,OAAO,SAAS,MAAM,EAAE,WACiH,CAAC;AAEnL,wBAAgB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,KAAK,CA8BxD"}
|
package/dist/host/links.js
CHANGED
|
@@ -1,8 +1,19 @@
|
|
|
1
|
+
/** The app's places, as a sentence ends with them. */
|
|
2
|
+
export const placesSaid = (slugs) => ` Its places: ${slugs.map((slug) => `"${slug}"`).join(", ") || "none"}.`;
|
|
3
|
+
/** At most 80 characters of what a view asked for, ending "…" where it was cut: the sentence reaches the host's problems, and a view may ask for anything. */
|
|
4
|
+
export const quoted = (asked) => `"${asked.length > 80 ? `${asked.slice(0, 79)}…` : asked}"`;
|
|
5
|
+
/** Why a destination goes nowhere, naming where it could go. */
|
|
6
|
+
export const nowhere = (to, slugs) => `${"place" in to ? `The place ${quoted(to.place)}` : `${quoted(to.record)} is no record this viewer may see and`} is no place of this app: it goes nowhere.${placesSaid(slugs)}`;
|
|
1
7
|
export function createLinks(options) {
|
|
2
8
|
const go = (to) => {
|
|
3
|
-
const
|
|
9
|
+
const slugs = options.places().map((place) => place.as);
|
|
10
|
+
/* A record the viewer may see first, then a place by that slug. */
|
|
11
|
+
const place = "place" in to ? to.place : options.sees(to.record) ? undefined : to.record;
|
|
12
|
+
const ok = place === undefined || slugs.includes(place);
|
|
4
13
|
if (ok)
|
|
5
|
-
options.onNavigate?.(to);
|
|
14
|
+
options.onNavigate?.(place === undefined ? to : { place });
|
|
15
|
+
else
|
|
16
|
+
options.onLost?.(nowhere(to, slugs));
|
|
6
17
|
return ok;
|
|
7
18
|
};
|
|
8
19
|
return {
|
package/dist/host/links.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"links.js","sourceRoot":"","sources":["../../src/host/links.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"links.js","sourceRoot":"","sources":["../../src/host/links.ts"],"names":[],"mappings":"AA2CA,sDAAsD;AACtD,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAwB,EAAE,EAAE,CAAC,gBAAgB,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,MAAM,GAAG,CAAC;AAEjI,8JAA8J;AAC9J,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,IAAI,KAAK,CAAC,M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|
|
7
7
|
export interface OpenDrawingOptions {
|
|
8
8
|
/** The host page's origin, for a `blob:` image of its own. */
|
|
9
9
|
readonly origin: string;
|
|
10
|
+
/** Where an image the app holds is loaded from (JudgeContext.asset). */
|
|
11
|
+
readonly asset?: (path: string) => string | undefined;
|
|
10
12
|
readonly maxNodes?: number;
|
|
11
13
|
readonly onOverBudget?: () => void;
|
|
12
14
|
/** Tell the view what the viewer did. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"open-draw.d.ts","sourceRoot":"","sources":["../../src/host/open-draw.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAsB,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAC/D,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAUzE,mHAAmH;AACnH,eAAO,MAAM,UAAU,8VAItB,CAAC;AAMF,MAAM,WAAW,kBAAkB;IACjC,8DAA8D;IAC9D,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IACnC,yCAAyC;IACzC,QAAQ,CAAC,IAAI,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,IAAI,CAAC;IAChD,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,KAAK,IAAI,CAAC;IACvF,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/C,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,M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M,OAAO,GAAG,OAAO,CAAC;IACxD,iEAAiE;IACjE,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;IAChC,iFAAiF;IACjF,QAAQ,CAAC,OAAO,EAAE,SAAS,WAAW,EAAE,CAAC;IACzC,+BAA+B;IAC/B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,iHAAiH;AACjH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,kBAAkB,GAAG,WAAW,CAkF9F"}
|
package/dist/host/open-draw.js
CHANGED
|
@@ -29,6 +29,7 @@ export function createOpenDrawing(shadow, options) {
|
|
|
29
29
|
shadow.append(base, sheet, into);
|
|
30
30
|
const renderer = createOpenRenderer(into, {
|
|
31
31
|
origin: options.origin,
|
|
32
|
+
...(options.asset ? { asset: options.asset } : {}),
|
|
32
33
|
...(options.maxNodes !== undefined ? { maxNodes: options.maxNodes } : {}),
|
|
33
34
|
...(options.onOverBudget ? { onOverBudget: options.onOverBudget } : {}),
|
|
34
35
|
decorate: (element, name, namespace) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"open-draw.js","sourceRoot":"","sources":["../../src/host/open-draw.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAmB,MAAM,UAAU,CAAC;AAE/D,OAAO,EAAE,kBAAkB,EAAqB,MAAM,kBAAkB,CAAC;AAEzE;;;;;;GAMG;AAEH,mHAAmH;AACnH,MAAM,CAAC,MAAM,UAAU,GAAG;;;;CAIzB,CAAC;AAEF,4GAA4G;AAC5G,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;A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AAC;YACD,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC;YACjB,KAAK,CAAC,WAAW,GAAG,GAAG,CAAC;QAC1B,CAAC;QACD,QAAQ;QACR,IAAI,OAAO;YACT,OAAO,CAAC,GAAG,QAAQ,CAAC,OAAO,EAAE,GAAG,UAAU,CAAC,CAAC;QAC9C,CAAC;QACD,IAAI,GAAG;YACL,OAAO,GAAG,CAAC;QACb,CAAC;QACD,OAAO;YACL,KAAK,MAAM,IAAI,IAAI,MAAM;gBAAE,MAAM,CAAC,mBAAmB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YAClE,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;YACjD,QAAQ,CAAC,OAAO,EAAE,CAAC;YACnB,MAAM,CAAC,eAAe,EAAE,CAAC;QAC3B,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -37,6 +37,12 @@ export declare function isEmptyElement(namespace: OpenNamespace, name: string):
|
|
|
37
37
|
export interface JudgeContext {
|
|
38
38
|
/** The host page's origin, for a `blob:` image of its own. "null" in an opaque origin. */
|
|
39
39
|
readonly origin: string;
|
|
40
|
+
/**
|
|
41
|
+
* Where an image the app holds is loaded from (`/graview/assets/<sha256>.<ext>`):
|
|
42
|
+
* the host's address for it, or undefined to refuse it. Without it, a view
|
|
43
|
+
* draws only `data:` images and the page's own `blob:`.
|
|
44
|
+
*/
|
|
45
|
+
readonly asset?: (path: string) => string | undefined;
|
|
40
46
|
}
|
|
41
47
|
/**
|
|
42
48
|
* An attribute as the host draws it: its canonical name and value, `null`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"open-judge.d.ts","sourceRoot":"","sources":["../../src/host/open-judge.ts"],"names":[],"mappings":"AAaA,OAAO,EAAuC,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAQhF,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,KAAK,CAAC;AAE3C,kDAAkD;AA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CAAE,GAAG;IAAE,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAA;CAAE,CAYzI"}
|
package/dist/host/open-judge.js
CHANGED
|
@@ -23,6 +23,8 @@ const NUMBER = /^[+-]?(\d+\.?\d*|\.\d+)([eE][+-]?\d+)?$/;
|
|
|
23
23
|
const GEOMETRY = /^[0-9A-Za-z\s.,+\-%()]*$/;
|
|
24
24
|
const FRAGMENT = /^#[A-Za-z_][A-Za-z0-9_.:-]*$/;
|
|
25
25
|
const DATA_IMAGE = /^data:image\/(png|gif|jpeg|webp|avif|bmp|svg\+xml)(;[A-Za-z0-9=._+-]+)*,/i;
|
|
26
|
+
/* An image the app itself holds, by content address: what `add_image` answers, and nothing else under the app. */
|
|
27
|
+
const APP_IMAGE = /^\/graview\/assets\/[0-9a-f]{64}\.(png|gif|jpe?g|webp|avif|svg|ico)$/;
|
|
26
28
|
/**
|
|
27
29
|
* An attribute as the host draws it: its canonical name and value, `null`
|
|
28
30
|
* to draw it removed, or a refusal. A value the view sets to `null` (Remote
|
|
@@ -62,6 +64,12 @@ function judgeValue(name, kind, value, context) {
|
|
|
62
64
|
/* A blob: of the host's own page: it is in the page's memory already, and loading it asks nobody. */
|
|
63
65
|
if (value.startsWith(`blob:${context.origin}/`) && /^blob:[^\s"'<>]+$/.test(value))
|
|
64
66
|
return { value };
|
|
67
|
+
/* An image the app holds, where the host says it lives: its own host, by content address, so loading it asks nobody new. */
|
|
68
|
+
if (APP_IMAGE.test(value) && context.asset) {
|
|
69
|
+
const address = context.asset(value);
|
|
70
|
+
if (address)
|
|
71
|
+
return { value: address };
|
|
72
|
+
}
|
|
65
73
|
return refused("url");
|
|
66
74
|
}
|
|
67
75
|
if (value.length > OPEN_MAX_ATTRIBUTE)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"open-judge.js","sourceRoot":"","sources":["../../src/host/open-judge.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,aAAa,EACb,kBAAkB,EAClB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mappings":"AAKA,eAAO,MAAM,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"view-runtime.generated.d.ts","sourceRoot":"","sources":["../../src/host/view-runtime.generated.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,YAAY,EAAE,MAA8w7D,CAAC"}
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* A worker view's runtime as one classic script (FR-96): the host puts it in
|
|
4
4
|
* front of a view's own source. Carries Remote DOM (MIT, Shopify Inc.).
|
|
5
5
|
*/
|
|
6
|
-
export const VIEW_RUNTIME = "\"use strict\";\n/*! @remote-dom/core and @remote-dom/polyfill — Copyright 2020-present, Shopify Inc. — MIT License.\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * @graview/guest's worker runtime — Elastic License 2.0. */\n\"use strict\";(()=>{var we=globalThis,zr=we.addEventListener,jr=we.removeEventListener,Fr=we.postMessage,qr=globalThis.queueMicrotask,nn=globalThis.performance,Yr=nn?nn.now.bind(nn):Date.now,xe={listen:t=>zr.call(we,\"message\",t),unlisten:t=>jr.call(we,\"message\",t),post:t=>Fr.call(we,t),microtask:t=>qr.call(globalThis,t),now:()=>Yr()};var w=Symbol(\"name\"),ae=Symbol(\"prefix\"),le=Symbol(\"value\"),x=Symbol(\"ns\"),z=Symbol(\"owner\"),k=Symbol(\"owner_document\"),J=Symbol(\"attributes\"),I=Symbol(\"prev\"),p=Symbol(\"next\"),O=Symbol(\"child\"),j=Symbol(\"parent\"),ce=Symbol(\"host\"),Y=Symbol(\"data\"),he=Symbol(\"listeners\"),rn=Symbol(\"isTrusted\"),ve=Symbol(\"path\"),Se=Symbol(\"stop_immediate_propagation\"),Oe=Symbol(\"dispatching\"),ne=Symbol(\"content\"),M=Symbol(\"hooks\"),at=Symbol(\"extensions\"),ge=Symbol(\"hooks_dispatch\"),U=Symbol(\"is_connected\"),Re=Symbol(\"create_element\"),Un=0,q=1,Ae=2,_e=3,Pe=8,be=9,Gn=10,ue=11,R=\"http://www.w3.org/1999/xhtml\",W=\"http://www.w3.org/2000/svg\",Vn=\"http://www.w3.org/XML/1998/namespace\",Fe=\"http://www.w3.org/2000/xmlns/\";function lt(t){return t.split(/[\\t\\n\\f\\r ]+/).filter(Boolean)}function L(t){return t.replace(/[A-Z]/g,e=>String.fromCharCode(e.charCodeAt(0)+32))}function Bn(t){return t.replace(/[a-z]/g,e=>String.fromCharCode(e.charCodeAt(0)-32))}function P(t,e){let n=globalThis.DOMException;if(typeof n==\"function\")return new n(t,e);let r=new Error(t);return r.name=e,r}var zn=/^(?:[A-Za-z][^\\0\\t\\n\\f\\r\\u0020/>]*|[:_\\u0080-\\u{10FFFF}][A-Za-z0-9-.:_\\u0080-\\u{10FFFF}]*)$/u,jn=/[\\0\\t\\n\\f\\r />=]/u,Wr=/[\\0\\t\\n\\f\\r />]/u;function re(t){if(t==null)return null;let e=String(t);return e===\"\"?null:e}function Fn(t){zn.test(t)||sn(t)}function on(t){(t===\"\"||jn.test(t))&&sn(t)}function ct(t,e,n){let r=re(t),o=String(e),i=o.indexOf(\":\"),s=i<0?null:o.slice(0,i),a=i<0?o:o.slice(i+1);if((s!=null&&(s===\"\"||Wr.test(s))||(n===\"element\"?!zn.test(a):a===\"\"||jn.test(a)))&&sn(o),s!=null&&r==null)throw P(`A namespace is required for the prefix in \"${o}\"`,\"NamespaceError\");if(s===\"xml\"&&r!==Vn)throw P(\"The xml prefix requires the XML namespace\",\"NamespaceError\");if((o===\"xmlns\"||s===\"xmlns\")&&r!==Fe)throw P(\"The xmlns name requires the XMLNS namespace\",\"NamespaceError\");if(r===Fe&&o!==\"xmlns\"&&s!==\"xmlns\")throw P(\"The XMLNS namespace requires the xmlns name or prefix\",\"NamespaceError\");return{namespace:r,qualifiedName:o,prefix:s,localName:a}}function sn(t){throw P(`Invalid name: \"${t}\"`,\"InvalidCharacterError\")}var ut=0,dt=1,qn=2,an=3,Xr=typeof performance>\"u\"?Date.now:performance.now.bind(performance),G=class{static NONE=ut;static CAPTURING_PHASE=dt;static AT_TARGET=qn;static BUBBLING_PHASE=an;timeStamp=Xr();target=null;currentTarget=null;srcElement=null;bubbles=!1;cancelable=!1;composed=!1;defaultPrevented=!1;cancelBubble=!1;eventPhase=ut;[ve]=[];[Se]=!1;[Oe]=!1;constructor(e,n){this.type=e,Object.defineProperty(this,rn,{writable:!0,value:!1}),n&&(n.bubbles&&(this.bubbles=n.bubbles),n.cancelable&&(this.cancelable=n.cancelable),n.composed&&(this.composed=n.composed))}get isTrusted(){return this[rn]}composedPath(){return[...this[ve]]}stopPropagation(){this.cancelBubble=!0}stopImmediatePropagation(){this[Se]=!0,this.cancelBubble=!0}preventDefault(){this.cancelable&&(this.defaultPrevented=!0)}set returnValue(e){e||this.preventDefault()}get returnValue(){return!this.defaultPrevented}initEvent(e,n,r){this.type=e,this.bubbles=!!n,this.cancelable=!!r}};function ln(t,e,n){if(t.cancelBubble)return;let o=e[he]?.get(t.type)?.[n===dt?\"capture\":\"bubble\"];if(o)for(let i of[...o]){if(!o.has(i)||i.signal?.aborted)continue;t.eventPhase=t.target===e?qn:n,t.currentTarget=e;let s=i.normalizedListener;try{typeof s==\"object\"?s.handleEvent(t):s.call(e,t)}catch(a){setTimeout($r,0,a)}if(t[Se])break}}function $r(t){throw t}var qe=[],ft=new WeakMap;function mt(t,e){let n=ft.get(t);n?n.push(e):ft.set(t,[e]),qe[qe.length-1].push(t)}function V(t){let e=[];qe.push(e);let n;try{n=t()}catch(r){qe.pop();try{Yn(e)}catch{}throw r}return qe.pop(),Yn(e),n}function Yn(t){let e,n=!1;for(let r of t){let o=ft.get(r);if(o){for(;o.length>0;){let i=o.shift();try{i()}catch(s){n||(e=s,n=!0)}}ft.delete(r)}}if(n)throw e}var pt=[],Ye=[],cn=!1;function Ee(t){for(let e of t)pt.push(e),e[1]&&Ye.push(e[1]);if(!cn){cn=!0;try{let e,n=!1;for(let r=0;r<pt.length;r++){let[o,i]=pt[r];i&&Ye.splice(Ye.indexOf(i),1);try{o()}catch(s){n||(e=s,n=!0)}}if(n)throw e}finally{pt.length=0,Ye.length=0,cn=!1}}}function We(t){let e=t;for(;e;){if(Ye.includes(e))return!0;e=e[j]??e[ce]}return!1}var Xe=Symbol(\"listenerRegistrations\"),de=class{[he]=void 0;[Xe]=void 0;[k]=void 0;addEventListener(e,n,r){if(n==null)return;let o=r===!0||typeof r==\"object\"&&r.capture===!0,i=typeof r==\"object\"&&r.once===!0,s=typeof r==\"object\"?r.signal:void 0;if(s?.aborted)return;let a=un(o),u=this[Xe];u||(u=new Map,this[Xe]=u);let c=u.get(e);c||(c={},u.set(e,c));let f=c[a];if(f||(f=new Map,c[a]=f),f.has(n))return;let m=this,b={type:e,listener:n,capture:o,once:i,normalizedListener:n,signal:s};(i||s)&&(b.normalizedListener=function(...C){if(b.signal?.aborted){ht(m,b);return}return b.once&&ht(m,b),typeof b.listener==\"object\"?b.listener.handleEvent(...C):b.listener.call(this,...C)});let h=this[he];h||(h=new Map,this[he]=h);let v=h.get(e);v||(v={},h.set(e,v));let g=v[a];if(g||(g=new Set,v[a]=g),f.set(n,b),g.add(b),s){let y=()=>{ht(m,b)};b.abortListener=y,s.addEventListener(\"abort\",y,{once:!0})}this[k]?.defaultView[ge].addEventListener?.(this,e,n,r)}removeEventListener(e,n,r){return Kr.call(this,e,n,r)}dispatchEvent(e){if(e[Oe])throw P(\"Failed to execute 'dispatchEvent' on 'EventTarget': The event is already being dispatched.\",\"InvalidStateError\");e[Oe]=!0;try{let n=[],r=this;for(;r!=null;)n.push(r),r=r.parentNode;e.target=this,e.srcElement=this,e[ve]=n;for(let i=n.length;i--;)if(ln(e,n[i],dt),e.cancelBubble)return!e.defaultPrevented;let o=e.bubbles?n:n.slice(0,1);for(let i=0;i<o.length;i++)if(ln(e,o[i],an),e.cancelBubble)return!e.defaultPrevented;return!e.defaultPrevented}finally{e[Oe]=!1,e.cancelBubble=!1,e[Se]=!1,e.eventPhase=ut,e.currentTarget=null,e[ve]=[]}}};function Kr(t,e,n){if(e==null)return;let r=n===!0||n&&n.capture===!0,o=un(!!r),i=this[Xe]?.get(t)?.[o]?.get(e);i&&ht(this,i)}function un(t){return t?\"capture\":\"bubble\"}function ht(t,e){let n=un(e.capture),r=t[Xe],o=r?.get(e.type);if(!o)return;let i=o[n];if(!i||i.get(e.listener)!==e)return;i.delete(e.listener),i.size===0&&delete o[n],!o.bubble&&!o.capture&&r?.delete(e.type),e.signal&&e.abortListener&&e.signal.removeEventListener(\"abort\",e.abortListener);let s=t[he],a=s?.get(e.type);if(!a)return;let u=a[n];u?.delete(e)&&(u.size===0&&delete a[n],!a.bubble&&!a.capture&&s?.delete(e.type),t[k]?.defaultView[ge].removeEventListener?.(t,e.type,e.listener,e.capture))}var X=class extends Array{item(e){return this[e]??null}};var Ke=0,Wn=1,mn=2,pn=3,Qe=4,Xn=0,$n=1,Et=2,yt=3,Kn=4,fn=5,Qn=6,Zn=7,gt=/^(?:--|-?[A-Za-z_\\u0080-\\u{10FFFF}])[A-Za-z0-9_\\u0080-\\u{10FFFF}-]*$/u;function Qr(t,e){let n=1,r=null;for(let o=e;o<t.length;o++){let i=t[o];if(r){i===\"\\\\\"?o++:i===r&&(r=null);continue}if(i==='\"'||i===\"'\")r=i;else if(i===\"(\")n++;else if(i===\")\"&&--n===0)return[t.slice(e,o),o+1]}return[t.slice(e),t.length]}function F(t){throw P(`Invalid or unsupported selector: \"${t}\"`,\"SyntaxError\")}function Nt(t,e){let n=typeof e==\"string\"?Ze(e):[{combinator:Qe,matchers:e}],r=null,o=t[O];return o&&n[0].matchers.length&&hn(o,n,i=>(r=i,!1)),r}function Tt(t,e){let n=typeof e==\"string\"?Ze(e):[{combinator:Qe,matchers:e}],r=new X,o=t[O];return o&&n[0].matchers.length&&hn(o,n,i=>{r.push(i)}),r}function Ze(t,e=!1,n=!1){let r={combinator:Qe,matchers:[]},o=[r],i=/[\\t\\n\\f\\r ]*?([>\\t\\n\\f\\r +~]?)[\\t\\n\\f\\r ]*?(?:(?:\\[[\\t\\n\\f\\r ]*([^\\]=\\t\\n\\f\\r ]+)[\\t\\n\\f\\r ]*(?:=[\\t\\n\\f\\r ]*(?:(['\"])(.*?)\\3|([^\\]\\t\\n\\f\\r ]+)))?[\\t\\n\\f\\r ]*(?:\\]|$))|([#.]?)([^\\t\\n\\f\\r #.[>:+~()]+)|:(\\w+)(\\()?)/gi,s=t.replace(/^[\\t\\n\\f\\r ]+|[\\t\\n\\f\\r ]+$/g,\"\");s===\"\"&&F(t);let a=0,u;for(;u=i.exec(s);){u.index!==a&&F(t),u[1]&&(r.matchers.length===0&&!(n&&o.length===1)&&F(t),u[1]===\">\"?r.combinator=Wn:u[1]===\"+\"?r.combinator=pn:u[1]===\"~\"?r.combinator=mn:r.combinator=Ke,r={combinator:Qe,matchers:[]},o.push(r));let c=u[8]?L(u[8]):u[2]||u[7];u[7]!=null&&!u[6]&&r.matchers.length>0&&F(t);let m,b=u[4]??u[5]??u[7];if(u[2]){gt.test(c)||F(t);let h=u[5],v=h?.[0];if(u[3]==null&&(v==='\"'||v===\"'\")){let g=u[0].lastIndexOf(h);b=s.slice(u.index+g+1),i.lastIndex=s.length}else h!=null&&!gt.test(h)&&F(t);m=Kn}else u[6]?(gt.test(c)||F(t),m=u[6]===\"#\"?Et:yt):u[8]?m=u[9]==null?fn:Qn:u[7]===\"*\"?m=Xn:u[7]&>.test(u[7])?m=$n:F(t);u[9]?([b,i.lastIndex]=Qr(s,i.lastIndex),c!==\"has\"&&c!==\"not\"&&F(t),c===\"has\"&&e&&F(t),Ze(b,e||c===\"has\",c===\"has\")):m===fn&&F(t),r.matchers.push({type:m,name:c,value:b}),a=i.lastIndex}return(a!==s.length||r.matchers.length===0)&&F(t),o}function Zr(t,e){let n=Ze(e);return n[0]?.matchers.length?$e(t,n):!1}function Jr(t,e){let n=Ze(e,!0,!0),r=n[0];if(n.length===1&&r.matchers.length===0)return!1;let o=Ke,i={type:Zn,name:\":scope\"};if(r.matchers.length===0?(o=r.combinator,r.matchers.push(i)):n.unshift({combinator:Ke,matchers:[i]}),n.some(({matchers:u})=>u.length===0))return!1;let s=o===pn||o===mn?t[p]:t[O];if(!s)return!1;let a=!1;return hn(s,n,()=>(a=!0,!1),t),a}function hn(t,e,n,r){let o=[],i=t;for(;i;){if(B(i)){if($e(i,e,r)&&n(i)===!1)return!1;let s=i[O];if(s){let a=i[p];a&&o.push(a),i=s;continue}}i=i[p]??o.pop()??null}return!0}function $e(t,e,n){let{combinator:r,matchers:o}=e[e.length-1];if(r===Qe){if(!bt(t,o,n))return!1;let a=e.slice(0,-1);return a.length===0||$e(t,a,n)}let i=r===Wn||r===Ke?j:I,s=t[i];if(!s)return!1;if(r===Ke||r===mn){for(;s;){if(B(s)&&bt(s,o,n)){let a=e.slice(0,-1);if(a.length===0||$e(s,a,n))return!0}s=s[i]}return!1}else{if(r===pn&&!B(s)){for(;s&&!B(s);)s=s[i];if(!s)return!1}if(!B(s)||!bt(s,o,n))return!1;let a=e.slice(0,-1);return a.length===0||$e(s,a,n)}}function dn(t,e){return t.getAttributeNS(null,t.namespaceURI===R?L(e):e)}function bt(t,e,n){if(!t)return!1;if(Array.isArray(e)){for(let s of e)if(bt(t,s,n)===!1)return!1;return!0}let{type:r,name:o,value:i}=e;switch(r){case Xn:return o===\"*\";case $n:return t.namespaceURI===R?t.localName===L(o):t.localName===o;case Et:return dn(t,\"id\")===o;case yt:let s=dn(t,\"class\");return s?lt(s).includes(o):!1;case Kn:let a=dn(t,o);return i==null?a!=null:a===i;case Zn:return t===n;case fn:F(`:${o}`);case Qn:switch(o){case\"has\":return Jr(t,i||\"\");case\"not\":return!Zr(t,i||\"\");default:F(`:${o}(${i})`)}}return!1}function eo(t){return t.nodeType===Ae}function Je(t){return Y in t}function bn(t){return t.nodeType===_e}function to(t){return t.nodeType===Pe}function B(t){return t.nodeType===q}function gn(t){return t.nodeType===ue}function nr(t){return\"appendChild\"in t}function wt(t){let e=[],n=[t],r=new Set(n),o=new Set,i;for(;n.length>0;){let s=n.pop();if(r.delete(s),o.has(s))continue;let a=[];for(let u of tt(s)){if(o.has(u)||(o.add(u),e.push(u),a.push(u),!B(u)))continue;let c=u[J];if(c)for(let m of c)o.has(m)||(o.add(m),e.push(m));let f=u[ne];f&&!o.has(f)&&!r.has(f)&&(r.add(f),n.push(f))}i??=a}return{nodes:e,treeNodes:i}}function et(t,e){for(let n of t)n[k]=e}function Jn(t,e){let n=t.constructor,r=new n(t.name,t.value,t.namespaceURI);return r[k]=e,r}function er(t,e){if(bn(t))return e.createTextNode(t.data);if(to(t))return e.createComment(t.data);if(eo(t))return Jn(t,e);if(B(t)){let n=e[Re](t[w],t.namespaceURI,t[ae],t.localName);if(t[J])for(let r=0;r<t[J].length;r++){let o=t[J].item(r);n.attributes.setNamedItem(Jn(o,e))}return n}else{if(gn(t))return e.createDocumentFragment();{let n=new t.constructor;return n[k]=e,n}}}function xt(t,e,n=t.ownerDocument){if(t.nodeType===be)throw P(\"Cannot clone a document node\",\"NotSupportedError\");let r=er(t,n);if(!e||!B(t)&&!gn(t))return r;let o=new Set([t]),i=[{source:t,destination:r,childIndex:0,cloningContent:!1}];for(;i.length>0;){let s=i[i.length-1],a,u;if(s.cloningContent)if(s.contentSource&&s.contentDestination)a=s.contentSource.childNodes[s.childIndex++],u=s.contentDestination;else{i.pop(),s.appendTo&&s.appendTo.appendChild(s.destination);continue}else if(a=s.source.childNodes[s.childIndex++],u=s.destination,!a){if(s.cloningContent=!0,s.childIndex=0,B(s.source)&&s.source.namespaceURI===R&&s.source.localName===\"template\"){let f=s.source[ne];f&&(o.has(f)&&tr(),o.add(f),s.contentSource=f,s.contentDestination=s.destination.content)}continue}if(!a){i.pop(),s.appendTo&&s.appendTo.appendChild(s.destination);continue}o.has(a)&&tr(),o.add(a);let c=er(a,n);B(a)||gn(a)?i.push({source:a,destination:c,appendTo:u,childIndex:0,cloningContent:!1}):u.appendChild(c)}return r}function tr(){throw new Error(\"Cannot clone a cyclic or repeated node graph\")}function vt(t,e){let n=String(e);return n===\"\"?null:Nt(t,[{type:Et,name:n}])}function St(t,e){let n=[...new Set(lt(String(e)))];return Tt(t,n.map(r=>({type:yt,name:r})))}function Ot(t,e){let n=String(e),r=L(n),o=[];for(let i of Rt(t))B(i)&&(n===\"*\"||(i.namespaceURI===R?i[w]===r:i[w]===n))&&o.push(i);return o}function Rt(t){let e=[],n=[],r=t[O];for(;r;){e.push(r);let o=r[O],i=r[p];o?(i&&n.push(i),r=o):r=i??n.pop()??null}return e}function tt(t){let e=Rt(t);return e.unshift(t),e}var $=class extends de{nodeType=Un;[w]=\"\";[j]=null;[ce]=null;[O]=null;[I]=null;[p]=null;[U]=!1;get[M](){return this[k].defaultView[ge]}get localName(){return this[w]}get nodeName(){return this[w]}get ownerDocument(){return this[k]}get isConnected(){return this[U]}isDefaultNamespace(e){let n=re(e);return no(this)===n}get parentNode(){return this[j]}set parentNode(e){}get parentElement(){let e=this[j];return!e||e.nodeType!==1?null:e}set parentElement(e){}get previousSibling(){return this[I]}set previousSibling(e){}get nextSibling(){return this[p]}set nextSibling(e){}get previousElementSibling(){let e=this[I];for(;e&&e.nodeType!==1;)e=e[I];return e}set previousElementSibling(e){}get nextElementSibling(){let e=this[p];for(;e&&e.nodeType!==1;)e=e[p];return e}set nextElementSibling(e){}get firstChild(){return this[O]}set firstChild(e){}get lastChild(){let e=this[O];for(;e;){let n=e[p];if(n==null)break;e=n}return e}set lastChild(e){}get nodeValue(){return Je(this)?this.data:null}set nodeValue(e){Je(this)&&(this.data=e)}get textContent(){if(Je(this))return this.data;let e=\"\";for(let n of Rt(this))bn(n)&&(e+=n.data);return e}set textContent(e){if(Je(this))this.data=e;else if(nr(this)){let n=e==null?\"\":String(e);n===\"\"?this.replaceChildren():this.replaceChildren(n)}}cloneNode(e){return xt(this,e)}contains(e){let n=e;for(;n!=null;){if(n===this)return!0;n=n.parentNode}return!1}};function no(t){let e=t;for(;e;)switch(e.nodeType){case q:{let n=e;if(n.prefix==null&&n.namespaceURI!=null)return n.namespaceURI;let r=n.attributes.getNamedItemNS(Fe,\"xmlns\");if(r!=null&&r.prefix==null)return re(r.value);e=n.parentElement;break}case be:e=e.documentElement;break;case Gn:case ue:return null;case Ae:e=e.ownerElement;break;default:e=e.parentElement}return null}var K=Symbol(\"insertNode\"),Nn=Symbol(\"preflightInsertions\"),At=Symbol(\"replaceNode\"),fe=class extends ${remove(){let e=this.parentNode;e&&e.removeChild(this)}replaceWith(...e){let n=ye(e),r=this.parentNode;if(r)return En(o=>{oe(r,n);let i=this[p];for(;i&&n.includes(i);)i=i[p];let s=yn(r,n,o);this.parentNode===r?r[At](s,this,o):r[K](s,i,o)})}before(...e){let n=ye(e),r=this.parentNode;if(r)return En(o=>{oe(r,n);let i=this[I];for(;i&&n.includes(i);)i=i[I];let s=yn(r,n,o);r[K](s,i?i[p]:r.firstChild,o)})}after(...e){let n=ye(e),r=this.parentNode;if(r)return En(o=>{oe(r,n);let i=this[p];for(;i&&n.includes(i);)i=i[p];let s=yn(r,n,o);r[K](s,i,o)})}};function En(t){return V(()=>{let e=[];try{t(e)}catch(n){try{Ee(e)}catch{}throw n}Ee(e)})}function ye(t){return t.map(e=>e instanceof $?e:String(e))}function nt(t,e){return e instanceof $?e:t.ownerDocument.createTextNode(String(e))}function oe(t,e){for(let n of e){if(!(n instanceof $))continue;let r=t;for(;r;){if(r===n)throw P(\"Cannot insert a node into itself or one of its descendants\",\"HierarchyRequestError\");r=r[j]??r[ce]}}}function yn(t,e,n){let r=[];for(let i of e)r.push(nt(t,i));if(r.length===1)return r[0];let o=t.ownerDocument.createDocumentFragment();o[Nn](r);for(let i of r)o[K](i,null,n);return o}var _t,Tn=0,rr=0,or=0,ir=0,Ce=!1,xn=!1,rt=!1,Pt=class{#t;#n=[];#e=new Set;#r=!1;constructor(e){if(typeof e!=\"function\")throw new TypeError(\"MutationObserver callback must be a function\");this.#t=e}observe(e,n={}){let r=ro(n),o=_t??=new WeakMap,i=o.get(e);i==null&&(i=new Map,o.set(e,i));let s=i.get(this);s==null?Tn++:wn(s,-1),i.set(this,r),wn(r,1),this.#e.add(e)}disconnect(){let e=_t;if(e!=null){for(let n of this.#e){let r=e.get(n),o=r?.get(this);o!=null&&(r.delete(this),Tn--,wn(o,-1)),r?.size===0&&e.delete(n)}this.#e.clear(),this.#n.length=0,Tn===0&&(_t=void 0)}}takeRecords(){return this.#n.splice(0)}enqueue(e){this.#n.push(e),!this.#r&&(this.#r=!0,queueMicrotask(()=>{this.#r=!1;let n=this.takeRecords();n.length>0&&this.#t.call(this,n,this)}))}};function Q(t){let e=_t;if(e==null)return;let n=new Map,r=t.target;for(;r;){let o=e.get(r);if(o)for(let[i,s]of o){if(r!==t.target&&!s.subtree)continue;let a=!1;if(t.type===\"attributes\"){if(!s.attributes||s.attributeFilter&&!s.attributeFilter.has(t.attributeName??\"\"))continue;a=s.attributeOldValue}else if(t.type===\"characterData\"){if(!s.characterData)continue;a=s.characterDataOldValue}else if(!s.childList)continue;n.set(i,n.get(i)===!0||a)}r=r.parentNode}for(let[o,i]of n)o.enqueue({addedNodes:t.addedNodes??new X,attributeName:t.attributeName??null,attributeNamespace:t.attributeNamespace??null,nextSibling:t.nextSibling??null,oldValue:i?t.oldValue??null:null,previousSibling:t.previousSibling??null,removedNodes:t.removedNodes??new X,target:t.target,type:t.type})}function Ct(...t){let e=new X;return e.push(...t),e}function ro(t){if(t.attributes===!1&&(t.attributeOldValue||t.attributeFilter!=null))throw new TypeError(\"attributeOldValue and attributeFilter require attributes to be enabled\");if(t.characterData===!1&&t.characterDataOldValue)throw new TypeError(\"characterDataOldValue requires characterData to be enabled\");let e=t.attributes??(t.attributeOldValue===!0||t.attributeFilter!=null),n=t.characterData??t.characterDataOldValue===!0,r=t.childList===!0;if(!e&&!n&&!r)throw new TypeError(\"MutationObserver options must enable childList, attributes, or characterData\");return{attributes:e,attributeFilter:t.attributeFilter==null?void 0:new Set(t.attributeFilter.map(String)),attributeOldValue:t.attributeOldValue===!0,characterData:n,characterDataOldValue:t.characterDataOldValue===!0,childList:r,subtree:t.subtree===!0}}function wn(t,e){t.attributes&&(rr+=e),t.characterData&&(or+=e),t.childList&&(ir+=e),Ce=rr>0,xn=or>0,rt=ir>0}var ee=class extends fe{childNodes=new X;children=new X;appendChild(e){return V(()=>this[K](e,null))}insertBefore(e,n){return V(()=>this[K](e,n||null))}append(...e){return V(()=>{let n=ye(e.filter(r=>r!=null));n.length>1&&oe(this,n);for(let r of n)this[K](nt(this,r),null)})}prepend(...e){return V(()=>{let n=ye(e.filter(o=>o!=null));n.length>1&&oe(this,n);let r=this.firstChild;for(let o of n)this[K](nt(this,o),r)})}replaceChildren(...e){return V(()=>{let n=ye(e.filter(o=>o!=null));oe(this,n);let r;for(;r=this.firstChild;)this.removeChildImmediately(r);for(let o of n)this[K](nt(this,o),null)})}removeChild(e){return V(()=>(this.removeChildImmediately(e),e))}removeChildImmediately(e){if(e.parentNode!==this)throw P(\"The node is not a child of this node\",\"NotFoundError\");let n=this[U]?tt(e):void 0,r=e[I],o=e[p],i=kt(this,e);if(n)for(let s of n)s[U]=!1;this.queueRemovalMutationRecord(this,e,r,o),n&&this.enqueueTreeReactions(n,\"disconnectedCallback\"),Ee(this.collectRemovalHookEffects(e,i))}replaceChild(e,n){return V(()=>this[At](e,n))}[At](e,n,r){if(oe(this,[e]),n.parentNode!==this)throw P(\"The reference node is not a child of this parent\",\"NotFoundError\");let o=n[I],i=n[p],s=this.prepareInsertion(e),a=this[U]?tt(n):void 0,u=new Set(s.map(({node:b})=>b)),c=i;for(;c&&u.has(c);)c=c[p];let f=kt(this,n);if(a){for(let h of a)h[U]=!1;let b=new Set(a);for(let h of s)b.has(h.node)&&(h.shouldDisconnect=!1)}this.commitInsertion(s,c);let m=this[U];return this.queueRemovalMutationRecord(this,n,o,i),this.queueInsertionMutationRecords(s),a&&this.enqueueTreeReactions(a,\"disconnectedCallback\"),this.enqueueInsertionReactions(s,m),this.performOrCollectHookEffects([...this.collectRemovalHookEffects(n,f),...this.collectInsertionHookEffects(s)],r),n}querySelectorAll(e){return Tt(this,e)}querySelector(e){return Nt(this,e)}[K](e,n,r){return this.validateInsertion(e,n),this.insertIntoValidated(e,n,r),e}[Nn](e){for(let n of e)this.validateInsertion(n,null),this.prepareInsertion(n)}validateInsertion(e,n){if(oe(this,[e]),n&&n.parentNode!==this)throw P(\"The reference node is not a child of this parent\",\"NotFoundError\")}insertIntoValidated(e,n,r){e===n&&(n=e[p]);let o=this.prepareInsertion(e);this.commitInsertion(o,n);let i=this[U];this.queueInsertionMutationRecords(o),this.enqueueInsertionReactions(o,i),this.performOrCollectHookEffects(this.collectInsertionHookEffects(o),r)}performOrCollectHookEffects(e,n){n?n.push(...e):Ee(e)}prepareInsertion(e){let n=[];if(e.nodeType===ue){let s=e[O];for(;s;)n.push(s),s=s[p]}else n.push(e);let r=this[U],o=this[k],i=[];for(let s of n){let a=s[U],u=a||r,c,f;if(s[k]===o)u&&(c=tt(s));else{let m=wt(s);f=m.nodes,u&&(c=m.treeNodes)}i.push({node:s,nodes:c,adoption:f,shouldDisconnect:a})}return i}commitInsertion(e,n){for(let i of e){let s=i.node[j];if(s){let a=i.node[I],u=i.node[p];i.source={parent:s,index:kt(s,i.node),previousSibling:a,nextSibling:u}}}for(let i of e){let s=this.attachChild(i.node,n);i.insertIndex=s.index,i.previousSibling=s.previousSibling,i.nextSibling=s.nextSibling}let r=this[k];for(let{adoption:i}of e)i&&et(i,r);let o=this[U];for(let{nodes:i}of e)if(i)for(let s of i)s[U]=o}attachChild(e,n){if(n){let i=n[I];e[p]=n,e[I]=i,i?i[p]=e:this[O]=e,n[I]=e}else{e[p]=null;let i=this[O];if(i){let s;for(;s=i[p];)i=s;i[p]=e,e[I]=i}else this[O]=e,e[I]=null}let r=B(e);e[j]=this;let o;if(n){if(o=this.childNodes.indexOf(n),this.childNodes.splice(o,0,e),r){let i=n;for(;i&&!B(i);)i=i[p];i?this.children.splice(this.children.indexOf(i),0,e):this.children.push(e)}}else o=this.childNodes.length,this.childNodes.push(e),r&&this.children.push(e);return{index:o,previousSibling:e[I],nextSibling:e[p]}}queueRemovalMutationRecord(e,n,r,o){rt&&Q({type:\"childList\",target:e,removedNodes:Ct(n),previousSibling:r,nextSibling:o})}queueInsertionMutationRecords(e){if(rt)for(let n of e){let{node:r,source:o}=n;o&&this.queueRemovalMutationRecord(o.parent,r,o.previousSibling,o.nextSibling),Q({type:\"childList\",target:this,addedNodes:Ct(r),previousSibling:n.previousSibling,nextSibling:n.nextSibling})}}collectRemovalHookEffects(e,n){return this.nodeType!==q||We(this)?[]:[[()=>this[M].removeChild?.(this,e,n)]]}collectInsertionHookEffects(e){let n=[];for(let r of e){let{node:o,source:i}=r;i?.parent.nodeType===q&&!We(i.parent)&&n.push([()=>i.parent[M].removeChild?.(i.parent,o,i.index)]),this.nodeType===q&&!We(this)&&n.push([()=>this[M].insertChild?.(this,o,r.insertIndex),o])}return n}enqueueInsertionReactions(e,n){for(let r of e){let{nodes:o}=r;o&&(r.shouldDisconnect&&this.enqueueTreeReactions(o,\"disconnectedCallback\"),n&&this.enqueueTreeReactions(o,\"connectedCallback\"))}}enqueueTreeReactions(e,n){ar(e,n)}};function sr(t,e,n,r){if(e.parentNode!==t)throw Error(\"not a child of this node\");let o=t[U]?n.treeNodes:void 0,i=e[I],s=e[p],a=kt(t,e);if(o)for(let c of o)c[U]=!1;et(n.nodes,r),rt&&Q({type:\"childList\",target:t,removedNodes:Ct(e),previousSibling:i,nextSibling:s}),o&&ar(o,\"disconnectedCallback\");let u=[];t.nodeType===q&&!We(t)&&u.push([()=>t[M].removeChild?.(t,e,a)]),Ee(u)}function kt(t,e){let n=e[I],r=e[p];n?n[p]=r:t[O]=r,r&&(r[I]=n);let o=t.childNodes.indexOf(e);return t.childNodes.splice(o,1),B(e)&&t.children.splice(t.children.indexOf(e),1),e[j]=null,e[p]=null,e[I]=null,o}function ar(t,e){for(let n of t){let r=n[e];typeof r==\"function\"&&mt(n,()=>r.call(n))}}function ot(t,e,n,r,o){let{observedAttributes:i}=t.constructor,{attributeChangedCallback:s}=t;s==null||i==null||!i.includes(e)||mt(t,()=>s.call(t,e,n,r,o))}var It=class{[O]=null;constructor(e){this[z]=e}getNamedItem(e){let n=String(e),r=this[z][x]===R?L(n):n,o=this[O];for(;o;){if(o.name===r)return o;o=o[p]}return null}getNamedItemNS(e,n){let r=re(e),o=String(n),i=this[O];for(;i;){if(i.localName===o&&i[x]===r)return i;i=i[p]}return null}item(e){let n=this[O],r=0;for(;n;){if(r++===e)return n;n=n[p]}return null}get length(){let e=0,n=this[O];for(;n;)e++,n=n[p];return e}removeNamedItem(e){let n=String(e),r=this[z][x]===R?L(n):n;return V(()=>this.removeNamedItemImmediately(o=>o.name===r))}removeNamedItemNS(e,n){let r=re(e),o=String(n);return V(()=>this.removeNamedItemImmediately(i=>i.localName===o&&i[x]===r))}removeNamedItemImmediately(e){let n=this[z],r=this[O],o=null;for(;r!=null;){if(e(r)){o&&(o[p]=r[p]),this[O]===r&&(this[O]=r[p]);let i=r.value;return r[p]=null,r[z]=null,Ce&&Q({type:\"attributes\",target:n,attributeName:r.name,attributeNamespace:r[x],oldValue:i}),n[M].removeAttribute?.(n,r.name,r[x]),ot(n,r.localName,i,null,r[x]),r}o=r,r=r[p]}return null}setNamedItem(e){return V(()=>this.setNamedItemImmediately(e))}setNamedItemImmediately(e){let n=this[z],r=e[z];if(r!=null&&r!==n)throw P(\"The attribute is already in use by another element.\",\"InUseAttributeError\");let o=null,i=this[O],s=null;for(;i;){if(i.localName===e.localName&&i[x]===e[x]){if(i===e)return i;s?s[p]=e:this[O]=e,e[p]=i[p],i[p]=null,o=i;break}s=i,i=i[p]}o==null&&(s?s[p]=e:this[O]=e),e[z]=n,e[k]=n[k],o&&(o[z]=null);let a=o==null||o.value!==e.value,u=o!=null&&o.name!==e.name;return a&&Ce&&Q({type:\"attributes\",target:n,attributeName:e.name,attributeNamespace:e[x],oldValue:o?.value??null}),u&&n[M].removeAttribute?.(n,o.name,o[x]),(a||u)&&n[M].setAttribute?.(n,e.name,e.value,e[x]),a&&ot(n,e.localName,o?.value??null,e.value,e[x]),o}setNamedItemNS(e){return this.setNamedItem(e)}*[Symbol.iterator](){let e=this[O];for(;e;)yield e,e=e[p]}};var Ne=class extends ${nodeType=Ae;[x]=null;[p]=null;[z]=null;constructor(e,n,r){super(),this[w]=e,this[le]=n,r&&(this[x]=r)}get nodeName(){return this[w]}set nodeName(e){}get name(){return this[w]}set name(e){}get localName(){if(this[x]==null)return this[w];let e=this[w].indexOf(\":\");return e<0?this[w]:this[w].slice(e+1)}get prefix(){if(this[x]==null)return null;let e=this[w].indexOf(\":\");return e<0?null:this[w].slice(0,e)}get value(){return this[le]}set value(e){let n=String(e),r=this[z];if(!r){this[le]=n;return}V(()=>{let o=this[le];this[le]=n,Ce&&o!==n&&Q({type:\"attributes\",target:r,attributeName:this[w],attributeNamespace:this[x],oldValue:o}),this[M].setAttribute?.(r,this[w],n,this[x]),ot(r,this.localName,o,n,this[x])})}get nodeValue(){return this.value}set nodeValue(e){this.value=e}get ownerElement(){return this[z]}get namespaceURI(){return this[x]}get specified(){return!0}};var oo={amp:\"&\",AMP:\"&\",apos:\"'\",gt:\">\",GT:\">\",lt:\"<\",LT:\"<\",quot:'\"',QUOT:'\"'},io=new Set([\"area\",\"base\",\"br\",\"col\",\"embed\",\"hr\",\"img\",\"input\",\"link\",\"meta\",\"param\",\"source\",\"track\",\"wbr\"]),so=/(?:<([a-z][a-z0-9-:]*)((?:[\\s]+[^<>'\"=/\\s]+(?:=(['\"])[^]*?\\3|=[^>'\"\\s]*|))*)[\\s]*(\\/?)\\s*>|<\\/([a-z][a-z0-9-:]*)>|<!--(.*?)-->|([^<>]+))/gi,ur=/\\s([^<>'\"=/\\n\\s]+)(?:=([\"'])([\\s\\S]*?)\\2|=([^>'\"\\n\\s]*)|)/g,ao=\"|b|big|blockquote|body|br|center|code|dd|div|dl|dt|em|embed|h1|h2|h3|h4|h5|h6|head|hr|i|img|li|listing|menu|meta|nobr|ol|p|pre|ruby|s|small|span|strong|strike|sub|sup|table|tt|u|ul|var|\",lo=/^(?:color|face|size)$/i;function lr(t){return t.replace(/&(?:(amp|AMP|apos|gt|GT|lt|LT|quot|QUOT)|#(\\d+)|#[xX]([\\da-fA-F]+));/g,(e,n,r,o)=>{if(n)return oo[n];let i=Number.parseInt(r??o,r?10:16);try{return String.fromCodePoint(i)}catch{return e}})}function dr(t){return t.namespaceURI===R&&io.has(t.localName)}function cr(t){let e=t.localName;return t[x]===W&&(e===\"foreignObject\"||e===\"desc\"||e===\"title\")}function co(t,e){if(ao.includes(`|${t}|`))return!0;if(t!==\"font\")return!1;for(let n of e.matchAll(ur))if(lo.test(n[1]))return!0;return!1}function Mt(t,e){let n=e.ownerDocument,r=n.createDocumentFragment(),o=[],i=r;for(let s of t.matchAll(so)){let a=s[1];if(a){let u=s[2],c=L(a),f=o[o.length-1]?.element??e,m=f[x]===W?W:R;if(c===\"svg\")m=W;else if(m===W){if(cr(f))m=R;else if(co(c,u)){for(;o.length>0;){let v=o[o.length-1];if(v.element[x]!==W||cr(v.element))break;o.pop(),i=v.target}m=R}}let b=m===R?c:a,h=n[Re](b,m,null,b);for(let v of u.matchAll(ur))h.setAttribute(v[1],lr(v[3]||v[4]||\"\"));if(i.append(h),dr(h)||m!==R&&s[4])continue;o.push({element:h,target:i}),i=m===R&&c===\"template\"?h.content:h}else if(s[5]){let u=L(s[5]);for(let c=o.length-1;c>=0;c--){let f=o[c],m=L(f.element[w]);if(m===u){i=f.target,o.length=c;break}if(f.element[x]===R&&m===\"template\")break}}else s[6]?i.append(n.createComment(s[6])):i.append(lr(s[7]))}return r}function Dt(t){return mr([{type:\"content\",child:t[O]}])}function fr(t){return mr([{type:\"opening\",node:t}])}function mr(t){let e=[],n;for(;n=t.pop();)switch(n.type){case\"opening\":{let r=n.node;switch(r.nodeType){case q:{let o=r;e.push(`<${o[w]}`);let i=o[J]?.[O];for(;i;){e.push(` ${i[w]}`);let a=i[le];a!==\"\"&&(a=String(a).replace(/&/g,\"&\").replace(/\"/g,\""\"),e.push(`=\"${a}\"`)),i=i[p]}if(e.push(\">\"),dr(o))break;let s=o.namespaceURI===R&&o.localName===\"template\"?o[ne]:o;t.push({type:\"closing\",name:o[w]}),t.push({type:\"content\",child:s?.[O]??null});break}case _e:{let o=r;e.push(o[Y].replace(/&/g,\"&\").replace(/\"/g,\""\").replace(/</g,\"<\").replace(/>/g,\">\"));break}case Pe:{let o=r;e.push(`<!--${o[Y]}-->`);break}}break}case\"content\":{let r=n.child;r&&(t.push({type:\"content\",child:r[p]}),t.push({type:\"opening\",node:r}));break}case\"closing\":e.push(`</${n.name}>`);break}return e.join(\"\")}var H=class extends ee{nodeType=q;[x]=R;[ae]=null;get namespaceURI(){return this[x]}get prefix(){return this[ae]}get localName(){let e=this[ae];return e==null?this[w]:this[w].slice(e.length+1)}get nodeName(){return this[x]===R?Bn(this[w]):this[w]}get tagName(){return this.nodeName}get id(){return this.getAttributeNS(null,\"id\")??\"\"}set id(e){this.setAttribute(\"id\",String(e))}get slot(){return this.getAttributeNS(null,\"slot\")??\"\"}set slot(e){let n=String(e);this.getAttributeNS(null,\"slot\")!==n&&this.attributes.setNamedItem(new Ne(\"slot\",n))}get attributes(){let e=this[J];return e||(e=new It(this),this[J]=e),e}getAttributeNames(){return[...this.attributes].map(e=>e.name)}getElementsByTagName(e){return Ot(this,e)}get firstElementChild(){return this.children[0]??null}getElementsByClassName(e){return St(this,e)}get lastElementChild(){return this.children[this.children.length-1]??null}get nextElementSibling(){let e=this.nextSibling;for(;e&&e.nodeType!==1;)e=e.nextSibling;return e}get previousElementSibling(){let e=this.previousSibling;for(;e&&e.nodeType!==1;)e=e.previousSibling;return e}setAttribute(e,n){let r=String(e),o=String(n);on(r);let i=this[x]===R?L(r):r,s=this.attributes.getNamedItemNS(null,i);s?s.value=o:this.attributes.setNamedItem(new Ne(i,o))}setAttributeNS(e,n,r){let o=re(e),i=String(n),s=String(r),a=ct(o,i,\"attribute\"),u=this.attributes.getNamedItemNS(a.namespace,a.localName);u?u.value=s:this.attributes.setNamedItemNS(new Ne(a.qualifiedName,s,a.namespace))}toggleAttribute(e,n){let r=String(e);on(r);let o=this[x]===R?L(r):r,i=this.attributes.getNamedItemNS(null,o),s=n===void 0?void 0:!!n;return i==null?s===!1?!1:(this.attributes.setNamedItem(new Ne(o,\"\")),!0):s===!0?!0:(this.attributes.removeNamedItemNS(null,o),!1)}getAttribute(e){let n=this.attributes.getNamedItem(e);return n&&n.value}getAttributeNS(e,n){let r=this.attributes.getNamedItemNS(e,n);return r&&r.value}hasAttribute(e){return this.attributes.getNamedItem(e)!=null}hasAttributeNS(e,n){return this.attributes.getNamedItemNS(e,n)!=null}removeAttribute(e){let n=String(e),r=this[x]===R?L(n):n;this.attributes.removeNamedItemNS(null,r)}removeAttributeNS(e,n){this.attributes.removeNamedItemNS(e,n)}get outerHTML(){return fr(this)}get innerHTML(){return Dt(this)}set innerHTML(e){if(e==null||e===\"\")this.replaceChildren();else{let n=Mt(String(e),this);this.replaceChildren(n)}}};var ke=class t extends H{[x]=W;get ownerSVGElement(){let e=null,n=this.parentNode;for(;n instanceof t;)e=n,n=n.parentNode;return e}};var me=class extends fe{[Y]=\"\";constructor(e){super(),this[Y]=e==null?\"\":String(e)}setData(e){let n=xn,r=n?this[Y]:null,o=\"\";e!=null&&(o=typeof e==\"string\"?e:String(e)),this[Y]=o,n&&r!==o&&Q({type:\"characterData\",target:this,oldValue:r}),this[M].setText?.(this,o)}get data(){return this[Y]}set data(e){this.setData(e)}};var Ie=class extends me{nodeType=_e;[w]=\"#text\"};var Me=class extends me{nodeType=Pe;[w]=\"#comment\"};var De=class extends ee{nodeType=ue;[w]=\"#document-fragment\";[k]=typeof window<\"u\"?window.document:null;getElementById(e){return vt(this,e)}};var Le=class extends H{get content(){let e=this[ne];return e||(e=this.ownerDocument.createDocumentFragment(),e[ce]=this,this[ne]=e),e}set content(e){}set innerHTML(e){this.content.replaceChildren(Mt(String(e),this))}get innerHTML(){let e=this[ne];return e?Dt(e):\"\"}};var Lt=class extends H{};var Ht=class extends H{};var Ut=class extends H{};var it=class extends ee{nodeType=be;[w]=\"#document\";[U]=!0;constructor(e){super(),this.defaultView=e,this[k]=this,this.documentElement=Vt(new Ut,this,\"html\"),this.body=Vt(new Lt,this,\"body\"),this.head=Vt(new Ht,this,\"head\"),this.appendChild(this.documentElement),this.documentElement.appendChild(this.head),this.documentElement.appendChild(this.body)}get textContent(){return null}set textContent(e){}getElementsByClassName(e){return St(this,e)}createElement(e){let n=String(e);return Fn(n),vn(this,L(n))}createElementNS(e,n){let r=ct(e,n,\"element\");return vn(this,r.qualifiedName,r.namespace,r.prefix,r.localName)}[Re](e,n,r,o){return vn(this,e,n,r,o)}createTextNode(e){let n=Gt(new Ie(e),this);return this[M].createText?.(n,n.data),n}createComment(e){return Gt(new Me(e),this)}createDocumentFragment(){return Gt(new De,this)}createEvent(){return new G(\"\")}getElementById(e){return vt(this,e)}getElementsByTagName(e){return Ot(this,e)}importNode(e,n){if(e.nodeType===be)throw P(\"Cannot import a document node\",\"NotSupportedError\");return xt(e,n,this)}adoptNode(e){if(e[k]===this)return e;let n=wt(e);return V(()=>{let r=e.parentNode;return r?sr(r,e,n,this):et(n.nodes,this),e})}};function Gt(t,e){return Object.defineProperty(t,k,{value:e,writable:!0,enumerable:!1}),t}function vn(t,e,n=R,r=null,o=e){let i;if(n===W)i=new ke;else if(n===R&&o===\"template\")i=new Le;else if(n===R){let s=t.defaultView.customElements.get(o);i=s?new s:new H}else i=new H;return Vt(i,t,e,n,r)}function Vt(t,e,n,r=R,o=null){return Gt(t,e),Object.defineProperties(t,{[w]:{value:n},[x]:{value:r},[ae]:{value:o}}),e[M].createElement?.(t,r),t}var Bt=class extends G{constructor(e,n){super(e,n),this.detail=n?.detail??null}initCustomEvent(e,n,r,o){super.initEvent(e,n,r),this.detail=o??null}};var zt=class extends G{constructor(e,n){super(e,n),this.message=n.message,this.filename=n.filename,this.lineno=n.lineno,this.colno=n.colno,this.error=n.error}};var jt=class extends G{constructor(e,n){super(e,n),this.promise=n.promise,this.reason=n.reason}};var Ft=class extends G{constructor(e,n){super(e,n),this.oldState=n.oldState,this.newState=n.newState}};var qt=class extends G{constructor(e,n={}){super(e,n),this.relatedTarget=n.relatedTarget??null}};var Yt=class extends G{constructor(e,n={}){super(e,n),this.clipboardData=n.clipboardData??null}};var Wt=class extends H{};var uo=/^[a-z][^A-Z\\u0000\\t\\n\\f\\r />]*-[^A-Z\\u0000\\t\\n\\f\\r />]*$/u,fo=new Set([\"annotation-xml\",\"color-profile\",\"font-face\",\"font-face-src\",\"font-face-uri\",\"font-face-format\",\"font-face-name\",\"missing-glyph\"]);function pr(t){return uo.test(t)&&!fo.has(t)}function hr(t){return P(`Invalid custom element name: \"${t}\"`,\"SyntaxError\")}var Xt=class{registry=new Map;listenersByName=new Map;define(e,n,r){if(!pr(e))throw hr(e);if(this.registry.has(e))throw P(`A custom element named \"${e}\" has already been defined`,\"NotSupportedError\");if(this.getName(n)!=null)throw P(\"This constructor has already been registered in this custom element registry\",\"NotSupportedError\");this.registry.set(e,n);let o=this.listenersByName.get(e);if(o!=null){this.listenersByName.delete(e);for(let i of o)i(n)}}get(e){return this.registry.get(e)}getName(e){for(let[n,r]of this.registry)if(r===e)return n;return null}whenDefined(e){if(!pr(e))return Promise.reject(hr(e));let n=this.registry.get(e);if(n!=null)return Promise.resolve(n);let r=this.listenersByName.get(e);return r==null&&(r=[],this.listenersByName.set(e,r)),new Promise(o=>{r.push(o)})}upgrade(e){}initialize(e){}};var mo=[\"onerror\",\"onunhandledrejection\"],br=Symbol.for(\"@remote-dom/polyfill/global-property\");function Er(t){return Object.getOwnPropertyDescriptors(t)}function yr(t){let e={};for(let[n,r]of Object.entries(Object.getOwnPropertyDescriptors(de.prototype)))n!==\"constructor\"&&typeof r.value==\"function\"&&(r.value=Sn(r.value.bind(t)),e[n]=r);return e}function Nr(t){let e={};for(let n of mo)e[n]={configurable:!0,enumerable:!0,get:Sn(()=>t[n]),set:Sn(r=>{t[n]=r})};return e}function po(t){return Object.assign(Er(t),yr(t),Nr(t))}function Sn(t){return Object.defineProperty(t,br,{value:!0}),t}function gr(t,e){for(let n of Reflect.ownKeys(e)){let r=ho(t,n);(r==null||go(r))&&Object.defineProperty(t,n,e[n])}}function ho(t,e){let n=t;for(;n;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function go(t){return[t.value,t.get,t.set].some(e=>typeof e==\"function\"&&e[br]===!0)}var Te=class extends de{[M]={};[at]=[];[ge]=Eo(this);name=\"\";window=this;parent=this;self=this;top=this;document=new it(this);customElements=new Xt;location=globalThis.location;navigator=globalThis.navigator;Event=G;ErrorEvent=zt;PromiseRejectionEvent=jt;ToggleEvent=Ft;FocusEvent=qt;ClipboardEvent=Yt;EventTarget=de;CustomEvent=Bt;Node=$;ParentNode=ee;ChildNode=fe;DocumentFragment=De;Document=it;CharacterData=me;Comment=Me;Text=Ie;Element=H;HTMLElement=Wt;SVGElement=ke;HTMLTemplateElement=Le;MutationObserver=Pt;#t=null;#n=null;#e=null;static with(...e){let n=this;return class extends n{constructor(){super();for(let o of e)bo(this,o)}}}get onerror(){return this.#n}set onerror(e){this.#t&&this.removeEventListener(\"error\",this.#t),e&&typeof e==\"function\"?(this.#n=e,this.#t=n=>{e(n.message??\"Error\",n.filename,n.lineno,n.colno,n.error)},this.addEventListener(\"error\",this.#t)):(this.#t=null,this.#n=null)}get onunhandledrejection(){return this.#e}set onunhandledrejection(e){this.#e&&this.removeEventListener(\"unhandledrejection\",this.#e),e&&typeof e==\"function\"?(this.#e=e,this.addEventListener(\"unhandledrejection\",this.#e)):this.#e=null}static setGlobal(e){let n=globalThis.self,r=globalThis.window,o=Er(e),i=Object.assign(yr(e),Nr(e));delete o.self,Object.defineProperties(globalThis,o),gr(globalThis,i),typeof n>\"u\"||n===r&&n!==globalThis?Object.defineProperty(globalThis,\"self\",{value:e,configurable:!0,writable:!0,enumerable:!0}):n!==globalThis&&(Object.defineProperties(n,o),gr(n,i))}static setGlobalThis(e){for(let n in e)e[n]===e&&(e[n]=globalThis);Object.defineProperties(globalThis,po(e))}};function bo(t,e){t[at].push(e(t)??{})}function Eo(t){return{createElement:ie.bind(null,t,\"createElement\"),setAttribute:ie.bind(null,t,\"setAttribute\"),removeAttribute:ie.bind(null,t,\"removeAttribute\"),createText:ie.bind(null,t,\"createText\"),setText:ie.bind(null,t,\"setText\"),insertChild:ie.bind(null,t,\"insertChild\"),removeChild:ie.bind(null,t,\"removeChild\"),addEventListener:ie.bind(null,t,\"addEventListener\"),removeEventListener:ie.bind(null,t,\"removeEventListener\")}}function ie(t,e,...n){for(let i of t[at])i[e]?.apply(i,n);let r=t[M];r[e]?.apply(r,n)}var $t=new Te;var On=\"~\";var pe=new WeakMap;function He(t){return pe.get(t)}var Pn=new WeakMap,No=0;function Z(t){let e=Pn.get(t);return e==null&&(e=String(No++),Kt(t,e)),e}function Kt(t,e){Pn.set(t,e)}var An=new WeakMap;function To(t){return An.get(t)}var _n=new WeakMap;function wo(t){let e=_n.get(t);if(e!=null)return e;if(!(!(t instanceof Element)||t.tagName.includes(\"-\"))){e={};for(let{name:n,value:r}of t.attributes)e[n]=r;return e}}var xo=new WeakMap;function vo(t){return xo.get(t)}function Cn(t,e,n){let r=An.get(t);if(r==null&&(r={},An.set(t,r)),r[e]===n)return;r[e]=n;let o=pe.get(t);o?.mutate([[3,Z(t),e,n,1]])}function Qt(t,e,n){let r=_n.get(t);if(r==null&&(r={},_n.set(t,r)),r[e]===n)return;n==null?delete r[e]:r[e]=String(n);let o=pe.get(t);o?.mutate([[3,Z(t),e,n,2]])}function Ue(t,e){if(pe.get(t)!==e&&(pe.set(t,e),t.childNodes))for(let r=0;r<t.childNodes.length;r++)Ue(t.childNodes[r],e)}function Zt(t){if(pe.get(t)!=null&&(pe.delete(t),t.childNodes))for(let n=0;n<t.childNodes.length;n++)Zt(t.childNodes[n])}function Ge(t){let{nodeType:e}=t;switch(e){case 1:return{id:Z(t),type:e,element:t.localName,properties:Rn(To(t)),attributes:Rn(wo(t)),eventListeners:Rn(vo(t)),children:Array.from(t.childNodes).map(Ge)};case 3:case 8:return{id:Z(t),type:e,data:t.data};default:throw new Error(`Cannot serialize node of type ${t.nodeType} (${typeof t.nodeType})`)}}function Rn(t){return t?{...t}:void 0}function kn(t,e,...n){let r=Pn.get(t),o=pe.get(t);if(r==null||o==null)throw new Error(`Cannot call method ${e} on an unconnected node`);return o.call(r,e,...n)}var Ve=$t[M];Ve.insertChild=(t,e,n)=>{let r=He(t);r!=null&&(Ue(e,r),r.mutate([[0,Z(t),Ge(e),n]]))};Ve.removeChild=(t,e,n)=>{let r=He(t);r!=null&&(Zt(e),r.mutate([[1,Z(t),n]]))};Ve.setText=(t,e)=>{let n=He(t);n?.mutate([[2,Z(t),e]])};Ve.setAttribute=(t,e,n)=>{t.tagName.includes(\"-\")||Qt(t,e,n)};Ve.removeAttribute=(t,e)=>{t.tagName.includes(\"-\")||Qt(t,e)};Te.setGlobal($t);function wr(t){let e=t;return typeof t==\"object\"&&t!==null&&e.graview===\"host-hello\"&&typeof e.nonce==\"string\"}function vr(t,e={}){let n,r=\"\",o,i=0,s=new Set,a=new Map,u=[],c=g=>{n?n.postMessage({...g,nonce:r}):u.push(g)},f=g=>{let y=g.data;if(!(!y||typeof y!=\"object\")){if(y.type===\"props\"){o=y.props;for(let C of s)C(y.props)}else y.type===\"answer\"?(a.get(y.id)?.(y),a.delete(y.id)):y.type===\"event\"&&typeof y.listener==\"number\"?e.onEvent?.(y):y.type===\"heartbeat\"&&typeof y.beat==\"number\"&&c({type:\"heartbeat\",beat:y.beat});e.onMessage?.(y)}},m=()=>{},b=g=>{if(n||!t.fromHost(g)||!wr(g.data)||g.data.protocol!==1)return;let y=g.ports[0];if(y){n=y,r=g.data.nonce,n.onmessage=f,n.start?.(),m();for(let C of u.splice(0))c(C)}};m=t.listen(b),t.ready({graview:\"guest-ready\",protocol:1});let h,v={get props(){return o},subscribe(g){return s.add(g),()=>s.delete(g)},act(g,y={}){let C=i+=1;return new Promise(D=>{a.set(C,D),c({type:\"act\",id:C,name:g,args:y})})},navigate(g){typeof g==\"string\"?c({type:\"navigate\",to:g}):g&&typeof g.place==\"string\"&&c({type:\"navigate\",place:g.place})},size(g){c({type:\"size\",height:g})},autoSize(g){let y=g??globalThis.document?.documentElement,C=globalThis.ResizeObserver;if(!y||!C||typeof y.getBoundingClientRect!=\"function\")return()=>{};h?.disconnect();let D=new C(()=>v.size(Math.ceil(y.getBoundingClientRect().height)));return D.observe(y),h=D,()=>D.disconnect()},close(){h?.disconnect(),m(),n?.close(),s.clear()}};return{guest:v,send:c}}var Or=[\"globalThis\",\"Infinity\",\"NaN\",\"undefined\",\"isFinite\",\"isNaN\",\"parseFloat\",\"parseInt\",\"decodeURI\",\"decodeURIComponent\",\"encodeURI\",\"encodeURIComponent\",\"escape\",\"unescape\",\"Object\",\"Function\",\"Array\",\"Number\",\"Boolean\",\"String\",\"Symbol\",\"BigInt\",\"Date\",\"Promise\",\"RegExp\",\"Math\",\"JSON\",\"Reflect\",\"Proxy\",\"Intl\",\"Error\",\"AggregateError\",\"EvalError\",\"RangeError\",\"ReferenceError\",\"SyntaxError\",\"TypeError\",\"URIError\",\"SuppressedError\",\"Map\",\"Set\",\"WeakMap\",\"WeakSet\",\"WeakRef\",\"FinalizationRegistry\",\"Iterator\",\"AsyncIterator\",\"DisposableStack\",\"AsyncDisposableStack\",\"ArrayBuffer\",\"SharedArrayBuffer\",\"DataView\",\"Atomics\",\"Int8Array\",\"Uint8Array\",\"Uint8ClampedArray\",\"Int16Array\",\"Uint16Array\",\"Int32Array\",\"Uint32Array\",\"Float16Array\",\"Float32Array\",\"Float64Array\",\"BigInt64Array\",\"BigUint64Array\"],Rr=[\"window\",\"parent\",\"top\",\"document\",\"customElements\",\"Event\",\"ErrorEvent\",\"PromiseRejectionEvent\",\"ToggleEvent\",\"FocusEvent\",\"ClipboardEvent\",\"CustomEvent\",\"EventTarget\",\"Node\",\"ParentNode\",\"ChildNode\",\"DocumentFragment\",\"Document\",\"CharacterData\",\"Comment\",\"Text\",\"Element\",\"HTMLElement\",\"SVGElement\",\"HTMLTemplateElement\",\"MutationObserver\"],Ar=[\"self\",\"postMessage\",\"setTimeout\",\"clearTimeout\",\"setInterval\",\"clearInterval\",\"queueMicrotask\",\"structuredClone\",\"crypto\",\"console\",\"DOMException\"],_r=[\"TEMPORARY\",\"PERSISTENT\"],Za=Object.freeze([...Or,...Rr,...Ar,..._r]),Ja=Object.freeze([\"constructor\",\"__defineGetter__\",\"__defineSetter__\",\"hasOwnProperty\",\"__lookupGetter__\",\"__lookupSetter__\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"toString\",\"valueOf\",\"__proto__\",\"toLocaleString\"]),Sr=t=>typeof t==\"symbol\"?`[${t.description??\"symbol\"}]`:t;function Pr(t=globalThis,e=[],n={}){let r=[],o=[],i=new Set([...Or,...Rr,...Ar,...e,\"constructor\",Symbol.toStringTag]),s=(T,l)=>{let E=Reflect.getOwnPropertyDescriptor(T,l);return E===void 0||!(\"value\"in E)||E.writable||E.configurable?!1:n.primitivesStay&&typeof l==\"symbol\"&&(typeof E.value!=\"object\"||E.value===null)&&typeof E.value!=\"function\"?!0:_r.includes(l)&&typeof E.value==\"number\"},a=t,u=a.setTimeout,c=a.setInterval,f=a.crypto,m=(T,l)=>function(E,A,...N){if(typeof E!=\"function\")throw new TypeError(`${l} takes a function: a guest view cannot run code from text`);return T.call(t,E,A,...N)},b=f?Object.freeze({getRandomValues:T=>f.getRandomValues(T)}):void 0,h=a.document?.defaultView;if(h&&h!==a)for(let T of Reflect.ownKeys(h))typeof T==\"symbol\"||i.has(T)||Reflect.deleteProperty(h,T)||o.push(`window.${T}`);let v=[];for(let T=t;T&&T!==Object.prototype;T=Object.getPrototypeOf(T))v.push(T);for(let T of v)for(let l of Reflect.ownKeys(T))i.has(l)||(Reflect.deleteProperty(T,l)?r.push(Sr(l)):s(T,l)||o.push(Sr(l)));let g=()=>function(){throw new EvalError(\"A guest view cannot make code from text.\")},y=[Function.prototype,Object.getPrototypeOf(async function(){}),Object.getPrototypeOf(function*(){}),Object.getPrototypeOf(async function*(){})];for(let T of y){let l=g();Object.defineProperty(l,\"prototype\",{value:T,writable:!1,enumerable:!1,configurable:!1}),Reflect.defineProperty(T,\"constructor\",{value:l,writable:!1,enumerable:!1,configurable:!1})||o.push(\"Function.prototype.constructor\"),T===Function.prototype&&Reflect.defineProperty(t,\"Function\",{value:l,writable:!0,enumerable:!1,configurable:!0})}let C=(T,l)=>{Reflect.defineProperty(t,T,{value:l,writable:!0,enumerable:!0,configurable:!0})||o.push(T)};C(\"setTimeout\",m(u,\"setTimeout\")),C(\"setInterval\",m(c,\"setInterval\")),b&&C(\"crypto\",b);for(let T of v.slice(1))Object.freeze(T);for(let T of Reflect.ownKeys(t)){let l=Reflect.getOwnPropertyDescriptor(t,T);Reflect.defineProperty(t,T,\"value\"in l?{...l,writable:!1,configurable:!1}:{...l,configurable:!1})}let D;try{D=Reflect.preventExtensions(t)}catch{D=!1}return{removed:r,stuck:o,sealed:D}}var st=class extends HTMLElement{constructor(){super(),Kt(this,On)}connect(e){if(He(this)===e||(Ue(this,e),this.childNodes.length===0))return;let n=[];for(let r=0;r<this.childNodes.length;r++){let o=this.childNodes[r];n.push([0,On,Ge(o),r])}e.mutate(n)}updateRemoteProperty(e,n){Cn(this,e,n)}callRemoteMethod(e,...n){return kn(this,e,...n)}};var d={},In={empty:!0},So={id:\"text\",class:\"text\",title:\"text\",lang:\"text\",dir:{oneOf:[\"ltr\",\"rtl\",\"auto\"]},hidden:\"text\",tabindex:{oneOf:[\"-1\",\"0\"]},role:\"text\",style:\"style\",translate:{oneOf:[\"yes\",\"no\"]},spellcheck:{oneOf:[\"true\",\"false\"]},draggable:{oneOf:[\"true\",\"false\"]},inert:\"boolean\"},Mn={div:d,section:d,article:d,aside:d,header:d,footer:d,nav:d,hgroup:d,search:d,address:d,figure:d,figcaption:d,blockquote:d,p:d,pre:d,hr:In,br:In,wbr:In,h1:d,h2:d,h3:d,h4:d,h5:d,h6:d,span:d,strong:d,em:d,b:d,i:d,u:d,s:d,small:d,mark:d,abbr:d,cite:d,q:d,code:d,kbd:d,samp:d,var:d,sub:d,sup:d,dfn:d,bdi:d,bdo:d,ruby:d,rt:d,rp:d,time:{attributes:{datetime:\"text\"}},data:{attributes:{value:\"text\"}},del:{attributes:{datetime:\"text\"}},ins:{attributes:{datetime:\"text\"}},a:d,ul:d,menu:d,dl:d,dt:d,dd:d,ol:{attributes:{start:\"number\",reversed:\"boolean\",type:{oneOf:[\"1\",\"a\",\"A\",\"i\",\"I\"]}}},li:{attributes:{value:\"number\"}},table:d,caption:d,thead:d,tbody:d,tfoot:d,tr:d,colgroup:{attributes:{span:\"number\"}},col:{attributes:{span:\"number\"},empty:!0},th:{attributes:{colspan:\"number\",rowspan:\"number\",headers:\"text\",scope:{oneOf:[\"row\",\"col\",\"rowgroup\",\"colgroup\"]},abbr:\"text\"}},td:{attributes:{colspan:\"number\",rowspan:\"number\",headers:\"text\"}},details:{attributes:{open:\"boolean\",name:\"text\"}},summary:d,button:{attributes:{type:{oneOf:[\"button\"]},disabled:\"boolean\",name:\"text\",value:\"text\"}},input:{empty:!0,attributes:{type:{oneOf:[\"text\",\"search\",\"number\",\"range\",\"checkbox\",\"radio\",\"date\",\"time\",\"datetime-local\",\"month\",\"week\",\"color\",\"email\",\"tel\",\"url\"]},name:\"text\",value:\"text\",placeholder:\"text\",min:\"text\",max:\"text\",step:\"text\",checked:\"boolean\",disabled:\"boolean\",readonly:\"boolean\",required:\"boolean\",maxlength:\"number\",minlength:\"number\",size:\"number\",pattern:\"text\",multiple:\"boolean\",inputmode:\"text\",enterkeyhint:\"text\"}},select:{attributes:{name:\"text\",disabled:\"boolean\",multiple:\"boolean\",required:\"boolean\",size:\"number\"}},option:{attributes:{value:\"text\",selected:\"boolean\",disabled:\"boolean\",label:\"text\"}},optgroup:{attributes:{label:\"text\",disabled:\"boolean\"}},textarea:{attributes:{name:\"text\",placeholder:\"text\",rows:\"number\",cols:\"number\",disabled:\"boolean\",readonly:\"boolean\",required:\"boolean\",maxlength:\"number\",minlength:\"number\",wrap:{oneOf:[\"soft\",\"hard\",\"off\"]}}},label:{attributes:{for:\"text\"}},fieldset:{attributes:{disabled:\"boolean\",name:\"text\"}},legend:d,output:d,meter:{attributes:{value:\"number\",min:\"number\",max:\"number\",low:\"number\",high:\"number\",optimum:\"number\"}},progress:{attributes:{value:\"number\",max:\"number\"}},img:{empty:!0,attributes:{src:\"image\",alt:\"text\",width:\"number\",height:\"number\",decoding:{oneOf:[\"async\",\"sync\",\"auto\"]}}}},Oo=[\"fill\",\"fill-opacity\",\"fill-rule\",\"stroke\",\"stroke-width\",\"stroke-linecap\",\"stroke-linejoin\",\"stroke-dasharray\",\"stroke-dashoffset\",\"stroke-opacity\",\"stroke-miterlimit\",\"opacity\",\"color\",\"display\",\"visibility\",\"transform-origin\",\"clip-path\",\"clip-rule\",\"marker-start\",\"marker-mid\",\"marker-end\",\"font-family\",\"font-size\",\"font-weight\",\"font-style\",\"text-anchor\",\"dominant-baseline\",\"alignment-baseline\",\"letter-spacing\",\"text-decoration\",\"paint-order\",\"vector-effect\",\"shape-rendering\",\"pointer-events\",\"stop-color\",\"stop-opacity\",\"overflow\",\"mask\"],Ro={id:\"text\",class:\"text\",style:\"style\",lang:\"text\",role:\"text\",tabindex:{oneOf:[\"-1\",\"0\"]},transform:\"geometry\",...Object.fromEntries(Oo.map(t=>[t,\"css\"]))},Be={x:\"geometry\",y:\"geometry\",width:\"geometry\",height:\"geometry\"},Jt={viewBox:\"geometry\",preserveAspectRatio:\"geometry\"},Cr={gradientUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},gradientTransform:\"geometry\",spreadMethod:{oneOf:[\"pad\",\"reflect\",\"repeat\"]},href:\"fragment\"},kr={svg:{attributes:{...Be,...Jt}},g:d,defs:d,symbol:{attributes:{...Be,...Jt,refX:\"geometry\",refY:\"geometry\"}},use:{attributes:{...Be,href:\"fragment\"}},title:d,desc:d,path:{attributes:{d:\"geometry\",pathLength:\"number\"}},rect:{attributes:{...Be,rx:\"geometry\",ry:\"geometry\",pathLength:\"number\"}},circle:{attributes:{cx:\"geometry\",cy:\"geometry\",r:\"geometry\",pathLength:\"number\"}},ellipse:{attributes:{cx:\"geometry\",cy:\"geometry\",rx:\"geometry\",ry:\"geometry\",pathLength:\"number\"}},line:{attributes:{x1:\"geometry\",y1:\"geometry\",x2:\"geometry\",y2:\"geometry\",pathLength:\"number\"}},polyline:{attributes:{points:\"geometry\",pathLength:\"number\"}},polygon:{attributes:{points:\"geometry\",pathLength:\"number\"}},text:{attributes:{x:\"geometry\",y:\"geometry\",dx:\"geometry\",dy:\"geometry\",rotate:\"geometry\",textLength:\"geometry\",lengthAdjust:{oneOf:[\"spacing\",\"spacingAndGlyphs\"]}}},tspan:{attributes:{x:\"geometry\",y:\"geometry\",dx:\"geometry\",dy:\"geometry\",rotate:\"geometry\",textLength:\"geometry\"}},textPath:{attributes:{href:\"fragment\",startOffset:\"geometry\",method:{oneOf:[\"align\",\"stretch\"]},spacing:{oneOf:[\"auto\",\"exact\"]},side:{oneOf:[\"left\",\"right\"]}}},linearGradient:{attributes:{x1:\"geometry\",y1:\"geometry\",x2:\"geometry\",y2:\"geometry\",...Cr}},radialGradient:{attributes:{cx:\"geometry\",cy:\"geometry\",r:\"geometry\",fx:\"geometry\",fy:\"geometry\",fr:\"geometry\",...Cr}},stop:{attributes:{offset:\"geometry\"}},clipPath:{attributes:{clipPathUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},mask:{attributes:{...Be,maskUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},maskContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},pattern:{attributes:{...Be,...Jt,patternUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternTransform:\"geometry\",href:\"fragment\"}},marker:{attributes:{...Jt,markerWidth:\"geometry\",markerHeight:\"geometry\",refX:\"geometry\",refY:\"geometry\",orient:\"geometry\",markerUnits:{oneOf:[\"strokeWidth\",\"userSpaceOnUse\"]}}}};var Ir={section:[\"aria-label\",\"aria-labelledby\",\"title\"]};function Ao(t){return/^aria-[a-z]+$/.test(t)}function _o(t){return/^data-[a-z0-9][a-z0-9_.-]*$/.test(t)}var Po=new Map(Object.keys(kr).map(t=>[t.toLowerCase(),t]));function Mr(t){return Po.get(t.toLowerCase())}function Dr(t,e,n){let r=n.toLowerCase(),o=t===\"html\"?[Mn[e]?.attributes,So]:[kr[e]?.attributes,Ro],i=t===\"svg\"&&r===\"xlink:href\"?\"href\":r;for(let s of o)if(s){for(let[a,u]of Object.entries(s))if(a.toLowerCase()===i)return{name:a,kind:u}}if(Ao(r)||_o(r))return{name:r,kind:\"text\"}}var Lr=\"~\",en=t=>typeof t==\"object\"&&t!==null&&!Array.isArray(t),te=(t,e=0)=>{if(t===null||typeof t==\"string\"||typeof t==\"number\"||typeof t==\"boolean\"||t===void 0)return t;if(!(e>64||typeof t!=\"object\"))return Array.isArray(t)?t.map(n=>te(n,e+1)):Object.fromEntries(Object.entries(t).map(([n,r])=>[n,te(r,e+1)]))};function Hr(){let t=new Map,e=new Map,n=new Map([[Lr,{children:[],listeners:new Map}]]),r=0,o=c=>{let f=e.get(c);return f===void 0&&(f=r+=1,e.set(c,f),t.set(f,{listener:c,count:0})),t.get(f).count+=1,f},i=c=>{let f=t.get(c);f&&(f.count-=1,!(f.count>0)&&(t.delete(c),e.delete(f.listener)))},s=c=>{let f=n.get(c);if(f){n.delete(c);for(let m of f.listeners.values())i(m);for(let m of f.children)s(m)}},a=(c,f,m=0)=>{if(!en(c)||m>64)return te(c);let b=typeof c.id==\"string\"?c.id:void 0,h=f&&b!==void 0&&b!==Lr;h&&s(b);let v={children:[],listeners:new Map};h&&n.set(b,v);let g={};for(let[y,C]of Object.entries(c))y===\"children\"&&Array.isArray(C)?g[y]=C.map(D=>{let T=a(D,h,m+1);return h&&en(D)&&typeof D.id==\"string\"&&v.children.push(D.id),T}):y===\"eventListeners\"&&en(C)?g[y]=Object.fromEntries(Object.entries(C).map(([D,T])=>{if(typeof T!=\"function\"||!h)return[D,void 0];let l=o(T);return v.listeners.set(D,l),[D,{listener:l}]})):g[y]=te(C,m+1);return g},u=c=>{if(!Array.isArray(c))return te(c);let[f,m]=c,b=typeof m==\"string\"?n.get(m):void 0;if(f===0){let h=a(c[2],b!==void 0),v=en(c[2])?c[2].id:void 0;if(b&&typeof v==\"string\"&&n.has(v)){let g=Number(c[3]);b.children.splice(Number.isInteger(g)&&g>=0&&g<=b.children.length?g:b.children.length,0,v)}return[f,te(m),h,te(c[3])]}if(f===1){let h=Number(c[2]);return b&&Number.isInteger(h)&&h>=0&&h<b.children.length&&s(b.children.splice(h,1)[0]),te(c)}if(f===3&&c[4]===3){let h=String(c[2]),v=c[3],g=b&&typeof v==\"function\"?o(v):void 0,y=b?.listeners.get(h);return y!==void 0&&i(y),g===void 0?b?.listeners.delete(h):b.listeners.set(h,g),[f,te(m),h,g===void 0?void 0:{listener:g},3]}return te(c)};return{encode:c=>c.map(u),listener:c=>t.get(c)?.listener,get listening(){return t.size},get nodes(){return n.size-1}}}var tn=\"graview-view-root\",Co=t=>t.replace(/&/g,\"&\").replace(/</g,\"<\").replace(/>/g,\">\").replace(/\"/g,\""\").replace(/'/g,\"'\"),ko=t=>Object.freeze({html:t,toString:()=>t}),Ur=t=>typeof t==\"object\"&&t!==null&&typeof t.html==\"string\"&&Object.isFrozen(t),Gr=t=>t==null||t===!1?\"\":Array.isArray(t)?t.map(Gr).join(\"\"):Ur(t)?t.html:Co(String(t));function Vr(t){customElements.get(tn)||customElements.define(tn,st);let e=Event,n=Hr(),r=new Set,o=new Set,i,s=[],a=document.createElement(tn),u=l=>{let E=A=>{for(let N of Array.from(A.childNodes)){if(N.nodeType!==1)continue;if(Z(N)===l)return N;let S=E(N);if(S)return S}};return E(a)},c=l=>{let E=u(l.target);if(!E)return;let A=new e(l.event,{bubbles:!0});for(let N of[\"value\",\"checked\",\"key\",\"pressed\"])l[N]!==void 0&&Object.defineProperty(A,N,{value:l[N],enumerable:!0});E.dispatchEvent(A);for(let N of o){if(N.type!==l.event)continue;let S;try{S=new Set(Array.from(a.querySelectorAll(N.selector)))}catch{continue}for(let _=E;_&&_!==a;_=_.parentNode)if(S.has(_)){N.listener(Object.freeze({type:l.event,target:E,element:_,...l.value!==void 0?{value:l.value}:{},...l.checked!==void 0?{checked:l.checked}:{},...l.key!==void 0?{key:l.key}:{},...l.pressed!==void 0?{pressed:l.pressed}:{}}));break}}},f=l=>{if(l.type===\"dom-event\"&&typeof l.target==\"string\")return c(l);if(l.type!==\"props\")return;i=l.props;let E=t.now();for(let S of r)try{S(l.props)}catch(_){t.threw(_)}let A=t.now()-E,N=l.push;typeof N==\"number\"&&t.microtask(()=>t.microtask(()=>t.send({type:\"pushed\",push:N,ms:A})))},m;a.connect({mutate(l){m||(m=[],t.microtask(()=>{let E=m??[];m=void 0,t.send({type:\"render\",records:n.encode(E)})})),m.push(...l)},call:()=>{}});let b=l=>l.nodeType===1?l.getAttribute(\"data-key\")??l.getAttribute(\"id\"):null,h=(l,E)=>l.nodeType===E.nodeType&&(l.nodeType!==1||l.localName===E.localName&&l.namespaceURI===E.namespaceURI&&b(l)===b(E));function v(l,E){let A=Array.from(E.childNodes),N=0;for(let S of A){let _=l.childNodes[N]??null;if(_&&h(_,S)){g(_,S),N+=1;continue}if(b(S)!==null){let se=Array.from(l.childNodes).slice(N+1).find(je=>h(je,S));if(se){l.insertBefore(se,_),g(se,S),N+=1;continue}}l.insertBefore(S,_),N+=1}for(;l.childNodes.length>N;)l.removeChild(l.lastChild)}function g(l,E){if(l.nodeType!==1){l.data!==E.data&&(l.data=E.data);return}let A=l,N=E;for(let S of A.getAttributeNames())N.hasAttribute(S)||A.removeAttribute(S);for(let S of N.getAttributeNames()){let _=N.getAttribute(S);A.getAttribute(S)!==_&&A.setAttribute(S,_)}v(A,N)}function y(l,E,A){for(let N of Array.from(l.childNodes)){if(N.nodeType!==1)continue;let S=N,_=S.localName,ze=E||_.toLowerCase()===\"svg\",se=ze?Mr(_):Object.prototype.hasOwnProperty.call(Mn,_.toLowerCase())?_.toLowerCase():void 0;if(!se){A.add(`<${_}>`);continue}for(let je of S.getAttributeNames())(!Dr(ze?\"svg\":\"html\",se,je)||!ze&&Ir[se]?.includes(je.toLowerCase()))&&A.add(`${se} ${je}`);y(S,ze,A)}}function C(l){let E=document.createElement(\"div\"),A=Array.isArray(l)?l:[l];for(let S of A)if(S!=null)if(typeof S==\"string\"||Ur(S)){let _=document.createElement(\"div\");_.innerHTML=typeof S==\"string\"?S:S.html,E.append(...Array.from(_.childNodes))}else E.append(S);let N=new Set;y(E,!1,N),s=[...N],s.length>0&&t.warn(`The host will not draw: ${s.join(\", \")}`),v(a,E)}let D;return{view:Object.freeze({get props(){return i},onProps(l){return r.add(l),i&&l(i),()=>void r.delete(l)},render:C,style(l){typeof l!=\"string\"||l===D||(D=l,t.send({type:\"style\",css:l}))},on(l,E,A){let N={type:l,selector:E,listener:A};return o.add(N),()=>void o.delete(N)},act:(l,E={})=>t.act(l,E),navigate(l){typeof l==\"string\"?t.navigate(l):l&&typeof l.place==\"string\"&&t.send({type:\"navigate\",place:l.place})},html(l,...E){return ko(l.reduce((A,N,S)=>A+N+(S<E.length?Gr(E[S]):\"\"),\"\"))},get refused(){return s},get hardening(){return t.hardening()}}),hear:f}}var Hn={removed:[],stuck:[],sealed:!1,worker:!1},Dn=vr({listen(t){return xe.listen(t),()=>xe.unlisten(t)},fromHost:()=>!0,ready:t=>xe.post(t)},{onMessage:t=>Br.hear(t)}),Br=Vr({send:t=>Dn.send(t),act:(t,e)=>Dn.guest.act(t,e),navigate:t=>Dn.guest.navigate(t),microtask:xe.microtask,now:xe.now,threw:t=>console.error(t),warn:t=>console.warn(t),hardening:()=>Hn}),Io=Br.view;Object.defineProperty(globalThis,\"graview\",{value:Io,enumerable:!0,configurable:!0,writable:!1});var Ln=\"WorkerGlobalScope\"in globalThis?Pr(globalThis,[\"graview\"]):Hn;Hn=Ln;if(Ln.stuck.length>0)throw new Error(`The view's worker could not be hardened: ${Ln.stuck.join(\", \")} would not go.`);})();\n";
|
|
6
|
+
export const VIEW_RUNTIME = "\"use strict\";\n/*! @remote-dom/core and @remote-dom/polyfill — Copyright 2020-present, Shopify Inc. — MIT License.\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * @graview/guest's worker runtime — Elastic License 2.0. */\n\"use strict\";(()=>{var we=globalThis,zr=we.addEventListener,jr=we.removeEventListener,Fr=we.postMessage,qr=globalThis.queueMicrotask,nn=globalThis.performance,Yr=nn?nn.now.bind(nn):Date.now,xe={listen:t=>zr.call(we,\"message\",t),unlisten:t=>jr.call(we,\"message\",t),post:t=>Fr.call(we,t),microtask:t=>qr.call(globalThis,t),now:()=>Yr()};var w=Symbol(\"name\"),ae=Symbol(\"prefix\"),le=Symbol(\"value\"),x=Symbol(\"ns\"),z=Symbol(\"owner\"),k=Symbol(\"owner_document\"),J=Symbol(\"attributes\"),I=Symbol(\"prev\"),p=Symbol(\"next\"),S=Symbol(\"child\"),j=Symbol(\"parent\"),ce=Symbol(\"host\"),Y=Symbol(\"data\"),he=Symbol(\"listeners\"),rn=Symbol(\"isTrusted\"),ve=Symbol(\"path\"),Oe=Symbol(\"stop_immediate_propagation\"),Se=Symbol(\"dispatching\"),ne=Symbol(\"content\"),M=Symbol(\"hooks\"),at=Symbol(\"extensions\"),ge=Symbol(\"hooks_dispatch\"),U=Symbol(\"is_connected\"),Re=Symbol(\"create_element\"),Un=0,q=1,Ae=2,_e=3,Pe=8,be=9,Gn=10,ue=11,R=\"http://www.w3.org/1999/xhtml\",W=\"http://www.w3.org/2000/svg\",Vn=\"http://www.w3.org/XML/1998/namespace\",Fe=\"http://www.w3.org/2000/xmlns/\";function lt(t){return t.split(/[\\t\\n\\f\\r ]+/).filter(Boolean)}function L(t){return t.replace(/[A-Z]/g,e=>String.fromCharCode(e.charCodeAt(0)+32))}function Bn(t){return t.replace(/[a-z]/g,e=>String.fromCharCode(e.charCodeAt(0)-32))}function P(t,e){let n=globalThis.DOMException;if(typeof n==\"function\")return new n(t,e);let r=new Error(t);return r.name=e,r}var zn=/^(?:[A-Za-z][^\\0\\t\\n\\f\\r\\u0020/>]*|[:_\\u0080-\\u{10FFFF}][A-Za-z0-9-.:_\\u0080-\\u{10FFFF}]*)$/u,jn=/[\\0\\t\\n\\f\\r />=]/u,Wr=/[\\0\\t\\n\\f\\r />]/u;function re(t){if(t==null)return null;let e=String(t);return e===\"\"?null:e}function Fn(t){zn.test(t)||sn(t)}function on(t){(t===\"\"||jn.test(t))&&sn(t)}function ct(t,e,n){let r=re(t),o=String(e),i=o.indexOf(\":\"),s=i<0?null:o.slice(0,i),a=i<0?o:o.slice(i+1);if((s!=null&&(s===\"\"||Wr.test(s))||(n===\"element\"?!zn.test(a):a===\"\"||jn.test(a)))&&sn(o),s!=null&&r==null)throw P(`A namespace is required for the prefix in \"${o}\"`,\"NamespaceError\");if(s===\"xml\"&&r!==Vn)throw P(\"The xml prefix requires the XML namespace\",\"NamespaceError\");if((o===\"xmlns\"||s===\"xmlns\")&&r!==Fe)throw P(\"The xmlns name requires the XMLNS namespace\",\"NamespaceError\");if(r===Fe&&o!==\"xmlns\"&&s!==\"xmlns\")throw P(\"The XMLNS namespace requires the xmlns name or prefix\",\"NamespaceError\");return{namespace:r,qualifiedName:o,prefix:s,localName:a}}function sn(t){throw P(`Invalid name: \"${t}\"`,\"InvalidCharacterError\")}var ut=0,dt=1,qn=2,an=3,Xr=typeof performance>\"u\"?Date.now:performance.now.bind(performance),G=class{static NONE=ut;static CAPTURING_PHASE=dt;static AT_TARGET=qn;static BUBBLING_PHASE=an;timeStamp=Xr();target=null;currentTarget=null;srcElement=null;bubbles=!1;cancelable=!1;composed=!1;defaultPrevented=!1;cancelBubble=!1;eventPhase=ut;[ve]=[];[Oe]=!1;[Se]=!1;constructor(e,n){this.type=e,Object.defineProperty(this,rn,{writable:!0,value:!1}),n&&(n.bubbles&&(this.bubbles=n.bubbles),n.cancelable&&(this.cancelable=n.cancelable),n.composed&&(this.composed=n.composed))}get isTrusted(){return this[rn]}composedPath(){return[...this[ve]]}stopPropagation(){this.cancelBubble=!0}stopImmediatePropagation(){this[Oe]=!0,this.cancelBubble=!0}preventDefault(){this.cancelable&&(this.defaultPrevented=!0)}set returnValue(e){e||this.preventDefault()}get returnValue(){return!this.defaultPrevented}initEvent(e,n,r){this.type=e,this.bubbles=!!n,this.cancelable=!!r}};function ln(t,e,n){if(t.cancelBubble)return;let o=e[he]?.get(t.type)?.[n===dt?\"capture\":\"bubble\"];if(o)for(let i of[...o]){if(!o.has(i)||i.signal?.aborted)continue;t.eventPhase=t.target===e?qn:n,t.currentTarget=e;let s=i.normalizedListener;try{typeof s==\"object\"?s.handleEvent(t):s.call(e,t)}catch(a){setTimeout($r,0,a)}if(t[Oe])break}}function $r(t){throw t}var qe=[],mt=new WeakMap;function ft(t,e){let n=mt.get(t);n?n.push(e):mt.set(t,[e]),qe[qe.length-1].push(t)}function V(t){let e=[];qe.push(e);let n;try{n=t()}catch(r){qe.pop();try{Yn(e)}catch{}throw r}return qe.pop(),Yn(e),n}function Yn(t){let e,n=!1;for(let r of t){let o=mt.get(r);if(o){for(;o.length>0;){let i=o.shift();try{i()}catch(s){n||(e=s,n=!0)}}mt.delete(r)}}if(n)throw e}var pt=[],Ye=[],cn=!1;function Ee(t){for(let e of t)pt.push(e),e[1]&&Ye.push(e[1]);if(!cn){cn=!0;try{let e,n=!1;for(let r=0;r<pt.length;r++){let[o,i]=pt[r];i&&Ye.splice(Ye.indexOf(i),1);try{o()}catch(s){n||(e=s,n=!0)}}if(n)throw e}finally{pt.length=0,Ye.length=0,cn=!1}}}function We(t){let e=t;for(;e;){if(Ye.includes(e))return!0;e=e[j]??e[ce]}return!1}var Xe=Symbol(\"listenerRegistrations\"),de=class{[he]=void 0;[Xe]=void 0;[k]=void 0;addEventListener(e,n,r){if(n==null)return;let o=r===!0||typeof r==\"object\"&&r.capture===!0,i=typeof r==\"object\"&&r.once===!0,s=typeof r==\"object\"?r.signal:void 0;if(s?.aborted)return;let a=un(o),u=this[Xe];u||(u=new Map,this[Xe]=u);let c=u.get(e);c||(c={},u.set(e,c));let m=c[a];if(m||(m=new Map,c[a]=m),m.has(n))return;let f=this,b={type:e,listener:n,capture:o,once:i,normalizedListener:n,signal:s};(i||s)&&(b.normalizedListener=function(...C){if(b.signal?.aborted){ht(f,b);return}return b.once&&ht(f,b),typeof b.listener==\"object\"?b.listener.handleEvent(...C):b.listener.call(this,...C)});let h=this[he];h||(h=new Map,this[he]=h);let v=h.get(e);v||(v={},h.set(e,v));let g=v[a];if(g||(g=new Set,v[a]=g),m.set(n,b),g.add(b),s){let y=()=>{ht(f,b)};b.abortListener=y,s.addEventListener(\"abort\",y,{once:!0})}this[k]?.defaultView[ge].addEventListener?.(this,e,n,r)}removeEventListener(e,n,r){return Kr.call(this,e,n,r)}dispatchEvent(e){if(e[Se])throw P(\"Failed to execute 'dispatchEvent' on 'EventTarget': The event is already being dispatched.\",\"InvalidStateError\");e[Se]=!0;try{let n=[],r=this;for(;r!=null;)n.push(r),r=r.parentNode;e.target=this,e.srcElement=this,e[ve]=n;for(let i=n.length;i--;)if(ln(e,n[i],dt),e.cancelBubble)return!e.defaultPrevented;let o=e.bubbles?n:n.slice(0,1);for(let i=0;i<o.length;i++)if(ln(e,o[i],an),e.cancelBubble)return!e.defaultPrevented;return!e.defaultPrevented}finally{e[Se]=!1,e.cancelBubble=!1,e[Oe]=!1,e.eventPhase=ut,e.currentTarget=null,e[ve]=[]}}};function Kr(t,e,n){if(e==null)return;let r=n===!0||n&&n.capture===!0,o=un(!!r),i=this[Xe]?.get(t)?.[o]?.get(e);i&&ht(this,i)}function un(t){return t?\"capture\":\"bubble\"}function ht(t,e){let n=un(e.capture),r=t[Xe],o=r?.get(e.type);if(!o)return;let i=o[n];if(!i||i.get(e.listener)!==e)return;i.delete(e.listener),i.size===0&&delete o[n],!o.bubble&&!o.capture&&r?.delete(e.type),e.signal&&e.abortListener&&e.signal.removeEventListener(\"abort\",e.abortListener);let s=t[he],a=s?.get(e.type);if(!a)return;let u=a[n];u?.delete(e)&&(u.size===0&&delete a[n],!a.bubble&&!a.capture&&s?.delete(e.type),t[k]?.defaultView[ge].removeEventListener?.(t,e.type,e.listener,e.capture))}var X=class extends Array{item(e){return this[e]??null}};var Ke=0,Wn=1,fn=2,pn=3,Qe=4,Xn=0,$n=1,Et=2,yt=3,Kn=4,mn=5,Qn=6,Zn=7,gt=/^(?:--|-?[A-Za-z_\\u0080-\\u{10FFFF}])[A-Za-z0-9_\\u0080-\\u{10FFFF}-]*$/u;function Qr(t,e){let n=1,r=null;for(let o=e;o<t.length;o++){let i=t[o];if(r){i===\"\\\\\"?o++:i===r&&(r=null);continue}if(i==='\"'||i===\"'\")r=i;else if(i===\"(\")n++;else if(i===\")\"&&--n===0)return[t.slice(e,o),o+1]}return[t.slice(e),t.length]}function F(t){throw P(`Invalid or unsupported selector: \"${t}\"`,\"SyntaxError\")}function Nt(t,e){let n=typeof e==\"string\"?Ze(e):[{combinator:Qe,matchers:e}],r=null,o=t[S];return o&&n[0].matchers.length&&hn(o,n,i=>(r=i,!1)),r}function Tt(t,e){let n=typeof e==\"string\"?Ze(e):[{combinator:Qe,matchers:e}],r=new X,o=t[S];return o&&n[0].matchers.length&&hn(o,n,i=>{r.push(i)}),r}function Ze(t,e=!1,n=!1){let r={combinator:Qe,matchers:[]},o=[r],i=/[\\t\\n\\f\\r ]*?([>\\t\\n\\f\\r +~]?)[\\t\\n\\f\\r ]*?(?:(?:\\[[\\t\\n\\f\\r ]*([^\\]=\\t\\n\\f\\r ]+)[\\t\\n\\f\\r ]*(?:=[\\t\\n\\f\\r ]*(?:(['\"])(.*?)\\3|([^\\]\\t\\n\\f\\r ]+)))?[\\t\\n\\f\\r ]*(?:\\]|$))|([#.]?)([^\\t\\n\\f\\r #.[>:+~()]+)|:(\\w+)(\\()?)/gi,s=t.replace(/^[\\t\\n\\f\\r ]+|[\\t\\n\\f\\r ]+$/g,\"\");s===\"\"&&F(t);let a=0,u;for(;u=i.exec(s);){u.index!==a&&F(t),u[1]&&(r.matchers.length===0&&!(n&&o.length===1)&&F(t),u[1]===\">\"?r.combinator=Wn:u[1]===\"+\"?r.combinator=pn:u[1]===\"~\"?r.combinator=fn:r.combinator=Ke,r={combinator:Qe,matchers:[]},o.push(r));let c=u[8]?L(u[8]):u[2]||u[7];u[7]!=null&&!u[6]&&r.matchers.length>0&&F(t);let f,b=u[4]??u[5]??u[7];if(u[2]){gt.test(c)||F(t);let h=u[5],v=h?.[0];if(u[3]==null&&(v==='\"'||v===\"'\")){let g=u[0].lastIndexOf(h);b=s.slice(u.index+g+1),i.lastIndex=s.length}else h!=null&&!gt.test(h)&&F(t);f=Kn}else u[6]?(gt.test(c)||F(t),f=u[6]===\"#\"?Et:yt):u[8]?f=u[9]==null?mn:Qn:u[7]===\"*\"?f=Xn:u[7]&>.test(u[7])?f=$n:F(t);u[9]?([b,i.lastIndex]=Qr(s,i.lastIndex),c!==\"has\"&&c!==\"not\"&&F(t),c===\"has\"&&e&&F(t),Ze(b,e||c===\"has\",c===\"has\")):f===mn&&F(t),r.matchers.push({type:f,name:c,value:b}),a=i.lastIndex}return(a!==s.length||r.matchers.length===0)&&F(t),o}function Zr(t,e){let n=Ze(e);return n[0]?.matchers.length?$e(t,n):!1}function Jr(t,e){let n=Ze(e,!0,!0),r=n[0];if(n.length===1&&r.matchers.length===0)return!1;let o=Ke,i={type:Zn,name:\":scope\"};if(r.matchers.length===0?(o=r.combinator,r.matchers.push(i)):n.unshift({combinator:Ke,matchers:[i]}),n.some(({matchers:u})=>u.length===0))return!1;let s=o===pn||o===fn?t[p]:t[S];if(!s)return!1;let a=!1;return hn(s,n,()=>(a=!0,!1),t),a}function hn(t,e,n,r){let o=[],i=t;for(;i;){if(B(i)){if($e(i,e,r)&&n(i)===!1)return!1;let s=i[S];if(s){let a=i[p];a&&o.push(a),i=s;continue}}i=i[p]??o.pop()??null}return!0}function $e(t,e,n){let{combinator:r,matchers:o}=e[e.length-1];if(r===Qe){if(!bt(t,o,n))return!1;let a=e.slice(0,-1);return a.length===0||$e(t,a,n)}let i=r===Wn||r===Ke?j:I,s=t[i];if(!s)return!1;if(r===Ke||r===fn){for(;s;){if(B(s)&&bt(s,o,n)){let a=e.slice(0,-1);if(a.length===0||$e(s,a,n))return!0}s=s[i]}return!1}else{if(r===pn&&!B(s)){for(;s&&!B(s);)s=s[i];if(!s)return!1}if(!B(s)||!bt(s,o,n))return!1;let a=e.slice(0,-1);return a.length===0||$e(s,a,n)}}function dn(t,e){return t.getAttributeNS(null,t.namespaceURI===R?L(e):e)}function bt(t,e,n){if(!t)return!1;if(Array.isArray(e)){for(let s of e)if(bt(t,s,n)===!1)return!1;return!0}let{type:r,name:o,value:i}=e;switch(r){case Xn:return o===\"*\";case $n:return t.namespaceURI===R?t.localName===L(o):t.localName===o;case Et:return dn(t,\"id\")===o;case yt:let s=dn(t,\"class\");return s?lt(s).includes(o):!1;case Kn:let a=dn(t,o);return i==null?a!=null:a===i;case Zn:return t===n;case mn:F(`:${o}`);case Qn:switch(o){case\"has\":return Jr(t,i||\"\");case\"not\":return!Zr(t,i||\"\");default:F(`:${o}(${i})`)}}return!1}function eo(t){return t.nodeType===Ae}function Je(t){return Y in t}function bn(t){return t.nodeType===_e}function to(t){return t.nodeType===Pe}function B(t){return t.nodeType===q}function gn(t){return t.nodeType===ue}function nr(t){return\"appendChild\"in t}function wt(t){let e=[],n=[t],r=new Set(n),o=new Set,i;for(;n.length>0;){let s=n.pop();if(r.delete(s),o.has(s))continue;let a=[];for(let u of tt(s)){if(o.has(u)||(o.add(u),e.push(u),a.push(u),!B(u)))continue;let c=u[J];if(c)for(let f of c)o.has(f)||(o.add(f),e.push(f));let m=u[ne];m&&!o.has(m)&&!r.has(m)&&(r.add(m),n.push(m))}i??=a}return{nodes:e,treeNodes:i}}function et(t,e){for(let n of t)n[k]=e}function Jn(t,e){let n=t.constructor,r=new n(t.name,t.value,t.namespaceURI);return r[k]=e,r}function er(t,e){if(bn(t))return e.createTextNode(t.data);if(to(t))return e.createComment(t.data);if(eo(t))return Jn(t,e);if(B(t)){let n=e[Re](t[w],t.namespaceURI,t[ae],t.localName);if(t[J])for(let r=0;r<t[J].length;r++){let o=t[J].item(r);n.attributes.setNamedItem(Jn(o,e))}return n}else{if(gn(t))return e.createDocumentFragment();{let n=new t.constructor;return n[k]=e,n}}}function xt(t,e,n=t.ownerDocument){if(t.nodeType===be)throw P(\"Cannot clone a document node\",\"NotSupportedError\");let r=er(t,n);if(!e||!B(t)&&!gn(t))return r;let o=new Set([t]),i=[{source:t,destination:r,childIndex:0,cloningContent:!1}];for(;i.length>0;){let s=i[i.length-1],a,u;if(s.cloningContent)if(s.contentSource&&s.contentDestination)a=s.contentSource.childNodes[s.childIndex++],u=s.contentDestination;else{i.pop(),s.appendTo&&s.appendTo.appendChild(s.destination);continue}else if(a=s.source.childNodes[s.childIndex++],u=s.destination,!a){if(s.cloningContent=!0,s.childIndex=0,B(s.source)&&s.source.namespaceURI===R&&s.source.localName===\"template\"){let m=s.source[ne];m&&(o.has(m)&&tr(),o.add(m),s.contentSource=m,s.contentDestination=s.destination.content)}continue}if(!a){i.pop(),s.appendTo&&s.appendTo.appendChild(s.destination);continue}o.has(a)&&tr(),o.add(a);let c=er(a,n);B(a)||gn(a)?i.push({source:a,destination:c,appendTo:u,childIndex:0,cloningContent:!1}):u.appendChild(c)}return r}function tr(){throw new Error(\"Cannot clone a cyclic or repeated node graph\")}function vt(t,e){let n=String(e);return n===\"\"?null:Nt(t,[{type:Et,name:n}])}function Ot(t,e){let n=[...new Set(lt(String(e)))];return Tt(t,n.map(r=>({type:yt,name:r})))}function St(t,e){let n=String(e),r=L(n),o=[];for(let i of Rt(t))B(i)&&(n===\"*\"||(i.namespaceURI===R?i[w]===r:i[w]===n))&&o.push(i);return o}function Rt(t){let e=[],n=[],r=t[S];for(;r;){e.push(r);let o=r[S],i=r[p];o?(i&&n.push(i),r=o):r=i??n.pop()??null}return e}function tt(t){let e=Rt(t);return e.unshift(t),e}var $=class extends de{nodeType=Un;[w]=\"\";[j]=null;[ce]=null;[S]=null;[I]=null;[p]=null;[U]=!1;get[M](){return this[k].defaultView[ge]}get localName(){return this[w]}get nodeName(){return this[w]}get ownerDocument(){return this[k]}get isConnected(){return this[U]}isDefaultNamespace(e){let n=re(e);return no(this)===n}get parentNode(){return this[j]}set parentNode(e){}get parentElement(){let e=this[j];return!e||e.nodeType!==1?null:e}set parentElement(e){}get previousSibling(){return this[I]}set previousSibling(e){}get nextSibling(){return this[p]}set nextSibling(e){}get previousElementSibling(){let e=this[I];for(;e&&e.nodeType!==1;)e=e[I];return e}set previousElementSibling(e){}get nextElementSibling(){let e=this[p];for(;e&&e.nodeType!==1;)e=e[p];return e}set nextElementSibling(e){}get firstChild(){return this[S]}set firstChild(e){}get lastChild(){let e=this[S];for(;e;){let n=e[p];if(n==null)break;e=n}return e}set lastChild(e){}get nodeValue(){return Je(this)?this.data:null}set nodeValue(e){Je(this)&&(this.data=e)}get textContent(){if(Je(this))return this.data;let e=\"\";for(let n of Rt(this))bn(n)&&(e+=n.data);return e}set textContent(e){if(Je(this))this.data=e;else if(nr(this)){let n=e==null?\"\":String(e);n===\"\"?this.replaceChildren():this.replaceChildren(n)}}cloneNode(e){return xt(this,e)}contains(e){let n=e;for(;n!=null;){if(n===this)return!0;n=n.parentNode}return!1}};function no(t){let e=t;for(;e;)switch(e.nodeType){case q:{let n=e;if(n.prefix==null&&n.namespaceURI!=null)return n.namespaceURI;let r=n.attributes.getNamedItemNS(Fe,\"xmlns\");if(r!=null&&r.prefix==null)return re(r.value);e=n.parentElement;break}case be:e=e.documentElement;break;case Gn:case ue:return null;case Ae:e=e.ownerElement;break;default:e=e.parentElement}return null}var K=Symbol(\"insertNode\"),Nn=Symbol(\"preflightInsertions\"),At=Symbol(\"replaceNode\"),me=class extends ${remove(){let e=this.parentNode;e&&e.removeChild(this)}replaceWith(...e){let n=ye(e),r=this.parentNode;if(r)return En(o=>{oe(r,n);let i=this[p];for(;i&&n.includes(i);)i=i[p];let s=yn(r,n,o);this.parentNode===r?r[At](s,this,o):r[K](s,i,o)})}before(...e){let n=ye(e),r=this.parentNode;if(r)return En(o=>{oe(r,n);let i=this[I];for(;i&&n.includes(i);)i=i[I];let s=yn(r,n,o);r[K](s,i?i[p]:r.firstChild,o)})}after(...e){let n=ye(e),r=this.parentNode;if(r)return En(o=>{oe(r,n);let i=this[p];for(;i&&n.includes(i);)i=i[p];let s=yn(r,n,o);r[K](s,i,o)})}};function En(t){return V(()=>{let e=[];try{t(e)}catch(n){try{Ee(e)}catch{}throw n}Ee(e)})}function ye(t){return t.map(e=>e instanceof $?e:String(e))}function nt(t,e){return e instanceof $?e:t.ownerDocument.createTextNode(String(e))}function oe(t,e){for(let n of e){if(!(n instanceof $))continue;let r=t;for(;r;){if(r===n)throw P(\"Cannot insert a node into itself or one of its descendants\",\"HierarchyRequestError\");r=r[j]??r[ce]}}}function yn(t,e,n){let r=[];for(let i of e)r.push(nt(t,i));if(r.length===1)return r[0];let o=t.ownerDocument.createDocumentFragment();o[Nn](r);for(let i of r)o[K](i,null,n);return o}var _t,Tn=0,rr=0,or=0,ir=0,Ce=!1,xn=!1,rt=!1,Pt=class{#t;#n=[];#e=new Set;#r=!1;constructor(e){if(typeof e!=\"function\")throw new TypeError(\"MutationObserver callback must be a function\");this.#t=e}observe(e,n={}){let r=ro(n),o=_t??=new WeakMap,i=o.get(e);i==null&&(i=new Map,o.set(e,i));let s=i.get(this);s==null?Tn++:wn(s,-1),i.set(this,r),wn(r,1),this.#e.add(e)}disconnect(){let e=_t;if(e!=null){for(let n of this.#e){let r=e.get(n),o=r?.get(this);o!=null&&(r.delete(this),Tn--,wn(o,-1)),r?.size===0&&e.delete(n)}this.#e.clear(),this.#n.length=0,Tn===0&&(_t=void 0)}}takeRecords(){return this.#n.splice(0)}enqueue(e){this.#n.push(e),!this.#r&&(this.#r=!0,queueMicrotask(()=>{this.#r=!1;let n=this.takeRecords();n.length>0&&this.#t.call(this,n,this)}))}};function Q(t){let e=_t;if(e==null)return;let n=new Map,r=t.target;for(;r;){let o=e.get(r);if(o)for(let[i,s]of o){if(r!==t.target&&!s.subtree)continue;let a=!1;if(t.type===\"attributes\"){if(!s.attributes||s.attributeFilter&&!s.attributeFilter.has(t.attributeName??\"\"))continue;a=s.attributeOldValue}else if(t.type===\"characterData\"){if(!s.characterData)continue;a=s.characterDataOldValue}else if(!s.childList)continue;n.set(i,n.get(i)===!0||a)}r=r.parentNode}for(let[o,i]of n)o.enqueue({addedNodes:t.addedNodes??new X,attributeName:t.attributeName??null,attributeNamespace:t.attributeNamespace??null,nextSibling:t.nextSibling??null,oldValue:i?t.oldValue??null:null,previousSibling:t.previousSibling??null,removedNodes:t.removedNodes??new X,target:t.target,type:t.type})}function Ct(...t){let e=new X;return e.push(...t),e}function ro(t){if(t.attributes===!1&&(t.attributeOldValue||t.attributeFilter!=null))throw new TypeError(\"attributeOldValue and attributeFilter require attributes to be enabled\");if(t.characterData===!1&&t.characterDataOldValue)throw new TypeError(\"characterDataOldValue requires characterData to be enabled\");let e=t.attributes??(t.attributeOldValue===!0||t.attributeFilter!=null),n=t.characterData??t.characterDataOldValue===!0,r=t.childList===!0;if(!e&&!n&&!r)throw new TypeError(\"MutationObserver options must enable childList, attributes, or characterData\");return{attributes:e,attributeFilter:t.attributeFilter==null?void 0:new Set(t.attributeFilter.map(String)),attributeOldValue:t.attributeOldValue===!0,characterData:n,characterDataOldValue:t.characterDataOldValue===!0,childList:r,subtree:t.subtree===!0}}function wn(t,e){t.attributes&&(rr+=e),t.characterData&&(or+=e),t.childList&&(ir+=e),Ce=rr>0,xn=or>0,rt=ir>0}var ee=class extends me{childNodes=new X;children=new X;appendChild(e){return V(()=>this[K](e,null))}insertBefore(e,n){return V(()=>this[K](e,n||null))}append(...e){return V(()=>{let n=ye(e.filter(r=>r!=null));n.length>1&&oe(this,n);for(let r of n)this[K](nt(this,r),null)})}prepend(...e){return V(()=>{let n=ye(e.filter(o=>o!=null));n.length>1&&oe(this,n);let r=this.firstChild;for(let o of n)this[K](nt(this,o),r)})}replaceChildren(...e){return V(()=>{let n=ye(e.filter(o=>o!=null));oe(this,n);let r;for(;r=this.firstChild;)this.removeChildImmediately(r);for(let o of n)this[K](nt(this,o),null)})}removeChild(e){return V(()=>(this.removeChildImmediately(e),e))}removeChildImmediately(e){if(e.parentNode!==this)throw P(\"The node is not a child of this node\",\"NotFoundError\");let n=this[U]?tt(e):void 0,r=e[I],o=e[p],i=kt(this,e);if(n)for(let s of n)s[U]=!1;this.queueRemovalMutationRecord(this,e,r,o),n&&this.enqueueTreeReactions(n,\"disconnectedCallback\"),Ee(this.collectRemovalHookEffects(e,i))}replaceChild(e,n){return V(()=>this[At](e,n))}[At](e,n,r){if(oe(this,[e]),n.parentNode!==this)throw P(\"The reference node is not a child of this parent\",\"NotFoundError\");let o=n[I],i=n[p],s=this.prepareInsertion(e),a=this[U]?tt(n):void 0,u=new Set(s.map(({node:b})=>b)),c=i;for(;c&&u.has(c);)c=c[p];let m=kt(this,n);if(a){for(let h of a)h[U]=!1;let b=new Set(a);for(let h of s)b.has(h.node)&&(h.shouldDisconnect=!1)}this.commitInsertion(s,c);let f=this[U];return this.queueRemovalMutationRecord(this,n,o,i),this.queueInsertionMutationRecords(s),a&&this.enqueueTreeReactions(a,\"disconnectedCallback\"),this.enqueueInsertionReactions(s,f),this.performOrCollectHookEffects([...this.collectRemovalHookEffects(n,m),...this.collectInsertionHookEffects(s)],r),n}querySelectorAll(e){return Tt(this,e)}querySelector(e){return Nt(this,e)}[K](e,n,r){return this.validateInsertion(e,n),this.insertIntoValidated(e,n,r),e}[Nn](e){for(let n of e)this.validateInsertion(n,null),this.prepareInsertion(n)}validateInsertion(e,n){if(oe(this,[e]),n&&n.parentNode!==this)throw P(\"The reference node is not a child of this parent\",\"NotFoundError\")}insertIntoValidated(e,n,r){e===n&&(n=e[p]);let o=this.prepareInsertion(e);this.commitInsertion(o,n);let i=this[U];this.queueInsertionMutationRecords(o),this.enqueueInsertionReactions(o,i),this.performOrCollectHookEffects(this.collectInsertionHookEffects(o),r)}performOrCollectHookEffects(e,n){n?n.push(...e):Ee(e)}prepareInsertion(e){let n=[];if(e.nodeType===ue){let s=e[S];for(;s;)n.push(s),s=s[p]}else n.push(e);let r=this[U],o=this[k],i=[];for(let s of n){let a=s[U],u=a||r,c,m;if(s[k]===o)u&&(c=tt(s));else{let f=wt(s);m=f.nodes,u&&(c=f.treeNodes)}i.push({node:s,nodes:c,adoption:m,shouldDisconnect:a})}return i}commitInsertion(e,n){for(let i of e){let s=i.node[j];if(s){let a=i.node[I],u=i.node[p];i.source={parent:s,index:kt(s,i.node),previousSibling:a,nextSibling:u}}}for(let i of e){let s=this.attachChild(i.node,n);i.insertIndex=s.index,i.previousSibling=s.previousSibling,i.nextSibling=s.nextSibling}let r=this[k];for(let{adoption:i}of e)i&&et(i,r);let o=this[U];for(let{nodes:i}of e)if(i)for(let s of i)s[U]=o}attachChild(e,n){if(n){let i=n[I];e[p]=n,e[I]=i,i?i[p]=e:this[S]=e,n[I]=e}else{e[p]=null;let i=this[S];if(i){let s;for(;s=i[p];)i=s;i[p]=e,e[I]=i}else this[S]=e,e[I]=null}let r=B(e);e[j]=this;let o;if(n){if(o=this.childNodes.indexOf(n),this.childNodes.splice(o,0,e),r){let i=n;for(;i&&!B(i);)i=i[p];i?this.children.splice(this.children.indexOf(i),0,e):this.children.push(e)}}else o=this.childNodes.length,this.childNodes.push(e),r&&this.children.push(e);return{index:o,previousSibling:e[I],nextSibling:e[p]}}queueRemovalMutationRecord(e,n,r,o){rt&&Q({type:\"childList\",target:e,removedNodes:Ct(n),previousSibling:r,nextSibling:o})}queueInsertionMutationRecords(e){if(rt)for(let n of e){let{node:r,source:o}=n;o&&this.queueRemovalMutationRecord(o.parent,r,o.previousSibling,o.nextSibling),Q({type:\"childList\",target:this,addedNodes:Ct(r),previousSibling:n.previousSibling,nextSibling:n.nextSibling})}}collectRemovalHookEffects(e,n){return this.nodeType!==q||We(this)?[]:[[()=>this[M].removeChild?.(this,e,n)]]}collectInsertionHookEffects(e){let n=[];for(let r of e){let{node:o,source:i}=r;i?.parent.nodeType===q&&!We(i.parent)&&n.push([()=>i.parent[M].removeChild?.(i.parent,o,i.index)]),this.nodeType===q&&!We(this)&&n.push([()=>this[M].insertChild?.(this,o,r.insertIndex),o])}return n}enqueueInsertionReactions(e,n){for(let r of e){let{nodes:o}=r;o&&(r.shouldDisconnect&&this.enqueueTreeReactions(o,\"disconnectedCallback\"),n&&this.enqueueTreeReactions(o,\"connectedCallback\"))}}enqueueTreeReactions(e,n){ar(e,n)}};function sr(t,e,n,r){if(e.parentNode!==t)throw Error(\"not a child of this node\");let o=t[U]?n.treeNodes:void 0,i=e[I],s=e[p],a=kt(t,e);if(o)for(let c of o)c[U]=!1;et(n.nodes,r),rt&&Q({type:\"childList\",target:t,removedNodes:Ct(e),previousSibling:i,nextSibling:s}),o&&ar(o,\"disconnectedCallback\");let u=[];t.nodeType===q&&!We(t)&&u.push([()=>t[M].removeChild?.(t,e,a)]),Ee(u)}function kt(t,e){let n=e[I],r=e[p];n?n[p]=r:t[S]=r,r&&(r[I]=n);let o=t.childNodes.indexOf(e);return t.childNodes.splice(o,1),B(e)&&t.children.splice(t.children.indexOf(e),1),e[j]=null,e[p]=null,e[I]=null,o}function ar(t,e){for(let n of t){let r=n[e];typeof r==\"function\"&&ft(n,()=>r.call(n))}}function ot(t,e,n,r,o){let{observedAttributes:i}=t.constructor,{attributeChangedCallback:s}=t;s==null||i==null||!i.includes(e)||ft(t,()=>s.call(t,e,n,r,o))}var It=class{[S]=null;constructor(e){this[z]=e}getNamedItem(e){let n=String(e),r=this[z][x]===R?L(n):n,o=this[S];for(;o;){if(o.name===r)return o;o=o[p]}return null}getNamedItemNS(e,n){let r=re(e),o=String(n),i=this[S];for(;i;){if(i.localName===o&&i[x]===r)return i;i=i[p]}return null}item(e){let n=this[S],r=0;for(;n;){if(r++===e)return n;n=n[p]}return null}get length(){let e=0,n=this[S];for(;n;)e++,n=n[p];return e}removeNamedItem(e){let n=String(e),r=this[z][x]===R?L(n):n;return V(()=>this.removeNamedItemImmediately(o=>o.name===r))}removeNamedItemNS(e,n){let r=re(e),o=String(n);return V(()=>this.removeNamedItemImmediately(i=>i.localName===o&&i[x]===r))}removeNamedItemImmediately(e){let n=this[z],r=this[S],o=null;for(;r!=null;){if(e(r)){o&&(o[p]=r[p]),this[S]===r&&(this[S]=r[p]);let i=r.value;return r[p]=null,r[z]=null,Ce&&Q({type:\"attributes\",target:n,attributeName:r.name,attributeNamespace:r[x],oldValue:i}),n[M].removeAttribute?.(n,r.name,r[x]),ot(n,r.localName,i,null,r[x]),r}o=r,r=r[p]}return null}setNamedItem(e){return V(()=>this.setNamedItemImmediately(e))}setNamedItemImmediately(e){let n=this[z],r=e[z];if(r!=null&&r!==n)throw P(\"The attribute is already in use by another element.\",\"InUseAttributeError\");let o=null,i=this[S],s=null;for(;i;){if(i.localName===e.localName&&i[x]===e[x]){if(i===e)return i;s?s[p]=e:this[S]=e,e[p]=i[p],i[p]=null,o=i;break}s=i,i=i[p]}o==null&&(s?s[p]=e:this[S]=e),e[z]=n,e[k]=n[k],o&&(o[z]=null);let a=o==null||o.value!==e.value,u=o!=null&&o.name!==e.name;return a&&Ce&&Q({type:\"attributes\",target:n,attributeName:e.name,attributeNamespace:e[x],oldValue:o?.value??null}),u&&n[M].removeAttribute?.(n,o.name,o[x]),(a||u)&&n[M].setAttribute?.(n,e.name,e.value,e[x]),a&&ot(n,e.localName,o?.value??null,e.value,e[x]),o}setNamedItemNS(e){return this.setNamedItem(e)}*[Symbol.iterator](){let e=this[S];for(;e;)yield e,e=e[p]}};var Ne=class extends ${nodeType=Ae;[x]=null;[p]=null;[z]=null;constructor(e,n,r){super(),this[w]=e,this[le]=n,r&&(this[x]=r)}get nodeName(){return this[w]}set nodeName(e){}get name(){return this[w]}set name(e){}get localName(){if(this[x]==null)return this[w];let e=this[w].indexOf(\":\");return e<0?this[w]:this[w].slice(e+1)}get prefix(){if(this[x]==null)return null;let e=this[w].indexOf(\":\");return e<0?null:this[w].slice(0,e)}get value(){return this[le]}set value(e){let n=String(e),r=this[z];if(!r){this[le]=n;return}V(()=>{let o=this[le];this[le]=n,Ce&&o!==n&&Q({type:\"attributes\",target:r,attributeName:this[w],attributeNamespace:this[x],oldValue:o}),this[M].setAttribute?.(r,this[w],n,this[x]),ot(r,this.localName,o,n,this[x])})}get nodeValue(){return this.value}set nodeValue(e){this.value=e}get ownerElement(){return this[z]}get namespaceURI(){return this[x]}get specified(){return!0}};var oo={amp:\"&\",AMP:\"&\",apos:\"'\",gt:\">\",GT:\">\",lt:\"<\",LT:\"<\",quot:'\"',QUOT:'\"'},io=new Set([\"area\",\"base\",\"br\",\"col\",\"embed\",\"hr\",\"img\",\"input\",\"link\",\"meta\",\"param\",\"source\",\"track\",\"wbr\"]),so=/(?:<([a-z][a-z0-9-:]*)((?:[\\s]+[^<>'\"=/\\s]+(?:=(['\"])[^]*?\\3|=[^>'\"\\s]*|))*)[\\s]*(\\/?)\\s*>|<\\/([a-z][a-z0-9-:]*)>|<!--(.*?)-->|([^<>]+))/gi,ur=/\\s([^<>'\"=/\\n\\s]+)(?:=([\"'])([\\s\\S]*?)\\2|=([^>'\"\\n\\s]*)|)/g,ao=\"|b|big|blockquote|body|br|center|code|dd|div|dl|dt|em|embed|h1|h2|h3|h4|h5|h6|head|hr|i|img|li|listing|menu|meta|nobr|ol|p|pre|ruby|s|small|span|strong|strike|sub|sup|table|tt|u|ul|var|\",lo=/^(?:color|face|size)$/i;function lr(t){return t.replace(/&(?:(amp|AMP|apos|gt|GT|lt|LT|quot|QUOT)|#(\\d+)|#[xX]([\\da-fA-F]+));/g,(e,n,r,o)=>{if(n)return oo[n];let i=Number.parseInt(r??o,r?10:16);try{return String.fromCodePoint(i)}catch{return e}})}function dr(t){return t.namespaceURI===R&&io.has(t.localName)}function cr(t){let e=t.localName;return t[x]===W&&(e===\"foreignObject\"||e===\"desc\"||e===\"title\")}function co(t,e){if(ao.includes(`|${t}|`))return!0;if(t!==\"font\")return!1;for(let n of e.matchAll(ur))if(lo.test(n[1]))return!0;return!1}function Mt(t,e){let n=e.ownerDocument,r=n.createDocumentFragment(),o=[],i=r;for(let s of t.matchAll(so)){let a=s[1];if(a){let u=s[2],c=L(a),m=o[o.length-1]?.element??e,f=m[x]===W?W:R;if(c===\"svg\")f=W;else if(f===W){if(cr(m))f=R;else if(co(c,u)){for(;o.length>0;){let v=o[o.length-1];if(v.element[x]!==W||cr(v.element))break;o.pop(),i=v.target}f=R}}let b=f===R?c:a,h=n[Re](b,f,null,b);for(let v of u.matchAll(ur))h.setAttribute(v[1],lr(v[3]||v[4]||\"\"));if(i.append(h),dr(h)||f!==R&&s[4])continue;o.push({element:h,target:i}),i=f===R&&c===\"template\"?h.content:h}else if(s[5]){let u=L(s[5]);for(let c=o.length-1;c>=0;c--){let m=o[c],f=L(m.element[w]);if(f===u){i=m.target,o.length=c;break}if(m.element[x]===R&&f===\"template\")break}}else s[6]?i.append(n.createComment(s[6])):i.append(lr(s[7]))}return r}function Dt(t){return fr([{type:\"content\",child:t[S]}])}function mr(t){return fr([{type:\"opening\",node:t}])}function fr(t){let e=[],n;for(;n=t.pop();)switch(n.type){case\"opening\":{let r=n.node;switch(r.nodeType){case q:{let o=r;e.push(`<${o[w]}`);let i=o[J]?.[S];for(;i;){e.push(` ${i[w]}`);let a=i[le];a!==\"\"&&(a=String(a).replace(/&/g,\"&\").replace(/\"/g,\""\"),e.push(`=\"${a}\"`)),i=i[p]}if(e.push(\">\"),dr(o))break;let s=o.namespaceURI===R&&o.localName===\"template\"?o[ne]:o;t.push({type:\"closing\",name:o[w]}),t.push({type:\"content\",child:s?.[S]??null});break}case _e:{let o=r;e.push(o[Y].replace(/&/g,\"&\").replace(/\"/g,\""\").replace(/</g,\"<\").replace(/>/g,\">\"));break}case Pe:{let o=r;e.push(`<!--${o[Y]}-->`);break}}break}case\"content\":{let r=n.child;r&&(t.push({type:\"content\",child:r[p]}),t.push({type:\"opening\",node:r}));break}case\"closing\":e.push(`</${n.name}>`);break}return e.join(\"\")}var H=class extends ee{nodeType=q;[x]=R;[ae]=null;get namespaceURI(){return this[x]}get prefix(){return this[ae]}get localName(){let e=this[ae];return e==null?this[w]:this[w].slice(e.length+1)}get nodeName(){return this[x]===R?Bn(this[w]):this[w]}get tagName(){return this.nodeName}get id(){return this.getAttributeNS(null,\"id\")??\"\"}set id(e){this.setAttribute(\"id\",String(e))}get slot(){return this.getAttributeNS(null,\"slot\")??\"\"}set slot(e){let n=String(e);this.getAttributeNS(null,\"slot\")!==n&&this.attributes.setNamedItem(new Ne(\"slot\",n))}get attributes(){let e=this[J];return e||(e=new It(this),this[J]=e),e}getAttributeNames(){return[...this.attributes].map(e=>e.name)}getElementsByTagName(e){return St(this,e)}get firstElementChild(){return this.children[0]??null}getElementsByClassName(e){return Ot(this,e)}get lastElementChild(){return this.children[this.children.length-1]??null}get nextElementSibling(){let e=this.nextSibling;for(;e&&e.nodeType!==1;)e=e.nextSibling;return e}get previousElementSibling(){let e=this.previousSibling;for(;e&&e.nodeType!==1;)e=e.previousSibling;return e}setAttribute(e,n){let r=String(e),o=String(n);on(r);let i=this[x]===R?L(r):r,s=this.attributes.getNamedItemNS(null,i);s?s.value=o:this.attributes.setNamedItem(new Ne(i,o))}setAttributeNS(e,n,r){let o=re(e),i=String(n),s=String(r),a=ct(o,i,\"attribute\"),u=this.attributes.getNamedItemNS(a.namespace,a.localName);u?u.value=s:this.attributes.setNamedItemNS(new Ne(a.qualifiedName,s,a.namespace))}toggleAttribute(e,n){let r=String(e);on(r);let o=this[x]===R?L(r):r,i=this.attributes.getNamedItemNS(null,o),s=n===void 0?void 0:!!n;return i==null?s===!1?!1:(this.attributes.setNamedItem(new Ne(o,\"\")),!0):s===!0?!0:(this.attributes.removeNamedItemNS(null,o),!1)}getAttribute(e){let n=this.attributes.getNamedItem(e);return n&&n.value}getAttributeNS(e,n){let r=this.attributes.getNamedItemNS(e,n);return r&&r.value}hasAttribute(e){return this.attributes.getNamedItem(e)!=null}hasAttributeNS(e,n){return this.attributes.getNamedItemNS(e,n)!=null}removeAttribute(e){let n=String(e),r=this[x]===R?L(n):n;this.attributes.removeNamedItemNS(null,r)}removeAttributeNS(e,n){this.attributes.removeNamedItemNS(e,n)}get outerHTML(){return mr(this)}get innerHTML(){return Dt(this)}set innerHTML(e){if(e==null||e===\"\")this.replaceChildren();else{let n=Mt(String(e),this);this.replaceChildren(n)}}};var ke=class t extends H{[x]=W;get ownerSVGElement(){let e=null,n=this.parentNode;for(;n instanceof t;)e=n,n=n.parentNode;return e}};var fe=class extends me{[Y]=\"\";constructor(e){super(),this[Y]=e==null?\"\":String(e)}setData(e){let n=xn,r=n?this[Y]:null,o=\"\";e!=null&&(o=typeof e==\"string\"?e:String(e)),this[Y]=o,n&&r!==o&&Q({type:\"characterData\",target:this,oldValue:r}),this[M].setText?.(this,o)}get data(){return this[Y]}set data(e){this.setData(e)}};var Ie=class extends fe{nodeType=_e;[w]=\"#text\"};var Me=class extends fe{nodeType=Pe;[w]=\"#comment\"};var De=class extends ee{nodeType=ue;[w]=\"#document-fragment\";[k]=typeof window<\"u\"?window.document:null;getElementById(e){return vt(this,e)}};var Le=class extends H{get content(){let e=this[ne];return e||(e=this.ownerDocument.createDocumentFragment(),e[ce]=this,this[ne]=e),e}set content(e){}set innerHTML(e){this.content.replaceChildren(Mt(String(e),this))}get innerHTML(){let e=this[ne];return e?Dt(e):\"\"}};var Lt=class extends H{};var Ht=class extends H{};var Ut=class extends H{};var it=class extends ee{nodeType=be;[w]=\"#document\";[U]=!0;constructor(e){super(),this.defaultView=e,this[k]=this,this.documentElement=Vt(new Ut,this,\"html\"),this.body=Vt(new Lt,this,\"body\"),this.head=Vt(new Ht,this,\"head\"),this.appendChild(this.documentElement),this.documentElement.appendChild(this.head),this.documentElement.appendChild(this.body)}get textContent(){return null}set textContent(e){}getElementsByClassName(e){return Ot(this,e)}createElement(e){let n=String(e);return Fn(n),vn(this,L(n))}createElementNS(e,n){let r=ct(e,n,\"element\");return vn(this,r.qualifiedName,r.namespace,r.prefix,r.localName)}[Re](e,n,r,o){return vn(this,e,n,r,o)}createTextNode(e){let n=Gt(new Ie(e),this);return this[M].createText?.(n,n.data),n}createComment(e){return Gt(new Me(e),this)}createDocumentFragment(){return Gt(new De,this)}createEvent(){return new G(\"\")}getElementById(e){return vt(this,e)}getElementsByTagName(e){return St(this,e)}importNode(e,n){if(e.nodeType===be)throw P(\"Cannot import a document node\",\"NotSupportedError\");return xt(e,n,this)}adoptNode(e){if(e[k]===this)return e;let n=wt(e);return V(()=>{let r=e.parentNode;return r?sr(r,e,n,this):et(n.nodes,this),e})}};function Gt(t,e){return Object.defineProperty(t,k,{value:e,writable:!0,enumerable:!1}),t}function vn(t,e,n=R,r=null,o=e){let i;if(n===W)i=new ke;else if(n===R&&o===\"template\")i=new Le;else if(n===R){let s=t.defaultView.customElements.get(o);i=s?new s:new H}else i=new H;return Vt(i,t,e,n,r)}function Vt(t,e,n,r=R,o=null){return Gt(t,e),Object.defineProperties(t,{[w]:{value:n},[x]:{value:r},[ae]:{value:o}}),e[M].createElement?.(t,r),t}var Bt=class extends G{constructor(e,n){super(e,n),this.detail=n?.detail??null}initCustomEvent(e,n,r,o){super.initEvent(e,n,r),this.detail=o??null}};var zt=class extends G{constructor(e,n){super(e,n),this.message=n.message,this.filename=n.filename,this.lineno=n.lineno,this.colno=n.colno,this.error=n.error}};var jt=class extends G{constructor(e,n){super(e,n),this.promise=n.promise,this.reason=n.reason}};var Ft=class extends G{constructor(e,n){super(e,n),this.oldState=n.oldState,this.newState=n.newState}};var qt=class extends G{constructor(e,n={}){super(e,n),this.relatedTarget=n.relatedTarget??null}};var Yt=class extends G{constructor(e,n={}){super(e,n),this.clipboardData=n.clipboardData??null}};var Wt=class extends H{};var uo=/^[a-z][^A-Z\\u0000\\t\\n\\f\\r />]*-[^A-Z\\u0000\\t\\n\\f\\r />]*$/u,mo=new Set([\"annotation-xml\",\"color-profile\",\"font-face\",\"font-face-src\",\"font-face-uri\",\"font-face-format\",\"font-face-name\",\"missing-glyph\"]);function pr(t){return uo.test(t)&&!mo.has(t)}function hr(t){return P(`Invalid custom element name: \"${t}\"`,\"SyntaxError\")}var Xt=class{registry=new Map;listenersByName=new Map;define(e,n,r){if(!pr(e))throw hr(e);if(this.registry.has(e))throw P(`A custom element named \"${e}\" has already been defined`,\"NotSupportedError\");if(this.getName(n)!=null)throw P(\"This constructor has already been registered in this custom element registry\",\"NotSupportedError\");this.registry.set(e,n);let o=this.listenersByName.get(e);if(o!=null){this.listenersByName.delete(e);for(let i of o)i(n)}}get(e){return this.registry.get(e)}getName(e){for(let[n,r]of this.registry)if(r===e)return n;return null}whenDefined(e){if(!pr(e))return Promise.reject(hr(e));let n=this.registry.get(e);if(n!=null)return Promise.resolve(n);let r=this.listenersByName.get(e);return r==null&&(r=[],this.listenersByName.set(e,r)),new Promise(o=>{r.push(o)})}upgrade(e){}initialize(e){}};var fo=[\"onerror\",\"onunhandledrejection\"],br=Symbol.for(\"@remote-dom/polyfill/global-property\");function Er(t){return Object.getOwnPropertyDescriptors(t)}function yr(t){let e={};for(let[n,r]of Object.entries(Object.getOwnPropertyDescriptors(de.prototype)))n!==\"constructor\"&&typeof r.value==\"function\"&&(r.value=On(r.value.bind(t)),e[n]=r);return e}function Nr(t){let e={};for(let n of fo)e[n]={configurable:!0,enumerable:!0,get:On(()=>t[n]),set:On(r=>{t[n]=r})};return e}function po(t){return Object.assign(Er(t),yr(t),Nr(t))}function On(t){return Object.defineProperty(t,br,{value:!0}),t}function gr(t,e){for(let n of Reflect.ownKeys(e)){let r=ho(t,n);(r==null||go(r))&&Object.defineProperty(t,n,e[n])}}function ho(t,e){let n=t;for(;n;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function go(t){return[t.value,t.get,t.set].some(e=>typeof e==\"function\"&&e[br]===!0)}var Te=class extends de{[M]={};[at]=[];[ge]=Eo(this);name=\"\";window=this;parent=this;self=this;top=this;document=new it(this);customElements=new Xt;location=globalThis.location;navigator=globalThis.navigator;Event=G;ErrorEvent=zt;PromiseRejectionEvent=jt;ToggleEvent=Ft;FocusEvent=qt;ClipboardEvent=Yt;EventTarget=de;CustomEvent=Bt;Node=$;ParentNode=ee;ChildNode=me;DocumentFragment=De;Document=it;CharacterData=fe;Comment=Me;Text=Ie;Element=H;HTMLElement=Wt;SVGElement=ke;HTMLTemplateElement=Le;MutationObserver=Pt;#t=null;#n=null;#e=null;static with(...e){let n=this;return class extends n{constructor(){super();for(let o of e)bo(this,o)}}}get onerror(){return this.#n}set onerror(e){this.#t&&this.removeEventListener(\"error\",this.#t),e&&typeof e==\"function\"?(this.#n=e,this.#t=n=>{e(n.message??\"Error\",n.filename,n.lineno,n.colno,n.error)},this.addEventListener(\"error\",this.#t)):(this.#t=null,this.#n=null)}get onunhandledrejection(){return this.#e}set onunhandledrejection(e){this.#e&&this.removeEventListener(\"unhandledrejection\",this.#e),e&&typeof e==\"function\"?(this.#e=e,this.addEventListener(\"unhandledrejection\",this.#e)):this.#e=null}static setGlobal(e){let n=globalThis.self,r=globalThis.window,o=Er(e),i=Object.assign(yr(e),Nr(e));delete o.self,Object.defineProperties(globalThis,o),gr(globalThis,i),typeof n>\"u\"||n===r&&n!==globalThis?Object.defineProperty(globalThis,\"self\",{value:e,configurable:!0,writable:!0,enumerable:!0}):n!==globalThis&&(Object.defineProperties(n,o),gr(n,i))}static setGlobalThis(e){for(let n in e)e[n]===e&&(e[n]=globalThis);Object.defineProperties(globalThis,po(e))}};function bo(t,e){t[at].push(e(t)??{})}function Eo(t){return{createElement:ie.bind(null,t,\"createElement\"),setAttribute:ie.bind(null,t,\"setAttribute\"),removeAttribute:ie.bind(null,t,\"removeAttribute\"),createText:ie.bind(null,t,\"createText\"),setText:ie.bind(null,t,\"setText\"),insertChild:ie.bind(null,t,\"insertChild\"),removeChild:ie.bind(null,t,\"removeChild\"),addEventListener:ie.bind(null,t,\"addEventListener\"),removeEventListener:ie.bind(null,t,\"removeEventListener\")}}function ie(t,e,...n){for(let i of t[at])i[e]?.apply(i,n);let r=t[M];r[e]?.apply(r,n)}var $t=new Te;var Sn=\"~\";var pe=new WeakMap;function He(t){return pe.get(t)}var Pn=new WeakMap,No=0;function Z(t){let e=Pn.get(t);return e==null&&(e=String(No++),Kt(t,e)),e}function Kt(t,e){Pn.set(t,e)}var An=new WeakMap;function To(t){return An.get(t)}var _n=new WeakMap;function wo(t){let e=_n.get(t);if(e!=null)return e;if(!(!(t instanceof Element)||t.tagName.includes(\"-\"))){e={};for(let{name:n,value:r}of t.attributes)e[n]=r;return e}}var xo=new WeakMap;function vo(t){return xo.get(t)}function Cn(t,e,n){let r=An.get(t);if(r==null&&(r={},An.set(t,r)),r[e]===n)return;r[e]=n;let o=pe.get(t);o?.mutate([[3,Z(t),e,n,1]])}function Qt(t,e,n){let r=_n.get(t);if(r==null&&(r={},_n.set(t,r)),r[e]===n)return;n==null?delete r[e]:r[e]=String(n);let o=pe.get(t);o?.mutate([[3,Z(t),e,n,2]])}function Ue(t,e){if(pe.get(t)!==e&&(pe.set(t,e),t.childNodes))for(let r=0;r<t.childNodes.length;r++)Ue(t.childNodes[r],e)}function Zt(t){if(pe.get(t)!=null&&(pe.delete(t),t.childNodes))for(let n=0;n<t.childNodes.length;n++)Zt(t.childNodes[n])}function Ge(t){let{nodeType:e}=t;switch(e){case 1:return{id:Z(t),type:e,element:t.localName,properties:Rn(To(t)),attributes:Rn(wo(t)),eventListeners:Rn(vo(t)),children:Array.from(t.childNodes).map(Ge)};case 3:case 8:return{id:Z(t),type:e,data:t.data};default:throw new Error(`Cannot serialize node of type ${t.nodeType} (${typeof t.nodeType})`)}}function Rn(t){return t?{...t}:void 0}function kn(t,e,...n){let r=Pn.get(t),o=pe.get(t);if(r==null||o==null)throw new Error(`Cannot call method ${e} on an unconnected node`);return o.call(r,e,...n)}var Ve=$t[M];Ve.insertChild=(t,e,n)=>{let r=He(t);r!=null&&(Ue(e,r),r.mutate([[0,Z(t),Ge(e),n]]))};Ve.removeChild=(t,e,n)=>{let r=He(t);r!=null&&(Zt(e),r.mutate([[1,Z(t),n]]))};Ve.setText=(t,e)=>{let n=He(t);n?.mutate([[2,Z(t),e]])};Ve.setAttribute=(t,e,n)=>{t.tagName.includes(\"-\")||Qt(t,e,n)};Ve.removeAttribute=(t,e)=>{t.tagName.includes(\"-\")||Qt(t,e)};Te.setGlobal($t);function wr(t){let e=t;return typeof t==\"object\"&&t!==null&&e.graview===\"host-hello\"&&typeof e.nonce==\"string\"}function vr(t,e={}){let n,r=\"\",o,i=0,s=new Set,a=new Map,u=[],c=g=>{n?n.postMessage({...g,nonce:r}):u.push(g)},m=g=>{let y=g.data;if(!(!y||typeof y!=\"object\")){if(y.type===\"props\"){o=y.props;for(let C of s)C(y.props)}else y.type===\"answer\"?(a.get(y.id)?.(y),a.delete(y.id)):y.type===\"event\"&&typeof y.listener==\"number\"?e.onEvent?.(y):y.type===\"heartbeat\"&&typeof y.beat==\"number\"&&c({type:\"heartbeat\",beat:y.beat});e.onMessage?.(y)}},f=()=>{},b=g=>{if(n||!t.fromHost(g)||!wr(g.data)||g.data.protocol!==1)return;let y=g.ports[0];if(y){n=y,r=g.data.nonce,n.onmessage=m,n.start?.(),f();for(let C of u.splice(0))c(C)}};f=t.listen(b),t.ready({graview:\"guest-ready\",protocol:1});let h,v={get props(){return o},subscribe(g){return s.add(g),()=>s.delete(g)},act(g,y={}){let C=i+=1;return new Promise(D=>{a.set(C,D),c({type:\"act\",id:C,name:g,args:y})})},navigate(g){typeof g==\"string\"?c({type:\"navigate\",to:g}):g&&typeof g.place==\"string\"&&c({type:\"navigate\",place:g.place})},size(g){c({type:\"size\",height:g})},autoSize(g){let y=g??globalThis.document?.documentElement,C=globalThis.ResizeObserver;if(!y||!C||typeof y.getBoundingClientRect!=\"function\")return()=>{};h?.disconnect();let D=new C(()=>v.size(Math.ceil(y.getBoundingClientRect().height)));return D.observe(y),h=D,()=>D.disconnect()},close(){h?.disconnect(),f(),n?.close(),s.clear()}};return{guest:v,send:c}}var Sr=[\"globalThis\",\"Infinity\",\"NaN\",\"undefined\",\"isFinite\",\"isNaN\",\"parseFloat\",\"parseInt\",\"decodeURI\",\"decodeURIComponent\",\"encodeURI\",\"encodeURIComponent\",\"escape\",\"unescape\",\"Object\",\"Function\",\"Array\",\"Number\",\"Boolean\",\"String\",\"Symbol\",\"BigInt\",\"Date\",\"Promise\",\"RegExp\",\"Math\",\"JSON\",\"Reflect\",\"Proxy\",\"Intl\",\"Error\",\"AggregateError\",\"EvalError\",\"RangeError\",\"ReferenceError\",\"SyntaxError\",\"TypeError\",\"URIError\",\"SuppressedError\",\"Map\",\"Set\",\"WeakMap\",\"WeakSet\",\"WeakRef\",\"FinalizationRegistry\",\"Iterator\",\"AsyncIterator\",\"DisposableStack\",\"AsyncDisposableStack\",\"ArrayBuffer\",\"SharedArrayBuffer\",\"DataView\",\"Atomics\",\"Int8Array\",\"Uint8Array\",\"Uint8ClampedArray\",\"Int16Array\",\"Uint16Array\",\"Int32Array\",\"Uint32Array\",\"Float16Array\",\"Float32Array\",\"Float64Array\",\"BigInt64Array\",\"BigUint64Array\"],Rr=[\"window\",\"parent\",\"top\",\"document\",\"customElements\",\"Event\",\"ErrorEvent\",\"PromiseRejectionEvent\",\"ToggleEvent\",\"FocusEvent\",\"ClipboardEvent\",\"CustomEvent\",\"EventTarget\",\"Node\",\"ParentNode\",\"ChildNode\",\"DocumentFragment\",\"Document\",\"CharacterData\",\"Comment\",\"Text\",\"Element\",\"HTMLElement\",\"SVGElement\",\"HTMLTemplateElement\",\"MutationObserver\"],Ar=[\"self\",\"postMessage\",\"setTimeout\",\"clearTimeout\",\"setInterval\",\"clearInterval\",\"queueMicrotask\",\"structuredClone\",\"crypto\",\"console\",\"DOMException\"],_r=[\"TEMPORARY\",\"PERSISTENT\"],Za=Object.freeze([...Sr,...Rr,...Ar,..._r]),Ja=Object.freeze([\"constructor\",\"__defineGetter__\",\"__defineSetter__\",\"hasOwnProperty\",\"__lookupGetter__\",\"__lookupSetter__\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"toString\",\"valueOf\",\"__proto__\",\"toLocaleString\"]),Or=t=>typeof t==\"symbol\"?`[${t.description??\"symbol\"}]`:t;function Pr(t=globalThis,e=[],n={}){let r=[],o=[],i=new Set([...Sr,...Rr,...Ar,...e,\"constructor\",Symbol.toStringTag]),s=(T,l)=>{let E=Reflect.getOwnPropertyDescriptor(T,l);return E===void 0||!(\"value\"in E)||E.writable||E.configurable?!1:n.primitivesStay&&typeof l==\"symbol\"&&(typeof E.value!=\"object\"||E.value===null)&&typeof E.value!=\"function\"?!0:_r.includes(l)&&typeof E.value==\"number\"},a=t,u=a.setTimeout,c=a.setInterval,m=a.crypto,f=(T,l)=>function(E,A,...N){if(typeof E!=\"function\")throw new TypeError(`${l} takes a function: a guest view cannot run code from text`);return T.call(t,E,A,...N)},b=m?Object.freeze({getRandomValues:T=>m.getRandomValues(T)}):void 0,h=a.document?.defaultView;if(h&&h!==a)for(let T of Reflect.ownKeys(h))typeof T==\"symbol\"||i.has(T)||Reflect.deleteProperty(h,T)||o.push(`window.${T}`);let v=[];for(let T=t;T&&T!==Object.prototype;T=Object.getPrototypeOf(T))v.push(T);for(let T of v)for(let l of Reflect.ownKeys(T))i.has(l)||(Reflect.deleteProperty(T,l)?r.push(Or(l)):s(T,l)||o.push(Or(l)));let g=()=>function(){throw new EvalError(\"A guest view cannot make code from text.\")},y=[Function.prototype,Object.getPrototypeOf(async function(){}),Object.getPrototypeOf(function*(){}),Object.getPrototypeOf(async function*(){})];for(let T of y){let l=g();Object.defineProperty(l,\"prototype\",{value:T,writable:!1,enumerable:!1,configurable:!1}),Reflect.defineProperty(T,\"constructor\",{value:l,writable:!1,enumerable:!1,configurable:!1})||o.push(\"Function.prototype.constructor\"),T===Function.prototype&&Reflect.defineProperty(t,\"Function\",{value:l,writable:!0,enumerable:!1,configurable:!0})}let C=(T,l)=>{Reflect.defineProperty(t,T,{value:l,writable:!0,enumerable:!0,configurable:!0})||o.push(T)};C(\"setTimeout\",f(u,\"setTimeout\")),C(\"setInterval\",f(c,\"setInterval\")),b&&C(\"crypto\",b);for(let T of v.slice(1))Object.freeze(T);for(let T of Reflect.ownKeys(t)){let l=Reflect.getOwnPropertyDescriptor(t,T);Reflect.defineProperty(t,T,\"value\"in l?{...l,writable:!1,configurable:!1}:{...l,configurable:!1})}let D;try{D=Reflect.preventExtensions(t)}catch{D=!1}return{removed:r,stuck:o,sealed:D}}var st=class extends HTMLElement{constructor(){super(),Kt(this,Sn)}connect(e){if(He(this)===e||(Ue(this,e),this.childNodes.length===0))return;let n=[];for(let r=0;r<this.childNodes.length;r++){let o=this.childNodes[r];n.push([0,Sn,Ge(o),r])}e.mutate(n)}updateRemoteProperty(e,n){Cn(this,e,n)}callRemoteMethod(e,...n){return kn(this,e,...n)}};var d={},In={empty:!0},Oo={id:\"text\",class:\"text\",title:\"text\",lang:\"text\",dir:{oneOf:[\"ltr\",\"rtl\",\"auto\"]},hidden:\"text\",tabindex:{oneOf:[\"-1\",\"0\"]},role:\"text\",style:\"style\",translate:{oneOf:[\"yes\",\"no\"]},spellcheck:{oneOf:[\"true\",\"false\"]},draggable:{oneOf:[\"true\",\"false\"]},inert:\"boolean\"},Mn={div:d,section:d,article:d,aside:d,header:d,footer:d,nav:d,hgroup:d,search:d,address:d,figure:d,figcaption:d,blockquote:d,p:d,pre:d,hr:In,br:In,wbr:In,h1:d,h2:d,h3:d,h4:d,h5:d,h6:d,span:d,strong:d,em:d,b:d,i:d,u:d,s:d,small:d,mark:d,abbr:d,cite:d,q:d,code:d,kbd:d,samp:d,var:d,sub:d,sup:d,dfn:d,bdi:d,bdo:d,ruby:d,rt:d,rp:d,time:{attributes:{datetime:\"text\"}},data:{attributes:{value:\"text\"}},del:{attributes:{datetime:\"text\"}},ins:{attributes:{datetime:\"text\"}},a:d,ul:d,menu:d,dl:d,dt:d,dd:d,ol:{attributes:{start:\"number\",reversed:\"boolean\",type:{oneOf:[\"1\",\"a\",\"A\",\"i\",\"I\"]}}},li:{attributes:{value:\"number\"}},table:d,caption:d,thead:d,tbody:d,tfoot:d,tr:d,colgroup:{attributes:{span:\"number\"}},col:{attributes:{span:\"number\"},empty:!0},th:{attributes:{colspan:\"number\",rowspan:\"number\",headers:\"text\",scope:{oneOf:[\"row\",\"col\",\"rowgroup\",\"colgroup\"]},abbr:\"text\"}},td:{attributes:{colspan:\"number\",rowspan:\"number\",headers:\"text\"}},details:{attributes:{open:\"boolean\",name:\"text\"}},summary:d,button:{attributes:{type:{oneOf:[\"button\"]},disabled:\"boolean\",name:\"text\",value:\"text\"}},input:{empty:!0,attributes:{type:{oneOf:[\"text\",\"search\",\"number\",\"range\",\"checkbox\",\"radio\",\"date\",\"time\",\"datetime-local\",\"month\",\"week\",\"color\",\"email\",\"tel\",\"url\"]},name:\"text\",value:\"text\",placeholder:\"text\",min:\"text\",max:\"text\",step:\"text\",checked:\"boolean\",disabled:\"boolean\",readonly:\"boolean\",required:\"boolean\",maxlength:\"number\",minlength:\"number\",size:\"number\",pattern:\"text\",multiple:\"boolean\",inputmode:\"text\",enterkeyhint:\"text\"}},select:{attributes:{name:\"text\",disabled:\"boolean\",multiple:\"boolean\",required:\"boolean\",size:\"number\"}},option:{attributes:{value:\"text\",selected:\"boolean\",disabled:\"boolean\",label:\"text\"}},optgroup:{attributes:{label:\"text\",disabled:\"boolean\"}},textarea:{attributes:{name:\"text\",placeholder:\"text\",rows:\"number\",cols:\"number\",disabled:\"boolean\",readonly:\"boolean\",required:\"boolean\",maxlength:\"number\",minlength:\"number\",wrap:{oneOf:[\"soft\",\"hard\",\"off\"]}}},label:{attributes:{for:\"text\"}},fieldset:{attributes:{disabled:\"boolean\",name:\"text\"}},legend:d,output:d,meter:{attributes:{value:\"number\",min:\"number\",max:\"number\",low:\"number\",high:\"number\",optimum:\"number\"}},progress:{attributes:{value:\"number\",max:\"number\"}},img:{empty:!0,attributes:{src:\"image\",alt:\"text\",width:\"number\",height:\"number\",decoding:{oneOf:[\"async\",\"sync\",\"auto\"]}}}},So=[\"fill\",\"fill-opacity\",\"fill-rule\",\"stroke\",\"stroke-width\",\"stroke-linecap\",\"stroke-linejoin\",\"stroke-dasharray\",\"stroke-dashoffset\",\"stroke-opacity\",\"stroke-miterlimit\",\"opacity\",\"color\",\"display\",\"visibility\",\"transform-origin\",\"clip-path\",\"clip-rule\",\"marker-start\",\"marker-mid\",\"marker-end\",\"font-family\",\"font-size\",\"font-weight\",\"font-style\",\"text-anchor\",\"dominant-baseline\",\"alignment-baseline\",\"letter-spacing\",\"text-decoration\",\"paint-order\",\"vector-effect\",\"shape-rendering\",\"pointer-events\",\"stop-color\",\"stop-opacity\",\"overflow\",\"mask\"],Ro={id:\"text\",class:\"text\",style:\"style\",lang:\"text\",role:\"text\",tabindex:{oneOf:[\"-1\",\"0\"]},transform:\"geometry\",...Object.fromEntries(So.map(t=>[t,\"css\"]))},Be={x:\"geometry\",y:\"geometry\",width:\"geometry\",height:\"geometry\"},Jt={viewBox:\"geometry\",preserveAspectRatio:\"geometry\"},Cr={gradientUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},gradientTransform:\"geometry\",spreadMethod:{oneOf:[\"pad\",\"reflect\",\"repeat\"]},href:\"fragment\"},kr={svg:{attributes:{...Be,...Jt}},g:d,defs:d,symbol:{attributes:{...Be,...Jt,refX:\"geometry\",refY:\"geometry\"}},use:{attributes:{...Be,href:\"fragment\"}},title:d,desc:d,path:{attributes:{d:\"geometry\",pathLength:\"number\"}},rect:{attributes:{...Be,rx:\"geometry\",ry:\"geometry\",pathLength:\"number\"}},circle:{attributes:{cx:\"geometry\",cy:\"geometry\",r:\"geometry\",pathLength:\"number\"}},ellipse:{attributes:{cx:\"geometry\",cy:\"geometry\",rx:\"geometry\",ry:\"geometry\",pathLength:\"number\"}},line:{attributes:{x1:\"geometry\",y1:\"geometry\",x2:\"geometry\",y2:\"geometry\",pathLength:\"number\"}},polyline:{attributes:{points:\"geometry\",pathLength:\"number\"}},polygon:{attributes:{points:\"geometry\",pathLength:\"number\"}},text:{attributes:{x:\"geometry\",y:\"geometry\",dx:\"geometry\",dy:\"geometry\",rotate:\"geometry\",textLength:\"geometry\",lengthAdjust:{oneOf:[\"spacing\",\"spacingAndGlyphs\"]}}},tspan:{attributes:{x:\"geometry\",y:\"geometry\",dx:\"geometry\",dy:\"geometry\",rotate:\"geometry\",textLength:\"geometry\"}},textPath:{attributes:{href:\"fragment\",startOffset:\"geometry\",method:{oneOf:[\"align\",\"stretch\"]},spacing:{oneOf:[\"auto\",\"exact\"]},side:{oneOf:[\"left\",\"right\"]}}},linearGradient:{attributes:{x1:\"geometry\",y1:\"geometry\",x2:\"geometry\",y2:\"geometry\",...Cr}},radialGradient:{attributes:{cx:\"geometry\",cy:\"geometry\",r:\"geometry\",fx:\"geometry\",fy:\"geometry\",fr:\"geometry\",...Cr}},stop:{attributes:{offset:\"geometry\"}},clipPath:{attributes:{clipPathUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},mask:{attributes:{...Be,maskUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},maskContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},pattern:{attributes:{...Be,...Jt,patternUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternTransform:\"geometry\",href:\"fragment\"}},marker:{attributes:{...Jt,markerWidth:\"geometry\",markerHeight:\"geometry\",refX:\"geometry\",refY:\"geometry\",orient:\"geometry\",markerUnits:{oneOf:[\"strokeWidth\",\"userSpaceOnUse\"]}}}};var Ir={section:[\"aria-label\",\"aria-labelledby\",\"title\"]};function Ao(t){return/^aria-[a-z]+$/.test(t)}function _o(t){return/^data-[a-z0-9][a-z0-9_.-]*$/.test(t)}var Po=new Map(Object.keys(kr).map(t=>[t.toLowerCase(),t]));function Mr(t){return Po.get(t.toLowerCase())}function Dr(t,e,n){let r=n.toLowerCase(),o=t===\"html\"?[Mn[e]?.attributes,Oo]:[kr[e]?.attributes,Ro],i=t===\"svg\"&&r===\"xlink:href\"?\"href\":r;for(let s of o)if(s){for(let[a,u]of Object.entries(s))if(a.toLowerCase()===i)return{name:a,kind:u}}if(Ao(r)||_o(r))return{name:r,kind:\"text\"}}var Lr=\"~\",en=t=>typeof t==\"object\"&&t!==null&&!Array.isArray(t),te=(t,e=0)=>{if(t===null||typeof t==\"string\"||typeof t==\"number\"||typeof t==\"boolean\"||t===void 0)return t;if(!(e>64||typeof t!=\"object\"))return Array.isArray(t)?t.map(n=>te(n,e+1)):Object.fromEntries(Object.entries(t).map(([n,r])=>[n,te(r,e+1)]))};function Hr(){let t=new Map,e=new Map,n=new Map([[Lr,{children:[],listeners:new Map}]]),r=0,o=c=>{let m=e.get(c);return m===void 0&&(m=r+=1,e.set(c,m),t.set(m,{listener:c,count:0})),t.get(m).count+=1,m},i=c=>{let m=t.get(c);m&&(m.count-=1,!(m.count>0)&&(t.delete(c),e.delete(m.listener)))},s=c=>{let m=n.get(c);if(m){n.delete(c);for(let f of m.listeners.values())i(f);for(let f of m.children)s(f)}},a=(c,m,f=0)=>{if(!en(c)||f>64)return te(c);let b=typeof c.id==\"string\"?c.id:void 0,h=m&&b!==void 0&&b!==Lr;h&&s(b);let v={children:[],listeners:new Map};h&&n.set(b,v);let g={};for(let[y,C]of Object.entries(c))y===\"children\"&&Array.isArray(C)?g[y]=C.map(D=>{let T=a(D,h,f+1);return h&&en(D)&&typeof D.id==\"string\"&&v.children.push(D.id),T}):y===\"eventListeners\"&&en(C)?g[y]=Object.fromEntries(Object.entries(C).map(([D,T])=>{if(typeof T!=\"function\"||!h)return[D,void 0];let l=o(T);return v.listeners.set(D,l),[D,{listener:l}]})):g[y]=te(C,f+1);return g},u=c=>{if(!Array.isArray(c))return te(c);let[m,f]=c,b=typeof f==\"string\"?n.get(f):void 0;if(m===0){let h=a(c[2],b!==void 0),v=en(c[2])?c[2].id:void 0;if(b&&typeof v==\"string\"&&n.has(v)){let g=Number(c[3]);b.children.splice(Number.isInteger(g)&&g>=0&&g<=b.children.length?g:b.children.length,0,v)}return[m,te(f),h,te(c[3])]}if(m===1){let h=Number(c[2]);return b&&Number.isInteger(h)&&h>=0&&h<b.children.length&&s(b.children.splice(h,1)[0]),te(c)}if(m===3&&c[4]===3){let h=String(c[2]),v=c[3],g=b&&typeof v==\"function\"?o(v):void 0,y=b?.listeners.get(h);return y!==void 0&&i(y),g===void 0?b?.listeners.delete(h):b.listeners.set(h,g),[m,te(f),h,g===void 0?void 0:{listener:g},3]}return te(c)};return{encode:c=>c.map(u),listener:c=>t.get(c)?.listener,get listening(){return t.size},get nodes(){return n.size-1}}}var tn=\"graview-view-root\",Co=t=>t.replace(/&/g,\"&\").replace(/</g,\"<\").replace(/>/g,\">\").replace(/\"/g,\""\").replace(/'/g,\"'\"),ko=t=>Object.freeze({html:t,toString:()=>t}),Ur=t=>typeof t==\"object\"&&t!==null&&typeof t.html==\"string\"&&Object.isFrozen(t),Gr=t=>t==null||t===!1?\"\":Array.isArray(t)?t.map(Gr).join(\"\"):Ur(t)?t.html:Co(String(t));function Vr(t){customElements.get(tn)||customElements.define(tn,st);let e=Event,n=Hr(),r=new Set,o=new Set,i,s=[];for(let l of[\"closest\",\"matches\",\"dataset\"]){let E=()=>{throw new TypeError(`A view's element has no ${l}: graview.on hands event.element, the element its selector matched; read event.element.getAttribute(\"data-\\u2026\").`)};l in Element.prototype||Object.defineProperty(Element.prototype,l,l===\"dataset\"?{get:E}:{value:E})}let a=document.createElement(tn),u=l=>{let E=A=>{for(let N of Array.from(A.childNodes)){if(N.nodeType!==1)continue;if(Z(N)===l)return N;let O=E(N);if(O)return O}};return E(a)},c=l=>{let E=u(l.target);if(!E)return;let A=new e(l.event,{bubbles:!0});for(let N of[\"value\",\"checked\",\"key\",\"pressed\"])l[N]!==void 0&&Object.defineProperty(A,N,{value:l[N],enumerable:!0});E.dispatchEvent(A);for(let N of o){if(N.type!==l.event)continue;let O;try{O=new Set(Array.from(a.querySelectorAll(N.selector)))}catch{continue}for(let _=E;_&&_!==a;_=_.parentNode)if(O.has(_)){N.listener(Object.freeze({type:l.event,target:E,element:_,...l.value!==void 0?{value:l.value}:{},...l.checked!==void 0?{checked:l.checked}:{},...l.key!==void 0?{key:l.key}:{},...l.pressed!==void 0?{pressed:l.pressed}:{}}));break}}},m=l=>{if(l.type===\"dom-event\"&&typeof l.target==\"string\")return c(l);if(l.type===\"notice\")return t.warn(l.text);if(l.type!==\"props\")return;i=l.props;let E=t.now();for(let O of r)try{O(l.props)}catch(_){t.threw(_)}let A=t.now()-E,N=l.push;typeof N==\"number\"&&t.microtask(()=>t.microtask(()=>t.send({type:\"pushed\",push:N,ms:A})))},f;a.connect({mutate(l){f||(f=[],t.microtask(()=>{let E=f??[];f=void 0,t.send({type:\"render\",records:n.encode(E)})})),f.push(...l)},call:()=>{}});let b=l=>l.nodeType===1?l.getAttribute(\"data-key\")??l.getAttribute(\"id\"):null,h=(l,E)=>l.nodeType===E.nodeType&&(l.nodeType!==1||l.localName===E.localName&&l.namespaceURI===E.namespaceURI&&b(l)===b(E));function v(l,E){let A=Array.from(E.childNodes),N=0;for(let O of A){let _=l.childNodes[N]??null;if(_&&h(_,O)){g(_,O),N+=1;continue}if(b(O)!==null){let se=Array.from(l.childNodes).slice(N+1).find(je=>h(je,O));if(se){l.insertBefore(se,_),g(se,O),N+=1;continue}}l.insertBefore(O,_),N+=1}for(;l.childNodes.length>N;)l.removeChild(l.lastChild)}function g(l,E){if(l.nodeType!==1){l.data!==E.data&&(l.data=E.data);return}let A=l,N=E;for(let O of A.getAttributeNames())N.hasAttribute(O)||A.removeAttribute(O);for(let O of N.getAttributeNames()){let _=N.getAttribute(O);A.getAttribute(O)!==_&&A.setAttribute(O,_)}v(A,N)}function y(l,E,A){for(let N of Array.from(l.childNodes)){if(N.nodeType!==1)continue;let O=N,_=O.localName,ze=E||_.toLowerCase()===\"svg\",se=ze?Mr(_):Object.prototype.hasOwnProperty.call(Mn,_.toLowerCase())?_.toLowerCase():void 0;if(!se){A.add(`<${_}>`);continue}for(let je of O.getAttributeNames())(!Dr(ze?\"svg\":\"html\",se,je)||!ze&&Ir[se]?.includes(je.toLowerCase()))&&A.add(`${se} ${je}`);y(O,ze,A)}}function C(l){let E=document.createElement(\"div\"),A=Array.isArray(l)?l:[l];for(let O of A)if(O!=null)if(typeof O==\"string\"||Ur(O)){let _=document.createElement(\"div\");_.innerHTML=typeof O==\"string\"?O:O.html,E.append(...Array.from(_.childNodes))}else E.append(O);let N=new Set;y(E,!1,N),s=[...N],s.length>0&&t.warn(`The host will not draw: ${s.join(\", \")}`),v(a,E)}let D;return{view:Object.freeze({get props(){return i},onProps(l){return r.add(l),i&&l(i),()=>void r.delete(l)},render:C,style(l){typeof l!=\"string\"||l===D||(D=l,t.send({type:\"style\",css:l}))},on(l,E,A){let N={type:l,selector:E,listener:A};return o.add(N),()=>void o.delete(N)},act:(l,E={})=>t.act(l,E),navigate(l){typeof l==\"string\"?t.navigate(l):l&&typeof l.place==\"string\"&&t.send({type:\"navigate\",place:l.place})},html(l,...E){return ko(l.reduce((A,N,O)=>A+N+(O<E.length?Gr(E[O]):\"\"),\"\"))},get refused(){return s},get hardening(){return t.hardening()}}),hear:m}}var Hn={removed:[],stuck:[],sealed:!1,worker:!1},Dn=vr({listen(t){return xe.listen(t),()=>xe.unlisten(t)},fromHost:()=>!0,ready:t=>xe.post(t)},{onMessage:t=>Br.hear(t)}),Br=Vr({send:t=>Dn.send(t),act:(t,e)=>Dn.guest.act(t,e),navigate:t=>Dn.guest.navigate(t),microtask:xe.microtask,now:xe.now,threw:t=>console.error(t),warn:t=>console.warn(t),hardening:()=>Hn}),Io=Br.view;Object.defineProperty(globalThis,\"graview\",{value:Io,enumerable:!0,configurable:!0,writable:!1});var Ln=\"WorkerGlobalScope\"in globalThis?Pr(globalThis,[\"graview\"]):Hn;Hn=Ln;if(Ln.stuck.length>0)throw new Error(`The view's worker could not be hardened: ${Ln.stuck.join(\", \")} would not go.`);})();\n";
|
|
7
7
|
//# sourceMappingURL=view-runtime.generated.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view-runtime.generated.js","sourceRoot":"","sources":["../../src/host/view-runtime.generated.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAW,
|
|
1
|
+
{"version":3,"file":"view-runtime.generated.js","sourceRoot":"","sources":["../../src/host/view-runtime.generated.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAW,qw7DAAqw7D,CAAC"}
|
package/dist/host/view.d.ts
CHANGED
|
@@ -94,6 +94,13 @@ export interface MountWorkerViewOptions<S extends AnySchema> {
|
|
|
94
94
|
readonly limits?: WorkerViewLimits;
|
|
95
95
|
/** The view is not going to be shown, and why: the reason, and a sentence saying it. */
|
|
96
96
|
readonly onFailure?: (reason: WorkerViewFailure, detail?: string) => void;
|
|
97
|
+
/**
|
|
98
|
+
* Something the view did went nowhere, and why, as a sentence for the
|
|
99
|
+
* host's problems: a link or `graview.navigate` to no record the viewer
|
|
100
|
+
* may see and no place of the app, naming the places there are. The
|
|
101
|
+
* view's console is told the same.
|
|
102
|
+
*/
|
|
103
|
+
readonly onProblem?: (said: string) => void;
|
|
97
104
|
/**
|
|
98
105
|
* What is drawn in the view's place when it fails. By default the host
|
|
99
106
|
* draws the plain face of what the view was shown — its title, each
|
|
@@ -104,6 +111,12 @@ export interface MountWorkerViewOptions<S extends AnySchema> {
|
|
|
104
111
|
readonly fallback?: false | ((region: HTMLElement, reason: WorkerViewFailure, detail: string) => void);
|
|
105
112
|
/** The page's origin, for a `blob:` image of its own. `location.origin` by default. */
|
|
106
113
|
readonly origin?: string;
|
|
114
|
+
/**
|
|
115
|
+
* Where an image the app holds (`/graview/assets/<sha256>.<ext>`) is
|
|
116
|
+
* loaded from, so a view may draw it by that path: a host serving the app
|
|
117
|
+
* under a base answers `base + path`. Without it, such an image is refused.
|
|
118
|
+
*/
|
|
119
|
+
readonly asset?: (path: string) => string | undefined;
|
|
107
120
|
/** Who made it, said under the region (ADR 0007: "Made by Claude for Nick"). Nothing by default. */
|
|
108
121
|
readonly author?: string;
|
|
109
122
|
}
|