@graview/guest 0.1.26 → 0.1.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -1
- package/dist/headless/describe.d.ts.map +1 -1
- package/dist/headless/describe.js +5 -3
- package/dist/headless/describe.js.map +1 -1
- package/dist/headless/judge.d.ts.map +1 -1
- package/dist/headless/judge.js +5 -3
- package/dist/headless/judge.js.map +1 -1
- package/dist/headless/runtime.generated.d.ts.map +1 -1
- package/dist/headless/runtime.generated.js +1 -1
- package/dist/headless/runtime.generated.js.map +1 -1
- package/dist/host/links.d.ts +9 -1
- package/dist/host/links.d.ts.map +1 -1
- package/dist/host/links.js +13 -2
- package/dist/host/links.js.map +1 -1
- package/dist/host/open-draw.d.ts +2 -0
- package/dist/host/open-draw.d.ts.map +1 -1
- package/dist/host/open-draw.js +1 -0
- package/dist/host/open-draw.js.map +1 -1
- package/dist/host/open-judge.d.ts +6 -0
- package/dist/host/open-judge.d.ts.map +1 -1
- package/dist/host/open-judge.js +8 -0
- package/dist/host/open-judge.js.map +1 -1
- package/dist/host/view-runtime.generated.d.ts.map +1 -1
- package/dist/host/view-runtime.generated.js +1 -1
- package/dist/host/view-runtime.generated.js.map +1 -1
- package/dist/host/view.d.ts +13 -0
- package/dist/host/view.d.ts.map +1 -1
- package/dist/host/view.js +15 -5
- package/dist/host/view.js.map +1 -1
- package/dist/host/worker-react.d.ts +4 -0
- package/dist/host/worker-react.d.ts.map +1 -1
- package/dist/host/worker-react.js +2 -0
- package/dist/host/worker-react.js.map +1 -1
- package/dist/host/writes.js +1 -1
- package/dist/host/writes.js.map +1 -1
- package/dist/protocol.d.ts +7 -1
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +1 -0
- package/dist/protocol.js.map +1 -1
- package/dist/worker/view-global.d.ts.map +1 -1
- package/dist/worker/view-global.js +14 -0
- package/dist/worker/view-global.js.map +1 -1
- package/dist/worker/view.js +1 -1
- package/package.json +3 -3
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
* it in front of a view's own source, for an isolate the host picked.
|
|
5
5
|
* Carries Remote DOM (MIT, Shopify Inc.).
|
|
6
6
|
*/
|
|
7
|
-
export const HEADLESS_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 A=Symbol(\"name\"),he=Symbol(\"prefix\"),ge=Symbol(\"value\"),C=Symbol(\"ns\"),Y=Symbol(\"owner\"),I=Symbol(\"owner_document\"),se=Symbol(\"attributes\"),D=Symbol(\"prev\"),S=Symbol(\"next\"),k=Symbol(\"child\"),q=Symbol(\"parent\"),ye=Symbol(\"host\"),Z=Symbol(\"data\"),we=Symbol(\"listeners\"),Dn=Symbol(\"isTrusted\"),Me=Symbol(\"path\"),Le=Symbol(\"stop_immediate_propagation\"),He=Symbol(\"dispatching\"),le=Symbol(\"content\"),M=Symbol(\"hooks\"),Rt=Symbol(\"extensions\"),Se=Symbol(\"hooks_dispatch\"),U=Symbol(\"is_connected\"),Ve=Symbol(\"create_element\"),Dr=0,X=1,Ue=2,je=3,ze=8,Oe=9,Mr=10,be=11,_=\"http://www.w3.org/1999/xhtml\",J=\"http://www.w3.org/2000/svg\",Lr=\"http://www.w3.org/XML/1998/namespace\",at=\"http://www.w3.org/2000/xmlns/\";function At(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 Hr(t){return t.replace(/[a-z]/g,e=>String.fromCharCode(e.charCodeAt(0)-32))}function P(t,e){let n=globalThis.DOMException;if(typeof n==\"function\")return new n(t,e);let r=new Error(t);return r.name=e,r}var Vr=/^(?:[A-Za-z][^\\0\\t\\n\\f\\r\\u0020/>]*|[:_\\u0080-\\u{10FFFF}][A-Za-z0-9-.:_\\u0080-\\u{10FFFF}]*)$/u,Ur=/[\\0\\t\\n\\f\\r />=]/u,Ts=/[\\0\\t\\n\\f\\r />]/u;function ce(t){if(t==null)return null;let e=String(t);return e===\"\"?null:e}function jr(t){Vr.test(t)||Ln(t)}function Mn(t){(t===\"\"||Ur.test(t))&&Ln(t)}function Ct(t,e,n){let r=ce(t),o=String(e),s=o.indexOf(\":\"),i=s<0?null:o.slice(0,s),l=s<0?o:o.slice(s+1);if((i!=null&&(i===\"\"||Ts.test(i))||(n===\"element\"?!Vr.test(l):l===\"\"||Ur.test(l)))&&Ln(o),i!=null&&r==null)throw P(`A namespace is required for the prefix in \"${o}\"`,\"NamespaceError\");if(i===\"xml\"&&r!==Lr)throw P(\"The xml prefix requires the XML namespace\",\"NamespaceError\");if((o===\"xmlns\"||i===\"xmlns\")&&r!==at)throw P(\"The xmlns name requires the XMLNS namespace\",\"NamespaceError\");if(r===at&&o!==\"xmlns\"&&i!==\"xmlns\")throw P(\"The XMLNS namespace requires the xmlns name or prefix\",\"NamespaceError\");return{namespace:r,qualifiedName:o,prefix:i,localName:l}}function Ln(t){throw P(`Invalid name: \"${t}\"`,\"InvalidCharacterError\")}var kt=0,_t=1,zr=2,Hn=3,xs=typeof performance>\"u\"?Date.now:performance.now.bind(performance),j=class{static NONE=kt;static CAPTURING_PHASE=_t;static AT_TARGET=zr;static BUBBLING_PHASE=Hn;timeStamp=xs();target=null;currentTarget=null;srcElement=null;bubbles=!1;cancelable=!1;composed=!1;defaultPrevented=!1;cancelBubble=!1;eventPhase=kt;[Me]=[];[Le]=!1;[He]=!1;constructor(e,n){this.type=e,Object.defineProperty(this,Dn,{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[Dn]}composedPath(){return[...this[Me]]}stopPropagation(){this.cancelBubble=!0}stopImmediatePropagation(){this[Le]=!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 Vn(t,e,n){if(t.cancelBubble)return;let o=e[we]?.get(t.type)?.[n===_t?\"capture\":\"bubble\"];if(o)for(let s of[...o]){if(!o.has(s)||s.signal?.aborted)continue;t.eventPhase=t.target===e?zr:n,t.currentTarget=e;let i=s.normalizedListener;try{typeof i==\"object\"?i.handleEvent(t):i.call(e,t)}catch(l){setTimeout(ws,0,l)}if(t[Le])break}}function ws(t){throw t}var lt=[],Pt=new WeakMap;function It(t,e){let n=Pt.get(t);n?n.push(e):Pt.set(t,[e]),lt[lt.length-1].push(t)}function z(t){let e=[];lt.push(e);let n;try{n=t()}catch(r){lt.pop();try{$r(e)}catch{}throw r}return lt.pop(),$r(e),n}function $r(t){let e,n=!1;for(let r of t){let o=Pt.get(r);if(o){for(;o.length>0;){let s=o.shift();try{s()}catch(i){n||(e=i,n=!0)}}Pt.delete(r)}}if(n)throw e}var Dt=[],ct=[],Un=!1;function ve(t){for(let e of t)Dt.push(e),e[1]&&ct.push(e[1]);if(!Un){Un=!0;try{let e,n=!1;for(let r=0;r<Dt.length;r++){let[o,s]=Dt[r];s&&ct.splice(ct.indexOf(s),1);try{o()}catch(i){n||(e=i,n=!0)}}if(n)throw e}finally{Dt.length=0,ct.length=0,Un=!1}}}function ut(t){let e=t;for(;e;){if(ct.includes(e))return!0;e=e[q]??e[ye]}return!1}var dt=Symbol(\"listenerRegistrations\"),Ee=class{[we]=void 0;[dt]=void 0;[I]=void 0;addEventListener(e,n,r){if(n==null)return;let o=r===!0||typeof r==\"object\"&&r.capture===!0,s=typeof r==\"object\"&&r.once===!0,i=typeof r==\"object\"?r.signal:void 0;if(i?.aborted)return;let l=jn(o),u=this[dt];u||(u=new Map,this[dt]=u);let d=u.get(e);d||(d={},u.set(e,d));let p=d[l];if(p||(p=new Map,d[l]=p),p.has(n))return;let E=this,f={type:e,listener:n,capture:o,once:s,normalizedListener:n,signal:i};(s||i)&&(f.normalizedListener=function(...c){if(f.signal?.aborted){Mt(E,f);return}return f.once&&Mt(E,f),typeof f.listener==\"object\"?f.listener.handleEvent(...c):f.listener.call(this,...c)});let b=this[we];b||(b=new Map,this[we]=b);let N=b.get(e);N||(N={},b.set(e,N));let O=N[l];if(O||(O=new Set,N[l]=O),p.set(n,f),O.add(f),i){let y=()=>{Mt(E,f)};f.abortListener=y,i.addEventListener(\"abort\",y,{once:!0})}this[I]?.defaultView[Se].addEventListener?.(this,e,n,r)}removeEventListener(e,n,r){return Ss.call(this,e,n,r)}dispatchEvent(e){if(e[He])throw P(\"Failed to execute 'dispatchEvent' on 'EventTarget': The event is already being dispatched.\",\"InvalidStateError\");e[He]=!0;try{let n=[],r=this;for(;r!=null;)n.push(r),r=r.parentNode;e.target=this,e.srcElement=this,e[Me]=n;for(let s=n.length;s--;)if(Vn(e,n[s],_t),e.cancelBubble)return!e.defaultPrevented;let o=e.bubbles?n:n.slice(0,1);for(let s=0;s<o.length;s++)if(Vn(e,o[s],Hn),e.cancelBubble)return!e.defaultPrevented;return!e.defaultPrevented}finally{e[He]=!1,e.cancelBubble=!1,e[Le]=!1,e.eventPhase=kt,e.currentTarget=null,e[Me]=[]}}};function Ss(t,e,n){if(e==null)return;let r=n===!0||n&&n.capture===!0,o=jn(!!r),s=this[dt]?.get(t)?.[o]?.get(e);s&&Mt(this,s)}function jn(t){return t?\"capture\":\"bubble\"}function Mt(t,e){let n=jn(e.capture),r=t[dt],o=r?.get(e.type);if(!o)return;let s=o[n];if(!s||s.get(e.listener)!==e)return;s.delete(e.listener),s.size===0&&delete o[n],!o.bubble&&!o.capture&&r?.delete(e.type),e.signal&&e.abortListener&&e.signal.removeEventListener(\"abort\",e.abortListener);let i=t[we],l=i?.get(e.type);if(!l)return;let u=l[n];u?.delete(e)&&(u.size===0&&delete l[n],!l.bubble&&!l.capture&&i?.delete(e.type),t[I]?.defaultView[Se].removeEventListener?.(t,e.type,e.listener,e.capture))}var Q=class extends Array{item(e){return this[e]??null}};var mt=0,Fr=1,Fn=2,Bn=3,pt=4,Br=0,Gr=1,Vt=2,Ut=3,Yr=4,$n=5,qr=6,Wr=7,Lt=/^(?:--|-?[A-Za-z_\\u0080-\\u{10FFFF}])[A-Za-z0-9_\\u0080-\\u{10FFFF}-]*$/u;function Os(t,e){let n=1,r=null;for(let o=e;o<t.length;o++){let s=t[o];if(r){s===\"\\\\\"?o++:s===r&&(r=null);continue}if(s==='\"'||s===\"'\")r=s;else if(s===\"(\")n++;else if(s===\")\"&&--n===0)return[t.slice(e,o),o+1]}return[t.slice(e),t.length]}function W(t){throw P(`Invalid or unsupported selector: \"${t}\"`,\"SyntaxError\")}function jt(t,e){let n=typeof e==\"string\"?ht(e):[{combinator:pt,matchers:e}],r=null,o=t[k];return o&&n[0].matchers.length&&Gn(o,n,s=>(r=s,!1)),r}function zt(t,e){let n=typeof e==\"string\"?ht(e):[{combinator:pt,matchers:e}],r=new Q,o=t[k];return o&&n[0].matchers.length&&Gn(o,n,s=>{r.push(s)}),r}function ht(t,e=!1,n=!1){let r={combinator:pt,matchers:[]},o=[r],s=/[\\t\\n\\f\\r ]*?([>\\t\\n\\f\\r +~]?)[\\t\\n\\f\\r ]*?(?:(?:\\[[\\t\\n\\f\\r ]*([^\\]=\\t\\n\\f\\r ]+)[\\t\\n\\f\\r ]*(?:=[\\t\\n\\f\\r ]*(?:(['\"])(.*?)\\3|([^\\]\\t\\n\\f\\r ]+)))?[\\t\\n\\f\\r ]*(?:\\]|$))|([#.]?)([^\\t\\n\\f\\r #.[>:+~()]+)|:(\\w+)(\\()?)/gi,i=t.replace(/^[\\t\\n\\f\\r ]+|[\\t\\n\\f\\r ]+$/g,\"\");i===\"\"&&W(t);let l=0,u;for(;u=s.exec(i);){u.index!==l&&W(t),u[1]&&(r.matchers.length===0&&!(n&&o.length===1)&&W(t),u[1]===\">\"?r.combinator=Fr:u[1]===\"+\"?r.combinator=Bn:u[1]===\"~\"?r.combinator=Fn:r.combinator=mt,r={combinator:pt,matchers:[]},o.push(r));let d=u[8]?H(u[8]):u[2]||u[7];u[7]!=null&&!u[6]&&r.matchers.length>0&&W(t);let E,f=u[4]??u[5]??u[7];if(u[2]){Lt.test(d)||W(t);let b=u[5],N=b?.[0];if(u[3]==null&&(N==='\"'||N===\"'\")){let O=u[0].lastIndexOf(b);f=i.slice(u.index+O+1),s.lastIndex=i.length}else b!=null&&!Lt.test(b)&&W(t);E=Yr}else u[6]?(Lt.test(d)||W(t),E=u[6]===\"#\"?Vt:Ut):u[8]?E=u[9]==null?$n:qr:u[7]===\"*\"?E=Br:u[7]&&Lt.test(u[7])?E=Gr:W(t);u[9]?([f,s.lastIndex]=Os(i,s.lastIndex),d!==\"has\"&&d!==\"not\"&&W(t),d===\"has\"&&e&&W(t),ht(f,e||d===\"has\",d===\"has\")):E===$n&&W(t),r.matchers.push({type:E,name:d,value:f}),l=s.lastIndex}return(l!==i.length||r.matchers.length===0)&&W(t),o}function vs(t,e){let n=ht(e);return n[0]?.matchers.length?ft(t,n):!1}function Rs(t,e){let n=ht(e,!0,!0),r=n[0];if(n.length===1&&r.matchers.length===0)return!1;let o=mt,s={type:Wr,name:\":scope\"};if(r.matchers.length===0?(o=r.combinator,r.matchers.push(s)):n.unshift({combinator:mt,matchers:[s]}),n.some(({matchers:u})=>u.length===0))return!1;let i=o===Bn||o===Fn?t[S]:t[k];if(!i)return!1;let l=!1;return Gn(i,n,()=>(l=!0,!1),t),l}function Gn(t,e,n,r){let o=[],s=t;for(;s;){if(G(s)){if(ft(s,e,r)&&n(s)===!1)return!1;let i=s[k];if(i){let l=s[S];l&&o.push(l),s=i;continue}}s=s[S]??o.pop()??null}return!0}function ft(t,e,n){let{combinator:r,matchers:o}=e[e.length-1];if(r===pt){if(!Ht(t,o,n))return!1;let l=e.slice(0,-1);return l.length===0||ft(t,l,n)}let s=r===Fr||r===mt?q:D,i=t[s];if(!i)return!1;if(r===mt||r===Fn){for(;i;){if(G(i)&&Ht(i,o,n)){let l=e.slice(0,-1);if(l.length===0||ft(i,l,n))return!0}i=i[s]}return!1}else{if(r===Bn&&!G(i)){for(;i&&!G(i);)i=i[s];if(!i)return!1}if(!G(i)||!Ht(i,o,n))return!1;let l=e.slice(0,-1);return l.length===0||ft(i,l,n)}}function zn(t,e){return t.getAttributeNS(null,t.namespaceURI===_?H(e):e)}function Ht(t,e,n){if(!t)return!1;if(Array.isArray(e)){for(let i of e)if(Ht(t,i,n)===!1)return!1;return!0}let{type:r,name:o,value:s}=e;switch(r){case Br:return o===\"*\";case Gr:return t.namespaceURI===_?t.localName===H(o):t.localName===o;case Vt:return zn(t,\"id\")===o;case Ut:let i=zn(t,\"class\");return i?At(i).includes(o):!1;case Yr:let l=zn(t,o);return s==null?l!=null:l===s;case Wr:return t===n;case $n:W(`:${o}`);case qr:switch(o){case\"has\":return Rs(t,s||\"\");case\"not\":return!vs(t,s||\"\");default:W(`:${o}(${s})`)}}return!1}function As(t){return t.nodeType===Ue}function gt(t){return Z in t}function qn(t){return t.nodeType===je}function Cs(t){return t.nodeType===ze}function G(t){return t.nodeType===X}function Yn(t){return t.nodeType===be}function Jr(t){return\"appendChild\"in t}function $t(t){let e=[],n=[t],r=new Set(n),o=new Set,s;for(;n.length>0;){let i=n.pop();if(r.delete(i),o.has(i))continue;let l=[];for(let u of bt(i)){if(o.has(u)||(o.add(u),e.push(u),l.push(u),!G(u)))continue;let d=u[se];if(d)for(let E of d)o.has(E)||(o.add(E),e.push(E));let p=u[le];p&&!o.has(p)&&!r.has(p)&&(r.add(p),n.push(p))}s??=l}return{nodes:e,treeNodes:s}}function yt(t,e){for(let n of t)n[I]=e}function Xr(t,e){let n=t.constructor,r=new n(t.name,t.value,t.namespaceURI);return r[I]=e,r}function Kr(t,e){if(qn(t))return e.createTextNode(t.data);if(Cs(t))return e.createComment(t.data);if(As(t))return Xr(t,e);if(G(t)){let n=e[Ve](t[A],t.namespaceURI,t[he],t.localName);if(t[se])for(let r=0;r<t[se].length;r++){let o=t[se].item(r);n.attributes.setNamedItem(Xr(o,e))}return n}else{if(Yn(t))return e.createDocumentFragment();{let n=new t.constructor;return n[I]=e,n}}}function Ft(t,e,n=t.ownerDocument){if(t.nodeType===Oe)throw P(\"Cannot clone a document node\",\"NotSupportedError\");let r=Kr(t,n);if(!e||!G(t)&&!Yn(t))return r;let o=new Set([t]),s=[{source:t,destination:r,childIndex:0,cloningContent:!1}];for(;s.length>0;){let i=s[s.length-1],l,u;if(i.cloningContent)if(i.contentSource&&i.contentDestination)l=i.contentSource.childNodes[i.childIndex++],u=i.contentDestination;else{s.pop(),i.appendTo&&i.appendTo.appendChild(i.destination);continue}else if(l=i.source.childNodes[i.childIndex++],u=i.destination,!l){if(i.cloningContent=!0,i.childIndex=0,G(i.source)&&i.source.namespaceURI===_&&i.source.localName===\"template\"){let p=i.source[le];p&&(o.has(p)&&Zr(),o.add(p),i.contentSource=p,i.contentDestination=i.destination.content)}continue}if(!l){s.pop(),i.appendTo&&i.appendTo.appendChild(i.destination);continue}o.has(l)&&Zr(),o.add(l);let d=Kr(l,n);G(l)||Yn(l)?s.push({source:l,destination:d,appendTo:u,childIndex:0,cloningContent:!1}):u.appendChild(d)}return r}function Zr(){throw new Error(\"Cannot clone a cyclic or repeated node graph\")}function Bt(t,e){let n=String(e);return n===\"\"?null:jt(t,[{type:Vt,name:n}])}function Gt(t,e){let n=[...new Set(At(String(e)))];return zt(t,n.map(r=>({type:Ut,name:r})))}function Yt(t,e){let n=String(e),r=H(n),o=[];for(let s of qt(t))G(s)&&(n===\"*\"||(s.namespaceURI===_?s[A]===r:s[A]===n))&&o.push(s);return o}function qt(t){let e=[],n=[],r=t[k];for(;r;){e.push(r);let o=r[k],s=r[S];o?(s&&n.push(s),r=o):r=s??n.pop()??null}return e}function bt(t){let e=qt(t);return e.unshift(t),e}var ee=class extends Ee{nodeType=Dr;[A]=\"\";[q]=null;[ye]=null;[k]=null;[D]=null;[S]=null;[U]=!1;get[M](){return this[I].defaultView[Se]}get localName(){return this[A]}get nodeName(){return this[A]}get ownerDocument(){return this[I]}get isConnected(){return this[U]}isDefaultNamespace(e){let n=ce(e);return ks(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[D]}set previousSibling(e){}get nextSibling(){return this[S]}set nextSibling(e){}get previousElementSibling(){let e=this[D];for(;e&&e.nodeType!==1;)e=e[D];return e}set previousElementSibling(e){}get nextElementSibling(){let e=this[S];for(;e&&e.nodeType!==1;)e=e[S];return e}set nextElementSibling(e){}get firstChild(){return this[k]}set firstChild(e){}get lastChild(){let e=this[k];for(;e;){let n=e[S];if(n==null)break;e=n}return e}set lastChild(e){}get nodeValue(){return gt(this)?this.data:null}set nodeValue(e){gt(this)&&(this.data=e)}get textContent(){if(gt(this))return this.data;let e=\"\";for(let n of qt(this))qn(n)&&(e+=n.data);return e}set textContent(e){if(gt(this))this.data=e;else if(Jr(this)){let n=e==null?\"\":String(e);n===\"\"?this.replaceChildren():this.replaceChildren(n)}}cloneNode(e){return Ft(this,e)}contains(e){let n=e;for(;n!=null;){if(n===this)return!0;n=n.parentNode}return!1}};function ks(t){let e=t;for(;e;)switch(e.nodeType){case X:{let n=e;if(n.prefix==null&&n.namespaceURI!=null)return n.namespaceURI;let r=n.attributes.getNamedItemNS(at,\"xmlns\");if(r!=null&&r.prefix==null)return ce(r.value);e=n.parentElement;break}case Oe:e=e.documentElement;break;case Mr:case be:return null;case Ue:e=e.ownerElement;break;default:e=e.parentElement}return null}var te=Symbol(\"insertNode\"),Kn=Symbol(\"preflightInsertions\"),Wt=Symbol(\"replaceNode\"),Ne=class extends ee{remove(){let e=this.parentNode;e&&e.removeChild(this)}replaceWith(...e){let n=Re(e),r=this.parentNode;if(r)return Wn(o=>{ue(r,n);let s=this[S];for(;s&&n.includes(s);)s=s[S];let i=Xn(r,n,o);this.parentNode===r?r[Wt](i,this,o):r[te](i,s,o)})}before(...e){let n=Re(e),r=this.parentNode;if(r)return Wn(o=>{ue(r,n);let s=this[D];for(;s&&n.includes(s);)s=s[D];let i=Xn(r,n,o);r[te](i,s?s[S]:r.firstChild,o)})}after(...e){let n=Re(e),r=this.parentNode;if(r)return Wn(o=>{ue(r,n);let s=this[S];for(;s&&n.includes(s);)s=s[S];let i=Xn(r,n,o);r[te](i,s,o)})}};function Wn(t){return z(()=>{let e=[];try{t(e)}catch(n){try{ve(e)}catch{}throw n}ve(e)})}function Re(t){return t.map(e=>e instanceof ee?e:String(e))}function Et(t,e){return e instanceof ee?e:t.ownerDocument.createTextNode(String(e))}function ue(t,e){for(let n of e){if(!(n instanceof ee))continue;let r=t;for(;r;){if(r===n)throw P(\"Cannot insert a node into itself or one of its descendants\",\"HierarchyRequestError\");r=r[q]??r[ye]}}}function Xn(t,e,n){let r=[];for(let s of e)r.push(Et(t,s));if(r.length===1)return r[0];let o=t.ownerDocument.createDocumentFragment();o[Kn](r);for(let s of r)o[te](s,null,n);return o}var Xt,Zn=0,Qr=0,eo=0,to=0,$e=!1,Qn=!1,Nt=!1,Kt=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=_s(n),o=Xt??=new WeakMap,s=o.get(e);s==null&&(s=new Map,o.set(e,s));let i=s.get(this);i==null?Zn++:Jn(i,-1),s.set(this,r),Jn(r,1),this.#e.add(e)}disconnect(){let e=Xt;if(e!=null){for(let n of this.#e){let r=e.get(n),o=r?.get(this);o!=null&&(r.delete(this),Zn--,Jn(o,-1)),r?.size===0&&e.delete(n)}this.#e.clear(),this.#n.length=0,Zn===0&&(Xt=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 ne(t){let e=Xt;if(e==null)return;let n=new Map,r=t.target;for(;r;){let o=e.get(r);if(o)for(let[s,i]of o){if(r!==t.target&&!i.subtree)continue;let l=!1;if(t.type===\"attributes\"){if(!i.attributes||i.attributeFilter&&!i.attributeFilter.has(t.attributeName??\"\"))continue;l=i.attributeOldValue}else if(t.type===\"characterData\"){if(!i.characterData)continue;l=i.characterDataOldValue}else if(!i.childList)continue;n.set(s,n.get(s)===!0||l)}r=r.parentNode}for(let[o,s]of n)o.enqueue({addedNodes:t.addedNodes??new Q,attributeName:t.attributeName??null,attributeNamespace:t.attributeNamespace??null,nextSibling:t.nextSibling??null,oldValue:s?t.oldValue??null:null,previousSibling:t.previousSibling??null,removedNodes:t.removedNodes??new Q,target:t.target,type:t.type})}function Zt(...t){let e=new Q;return e.push(...t),e}function _s(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 Jn(t,e){t.attributes&&(Qr+=e),t.characterData&&(eo+=e),t.childList&&(to+=e),$e=Qr>0,Qn=eo>0,Nt=to>0}var ie=class extends Ne{childNodes=new Q;children=new Q;appendChild(e){return z(()=>this[te](e,null))}insertBefore(e,n){return z(()=>this[te](e,n||null))}append(...e){return z(()=>{let n=Re(e.filter(r=>r!=null));n.length>1&&ue(this,n);for(let r of n)this[te](Et(this,r),null)})}prepend(...e){return z(()=>{let n=Re(e.filter(o=>o!=null));n.length>1&&ue(this,n);let r=this.firstChild;for(let o of n)this[te](Et(this,o),r)})}replaceChildren(...e){return z(()=>{let n=Re(e.filter(o=>o!=null));ue(this,n);let r;for(;r=this.firstChild;)this.removeChildImmediately(r);for(let o of n)this[te](Et(this,o),null)})}removeChild(e){return z(()=>(this.removeChildImmediately(e),e))}removeChildImmediately(e){if(e.parentNode!==this)throw P(\"The node is not a child of this node\",\"NotFoundError\");let n=this[U]?bt(e):void 0,r=e[D],o=e[S],s=Jt(this,e);if(n)for(let i of n)i[U]=!1;this.queueRemovalMutationRecord(this,e,r,o),n&&this.enqueueTreeReactions(n,\"disconnectedCallback\"),ve(this.collectRemovalHookEffects(e,s))}replaceChild(e,n){return z(()=>this[Wt](e,n))}[Wt](e,n,r){if(ue(this,[e]),n.parentNode!==this)throw P(\"The reference node is not a child of this parent\",\"NotFoundError\");let o=n[D],s=n[S],i=this.prepareInsertion(e),l=this[U]?bt(n):void 0,u=new Set(i.map(({node:f})=>f)),d=s;for(;d&&u.has(d);)d=d[S];let p=Jt(this,n);if(l){for(let b of l)b[U]=!1;let f=new Set(l);for(let b of i)f.has(b.node)&&(b.shouldDisconnect=!1)}this.commitInsertion(i,d);let E=this[U];return this.queueRemovalMutationRecord(this,n,o,s),this.queueInsertionMutationRecords(i),l&&this.enqueueTreeReactions(l,\"disconnectedCallback\"),this.enqueueInsertionReactions(i,E),this.performOrCollectHookEffects([...this.collectRemovalHookEffects(n,p),...this.collectInsertionHookEffects(i)],r),n}querySelectorAll(e){return zt(this,e)}querySelector(e){return jt(this,e)}[te](e,n,r){return this.validateInsertion(e,n),this.insertIntoValidated(e,n,r),e}[Kn](e){for(let n of e)this.validateInsertion(n,null),this.prepareInsertion(n)}validateInsertion(e,n){if(ue(this,[e]),n&&n.parentNode!==this)throw P(\"The reference node is not a child of this parent\",\"NotFoundError\")}insertIntoValidated(e,n,r){e===n&&(n=e[S]);let o=this.prepareInsertion(e);this.commitInsertion(o,n);let s=this[U];this.queueInsertionMutationRecords(o),this.enqueueInsertionReactions(o,s),this.performOrCollectHookEffects(this.collectInsertionHookEffects(o),r)}performOrCollectHookEffects(e,n){n?n.push(...e):ve(e)}prepareInsertion(e){let n=[];if(e.nodeType===be){let i=e[k];for(;i;)n.push(i),i=i[S]}else n.push(e);let r=this[U],o=this[I],s=[];for(let i of n){let l=i[U],u=l||r,d,p;if(i[I]===o)u&&(d=bt(i));else{let E=$t(i);p=E.nodes,u&&(d=E.treeNodes)}s.push({node:i,nodes:d,adoption:p,shouldDisconnect:l})}return s}commitInsertion(e,n){for(let s of e){let i=s.node[q];if(i){let l=s.node[D],u=s.node[S];s.source={parent:i,index:Jt(i,s.node),previousSibling:l,nextSibling:u}}}for(let s of e){let i=this.attachChild(s.node,n);s.insertIndex=i.index,s.previousSibling=i.previousSibling,s.nextSibling=i.nextSibling}let r=this[I];for(let{adoption:s}of e)s&&yt(s,r);let o=this[U];for(let{nodes:s}of e)if(s)for(let i of s)i[U]=o}attachChild(e,n){if(n){let s=n[D];e[S]=n,e[D]=s,s?s[S]=e:this[k]=e,n[D]=e}else{e[S]=null;let s=this[k];if(s){let i;for(;i=s[S];)s=i;s[S]=e,e[D]=s}else this[k]=e,e[D]=null}let r=G(e);e[q]=this;let o;if(n){if(o=this.childNodes.indexOf(n),this.childNodes.splice(o,0,e),r){let s=n;for(;s&&!G(s);)s=s[S];s?this.children.splice(this.children.indexOf(s),0,e):this.children.push(e)}}else o=this.childNodes.length,this.childNodes.push(e),r&&this.children.push(e);return{index:o,previousSibling:e[D],nextSibling:e[S]}}queueRemovalMutationRecord(e,n,r,o){Nt&&ne({type:\"childList\",target:e,removedNodes:Zt(n),previousSibling:r,nextSibling:o})}queueInsertionMutationRecords(e){if(Nt)for(let n of e){let{node:r,source:o}=n;o&&this.queueRemovalMutationRecord(o.parent,r,o.previousSibling,o.nextSibling),ne({type:\"childList\",target:this,addedNodes:Zt(r),previousSibling:n.previousSibling,nextSibling:n.nextSibling})}}collectRemovalHookEffects(e,n){return this.nodeType!==X||ut(this)?[]:[[()=>this[M].removeChild?.(this,e,n)]]}collectInsertionHookEffects(e){let n=[];for(let r of e){let{node:o,source:s}=r;s?.parent.nodeType===X&&!ut(s.parent)&&n.push([()=>s.parent[M].removeChild?.(s.parent,o,s.index)]),this.nodeType===X&&!ut(this)&&n.push([()=>this[M].insertChild?.(this,o,r.insertIndex),o])}return n}enqueueInsertionReactions(e,n){for(let r of e){let{nodes:o}=r;o&&(r.shouldDisconnect&&this.enqueueTreeReactions(o,\"disconnectedCallback\"),n&&this.enqueueTreeReactions(o,\"connectedCallback\"))}}enqueueTreeReactions(e,n){ro(e,n)}};function no(t,e,n,r){if(e.parentNode!==t)throw Error(\"not a child of this node\");let o=t[U]?n.treeNodes:void 0,s=e[D],i=e[S],l=Jt(t,e);if(o)for(let d of o)d[U]=!1;yt(n.nodes,r),Nt&&ne({type:\"childList\",target:t,removedNodes:Zt(e),previousSibling:s,nextSibling:i}),o&&ro(o,\"disconnectedCallback\");let u=[];t.nodeType===X&&!ut(t)&&u.push([()=>t[M].removeChild?.(t,e,l)]),ve(u)}function Jt(t,e){let n=e[D],r=e[S];n?n[S]=r:t[k]=r,r&&(r[D]=n);let o=t.childNodes.indexOf(e);return t.childNodes.splice(o,1),G(e)&&t.children.splice(t.children.indexOf(e),1),e[q]=null,e[S]=null,e[D]=null,o}function ro(t,e){for(let n of t){let r=n[e];typeof r==\"function\"&&It(n,()=>r.call(n))}}function Tt(t,e,n,r,o){let{observedAttributes:s}=t.constructor,{attributeChangedCallback:i}=t;i==null||s==null||!s.includes(e)||It(t,()=>i.call(t,e,n,r,o))}var Qt=class{[k]=null;constructor(e){this[Y]=e}getNamedItem(e){let n=String(e),r=this[Y][C]===_?H(n):n,o=this[k];for(;o;){if(o.name===r)return o;o=o[S]}return null}getNamedItemNS(e,n){let r=ce(e),o=String(n),s=this[k];for(;s;){if(s.localName===o&&s[C]===r)return s;s=s[S]}return null}item(e){let n=this[k],r=0;for(;n;){if(r++===e)return n;n=n[S]}return null}get length(){let e=0,n=this[k];for(;n;)e++,n=n[S];return e}removeNamedItem(e){let n=String(e),r=this[Y][C]===_?H(n):n;return z(()=>this.removeNamedItemImmediately(o=>o.name===r))}removeNamedItemNS(e,n){let r=ce(e),o=String(n);return z(()=>this.removeNamedItemImmediately(s=>s.localName===o&&s[C]===r))}removeNamedItemImmediately(e){let n=this[Y],r=this[k],o=null;for(;r!=null;){if(e(r)){o&&(o[S]=r[S]),this[k]===r&&(this[k]=r[S]);let s=r.value;return r[S]=null,r[Y]=null,$e&&ne({type:\"attributes\",target:n,attributeName:r.name,attributeNamespace:r[C],oldValue:s}),n[M].removeAttribute?.(n,r.name,r[C]),Tt(n,r.localName,s,null,r[C]),r}o=r,r=r[S]}return null}setNamedItem(e){return z(()=>this.setNamedItemImmediately(e))}setNamedItemImmediately(e){let n=this[Y],r=e[Y];if(r!=null&&r!==n)throw P(\"The attribute is already in use by another element.\",\"InUseAttributeError\");let o=null,s=this[k],i=null;for(;s;){if(s.localName===e.localName&&s[C]===e[C]){if(s===e)return s;i?i[S]=e:this[k]=e,e[S]=s[S],s[S]=null,o=s;break}i=s,s=s[S]}o==null&&(i?i[S]=e:this[k]=e),e[Y]=n,e[I]=n[I],o&&(o[Y]=null);let l=o==null||o.value!==e.value,u=o!=null&&o.name!==e.name;return l&&$e&&ne({type:\"attributes\",target:n,attributeName:e.name,attributeNamespace:e[C],oldValue:o?.value??null}),u&&n[M].removeAttribute?.(n,o.name,o[C]),(l||u)&&n[M].setAttribute?.(n,e.name,e.value,e[C]),l&&Tt(n,e.localName,o?.value??null,e.value,e[C]),o}setNamedItemNS(e){return this.setNamedItem(e)}*[Symbol.iterator](){let e=this[k];for(;e;)yield e,e=e[S]}};var Ae=class extends ee{nodeType=Ue;[C]=null;[S]=null;[Y]=null;constructor(e,n,r){super(),this[A]=e,this[ge]=n,r&&(this[C]=r)}get nodeName(){return this[A]}set nodeName(e){}get name(){return this[A]}set name(e){}get localName(){if(this[C]==null)return this[A];let e=this[A].indexOf(\":\");return e<0?this[A]:this[A].slice(e+1)}get prefix(){if(this[C]==null)return null;let e=this[A].indexOf(\":\");return e<0?null:this[A].slice(0,e)}get value(){return this[ge]}set value(e){let n=String(e),r=this[Y];if(!r){this[ge]=n;return}z(()=>{let o=this[ge];this[ge]=n,$e&&o!==n&&ne({type:\"attributes\",target:r,attributeName:this[A],attributeNamespace:this[C],oldValue:o}),this[M].setAttribute?.(r,this[A],n,this[C]),Tt(r,this.localName,o,n,this[C])})}get nodeValue(){return this.value}set nodeValue(e){this.value=e}get ownerElement(){return this[Y]}get namespaceURI(){return this[C]}get specified(){return!0}};var Ps={amp:\"&\",AMP:\"&\",apos:\"'\",gt:\">\",GT:\">\",lt:\"<\",LT:\"<\",quot:'\"',QUOT:'\"'},Is=new Set([\"area\",\"base\",\"br\",\"col\",\"embed\",\"hr\",\"img\",\"input\",\"link\",\"meta\",\"param\",\"source\",\"track\",\"wbr\"]),Ds=/(?:<([a-z][a-z0-9-:]*)((?:[\\s]+[^<>'\"=/\\s]+(?:=(['\"])[^]*?\\3|=[^>'\"\\s]*|))*)[\\s]*(\\/?)\\s*>|<\\/([a-z][a-z0-9-:]*)>|<!--(.*?)-->|([^<>]+))/gi,io=/\\s([^<>'\"=/\\n\\s]+)(?:=([\"'])([\\s\\S]*?)\\2|=([^>'\"\\n\\s]*)|)/g,Ms=\"|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|\",Ls=/^(?:color|face|size)$/i;function oo(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 Ps[n];let s=Number.parseInt(r??o,r?10:16);try{return String.fromCodePoint(s)}catch{return e}})}function ao(t){return t.namespaceURI===_&&Is.has(t.localName)}function so(t){let e=t.localName;return t[C]===J&&(e===\"foreignObject\"||e===\"desc\"||e===\"title\")}function Hs(t,e){if(Ms.includes(`|${t}|`))return!0;if(t!==\"font\")return!1;for(let n of e.matchAll(io))if(Ls.test(n[1]))return!0;return!1}function en(t,e){let n=e.ownerDocument,r=n.createDocumentFragment(),o=[],s=r;for(let i of t.matchAll(Ds)){let l=i[1];if(l){let u=i[2],d=H(l),p=o[o.length-1]?.element??e,E=p[C]===J?J:_;if(d===\"svg\")E=J;else if(E===J){if(so(p))E=_;else if(Hs(d,u)){for(;o.length>0;){let N=o[o.length-1];if(N.element[C]!==J||so(N.element))break;o.pop(),s=N.target}E=_}}let f=E===_?d:l,b=n[Ve](f,E,null,f);for(let N of u.matchAll(io))b.setAttribute(N[1],oo(N[3]||N[4]||\"\"));if(s.append(b),ao(b)||E!==_&&i[4])continue;o.push({element:b,target:s}),s=E===_&&d===\"template\"?b.content:b}else if(i[5]){let u=H(i[5]);for(let d=o.length-1;d>=0;d--){let p=o[d],E=H(p.element[A]);if(E===u){s=p.target,o.length=d;break}if(p.element[C]===_&&E===\"template\")break}}else i[6]?s.append(n.createComment(i[6])):s.append(oo(i[7]))}return r}function tn(t){return co([{type:\"content\",child:t[k]}])}function lo(t){return co([{type:\"opening\",node:t}])}function co(t){let e=[],n;for(;n=t.pop();)switch(n.type){case\"opening\":{let r=n.node;switch(r.nodeType){case X:{let o=r;e.push(`<${o[A]}`);let s=o[se]?.[k];for(;s;){e.push(` ${s[A]}`);let l=s[ge];l!==\"\"&&(l=String(l).replace(/&/g,\"&\").replace(/\"/g,\""\"),e.push(`=\"${l}\"`)),s=s[S]}if(e.push(\">\"),ao(o))break;let i=o.namespaceURI===_&&o.localName===\"template\"?o[le]:o;t.push({type:\"closing\",name:o[A]}),t.push({type:\"content\",child:i?.[k]??null});break}case je:{let o=r;e.push(o[Z].replace(/&/g,\"&\").replace(/\"/g,\""\").replace(/</g,\"<\").replace(/>/g,\">\"));break}case ze:{let o=r;e.push(`<!--${o[Z]}-->`);break}}break}case\"content\":{let r=n.child;r&&(t.push({type:\"content\",child:r[S]}),t.push({type:\"opening\",node:r}));break}case\"closing\":e.push(`</${n.name}>`);break}return e.join(\"\")}var V=class extends ie{nodeType=X;[C]=_;[he]=null;get namespaceURI(){return this[C]}get prefix(){return this[he]}get localName(){let e=this[he];return e==null?this[A]:this[A].slice(e.length+1)}get nodeName(){return this[C]===_?Hr(this[A]):this[A]}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 Ae(\"slot\",n))}get attributes(){let e=this[se];return e||(e=new Qt(this),this[se]=e),e}getAttributeNames(){return[...this.attributes].map(e=>e.name)}getElementsByTagName(e){return Yt(this,e)}get firstElementChild(){return this.children[0]??null}getElementsByClassName(e){return Gt(this,e)}get lastElementChild(){return this.children[this.children.length-1]??null}get nextElementSibling(){let e=this.nextSibling;for(;e&&e.nodeType!==1;)e=e.nextSibling;return e}get previousElementSibling(){let e=this.previousSibling;for(;e&&e.nodeType!==1;)e=e.previousSibling;return e}setAttribute(e,n){let r=String(e),o=String(n);Mn(r);let s=this[C]===_?H(r):r,i=this.attributes.getNamedItemNS(null,s);i?i.value=o:this.attributes.setNamedItem(new Ae(s,o))}setAttributeNS(e,n,r){let o=ce(e),s=String(n),i=String(r),l=Ct(o,s,\"attribute\"),u=this.attributes.getNamedItemNS(l.namespace,l.localName);u?u.value=i:this.attributes.setNamedItemNS(new Ae(l.qualifiedName,i,l.namespace))}toggleAttribute(e,n){let r=String(e);Mn(r);let o=this[C]===_?H(r):r,s=this.attributes.getNamedItemNS(null,o),i=n===void 0?void 0:!!n;return s==null?i===!1?!1:(this.attributes.setNamedItem(new Ae(o,\"\")),!0):i===!0?!0:(this.attributes.removeNamedItemNS(null,o),!1)}getAttribute(e){let n=this.attributes.getNamedItem(e);return n&&n.value}getAttributeNS(e,n){let r=this.attributes.getNamedItemNS(e,n);return r&&r.value}hasAttribute(e){return this.attributes.getNamedItem(e)!=null}hasAttributeNS(e,n){return this.attributes.getNamedItemNS(e,n)!=null}removeAttribute(e){let n=String(e),r=this[C]===_?H(n):n;this.attributes.removeNamedItemNS(null,r)}removeAttributeNS(e,n){this.attributes.removeNamedItemNS(e,n)}get outerHTML(){return lo(this)}get innerHTML(){return tn(this)}set innerHTML(e){if(e==null||e===\"\")this.replaceChildren();else{let n=en(String(e),this);this.replaceChildren(n)}}};var Fe=class t extends V{[C]=J;get ownerSVGElement(){let e=null,n=this.parentNode;for(;n instanceof t;)e=n,n=n.parentNode;return e}};var Te=class extends Ne{[Z]=\"\";constructor(e){super(),this[Z]=e==null?\"\":String(e)}setData(e){let n=Qn,r=n?this[Z]:null,o=\"\";e!=null&&(o=typeof e==\"string\"?e:String(e)),this[Z]=o,n&&r!==o&&ne({type:\"characterData\",target:this,oldValue:r}),this[M].setText?.(this,o)}get data(){return this[Z]}set data(e){this.setData(e)}};var Be=class extends Te{nodeType=je;[A]=\"#text\"};var Ge=class extends Te{nodeType=ze;[A]=\"#comment\"};var Ye=class extends ie{nodeType=be;[A]=\"#document-fragment\";[I]=typeof window<\"u\"?window.document:null;getElementById(e){return Bt(this,e)}};var qe=class extends V{get content(){let e=this[le];return e||(e=this.ownerDocument.createDocumentFragment(),e[ye]=this,this[le]=e),e}set content(e){}set innerHTML(e){this.content.replaceChildren(en(String(e),this))}get innerHTML(){let e=this[le];return e?tn(e):\"\"}};var nn=class extends V{};var rn=class extends V{};var on=class extends V{};var xt=class extends ie{nodeType=Oe;[A]=\"#document\";[U]=!0;constructor(e){super(),this.defaultView=e,this[I]=this,this.documentElement=an(new on,this,\"html\"),this.body=an(new nn,this,\"body\"),this.head=an(new rn,this,\"head\"),this.appendChild(this.documentElement),this.documentElement.appendChild(this.head),this.documentElement.appendChild(this.body)}get textContent(){return null}set textContent(e){}getElementsByClassName(e){return Gt(this,e)}createElement(e){let n=String(e);return jr(n),er(this,H(n))}createElementNS(e,n){let r=Ct(e,n,\"element\");return er(this,r.qualifiedName,r.namespace,r.prefix,r.localName)}[Ve](e,n,r,o){return er(this,e,n,r,o)}createTextNode(e){let n=sn(new Be(e),this);return this[M].createText?.(n,n.data),n}createComment(e){return sn(new Ge(e),this)}createDocumentFragment(){return sn(new Ye,this)}createEvent(){return new j(\"\")}getElementById(e){return Bt(this,e)}getElementsByTagName(e){return Yt(this,e)}importNode(e,n){if(e.nodeType===Oe)throw P(\"Cannot import a document node\",\"NotSupportedError\");return Ft(e,n,this)}adoptNode(e){if(e[I]===this)return e;let n=$t(e);return z(()=>{let r=e.parentNode;return r?no(r,e,n,this):yt(n.nodes,this),e})}};function sn(t,e){return Object.defineProperty(t,I,{value:e,writable:!0,enumerable:!1}),t}function er(t,e,n=_,r=null,o=e){let s;if(n===J)s=new Fe;else if(n===_&&o===\"template\")s=new qe;else if(n===_){let i=t.defaultView.customElements.get(o);s=i?new i:new V}else s=new V;return an(s,t,e,n,r)}function an(t,e,n,r=_,o=null){return sn(t,e),Object.defineProperties(t,{[A]:{value:n},[C]:{value:r},[he]:{value:o}}),e[M].createElement?.(t,r),t}var ln=class extends j{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 cn=class extends j{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 un=class extends j{constructor(e,n){super(e,n),this.promise=n.promise,this.reason=n.reason}};var dn=class extends j{constructor(e,n){super(e,n),this.oldState=n.oldState,this.newState=n.newState}};var fn=class extends j{constructor(e,n={}){super(e,n),this.relatedTarget=n.relatedTarget??null}};var mn=class extends j{constructor(e,n={}){super(e,n),this.clipboardData=n.clipboardData??null}};var pn=class extends V{};var Vs=/^[a-z][^A-Z\\u0000\\t\\n\\f\\r />]*-[^A-Z\\u0000\\t\\n\\f\\r />]*$/u,Us=new Set([\"annotation-xml\",\"color-profile\",\"font-face\",\"font-face-src\",\"font-face-uri\",\"font-face-format\",\"font-face-name\",\"missing-glyph\"]);function uo(t){return Vs.test(t)&&!Us.has(t)}function fo(t){return P(`Invalid custom element name: \"${t}\"`,\"SyntaxError\")}var hn=class{registry=new Map;listenersByName=new Map;define(e,n,r){if(!uo(e))throw fo(e);if(this.registry.has(e))throw P(`A custom element named \"${e}\" has already been defined`,\"NotSupportedError\");if(this.getName(n)!=null)throw P(\"This constructor has already been registered in this custom element registry\",\"NotSupportedError\");this.registry.set(e,n);let o=this.listenersByName.get(e);if(o!=null){this.listenersByName.delete(e);for(let s of o)s(n)}}get(e){return this.registry.get(e)}getName(e){for(let[n,r]of this.registry)if(r===e)return n;return null}whenDefined(e){if(!uo(e))return Promise.reject(fo(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 js=[\"onerror\",\"onunhandledrejection\"],po=Symbol.for(\"@remote-dom/polyfill/global-property\");function ho(t){return Object.getOwnPropertyDescriptors(t)}function go(t){let e={};for(let[n,r]of Object.entries(Object.getOwnPropertyDescriptors(Ee.prototype)))n!==\"constructor\"&&typeof r.value==\"function\"&&(r.value=tr(r.value.bind(t)),e[n]=r);return e}function yo(t){let e={};for(let n of js)e[n]={configurable:!0,enumerable:!0,get:tr(()=>t[n]),set:tr(r=>{t[n]=r})};return e}function zs(t){return Object.assign(ho(t),go(t),yo(t))}function tr(t){return Object.defineProperty(t,po,{value:!0}),t}function mo(t,e){for(let n of Reflect.ownKeys(e)){let r=$s(t,n);(r==null||Fs(r))&&Object.defineProperty(t,n,e[n])}}function $s(t,e){let n=t;for(;n;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function Fs(t){return[t.value,t.get,t.set].some(e=>typeof e==\"function\"&&e[po]===!0)}var Ce=class extends Ee{[M]={};[Rt]=[];[Se]=Gs(this);name=\"\";window=this;parent=this;self=this;top=this;document=new xt(this);customElements=new hn;location=globalThis.location;navigator=globalThis.navigator;Event=j;ErrorEvent=cn;PromiseRejectionEvent=un;ToggleEvent=dn;FocusEvent=fn;ClipboardEvent=mn;EventTarget=Ee;CustomEvent=ln;Node=ee;ParentNode=ie;ChildNode=Ne;DocumentFragment=Ye;Document=xt;CharacterData=Te;Comment=Ge;Text=Be;Element=V;HTMLElement=pn;SVGElement=Fe;HTMLTemplateElement=qe;MutationObserver=Kt;#t=null;#n=null;#e=null;static with(...e){let n=this;return class extends n{constructor(){super();for(let o of e)Bs(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=ho(e),s=Object.assign(go(e),yo(e));delete o.self,Object.defineProperties(globalThis,o),mo(globalThis,s),typeof n>\"u\"||n===r&&n!==globalThis?Object.defineProperty(globalThis,\"self\",{value:e,configurable:!0,writable:!0,enumerable:!0}):n!==globalThis&&(Object.defineProperties(n,o),mo(n,s))}static setGlobalThis(e){for(let n in e)e[n]===e&&(e[n]=globalThis);Object.defineProperties(globalThis,zs(e))}};function Bs(t,e){t[Rt].push(e(t)??{})}function Gs(t){return{createElement:de.bind(null,t,\"createElement\"),setAttribute:de.bind(null,t,\"setAttribute\"),removeAttribute:de.bind(null,t,\"removeAttribute\"),createText:de.bind(null,t,\"createText\"),setText:de.bind(null,t,\"setText\"),insertChild:de.bind(null,t,\"insertChild\"),removeChild:de.bind(null,t,\"removeChild\"),addEventListener:de.bind(null,t,\"addEventListener\"),removeEventListener:de.bind(null,t,\"removeEventListener\")}}function de(t,e,...n){for(let s of t[Rt])s[e]?.apply(s,n);let r=t[M];r[e]?.apply(r,n)}var gn=new Ce;var nr=\"~\";var xe=new WeakMap;function We(t){return xe.get(t)}var ir=new WeakMap,qs=0;function re(t){let e=ir.get(t);return e==null&&(e=String(qs++),yn(t,e)),e}function yn(t,e){ir.set(t,e)}var or=new WeakMap;function Ws(t){return or.get(t)}var sr=new WeakMap;function Xs(t){let e=sr.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 Ks=new WeakMap;function Zs(t){return Ks.get(t)}function ar(t,e,n){let r=or.get(t);if(r==null&&(r={},or.set(t,r)),r[e]===n)return;r[e]=n;let o=xe.get(t);o?.mutate([[3,re(t),e,n,1]])}function bn(t,e,n){let r=sr.get(t);if(r==null&&(r={},sr.set(t,r)),r[e]===n)return;n==null?delete r[e]:r[e]=String(n);let o=xe.get(t);o?.mutate([[3,re(t),e,n,2]])}function Xe(t,e){if(xe.get(t)!==e&&(xe.set(t,e),t.childNodes))for(let r=0;r<t.childNodes.length;r++)Xe(t.childNodes[r],e)}function En(t){if(xe.get(t)!=null&&(xe.delete(t),t.childNodes))for(let n=0;n<t.childNodes.length;n++)En(t.childNodes[n])}function Ke(t){let{nodeType:e}=t;switch(e){case 1:return{id:re(t),type:e,element:t.localName,properties:rr(Ws(t)),attributes:rr(Xs(t)),eventListeners:rr(Zs(t)),children:Array.from(t.childNodes).map(Ke)};case 3:case 8:return{id:re(t),type:e,data:t.data};default:throw new Error(`Cannot serialize node of type ${t.nodeType} (${typeof t.nodeType})`)}}function rr(t){return t?{...t}:void 0}function lr(t,e,...n){let r=ir.get(t),o=xe.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 Ze=gn[M];Ze.insertChild=(t,e,n)=>{let r=We(t);r!=null&&(Xe(e,r),r.mutate([[0,re(t),Ke(e),n]]))};Ze.removeChild=(t,e,n)=>{let r=We(t);r!=null&&(En(e),r.mutate([[1,re(t),n]]))};Ze.setText=(t,e)=>{let n=We(t);n?.mutate([[2,re(t),e]])};Ze.setAttribute=(t,e,n)=>{t.tagName.includes(\"-\")||bn(t,e,n)};Ze.removeAttribute=(t,e)=>{t.tagName.includes(\"-\")||bn(t,e)};Ce.setGlobal(gn);var No=[\"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\"],To=[\"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\"],xo=[\"self\",\"postMessage\",\"setTimeout\",\"clearTimeout\",\"setInterval\",\"clearInterval\",\"queueMicrotask\",\"structuredClone\",\"crypto\",\"console\",\"DOMException\"],wo=[\"TEMPORARY\",\"PERSISTENT\"],tu=Object.freeze([...No,...To,...xo,...wo]),nu=Object.freeze([\"constructor\",\"__defineGetter__\",\"__defineSetter__\",\"hasOwnProperty\",\"__lookupGetter__\",\"__lookupSetter__\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"toString\",\"valueOf\",\"__proto__\",\"toLocaleString\"]),Eo=t=>typeof t==\"symbol\"?`[${t.description??\"symbol\"}]`:t;function So(t=globalThis,e=[],n={}){let r=[],o=[],s=new Set([...No,...To,...xo,...e,\"constructor\",Symbol.toStringTag]),i=(g,a)=>{let m=Reflect.getOwnPropertyDescriptor(g,a);return m===void 0||!(\"value\"in m)||m.writable||m.configurable?!1:n.primitivesStay&&typeof a==\"symbol\"&&(typeof m.value!=\"object\"||m.value===null)&&typeof m.value!=\"function\"?!0:wo.includes(a)&&typeof m.value==\"number\"},l=t,u=l.setTimeout,d=l.setInterval,p=l.crypto,E=(g,a)=>function(m,T,...x){if(typeof m!=\"function\")throw new TypeError(`${a} takes a function: a guest view cannot run code from text`);return g.call(t,m,T,...x)},f=p?Object.freeze({getRandomValues:g=>p.getRandomValues(g)}):void 0,b=l.document?.defaultView;if(b&&b!==l)for(let g of Reflect.ownKeys(b))typeof g==\"symbol\"||s.has(g)||Reflect.deleteProperty(b,g)||o.push(`window.${g}`);let N=[];for(let g=t;g&&g!==Object.prototype;g=Object.getPrototypeOf(g))N.push(g);for(let g of N)for(let a of Reflect.ownKeys(g))s.has(a)||(Reflect.deleteProperty(g,a)?r.push(Eo(a)):i(g,a)||o.push(Eo(a)));let O=()=>function(){throw new EvalError(\"A guest view cannot make code from text.\")},y=[Function.prototype,Object.getPrototypeOf(async function(){}),Object.getPrototypeOf(function*(){}),Object.getPrototypeOf(async function*(){})];for(let g of y){let a=O();Object.defineProperty(a,\"prototype\",{value:g,writable:!1,enumerable:!1,configurable:!1}),Reflect.defineProperty(g,\"constructor\",{value:a,writable:!1,enumerable:!1,configurable:!1})||o.push(\"Function.prototype.constructor\"),g===Function.prototype&&Reflect.defineProperty(t,\"Function\",{value:a,writable:!0,enumerable:!1,configurable:!0})}let c=(g,a)=>{Reflect.defineProperty(t,g,{value:a,writable:!0,enumerable:!0,configurable:!0})||o.push(g)};c(\"setTimeout\",E(u,\"setTimeout\")),c(\"setInterval\",E(d,\"setInterval\")),f&&c(\"crypto\",f);for(let g of N.slice(1))Object.freeze(g);for(let g of Reflect.ownKeys(t)){let a=Reflect.getOwnPropertyDescriptor(t,g);Reflect.defineProperty(t,g,\"value\"in a?{...a,writable:!1,configurable:!1}:{...a,configurable:!1})}let h;try{h=Reflect.preventExtensions(t)}catch{h=!1}return{removed:r,stuck:o,sealed:h}}var wt=class extends HTMLElement{constructor(){super(),yn(this,nr)}connect(e){if(We(this)===e||(Xe(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,nr,Ke(o),r])}e.mutate(n)}updateRemoteProperty(e,n){ar(this,e,n)}callRemoteMethod(e,...n){return lr(this,e,...n)}};var w={},cr={empty:!0},Js={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\"},Qe={div:w,section:w,article:w,aside:w,header:w,footer:w,nav:w,hgroup:w,search:w,address:w,figure:w,figcaption:w,blockquote:w,p:w,pre:w,hr:cr,br:cr,wbr:cr,h1:w,h2:w,h3:w,h4:w,h5:w,h6:w,span:w,strong:w,em:w,b:w,i:w,u:w,s:w,small:w,mark:w,abbr:w,cite:w,q:w,code:w,kbd:w,samp:w,var:w,sub:w,sup:w,dfn:w,bdi:w,bdo:w,ruby:w,rt:w,rp:w,time:{attributes:{datetime:\"text\"}},data:{attributes:{value:\"text\"}},del:{attributes:{datetime:\"text\"}},ins:{attributes:{datetime:\"text\"}},a:w,ul:w,menu:w,dl:w,dt:w,dd:w,ol:{attributes:{start:\"number\",reversed:\"boolean\",type:{oneOf:[\"1\",\"a\",\"A\",\"i\",\"I\"]}}},li:{attributes:{value:\"number\"}},table:w,caption:w,thead:w,tbody:w,tfoot:w,tr:w,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:w,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:w,output:w,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\"]}}}},Qs=[\"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\"],ei={id:\"text\",class:\"text\",style:\"style\",lang:\"text\",role:\"text\",tabindex:{oneOf:[\"-1\",\"0\"]},transform:\"geometry\",...Object.fromEntries(Qs.map(t=>[t,\"css\"]))},Je={x:\"geometry\",y:\"geometry\",width:\"geometry\",height:\"geometry\"},Nn={viewBox:\"geometry\",preserveAspectRatio:\"geometry\"},Oo={gradientUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},gradientTransform:\"geometry\",spreadMethod:{oneOf:[\"pad\",\"reflect\",\"repeat\"]},href:\"fragment\"},Tn={svg:{attributes:{...Je,...Nn}},g:w,defs:w,symbol:{attributes:{...Je,...Nn,refX:\"geometry\",refY:\"geometry\"}},use:{attributes:{...Je,href:\"fragment\"}},title:w,desc:w,path:{attributes:{d:\"geometry\",pathLength:\"number\"}},rect:{attributes:{...Je,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\",...Oo}},radialGradient:{attributes:{cx:\"geometry\",cy:\"geometry\",r:\"geometry\",fx:\"geometry\",fy:\"geometry\",fr:\"geometry\",...Oo}},stop:{attributes:{offset:\"geometry\"}},clipPath:{attributes:{clipPathUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},mask:{attributes:{...Je,maskUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},maskContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},pattern:{attributes:{...Je,...Nn,patternUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternTransform:\"geometry\",href:\"fragment\"}},marker:{attributes:{...Nn,markerWidth:\"geometry\",markerHeight:\"geometry\",refX:\"geometry\",refY:\"geometry\",orient:\"geometry\",markerUnits:{oneOf:[\"strokeWidth\",\"userSpaceOnUse\"]}}}};var vo=[\"alert\",\"alertdialog\",\"dialog\",\"banner\",\"main\",\"navigation\",\"contentinfo\",\"complementary\",\"search\",\"form\",\"region\",\"application\",\"status\",\"log\",\"marquee\",\"timer\"],St={nav:\"div\",header:\"div\",footer:\"div\",aside:\"div\",search:\"div\",output:\"span\"},xn={section:[\"aria-label\",\"aria-labelledby\",\"title\"]};function ti(t){return/^aria-[a-z]+$/.test(t)}function ni(t){return/^data-[a-z0-9][a-z0-9_.-]*$/.test(t)}var Ro=[\"display\",\"position\",\"top\",\"right\",\"bottom\",\"left\",\"inset\",\"inset-block\",\"inset-inline\",\"inset-block-start\",\"inset-block-end\",\"inset-inline-start\",\"inset-inline-end\",\"width\",\"height\",\"min-width\",\"min-height\",\"max-width\",\"max-height\",\"inline-size\",\"block-size\",\"min-inline-size\",\"min-block-size\",\"max-inline-size\",\"max-block-size\",\"margin\",\"margin-top\",\"margin-right\",\"margin-bottom\",\"margin-left\",\"margin-block\",\"margin-inline\",\"margin-block-start\",\"margin-block-end\",\"margin-inline-start\",\"margin-inline-end\",\"padding\",\"padding-top\",\"padding-right\",\"padding-bottom\",\"padding-left\",\"padding-block\",\"padding-inline\",\"padding-block-start\",\"padding-block-end\",\"padding-inline-start\",\"padding-inline-end\",\"box-sizing\",\"overflow\",\"overflow-x\",\"overflow-y\",\"overflow-wrap\",\"float\",\"clear\",\"z-index\",\"aspect-ratio\",\"object-fit\",\"object-position\",\"vertical-align\",\"isolation\",\"contain\",\"container\",\"container-type\",\"container-name\",\"content-visibility\",\"flex\",\"flex-direction\",\"flex-wrap\",\"flex-flow\",\"flex-grow\",\"flex-shrink\",\"flex-basis\",\"order\",\"grid\",\"grid-template\",\"grid-template-columns\",\"grid-template-rows\",\"grid-template-areas\",\"grid-auto-columns\",\"grid-auto-rows\",\"grid-auto-flow\",\"grid-area\",\"grid-column\",\"grid-row\",\"grid-column-start\",\"grid-column-end\",\"grid-row-start\",\"grid-row-end\",\"gap\",\"row-gap\",\"column-gap\",\"align-items\",\"align-content\",\"align-self\",\"justify-items\",\"justify-content\",\"justify-self\",\"place-items\",\"place-content\",\"place-self\",\"columns\",\"column-count\",\"column-width\",\"column-rule\",\"column-rule-color\",\"column-rule-style\",\"column-rule-width\",\"column-span\",\"column-fill\",\"color\",\"background\",\"background-color\",\"background-image\",\"background-position\",\"background-position-x\",\"background-position-y\",\"background-size\",\"background-repeat\",\"background-origin\",\"background-clip\",\"background-attachment\",\"background-blend-mode\",\"border\",\"border-top\",\"border-right\",\"border-bottom\",\"border-left\",\"border-block\",\"border-inline\",\"border-block-start\",\"border-block-end\",\"border-inline-start\",\"border-inline-end\",\"border-width\",\"border-style\",\"border-color\",\"border-top-width\",\"border-right-width\",\"border-bottom-width\",\"border-left-width\",\"border-top-style\",\"border-right-style\",\"border-bottom-style\",\"border-left-style\",\"border-top-color\",\"border-right-color\",\"border-bottom-color\",\"border-left-color\",\"border-radius\",\"border-top-left-radius\",\"border-top-right-radius\",\"border-bottom-right-radius\",\"border-bottom-left-radius\",\"border-start-start-radius\",\"border-start-end-radius\",\"border-end-start-radius\",\"border-end-end-radius\",\"border-collapse\",\"border-spacing\",\"outline\",\"outline-width\",\"outline-style\",\"outline-color\",\"outline-offset\",\"box-shadow\",\"opacity\",\"visibility\",\"mix-blend-mode\",\"filter\",\"backdrop-filter\",\"clip-path\",\"accent-color\",\"caret-color\",\"color-scheme\",\"appearance\",\"-webkit-appearance\",\"font\",\"font-family\",\"font-size\",\"font-weight\",\"font-style\",\"font-stretch\",\"font-variant\",\"font-variant-numeric\",\"font-variant-caps\",\"font-variant-ligatures\",\"font-feature-settings\",\"font-variation-settings\",\"font-kerning\",\"font-optical-sizing\",\"font-size-adjust\",\"font-synthesis\",\"line-height\",\"letter-spacing\",\"word-spacing\",\"text-align\",\"text-align-last\",\"text-indent\",\"text-transform\",\"text-decoration\",\"text-decoration-line\",\"text-decoration-color\",\"text-decoration-style\",\"text-decoration-thickness\",\"text-underline-offset\",\"text-underline-position\",\"text-shadow\",\"text-overflow\",\"text-wrap\",\"text-wrap-mode\",\"text-wrap-style\",\"white-space\",\"white-space-collapse\",\"word-break\",\"line-break\",\"hyphens\",\"tab-size\",\"direction\",\"unicode-bidi\",\"writing-mode\",\"text-orientation\",\"text-rendering\",\"-webkit-font-smoothing\",\"-webkit-line-clamp\",\"-webkit-box-orient\",\"line-clamp\",\"-webkit-text-fill-color\",\"-webkit-background-clip\",\"list-style\",\"list-style-type\",\"list-style-position\",\"content\",\"quotes\",\"counter-reset\",\"counter-increment\",\"counter-set\",\"table-layout\",\"caption-side\",\"empty-cells\",\"transform\",\"transform-origin\",\"transform-box\",\"transform-style\",\"translate\",\"rotate\",\"scale\",\"perspective\",\"perspective-origin\",\"backface-visibility\",\"transition\",\"transition-property\",\"transition-duration\",\"transition-timing-function\",\"transition-delay\",\"transition-behavior\",\"animation\",\"animation-name\",\"animation-duration\",\"animation-timing-function\",\"animation-delay\",\"animation-iteration-count\",\"animation-direction\",\"animation-fill-mode\",\"animation-play-state\",\"animation-composition\",\"will-change\",\"cursor\",\"pointer-events\",\"user-select\",\"-webkit-user-select\",\"touch-action\",\"resize\",\"scroll-behavior\",\"overscroll-behavior\",\"overscroll-behavior-x\",\"overscroll-behavior-y\",\"scroll-snap-type\",\"scroll-snap-align\",\"scroll-snap-stop\",\"scroll-margin\",\"scroll-padding\",\"scrollbar-width\",\"scrollbar-color\",\"scrollbar-gutter\",\"fill\",\"fill-opacity\",\"fill-rule\",\"stroke\",\"stroke-width\",\"stroke-linecap\",\"stroke-linejoin\",\"stroke-dasharray\",\"stroke-dashoffset\",\"stroke-opacity\",\"stroke-miterlimit\",\"stop-color\",\"stop-opacity\",\"clip-rule\",\"marker\",\"marker-start\",\"marker-mid\",\"marker-end\",\"paint-order\",\"vector-effect\",\"shape-rendering\",\"text-anchor\",\"dominant-baseline\",\"alignment-baseline\",\"r\",\"cx\",\"cy\",\"rx\",\"ry\",\"x\",\"y\",\"d\",\"mask\"],Ao=[\"var\",\"env\",\"calc\",\"min\",\"max\",\"clamp\",\"round\",\"mod\",\"rem\",\"abs\",\"sign\",\"sin\",\"cos\",\"tan\",\"asin\",\"acos\",\"atan\",\"atan2\",\"pow\",\"sqrt\",\"hypot\",\"log\",\"exp\",\"rgb\",\"rgba\",\"hsl\",\"hsla\",\"hwb\",\"lab\",\"lch\",\"oklab\",\"oklch\",\"color\",\"color-mix\",\"light-dark\",\"linear-gradient\",\"radial-gradient\",\"conic-gradient\",\"repeating-linear-gradient\",\"repeating-radial-gradient\",\"repeating-conic-gradient\",\"translate\",\"translatex\",\"translatey\",\"translatez\",\"translate3d\",\"rotate\",\"rotatex\",\"rotatey\",\"rotatez\",\"rotate3d\",\"scale\",\"scalex\",\"scaley\",\"scalez\",\"scale3d\",\"skew\",\"skewx\",\"skewy\",\"matrix\",\"matrix3d\",\"perspective\",\"cubic-bezier\",\"steps\",\"linear\",\"repeat\",\"minmax\",\"fit-content\",\"blur\",\"brightness\",\"contrast\",\"drop-shadow\",\"grayscale\",\"hue-rotate\",\"invert\",\"saturate\",\"sepia\",\"opacity\",\"circle\",\"ellipse\",\"inset\",\"polygon\",\"path\",\"xywh\",\"rect\",\"counter\",\"counters\"],Co=[\"fill\",\"stroke\",\"clip-path\",\"mask\",\"marker\",\"marker-start\",\"marker-mid\",\"marker-end\"],ko=[\"media\",\"supports\",\"container\",\"keyframes\"],_o={position:[\"static\",\"relative\",\"absolute\"],appearance:[\"auto\",\"none\",\"menulist-button\",\"textfield\"],\"-webkit-appearance\":[\"auto\",\"none\",\"menulist-button\",\"textfield\"]},Po=[\"host\",\"host-context\",\"slotted\",\"part\",\"backdrop\",\"picker\",\"view-transition\",\"view-transition-group\",\"view-transition-image-pair\",\"view-transition-old\",\"view-transition-new\"],ur=64e3,dr=4e3,Io=1e5,Do=512e3,fr=1e4,Mo=\"http://www.w3.org/1999/xhtml\",Lo=\"http://www.w3.org/2000/svg\",ri=new Map(Object.keys(Tn).map(t=>[t.toLowerCase(),t]));function wn(t){return ri.get(t.toLowerCase())}function Sn(t,e,n){let r=n.toLowerCase(),o=t===\"html\"?[Qe[e]?.attributes,Js]:[Tn[e]?.attributes,ei],s=t===\"svg\"&&r===\"xlink:href\"?\"href\":r;for(let i of o)if(i){for(let[l,u]of Object.entries(i))if(l.toLowerCase()===s)return{name:l,kind:u}}if(ti(r)||ni(r))return{name:r,kind:\"text\"}}var Ho=\"~\",On=t=>typeof t==\"object\"&&t!==null&&!Array.isArray(t),ae=(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=>ae(n,e+1)):Object.fromEntries(Object.entries(t).map(([n,r])=>[n,ae(r,e+1)]))};function Vo(){let t=new Map,e=new Map,n=new Map([[Ho,{children:[],listeners:new Map}]]),r=0,o=d=>{let p=e.get(d);return p===void 0&&(p=r+=1,e.set(d,p),t.set(p,{listener:d,count:0})),t.get(p).count+=1,p},s=d=>{let p=t.get(d);p&&(p.count-=1,!(p.count>0)&&(t.delete(d),e.delete(p.listener)))},i=d=>{let p=n.get(d);if(p){n.delete(d);for(let E of p.listeners.values())s(E);for(let E of p.children)i(E)}},l=(d,p,E=0)=>{if(!On(d)||E>64)return ae(d);let f=typeof d.id==\"string\"?d.id:void 0,b=p&&f!==void 0&&f!==Ho;b&&i(f);let N={children:[],listeners:new Map};b&&n.set(f,N);let O={};for(let[y,c]of Object.entries(d))y===\"children\"&&Array.isArray(c)?O[y]=c.map(h=>{let g=l(h,b,E+1);return b&&On(h)&&typeof h.id==\"string\"&&N.children.push(h.id),g}):y===\"eventListeners\"&&On(c)?O[y]=Object.fromEntries(Object.entries(c).map(([h,g])=>{if(typeof g!=\"function\"||!b)return[h,void 0];let a=o(g);return N.listeners.set(h,a),[h,{listener:a}]})):O[y]=ae(c,E+1);return O},u=d=>{if(!Array.isArray(d))return ae(d);let[p,E]=d,f=typeof E==\"string\"?n.get(E):void 0;if(p===0){let b=l(d[2],f!==void 0),N=On(d[2])?d[2].id:void 0;if(f&&typeof N==\"string\"&&n.has(N)){let O=Number(d[3]);f.children.splice(Number.isInteger(O)&&O>=0&&O<=f.children.length?O:f.children.length,0,N)}return[p,ae(E),b,ae(d[3])]}if(p===1){let b=Number(d[2]);return f&&Number.isInteger(b)&&b>=0&&b<f.children.length&&i(f.children.splice(b,1)[0]),ae(d)}if(p===3&&d[4]===3){let b=String(d[2]),N=d[3],O=f&&typeof N==\"function\"?o(N):void 0,y=f?.listeners.get(b);return y!==void 0&&s(y),O===void 0?f?.listeners.delete(b):f.listeners.set(b,O),[p,ae(E),b,O===void 0?void 0:{listener:O},3]}return ae(d)};return{encode:d=>d.map(u),listener:d=>t.get(d)?.listener,get listening(){return t.size},get nodes(){return n.size-1}}}var mr=\"graview-view-root\",oi=t=>t.replace(/&/g,\"&\").replace(/</g,\"<\").replace(/>/g,\">\").replace(/\"/g,\""\").replace(/'/g,\"'\"),si=t=>Object.freeze({html:t,toString:()=>t}),Uo=t=>typeof t==\"object\"&&t!==null&&typeof t.html==\"string\"&&Object.isFrozen(t),jo=t=>t==null||t===!1?\"\":Array.isArray(t)?t.map(jo).join(\"\"):Uo(t)?t.html:oi(String(t));function zo(t){customElements.get(mr)||customElements.define(mr,wt);let e=Event,n=Vo(),r=new Set,o=new Set,s,i=[],l=document.createElement(mr),u=a=>{let m=T=>{for(let x of Array.from(T.childNodes)){if(x.nodeType!==1)continue;if(re(x)===a)return x;let v=m(x);if(v)return v}};return m(l)},d=a=>{let m=u(a.target);if(!m)return;let T=new e(a.event,{bubbles:!0});for(let x of[\"value\",\"checked\",\"key\",\"pressed\"])a[x]!==void 0&&Object.defineProperty(T,x,{value:a[x],enumerable:!0});m.dispatchEvent(T);for(let x of o){if(x.type!==a.event)continue;let v;try{v=new Set(Array.from(l.querySelectorAll(x.selector)))}catch{continue}for(let R=m;R&&R!==l;R=R.parentNode)if(v.has(R)){x.listener(Object.freeze({type:a.event,target:m,element:R,...a.value!==void 0?{value:a.value}:{},...a.checked!==void 0?{checked:a.checked}:{},...a.key!==void 0?{key:a.key}:{},...a.pressed!==void 0?{pressed:a.pressed}:{}}));break}}},p=a=>{if(a.type===\"dom-event\"&&typeof a.target==\"string\")return d(a);if(a.type!==\"props\")return;s=a.props;let m=t.now();for(let v of r)try{v(a.props)}catch(R){t.threw(R)}let T=t.now()-m,x=a.push;typeof x==\"number\"&&t.microtask(()=>t.microtask(()=>t.send({type:\"pushed\",push:x,ms:T})))},E;l.connect({mutate(a){E||(E=[],t.microtask(()=>{let m=E??[];E=void 0,t.send({type:\"render\",records:n.encode(m)})})),E.push(...a)},call:()=>{}});let f=a=>a.nodeType===1?a.getAttribute(\"data-key\")??a.getAttribute(\"id\"):null,b=(a,m)=>a.nodeType===m.nodeType&&(a.nodeType!==1||a.localName===m.localName&&a.namespaceURI===m.namespaceURI&&f(a)===f(m));function N(a,m){let T=Array.from(m.childNodes),x=0;for(let v of T){let R=a.childNodes[x]??null;if(R&&b(R,v)){O(R,v),x+=1;continue}if(f(v)!==null){let pe=Array.from(a.childNodes).slice(x+1).find(it=>b(it,v));if(pe){a.insertBefore(pe,R),O(pe,v),x+=1;continue}}a.insertBefore(v,R),x+=1}for(;a.childNodes.length>x;)a.removeChild(a.lastChild)}function O(a,m){if(a.nodeType!==1){a.data!==m.data&&(a.data=m.data);return}let T=a,x=m;for(let v of T.getAttributeNames())x.hasAttribute(v)||T.removeAttribute(v);for(let v of x.getAttributeNames()){let R=x.getAttribute(v);T.getAttribute(v)!==R&&T.setAttribute(v,R)}N(T,x)}function y(a,m,T){for(let x of Array.from(a.childNodes)){if(x.nodeType!==1)continue;let v=x,R=v.localName,st=m||R.toLowerCase()===\"svg\",pe=st?wn(R):Object.prototype.hasOwnProperty.call(Qe,R.toLowerCase())?R.toLowerCase():void 0;if(!pe){T.add(`<${R}>`);continue}for(let it of v.getAttributeNames())(!Sn(st?\"svg\":\"html\",pe,it)||!st&&xn[pe]?.includes(it.toLowerCase()))&&T.add(`${pe} ${it}`);y(v,st,T)}}function c(a){let m=document.createElement(\"div\"),T=Array.isArray(a)?a:[a];for(let v of T)if(v!=null)if(typeof v==\"string\"||Uo(v)){let R=document.createElement(\"div\");R.innerHTML=typeof v==\"string\"?v:v.html,m.append(...Array.from(R.childNodes))}else m.append(v);let x=new Set;y(m,!1,x),i=[...x],i.length>0&&t.warn(`The host will not draw: ${i.join(\", \")}`),N(l,m)}let h;return{view:Object.freeze({get props(){return s},onProps(a){return r.add(a),s&&a(s),()=>void r.delete(a)},render:c,style(a){typeof a!=\"string\"||a===h||(h=a,t.send({type:\"style\",css:a}))},on(a,m,T){let x={type:a,selector:m,listener:T};return o.add(x),()=>void o.delete(x)},act:(a,m={})=>t.act(a,m),navigate(a){typeof a==\"string\"?t.navigate(a):a&&typeof a.place==\"string\"&&t.send({type:\"navigate\",place:a.place})},html(a,...m){return si(a.reduce((T,x,v)=>T+x+(v<m.length?jo(m[v]):\"\"),\"\"))},get refused(){return i},get hardening(){return t.hardening()}}),hear:p}}var ii=\"http://www.w3.org/1999/xhtml\",et=class{constructor(e){this.ownerDocument=e}parentNode=null;childNodes=[];get firstChild(){return this.childNodes[0]??null}get parentElement(){return this.parentNode instanceof _e?this.parentNode:null}get textContent(){return this.childNodes.map(e=>e.textContent).join(\"\")}insertBefore(e,n){e.parentNode&&e.parentNode.removeChild(e);let r=n?this.childNodes.indexOf(n):-1;return r<0?this.childNodes.push(e):this.childNodes.splice(r,0,e),e.parentNode=this,e}appendChild(e){return this.insertBefore(e,null)}removeChild(e){let n=this.childNodes.indexOf(e);return n>=0&&this.childNodes.splice(n,1),e.parentNode=null,e}},ke=class extends et{constructor(n,r){super(n);this.data=r}nodeType=3;get textContent(){return this.data}},pr=class extends et{nodeType=8;get textContent(){return\"\"}},_e=class extends et{constructor(n,r,o){super(n);this.namespaceURI=r;this.localName=o}nodeType=1;attributes=new Map;value=\"\";checked=!1;selected=!1;setAttribute(n,r){this.attributes.set(n,String(r))}removeAttribute(n){this.attributes.delete(n)}getAttribute(n){return this.attributes.get(n)??null}hasAttribute(n){return this.attributes.has(n)}closest(n){for(let r=this;r;r=r.parentElement)if(r.localName===n)return r;return null}},hr=class extends et{nodeType=9;constructor(){super(null)}createElementNS(e,n){return new _e(this,e,n)}createElement(e){return new _e(this,ii,e)}createTextNode(e){return new ke(this,e)}createComment(e){return new pr(this)}};function $o(){let t=new hr,e=t.createElement(\"div\");return e.setAttribute(\"data-graview-view-root\",\"\"),t.appendChild(e),{document:t,root:e}}var gr={h1:1,h2:2,h3:3,h4:4,h5:5,h6:6},Fo=new Set([\"a\",\"abbr\",\"b\",\"bdi\",\"bdo\",\"br\",\"cite\",\"code\",\"data\",\"del\",\"dfn\",\"em\",\"i\",\"ins\",\"kbd\",\"q\",\"s\",\"samp\",\"small\",\"span\",\"strong\",\"sub\",\"sup\",\"time\",\"u\",\"var\",\"wbr\",\"label\"]),Bo=new Set([\"style\",\"template\",\"datalist\",\"option\"]),L=t=>t.replace(/\\s+/g,\" \").trim(),K=t=>t instanceof _e,Ot=t=>t.hasAttribute(\"hidden\")||t.getAttribute(\"aria-hidden\")===\"true\";function $(t){return t instanceof ke?t.data:!K(t)||Ot(t)||Bo.has(t.localName)?\"\":t.localName===\"br\"?\" \":t.localName===\"img\"?t.getAttribute(\"alt\")??\"\":t.childNodes.map($).join(t.localName===\"td\"||t.localName===\"th\"?\" \":\"\")}function*Pe(t){for(let e of t.childNodes)K(e)&&(yield e,yield*Pe(e))}function Go(t,e){let n=[],r=new Set,o=new Set,s=new Map;for(let f of[...e.props.node?[e.props.node]:[],...e.props.nodes??[]])s.set(f.id,f);let i=new Set(e.places);for(let f of Pe(t)){let b=f.getAttribute(\"data-act\");b!==null&&r.add(b);let N=f.getAttribute(\"data-record\");N!==null&&(o.add(N),s.has(N)||n.push({at:`drawing <${f.localName} data-record=\"${N}\">`,says:`It names \"${N}\", which this seat was not shown: the host will not follow it.`}));let O=f.getAttribute(\"data-place\");O!==null&&!i.has(O)&&n.push({at:`drawing <${f.localName} data-place=\"${O}\">`,says:`It names the place \"${O}\", which this app does not have.`})}let l=f=>{let b=f.getAttribute(\"data-record\");if(b!==null)return b;let N=f.getAttribute(\"data-key\")??f.getAttribute(\"id\");if(N!==null&&s.has(N))return N;let O=new Set;for(let y of Pe(f)){let c=y.getAttribute(\"data-record\");c!==null&&O.add(c)}return O.size===1?[...O][0]:void 0},u=(f,b)=>{let N=s.get(b),O=N?.kind??(b.includes(\":\")?b.slice(0,b.indexOf(\":\")):\"\"),y=[...Pe(f)],c=y.find(a=>a.localName in gr)??y.find(a=>a.localName===\"a\"&&a.getAttribute(\"data-record\")===b)??y.find(a=>a.localName===\"strong\"||a.localName===\"b\"),h=L(c?$(c):\"\")||N?.label||b,g=p(f,c);return!c&&g[0]?.t===\"text\"&&L(g[0].text)===h&&g.shift(),{id:b,kind:O,title:h,parts:g}},d=f=>{let b=[...Pe(f)].filter(c=>c.localName===\"tr\"&&!Ot(c)),N=b.find(c=>c.parentElement?.localName===\"thead\"||c.childNodes.every(h=>!K(h)||h.localName===\"th\")),O=N?N.childNodes.filter(K).map(c=>L($(c))):[];return{t:\"list\",as:\"row\",columns:1,groups:[{items:b.filter(c=>c!==N).map(c=>{let h=c.childNodes.filter(K),g=l(c),a=g?s.get(g):void 0;return{id:g??\"\",kind:a?.kind??\"\",title:L($(h[0]??c)),parts:h.slice(1).map((m,T)=>({t:\"field\",label:O[T+1]??\"\",text:L($(m))}))}})}]}};function p(f,b){let N=[],O=\"\",y=()=>{let h=L(O);O=\"\",h&&N.push({t:\"text\",text:h})},c=f.childNodes;for(let h=0;h<c.length;h+=1){let g=c[h];if(g===b)continue;if(g instanceof ke){O+=g.data;continue}if(!K(g)||Ot(g)||Bo.has(g.localName))continue;if(b&&[...Pe(g)].includes(b)){y(),N.push(...p(g,b));continue}let a=[];for(let m=h;m<c.length;m+=1){let T=c[m];if(T instanceof ke&&L(T.data)===\"\")continue;if(!K(T)||Ot(T)||Fo.has(T.localName)||T.localName in gr)break;let x=l(T);if(!x)break;a.push({element:T,id:x}),h=m}if(a.length>0){y();let m=a.every(T=>T.element.localName===\"li\"||T.element.localName===\"tr\");N.push({t:\"list\",as:m?\"row\":\"card\",columns:1,groups:[{items:a.map(T=>u(T.element,T.id))}]});continue}N.push(...E(g,m=>O+=m,y))}return y(),N}function E(f,b,N){let O=f.localName;if(Fo.has(O)&&O!==\"label\")return b($(f)),[];if(O===\"mark\"){N();let c=L($(f));return c?[{t:\"badge\",text:c}]:[]}N();let y=gr[O]??(f.getAttribute(\"role\")===\"heading\"?Number(f.getAttribute(\"aria-level\")??2):void 0);if(y!==void 0){let c=L($(f));return c?[{t:\"heading\",level:y,text:c}]:[]}switch(O){case\"ul\":case\"ol\":case\"menu\":return[{t:\"list\",as:\"row\",columns:1,groups:[{items:f.childNodes.filter(h=>K(h)&&h.localName===\"li\"&&!Ot(h)).map(h=>{let g=l(h);if(g)return u(h,g);let a=p(h),m=a[0],T=m&&(m.t===\"text\"||m.t===\"heading\")?m.text:\"\";return{id:\"\",kind:\"\",title:T,parts:T?a.slice(1):a}})}]}];case\"table\":return[d(f)];case\"dl\":{let c=[],h=\"\";for(let g of f.childNodes.filter(K))if(g.localName===\"dt\")h=L($(g));else if(g.localName===\"dd\")c.push({t:\"field\",label:h,text:L($(g))});else if(g.localName===\"div\")for(let a of g.childNodes.filter(K))a.localName===\"dt\"?h=L($(a)):a.localName===\"dd\"&&c.push({t:\"field\",label:h,text:L($(a))});return c}case\"figure\":{let c=f.childNodes.find(a=>K(a)&&a.localName===\"figcaption\"),h=L(f.childNodes.filter(a=>a!==c).map($).join(\" \")),g=c?L($(c)):\"\";return h?[{t:\"figure\",text:h,...g?{label:g}:{}}]:g?[{t:\"text\",text:g}]:[]}case\"meter\":case\"progress\":{let c=Number(f.getAttribute(\"value\")??0),h=Number(f.getAttribute(\"max\")??1)||1;return[{t:\"progress\",label:f.getAttribute(\"aria-label\")??f.getAttribute(\"title\")??\"\",text:`${Math.round(c/h*100)}%`}]}case\"svg\":{let c=f.childNodes.find(a=>K(a)&&a.localName===\"title\"),h=L(f.getAttribute(\"aria-label\")??(c?$(c):\"\"));if(h)return[{t:\"text\",text:h,tone:\"picture\"}];let g=[...Pe(f)].filter(a=>a.localName===\"text\").map(a=>L($(a))).filter(Boolean);return g.length>0?[{t:\"text\",text:g.join(\" \\xB7 \"),tone:\"picture\"}]:[]}case\"img\":{let c=L(f.getAttribute(\"alt\")??\"\");return c?[{t:\"text\",text:c,tone:\"picture\"}]:[]}case\"button\":{let c=L($(f));return c?[{t:\"text\",text:c,tone:\"button\"}]:[]}case\"input\":case\"textarea\":case\"select\":{let c=L(f.getAttribute(\"aria-label\")??f.getAttribute(\"placeholder\")??f.getAttribute(\"name\")??\"\"),h=O===\"select\"?L($(f.childNodes.find(g=>K(g)&&g.localName===\"option\"&&g.selected)??f)):f.value;return[{t:\"field\",label:c,text:h}]}case\"label\":return p(f);default:return p(f)}}return{parts:p(t),problems:n,acts:[...r],records:[...o]}}var F=t=>t>=48&&t<=57,Yo=t=>F(t)||t>=65&&t<=70||t>=97&&t<=102,xr=t=>t>=65&&t<=90||t>=97&&t<=122,wr=t=>t>=128,vn=t=>xr(t)||wr(t)||t===95,qo=t=>vn(t)||F(t)||t===45,Wo=t=>t===10,fe=t=>t===10||t===9||t===32,ai=t=>t>=0&&t<=8||t===11||t>=14&&t<=31||t===127,oe=-1;function li(t){let e=[];for(let n=0;n<t.length;n+=1){let r=t.codePointAt(n);r>65535&&(n+=1),r===13?(t.charCodeAt(n+1)===10&&(n+=1),r=10):r===12?r=10:(r===0||r>=55296&&r<=57343)&&(r=65533),e.push(r)}return e}function ci(t){let e=li(t),n=0,r=(y=0)=>n+y<e.length?e[n+y]:oe,o=[],s=(y,c)=>y===92&&c!==10&&c!==oe,i=(y,c,h)=>y===45?vn(c)||c===45||s(c,h):vn(y)?!0:s(y,c),l=(y,c,h)=>y===43||y===45?F(c)||c===46&&F(h):F(y===46?c:y),u=()=>{let y=r();if(n+=1,y===oe)return 65533;if(Yo(y)){let c=String.fromCodePoint(y);for(;c.length<6&&Yo(r());)c+=String.fromCodePoint(r()),n+=1;fe(r())&&(n+=1);let h=parseInt(c,16);return h===0||h>=55296&&h<=57343||h>1114111?65533:h}return y},d=()=>{let y=\"\";for(;;){let c=r();if(qo(c))y+=String.fromCodePoint(c),n+=1;else if(s(c,r(1)))n+=1,y+=String.fromCodePoint(u());else return y}},p=()=>{let y=\"\";for((r()===43||r()===45)&&(y+=String.fromCodePoint(e[n++]));F(r());)y+=String.fromCodePoint(e[n++]);if(r()===46&&F(r(1)))for(y+=String.fromCodePoint(e[n++],e[n++]);F(r());)y+=String.fromCodePoint(e[n++]);if((r()===69||r()===101)&&(F(r(1))||(r(1)===43||r(1)===45)&&F(r(2))))for(y+=String.fromCodePoint(e[n++]),F(r())||(y+=String.fromCodePoint(e[n++]));F(r());)y+=String.fromCodePoint(e[n++]);return y},E=()=>{let y=p();return i(r(),r(1),r(2))?{type:\"dimension\",repr:y,unit:d()}:r()===37?(n+=1,{type:\"percentage\",repr:y}):{type:\"number\",repr:y}},f=()=>{for(;;){let y=r();if(n+=1,y===41||y===oe)return;s(y,r())&&u()}},b=()=>{let y=\"\";for(;fe(r());)n+=1;for(;;){let c=r();if(n+=1,c===41)return{type:\"url\",value:y};if(c===oe)return{type:\"url\",value:y};if(fe(c)){for(;fe(r());)n+=1;return r()===41||r()===oe?(r()===41&&(n+=1),{type:\"url\",value:y}):(f(),{type:\"bad-url\"})}if(c===34||c===39||c===40||ai(c))return f(),{type:\"bad-url\"};if(c===92){if(s(c,r()))y+=String.fromCodePoint(u());else return f(),{type:\"bad-url\"};continue}y+=String.fromCodePoint(c)}},N=()=>{let y=d();if(y.toLowerCase()===\"url\"&&r()===40){for(n+=1;fe(r())&&fe(r(1));)n+=1;let c=fe(r())?r(1):r();return c===34||c===39?{type:\"function\",value:y}:b()}return r()===40?(n+=1,{type:\"function\",value:y}):{type:\"ident\",value:y}},O=y=>{let c=\"\";for(;;){let h=r();if(n+=1,h===y||h===oe)return{type:\"string\",value:c};if(Wo(h))return n-=1,{type:\"bad-string\"};if(h===92){if(r()===oe)continue;if(Wo(r())){n+=1;continue}c+=String.fromCodePoint(u());continue}c+=String.fromCodePoint(h)}};for(;;){for(;r()===47&&r(1)===42;){for(n+=2;r()!==oe&&!(r()===42&&r(1)===47);)n+=1;r()!==oe&&(n+=2)}let y=r();if(y===oe)return o;if(fe(y)){for(;fe(r());)n+=1;o.push({type:\"whitespace\"});continue}switch(n+=1,y){case 34:case 39:o.push(O(y));continue;case 35:if(qo(r())||s(r(),r(1))){let c=i(r(),r(1),r(2));o.push({type:\"hash\",value:d(),id:c})}else o.push({type:\"delim\",value:\"#\"});continue;case 40:o.push({type:\"(\"});continue;case 41:o.push({type:\")\"});continue;case 43:case 46:l(y,r(),r(1))?(n-=1,o.push(E())):o.push({type:\"delim\",value:String.fromCodePoint(y)});continue;case 44:o.push({type:\",\"});continue;case 45:l(y,r(),r(1))?(n-=1,o.push(E())):r()===45&&r(1)===62?(n+=2,o.push({type:\"CDC\"})):i(y,r(),r(1))?(n-=1,o.push(N())):o.push({type:\"delim\",value:\"-\"});continue;case 58:o.push({type:\":\"});continue;case 59:o.push({type:\";\"});continue;case 60:r()===33&&r(1)===45&&r(2)===45?(n+=3,o.push({type:\"CDO\"})):o.push({type:\"delim\",value:\"<\"});continue;case 64:i(r(),r(1),r(2))?o.push({type:\"at-keyword\",value:d()}):o.push({type:\"delim\",value:\"@\"});continue;case 91:o.push({type:\"[\"});continue;case 92:s(y,r())?(n-=1,o.push(N())):o.push({type:\"delim\",value:\"\\\\\"});continue;case 93:o.push({type:\"]\"});continue;case 123:o.push({type:\"{\"});continue;case 125:o.push({type:\"}\"});continue;default:F(y)?(n-=1,o.push(E())):vn(y)?(n-=1,o.push(N())):o.push({type:\"delim\",value:String.fromCodePoint(y)})}}}var Qo={\"{\":\"}\",\"[\":\"]\",\"(\":\")\"},es=32,br=class{constructor(e){this.tokens=e}i=0;peek(){return this.tokens[this.i]}next(){return this.tokens[this.i++]}};function ts(t,e){let n=t.next();return n.type===\"{\"||n.type===\"[\"||n.type===\"(\"?{type:\"block\",open:n.type,value:Xo(t,Qo[n.type],e+1)}:n.type===\"function\"?{type:\"func\",name:n.value,value:Xo(t,\")\",e+1)}:n}function Xo(t,e,n){let r=[];for(;;){let o=t.peek();if(!o)return r;if(o.type===e)return t.next(),r;if(n>es){t.next(),r.push({type:\"bad-string\"});continue}r.push(ts(t,n))}}function tt(t,e){let n=[],r=0;for(;r<t.length;){let o=t[r];if(o.type===\"whitespace\"||e&&(o.type===\"CDO\"||o.type===\"CDC\")){r+=1;continue}if(o.type===\"at-keyword\"){let l=[];r+=1;let u;for(;r<t.length;){let d=t[r];if(r+=1,d.type===\";\")break;if(d.type===\"block\"&&d.open===\"{\"){u=d.value;break}l.push(d)}n.push({type:\"at-rule\",name:o.value,prelude:l,...u?{block:u}:{}});continue}let s=[],i;for(;r<t.length;){let l=t[r];if(r+=1,l.type===\"block\"&&l.open===\"{\"){i=l.value;break}s.push(l)}i&&n.push({type:\"qualified\",prelude:s,block:i})}return n}function Sr(t){let e=[],n=0;for(;n<t.length;){let r=t[n];if(r.type===\"whitespace\"||r.type===\";\"){n+=1;continue}if(r.type===\"at-keyword\"){let s=(()=>{for(let i=n+1;i<t.length;i+=1){let l=t[i];if(l.type===\";\"||l.type===\"block\"&&l.open===\"{\")return i+1}return t.length})();e.push(...tt(t.slice(n,s),!1)),n=s;continue}if(r.type===\"ident\"){let s=n+1;for(;t[s]?.type===\"whitespace\";)s+=1;if(t[s]?.type===\":\"){let i=s+1;for(;i<t.length&&t[i].type!==\";\";)i+=1;let l=ns(r.value,t.slice(s+1,i));if(l.value.some(u=>u.type===\"block\"&&u.open===\"{\")){let u=t.findIndex((d,p)=>p>n&&d.type===\"block\"&&d.open===\"{\");e.push(...tt(t.slice(n,u+1),!1)),n=u+1;continue}e.push(l),n=i+1;continue}}let o=n;for(;o<t.length&&!(t[o].type===\"block\"&&t[o].open===\"{\")&&t[o].type!==\";\";)o+=1;o<t.length&&t[o].type===\"block\"&&e.push(...tt(t.slice(n,o+1),!1)),n=o+1}return e}function ns(t,e){let n=[...e];for(;n[0]?.type===\"whitespace\";)n.shift();for(;n.at(-1)?.type===\"whitespace\";)n.pop();let r=!1,s=n.length-1;if(n[s]?.type===\"ident\"&&n[s].value.toLowerCase()===\"important\"){for(s-=1;n[s]?.type===\"whitespace\";)s-=1;let i=n[s];if(i?.type===\"delim\"&&i.value===\"!\")for(r=!0,n.length=s;n.at(-1)?.type===\"whitespace\";)n.pop()}return{type:\"declaration\",name:t,value:n,important:r}}function Or(t){let e=new br(ci(t)),n=[];for(;e.peek();)n.push(ts(e,0));return n}function Rn(t){let e=\"\",n=[...t].map(r=>r.codePointAt(0));return n.forEach((r,o)=>{r===0?e+=\"\\uFFFD\":r>=1&&r<=31||r===127||o===0&&F(r)||o===1&&F(r)&&n[0]===45?e+=`\\\\${r.toString(16)} `:o===0&&r===45&&n.length===1?e+=\"\\\\-\":wr(r)||r===45||r===95||F(r)||xr(r)?e+=String.fromCodePoint(r):e+=`\\\\${String.fromCodePoint(r)}`}),e}function An(t){let e=\"\";for(let n of t){let r=n.codePointAt(0);wr(r)||r===45||r===95||F(r)||xr(r)?e+=n:r>=1&&r<=31||r===127?e+=`\\\\${r.toString(16)} `:e+=`\\\\${n}`}return e}function Er(t){let e='\"';for(let n of t){let r=n.codePointAt(0);r===0?e+=\"\\uFFFD\":r>=1&&r<=31||r===127||r===60||r===62?e+=`\\\\${r.toString(16)} `:r===34||r===92?e+=`\\\\${n}`:e+=n}return`${e}\"`}function ui(t){let e=An(t);return/^[eE]([0-9]|[+-][0-9])/.test(t)?`\\\\${t.codePointAt(0).toString(16)} ${An(t.slice(1))}`:e}var Ko=t=>{switch(t.type){case\"ident\":case\"url\":case\"bad-url\":case\"number\":case\"percentage\":case\"dimension\":case\"CDC\":case\"hash\":case\"at-keyword\":return t.type;case\"func\":case\"function\":return\"function\";case\"block\":return t.open===\"(\"?\"(\":\"other\";case\"(\":return\"(\";case\"delim\":return`delim${t.value}`;default:return\"other\"}};function di(t,e){let n=[\"ident\",\"function\",\"url\",\"bad-url\",\"delim-\",\"number\",\"percentage\",\"dimension\",\"CDC\"];return t===\"ident\"?[...n,\"(\"].includes(e):t===\"at-keyword\"||t===\"hash\"||t===\"dimension\"||t===\"delim#\"||t===\"delim-\"?n.includes(e):t===\"number\"?[\"ident\",\"function\",\"url\",\"bad-url\",\"number\",\"percentage\",\"dimension\",\"delim%\"].includes(e):t===\"delim@\"?[\"ident\",\"function\",\"url\",\"bad-url\",\"delim-\",\"CDC\"].includes(e):t===\"delim.\"||t===\"delim+\"?[\"number\",\"percentage\",\"dimension\"].includes(e):t===\"delim/\"?e===\"delim*\":!1}function fi(t){switch(t.type){case\"whitespace\":return\" \";case\"ident\":return Rn(t.value);case\"at-keyword\":return`@${Rn(t.value)}`;case\"hash\":return`#${An(t.value)}`;case\"string\":return Er(t.value);case\"url\":return`url(${Er(t.value)})`;case\"delim\":return t.value===\"\\\\\"?`\\\\\n`:t.value;case\"CDO\":return\"<!--\";case\"CDC\":return\"-->\";case\"number\":return t.repr;case\"percentage\":return`${t.repr}%`;case\"dimension\":return`${t.repr}${ui(t.unit)}`;case\"func\":return`${Rn(t.name)}(${nt(t.value)})`;case\"block\":return`${t.open}${nt(t.value)}${Qo[t.open]}`;case\":\":case\";\":case\",\":case\"[\":case\"]\":case\"(\":case\")\":case\"{\":case\"}\":return t.type;default:return\"\"}}function nt(t){let e=\"\",n;for(let r of t)r.type===\"whitespace\"&&n?.type===\"whitespace\"||(n&&di(Ko(n),Ko(r))&&(e+=\"/**/\"),e+=fi(r),n=r);return e}var mi=new Set(Ro),rs=new Set(Ao),Zo=new Set(Co),pi=new Set(ko),hi=new Set(Po),Jo=/^#[A-Za-z_][A-Za-z0-9_.:-]*$/,me=t=>t.replace(/[A-Z]/g,e=>e.toLowerCase()),gi=t=>me(t);function Nr(t,e,n){let r=[];for(let o of e){if(o.type===\"bad-url\"||o.type===\"bad-string\"){n({reason:\"unreadable\",...t?{name:t}:{}});return}if(o.type===\"url\"){if(t&&Zo.has(t)&&Jo.test(o.value)){r.push({type:\"func\",name:\"url\",value:[{type:\"string\",value:o.value}]});continue}n({reason:\"url\",...t?{name:t}:{}});return}if(o.type===\"func\"){let s=me(o.name);if(s===\"url\"||s===\"src\"){let l=o.value.filter(d=>d.type!==\"whitespace\"),u=l[0];if(s===\"url\"&&l.length===1&&u?.type===\"string\"&&t&&Zo.has(t)&&Jo.test(u.value)){r.push({type:\"func\",name:\"url\",value:[{type:\"string\",value:u.value}]});continue}n({reason:\"url\",...t?{name:t}:{}});return}if(!rs.has(s)){n({reason:\"function\",name:s});return}let i=Nr(t,o.value,n);if(!i)return;s===\"var\"?r.push({type:\"whitespace\"},{type:\"func\",name:s,value:i},{type:\"whitespace\"}):r.push({type:\"func\",name:s,value:i});continue}if(o.type===\"block\"){if(o.open===\"{\"||o.open===\"(\"&&r.at(-1)?.type===\"ident\"){n({reason:\"unreadable\",...t?{name:t}:{}});return}let s=Nr(t,o.value,n);if(!s)return;r.push({type:\"block\",open:o.open,value:s});continue}if(o.type===\"at-keyword\"||o.type===\"CDO\"||o.type===\"CDC\"||o.type===\"{\"||o.type===\"}\"||o.type===\";\"||o.type===\"delim\"&&o.value===\"\\\\\"){n({reason:\"unreadable\",...t?{name:t}:{}});return}r.push(o)}return r}function kn(t,e){let n=t.name.startsWith(\"--\"),r=n?t.name:gi(t.name);if(!n&&!mi.has(r)){e({reason:\"property\",name:r});return}let o=_o[r];if(o){let l=t.value.filter(p=>p.type!==\"whitespace\"),u=l[0],d=l.length===1&&u?.type===\"ident\"?me(u.value):void 0;if(!d||![...o,\"inherit\",\"initial\",\"unset\",\"revert\"].includes(d)){e({reason:\"value\",name:r});return}return`${r}: ${d}${t.important?\" !important\":\"\"}`}let s=Nr(n?void 0:r,t.value,e);if(!s)return;let i=nt(s).trim();return`${n?`--${An(t.name.slice(2))}`:r}: ${i}${t.important?\" !important\":\"\"}`}function os(t,e){let n=r=>{for(let o=0;o<r.length;o+=1){let s=r[o];if(o>0&&r[o-1].type===\":\"&&(s.type===\"ident\"||s.type===\"func\")){let l=me(s.type===\"ident\"?s.value:s.name);if(hi.has(l)||l.startsWith(\"-webkit-\")||l.startsWith(\"-moz-\"))return e({reason:\"selector\",name:l}),!1}if(s.type===\"url\"||s.type===\"bad-url\"||s.type===\"bad-string\"||s.type===\"at-keyword\"||s.type===\"CDO\"||s.type===\"CDC\"||s.type===\"block\"&&s.open===\"{\")return e({reason:\"unreadable\",name:\"selector\"}),!1;if(s.type===\"func\"&&!n(s.value)||s.type===\"block\"&&!n(s.value))return!1}return!0};return n(t)}function yr(t,e,n){let r=[];for(let o of Sr(t))if(o.type===\"declaration\"){let s=kn(o,e);s&&r.push(`${s};`)}else{let s=Cn(o,e,n+1,\"style\");s&&r.push(s)}return r.join(\" \")}function yi(t,e,n){let r=o=>o.every(s=>{if(s.type===\"url\"||s.type===\"bad-url\"||s.type===\"bad-string\"||s.type===\"block\"&&s.open===\"{\")return n({reason:s.type===\"url\"?\"url\":\"unreadable\",name:`@${e}`}),!1;if(s.type===\"func\"){let i=me(s.name);return e===\"supports\"&&i===\"selector\"?os(s.value,n):rs.has(i)?r(s.value):(n({reason:\"function\",name:i}),!1)}if(s.type===\"block\"){if(e===\"supports\"){let i=Sr(s.value);if(i.length===1&&i[0].type===\"declaration\")return kn(i[0],n)!==void 0}return r(s.value)}return!0});return r(t)?nt(t).trim():void 0}function Tr(t){return t.map((e,n)=>{let r=t[n-1],o=r?.type===\":\"||r?.type===\"delim\"&&(r.value===\".\"||r.value===\"|\");return e.type===\"ident\"&&!o&&Object.prototype.hasOwnProperty.call(St,me(e.value))?{type:\"block\",open:\"[\",value:[{type:\"ident\",value:\"data-graview-as\"},{type:\"delim\",value:\"=\"},{type:\"string\",value:me(e.value)}]}:e.type===\"func\"?{type:\"func\",name:e.name,value:Tr(e.value)}:e.type===\"block\"&&e.open===\"(\"?{type:\"block\",open:\"(\",value:Tr(e.value)}:e})}function Cn(t,e,n,r){if(n>es){e({reason:\"unreadable\",name:\"nesting\"});return}if(t.type===\"qualified\"){if(r===\"keyframes\"){if(!t.prelude.every(p=>p.type===\"whitespace\"||p.type===\",\"||p.type===\"percentage\"||p.type===\"ident\"&&[\"from\",\"to\"].includes(me(p.value)))){e({reason:\"unreadable\",name:\"keyframe\"});return}return`${nt(t.prelude).trim()} { ${yr(t.block,e,n)} }`}if(!os(t.prelude,e))return;let u=nt(Tr(t.prelude)).trim();if(u===\"\"){e({reason:\"unreadable\",name:\"selector\"});return}return`${u} { ${yr(t.block,e,n)} }`}let o=me(t.name),s=o===\"-webkit-keyframes\"?\"keyframes\":o;if(!pi.has(s)||r===\"keyframes\"){e({reason:\"at-rule\",name:`@${o}`});return}if(!t.block){e({reason:\"unreadable\",name:`@${o}`});return}if(s===\"keyframes\"){if(r!==\"sheet\"){e({reason:\"at-rule\",name:\"@keyframes\"});return}let u=t.prelude.filter(f=>f.type!==\"whitespace\"),d=u[0];if(u.length!==1||!d||d.type!==\"ident\"&&d.type!==\"string\"){e({reason:\"unreadable\",name:\"@keyframes\"});return}let p=tt(t.block,!1).map(f=>Cn(f,e,n+1,\"keyframes\")).filter(f=>f!==void 0);return`@keyframes ${d.type===\"ident\"?Rn(d.value):Er(d.value)} { ${p.join(\" \")} }`}let i=yi(t.prelude,s,e);if(i===void 0)return;let l=r===\"style\"?yr(t.block,e,n):tt(t.block,!1).map(u=>Cn(u,e,n+1,\"sheet\")).filter(u=>u!==void 0).join(\" \");return`@${s} ${i} { ${l} }`}function ss(t,e=ur){let n=[];if(t.length>e)return{css:\"\",refused:[{reason:\"size\"}]};let r=s=>void n.push(s);return{css:tt(Or(t),!0).map(s=>Cn(s,r,0,\"sheet\")).filter(s=>s!==void 0).join(`\n`),refused:n}}function is(t,e=ur){let n=[];if(t.length>e)return{css:\"\",refused:[{reason:\"size\"}]};let r=s=>void n.push(s),o=[];for(let s of Sr(Or(t))){if(s.type!==\"declaration\"){r({reason:\"unreadable\",name:\"a rule in a style attribute\"});continue}let i=kn(s,r);i&&o.push(i)}return{css:o.join(\"; \"),refused:n}}function as(t,e){let n,r=kn(ns(t,Or(e)),o=>n??=o);return r===void 0||n?{refused:n??{reason:\"unreadable\",name:t}}:{value:r.slice(r.indexOf(\":\")+1).trim()}}function ls(t,e){if(e===\"svg\"){let r=wn(t);return r?{namespace:\"svg\",name:r}:{refused:{reason:\"element\",element:t}}}let n=t.toLowerCase();return n===\"svg\"?{namespace:\"svg\",name:\"svg\"}:Object.prototype.hasOwnProperty.call(Qe,n)?Object.prototype.hasOwnProperty.call(St,n)?{namespace:\"html\",name:St[n],as:n}:{namespace:\"html\",name:n}:{refused:{reason:\"element\",element:t}}}function vr(t,e){return(t===\"html\"?Qe[e]:Tn[e])?.empty===!0}var bi=/^[+-]?(\\d+\\.?\\d*|\\.\\d+)([eE][+-]?\\d+)?$/,Ei=/^[0-9A-Za-z\\s.,+\\-%()]*$/,Ni=/^#[A-Za-z_][A-Za-z0-9_.:-]*$/,Ti=/^data:image\\/(png|gif|jpeg|webp|avif|bmp|svg\\+xml)(;[A-Za-z0-9=._+-]+)*,/i;function Rr(t,e,n,r,o){let s=Sn(t,e,n);if(!s)return{refused:{reason:\"attribute\",element:e,name:n}};if(t===\"html\"&&xn[e]?.includes(s.name))return{refused:{reason:\"attribute\",element:e,name:n}};if(r===null)return{name:s.name,value:null};let i=xi(s.name,s.kind,r,o);return\"refused\"in i?{refused:{...i.refused,element:e}}:s.name===\"role\"&&i.value.split(/\\s+/).some(l=>vo.includes(l.toLowerCase()))?{refused:{reason:\"value\",element:e,name:n}}:s.name===\"aria-live\"&&![\"polite\",\"off\"].includes(i.value.toLowerCase())?{refused:{reason:\"value\",element:e,name:n}}:{name:s.name,value:i.value,...i.dropped?{dropped:i.dropped.map(l=>({reason:l.reason===\"url\"?\"url\":\"css\",element:e,name:s.name,css:l}))}:{}}}function xi(t,e,n,r){let o=(s,i)=>({refused:{reason:s,name:t,...i?{css:i}:{}}});if(e===\"geometry\")return n.length>Io||!Ei.test(n)||/url/i.test(n)?o(\"value\"):{value:n};if(e===\"image\")return n.length>Do?o(\"url\"):Ti.test(n)?{value:n}:n.startsWith(`blob:${r.origin}/`)&&/^blob:[^\\s\"'<>]+$/.test(n)?{value:n}:o(\"url\");if(n.length>dr)return o(\"value\");if(typeof e==\"object\"){let s=e.oneOf.find(i=>i.toLowerCase()===n.toLowerCase());return s===void 0?o(\"value\"):{value:s}}switch(e){case\"text\":return{value:n};case\"number\":return bi.test(n.trim())&&Number.isFinite(Number(n))?{value:n.trim()}:o(\"value\");case\"boolean\":return{value:\"\"};case\"fragment\":return Ni.test(n)?{value:n}:o(\"url\");case\"style\":{let s=is(n,dr);return s.refused.length>0&&s.css===\"\"?o(s.refused[0].reason===\"url\"?\"url\":\"css\",s.refused[0]):{value:s.css,...s.refused.length>0?{dropped:s.refused}:{}}}case\"css\":{let s=as(t,n);return\"refused\"in s?o(s.refused.reason===\"url\"?\"url\":\"css\",s.refused):{value:s.value}}}}var wi=0,Si=1,Oi=2,vi=3,cs=1,Ri=2,us=3,Ai=1,Ci=3,ki=8,ds=\"~\",_n=t=>typeof t==\"object\"&&t!==null&&!Array.isArray(t),fs=new Set([\"input\",\"select\",\"textarea\",\"option\"]),_i=new Set([\"value\",\"checked\",\"selected\"]);function ms(t,e){let n=t.ownerDocument??t,r=e.maxNodes??5e3,o=[],s=new Map,i=new WeakMap,l={dom:t,name:\"div\",namespace:\"html\",children:[],id:ds};s.set(ds,l);let u=0,d=!1,p=c=>{o.push(c),o.length>200&&o.shift()},E=()=>({dom:n.createComment(\"\"),children:[],refused:!0}),f=(c,h)=>{if(c.namespace===\"html\"&&c.name&&fs.has(c.name))return c.dom;if(h?.namespace===\"html\"&&h.name===\"textarea\")return h.dom},b=(c,h,g)=>{let a=c.dom;if(g!=null&&typeof g!=\"string\")return p({reason:\"value\",element:c.name,name:h});let m=Rr(c.namespace,c.name,h,g??null,e);if(\"refused\"in m){let R=Rr(c.namespace,c.name,h,null,e);return\"refused\"in R||a.removeAttribute(R.name),p(m.refused)}for(let R of m.dropped??[])p(R);let T=c.namespace===\"html\"&&_i.has(m.name)&&fs.has(c.name),x=a,v=T?m.name===\"value\"?x.value:m.name===\"checked\"?x.checked:x.selected:void 0;m.value===null?a.removeAttribute(m.name):a.setAttribute(m.name,m.value),e.onAttribute?.(a,m.name),T&&(m.name===\"value\"&&\"value\"in x?(x.value=m.value??\"\",v!==x.value&&e.onFieldSet?.(a)):m.name===\"checked\"&&\"checked\"in x?(x.checked=m.value!==null,v!==x.checked&&e.onFieldSet?.(a)):m.name===\"selected\"&&\"selected\"in x&&(x.selected=m.value!==null,v!==x.selected&&e.onFieldSet?.(a.parentElement?.closest(\"select\")??a)))},N=c=>{if(!c.refused){u-=1,c.id!==void 0&&s.delete(c.id);for(let h of c.children)N(h)}},O=(c,h)=>{if(!_n(c)||typeof c.id!=\"string\"||s.has(c.id))return p({reason:\"record\"}),E();if(u>=r)return p({reason:\"budget\"}),d||(d=!0,e.onOverBudget?.()),E();let g=c.id;if(c.type===ki)return E();if(c.type===Ci){if(vr(h.namespace,h.name))return p({reason:\"child\",element:h.name}),E();let v=n.createTextNode(String(c.data??\"\").slice(0,fr)),R={dom:v,children:[],text:!0,id:g,parent:h};return s.set(g,R),i.set(v,g),u+=1,R}if(c.type!==Ai)return p({reason:\"record\"}),E();let a=String(c.element);if(vr(h.namespace,h.name))return p({reason:\"child\",element:a}),E();let m=ls(a,h.namespace);if(\"refused\"in m)return p(m.refused),E();let T=n.createElementNS(m.namespace===\"svg\"?Lo:Mo,m.name);m.as&&T.setAttribute(\"data-graview-as\",m.as);let x={dom:T,name:m.name,namespace:m.namespace,children:[],id:g,parent:h};if(s.set(g,x),i.set(T,g),u+=1,_n(c.attributes))for(let[v,R]of Object.entries(c.attributes))b(x,v,R);if(e.decorate?.(T,m.name,m.namespace),_n(c.properties))for(let v of Object.keys(c.properties))p({reason:\"attribute\",element:m.name,name:v});if(_n(c.eventListeners))for(let v of Object.keys(c.eventListeners))c.eventListeners[v]!=null&&p({reason:\"attribute\",element:m.name,name:`on${v}`});if(Array.isArray(c.children))for(let v of c.children){let R=O(v,x);x.children.push(R),T.appendChild(R.dom)}return x},y=c=>{if(!Array.isArray(c))return p({reason:\"record\"});let[h,g]=c,a=typeof g==\"string\"?s.get(g):void 0;if(!a)return p({reason:\"record\"});switch(h){case wi:{if(a.text)return p({reason:\"record\"});let m=Number(c[3]),T=Number.isInteger(m)&&m>=0&&m<=a.children.length?m:a.children.length,x=O(c[2],a);a.dom.insertBefore(x.dom,a.children[T]?.dom??null),a.children.splice(T,0,x),a.namespace===\"html\"&&a.name===\"textarea\"&&e.onFieldSet?.(a.dom);return}case Si:{let m=Number(c[2]),T=a.children[m];if(!T)return p({reason:\"record\"});a.children.splice(m,1),T.dom.parentNode?.removeChild(T.dom),N(T);return}case Oi:{if(!a.text)return p({reason:\"record\"});a.dom.data=String(c[2]??\"\").slice(0,fr);let m=f(a,a.parent);m&&e.onFieldSet?.(m);return}case vi:{if(a===l||a.text)return p({reason:\"record\"});let m=String(c[2]),T=c[4]??cs;return T===Ri?b(a,m,c[3]):p(T===cs||T===us?{reason:\"attribute\",element:a.name,name:T===us?`on${m}`:m}:{reason:\"record\"})}default:return p({reason:\"record\"})}};return{apply(c,h){if(!Array.isArray(c))return p({reason:\"record\"}),!0;for(let g=0;g<c.length;g+=1){if(h&&g%32===0&&h())return!1;y(c[g])}return!0},get refused(){return o},get size(){return u},idOf:c=>i.get(c),elementOf(c){let h=s.get(c);return h&&!h.text&&h!==l?h.dom:void 0},dispose(){for(let c of l.children)N(c);for(l.children.length=0;t.firstChild;)t.removeChild(t.firstChild)}}}function ps(t,e,n){let{root:r}=$o(),o=!1,s=ms(r,{origin:n.origin??\"null\",maxNodes:n.maxNodes,onOverBudget:()=>o=!0});for(let u of t)s.apply(u);let i=[...s.refused],l=\"\";if(typeof e==\"string\"){let u=ss(e);l=u.css;for(let d of u.refused)i.push({reason:\"css\",name:\"stylesheet\",css:d})}return{root:r,refused:i,size:s.size,over:o,css:l}}function Pi(t){let e=\"element\"in t&&t.element?`<${t.element}>`:\"\",n=t.name?` ${t.name}`:\"\";switch(t.reason){case\"element\":return{at:`drawing ${e}`,says:`Not drawn: ${e} is not in the open kit.`};case\"attribute\":return{at:`drawing ${e}${n}`,says:`Not drawn: ${e||\"an element\"} does not take${n}.`};case\"value\":return{at:`drawing ${e}${n}`,says:`Not drawn: the value of${n} is not one the open kit takes.`};case\"url\":return{at:`drawing ${e}${n}`,says:\"Not drawn: an address. A view loads nothing; an image is a data: image.\"};case\"child\":return{at:`drawing ${e}`,says:`Not drawn: ${e} holds nothing.`};case\"record\":return{at:\"drawing\",says:\"Not drawn: a record the drawing's format does not know.\"};case\"budget\":return{at:\"drawing\",says:\"Not drawn: more nodes than a view may draw.\"};case\"css\":return{at:`stylesheet${n===\" stylesheet\"?\"\":n}`,says:`Not drawn: CSS the open kit leaves out${t.css?` (${t.css.reason}${t.css.name?` ${t.css.name}`:\"\"})`:\"\"}.`}}}function hs(t,e){let{limits:n}=e;if(t.messages>n.messages)return{ok:!1,reason:\"flood\",detail:`It sent ${t.messages} messages, more than the ${n.messages} a view may send in a second.`};let r=new Set(e.acts);for(let l of t.asked)if(!r.has(l.name))return{ok:!1,reason:\"act\",detail:`It asks for the act \"${l.name}\", which its manifest does not name.`};let o=ps(t.renders,t.css,{maxNodes:n.maxNodes});if(o.over)return{ok:!1,reason:\"nodes\",detail:`It drew more than the ${n.maxNodes.toLocaleString(\"en-US\")} things a view may draw.`};let s=Go(o.root,{props:e.props,places:e.places});for(let l of s.acts)if(!r.has(l))return{ok:!1,reason:\"act\",detail:`It binds a press to the act \"${l}\" (data-act), which its manifest does not name.`};let i=[...o.refused.map(Pi),...s.problems];for(let l of t.went)\"record\"in l&&!(e.props.node?.id===l.record||(e.props.nodes??[]).some(u=>u.id===l.record))&&i.push({at:\"navigate\",says:`It goes to \"${l.record}\", which this seat was not shown: the host will not follow it.`}),\"place\"in l&&!e.places.includes(l.place)&&i.push({at:\"navigate\",says:`It goes to the place \"${l.place}\", which this app does not have.`});return{ok:!0,parts:s.parts,problems:i}}var Ar=\"graviewHeadless\",Cr=\"graviewHeadlessView\";var Es=globalThis,Ii=Promise.prototype.then,Di=Promise.resolve(),_r=t=>void Ii.call(Di,t),Pn=Es.performance,vt=Pn&&typeof Pn.now==\"function\"?Pn.now.bind(Pn):Date.now,Ie=JSON.stringify,Ns=JSON.parse,Mi=Object.defineProperty,Pr=t=>(t instanceof Error?`${t.name}: ${t.message}`:String(t)).slice(0,500),gs=t=>{try{return Ns(Ie(t??null))}catch{return null}},B={renders:[],asked:[],went:[],ms:0,logs:[],messages:0},De,In=(t,e)=>{De??={reason:t,detail:e}},rt=t=>{B.logs.length<50&&B.logs.push(t.slice(0,500))},ot={removed:[],stuck:[],sealed:!1},Ir=zo({send(t){B.messages+=1,t.type===\"render\"?B.renders.push(gs(t.records)):t.type===\"style\"?B.css=String(t.css):t.type===\"navigate\"&&\"place\"in t&&B.went.push({place:String(t.place)})},act(t,e){return B.messages+=1,B.asked.push({name:String(t),args:gs(e)}),Promise.resolve({type:\"answer\",id:B.asked.length,ok:!1,reason:\"refused\",message:\"Nothing is applied in a headless run.\"})},navigate(t){B.messages+=1,B.went.push({record:String(t)})},microtask:_r,now:vt,threw:t=>In(\"error\",`It threw: ${Pr(t)}`),warn:rt,hardening:()=>ot}),ys=!1,kr=!1;function Li(t){if(kr||typeof t!=\"function\"||(kr=!0,De))return;let e=vt();try{t.call(void 0,Ir.view)}catch(n){In(\"error\",`It threw: ${Pr(n)}`)}B.ms+=vt()-e}async function Hi(t){if(ys)return Ie({ok:!1,reason:\"refused\",detail:\"A headless script runs one view, once: something called its entry before the host did.\"});ys=!0;let e;try{e=Ns(String(t))}catch{return Ie({ok:!1,reason:\"isolate\",detail:\"The run was not handed its input as JSON.\"})}if(!kr&&!De)return Ie({ok:!1,reason:\"isolate\",detail:\"The script held no view.\"});let n=vt();De||Ir.hear({type:\"props\",props:e.props,push:1}),B.ms+=vt()-n,B.ms>=e.limits.pushMs&&In(\"slow\",`It took longer than ${e.limits.pushMs.toLocaleString(\"en-US\")} ms to draw what it was shown.`);for(let o=0;o<64&&!De;o+=1)await new Promise(s=>_r(s));if(De)return Ie({ok:!1,...De,transcript:B});let r=hs(B,e);return r.ok?Ie({ok:!0,transcript:B,drawn:{parts:r.parts,problems:r.problems},hardening:{removed:ot.removed.length,sealed:ot.sealed}}):Ie({ok:!1,reason:r.reason,detail:r.detail,transcript:B})}var Vi=Object.freeze({log:(...t)=>rt(t.map(String).join(\" \")),info:(...t)=>rt(t.map(String).join(\" \")),debug:(...t)=>rt(t.map(String).join(\" \")),warn:(...t)=>rt(t.map(String).join(\" \")),error:(...t)=>rt(t.map(Pr).join(\" \"))}),Ui=0,bs=()=>Ui+=1,ji=[[\"console\",Vi],[\"setTimeout\",bs],[\"setInterval\",bs],[\"clearTimeout\",()=>{}],[\"clearInterval\",()=>{}],[\"queueMicrotask\",_r],[\"graview\",Ir.view],[Cr,Li],[Ar,t=>Hi(t)]];for(let[t,e]of ji)Mi(Es,t,{value:e,writable:!0,enumerable:!1,configurable:!0});ot=So(globalThis,[\"graview\",Cr,Ar],{primitivesStay:!0});ot.stuck.length>0&&In(\"refused\",`This isolate could not be hardened: ${ot.stuck.join(\", \")} would not go.`);})();\n";
|
|
7
|
+
export const HEADLESS_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 R=Symbol(\"name\"),he=Symbol(\"prefix\"),ge=Symbol(\"value\"),C=Symbol(\"ns\"),Y=Symbol(\"owner\"),I=Symbol(\"owner_document\"),se=Symbol(\"attributes\"),D=Symbol(\"prev\"),S=Symbol(\"next\"),k=Symbol(\"child\"),q=Symbol(\"parent\"),ye=Symbol(\"host\"),Z=Symbol(\"data\"),we=Symbol(\"listeners\"),Mn=Symbol(\"isTrusted\"),Me=Symbol(\"path\"),Le=Symbol(\"stop_immediate_propagation\"),He=Symbol(\"dispatching\"),le=Symbol(\"content\"),M=Symbol(\"hooks\"),Rt=Symbol(\"extensions\"),Se=Symbol(\"hooks_dispatch\"),U=Symbol(\"is_connected\"),Ve=Symbol(\"create_element\"),Lr=0,X=1,Ue=2,je=3,$e=8,ve=9,Hr=10,be=11,_=\"http://www.w3.org/1999/xhtml\",J=\"http://www.w3.org/2000/svg\",Vr=\"http://www.w3.org/XML/1998/namespace\",lt=\"http://www.w3.org/2000/xmlns/\";function Ct(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 Ur(t){return t.replace(/[a-z]/g,e=>String.fromCharCode(e.charCodeAt(0)-32))}function P(t,e){let n=globalThis.DOMException;if(typeof n==\"function\")return new n(t,e);let r=new Error(t);return r.name=e,r}var jr=/^(?:[A-Za-z][^\\0\\t\\n\\f\\r\\u0020/>]*|[:_\\u0080-\\u{10FFFF}][A-Za-z0-9-.:_\\u0080-\\u{10FFFF}]*)$/u,$r=/[\\0\\t\\n\\f\\r />=]/u,ws=/[\\0\\t\\n\\f\\r />]/u;function ce(t){if(t==null)return null;let e=String(t);return e===\"\"?null:e}function zr(t){jr.test(t)||Hn(t)}function Ln(t){(t===\"\"||$r.test(t))&&Hn(t)}function kt(t,e,n){let r=ce(t),o=String(e),s=o.indexOf(\":\"),i=s<0?null:o.slice(0,s),l=s<0?o:o.slice(s+1);if((i!=null&&(i===\"\"||ws.test(i))||(n===\"element\"?!jr.test(l):l===\"\"||$r.test(l)))&&Hn(o),i!=null&&r==null)throw P(`A namespace is required for the prefix in \"${o}\"`,\"NamespaceError\");if(i===\"xml\"&&r!==Vr)throw P(\"The xml prefix requires the XML namespace\",\"NamespaceError\");if((o===\"xmlns\"||i===\"xmlns\")&&r!==lt)throw P(\"The xmlns name requires the XMLNS namespace\",\"NamespaceError\");if(r===lt&&o!==\"xmlns\"&&i!==\"xmlns\")throw P(\"The XMLNS namespace requires the xmlns name or prefix\",\"NamespaceError\");return{namespace:r,qualifiedName:o,prefix:i,localName:l}}function Hn(t){throw P(`Invalid name: \"${t}\"`,\"InvalidCharacterError\")}var _t=0,Pt=1,Fr=2,Vn=3,Ss=typeof performance>\"u\"?Date.now:performance.now.bind(performance),j=class{static NONE=_t;static CAPTURING_PHASE=Pt;static AT_TARGET=Fr;static BUBBLING_PHASE=Vn;timeStamp=Ss();target=null;currentTarget=null;srcElement=null;bubbles=!1;cancelable=!1;composed=!1;defaultPrevented=!1;cancelBubble=!1;eventPhase=_t;[Me]=[];[Le]=!1;[He]=!1;constructor(e,n){this.type=e,Object.defineProperty(this,Mn,{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[Mn]}composedPath(){return[...this[Me]]}stopPropagation(){this.cancelBubble=!0}stopImmediatePropagation(){this[Le]=!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 Un(t,e,n){if(t.cancelBubble)return;let o=e[we]?.get(t.type)?.[n===Pt?\"capture\":\"bubble\"];if(o)for(let s of[...o]){if(!o.has(s)||s.signal?.aborted)continue;t.eventPhase=t.target===e?Fr:n,t.currentTarget=e;let i=s.normalizedListener;try{typeof i==\"object\"?i.handleEvent(t):i.call(e,t)}catch(l){setTimeout(vs,0,l)}if(t[Le])break}}function vs(t){throw t}var ct=[],It=new WeakMap;function Dt(t,e){let n=It.get(t);n?n.push(e):It.set(t,[e]),ct[ct.length-1].push(t)}function $(t){let e=[];ct.push(e);let n;try{n=t()}catch(r){ct.pop();try{Br(e)}catch{}throw r}return ct.pop(),Br(e),n}function Br(t){let e,n=!1;for(let r of t){let o=It.get(r);if(o){for(;o.length>0;){let s=o.shift();try{s()}catch(i){n||(e=i,n=!0)}}It.delete(r)}}if(n)throw e}var Mt=[],ut=[],jn=!1;function Oe(t){for(let e of t)Mt.push(e),e[1]&&ut.push(e[1]);if(!jn){jn=!0;try{let e,n=!1;for(let r=0;r<Mt.length;r++){let[o,s]=Mt[r];s&&ut.splice(ut.indexOf(s),1);try{o()}catch(i){n||(e=i,n=!0)}}if(n)throw e}finally{Mt.length=0,ut.length=0,jn=!1}}}function dt(t){let e=t;for(;e;){if(ut.includes(e))return!0;e=e[q]??e[ye]}return!1}var ft=Symbol(\"listenerRegistrations\"),Ee=class{[we]=void 0;[ft]=void 0;[I]=void 0;addEventListener(e,n,r){if(n==null)return;let o=r===!0||typeof r==\"object\"&&r.capture===!0,s=typeof r==\"object\"&&r.once===!0,i=typeof r==\"object\"?r.signal:void 0;if(i?.aborted)return;let l=$n(o),u=this[ft];u||(u=new Map,this[ft]=u);let d=u.get(e);d||(d={},u.set(e,d));let p=d[l];if(p||(p=new Map,d[l]=p),p.has(n))return;let E=this,m={type:e,listener:n,capture:o,once:s,normalizedListener:n,signal:i};(s||i)&&(m.normalizedListener=function(...c){if(m.signal?.aborted){Lt(E,m);return}return m.once&&Lt(E,m),typeof m.listener==\"object\"?m.listener.handleEvent(...c):m.listener.call(this,...c)});let b=this[we];b||(b=new Map,this[we]=b);let N=b.get(e);N||(N={},b.set(e,N));let v=N[l];if(v||(v=new Set,N[l]=v),p.set(n,m),v.add(m),i){let y=()=>{Lt(E,m)};m.abortListener=y,i.addEventListener(\"abort\",y,{once:!0})}this[I]?.defaultView[Se].addEventListener?.(this,e,n,r)}removeEventListener(e,n,r){return Os.call(this,e,n,r)}dispatchEvent(e){if(e[He])throw P(\"Failed to execute 'dispatchEvent' on 'EventTarget': The event is already being dispatched.\",\"InvalidStateError\");e[He]=!0;try{let n=[],r=this;for(;r!=null;)n.push(r),r=r.parentNode;e.target=this,e.srcElement=this,e[Me]=n;for(let s=n.length;s--;)if(Un(e,n[s],Pt),e.cancelBubble)return!e.defaultPrevented;let o=e.bubbles?n:n.slice(0,1);for(let s=0;s<o.length;s++)if(Un(e,o[s],Vn),e.cancelBubble)return!e.defaultPrevented;return!e.defaultPrevented}finally{e[He]=!1,e.cancelBubble=!1,e[Le]=!1,e.eventPhase=_t,e.currentTarget=null,e[Me]=[]}}};function Os(t,e,n){if(e==null)return;let r=n===!0||n&&n.capture===!0,o=$n(!!r),s=this[ft]?.get(t)?.[o]?.get(e);s&&Lt(this,s)}function $n(t){return t?\"capture\":\"bubble\"}function Lt(t,e){let n=$n(e.capture),r=t[ft],o=r?.get(e.type);if(!o)return;let s=o[n];if(!s||s.get(e.listener)!==e)return;s.delete(e.listener),s.size===0&&delete o[n],!o.bubble&&!o.capture&&r?.delete(e.type),e.signal&&e.abortListener&&e.signal.removeEventListener(\"abort\",e.abortListener);let i=t[we],l=i?.get(e.type);if(!l)return;let u=l[n];u?.delete(e)&&(u.size===0&&delete l[n],!l.bubble&&!l.capture&&i?.delete(e.type),t[I]?.defaultView[Se].removeEventListener?.(t,e.type,e.listener,e.capture))}var Q=class extends Array{item(e){return this[e]??null}};var pt=0,Gr=1,Bn=2,Gn=3,ht=4,Yr=0,qr=1,Ut=2,jt=3,Wr=4,Fn=5,Xr=6,Kr=7,Ht=/^(?:--|-?[A-Za-z_\\u0080-\\u{10FFFF}])[A-Za-z0-9_\\u0080-\\u{10FFFF}-]*$/u;function As(t,e){let n=1,r=null;for(let o=e;o<t.length;o++){let s=t[o];if(r){s===\"\\\\\"?o++:s===r&&(r=null);continue}if(s==='\"'||s===\"'\")r=s;else if(s===\"(\")n++;else if(s===\")\"&&--n===0)return[t.slice(e,o),o+1]}return[t.slice(e),t.length]}function W(t){throw P(`Invalid or unsupported selector: \"${t}\"`,\"SyntaxError\")}function $t(t,e){let n=typeof e==\"string\"?gt(e):[{combinator:ht,matchers:e}],r=null,o=t[k];return o&&n[0].matchers.length&&Yn(o,n,s=>(r=s,!1)),r}function zt(t,e){let n=typeof e==\"string\"?gt(e):[{combinator:ht,matchers:e}],r=new Q,o=t[k];return o&&n[0].matchers.length&&Yn(o,n,s=>{r.push(s)}),r}function gt(t,e=!1,n=!1){let r={combinator:ht,matchers:[]},o=[r],s=/[\\t\\n\\f\\r ]*?([>\\t\\n\\f\\r +~]?)[\\t\\n\\f\\r ]*?(?:(?:\\[[\\t\\n\\f\\r ]*([^\\]=\\t\\n\\f\\r ]+)[\\t\\n\\f\\r ]*(?:=[\\t\\n\\f\\r ]*(?:(['\"])(.*?)\\3|([^\\]\\t\\n\\f\\r ]+)))?[\\t\\n\\f\\r ]*(?:\\]|$))|([#.]?)([^\\t\\n\\f\\r #.[>:+~()]+)|:(\\w+)(\\()?)/gi,i=t.replace(/^[\\t\\n\\f\\r ]+|[\\t\\n\\f\\r ]+$/g,\"\");i===\"\"&&W(t);let l=0,u;for(;u=s.exec(i);){u.index!==l&&W(t),u[1]&&(r.matchers.length===0&&!(n&&o.length===1)&&W(t),u[1]===\">\"?r.combinator=Gr:u[1]===\"+\"?r.combinator=Gn:u[1]===\"~\"?r.combinator=Bn:r.combinator=pt,r={combinator:ht,matchers:[]},o.push(r));let d=u[8]?H(u[8]):u[2]||u[7];u[7]!=null&&!u[6]&&r.matchers.length>0&&W(t);let E,m=u[4]??u[5]??u[7];if(u[2]){Ht.test(d)||W(t);let b=u[5],N=b?.[0];if(u[3]==null&&(N==='\"'||N===\"'\")){let v=u[0].lastIndexOf(b);m=i.slice(u.index+v+1),s.lastIndex=i.length}else b!=null&&!Ht.test(b)&&W(t);E=Wr}else u[6]?(Ht.test(d)||W(t),E=u[6]===\"#\"?Ut:jt):u[8]?E=u[9]==null?Fn:Xr:u[7]===\"*\"?E=Yr:u[7]&&Ht.test(u[7])?E=qr:W(t);u[9]?([m,s.lastIndex]=As(i,s.lastIndex),d!==\"has\"&&d!==\"not\"&&W(t),d===\"has\"&&e&&W(t),gt(m,e||d===\"has\",d===\"has\")):E===Fn&&W(t),r.matchers.push({type:E,name:d,value:m}),l=s.lastIndex}return(l!==i.length||r.matchers.length===0)&&W(t),o}function Rs(t,e){let n=gt(e);return n[0]?.matchers.length?mt(t,n):!1}function Cs(t,e){let n=gt(e,!0,!0),r=n[0];if(n.length===1&&r.matchers.length===0)return!1;let o=pt,s={type:Kr,name:\":scope\"};if(r.matchers.length===0?(o=r.combinator,r.matchers.push(s)):n.unshift({combinator:pt,matchers:[s]}),n.some(({matchers:u})=>u.length===0))return!1;let i=o===Gn||o===Bn?t[S]:t[k];if(!i)return!1;let l=!1;return Yn(i,n,()=>(l=!0,!1),t),l}function Yn(t,e,n,r){let o=[],s=t;for(;s;){if(G(s)){if(mt(s,e,r)&&n(s)===!1)return!1;let i=s[k];if(i){let l=s[S];l&&o.push(l),s=i;continue}}s=s[S]??o.pop()??null}return!0}function mt(t,e,n){let{combinator:r,matchers:o}=e[e.length-1];if(r===ht){if(!Vt(t,o,n))return!1;let l=e.slice(0,-1);return l.length===0||mt(t,l,n)}let s=r===Gr||r===pt?q:D,i=t[s];if(!i)return!1;if(r===pt||r===Bn){for(;i;){if(G(i)&&Vt(i,o,n)){let l=e.slice(0,-1);if(l.length===0||mt(i,l,n))return!0}i=i[s]}return!1}else{if(r===Gn&&!G(i)){for(;i&&!G(i);)i=i[s];if(!i)return!1}if(!G(i)||!Vt(i,o,n))return!1;let l=e.slice(0,-1);return l.length===0||mt(i,l,n)}}function zn(t,e){return t.getAttributeNS(null,t.namespaceURI===_?H(e):e)}function Vt(t,e,n){if(!t)return!1;if(Array.isArray(e)){for(let i of e)if(Vt(t,i,n)===!1)return!1;return!0}let{type:r,name:o,value:s}=e;switch(r){case Yr:return o===\"*\";case qr:return t.namespaceURI===_?t.localName===H(o):t.localName===o;case Ut:return zn(t,\"id\")===o;case jt:let i=zn(t,\"class\");return i?Ct(i).includes(o):!1;case Wr:let l=zn(t,o);return s==null?l!=null:l===s;case Kr:return t===n;case Fn:W(`:${o}`);case Xr:switch(o){case\"has\":return Cs(t,s||\"\");case\"not\":return!Rs(t,s||\"\");default:W(`:${o}(${s})`)}}return!1}function ks(t){return t.nodeType===Ue}function yt(t){return Z in t}function Wn(t){return t.nodeType===je}function _s(t){return t.nodeType===$e}function G(t){return t.nodeType===X}function qn(t){return t.nodeType===be}function eo(t){return\"appendChild\"in t}function Ft(t){let e=[],n=[t],r=new Set(n),o=new Set,s;for(;n.length>0;){let i=n.pop();if(r.delete(i),o.has(i))continue;let l=[];for(let u of Et(i)){if(o.has(u)||(o.add(u),e.push(u),l.push(u),!G(u)))continue;let d=u[se];if(d)for(let E of d)o.has(E)||(o.add(E),e.push(E));let p=u[le];p&&!o.has(p)&&!r.has(p)&&(r.add(p),n.push(p))}s??=l}return{nodes:e,treeNodes:s}}function bt(t,e){for(let n of t)n[I]=e}function Zr(t,e){let n=t.constructor,r=new n(t.name,t.value,t.namespaceURI);return r[I]=e,r}function Jr(t,e){if(Wn(t))return e.createTextNode(t.data);if(_s(t))return e.createComment(t.data);if(ks(t))return Zr(t,e);if(G(t)){let n=e[Ve](t[R],t.namespaceURI,t[he],t.localName);if(t[se])for(let r=0;r<t[se].length;r++){let o=t[se].item(r);n.attributes.setNamedItem(Zr(o,e))}return n}else{if(qn(t))return e.createDocumentFragment();{let n=new t.constructor;return n[I]=e,n}}}function Bt(t,e,n=t.ownerDocument){if(t.nodeType===ve)throw P(\"Cannot clone a document node\",\"NotSupportedError\");let r=Jr(t,n);if(!e||!G(t)&&!qn(t))return r;let o=new Set([t]),s=[{source:t,destination:r,childIndex:0,cloningContent:!1}];for(;s.length>0;){let i=s[s.length-1],l,u;if(i.cloningContent)if(i.contentSource&&i.contentDestination)l=i.contentSource.childNodes[i.childIndex++],u=i.contentDestination;else{s.pop(),i.appendTo&&i.appendTo.appendChild(i.destination);continue}else if(l=i.source.childNodes[i.childIndex++],u=i.destination,!l){if(i.cloningContent=!0,i.childIndex=0,G(i.source)&&i.source.namespaceURI===_&&i.source.localName===\"template\"){let p=i.source[le];p&&(o.has(p)&&Qr(),o.add(p),i.contentSource=p,i.contentDestination=i.destination.content)}continue}if(!l){s.pop(),i.appendTo&&i.appendTo.appendChild(i.destination);continue}o.has(l)&&Qr(),o.add(l);let d=Jr(l,n);G(l)||qn(l)?s.push({source:l,destination:d,appendTo:u,childIndex:0,cloningContent:!1}):u.appendChild(d)}return r}function Qr(){throw new Error(\"Cannot clone a cyclic or repeated node graph\")}function Gt(t,e){let n=String(e);return n===\"\"?null:$t(t,[{type:Ut,name:n}])}function Yt(t,e){let n=[...new Set(Ct(String(e)))];return zt(t,n.map(r=>({type:jt,name:r})))}function qt(t,e){let n=String(e),r=H(n),o=[];for(let s of Wt(t))G(s)&&(n===\"*\"||(s.namespaceURI===_?s[R]===r:s[R]===n))&&o.push(s);return o}function Wt(t){let e=[],n=[],r=t[k];for(;r;){e.push(r);let o=r[k],s=r[S];o?(s&&n.push(s),r=o):r=s??n.pop()??null}return e}function Et(t){let e=Wt(t);return e.unshift(t),e}var ee=class extends Ee{nodeType=Lr;[R]=\"\";[q]=null;[ye]=null;[k]=null;[D]=null;[S]=null;[U]=!1;get[M](){return this[I].defaultView[Se]}get localName(){return this[R]}get nodeName(){return this[R]}get ownerDocument(){return this[I]}get isConnected(){return this[U]}isDefaultNamespace(e){let n=ce(e);return Ps(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[D]}set previousSibling(e){}get nextSibling(){return this[S]}set nextSibling(e){}get previousElementSibling(){let e=this[D];for(;e&&e.nodeType!==1;)e=e[D];return e}set previousElementSibling(e){}get nextElementSibling(){let e=this[S];for(;e&&e.nodeType!==1;)e=e[S];return e}set nextElementSibling(e){}get firstChild(){return this[k]}set firstChild(e){}get lastChild(){let e=this[k];for(;e;){let n=e[S];if(n==null)break;e=n}return e}set lastChild(e){}get nodeValue(){return yt(this)?this.data:null}set nodeValue(e){yt(this)&&(this.data=e)}get textContent(){if(yt(this))return this.data;let e=\"\";for(let n of Wt(this))Wn(n)&&(e+=n.data);return e}set textContent(e){if(yt(this))this.data=e;else if(eo(this)){let n=e==null?\"\":String(e);n===\"\"?this.replaceChildren():this.replaceChildren(n)}}cloneNode(e){return Bt(this,e)}contains(e){let n=e;for(;n!=null;){if(n===this)return!0;n=n.parentNode}return!1}};function Ps(t){let e=t;for(;e;)switch(e.nodeType){case X:{let n=e;if(n.prefix==null&&n.namespaceURI!=null)return n.namespaceURI;let r=n.attributes.getNamedItemNS(lt,\"xmlns\");if(r!=null&&r.prefix==null)return ce(r.value);e=n.parentElement;break}case ve:e=e.documentElement;break;case Hr:case be:return null;case Ue:e=e.ownerElement;break;default:e=e.parentElement}return null}var te=Symbol(\"insertNode\"),Zn=Symbol(\"preflightInsertions\"),Xt=Symbol(\"replaceNode\"),Ne=class extends ee{remove(){let e=this.parentNode;e&&e.removeChild(this)}replaceWith(...e){let n=Ae(e),r=this.parentNode;if(r)return Xn(o=>{ue(r,n);let s=this[S];for(;s&&n.includes(s);)s=s[S];let i=Kn(r,n,o);this.parentNode===r?r[Xt](i,this,o):r[te](i,s,o)})}before(...e){let n=Ae(e),r=this.parentNode;if(r)return Xn(o=>{ue(r,n);let s=this[D];for(;s&&n.includes(s);)s=s[D];let i=Kn(r,n,o);r[te](i,s?s[S]:r.firstChild,o)})}after(...e){let n=Ae(e),r=this.parentNode;if(r)return Xn(o=>{ue(r,n);let s=this[S];for(;s&&n.includes(s);)s=s[S];let i=Kn(r,n,o);r[te](i,s,o)})}};function Xn(t){return $(()=>{let e=[];try{t(e)}catch(n){try{Oe(e)}catch{}throw n}Oe(e)})}function Ae(t){return t.map(e=>e instanceof ee?e:String(e))}function Nt(t,e){return e instanceof ee?e:t.ownerDocument.createTextNode(String(e))}function ue(t,e){for(let n of e){if(!(n instanceof ee))continue;let r=t;for(;r;){if(r===n)throw P(\"Cannot insert a node into itself or one of its descendants\",\"HierarchyRequestError\");r=r[q]??r[ye]}}}function Kn(t,e,n){let r=[];for(let s of e)r.push(Nt(t,s));if(r.length===1)return r[0];let o=t.ownerDocument.createDocumentFragment();o[Zn](r);for(let s of r)o[te](s,null,n);return o}var Kt,Jn=0,to=0,no=0,ro=0,ze=!1,er=!1,Tt=!1,Zt=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=Is(n),o=Kt??=new WeakMap,s=o.get(e);s==null&&(s=new Map,o.set(e,s));let i=s.get(this);i==null?Jn++:Qn(i,-1),s.set(this,r),Qn(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),Jn--,Qn(o,-1)),r?.size===0&&e.delete(n)}this.#e.clear(),this.#n.length=0,Jn===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 ne(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[s,i]of o){if(r!==t.target&&!i.subtree)continue;let l=!1;if(t.type===\"attributes\"){if(!i.attributes||i.attributeFilter&&!i.attributeFilter.has(t.attributeName??\"\"))continue;l=i.attributeOldValue}else if(t.type===\"characterData\"){if(!i.characterData)continue;l=i.characterDataOldValue}else if(!i.childList)continue;n.set(s,n.get(s)===!0||l)}r=r.parentNode}for(let[o,s]of n)o.enqueue({addedNodes:t.addedNodes??new Q,attributeName:t.attributeName??null,attributeNamespace:t.attributeNamespace??null,nextSibling:t.nextSibling??null,oldValue:s?t.oldValue??null:null,previousSibling:t.previousSibling??null,removedNodes:t.removedNodes??new Q,target:t.target,type:t.type})}function Jt(...t){let e=new Q;return e.push(...t),e}function Is(t){if(t.attributes===!1&&(t.attributeOldValue||t.attributeFilter!=null))throw new TypeError(\"attributeOldValue and attributeFilter require attributes to be enabled\");if(t.characterData===!1&&t.characterDataOldValue)throw new TypeError(\"characterDataOldValue requires characterData to be enabled\");let e=t.attributes??(t.attributeOldValue===!0||t.attributeFilter!=null),n=t.characterData??t.characterDataOldValue===!0,r=t.childList===!0;if(!e&&!n&&!r)throw new TypeError(\"MutationObserver options must enable childList, attributes, or characterData\");return{attributes:e,attributeFilter:t.attributeFilter==null?void 0:new Set(t.attributeFilter.map(String)),attributeOldValue:t.attributeOldValue===!0,characterData:n,characterDataOldValue:t.characterDataOldValue===!0,childList:r,subtree:t.subtree===!0}}function Qn(t,e){t.attributes&&(to+=e),t.characterData&&(no+=e),t.childList&&(ro+=e),ze=to>0,er=no>0,Tt=ro>0}var ie=class extends Ne{childNodes=new Q;children=new Q;appendChild(e){return $(()=>this[te](e,null))}insertBefore(e,n){return $(()=>this[te](e,n||null))}append(...e){return $(()=>{let n=Ae(e.filter(r=>r!=null));n.length>1&&ue(this,n);for(let r of n)this[te](Nt(this,r),null)})}prepend(...e){return $(()=>{let n=Ae(e.filter(o=>o!=null));n.length>1&&ue(this,n);let r=this.firstChild;for(let o of n)this[te](Nt(this,o),r)})}replaceChildren(...e){return $(()=>{let n=Ae(e.filter(o=>o!=null));ue(this,n);let r;for(;r=this.firstChild;)this.removeChildImmediately(r);for(let o of n)this[te](Nt(this,o),null)})}removeChild(e){return $(()=>(this.removeChildImmediately(e),e))}removeChildImmediately(e){if(e.parentNode!==this)throw P(\"The node is not a child of this node\",\"NotFoundError\");let n=this[U]?Et(e):void 0,r=e[D],o=e[S],s=Qt(this,e);if(n)for(let i of n)i[U]=!1;this.queueRemovalMutationRecord(this,e,r,o),n&&this.enqueueTreeReactions(n,\"disconnectedCallback\"),Oe(this.collectRemovalHookEffects(e,s))}replaceChild(e,n){return $(()=>this[Xt](e,n))}[Xt](e,n,r){if(ue(this,[e]),n.parentNode!==this)throw P(\"The reference node is not a child of this parent\",\"NotFoundError\");let o=n[D],s=n[S],i=this.prepareInsertion(e),l=this[U]?Et(n):void 0,u=new Set(i.map(({node:m})=>m)),d=s;for(;d&&u.has(d);)d=d[S];let p=Qt(this,n);if(l){for(let b of l)b[U]=!1;let m=new Set(l);for(let b of i)m.has(b.node)&&(b.shouldDisconnect=!1)}this.commitInsertion(i,d);let E=this[U];return this.queueRemovalMutationRecord(this,n,o,s),this.queueInsertionMutationRecords(i),l&&this.enqueueTreeReactions(l,\"disconnectedCallback\"),this.enqueueInsertionReactions(i,E),this.performOrCollectHookEffects([...this.collectRemovalHookEffects(n,p),...this.collectInsertionHookEffects(i)],r),n}querySelectorAll(e){return zt(this,e)}querySelector(e){return $t(this,e)}[te](e,n,r){return this.validateInsertion(e,n),this.insertIntoValidated(e,n,r),e}[Zn](e){for(let n of e)this.validateInsertion(n,null),this.prepareInsertion(n)}validateInsertion(e,n){if(ue(this,[e]),n&&n.parentNode!==this)throw P(\"The reference node is not a child of this parent\",\"NotFoundError\")}insertIntoValidated(e,n,r){e===n&&(n=e[S]);let o=this.prepareInsertion(e);this.commitInsertion(o,n);let s=this[U];this.queueInsertionMutationRecords(o),this.enqueueInsertionReactions(o,s),this.performOrCollectHookEffects(this.collectInsertionHookEffects(o),r)}performOrCollectHookEffects(e,n){n?n.push(...e):Oe(e)}prepareInsertion(e){let n=[];if(e.nodeType===be){let i=e[k];for(;i;)n.push(i),i=i[S]}else n.push(e);let r=this[U],o=this[I],s=[];for(let i of n){let l=i[U],u=l||r,d,p;if(i[I]===o)u&&(d=Et(i));else{let E=Ft(i);p=E.nodes,u&&(d=E.treeNodes)}s.push({node:i,nodes:d,adoption:p,shouldDisconnect:l})}return s}commitInsertion(e,n){for(let s of e){let i=s.node[q];if(i){let l=s.node[D],u=s.node[S];s.source={parent:i,index:Qt(i,s.node),previousSibling:l,nextSibling:u}}}for(let s of e){let i=this.attachChild(s.node,n);s.insertIndex=i.index,s.previousSibling=i.previousSibling,s.nextSibling=i.nextSibling}let r=this[I];for(let{adoption:s}of e)s&&bt(s,r);let o=this[U];for(let{nodes:s}of e)if(s)for(let i of s)i[U]=o}attachChild(e,n){if(n){let s=n[D];e[S]=n,e[D]=s,s?s[S]=e:this[k]=e,n[D]=e}else{e[S]=null;let s=this[k];if(s){let i;for(;i=s[S];)s=i;s[S]=e,e[D]=s}else this[k]=e,e[D]=null}let r=G(e);e[q]=this;let o;if(n){if(o=this.childNodes.indexOf(n),this.childNodes.splice(o,0,e),r){let s=n;for(;s&&!G(s);)s=s[S];s?this.children.splice(this.children.indexOf(s),0,e):this.children.push(e)}}else o=this.childNodes.length,this.childNodes.push(e),r&&this.children.push(e);return{index:o,previousSibling:e[D],nextSibling:e[S]}}queueRemovalMutationRecord(e,n,r,o){Tt&&ne({type:\"childList\",target:e,removedNodes:Jt(n),previousSibling:r,nextSibling:o})}queueInsertionMutationRecords(e){if(Tt)for(let n of e){let{node:r,source:o}=n;o&&this.queueRemovalMutationRecord(o.parent,r,o.previousSibling,o.nextSibling),ne({type:\"childList\",target:this,addedNodes:Jt(r),previousSibling:n.previousSibling,nextSibling:n.nextSibling})}}collectRemovalHookEffects(e,n){return this.nodeType!==X||dt(this)?[]:[[()=>this[M].removeChild?.(this,e,n)]]}collectInsertionHookEffects(e){let n=[];for(let r of e){let{node:o,source:s}=r;s?.parent.nodeType===X&&!dt(s.parent)&&n.push([()=>s.parent[M].removeChild?.(s.parent,o,s.index)]),this.nodeType===X&&!dt(this)&&n.push([()=>this[M].insertChild?.(this,o,r.insertIndex),o])}return n}enqueueInsertionReactions(e,n){for(let r of e){let{nodes:o}=r;o&&(r.shouldDisconnect&&this.enqueueTreeReactions(o,\"disconnectedCallback\"),n&&this.enqueueTreeReactions(o,\"connectedCallback\"))}}enqueueTreeReactions(e,n){so(e,n)}};function oo(t,e,n,r){if(e.parentNode!==t)throw Error(\"not a child of this node\");let o=t[U]?n.treeNodes:void 0,s=e[D],i=e[S],l=Qt(t,e);if(o)for(let d of o)d[U]=!1;bt(n.nodes,r),Tt&&ne({type:\"childList\",target:t,removedNodes:Jt(e),previousSibling:s,nextSibling:i}),o&&so(o,\"disconnectedCallback\");let u=[];t.nodeType===X&&!dt(t)&&u.push([()=>t[M].removeChild?.(t,e,l)]),Oe(u)}function Qt(t,e){let n=e[D],r=e[S];n?n[S]=r:t[k]=r,r&&(r[D]=n);let o=t.childNodes.indexOf(e);return t.childNodes.splice(o,1),G(e)&&t.children.splice(t.children.indexOf(e),1),e[q]=null,e[S]=null,e[D]=null,o}function so(t,e){for(let n of t){let r=n[e];typeof r==\"function\"&&Dt(n,()=>r.call(n))}}function xt(t,e,n,r,o){let{observedAttributes:s}=t.constructor,{attributeChangedCallback:i}=t;i==null||s==null||!s.includes(e)||Dt(t,()=>i.call(t,e,n,r,o))}var en=class{[k]=null;constructor(e){this[Y]=e}getNamedItem(e){let n=String(e),r=this[Y][C]===_?H(n):n,o=this[k];for(;o;){if(o.name===r)return o;o=o[S]}return null}getNamedItemNS(e,n){let r=ce(e),o=String(n),s=this[k];for(;s;){if(s.localName===o&&s[C]===r)return s;s=s[S]}return null}item(e){let n=this[k],r=0;for(;n;){if(r++===e)return n;n=n[S]}return null}get length(){let e=0,n=this[k];for(;n;)e++,n=n[S];return e}removeNamedItem(e){let n=String(e),r=this[Y][C]===_?H(n):n;return $(()=>this.removeNamedItemImmediately(o=>o.name===r))}removeNamedItemNS(e,n){let r=ce(e),o=String(n);return $(()=>this.removeNamedItemImmediately(s=>s.localName===o&&s[C]===r))}removeNamedItemImmediately(e){let n=this[Y],r=this[k],o=null;for(;r!=null;){if(e(r)){o&&(o[S]=r[S]),this[k]===r&&(this[k]=r[S]);let s=r.value;return r[S]=null,r[Y]=null,ze&&ne({type:\"attributes\",target:n,attributeName:r.name,attributeNamespace:r[C],oldValue:s}),n[M].removeAttribute?.(n,r.name,r[C]),xt(n,r.localName,s,null,r[C]),r}o=r,r=r[S]}return null}setNamedItem(e){return $(()=>this.setNamedItemImmediately(e))}setNamedItemImmediately(e){let n=this[Y],r=e[Y];if(r!=null&&r!==n)throw P(\"The attribute is already in use by another element.\",\"InUseAttributeError\");let o=null,s=this[k],i=null;for(;s;){if(s.localName===e.localName&&s[C]===e[C]){if(s===e)return s;i?i[S]=e:this[k]=e,e[S]=s[S],s[S]=null,o=s;break}i=s,s=s[S]}o==null&&(i?i[S]=e:this[k]=e),e[Y]=n,e[I]=n[I],o&&(o[Y]=null);let l=o==null||o.value!==e.value,u=o!=null&&o.name!==e.name;return l&&ze&&ne({type:\"attributes\",target:n,attributeName:e.name,attributeNamespace:e[C],oldValue:o?.value??null}),u&&n[M].removeAttribute?.(n,o.name,o[C]),(l||u)&&n[M].setAttribute?.(n,e.name,e.value,e[C]),l&&xt(n,e.localName,o?.value??null,e.value,e[C]),o}setNamedItemNS(e){return this.setNamedItem(e)}*[Symbol.iterator](){let e=this[k];for(;e;)yield e,e=e[S]}};var Re=class extends ee{nodeType=Ue;[C]=null;[S]=null;[Y]=null;constructor(e,n,r){super(),this[R]=e,this[ge]=n,r&&(this[C]=r)}get nodeName(){return this[R]}set nodeName(e){}get name(){return this[R]}set name(e){}get localName(){if(this[C]==null)return this[R];let e=this[R].indexOf(\":\");return e<0?this[R]:this[R].slice(e+1)}get prefix(){if(this[C]==null)return null;let e=this[R].indexOf(\":\");return e<0?null:this[R].slice(0,e)}get value(){return this[ge]}set value(e){let n=String(e),r=this[Y];if(!r){this[ge]=n;return}$(()=>{let o=this[ge];this[ge]=n,ze&&o!==n&&ne({type:\"attributes\",target:r,attributeName:this[R],attributeNamespace:this[C],oldValue:o}),this[M].setAttribute?.(r,this[R],n,this[C]),xt(r,this.localName,o,n,this[C])})}get nodeValue(){return this.value}set nodeValue(e){this.value=e}get ownerElement(){return this[Y]}get namespaceURI(){return this[C]}get specified(){return!0}};var Ds={amp:\"&\",AMP:\"&\",apos:\"'\",gt:\">\",GT:\">\",lt:\"<\",LT:\"<\",quot:'\"',QUOT:'\"'},Ms=new Set([\"area\",\"base\",\"br\",\"col\",\"embed\",\"hr\",\"img\",\"input\",\"link\",\"meta\",\"param\",\"source\",\"track\",\"wbr\"]),Ls=/(?:<([a-z][a-z0-9-:]*)((?:[\\s]+[^<>'\"=/\\s]+(?:=(['\"])[^]*?\\3|=[^>'\"\\s]*|))*)[\\s]*(\\/?)\\s*>|<\\/([a-z][a-z0-9-:]*)>|<!--(.*?)-->|([^<>]+))/gi,lo=/\\s([^<>'\"=/\\n\\s]+)(?:=([\"'])([\\s\\S]*?)\\2|=([^>'\"\\n\\s]*)|)/g,Hs=\"|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|\",Vs=/^(?:color|face|size)$/i;function io(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 Ds[n];let s=Number.parseInt(r??o,r?10:16);try{return String.fromCodePoint(s)}catch{return e}})}function co(t){return t.namespaceURI===_&&Ms.has(t.localName)}function ao(t){let e=t.localName;return t[C]===J&&(e===\"foreignObject\"||e===\"desc\"||e===\"title\")}function Us(t,e){if(Hs.includes(`|${t}|`))return!0;if(t!==\"font\")return!1;for(let n of e.matchAll(lo))if(Vs.test(n[1]))return!0;return!1}function tn(t,e){let n=e.ownerDocument,r=n.createDocumentFragment(),o=[],s=r;for(let i of t.matchAll(Ls)){let l=i[1];if(l){let u=i[2],d=H(l),p=o[o.length-1]?.element??e,E=p[C]===J?J:_;if(d===\"svg\")E=J;else if(E===J){if(ao(p))E=_;else if(Us(d,u)){for(;o.length>0;){let N=o[o.length-1];if(N.element[C]!==J||ao(N.element))break;o.pop(),s=N.target}E=_}}let m=E===_?d:l,b=n[Ve](m,E,null,m);for(let N of u.matchAll(lo))b.setAttribute(N[1],io(N[3]||N[4]||\"\"));if(s.append(b),co(b)||E!==_&&i[4])continue;o.push({element:b,target:s}),s=E===_&&d===\"template\"?b.content:b}else if(i[5]){let u=H(i[5]);for(let d=o.length-1;d>=0;d--){let p=o[d],E=H(p.element[R]);if(E===u){s=p.target,o.length=d;break}if(p.element[C]===_&&E===\"template\")break}}else i[6]?s.append(n.createComment(i[6])):s.append(io(i[7]))}return r}function nn(t){return fo([{type:\"content\",child:t[k]}])}function uo(t){return fo([{type:\"opening\",node:t}])}function fo(t){let e=[],n;for(;n=t.pop();)switch(n.type){case\"opening\":{let r=n.node;switch(r.nodeType){case X:{let o=r;e.push(`<${o[R]}`);let s=o[se]?.[k];for(;s;){e.push(` ${s[R]}`);let l=s[ge];l!==\"\"&&(l=String(l).replace(/&/g,\"&\").replace(/\"/g,\""\"),e.push(`=\"${l}\"`)),s=s[S]}if(e.push(\">\"),co(o))break;let i=o.namespaceURI===_&&o.localName===\"template\"?o[le]:o;t.push({type:\"closing\",name:o[R]}),t.push({type:\"content\",child:i?.[k]??null});break}case je:{let o=r;e.push(o[Z].replace(/&/g,\"&\").replace(/\"/g,\""\").replace(/</g,\"<\").replace(/>/g,\">\"));break}case $e:{let o=r;e.push(`<!--${o[Z]}-->`);break}}break}case\"content\":{let r=n.child;r&&(t.push({type:\"content\",child:r[S]}),t.push({type:\"opening\",node:r}));break}case\"closing\":e.push(`</${n.name}>`);break}return e.join(\"\")}var V=class extends ie{nodeType=X;[C]=_;[he]=null;get namespaceURI(){return this[C]}get prefix(){return this[he]}get localName(){let e=this[he];return e==null?this[R]:this[R].slice(e.length+1)}get nodeName(){return this[C]===_?Ur(this[R]):this[R]}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 Re(\"slot\",n))}get attributes(){let e=this[se];return e||(e=new en(this),this[se]=e),e}getAttributeNames(){return[...this.attributes].map(e=>e.name)}getElementsByTagName(e){return qt(this,e)}get firstElementChild(){return this.children[0]??null}getElementsByClassName(e){return Yt(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);Ln(r);let s=this[C]===_?H(r):r,i=this.attributes.getNamedItemNS(null,s);i?i.value=o:this.attributes.setNamedItem(new Re(s,o))}setAttributeNS(e,n,r){let o=ce(e),s=String(n),i=String(r),l=kt(o,s,\"attribute\"),u=this.attributes.getNamedItemNS(l.namespace,l.localName);u?u.value=i:this.attributes.setNamedItemNS(new Re(l.qualifiedName,i,l.namespace))}toggleAttribute(e,n){let r=String(e);Ln(r);let o=this[C]===_?H(r):r,s=this.attributes.getNamedItemNS(null,o),i=n===void 0?void 0:!!n;return s==null?i===!1?!1:(this.attributes.setNamedItem(new Re(o,\"\")),!0):i===!0?!0:(this.attributes.removeNamedItemNS(null,o),!1)}getAttribute(e){let n=this.attributes.getNamedItem(e);return n&&n.value}getAttributeNS(e,n){let r=this.attributes.getNamedItemNS(e,n);return r&&r.value}hasAttribute(e){return this.attributes.getNamedItem(e)!=null}hasAttributeNS(e,n){return this.attributes.getNamedItemNS(e,n)!=null}removeAttribute(e){let n=String(e),r=this[C]===_?H(n):n;this.attributes.removeNamedItemNS(null,r)}removeAttributeNS(e,n){this.attributes.removeNamedItemNS(e,n)}get outerHTML(){return uo(this)}get innerHTML(){return nn(this)}set innerHTML(e){if(e==null||e===\"\")this.replaceChildren();else{let n=tn(String(e),this);this.replaceChildren(n)}}};var Fe=class t extends V{[C]=J;get ownerSVGElement(){let e=null,n=this.parentNode;for(;n instanceof t;)e=n,n=n.parentNode;return e}};var Te=class extends Ne{[Z]=\"\";constructor(e){super(),this[Z]=e==null?\"\":String(e)}setData(e){let n=er,r=n?this[Z]:null,o=\"\";e!=null&&(o=typeof e==\"string\"?e:String(e)),this[Z]=o,n&&r!==o&&ne({type:\"characterData\",target:this,oldValue:r}),this[M].setText?.(this,o)}get data(){return this[Z]}set data(e){this.setData(e)}};var Be=class extends Te{nodeType=je;[R]=\"#text\"};var Ge=class extends Te{nodeType=$e;[R]=\"#comment\"};var Ye=class extends ie{nodeType=be;[R]=\"#document-fragment\";[I]=typeof window<\"u\"?window.document:null;getElementById(e){return Gt(this,e)}};var qe=class extends V{get content(){let e=this[le];return e||(e=this.ownerDocument.createDocumentFragment(),e[ye]=this,this[le]=e),e}set content(e){}set innerHTML(e){this.content.replaceChildren(tn(String(e),this))}get innerHTML(){let e=this[le];return e?nn(e):\"\"}};var rn=class extends V{};var on=class extends V{};var sn=class extends V{};var wt=class extends ie{nodeType=ve;[R]=\"#document\";[U]=!0;constructor(e){super(),this.defaultView=e,this[I]=this,this.documentElement=ln(new sn,this,\"html\"),this.body=ln(new rn,this,\"body\"),this.head=ln(new on,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 Yt(this,e)}createElement(e){let n=String(e);return zr(n),tr(this,H(n))}createElementNS(e,n){let r=kt(e,n,\"element\");return tr(this,r.qualifiedName,r.namespace,r.prefix,r.localName)}[Ve](e,n,r,o){return tr(this,e,n,r,o)}createTextNode(e){let n=an(new Be(e),this);return this[M].createText?.(n,n.data),n}createComment(e){return an(new Ge(e),this)}createDocumentFragment(){return an(new Ye,this)}createEvent(){return new j(\"\")}getElementById(e){return Gt(this,e)}getElementsByTagName(e){return qt(this,e)}importNode(e,n){if(e.nodeType===ve)throw P(\"Cannot import a document node\",\"NotSupportedError\");return Bt(e,n,this)}adoptNode(e){if(e[I]===this)return e;let n=Ft(e);return $(()=>{let r=e.parentNode;return r?oo(r,e,n,this):bt(n.nodes,this),e})}};function an(t,e){return Object.defineProperty(t,I,{value:e,writable:!0,enumerable:!1}),t}function tr(t,e,n=_,r=null,o=e){let s;if(n===J)s=new Fe;else if(n===_&&o===\"template\")s=new qe;else if(n===_){let i=t.defaultView.customElements.get(o);s=i?new i:new V}else s=new V;return ln(s,t,e,n,r)}function ln(t,e,n,r=_,o=null){return an(t,e),Object.defineProperties(t,{[R]:{value:n},[C]:{value:r},[he]:{value:o}}),e[M].createElement?.(t,r),t}var cn=class extends j{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 un=class extends j{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 dn=class extends j{constructor(e,n){super(e,n),this.promise=n.promise,this.reason=n.reason}};var fn=class extends j{constructor(e,n){super(e,n),this.oldState=n.oldState,this.newState=n.newState}};var mn=class extends j{constructor(e,n={}){super(e,n),this.relatedTarget=n.relatedTarget??null}};var pn=class extends j{constructor(e,n={}){super(e,n),this.clipboardData=n.clipboardData??null}};var hn=class extends V{};var js=/^[a-z][^A-Z\\u0000\\t\\n\\f\\r />]*-[^A-Z\\u0000\\t\\n\\f\\r />]*$/u,$s=new Set([\"annotation-xml\",\"color-profile\",\"font-face\",\"font-face-src\",\"font-face-uri\",\"font-face-format\",\"font-face-name\",\"missing-glyph\"]);function mo(t){return js.test(t)&&!$s.has(t)}function po(t){return P(`Invalid custom element name: \"${t}\"`,\"SyntaxError\")}var gn=class{registry=new Map;listenersByName=new Map;define(e,n,r){if(!mo(e))throw po(e);if(this.registry.has(e))throw P(`A custom element named \"${e}\" has already been defined`,\"NotSupportedError\");if(this.getName(n)!=null)throw P(\"This constructor has already been registered in this custom element registry\",\"NotSupportedError\");this.registry.set(e,n);let o=this.listenersByName.get(e);if(o!=null){this.listenersByName.delete(e);for(let s of o)s(n)}}get(e){return this.registry.get(e)}getName(e){for(let[n,r]of this.registry)if(r===e)return n;return null}whenDefined(e){if(!mo(e))return Promise.reject(po(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 zs=[\"onerror\",\"onunhandledrejection\"],go=Symbol.for(\"@remote-dom/polyfill/global-property\");function yo(t){return Object.getOwnPropertyDescriptors(t)}function bo(t){let e={};for(let[n,r]of Object.entries(Object.getOwnPropertyDescriptors(Ee.prototype)))n!==\"constructor\"&&typeof r.value==\"function\"&&(r.value=nr(r.value.bind(t)),e[n]=r);return e}function Eo(t){let e={};for(let n of zs)e[n]={configurable:!0,enumerable:!0,get:nr(()=>t[n]),set:nr(r=>{t[n]=r})};return e}function Fs(t){return Object.assign(yo(t),bo(t),Eo(t))}function nr(t){return Object.defineProperty(t,go,{value:!0}),t}function ho(t,e){for(let n of Reflect.ownKeys(e)){let r=Bs(t,n);(r==null||Gs(r))&&Object.defineProperty(t,n,e[n])}}function Bs(t,e){let n=t;for(;n;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function Gs(t){return[t.value,t.get,t.set].some(e=>typeof e==\"function\"&&e[go]===!0)}var Ce=class extends Ee{[M]={};[Rt]=[];[Se]=qs(this);name=\"\";window=this;parent=this;self=this;top=this;document=new wt(this);customElements=new gn;location=globalThis.location;navigator=globalThis.navigator;Event=j;ErrorEvent=un;PromiseRejectionEvent=dn;ToggleEvent=fn;FocusEvent=mn;ClipboardEvent=pn;EventTarget=Ee;CustomEvent=cn;Node=ee;ParentNode=ie;ChildNode=Ne;DocumentFragment=Ye;Document=wt;CharacterData=Te;Comment=Ge;Text=Be;Element=V;HTMLElement=hn;SVGElement=Fe;HTMLTemplateElement=qe;MutationObserver=Zt;#t=null;#n=null;#e=null;static with(...e){let n=this;return class extends n{constructor(){super();for(let o of e)Ys(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=yo(e),s=Object.assign(bo(e),Eo(e));delete o.self,Object.defineProperties(globalThis,o),ho(globalThis,s),typeof n>\"u\"||n===r&&n!==globalThis?Object.defineProperty(globalThis,\"self\",{value:e,configurable:!0,writable:!0,enumerable:!0}):n!==globalThis&&(Object.defineProperties(n,o),ho(n,s))}static setGlobalThis(e){for(let n in e)e[n]===e&&(e[n]=globalThis);Object.defineProperties(globalThis,Fs(e))}};function Ys(t,e){t[Rt].push(e(t)??{})}function qs(t){return{createElement:de.bind(null,t,\"createElement\"),setAttribute:de.bind(null,t,\"setAttribute\"),removeAttribute:de.bind(null,t,\"removeAttribute\"),createText:de.bind(null,t,\"createText\"),setText:de.bind(null,t,\"setText\"),insertChild:de.bind(null,t,\"insertChild\"),removeChild:de.bind(null,t,\"removeChild\"),addEventListener:de.bind(null,t,\"addEventListener\"),removeEventListener:de.bind(null,t,\"removeEventListener\")}}function de(t,e,...n){for(let s of t[Rt])s[e]?.apply(s,n);let r=t[M];r[e]?.apply(r,n)}var yn=new Ce;var rr=\"~\";var xe=new WeakMap;function We(t){return xe.get(t)}var ar=new WeakMap,Xs=0;function re(t){let e=ar.get(t);return e==null&&(e=String(Xs++),bn(t,e)),e}function bn(t,e){ar.set(t,e)}var sr=new WeakMap;function Ks(t){return sr.get(t)}var ir=new WeakMap;function Zs(t){let e=ir.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 Js=new WeakMap;function Qs(t){return Js.get(t)}function lr(t,e,n){let r=sr.get(t);if(r==null&&(r={},sr.set(t,r)),r[e]===n)return;r[e]=n;let o=xe.get(t);o?.mutate([[3,re(t),e,n,1]])}function En(t,e,n){let r=ir.get(t);if(r==null&&(r={},ir.set(t,r)),r[e]===n)return;n==null?delete r[e]:r[e]=String(n);let o=xe.get(t);o?.mutate([[3,re(t),e,n,2]])}function Xe(t,e){if(xe.get(t)!==e&&(xe.set(t,e),t.childNodes))for(let r=0;r<t.childNodes.length;r++)Xe(t.childNodes[r],e)}function Nn(t){if(xe.get(t)!=null&&(xe.delete(t),t.childNodes))for(let n=0;n<t.childNodes.length;n++)Nn(t.childNodes[n])}function Ke(t){let{nodeType:e}=t;switch(e){case 1:return{id:re(t),type:e,element:t.localName,properties:or(Ks(t)),attributes:or(Zs(t)),eventListeners:or(Qs(t)),children:Array.from(t.childNodes).map(Ke)};case 3:case 8:return{id:re(t),type:e,data:t.data};default:throw new Error(`Cannot serialize node of type ${t.nodeType} (${typeof t.nodeType})`)}}function or(t){return t?{...t}:void 0}function cr(t,e,...n){let r=ar.get(t),o=xe.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 Ze=yn[M];Ze.insertChild=(t,e,n)=>{let r=We(t);r!=null&&(Xe(e,r),r.mutate([[0,re(t),Ke(e),n]]))};Ze.removeChild=(t,e,n)=>{let r=We(t);r!=null&&(Nn(e),r.mutate([[1,re(t),n]]))};Ze.setText=(t,e)=>{let n=We(t);n?.mutate([[2,re(t),e]])};Ze.setAttribute=(t,e,n)=>{t.tagName.includes(\"-\")||En(t,e,n)};Ze.removeAttribute=(t,e)=>{t.tagName.includes(\"-\")||En(t,e)};Ce.setGlobal(yn);var xo=[\"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\"],wo=[\"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\"],So=[\"self\",\"postMessage\",\"setTimeout\",\"clearTimeout\",\"setInterval\",\"clearInterval\",\"queueMicrotask\",\"structuredClone\",\"crypto\",\"console\",\"DOMException\"],vo=[\"TEMPORARY\",\"PERSISTENT\"],ou=Object.freeze([...xo,...wo,...So,...vo]),su=Object.freeze([\"constructor\",\"__defineGetter__\",\"__defineSetter__\",\"hasOwnProperty\",\"__lookupGetter__\",\"__lookupSetter__\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"toString\",\"valueOf\",\"__proto__\",\"toLocaleString\"]),To=t=>typeof t==\"symbol\"?`[${t.description??\"symbol\"}]`:t;function Oo(t=globalThis,e=[],n={}){let r=[],o=[],s=new Set([...xo,...wo,...So,...e,\"constructor\",Symbol.toStringTag]),i=(g,a)=>{let f=Reflect.getOwnPropertyDescriptor(g,a);return f===void 0||!(\"value\"in f)||f.writable||f.configurable?!1:n.primitivesStay&&typeof a==\"symbol\"&&(typeof f.value!=\"object\"||f.value===null)&&typeof f.value!=\"function\"?!0:vo.includes(a)&&typeof f.value==\"number\"},l=t,u=l.setTimeout,d=l.setInterval,p=l.crypto,E=(g,a)=>function(f,T,...x){if(typeof f!=\"function\")throw new TypeError(`${a} takes a function: a guest view cannot run code from text`);return g.call(t,f,T,...x)},m=p?Object.freeze({getRandomValues:g=>p.getRandomValues(g)}):void 0,b=l.document?.defaultView;if(b&&b!==l)for(let g of Reflect.ownKeys(b))typeof g==\"symbol\"||s.has(g)||Reflect.deleteProperty(b,g)||o.push(`window.${g}`);let N=[];for(let g=t;g&&g!==Object.prototype;g=Object.getPrototypeOf(g))N.push(g);for(let g of N)for(let a of Reflect.ownKeys(g))s.has(a)||(Reflect.deleteProperty(g,a)?r.push(To(a)):i(g,a)||o.push(To(a)));let v=()=>function(){throw new EvalError(\"A guest view cannot make code from text.\")},y=[Function.prototype,Object.getPrototypeOf(async function(){}),Object.getPrototypeOf(function*(){}),Object.getPrototypeOf(async function*(){})];for(let g of y){let a=v();Object.defineProperty(a,\"prototype\",{value:g,writable:!1,enumerable:!1,configurable:!1}),Reflect.defineProperty(g,\"constructor\",{value:a,writable:!1,enumerable:!1,configurable:!1})||o.push(\"Function.prototype.constructor\"),g===Function.prototype&&Reflect.defineProperty(t,\"Function\",{value:a,writable:!0,enumerable:!1,configurable:!0})}let c=(g,a)=>{Reflect.defineProperty(t,g,{value:a,writable:!0,enumerable:!0,configurable:!0})||o.push(g)};c(\"setTimeout\",E(u,\"setTimeout\")),c(\"setInterval\",E(d,\"setInterval\")),m&&c(\"crypto\",m);for(let g of N.slice(1))Object.freeze(g);for(let g of Reflect.ownKeys(t)){let a=Reflect.getOwnPropertyDescriptor(t,g);Reflect.defineProperty(t,g,\"value\"in a?{...a,writable:!1,configurable:!1}:{...a,configurable:!1})}let h;try{h=Reflect.preventExtensions(t)}catch{h=!1}return{removed:r,stuck:o,sealed:h}}var St=class extends HTMLElement{constructor(){super(),bn(this,rr)}connect(e){if(We(this)===e||(Xe(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,rr,Ke(o),r])}e.mutate(n)}updateRemoteProperty(e,n){lr(this,e,n)}callRemoteMethod(e,...n){return cr(this,e,...n)}};var w={},ur={empty:!0},ei={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\"},Qe={div:w,section:w,article:w,aside:w,header:w,footer:w,nav:w,hgroup:w,search:w,address:w,figure:w,figcaption:w,blockquote:w,p:w,pre:w,hr:ur,br:ur,wbr:ur,h1:w,h2:w,h3:w,h4:w,h5:w,h6:w,span:w,strong:w,em:w,b:w,i:w,u:w,s:w,small:w,mark:w,abbr:w,cite:w,q:w,code:w,kbd:w,samp:w,var:w,sub:w,sup:w,dfn:w,bdi:w,bdo:w,ruby:w,rt:w,rp:w,time:{attributes:{datetime:\"text\"}},data:{attributes:{value:\"text\"}},del:{attributes:{datetime:\"text\"}},ins:{attributes:{datetime:\"text\"}},a:w,ul:w,menu:w,dl:w,dt:w,dd:w,ol:{attributes:{start:\"number\",reversed:\"boolean\",type:{oneOf:[\"1\",\"a\",\"A\",\"i\",\"I\"]}}},li:{attributes:{value:\"number\"}},table:w,caption:w,thead:w,tbody:w,tfoot:w,tr:w,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:w,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:w,output:w,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\"]}}}},ti=[\"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\"],ni={id:\"text\",class:\"text\",style:\"style\",lang:\"text\",role:\"text\",tabindex:{oneOf:[\"-1\",\"0\"]},transform:\"geometry\",...Object.fromEntries(ti.map(t=>[t,\"css\"]))},Je={x:\"geometry\",y:\"geometry\",width:\"geometry\",height:\"geometry\"},Tn={viewBox:\"geometry\",preserveAspectRatio:\"geometry\"},Ao={gradientUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},gradientTransform:\"geometry\",spreadMethod:{oneOf:[\"pad\",\"reflect\",\"repeat\"]},href:\"fragment\"},xn={svg:{attributes:{...Je,...Tn}},g:w,defs:w,symbol:{attributes:{...Je,...Tn,refX:\"geometry\",refY:\"geometry\"}},use:{attributes:{...Je,href:\"fragment\"}},title:w,desc:w,path:{attributes:{d:\"geometry\",pathLength:\"number\"}},rect:{attributes:{...Je,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\",...Ao}},radialGradient:{attributes:{cx:\"geometry\",cy:\"geometry\",r:\"geometry\",fx:\"geometry\",fy:\"geometry\",fr:\"geometry\",...Ao}},stop:{attributes:{offset:\"geometry\"}},clipPath:{attributes:{clipPathUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},mask:{attributes:{...Je,maskUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},maskContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},pattern:{attributes:{...Je,...Tn,patternUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternTransform:\"geometry\",href:\"fragment\"}},marker:{attributes:{...Tn,markerWidth:\"geometry\",markerHeight:\"geometry\",refX:\"geometry\",refY:\"geometry\",orient:\"geometry\",markerUnits:{oneOf:[\"strokeWidth\",\"userSpaceOnUse\"]}}}};var Ro=[\"alert\",\"alertdialog\",\"dialog\",\"banner\",\"main\",\"navigation\",\"contentinfo\",\"complementary\",\"search\",\"form\",\"region\",\"application\",\"status\",\"log\",\"marquee\",\"timer\"],vt={nav:\"div\",header:\"div\",footer:\"div\",aside:\"div\",search:\"div\",output:\"span\"},wn={section:[\"aria-label\",\"aria-labelledby\",\"title\"]};function ri(t){return/^aria-[a-z]+$/.test(t)}function oi(t){return/^data-[a-z0-9][a-z0-9_.-]*$/.test(t)}var Co=[\"display\",\"position\",\"top\",\"right\",\"bottom\",\"left\",\"inset\",\"inset-block\",\"inset-inline\",\"inset-block-start\",\"inset-block-end\",\"inset-inline-start\",\"inset-inline-end\",\"width\",\"height\",\"min-width\",\"min-height\",\"max-width\",\"max-height\",\"inline-size\",\"block-size\",\"min-inline-size\",\"min-block-size\",\"max-inline-size\",\"max-block-size\",\"margin\",\"margin-top\",\"margin-right\",\"margin-bottom\",\"margin-left\",\"margin-block\",\"margin-inline\",\"margin-block-start\",\"margin-block-end\",\"margin-inline-start\",\"margin-inline-end\",\"padding\",\"padding-top\",\"padding-right\",\"padding-bottom\",\"padding-left\",\"padding-block\",\"padding-inline\",\"padding-block-start\",\"padding-block-end\",\"padding-inline-start\",\"padding-inline-end\",\"box-sizing\",\"overflow\",\"overflow-x\",\"overflow-y\",\"overflow-wrap\",\"float\",\"clear\",\"z-index\",\"aspect-ratio\",\"object-fit\",\"object-position\",\"vertical-align\",\"isolation\",\"contain\",\"container\",\"container-type\",\"container-name\",\"content-visibility\",\"flex\",\"flex-direction\",\"flex-wrap\",\"flex-flow\",\"flex-grow\",\"flex-shrink\",\"flex-basis\",\"order\",\"grid\",\"grid-template\",\"grid-template-columns\",\"grid-template-rows\",\"grid-template-areas\",\"grid-auto-columns\",\"grid-auto-rows\",\"grid-auto-flow\",\"grid-area\",\"grid-column\",\"grid-row\",\"grid-column-start\",\"grid-column-end\",\"grid-row-start\",\"grid-row-end\",\"gap\",\"row-gap\",\"column-gap\",\"align-items\",\"align-content\",\"align-self\",\"justify-items\",\"justify-content\",\"justify-self\",\"place-items\",\"place-content\",\"place-self\",\"columns\",\"column-count\",\"column-width\",\"column-rule\",\"column-rule-color\",\"column-rule-style\",\"column-rule-width\",\"column-span\",\"column-fill\",\"color\",\"background\",\"background-color\",\"background-image\",\"background-position\",\"background-position-x\",\"background-position-y\",\"background-size\",\"background-repeat\",\"background-origin\",\"background-clip\",\"background-attachment\",\"background-blend-mode\",\"border\",\"border-top\",\"border-right\",\"border-bottom\",\"border-left\",\"border-block\",\"border-inline\",\"border-block-start\",\"border-block-end\",\"border-inline-start\",\"border-inline-end\",\"border-width\",\"border-style\",\"border-color\",\"border-top-width\",\"border-right-width\",\"border-bottom-width\",\"border-left-width\",\"border-top-style\",\"border-right-style\",\"border-bottom-style\",\"border-left-style\",\"border-top-color\",\"border-right-color\",\"border-bottom-color\",\"border-left-color\",\"border-radius\",\"border-top-left-radius\",\"border-top-right-radius\",\"border-bottom-right-radius\",\"border-bottom-left-radius\",\"border-start-start-radius\",\"border-start-end-radius\",\"border-end-start-radius\",\"border-end-end-radius\",\"border-collapse\",\"border-spacing\",\"outline\",\"outline-width\",\"outline-style\",\"outline-color\",\"outline-offset\",\"box-shadow\",\"opacity\",\"visibility\",\"mix-blend-mode\",\"filter\",\"backdrop-filter\",\"clip-path\",\"accent-color\",\"caret-color\",\"color-scheme\",\"appearance\",\"-webkit-appearance\",\"font\",\"font-family\",\"font-size\",\"font-weight\",\"font-style\",\"font-stretch\",\"font-variant\",\"font-variant-numeric\",\"font-variant-caps\",\"font-variant-ligatures\",\"font-feature-settings\",\"font-variation-settings\",\"font-kerning\",\"font-optical-sizing\",\"font-size-adjust\",\"font-synthesis\",\"line-height\",\"letter-spacing\",\"word-spacing\",\"text-align\",\"text-align-last\",\"text-indent\",\"text-transform\",\"text-decoration\",\"text-decoration-line\",\"text-decoration-color\",\"text-decoration-style\",\"text-decoration-thickness\",\"text-underline-offset\",\"text-underline-position\",\"text-shadow\",\"text-overflow\",\"text-wrap\",\"text-wrap-mode\",\"text-wrap-style\",\"white-space\",\"white-space-collapse\",\"word-break\",\"line-break\",\"hyphens\",\"tab-size\",\"direction\",\"unicode-bidi\",\"writing-mode\",\"text-orientation\",\"text-rendering\",\"-webkit-font-smoothing\",\"-webkit-line-clamp\",\"-webkit-box-orient\",\"line-clamp\",\"-webkit-text-fill-color\",\"-webkit-background-clip\",\"list-style\",\"list-style-type\",\"list-style-position\",\"content\",\"quotes\",\"counter-reset\",\"counter-increment\",\"counter-set\",\"table-layout\",\"caption-side\",\"empty-cells\",\"transform\",\"transform-origin\",\"transform-box\",\"transform-style\",\"translate\",\"rotate\",\"scale\",\"perspective\",\"perspective-origin\",\"backface-visibility\",\"transition\",\"transition-property\",\"transition-duration\",\"transition-timing-function\",\"transition-delay\",\"transition-behavior\",\"animation\",\"animation-name\",\"animation-duration\",\"animation-timing-function\",\"animation-delay\",\"animation-iteration-count\",\"animation-direction\",\"animation-fill-mode\",\"animation-play-state\",\"animation-composition\",\"will-change\",\"cursor\",\"pointer-events\",\"user-select\",\"-webkit-user-select\",\"touch-action\",\"resize\",\"scroll-behavior\",\"overscroll-behavior\",\"overscroll-behavior-x\",\"overscroll-behavior-y\",\"scroll-snap-type\",\"scroll-snap-align\",\"scroll-snap-stop\",\"scroll-margin\",\"scroll-padding\",\"scrollbar-width\",\"scrollbar-color\",\"scrollbar-gutter\",\"fill\",\"fill-opacity\",\"fill-rule\",\"stroke\",\"stroke-width\",\"stroke-linecap\",\"stroke-linejoin\",\"stroke-dasharray\",\"stroke-dashoffset\",\"stroke-opacity\",\"stroke-miterlimit\",\"stop-color\",\"stop-opacity\",\"clip-rule\",\"marker\",\"marker-start\",\"marker-mid\",\"marker-end\",\"paint-order\",\"vector-effect\",\"shape-rendering\",\"text-anchor\",\"dominant-baseline\",\"alignment-baseline\",\"r\",\"cx\",\"cy\",\"rx\",\"ry\",\"x\",\"y\",\"d\",\"mask\"],ko=[\"var\",\"env\",\"calc\",\"min\",\"max\",\"clamp\",\"round\",\"mod\",\"rem\",\"abs\",\"sign\",\"sin\",\"cos\",\"tan\",\"asin\",\"acos\",\"atan\",\"atan2\",\"pow\",\"sqrt\",\"hypot\",\"log\",\"exp\",\"rgb\",\"rgba\",\"hsl\",\"hsla\",\"hwb\",\"lab\",\"lch\",\"oklab\",\"oklch\",\"color\",\"color-mix\",\"light-dark\",\"linear-gradient\",\"radial-gradient\",\"conic-gradient\",\"repeating-linear-gradient\",\"repeating-radial-gradient\",\"repeating-conic-gradient\",\"translate\",\"translatex\",\"translatey\",\"translatez\",\"translate3d\",\"rotate\",\"rotatex\",\"rotatey\",\"rotatez\",\"rotate3d\",\"scale\",\"scalex\",\"scaley\",\"scalez\",\"scale3d\",\"skew\",\"skewx\",\"skewy\",\"matrix\",\"matrix3d\",\"perspective\",\"cubic-bezier\",\"steps\",\"linear\",\"repeat\",\"minmax\",\"fit-content\",\"blur\",\"brightness\",\"contrast\",\"drop-shadow\",\"grayscale\",\"hue-rotate\",\"invert\",\"saturate\",\"sepia\",\"opacity\",\"circle\",\"ellipse\",\"inset\",\"polygon\",\"path\",\"xywh\",\"rect\",\"counter\",\"counters\"],_o=[\"fill\",\"stroke\",\"clip-path\",\"mask\",\"marker\",\"marker-start\",\"marker-mid\",\"marker-end\"],Po=[\"media\",\"supports\",\"container\",\"keyframes\"],Io={position:[\"static\",\"relative\",\"absolute\"],appearance:[\"auto\",\"none\",\"menulist-button\",\"textfield\"],\"-webkit-appearance\":[\"auto\",\"none\",\"menulist-button\",\"textfield\"]},Do=[\"host\",\"host-context\",\"slotted\",\"part\",\"backdrop\",\"picker\",\"view-transition\",\"view-transition-group\",\"view-transition-image-pair\",\"view-transition-old\",\"view-transition-new\"],dr=64e3,fr=4e3,Mo=1e5,Lo=512e3,mr=1e4,Ho=\"http://www.w3.org/1999/xhtml\",Vo=\"http://www.w3.org/2000/svg\",si=new Map(Object.keys(xn).map(t=>[t.toLowerCase(),t]));function Sn(t){return si.get(t.toLowerCase())}function vn(t,e,n){let r=n.toLowerCase(),o=t===\"html\"?[Qe[e]?.attributes,ei]:[xn[e]?.attributes,ni],s=t===\"svg\"&&r===\"xlink:href\"?\"href\":r;for(let i of o)if(i){for(let[l,u]of Object.entries(i))if(l.toLowerCase()===s)return{name:l,kind:u}}if(ri(r)||oi(r))return{name:r,kind:\"text\"}}var Uo=\"~\",On=t=>typeof t==\"object\"&&t!==null&&!Array.isArray(t),ae=(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=>ae(n,e+1)):Object.fromEntries(Object.entries(t).map(([n,r])=>[n,ae(r,e+1)]))};function jo(){let t=new Map,e=new Map,n=new Map([[Uo,{children:[],listeners:new Map}]]),r=0,o=d=>{let p=e.get(d);return p===void 0&&(p=r+=1,e.set(d,p),t.set(p,{listener:d,count:0})),t.get(p).count+=1,p},s=d=>{let p=t.get(d);p&&(p.count-=1,!(p.count>0)&&(t.delete(d),e.delete(p.listener)))},i=d=>{let p=n.get(d);if(p){n.delete(d);for(let E of p.listeners.values())s(E);for(let E of p.children)i(E)}},l=(d,p,E=0)=>{if(!On(d)||E>64)return ae(d);let m=typeof d.id==\"string\"?d.id:void 0,b=p&&m!==void 0&&m!==Uo;b&&i(m);let N={children:[],listeners:new Map};b&&n.set(m,N);let v={};for(let[y,c]of Object.entries(d))y===\"children\"&&Array.isArray(c)?v[y]=c.map(h=>{let g=l(h,b,E+1);return b&&On(h)&&typeof h.id==\"string\"&&N.children.push(h.id),g}):y===\"eventListeners\"&&On(c)?v[y]=Object.fromEntries(Object.entries(c).map(([h,g])=>{if(typeof g!=\"function\"||!b)return[h,void 0];let a=o(g);return N.listeners.set(h,a),[h,{listener:a}]})):v[y]=ae(c,E+1);return v},u=d=>{if(!Array.isArray(d))return ae(d);let[p,E]=d,m=typeof E==\"string\"?n.get(E):void 0;if(p===0){let b=l(d[2],m!==void 0),N=On(d[2])?d[2].id:void 0;if(m&&typeof N==\"string\"&&n.has(N)){let v=Number(d[3]);m.children.splice(Number.isInteger(v)&&v>=0&&v<=m.children.length?v:m.children.length,0,N)}return[p,ae(E),b,ae(d[3])]}if(p===1){let b=Number(d[2]);return m&&Number.isInteger(b)&&b>=0&&b<m.children.length&&i(m.children.splice(b,1)[0]),ae(d)}if(p===3&&d[4]===3){let b=String(d[2]),N=d[3],v=m&&typeof N==\"function\"?o(N):void 0,y=m?.listeners.get(b);return y!==void 0&&s(y),v===void 0?m?.listeners.delete(b):m.listeners.set(b,v),[p,ae(E),b,v===void 0?void 0:{listener:v},3]}return ae(d)};return{encode:d=>d.map(u),listener:d=>t.get(d)?.listener,get listening(){return t.size},get nodes(){return n.size-1}}}var pr=\"graview-view-root\",ii=t=>t.replace(/&/g,\"&\").replace(/</g,\"<\").replace(/>/g,\">\").replace(/\"/g,\""\").replace(/'/g,\"'\"),ai=t=>Object.freeze({html:t,toString:()=>t}),$o=t=>typeof t==\"object\"&&t!==null&&typeof t.html==\"string\"&&Object.isFrozen(t),zo=t=>t==null||t===!1?\"\":Array.isArray(t)?t.map(zo).join(\"\"):$o(t)?t.html:ii(String(t));function Fo(t){customElements.get(pr)||customElements.define(pr,St);let e=Event,n=jo(),r=new Set,o=new Set,s,i=[];for(let a of[\"closest\",\"matches\",\"dataset\"]){let f=()=>{throw new TypeError(`A view's element has no ${a}: graview.on hands event.element, the element its selector matched; read event.element.getAttribute(\"data-\\u2026\").`)};a in Element.prototype||Object.defineProperty(Element.prototype,a,a===\"dataset\"?{get:f}:{value:f})}let l=document.createElement(pr),u=a=>{let f=T=>{for(let x of Array.from(T.childNodes)){if(x.nodeType!==1)continue;if(re(x)===a)return x;let O=f(x);if(O)return O}};return f(l)},d=a=>{let f=u(a.target);if(!f)return;let T=new e(a.event,{bubbles:!0});for(let x of[\"value\",\"checked\",\"key\",\"pressed\"])a[x]!==void 0&&Object.defineProperty(T,x,{value:a[x],enumerable:!0});f.dispatchEvent(T);for(let x of o){if(x.type!==a.event)continue;let O;try{O=new Set(Array.from(l.querySelectorAll(x.selector)))}catch{continue}for(let A=f;A&&A!==l;A=A.parentNode)if(O.has(A)){x.listener(Object.freeze({type:a.event,target:f,element:A,...a.value!==void 0?{value:a.value}:{},...a.checked!==void 0?{checked:a.checked}:{},...a.key!==void 0?{key:a.key}:{},...a.pressed!==void 0?{pressed:a.pressed}:{}}));break}}},p=a=>{if(a.type===\"dom-event\"&&typeof a.target==\"string\")return d(a);if(a.type===\"notice\")return t.warn(a.text);if(a.type!==\"props\")return;s=a.props;let f=t.now();for(let O of r)try{O(a.props)}catch(A){t.threw(A)}let T=t.now()-f,x=a.push;typeof x==\"number\"&&t.microtask(()=>t.microtask(()=>t.send({type:\"pushed\",push:x,ms:T})))},E;l.connect({mutate(a){E||(E=[],t.microtask(()=>{let f=E??[];E=void 0,t.send({type:\"render\",records:n.encode(f)})})),E.push(...a)},call:()=>{}});let m=a=>a.nodeType===1?a.getAttribute(\"data-key\")??a.getAttribute(\"id\"):null,b=(a,f)=>a.nodeType===f.nodeType&&(a.nodeType!==1||a.localName===f.localName&&a.namespaceURI===f.namespaceURI&&m(a)===m(f));function N(a,f){let T=Array.from(f.childNodes),x=0;for(let O of T){let A=a.childNodes[x]??null;if(A&&b(A,O)){v(A,O),x+=1;continue}if(m(O)!==null){let pe=Array.from(a.childNodes).slice(x+1).find(at=>b(at,O));if(pe){a.insertBefore(pe,A),v(pe,O),x+=1;continue}}a.insertBefore(O,A),x+=1}for(;a.childNodes.length>x;)a.removeChild(a.lastChild)}function v(a,f){if(a.nodeType!==1){a.data!==f.data&&(a.data=f.data);return}let T=a,x=f;for(let O of T.getAttributeNames())x.hasAttribute(O)||T.removeAttribute(O);for(let O of x.getAttributeNames()){let A=x.getAttribute(O);T.getAttribute(O)!==A&&T.setAttribute(O,A)}N(T,x)}function y(a,f,T){for(let x of Array.from(a.childNodes)){if(x.nodeType!==1)continue;let O=x,A=O.localName,it=f||A.toLowerCase()===\"svg\",pe=it?Sn(A):Object.prototype.hasOwnProperty.call(Qe,A.toLowerCase())?A.toLowerCase():void 0;if(!pe){T.add(`<${A}>`);continue}for(let at of O.getAttributeNames())(!vn(it?\"svg\":\"html\",pe,at)||!it&&wn[pe]?.includes(at.toLowerCase()))&&T.add(`${pe} ${at}`);y(O,it,T)}}function c(a){let f=document.createElement(\"div\"),T=Array.isArray(a)?a:[a];for(let O of T)if(O!=null)if(typeof O==\"string\"||$o(O)){let A=document.createElement(\"div\");A.innerHTML=typeof O==\"string\"?O:O.html,f.append(...Array.from(A.childNodes))}else f.append(O);let x=new Set;y(f,!1,x),i=[...x],i.length>0&&t.warn(`The host will not draw: ${i.join(\", \")}`),N(l,f)}let h;return{view:Object.freeze({get props(){return s},onProps(a){return r.add(a),s&&a(s),()=>void r.delete(a)},render:c,style(a){typeof a!=\"string\"||a===h||(h=a,t.send({type:\"style\",css:a}))},on(a,f,T){let x={type:a,selector:f,listener:T};return o.add(x),()=>void o.delete(x)},act:(a,f={})=>t.act(a,f),navigate(a){typeof a==\"string\"?t.navigate(a):a&&typeof a.place==\"string\"&&t.send({type:\"navigate\",place:a.place})},html(a,...f){return ai(a.reduce((T,x,O)=>T+x+(O<f.length?zo(f[O]):\"\"),\"\"))},get refused(){return i},get hardening(){return t.hardening()}}),hear:p}}var et=t=>` Its places: ${t.map(e=>`\"${e}\"`).join(\", \")||\"none\"}.`,hr=t=>`\"${t.length>80?`${t.slice(0,79)}\\u2026`:t}\"`;var li=\"http://www.w3.org/1999/xhtml\",tt=class{constructor(e){this.ownerDocument=e}parentNode=null;childNodes=[];get firstChild(){return this.childNodes[0]??null}get parentElement(){return this.parentNode instanceof _e?this.parentNode:null}get textContent(){return this.childNodes.map(e=>e.textContent).join(\"\")}insertBefore(e,n){e.parentNode&&e.parentNode.removeChild(e);let r=n?this.childNodes.indexOf(n):-1;return r<0?this.childNodes.push(e):this.childNodes.splice(r,0,e),e.parentNode=this,e}appendChild(e){return this.insertBefore(e,null)}removeChild(e){let n=this.childNodes.indexOf(e);return n>=0&&this.childNodes.splice(n,1),e.parentNode=null,e}},ke=class extends tt{constructor(n,r){super(n);this.data=r}nodeType=3;get textContent(){return this.data}},gr=class extends tt{nodeType=8;get textContent(){return\"\"}},_e=class extends tt{constructor(n,r,o){super(n);this.namespaceURI=r;this.localName=o}nodeType=1;attributes=new Map;value=\"\";checked=!1;selected=!1;setAttribute(n,r){this.attributes.set(n,String(r))}removeAttribute(n){this.attributes.delete(n)}getAttribute(n){return this.attributes.get(n)??null}hasAttribute(n){return this.attributes.has(n)}closest(n){for(let r=this;r;r=r.parentElement)if(r.localName===n)return r;return null}},yr=class extends tt{nodeType=9;constructor(){super(null)}createElementNS(e,n){return new _e(this,e,n)}createElement(e){return new _e(this,li,e)}createTextNode(e){return new ke(this,e)}createComment(e){return new gr(this)}};function Bo(){let t=new yr,e=t.createElement(\"div\");return e.setAttribute(\"data-graview-view-root\",\"\"),t.appendChild(e),{document:t,root:e}}var br={h1:1,h2:2,h3:3,h4:4,h5:5,h6:6},Go=new Set([\"a\",\"abbr\",\"b\",\"bdi\",\"bdo\",\"br\",\"cite\",\"code\",\"data\",\"del\",\"dfn\",\"em\",\"i\",\"ins\",\"kbd\",\"q\",\"s\",\"samp\",\"small\",\"span\",\"strong\",\"sub\",\"sup\",\"time\",\"u\",\"var\",\"wbr\",\"label\"]),Yo=new Set([\"style\",\"template\",\"datalist\",\"option\"]),L=t=>t.replace(/\\s+/g,\" \").trim(),K=t=>t instanceof _e,Ot=t=>t.hasAttribute(\"hidden\")||t.getAttribute(\"aria-hidden\")===\"true\";function z(t){return t instanceof ke?t.data:!K(t)||Ot(t)||Yo.has(t.localName)?\"\":t.localName===\"br\"?\" \":t.localName===\"img\"?t.getAttribute(\"alt\")??\"\":t.childNodes.map(z).join(t.localName===\"td\"||t.localName===\"th\"?\" \":\"\")}function*Pe(t){for(let e of t.childNodes)K(e)&&(yield e,yield*Pe(e))}function qo(t,e){let n=[],r=new Set,o=new Set,s=new Map;for(let m of[...e.props.node?[e.props.node]:[],...e.props.nodes??[]])s.set(m.id,m);let i=new Set(e.places);for(let m of Pe(t)){let b=m.getAttribute(\"data-act\");b!==null&&r.add(b);let N=m.getAttribute(\"data-record\");N!==null&&(o.add(N),!s.has(N)&&!i.has(N)&&n.push({at:`drawing <${m.localName} data-record=\"${N}\">`,says:`It names \"${N}\", which this seat was not shown and is no place of this app: the host will not follow it. A view goes to a record by its id, or to a place by its slug.${et(e.places)}`}));let v=m.getAttribute(\"data-place\");v!==null&&!i.has(v)&&n.push({at:`drawing <${m.localName} data-place=\"${v}\">`,says:`It names the place \"${v}\", which this app does not have.${et(e.places)}`})}let l=m=>{let b=m.getAttribute(\"data-record\");if(b!==null)return b;let N=m.getAttribute(\"data-key\")??m.getAttribute(\"id\");if(N!==null&&s.has(N))return N;let v=new Set;for(let y of Pe(m)){let c=y.getAttribute(\"data-record\");c!==null&&v.add(c)}return v.size===1?[...v][0]:void 0},u=(m,b)=>{let N=s.get(b),v=N?.kind??(b.includes(\":\")?b.slice(0,b.indexOf(\":\")):\"\"),y=[...Pe(m)],c=y.find(a=>a.localName in br)??y.find(a=>a.localName===\"a\"&&a.getAttribute(\"data-record\")===b)??y.find(a=>a.localName===\"strong\"||a.localName===\"b\"),h=L(c?z(c):\"\")||N?.label||b,g=p(m,c);return!c&&g[0]?.t===\"text\"&&L(g[0].text)===h&&g.shift(),{id:b,kind:v,title:h,parts:g}},d=m=>{let b=[...Pe(m)].filter(c=>c.localName===\"tr\"&&!Ot(c)),N=b.find(c=>c.parentElement?.localName===\"thead\"||c.childNodes.every(h=>!K(h)||h.localName===\"th\")),v=N?N.childNodes.filter(K).map(c=>L(z(c))):[];return{t:\"list\",as:\"row\",columns:1,groups:[{items:b.filter(c=>c!==N).map(c=>{let h=c.childNodes.filter(K),g=l(c),a=g?s.get(g):void 0;return{id:g??\"\",kind:a?.kind??\"\",title:L(z(h[0]??c)),parts:h.slice(1).map((f,T)=>({t:\"field\",label:v[T+1]??\"\",text:L(z(f))}))}})}]}};function p(m,b){let N=[],v=\"\",y=()=>{let h=L(v);v=\"\",h&&N.push({t:\"text\",text:h})},c=m.childNodes;for(let h=0;h<c.length;h+=1){let g=c[h];if(g===b)continue;if(g instanceof ke){v+=g.data;continue}if(!K(g)||Ot(g)||Yo.has(g.localName))continue;if(b&&[...Pe(g)].includes(b)){y(),N.push(...p(g,b));continue}let a=[];for(let f=h;f<c.length;f+=1){let T=c[f];if(T instanceof ke&&L(T.data)===\"\")continue;if(!K(T)||Ot(T)||Go.has(T.localName)||T.localName in br)break;let x=l(T);if(!x)break;a.push({element:T,id:x}),h=f}if(a.length>0){y();let f=a.every(T=>T.element.localName===\"li\"||T.element.localName===\"tr\");N.push({t:\"list\",as:f?\"row\":\"card\",columns:1,groups:[{items:a.map(T=>u(T.element,T.id))}]});continue}N.push(...E(g,f=>v+=f,y))}return y(),N}function E(m,b,N){let v=m.localName;if(Go.has(v)&&v!==\"label\")return b(z(m)),[];if(v===\"mark\"){N();let c=L(z(m));return c?[{t:\"badge\",text:c}]:[]}N();let y=br[v]??(m.getAttribute(\"role\")===\"heading\"?Number(m.getAttribute(\"aria-level\")??2):void 0);if(y!==void 0){let c=L(z(m));return c?[{t:\"heading\",level:y,text:c}]:[]}switch(v){case\"ul\":case\"ol\":case\"menu\":return[{t:\"list\",as:\"row\",columns:1,groups:[{items:m.childNodes.filter(h=>K(h)&&h.localName===\"li\"&&!Ot(h)).map(h=>{let g=l(h);if(g)return u(h,g);let a=p(h),f=a[0],T=f&&(f.t===\"text\"||f.t===\"heading\")?f.text:\"\";return{id:\"\",kind:\"\",title:T,parts:T?a.slice(1):a}})}]}];case\"table\":return[d(m)];case\"dl\":{let c=[],h=\"\";for(let g of m.childNodes.filter(K))if(g.localName===\"dt\")h=L(z(g));else if(g.localName===\"dd\")c.push({t:\"field\",label:h,text:L(z(g))});else if(g.localName===\"div\")for(let a of g.childNodes.filter(K))a.localName===\"dt\"?h=L(z(a)):a.localName===\"dd\"&&c.push({t:\"field\",label:h,text:L(z(a))});return c}case\"figure\":{let c=m.childNodes.find(a=>K(a)&&a.localName===\"figcaption\"),h=L(m.childNodes.filter(a=>a!==c).map(z).join(\" \")),g=c?L(z(c)):\"\";return h?[{t:\"figure\",text:h,...g?{label:g}:{}}]:g?[{t:\"text\",text:g}]:[]}case\"meter\":case\"progress\":{let c=Number(m.getAttribute(\"value\")??0),h=Number(m.getAttribute(\"max\")??1)||1;return[{t:\"progress\",label:m.getAttribute(\"aria-label\")??m.getAttribute(\"title\")??\"\",text:`${Math.round(c/h*100)}%`}]}case\"svg\":{let c=m.childNodes.find(a=>K(a)&&a.localName===\"title\"),h=L(m.getAttribute(\"aria-label\")??(c?z(c):\"\"));if(h)return[{t:\"text\",text:h,tone:\"picture\"}];let g=[...Pe(m)].filter(a=>a.localName===\"text\").map(a=>L(z(a))).filter(Boolean);return g.length>0?[{t:\"text\",text:g.join(\" \\xB7 \"),tone:\"picture\"}]:[]}case\"img\":{let c=L(m.getAttribute(\"alt\")??\"\");return c?[{t:\"text\",text:c,tone:\"picture\"}]:[]}case\"button\":{let c=L(z(m));return c?[{t:\"text\",text:c,tone:\"button\"}]:[]}case\"input\":case\"textarea\":case\"select\":{let c=L(m.getAttribute(\"aria-label\")??m.getAttribute(\"placeholder\")??m.getAttribute(\"name\")??\"\"),h=v===\"select\"?L(z(m.childNodes.find(g=>K(g)&&g.localName===\"option\"&&g.selected)??m)):m.value;return[{t:\"field\",label:c,text:h}]}case\"label\":return p(m);default:return p(m)}}return{parts:p(t),problems:n,acts:[...r],records:[...o]}}var F=t=>t>=48&&t<=57,Wo=t=>F(t)||t>=65&&t<=70||t>=97&&t<=102,Sr=t=>t>=65&&t<=90||t>=97&&t<=122,vr=t=>t>=128,An=t=>Sr(t)||vr(t)||t===95,Xo=t=>An(t)||F(t)||t===45,Ko=t=>t===10,fe=t=>t===10||t===9||t===32,ci=t=>t>=0&&t<=8||t===11||t>=14&&t<=31||t===127,oe=-1;function ui(t){let e=[];for(let n=0;n<t.length;n+=1){let r=t.codePointAt(n);r>65535&&(n+=1),r===13?(t.charCodeAt(n+1)===10&&(n+=1),r=10):r===12?r=10:(r===0||r>=55296&&r<=57343)&&(r=65533),e.push(r)}return e}function di(t){let e=ui(t),n=0,r=(y=0)=>n+y<e.length?e[n+y]:oe,o=[],s=(y,c)=>y===92&&c!==10&&c!==oe,i=(y,c,h)=>y===45?An(c)||c===45||s(c,h):An(y)?!0:s(y,c),l=(y,c,h)=>y===43||y===45?F(c)||c===46&&F(h):F(y===46?c:y),u=()=>{let y=r();if(n+=1,y===oe)return 65533;if(Wo(y)){let c=String.fromCodePoint(y);for(;c.length<6&&Wo(r());)c+=String.fromCodePoint(r()),n+=1;fe(r())&&(n+=1);let h=parseInt(c,16);return h===0||h>=55296&&h<=57343||h>1114111?65533:h}return y},d=()=>{let y=\"\";for(;;){let c=r();if(Xo(c))y+=String.fromCodePoint(c),n+=1;else if(s(c,r(1)))n+=1,y+=String.fromCodePoint(u());else return y}},p=()=>{let y=\"\";for((r()===43||r()===45)&&(y+=String.fromCodePoint(e[n++]));F(r());)y+=String.fromCodePoint(e[n++]);if(r()===46&&F(r(1)))for(y+=String.fromCodePoint(e[n++],e[n++]);F(r());)y+=String.fromCodePoint(e[n++]);if((r()===69||r()===101)&&(F(r(1))||(r(1)===43||r(1)===45)&&F(r(2))))for(y+=String.fromCodePoint(e[n++]),F(r())||(y+=String.fromCodePoint(e[n++]));F(r());)y+=String.fromCodePoint(e[n++]);return y},E=()=>{let y=p();return i(r(),r(1),r(2))?{type:\"dimension\",repr:y,unit:d()}:r()===37?(n+=1,{type:\"percentage\",repr:y}):{type:\"number\",repr:y}},m=()=>{for(;;){let y=r();if(n+=1,y===41||y===oe)return;s(y,r())&&u()}},b=()=>{let y=\"\";for(;fe(r());)n+=1;for(;;){let c=r();if(n+=1,c===41)return{type:\"url\",value:y};if(c===oe)return{type:\"url\",value:y};if(fe(c)){for(;fe(r());)n+=1;return r()===41||r()===oe?(r()===41&&(n+=1),{type:\"url\",value:y}):(m(),{type:\"bad-url\"})}if(c===34||c===39||c===40||ci(c))return m(),{type:\"bad-url\"};if(c===92){if(s(c,r()))y+=String.fromCodePoint(u());else return m(),{type:\"bad-url\"};continue}y+=String.fromCodePoint(c)}},N=()=>{let y=d();if(y.toLowerCase()===\"url\"&&r()===40){for(n+=1;fe(r())&&fe(r(1));)n+=1;let c=fe(r())?r(1):r();return c===34||c===39?{type:\"function\",value:y}:b()}return r()===40?(n+=1,{type:\"function\",value:y}):{type:\"ident\",value:y}},v=y=>{let c=\"\";for(;;){let h=r();if(n+=1,h===y||h===oe)return{type:\"string\",value:c};if(Ko(h))return n-=1,{type:\"bad-string\"};if(h===92){if(r()===oe)continue;if(Ko(r())){n+=1;continue}c+=String.fromCodePoint(u());continue}c+=String.fromCodePoint(h)}};for(;;){for(;r()===47&&r(1)===42;){for(n+=2;r()!==oe&&!(r()===42&&r(1)===47);)n+=1;r()!==oe&&(n+=2)}let y=r();if(y===oe)return o;if(fe(y)){for(;fe(r());)n+=1;o.push({type:\"whitespace\"});continue}switch(n+=1,y){case 34:case 39:o.push(v(y));continue;case 35:if(Xo(r())||s(r(),r(1))){let c=i(r(),r(1),r(2));o.push({type:\"hash\",value:d(),id:c})}else o.push({type:\"delim\",value:\"#\"});continue;case 40:o.push({type:\"(\"});continue;case 41:o.push({type:\")\"});continue;case 43:case 46:l(y,r(),r(1))?(n-=1,o.push(E())):o.push({type:\"delim\",value:String.fromCodePoint(y)});continue;case 44:o.push({type:\",\"});continue;case 45:l(y,r(),r(1))?(n-=1,o.push(E())):r()===45&&r(1)===62?(n+=2,o.push({type:\"CDC\"})):i(y,r(),r(1))?(n-=1,o.push(N())):o.push({type:\"delim\",value:\"-\"});continue;case 58:o.push({type:\":\"});continue;case 59:o.push({type:\";\"});continue;case 60:r()===33&&r(1)===45&&r(2)===45?(n+=3,o.push({type:\"CDO\"})):o.push({type:\"delim\",value:\"<\"});continue;case 64:i(r(),r(1),r(2))?o.push({type:\"at-keyword\",value:d()}):o.push({type:\"delim\",value:\"@\"});continue;case 91:o.push({type:\"[\"});continue;case 92:s(y,r())?(n-=1,o.push(N())):o.push({type:\"delim\",value:\"\\\\\"});continue;case 93:o.push({type:\"]\"});continue;case 123:o.push({type:\"{\"});continue;case 125:o.push({type:\"}\"});continue;default:F(y)?(n-=1,o.push(E())):An(y)?(n-=1,o.push(N())):o.push({type:\"delim\",value:String.fromCodePoint(y)})}}}var ts={\"{\":\"}\",\"[\":\"]\",\"(\":\")\"},ns=32,Nr=class{constructor(e){this.tokens=e}i=0;peek(){return this.tokens[this.i]}next(){return this.tokens[this.i++]}};function rs(t,e){let n=t.next();return n.type===\"{\"||n.type===\"[\"||n.type===\"(\"?{type:\"block\",open:n.type,value:Zo(t,ts[n.type],e+1)}:n.type===\"function\"?{type:\"func\",name:n.value,value:Zo(t,\")\",e+1)}:n}function Zo(t,e,n){let r=[];for(;;){let o=t.peek();if(!o)return r;if(o.type===e)return t.next(),r;if(n>ns){t.next(),r.push({type:\"bad-string\"});continue}r.push(rs(t,n))}}function nt(t,e){let n=[],r=0;for(;r<t.length;){let o=t[r];if(o.type===\"whitespace\"||e&&(o.type===\"CDO\"||o.type===\"CDC\")){r+=1;continue}if(o.type===\"at-keyword\"){let l=[];r+=1;let u;for(;r<t.length;){let d=t[r];if(r+=1,d.type===\";\")break;if(d.type===\"block\"&&d.open===\"{\"){u=d.value;break}l.push(d)}n.push({type:\"at-rule\",name:o.value,prelude:l,...u?{block:u}:{}});continue}let s=[],i;for(;r<t.length;){let l=t[r];if(r+=1,l.type===\"block\"&&l.open===\"{\"){i=l.value;break}s.push(l)}i&&n.push({type:\"qualified\",prelude:s,block:i})}return n}function Or(t){let e=[],n=0;for(;n<t.length;){let r=t[n];if(r.type===\"whitespace\"||r.type===\";\"){n+=1;continue}if(r.type===\"at-keyword\"){let s=(()=>{for(let i=n+1;i<t.length;i+=1){let l=t[i];if(l.type===\";\"||l.type===\"block\"&&l.open===\"{\")return i+1}return t.length})();e.push(...nt(t.slice(n,s),!1)),n=s;continue}if(r.type===\"ident\"){let s=n+1;for(;t[s]?.type===\"whitespace\";)s+=1;if(t[s]?.type===\":\"){let i=s+1;for(;i<t.length&&t[i].type!==\";\";)i+=1;let l=os(r.value,t.slice(s+1,i));if(l.value.some(u=>u.type===\"block\"&&u.open===\"{\")){let u=t.findIndex((d,p)=>p>n&&d.type===\"block\"&&d.open===\"{\");e.push(...nt(t.slice(n,u+1),!1)),n=u+1;continue}e.push(l),n=i+1;continue}}let o=n;for(;o<t.length&&!(t[o].type===\"block\"&&t[o].open===\"{\")&&t[o].type!==\";\";)o+=1;o<t.length&&t[o].type===\"block\"&&e.push(...nt(t.slice(n,o+1),!1)),n=o+1}return e}function os(t,e){let n=[...e];for(;n[0]?.type===\"whitespace\";)n.shift();for(;n.at(-1)?.type===\"whitespace\";)n.pop();let r=!1,s=n.length-1;if(n[s]?.type===\"ident\"&&n[s].value.toLowerCase()===\"important\"){for(s-=1;n[s]?.type===\"whitespace\";)s-=1;let i=n[s];if(i?.type===\"delim\"&&i.value===\"!\")for(r=!0,n.length=s;n.at(-1)?.type===\"whitespace\";)n.pop()}return{type:\"declaration\",name:t,value:n,important:r}}function Ar(t){let e=new Nr(di(t)),n=[];for(;e.peek();)n.push(rs(e,0));return n}function Rn(t){let e=\"\",n=[...t].map(r=>r.codePointAt(0));return n.forEach((r,o)=>{r===0?e+=\"\\uFFFD\":r>=1&&r<=31||r===127||o===0&&F(r)||o===1&&F(r)&&n[0]===45?e+=`\\\\${r.toString(16)} `:o===0&&r===45&&n.length===1?e+=\"\\\\-\":vr(r)||r===45||r===95||F(r)||Sr(r)?e+=String.fromCodePoint(r):e+=`\\\\${String.fromCodePoint(r)}`}),e}function Cn(t){let e=\"\";for(let n of t){let r=n.codePointAt(0);vr(r)||r===45||r===95||F(r)||Sr(r)?e+=n:r>=1&&r<=31||r===127?e+=`\\\\${r.toString(16)} `:e+=`\\\\${n}`}return e}function Tr(t){let e='\"';for(let n of t){let r=n.codePointAt(0);r===0?e+=\"\\uFFFD\":r>=1&&r<=31||r===127||r===60||r===62?e+=`\\\\${r.toString(16)} `:r===34||r===92?e+=`\\\\${n}`:e+=n}return`${e}\"`}function fi(t){let e=Cn(t);return/^[eE]([0-9]|[+-][0-9])/.test(t)?`\\\\${t.codePointAt(0).toString(16)} ${Cn(t.slice(1))}`:e}var Jo=t=>{switch(t.type){case\"ident\":case\"url\":case\"bad-url\":case\"number\":case\"percentage\":case\"dimension\":case\"CDC\":case\"hash\":case\"at-keyword\":return t.type;case\"func\":case\"function\":return\"function\";case\"block\":return t.open===\"(\"?\"(\":\"other\";case\"(\":return\"(\";case\"delim\":return`delim${t.value}`;default:return\"other\"}};function mi(t,e){let n=[\"ident\",\"function\",\"url\",\"bad-url\",\"delim-\",\"number\",\"percentage\",\"dimension\",\"CDC\"];return t===\"ident\"?[...n,\"(\"].includes(e):t===\"at-keyword\"||t===\"hash\"||t===\"dimension\"||t===\"delim#\"||t===\"delim-\"?n.includes(e):t===\"number\"?[\"ident\",\"function\",\"url\",\"bad-url\",\"number\",\"percentage\",\"dimension\",\"delim%\"].includes(e):t===\"delim@\"?[\"ident\",\"function\",\"url\",\"bad-url\",\"delim-\",\"CDC\"].includes(e):t===\"delim.\"||t===\"delim+\"?[\"number\",\"percentage\",\"dimension\"].includes(e):t===\"delim/\"?e===\"delim*\":!1}function pi(t){switch(t.type){case\"whitespace\":return\" \";case\"ident\":return Rn(t.value);case\"at-keyword\":return`@${Rn(t.value)}`;case\"hash\":return`#${Cn(t.value)}`;case\"string\":return Tr(t.value);case\"url\":return`url(${Tr(t.value)})`;case\"delim\":return t.value===\"\\\\\"?`\\\\\n`:t.value;case\"CDO\":return\"<!--\";case\"CDC\":return\"-->\";case\"number\":return t.repr;case\"percentage\":return`${t.repr}%`;case\"dimension\":return`${t.repr}${fi(t.unit)}`;case\"func\":return`${Rn(t.name)}(${rt(t.value)})`;case\"block\":return`${t.open}${rt(t.value)}${ts[t.open]}`;case\":\":case\";\":case\",\":case\"[\":case\"]\":case\"(\":case\")\":case\"{\":case\"}\":return t.type;default:return\"\"}}function rt(t){let e=\"\",n;for(let r of t)r.type===\"whitespace\"&&n?.type===\"whitespace\"||(n&&mi(Jo(n),Jo(r))&&(e+=\"/**/\"),e+=pi(r),n=r);return e}var hi=new Set(Co),ss=new Set(ko),Qo=new Set(_o),gi=new Set(Po),yi=new Set(Do),es=/^#[A-Za-z_][A-Za-z0-9_.:-]*$/,me=t=>t.replace(/[A-Z]/g,e=>e.toLowerCase()),bi=t=>me(t);function xr(t,e,n){let r=[];for(let o of e){if(o.type===\"bad-url\"||o.type===\"bad-string\"){n({reason:\"unreadable\",...t?{name:t}:{}});return}if(o.type===\"url\"){if(t&&Qo.has(t)&&es.test(o.value)){r.push({type:\"func\",name:\"url\",value:[{type:\"string\",value:o.value}]});continue}n({reason:\"url\",...t?{name:t}:{}});return}if(o.type===\"func\"){let s=me(o.name);if(s===\"url\"||s===\"src\"){let l=o.value.filter(d=>d.type!==\"whitespace\"),u=l[0];if(s===\"url\"&&l.length===1&&u?.type===\"string\"&&t&&Qo.has(t)&&es.test(u.value)){r.push({type:\"func\",name:\"url\",value:[{type:\"string\",value:u.value}]});continue}n({reason:\"url\",...t?{name:t}:{}});return}if(!ss.has(s)){n({reason:\"function\",name:s});return}let i=xr(t,o.value,n);if(!i)return;s===\"var\"?r.push({type:\"whitespace\"},{type:\"func\",name:s,value:i},{type:\"whitespace\"}):r.push({type:\"func\",name:s,value:i});continue}if(o.type===\"block\"){if(o.open===\"{\"||o.open===\"(\"&&r.at(-1)?.type===\"ident\"){n({reason:\"unreadable\",...t?{name:t}:{}});return}let s=xr(t,o.value,n);if(!s)return;r.push({type:\"block\",open:o.open,value:s});continue}if(o.type===\"at-keyword\"||o.type===\"CDO\"||o.type===\"CDC\"||o.type===\"{\"||o.type===\"}\"||o.type===\";\"||o.type===\"delim\"&&o.value===\"\\\\\"){n({reason:\"unreadable\",...t?{name:t}:{}});return}r.push(o)}return r}function _n(t,e){let n=t.name.startsWith(\"--\"),r=n?t.name:bi(t.name);if(!n&&!hi.has(r)){e({reason:\"property\",name:r});return}let o=Io[r];if(o){let l=t.value.filter(p=>p.type!==\"whitespace\"),u=l[0],d=l.length===1&&u?.type===\"ident\"?me(u.value):void 0;if(!d||![...o,\"inherit\",\"initial\",\"unset\",\"revert\"].includes(d)){e({reason:\"value\",name:r});return}return`${r}: ${d}${t.important?\" !important\":\"\"}`}let s=xr(n?void 0:r,t.value,e);if(!s)return;let i=rt(s).trim();return`${n?`--${Cn(t.name.slice(2))}`:r}: ${i}${t.important?\" !important\":\"\"}`}function is(t,e){let n=r=>{for(let o=0;o<r.length;o+=1){let s=r[o];if(o>0&&r[o-1].type===\":\"&&(s.type===\"ident\"||s.type===\"func\")){let l=me(s.type===\"ident\"?s.value:s.name);if(yi.has(l)||l.startsWith(\"-webkit-\")||l.startsWith(\"-moz-\"))return e({reason:\"selector\",name:l}),!1}if(s.type===\"url\"||s.type===\"bad-url\"||s.type===\"bad-string\"||s.type===\"at-keyword\"||s.type===\"CDO\"||s.type===\"CDC\"||s.type===\"block\"&&s.open===\"{\")return e({reason:\"unreadable\",name:\"selector\"}),!1;if(s.type===\"func\"&&!n(s.value)||s.type===\"block\"&&!n(s.value))return!1}return!0};return n(t)}function Er(t,e,n){let r=[];for(let o of Or(t))if(o.type===\"declaration\"){let s=_n(o,e);s&&r.push(`${s};`)}else{let s=kn(o,e,n+1,\"style\");s&&r.push(s)}return r.join(\" \")}function Ei(t,e,n){let r=o=>o.every(s=>{if(s.type===\"url\"||s.type===\"bad-url\"||s.type===\"bad-string\"||s.type===\"block\"&&s.open===\"{\")return n({reason:s.type===\"url\"?\"url\":\"unreadable\",name:`@${e}`}),!1;if(s.type===\"func\"){let i=me(s.name);return e===\"supports\"&&i===\"selector\"?is(s.value,n):ss.has(i)?r(s.value):(n({reason:\"function\",name:i}),!1)}if(s.type===\"block\"){if(e===\"supports\"){let i=Or(s.value);if(i.length===1&&i[0].type===\"declaration\")return _n(i[0],n)!==void 0}return r(s.value)}return!0});return r(t)?rt(t).trim():void 0}function wr(t){return t.map((e,n)=>{let r=t[n-1],o=r?.type===\":\"||r?.type===\"delim\"&&(r.value===\".\"||r.value===\"|\");return e.type===\"ident\"&&!o&&Object.prototype.hasOwnProperty.call(vt,me(e.value))?{type:\"block\",open:\"[\",value:[{type:\"ident\",value:\"data-graview-as\"},{type:\"delim\",value:\"=\"},{type:\"string\",value:me(e.value)}]}:e.type===\"func\"?{type:\"func\",name:e.name,value:wr(e.value)}:e.type===\"block\"&&e.open===\"(\"?{type:\"block\",open:\"(\",value:wr(e.value)}:e})}function kn(t,e,n,r){if(n>ns){e({reason:\"unreadable\",name:\"nesting\"});return}if(t.type===\"qualified\"){if(r===\"keyframes\"){if(!t.prelude.every(p=>p.type===\"whitespace\"||p.type===\",\"||p.type===\"percentage\"||p.type===\"ident\"&&[\"from\",\"to\"].includes(me(p.value)))){e({reason:\"unreadable\",name:\"keyframe\"});return}return`${rt(t.prelude).trim()} { ${Er(t.block,e,n)} }`}if(!is(t.prelude,e))return;let u=rt(wr(t.prelude)).trim();if(u===\"\"){e({reason:\"unreadable\",name:\"selector\"});return}return`${u} { ${Er(t.block,e,n)} }`}let o=me(t.name),s=o===\"-webkit-keyframes\"?\"keyframes\":o;if(!gi.has(s)||r===\"keyframes\"){e({reason:\"at-rule\",name:`@${o}`});return}if(!t.block){e({reason:\"unreadable\",name:`@${o}`});return}if(s===\"keyframes\"){if(r!==\"sheet\"){e({reason:\"at-rule\",name:\"@keyframes\"});return}let u=t.prelude.filter(m=>m.type!==\"whitespace\"),d=u[0];if(u.length!==1||!d||d.type!==\"ident\"&&d.type!==\"string\"){e({reason:\"unreadable\",name:\"@keyframes\"});return}let p=nt(t.block,!1).map(m=>kn(m,e,n+1,\"keyframes\")).filter(m=>m!==void 0);return`@keyframes ${d.type===\"ident\"?Rn(d.value):Tr(d.value)} { ${p.join(\" \")} }`}let i=Ei(t.prelude,s,e);if(i===void 0)return;let l=r===\"style\"?Er(t.block,e,n):nt(t.block,!1).map(u=>kn(u,e,n+1,\"sheet\")).filter(u=>u!==void 0).join(\" \");return`@${s} ${i} { ${l} }`}function as(t,e=dr){let n=[];if(t.length>e)return{css:\"\",refused:[{reason:\"size\"}]};let r=s=>void n.push(s);return{css:nt(Ar(t),!0).map(s=>kn(s,r,0,\"sheet\")).filter(s=>s!==void 0).join(`\n`),refused:n}}function ls(t,e=dr){let n=[];if(t.length>e)return{css:\"\",refused:[{reason:\"size\"}]};let r=s=>void n.push(s),o=[];for(let s of Or(Ar(t))){if(s.type!==\"declaration\"){r({reason:\"unreadable\",name:\"a rule in a style attribute\"});continue}let i=_n(s,r);i&&o.push(i)}return{css:o.join(\"; \"),refused:n}}function cs(t,e){let n,r=_n(os(t,Ar(e)),o=>n??=o);return r===void 0||n?{refused:n??{reason:\"unreadable\",name:t}}:{value:r.slice(r.indexOf(\":\")+1).trim()}}function us(t,e){if(e===\"svg\"){let r=Sn(t);return r?{namespace:\"svg\",name:r}:{refused:{reason:\"element\",element:t}}}let n=t.toLowerCase();return n===\"svg\"?{namespace:\"svg\",name:\"svg\"}:Object.prototype.hasOwnProperty.call(Qe,n)?Object.prototype.hasOwnProperty.call(vt,n)?{namespace:\"html\",name:vt[n],as:n}:{namespace:\"html\",name:n}:{refused:{reason:\"element\",element:t}}}function Rr(t,e){return(t===\"html\"?Qe[e]:xn[e])?.empty===!0}var Ni=/^[+-]?(\\d+\\.?\\d*|\\.\\d+)([eE][+-]?\\d+)?$/,Ti=/^[0-9A-Za-z\\s.,+\\-%()]*$/,xi=/^#[A-Za-z_][A-Za-z0-9_.:-]*$/,wi=/^data:image\\/(png|gif|jpeg|webp|avif|bmp|svg\\+xml)(;[A-Za-z0-9=._+-]+)*,/i,Si=/^\\/graview\\/assets\\/[0-9a-f]{64}\\.(png|gif|jpe?g|webp|avif|svg|ico)$/;function Cr(t,e,n,r,o){let s=vn(t,e,n);if(!s)return{refused:{reason:\"attribute\",element:e,name:n}};if(t===\"html\"&&wn[e]?.includes(s.name))return{refused:{reason:\"attribute\",element:e,name:n}};if(r===null)return{name:s.name,value:null};let i=vi(s.name,s.kind,r,o);return\"refused\"in i?{refused:{...i.refused,element:e}}:s.name===\"role\"&&i.value.split(/\\s+/).some(l=>Ro.includes(l.toLowerCase()))?{refused:{reason:\"value\",element:e,name:n}}:s.name===\"aria-live\"&&![\"polite\",\"off\"].includes(i.value.toLowerCase())?{refused:{reason:\"value\",element:e,name:n}}:{name:s.name,value:i.value,...i.dropped?{dropped:i.dropped.map(l=>({reason:l.reason===\"url\"?\"url\":\"css\",element:e,name:s.name,css:l}))}:{}}}function vi(t,e,n,r){let o=(s,i)=>({refused:{reason:s,name:t,...i?{css:i}:{}}});if(e===\"geometry\")return n.length>Mo||!Ti.test(n)||/url/i.test(n)?o(\"value\"):{value:n};if(e===\"image\"){if(n.length>Lo)return o(\"url\");if(wi.test(n))return{value:n};if(n.startsWith(`blob:${r.origin}/`)&&/^blob:[^\\s\"'<>]+$/.test(n))return{value:n};if(Si.test(n)&&r.asset){let s=r.asset(n);if(s)return{value:s}}return o(\"url\")}if(n.length>fr)return o(\"value\");if(typeof e==\"object\"){let s=e.oneOf.find(i=>i.toLowerCase()===n.toLowerCase());return s===void 0?o(\"value\"):{value:s}}switch(e){case\"text\":return{value:n};case\"number\":return Ni.test(n.trim())&&Number.isFinite(Number(n))?{value:n.trim()}:o(\"value\");case\"boolean\":return{value:\"\"};case\"fragment\":return xi.test(n)?{value:n}:o(\"url\");case\"style\":{let s=ls(n,fr);return s.refused.length>0&&s.css===\"\"?o(s.refused[0].reason===\"url\"?\"url\":\"css\",s.refused[0]):{value:s.css,...s.refused.length>0?{dropped:s.refused}:{}}}case\"css\":{let s=cs(t,n);return\"refused\"in s?o(s.refused.reason===\"url\"?\"url\":\"css\",s.refused):{value:s.value}}}}var Oi=0,Ai=1,Ri=2,Ci=3,ds=1,ki=2,fs=3,_i=1,Pi=3,Ii=8,ms=\"~\",Pn=t=>typeof t==\"object\"&&t!==null&&!Array.isArray(t),ps=new Set([\"input\",\"select\",\"textarea\",\"option\"]),Di=new Set([\"value\",\"checked\",\"selected\"]);function hs(t,e){let n=t.ownerDocument??t,r=e.maxNodes??5e3,o=[],s=new Map,i=new WeakMap,l={dom:t,name:\"div\",namespace:\"html\",children:[],id:ms};s.set(ms,l);let u=0,d=!1,p=c=>{o.push(c),o.length>200&&o.shift()},E=()=>({dom:n.createComment(\"\"),children:[],refused:!0}),m=(c,h)=>{if(c.namespace===\"html\"&&c.name&&ps.has(c.name))return c.dom;if(h?.namespace===\"html\"&&h.name===\"textarea\")return h.dom},b=(c,h,g)=>{let a=c.dom;if(g!=null&&typeof g!=\"string\")return p({reason:\"value\",element:c.name,name:h});let f=Cr(c.namespace,c.name,h,g??null,e);if(\"refused\"in f){let A=Cr(c.namespace,c.name,h,null,e);return\"refused\"in A||a.removeAttribute(A.name),p(f.refused)}for(let A of f.dropped??[])p(A);let T=c.namespace===\"html\"&&Di.has(f.name)&&ps.has(c.name),x=a,O=T?f.name===\"value\"?x.value:f.name===\"checked\"?x.checked:x.selected:void 0;f.value===null?a.removeAttribute(f.name):a.setAttribute(f.name,f.value),e.onAttribute?.(a,f.name),T&&(f.name===\"value\"&&\"value\"in x?(x.value=f.value??\"\",O!==x.value&&e.onFieldSet?.(a)):f.name===\"checked\"&&\"checked\"in x?(x.checked=f.value!==null,O!==x.checked&&e.onFieldSet?.(a)):f.name===\"selected\"&&\"selected\"in x&&(x.selected=f.value!==null,O!==x.selected&&e.onFieldSet?.(a.parentElement?.closest(\"select\")??a)))},N=c=>{if(!c.refused){u-=1,c.id!==void 0&&s.delete(c.id);for(let h of c.children)N(h)}},v=(c,h)=>{if(!Pn(c)||typeof c.id!=\"string\"||s.has(c.id))return p({reason:\"record\"}),E();if(u>=r)return p({reason:\"budget\"}),d||(d=!0,e.onOverBudget?.()),E();let g=c.id;if(c.type===Ii)return E();if(c.type===Pi){if(Rr(h.namespace,h.name))return p({reason:\"child\",element:h.name}),E();let O=n.createTextNode(String(c.data??\"\").slice(0,mr)),A={dom:O,children:[],text:!0,id:g,parent:h};return s.set(g,A),i.set(O,g),u+=1,A}if(c.type!==_i)return p({reason:\"record\"}),E();let a=String(c.element);if(Rr(h.namespace,h.name))return p({reason:\"child\",element:a}),E();let f=us(a,h.namespace);if(\"refused\"in f)return p(f.refused),E();let T=n.createElementNS(f.namespace===\"svg\"?Vo:Ho,f.name);f.as&&T.setAttribute(\"data-graview-as\",f.as);let x={dom:T,name:f.name,namespace:f.namespace,children:[],id:g,parent:h};if(s.set(g,x),i.set(T,g),u+=1,Pn(c.attributes))for(let[O,A]of Object.entries(c.attributes))b(x,O,A);if(e.decorate?.(T,f.name,f.namespace),Pn(c.properties))for(let O of Object.keys(c.properties))p({reason:\"attribute\",element:f.name,name:O});if(Pn(c.eventListeners))for(let O of Object.keys(c.eventListeners))c.eventListeners[O]!=null&&p({reason:\"attribute\",element:f.name,name:`on${O}`});if(Array.isArray(c.children))for(let O of c.children){let A=v(O,x);x.children.push(A),T.appendChild(A.dom)}return x},y=c=>{if(!Array.isArray(c))return p({reason:\"record\"});let[h,g]=c,a=typeof g==\"string\"?s.get(g):void 0;if(!a)return p({reason:\"record\"});switch(h){case Oi:{if(a.text)return p({reason:\"record\"});let f=Number(c[3]),T=Number.isInteger(f)&&f>=0&&f<=a.children.length?f:a.children.length,x=v(c[2],a);a.dom.insertBefore(x.dom,a.children[T]?.dom??null),a.children.splice(T,0,x),a.namespace===\"html\"&&a.name===\"textarea\"&&e.onFieldSet?.(a.dom);return}case Ai:{let f=Number(c[2]),T=a.children[f];if(!T)return p({reason:\"record\"});a.children.splice(f,1),T.dom.parentNode?.removeChild(T.dom),N(T);return}case Ri:{if(!a.text)return p({reason:\"record\"});a.dom.data=String(c[2]??\"\").slice(0,mr);let f=m(a,a.parent);f&&e.onFieldSet?.(f);return}case Ci:{if(a===l||a.text)return p({reason:\"record\"});let f=String(c[2]),T=c[4]??ds;return T===ki?b(a,f,c[3]):p(T===ds||T===fs?{reason:\"attribute\",element:a.name,name:T===fs?`on${f}`:f}:{reason:\"record\"})}default:return p({reason:\"record\"})}};return{apply(c,h){if(!Array.isArray(c))return p({reason:\"record\"}),!0;for(let g=0;g<c.length;g+=1){if(h&&g%32===0&&h())return!1;y(c[g])}return!0},get refused(){return o},get size(){return u},idOf:c=>i.get(c),elementOf(c){let h=s.get(c);return h&&!h.text&&h!==l?h.dom:void 0},dispose(){for(let c of l.children)N(c);for(l.children.length=0;t.firstChild;)t.removeChild(t.firstChild)}}}function gs(t,e,n){let{root:r}=Bo(),o=!1,s=hs(r,{origin:n.origin??\"null\",maxNodes:n.maxNodes,onOverBudget:()=>o=!0});for(let u of t)s.apply(u);let i=[...s.refused],l=\"\";if(typeof e==\"string\"){let u=as(e);l=u.css;for(let d of u.refused)i.push({reason:\"css\",name:\"stylesheet\",css:d})}return{root:r,refused:i,size:s.size,over:o,css:l}}function Mi(t){let e=\"element\"in t&&t.element?`<${t.element}>`:\"\",n=t.name?` ${t.name}`:\"\";switch(t.reason){case\"element\":return{at:`drawing ${e}`,says:`Not drawn: ${e} is not in the open kit.`};case\"attribute\":return{at:`drawing ${e}${n}`,says:`Not drawn: ${e||\"an element\"} does not take${n}.`};case\"value\":return{at:`drawing ${e}${n}`,says:`Not drawn: the value of${n} is not one the open kit takes.`};case\"url\":return{at:`drawing ${e}${n}`,says:\"Not drawn: an address. A view loads nothing; an image is a data: image.\"};case\"child\":return{at:`drawing ${e}`,says:`Not drawn: ${e} holds nothing.`};case\"record\":return{at:\"drawing\",says:\"Not drawn: a record the drawing's format does not know.\"};case\"budget\":return{at:\"drawing\",says:\"Not drawn: more nodes than a view may draw.\"};case\"css\":return{at:`stylesheet${n===\" stylesheet\"?\"\":n}`,says:`Not drawn: CSS the open kit leaves out${t.css?` (${t.css.reason}${t.css.name?` ${t.css.name}`:\"\"})`:\"\"}.`}}}function ys(t,e){let{limits:n}=e;if(t.messages>n.messages)return{ok:!1,reason:\"flood\",detail:`It sent ${t.messages} messages, more than the ${n.messages} a view may send in a second.`};let r=new Set(e.acts);for(let l of t.asked)if(!r.has(l.name))return{ok:!1,reason:\"act\",detail:`It asks for the act \"${l.name}\", which its manifest does not name.`};let o=gs(t.renders,t.css,{maxNodes:n.maxNodes});if(o.over)return{ok:!1,reason:\"nodes\",detail:`It drew more than the ${n.maxNodes.toLocaleString(\"en-US\")} things a view may draw.`};let s=qo(o.root,{props:e.props,places:e.places});for(let l of s.acts)if(!r.has(l))return{ok:!1,reason:\"act\",detail:`It binds a press to the act \"${l}\" (data-act), which its manifest does not name.`};let i=[...o.refused.map(Mi),...s.problems];for(let l of t.went)\"record\"in l&&!(e.props.node?.id===l.record||(e.props.nodes??[]).some(u=>u.id===l.record)||e.places.includes(l.record))&&i.push({at:\"navigate\",says:`It goes to ${hr(l.record)}, which this seat was not shown and is no place of this app: the host will not follow it. A view goes to a record by its id, or to a place by its slug.${et(e.places)}`}),\"place\"in l&&!e.places.includes(l.place)&&i.push({at:\"navigate\",says:`It goes to the place ${hr(l.place)}, which this app does not have.${et(e.places)}`});return{ok:!0,parts:s.parts,problems:i}}var kr=\"graviewHeadless\",_r=\"graviewHeadlessView\";var Ts=globalThis,Li=Promise.prototype.then,Hi=Promise.resolve(),Ir=t=>void Li.call(Hi,t),In=Ts.performance,At=In&&typeof In.now==\"function\"?In.now.bind(In):Date.now,Ie=JSON.stringify,xs=JSON.parse,Vi=Object.defineProperty,Dr=t=>(t instanceof Error?`${t.name}: ${t.message}`:String(t)).slice(0,500),bs=t=>{try{return xs(Ie(t??null))}catch{return null}},B={renders:[],asked:[],went:[],ms:0,logs:[],messages:0},De,Dn=(t,e)=>{De??={reason:t,detail:e}},ot=t=>{B.logs.length<50&&B.logs.push(t.slice(0,500))},st={removed:[],stuck:[],sealed:!1},Mr=Fo({send(t){B.messages+=1,t.type===\"render\"?B.renders.push(bs(t.records)):t.type===\"style\"?B.css=String(t.css):t.type===\"navigate\"&&\"place\"in t&&B.went.push({place:String(t.place)})},act(t,e){return B.messages+=1,B.asked.push({name:String(t),args:bs(e)}),Promise.resolve({type:\"answer\",id:B.asked.length,ok:!1,reason:\"refused\",message:\"Nothing is applied in a headless run.\"})},navigate(t){B.messages+=1,B.went.push({record:String(t)})},microtask:Ir,now:At,threw:t=>Dn(\"error\",`It threw: ${Dr(t)}`),warn:ot,hardening:()=>st}),Es=!1,Pr=!1;function Ui(t){if(Pr||typeof t!=\"function\"||(Pr=!0,De))return;let e=At();try{t.call(void 0,Mr.view)}catch(n){Dn(\"error\",`It threw: ${Dr(n)}`)}B.ms+=At()-e}async function ji(t){if(Es)return Ie({ok:!1,reason:\"refused\",detail:\"A headless script runs one view, once: something called its entry before the host did.\"});Es=!0;let e;try{e=xs(String(t))}catch{return Ie({ok:!1,reason:\"isolate\",detail:\"The run was not handed its input as JSON.\"})}if(!Pr&&!De)return Ie({ok:!1,reason:\"isolate\",detail:\"The script held no view.\"});let n=At();De||Mr.hear({type:\"props\",props:e.props,push:1}),B.ms+=At()-n,B.ms>=e.limits.pushMs&&Dn(\"slow\",`It took longer than ${e.limits.pushMs.toLocaleString(\"en-US\")} ms to draw what it was shown.`);for(let o=0;o<64&&!De;o+=1)await new Promise(s=>Ir(s));if(De)return Ie({ok:!1,...De,transcript:B});let r=ys(B,e);return r.ok?Ie({ok:!0,transcript:B,drawn:{parts:r.parts,problems:r.problems},hardening:{removed:st.removed.length,sealed:st.sealed}}):Ie({ok:!1,reason:r.reason,detail:r.detail,transcript:B})}var $i=Object.freeze({log:(...t)=>ot(t.map(String).join(\" \")),info:(...t)=>ot(t.map(String).join(\" \")),debug:(...t)=>ot(t.map(String).join(\" \")),warn:(...t)=>ot(t.map(String).join(\" \")),error:(...t)=>ot(t.map(Dr).join(\" \"))}),zi=0,Ns=()=>zi+=1,Fi=[[\"console\",$i],[\"setTimeout\",Ns],[\"setInterval\",Ns],[\"clearTimeout\",()=>{}],[\"clearInterval\",()=>{}],[\"queueMicrotask\",Ir],[\"graview\",Mr.view],[_r,Ui],[kr,t=>ji(t)]];for(let[t,e]of Fi)Vi(Ts,t,{value:e,writable:!0,enumerable:!1,configurable:!0});st=Oo(globalThis,[\"graview\",_r,kr],{primitivesStay:!0});st.stuck.length>0&&Dn(\"refused\",`This isolate could not be hardened: ${st.stuck.join(\", \")} would not go.`);})();\n";
|
|
8
8
|
//# sourceMappingURL=runtime.generated.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.generated.js","sourceRoot":"","sources":["../../src/headless/runtime.generated.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAW,
|
|
1
|
+
{"version":3,"file":"runtime.generated.js","sourceRoot":"","sources":["../../src/headless/runtime.generated.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAW,y8qGAAy8qG,CAAC"}
|