@graview/guest 0.1.38 → 0.1.40

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.
Files changed (97) hide show
  1. package/README.md +94 -0
  2. package/client.js +1 -1
  3. package/dist/channel.d.ts +2 -2
  4. package/dist/channel.d.ts.map +1 -1
  5. package/dist/cli.d.ts +1 -1
  6. package/dist/cli.d.ts.map +1 -1
  7. package/dist/cli.js +28 -4
  8. package/dist/cli.js.map +1 -1
  9. package/dist/client.generated.js +2 -2
  10. package/dist/headless/describe.d.ts +5 -0
  11. package/dist/headless/describe.d.ts.map +1 -1
  12. package/dist/headless/describe.js +62 -0
  13. package/dist/headless/describe.js.map +1 -1
  14. package/dist/headless/index.d.ts +1 -1
  15. package/dist/headless/index.d.ts.map +1 -1
  16. package/dist/headless/index.js +11 -3
  17. package/dist/headless/index.js.map +1 -1
  18. package/dist/headless/judge.js +2 -2
  19. package/dist/headless/judge.js.map +1 -1
  20. package/dist/headless/protocol.d.ts +5 -0
  21. package/dist/headless/protocol.d.ts.map +1 -1
  22. package/dist/headless/runtime.generated.d.ts.map +1 -1
  23. package/dist/headless/runtime.generated.js +1 -1
  24. package/dist/headless/runtime.generated.js.map +1 -1
  25. package/dist/host/drop-plan.d.ts +58 -0
  26. package/dist/host/drop-plan.d.ts.map +1 -0
  27. package/dist/host/drop-plan.js +170 -0
  28. package/dist/host/drop-plan.js.map +1 -0
  29. package/dist/host/drop.d.ts +49 -0
  30. package/dist/host/drop.d.ts.map +1 -0
  31. package/dist/host/drop.js +336 -0
  32. package/dist/host/drop.js.map +1 -0
  33. package/dist/host/frame.d.ts.map +1 -1
  34. package/dist/host/frame.js +51 -2
  35. package/dist/host/frame.js.map +1 -1
  36. package/dist/host/manifest.d.ts +22 -1
  37. package/dist/host/manifest.d.ts.map +1 -1
  38. package/dist/host/manifest.js +29 -0
  39. package/dist/host/manifest.js.map +1 -1
  40. package/dist/host/marks.d.ts +20 -0
  41. package/dist/host/marks.d.ts.map +1 -0
  42. package/dist/host/marks.js +52 -0
  43. package/dist/host/marks.js.map +1 -0
  44. package/dist/host/open-draw.d.ts +2 -0
  45. package/dist/host/open-draw.d.ts.map +1 -1
  46. package/dist/host/open-draw.js +1 -0
  47. package/dist/host/open-draw.js.map +1 -1
  48. package/dist/host/open-judge.d.ts +12 -1
  49. package/dist/host/open-judge.d.ts.map +1 -1
  50. package/dist/host/open-judge.js +18 -11
  51. package/dist/host/open-judge.js.map +1 -1
  52. package/dist/host/pictures.d.ts +42 -1
  53. package/dist/host/pictures.d.ts.map +1 -1
  54. package/dist/host/pictures.js +79 -15
  55. package/dist/host/pictures.js.map +1 -1
  56. package/dist/host/press.d.ts +25 -0
  57. package/dist/host/press.d.ts.map +1 -1
  58. package/dist/host/press.js +81 -2
  59. package/dist/host/press.js.map +1 -1
  60. package/dist/host/react.d.ts.map +1 -1
  61. package/dist/host/react.js +2 -1
  62. package/dist/host/react.js.map +1 -1
  63. package/dist/host/session.d.ts +20 -0
  64. package/dist/host/session.d.ts.map +1 -1
  65. package/dist/host/session.js +51 -17
  66. package/dist/host/session.js.map +1 -1
  67. package/dist/host/view-runtime.generated.d.ts.map +1 -1
  68. package/dist/host/view-runtime.generated.js +1 -1
  69. package/dist/host/view-runtime.generated.js.map +1 -1
  70. package/dist/host/view.d.ts +8 -1
  71. package/dist/host/view.d.ts.map +1 -1
  72. package/dist/host/view.js +131 -6
  73. package/dist/host/view.js.map +1 -1
  74. package/dist/host/views.d.ts +3 -3
  75. package/dist/host/views.d.ts.map +1 -1
  76. package/dist/host/worker-react.d.ts +10 -0
  77. package/dist/host/worker-react.d.ts.map +1 -1
  78. package/dist/host/worker-react.js +18 -5
  79. package/dist/host/worker-react.js.map +1 -1
  80. package/dist/host/writes.d.ts +11 -2
  81. package/dist/host/writes.d.ts.map +1 -1
  82. package/dist/host/writes.js +36 -4
  83. package/dist/host/writes.js.map +1 -1
  84. package/dist/index.d.ts +1 -1
  85. package/dist/index.d.ts.map +1 -1
  86. package/dist/protocol.d.ts +60 -4
  87. package/dist/protocol.d.ts.map +1 -1
  88. package/dist/protocol.js +11 -0
  89. package/dist/protocol.js.map +1 -1
  90. package/dist/worker/view-global.d.ts +18 -5
  91. package/dist/worker/view-global.d.ts.map +1 -1
  92. package/dist/worker/view-global.js +8 -2
  93. package/dist/worker/view-global.js.map +1 -1
  94. package/dist/worker/view.d.ts.map +1 -1
  95. package/dist/worker/view.js +2 -1
  96. package/dist/worker/view.js.map +1 -1
  97. package/package.json +3 -3
