@graview/guest 0.2.16 → 0.2.18

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.
@@ -23,6 +23,37 @@ export { readTheme } from "./theme.js";
23
23
  export { GUEST_PROTOCOL, GUEST_SANDBOX, OPAQUE_ORIGIN } from "../protocol.js";
24
24
  /* What a view's host says went wrong, by a code that stays when the words change (HQ f-view-problem-codes). */
25
25
  export { VIEW_PROBLEM_CODES } from "./problems.js";
26
+ /*
27
+ * What the page adds and takes away, watched once a document for every
28
+ * frame drawn in it (LOADED AGAIN, DRAWN AGAIN, below): each frame is asked
29
+ * whether its window is another. A frame in a shadow root is not seen
30
+ * moved within it; none is drawn there.
31
+ */
32
+ const reloadWatches = new WeakMap();
33
+ function watchReloads(document, look) {
34
+ if (typeof MutationObserver === "undefined")
35
+ return () => undefined;
36
+ let watch = reloadWatches.get(document);
37
+ if (!watch) {
38
+ const frames = new Set();
39
+ const observer = new MutationObserver(() => {
40
+ for (const one of [...frames])
41
+ one();
42
+ });
43
+ observer.observe(document, { childList: true, subtree: true });
44
+ watch = { observer, frames };
45
+ reloadWatches.set(document, watch);
46
+ }
47
+ const { frames } = watch;
48
+ frames.add(look);
49
+ return () => {
50
+ frames.delete(look);
51
+ if (frames.size === 0 && reloadWatches.get(document)?.frames === frames) {
52
+ reloadWatches.get(document).observer.disconnect();
53
+ reloadWatches.delete(document);
54
+ }
55
+ };
56
+ }
26
57
  /**
27
58
  * MOUNT A GUEST VIEW: an iframe sandboxed to scripts alone, so its origin
28
59
  * is opaque and nothing of the host's is reachable from it, and one
@@ -201,12 +232,13 @@ export function mountGuestView(element, options) {
201
232
  clearTimeout(quiet);
202
233
  quiet = setTimeout(drew, 250);
203
234
  };
204
- const silent = setTimeout(() => {
235
+ const unready = () => setTimeout(() => {
205
236
  if (session)
206
237
  return;
207
238
  iframe.removeAttribute("aria-busy");
208
239
  iframe.setAttribute("data-guest-view-failed", "silent");
209
240
  }, options.limits?.readyMs ?? 8_000);
241
+ let silent = unready();
210
242
  /*
211
243
  * WHERE ITS RECORDS ARE (Graview HQ feature:f-one-face-lines-from-frame-views):
212
244
  * what the guest last said of its `data-record` elements, kept as said
@@ -342,6 +374,34 @@ export function mountGuestView(element, options) {
342
374
  lendFonts();
343
375
  element.appendChild(iframe);
344
376
  element.removeAttribute("aria-busy");
377
+ /*
378
+ * LOADED AGAIN, DRAWN AGAIN (Graview HQ feature:f-frame-guest-mark-after-move).
379
+ * Where the browser cannot move an element as it is (no `moveBefore`), a
380
+ * frame taken out of the page and put back — the one face taking in the
381
+ * page it is on — loads its page again from nothing, in a new window. Its
382
+ * mark comes off then, the frame busy again and the guest's session let
383
+ * go, and it is said again once the new page has drawn, or is silent past
384
+ * its time. Seen from what the page adds and takes away, and only where
385
+ * the frame's window is another.
386
+ */
387
+ let shown = iframe.contentWindow;
388
+ const unwatchReloads = watchReloads(document, () => {
389
+ const now = iframe.contentWindow;
390
+ if (now === shown)
391
+ return;
392
+ shown = now;
393
+ end();
394
+ handed = false;
395
+ waiting = false;
396
+ clearTimeout(quiet);
397
+ clearTimeout(silent);
398
+ iframe.removeAttribute("data-guest-view-drawn");
399
+ iframe.removeAttribute("data-guest-view-failed");
400
+ // A page loaded again starts as tall as it asks: what was held of the one before is not.
401
+ iframe.removeAttribute("data-guest-view-held");
402
+ iframe.setAttribute("aria-busy", "true");
403
+ silent = unready();
404
+ });
345
405
  return {
346
406
  iframe,
347
407
  update: push,
@@ -366,6 +426,8 @@ export function mountGuestView(element, options) {
366
426
  return false;
367
427
  }
368
428
  resting = { shelf, theme: look };
429
+ /* Told it is off the page (HQ f-kept-frame-told-off-page): its client pauses what it plays, and its code hears it. */
430
+ port?.postMessage({ type: "away", away: true });
369
431
  /* Nothing of it is in sight; what it said of its records stands for when it is. */
370
432
  recordBoxesMoved(iframe);
371
433
  live.rest({
@@ -395,6 +457,7 @@ export function mountGuestView(element, options) {
395
457
  was.shelf.remove();
396
458
  onto.removeAttribute("aria-busy");
397
459
  session.rest(undefined);
460
+ port?.postMessage({ type: "away", away: false });
398
461
  recordBoxesMoved(iframe);
399
462
  push();
400
463
  return true;
@@ -404,6 +467,7 @@ export function mountGuestView(element, options) {
404
467
  return stats;
405
468
  },
406
469
  dispose() {
470
+ unwatchReloads();
407
471
  end();
408
472
  clearTimeout(silent);
409
473
  clearTimeout(quiet);
@@ -1 +1 @@
1
- {"version":3,"file":"frame.js","sourceRoot":"","sources":["../../src/host/frame.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,cAAc,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACpI,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,EAAsF,MAAM,gBAAgB,CAAC;AAChL,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAA2F,MAAM,cAAc,CAAC;AAC5J,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAG7C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,cAAc,EAAE,UAAU,EAAmB,MAAM,YAAY,CAAC;AAErG,gIAAgI;AAChI,MAAM,aAAa,GAAG,cAAc,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC;AACpE,2GAA2G;AAC3G,MAAM,UAAU,GAAG,cAAc,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC;AAC9D,6HAA6H;AAC7H,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,CAAC;AAEnC;;;;;GAKG;AACH,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/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AAY;gBAAE,YAAY,CAAC,OAAO,GAAG,IAAI,CAAC;YAC9C,YAAY,CAAC,SAAS,CAAC,CAAC;YACxB,IAAI,CAAC,OAAO,EAAE,CAAC;YACf,YAAY,EAAE,CAAC;YACf,QAAQ,EAAE,OAAO,EAAE,CAAC;YACpB,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;YACjD,eAAe,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;YACnC,MAAM,CAAC,MAAM,EAAE,CAAC;YAChB,OAAO,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC;QAC1B,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"view-runtime.generated.d.ts","sourceRoot":"","sources":["../../src/host/view-runtime.generated.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,YAAY,EAAE,MAAw0sE,CAAC"}
1
+ {"version":3,"file":"view-runtime.generated.d.ts","sourceRoot":"","sources":["../../src/host/view-runtime.generated.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,YAAY,EAAE,MAA0ktE,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 Ce=globalThis,Ho=Ce.addEventListener,Uo=Ce.removeEventListener,Bo=Ce.postMessage,Vo=globalThis.queueMicrotask,On=globalThis.performance,Fo=On?On.now.bind(On):Date.now,Ie={listen:t=>Ho.call(Ce,\"message\",t),unlisten:t=>Uo.call(Ce,\"message\",t),post:t=>Bo.call(Ce,t),microtask:t=>Vo.call(globalThis,t),now:()=>Fo()};var v=Symbol(\"name\"),he=Symbol(\"prefix\"),ge=Symbol(\"value\"),O=Symbol(\"ns\"),$=Symbol(\"owner\"),D=Symbol(\"owner_document\"),ie=Symbol(\"attributes\"),L=Symbol(\"prev\"),y=Symbol(\"next\"),A=Symbol(\"child\"),W=Symbol(\"parent\"),ye=Symbol(\"host\"),J=Symbol(\"data\"),ve=Symbol(\"listeners\"),Rn=Symbol(\"isTrusted\"),ke=Symbol(\"path\"),De=Symbol(\"stop_immediate_propagation\"),Le=Symbol(\"dispatching\"),ue=Symbol(\"content\"),G=Symbol(\"hooks\"),bt=Symbol(\"extensions\"),Oe=Symbol(\"hooks_dispatch\"),j=Symbol(\"is_connected\"),Ge=Symbol(\"create_element\"),Tr=0,K=1,He=2,Ue=3,Be=8,Re=9,wr=10,Ee=11,P=\"http://www.w3.org/1999/xhtml\",ee=\"http://www.w3.org/2000/svg\",Sr=\"http://www.w3.org/XML/1998/namespace\",tt=\"http://www.w3.org/2000/xmlns/\";function Nt(t){return t.split(/[\\t\\n\\f\\r ]+/).filter(Boolean)}function V(t){return t.replace(/[A-Z]/g,e=>String.fromCharCode(e.charCodeAt(0)+32))}function xr(t){return t.replace(/[a-z]/g,e=>String.fromCharCode(e.charCodeAt(0)-32))}function C(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 vr=/^(?:[A-Za-z][^\\0\\t\\n\\f\\r\\u0020/>]*|[:_\\u0080-\\u{10FFFF}][A-Za-z0-9-.:_\\u0080-\\u{10FFFF}]*)$/u,Or=/[\\0\\t\\n\\f\\r />=]/u,jo=/[\\0\\t\\n\\f\\r />]/u;function de(t){if(t==null)return null;let e=String(t);return e===\"\"?null:e}function Rr(t){vr.test(t)||_n(t)}function An(t){(t===\"\"||Or.test(t))&&_n(t)}function Tt(t,e,n){let r=de(t),o=String(e),s=o.indexOf(\":\"),i=s<0?null:o.slice(0,s),l=s<0?o:o.slice(s+1);if((i!=null&&(i===\"\"||jo.test(i))||(n===\"element\"?!vr.test(l):l===\"\"||Or.test(l)))&&_n(o),i!=null&&r==null)throw C(`A namespace is required for the prefix in \"${o}\"`,\"NamespaceError\");if(i===\"xml\"&&r!==Sr)throw C(\"The xml prefix requires the XML namespace\",\"NamespaceError\");if((o===\"xmlns\"||i===\"xmlns\")&&r!==tt)throw C(\"The xmlns name requires the XMLNS namespace\",\"NamespaceError\");if(r===tt&&o!==\"xmlns\"&&i!==\"xmlns\")throw C(\"The XMLNS namespace requires the xmlns name or prefix\",\"NamespaceError\");return{namespace:r,qualifiedName:o,prefix:i,localName:l}}function _n(t){throw C(`Invalid name: \"${t}\"`,\"InvalidCharacterError\")}var wt=0,St=1,Ar=2,Pn=3,zo=typeof performance>\"u\"?Date.now:performance.now.bind(performance),z=class{static NONE=wt;static CAPTURING_PHASE=St;static AT_TARGET=Ar;static BUBBLING_PHASE=Pn;timeStamp=zo();target=null;currentTarget=null;srcElement=null;bubbles=!1;cancelable=!1;composed=!1;defaultPrevented=!1;cancelBubble=!1;eventPhase=wt;[ke]=[];[De]=!1;[Le]=!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[ke]]}stopPropagation(){this.cancelBubble=!0}stopImmediatePropagation(){this[De]=!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 Mn(t,e,n){if(t.cancelBubble)return;let o=e[ve]?.get(t.type)?.[n===St?\"capture\":\"bubble\"];if(o)for(let s of[...o]){if(!o.has(s)||s.signal?.aborted)continue;t.eventPhase=t.target===e?Ar:n,t.currentTarget=e;let i=s.normalizedListener;try{typeof i==\"object\"?i.handleEvent(t):i.call(e,t)}catch(l){setTimeout(qo,0,l)}if(t[De])break}}function qo(t){throw t}var nt=[],xt=new WeakMap;function vt(t,e){let n=xt.get(t);n?n.push(e):xt.set(t,[e]),nt[nt.length-1].push(t)}function q(t){let e=[];nt.push(e);let n;try{n=t()}catch(r){nt.pop();try{_r(e)}catch{}throw r}return nt.pop(),_r(e),n}function _r(t){let e,n=!1;for(let r of t){let o=xt.get(r);if(o){for(;o.length>0;){let s=o.shift();try{s()}catch(i){n||(e=i,n=!0)}}xt.delete(r)}}if(n)throw e}var Ot=[],rt=[],Cn=!1;function Ae(t){for(let e of t)Ot.push(e),e[1]&&rt.push(e[1]);if(!Cn){Cn=!0;try{let e,n=!1;for(let r=0;r<Ot.length;r++){let[o,s]=Ot[r];s&&rt.splice(rt.indexOf(s),1);try{o()}catch(i){n||(e=i,n=!0)}}if(n)throw e}finally{Ot.length=0,rt.length=0,Cn=!1}}}function ot(t){let e=t;for(;e;){if(rt.includes(e))return!0;e=e[W]??e[ye]}return!1}var st=Symbol(\"listenerRegistrations\"),be=class{[ve]=void 0;[st]=void 0;[D]=void 0;addEventListener(e,n,r){if(n==null)return;let o=r===!0||typeof r==\"object\"&&r.capture===!0,s=typeof r==\"object\"&&r.once===!0,i=typeof r==\"object\"?r.signal:void 0;if(i?.aborted)return;let l=In(o),u=this[st];u||(u=new Map,this[st]=u);let d=u.get(e);d||(d={},u.set(e,d));let p=d[l];if(p||(p=new Map,d[l]=p),p.has(n))return;let E=this,b={type:e,listener:n,capture:o,once:s,normalizedListener:n,signal:i};(s||i)&&(b.normalizedListener=function(...I){if(b.signal?.aborted){Rt(E,b);return}return b.once&&Rt(E,b),typeof b.listener==\"object\"?b.listener.handleEvent(...I):b.listener.call(this,...I)});let N=this[ve];N||(N=new Map,this[ve]=N);let R=N.get(e);R||(R={},N.set(e,R));let w=R[l];if(w||(w=new Set,R[l]=w),p.set(n,b),w.add(b),i){let S=()=>{Rt(E,b)};b.abortListener=S,i.addEventListener(\"abort\",S,{once:!0})}this[D]?.defaultView[Oe].addEventListener?.(this,e,n,r)}removeEventListener(e,n,r){return Yo.call(this,e,n,r)}dispatchEvent(e){if(e[Le])throw C(\"Failed to execute 'dispatchEvent' on 'EventTarget': The event is already being dispatched.\",\"InvalidStateError\");e[Le]=!0;try{let n=[],r=this;for(;r!=null;)n.push(r),r=r.parentNode;e.target=this,e.srcElement=this,e[ke]=n;for(let s=n.length;s--;)if(Mn(e,n[s],St),e.cancelBubble)return!e.defaultPrevented;let o=e.bubbles?n:n.slice(0,1);for(let s=0;s<o.length;s++)if(Mn(e,o[s],Pn),e.cancelBubble)return!e.defaultPrevented;return!e.defaultPrevented}finally{e[Le]=!1,e.cancelBubble=!1,e[De]=!1,e.eventPhase=wt,e.currentTarget=null,e[ke]=[]}}};function Yo(t,e,n){if(e==null)return;let r=n===!0||n&&n.capture===!0,o=In(!!r),s=this[st]?.get(t)?.[o]?.get(e);s&&Rt(this,s)}function In(t){return t?\"capture\":\"bubble\"}function Rt(t,e){let n=In(e.capture),r=t[st],o=r?.get(e.type);if(!o)return;let s=o[n];if(!s||s.get(e.listener)!==e)return;s.delete(e.listener),s.size===0&&delete o[n],!o.bubble&&!o.capture&&r?.delete(e.type),e.signal&&e.abortListener&&e.signal.removeEventListener(\"abort\",e.abortListener);let i=t[ve],l=i?.get(e.type);if(!l)return;let u=l[n];u?.delete(e)&&(u.size===0&&delete l[n],!l.bubble&&!l.capture&&i?.delete(e.type),t[D]?.defaultView[Oe].removeEventListener?.(t,e.type,e.listener,e.capture))}var te=class extends Array{item(e){return this[e]??null}};var at=0,Pr=1,Ln=2,Gn=3,lt=4,Mr=0,Cr=1,Pt=2,Mt=3,Ir=4,Dn=5,kr=6,Dr=7,At=/^(?:--|-?[A-Za-z_\\u0080-\\u{10FFFF}])[A-Za-z0-9_\\u0080-\\u{10FFFF}-]*$/u;function $o(t,e){let n=1,r=null;for(let o=e;o<t.length;o++){let s=t[o];if(r){s===\"\\\\\"?o++:s===r&&(r=null);continue}if(s==='\"'||s===\"'\")r=s;else if(s===\"(\")n++;else if(s===\")\"&&--n===0)return[t.slice(e,o),o+1]}return[t.slice(e),t.length]}function X(t){throw C(`Invalid or unsupported selector: \"${t}\"`,\"SyntaxError\")}function Ct(t,e){let n=typeof e==\"string\"?ct(e):[{combinator:lt,matchers:e}],r=null,o=t[A];return o&&n[0].matchers.length&&Hn(o,n,s=>(r=s,!1)),r}function It(t,e){let n=typeof e==\"string\"?ct(e):[{combinator:lt,matchers:e}],r=new te,o=t[A];return o&&n[0].matchers.length&&Hn(o,n,s=>{r.push(s)}),r}function ct(t,e=!1,n=!1){let r={combinator:lt,matchers:[]},o=[r],s=/[\\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,i=t.replace(/^[\\t\\n\\f\\r ]+|[\\t\\n\\f\\r ]+$/g,\"\");i===\"\"&&X(t);let l=0,u;for(;u=s.exec(i);){u.index!==l&&X(t),u[1]&&(r.matchers.length===0&&!(n&&o.length===1)&&X(t),u[1]===\">\"?r.combinator=Pr:u[1]===\"+\"?r.combinator=Gn:u[1]===\"~\"?r.combinator=Ln:r.combinator=at,r={combinator:lt,matchers:[]},o.push(r));let d=u[8]?V(u[8]):u[2]||u[7];u[7]!=null&&!u[6]&&r.matchers.length>0&&X(t);let E,b=u[4]??u[5]??u[7];if(u[2]){At.test(d)||X(t);let N=u[5],R=N?.[0];if(u[3]==null&&(R==='\"'||R===\"'\")){let w=u[0].lastIndexOf(N);b=i.slice(u.index+w+1),s.lastIndex=i.length}else N!=null&&!At.test(N)&&X(t);E=Ir}else u[6]?(At.test(d)||X(t),E=u[6]===\"#\"?Pt:Mt):u[8]?E=u[9]==null?Dn:kr:u[7]===\"*\"?E=Mr:u[7]&&At.test(u[7])?E=Cr:X(t);u[9]?([b,s.lastIndex]=$o(i,s.lastIndex),d!==\"has\"&&d!==\"not\"&&X(t),d===\"has\"&&e&&X(t),ct(b,e||d===\"has\",d===\"has\")):E===Dn&&X(t),r.matchers.push({type:E,name:d,value:b}),l=s.lastIndex}return(l!==i.length||r.matchers.length===0)&&X(t),o}function Wo(t,e){let n=ct(e);return n[0]?.matchers.length?it(t,n):!1}function Xo(t,e){let n=ct(e,!0,!0),r=n[0];if(n.length===1&&r.matchers.length===0)return!1;let o=at,s={type:Dr,name:\":scope\"};if(r.matchers.length===0?(o=r.combinator,r.matchers.push(s)):n.unshift({combinator:at,matchers:[s]}),n.some(({matchers:u})=>u.length===0))return!1;let i=o===Gn||o===Ln?t[y]:t[A];if(!i)return!1;let l=!1;return Hn(i,n,()=>(l=!0,!1),t),l}function Hn(t,e,n,r){let o=[],s=t;for(;s;){if(Y(s)){if(it(s,e,r)&&n(s)===!1)return!1;let i=s[A];if(i){let l=s[y];l&&o.push(l),s=i;continue}}s=s[y]??o.pop()??null}return!0}function it(t,e,n){let{combinator:r,matchers:o}=e[e.length-1];if(r===lt){if(!_t(t,o,n))return!1;let l=e.slice(0,-1);return l.length===0||it(t,l,n)}let s=r===Pr||r===at?W:L,i=t[s];if(!i)return!1;if(r===at||r===Ln){for(;i;){if(Y(i)&&_t(i,o,n)){let l=e.slice(0,-1);if(l.length===0||it(i,l,n))return!0}i=i[s]}return!1}else{if(r===Gn&&!Y(i)){for(;i&&!Y(i);)i=i[s];if(!i)return!1}if(!Y(i)||!_t(i,o,n))return!1;let l=e.slice(0,-1);return l.length===0||it(i,l,n)}}function kn(t,e){return t.getAttributeNS(null,t.namespaceURI===P?V(e):e)}function _t(t,e,n){if(!t)return!1;if(Array.isArray(e)){for(let i of e)if(_t(t,i,n)===!1)return!1;return!0}let{type:r,name:o,value:s}=e;switch(r){case Mr:return o===\"*\";case Cr:return t.namespaceURI===P?t.localName===V(o):t.localName===o;case Pt:return kn(t,\"id\")===o;case Mt:let i=kn(t,\"class\");return i?Nt(i).includes(o):!1;case Ir:let l=kn(t,o);return s==null?l!=null:l===s;case Dr:return t===n;case Dn:X(`:${o}`);case kr:switch(o){case\"has\":return Xo(t,s||\"\");case\"not\":return!Wo(t,s||\"\");default:X(`:${o}(${s})`)}}return!1}function Ko(t){return t.nodeType===He}function ut(t){return J in t}function Bn(t){return t.nodeType===Ue}function Zo(t){return t.nodeType===Be}function Y(t){return t.nodeType===K}function Un(t){return t.nodeType===Ee}function Ur(t){return\"appendChild\"in t}function kt(t){let e=[],n=[t],r=new Set(n),o=new Set,s;for(;n.length>0;){let i=n.pop();if(r.delete(i),o.has(i))continue;let l=[];for(let u of ft(i)){if(o.has(u)||(o.add(u),e.push(u),l.push(u),!Y(u)))continue;let d=u[ie];if(d)for(let E of d)o.has(E)||(o.add(E),e.push(E));let p=u[ue];p&&!o.has(p)&&!r.has(p)&&(r.add(p),n.push(p))}s??=l}return{nodes:e,treeNodes:s}}function dt(t,e){for(let n of t)n[D]=e}function Lr(t,e){let n=t.constructor,r=new n(t.name,t.value,t.namespaceURI);return r[D]=e,r}function Gr(t,e){if(Bn(t))return e.createTextNode(t.data);if(Zo(t))return e.createComment(t.data);if(Ko(t))return Lr(t,e);if(Y(t)){let n=e[Ge](t[v],t.namespaceURI,t[he],t.localName);if(t[ie])for(let r=0;r<t[ie].length;r++){let o=t[ie].item(r);n.attributes.setNamedItem(Lr(o,e))}return n}else{if(Un(t))return e.createDocumentFragment();{let n=new t.constructor;return n[D]=e,n}}}function Dt(t,e,n=t.ownerDocument){if(t.nodeType===Re)throw C(\"Cannot clone a document node\",\"NotSupportedError\");let r=Gr(t,n);if(!e||!Y(t)&&!Un(t))return r;let o=new Set([t]),s=[{source:t,destination:r,childIndex:0,cloningContent:!1}];for(;s.length>0;){let i=s[s.length-1],l,u;if(i.cloningContent)if(i.contentSource&&i.contentDestination)l=i.contentSource.childNodes[i.childIndex++],u=i.contentDestination;else{s.pop(),i.appendTo&&i.appendTo.appendChild(i.destination);continue}else if(l=i.source.childNodes[i.childIndex++],u=i.destination,!l){if(i.cloningContent=!0,i.childIndex=0,Y(i.source)&&i.source.namespaceURI===P&&i.source.localName===\"template\"){let p=i.source[ue];p&&(o.has(p)&&Hr(),o.add(p),i.contentSource=p,i.contentDestination=i.destination.content)}continue}if(!l){s.pop(),i.appendTo&&i.appendTo.appendChild(i.destination);continue}o.has(l)&&Hr(),o.add(l);let d=Gr(l,n);Y(l)||Un(l)?s.push({source:l,destination:d,appendTo:u,childIndex:0,cloningContent:!1}):u.appendChild(d)}return r}function Hr(){throw new Error(\"Cannot clone a cyclic or repeated node graph\")}function Lt(t,e){let n=String(e);return n===\"\"?null:Ct(t,[{type:Pt,name:n}])}function Gt(t,e){let n=[...new Set(Nt(String(e)))];return It(t,n.map(r=>({type:Mt,name:r})))}function Ht(t,e){let n=String(e),r=V(n),o=[];for(let s of Ut(t))Y(s)&&(n===\"*\"||(s.namespaceURI===P?s[v]===r:s[v]===n))&&o.push(s);return o}function Ut(t){let e=[],n=[],r=t[A];for(;r;){e.push(r);let o=r[A],s=r[y];o?(s&&n.push(s),r=o):r=s??n.pop()??null}return e}function ft(t){let e=Ut(t);return e.unshift(t),e}var ne=class extends be{nodeType=Tr;[v]=\"\";[W]=null;[ye]=null;[A]=null;[L]=null;[y]=null;[j]=!1;get[G](){return this[D].defaultView[Oe]}get localName(){return this[v]}get nodeName(){return this[v]}get ownerDocument(){return this[D]}get isConnected(){return this[j]}isDefaultNamespace(e){let n=de(e);return Qo(this)===n}get parentNode(){return this[W]}set parentNode(e){}get parentElement(){let e=this[W];return!e||e.nodeType!==1?null:e}set parentElement(e){}get previousSibling(){return this[L]}set previousSibling(e){}get nextSibling(){return this[y]}set nextSibling(e){}get previousElementSibling(){let e=this[L];for(;e&&e.nodeType!==1;)e=e[L];return e}set previousElementSibling(e){}get nextElementSibling(){let e=this[y];for(;e&&e.nodeType!==1;)e=e[y];return e}set nextElementSibling(e){}get firstChild(){return this[A]}set firstChild(e){}get lastChild(){let e=this[A];for(;e;){let n=e[y];if(n==null)break;e=n}return e}set lastChild(e){}get nodeValue(){return ut(this)?this.data:null}set nodeValue(e){ut(this)&&(this.data=e)}get textContent(){if(ut(this))return this.data;let e=\"\";for(let n of Ut(this))Bn(n)&&(e+=n.data);return e}set textContent(e){if(ut(this))this.data=e;else if(Ur(this)){let n=e==null?\"\":String(e);n===\"\"?this.replaceChildren():this.replaceChildren(n)}}cloneNode(e){return Dt(this,e)}contains(e){let n=e;for(;n!=null;){if(n===this)return!0;n=n.parentNode}return!1}};function Qo(t){let e=t;for(;e;)switch(e.nodeType){case K:{let n=e;if(n.prefix==null&&n.namespaceURI!=null)return n.namespaceURI;let r=n.attributes.getNamedItemNS(tt,\"xmlns\");if(r!=null&&r.prefix==null)return de(r.value);e=n.parentElement;break}case Re:e=e.documentElement;break;case wr:case Ee:return null;case He:e=e.ownerElement;break;default:e=e.parentElement}return null}var re=Symbol(\"insertNode\"),jn=Symbol(\"preflightInsertions\"),Bt=Symbol(\"replaceNode\"),Ne=class extends ne{remove(){let e=this.parentNode;e&&e.removeChild(this)}replaceWith(...e){let n=_e(e),r=this.parentNode;if(r)return Vn(o=>{fe(r,n);let s=this[y];for(;s&&n.includes(s);)s=s[y];let i=Fn(r,n,o);this.parentNode===r?r[Bt](i,this,o):r[re](i,s,o)})}before(...e){let n=_e(e),r=this.parentNode;if(r)return Vn(o=>{fe(r,n);let s=this[L];for(;s&&n.includes(s);)s=s[L];let i=Fn(r,n,o);r[re](i,s?s[y]:r.firstChild,o)})}after(...e){let n=_e(e),r=this.parentNode;if(r)return Vn(o=>{fe(r,n);let s=this[y];for(;s&&n.includes(s);)s=s[y];let i=Fn(r,n,o);r[re](i,s,o)})}};function Vn(t){return q(()=>{let e=[];try{t(e)}catch(n){try{Ae(e)}catch{}throw n}Ae(e)})}function _e(t){return t.map(e=>e instanceof ne?e:String(e))}function mt(t,e){return e instanceof ne?e:t.ownerDocument.createTextNode(String(e))}function fe(t,e){for(let n of e){if(!(n instanceof ne))continue;let r=t;for(;r;){if(r===n)throw C(\"Cannot insert a node into itself or one of its descendants\",\"HierarchyRequestError\");r=r[W]??r[ye]}}}function Fn(t,e,n){let r=[];for(let s of e)r.push(mt(t,s));if(r.length===1)return r[0];let o=t.ownerDocument.createDocumentFragment();o[jn](r);for(let s of r)o[re](s,null,n);return o}var Vt,zn=0,Br=0,Vr=0,Fr=0,Ve=!1,Yn=!1,pt=!1,Ft=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=Jo(n),o=Vt??=new WeakMap,s=o.get(e);s==null&&(s=new Map,o.set(e,s));let i=s.get(this);i==null?zn++:qn(i,-1),s.set(this,r),qn(r,1),this.#e.add(e)}disconnect(){let e=Vt;if(e!=null){for(let n of this.#e){let r=e.get(n),o=r?.get(this);o!=null&&(r.delete(this),zn--,qn(o,-1)),r?.size===0&&e.delete(n)}this.#e.clear(),this.#n.length=0,zn===0&&(Vt=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 oe(t){let e=Vt;if(e==null)return;let n=new Map,r=t.target;for(;r;){let o=e.get(r);if(o)for(let[s,i]of o){if(r!==t.target&&!i.subtree)continue;let l=!1;if(t.type===\"attributes\"){if(!i.attributes||i.attributeFilter&&!i.attributeFilter.has(t.attributeName??\"\"))continue;l=i.attributeOldValue}else if(t.type===\"characterData\"){if(!i.characterData)continue;l=i.characterDataOldValue}else if(!i.childList)continue;n.set(s,n.get(s)===!0||l)}r=r.parentNode}for(let[o,s]of n)o.enqueue({addedNodes:t.addedNodes??new te,attributeName:t.attributeName??null,attributeNamespace:t.attributeNamespace??null,nextSibling:t.nextSibling??null,oldValue:s?t.oldValue??null:null,previousSibling:t.previousSibling??null,removedNodes:t.removedNodes??new te,target:t.target,type:t.type})}function jt(...t){let e=new te;return e.push(...t),e}function Jo(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 qn(t,e){t.attributes&&(Br+=e),t.characterData&&(Vr+=e),t.childList&&(Fr+=e),Ve=Br>0,Yn=Vr>0,pt=Fr>0}var ae=class extends Ne{childNodes=new te;children=new te;appendChild(e){return q(()=>this[re](e,null))}insertBefore(e,n){return q(()=>this[re](e,n||null))}append(...e){return q(()=>{let n=_e(e.filter(r=>r!=null));n.length>1&&fe(this,n);for(let r of n)this[re](mt(this,r),null)})}prepend(...e){return q(()=>{let n=_e(e.filter(o=>o!=null));n.length>1&&fe(this,n);let r=this.firstChild;for(let o of n)this[re](mt(this,o),r)})}replaceChildren(...e){return q(()=>{let n=_e(e.filter(o=>o!=null));fe(this,n);let r;for(;r=this.firstChild;)this.removeChildImmediately(r);for(let o of n)this[re](mt(this,o),null)})}removeChild(e){return q(()=>(this.removeChildImmediately(e),e))}removeChildImmediately(e){if(e.parentNode!==this)throw C(\"The node is not a child of this node\",\"NotFoundError\");let n=this[j]?ft(e):void 0,r=e[L],o=e[y],s=zt(this,e);if(n)for(let i of n)i[j]=!1;this.queueRemovalMutationRecord(this,e,r,o),n&&this.enqueueTreeReactions(n,\"disconnectedCallback\"),Ae(this.collectRemovalHookEffects(e,s))}replaceChild(e,n){return q(()=>this[Bt](e,n))}[Bt](e,n,r){if(fe(this,[e]),n.parentNode!==this)throw C(\"The reference node is not a child of this parent\",\"NotFoundError\");let o=n[L],s=n[y],i=this.prepareInsertion(e),l=this[j]?ft(n):void 0,u=new Set(i.map(({node:b})=>b)),d=s;for(;d&&u.has(d);)d=d[y];let p=zt(this,n);if(l){for(let N of l)N[j]=!1;let b=new Set(l);for(let N of i)b.has(N.node)&&(N.shouldDisconnect=!1)}this.commitInsertion(i,d);let E=this[j];return this.queueRemovalMutationRecord(this,n,o,s),this.queueInsertionMutationRecords(i),l&&this.enqueueTreeReactions(l,\"disconnectedCallback\"),this.enqueueInsertionReactions(i,E),this.performOrCollectHookEffects([...this.collectRemovalHookEffects(n,p),...this.collectInsertionHookEffects(i)],r),n}querySelectorAll(e){return It(this,e)}querySelector(e){return Ct(this,e)}[re](e,n,r){return this.validateInsertion(e,n),this.insertIntoValidated(e,n,r),e}[jn](e){for(let n of e)this.validateInsertion(n,null),this.prepareInsertion(n)}validateInsertion(e,n){if(fe(this,[e]),n&&n.parentNode!==this)throw C(\"The reference node is not a child of this parent\",\"NotFoundError\")}insertIntoValidated(e,n,r){e===n&&(n=e[y]);let o=this.prepareInsertion(e);this.commitInsertion(o,n);let s=this[j];this.queueInsertionMutationRecords(o),this.enqueueInsertionReactions(o,s),this.performOrCollectHookEffects(this.collectInsertionHookEffects(o),r)}performOrCollectHookEffects(e,n){n?n.push(...e):Ae(e)}prepareInsertion(e){let n=[];if(e.nodeType===Ee){let i=e[A];for(;i;)n.push(i),i=i[y]}else n.push(e);let r=this[j],o=this[D],s=[];for(let i of n){let l=i[j],u=l||r,d,p;if(i[D]===o)u&&(d=ft(i));else{let E=kt(i);p=E.nodes,u&&(d=E.treeNodes)}s.push({node:i,nodes:d,adoption:p,shouldDisconnect:l})}return s}commitInsertion(e,n){for(let s of e){let i=s.node[W];if(i){let l=s.node[L],u=s.node[y];s.source={parent:i,index:zt(i,s.node),previousSibling:l,nextSibling:u}}}for(let s of e){let i=this.attachChild(s.node,n);s.insertIndex=i.index,s.previousSibling=i.previousSibling,s.nextSibling=i.nextSibling}let r=this[D];for(let{adoption:s}of e)s&&dt(s,r);let o=this[j];for(let{nodes:s}of e)if(s)for(let i of s)i[j]=o}attachChild(e,n){if(n){let s=n[L];e[y]=n,e[L]=s,s?s[y]=e:this[A]=e,n[L]=e}else{e[y]=null;let s=this[A];if(s){let i;for(;i=s[y];)s=i;s[y]=e,e[L]=s}else this[A]=e,e[L]=null}let r=Y(e);e[W]=this;let o;if(n){if(o=this.childNodes.indexOf(n),this.childNodes.splice(o,0,e),r){let s=n;for(;s&&!Y(s);)s=s[y];s?this.children.splice(this.children.indexOf(s),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[L],nextSibling:e[y]}}queueRemovalMutationRecord(e,n,r,o){pt&&oe({type:\"childList\",target:e,removedNodes:jt(n),previousSibling:r,nextSibling:o})}queueInsertionMutationRecords(e){if(pt)for(let n of e){let{node:r,source:o}=n;o&&this.queueRemovalMutationRecord(o.parent,r,o.previousSibling,o.nextSibling),oe({type:\"childList\",target:this,addedNodes:jt(r),previousSibling:n.previousSibling,nextSibling:n.nextSibling})}}collectRemovalHookEffects(e,n){return this.nodeType!==K||ot(this)?[]:[[()=>this[G].removeChild?.(this,e,n)]]}collectInsertionHookEffects(e){let n=[];for(let r of e){let{node:o,source:s}=r;s?.parent.nodeType===K&&!ot(s.parent)&&n.push([()=>s.parent[G].removeChild?.(s.parent,o,s.index)]),this.nodeType===K&&!ot(this)&&n.push([()=>this[G].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){zr(e,n)}};function jr(t,e,n,r){if(e.parentNode!==t)throw Error(\"not a child of this node\");let o=t[j]?n.treeNodes:void 0,s=e[L],i=e[y],l=zt(t,e);if(o)for(let d of o)d[j]=!1;dt(n.nodes,r),pt&&oe({type:\"childList\",target:t,removedNodes:jt(e),previousSibling:s,nextSibling:i}),o&&zr(o,\"disconnectedCallback\");let u=[];t.nodeType===K&&!ot(t)&&u.push([()=>t[G].removeChild?.(t,e,l)]),Ae(u)}function zt(t,e){let n=e[L],r=e[y];n?n[y]=r:t[A]=r,r&&(r[L]=n);let o=t.childNodes.indexOf(e);return t.childNodes.splice(o,1),Y(e)&&t.children.splice(t.children.indexOf(e),1),e[W]=null,e[y]=null,e[L]=null,o}function zr(t,e){for(let n of t){let r=n[e];typeof r==\"function\"&&vt(n,()=>r.call(n))}}function ht(t,e,n,r,o){let{observedAttributes:s}=t.constructor,{attributeChangedCallback:i}=t;i==null||s==null||!s.includes(e)||vt(t,()=>i.call(t,e,n,r,o))}var qt=class{[A]=null;constructor(e){this[$]=e}getNamedItem(e){let n=String(e),r=this[$][O]===P?V(n):n,o=this[A];for(;o;){if(o.name===r)return o;o=o[y]}return null}getNamedItemNS(e,n){let r=de(e),o=String(n),s=this[A];for(;s;){if(s.localName===o&&s[O]===r)return s;s=s[y]}return null}item(e){let n=this[A],r=0;for(;n;){if(r++===e)return n;n=n[y]}return null}get length(){let e=0,n=this[A];for(;n;)e++,n=n[y];return e}removeNamedItem(e){let n=String(e),r=this[$][O]===P?V(n):n;return q(()=>this.removeNamedItemImmediately(o=>o.name===r))}removeNamedItemNS(e,n){let r=de(e),o=String(n);return q(()=>this.removeNamedItemImmediately(s=>s.localName===o&&s[O]===r))}removeNamedItemImmediately(e){let n=this[$],r=this[A],o=null;for(;r!=null;){if(e(r)){o&&(o[y]=r[y]),this[A]===r&&(this[A]=r[y]);let s=r.value;return r[y]=null,r[$]=null,Ve&&oe({type:\"attributes\",target:n,attributeName:r.name,attributeNamespace:r[O],oldValue:s}),n[G].removeAttribute?.(n,r.name,r[O]),ht(n,r.localName,s,null,r[O]),r}o=r,r=r[y]}return null}setNamedItem(e){return q(()=>this.setNamedItemImmediately(e))}setNamedItemImmediately(e){let n=this[$],r=e[$];if(r!=null&&r!==n)throw C(\"The attribute is already in use by another element.\",\"InUseAttributeError\");let o=null,s=this[A],i=null;for(;s;){if(s.localName===e.localName&&s[O]===e[O]){if(s===e)return s;i?i[y]=e:this[A]=e,e[y]=s[y],s[y]=null,o=s;break}i=s,s=s[y]}o==null&&(i?i[y]=e:this[A]=e),e[$]=n,e[D]=n[D],o&&(o[$]=null);let l=o==null||o.value!==e.value,u=o!=null&&o.name!==e.name;return l&&Ve&&oe({type:\"attributes\",target:n,attributeName:e.name,attributeNamespace:e[O],oldValue:o?.value??null}),u&&n[G].removeAttribute?.(n,o.name,o[O]),(l||u)&&n[G].setAttribute?.(n,e.name,e.value,e[O]),l&&ht(n,e.localName,o?.value??null,e.value,e[O]),o}setNamedItemNS(e){return this.setNamedItem(e)}*[Symbol.iterator](){let e=this[A];for(;e;)yield e,e=e[y]}};var Pe=class extends ne{nodeType=He;[O]=null;[y]=null;[$]=null;constructor(e,n,r){super(),this[v]=e,this[ge]=n,r&&(this[O]=r)}get nodeName(){return this[v]}set nodeName(e){}get name(){return this[v]}set name(e){}get localName(){if(this[O]==null)return this[v];let e=this[v].indexOf(\":\");return e<0?this[v]:this[v].slice(e+1)}get prefix(){if(this[O]==null)return null;let e=this[v].indexOf(\":\");return e<0?null:this[v].slice(0,e)}get value(){return this[ge]}set value(e){let n=String(e),r=this[$];if(!r){this[ge]=n;return}q(()=>{let o=this[ge];this[ge]=n,Ve&&o!==n&&oe({type:\"attributes\",target:r,attributeName:this[v],attributeNamespace:this[O],oldValue:o}),this[G].setAttribute?.(r,this[v],n,this[O]),ht(r,this.localName,o,n,this[O])})}get nodeValue(){return this.value}set nodeValue(e){this.value=e}get ownerElement(){return this[$]}get namespaceURI(){return this[O]}get specified(){return!0}};var es={amp:\"&\",AMP:\"&\",apos:\"'\",gt:\">\",GT:\">\",lt:\"<\",LT:\"<\",quot:'\"',QUOT:'\"'},ts=new Set([\"area\",\"base\",\"br\",\"col\",\"embed\",\"hr\",\"img\",\"input\",\"link\",\"meta\",\"param\",\"source\",\"track\",\"wbr\"]),ns=/(?:<([a-z][a-z0-9-:]*)((?:[\\s]+[^<>'\"=/\\s]+(?:=(['\"])[^]*?\\3|=[^>'\"\\s]*|))*)[\\s]*(\\/?)\\s*>|<\\/([a-z][a-z0-9-:]*)>|<!--(.*?)-->|([^<>]+))/gi,$r=/\\s([^<>'\"=/\\n\\s]+)(?:=([\"'])([\\s\\S]*?)\\2|=([^>'\"\\n\\s]*)|)/g,rs=\"|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|\",os=/^(?:color|face|size)$/i;function qr(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 es[n];let s=Number.parseInt(r??o,r?10:16);try{return String.fromCodePoint(s)}catch{return e}})}function Wr(t){return t.namespaceURI===P&&ts.has(t.localName)}function Yr(t){let e=t.localName;return t[O]===ee&&(e===\"foreignObject\"||e===\"desc\"||e===\"title\")}function ss(t,e){if(rs.includes(`|${t}|`))return!0;if(t!==\"font\")return!1;for(let n of e.matchAll($r))if(os.test(n[1]))return!0;return!1}function Yt(t,e){let n=e.ownerDocument,r=n.createDocumentFragment(),o=[],s=r;for(let i of t.matchAll(ns)){let l=i[1];if(l){let u=i[2],d=V(l),p=o[o.length-1]?.element??e,E=p[O]===ee?ee:P;if(d===\"svg\")E=ee;else if(E===ee){if(Yr(p))E=P;else if(ss(d,u)){for(;o.length>0;){let R=o[o.length-1];if(R.element[O]!==ee||Yr(R.element))break;o.pop(),s=R.target}E=P}}let b=E===P?d:l,N=n[Ge](b,E,null,b);for(let R of u.matchAll($r))N.setAttribute(R[1],qr(R[3]||R[4]||\"\"));if(s.append(N),Wr(N)||E!==P&&i[4])continue;o.push({element:N,target:s}),s=E===P&&d===\"template\"?N.content:N}else if(i[5]){let u=V(i[5]);for(let d=o.length-1;d>=0;d--){let p=o[d],E=V(p.element[v]);if(E===u){s=p.target,o.length=d;break}if(p.element[O]===P&&E===\"template\")break}}else i[6]?s.append(n.createComment(i[6])):s.append(qr(i[7]))}return r}function $t(t){return Kr([{type:\"content\",child:t[A]}])}function Xr(t){return Kr([{type:\"opening\",node:t}])}function Kr(t){let e=[],n;for(;n=t.pop();)switch(n.type){case\"opening\":{let r=n.node;switch(r.nodeType){case K:{let o=r;e.push(`<${o[v]}`);let s=o[ie]?.[A];for(;s;){e.push(` ${s[v]}`);let l=s[ge];l!==\"\"&&(l=String(l).replace(/&/g,\"&amp;\").replace(/\"/g,\"&quot;\"),e.push(`=\"${l}\"`)),s=s[y]}if(e.push(\">\"),Wr(o))break;let i=o.namespaceURI===P&&o.localName===\"template\"?o[ue]:o;t.push({type:\"closing\",name:o[v]}),t.push({type:\"content\",child:i?.[A]??null});break}case Ue:{let o=r;e.push(o[J].replace(/&/g,\"&amp;\").replace(/\"/g,\"&quot;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\"));break}case Be:{let o=r;e.push(`<!--${o[J]}-->`);break}}break}case\"content\":{let r=n.child;r&&(t.push({type:\"content\",child:r[y]}),t.push({type:\"opening\",node:r}));break}case\"closing\":e.push(`</${n.name}>`);break}return e.join(\"\")}var F=class extends ae{nodeType=K;[O]=P;[he]=null;get namespaceURI(){return this[O]}get prefix(){return this[he]}get localName(){let e=this[he];return e==null?this[v]:this[v].slice(e.length+1)}get nodeName(){return this[O]===P?xr(this[v]):this[v]}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 Pe(\"slot\",n))}get attributes(){let e=this[ie];return e||(e=new qt(this),this[ie]=e),e}getAttributeNames(){return[...this.attributes].map(e=>e.name)}getElementsByTagName(e){return Ht(this,e)}get firstElementChild(){return this.children[0]??null}getElementsByClassName(e){return Gt(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);An(r);let s=this[O]===P?V(r):r,i=this.attributes.getNamedItemNS(null,s);i?i.value=o:this.attributes.setNamedItem(new Pe(s,o))}setAttributeNS(e,n,r){let o=de(e),s=String(n),i=String(r),l=Tt(o,s,\"attribute\"),u=this.attributes.getNamedItemNS(l.namespace,l.localName);u?u.value=i:this.attributes.setNamedItemNS(new Pe(l.qualifiedName,i,l.namespace))}toggleAttribute(e,n){let r=String(e);An(r);let o=this[O]===P?V(r):r,s=this.attributes.getNamedItemNS(null,o),i=n===void 0?void 0:!!n;return s==null?i===!1?!1:(this.attributes.setNamedItem(new Pe(o,\"\")),!0):i===!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[O]===P?V(n):n;this.attributes.removeNamedItemNS(null,r)}removeAttributeNS(e,n){this.attributes.removeNamedItemNS(e,n)}get outerHTML(){return Xr(this)}get innerHTML(){return $t(this)}set innerHTML(e){if(e==null||e===\"\")this.replaceChildren();else{let n=Yt(String(e),this);this.replaceChildren(n)}}};var Fe=class t extends F{[O]=ee;get ownerSVGElement(){let e=null,n=this.parentNode;for(;n instanceof t;)e=n,n=n.parentNode;return e}};var Te=class extends Ne{[J]=\"\";constructor(e){super(),this[J]=e==null?\"\":String(e)}setData(e){let n=Yn,r=n?this[J]:null,o=\"\";e!=null&&(o=typeof e==\"string\"?e:String(e)),this[J]=o,n&&r!==o&&oe({type:\"characterData\",target:this,oldValue:r}),this[G].setText?.(this,o)}get data(){return this[J]}set data(e){this.setData(e)}};var je=class extends Te{nodeType=Ue;[v]=\"#text\"};var ze=class extends Te{nodeType=Be;[v]=\"#comment\"};var qe=class extends ae{nodeType=Ee;[v]=\"#document-fragment\";[D]=typeof window<\"u\"?window.document:null;getElementById(e){return Lt(this,e)}};var Ye=class extends F{get content(){let e=this[ue];return e||(e=this.ownerDocument.createDocumentFragment(),e[ye]=this,this[ue]=e),e}set content(e){}set innerHTML(e){this.content.replaceChildren(Yt(String(e),this))}get innerHTML(){let e=this[ue];return e?$t(e):\"\"}};var Wt=class extends F{};var Xt=class extends F{};var Kt=class extends F{};var gt=class extends ae{nodeType=Re;[v]=\"#document\";[j]=!0;constructor(e){super(),this.defaultView=e,this[D]=this,this.documentElement=Qt(new Kt,this,\"html\"),this.body=Qt(new Wt,this,\"body\"),this.head=Qt(new Xt,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 Gt(this,e)}createElement(e){let n=String(e);return Rr(n),$n(this,V(n))}createElementNS(e,n){let r=Tt(e,n,\"element\");return $n(this,r.qualifiedName,r.namespace,r.prefix,r.localName)}[Ge](e,n,r,o){return $n(this,e,n,r,o)}createTextNode(e){let n=Zt(new je(e),this);return this[G].createText?.(n,n.data),n}createComment(e){return Zt(new ze(e),this)}createDocumentFragment(){return Zt(new qe,this)}createEvent(){return new z(\"\")}getElementById(e){return Lt(this,e)}getElementsByTagName(e){return Ht(this,e)}importNode(e,n){if(e.nodeType===Re)throw C(\"Cannot import a document node\",\"NotSupportedError\");return Dt(e,n,this)}adoptNode(e){if(e[D]===this)return e;let n=kt(e);return q(()=>{let r=e.parentNode;return r?jr(r,e,n,this):dt(n.nodes,this),e})}};function Zt(t,e){return Object.defineProperty(t,D,{value:e,writable:!0,enumerable:!1}),t}function $n(t,e,n=P,r=null,o=e){let s;if(n===ee)s=new Fe;else if(n===P&&o===\"template\")s=new Ye;else if(n===P){let i=t.defaultView.customElements.get(o);s=i?new i:new F}else s=new F;return Qt(s,t,e,n,r)}function Qt(t,e,n,r=P,o=null){return Zt(t,e),Object.defineProperties(t,{[v]:{value:n},[O]:{value:r},[he]:{value:o}}),e[G].createElement?.(t,r),t}var Jt=class extends z{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 en=class extends z{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 tn=class extends z{constructor(e,n){super(e,n),this.promise=n.promise,this.reason=n.reason}};var nn=class extends z{constructor(e,n){super(e,n),this.oldState=n.oldState,this.newState=n.newState}};var rn=class extends z{constructor(e,n={}){super(e,n),this.relatedTarget=n.relatedTarget??null}};var on=class extends z{constructor(e,n={}){super(e,n),this.clipboardData=n.clipboardData??null}};var sn=class extends F{};var is=/^[a-z][^A-Z\\u0000\\t\\n\\f\\r />]*-[^A-Z\\u0000\\t\\n\\f\\r />]*$/u,as=new Set([\"annotation-xml\",\"color-profile\",\"font-face\",\"font-face-src\",\"font-face-uri\",\"font-face-format\",\"font-face-name\",\"missing-glyph\"]);function Zr(t){return is.test(t)&&!as.has(t)}function Qr(t){return C(`Invalid custom element name: \"${t}\"`,\"SyntaxError\")}var an=class{registry=new Map;listenersByName=new Map;define(e,n,r){if(!Zr(e))throw Qr(e);if(this.registry.has(e))throw C(`A custom element named \"${e}\" has already been defined`,\"NotSupportedError\");if(this.getName(n)!=null)throw C(\"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 s of o)s(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(!Zr(e))return Promise.reject(Qr(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 ls=[\"onerror\",\"onunhandledrejection\"],eo=Symbol.for(\"@remote-dom/polyfill/global-property\");function to(t){return Object.getOwnPropertyDescriptors(t)}function no(t){let e={};for(let[n,r]of Object.entries(Object.getOwnPropertyDescriptors(be.prototype)))n!==\"constructor\"&&typeof r.value==\"function\"&&(r.value=Wn(r.value.bind(t)),e[n]=r);return e}function ro(t){let e={};for(let n of ls)e[n]={configurable:!0,enumerable:!0,get:Wn(()=>t[n]),set:Wn(r=>{t[n]=r})};return e}function cs(t){return Object.assign(to(t),no(t),ro(t))}function Wn(t){return Object.defineProperty(t,eo,{value:!0}),t}function Jr(t,e){for(let n of Reflect.ownKeys(e)){let r=us(t,n);(r==null||ds(r))&&Object.defineProperty(t,n,e[n])}}function us(t,e){let n=t;for(;n;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function ds(t){return[t.value,t.get,t.set].some(e=>typeof e==\"function\"&&e[eo]===!0)}var Me=class extends be{[G]={};[bt]=[];[Oe]=ms(this);name=\"\";window=this;parent=this;self=this;top=this;document=new gt(this);customElements=new an;location=globalThis.location;navigator=globalThis.navigator;Event=z;ErrorEvent=en;PromiseRejectionEvent=tn;ToggleEvent=nn;FocusEvent=rn;ClipboardEvent=on;EventTarget=be;CustomEvent=Jt;Node=ne;ParentNode=ae;ChildNode=Ne;DocumentFragment=qe;Document=gt;CharacterData=Te;Comment=ze;Text=je;Element=F;HTMLElement=sn;SVGElement=Fe;HTMLTemplateElement=Ye;MutationObserver=Ft;#t=null;#n=null;#e=null;static with(...e){let n=this;return class extends n{constructor(){super();for(let o of e)fs(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=to(e),s=Object.assign(no(e),ro(e));delete o.self,Object.defineProperties(globalThis,o),Jr(globalThis,s),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),Jr(n,s))}static setGlobalThis(e){for(let n in e)e[n]===e&&(e[n]=globalThis);Object.defineProperties(globalThis,cs(e))}};function fs(t,e){t[bt].push(e(t)??{})}function ms(t){return{createElement:me.bind(null,t,\"createElement\"),setAttribute:me.bind(null,t,\"setAttribute\"),removeAttribute:me.bind(null,t,\"removeAttribute\"),createText:me.bind(null,t,\"createText\"),setText:me.bind(null,t,\"setText\"),insertChild:me.bind(null,t,\"insertChild\"),removeChild:me.bind(null,t,\"removeChild\"),addEventListener:me.bind(null,t,\"addEventListener\"),removeEventListener:me.bind(null,t,\"removeEventListener\")}}function me(t,e,...n){for(let s of t[bt])s[e]?.apply(s,n);let r=t[G];r[e]?.apply(r,n)}var ln=new Me;var Xn=\"~\";var we=new WeakMap;function $e(t){return we.get(t)}var Jn=new WeakMap,hs=0;function Z(t){let e=Jn.get(t);return e==null&&(e=String(hs++),cn(t,e)),e}function cn(t,e){Jn.set(t,e)}var Zn=new WeakMap;function gs(t){return Zn.get(t)}var Qn=new WeakMap;function ys(t){let e=Qn.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 Es=new WeakMap;function bs(t){return Es.get(t)}function er(t,e,n){let r=Zn.get(t);if(r==null&&(r={},Zn.set(t,r)),r[e]===n)return;r[e]=n;let o=we.get(t);o?.mutate([[3,Z(t),e,n,1]])}function Se(t,e,n){let r=Qn.get(t);if(r==null&&(r={},Qn.set(t,r)),r[e]===n)return;n==null?delete r[e]:r[e]=String(n);let o=we.get(t);o?.mutate([[3,Z(t),e,n,2]])}function We(t,e){if(we.get(t)!==e&&(we.set(t,e),t.childNodes))for(let r=0;r<t.childNodes.length;r++)We(t.childNodes[r],e)}function un(t){if(we.get(t)!=null&&(we.delete(t),t.childNodes))for(let n=0;n<t.childNodes.length;n++)un(t.childNodes[n])}function Xe(t){let{nodeType:e}=t;switch(e){case 1:return{id:Z(t),type:e,element:t.localName,properties:Kn(gs(t)),attributes:Kn(ys(t)),eventListeners:Kn(bs(t)),children:Array.from(t.childNodes).map(Xe)};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 Kn(t){return t?{...t}:void 0}function tr(t,e,...n){let r=Jn.get(t),o=we.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 Ke=ln[G];Ke.insertChild=(t,e,n)=>{let r=$e(t);r!=null&&(We(e,r),r.mutate([[0,Z(t),Xe(e),n]]))};Ke.removeChild=(t,e,n)=>{let r=$e(t);r!=null&&(un(e),r.mutate([[1,Z(t),n]]))};Ke.setText=(t,e)=>{let n=$e(t);n?.mutate([[2,Z(t),e]])};Ke.setAttribute=(t,e,n)=>{t.tagName.includes(\"-\")||Se(t,e,n)};Ke.removeAttribute=(t,e)=>{t.tagName.includes(\"-\")||Se(t,e)};Me.setGlobal(ln);function dn(t){if(typeof t==\"string\")return{type:\"navigate\",to:t};let{place:e,record:n,where:r,section:o}=t??{},s={...r===void 0?{}:{where:r},...o===void 0?{}:{section:String(o)}};return typeof e==\"string\"?{type:\"navigate\",place:e,...s}:typeof n==\"string\"?{type:\"navigate\",to:n,...s}:void 0}var so=[\"wheel\",\"drag\",\"pinch\"];function io(t){let e=t;return typeof t==\"object\"&&t!==null&&e.graview===\"host-hello\"&&typeof e.nonce==\"string\"}function lo(t,e={}){let n,r=\"\",o,s=0,i=new Set,l=new Map,u=[],d=w=>{n?n.postMessage({...w,nonce:r}):u.push(w)},p=w=>{let S=w.data;if(!(!S||typeof S!=\"object\")){if(S.type===\"props\"){o=S.props;for(let I of i)I(S.props)}else S.type===\"answer\"?(l.get(S.id)?.(S),l.delete(S.id)):S.type===\"event\"&&typeof S.listener==\"number\"?e.onEvent?.(S):S.type===\"heartbeat\"&&typeof S.beat==\"number\"&&d({type:\"heartbeat\",beat:S.beat});e.onMessage?.(S)}},E=()=>{},b=w=>{if(n||!t.fromHost(w)||!io(w.data)||w.data.protocol!==1)return;let S=w.ports[0];if(S){n=S,r=w.data.nonce,n.onmessage=p,n.start?.(),E();for(let I of u.splice(0))d(I)}};E=t.listen(b),t.ready({graview:\"guest-ready\",protocol:1});let N,R={get props(){return o},subscribe(w){return i.add(w),()=>i.delete(w)},act(w,S={}){let I=s+=1;return new Promise(k=>{l.set(I,k),d({type:\"act\",id:I,name:w,args:S})})},navigate(w){let S=dn(w);S&&d(S)},size(w){d({type:\"size\",height:w})},autoSize(w){let S=w??globalThis.document?.documentElement,I=globalThis.ResizeObserver;if(!S||!I||typeof S.getBoundingClientRect!=\"function\")return()=>{};N?.disconnect();let k=new I(()=>R.size(Math.ceil(S.getBoundingClientRect().height)));return k.observe(S),N=k,()=>k.disconnect()},close(){N?.disconnect(),E(),n?.close(),i.clear()}};return{guest:R,send:d}}var uo=[\"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\"],fo=[\"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\"],mo=[\"self\",\"postMessage\",\"setTimeout\",\"clearTimeout\",\"setInterval\",\"clearInterval\",\"queueMicrotask\",\"structuredClone\",\"crypto\",\"console\",\"DOMException\"],po=[\"TEMPORARY\",\"PERSISTENT\"],Zl=Object.freeze([...uo,...fo,...mo,...po]),Ql=Object.freeze([\"constructor\",\"__defineGetter__\",\"__defineSetter__\",\"hasOwnProperty\",\"__lookupGetter__\",\"__lookupSetter__\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"toString\",\"valueOf\",\"__proto__\",\"toLocaleString\"]),co=t=>typeof t==\"symbol\"?`[${t.description??\"symbol\"}]`:t;function ho(t=globalThis,e=[],n={}){let r=[],o=[],s=new Set([...uo,...fo,...mo,...e,\"constructor\",Symbol.toStringTag]),i=(x,M)=>{let H=Reflect.getOwnPropertyDescriptor(x,M);return H===void 0||!(\"value\"in H)||H.writable||H.configurable?!1:n.primitivesStay&&typeof M==\"symbol\"&&(typeof H.value!=\"object\"||H.value===null)&&typeof H.value!=\"function\"?!0:po.includes(M)&&typeof H.value==\"number\"},l=t,u=l.setTimeout,d=l.setInterval,p=l.crypto,E=(x,M)=>function(H,Ze,...Qe){if(typeof H!=\"function\")throw new TypeError(`${M} takes a function: a guest view cannot run code from text`);return x.call(t,H,Ze,...Qe)},b=p?Object.freeze({getRandomValues:x=>p.getRandomValues(x)}):void 0,N=l.document?.defaultView;if(N&&N!==l)for(let x of Reflect.ownKeys(N))typeof x==\"symbol\"||s.has(x)||Reflect.deleteProperty(N,x)||o.push(`window.${x}`);let R=[];for(let x=t;x&&x!==Object.prototype;x=Object.getPrototypeOf(x))R.push(x);for(let x of R)for(let M of Reflect.ownKeys(x))s.has(M)||(Reflect.deleteProperty(x,M)?r.push(co(M)):i(x,M)||o.push(co(M)));let w=()=>function(){throw new EvalError(\"A guest view cannot make code from text.\")},S=[Function.prototype,Object.getPrototypeOf(async function(){}),Object.getPrototypeOf(function*(){}),Object.getPrototypeOf(async function*(){})];for(let x of S){let M=w();Object.defineProperty(M,\"prototype\",{value:x,writable:!1,enumerable:!1,configurable:!1}),Reflect.defineProperty(x,\"constructor\",{value:M,writable:!1,enumerable:!1,configurable:!1})||o.push(\"Function.prototype.constructor\"),x===Function.prototype&&Reflect.defineProperty(t,\"Function\",{value:M,writable:!0,enumerable:!1,configurable:!0})}let I=(x,M)=>{Reflect.defineProperty(t,x,{value:M,writable:!0,enumerable:!0,configurable:!0})||o.push(x)};I(\"setTimeout\",E(u,\"setTimeout\")),I(\"setInterval\",E(d,\"setInterval\")),b&&I(\"crypto\",b);for(let x of R.slice(1))Object.freeze(x);for(let x of Reflect.ownKeys(t)){let M=Reflect.getOwnPropertyDescriptor(t,x);Reflect.defineProperty(t,x,\"value\"in M?{...M,writable:!1,configurable:!1}:{...M,configurable:!1})}let k;try{k=Reflect.preventExtensions(t)}catch{k=!1}return{removed:r,stuck:o,sealed:k}}var yt=class extends HTMLElement{constructor(){super(),cn(this,Xn)}connect(e){if($e(this)===e||(We(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,Xn,Xe(o),r])}e.mutate(n)}updateRemoteProperty(e,n){er(this,e,n)}callRemoteMethod(e,...n){return tr(this,e,...n)}};var m={},nr={empty:!0},Ns={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\"},rr={div:m,section:m,article:m,aside:m,header:m,footer:m,nav:m,hgroup:m,search:m,address:m,figure:m,figcaption:m,blockquote:m,p:m,pre:m,hr:nr,br:nr,wbr:nr,h1:m,h2:m,h3:m,h4:m,h5:m,h6:m,span:m,strong:m,em:m,b:m,i:m,u:m,s:m,small:m,mark:m,abbr:m,cite:m,q:m,code:m,kbd:m,samp:m,var:m,sub:m,sup:m,dfn:m,bdi:m,bdo:m,ruby:m,rt:m,rp:m,time:{attributes:{datetime:\"text\"}},data:{attributes:{value:\"text\"}},del:{attributes:{datetime:\"text\"}},ins:{attributes:{datetime:\"text\"}},a:{attributes:{href:\"link\"}},ul:m,menu:m,dl:m,dt:m,dd:m,ol:{attributes:{start:\"number\",reversed:\"boolean\",type:{oneOf:[\"1\",\"a\",\"A\",\"i\",\"I\"]}}},li:{attributes:{value:\"number\"}},table:m,caption:m,thead:m,tbody:m,tfoot:m,tr:m,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:m,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:m,output:m,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\"]},loading:{oneOf:[\"lazy\",\"eager\"]},fetchpriority:{oneOf:[\"high\",\"low\",\"auto\"]}}},\"graview-video\":{empty:!0,attributes:{autoplay:\"boolean\",cover:\"boolean\",poster:\"image\"}}},Ts=[\"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\",\"filter\",\"flood-color\",\"flood-opacity\",\"lighting-color\",\"color-interpolation-filters\"],ws={id:\"text\",class:\"text\",style:\"style\",lang:\"text\",role:\"text\",tabindex:{oneOf:[\"-1\",\"0\"]},transform:\"geometry\",...Object.fromEntries(Ts.map(t=>[t,\"css\"]))},pe={x:\"geometry\",y:\"geometry\",width:\"geometry\",height:\"geometry\"},fn={viewBox:\"geometry\",preserveAspectRatio:\"geometry\"},go={oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},yo={oneOf:[\"R\",\"G\",\"B\",\"A\"]},se={...pe,in:\"text\",result:\"text\"},Eo={gradientUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},gradientTransform:\"geometry\",spreadMethod:{oneOf:[\"pad\",\"reflect\",\"repeat\"]},href:\"fragment\"},bo={svg:{attributes:{...pe,...fn}},g:m,defs:m,symbol:{attributes:{...pe,...fn,refX:\"geometry\",refY:\"geometry\"}},use:{attributes:{...pe,href:\"fragment\"}},title:m,desc:m,path:{attributes:{d:\"geometry\",pathLength:\"number\"}},rect:{attributes:{...pe,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\",...Eo}},radialGradient:{attributes:{cx:\"geometry\",cy:\"geometry\",r:\"geometry\",fx:\"geometry\",fy:\"geometry\",fr:\"geometry\",...Eo}},stop:{attributes:{offset:\"geometry\"}},clipPath:{attributes:{clipPathUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},mask:{attributes:{...pe,maskUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},maskContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},pattern:{attributes:{...pe,...fn,patternUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternTransform:\"geometry\",href:\"fragment\"}},marker:{attributes:{...fn,markerWidth:\"geometry\",markerHeight:\"geometry\",refX:\"geometry\",refY:\"geometry\",orient:\"geometry\",markerUnits:{oneOf:[\"strokeWidth\",\"userSpaceOnUse\"]}}},a:m,filter:{attributes:{...pe,filterUnits:go,primitiveUnits:go}},feBlend:{attributes:{...se,in2:\"text\",mode:\"text\"}},feColorMatrix:{attributes:{...se,type:{oneOf:[\"matrix\",\"saturate\",\"hueRotate\",\"luminanceToAlpha\"]},values:\"geometry\"}},feComponentTransfer:{attributes:se},...Object.fromEntries([\"feFuncR\",\"feFuncG\",\"feFuncB\",\"feFuncA\"].map(t=>[t,{attributes:{type:{oneOf:[\"identity\",\"table\",\"discrete\",\"linear\",\"gamma\"]},tableValues:\"geometry\",slope:\"number\",intercept:\"number\",amplitude:\"number\",exponent:\"number\",offset:\"number\"}}])),feComposite:{attributes:{...se,in2:\"text\",operator:{oneOf:[\"over\",\"in\",\"out\",\"atop\",\"xor\",\"lighter\",\"arithmetic\"]},k1:\"number\",k2:\"number\",k3:\"number\",k4:\"number\"}},feDisplacementMap:{attributes:{...se,in2:\"text\",scale:\"number\",xChannelSelector:yo,yChannelSelector:yo}},feDropShadow:{attributes:{...se,dx:\"number\",dy:\"number\",stdDeviation:\"geometry\"}},feFlood:{attributes:se},feGaussianBlur:{attributes:{...se,stdDeviation:\"geometry\",edgeMode:{oneOf:[\"duplicate\",\"wrap\",\"none\"]}}},feMerge:{attributes:se},feMergeNode:{attributes:{in:\"text\"}},feMorphology:{attributes:{...se,operator:{oneOf:[\"erode\",\"dilate\"]},radius:\"geometry\"}},feOffset:{attributes:{...se,dx:\"number\",dy:\"number\"}},feTurbulence:{attributes:{...pe,result:\"text\",type:{oneOf:[\"fractalNoise\",\"turbulence\"]},baseFrequency:\"geometry\",numOctaves:\"number\",seed:\"number\",stitchTiles:{oneOf:[\"stitch\",\"noStitch\"]}}}};var No={section:[\"aria-label\",\"title\"]};function Ss(t){return/^aria-[a-z]+$/.test(t)}function xs(t){return/^data-[a-z0-9][a-z0-9_.-]*$/.test(t)}var vs=new Map(Object.keys(bo).map(t=>[t.toLowerCase(),t]));function To(t){return vs.get(t.toLowerCase())}function wo(t,e,n){let r=n.toLowerCase(),o=t===\"html\"?[rr[e]?.attributes,Ns]:[bo[e]?.attributes,ws],s=t===\"svg\"&&r===\"xlink:href\"?\"href\":r;for(let i of o)if(i){for(let[l,u]of Object.entries(i))if(l.toLowerCase()===s)return{name:l,kind:u}}if(Ss(r)||xs(r))return{name:r,kind:\"text\"}}var So=/^[a-z0-9][a-z0-9_-]{0,63}$/i;var mn=/^\\d{4}-\\d{2}-\\d{2}$/;function Os(t,e){if(typeof t!=\"string\"||typeof e!=\"string\"||!mn.test(t)||!mn.test(e))return;let n=Math.round((Date.parse(`${t}T00:00:00Z`)-Date.parse(`${e}T00:00:00Z`))/864e5);return Number.isFinite(n)?n:void 0}function xo(t,e,n={}){let r=Os(t,e);if(r===void 0)return\"\";if(r===0)return\"today\";if(r===1)return\"tomorrow\";if(r<0&&n.due===!0)return\"overdue\";if(r===-1)return\"yesterday\";let o=Math.abs(r),[s,i]=o<14?[o,\"day\"]:o<60?[Math.round(o/7),\"week\"]:o<730?[Math.round(o/30.44),\"month\"]:[Math.round(o/365.25),\"year\"],l=`${s} ${i}${s===1?\"\":\"s\"}`;return r>0?`in ${l}`:`${l} ago`}function vo(t,e){if(typeof t!=\"string\")return;if(mn.test(t))return t;let n=Date.parse(t);if(Number.isFinite(n)){if(!/(Z|[+-]\\d\\d:?\\d\\d)$/.test(t))return mn.test(t.slice(0,10))?t.slice(0,10):void 0;try{let r=new Intl.DateTimeFormat(\"en-CA\",{timeZone:e||\"UTC\",year:\"numeric\",month:\"2-digit\",day:\"2-digit\"}).formatToParts(n),o=s=>r.find(i=>i.type===s)?.value??\"\";return`${o(\"year\")}-${o(\"month\")}-${o(\"day\")}`}catch{return new Date(n).toISOString().slice(0,10)}}}var Oo=\"~\",pn=t=>typeof t==\"object\"&&t!==null&&!Array.isArray(t),le=(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=>le(n,e+1)):Object.fromEntries(Object.entries(t).map(([n,r])=>[n,le(r,e+1)]))};function Ro(){let t=new Map,e=new Map,n=new Map([[Oo,{children:[],listeners:new Map}]]),r=0,o=d=>{let p=e.get(d);return p===void 0&&(p=r+=1,e.set(d,p),t.set(p,{listener:d,count:0})),t.get(p).count+=1,p},s=d=>{let p=t.get(d);p&&(p.count-=1,!(p.count>0)&&(t.delete(d),e.delete(p.listener)))},i=d=>{let p=n.get(d);if(p){n.delete(d);for(let E of p.listeners.values())s(E);for(let E of p.children)i(E)}},l=(d,p,E=0)=>{if(!pn(d)||E>64)return le(d);let b=typeof d.id==\"string\"?d.id:void 0,N=p&&b!==void 0&&b!==Oo;N&&i(b);let R={children:[],listeners:new Map};N&&n.set(b,R);let w={};for(let[S,I]of Object.entries(d))S===\"children\"&&Array.isArray(I)?w[S]=I.map(k=>{let x=l(k,N,E+1);return N&&pn(k)&&typeof k.id==\"string\"&&R.children.push(k.id),x}):S===\"eventListeners\"&&pn(I)?w[S]=Object.fromEntries(Object.entries(I).map(([k,x])=>{if(typeof x!=\"function\"||!N)return[k,void 0];let M=o(x);return R.listeners.set(k,M),[k,{listener:M}]})):w[S]=le(I,E+1);return w},u=d=>{if(!Array.isArray(d))return le(d);let[p,E]=d,b=typeof E==\"string\"?n.get(E):void 0;if(p===0){let N=l(d[2],b!==void 0),R=pn(d[2])?d[2].id:void 0;if(b&&typeof R==\"string\"&&n.has(R)){let w=Number(d[3]);b.children.splice(Number.isInteger(w)&&w>=0&&w<=b.children.length?w:b.children.length,0,R)}return[p,le(E),N,le(d[3])]}if(p===1){let N=Number(d[2]);return b&&Number.isInteger(N)&&N>=0&&N<b.children.length&&i(b.children.splice(N,1)[0]),le(d)}if(p===3&&d[4]===3){let N=String(d[2]),R=d[3],w=b&&typeof R==\"function\"?o(R):void 0,S=b?.listeners.get(N);return S!==void 0&&s(S),w===void 0?b?.listeners.delete(N):b.listeners.set(N,w),[p,le(E),N,w===void 0?void 0:{listener:w},3]}return le(d)};return{encode:d=>d.map(u),listener:d=>t.get(d)?.listener,get listening(){return t.size},get nodes(){return n.size-1}}}var hn=\"graview-view-root\",As=[\"value\",\"checked\",\"key\",\"pressed\",\"files\",\"refused\",\"x\",\"y\",\"width\",\"height\",\"deltaX\",\"deltaY\",\"deltaMode\",\"ctrlKey\",\"metaKey\",\"phase\",\"pointerId\",\"button\",\"pressure\",\"dx\",\"dy\",\"scale\",\"rotation\"],_s=new Set([\"div\",\"li\",\"article\"]),sr=t=>t.replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\"/g,\"&quot;\").replace(/'/g,\"&#39;\"),or=t=>Object.freeze({html:t,toString:()=>t}),ir=t=>typeof t==\"object\"&&t!==null&&typeof t.html==\"string\"&&Object.isFrozen(t),_o=t=>t==null||t===!1?\"\":Array.isArray(t)?t.map(_o).join(\"\"):ir(t)?t.html:sr(String(t));function Po(t){customElements.get(hn)||customElements.define(hn,yt);let e=Event,n=Ro(),r=new Set,o=new Set,s,i=[],l=new Set;for(let a of[\"closest\",\"matches\",\"dataset\"]){let c=()=>{throw new TypeError(`A view's element has no ${a}: graview.on hands event.element, the element its selector matched; read event.element.getAttribute(\"data-\\u2026\").`)};a in Element.prototype||Object.defineProperty(Element.prototype,a,a===\"dataset\"?{get:c}:{value:c})}let u=document.createElement(hn),d=a=>{let c=f=>{for(let h of Array.from(f.childNodes)){if(h.nodeType!==1)continue;if(Z(h)===a)return h;let g=c(h);if(g)return g}};return c(u)},p=a=>{let c=d(a.target);if(!c)return;let f=new e(a.event,{bubbles:!0}),h={};for(let g of As)a[g]!==void 0&&(h[g]=a[g]);for(let g of Object.keys(h))Object.defineProperty(f,g,{value:h[g],enumerable:!0});c.dispatchEvent(f);for(let g of o){if(g.type!==a.event)continue;let T;try{T=new Set(Array.from(u.querySelectorAll(g.selector)))}catch{continue}for(let _=c;_&&_!==u;_=_.parentNode)if(T.has(_)){g.listener(Object.freeze({type:a.event,target:c,element:_,...h}));break}}},E=Error,b=new Map,N=0,R=(a,c,f)=>new Promise((h,g)=>{let T=++N;b.set(T,_=>_.ok?h(_):g(new E(_.sentence??\"This value was not kept.\"))),t.send({type:\"mine\",id:T,op:a,key:c,...a===\"set\"?{value:f}:{}})}),w=a=>(a.catch(()=>{}),a),S=Object.freeze({get(a){return w(R(\"get\",a).then(c=>typeof c.value==\"string\"?c.value:null))},set(a,c){return w(R(\"set\",a,c).then(()=>{}))}}),I=a=>{if(a.type===\"mine-answer\"){let g=b.get(a.id);return b.delete(a.id),g?.(a)}if(a.type===\"dom-event\"&&typeof a.target==\"string\")return p(a);if(a.type===\"notice\")return t.warn(a.text);if(a.type!==\"props\")return;s=a.props,typeof a.partMs==\"number\"&&a.partMs>0&&(gn=a.partMs),typeof a.partMark==\"string\"&&(yn=a.partMark),En+=1,Et.clear(),et=0;let c=t.now();for(let g of r)try{g(a.props)}catch(T){t.threw(T)}let f=t.now()-c,h=a.push;typeof h==\"number\"&&t.microtask(()=>t.microtask(()=>t.send({type:\"pushed\",push:h,ms:f})))},k;u.connect({mutate(a){k||(k=[],t.microtask(()=>{let c=k??[];k=void 0,t.send({type:\"render\",records:n.encode(c)})})),k.push(...a)},call:()=>{}});let x=a=>a.localName===\"graview-video\"&&(a.hasAttribute(\"data-video\")||a.hasAttribute(\"data-watch\")),M=a=>{if(a.nodeType!==1)return null;let c=a;return c.getAttribute(\"data-key\")??c.getAttribute(\"id\")??(x(c)?`${c.getAttribute(\"data-provider\")} ${c.getAttribute(\"data-video\")} ${(c.getAttribute(\"data-watch\")??\"\").split(/[?&#]/).filter(h=>!/^(t|start)=/.test(h)).join(\"&\")}`:null)},H=new Map;function Ze(a){if(a.nodeType!==1)return[];let c=x(a)?[M(a)??\"\"]:Array.from(a.childNodes).flatMap(Ze);return c.length>0&&H.set(a,c),c}let Qe=(a,c)=>{let f=H.get(a);return f!==void 0&&(H.get(c)?.some(h=>f.includes(h))??!1)},Je=(a,c)=>a.nodeType===c.nodeType&&(a.nodeType!==1||a.localName===c.localName&&a.namespaceURI===c.namespaceURI&&M(a)===M(c));function Co(a,c,f,h){let g=a.childNodes[c],T=()=>Array.from(a.childNodes).slice(c),_=H.has(f)?T().find(U=>Je(U,f)&&Qe(U,f)):void 0;if(_)return _;let B=U=>H.has(U)&&h.some(ce=>Je(U,ce)&&Qe(U,ce));return g&&Je(g,f)&&!B(g)?g:M(f)===null?void 0:T().slice(1).find(U=>Je(U,f)&&!B(U))}function ur(a,c){let f=Array.from(c.childNodes),h=f.filter(T=>H.has(T)),g=0;for(let T of f){h[0]===T&&h.shift();let _=a.childNodes[g]??null,B=Co(a,g,T,h);if(!B)a.insertBefore(T,_);else{if(B!==_){let U=Array.from(a.childNodes).slice(g);if(U.length=U.indexOf(B),H.has(B)&&!U.some(ce=>h.some(xe=>Je(ce,xe)&&Qe(ce,xe)))){let ce=B.nextSibling;for(let xe of U)a.insertBefore(xe,ce)}else a.insertBefore(B,_)}Io(B,T)}g+=1}for(;a.childNodes.length>g;)a.removeChild(a.lastChild)}function Io(a,c){if(a.nodeType!==1){a.data!==c.data&&(a.data=c.data);return}let f=a,h=c,g=dr(f);for(let T of f.getAttributeNames())h.hasAttribute(T)||(f.removeAttribute(T),g&&Se(f,T,void 0));for(let T of h.getAttributeNames()){let _=h.getAttribute(T);f.getAttribute(T)!==_&&f.setAttribute(T,_),g&&Se(f,T,_)}ur(f,h)}let dr=a=>a.localName.includes(\"-\");function fr(a){for(let c of Array.from(a.childNodes)){if(c.nodeType!==1)continue;let f=c;if(dr(f))for(let h of f.getAttributeNames())Se(f,h,f.getAttribute(h)??void 0);fr(f)}}function mr(a,c,f){for(let h of Array.from(a.childNodes)){if(h.nodeType!==1)continue;let g=h,T=g.localName,_=c||T.toLowerCase()===\"svg\",B=_?To(T):Object.prototype.hasOwnProperty.call(rr,T.toLowerCase())?T.toLowerCase():void 0;if(!B){f.add(`<${T}>`);continue}for(let U of g.getAttributeNames())(!wo(_?\"svg\":\"html\",B,U)||!_&&No[B]?.includes(U.toLowerCase()))&&f.add(`${B} ${U}`);mr(g,_,f)}}function ko(a){let c=document.createElement(\"div\"),f=Array.isArray(a)?a:[a];for(let g of f)if(g!=null)if(typeof g==\"string\"||ir(g)){let T=document.createElement(\"div\");T.innerHTML=typeof g==\"string\"?g:g.html,c.append(...Array.from(T.childNodes))}else c.append(g);let h=new Set;mr(c,!1,h),i=[...h],i.length>0&&t.warn(`The host will not draw: ${i.join(\", \")}`),fr(c),H.clear(),Ze(c).length>0&&Ze(u),ur(u,c),Et.clear()}let gn=1e3/4,yn=\"\",En=0,bn=new Map,Et=new Map,et=0,Nn=new Set,Do=a=>{try{return a instanceof Error?`${a.name}: ${a.message}`:String(a)}catch{return\"an error\"}},pr=a=>{if(a==null||a===!1)return\"\";if(typeof a==\"string\")return a;if(ir(a))return a.html;if(Array.isArray(a))return a.map(c=>pr(c)).join(\"\");throw new TypeError(\"a part's draw returns markup: a string, graview.html`\\u2026` or a list of them\")};function Lo(a,c,f){if(typeof a!=\"string\"||!So.test(a))throw new TypeError('graview.part names its part in letters, digits, - and _ (\"vendors\", \"budget-2026\"), at most 64 of them.');if(typeof c!=\"function\")throw new TypeError(`graview.part(\"${a}\", draw) is handed a function that returns the part's markup.`);let h=typeof f?.as==\"string\"&&_s.has(f.as)?f.as:\"div\",g=Et.get(a)??0;Et.set(a,g+1);let T=`${a}#${g}`,_=(Q,Nr)=>{let Go=`The part \"${a}\" ${Q===\"threw\"?\"threw\":\"took too long\"}, so a note is drawn in its place and the rest of the view is drawn: ${Nr}`;return!Nn.has(`${a} ${Q}`)&&Nn.size<100&&(Nn.add(`${a} ${Q}`),t.warn(Go)),or(`<${h} data-part=\"${a}\" data-part-failed=\"${Q}\" data-part-why=\"${sr(Nr.slice(0,300))}\"${yn?` data-part-mark=\"${sr(yn)}\"`:\"\"}></${h}>`)},B=bn.get(T);if(B!==void 0&&En<=B.until)return _(\"slow\",B.why);bn.delete(T);let U=et;et=0;let ce=t.now(),xe,vn=0;try{xe=pr(c())}catch(Q){return _(\"threw\",Do(Q))}finally{let Q=t.now()-ce;vn=Q-et,et=U+Q}if(vn>gn){let Q=`it took ${Math.round(vn).toLocaleString(\"en-US\")} ms, past the ${Math.round(gn).toLocaleString(\"en-US\")} ms a part may take of a push, and is left as a note for the next ${3} pushes.`;return bn.set(T,{why:Q,until:En+3}),_(\"slow\",Q)}return or(`<${h} data-part=\"${a}\">${xe}</${h}>`)}let Tn=[],wn=new Set(so),hr=\"[]\",Sn=!1,gr=()=>{Sn||(Sn=!0,t.microtask(()=>{Sn=!1;let a=[...new Map([...o].filter(f=>wn.has(f.type)).map(f=>[`${f.type} ${f.selector}`,{event:f.type,selector:f.selector}])).entries()].sort(([f],[h])=>f<h?-1:f>h?1:0).map(([,f])=>f),c=JSON.stringify(a);c!==hr&&(hr=c,t.send({type:\"gestures\",bound:a}))}))},yr=\"[[],[]]\",xn=!1,Er=()=>{xn||(xn=!0,t.microtask(()=>{xn=!1;let a=g=>[...new Set([...o].filter(T=>T.type===g&&typeof T.selector==\"string\").map(T=>T.selector))].sort().slice(0,200),c=a(\"click\"),f=a(\"acted\"),h=JSON.stringify([c,f]);h!==yr&&(yr=h,t.send({type:\"clicks\",selectors:c,...f.length>0?{acted:f}:{}}))}))},br=Object.freeze({get props(){return s},onProps(a){return r.add(a),s&&a(s),()=>void r.delete(a)},render:ko,style(a){typeof a!=\"string\"||Tn.includes(a)||(Tn.push(a),t.send({type:\"style\",sheets:[...Tn]}))},on(a,c,f){let h={type:a,selector:c,listener:f};return o.add(h),typeof a==\"string\"&&!l.has(a)&&(l.add(a),t.send({type:\"hears\",events:[a]})),wn.has(a)&&gr(),(a===\"click\"||a===\"acted\")&&Er(),()=>{o.delete(h),wn.has(a)&&gr(),(a===\"click\"||a===\"acted\")&&Er()}},act:(a,c={})=>t.act(a,c),mine:S,navigate(a){if(typeof a==\"string\")return t.navigate(a);let c=dn(a);c&&t.send(c)},part:Lo,html(a,...c){return or(a.reduce((f,h,g)=>f+h+(g<c.length?_o(c[g]):\"\"),\"\"))},get today(){return s?.today??new Date().toISOString().slice(0,10)},fromToday(a,c){let f=vo(a,s?.timeZone);return f===void 0?\"\":xo(f,br.today,c)},cite(a,c){let f=a?s?.cites?.[a.kind]?.[c]:void 0;if(!a||!f)return;let h=!(s?.uncited?.[a.id]??[]).includes(c);if(!f.relation)return{by:f.by,relation:!1,cited:h,...a[f.by]!==void 0?{source:a[f.by]}:{}};let g=new Set((s?.edges??[]).filter(T=>T.from===a.id&&T.kind===f.by).map(T=>T.to));return{by:f.by,relation:!0,cited:h,sources:(s?.nodes??[]).filter(T=>g.has(T.id))}},uncited(a){return a?s?.uncited?.[a.id]??[]:[]},get refused(){return i},get hardening(){return t.hardening()}});return{view:br,hear:I,find:a=>{try{let c=u.querySelectorAll(a)[0];return c?Z(c):void 0}catch{return}},listened:a=>{let c=new Set;for(let f of o)if(f.type===a)try{for(let h of Array.from(u.querySelectorAll(f.selector))){let g=Z(h);g&&c.add(g)}}catch{}return[...c]}}}var cr={removed:[],stuck:[],sealed:!1,worker:!1},ar=lo({listen(t){return Ie.listen(t),()=>Ie.unlisten(t)},fromHost:()=>!0,ready:t=>Ie.post(t)},{onMessage:t=>Mo.hear(t)}),Mo=Po({send:t=>ar.send(t),act:(t,e)=>ar.guest.act(t,e),navigate:t=>ar.guest.navigate(t),microtask:Ie.microtask,now:Ie.now,threw:t=>console.error(t),warn:t=>console.warn(t),hardening:()=>cr}),Ps=Mo.view;Object.defineProperty(globalThis,\"graview\",{value:Ps,enumerable:!0,configurable:!0,writable:!1});var lr=\"WorkerGlobalScope\"in globalThis?ho(globalThis,[\"graview\"]):cr;cr=lr;if(lr.stuck.length>0)throw new Error(`The view's worker could not be hardened: ${lr.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 Ce=globalThis,Ho=Ce.addEventListener,Uo=Ce.removeEventListener,Bo=Ce.postMessage,Vo=globalThis.queueMicrotask,On=globalThis.performance,Fo=On?On.now.bind(On):Date.now,Ie={listen:t=>Ho.call(Ce,\"message\",t),unlisten:t=>Uo.call(Ce,\"message\",t),post:t=>Bo.call(Ce,t),microtask:t=>Vo.call(globalThis,t),now:()=>Fo()};var x=Symbol(\"name\"),he=Symbol(\"prefix\"),ge=Symbol(\"value\"),O=Symbol(\"ns\"),$=Symbol(\"owner\"),k=Symbol(\"owner_document\"),ie=Symbol(\"attributes\"),D=Symbol(\"prev\"),y=Symbol(\"next\"),_=Symbol(\"child\"),W=Symbol(\"parent\"),ye=Symbol(\"host\"),J=Symbol(\"data\"),xe=Symbol(\"listeners\"),Rn=Symbol(\"isTrusted\"),ke=Symbol(\"path\"),De=Symbol(\"stop_immediate_propagation\"),Le=Symbol(\"dispatching\"),ue=Symbol(\"content\"),L=Symbol(\"hooks\"),Et=Symbol(\"extensions\"),Oe=Symbol(\"hooks_dispatch\"),j=Symbol(\"is_connected\"),Ge=Symbol(\"create_element\"),Tr=0,K=1,He=2,Ue=3,Be=8,Re=9,wr=10,be=11,C=\"http://www.w3.org/1999/xhtml\",ee=\"http://www.w3.org/2000/svg\",Sr=\"http://www.w3.org/XML/1998/namespace\",tt=\"http://www.w3.org/2000/xmlns/\";function Nt(t){return t.split(/[\\t\\n\\f\\r ]+/).filter(Boolean)}function V(t){return t.replace(/[A-Z]/g,e=>String.fromCharCode(e.charCodeAt(0)+32))}function vr(t){return t.replace(/[a-z]/g,e=>String.fromCharCode(e.charCodeAt(0)-32))}function I(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 xr=/^(?:[A-Za-z][^\\0\\t\\n\\f\\r\\u0020/>]*|[:_\\u0080-\\u{10FFFF}][A-Za-z0-9-.:_\\u0080-\\u{10FFFF}]*)$/u,Or=/[\\0\\t\\n\\f\\r />=]/u,jo=/[\\0\\t\\n\\f\\r />]/u;function de(t){if(t==null)return null;let e=String(t);return e===\"\"?null:e}function Rr(t){xr.test(t)||_n(t)}function An(t){(t===\"\"||Or.test(t))&&_n(t)}function Tt(t,e,n){let r=de(t),o=String(e),s=o.indexOf(\":\"),i=s<0?null:o.slice(0,s),l=s<0?o:o.slice(s+1);if((i!=null&&(i===\"\"||jo.test(i))||(n===\"element\"?!xr.test(l):l===\"\"||Or.test(l)))&&_n(o),i!=null&&r==null)throw I(`A namespace is required for the prefix in \"${o}\"`,\"NamespaceError\");if(i===\"xml\"&&r!==Sr)throw I(\"The xml prefix requires the XML namespace\",\"NamespaceError\");if((o===\"xmlns\"||i===\"xmlns\")&&r!==tt)throw I(\"The xmlns name requires the XMLNS namespace\",\"NamespaceError\");if(r===tt&&o!==\"xmlns\"&&i!==\"xmlns\")throw I(\"The XMLNS namespace requires the xmlns name or prefix\",\"NamespaceError\");return{namespace:r,qualifiedName:o,prefix:i,localName:l}}function _n(t){throw I(`Invalid name: \"${t}\"`,\"InvalidCharacterError\")}var wt=0,St=1,Ar=2,Pn=3,zo=typeof performance>\"u\"?Date.now:performance.now.bind(performance),z=class{static NONE=wt;static CAPTURING_PHASE=St;static AT_TARGET=Ar;static BUBBLING_PHASE=Pn;timeStamp=zo();target=null;currentTarget=null;srcElement=null;bubbles=!1;cancelable=!1;composed=!1;defaultPrevented=!1;cancelBubble=!1;eventPhase=wt;[ke]=[];[De]=!1;[Le]=!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[ke]]}stopPropagation(){this.cancelBubble=!0}stopImmediatePropagation(){this[De]=!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 Mn(t,e,n){if(t.cancelBubble)return;let o=e[xe]?.get(t.type)?.[n===St?\"capture\":\"bubble\"];if(o)for(let s of[...o]){if(!o.has(s)||s.signal?.aborted)continue;t.eventPhase=t.target===e?Ar:n,t.currentTarget=e;let i=s.normalizedListener;try{typeof i==\"object\"?i.handleEvent(t):i.call(e,t)}catch(l){setTimeout(qo,0,l)}if(t[De])break}}function qo(t){throw t}var nt=[],vt=new WeakMap;function xt(t,e){let n=vt.get(t);n?n.push(e):vt.set(t,[e]),nt[nt.length-1].push(t)}function q(t){let e=[];nt.push(e);let n;try{n=t()}catch(r){nt.pop();try{_r(e)}catch{}throw r}return nt.pop(),_r(e),n}function _r(t){let e,n=!1;for(let r of t){let o=vt.get(r);if(o){for(;o.length>0;){let s=o.shift();try{s()}catch(i){n||(e=i,n=!0)}}vt.delete(r)}}if(n)throw e}var Ot=[],rt=[],Cn=!1;function Ae(t){for(let e of t)Ot.push(e),e[1]&&rt.push(e[1]);if(!Cn){Cn=!0;try{let e,n=!1;for(let r=0;r<Ot.length;r++){let[o,s]=Ot[r];s&&rt.splice(rt.indexOf(s),1);try{o()}catch(i){n||(e=i,n=!0)}}if(n)throw e}finally{Ot.length=0,rt.length=0,Cn=!1}}}function ot(t){let e=t;for(;e;){if(rt.includes(e))return!0;e=e[W]??e[ye]}return!1}var st=Symbol(\"listenerRegistrations\"),Ee=class{[xe]=void 0;[st]=void 0;[k]=void 0;addEventListener(e,n,r){if(n==null)return;let o=r===!0||typeof r==\"object\"&&r.capture===!0,s=typeof r==\"object\"&&r.once===!0,i=typeof r==\"object\"?r.signal:void 0;if(i?.aborted)return;let l=In(o),u=this[st];u||(u=new Map,this[st]=u);let d=u.get(e);d||(d={},u.set(e,d));let p=d[l];if(p||(p=new Map,d[l]=p),p.has(n))return;let b=this,T={type:e,listener:n,capture:o,once:s,normalizedListener:n,signal:i};(s||i)&&(T.normalizedListener=function(...v){if(T.signal?.aborted){Rt(b,T);return}return T.once&&Rt(b,T),typeof T.listener==\"object\"?T.listener.handleEvent(...v):T.listener.call(this,...v)});let w=this[xe];w||(w=new Map,this[xe]=w);let A=w.get(e);A||(A={},w.set(e,A));let P=A[l];if(P||(P=new Set,A[l]=P),p.set(n,T),P.add(T),i){let U=()=>{Rt(b,T)};T.abortListener=U,i.addEventListener(\"abort\",U,{once:!0})}this[k]?.defaultView[Oe].addEventListener?.(this,e,n,r)}removeEventListener(e,n,r){return Yo.call(this,e,n,r)}dispatchEvent(e){if(e[Le])throw I(\"Failed to execute 'dispatchEvent' on 'EventTarget': The event is already being dispatched.\",\"InvalidStateError\");e[Le]=!0;try{let n=[],r=this;for(;r!=null;)n.push(r),r=r.parentNode;e.target=this,e.srcElement=this,e[ke]=n;for(let s=n.length;s--;)if(Mn(e,n[s],St),e.cancelBubble)return!e.defaultPrevented;let o=e.bubbles?n:n.slice(0,1);for(let s=0;s<o.length;s++)if(Mn(e,o[s],Pn),e.cancelBubble)return!e.defaultPrevented;return!e.defaultPrevented}finally{e[Le]=!1,e.cancelBubble=!1,e[De]=!1,e.eventPhase=wt,e.currentTarget=null,e[ke]=[]}}};function Yo(t,e,n){if(e==null)return;let r=n===!0||n&&n.capture===!0,o=In(!!r),s=this[st]?.get(t)?.[o]?.get(e);s&&Rt(this,s)}function In(t){return t?\"capture\":\"bubble\"}function Rt(t,e){let n=In(e.capture),r=t[st],o=r?.get(e.type);if(!o)return;let s=o[n];if(!s||s.get(e.listener)!==e)return;s.delete(e.listener),s.size===0&&delete o[n],!o.bubble&&!o.capture&&r?.delete(e.type),e.signal&&e.abortListener&&e.signal.removeEventListener(\"abort\",e.abortListener);let i=t[xe],l=i?.get(e.type);if(!l)return;let u=l[n];u?.delete(e)&&(u.size===0&&delete l[n],!l.bubble&&!l.capture&&i?.delete(e.type),t[k]?.defaultView[Oe].removeEventListener?.(t,e.type,e.listener,e.capture))}var te=class extends Array{item(e){return this[e]??null}};var at=0,Pr=1,Ln=2,Gn=3,lt=4,Mr=0,Cr=1,Pt=2,Mt=3,Ir=4,Dn=5,kr=6,Dr=7,At=/^(?:--|-?[A-Za-z_\\u0080-\\u{10FFFF}])[A-Za-z0-9_\\u0080-\\u{10FFFF}-]*$/u;function $o(t,e){let n=1,r=null;for(let o=e;o<t.length;o++){let s=t[o];if(r){s===\"\\\\\"?o++:s===r&&(r=null);continue}if(s==='\"'||s===\"'\")r=s;else if(s===\"(\")n++;else if(s===\")\"&&--n===0)return[t.slice(e,o),o+1]}return[t.slice(e),t.length]}function X(t){throw I(`Invalid or unsupported selector: \"${t}\"`,\"SyntaxError\")}function Ct(t,e){let n=typeof e==\"string\"?ct(e):[{combinator:lt,matchers:e}],r=null,o=t[_];return o&&n[0].matchers.length&&Hn(o,n,s=>(r=s,!1)),r}function It(t,e){let n=typeof e==\"string\"?ct(e):[{combinator:lt,matchers:e}],r=new te,o=t[_];return o&&n[0].matchers.length&&Hn(o,n,s=>{r.push(s)}),r}function ct(t,e=!1,n=!1){let r={combinator:lt,matchers:[]},o=[r],s=/[\\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,i=t.replace(/^[\\t\\n\\f\\r ]+|[\\t\\n\\f\\r ]+$/g,\"\");i===\"\"&&X(t);let l=0,u;for(;u=s.exec(i);){u.index!==l&&X(t),u[1]&&(r.matchers.length===0&&!(n&&o.length===1)&&X(t),u[1]===\">\"?r.combinator=Pr:u[1]===\"+\"?r.combinator=Gn:u[1]===\"~\"?r.combinator=Ln:r.combinator=at,r={combinator:lt,matchers:[]},o.push(r));let d=u[8]?V(u[8]):u[2]||u[7];u[7]!=null&&!u[6]&&r.matchers.length>0&&X(t);let b,T=u[4]??u[5]??u[7];if(u[2]){At.test(d)||X(t);let w=u[5],A=w?.[0];if(u[3]==null&&(A==='\"'||A===\"'\")){let P=u[0].lastIndexOf(w);T=i.slice(u.index+P+1),s.lastIndex=i.length}else w!=null&&!At.test(w)&&X(t);b=Ir}else u[6]?(At.test(d)||X(t),b=u[6]===\"#\"?Pt:Mt):u[8]?b=u[9]==null?Dn:kr:u[7]===\"*\"?b=Mr:u[7]&&At.test(u[7])?b=Cr:X(t);u[9]?([T,s.lastIndex]=$o(i,s.lastIndex),d!==\"has\"&&d!==\"not\"&&X(t),d===\"has\"&&e&&X(t),ct(T,e||d===\"has\",d===\"has\")):b===Dn&&X(t),r.matchers.push({type:b,name:d,value:T}),l=s.lastIndex}return(l!==i.length||r.matchers.length===0)&&X(t),o}function Wo(t,e){let n=ct(e);return n[0]?.matchers.length?it(t,n):!1}function Xo(t,e){let n=ct(e,!0,!0),r=n[0];if(n.length===1&&r.matchers.length===0)return!1;let o=at,s={type:Dr,name:\":scope\"};if(r.matchers.length===0?(o=r.combinator,r.matchers.push(s)):n.unshift({combinator:at,matchers:[s]}),n.some(({matchers:u})=>u.length===0))return!1;let i=o===Gn||o===Ln?t[y]:t[_];if(!i)return!1;let l=!1;return Hn(i,n,()=>(l=!0,!1),t),l}function Hn(t,e,n,r){let o=[],s=t;for(;s;){if(Y(s)){if(it(s,e,r)&&n(s)===!1)return!1;let i=s[_];if(i){let l=s[y];l&&o.push(l),s=i;continue}}s=s[y]??o.pop()??null}return!0}function it(t,e,n){let{combinator:r,matchers:o}=e[e.length-1];if(r===lt){if(!_t(t,o,n))return!1;let l=e.slice(0,-1);return l.length===0||it(t,l,n)}let s=r===Pr||r===at?W:D,i=t[s];if(!i)return!1;if(r===at||r===Ln){for(;i;){if(Y(i)&&_t(i,o,n)){let l=e.slice(0,-1);if(l.length===0||it(i,l,n))return!0}i=i[s]}return!1}else{if(r===Gn&&!Y(i)){for(;i&&!Y(i);)i=i[s];if(!i)return!1}if(!Y(i)||!_t(i,o,n))return!1;let l=e.slice(0,-1);return l.length===0||it(i,l,n)}}function kn(t,e){return t.getAttributeNS(null,t.namespaceURI===C?V(e):e)}function _t(t,e,n){if(!t)return!1;if(Array.isArray(e)){for(let i of e)if(_t(t,i,n)===!1)return!1;return!0}let{type:r,name:o,value:s}=e;switch(r){case Mr:return o===\"*\";case Cr:return t.namespaceURI===C?t.localName===V(o):t.localName===o;case Pt:return kn(t,\"id\")===o;case Mt:let i=kn(t,\"class\");return i?Nt(i).includes(o):!1;case Ir:let l=kn(t,o);return s==null?l!=null:l===s;case Dr:return t===n;case Dn:X(`:${o}`);case kr:switch(o){case\"has\":return Xo(t,s||\"\");case\"not\":return!Wo(t,s||\"\");default:X(`:${o}(${s})`)}}return!1}function Ko(t){return t.nodeType===He}function ut(t){return J in t}function Bn(t){return t.nodeType===Ue}function Zo(t){return t.nodeType===Be}function Y(t){return t.nodeType===K}function Un(t){return t.nodeType===be}function Ur(t){return\"appendChild\"in t}function kt(t){let e=[],n=[t],r=new Set(n),o=new Set,s;for(;n.length>0;){let i=n.pop();if(r.delete(i),o.has(i))continue;let l=[];for(let u of ft(i)){if(o.has(u)||(o.add(u),e.push(u),l.push(u),!Y(u)))continue;let d=u[ie];if(d)for(let b of d)o.has(b)||(o.add(b),e.push(b));let p=u[ue];p&&!o.has(p)&&!r.has(p)&&(r.add(p),n.push(p))}s??=l}return{nodes:e,treeNodes:s}}function dt(t,e){for(let n of t)n[k]=e}function Lr(t,e){let n=t.constructor,r=new n(t.name,t.value,t.namespaceURI);return r[k]=e,r}function Gr(t,e){if(Bn(t))return e.createTextNode(t.data);if(Zo(t))return e.createComment(t.data);if(Ko(t))return Lr(t,e);if(Y(t)){let n=e[Ge](t[x],t.namespaceURI,t[he],t.localName);if(t[ie])for(let r=0;r<t[ie].length;r++){let o=t[ie].item(r);n.attributes.setNamedItem(Lr(o,e))}return n}else{if(Un(t))return e.createDocumentFragment();{let n=new t.constructor;return n[k]=e,n}}}function Dt(t,e,n=t.ownerDocument){if(t.nodeType===Re)throw I(\"Cannot clone a document node\",\"NotSupportedError\");let r=Gr(t,n);if(!e||!Y(t)&&!Un(t))return r;let o=new Set([t]),s=[{source:t,destination:r,childIndex:0,cloningContent:!1}];for(;s.length>0;){let i=s[s.length-1],l,u;if(i.cloningContent)if(i.contentSource&&i.contentDestination)l=i.contentSource.childNodes[i.childIndex++],u=i.contentDestination;else{s.pop(),i.appendTo&&i.appendTo.appendChild(i.destination);continue}else if(l=i.source.childNodes[i.childIndex++],u=i.destination,!l){if(i.cloningContent=!0,i.childIndex=0,Y(i.source)&&i.source.namespaceURI===C&&i.source.localName===\"template\"){let p=i.source[ue];p&&(o.has(p)&&Hr(),o.add(p),i.contentSource=p,i.contentDestination=i.destination.content)}continue}if(!l){s.pop(),i.appendTo&&i.appendTo.appendChild(i.destination);continue}o.has(l)&&Hr(),o.add(l);let d=Gr(l,n);Y(l)||Un(l)?s.push({source:l,destination:d,appendTo:u,childIndex:0,cloningContent:!1}):u.appendChild(d)}return r}function Hr(){throw new Error(\"Cannot clone a cyclic or repeated node graph\")}function Lt(t,e){let n=String(e);return n===\"\"?null:Ct(t,[{type:Pt,name:n}])}function Gt(t,e){let n=[...new Set(Nt(String(e)))];return It(t,n.map(r=>({type:Mt,name:r})))}function Ht(t,e){let n=String(e),r=V(n),o=[];for(let s of Ut(t))Y(s)&&(n===\"*\"||(s.namespaceURI===C?s[x]===r:s[x]===n))&&o.push(s);return o}function Ut(t){let e=[],n=[],r=t[_];for(;r;){e.push(r);let o=r[_],s=r[y];o?(s&&n.push(s),r=o):r=s??n.pop()??null}return e}function ft(t){let e=Ut(t);return e.unshift(t),e}var ne=class extends Ee{nodeType=Tr;[x]=\"\";[W]=null;[ye]=null;[_]=null;[D]=null;[y]=null;[j]=!1;get[L](){return this[k].defaultView[Oe]}get localName(){return this[x]}get nodeName(){return this[x]}get ownerDocument(){return this[k]}get isConnected(){return this[j]}isDefaultNamespace(e){let n=de(e);return Qo(this)===n}get parentNode(){return this[W]}set parentNode(e){}get parentElement(){let e=this[W];return!e||e.nodeType!==1?null:e}set parentElement(e){}get previousSibling(){return this[D]}set previousSibling(e){}get nextSibling(){return this[y]}set nextSibling(e){}get previousElementSibling(){let e=this[D];for(;e&&e.nodeType!==1;)e=e[D];return e}set previousElementSibling(e){}get nextElementSibling(){let e=this[y];for(;e&&e.nodeType!==1;)e=e[y];return e}set nextElementSibling(e){}get firstChild(){return this[_]}set firstChild(e){}get lastChild(){let e=this[_];for(;e;){let n=e[y];if(n==null)break;e=n}return e}set lastChild(e){}get nodeValue(){return ut(this)?this.data:null}set nodeValue(e){ut(this)&&(this.data=e)}get textContent(){if(ut(this))return this.data;let e=\"\";for(let n of Ut(this))Bn(n)&&(e+=n.data);return e}set textContent(e){if(ut(this))this.data=e;else if(Ur(this)){let n=e==null?\"\":String(e);n===\"\"?this.replaceChildren():this.replaceChildren(n)}}cloneNode(e){return Dt(this,e)}contains(e){let n=e;for(;n!=null;){if(n===this)return!0;n=n.parentNode}return!1}};function Qo(t){let e=t;for(;e;)switch(e.nodeType){case K:{let n=e;if(n.prefix==null&&n.namespaceURI!=null)return n.namespaceURI;let r=n.attributes.getNamedItemNS(tt,\"xmlns\");if(r!=null&&r.prefix==null)return de(r.value);e=n.parentElement;break}case Re:e=e.documentElement;break;case wr:case be:return null;case He:e=e.ownerElement;break;default:e=e.parentElement}return null}var re=Symbol(\"insertNode\"),jn=Symbol(\"preflightInsertions\"),Bt=Symbol(\"replaceNode\"),Ne=class extends ne{remove(){let e=this.parentNode;e&&e.removeChild(this)}replaceWith(...e){let n=_e(e),r=this.parentNode;if(r)return Vn(o=>{fe(r,n);let s=this[y];for(;s&&n.includes(s);)s=s[y];let i=Fn(r,n,o);this.parentNode===r?r[Bt](i,this,o):r[re](i,s,o)})}before(...e){let n=_e(e),r=this.parentNode;if(r)return Vn(o=>{fe(r,n);let s=this[D];for(;s&&n.includes(s);)s=s[D];let i=Fn(r,n,o);r[re](i,s?s[y]:r.firstChild,o)})}after(...e){let n=_e(e),r=this.parentNode;if(r)return Vn(o=>{fe(r,n);let s=this[y];for(;s&&n.includes(s);)s=s[y];let i=Fn(r,n,o);r[re](i,s,o)})}};function Vn(t){return q(()=>{let e=[];try{t(e)}catch(n){try{Ae(e)}catch{}throw n}Ae(e)})}function _e(t){return t.map(e=>e instanceof ne?e:String(e))}function mt(t,e){return e instanceof ne?e:t.ownerDocument.createTextNode(String(e))}function fe(t,e){for(let n of e){if(!(n instanceof ne))continue;let r=t;for(;r;){if(r===n)throw I(\"Cannot insert a node into itself or one of its descendants\",\"HierarchyRequestError\");r=r[W]??r[ye]}}}function Fn(t,e,n){let r=[];for(let s of e)r.push(mt(t,s));if(r.length===1)return r[0];let o=t.ownerDocument.createDocumentFragment();o[jn](r);for(let s of r)o[re](s,null,n);return o}var Vt,zn=0,Br=0,Vr=0,Fr=0,Ve=!1,Yn=!1,pt=!1,Ft=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=Jo(n),o=Vt??=new WeakMap,s=o.get(e);s==null&&(s=new Map,o.set(e,s));let i=s.get(this);i==null?zn++:qn(i,-1),s.set(this,r),qn(r,1),this.#e.add(e)}disconnect(){let e=Vt;if(e!=null){for(let n of this.#e){let r=e.get(n),o=r?.get(this);o!=null&&(r.delete(this),zn--,qn(o,-1)),r?.size===0&&e.delete(n)}this.#e.clear(),this.#n.length=0,zn===0&&(Vt=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 oe(t){let e=Vt;if(e==null)return;let n=new Map,r=t.target;for(;r;){let o=e.get(r);if(o)for(let[s,i]of o){if(r!==t.target&&!i.subtree)continue;let l=!1;if(t.type===\"attributes\"){if(!i.attributes||i.attributeFilter&&!i.attributeFilter.has(t.attributeName??\"\"))continue;l=i.attributeOldValue}else if(t.type===\"characterData\"){if(!i.characterData)continue;l=i.characterDataOldValue}else if(!i.childList)continue;n.set(s,n.get(s)===!0||l)}r=r.parentNode}for(let[o,s]of n)o.enqueue({addedNodes:t.addedNodes??new te,attributeName:t.attributeName??null,attributeNamespace:t.attributeNamespace??null,nextSibling:t.nextSibling??null,oldValue:s?t.oldValue??null:null,previousSibling:t.previousSibling??null,removedNodes:t.removedNodes??new te,target:t.target,type:t.type})}function jt(...t){let e=new te;return e.push(...t),e}function Jo(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 qn(t,e){t.attributes&&(Br+=e),t.characterData&&(Vr+=e),t.childList&&(Fr+=e),Ve=Br>0,Yn=Vr>0,pt=Fr>0}var ae=class extends Ne{childNodes=new te;children=new te;appendChild(e){return q(()=>this[re](e,null))}insertBefore(e,n){return q(()=>this[re](e,n||null))}append(...e){return q(()=>{let n=_e(e.filter(r=>r!=null));n.length>1&&fe(this,n);for(let r of n)this[re](mt(this,r),null)})}prepend(...e){return q(()=>{let n=_e(e.filter(o=>o!=null));n.length>1&&fe(this,n);let r=this.firstChild;for(let o of n)this[re](mt(this,o),r)})}replaceChildren(...e){return q(()=>{let n=_e(e.filter(o=>o!=null));fe(this,n);let r;for(;r=this.firstChild;)this.removeChildImmediately(r);for(let o of n)this[re](mt(this,o),null)})}removeChild(e){return q(()=>(this.removeChildImmediately(e),e))}removeChildImmediately(e){if(e.parentNode!==this)throw I(\"The node is not a child of this node\",\"NotFoundError\");let n=this[j]?ft(e):void 0,r=e[D],o=e[y],s=zt(this,e);if(n)for(let i of n)i[j]=!1;this.queueRemovalMutationRecord(this,e,r,o),n&&this.enqueueTreeReactions(n,\"disconnectedCallback\"),Ae(this.collectRemovalHookEffects(e,s))}replaceChild(e,n){return q(()=>this[Bt](e,n))}[Bt](e,n,r){if(fe(this,[e]),n.parentNode!==this)throw I(\"The reference node is not a child of this parent\",\"NotFoundError\");let o=n[D],s=n[y],i=this.prepareInsertion(e),l=this[j]?ft(n):void 0,u=new Set(i.map(({node:T})=>T)),d=s;for(;d&&u.has(d);)d=d[y];let p=zt(this,n);if(l){for(let w of l)w[j]=!1;let T=new Set(l);for(let w of i)T.has(w.node)&&(w.shouldDisconnect=!1)}this.commitInsertion(i,d);let b=this[j];return this.queueRemovalMutationRecord(this,n,o,s),this.queueInsertionMutationRecords(i),l&&this.enqueueTreeReactions(l,\"disconnectedCallback\"),this.enqueueInsertionReactions(i,b),this.performOrCollectHookEffects([...this.collectRemovalHookEffects(n,p),...this.collectInsertionHookEffects(i)],r),n}querySelectorAll(e){return It(this,e)}querySelector(e){return Ct(this,e)}[re](e,n,r){return this.validateInsertion(e,n),this.insertIntoValidated(e,n,r),e}[jn](e){for(let n of e)this.validateInsertion(n,null),this.prepareInsertion(n)}validateInsertion(e,n){if(fe(this,[e]),n&&n.parentNode!==this)throw I(\"The reference node is not a child of this parent\",\"NotFoundError\")}insertIntoValidated(e,n,r){e===n&&(n=e[y]);let o=this.prepareInsertion(e);this.commitInsertion(o,n);let s=this[j];this.queueInsertionMutationRecords(o),this.enqueueInsertionReactions(o,s),this.performOrCollectHookEffects(this.collectInsertionHookEffects(o),r)}performOrCollectHookEffects(e,n){n?n.push(...e):Ae(e)}prepareInsertion(e){let n=[];if(e.nodeType===be){let i=e[_];for(;i;)n.push(i),i=i[y]}else n.push(e);let r=this[j],o=this[k],s=[];for(let i of n){let l=i[j],u=l||r,d,p;if(i[k]===o)u&&(d=ft(i));else{let b=kt(i);p=b.nodes,u&&(d=b.treeNodes)}s.push({node:i,nodes:d,adoption:p,shouldDisconnect:l})}return s}commitInsertion(e,n){for(let s of e){let i=s.node[W];if(i){let l=s.node[D],u=s.node[y];s.source={parent:i,index:zt(i,s.node),previousSibling:l,nextSibling:u}}}for(let s of e){let i=this.attachChild(s.node,n);s.insertIndex=i.index,s.previousSibling=i.previousSibling,s.nextSibling=i.nextSibling}let r=this[k];for(let{adoption:s}of e)s&&dt(s,r);let o=this[j];for(let{nodes:s}of e)if(s)for(let i of s)i[j]=o}attachChild(e,n){if(n){let s=n[D];e[y]=n,e[D]=s,s?s[y]=e:this[_]=e,n[D]=e}else{e[y]=null;let s=this[_];if(s){let i;for(;i=s[y];)s=i;s[y]=e,e[D]=s}else this[_]=e,e[D]=null}let r=Y(e);e[W]=this;let o;if(n){if(o=this.childNodes.indexOf(n),this.childNodes.splice(o,0,e),r){let s=n;for(;s&&!Y(s);)s=s[y];s?this.children.splice(this.children.indexOf(s),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[D],nextSibling:e[y]}}queueRemovalMutationRecord(e,n,r,o){pt&&oe({type:\"childList\",target:e,removedNodes:jt(n),previousSibling:r,nextSibling:o})}queueInsertionMutationRecords(e){if(pt)for(let n of e){let{node:r,source:o}=n;o&&this.queueRemovalMutationRecord(o.parent,r,o.previousSibling,o.nextSibling),oe({type:\"childList\",target:this,addedNodes:jt(r),previousSibling:n.previousSibling,nextSibling:n.nextSibling})}}collectRemovalHookEffects(e,n){return this.nodeType!==K||ot(this)?[]:[[()=>this[L].removeChild?.(this,e,n)]]}collectInsertionHookEffects(e){let n=[];for(let r of e){let{node:o,source:s}=r;s?.parent.nodeType===K&&!ot(s.parent)&&n.push([()=>s.parent[L].removeChild?.(s.parent,o,s.index)]),this.nodeType===K&&!ot(this)&&n.push([()=>this[L].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){zr(e,n)}};function jr(t,e,n,r){if(e.parentNode!==t)throw Error(\"not a child of this node\");let o=t[j]?n.treeNodes:void 0,s=e[D],i=e[y],l=zt(t,e);if(o)for(let d of o)d[j]=!1;dt(n.nodes,r),pt&&oe({type:\"childList\",target:t,removedNodes:jt(e),previousSibling:s,nextSibling:i}),o&&zr(o,\"disconnectedCallback\");let u=[];t.nodeType===K&&!ot(t)&&u.push([()=>t[L].removeChild?.(t,e,l)]),Ae(u)}function zt(t,e){let n=e[D],r=e[y];n?n[y]=r:t[_]=r,r&&(r[D]=n);let o=t.childNodes.indexOf(e);return t.childNodes.splice(o,1),Y(e)&&t.children.splice(t.children.indexOf(e),1),e[W]=null,e[y]=null,e[D]=null,o}function zr(t,e){for(let n of t){let r=n[e];typeof r==\"function\"&&xt(n,()=>r.call(n))}}function ht(t,e,n,r,o){let{observedAttributes:s}=t.constructor,{attributeChangedCallback:i}=t;i==null||s==null||!s.includes(e)||xt(t,()=>i.call(t,e,n,r,o))}var qt=class{[_]=null;constructor(e){this[$]=e}getNamedItem(e){let n=String(e),r=this[$][O]===C?V(n):n,o=this[_];for(;o;){if(o.name===r)return o;o=o[y]}return null}getNamedItemNS(e,n){let r=de(e),o=String(n),s=this[_];for(;s;){if(s.localName===o&&s[O]===r)return s;s=s[y]}return null}item(e){let n=this[_],r=0;for(;n;){if(r++===e)return n;n=n[y]}return null}get length(){let e=0,n=this[_];for(;n;)e++,n=n[y];return e}removeNamedItem(e){let n=String(e),r=this[$][O]===C?V(n):n;return q(()=>this.removeNamedItemImmediately(o=>o.name===r))}removeNamedItemNS(e,n){let r=de(e),o=String(n);return q(()=>this.removeNamedItemImmediately(s=>s.localName===o&&s[O]===r))}removeNamedItemImmediately(e){let n=this[$],r=this[_],o=null;for(;r!=null;){if(e(r)){o&&(o[y]=r[y]),this[_]===r&&(this[_]=r[y]);let s=r.value;return r[y]=null,r[$]=null,Ve&&oe({type:\"attributes\",target:n,attributeName:r.name,attributeNamespace:r[O],oldValue:s}),n[L].removeAttribute?.(n,r.name,r[O]),ht(n,r.localName,s,null,r[O]),r}o=r,r=r[y]}return null}setNamedItem(e){return q(()=>this.setNamedItemImmediately(e))}setNamedItemImmediately(e){let n=this[$],r=e[$];if(r!=null&&r!==n)throw I(\"The attribute is already in use by another element.\",\"InUseAttributeError\");let o=null,s=this[_],i=null;for(;s;){if(s.localName===e.localName&&s[O]===e[O]){if(s===e)return s;i?i[y]=e:this[_]=e,e[y]=s[y],s[y]=null,o=s;break}i=s,s=s[y]}o==null&&(i?i[y]=e:this[_]=e),e[$]=n,e[k]=n[k],o&&(o[$]=null);let l=o==null||o.value!==e.value,u=o!=null&&o.name!==e.name;return l&&Ve&&oe({type:\"attributes\",target:n,attributeName:e.name,attributeNamespace:e[O],oldValue:o?.value??null}),u&&n[L].removeAttribute?.(n,o.name,o[O]),(l||u)&&n[L].setAttribute?.(n,e.name,e.value,e[O]),l&&ht(n,e.localName,o?.value??null,e.value,e[O]),o}setNamedItemNS(e){return this.setNamedItem(e)}*[Symbol.iterator](){let e=this[_];for(;e;)yield e,e=e[y]}};var Pe=class extends ne{nodeType=He;[O]=null;[y]=null;[$]=null;constructor(e,n,r){super(),this[x]=e,this[ge]=n,r&&(this[O]=r)}get nodeName(){return this[x]}set nodeName(e){}get name(){return this[x]}set name(e){}get localName(){if(this[O]==null)return this[x];let e=this[x].indexOf(\":\");return e<0?this[x]:this[x].slice(e+1)}get prefix(){if(this[O]==null)return null;let e=this[x].indexOf(\":\");return e<0?null:this[x].slice(0,e)}get value(){return this[ge]}set value(e){let n=String(e),r=this[$];if(!r){this[ge]=n;return}q(()=>{let o=this[ge];this[ge]=n,Ve&&o!==n&&oe({type:\"attributes\",target:r,attributeName:this[x],attributeNamespace:this[O],oldValue:o}),this[L].setAttribute?.(r,this[x],n,this[O]),ht(r,this.localName,o,n,this[O])})}get nodeValue(){return this.value}set nodeValue(e){this.value=e}get ownerElement(){return this[$]}get namespaceURI(){return this[O]}get specified(){return!0}};var es={amp:\"&\",AMP:\"&\",apos:\"'\",gt:\">\",GT:\">\",lt:\"<\",LT:\"<\",quot:'\"',QUOT:'\"'},ts=new Set([\"area\",\"base\",\"br\",\"col\",\"embed\",\"hr\",\"img\",\"input\",\"link\",\"meta\",\"param\",\"source\",\"track\",\"wbr\"]),ns=/(?:<([a-z][a-z0-9-:]*)((?:[\\s]+[^<>'\"=/\\s]+(?:=(['\"])[^]*?\\3|=[^>'\"\\s]*|))*)[\\s]*(\\/?)\\s*>|<\\/([a-z][a-z0-9-:]*)>|<!--(.*?)-->|([^<>]+))/gi,$r=/\\s([^<>'\"=/\\n\\s]+)(?:=([\"'])([\\s\\S]*?)\\2|=([^>'\"\\n\\s]*)|)/g,rs=\"|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|\",os=/^(?:color|face|size)$/i;function qr(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 es[n];let s=Number.parseInt(r??o,r?10:16);try{return String.fromCodePoint(s)}catch{return e}})}function Wr(t){return t.namespaceURI===C&&ts.has(t.localName)}function Yr(t){let e=t.localName;return t[O]===ee&&(e===\"foreignObject\"||e===\"desc\"||e===\"title\")}function ss(t,e){if(rs.includes(`|${t}|`))return!0;if(t!==\"font\")return!1;for(let n of e.matchAll($r))if(os.test(n[1]))return!0;return!1}function Yt(t,e){let n=e.ownerDocument,r=n.createDocumentFragment(),o=[],s=r;for(let i of t.matchAll(ns)){let l=i[1];if(l){let u=i[2],d=V(l),p=o[o.length-1]?.element??e,b=p[O]===ee?ee:C;if(d===\"svg\")b=ee;else if(b===ee){if(Yr(p))b=C;else if(ss(d,u)){for(;o.length>0;){let A=o[o.length-1];if(A.element[O]!==ee||Yr(A.element))break;o.pop(),s=A.target}b=C}}let T=b===C?d:l,w=n[Ge](T,b,null,T);for(let A of u.matchAll($r))w.setAttribute(A[1],qr(A[3]||A[4]||\"\"));if(s.append(w),Wr(w)||b!==C&&i[4])continue;o.push({element:w,target:s}),s=b===C&&d===\"template\"?w.content:w}else if(i[5]){let u=V(i[5]);for(let d=o.length-1;d>=0;d--){let p=o[d],b=V(p.element[x]);if(b===u){s=p.target,o.length=d;break}if(p.element[O]===C&&b===\"template\")break}}else i[6]?s.append(n.createComment(i[6])):s.append(qr(i[7]))}return r}function $t(t){return Kr([{type:\"content\",child:t[_]}])}function Xr(t){return Kr([{type:\"opening\",node:t}])}function Kr(t){let e=[],n;for(;n=t.pop();)switch(n.type){case\"opening\":{let r=n.node;switch(r.nodeType){case K:{let o=r;e.push(`<${o[x]}`);let s=o[ie]?.[_];for(;s;){e.push(` ${s[x]}`);let l=s[ge];l!==\"\"&&(l=String(l).replace(/&/g,\"&amp;\").replace(/\"/g,\"&quot;\"),e.push(`=\"${l}\"`)),s=s[y]}if(e.push(\">\"),Wr(o))break;let i=o.namespaceURI===C&&o.localName===\"template\"?o[ue]:o;t.push({type:\"closing\",name:o[x]}),t.push({type:\"content\",child:i?.[_]??null});break}case Ue:{let o=r;e.push(o[J].replace(/&/g,\"&amp;\").replace(/\"/g,\"&quot;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\"));break}case Be:{let o=r;e.push(`<!--${o[J]}-->`);break}}break}case\"content\":{let r=n.child;r&&(t.push({type:\"content\",child:r[y]}),t.push({type:\"opening\",node:r}));break}case\"closing\":e.push(`</${n.name}>`);break}return e.join(\"\")}var F=class extends ae{nodeType=K;[O]=C;[he]=null;get namespaceURI(){return this[O]}get prefix(){return this[he]}get localName(){let e=this[he];return e==null?this[x]:this[x].slice(e.length+1)}get nodeName(){return this[O]===C?vr(this[x]):this[x]}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 Pe(\"slot\",n))}get attributes(){let e=this[ie];return e||(e=new qt(this),this[ie]=e),e}getAttributeNames(){return[...this.attributes].map(e=>e.name)}getElementsByTagName(e){return Ht(this,e)}get firstElementChild(){return this.children[0]??null}getElementsByClassName(e){return Gt(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);An(r);let s=this[O]===C?V(r):r,i=this.attributes.getNamedItemNS(null,s);i?i.value=o:this.attributes.setNamedItem(new Pe(s,o))}setAttributeNS(e,n,r){let o=de(e),s=String(n),i=String(r),l=Tt(o,s,\"attribute\"),u=this.attributes.getNamedItemNS(l.namespace,l.localName);u?u.value=i:this.attributes.setNamedItemNS(new Pe(l.qualifiedName,i,l.namespace))}toggleAttribute(e,n){let r=String(e);An(r);let o=this[O]===C?V(r):r,s=this.attributes.getNamedItemNS(null,o),i=n===void 0?void 0:!!n;return s==null?i===!1?!1:(this.attributes.setNamedItem(new Pe(o,\"\")),!0):i===!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[O]===C?V(n):n;this.attributes.removeNamedItemNS(null,r)}removeAttributeNS(e,n){this.attributes.removeNamedItemNS(e,n)}get outerHTML(){return Xr(this)}get innerHTML(){return $t(this)}set innerHTML(e){if(e==null||e===\"\")this.replaceChildren();else{let n=Yt(String(e),this);this.replaceChildren(n)}}};var Fe=class t extends F{[O]=ee;get ownerSVGElement(){let e=null,n=this.parentNode;for(;n instanceof t;)e=n,n=n.parentNode;return e}};var Te=class extends Ne{[J]=\"\";constructor(e){super(),this[J]=e==null?\"\":String(e)}setData(e){let n=Yn,r=n?this[J]:null,o=\"\";e!=null&&(o=typeof e==\"string\"?e:String(e)),this[J]=o,n&&r!==o&&oe({type:\"characterData\",target:this,oldValue:r}),this[L].setText?.(this,o)}get data(){return this[J]}set data(e){this.setData(e)}};var je=class extends Te{nodeType=Ue;[x]=\"#text\"};var ze=class extends Te{nodeType=Be;[x]=\"#comment\"};var qe=class extends ae{nodeType=be;[x]=\"#document-fragment\";[k]=typeof window<\"u\"?window.document:null;getElementById(e){return Lt(this,e)}};var Ye=class extends F{get content(){let e=this[ue];return e||(e=this.ownerDocument.createDocumentFragment(),e[ye]=this,this[ue]=e),e}set content(e){}set innerHTML(e){this.content.replaceChildren(Yt(String(e),this))}get innerHTML(){let e=this[ue];return e?$t(e):\"\"}};var Wt=class extends F{};var Xt=class extends F{};var Kt=class extends F{};var gt=class extends ae{nodeType=Re;[x]=\"#document\";[j]=!0;constructor(e){super(),this.defaultView=e,this[k]=this,this.documentElement=Qt(new Kt,this,\"html\"),this.body=Qt(new Wt,this,\"body\"),this.head=Qt(new Xt,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 Gt(this,e)}createElement(e){let n=String(e);return Rr(n),$n(this,V(n))}createElementNS(e,n){let r=Tt(e,n,\"element\");return $n(this,r.qualifiedName,r.namespace,r.prefix,r.localName)}[Ge](e,n,r,o){return $n(this,e,n,r,o)}createTextNode(e){let n=Zt(new je(e),this);return this[L].createText?.(n,n.data),n}createComment(e){return Zt(new ze(e),this)}createDocumentFragment(){return Zt(new qe,this)}createEvent(){return new z(\"\")}getElementById(e){return Lt(this,e)}getElementsByTagName(e){return Ht(this,e)}importNode(e,n){if(e.nodeType===Re)throw I(\"Cannot import a document node\",\"NotSupportedError\");return Dt(e,n,this)}adoptNode(e){if(e[k]===this)return e;let n=kt(e);return q(()=>{let r=e.parentNode;return r?jr(r,e,n,this):dt(n.nodes,this),e})}};function Zt(t,e){return Object.defineProperty(t,k,{value:e,writable:!0,enumerable:!1}),t}function $n(t,e,n=C,r=null,o=e){let s;if(n===ee)s=new Fe;else if(n===C&&o===\"template\")s=new Ye;else if(n===C){let i=t.defaultView.customElements.get(o);s=i?new i:new F}else s=new F;return Qt(s,t,e,n,r)}function Qt(t,e,n,r=C,o=null){return Zt(t,e),Object.defineProperties(t,{[x]:{value:n},[O]:{value:r},[he]:{value:o}}),e[L].createElement?.(t,r),t}var Jt=class extends z{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 en=class extends z{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 tn=class extends z{constructor(e,n){super(e,n),this.promise=n.promise,this.reason=n.reason}};var nn=class extends z{constructor(e,n){super(e,n),this.oldState=n.oldState,this.newState=n.newState}};var rn=class extends z{constructor(e,n={}){super(e,n),this.relatedTarget=n.relatedTarget??null}};var on=class extends z{constructor(e,n={}){super(e,n),this.clipboardData=n.clipboardData??null}};var sn=class extends F{};var is=/^[a-z][^A-Z\\u0000\\t\\n\\f\\r />]*-[^A-Z\\u0000\\t\\n\\f\\r />]*$/u,as=new Set([\"annotation-xml\",\"color-profile\",\"font-face\",\"font-face-src\",\"font-face-uri\",\"font-face-format\",\"font-face-name\",\"missing-glyph\"]);function Zr(t){return is.test(t)&&!as.has(t)}function Qr(t){return I(`Invalid custom element name: \"${t}\"`,\"SyntaxError\")}var an=class{registry=new Map;listenersByName=new Map;define(e,n,r){if(!Zr(e))throw Qr(e);if(this.registry.has(e))throw I(`A custom element named \"${e}\" has already been defined`,\"NotSupportedError\");if(this.getName(n)!=null)throw I(\"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 s of o)s(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(!Zr(e))return Promise.reject(Qr(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 ls=[\"onerror\",\"onunhandledrejection\"],eo=Symbol.for(\"@remote-dom/polyfill/global-property\");function to(t){return Object.getOwnPropertyDescriptors(t)}function no(t){let e={};for(let[n,r]of Object.entries(Object.getOwnPropertyDescriptors(Ee.prototype)))n!==\"constructor\"&&typeof r.value==\"function\"&&(r.value=Wn(r.value.bind(t)),e[n]=r);return e}function ro(t){let e={};for(let n of ls)e[n]={configurable:!0,enumerable:!0,get:Wn(()=>t[n]),set:Wn(r=>{t[n]=r})};return e}function cs(t){return Object.assign(to(t),no(t),ro(t))}function Wn(t){return Object.defineProperty(t,eo,{value:!0}),t}function Jr(t,e){for(let n of Reflect.ownKeys(e)){let r=us(t,n);(r==null||ds(r))&&Object.defineProperty(t,n,e[n])}}function us(t,e){let n=t;for(;n;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function ds(t){return[t.value,t.get,t.set].some(e=>typeof e==\"function\"&&e[eo]===!0)}var Me=class extends Ee{[L]={};[Et]=[];[Oe]=ms(this);name=\"\";window=this;parent=this;self=this;top=this;document=new gt(this);customElements=new an;location=globalThis.location;navigator=globalThis.navigator;Event=z;ErrorEvent=en;PromiseRejectionEvent=tn;ToggleEvent=nn;FocusEvent=rn;ClipboardEvent=on;EventTarget=Ee;CustomEvent=Jt;Node=ne;ParentNode=ae;ChildNode=Ne;DocumentFragment=qe;Document=gt;CharacterData=Te;Comment=ze;Text=je;Element=F;HTMLElement=sn;SVGElement=Fe;HTMLTemplateElement=Ye;MutationObserver=Ft;#t=null;#n=null;#e=null;static with(...e){let n=this;return class extends n{constructor(){super();for(let o of e)fs(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=to(e),s=Object.assign(no(e),ro(e));delete o.self,Object.defineProperties(globalThis,o),Jr(globalThis,s),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),Jr(n,s))}static setGlobalThis(e){for(let n in e)e[n]===e&&(e[n]=globalThis);Object.defineProperties(globalThis,cs(e))}};function fs(t,e){t[Et].push(e(t)??{})}function ms(t){return{createElement:me.bind(null,t,\"createElement\"),setAttribute:me.bind(null,t,\"setAttribute\"),removeAttribute:me.bind(null,t,\"removeAttribute\"),createText:me.bind(null,t,\"createText\"),setText:me.bind(null,t,\"setText\"),insertChild:me.bind(null,t,\"insertChild\"),removeChild:me.bind(null,t,\"removeChild\"),addEventListener:me.bind(null,t,\"addEventListener\"),removeEventListener:me.bind(null,t,\"removeEventListener\")}}function me(t,e,...n){for(let s of t[Et])s[e]?.apply(s,n);let r=t[L];r[e]?.apply(r,n)}var ln=new Me;var Xn=\"~\";var we=new WeakMap;function $e(t){return we.get(t)}var Jn=new WeakMap,hs=0;function Z(t){let e=Jn.get(t);return e==null&&(e=String(hs++),cn(t,e)),e}function cn(t,e){Jn.set(t,e)}var Zn=new WeakMap;function gs(t){return Zn.get(t)}var Qn=new WeakMap;function ys(t){let e=Qn.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 bs=new WeakMap;function Es(t){return bs.get(t)}function er(t,e,n){let r=Zn.get(t);if(r==null&&(r={},Zn.set(t,r)),r[e]===n)return;r[e]=n;let o=we.get(t);o?.mutate([[3,Z(t),e,n,1]])}function Se(t,e,n){let r=Qn.get(t);if(r==null&&(r={},Qn.set(t,r)),r[e]===n)return;n==null?delete r[e]:r[e]=String(n);let o=we.get(t);o?.mutate([[3,Z(t),e,n,2]])}function We(t,e){if(we.get(t)!==e&&(we.set(t,e),t.childNodes))for(let r=0;r<t.childNodes.length;r++)We(t.childNodes[r],e)}function un(t){if(we.get(t)!=null&&(we.delete(t),t.childNodes))for(let n=0;n<t.childNodes.length;n++)un(t.childNodes[n])}function Xe(t){let{nodeType:e}=t;switch(e){case 1:return{id:Z(t),type:e,element:t.localName,properties:Kn(gs(t)),attributes:Kn(ys(t)),eventListeners:Kn(Es(t)),children:Array.from(t.childNodes).map(Xe)};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 Kn(t){return t?{...t}:void 0}function tr(t,e,...n){let r=Jn.get(t),o=we.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 Ke=ln[L];Ke.insertChild=(t,e,n)=>{let r=$e(t);r!=null&&(We(e,r),r.mutate([[0,Z(t),Xe(e),n]]))};Ke.removeChild=(t,e,n)=>{let r=$e(t);r!=null&&(un(e),r.mutate([[1,Z(t),n]]))};Ke.setText=(t,e)=>{let n=$e(t);n?.mutate([[2,Z(t),e]])};Ke.setAttribute=(t,e,n)=>{t.tagName.includes(\"-\")||Se(t,e,n)};Ke.removeAttribute=(t,e)=>{t.tagName.includes(\"-\")||Se(t,e)};Me.setGlobal(ln);function dn(t){if(typeof t==\"string\")return{type:\"navigate\",to:t};let{place:e,record:n,where:r,section:o}=t??{},s={...r===void 0?{}:{where:r},...o===void 0?{}:{section:String(o)}};return typeof e==\"string\"?{type:\"navigate\",place:e,...s}:typeof n==\"string\"?{type:\"navigate\",to:n,...s}:void 0}var so=[\"wheel\",\"drag\",\"pinch\"];function io(t){let e=t;return typeof t==\"object\"&&t!==null&&e.graview===\"host-hello\"&&typeof e.nonce==\"string\"}function lo(t,e={}){let n,r=\"\",o,s=0,i=new Set,l=new Set,u=!1,d=new Map,p=[],b=v=>{n?n.postMessage({...v,nonce:r}):p.push(v)},T=v=>{let E=v.data;if(!(!E||typeof E!=\"object\")){if(E.type===\"props\"){o=E.props;for(let N of i)N(E.props)}else E.type===\"answer\"?(d.get(E.id)?.(E),d.delete(E.id)):E.type===\"event\"&&typeof E.listener==\"number\"?e.onEvent?.(E):E.type===\"away\"&&typeof E.away==\"boolean\"?u=E.away:E.type===\"heartbeat\"&&typeof E.beat==\"number\"&&b({type:\"heartbeat\",beat:E.beat});if(e.onMessage?.(E),E.type===\"away\"&&typeof E.away==\"boolean\")for(let N of[...l])try{N(E.away)}catch(R){console.error(R)}}},w=()=>{},A=v=>{if(n||!t.fromHost(v)||!io(v.data)||v.data.protocol!==1)return;let E=v.ports[0];if(E){n=E,r=v.data.nonce,n.onmessage=T,n.start?.(),w();for(let N of p.splice(0))b(N)}};w=t.listen(A),t.ready({graview:\"guest-ready\",protocol:1});let P,U={get props(){return o},subscribe(v){return i.add(v),()=>i.delete(v)},get away(){return u},onAway(v){return l.add(v),()=>void l.delete(v)},act(v,E={}){let N=s+=1;return new Promise(R=>{d.set(N,R),b({type:\"act\",id:N,name:v,args:E})})},navigate(v){let E=dn(v);E&&b(E)},size(v){b({type:\"size\",height:v})},autoSize(v){let E=v??globalThis.document?.documentElement,N=globalThis.ResizeObserver;if(!E||!N||typeof E.getBoundingClientRect!=\"function\")return()=>{};P?.disconnect();let R=new N(()=>U.size(Math.ceil(E.getBoundingClientRect().height)));return R.observe(E),P=R,()=>R.disconnect()},close(){P?.disconnect(),w(),n?.close(),i.clear(),l.clear()}};return{guest:U,send:b}}var uo=[\"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\"],fo=[\"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\"],mo=[\"self\",\"postMessage\",\"setTimeout\",\"clearTimeout\",\"setInterval\",\"clearInterval\",\"queueMicrotask\",\"structuredClone\",\"crypto\",\"console\",\"DOMException\"],po=[\"TEMPORARY\",\"PERSISTENT\"],Zl=Object.freeze([...uo,...fo,...mo,...po]),Ql=Object.freeze([\"constructor\",\"__defineGetter__\",\"__defineSetter__\",\"hasOwnProperty\",\"__lookupGetter__\",\"__lookupSetter__\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"toString\",\"valueOf\",\"__proto__\",\"toLocaleString\"]),co=t=>typeof t==\"symbol\"?`[${t.description??\"symbol\"}]`:t;function ho(t=globalThis,e=[],n={}){let r=[],o=[],s=new Set([...uo,...fo,...mo,...e,\"constructor\",Symbol.toStringTag]),i=(N,R)=>{let G=Reflect.getOwnPropertyDescriptor(N,R);return G===void 0||!(\"value\"in G)||G.writable||G.configurable?!1:n.primitivesStay&&typeof R==\"symbol\"&&(typeof G.value!=\"object\"||G.value===null)&&typeof G.value!=\"function\"?!0:po.includes(R)&&typeof G.value==\"number\"},l=t,u=l.setTimeout,d=l.setInterval,p=l.crypto,b=(N,R)=>function(G,Ze,...Qe){if(typeof G!=\"function\")throw new TypeError(`${R} takes a function: a guest view cannot run code from text`);return N.call(t,G,Ze,...Qe)},T=p?Object.freeze({getRandomValues:N=>p.getRandomValues(N)}):void 0,w=l.document?.defaultView;if(w&&w!==l)for(let N of Reflect.ownKeys(w))typeof N==\"symbol\"||s.has(N)||Reflect.deleteProperty(w,N)||o.push(`window.${N}`);let A=[];for(let N=t;N&&N!==Object.prototype;N=Object.getPrototypeOf(N))A.push(N);for(let N of A)for(let R of Reflect.ownKeys(N))s.has(R)||(Reflect.deleteProperty(N,R)?r.push(co(R)):i(N,R)||o.push(co(R)));let P=()=>function(){throw new EvalError(\"A guest view cannot make code from text.\")},U=[Function.prototype,Object.getPrototypeOf(async function(){}),Object.getPrototypeOf(function*(){}),Object.getPrototypeOf(async function*(){})];for(let N of U){let R=P();Object.defineProperty(R,\"prototype\",{value:N,writable:!1,enumerable:!1,configurable:!1}),Reflect.defineProperty(N,\"constructor\",{value:R,writable:!1,enumerable:!1,configurable:!1})||o.push(\"Function.prototype.constructor\"),N===Function.prototype&&Reflect.defineProperty(t,\"Function\",{value:R,writable:!0,enumerable:!1,configurable:!0})}let v=(N,R)=>{Reflect.defineProperty(t,N,{value:R,writable:!0,enumerable:!0,configurable:!0})||o.push(N)};v(\"setTimeout\",b(u,\"setTimeout\")),v(\"setInterval\",b(d,\"setInterval\")),T&&v(\"crypto\",T);for(let N of A.slice(1))Object.freeze(N);for(let N of Reflect.ownKeys(t)){let R=Reflect.getOwnPropertyDescriptor(t,N);Reflect.defineProperty(t,N,\"value\"in R?{...R,writable:!1,configurable:!1}:{...R,configurable:!1})}let E;try{E=Reflect.preventExtensions(t)}catch{E=!1}return{removed:r,stuck:o,sealed:E}}var yt=class extends HTMLElement{constructor(){super(),cn(this,Xn)}connect(e){if($e(this)===e||(We(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,Xn,Xe(o),r])}e.mutate(n)}updateRemoteProperty(e,n){er(this,e,n)}callRemoteMethod(e,...n){return tr(this,e,...n)}};var m={},nr={empty:!0},Ns={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\"},rr={div:m,section:m,article:m,aside:m,header:m,footer:m,nav:m,hgroup:m,search:m,address:m,figure:m,figcaption:m,blockquote:m,p:m,pre:m,hr:nr,br:nr,wbr:nr,h1:m,h2:m,h3:m,h4:m,h5:m,h6:m,span:m,strong:m,em:m,b:m,i:m,u:m,s:m,small:m,mark:m,abbr:m,cite:m,q:m,code:m,kbd:m,samp:m,var:m,sub:m,sup:m,dfn:m,bdi:m,bdo:m,ruby:m,rt:m,rp:m,time:{attributes:{datetime:\"text\"}},data:{attributes:{value:\"text\"}},del:{attributes:{datetime:\"text\"}},ins:{attributes:{datetime:\"text\"}},a:{attributes:{href:\"link\"}},ul:m,menu:m,dl:m,dt:m,dd:m,ol:{attributes:{start:\"number\",reversed:\"boolean\",type:{oneOf:[\"1\",\"a\",\"A\",\"i\",\"I\"]}}},li:{attributes:{value:\"number\"}},table:m,caption:m,thead:m,tbody:m,tfoot:m,tr:m,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:m,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:m,output:m,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\"]},loading:{oneOf:[\"lazy\",\"eager\"]},fetchpriority:{oneOf:[\"high\",\"low\",\"auto\"]}}},\"graview-video\":{empty:!0,attributes:{autoplay:\"boolean\",cover:\"boolean\",poster:\"image\"}}},Ts=[\"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\",\"filter\",\"flood-color\",\"flood-opacity\",\"lighting-color\",\"color-interpolation-filters\"],ws={id:\"text\",class:\"text\",style:\"style\",lang:\"text\",role:\"text\",tabindex:{oneOf:[\"-1\",\"0\"]},transform:\"geometry\",...Object.fromEntries(Ts.map(t=>[t,\"css\"]))},pe={x:\"geometry\",y:\"geometry\",width:\"geometry\",height:\"geometry\"},fn={viewBox:\"geometry\",preserveAspectRatio:\"geometry\"},go={oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},yo={oneOf:[\"R\",\"G\",\"B\",\"A\"]},se={...pe,in:\"text\",result:\"text\"},bo={gradientUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},gradientTransform:\"geometry\",spreadMethod:{oneOf:[\"pad\",\"reflect\",\"repeat\"]},href:\"fragment\"},Eo={svg:{attributes:{...pe,...fn}},g:m,defs:m,symbol:{attributes:{...pe,...fn,refX:\"geometry\",refY:\"geometry\"}},use:{attributes:{...pe,href:\"fragment\"}},title:m,desc:m,path:{attributes:{d:\"geometry\",pathLength:\"number\"}},rect:{attributes:{...pe,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\",...bo}},radialGradient:{attributes:{cx:\"geometry\",cy:\"geometry\",r:\"geometry\",fx:\"geometry\",fy:\"geometry\",fr:\"geometry\",...bo}},stop:{attributes:{offset:\"geometry\"}},clipPath:{attributes:{clipPathUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},mask:{attributes:{...pe,maskUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},maskContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},pattern:{attributes:{...pe,...fn,patternUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternTransform:\"geometry\",href:\"fragment\"}},marker:{attributes:{...fn,markerWidth:\"geometry\",markerHeight:\"geometry\",refX:\"geometry\",refY:\"geometry\",orient:\"geometry\",markerUnits:{oneOf:[\"strokeWidth\",\"userSpaceOnUse\"]}}},a:m,filter:{attributes:{...pe,filterUnits:go,primitiveUnits:go}},feBlend:{attributes:{...se,in2:\"text\",mode:\"text\"}},feColorMatrix:{attributes:{...se,type:{oneOf:[\"matrix\",\"saturate\",\"hueRotate\",\"luminanceToAlpha\"]},values:\"geometry\"}},feComponentTransfer:{attributes:se},...Object.fromEntries([\"feFuncR\",\"feFuncG\",\"feFuncB\",\"feFuncA\"].map(t=>[t,{attributes:{type:{oneOf:[\"identity\",\"table\",\"discrete\",\"linear\",\"gamma\"]},tableValues:\"geometry\",slope:\"number\",intercept:\"number\",amplitude:\"number\",exponent:\"number\",offset:\"number\"}}])),feComposite:{attributes:{...se,in2:\"text\",operator:{oneOf:[\"over\",\"in\",\"out\",\"atop\",\"xor\",\"lighter\",\"arithmetic\"]},k1:\"number\",k2:\"number\",k3:\"number\",k4:\"number\"}},feDisplacementMap:{attributes:{...se,in2:\"text\",scale:\"number\",xChannelSelector:yo,yChannelSelector:yo}},feDropShadow:{attributes:{...se,dx:\"number\",dy:\"number\",stdDeviation:\"geometry\"}},feFlood:{attributes:se},feGaussianBlur:{attributes:{...se,stdDeviation:\"geometry\",edgeMode:{oneOf:[\"duplicate\",\"wrap\",\"none\"]}}},feMerge:{attributes:se},feMergeNode:{attributes:{in:\"text\"}},feMorphology:{attributes:{...se,operator:{oneOf:[\"erode\",\"dilate\"]},radius:\"geometry\"}},feOffset:{attributes:{...se,dx:\"number\",dy:\"number\"}},feTurbulence:{attributes:{...pe,result:\"text\",type:{oneOf:[\"fractalNoise\",\"turbulence\"]},baseFrequency:\"geometry\",numOctaves:\"number\",seed:\"number\",stitchTiles:{oneOf:[\"stitch\",\"noStitch\"]}}}};var No={section:[\"aria-label\",\"title\"]};function Ss(t){return/^aria-[a-z]+$/.test(t)}function vs(t){return/^data-[a-z0-9][a-z0-9_.-]*$/.test(t)}var xs=new Map(Object.keys(Eo).map(t=>[t.toLowerCase(),t]));function To(t){return xs.get(t.toLowerCase())}function wo(t,e,n){let r=n.toLowerCase(),o=t===\"html\"?[rr[e]?.attributes,Ns]:[Eo[e]?.attributes,ws],s=t===\"svg\"&&r===\"xlink:href\"?\"href\":r;for(let i of o)if(i){for(let[l,u]of Object.entries(i))if(l.toLowerCase()===s)return{name:l,kind:u}}if(Ss(r)||vs(r))return{name:r,kind:\"text\"}}var So=/^[a-z0-9][a-z0-9_-]{0,63}$/i;var mn=/^\\d{4}-\\d{2}-\\d{2}$/;function Os(t,e){if(typeof t!=\"string\"||typeof e!=\"string\"||!mn.test(t)||!mn.test(e))return;let n=Math.round((Date.parse(`${t}T00:00:00Z`)-Date.parse(`${e}T00:00:00Z`))/864e5);return Number.isFinite(n)?n:void 0}function vo(t,e,n={}){let r=Os(t,e);if(r===void 0)return\"\";if(r===0)return\"today\";if(r===1)return\"tomorrow\";if(r<0&&n.due===!0)return\"overdue\";if(r===-1)return\"yesterday\";let o=Math.abs(r),[s,i]=o<14?[o,\"day\"]:o<60?[Math.round(o/7),\"week\"]:o<730?[Math.round(o/30.44),\"month\"]:[Math.round(o/365.25),\"year\"],l=`${s} ${i}${s===1?\"\":\"s\"}`;return r>0?`in ${l}`:`${l} ago`}function xo(t,e){if(typeof t!=\"string\")return;if(mn.test(t))return t;let n=Date.parse(t);if(Number.isFinite(n)){if(!/(Z|[+-]\\d\\d:?\\d\\d)$/.test(t))return mn.test(t.slice(0,10))?t.slice(0,10):void 0;try{let r=new Intl.DateTimeFormat(\"en-CA\",{timeZone:e||\"UTC\",year:\"numeric\",month:\"2-digit\",day:\"2-digit\"}).formatToParts(n),o=s=>r.find(i=>i.type===s)?.value??\"\";return`${o(\"year\")}-${o(\"month\")}-${o(\"day\")}`}catch{return new Date(n).toISOString().slice(0,10)}}}var Oo=\"~\",pn=t=>typeof t==\"object\"&&t!==null&&!Array.isArray(t),le=(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=>le(n,e+1)):Object.fromEntries(Object.entries(t).map(([n,r])=>[n,le(r,e+1)]))};function Ro(){let t=new Map,e=new Map,n=new Map([[Oo,{children:[],listeners:new Map}]]),r=0,o=d=>{let p=e.get(d);return p===void 0&&(p=r+=1,e.set(d,p),t.set(p,{listener:d,count:0})),t.get(p).count+=1,p},s=d=>{let p=t.get(d);p&&(p.count-=1,!(p.count>0)&&(t.delete(d),e.delete(p.listener)))},i=d=>{let p=n.get(d);if(p){n.delete(d);for(let b of p.listeners.values())s(b);for(let b of p.children)i(b)}},l=(d,p,b=0)=>{if(!pn(d)||b>64)return le(d);let T=typeof d.id==\"string\"?d.id:void 0,w=p&&T!==void 0&&T!==Oo;w&&i(T);let A={children:[],listeners:new Map};w&&n.set(T,A);let P={};for(let[U,v]of Object.entries(d))U===\"children\"&&Array.isArray(v)?P[U]=v.map(E=>{let N=l(E,w,b+1);return w&&pn(E)&&typeof E.id==\"string\"&&A.children.push(E.id),N}):U===\"eventListeners\"&&pn(v)?P[U]=Object.fromEntries(Object.entries(v).map(([E,N])=>{if(typeof N!=\"function\"||!w)return[E,void 0];let R=o(N);return A.listeners.set(E,R),[E,{listener:R}]})):P[U]=le(v,b+1);return P},u=d=>{if(!Array.isArray(d))return le(d);let[p,b]=d,T=typeof b==\"string\"?n.get(b):void 0;if(p===0){let w=l(d[2],T!==void 0),A=pn(d[2])?d[2].id:void 0;if(T&&typeof A==\"string\"&&n.has(A)){let P=Number(d[3]);T.children.splice(Number.isInteger(P)&&P>=0&&P<=T.children.length?P:T.children.length,0,A)}return[p,le(b),w,le(d[3])]}if(p===1){let w=Number(d[2]);return T&&Number.isInteger(w)&&w>=0&&w<T.children.length&&i(T.children.splice(w,1)[0]),le(d)}if(p===3&&d[4]===3){let w=String(d[2]),A=d[3],P=T&&typeof A==\"function\"?o(A):void 0,U=T?.listeners.get(w);return U!==void 0&&s(U),P===void 0?T?.listeners.delete(w):T.listeners.set(w,P),[p,le(b),w,P===void 0?void 0:{listener:P},3]}return le(d)};return{encode:d=>d.map(u),listener:d=>t.get(d)?.listener,get listening(){return t.size},get nodes(){return n.size-1}}}var hn=\"graview-view-root\",As=[\"value\",\"checked\",\"key\",\"pressed\",\"files\",\"refused\",\"x\",\"y\",\"width\",\"height\",\"deltaX\",\"deltaY\",\"deltaMode\",\"ctrlKey\",\"metaKey\",\"phase\",\"pointerId\",\"button\",\"pressure\",\"dx\",\"dy\",\"scale\",\"rotation\"],_s=new Set([\"div\",\"li\",\"article\"]),sr=t=>t.replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\"/g,\"&quot;\").replace(/'/g,\"&#39;\"),or=t=>Object.freeze({html:t,toString:()=>t}),ir=t=>typeof t==\"object\"&&t!==null&&typeof t.html==\"string\"&&Object.isFrozen(t),_o=t=>t==null||t===!1?\"\":Array.isArray(t)?t.map(_o).join(\"\"):ir(t)?t.html:sr(String(t));function Po(t){customElements.get(hn)||customElements.define(hn,yt);let e=Event,n=Ro(),r=new Set,o=new Set,s,i=[],l=new Set;for(let a of[\"closest\",\"matches\",\"dataset\"]){let c=()=>{throw new TypeError(`A view's element has no ${a}: graview.on hands event.element, the element its selector matched; read event.element.getAttribute(\"data-\\u2026\").`)};a in Element.prototype||Object.defineProperty(Element.prototype,a,a===\"dataset\"?{get:c}:{value:c})}let u=document.createElement(hn),d=a=>{let c=f=>{for(let h of Array.from(f.childNodes)){if(h.nodeType!==1)continue;if(Z(h)===a)return h;let g=c(h);if(g)return g}};return c(u)},p=a=>{let c=d(a.target);if(!c)return;let f=new e(a.event,{bubbles:!0}),h={};for(let g of As)a[g]!==void 0&&(h[g]=a[g]);for(let g of Object.keys(h))Object.defineProperty(f,g,{value:h[g],enumerable:!0});c.dispatchEvent(f);for(let g of o){if(g.type!==a.event)continue;let S;try{S=new Set(Array.from(u.querySelectorAll(g.selector)))}catch{continue}for(let M=c;M&&M!==u;M=M.parentNode)if(S.has(M)){g.listener(Object.freeze({type:a.event,target:c,element:M,...h}));break}}},b=Error,T=new Map,w=0,A=(a,c,f)=>new Promise((h,g)=>{let S=++w;T.set(S,M=>M.ok?h(M):g(new b(M.sentence??\"This value was not kept.\"))),t.send({type:\"mine\",id:S,op:a,key:c,...a===\"set\"?{value:f}:{}})}),P=a=>(a.catch(()=>{}),a),U=Object.freeze({get(a){return P(A(\"get\",a).then(c=>typeof c.value==\"string\"?c.value:null))},set(a,c){return P(A(\"set\",a,c).then(()=>{}))}}),v=a=>{if(a.type===\"mine-answer\"){let g=T.get(a.id);return T.delete(a.id),g?.(a)}if(a.type===\"dom-event\"&&typeof a.target==\"string\")return p(a);if(a.type===\"notice\")return t.warn(a.text);if(a.type!==\"props\")return;s=a.props,typeof a.partMs==\"number\"&&a.partMs>0&&(gn=a.partMs),typeof a.partMark==\"string\"&&(yn=a.partMark),bn+=1,bt.clear(),et=0;let c=t.now();for(let g of r)try{g(a.props)}catch(S){t.threw(S)}let f=t.now()-c,h=a.push;typeof h==\"number\"&&t.microtask(()=>t.microtask(()=>t.send({type:\"pushed\",push:h,ms:f})))},E;u.connect({mutate(a){E||(E=[],t.microtask(()=>{let c=E??[];E=void 0,t.send({type:\"render\",records:n.encode(c)})})),E.push(...a)},call:()=>{}});let N=a=>a.localName===\"graview-video\"&&(a.hasAttribute(\"data-video\")||a.hasAttribute(\"data-watch\")),R=a=>{if(a.nodeType!==1)return null;let c=a;return c.getAttribute(\"data-key\")??c.getAttribute(\"id\")??(N(c)?`${c.getAttribute(\"data-provider\")} ${c.getAttribute(\"data-video\")} ${(c.getAttribute(\"data-watch\")??\"\").split(/[?&#]/).filter(h=>!/^(t|start)=/.test(h)).join(\"&\")}`:null)},G=new Map;function Ze(a){if(a.nodeType!==1)return[];let c=N(a)?[R(a)??\"\"]:Array.from(a.childNodes).flatMap(Ze);return c.length>0&&G.set(a,c),c}let Qe=(a,c)=>{let f=G.get(a);return f!==void 0&&(G.get(c)?.some(h=>f.includes(h))??!1)},Je=(a,c)=>a.nodeType===c.nodeType&&(a.nodeType!==1||a.localName===c.localName&&a.namespaceURI===c.namespaceURI&&R(a)===R(c));function Co(a,c,f,h){let g=a.childNodes[c],S=()=>Array.from(a.childNodes).slice(c),M=G.has(f)?S().find(H=>Je(H,f)&&Qe(H,f)):void 0;if(M)return M;let B=H=>G.has(H)&&h.some(ce=>Je(H,ce)&&Qe(H,ce));return g&&Je(g,f)&&!B(g)?g:R(f)===null?void 0:S().slice(1).find(H=>Je(H,f)&&!B(H))}function ur(a,c){let f=Array.from(c.childNodes),h=f.filter(S=>G.has(S)),g=0;for(let S of f){h[0]===S&&h.shift();let M=a.childNodes[g]??null,B=Co(a,g,S,h);if(!B)a.insertBefore(S,M);else{if(B!==M){let H=Array.from(a.childNodes).slice(g);if(H.length=H.indexOf(B),G.has(B)&&!H.some(ce=>h.some(ve=>Je(ce,ve)&&Qe(ce,ve)))){let ce=B.nextSibling;for(let ve of H)a.insertBefore(ve,ce)}else a.insertBefore(B,M)}Io(B,S)}g+=1}for(;a.childNodes.length>g;)a.removeChild(a.lastChild)}function Io(a,c){if(a.nodeType!==1){a.data!==c.data&&(a.data=c.data);return}let f=a,h=c,g=dr(f);for(let S of f.getAttributeNames())h.hasAttribute(S)||(f.removeAttribute(S),g&&Se(f,S,void 0));for(let S of h.getAttributeNames()){let M=h.getAttribute(S);f.getAttribute(S)!==M&&f.setAttribute(S,M),g&&Se(f,S,M)}ur(f,h)}let dr=a=>a.localName.includes(\"-\");function fr(a){for(let c of Array.from(a.childNodes)){if(c.nodeType!==1)continue;let f=c;if(dr(f))for(let h of f.getAttributeNames())Se(f,h,f.getAttribute(h)??void 0);fr(f)}}function mr(a,c,f){for(let h of Array.from(a.childNodes)){if(h.nodeType!==1)continue;let g=h,S=g.localName,M=c||S.toLowerCase()===\"svg\",B=M?To(S):Object.prototype.hasOwnProperty.call(rr,S.toLowerCase())?S.toLowerCase():void 0;if(!B){f.add(`<${S}>`);continue}for(let H of g.getAttributeNames())(!wo(M?\"svg\":\"html\",B,H)||!M&&No[B]?.includes(H.toLowerCase()))&&f.add(`${B} ${H}`);mr(g,M,f)}}function ko(a){let c=document.createElement(\"div\"),f=Array.isArray(a)?a:[a];for(let g of f)if(g!=null)if(typeof g==\"string\"||ir(g)){let S=document.createElement(\"div\");S.innerHTML=typeof g==\"string\"?g:g.html,c.append(...Array.from(S.childNodes))}else c.append(g);let h=new Set;mr(c,!1,h),i=[...h],i.length>0&&t.warn(`The host will not draw: ${i.join(\", \")}`),fr(c),G.clear(),Ze(c).length>0&&Ze(u),ur(u,c),bt.clear()}let gn=1e3/4,yn=\"\",bn=0,En=new Map,bt=new Map,et=0,Nn=new Set,Do=a=>{try{return a instanceof Error?`${a.name}: ${a.message}`:String(a)}catch{return\"an error\"}},pr=a=>{if(a==null||a===!1)return\"\";if(typeof a==\"string\")return a;if(ir(a))return a.html;if(Array.isArray(a))return a.map(c=>pr(c)).join(\"\");throw new TypeError(\"a part's draw returns markup: a string, graview.html`\\u2026` or a list of them\")};function Lo(a,c,f){if(typeof a!=\"string\"||!So.test(a))throw new TypeError('graview.part names its part in letters, digits, - and _ (\"vendors\", \"budget-2026\"), at most 64 of them.');if(typeof c!=\"function\")throw new TypeError(`graview.part(\"${a}\", draw) is handed a function that returns the part's markup.`);let h=typeof f?.as==\"string\"&&_s.has(f.as)?f.as:\"div\",g=bt.get(a)??0;bt.set(a,g+1);let S=`${a}#${g}`,M=(Q,Nr)=>{let Go=`The part \"${a}\" ${Q===\"threw\"?\"threw\":\"took too long\"}, so a note is drawn in its place and the rest of the view is drawn: ${Nr}`;return!Nn.has(`${a} ${Q}`)&&Nn.size<100&&(Nn.add(`${a} ${Q}`),t.warn(Go)),or(`<${h} data-part=\"${a}\" data-part-failed=\"${Q}\" data-part-why=\"${sr(Nr.slice(0,300))}\"${yn?` data-part-mark=\"${sr(yn)}\"`:\"\"}></${h}>`)},B=En.get(S);if(B!==void 0&&bn<=B.until)return M(\"slow\",B.why);En.delete(S);let H=et;et=0;let ce=t.now(),ve,xn=0;try{ve=pr(c())}catch(Q){return M(\"threw\",Do(Q))}finally{let Q=t.now()-ce;xn=Q-et,et=H+Q}if(xn>gn){let Q=`it took ${Math.round(xn).toLocaleString(\"en-US\")} ms, past the ${Math.round(gn).toLocaleString(\"en-US\")} ms a part may take of a push, and is left as a note for the next ${3} pushes.`;return En.set(S,{why:Q,until:bn+3}),M(\"slow\",Q)}return or(`<${h} data-part=\"${a}\">${ve}</${h}>`)}let Tn=[],wn=new Set(so),hr=\"[]\",Sn=!1,gr=()=>{Sn||(Sn=!0,t.microtask(()=>{Sn=!1;let a=[...new Map([...o].filter(f=>wn.has(f.type)).map(f=>[`${f.type} ${f.selector}`,{event:f.type,selector:f.selector}])).entries()].sort(([f],[h])=>f<h?-1:f>h?1:0).map(([,f])=>f),c=JSON.stringify(a);c!==hr&&(hr=c,t.send({type:\"gestures\",bound:a}))}))},yr=\"[[],[]]\",vn=!1,br=()=>{vn||(vn=!0,t.microtask(()=>{vn=!1;let a=g=>[...new Set([...o].filter(S=>S.type===g&&typeof S.selector==\"string\").map(S=>S.selector))].sort().slice(0,200),c=a(\"click\"),f=a(\"acted\"),h=JSON.stringify([c,f]);h!==yr&&(yr=h,t.send({type:\"clicks\",selectors:c,...f.length>0?{acted:f}:{}}))}))},Er=Object.freeze({get props(){return s},onProps(a){return r.add(a),s&&a(s),()=>void r.delete(a)},render:ko,style(a){typeof a!=\"string\"||Tn.includes(a)||(Tn.push(a),t.send({type:\"style\",sheets:[...Tn]}))},on(a,c,f){let h={type:a,selector:c,listener:f};return o.add(h),typeof a==\"string\"&&!l.has(a)&&(l.add(a),t.send({type:\"hears\",events:[a]})),wn.has(a)&&gr(),(a===\"click\"||a===\"acted\")&&br(),()=>{o.delete(h),wn.has(a)&&gr(),(a===\"click\"||a===\"acted\")&&br()}},act:(a,c={})=>t.act(a,c),mine:U,navigate(a){if(typeof a==\"string\")return t.navigate(a);let c=dn(a);c&&t.send(c)},part:Lo,html(a,...c){return or(a.reduce((f,h,g)=>f+h+(g<c.length?_o(c[g]):\"\"),\"\"))},get today(){return s?.today??new Date().toISOString().slice(0,10)},fromToday(a,c){let f=xo(a,s?.timeZone);return f===void 0?\"\":vo(f,Er.today,c)},cite(a,c){let f=a?s?.cites?.[a.kind]?.[c]:void 0;if(!a||!f)return;let h=!(s?.uncited?.[a.id]??[]).includes(c);if(!f.relation)return{by:f.by,relation:!1,cited:h,...a[f.by]!==void 0?{source:a[f.by]}:{}};let g=new Set((s?.edges??[]).filter(S=>S.from===a.id&&S.kind===f.by).map(S=>S.to));return{by:f.by,relation:!0,cited:h,sources:(s?.nodes??[]).filter(S=>g.has(S.id))}},uncited(a){return a?s?.uncited?.[a.id]??[]:[]},get refused(){return i},get hardening(){return t.hardening()}});return{view:Er,hear:v,find:a=>{try{let c=u.querySelectorAll(a)[0];return c?Z(c):void 0}catch{return}},listened:a=>{let c=new Set;for(let f of o)if(f.type===a)try{for(let h of Array.from(u.querySelectorAll(f.selector))){let g=Z(h);g&&c.add(g)}}catch{}return[...c]}}}var cr={removed:[],stuck:[],sealed:!1,worker:!1},ar=lo({listen(t){return Ie.listen(t),()=>Ie.unlisten(t)},fromHost:()=>!0,ready:t=>Ie.post(t)},{onMessage:t=>Mo.hear(t)}),Mo=Po({send:t=>ar.send(t),act:(t,e)=>ar.guest.act(t,e),navigate:t=>ar.guest.navigate(t),microtask:Ie.microtask,now:Ie.now,threw:t=>console.error(t),warn:t=>console.warn(t),hardening:()=>cr}),Ps=Mo.view;Object.defineProperty(globalThis,\"graview\",{value:Ps,enumerable:!0,configurable:!0,writable:!1});var lr=\"WorkerGlobalScope\"in globalThis?ho(globalThis,[\"graview\"]):cr;cr=lr;if(lr.stuck.length>0)throw new Error(`The view's worker could not be hardened: ${lr.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,+zsEAA+zsE,CAAC"}
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,iktEAAiktE,CAAC"}