@@ -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 Oe=globalThis,qr=Oe.addEventListener,Yr=Oe.removeEventListener,Wr=Oe.postMessage,Xr=globalThis.queueMicrotask,an=globalThis.performance,$r=an?an.now.bind(an):Date.now,Re={listen:t=>qr.call(Oe,\"message\",t),unlisten:t=>Yr.call(Oe,\"message\",t),post:t=>Wr.call(Oe,t),microtask:t=>Xr.call(globalThis,t),now:()=>$r()};var w=Symbol(\"name\"),ue=Symbol(\"prefix\"),de=Symbol(\"value\"),x=Symbol(\"ns\"),j=Symbol(\"owner\"),I=Symbol(\"owner_document\"),te=Symbol(\"attributes\"),M=Symbol(\"prev\"),p=Symbol(\"next\"),S=Symbol(\"child\"),F=Symbol(\"parent\"),me=Symbol(\"host\"),X=Symbol(\"data\"),Ee=Symbol(\"listeners\"),ln=Symbol(\"isTrusted\"),Ae=Symbol(\"path\"),_e=Symbol(\"stop_immediate_propagation\"),Pe=Symbol(\"dispatching\"),ie=Symbol(\"content\"),D=Symbol(\"hooks\"),ut=Symbol(\"extensions\"),Ne=Symbol(\"hooks_dispatch\"),U=Symbol(\"is_connected\"),Ce=Symbol(\"create_element\"),Bn=0,Y=1,ke=2,Ie=3,Me=8,Te=9,zn=10,fe=11,_=\"http://www.w3.org/1999/xhtml\",$=\"http://www.w3.org/2000/svg\",jn=\"http://www.w3.org/XML/1998/namespace\",We=\"http://www.w3.org/2000/xmlns/\";function dt(t){return t.split(/[\\t\\n\\f\\r ]+/).filter(Boolean)}function H(t){return t.replace(/[A-Z]/g,e=>String.fromCharCode(e.charCodeAt(0)+32))}function Fn(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 qn=/^(?:[A-Za-z][^\\0\\t\\n\\f\\r\\u0020/>]*|[:_\\u0080-\\u{10FFFF}][A-Za-z0-9-.:_\\u0080-\\u{10FFFF}]*)$/u,Yn=/[\\0\\t\\n\\f\\r />=]/u,Kr=/[\\0\\t\\n\\f\\r />]/u;function se(t){if(t==null)return null;let e=String(t);return e===\"\"?null:e}function Wn(t){qn.test(t)||un(t)}function cn(t){(t===\"\"||Yn.test(t))&&un(t)}function mt(t,e,n){let r=se(t),o=String(e),i=o.indexOf(\":\"),s=i<0?null:o.slice(0,i),a=i<0?o:o.slice(i+1);if((s!=null&&(s===\"\"||Kr.test(s))||(n===\"element\"?!qn.test(a):a===\"\"||Yn.test(a)))&&un(o),s!=null&&r==null)throw C(`A namespace is required for the prefix in \"${o}\"`,\"NamespaceError\");if(s===\"xml\"&&r!==jn)throw C(\"The xml prefix requires the XML namespace\",\"NamespaceError\");if((o===\"xmlns\"||s===\"xmlns\")&&r!==We)throw C(\"The xmlns name requires the XMLNS namespace\",\"NamespaceError\");if(r===We&&o!==\"xmlns\"&&s!==\"xmlns\")throw C(\"The XMLNS namespace requires the xmlns name or prefix\",\"NamespaceError\");return{namespace:r,qualifiedName:o,prefix:s,localName:a}}function un(t){throw C(`Invalid name: \"${t}\"`,\"InvalidCharacterError\")}var ft=0,pt=1,Xn=2,dn=3,Zr=typeof performance>\"u\"?Date.now:performance.now.bind(performance),V=class{static NONE=ft;static CAPTURING_PHASE=pt;static AT_TARGET=Xn;static BUBBLING_PHASE=dn;timeStamp=Zr();target=null;currentTarget=null;srcElement=null;bubbles=!1;cancelable=!1;composed=!1;defaultPrevented=!1;cancelBubble=!1;eventPhase=ft;[Ae]=[];[_e]=!1;[Pe]=!1;constructor(e,n){this.type=e,Object.defineProperty(this,ln,{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[ln]}composedPath(){return[...this[Ae]]}stopPropagation(){this.cancelBubble=!0}stopImmediatePropagation(){this[_e]=!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[Ee]?.get(t.type)?.[n===pt?\"capture\":\"bubble\"];if(o)for(let i of[...o]){if(!o.has(i)||i.signal?.aborted)continue;t.eventPhase=t.target===e?Xn:n,t.currentTarget=e;let s=i.normalizedListener;try{typeof s==\"object\"?s.handleEvent(t):s.call(e,t)}catch(a){setTimeout(Qr,0,a)}if(t[_e])break}}function Qr(t){throw t}var Xe=[],ht=new WeakMap;function gt(t,e){let n=ht.get(t);n?n.push(e):ht.set(t,[e]),Xe[Xe.length-1].push(t)}function B(t){let e=[];Xe.push(e);let n;try{n=t()}catch(r){Xe.pop();try{$n(e)}catch{}throw r}return Xe.pop(),$n(e),n}function $n(t){let e,n=!1;for(let r of t){let o=ht.get(r);if(o){for(;o.length>0;){let i=o.shift();try{i()}catch(s){n||(e=s,n=!0)}}ht.delete(r)}}if(n)throw e}var bt=[],$e=[],fn=!1;function we(t){for(let e of t)bt.push(e),e[1]&&$e.push(e[1]);if(!fn){fn=!0;try{let e,n=!1;for(let r=0;r<bt.length;r++){let[o,i]=bt[r];i&&$e.splice($e.indexOf(i),1);try{o()}catch(s){n||(e=s,n=!0)}}if(n)throw e}finally{bt.length=0,$e.length=0,fn=!1}}}function Ke(t){let e=t;for(;e;){if($e.includes(e))return!0;e=e[F]??e[me]}return!1}var Ze=Symbol(\"listenerRegistrations\"),pe=class{[Ee]=void 0;[Ze]=void 0;[I]=void 0;addEventListener(e,n,r){if(n==null)return;let o=r===!0||typeof r==\"object\"&&r.capture===!0,i=typeof r==\"object\"&&r.once===!0,s=typeof r==\"object\"?r.signal:void 0;if(s?.aborted)return;let a=pn(o),u=this[Ze];u||(u=new Map,this[Ze]=u);let l=u.get(e);l||(l={},u.set(e,l));let m=l[a];if(m||(m=new Map,l[a]=m),m.has(n))return;let f=this,g={type:e,listener:n,capture:o,once:i,normalizedListener:n,signal:s};(i||s)&&(g.normalizedListener=function(...k){if(g.signal?.aborted){yt(f,g);return}return g.once&&yt(f,g),typeof g.listener==\"object\"?g.listener.handleEvent(...k):g.listener.call(this,...k)});let h=this[Ee];h||(h=new Map,this[Ee]=h);let v=h.get(e);v||(v={},h.set(e,v));let b=v[a];if(b||(b=new Set,v[a]=b),m.set(n,g),b.add(g),s){let E=()=>{yt(f,g)};g.abortListener=E,s.addEventListener(\"abort\",E,{once:!0})}this[I]?.defaultView[Ne].addEventListener?.(this,e,n,r)}removeEventListener(e,n,r){return Jr.call(this,e,n,r)}dispatchEvent(e){if(e[Pe])throw C(\"Failed to execute 'dispatchEvent' on 'EventTarget': The event is already being dispatched.\",\"InvalidStateError\");e[Pe]=!0;try{let n=[],r=this;for(;r!=null;)n.push(r),r=r.parentNode;e.target=this,e.srcElement=this,e[Ae]=n;for(let i=n.length;i--;)if(mn(e,n[i],pt),e.cancelBubble)return!e.defaultPrevented;let o=e.bubbles?n:n.slice(0,1);for(let i=0;i<o.length;i++)if(mn(e,o[i],dn),e.cancelBubble)return!e.defaultPrevented;return!e.defaultPrevented}finally{e[Pe]=!1,e.cancelBubble=!1,e[_e]=!1,e.eventPhase=ft,e.currentTarget=null,e[Ae]=[]}}};function Jr(t,e,n){if(e==null)return;let r=n===!0||n&&n.capture===!0,o=pn(!!r),i=this[Ze]?.get(t)?.[o]?.get(e);i&&yt(this,i)}function pn(t){return t?\"capture\":\"bubble\"}function yt(t,e){let n=pn(e.capture),r=t[Ze],o=r?.get(e.type);if(!o)return;let i=o[n];if(!i||i.get(e.listener)!==e)return;i.delete(e.listener),i.size===0&&delete o[n],!o.bubble&&!o.capture&&r?.delete(e.type),e.signal&&e.abortListener&&e.signal.removeEventListener(\"abort\",e.abortListener);let s=t[Ee],a=s?.get(e.type);if(!a)return;let u=a[n];u?.delete(e)&&(u.size===0&&delete a[n],!a.bubble&&!a.capture&&s?.delete(e.type),t[I]?.defaultView[Ne].removeEventListener?.(t,e.type,e.listener,e.capture))}var K=class extends Array{item(e){return this[e]??null}};var Je=0,Kn=1,bn=2,yn=3,et=4,Zn=0,Qn=1,Tt=2,wt=3,Jn=4,gn=5,er=6,tr=7,Et=/^(?:--|-?[A-Za-z_\\u0080-\\u{10FFFF}])[A-Za-z0-9_\\u0080-\\u{10FFFF}-]*$/u;function eo(t,e){let n=1,r=null;for(let o=e;o<t.length;o++){let i=t[o];if(r){i===\"\\\\\"?o++:i===r&&(r=null);continue}if(i==='\"'||i===\"'\")r=i;else if(i===\"(\")n++;else if(i===\")\"&&--n===0)return[t.slice(e,o),o+1]}return[t.slice(e),t.length]}function q(t){throw C(`Invalid or unsupported selector: \"${t}\"`,\"SyntaxError\")}function xt(t,e){let n=typeof e==\"string\"?tt(e):[{combinator:et,matchers:e}],r=null,o=t[S];return o&&n[0].matchers.length&&En(o,n,i=>(r=i,!1)),r}function vt(t,e){let n=typeof e==\"string\"?tt(e):[{combinator:et,matchers:e}],r=new K,o=t[S];return o&&n[0].matchers.length&&En(o,n,i=>{r.push(i)}),r}function tt(t,e=!1,n=!1){let r={combinator:et,matchers:[]},o=[r],i=/[\\t\\n\\f\\r ]*?([>\\t\\n\\f\\r +~]?)[\\t\\n\\f\\r ]*?(?:(?:\\[[\\t\\n\\f\\r ]*([^\\]=\\t\\n\\f\\r ]+)[\\t\\n\\f\\r ]*(?:=[\\t\\n\\f\\r ]*(?:(['\"])(.*?)\\3|([^\\]\\t\\n\\f\\r ]+)))?[\\t\\n\\f\\r ]*(?:\\]|$))|([#.]?)([^\\t\\n\\f\\r #.[>:+~()]+)|:(\\w+)(\\()?)/gi,s=t.replace(/^[\\t\\n\\f\\r ]+|[\\t\\n\\f\\r ]+$/g,\"\");s===\"\"&&q(t);let a=0,u;for(;u=i.exec(s);){u.index!==a&&q(t),u[1]&&(r.matchers.length===0&&!(n&&o.length===1)&&q(t),u[1]===\">\"?r.combinator=Kn:u[1]===\"+\"?r.combinator=yn:u[1]===\"~\"?r.combinator=bn:r.combinator=Je,r={combinator:et,matchers:[]},o.push(r));let l=u[8]?H(u[8]):u[2]||u[7];u[7]!=null&&!u[6]&&r.matchers.length>0&&q(t);let f,g=u[4]??u[5]??u[7];if(u[2]){Et.test(l)||q(t);let h=u[5],v=h?.[0];if(u[3]==null&&(v==='\"'||v===\"'\")){let b=u[0].lastIndexOf(h);g=s.slice(u.index+b+1),i.lastIndex=s.length}else h!=null&&!Et.test(h)&&q(t);f=Jn}else u[6]?(Et.test(l)||q(t),f=u[6]===\"#\"?Tt:wt):u[8]?f=u[9]==null?gn:er:u[7]===\"*\"?f=Zn:u[7]&&Et.test(u[7])?f=Qn:q(t);u[9]?([g,i.lastIndex]=eo(s,i.lastIndex),l!==\"has\"&&l!==\"not\"&&q(t),l===\"has\"&&e&&q(t),tt(g,e||l===\"has\",l===\"has\")):f===gn&&q(t),r.matchers.push({type:f,name:l,value:g}),a=i.lastIndex}return(a!==s.length||r.matchers.length===0)&&q(t),o}function to(t,e){let n=tt(e);return n[0]?.matchers.length?Qe(t,n):!1}function no(t,e){let n=tt(e,!0,!0),r=n[0];if(n.length===1&&r.matchers.length===0)return!1;let o=Je,i={type:tr,name:\":scope\"};if(r.matchers.length===0?(o=r.combinator,r.matchers.push(i)):n.unshift({combinator:Je,matchers:[i]}),n.some(({matchers:u})=>u.length===0))return!1;let s=o===yn||o===bn?t[p]:t[S];if(!s)return!1;let a=!1;return En(s,n,()=>(a=!0,!1),t),a}function En(t,e,n,r){let o=[],i=t;for(;i;){if(z(i)){if(Qe(i,e,r)&&n(i)===!1)return!1;let s=i[S];if(s){let a=i[p];a&&o.push(a),i=s;continue}}i=i[p]??o.pop()??null}return!0}function Qe(t,e,n){let{combinator:r,matchers:o}=e[e.length-1];if(r===et){if(!Nt(t,o,n))return!1;let a=e.slice(0,-1);return a.length===0||Qe(t,a,n)}let i=r===Kn||r===Je?F:M,s=t[i];if(!s)return!1;if(r===Je||r===bn){for(;s;){if(z(s)&&Nt(s,o,n)){let a=e.slice(0,-1);if(a.length===0||Qe(s,a,n))return!0}s=s[i]}return!1}else{if(r===yn&&!z(s)){for(;s&&!z(s);)s=s[i];if(!s)return!1}if(!z(s)||!Nt(s,o,n))return!1;let a=e.slice(0,-1);return a.length===0||Qe(s,a,n)}}function hn(t,e){return t.getAttributeNS(null,t.namespaceURI===_?H(e):e)}function Nt(t,e,n){if(!t)return!1;if(Array.isArray(e)){for(let s of e)if(Nt(t,s,n)===!1)return!1;return!0}let{type:r,name:o,value:i}=e;switch(r){case Zn:return o===\"*\";case Qn:return t.namespaceURI===_?t.localName===H(o):t.localName===o;case Tt:return hn(t,\"id\")===o;case wt:let s=hn(t,\"class\");return s?dt(s).includes(o):!1;case Jn:let a=hn(t,o);return i==null?a!=null:a===i;case tr:return t===n;case gn:q(`:${o}`);case er:switch(o){case\"has\":return no(t,i||\"\");case\"not\":return!to(t,i||\"\");default:q(`:${o}(${i})`)}}return!1}function ro(t){return t.nodeType===ke}function nt(t){return X in t}function Tn(t){return t.nodeType===Ie}function oo(t){return t.nodeType===Me}function z(t){return t.nodeType===Y}function Nn(t){return t.nodeType===fe}function ir(t){return\"appendChild\"in t}function St(t){let e=[],n=[t],r=new Set(n),o=new Set,i;for(;n.length>0;){let s=n.pop();if(r.delete(s),o.has(s))continue;let a=[];for(let u of ot(s)){if(o.has(u)||(o.add(u),e.push(u),a.push(u),!z(u)))continue;let l=u[te];if(l)for(let f of l)o.has(f)||(o.add(f),e.push(f));let m=u[ie];m&&!o.has(m)&&!r.has(m)&&(r.add(m),n.push(m))}i??=a}return{nodes:e,treeNodes:i}}function rt(t,e){for(let n of t)n[I]=e}function nr(t,e){let n=t.constructor,r=new n(t.name,t.value,t.namespaceURI);return r[I]=e,r}function rr(t,e){if(Tn(t))return e.createTextNode(t.data);if(oo(t))return e.createComment(t.data);if(ro(t))return nr(t,e);if(z(t)){let n=e[Ce](t[w],t.namespaceURI,t[ue],t.localName);if(t[te])for(let r=0;r<t[te].length;r++){let o=t[te].item(r);n.attributes.setNamedItem(nr(o,e))}return n}else{if(Nn(t))return e.createDocumentFragment();{let n=new t.constructor;return n[I]=e,n}}}function Ot(t,e,n=t.ownerDocument){if(t.nodeType===Te)throw C(\"Cannot clone a document node\",\"NotSupportedError\");let r=rr(t,n);if(!e||!z(t)&&!Nn(t))return r;let o=new Set([t]),i=[{source:t,destination:r,childIndex:0,cloningContent:!1}];for(;i.length>0;){let s=i[i.length-1],a,u;if(s.cloningContent)if(s.contentSource&&s.contentDestination)a=s.contentSource.childNodes[s.childIndex++],u=s.contentDestination;else{i.pop(),s.appendTo&&s.appendTo.appendChild(s.destination);continue}else if(a=s.source.childNodes[s.childIndex++],u=s.destination,!a){if(s.cloningContent=!0,s.childIndex=0,z(s.source)&&s.source.namespaceURI===_&&s.source.localName===\"template\"){let m=s.source[ie];m&&(o.has(m)&&or(),o.add(m),s.contentSource=m,s.contentDestination=s.destination.content)}continue}if(!a){i.pop(),s.appendTo&&s.appendTo.appendChild(s.destination);continue}o.has(a)&&or(),o.add(a);let l=rr(a,n);z(a)||Nn(a)?i.push({source:a,destination:l,appendTo:u,childIndex:0,cloningContent:!1}):u.appendChild(l)}return r}function or(){throw new Error(\"Cannot clone a cyclic or repeated node graph\")}function Rt(t,e){let n=String(e);return n===\"\"?null:xt(t,[{type:Tt,name:n}])}function At(t,e){let n=[...new Set(dt(String(e)))];return vt(t,n.map(r=>({type:wt,name:r})))}function _t(t,e){let n=String(e),r=H(n),o=[];for(let i of Pt(t))z(i)&&(n===\"*\"||(i.namespaceURI===_?i[w]===r:i[w]===n))&&o.push(i);return o}function Pt(t){let e=[],n=[],r=t[S];for(;r;){e.push(r);let o=r[S],i=r[p];o?(i&&n.push(i),r=o):r=i??n.pop()??null}return e}function ot(t){let e=Pt(t);return e.unshift(t),e}var Z=class extends pe{nodeType=Bn;[w]=\"\";[F]=null;[me]=null;[S]=null;[M]=null;[p]=null;[U]=!1;get[D](){return this[I].defaultView[Ne]}get localName(){return this[w]}get nodeName(){return this[w]}get ownerDocument(){return this[I]}get isConnected(){return this[U]}isDefaultNamespace(e){let n=se(e);return io(this)===n}get parentNode(){return this[F]}set parentNode(e){}get parentElement(){let e=this[F];return!e||e.nodeType!==1?null:e}set parentElement(e){}get previousSibling(){return this[M]}set previousSibling(e){}get nextSibling(){return this[p]}set nextSibling(e){}get previousElementSibling(){let e=this[M];for(;e&&e.nodeType!==1;)e=e[M];return e}set previousElementSibling(e){}get nextElementSibling(){let e=this[p];for(;e&&e.nodeType!==1;)e=e[p];return e}set nextElementSibling(e){}get firstChild(){return this[S]}set firstChild(e){}get lastChild(){let e=this[S];for(;e;){let n=e[p];if(n==null)break;e=n}return e}set lastChild(e){}get nodeValue(){return nt(this)?this.data:null}set nodeValue(e){nt(this)&&(this.data=e)}get textContent(){if(nt(this))return this.data;let e=\"\";for(let n of Pt(this))Tn(n)&&(e+=n.data);return e}set textContent(e){if(nt(this))this.data=e;else if(ir(this)){let n=e==null?\"\":String(e);n===\"\"?this.replaceChildren():this.replaceChildren(n)}}cloneNode(e){return Ot(this,e)}contains(e){let n=e;for(;n!=null;){if(n===this)return!0;n=n.parentNode}return!1}};function io(t){let e=t;for(;e;)switch(e.nodeType){case Y:{let n=e;if(n.prefix==null&&n.namespaceURI!=null)return n.namespaceURI;let r=n.attributes.getNamedItemNS(We,\"xmlns\");if(r!=null&&r.prefix==null)return se(r.value);e=n.parentElement;break}case Te:e=e.documentElement;break;case zn:case fe:return null;case ke:e=e.ownerElement;break;default:e=e.parentElement}return null}var Q=Symbol(\"insertNode\"),vn=Symbol(\"preflightInsertions\"),Ct=Symbol(\"replaceNode\"),he=class extends Z{remove(){let e=this.parentNode;e&&e.removeChild(this)}replaceWith(...e){let n=xe(e),r=this.parentNode;if(r)return wn(o=>{ae(r,n);let i=this[p];for(;i&&n.includes(i);)i=i[p];let s=xn(r,n,o);this.parentNode===r?r[Ct](s,this,o):r[Q](s,i,o)})}before(...e){let n=xe(e),r=this.parentNode;if(r)return wn(o=>{ae(r,n);let i=this[M];for(;i&&n.includes(i);)i=i[M];let s=xn(r,n,o);r[Q](s,i?i[p]:r.firstChild,o)})}after(...e){let n=xe(e),r=this.parentNode;if(r)return wn(o=>{ae(r,n);let i=this[p];for(;i&&n.includes(i);)i=i[p];let s=xn(r,n,o);r[Q](s,i,o)})}};function wn(t){return B(()=>{let e=[];try{t(e)}catch(n){try{we(e)}catch{}throw n}we(e)})}function xe(t){return t.map(e=>e instanceof Z?e:String(e))}function it(t,e){return e instanceof Z?e:t.ownerDocument.createTextNode(String(e))}function ae(t,e){for(let n of e){if(!(n instanceof Z))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[F]??r[me]}}}function xn(t,e,n){let r=[];for(let i of e)r.push(it(t,i));if(r.length===1)return r[0];let o=t.ownerDocument.createDocumentFragment();o[vn](r);for(let i of r)o[Q](i,null,n);return o}var kt,Sn=0,sr=0,ar=0,lr=0,De=!1,Rn=!1,st=!1,It=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=so(n),o=kt??=new WeakMap,i=o.get(e);i==null&&(i=new Map,o.set(e,i));let s=i.get(this);s==null?Sn++:On(s,-1),i.set(this,r),On(r,1),this.#e.add(e)}disconnect(){let e=kt;if(e!=null){for(let n of this.#e){let r=e.get(n),o=r?.get(this);o!=null&&(r.delete(this),Sn--,On(o,-1)),r?.size===0&&e.delete(n)}this.#e.clear(),this.#n.length=0,Sn===0&&(kt=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 J(t){let e=kt;if(e==null)return;let n=new Map,r=t.target;for(;r;){let o=e.get(r);if(o)for(let[i,s]of o){if(r!==t.target&&!s.subtree)continue;let a=!1;if(t.type===\"attributes\"){if(!s.attributes||s.attributeFilter&&!s.attributeFilter.has(t.attributeName??\"\"))continue;a=s.attributeOldValue}else if(t.type===\"characterData\"){if(!s.characterData)continue;a=s.characterDataOldValue}else if(!s.childList)continue;n.set(i,n.get(i)===!0||a)}r=r.parentNode}for(let[o,i]of n)o.enqueue({addedNodes:t.addedNodes??new K,attributeName:t.attributeName??null,attributeNamespace:t.attributeNamespace??null,nextSibling:t.nextSibling??null,oldValue:i?t.oldValue??null:null,previousSibling:t.previousSibling??null,removedNodes:t.removedNodes??new K,target:t.target,type:t.type})}function Mt(...t){let e=new K;return e.push(...t),e}function so(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 On(t,e){t.attributes&&(sr+=e),t.characterData&&(ar+=e),t.childList&&(lr+=e),De=sr>0,Rn=ar>0,st=lr>0}var ne=class extends he{childNodes=new K;children=new K;appendChild(e){return B(()=>this[Q](e,null))}insertBefore(e,n){return B(()=>this[Q](e,n||null))}append(...e){return B(()=>{let n=xe(e.filter(r=>r!=null));n.length>1&&ae(this,n);for(let r of n)this[Q](it(this,r),null)})}prepend(...e){return B(()=>{let n=xe(e.filter(o=>o!=null));n.length>1&&ae(this,n);let r=this.firstChild;for(let o of n)this[Q](it(this,o),r)})}replaceChildren(...e){return B(()=>{let n=xe(e.filter(o=>o!=null));ae(this,n);let r;for(;r=this.firstChild;)this.removeChildImmediately(r);for(let o of n)this[Q](it(this,o),null)})}removeChild(e){return B(()=>(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[U]?ot(e):void 0,r=e[M],o=e[p],i=Dt(this,e);if(n)for(let s of n)s[U]=!1;this.queueRemovalMutationRecord(this,e,r,o),n&&this.enqueueTreeReactions(n,\"disconnectedCallback\"),we(this.collectRemovalHookEffects(e,i))}replaceChild(e,n){return B(()=>this[Ct](e,n))}[Ct](e,n,r){if(ae(this,[e]),n.parentNode!==this)throw C(\"The reference node is not a child of this parent\",\"NotFoundError\");let o=n[M],i=n[p],s=this.prepareInsertion(e),a=this[U]?ot(n):void 0,u=new Set(s.map(({node:g})=>g)),l=i;for(;l&&u.has(l);)l=l[p];let m=Dt(this,n);if(a){for(let h of a)h[U]=!1;let g=new Set(a);for(let h of s)g.has(h.node)&&(h.shouldDisconnect=!1)}this.commitInsertion(s,l);let f=this[U];return this.queueRemovalMutationRecord(this,n,o,i),this.queueInsertionMutationRecords(s),a&&this.enqueueTreeReactions(a,\"disconnectedCallback\"),this.enqueueInsertionReactions(s,f),this.performOrCollectHookEffects([...this.collectRemovalHookEffects(n,m),...this.collectInsertionHookEffects(s)],r),n}querySelectorAll(e){return vt(this,e)}querySelector(e){return xt(this,e)}[Q](e,n,r){return this.validateInsertion(e,n),this.insertIntoValidated(e,n,r),e}[vn](e){for(let n of e)this.validateInsertion(n,null),this.prepareInsertion(n)}validateInsertion(e,n){if(ae(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[p]);let o=this.prepareInsertion(e);this.commitInsertion(o,n);let i=this[U];this.queueInsertionMutationRecords(o),this.enqueueInsertionReactions(o,i),this.performOrCollectHookEffects(this.collectInsertionHookEffects(o),r)}performOrCollectHookEffects(e,n){n?n.push(...e):we(e)}prepareInsertion(e){let n=[];if(e.nodeType===fe){let s=e[S];for(;s;)n.push(s),s=s[p]}else n.push(e);let r=this[U],o=this[I],i=[];for(let s of n){let a=s[U],u=a||r,l,m;if(s[I]===o)u&&(l=ot(s));else{let f=St(s);m=f.nodes,u&&(l=f.treeNodes)}i.push({node:s,nodes:l,adoption:m,shouldDisconnect:a})}return i}commitInsertion(e,n){for(let i of e){let s=i.node[F];if(s){let a=i.node[M],u=i.node[p];i.source={parent:s,index:Dt(s,i.node),previousSibling:a,nextSibling:u}}}for(let i of e){let s=this.attachChild(i.node,n);i.insertIndex=s.index,i.previousSibling=s.previousSibling,i.nextSibling=s.nextSibling}let r=this[I];for(let{adoption:i}of e)i&&rt(i,r);let o=this[U];for(let{nodes:i}of e)if(i)for(let s of i)s[U]=o}attachChild(e,n){if(n){let i=n[M];e[p]=n,e[M]=i,i?i[p]=e:this[S]=e,n[M]=e}else{e[p]=null;let i=this[S];if(i){let s;for(;s=i[p];)i=s;i[p]=e,e[M]=i}else this[S]=e,e[M]=null}let r=z(e);e[F]=this;let o;if(n){if(o=this.childNodes.indexOf(n),this.childNodes.splice(o,0,e),r){let i=n;for(;i&&!z(i);)i=i[p];i?this.children.splice(this.children.indexOf(i),0,e):this.children.push(e)}}else o=this.childNodes.length,this.childNodes.push(e),r&&this.children.push(e);return{index:o,previousSibling:e[M],nextSibling:e[p]}}queueRemovalMutationRecord(e,n,r,o){st&&J({type:\"childList\",target:e,removedNodes:Mt(n),previousSibling:r,nextSibling:o})}queueInsertionMutationRecords(e){if(st)for(let n of e){let{node:r,source:o}=n;o&&this.queueRemovalMutationRecord(o.parent,r,o.previousSibling,o.nextSibling),J({type:\"childList\",target:this,addedNodes:Mt(r),previousSibling:n.previousSibling,nextSibling:n.nextSibling})}}collectRemovalHookEffects(e,n){return this.nodeType!==Y||Ke(this)?[]:[[()=>this[D].removeChild?.(this,e,n)]]}collectInsertionHookEffects(e){let n=[];for(let r of e){let{node:o,source:i}=r;i?.parent.nodeType===Y&&!Ke(i.parent)&&n.push([()=>i.parent[D].removeChild?.(i.parent,o,i.index)]),this.nodeType===Y&&!Ke(this)&&n.push([()=>this[D].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){ur(e,n)}};function cr(t,e,n,r){if(e.parentNode!==t)throw Error(\"not a child of this node\");let o=t[U]?n.treeNodes:void 0,i=e[M],s=e[p],a=Dt(t,e);if(o)for(let l of o)l[U]=!1;rt(n.nodes,r),st&&J({type:\"childList\",target:t,removedNodes:Mt(e),previousSibling:i,nextSibling:s}),o&&ur(o,\"disconnectedCallback\");let u=[];t.nodeType===Y&&!Ke(t)&&u.push([()=>t[D].removeChild?.(t,e,a)]),we(u)}function Dt(t,e){let n=e[M],r=e[p];n?n[p]=r:t[S]=r,r&&(r[M]=n);let o=t.childNodes.indexOf(e);return t.childNodes.splice(o,1),z(e)&&t.children.splice(t.children.indexOf(e),1),e[F]=null,e[p]=null,e[M]=null,o}function ur(t,e){for(let n of t){let r=n[e];typeof r==\"function\"&&gt(n,()=>r.call(n))}}function at(t,e,n,r,o){let{observedAttributes:i}=t.constructor,{attributeChangedCallback:s}=t;s==null||i==null||!i.includes(e)||gt(t,()=>s.call(t,e,n,r,o))}var Lt=class{[S]=null;constructor(e){this[j]=e}getNamedItem(e){let n=String(e),r=this[j][x]===_?H(n):n,o=this[S];for(;o;){if(o.name===r)return o;o=o[p]}return null}getNamedItemNS(e,n){let r=se(e),o=String(n),i=this[S];for(;i;){if(i.localName===o&&i[x]===r)return i;i=i[p]}return null}item(e){let n=this[S],r=0;for(;n;){if(r++===e)return n;n=n[p]}return null}get length(){let e=0,n=this[S];for(;n;)e++,n=n[p];return e}removeNamedItem(e){let n=String(e),r=this[j][x]===_?H(n):n;return B(()=>this.removeNamedItemImmediately(o=>o.name===r))}removeNamedItemNS(e,n){let r=se(e),o=String(n);return B(()=>this.removeNamedItemImmediately(i=>i.localName===o&&i[x]===r))}removeNamedItemImmediately(e){let n=this[j],r=this[S],o=null;for(;r!=null;){if(e(r)){o&&(o[p]=r[p]),this[S]===r&&(this[S]=r[p]);let i=r.value;return r[p]=null,r[j]=null,De&&J({type:\"attributes\",target:n,attributeName:r.name,attributeNamespace:r[x],oldValue:i}),n[D].removeAttribute?.(n,r.name,r[x]),at(n,r.localName,i,null,r[x]),r}o=r,r=r[p]}return null}setNamedItem(e){return B(()=>this.setNamedItemImmediately(e))}setNamedItemImmediately(e){let n=this[j],r=e[j];if(r!=null&&r!==n)throw C(\"The attribute is already in use by another element.\",\"InUseAttributeError\");let o=null,i=this[S],s=null;for(;i;){if(i.localName===e.localName&&i[x]===e[x]){if(i===e)return i;s?s[p]=e:this[S]=e,e[p]=i[p],i[p]=null,o=i;break}s=i,i=i[p]}o==null&&(s?s[p]=e:this[S]=e),e[j]=n,e[I]=n[I],o&&(o[j]=null);let a=o==null||o.value!==e.value,u=o!=null&&o.name!==e.name;return a&&De&&J({type:\"attributes\",target:n,attributeName:e.name,attributeNamespace:e[x],oldValue:o?.value??null}),u&&n[D].removeAttribute?.(n,o.name,o[x]),(a||u)&&n[D].setAttribute?.(n,e.name,e.value,e[x]),a&&at(n,e.localName,o?.value??null,e.value,e[x]),o}setNamedItemNS(e){return this.setNamedItem(e)}*[Symbol.iterator](){let e=this[S];for(;e;)yield e,e=e[p]}};var ve=class extends Z{nodeType=ke;[x]=null;[p]=null;[j]=null;constructor(e,n,r){super(),this[w]=e,this[de]=n,r&&(this[x]=r)}get nodeName(){return this[w]}set nodeName(e){}get name(){return this[w]}set name(e){}get localName(){if(this[x]==null)return this[w];let e=this[w].indexOf(\":\");return e<0?this[w]:this[w].slice(e+1)}get prefix(){if(this[x]==null)return null;let e=this[w].indexOf(\":\");return e<0?null:this[w].slice(0,e)}get value(){return this[de]}set value(e){let n=String(e),r=this[j];if(!r){this[de]=n;return}B(()=>{let o=this[de];this[de]=n,De&&o!==n&&J({type:\"attributes\",target:r,attributeName:this[w],attributeNamespace:this[x],oldValue:o}),this[D].setAttribute?.(r,this[w],n,this[x]),at(r,this.localName,o,n,this[x])})}get nodeValue(){return this.value}set nodeValue(e){this.value=e}get ownerElement(){return this[j]}get namespaceURI(){return this[x]}get specified(){return!0}};var ao={amp:\"&\",AMP:\"&\",apos:\"'\",gt:\">\",GT:\">\",lt:\"<\",LT:\"<\",quot:'\"',QUOT:'\"'},lo=new Set([\"area\",\"base\",\"br\",\"col\",\"embed\",\"hr\",\"img\",\"input\",\"link\",\"meta\",\"param\",\"source\",\"track\",\"wbr\"]),co=/(?:<([a-z][a-z0-9-:]*)((?:[\\s]+[^<>'\"=/\\s]+(?:=(['\"])[^]*?\\3|=[^>'\"\\s]*|))*)[\\s]*(\\/?)\\s*>|<\\/([a-z][a-z0-9-:]*)>|<!--(.*?)-->|([^<>]+))/gi,fr=/\\s([^<>'\"=/\\n\\s]+)(?:=([\"'])([\\s\\S]*?)\\2|=([^>'\"\\n\\s]*)|)/g,uo=\"|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|\",mo=/^(?:color|face|size)$/i;function dr(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 ao[n];let i=Number.parseInt(r??o,r?10:16);try{return String.fromCodePoint(i)}catch{return e}})}function pr(t){return t.namespaceURI===_&&lo.has(t.localName)}function mr(t){let e=t.localName;return t[x]===$&&(e===\"foreignObject\"||e===\"desc\"||e===\"title\")}function fo(t,e){if(uo.includes(`|${t}|`))return!0;if(t!==\"font\")return!1;for(let n of e.matchAll(fr))if(mo.test(n[1]))return!0;return!1}function Ht(t,e){let n=e.ownerDocument,r=n.createDocumentFragment(),o=[],i=r;for(let s of t.matchAll(co)){let a=s[1];if(a){let u=s[2],l=H(a),m=o[o.length-1]?.element??e,f=m[x]===$?$:_;if(l===\"svg\")f=$;else if(f===$){if(mr(m))f=_;else if(fo(l,u)){for(;o.length>0;){let v=o[o.length-1];if(v.element[x]!==$||mr(v.element))break;o.pop(),i=v.target}f=_}}let g=f===_?l:a,h=n[Ce](g,f,null,g);for(let v of u.matchAll(fr))h.setAttribute(v[1],dr(v[3]||v[4]||\"\"));if(i.append(h),pr(h)||f!==_&&s[4])continue;o.push({element:h,target:i}),i=f===_&&l===\"template\"?h.content:h}else if(s[5]){let u=H(s[5]);for(let l=o.length-1;l>=0;l--){let m=o[l],f=H(m.element[w]);if(f===u){i=m.target,o.length=l;break}if(m.element[x]===_&&f===\"template\")break}}else s[6]?i.append(n.createComment(s[6])):i.append(dr(s[7]))}return r}function Gt(t){return gr([{type:\"content\",child:t[S]}])}function hr(t){return gr([{type:\"opening\",node:t}])}function gr(t){let e=[],n;for(;n=t.pop();)switch(n.type){case\"opening\":{let r=n.node;switch(r.nodeType){case Y:{let o=r;e.push(`<${o[w]}`);let i=o[te]?.[S];for(;i;){e.push(` ${i[w]}`);let a=i[de];a!==\"\"&&(a=String(a).replace(/&/g,\"&amp;\").replace(/\"/g,\"&quot;\"),e.push(`=\"${a}\"`)),i=i[p]}if(e.push(\">\"),pr(o))break;let s=o.namespaceURI===_&&o.localName===\"template\"?o[ie]:o;t.push({type:\"closing\",name:o[w]}),t.push({type:\"content\",child:s?.[S]??null});break}case Ie:{let o=r;e.push(o[X].replace(/&/g,\"&amp;\").replace(/\"/g,\"&quot;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\"));break}case Me:{let o=r;e.push(`<!--${o[X]}-->`);break}}break}case\"content\":{let r=n.child;r&&(t.push({type:\"content\",child:r[p]}),t.push({type:\"opening\",node:r}));break}case\"closing\":e.push(`</${n.name}>`);break}return e.join(\"\")}var G=class extends ne{nodeType=Y;[x]=_;[ue]=null;get namespaceURI(){return this[x]}get prefix(){return this[ue]}get localName(){let e=this[ue];return e==null?this[w]:this[w].slice(e.length+1)}get nodeName(){return this[x]===_?Fn(this[w]):this[w]}get tagName(){return this.nodeName}get id(){return this.getAttributeNS(null,\"id\")??\"\"}set id(e){this.setAttribute(\"id\",String(e))}get slot(){return this.getAttributeNS(null,\"slot\")??\"\"}set slot(e){let n=String(e);this.getAttributeNS(null,\"slot\")!==n&&this.attributes.setNamedItem(new ve(\"slot\",n))}get attributes(){let e=this[te];return e||(e=new Lt(this),this[te]=e),e}getAttributeNames(){return[...this.attributes].map(e=>e.name)}getElementsByTagName(e){return _t(this,e)}get firstElementChild(){return this.children[0]??null}getElementsByClassName(e){return At(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);cn(r);let i=this[x]===_?H(r):r,s=this.attributes.getNamedItemNS(null,i);s?s.value=o:this.attributes.setNamedItem(new ve(i,o))}setAttributeNS(e,n,r){let o=se(e),i=String(n),s=String(r),a=mt(o,i,\"attribute\"),u=this.attributes.getNamedItemNS(a.namespace,a.localName);u?u.value=s:this.attributes.setNamedItemNS(new ve(a.qualifiedName,s,a.namespace))}toggleAttribute(e,n){let r=String(e);cn(r);let o=this[x]===_?H(r):r,i=this.attributes.getNamedItemNS(null,o),s=n===void 0?void 0:!!n;return i==null?s===!1?!1:(this.attributes.setNamedItem(new ve(o,\"\")),!0):s===!0?!0:(this.attributes.removeNamedItemNS(null,o),!1)}getAttribute(e){let n=this.attributes.getNamedItem(e);return n&&n.value}getAttributeNS(e,n){let r=this.attributes.getNamedItemNS(e,n);return r&&r.value}hasAttribute(e){return this.attributes.getNamedItem(e)!=null}hasAttributeNS(e,n){return this.attributes.getNamedItemNS(e,n)!=null}removeAttribute(e){let n=String(e),r=this[x]===_?H(n):n;this.attributes.removeNamedItemNS(null,r)}removeAttributeNS(e,n){this.attributes.removeNamedItemNS(e,n)}get outerHTML(){return hr(this)}get innerHTML(){return Gt(this)}set innerHTML(e){if(e==null||e===\"\")this.replaceChildren();else{let n=Ht(String(e),this);this.replaceChildren(n)}}};var Le=class t extends G{[x]=$;get ownerSVGElement(){let e=null,n=this.parentNode;for(;n instanceof t;)e=n,n=n.parentNode;return e}};var ge=class extends he{[X]=\"\";constructor(e){super(),this[X]=e==null?\"\":String(e)}setData(e){let n=Rn,r=n?this[X]:null,o=\"\";e!=null&&(o=typeof e==\"string\"?e:String(e)),this[X]=o,n&&r!==o&&J({type:\"characterData\",target:this,oldValue:r}),this[D].setText?.(this,o)}get data(){return this[X]}set data(e){this.setData(e)}};var He=class extends ge{nodeType=Ie;[w]=\"#text\"};var Ge=class extends ge{nodeType=Me;[w]=\"#comment\"};var Ue=class extends ne{nodeType=fe;[w]=\"#document-fragment\";[I]=typeof window<\"u\"?window.document:null;getElementById(e){return Rt(this,e)}};var Ve=class extends G{get content(){let e=this[ie];return e||(e=this.ownerDocument.createDocumentFragment(),e[me]=this,this[ie]=e),e}set content(e){}set innerHTML(e){this.content.replaceChildren(Ht(String(e),this))}get innerHTML(){let e=this[ie];return e?Gt(e):\"\"}};var Ut=class extends G{};var Vt=class extends G{};var Bt=class extends G{};var lt=class extends ne{nodeType=Te;[w]=\"#document\";[U]=!0;constructor(e){super(),this.defaultView=e,this[I]=this,this.documentElement=jt(new Bt,this,\"html\"),this.body=jt(new Ut,this,\"body\"),this.head=jt(new Vt,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 At(this,e)}createElement(e){let n=String(e);return Wn(n),An(this,H(n))}createElementNS(e,n){let r=mt(e,n,\"element\");return An(this,r.qualifiedName,r.namespace,r.prefix,r.localName)}[Ce](e,n,r,o){return An(this,e,n,r,o)}createTextNode(e){let n=zt(new He(e),this);return this[D].createText?.(n,n.data),n}createComment(e){return zt(new Ge(e),this)}createDocumentFragment(){return zt(new Ue,this)}createEvent(){return new V(\"\")}getElementById(e){return Rt(this,e)}getElementsByTagName(e){return _t(this,e)}importNode(e,n){if(e.nodeType===Te)throw C(\"Cannot import a document node\",\"NotSupportedError\");return Ot(e,n,this)}adoptNode(e){if(e[I]===this)return e;let n=St(e);return B(()=>{let r=e.parentNode;return r?cr(r,e,n,this):rt(n.nodes,this),e})}};function zt(t,e){return Object.defineProperty(t,I,{value:e,writable:!0,enumerable:!1}),t}function An(t,e,n=_,r=null,o=e){let i;if(n===$)i=new Le;else if(n===_&&o===\"template\")i=new Ve;else if(n===_){let s=t.defaultView.customElements.get(o);i=s?new s:new G}else i=new G;return jt(i,t,e,n,r)}function jt(t,e,n,r=_,o=null){return zt(t,e),Object.defineProperties(t,{[w]:{value:n},[x]:{value:r},[ue]:{value:o}}),e[D].createElement?.(t,r),t}var Ft=class extends V{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 qt=class extends V{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 Yt=class extends V{constructor(e,n){super(e,n),this.promise=n.promise,this.reason=n.reason}};var Wt=class extends V{constructor(e,n){super(e,n),this.oldState=n.oldState,this.newState=n.newState}};var Xt=class extends V{constructor(e,n={}){super(e,n),this.relatedTarget=n.relatedTarget??null}};var $t=class extends V{constructor(e,n={}){super(e,n),this.clipboardData=n.clipboardData??null}};var Kt=class extends G{};var po=/^[a-z][^A-Z\\u0000\\t\\n\\f\\r />]*-[^A-Z\\u0000\\t\\n\\f\\r />]*$/u,ho=new Set([\"annotation-xml\",\"color-profile\",\"font-face\",\"font-face-src\",\"font-face-uri\",\"font-face-format\",\"font-face-name\",\"missing-glyph\"]);function br(t){return po.test(t)&&!ho.has(t)}function yr(t){return C(`Invalid custom element name: \"${t}\"`,\"SyntaxError\")}var Zt=class{registry=new Map;listenersByName=new Map;define(e,n,r){if(!br(e))throw yr(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 i of o)i(n)}}get(e){return this.registry.get(e)}getName(e){for(let[n,r]of this.registry)if(r===e)return n;return null}whenDefined(e){if(!br(e))return Promise.reject(yr(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 go=[\"onerror\",\"onunhandledrejection\"],Nr=Symbol.for(\"@remote-dom/polyfill/global-property\");function Tr(t){return Object.getOwnPropertyDescriptors(t)}function wr(t){let e={};for(let[n,r]of Object.entries(Object.getOwnPropertyDescriptors(pe.prototype)))n!==\"constructor\"&&typeof r.value==\"function\"&&(r.value=_n(r.value.bind(t)),e[n]=r);return e}function xr(t){let e={};for(let n of go)e[n]={configurable:!0,enumerable:!0,get:_n(()=>t[n]),set:_n(r=>{t[n]=r})};return e}function bo(t){return Object.assign(Tr(t),wr(t),xr(t))}function _n(t){return Object.defineProperty(t,Nr,{value:!0}),t}function Er(t,e){for(let n of Reflect.ownKeys(e)){let r=yo(t,n);(r==null||Eo(r))&&Object.defineProperty(t,n,e[n])}}function yo(t,e){let n=t;for(;n;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function Eo(t){return[t.value,t.get,t.set].some(e=>typeof e==\"function\"&&e[Nr]===!0)}var Se=class extends pe{[D]={};[ut]=[];[Ne]=To(this);name=\"\";window=this;parent=this;self=this;top=this;document=new lt(this);customElements=new Zt;location=globalThis.location;navigator=globalThis.navigator;Event=V;ErrorEvent=qt;PromiseRejectionEvent=Yt;ToggleEvent=Wt;FocusEvent=Xt;ClipboardEvent=$t;EventTarget=pe;CustomEvent=Ft;Node=Z;ParentNode=ne;ChildNode=he;DocumentFragment=Ue;Document=lt;CharacterData=ge;Comment=Ge;Text=He;Element=G;HTMLElement=Kt;SVGElement=Le;HTMLTemplateElement=Ve;MutationObserver=It;#t=null;#n=null;#e=null;static with(...e){let n=this;return class extends n{constructor(){super();for(let o of e)No(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=Tr(e),i=Object.assign(wr(e),xr(e));delete o.self,Object.defineProperties(globalThis,o),Er(globalThis,i),typeof n>\"u\"||n===r&&n!==globalThis?Object.defineProperty(globalThis,\"self\",{value:e,configurable:!0,writable:!0,enumerable:!0}):n!==globalThis&&(Object.defineProperties(n,o),Er(n,i))}static setGlobalThis(e){for(let n in e)e[n]===e&&(e[n]=globalThis);Object.defineProperties(globalThis,bo(e))}};function No(t,e){t[ut].push(e(t)??{})}function To(t){return{createElement:le.bind(null,t,\"createElement\"),setAttribute:le.bind(null,t,\"setAttribute\"),removeAttribute:le.bind(null,t,\"removeAttribute\"),createText:le.bind(null,t,\"createText\"),setText:le.bind(null,t,\"setText\"),insertChild:le.bind(null,t,\"insertChild\"),removeChild:le.bind(null,t,\"removeChild\"),addEventListener:le.bind(null,t,\"addEventListener\"),removeEventListener:le.bind(null,t,\"removeEventListener\")}}function le(t,e,...n){for(let i of t[ut])i[e]?.apply(i,n);let r=t[D];r[e]?.apply(r,n)}var Qt=new Se;var Pn=\"~\";var be=new WeakMap;function Be(t){return be.get(t)}var Mn=new WeakMap,xo=0;function ee(t){let e=Mn.get(t);return e==null&&(e=String(xo++),Jt(t,e)),e}function Jt(t,e){Mn.set(t,e)}var kn=new WeakMap;function vo(t){return kn.get(t)}var In=new WeakMap;function So(t){let e=In.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 Oo=new WeakMap;function Ro(t){return Oo.get(t)}function Dn(t,e,n){let r=kn.get(t);if(r==null&&(r={},kn.set(t,r)),r[e]===n)return;r[e]=n;let o=be.get(t);o?.mutate([[3,ee(t),e,n,1]])}function ye(t,e,n){let r=In.get(t);if(r==null&&(r={},In.set(t,r)),r[e]===n)return;n==null?delete r[e]:r[e]=String(n);let o=be.get(t);o?.mutate([[3,ee(t),e,n,2]])}function ze(t,e){if(be.get(t)!==e&&(be.set(t,e),t.childNodes))for(let r=0;r<t.childNodes.length;r++)ze(t.childNodes[r],e)}function en(t){if(be.get(t)!=null&&(be.delete(t),t.childNodes))for(let n=0;n<t.childNodes.length;n++)en(t.childNodes[n])}function je(t){let{nodeType:e}=t;switch(e){case 1:return{id:ee(t),type:e,element:t.localName,properties:Cn(vo(t)),attributes:Cn(So(t)),eventListeners:Cn(Ro(t)),children:Array.from(t.childNodes).map(je)};case 3:case 8:return{id:ee(t),type:e,data:t.data};default:throw new Error(`Cannot serialize node of type ${t.nodeType} (${typeof t.nodeType})`)}}function Cn(t){return t?{...t}:void 0}function Ln(t,e,...n){let r=Mn.get(t),o=be.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 Fe=Qt[D];Fe.insertChild=(t,e,n)=>{let r=Be(t);r!=null&&(ze(e,r),r.mutate([[0,ee(t),je(e),n]]))};Fe.removeChild=(t,e,n)=>{let r=Be(t);r!=null&&(en(e),r.mutate([[1,ee(t),n]]))};Fe.setText=(t,e)=>{let n=Be(t);n?.mutate([[2,ee(t),e]])};Fe.setAttribute=(t,e,n)=>{t.tagName.includes(\"-\")||ye(t,e,n)};Fe.removeAttribute=(t,e)=>{t.tagName.includes(\"-\")||ye(t,e)};Se.setGlobal(Qt);function tn(t){if(typeof t==\"string\")return{type:\"navigate\",to:t};let{place:e,record:n,where:r,section:o}=t??{},i={...r===void 0?{}:{where:r},...o===void 0?{}:{section:String(o)}};return typeof e==\"string\"?{type:\"navigate\",place:e,...i}:typeof n==\"string\"?{type:\"navigate\",to:n,...i}:void 0}function Sr(t){let e=t;return typeof t==\"object\"&&t!==null&&e.graview===\"host-hello\"&&typeof e.nonce==\"string\"}function Rr(t,e={}){let n,r=\"\",o,i=0,s=new Set,a=new Map,u=[],l=b=>{n?n.postMessage({...b,nonce:r}):u.push(b)},m=b=>{let E=b.data;if(!(!E||typeof E!=\"object\")){if(E.type===\"props\"){o=E.props;for(let k of s)k(E.props)}else E.type===\"answer\"?(a.get(E.id)?.(E),a.delete(E.id)):E.type===\"event\"&&typeof E.listener==\"number\"?e.onEvent?.(E):E.type===\"heartbeat\"&&typeof E.beat==\"number\"&&l({type:\"heartbeat\",beat:E.beat});e.onMessage?.(E)}},f=()=>{},g=b=>{if(n||!t.fromHost(b)||!Sr(b.data)||b.data.protocol!==1)return;let E=b.ports[0];if(E){n=E,r=b.data.nonce,n.onmessage=m,n.start?.(),f();for(let k of u.splice(0))l(k)}};f=t.listen(g),t.ready({graview:\"guest-ready\",protocol:1});let h,v={get props(){return o},subscribe(b){return s.add(b),()=>s.delete(b)},act(b,E={}){let k=i+=1;return new Promise(L=>{a.set(k,L),l({type:\"act\",id:k,name:b,args:E})})},navigate(b){let E=tn(b);E&&l(E)},size(b){l({type:\"size\",height:b})},autoSize(b){let E=b??globalThis.document?.documentElement,k=globalThis.ResizeObserver;if(!E||!k||typeof E.getBoundingClientRect!=\"function\")return()=>{};h?.disconnect();let L=new k(()=>v.size(Math.ceil(E.getBoundingClientRect().height)));return L.observe(E),h=L,()=>L.disconnect()},close(){h?.disconnect(),f(),n?.close(),s.clear()}};return{guest:v,send:l}}var _r=[\"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\"],Pr=[\"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\"],Cr=[\"self\",\"postMessage\",\"setTimeout\",\"clearTimeout\",\"setInterval\",\"clearInterval\",\"queueMicrotask\",\"structuredClone\",\"crypto\",\"console\",\"DOMException\"],kr=[\"TEMPORARY\",\"PERSISTENT\"],tl=Object.freeze([..._r,...Pr,...Cr,...kr]),nl=Object.freeze([\"constructor\",\"__defineGetter__\",\"__defineSetter__\",\"hasOwnProperty\",\"__lookupGetter__\",\"__lookupSetter__\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"toString\",\"valueOf\",\"__proto__\",\"toLocaleString\"]),Ar=t=>typeof t==\"symbol\"?`[${t.description??\"symbol\"}]`:t;function Ir(t=globalThis,e=[],n={}){let r=[],o=[],i=new Set([..._r,...Pr,...Cr,...e,\"constructor\",Symbol.toStringTag]),s=(T,P)=>{let W=Reflect.getOwnPropertyDescriptor(T,P);return W===void 0||!(\"value\"in W)||W.writable||W.configurable?!1:n.primitivesStay&&typeof P==\"symbol\"&&(typeof W.value!=\"object\"||W.value===null)&&typeof W.value!=\"function\"?!0:kr.includes(P)&&typeof W.value==\"number\"},a=t,u=a.setTimeout,l=a.setInterval,m=a.crypto,f=(T,P)=>function(W,c,...y){if(typeof W!=\"function\")throw new TypeError(`${P} takes a function: a guest view cannot run code from text`);return T.call(t,W,c,...y)},g=m?Object.freeze({getRandomValues:T=>m.getRandomValues(T)}):void 0,h=a.document?.defaultView;if(h&&h!==a)for(let T of Reflect.ownKeys(h))typeof T==\"symbol\"||i.has(T)||Reflect.deleteProperty(h,T)||o.push(`window.${T}`);let v=[];for(let T=t;T&&T!==Object.prototype;T=Object.getPrototypeOf(T))v.push(T);for(let T of v)for(let P of Reflect.ownKeys(T))i.has(P)||(Reflect.deleteProperty(T,P)?r.push(Ar(P)):s(T,P)||o.push(Ar(P)));let b=()=>function(){throw new EvalError(\"A guest view cannot make code from text.\")},E=[Function.prototype,Object.getPrototypeOf(async function(){}),Object.getPrototypeOf(function*(){}),Object.getPrototypeOf(async function*(){})];for(let T of E){let P=b();Object.defineProperty(P,\"prototype\",{value:T,writable:!1,enumerable:!1,configurable:!1}),Reflect.defineProperty(T,\"constructor\",{value:P,writable:!1,enumerable:!1,configurable:!1})||o.push(\"Function.prototype.constructor\"),T===Function.prototype&&Reflect.defineProperty(t,\"Function\",{value:P,writable:!0,enumerable:!1,configurable:!0})}let k=(T,P)=>{Reflect.defineProperty(t,T,{value:P,writable:!0,enumerable:!0,configurable:!0})||o.push(T)};k(\"setTimeout\",f(u,\"setTimeout\")),k(\"setInterval\",f(l,\"setInterval\")),g&&k(\"crypto\",g);for(let T of v.slice(1))Object.freeze(T);for(let T of Reflect.ownKeys(t)){let P=Reflect.getOwnPropertyDescriptor(t,T);Reflect.defineProperty(t,T,\"value\"in P?{...P,writable:!1,configurable:!1}:{...P,configurable:!1})}let L;try{L=Reflect.preventExtensions(t)}catch{L=!1}return{removed:r,stuck:o,sealed:L}}var ct=class extends HTMLElement{constructor(){super(),Jt(this,Pn)}connect(e){if(Be(this)===e||(ze(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,Pn,je(o),r])}e.mutate(n)}updateRemoteProperty(e,n){Dn(this,e,n)}callRemoteMethod(e,...n){return Ln(this,e,...n)}};var d={},nn={empty:!0},Ao={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\"},Hn={div:d,section:d,article:d,aside:d,header:d,footer:d,nav:d,hgroup:d,search:d,address:d,figure:d,figcaption:d,blockquote:d,p:d,pre:d,hr:nn,br:nn,wbr:nn,h1:d,h2:d,h3:d,h4:d,h5:d,h6:d,span:d,strong:d,em:d,b:d,i:d,u:d,s:d,small:d,mark:d,abbr:d,cite:d,q:d,code:d,kbd:d,samp:d,var:d,sub:d,sup:d,dfn:d,bdi:d,bdo:d,ruby:d,rt:d,rp:d,time:{attributes:{datetime:\"text\"}},data:{attributes:{value:\"text\"}},del:{attributes:{datetime:\"text\"}},ins:{attributes:{datetime:\"text\"}},a:d,ul:d,menu:d,dl:d,dt:d,dd:d,ol:{attributes:{start:\"number\",reversed:\"boolean\",type:{oneOf:[\"1\",\"a\",\"A\",\"i\",\"I\"]}}},li:{attributes:{value:\"number\"}},table:d,caption:d,thead:d,tbody:d,tfoot:d,tr:d,colgroup:{attributes:{span:\"number\"}},col:{attributes:{span:\"number\"},empty:!0},th:{attributes:{colspan:\"number\",rowspan:\"number\",headers:\"text\",scope:{oneOf:[\"row\",\"col\",\"rowgroup\",\"colgroup\"]},abbr:\"text\"}},td:{attributes:{colspan:\"number\",rowspan:\"number\",headers:\"text\"}},details:{attributes:{open:\"boolean\",name:\"text\"}},summary:d,button:{attributes:{type:{oneOf:[\"button\"]},disabled:\"boolean\",name:\"text\",value:\"text\"}},input:{empty:!0,attributes:{type:{oneOf:[\"text\",\"search\",\"number\",\"range\",\"checkbox\",\"radio\",\"date\",\"time\",\"datetime-local\",\"month\",\"week\",\"color\",\"email\",\"tel\",\"url\"]},name:\"text\",value:\"text\",placeholder:\"text\",min:\"text\",max:\"text\",step:\"text\",checked:\"boolean\",disabled:\"boolean\",readonly:\"boolean\",required:\"boolean\",maxlength:\"number\",minlength:\"number\",size:\"number\",pattern:\"text\",multiple:\"boolean\",inputmode:\"text\",enterkeyhint:\"text\"}},select:{attributes:{name:\"text\",disabled:\"boolean\",multiple:\"boolean\",required:\"boolean\",size:\"number\"}},option:{attributes:{value:\"text\",selected:\"boolean\",disabled:\"boolean\",label:\"text\"}},optgroup:{attributes:{label:\"text\",disabled:\"boolean\"}},textarea:{attributes:{name:\"text\",placeholder:\"text\",rows:\"number\",cols:\"number\",disabled:\"boolean\",readonly:\"boolean\",required:\"boolean\",maxlength:\"number\",minlength:\"number\",wrap:{oneOf:[\"soft\",\"hard\",\"off\"]}}},label:{attributes:{for:\"text\"}},fieldset:{attributes:{disabled:\"boolean\",name:\"text\"}},legend:d,output:d,meter:{attributes:{value:\"number\",min:\"number\",max:\"number\",low:\"number\",high:\"number\",optimum:\"number\"}},progress:{attributes:{value:\"number\",max:\"number\"}},img:{empty:!0,attributes:{src:\"image\",alt:\"text\",width:\"number\",height:\"number\",decoding:{oneOf:[\"async\",\"sync\",\"auto\"]}}},\"graview-video\":nn},_o=[\"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\"],Po={id:\"text\",class:\"text\",style:\"style\",lang:\"text\",role:\"text\",tabindex:{oneOf:[\"-1\",\"0\"]},transform:\"geometry\",...Object.fromEntries(_o.map(t=>[t,\"css\"]))},qe={x:\"geometry\",y:\"geometry\",width:\"geometry\",height:\"geometry\"},rn={viewBox:\"geometry\",preserveAspectRatio:\"geometry\"},Mr={gradientUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},gradientTransform:\"geometry\",spreadMethod:{oneOf:[\"pad\",\"reflect\",\"repeat\"]},href:\"fragment\"},Dr={svg:{attributes:{...qe,...rn}},g:d,defs:d,symbol:{attributes:{...qe,...rn,refX:\"geometry\",refY:\"geometry\"}},use:{attributes:{...qe,href:\"fragment\"}},title:d,desc:d,path:{attributes:{d:\"geometry\",pathLength:\"number\"}},rect:{attributes:{...qe,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\",...Mr}},radialGradient:{attributes:{cx:\"geometry\",cy:\"geometry\",r:\"geometry\",fx:\"geometry\",fy:\"geometry\",fr:\"geometry\",...Mr}},stop:{attributes:{offset:\"geometry\"}},clipPath:{attributes:{clipPathUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},mask:{attributes:{...qe,maskUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},maskContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},pattern:{attributes:{...qe,...rn,patternUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternTransform:\"geometry\",href:\"fragment\"}},marker:{attributes:{...rn,markerWidth:\"geometry\",markerHeight:\"geometry\",refX:\"geometry\",refY:\"geometry\",orient:\"geometry\",markerUnits:{oneOf:[\"strokeWidth\",\"userSpaceOnUse\"]}}}};var Lr={section:[\"aria-label\",\"aria-labelledby\",\"title\"]};function Co(t){return/^aria-[a-z]+$/.test(t)}function ko(t){return/^data-[a-z0-9][a-z0-9_.-]*$/.test(t)}var Io=new Map(Object.keys(Dr).map(t=>[t.toLowerCase(),t]));function Hr(t){return Io.get(t.toLowerCase())}function Gr(t,e,n){let r=n.toLowerCase(),o=t===\"html\"?[Hn[e]?.attributes,Ao]:[Dr[e]?.attributes,Po],i=t===\"svg\"&&r===\"xlink:href\"?\"href\":r;for(let s of o)if(s){for(let[a,u]of Object.entries(s))if(a.toLowerCase()===i)return{name:a,kind:u}}if(Co(r)||ko(r))return{name:r,kind:\"text\"}}var Ur=\"~\",on=t=>typeof t==\"object\"&&t!==null&&!Array.isArray(t),re=(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=>re(n,e+1)):Object.fromEntries(Object.entries(t).map(([n,r])=>[n,re(r,e+1)]))};function Vr(){let t=new Map,e=new Map,n=new Map([[Ur,{children:[],listeners:new Map}]]),r=0,o=l=>{let m=e.get(l);return m===void 0&&(m=r+=1,e.set(l,m),t.set(m,{listener:l,count:0})),t.get(m).count+=1,m},i=l=>{let m=t.get(l);m&&(m.count-=1,!(m.count>0)&&(t.delete(l),e.delete(m.listener)))},s=l=>{let m=n.get(l);if(m){n.delete(l);for(let f of m.listeners.values())i(f);for(let f of m.children)s(f)}},a=(l,m,f=0)=>{if(!on(l)||f>64)return re(l);let g=typeof l.id==\"string\"?l.id:void 0,h=m&&g!==void 0&&g!==Ur;h&&s(g);let v={children:[],listeners:new Map};h&&n.set(g,v);let b={};for(let[E,k]of Object.entries(l))E===\"children\"&&Array.isArray(k)?b[E]=k.map(L=>{let T=a(L,h,f+1);return h&&on(L)&&typeof L.id==\"string\"&&v.children.push(L.id),T}):E===\"eventListeners\"&&on(k)?b[E]=Object.fromEntries(Object.entries(k).map(([L,T])=>{if(typeof T!=\"function\"||!h)return[L,void 0];let P=o(T);return v.listeners.set(L,P),[L,{listener:P}]})):b[E]=re(k,f+1);return b},u=l=>{if(!Array.isArray(l))return re(l);let[m,f]=l,g=typeof f==\"string\"?n.get(f):void 0;if(m===0){let h=a(l[2],g!==void 0),v=on(l[2])?l[2].id:void 0;if(g&&typeof v==\"string\"&&n.has(v)){let b=Number(l[3]);g.children.splice(Number.isInteger(b)&&b>=0&&b<=g.children.length?b:g.children.length,0,v)}return[m,re(f),h,re(l[3])]}if(m===1){let h=Number(l[2]);return g&&Number.isInteger(h)&&h>=0&&h<g.children.length&&s(g.children.splice(h,1)[0]),re(l)}if(m===3&&l[4]===3){let h=String(l[2]),v=l[3],b=g&&typeof v==\"function\"?o(v):void 0,E=g?.listeners.get(h);return E!==void 0&&i(E),b===void 0?g?.listeners.delete(h):g.listeners.set(h,b),[m,re(f),h,b===void 0?void 0:{listener:b},3]}return re(l)};return{encode:l=>l.map(u),listener:l=>t.get(l)?.listener,get listening(){return t.size},get nodes(){return n.size-1}}}var sn=\"graview-view-root\",Mo=t=>t.replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\"/g,\"&quot;\").replace(/'/g,\"&#39;\"),Do=t=>Object.freeze({html:t,toString:()=>t}),Br=t=>typeof t==\"object\"&&t!==null&&typeof t.html==\"string\"&&Object.isFrozen(t),zr=t=>t==null||t===!1?\"\":Array.isArray(t)?t.map(zr).join(\"\"):Br(t)?t.html:Mo(String(t));function jr(t){customElements.get(sn)||customElements.define(sn,ct);let e=Event,n=Vr(),r=new Set,o=new Set,i,s=[];for(let c of[\"closest\",\"matches\",\"dataset\"]){let y=()=>{throw new TypeError(`A view's element has no ${c}: graview.on hands event.element, the element its selector matched; read event.element.getAttribute(\"data-\\u2026\").`)};c in Element.prototype||Object.defineProperty(Element.prototype,c,c===\"dataset\"?{get:y}:{value:y})}let a=document.createElement(sn),u=c=>{let y=O=>{for(let N of Array.from(O.childNodes)){if(N.nodeType!==1)continue;if(ee(N)===c)return N;let R=y(N);if(R)return R}};return y(a)},l=c=>{let y=u(c.target);if(!y)return;let O=new e(c.event,{bubbles:!0});for(let N of[\"value\",\"checked\",\"key\",\"pressed\"])c[N]!==void 0&&Object.defineProperty(O,N,{value:c[N],enumerable:!0});y.dispatchEvent(O);for(let N of o){if(N.type!==c.event)continue;let R;try{R=new Set(Array.from(a.querySelectorAll(N.selector)))}catch{continue}for(let A=y;A&&A!==a;A=A.parentNode)if(R.has(A)){N.listener(Object.freeze({type:c.event,target:y,element:A,...c.value!==void 0?{value:c.value}:{},...c.checked!==void 0?{checked:c.checked}:{},...c.key!==void 0?{key:c.key}:{},...c.pressed!==void 0?{pressed:c.pressed}:{}}));break}}},m=c=>{if(c.type===\"dom-event\"&&typeof c.target==\"string\")return l(c);if(c.type===\"notice\")return t.warn(c.text);if(c.type!==\"props\")return;i=c.props;let y=t.now();for(let R of r)try{R(c.props)}catch(A){t.threw(A)}let O=t.now()-y,N=c.push;typeof N==\"number\"&&t.microtask(()=>t.microtask(()=>t.send({type:\"pushed\",push:N,ms:O})))},f;a.connect({mutate(c){f||(f=[],t.microtask(()=>{let y=f??[];f=void 0,t.send({type:\"render\",records:n.encode(y)})})),f.push(...c)},call:()=>{}});let g=c=>c.nodeType===1?c.getAttribute(\"data-key\")??c.getAttribute(\"id\"):null,h=(c,y)=>c.nodeType===y.nodeType&&(c.nodeType!==1||c.localName===y.localName&&c.namespaceURI===y.namespaceURI&&g(c)===g(y));function v(c,y){let O=Array.from(y.childNodes),N=0;for(let R of O){let A=c.childNodes[N]??null;if(A&&h(A,R)){b(A,R),N+=1;continue}if(g(R)!==null){let ce=Array.from(c.childNodes).slice(N+1).find(Ye=>h(Ye,R));if(ce){c.insertBefore(ce,A),b(ce,R),N+=1;continue}}c.insertBefore(R,A),N+=1}for(;c.childNodes.length>N;)c.removeChild(c.lastChild)}function b(c,y){if(c.nodeType!==1){c.data!==y.data&&(c.data=y.data);return}let O=c,N=y,R=E(O);for(let A of O.getAttributeNames())N.hasAttribute(A)||(O.removeAttribute(A),R&&ye(O,A,void 0));for(let A of N.getAttributeNames()){let oe=N.getAttribute(A);O.getAttribute(A)!==oe&&O.setAttribute(A,oe),R&&ye(O,A,oe)}v(O,N)}let E=c=>c.localName.includes(\"-\");function k(c){for(let y of Array.from(c.childNodes)){if(y.nodeType!==1)continue;let O=y;if(E(O))for(let N of O.getAttributeNames())ye(O,N,O.getAttribute(N)??void 0);k(O)}}function L(c,y,O){for(let N of Array.from(c.childNodes)){if(N.nodeType!==1)continue;let R=N,A=R.localName,oe=y||A.toLowerCase()===\"svg\",ce=oe?Hr(A):Object.prototype.hasOwnProperty.call(Hn,A.toLowerCase())?A.toLowerCase():void 0;if(!ce){O.add(`<${A}>`);continue}for(let Ye of R.getAttributeNames())(!Gr(oe?\"svg\":\"html\",ce,Ye)||!oe&&Lr[ce]?.includes(Ye.toLowerCase()))&&O.add(`${ce} ${Ye}`);L(R,oe,O)}}function T(c){let y=document.createElement(\"div\"),O=Array.isArray(c)?c:[c];for(let R of O)if(R!=null)if(typeof R==\"string\"||Br(R)){let A=document.createElement(\"div\");A.innerHTML=typeof R==\"string\"?R:R.html,y.append(...Array.from(A.childNodes))}else y.append(R);let N=new Set;L(y,!1,N),s=[...N],s.length>0&&t.warn(`The host will not draw: ${s.join(\", \")}`),k(y),v(a,y)}let P;return{view:Object.freeze({get props(){return i},onProps(c){return r.add(c),i&&c(i),()=>void r.delete(c)},render:T,style(c){typeof c!=\"string\"||c===P||(P=c,t.send({type:\"style\",css:c}))},on(c,y,O){let N={type:c,selector:y,listener:O};return o.add(N),()=>void o.delete(N)},act:(c,y={})=>t.act(c,y),navigate(c){if(typeof c==\"string\")return t.navigate(c);let y=tn(c);y&&t.send(y)},html(c,...y){return Do(c.reduce((O,N,R)=>O+N+(R<y.length?zr(y[R]):\"\"),\"\"))},get refused(){return s},get hardening(){return t.hardening()}}),hear:m}}var Vn={removed:[],stuck:[],sealed:!1,worker:!1},Gn=Rr({listen(t){return Re.listen(t),()=>Re.unlisten(t)},fromHost:()=>!0,ready:t=>Re.post(t)},{onMessage:t=>Fr.hear(t)}),Fr=jr({send:t=>Gn.send(t),act:(t,e)=>Gn.guest.act(t,e),navigate:t=>Gn.guest.navigate(t),microtask:Re.microtask,now:Re.now,threw:t=>console.error(t),warn:t=>console.warn(t),hardening:()=>Vn}),Lo=Fr.view;Object.defineProperty(globalThis,\"graview\",{value:Lo,enumerable:!0,configurable:!0,writable:!1});var Un=\"WorkerGlobalScope\"in globalThis?Ir(globalThis,[\"graview\"]):Vn;Vn=Un;if(Un.stuck.length>0)throw new Error(`The view's worker could not be hardened: ${Un.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 Oe=globalThis,Yr=Oe.addEventListener,Wr=Oe.removeEventListener,Xr=Oe.postMessage,$r=globalThis.queueMicrotask,an=globalThis.performance,Kr=an?an.now.bind(an):Date.now,Re={listen:t=>Yr.call(Oe,\"message\",t),unlisten:t=>Wr.call(Oe,\"message\",t),post:t=>Xr.call(Oe,t),microtask:t=>$r.call(globalThis,t),now:()=>Kr()};var w=Symbol(\"name\"),ue=Symbol(\"prefix\"),de=Symbol(\"value\"),x=Symbol(\"ns\"),F=Symbol(\"owner\"),I=Symbol(\"owner_document\"),te=Symbol(\"attributes\"),M=Symbol(\"prev\"),m=Symbol(\"next\"),S=Symbol(\"child\"),q=Symbol(\"parent\"),fe=Symbol(\"host\"),X=Symbol(\"data\"),Ee=Symbol(\"listeners\"),ln=Symbol(\"isTrusted\"),Ae=Symbol(\"path\"),_e=Symbol(\"stop_immediate_propagation\"),Pe=Symbol(\"dispatching\"),ie=Symbol(\"content\"),D=Symbol(\"hooks\"),ut=Symbol(\"extensions\"),Ne=Symbol(\"hooks_dispatch\"),U=Symbol(\"is_connected\"),Ce=Symbol(\"create_element\"),zn=0,W=1,ke=2,Ie=3,Me=8,Te=9,jn=10,me=11,_=\"http://www.w3.org/1999/xhtml\",$=\"http://www.w3.org/2000/svg\",Fn=\"http://www.w3.org/XML/1998/namespace\",We=\"http://www.w3.org/2000/xmlns/\";function dt(t){return t.split(/[\\t\\n\\f\\r ]+/).filter(Boolean)}function H(t){return t.replace(/[A-Z]/g,e=>String.fromCharCode(e.charCodeAt(0)+32))}function qn(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 Yn=/^(?:[A-Za-z][^\\0\\t\\n\\f\\r\\u0020/>]*|[:_\\u0080-\\u{10FFFF}][A-Za-z0-9-.:_\\u0080-\\u{10FFFF}]*)$/u,Wn=/[\\0\\t\\n\\f\\r />=]/u,Zr=/[\\0\\t\\n\\f\\r />]/u;function se(t){if(t==null)return null;let e=String(t);return e===\"\"?null:e}function Xn(t){Yn.test(t)||un(t)}function cn(t){(t===\"\"||Wn.test(t))&&un(t)}function ft(t,e,n){let r=se(t),o=String(e),i=o.indexOf(\":\"),s=i<0?null:o.slice(0,i),a=i<0?o:o.slice(i+1);if((s!=null&&(s===\"\"||Zr.test(s))||(n===\"element\"?!Yn.test(a):a===\"\"||Wn.test(a)))&&un(o),s!=null&&r==null)throw C(`A namespace is required for the prefix in \"${o}\"`,\"NamespaceError\");if(s===\"xml\"&&r!==Fn)throw C(\"The xml prefix requires the XML namespace\",\"NamespaceError\");if((o===\"xmlns\"||s===\"xmlns\")&&r!==We)throw C(\"The xmlns name requires the XMLNS namespace\",\"NamespaceError\");if(r===We&&o!==\"xmlns\"&&s!==\"xmlns\")throw C(\"The XMLNS namespace requires the xmlns name or prefix\",\"NamespaceError\");return{namespace:r,qualifiedName:o,prefix:s,localName:a}}function un(t){throw C(`Invalid name: \"${t}\"`,\"InvalidCharacterError\")}var mt=0,pt=1,$n=2,dn=3,Qr=typeof performance>\"u\"?Date.now:performance.now.bind(performance),V=class{static NONE=mt;static CAPTURING_PHASE=pt;static AT_TARGET=$n;static BUBBLING_PHASE=dn;timeStamp=Qr();target=null;currentTarget=null;srcElement=null;bubbles=!1;cancelable=!1;composed=!1;defaultPrevented=!1;cancelBubble=!1;eventPhase=mt;[Ae]=[];[_e]=!1;[Pe]=!1;constructor(e,n){this.type=e,Object.defineProperty(this,ln,{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[ln]}composedPath(){return[...this[Ae]]}stopPropagation(){this.cancelBubble=!0}stopImmediatePropagation(){this[_e]=!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 fn(t,e,n){if(t.cancelBubble)return;let o=e[Ee]?.get(t.type)?.[n===pt?\"capture\":\"bubble\"];if(o)for(let i of[...o]){if(!o.has(i)||i.signal?.aborted)continue;t.eventPhase=t.target===e?$n:n,t.currentTarget=e;let s=i.normalizedListener;try{typeof s==\"object\"?s.handleEvent(t):s.call(e,t)}catch(a){setTimeout(Jr,0,a)}if(t[_e])break}}function Jr(t){throw t}var Xe=[],ht=new WeakMap;function gt(t,e){let n=ht.get(t);n?n.push(e):ht.set(t,[e]),Xe[Xe.length-1].push(t)}function B(t){let e=[];Xe.push(e);let n;try{n=t()}catch(r){Xe.pop();try{Kn(e)}catch{}throw r}return Xe.pop(),Kn(e),n}function Kn(t){let e,n=!1;for(let r of t){let o=ht.get(r);if(o){for(;o.length>0;){let i=o.shift();try{i()}catch(s){n||(e=s,n=!0)}}ht.delete(r)}}if(n)throw e}var yt=[],$e=[],mn=!1;function we(t){for(let e of t)yt.push(e),e[1]&&$e.push(e[1]);if(!mn){mn=!0;try{let e,n=!1;for(let r=0;r<yt.length;r++){let[o,i]=yt[r];i&&$e.splice($e.indexOf(i),1);try{o()}catch(s){n||(e=s,n=!0)}}if(n)throw e}finally{yt.length=0,$e.length=0,mn=!1}}}function Ke(t){let e=t;for(;e;){if($e.includes(e))return!0;e=e[q]??e[fe]}return!1}var Ze=Symbol(\"listenerRegistrations\"),pe=class{[Ee]=void 0;[Ze]=void 0;[I]=void 0;addEventListener(e,n,r){if(n==null)return;let o=r===!0||typeof r==\"object\"&&r.capture===!0,i=typeof r==\"object\"&&r.once===!0,s=typeof r==\"object\"?r.signal:void 0;if(s?.aborted)return;let a=pn(o),c=this[Ze];c||(c=new Map,this[Ze]=c);let u=c.get(e);u||(u={},c.set(e,u));let f=u[a];if(f||(f=new Map,u[a]=f),f.has(n))return;let p=this,h={type:e,listener:n,capture:o,once:i,normalizedListener:n,signal:s};(i||s)&&(h.normalizedListener=function(...k){if(h.signal?.aborted){bt(p,h);return}return h.once&&bt(p,h),typeof h.listener==\"object\"?h.listener.handleEvent(...k):h.listener.call(this,...k)});let g=this[Ee];g||(g=new Map,this[Ee]=g);let v=g.get(e);v||(v={},g.set(e,v));let y=v[a];if(y||(y=new Set,v[a]=y),f.set(n,h),y.add(h),s){let b=()=>{bt(p,h)};h.abortListener=b,s.addEventListener(\"abort\",b,{once:!0})}this[I]?.defaultView[Ne].addEventListener?.(this,e,n,r)}removeEventListener(e,n,r){return eo.call(this,e,n,r)}dispatchEvent(e){if(e[Pe])throw C(\"Failed to execute 'dispatchEvent' on 'EventTarget': The event is already being dispatched.\",\"InvalidStateError\");e[Pe]=!0;try{let n=[],r=this;for(;r!=null;)n.push(r),r=r.parentNode;e.target=this,e.srcElement=this,e[Ae]=n;for(let i=n.length;i--;)if(fn(e,n[i],pt),e.cancelBubble)return!e.defaultPrevented;let o=e.bubbles?n:n.slice(0,1);for(let i=0;i<o.length;i++)if(fn(e,o[i],dn),e.cancelBubble)return!e.defaultPrevented;return!e.defaultPrevented}finally{e[Pe]=!1,e.cancelBubble=!1,e[_e]=!1,e.eventPhase=mt,e.currentTarget=null,e[Ae]=[]}}};function eo(t,e,n){if(e==null)return;let r=n===!0||n&&n.capture===!0,o=pn(!!r),i=this[Ze]?.get(t)?.[o]?.get(e);i&&bt(this,i)}function pn(t){return t?\"capture\":\"bubble\"}function bt(t,e){let n=pn(e.capture),r=t[Ze],o=r?.get(e.type);if(!o)return;let i=o[n];if(!i||i.get(e.listener)!==e)return;i.delete(e.listener),i.size===0&&delete o[n],!o.bubble&&!o.capture&&r?.delete(e.type),e.signal&&e.abortListener&&e.signal.removeEventListener(\"abort\",e.abortListener);let s=t[Ee],a=s?.get(e.type);if(!a)return;let c=a[n];c?.delete(e)&&(c.size===0&&delete a[n],!a.bubble&&!a.capture&&s?.delete(e.type),t[I]?.defaultView[Ne].removeEventListener?.(t,e.type,e.listener,e.capture))}var K=class extends Array{item(e){return this[e]??null}};var Je=0,Zn=1,yn=2,bn=3,et=4,Qn=0,Jn=1,Tt=2,wt=3,er=4,gn=5,tr=6,nr=7,Et=/^(?:--|-?[A-Za-z_\\u0080-\\u{10FFFF}])[A-Za-z0-9_\\u0080-\\u{10FFFF}-]*$/u;function to(t,e){let n=1,r=null;for(let o=e;o<t.length;o++){let i=t[o];if(r){i===\"\\\\\"?o++:i===r&&(r=null);continue}if(i==='\"'||i===\"'\")r=i;else if(i===\"(\")n++;else if(i===\")\"&&--n===0)return[t.slice(e,o),o+1]}return[t.slice(e),t.length]}function Y(t){throw C(`Invalid or unsupported selector: \"${t}\"`,\"SyntaxError\")}function xt(t,e){let n=typeof e==\"string\"?tt(e):[{combinator:et,matchers:e}],r=null,o=t[S];return o&&n[0].matchers.length&&En(o,n,i=>(r=i,!1)),r}function vt(t,e){let n=typeof e==\"string\"?tt(e):[{combinator:et,matchers:e}],r=new K,o=t[S];return o&&n[0].matchers.length&&En(o,n,i=>{r.push(i)}),r}function tt(t,e=!1,n=!1){let r={combinator:et,matchers:[]},o=[r],i=/[\\t\\n\\f\\r ]*?([>\\t\\n\\f\\r +~]?)[\\t\\n\\f\\r ]*?(?:(?:\\[[\\t\\n\\f\\r ]*([^\\]=\\t\\n\\f\\r ]+)[\\t\\n\\f\\r ]*(?:=[\\t\\n\\f\\r ]*(?:(['\"])(.*?)\\3|([^\\]\\t\\n\\f\\r ]+)))?[\\t\\n\\f\\r ]*(?:\\]|$))|([#.]?)([^\\t\\n\\f\\r #.[>:+~()]+)|:(\\w+)(\\()?)/gi,s=t.replace(/^[\\t\\n\\f\\r ]+|[\\t\\n\\f\\r ]+$/g,\"\");s===\"\"&&Y(t);let a=0,c;for(;c=i.exec(s);){c.index!==a&&Y(t),c[1]&&(r.matchers.length===0&&!(n&&o.length===1)&&Y(t),c[1]===\">\"?r.combinator=Zn:c[1]===\"+\"?r.combinator=bn:c[1]===\"~\"?r.combinator=yn:r.combinator=Je,r={combinator:et,matchers:[]},o.push(r));let u=c[8]?H(c[8]):c[2]||c[7];c[7]!=null&&!c[6]&&r.matchers.length>0&&Y(t);let p,h=c[4]??c[5]??c[7];if(c[2]){Et.test(u)||Y(t);let g=c[5],v=g?.[0];if(c[3]==null&&(v==='\"'||v===\"'\")){let y=c[0].lastIndexOf(g);h=s.slice(c.index+y+1),i.lastIndex=s.length}else g!=null&&!Et.test(g)&&Y(t);p=er}else c[6]?(Et.test(u)||Y(t),p=c[6]===\"#\"?Tt:wt):c[8]?p=c[9]==null?gn:tr:c[7]===\"*\"?p=Qn:c[7]&&Et.test(c[7])?p=Jn:Y(t);c[9]?([h,i.lastIndex]=to(s,i.lastIndex),u!==\"has\"&&u!==\"not\"&&Y(t),u===\"has\"&&e&&Y(t),tt(h,e||u===\"has\",u===\"has\")):p===gn&&Y(t),r.matchers.push({type:p,name:u,value:h}),a=i.lastIndex}return(a!==s.length||r.matchers.length===0)&&Y(t),o}function no(t,e){let n=tt(e);return n[0]?.matchers.length?Qe(t,n):!1}function ro(t,e){let n=tt(e,!0,!0),r=n[0];if(n.length===1&&r.matchers.length===0)return!1;let o=Je,i={type:nr,name:\":scope\"};if(r.matchers.length===0?(o=r.combinator,r.matchers.push(i)):n.unshift({combinator:Je,matchers:[i]}),n.some(({matchers:c})=>c.length===0))return!1;let s=o===bn||o===yn?t[m]:t[S];if(!s)return!1;let a=!1;return En(s,n,()=>(a=!0,!1),t),a}function En(t,e,n,r){let o=[],i=t;for(;i;){if(z(i)){if(Qe(i,e,r)&&n(i)===!1)return!1;let s=i[S];if(s){let a=i[m];a&&o.push(a),i=s;continue}}i=i[m]??o.pop()??null}return!0}function Qe(t,e,n){let{combinator:r,matchers:o}=e[e.length-1];if(r===et){if(!Nt(t,o,n))return!1;let a=e.slice(0,-1);return a.length===0||Qe(t,a,n)}let i=r===Zn||r===Je?q:M,s=t[i];if(!s)return!1;if(r===Je||r===yn){for(;s;){if(z(s)&&Nt(s,o,n)){let a=e.slice(0,-1);if(a.length===0||Qe(s,a,n))return!0}s=s[i]}return!1}else{if(r===bn&&!z(s)){for(;s&&!z(s);)s=s[i];if(!s)return!1}if(!z(s)||!Nt(s,o,n))return!1;let a=e.slice(0,-1);return a.length===0||Qe(s,a,n)}}function hn(t,e){return t.getAttributeNS(null,t.namespaceURI===_?H(e):e)}function Nt(t,e,n){if(!t)return!1;if(Array.isArray(e)){for(let s of e)if(Nt(t,s,n)===!1)return!1;return!0}let{type:r,name:o,value:i}=e;switch(r){case Qn:return o===\"*\";case Jn:return t.namespaceURI===_?t.localName===H(o):t.localName===o;case Tt:return hn(t,\"id\")===o;case wt:let s=hn(t,\"class\");return s?dt(s).includes(o):!1;case er:let a=hn(t,o);return i==null?a!=null:a===i;case nr:return t===n;case gn:Y(`:${o}`);case tr:switch(o){case\"has\":return ro(t,i||\"\");case\"not\":return!no(t,i||\"\");default:Y(`:${o}(${i})`)}}return!1}function oo(t){return t.nodeType===ke}function nt(t){return X in t}function Tn(t){return t.nodeType===Ie}function io(t){return t.nodeType===Me}function z(t){return t.nodeType===W}function Nn(t){return t.nodeType===me}function sr(t){return\"appendChild\"in t}function St(t){let e=[],n=[t],r=new Set(n),o=new Set,i;for(;n.length>0;){let s=n.pop();if(r.delete(s),o.has(s))continue;let a=[];for(let c of ot(s)){if(o.has(c)||(o.add(c),e.push(c),a.push(c),!z(c)))continue;let u=c[te];if(u)for(let p of u)o.has(p)||(o.add(p),e.push(p));let f=c[ie];f&&!o.has(f)&&!r.has(f)&&(r.add(f),n.push(f))}i??=a}return{nodes:e,treeNodes:i}}function rt(t,e){for(let n of t)n[I]=e}function rr(t,e){let n=t.constructor,r=new n(t.name,t.value,t.namespaceURI);return r[I]=e,r}function or(t,e){if(Tn(t))return e.createTextNode(t.data);if(io(t))return e.createComment(t.data);if(oo(t))return rr(t,e);if(z(t)){let n=e[Ce](t[w],t.namespaceURI,t[ue],t.localName);if(t[te])for(let r=0;r<t[te].length;r++){let o=t[te].item(r);n.attributes.setNamedItem(rr(o,e))}return n}else{if(Nn(t))return e.createDocumentFragment();{let n=new t.constructor;return n[I]=e,n}}}function Ot(t,e,n=t.ownerDocument){if(t.nodeType===Te)throw C(\"Cannot clone a document node\",\"NotSupportedError\");let r=or(t,n);if(!e||!z(t)&&!Nn(t))return r;let o=new Set([t]),i=[{source:t,destination:r,childIndex:0,cloningContent:!1}];for(;i.length>0;){let s=i[i.length-1],a,c;if(s.cloningContent)if(s.contentSource&&s.contentDestination)a=s.contentSource.childNodes[s.childIndex++],c=s.contentDestination;else{i.pop(),s.appendTo&&s.appendTo.appendChild(s.destination);continue}else if(a=s.source.childNodes[s.childIndex++],c=s.destination,!a){if(s.cloningContent=!0,s.childIndex=0,z(s.source)&&s.source.namespaceURI===_&&s.source.localName===\"template\"){let f=s.source[ie];f&&(o.has(f)&&ir(),o.add(f),s.contentSource=f,s.contentDestination=s.destination.content)}continue}if(!a){i.pop(),s.appendTo&&s.appendTo.appendChild(s.destination);continue}o.has(a)&&ir(),o.add(a);let u=or(a,n);z(a)||Nn(a)?i.push({source:a,destination:u,appendTo:c,childIndex:0,cloningContent:!1}):c.appendChild(u)}return r}function ir(){throw new Error(\"Cannot clone a cyclic or repeated node graph\")}function Rt(t,e){let n=String(e);return n===\"\"?null:xt(t,[{type:Tt,name:n}])}function At(t,e){let n=[...new Set(dt(String(e)))];return vt(t,n.map(r=>({type:wt,name:r})))}function _t(t,e){let n=String(e),r=H(n),o=[];for(let i of Pt(t))z(i)&&(n===\"*\"||(i.namespaceURI===_?i[w]===r:i[w]===n))&&o.push(i);return o}function Pt(t){let e=[],n=[],r=t[S];for(;r;){e.push(r);let o=r[S],i=r[m];o?(i&&n.push(i),r=o):r=i??n.pop()??null}return e}function ot(t){let e=Pt(t);return e.unshift(t),e}var Z=class extends pe{nodeType=zn;[w]=\"\";[q]=null;[fe]=null;[S]=null;[M]=null;[m]=null;[U]=!1;get[D](){return this[I].defaultView[Ne]}get localName(){return this[w]}get nodeName(){return this[w]}get ownerDocument(){return this[I]}get isConnected(){return this[U]}isDefaultNamespace(e){let n=se(e);return so(this)===n}get parentNode(){return this[q]}set parentNode(e){}get parentElement(){let e=this[q];return!e||e.nodeType!==1?null:e}set parentElement(e){}get previousSibling(){return this[M]}set previousSibling(e){}get nextSibling(){return this[m]}set nextSibling(e){}get previousElementSibling(){let e=this[M];for(;e&&e.nodeType!==1;)e=e[M];return e}set previousElementSibling(e){}get nextElementSibling(){let e=this[m];for(;e&&e.nodeType!==1;)e=e[m];return e}set nextElementSibling(e){}get firstChild(){return this[S]}set firstChild(e){}get lastChild(){let e=this[S];for(;e;){let n=e[m];if(n==null)break;e=n}return e}set lastChild(e){}get nodeValue(){return nt(this)?this.data:null}set nodeValue(e){nt(this)&&(this.data=e)}get textContent(){if(nt(this))return this.data;let e=\"\";for(let n of Pt(this))Tn(n)&&(e+=n.data);return e}set textContent(e){if(nt(this))this.data=e;else if(sr(this)){let n=e==null?\"\":String(e);n===\"\"?this.replaceChildren():this.replaceChildren(n)}}cloneNode(e){return Ot(this,e)}contains(e){let n=e;for(;n!=null;){if(n===this)return!0;n=n.parentNode}return!1}};function so(t){let e=t;for(;e;)switch(e.nodeType){case W:{let n=e;if(n.prefix==null&&n.namespaceURI!=null)return n.namespaceURI;let r=n.attributes.getNamedItemNS(We,\"xmlns\");if(r!=null&&r.prefix==null)return se(r.value);e=n.parentElement;break}case Te:e=e.documentElement;break;case jn:case me:return null;case ke:e=e.ownerElement;break;default:e=e.parentElement}return null}var Q=Symbol(\"insertNode\"),vn=Symbol(\"preflightInsertions\"),Ct=Symbol(\"replaceNode\"),he=class extends Z{remove(){let e=this.parentNode;e&&e.removeChild(this)}replaceWith(...e){let n=xe(e),r=this.parentNode;if(r)return wn(o=>{ae(r,n);let i=this[m];for(;i&&n.includes(i);)i=i[m];let s=xn(r,n,o);this.parentNode===r?r[Ct](s,this,o):r[Q](s,i,o)})}before(...e){let n=xe(e),r=this.parentNode;if(r)return wn(o=>{ae(r,n);let i=this[M];for(;i&&n.includes(i);)i=i[M];let s=xn(r,n,o);r[Q](s,i?i[m]:r.firstChild,o)})}after(...e){let n=xe(e),r=this.parentNode;if(r)return wn(o=>{ae(r,n);let i=this[m];for(;i&&n.includes(i);)i=i[m];let s=xn(r,n,o);r[Q](s,i,o)})}};function wn(t){return B(()=>{let e=[];try{t(e)}catch(n){try{we(e)}catch{}throw n}we(e)})}function xe(t){return t.map(e=>e instanceof Z?e:String(e))}function it(t,e){return e instanceof Z?e:t.ownerDocument.createTextNode(String(e))}function ae(t,e){for(let n of e){if(!(n instanceof Z))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[q]??r[fe]}}}function xn(t,e,n){let r=[];for(let i of e)r.push(it(t,i));if(r.length===1)return r[0];let o=t.ownerDocument.createDocumentFragment();o[vn](r);for(let i of r)o[Q](i,null,n);return o}var kt,Sn=0,ar=0,lr=0,cr=0,De=!1,Rn=!1,st=!1,It=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=ao(n),o=kt??=new WeakMap,i=o.get(e);i==null&&(i=new Map,o.set(e,i));let s=i.get(this);s==null?Sn++:On(s,-1),i.set(this,r),On(r,1),this.#e.add(e)}disconnect(){let e=kt;if(e!=null){for(let n of this.#e){let r=e.get(n),o=r?.get(this);o!=null&&(r.delete(this),Sn--,On(o,-1)),r?.size===0&&e.delete(n)}this.#e.clear(),this.#n.length=0,Sn===0&&(kt=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 J(t){let e=kt;if(e==null)return;let n=new Map,r=t.target;for(;r;){let o=e.get(r);if(o)for(let[i,s]of o){if(r!==t.target&&!s.subtree)continue;let a=!1;if(t.type===\"attributes\"){if(!s.attributes||s.attributeFilter&&!s.attributeFilter.has(t.attributeName??\"\"))continue;a=s.attributeOldValue}else if(t.type===\"characterData\"){if(!s.characterData)continue;a=s.characterDataOldValue}else if(!s.childList)continue;n.set(i,n.get(i)===!0||a)}r=r.parentNode}for(let[o,i]of n)o.enqueue({addedNodes:t.addedNodes??new K,attributeName:t.attributeName??null,attributeNamespace:t.attributeNamespace??null,nextSibling:t.nextSibling??null,oldValue:i?t.oldValue??null:null,previousSibling:t.previousSibling??null,removedNodes:t.removedNodes??new K,target:t.target,type:t.type})}function Mt(...t){let e=new K;return e.push(...t),e}function ao(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 On(t,e){t.attributes&&(ar+=e),t.characterData&&(lr+=e),t.childList&&(cr+=e),De=ar>0,Rn=lr>0,st=cr>0}var ne=class extends he{childNodes=new K;children=new K;appendChild(e){return B(()=>this[Q](e,null))}insertBefore(e,n){return B(()=>this[Q](e,n||null))}append(...e){return B(()=>{let n=xe(e.filter(r=>r!=null));n.length>1&&ae(this,n);for(let r of n)this[Q](it(this,r),null)})}prepend(...e){return B(()=>{let n=xe(e.filter(o=>o!=null));n.length>1&&ae(this,n);let r=this.firstChild;for(let o of n)this[Q](it(this,o),r)})}replaceChildren(...e){return B(()=>{let n=xe(e.filter(o=>o!=null));ae(this,n);let r;for(;r=this.firstChild;)this.removeChildImmediately(r);for(let o of n)this[Q](it(this,o),null)})}removeChild(e){return B(()=>(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[U]?ot(e):void 0,r=e[M],o=e[m],i=Dt(this,e);if(n)for(let s of n)s[U]=!1;this.queueRemovalMutationRecord(this,e,r,o),n&&this.enqueueTreeReactions(n,\"disconnectedCallback\"),we(this.collectRemovalHookEffects(e,i))}replaceChild(e,n){return B(()=>this[Ct](e,n))}[Ct](e,n,r){if(ae(this,[e]),n.parentNode!==this)throw C(\"The reference node is not a child of this parent\",\"NotFoundError\");let o=n[M],i=n[m],s=this.prepareInsertion(e),a=this[U]?ot(n):void 0,c=new Set(s.map(({node:h})=>h)),u=i;for(;u&&c.has(u);)u=u[m];let f=Dt(this,n);if(a){for(let g of a)g[U]=!1;let h=new Set(a);for(let g of s)h.has(g.node)&&(g.shouldDisconnect=!1)}this.commitInsertion(s,u);let p=this[U];return this.queueRemovalMutationRecord(this,n,o,i),this.queueInsertionMutationRecords(s),a&&this.enqueueTreeReactions(a,\"disconnectedCallback\"),this.enqueueInsertionReactions(s,p),this.performOrCollectHookEffects([...this.collectRemovalHookEffects(n,f),...this.collectInsertionHookEffects(s)],r),n}querySelectorAll(e){return vt(this,e)}querySelector(e){return xt(this,e)}[Q](e,n,r){return this.validateInsertion(e,n),this.insertIntoValidated(e,n,r),e}[vn](e){for(let n of e)this.validateInsertion(n,null),this.prepareInsertion(n)}validateInsertion(e,n){if(ae(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[m]);let o=this.prepareInsertion(e);this.commitInsertion(o,n);let i=this[U];this.queueInsertionMutationRecords(o),this.enqueueInsertionReactions(o,i),this.performOrCollectHookEffects(this.collectInsertionHookEffects(o),r)}performOrCollectHookEffects(e,n){n?n.push(...e):we(e)}prepareInsertion(e){let n=[];if(e.nodeType===me){let s=e[S];for(;s;)n.push(s),s=s[m]}else n.push(e);let r=this[U],o=this[I],i=[];for(let s of n){let a=s[U],c=a||r,u,f;if(s[I]===o)c&&(u=ot(s));else{let p=St(s);f=p.nodes,c&&(u=p.treeNodes)}i.push({node:s,nodes:u,adoption:f,shouldDisconnect:a})}return i}commitInsertion(e,n){for(let i of e){let s=i.node[q];if(s){let a=i.node[M],c=i.node[m];i.source={parent:s,index:Dt(s,i.node),previousSibling:a,nextSibling:c}}}for(let i of e){let s=this.attachChild(i.node,n);i.insertIndex=s.index,i.previousSibling=s.previousSibling,i.nextSibling=s.nextSibling}let r=this[I];for(let{adoption:i}of e)i&&rt(i,r);let o=this[U];for(let{nodes:i}of e)if(i)for(let s of i)s[U]=o}attachChild(e,n){if(n){let i=n[M];e[m]=n,e[M]=i,i?i[m]=e:this[S]=e,n[M]=e}else{e[m]=null;let i=this[S];if(i){let s;for(;s=i[m];)i=s;i[m]=e,e[M]=i}else this[S]=e,e[M]=null}let r=z(e);e[q]=this;let o;if(n){if(o=this.childNodes.indexOf(n),this.childNodes.splice(o,0,e),r){let i=n;for(;i&&!z(i);)i=i[m];i?this.children.splice(this.children.indexOf(i),0,e):this.children.push(e)}}else o=this.childNodes.length,this.childNodes.push(e),r&&this.children.push(e);return{index:o,previousSibling:e[M],nextSibling:e[m]}}queueRemovalMutationRecord(e,n,r,o){st&&J({type:\"childList\",target:e,removedNodes:Mt(n),previousSibling:r,nextSibling:o})}queueInsertionMutationRecords(e){if(st)for(let n of e){let{node:r,source:o}=n;o&&this.queueRemovalMutationRecord(o.parent,r,o.previousSibling,o.nextSibling),J({type:\"childList\",target:this,addedNodes:Mt(r),previousSibling:n.previousSibling,nextSibling:n.nextSibling})}}collectRemovalHookEffects(e,n){return this.nodeType!==W||Ke(this)?[]:[[()=>this[D].removeChild?.(this,e,n)]]}collectInsertionHookEffects(e){let n=[];for(let r of e){let{node:o,source:i}=r;i?.parent.nodeType===W&&!Ke(i.parent)&&n.push([()=>i.parent[D].removeChild?.(i.parent,o,i.index)]),this.nodeType===W&&!Ke(this)&&n.push([()=>this[D].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){dr(e,n)}};function ur(t,e,n,r){if(e.parentNode!==t)throw Error(\"not a child of this node\");let o=t[U]?n.treeNodes:void 0,i=e[M],s=e[m],a=Dt(t,e);if(o)for(let u of o)u[U]=!1;rt(n.nodes,r),st&&J({type:\"childList\",target:t,removedNodes:Mt(e),previousSibling:i,nextSibling:s}),o&&dr(o,\"disconnectedCallback\");let c=[];t.nodeType===W&&!Ke(t)&&c.push([()=>t[D].removeChild?.(t,e,a)]),we(c)}function Dt(t,e){let n=e[M],r=e[m];n?n[m]=r:t[S]=r,r&&(r[M]=n);let o=t.childNodes.indexOf(e);return t.childNodes.splice(o,1),z(e)&&t.children.splice(t.children.indexOf(e),1),e[q]=null,e[m]=null,e[M]=null,o}function dr(t,e){for(let n of t){let r=n[e];typeof r==\"function\"&&gt(n,()=>r.call(n))}}function at(t,e,n,r,o){let{observedAttributes:i}=t.constructor,{attributeChangedCallback:s}=t;s==null||i==null||!i.includes(e)||gt(t,()=>s.call(t,e,n,r,o))}var Lt=class{[S]=null;constructor(e){this[F]=e}getNamedItem(e){let n=String(e),r=this[F][x]===_?H(n):n,o=this[S];for(;o;){if(o.name===r)return o;o=o[m]}return null}getNamedItemNS(e,n){let r=se(e),o=String(n),i=this[S];for(;i;){if(i.localName===o&&i[x]===r)return i;i=i[m]}return null}item(e){let n=this[S],r=0;for(;n;){if(r++===e)return n;n=n[m]}return null}get length(){let e=0,n=this[S];for(;n;)e++,n=n[m];return e}removeNamedItem(e){let n=String(e),r=this[F][x]===_?H(n):n;return B(()=>this.removeNamedItemImmediately(o=>o.name===r))}removeNamedItemNS(e,n){let r=se(e),o=String(n);return B(()=>this.removeNamedItemImmediately(i=>i.localName===o&&i[x]===r))}removeNamedItemImmediately(e){let n=this[F],r=this[S],o=null;for(;r!=null;){if(e(r)){o&&(o[m]=r[m]),this[S]===r&&(this[S]=r[m]);let i=r.value;return r[m]=null,r[F]=null,De&&J({type:\"attributes\",target:n,attributeName:r.name,attributeNamespace:r[x],oldValue:i}),n[D].removeAttribute?.(n,r.name,r[x]),at(n,r.localName,i,null,r[x]),r}o=r,r=r[m]}return null}setNamedItem(e){return B(()=>this.setNamedItemImmediately(e))}setNamedItemImmediately(e){let n=this[F],r=e[F];if(r!=null&&r!==n)throw C(\"The attribute is already in use by another element.\",\"InUseAttributeError\");let o=null,i=this[S],s=null;for(;i;){if(i.localName===e.localName&&i[x]===e[x]){if(i===e)return i;s?s[m]=e:this[S]=e,e[m]=i[m],i[m]=null,o=i;break}s=i,i=i[m]}o==null&&(s?s[m]=e:this[S]=e),e[F]=n,e[I]=n[I],o&&(o[F]=null);let a=o==null||o.value!==e.value,c=o!=null&&o.name!==e.name;return a&&De&&J({type:\"attributes\",target:n,attributeName:e.name,attributeNamespace:e[x],oldValue:o?.value??null}),c&&n[D].removeAttribute?.(n,o.name,o[x]),(a||c)&&n[D].setAttribute?.(n,e.name,e.value,e[x]),a&&at(n,e.localName,o?.value??null,e.value,e[x]),o}setNamedItemNS(e){return this.setNamedItem(e)}*[Symbol.iterator](){let e=this[S];for(;e;)yield e,e=e[m]}};var ve=class extends Z{nodeType=ke;[x]=null;[m]=null;[F]=null;constructor(e,n,r){super(),this[w]=e,this[de]=n,r&&(this[x]=r)}get nodeName(){return this[w]}set nodeName(e){}get name(){return this[w]}set name(e){}get localName(){if(this[x]==null)return this[w];let e=this[w].indexOf(\":\");return e<0?this[w]:this[w].slice(e+1)}get prefix(){if(this[x]==null)return null;let e=this[w].indexOf(\":\");return e<0?null:this[w].slice(0,e)}get value(){return this[de]}set value(e){let n=String(e),r=this[F];if(!r){this[de]=n;return}B(()=>{let o=this[de];this[de]=n,De&&o!==n&&J({type:\"attributes\",target:r,attributeName:this[w],attributeNamespace:this[x],oldValue:o}),this[D].setAttribute?.(r,this[w],n,this[x]),at(r,this.localName,o,n,this[x])})}get nodeValue(){return this.value}set nodeValue(e){this.value=e}get ownerElement(){return this[F]}get namespaceURI(){return this[x]}get specified(){return!0}};var lo={amp:\"&\",AMP:\"&\",apos:\"'\",gt:\">\",GT:\">\",lt:\"<\",LT:\"<\",quot:'\"',QUOT:'\"'},co=new Set([\"area\",\"base\",\"br\",\"col\",\"embed\",\"hr\",\"img\",\"input\",\"link\",\"meta\",\"param\",\"source\",\"track\",\"wbr\"]),uo=/(?:<([a-z][a-z0-9-:]*)((?:[\\s]+[^<>'\"=/\\s]+(?:=(['\"])[^]*?\\3|=[^>'\"\\s]*|))*)[\\s]*(\\/?)\\s*>|<\\/([a-z][a-z0-9-:]*)>|<!--(.*?)-->|([^<>]+))/gi,pr=/\\s([^<>'\"=/\\n\\s]+)(?:=([\"'])([\\s\\S]*?)\\2|=([^>'\"\\n\\s]*)|)/g,fo=\"|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|\",mo=/^(?:color|face|size)$/i;function fr(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 lo[n];let i=Number.parseInt(r??o,r?10:16);try{return String.fromCodePoint(i)}catch{return e}})}function hr(t){return t.namespaceURI===_&&co.has(t.localName)}function mr(t){let e=t.localName;return t[x]===$&&(e===\"foreignObject\"||e===\"desc\"||e===\"title\")}function po(t,e){if(fo.includes(`|${t}|`))return!0;if(t!==\"font\")return!1;for(let n of e.matchAll(pr))if(mo.test(n[1]))return!0;return!1}function Ht(t,e){let n=e.ownerDocument,r=n.createDocumentFragment(),o=[],i=r;for(let s of t.matchAll(uo)){let a=s[1];if(a){let c=s[2],u=H(a),f=o[o.length-1]?.element??e,p=f[x]===$?$:_;if(u===\"svg\")p=$;else if(p===$){if(mr(f))p=_;else if(po(u,c)){for(;o.length>0;){let v=o[o.length-1];if(v.element[x]!==$||mr(v.element))break;o.pop(),i=v.target}p=_}}let h=p===_?u:a,g=n[Ce](h,p,null,h);for(let v of c.matchAll(pr))g.setAttribute(v[1],fr(v[3]||v[4]||\"\"));if(i.append(g),hr(g)||p!==_&&s[4])continue;o.push({element:g,target:i}),i=p===_&&u===\"template\"?g.content:g}else if(s[5]){let c=H(s[5]);for(let u=o.length-1;u>=0;u--){let f=o[u],p=H(f.element[w]);if(p===c){i=f.target,o.length=u;break}if(f.element[x]===_&&p===\"template\")break}}else s[6]?i.append(n.createComment(s[6])):i.append(fr(s[7]))}return r}function Gt(t){return yr([{type:\"content\",child:t[S]}])}function gr(t){return yr([{type:\"opening\",node:t}])}function yr(t){let e=[],n;for(;n=t.pop();)switch(n.type){case\"opening\":{let r=n.node;switch(r.nodeType){case W:{let o=r;e.push(`<${o[w]}`);let i=o[te]?.[S];for(;i;){e.push(` ${i[w]}`);let a=i[de];a!==\"\"&&(a=String(a).replace(/&/g,\"&amp;\").replace(/\"/g,\"&quot;\"),e.push(`=\"${a}\"`)),i=i[m]}if(e.push(\">\"),hr(o))break;let s=o.namespaceURI===_&&o.localName===\"template\"?o[ie]:o;t.push({type:\"closing\",name:o[w]}),t.push({type:\"content\",child:s?.[S]??null});break}case Ie:{let o=r;e.push(o[X].replace(/&/g,\"&amp;\").replace(/\"/g,\"&quot;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\"));break}case Me:{let o=r;e.push(`<!--${o[X]}-->`);break}}break}case\"content\":{let r=n.child;r&&(t.push({type:\"content\",child:r[m]}),t.push({type:\"opening\",node:r}));break}case\"closing\":e.push(`</${n.name}>`);break}return e.join(\"\")}var G=class extends ne{nodeType=W;[x]=_;[ue]=null;get namespaceURI(){return this[x]}get prefix(){return this[ue]}get localName(){let e=this[ue];return e==null?this[w]:this[w].slice(e.length+1)}get nodeName(){return this[x]===_?qn(this[w]):this[w]}get tagName(){return this.nodeName}get id(){return this.getAttributeNS(null,\"id\")??\"\"}set id(e){this.setAttribute(\"id\",String(e))}get slot(){return this.getAttributeNS(null,\"slot\")??\"\"}set slot(e){let n=String(e);this.getAttributeNS(null,\"slot\")!==n&&this.attributes.setNamedItem(new ve(\"slot\",n))}get attributes(){let e=this[te];return e||(e=new Lt(this),this[te]=e),e}getAttributeNames(){return[...this.attributes].map(e=>e.name)}getElementsByTagName(e){return _t(this,e)}get firstElementChild(){return this.children[0]??null}getElementsByClassName(e){return At(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);cn(r);let i=this[x]===_?H(r):r,s=this.attributes.getNamedItemNS(null,i);s?s.value=o:this.attributes.setNamedItem(new ve(i,o))}setAttributeNS(e,n,r){let o=se(e),i=String(n),s=String(r),a=ft(o,i,\"attribute\"),c=this.attributes.getNamedItemNS(a.namespace,a.localName);c?c.value=s:this.attributes.setNamedItemNS(new ve(a.qualifiedName,s,a.namespace))}toggleAttribute(e,n){let r=String(e);cn(r);let o=this[x]===_?H(r):r,i=this.attributes.getNamedItemNS(null,o),s=n===void 0?void 0:!!n;return i==null?s===!1?!1:(this.attributes.setNamedItem(new ve(o,\"\")),!0):s===!0?!0:(this.attributes.removeNamedItemNS(null,o),!1)}getAttribute(e){let n=this.attributes.getNamedItem(e);return n&&n.value}getAttributeNS(e,n){let r=this.attributes.getNamedItemNS(e,n);return r&&r.value}hasAttribute(e){return this.attributes.getNamedItem(e)!=null}hasAttributeNS(e,n){return this.attributes.getNamedItemNS(e,n)!=null}removeAttribute(e){let n=String(e),r=this[x]===_?H(n):n;this.attributes.removeNamedItemNS(null,r)}removeAttributeNS(e,n){this.attributes.removeNamedItemNS(e,n)}get outerHTML(){return gr(this)}get innerHTML(){return Gt(this)}set innerHTML(e){if(e==null||e===\"\")this.replaceChildren();else{let n=Ht(String(e),this);this.replaceChildren(n)}}};var Le=class t extends G{[x]=$;get ownerSVGElement(){let e=null,n=this.parentNode;for(;n instanceof t;)e=n,n=n.parentNode;return e}};var ge=class extends he{[X]=\"\";constructor(e){super(),this[X]=e==null?\"\":String(e)}setData(e){let n=Rn,r=n?this[X]:null,o=\"\";e!=null&&(o=typeof e==\"string\"?e:String(e)),this[X]=o,n&&r!==o&&J({type:\"characterData\",target:this,oldValue:r}),this[D].setText?.(this,o)}get data(){return this[X]}set data(e){this.setData(e)}};var He=class extends ge{nodeType=Ie;[w]=\"#text\"};var Ge=class extends ge{nodeType=Me;[w]=\"#comment\"};var Ue=class extends ne{nodeType=me;[w]=\"#document-fragment\";[I]=typeof window<\"u\"?window.document:null;getElementById(e){return Rt(this,e)}};var Ve=class extends G{get content(){let e=this[ie];return e||(e=this.ownerDocument.createDocumentFragment(),e[fe]=this,this[ie]=e),e}set content(e){}set innerHTML(e){this.content.replaceChildren(Ht(String(e),this))}get innerHTML(){let e=this[ie];return e?Gt(e):\"\"}};var Ut=class extends G{};var Vt=class extends G{};var Bt=class extends G{};var lt=class extends ne{nodeType=Te;[w]=\"#document\";[U]=!0;constructor(e){super(),this.defaultView=e,this[I]=this,this.documentElement=jt(new Bt,this,\"html\"),this.body=jt(new Ut,this,\"body\"),this.head=jt(new Vt,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 At(this,e)}createElement(e){let n=String(e);return Xn(n),An(this,H(n))}createElementNS(e,n){let r=ft(e,n,\"element\");return An(this,r.qualifiedName,r.namespace,r.prefix,r.localName)}[Ce](e,n,r,o){return An(this,e,n,r,o)}createTextNode(e){let n=zt(new He(e),this);return this[D].createText?.(n,n.data),n}createComment(e){return zt(new Ge(e),this)}createDocumentFragment(){return zt(new Ue,this)}createEvent(){return new V(\"\")}getElementById(e){return Rt(this,e)}getElementsByTagName(e){return _t(this,e)}importNode(e,n){if(e.nodeType===Te)throw C(\"Cannot import a document node\",\"NotSupportedError\");return Ot(e,n,this)}adoptNode(e){if(e[I]===this)return e;let n=St(e);return B(()=>{let r=e.parentNode;return r?ur(r,e,n,this):rt(n.nodes,this),e})}};function zt(t,e){return Object.defineProperty(t,I,{value:e,writable:!0,enumerable:!1}),t}function An(t,e,n=_,r=null,o=e){let i;if(n===$)i=new Le;else if(n===_&&o===\"template\")i=new Ve;else if(n===_){let s=t.defaultView.customElements.get(o);i=s?new s:new G}else i=new G;return jt(i,t,e,n,r)}function jt(t,e,n,r=_,o=null){return zt(t,e),Object.defineProperties(t,{[w]:{value:n},[x]:{value:r},[ue]:{value:o}}),e[D].createElement?.(t,r),t}var Ft=class extends V{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 qt=class extends V{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 Yt=class extends V{constructor(e,n){super(e,n),this.promise=n.promise,this.reason=n.reason}};var Wt=class extends V{constructor(e,n){super(e,n),this.oldState=n.oldState,this.newState=n.newState}};var Xt=class extends V{constructor(e,n={}){super(e,n),this.relatedTarget=n.relatedTarget??null}};var $t=class extends V{constructor(e,n={}){super(e,n),this.clipboardData=n.clipboardData??null}};var Kt=class extends G{};var ho=/^[a-z][^A-Z\\u0000\\t\\n\\f\\r />]*-[^A-Z\\u0000\\t\\n\\f\\r />]*$/u,go=new Set([\"annotation-xml\",\"color-profile\",\"font-face\",\"font-face-src\",\"font-face-uri\",\"font-face-format\",\"font-face-name\",\"missing-glyph\"]);function br(t){return ho.test(t)&&!go.has(t)}function Er(t){return C(`Invalid custom element name: \"${t}\"`,\"SyntaxError\")}var Zt=class{registry=new Map;listenersByName=new Map;define(e,n,r){if(!br(e))throw Er(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 i of o)i(n)}}get(e){return this.registry.get(e)}getName(e){for(let[n,r]of this.registry)if(r===e)return n;return null}whenDefined(e){if(!br(e))return Promise.reject(Er(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 yo=[\"onerror\",\"onunhandledrejection\"],Tr=Symbol.for(\"@remote-dom/polyfill/global-property\");function wr(t){return Object.getOwnPropertyDescriptors(t)}function xr(t){let e={};for(let[n,r]of Object.entries(Object.getOwnPropertyDescriptors(pe.prototype)))n!==\"constructor\"&&typeof r.value==\"function\"&&(r.value=_n(r.value.bind(t)),e[n]=r);return e}function vr(t){let e={};for(let n of yo)e[n]={configurable:!0,enumerable:!0,get:_n(()=>t[n]),set:_n(r=>{t[n]=r})};return e}function bo(t){return Object.assign(wr(t),xr(t),vr(t))}function _n(t){return Object.defineProperty(t,Tr,{value:!0}),t}function Nr(t,e){for(let n of Reflect.ownKeys(e)){let r=Eo(t,n);(r==null||No(r))&&Object.defineProperty(t,n,e[n])}}function Eo(t,e){let n=t;for(;n;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function No(t){return[t.value,t.get,t.set].some(e=>typeof e==\"function\"&&e[Tr]===!0)}var Se=class extends pe{[D]={};[ut]=[];[Ne]=wo(this);name=\"\";window=this;parent=this;self=this;top=this;document=new lt(this);customElements=new Zt;location=globalThis.location;navigator=globalThis.navigator;Event=V;ErrorEvent=qt;PromiseRejectionEvent=Yt;ToggleEvent=Wt;FocusEvent=Xt;ClipboardEvent=$t;EventTarget=pe;CustomEvent=Ft;Node=Z;ParentNode=ne;ChildNode=he;DocumentFragment=Ue;Document=lt;CharacterData=ge;Comment=Ge;Text=He;Element=G;HTMLElement=Kt;SVGElement=Le;HTMLTemplateElement=Ve;MutationObserver=It;#t=null;#n=null;#e=null;static with(...e){let n=this;return class extends n{constructor(){super();for(let o of e)To(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=wr(e),i=Object.assign(xr(e),vr(e));delete o.self,Object.defineProperties(globalThis,o),Nr(globalThis,i),typeof n>\"u\"||n===r&&n!==globalThis?Object.defineProperty(globalThis,\"self\",{value:e,configurable:!0,writable:!0,enumerable:!0}):n!==globalThis&&(Object.defineProperties(n,o),Nr(n,i))}static setGlobalThis(e){for(let n in e)e[n]===e&&(e[n]=globalThis);Object.defineProperties(globalThis,bo(e))}};function To(t,e){t[ut].push(e(t)??{})}function wo(t){return{createElement:le.bind(null,t,\"createElement\"),setAttribute:le.bind(null,t,\"setAttribute\"),removeAttribute:le.bind(null,t,\"removeAttribute\"),createText:le.bind(null,t,\"createText\"),setText:le.bind(null,t,\"setText\"),insertChild:le.bind(null,t,\"insertChild\"),removeChild:le.bind(null,t,\"removeChild\"),addEventListener:le.bind(null,t,\"addEventListener\"),removeEventListener:le.bind(null,t,\"removeEventListener\")}}function le(t,e,...n){for(let i of t[ut])i[e]?.apply(i,n);let r=t[D];r[e]?.apply(r,n)}var Qt=new Se;var Pn=\"~\";var ye=new WeakMap;function Be(t){return ye.get(t)}var Mn=new WeakMap,vo=0;function ee(t){let e=Mn.get(t);return e==null&&(e=String(vo++),Jt(t,e)),e}function Jt(t,e){Mn.set(t,e)}var kn=new WeakMap;function So(t){return kn.get(t)}var In=new WeakMap;function Oo(t){let e=In.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 Ro=new WeakMap;function Ao(t){return Ro.get(t)}function Dn(t,e,n){let r=kn.get(t);if(r==null&&(r={},kn.set(t,r)),r[e]===n)return;r[e]=n;let o=ye.get(t);o?.mutate([[3,ee(t),e,n,1]])}function be(t,e,n){let r=In.get(t);if(r==null&&(r={},In.set(t,r)),r[e]===n)return;n==null?delete r[e]:r[e]=String(n);let o=ye.get(t);o?.mutate([[3,ee(t),e,n,2]])}function ze(t,e){if(ye.get(t)!==e&&(ye.set(t,e),t.childNodes))for(let r=0;r<t.childNodes.length;r++)ze(t.childNodes[r],e)}function en(t){if(ye.get(t)!=null&&(ye.delete(t),t.childNodes))for(let n=0;n<t.childNodes.length;n++)en(t.childNodes[n])}function je(t){let{nodeType:e}=t;switch(e){case 1:return{id:ee(t),type:e,element:t.localName,properties:Cn(So(t)),attributes:Cn(Oo(t)),eventListeners:Cn(Ao(t)),children:Array.from(t.childNodes).map(je)};case 3:case 8:return{id:ee(t),type:e,data:t.data};default:throw new Error(`Cannot serialize node of type ${t.nodeType} (${typeof t.nodeType})`)}}function Cn(t){return t?{...t}:void 0}function Ln(t,e,...n){let r=Mn.get(t),o=ye.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 Fe=Qt[D];Fe.insertChild=(t,e,n)=>{let r=Be(t);r!=null&&(ze(e,r),r.mutate([[0,ee(t),je(e),n]]))};Fe.removeChild=(t,e,n)=>{let r=Be(t);r!=null&&(en(e),r.mutate([[1,ee(t),n]]))};Fe.setText=(t,e)=>{let n=Be(t);n?.mutate([[2,ee(t),e]])};Fe.setAttribute=(t,e,n)=>{t.tagName.includes(\"-\")||be(t,e,n)};Fe.removeAttribute=(t,e)=>{t.tagName.includes(\"-\")||be(t,e)};Se.setGlobal(Qt);function tn(t){if(typeof t==\"string\")return{type:\"navigate\",to:t};let{place:e,record:n,where:r,section:o}=t??{},i={...r===void 0?{}:{where:r},...o===void 0?{}:{section:String(o)}};return typeof e==\"string\"?{type:\"navigate\",place:e,...i}:typeof n==\"string\"?{type:\"navigate\",to:n,...i}:void 0}function Or(t){let e=t;return typeof t==\"object\"&&t!==null&&e.graview===\"host-hello\"&&typeof e.nonce==\"string\"}function Ar(t,e={}){let n,r=\"\",o,i=0,s=new Set,a=new Map,c=[],u=y=>{n?n.postMessage({...y,nonce:r}):c.push(y)},f=y=>{let b=y.data;if(!(!b||typeof b!=\"object\")){if(b.type===\"props\"){o=b.props;for(let k of s)k(b.props)}else b.type===\"answer\"?(a.get(b.id)?.(b),a.delete(b.id)):b.type===\"event\"&&typeof b.listener==\"number\"?e.onEvent?.(b):b.type===\"heartbeat\"&&typeof b.beat==\"number\"&&u({type:\"heartbeat\",beat:b.beat});e.onMessage?.(b)}},p=()=>{},h=y=>{if(n||!t.fromHost(y)||!Or(y.data)||y.data.protocol!==1)return;let b=y.ports[0];if(b){n=b,r=y.data.nonce,n.onmessage=f,n.start?.(),p();for(let k of c.splice(0))u(k)}};p=t.listen(h),t.ready({graview:\"guest-ready\",protocol:1});let g,v={get props(){return o},subscribe(y){return s.add(y),()=>s.delete(y)},act(y,b={}){let k=i+=1;return new Promise(L=>{a.set(k,L),u({type:\"act\",id:k,name:y,args:b})})},navigate(y){let b=tn(y);b&&u(b)},size(y){u({type:\"size\",height:y})},autoSize(y){let b=y??globalThis.document?.documentElement,k=globalThis.ResizeObserver;if(!b||!k||typeof b.getBoundingClientRect!=\"function\")return()=>{};g?.disconnect();let L=new k(()=>v.size(Math.ceil(b.getBoundingClientRect().height)));return L.observe(b),g=L,()=>L.disconnect()},close(){g?.disconnect(),p(),n?.close(),s.clear()}};return{guest:v,send:u}}var Pr=[\"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\"],Cr=[\"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\"],kr=[\"self\",\"postMessage\",\"setTimeout\",\"clearTimeout\",\"setInterval\",\"clearInterval\",\"queueMicrotask\",\"structuredClone\",\"crypto\",\"console\",\"DOMException\"],Ir=[\"TEMPORARY\",\"PERSISTENT\"],nl=Object.freeze([...Pr,...Cr,...kr,...Ir]),rl=Object.freeze([\"constructor\",\"__defineGetter__\",\"__defineSetter__\",\"hasOwnProperty\",\"__lookupGetter__\",\"__lookupSetter__\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"toString\",\"valueOf\",\"__proto__\",\"toLocaleString\"]),_r=t=>typeof t==\"symbol\"?`[${t.description??\"symbol\"}]`:t;function Mr(t=globalThis,e=[],n={}){let r=[],o=[],i=new Set([...Pr,...Cr,...kr,...e,\"constructor\",Symbol.toStringTag]),s=(N,P)=>{let j=Reflect.getOwnPropertyDescriptor(N,P);return j===void 0||!(\"value\"in j)||j.writable||j.configurable?!1:n.primitivesStay&&typeof P==\"symbol\"&&(typeof j.value!=\"object\"||j.value===null)&&typeof j.value!=\"function\"?!0:Ir.includes(P)&&typeof j.value==\"number\"},a=t,c=a.setTimeout,u=a.setInterval,f=a.crypto,p=(N,P)=>function(j,Bn,...l){if(typeof j!=\"function\")throw new TypeError(`${P} takes a function: a guest view cannot run code from text`);return N.call(t,j,Bn,...l)},h=f?Object.freeze({getRandomValues:N=>f.getRandomValues(N)}):void 0,g=a.document?.defaultView;if(g&&g!==a)for(let N of Reflect.ownKeys(g))typeof N==\"symbol\"||i.has(N)||Reflect.deleteProperty(g,N)||o.push(`window.${N}`);let v=[];for(let N=t;N&&N!==Object.prototype;N=Object.getPrototypeOf(N))v.push(N);for(let N of v)for(let P of Reflect.ownKeys(N))i.has(P)||(Reflect.deleteProperty(N,P)?r.push(_r(P)):s(N,P)||o.push(_r(P)));let y=()=>function(){throw new EvalError(\"A guest view cannot make code from text.\")},b=[Function.prototype,Object.getPrototypeOf(async function(){}),Object.getPrototypeOf(function*(){}),Object.getPrototypeOf(async function*(){})];for(let N of b){let P=y();Object.defineProperty(P,\"prototype\",{value:N,writable:!1,enumerable:!1,configurable:!1}),Reflect.defineProperty(N,\"constructor\",{value:P,writable:!1,enumerable:!1,configurable:!1})||o.push(\"Function.prototype.constructor\"),N===Function.prototype&&Reflect.defineProperty(t,\"Function\",{value:P,writable:!0,enumerable:!1,configurable:!0})}let k=(N,P)=>{Reflect.defineProperty(t,N,{value:P,writable:!0,enumerable:!0,configurable:!0})||o.push(N)};k(\"setTimeout\",p(c,\"setTimeout\")),k(\"setInterval\",p(u,\"setInterval\")),h&&k(\"crypto\",h);for(let N of v.slice(1))Object.freeze(N);for(let N of Reflect.ownKeys(t)){let P=Reflect.getOwnPropertyDescriptor(t,N);Reflect.defineProperty(t,N,\"value\"in P?{...P,writable:!1,configurable:!1}:{...P,configurable:!1})}let L;try{L=Reflect.preventExtensions(t)}catch{L=!1}return{removed:r,stuck:o,sealed:L}}var ct=class extends HTMLElement{constructor(){super(),Jt(this,Pn)}connect(e){if(Be(this)===e||(ze(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,Pn,je(o),r])}e.mutate(n)}updateRemoteProperty(e,n){Dn(this,e,n)}callRemoteMethod(e,...n){return Ln(this,e,...n)}};var d={},nn={empty:!0},_o={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\"},Hn={div:d,section:d,article:d,aside:d,header:d,footer:d,nav:d,hgroup:d,search:d,address:d,figure:d,figcaption:d,blockquote:d,p:d,pre:d,hr:nn,br:nn,wbr:nn,h1:d,h2:d,h3:d,h4:d,h5:d,h6:d,span:d,strong:d,em:d,b:d,i:d,u:d,s:d,small:d,mark:d,abbr:d,cite:d,q:d,code:d,kbd:d,samp:d,var:d,sub:d,sup:d,dfn:d,bdi:d,bdo:d,ruby:d,rt:d,rp:d,time:{attributes:{datetime:\"text\"}},data:{attributes:{value:\"text\"}},del:{attributes:{datetime:\"text\"}},ins:{attributes:{datetime:\"text\"}},a:d,ul:d,menu:d,dl:d,dt:d,dd:d,ol:{attributes:{start:\"number\",reversed:\"boolean\",type:{oneOf:[\"1\",\"a\",\"A\",\"i\",\"I\"]}}},li:{attributes:{value:\"number\"}},table:d,caption:d,thead:d,tbody:d,tfoot:d,tr:d,colgroup:{attributes:{span:\"number\"}},col:{attributes:{span:\"number\"},empty:!0},th:{attributes:{colspan:\"number\",rowspan:\"number\",headers:\"text\",scope:{oneOf:[\"row\",\"col\",\"rowgroup\",\"colgroup\"]},abbr:\"text\"}},td:{attributes:{colspan:\"number\",rowspan:\"number\",headers:\"text\"}},details:{attributes:{open:\"boolean\",name:\"text\"}},summary:d,button:{attributes:{type:{oneOf:[\"button\"]},disabled:\"boolean\",name:\"text\",value:\"text\"}},input:{empty:!0,attributes:{type:{oneOf:[\"text\",\"search\",\"number\",\"range\",\"checkbox\",\"radio\",\"date\",\"time\",\"datetime-local\",\"month\",\"week\",\"color\",\"email\",\"tel\",\"url\"]},name:\"text\",value:\"text\",placeholder:\"text\",min:\"text\",max:\"text\",step:\"text\",checked:\"boolean\",disabled:\"boolean\",readonly:\"boolean\",required:\"boolean\",maxlength:\"number\",minlength:\"number\",size:\"number\",pattern:\"text\",multiple:\"boolean\",inputmode:\"text\",enterkeyhint:\"text\"}},select:{attributes:{name:\"text\",disabled:\"boolean\",multiple:\"boolean\",required:\"boolean\",size:\"number\"}},option:{attributes:{value:\"text\",selected:\"boolean\",disabled:\"boolean\",label:\"text\"}},optgroup:{attributes:{label:\"text\",disabled:\"boolean\"}},textarea:{attributes:{name:\"text\",placeholder:\"text\",rows:\"number\",cols:\"number\",disabled:\"boolean\",readonly:\"boolean\",required:\"boolean\",maxlength:\"number\",minlength:\"number\",wrap:{oneOf:[\"soft\",\"hard\",\"off\"]}}},label:{attributes:{for:\"text\"}},fieldset:{attributes:{disabled:\"boolean\",name:\"text\"}},legend:d,output:d,meter:{attributes:{value:\"number\",min:\"number\",max:\"number\",low:\"number\",high:\"number\",optimum:\"number\"}},progress:{attributes:{value:\"number\",max:\"number\"}},img:{empty:!0,attributes:{src:\"image\",alt:\"text\",width:\"number\",height:\"number\",decoding:{oneOf:[\"async\",\"sync\",\"auto\"]}}},\"graview-video\":nn},Po=[\"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\"],Co={id:\"text\",class:\"text\",style:\"style\",lang:\"text\",role:\"text\",tabindex:{oneOf:[\"-1\",\"0\"]},transform:\"geometry\",...Object.fromEntries(Po.map(t=>[t,\"css\"]))},qe={x:\"geometry\",y:\"geometry\",width:\"geometry\",height:\"geometry\"},rn={viewBox:\"geometry\",preserveAspectRatio:\"geometry\"},Dr={gradientUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},gradientTransform:\"geometry\",spreadMethod:{oneOf:[\"pad\",\"reflect\",\"repeat\"]},href:\"fragment\"},Lr={svg:{attributes:{...qe,...rn}},g:d,defs:d,symbol:{attributes:{...qe,...rn,refX:\"geometry\",refY:\"geometry\"}},use:{attributes:{...qe,href:\"fragment\"}},title:d,desc:d,path:{attributes:{d:\"geometry\",pathLength:\"number\"}},rect:{attributes:{...qe,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\",...Dr}},radialGradient:{attributes:{cx:\"geometry\",cy:\"geometry\",r:\"geometry\",fx:\"geometry\",fy:\"geometry\",fr:\"geometry\",...Dr}},stop:{attributes:{offset:\"geometry\"}},clipPath:{attributes:{clipPathUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},mask:{attributes:{...qe,maskUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},maskContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},pattern:{attributes:{...qe,...rn,patternUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternTransform:\"geometry\",href:\"fragment\"}},marker:{attributes:{...rn,markerWidth:\"geometry\",markerHeight:\"geometry\",refX:\"geometry\",refY:\"geometry\",orient:\"geometry\",markerUnits:{oneOf:[\"strokeWidth\",\"userSpaceOnUse\"]}}}};var Hr={section:[\"aria-label\",\"aria-labelledby\",\"title\"]};function ko(t){return/^aria-[a-z]+$/.test(t)}function Io(t){return/^data-[a-z0-9][a-z0-9_.-]*$/.test(t)}var Mo=new Map(Object.keys(Lr).map(t=>[t.toLowerCase(),t]));function Gr(t){return Mo.get(t.toLowerCase())}function Ur(t,e,n){let r=n.toLowerCase(),o=t===\"html\"?[Hn[e]?.attributes,_o]:[Lr[e]?.attributes,Co],i=t===\"svg\"&&r===\"xlink:href\"?\"href\":r;for(let s of o)if(s){for(let[a,c]of Object.entries(s))if(a.toLowerCase()===i)return{name:a,kind:c}}if(ko(r)||Io(r))return{name:r,kind:\"text\"}}var Vr=\"~\",on=t=>typeof t==\"object\"&&t!==null&&!Array.isArray(t),re=(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=>re(n,e+1)):Object.fromEntries(Object.entries(t).map(([n,r])=>[n,re(r,e+1)]))};function Br(){let t=new Map,e=new Map,n=new Map([[Vr,{children:[],listeners:new Map}]]),r=0,o=u=>{let f=e.get(u);return f===void 0&&(f=r+=1,e.set(u,f),t.set(f,{listener:u,count:0})),t.get(f).count+=1,f},i=u=>{let f=t.get(u);f&&(f.count-=1,!(f.count>0)&&(t.delete(u),e.delete(f.listener)))},s=u=>{let f=n.get(u);if(f){n.delete(u);for(let p of f.listeners.values())i(p);for(let p of f.children)s(p)}},a=(u,f,p=0)=>{if(!on(u)||p>64)return re(u);let h=typeof u.id==\"string\"?u.id:void 0,g=f&&h!==void 0&&h!==Vr;g&&s(h);let v={children:[],listeners:new Map};g&&n.set(h,v);let y={};for(let[b,k]of Object.entries(u))b===\"children\"&&Array.isArray(k)?y[b]=k.map(L=>{let N=a(L,g,p+1);return g&&on(L)&&typeof L.id==\"string\"&&v.children.push(L.id),N}):b===\"eventListeners\"&&on(k)?y[b]=Object.fromEntries(Object.entries(k).map(([L,N])=>{if(typeof N!=\"function\"||!g)return[L,void 0];let P=o(N);return v.listeners.set(L,P),[L,{listener:P}]})):y[b]=re(k,p+1);return y},c=u=>{if(!Array.isArray(u))return re(u);let[f,p]=u,h=typeof p==\"string\"?n.get(p):void 0;if(f===0){let g=a(u[2],h!==void 0),v=on(u[2])?u[2].id:void 0;if(h&&typeof v==\"string\"&&n.has(v)){let y=Number(u[3]);h.children.splice(Number.isInteger(y)&&y>=0&&y<=h.children.length?y:h.children.length,0,v)}return[f,re(p),g,re(u[3])]}if(f===1){let g=Number(u[2]);return h&&Number.isInteger(g)&&g>=0&&g<h.children.length&&s(h.children.splice(g,1)[0]),re(u)}if(f===3&&u[4]===3){let g=String(u[2]),v=u[3],y=h&&typeof v==\"function\"?o(v):void 0,b=h?.listeners.get(g);return b!==void 0&&i(b),y===void 0?h?.listeners.delete(g):h.listeners.set(g,y),[f,re(p),g,y===void 0?void 0:{listener:y},3]}return re(u)};return{encode:u=>u.map(c),listener:u=>t.get(u)?.listener,get listening(){return t.size},get nodes(){return n.size-1}}}var sn=\"graview-view-root\",Do=t=>t.replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\"/g,\"&quot;\").replace(/'/g,\"&#39;\"),Lo=t=>Object.freeze({html:t,toString:()=>t}),zr=t=>typeof t==\"object\"&&t!==null&&typeof t.html==\"string\"&&Object.isFrozen(t),jr=t=>t==null||t===!1?\"\":Array.isArray(t)?t.map(jr).join(\"\"):zr(t)?t.html:Do(String(t));function Fr(t){customElements.get(sn)||customElements.define(sn,ct);let e=Event,n=Br(),r=new Set,o=new Set,i,s=[],a=new Set;for(let l of[\"closest\",\"matches\",\"dataset\"]){let E=()=>{throw new TypeError(`A view's element has no ${l}: graview.on hands event.element, the element its selector matched; read event.element.getAttribute(\"data-\\u2026\").`)};l in Element.prototype||Object.defineProperty(Element.prototype,l,l===\"dataset\"?{get:E}:{value:E})}let c=document.createElement(sn),u=l=>{let E=O=>{for(let T of Array.from(O.childNodes)){if(T.nodeType!==1)continue;if(ee(T)===l)return T;let R=E(T);if(R)return R}};return E(c)},f=l=>{let E=u(l.target);if(!E)return;let O=new e(l.event,{bubbles:!0});for(let T of[\"value\",\"checked\",\"key\",\"pressed\",\"files\",\"refused\"])l[T]!==void 0&&Object.defineProperty(O,T,{value:l[T],enumerable:!0});E.dispatchEvent(O);for(let T of o){if(T.type!==l.event)continue;let R;try{R=new Set(Array.from(c.querySelectorAll(T.selector)))}catch{continue}for(let A=E;A&&A!==c;A=A.parentNode)if(R.has(A)){T.listener(Object.freeze({type:l.event,target:E,element:A,...l.value!==void 0?{value:l.value}:{},...l.checked!==void 0?{checked:l.checked}:{},...l.key!==void 0?{key:l.key}:{},...l.pressed!==void 0?{pressed:l.pressed}:{},...l.files!==void 0?{files:l.files}:{},...l.refused!==void 0?{refused:l.refused}:{}}));break}}},p=l=>{if(l.type===\"dom-event\"&&typeof l.target==\"string\")return f(l);if(l.type===\"notice\")return t.warn(l.text);if(l.type!==\"props\")return;i=l.props;let E=t.now();for(let R of r)try{R(l.props)}catch(A){t.threw(A)}let O=t.now()-E,T=l.push;typeof T==\"number\"&&t.microtask(()=>t.microtask(()=>t.send({type:\"pushed\",push:T,ms:O})))},h;c.connect({mutate(l){h||(h=[],t.microtask(()=>{let E=h??[];h=void 0,t.send({type:\"render\",records:n.encode(E)})})),h.push(...l)},call:()=>{}});let g=l=>l.nodeType===1?l.getAttribute(\"data-key\")??l.getAttribute(\"id\"):null,v=(l,E)=>l.nodeType===E.nodeType&&(l.nodeType!==1||l.localName===E.localName&&l.namespaceURI===E.namespaceURI&&g(l)===g(E));function y(l,E){let O=Array.from(E.childNodes),T=0;for(let R of O){let A=l.childNodes[T]??null;if(A&&v(A,R)){b(A,R),T+=1;continue}if(g(R)!==null){let ce=Array.from(l.childNodes).slice(T+1).find(Ye=>v(Ye,R));if(ce){l.insertBefore(ce,A),b(ce,R),T+=1;continue}}l.insertBefore(R,A),T+=1}for(;l.childNodes.length>T;)l.removeChild(l.lastChild)}function b(l,E){if(l.nodeType!==1){l.data!==E.data&&(l.data=E.data);return}let O=l,T=E,R=k(O);for(let A of O.getAttributeNames())T.hasAttribute(A)||(O.removeAttribute(A),R&&be(O,A,void 0));for(let A of T.getAttributeNames()){let oe=T.getAttribute(A);O.getAttribute(A)!==oe&&O.setAttribute(A,oe),R&&be(O,A,oe)}y(O,T)}let k=l=>l.localName.includes(\"-\");function L(l){for(let E of Array.from(l.childNodes)){if(E.nodeType!==1)continue;let O=E;if(k(O))for(let T of O.getAttributeNames())be(O,T,O.getAttribute(T)??void 0);L(O)}}function N(l,E,O){for(let T of Array.from(l.childNodes)){if(T.nodeType!==1)continue;let R=T,A=R.localName,oe=E||A.toLowerCase()===\"svg\",ce=oe?Gr(A):Object.prototype.hasOwnProperty.call(Hn,A.toLowerCase())?A.toLowerCase():void 0;if(!ce){O.add(`<${A}>`);continue}for(let Ye of R.getAttributeNames())(!Ur(oe?\"svg\":\"html\",ce,Ye)||!oe&&Hr[ce]?.includes(Ye.toLowerCase()))&&O.add(`${ce} ${Ye}`);N(R,oe,O)}}function P(l){let E=document.createElement(\"div\"),O=Array.isArray(l)?l:[l];for(let R of O)if(R!=null)if(typeof R==\"string\"||zr(R)){let A=document.createElement(\"div\");A.innerHTML=typeof R==\"string\"?R:R.html,E.append(...Array.from(A.childNodes))}else E.append(R);let T=new Set;N(E,!1,T),s=[...T],s.length>0&&t.warn(`The host will not draw: ${s.join(\", \")}`),L(E),y(c,E)}let j;return{view:Object.freeze({get props(){return i},onProps(l){return r.add(l),i&&l(i),()=>void r.delete(l)},render:P,style(l){typeof l!=\"string\"||l===j||(j=l,t.send({type:\"style\",css:l}))},on(l,E,O){let T={type:l,selector:E,listener:O};return o.add(T),typeof l==\"string\"&&!a.has(l)&&(a.add(l),t.send({type:\"hears\",events:[l]})),()=>void o.delete(T)},act:(l,E={})=>t.act(l,E),navigate(l){if(typeof l==\"string\")return t.navigate(l);let E=tn(l);E&&t.send(E)},html(l,...E){return Lo(l.reduce((O,T,R)=>O+T+(R<E.length?jr(E[R]):\"\"),\"\"))},get refused(){return s},get hardening(){return t.hardening()}}),hear:p}}var Vn={removed:[],stuck:[],sealed:!1,worker:!1},Gn=Ar({listen(t){return Re.listen(t),()=>Re.unlisten(t)},fromHost:()=>!0,ready:t=>Re.post(t)},{onMessage:t=>qr.hear(t)}),qr=Fr({send:t=>Gn.send(t),act:(t,e)=>Gn.guest.act(t,e),navigate:t=>Gn.guest.navigate(t),microtask:Re.microtask,now:Re.now,threw:t=>console.error(t),warn:t=>console.warn(t),hardening:()=>Vn}),Ho=qr.view;Object.defineProperty(globalThis,\"graview\",{value:Ho,enumerable:!0,configurable:!0,writable:!1});var Un=\"WorkerGlobalScope\"in globalThis?Mr(globalThis,[\"graview\"]):Vn;Vn=Un;if(Un.stuck.length>0)throw new Error(`The view's worker could not be hardened: ${Un.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,ot8DAAot8D,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,058DAA058D,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { AnySchema, Principal, Store } from "@graview/core";
1
+ import type { AnySchema, HostFiles, Principal, Store } from "@graview/core";
2
2
  import type { GuestPlace, GuestTheme } from "../protocol.js";
3
3
  import { type WorkerViewManifest } from "./manifest.js";
4
4
  import type { ViewRefusal } from "./open-draw.js";
@@ -144,6 +144,13 @@ export interface MountWorkerViewOptions<S extends AnySchema> {
144
144
  };
145
145
  /** Who made it, said under the region (ADR 0007: "Made by Claude for Nick"). Nothing by default. */
146
146
  readonly author?: string;
147
+ /**
148
+ * THE PAGE'S HOST'S FILES (FR-163), for a view whose manifest `accepts`
149
+ * files (FR-193): what a file dropped on, or picked for, an element it
150
+ * marked `data-drop` is stored through. Without it, no drop target is
151
+ * offered: this host takes no files.
152
+ */
153
+ readonly files?: () => HostFiles | undefined;
147
154
  }
148
155
  export interface WorkerView {
149
156
  /** The region the host owns: the view is drawn in its shadow root. */
@@ -1 +1 @@
1
- {"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../src/host/view.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEjE,OAAO,KAAK,EAAiB,UAAU,EAAc,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACxF,OAAO,EAAkC,KAAK,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACxF,OAAO,KAAK,EAAe,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAuD,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAC3I,OAAO,EAAe,KAAK,iBAAiB,EAAsB,MAAM,mBAAmB,CAAC;AAK5F,OAAO,EAAwB,KAAK,OAAO,EAAoB,MAAM,YAAY,CAAC;AAElF,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAGpD,OAAO,EAAmB,SAAS,EAA8B,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAErG,wGAAwG;AACxG,MAAM,MAAM,cAAc,GAAG,iBAAiB,GAAG;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAe7E,MAAM,MAAM,iBAAiB;AAC3B,2GAA2G;AACzG,UAAU;AACZ,sEAAsE;GACpE,QAAQ;AACV;;;;GAIG;GACD,OAAO;AACT,uDAAuD;GACrD,OAAO;AACT,8FAA8F;GAC5F,QAAQ;AACV,oCAAoC;GAClC,OAAO;AACT,kEAAkE;GAChE,OAAO;AACT,8DAA8D;GAC5D,MAAM,CAAC;AAEX,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,+EAA+E;IAC/E,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,kEAAkE;IAClE,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,uEAAuE;IACvE,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,wGAAwG;IACxG,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAwBD,MAAM,WAAW,sBAAsB,CAAC,CAAC,SAAS,SAAS;IACzD,oHAAoH;IACpH,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,CAAC;IACtC;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAChC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IACzB,iGAAiG;IACjG,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,8EAA8E;IAC9E,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,cAAc,CAAC;IACtC;;;;;;;;OAQG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,uIAAuI;IACvI,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,IAAI,GAAG,SAAS,CAAC;IACvC,kGAAkG;IAClG,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,SAAS,UAAU,EAAE,CAAC;IAC9C;;;;OAIG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,UAAU,CAAC;IAClC;;;;;OAKG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,UAAU,GAAG,SAAS,CAAC;IAC9C,QAAQ,CAAC,MAAM,CAAC,EAAE,gBAAgB,CAAC;IACnC,wFAAwF;IACxF,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,iBAAiB,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1E;;;;;OAKG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C;;;;;;OAMG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC,CAAC;IACvG,uFAAuF;IACvF,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IACtD;;;;;;;OAOG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IACrD;;;;;;OAMG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE;QAAE,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAA;KAAE,CAAC;IAC1D,oGAAoG;IACpG,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,UAAU;IACzB,sEAAsE;IACtE,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,uCAAuC;IACvC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,8DAA8D;IAC9D,MAAM,IAAI,IAAI,CAAC;IACf,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC;IACrC,6DAA6D;IAC7D,QAAQ,CAAC,OAAO,EAAE,SAAS,WAAW,EAAE,CAAC;IACzC,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,OAAO,EAAE,SAAS,EAAE,CAAC;AAErB;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,SAAS,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,sBAAsB,CAAC,CAAC,CAAC,GAAG,UAAU,CA4bzH"}
1
+ {"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../src/host/view.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAa,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAGvF,OAAO,KAAK,EAAiB,UAAU,EAAc,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACxF,OAAO,EAAkC,KAAK,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACxF,OAAO,KAAK,EAAe,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAuD,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAC3I,OAAO,EAAe,KAAK,iBAAiB,EAAsB,MAAM,mBAAmB,CAAC;AAK5F,OAAO,EAAwB,KAAK,OAAO,EAAoB,MAAM,YAAY,CAAC;AAElF,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAIpD,OAAO,EAAmB,SAAS,EAA8B,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAErG,wGAAwG;AACxG,MAAM,MAAM,cAAc,GAAG,iBAAiB,GAAG;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAiB7E,MAAM,MAAM,iBAAiB;AAC3B,2GAA2G;AACzG,UAAU;AACZ,sEAAsE;GACpE,QAAQ;AACV;;;;GAIG;GACD,OAAO;AACT,uDAAuD;GACrD,OAAO;AACT,8FAA8F;GAC5F,QAAQ;AACV,oCAAoC;GAClC,OAAO;AACT,kEAAkE;GAChE,OAAO;AACT,8DAA8D;GAC5D,MAAM,CAAC;AAEX,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,+EAA+E;IAC/E,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,kEAAkE;IAClE,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,uEAAuE;IACvE,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,wGAAwG;IACxG,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAwBD,MAAM,WAAW,sBAAsB,CAAC,CAAC,SAAS,SAAS;IACzD,oHAAoH;IACpH,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,CAAC;IACtC;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAChC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IACzB,iGAAiG;IACjG,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,8EAA8E;IAC9E,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,cAAc,CAAC;IACtC;;;;;;;;OAQG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,uIAAuI;IACvI,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,IAAI,GAAG,SAAS,CAAC;IACvC,kGAAkG;IAClG,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,SAAS,UAAU,EAAE,CAAC;IAC9C;;;;OAIG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,UAAU,CAAC;IAClC;;;;;OAKG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,UAAU,GAAG,SAAS,CAAC;IAC9C,QAAQ,CAAC,MAAM,CAAC,EAAE,gBAAgB,CAAC;IACnC,wFAAwF;IACxF,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,iBAAiB,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1E;;;;;OAKG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C;;;;;;OAMG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC,CAAC;IACvG,uFAAuF;IACvF,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IACtD;;;;;;;OAOG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IACrD;;;;;;OAMG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE;QAAE,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAA;KAAE,CAAC;IAC1D,oGAAoG;IACpG,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB;;;;;OAKG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,SAAS,GAAG,SAAS,CAAC;CAC9C;AAED,MAAM,WAAW,UAAU;IACzB,sEAAsE;IACtE,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,uCAAuC;IACvC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,8DAA8D;IAC9D,MAAM,IAAI,IAAI,CAAC;IACf,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC;IACrC,6DAA6D;IAC7D,QAAQ,CAAC,OAAO,EAAE,SAAS,WAAW,EAAE,CAAC;IACzC,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,OAAO,EAAE,SAAS,EAAE,CAAC;AAErB;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,SAAS,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,sBAAsB,CAAC,CAAC,CAAC,GAAG,UAAU,CA8iBzH"}