graview 0.1.47 → 0.1.49
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/dist/index.d.ts +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/preview/{chunk.S5IQFZ5Z.js → chunk.2CO2EJQA.js} +1 -1
- package/dist/preview/{chunk.VAFSSSSI.js → chunk.2N6RQ427.js} +1 -1
- package/dist/preview/{chunk.C44MC5X3.js → chunk.2OLZ6BYI.js} +1 -1
- package/dist/preview/{chunk.GCKZ2YRJ.js → chunk.2OXXGN7C.js} +2 -2
- package/dist/preview/{chunk.Z6TMIAAB.js → chunk.2QKSWK4U.js} +1 -1
- package/dist/preview/chunk.35FUGOSG.js +1 -0
- package/dist/preview/{chunk.IKX4VDTW.js → chunk.3EW6L5DY.js} +1 -1
- package/dist/preview/chunk.3NEALGMI.js +1 -0
- package/dist/preview/{chunk.O4WEJ47H.js → chunk.423SZS7C.js} +3 -3
- package/dist/preview/{chunk.MBETS27C.js → chunk.4D26JY5U.js} +1 -1
- package/dist/preview/{chunk.5A4AOFOA.js → chunk.4HUB3N7I.js} +1 -1
- package/dist/preview/chunk.4K7I7WYF.js +1 -0
- package/dist/preview/{chunk.RUPRZDN3.js → chunk.4OTESF7W.js} +1 -1
- package/dist/preview/{chunk.TJEV5ZAM.js → chunk.4Q5KWYVY.js} +18 -18
- package/dist/preview/{chunk.VXVWUIGO.js → chunk.4QINLTDZ.js} +1 -1
- package/dist/preview/{chunk.EUPSAYEI.js → chunk.4SEY7VWZ.js} +1 -1
- package/dist/preview/chunk.4XKACWLT.js +1 -0
- package/dist/preview/chunk.52QB4YW2.js +1 -0
- package/dist/preview/{chunk.6YD2DLIC.js → chunk.54PZWX23.js} +1 -1
- package/dist/preview/chunk.5YFO6D7J.js +1 -0
- package/dist/preview/chunk.6EGHJCEM.js +1 -0
- package/dist/preview/{chunk.O2WWYZI7.js → chunk.6EHE26ZS.js} +1 -1
- package/dist/preview/{chunk.RG6WNOBW.js → chunk.6RLFO5GA.js} +1 -1
- package/dist/preview/chunk.6WRA3Y7D.js +1 -0
- package/dist/preview/{chunk.IQ2HKGJS.js → chunk.7C4IR4S7.js} +1 -1
- package/dist/preview/{chunk.4YXJPKXD.js → chunk.7JLYEZW4.js} +1 -1
- package/dist/preview/{chunk.VSNHCGKC.js → chunk.7JW5SHRR.js} +1 -1
- package/dist/preview/{chunk.76GF5US2.js → chunk.7MJGZHTS.js} +1 -1
- package/dist/preview/{chunk.F67F6QZ6.js → chunk.7MWLDDFL.js} +1 -1
- package/dist/preview/{chunk.QZEZHCOI.js → chunk.7SGQ3HFG.js} +1 -1
- package/dist/preview/chunk.A7HMVWMG.js +1 -0
- package/dist/preview/{chunk.PKUDIWIF.js → chunk.AGVFW6WC.js} +1 -1
- package/dist/preview/{chunk.FOQ27RAR.js → chunk.AOEXSQDG.js} +1 -1
- package/dist/preview/{chunk.IROYMLER.js → chunk.AP22NNIM.js} +1 -1
- package/dist/preview/{chunk.RNEJYIQ7.js → chunk.AVDXG57A.js} +1 -1
- package/dist/preview/{chunk.N7JT6MG2.js → chunk.B2BLZDBD.js} +1 -1
- package/dist/preview/chunk.B445DZOY.js +1 -0
- package/dist/preview/chunk.BH365UJ5.js +1 -0
- package/dist/preview/{chunk.IPAZOKMQ.js → chunk.BJR6E2CT.js} +1 -1
- package/dist/preview/{chunk.KSM6NVAT.js → chunk.BNU3KXKL.js} +1 -1
- package/dist/preview/chunk.BTORFVKO.js +1 -0
- package/dist/preview/{chunk.OONCUAOH.js → chunk.BU6V76EF.js} +1 -1
- package/dist/preview/{chunk.F2VMMCVK.js → chunk.BVXOLZQ3.js} +1 -1
- package/dist/preview/{chunk.CTQULC5F.js → chunk.C75I24Z5.js} +1 -1
- package/dist/preview/{chunk.WHEUTAXA.js → chunk.CXIIRL67.js} +1 -1
- package/dist/preview/{chunk.4YS7547F.js → chunk.D25QV6DK.js} +1 -1
- package/dist/preview/chunk.D4IKO5YA.js +18 -0
- package/dist/preview/{chunk.Q7RQC3F7.js → chunk.D4K23FUB.js} +1 -1
- package/dist/preview/{chunk.R6V37SR7.js → chunk.D53IGR45.js} +1 -1
- package/dist/preview/chunk.D66RI4QS.js +1 -0
- package/dist/preview/{chunk.BNPQUI3F.js → chunk.DFGXNFFE.js} +1 -1
- package/dist/preview/{chunk.RVJXO5GG.js → chunk.DSNHE4MZ.js} +1 -1
- package/dist/preview/{chunk.UHX4WTM7.js → chunk.DTRNDSMS.js} +1 -1
- package/dist/preview/{chunk.QGG6ZRJ5.js → chunk.DV4GSLGX.js} +2 -2
- package/dist/preview/{chunk.H7KCWCB4.js → chunk.EJAVIZ7Y.js} +1 -1
- package/dist/preview/{chunk.MF73YBJL.js → chunk.EM5CGFNB.js} +1 -1
- package/dist/preview/chunk.EPTUOPPC.js +1 -0
- package/dist/preview/{chunk.L4YNDNX7.js → chunk.ERWBI2NK.js} +1 -1
- package/dist/preview/chunk.EYSQPXVE.js +2 -0
- package/dist/preview/{chunk.47RTA6M3.js → chunk.FIS27KW4.js} +1 -1
- package/dist/preview/chunk.FNK2ZZ5E.js +1 -0
- package/dist/preview/{chunk.5AGW4NRZ.js → chunk.FOYVTN5B.js} +1 -1
- package/dist/preview/{chunk.7ELB37JU.js → chunk.FUMQLGNM.js} +1 -1
- package/dist/preview/chunk.G25JEYCC.js +1 -0
- package/dist/preview/{chunk.IXOQQBJE.js → chunk.G3Q5CYEM.js} +1 -1
- package/dist/preview/chunk.GEY4MA4D.js +6 -0
- package/dist/preview/chunk.GRLPNTUW.js +2 -0
- package/dist/preview/{chunk.2MCZ4CU5.js → chunk.H42WBU5C.js} +1 -1
- package/dist/preview/{chunk.WJS6P7GI.js → chunk.IQHVVQEA.js} +1 -1
- package/dist/preview/{chunk.TCXKPILZ.js → chunk.IVHPJUFM.js} +1 -1
- package/dist/preview/{chunk.FOJDVK2Q.js → chunk.IWEPDTVG.js} +1 -1
- package/dist/preview/{chunk.P4KCZRIG.js → chunk.IYLOA3MV.js} +1 -1
- package/dist/preview/chunk.JBG5UQLM.js +1 -0
- package/dist/preview/{chunk.NFIGGSMJ.js → chunk.KDTNKKOY.js} +1 -1
- package/dist/preview/chunk.KJBXNMIU.js +21 -0
- package/dist/preview/chunk.KLAEKRCA.js +1 -0
- package/dist/preview/{chunk.Z4UM4CMT.js → chunk.KQSD5MLY.js} +1 -1
- package/dist/preview/{chunk.ETR6AV47.js → chunk.KVEDMKUN.js} +1 -1
- package/dist/preview/{chunk.TBQOSI4J.js → chunk.LD6S2FL5.js} +1 -1
- package/dist/preview/{chunk.63JLXGYX.js → chunk.LUL6PFIQ.js} +1 -1
- package/dist/preview/chunk.MCFLCC42.js +12 -0
- package/dist/preview/{chunk.SWWAEOZ7.js → chunk.MJ4XTNTL.js} +1 -1
- package/dist/preview/{chunk.RZF3QM4E.js → chunk.MU5WUTVF.js} +1 -1
- package/dist/preview/{chunk.ZCYGUP3I.js → chunk.MUHFZXPS.js} +1 -1
- package/dist/preview/{chunk.AGIO2GRV.js → chunk.N2S3TMBC.js} +1 -1
- package/dist/preview/{chunk.63MS2LOP.js → chunk.N2S45SSL.js} +1 -1
- package/dist/preview/{chunk.KSXB4LDF.js → chunk.NB6WN4DO.js} +1 -1
- package/dist/preview/{chunk.5M4TMZXC.js → chunk.NBJ4C33P.js} +1 -1
- package/dist/preview/{chunk.WBHM5I3I.js → chunk.NQ7SRWXA.js} +1 -1
- package/dist/preview/chunk.NQDGUIUQ.js +1 -0
- package/dist/preview/{chunk.KRGM25HF.js → chunk.NUUT37ER.js} +1 -1
- package/dist/preview/{chunk.SZR3Z43B.js → chunk.O3ONLQUF.js} +1 -1
- package/dist/preview/chunk.OFBESPHJ.js +1 -0
- package/dist/preview/chunk.OKHEZJBX.js +1 -0
- package/dist/preview/{chunk.2W22AWSL.js → chunk.OL5D7YTW.js} +1 -1
- package/dist/preview/{chunk.SD6N4DGF.js → chunk.ON35FJ5H.js} +1 -1
- package/dist/preview/{chunk.3LDYUO77.js → chunk.OS75HEZP.js} +1 -1
- package/dist/preview/{chunk.DQS7D2W2.js → chunk.OTF3NNTI.js} +1 -1
- package/dist/preview/chunk.P2AC6JRL.js +88 -0
- package/dist/preview/chunk.PBCT33FF.js +1 -0
- package/dist/preview/{chunk.NEEOVRB7.js → chunk.PCVU3LY3.js} +1 -1
- package/dist/preview/chunk.PFEKS3KO.js +5 -0
- package/dist/preview/chunk.PFR3FQBR.js +1 -0
- package/dist/preview/{chunk.VC3UGFHY.js → chunk.Q4KNNJFL.js} +1 -1
- package/dist/preview/chunk.QBHVBL42.js +1 -0
- package/dist/preview/chunk.QPNFWP4Z.js +1 -0
- package/dist/preview/{chunk.24OZGU7J.js → chunk.QQE7N7LB.js} +1 -1
- package/dist/preview/{chunk.DNROW6LX.js → chunk.QQRLUBWQ.js} +1 -1
- package/dist/preview/{chunk.ETPKXUAN.js → chunk.QWX2N2VD.js} +2 -2
- package/dist/preview/chunk.R5IRHCLZ.js +1 -0
- package/dist/preview/{chunk.UV3YU64Z.js → chunk.REANMQ6K.js} +1 -1
- package/dist/preview/{chunk.5TM5VA2H.js → chunk.RI624PFK.js} +1 -1
- package/dist/preview/chunk.RMWLV3PR.js +20 -0
- package/dist/preview/{chunk.7N2GXZYI.js → chunk.RSR2M7ZO.js} +2 -2
- package/dist/preview/chunk.SGJSJGSR.js +1 -0
- package/dist/preview/chunk.SIVMZNHZ.js +1 -0
- package/dist/preview/{chunk.FWSCBHZ5.js → chunk.SPZVEQC5.js} +1 -1
- package/dist/preview/chunk.SR2345SW.js +1 -0
- package/dist/preview/chunk.ST4JHXPS.js +1 -0
- package/dist/preview/chunk.TABIRLQS.js +2 -0
- package/dist/preview/{chunk.52VGZBO3.js → chunk.TBA4GF34.js} +1 -1
- package/dist/preview/{chunk.6TIEX67B.js → chunk.THENABJU.js} +1 -1
- package/dist/preview/{chunk.Y4ZUJUUT.js → chunk.TM6JVVGW.js} +1 -1
- package/dist/preview/{chunk.57ZSMK3R.js → chunk.TSHBXCMU.js} +1 -1
- package/dist/preview/{chunk.PYE3WZM7.js → chunk.UL43GFVC.js} +1 -1
- package/dist/preview/{chunk.RBJAPOZ3.js → chunk.UTRIPGW6.js} +1 -1
- package/dist/preview/{chunk.V7XHNRQM.js → chunk.VSWEKNKS.js} +2 -2
- package/dist/preview/chunk.VV3PNZPI.js +1 -0
- package/dist/preview/chunk.W6CGAPNQ.js +1 -0
- package/dist/preview/{chunk.IJNOT4S4.js → chunk.WQN7EFW3.js} +2 -2
- package/dist/preview/{chunk.PC6PID5X.js → chunk.X4MTZKL3.js} +1 -1
- package/dist/preview/{chunk.C3NHNYA6.js → chunk.XJ7YGW6Y.js} +1 -1
- package/dist/preview/{chunk.MCB26YCQ.js → chunk.XMOIMPUC.js} +1 -1
- package/dist/preview/{chunk.6RY6OSE6.js → chunk.XN7PIWVC.js} +1 -1
- package/dist/preview/chunk.XOZU4OFA.js +1 -0
- package/dist/preview/{chunk.T42S2WMB.js → chunk.XXZFWZ4C.js} +1 -1
- package/dist/preview/{chunk.ZQY6ODXC.js → chunk.YECMUK4X.js} +1 -1
- package/dist/preview/chunk.YSFNPYCD.js +2 -0
- package/dist/preview/{chunk.ZWVN75EY.js → chunk.YXOJKGRC.js} +1 -1
- package/dist/preview/{chunk.CMOXKRWT.js → chunk.ZBL47SFK.js} +1 -1
- package/dist/preview/{chunk.EYI3Y2DY.js → chunk.ZILULTJJ.js} +1 -1
- package/dist/preview/index.html +50 -49
- package/dist/preview/page.js +2 -2
- package/package.json +6 -6
- package/dist/preview/chunk.2CLANQHZ.js +0 -1
- package/dist/preview/chunk.2L3VFGHX.js +0 -1
- package/dist/preview/chunk.4OGOTHRD.js +0 -1
- package/dist/preview/chunk.5G53VDOC.js +0 -1
- package/dist/preview/chunk.64WM4IBI.js +0 -1
- package/dist/preview/chunk.6QVXXQCW.js +0 -2
- package/dist/preview/chunk.7NNI7YH4.js +0 -1
- package/dist/preview/chunk.A3RNSSUQ.js +0 -1
- package/dist/preview/chunk.A7RKTSOH.js +0 -20
- package/dist/preview/chunk.AS4CQBOQ.js +0 -5
- package/dist/preview/chunk.AWXDZUKH.js +0 -1
- package/dist/preview/chunk.AYA7SYIU.js +0 -1
- package/dist/preview/chunk.BBS5C2BY.js +0 -1
- package/dist/preview/chunk.COYLGLTI.js +0 -1
- package/dist/preview/chunk.DX357TZ3.js +0 -2
- package/dist/preview/chunk.GQHAAKJG.js +0 -1
- package/dist/preview/chunk.HDRD33II.js +0 -1
- package/dist/preview/chunk.I6JLOEJU.js +0 -1
- package/dist/preview/chunk.ISNEX772.js +0 -1
- package/dist/preview/chunk.IW7YFPGG.js +0 -1
- package/dist/preview/chunk.IYIN6VSN.js +0 -1
- package/dist/preview/chunk.JUWWRRHA.js +0 -1
- package/dist/preview/chunk.K2NCGPCL.js +0 -1
- package/dist/preview/chunk.KWQ7QOHD.js +0 -2
- package/dist/preview/chunk.MCCUVGTE.js +0 -1
- package/dist/preview/chunk.NDWW5EER.js +0 -1
- package/dist/preview/chunk.OCTOGZVJ.js +0 -3
- package/dist/preview/chunk.OJGUIWDD.js +0 -88
- package/dist/preview/chunk.PBKO5CKD.js +0 -1
- package/dist/preview/chunk.QGVLJTZS.js +0 -1
- package/dist/preview/chunk.RX2M4C5W.js +0 -2
- package/dist/preview/chunk.SGKK4UKP.js +0 -1
- package/dist/preview/chunk.T7RJCEJB.js +0 -18
- package/dist/preview/chunk.UKAPFIPJ.js +0 -1
- package/dist/preview/chunk.VW2VCPJX.js +0 -1
- package/dist/preview/chunk.W6COSBO2.js +0 -21
- package/dist/preview/chunk.WAB7UDHU.js +0 -1
- package/dist/preview/chunk.X5G7FOPY.js +0 -12
- package/dist/preview/chunk.XYEFZ2OO.js +0 -1
- package/dist/preview/chunk.YHH4TWZ2.js +0 -1
- package/dist/preview/chunk.YVONXFKE.js +0 -6
- package/dist/preview/chunk.ZIEHF67C.js +0 -1
- package/dist/preview/chunk.ZL7ZBJUU.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk.AJZBJBMO.js";var e='"use strict";\n/*! @remote-dom/core and @remote-dom/polyfill \u2014 Copyright 2020-present, Shopify Inc. \u2014 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 \u2014 Elastic License 2.0. */\n"use strict";(()=>{var Oe=globalThis,Kr=Oe.addEventListener,Zr=Oe.removeEventListener,Qr=Oe.postMessage,Jr=globalThis.queueMicrotask,un=globalThis.performance,eo=un?un.now.bind(un):Date.now,Re={listen:t=>Kr.call(Oe,"message",t),unlisten:t=>Zr.call(Oe,"message",t),post:t=>Qr.call(Oe,t),microtask:t=>Jr.call(globalThis,t),now:()=>eo()};var v=Symbol("name"),ue=Symbol("prefix"),de=Symbol("value"),S=Symbol("ns"),q=Symbol("owner"),I=Symbol("owner_document"),ne=Symbol("attributes"),M=Symbol("prev"),f=Symbol("next"),R=Symbol("child"),Y=Symbol("parent"),me=Symbol("host"),K=Symbol("data"),Ee=Symbol("listeners"),dn=Symbol("isTrusted"),Ae=Symbol("path"),_e=Symbol("stop_immediate_propagation"),Pe=Symbol("dispatching"),se=Symbol("content"),D=Symbol("hooks"),mt=Symbol("extensions"),Ne=Symbol("hooks_dispatch"),U=Symbol("is_connected"),Ce=Symbol("create_element"),qn=0,X=1,ke=2,Ie=3,Me=8,Te=9,Yn=10,fe=11,A="http://www.w3.org/1999/xhtml",Z="http://www.w3.org/2000/svg",Wn="http://www.w3.org/XML/1998/namespace",Xe="http://www.w3.org/2000/xmlns/";function ft(t){return t.split(/[\\t\\n\\f\\r ]+/).filter(Boolean)}function G(t){return t.replace(/[A-Z]/g,e=>String.fromCharCode(e.charCodeAt(0)+32))}function Xn(t){return t.replace(/[a-z]/g,e=>String.fromCharCode(e.charCodeAt(0)-32))}function C(t,e){let n=globalThis.DOMException;if(typeof n=="function")return new n(t,e);let r=new Error(t);return r.name=e,r}var $n=/^(?:[A-Za-z][^\\0\\t\\n\\f\\r\\u0020/>]*|[:_\\u0080-\\u{10FFFF}][A-Za-z0-9-.:_\\u0080-\\u{10FFFF}]*)$/u,Kn=/[\\0\\t\\n\\f\\r />=]/u,to=/[\\0\\t\\n\\f\\r />]/u;function ie(t){if(t==null)return null;let e=String(t);return e===""?null:e}function Zn(t){$n.test(t)||fn(t)}function mn(t){(t===""||Kn.test(t))&&fn(t)}function pt(t,e,n){let r=ie(t),o=String(e),s=o.indexOf(":"),i=s<0?null:o.slice(0,s),a=s<0?o:o.slice(s+1);if((i!=null&&(i===""||to.test(i))||(n==="element"?!$n.test(a):a===""||Kn.test(a)))&&fn(o),i!=null&&r==null)throw C(`A namespace is required for the prefix in "${o}"`,"NamespaceError");if(i==="xml"&&r!==Wn)throw C("The xml prefix requires the XML namespace","NamespaceError");if((o==="xmlns"||i==="xmlns")&&r!==Xe)throw C("The xmlns name requires the XMLNS namespace","NamespaceError");if(r===Xe&&o!=="xmlns"&&i!=="xmlns")throw C("The XMLNS namespace requires the xmlns name or prefix","NamespaceError");return{namespace:r,qualifiedName:o,prefix:i,localName:a}}function fn(t){throw C(`Invalid name: "${t}"`,"InvalidCharacterError")}var ht=0,gt=1,Qn=2,pn=3,no=typeof performance>"u"?Date.now:performance.now.bind(performance),V=class{static NONE=ht;static CAPTURING_PHASE=gt;static AT_TARGET=Qn;static BUBBLING_PHASE=pn;timeStamp=no();target=null;currentTarget=null;srcElement=null;bubbles=!1;cancelable=!1;composed=!1;defaultPrevented=!1;cancelBubble=!1;eventPhase=ht;[Ae]=[];[_e]=!1;[Pe]=!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[Ae]]}stopPropagation(){this.cancelBubble=!0}stopImmediatePropagation(){this[_e]=!0,this.cancelBubble=!0}preventDefault(){this.cancelable&&(this.defaultPrevented=!0)}set returnValue(e){e||this.preventDefault()}get returnValue(){return!this.defaultPrevented}initEvent(e,n,r){this.type=e,this.bubbles=!!n,this.cancelable=!!r}};function hn(t,e,n){if(t.cancelBubble)return;let o=e[Ee]?.get(t.type)?.[n===gt?"capture":"bubble"];if(o)for(let s of[...o]){if(!o.has(s)||s.signal?.aborted)continue;t.eventPhase=t.target===e?Qn:n,t.currentTarget=e;let i=s.normalizedListener;try{typeof i=="object"?i.handleEvent(t):i.call(e,t)}catch(a){setTimeout(ro,0,a)}if(t[_e])break}}function ro(t){throw t}var $e=[],yt=new WeakMap;function bt(t,e){let n=yt.get(t);n?n.push(e):yt.set(t,[e]),$e[$e.length-1].push(t)}function B(t){let e=[];$e.push(e);let n;try{n=t()}catch(r){$e.pop();try{Jn(e)}catch{}throw r}return $e.pop(),Jn(e),n}function Jn(t){let e,n=!1;for(let r of t){let o=yt.get(r);if(o){for(;o.length>0;){let s=o.shift();try{s()}catch(i){n||(e=i,n=!0)}}yt.delete(r)}}if(n)throw e}var Et=[],Ke=[],gn=!1;function we(t){for(let e of t)Et.push(e),e[1]&&Ke.push(e[1]);if(!gn){gn=!0;try{let e,n=!1;for(let r=0;r<Et.length;r++){let[o,s]=Et[r];s&&Ke.splice(Ke.indexOf(s),1);try{o()}catch(i){n||(e=i,n=!0)}}if(n)throw e}finally{Et.length=0,Ke.length=0,gn=!1}}}function Ze(t){let e=t;for(;e;){if(Ke.includes(e))return!0;e=e[Y]??e[me]}return!1}var Qe=Symbol("listenerRegistrations"),pe=class{[Ee]=void 0;[Qe]=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 a=yn(o),l=this[Qe];l||(l=new Map,this[Qe]=l);let u=l.get(e);u||(u={},l.set(e,u));let m=u[a];if(m||(m=new Map,u[a]=m),m.has(n))return;let h=this,g={type:e,listener:n,capture:o,once:s,normalizedListener:n,signal:i};(s||i)&&(g.normalizedListener=function(...k){if(g.signal?.aborted){Nt(h,g);return}return g.once&&Nt(h,g),typeof g.listener=="object"?g.listener.handleEvent(...k):g.listener.call(this,...k)});let y=this[Ee];y||(y=new Map,this[Ee]=y);let O=y.get(e);O||(O={},y.set(e,O));let b=O[a];if(b||(b=new Set,O[a]=b),m.set(n,g),b.add(g),i){let N=()=>{Nt(h,g)};g.abortListener=N,i.addEventListener("abort",N,{once:!0})}this[I]?.defaultView[Ne].addEventListener?.(this,e,n,r)}removeEventListener(e,n,r){return oo.call(this,e,n,r)}dispatchEvent(e){if(e[Pe])throw C("Failed to execute \'dispatchEvent\' on \'EventTarget\': The event is already being dispatched.","InvalidStateError");e[Pe]=!0;try{let n=[],r=this;for(;r!=null;)n.push(r),r=r.parentNode;e.target=this,e.srcElement=this,e[Ae]=n;for(let s=n.length;s--;)if(hn(e,n[s],gt),e.cancelBubble)return!e.defaultPrevented;let o=e.bubbles?n:n.slice(0,1);for(let s=0;s<o.length;s++)if(hn(e,o[s],pn),e.cancelBubble)return!e.defaultPrevented;return!e.defaultPrevented}finally{e[Pe]=!1,e.cancelBubble=!1,e[_e]=!1,e.eventPhase=ht,e.currentTarget=null,e[Ae]=[]}}};function oo(t,e,n){if(e==null)return;let r=n===!0||n&&n.capture===!0,o=yn(!!r),s=this[Qe]?.get(t)?.[o]?.get(e);s&&Nt(this,s)}function yn(t){return t?"capture":"bubble"}function Nt(t,e){let n=yn(e.capture),r=t[Qe],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[Ee],a=i?.get(e.type);if(!a)return;let l=a[n];l?.delete(e)&&(l.size===0&&delete a[n],!a.bubble&&!a.capture&&i?.delete(e.type),t[I]?.defaultView[Ne].removeEventListener?.(t,e.type,e.listener,e.capture))}var Q=class extends Array{item(e){return this[e]??null}};var et=0,er=1,Nn=2,Tn=3,tt=4,tr=0,nr=1,xt=2,vt=3,rr=4,En=5,or=6,sr=7,Tt=/^(?:--|-?[A-Za-z_\\u0080-\\u{10FFFF}])[A-Za-z0-9_\\u0080-\\u{10FFFF}-]*$/u;function so(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 C(`Invalid or unsupported selector: "${t}"`,"SyntaxError")}function St(t,e){let n=typeof e=="string"?nt(e):[{combinator:tt,matchers:e}],r=null,o=t[R];return o&&n[0].matchers.length&&wn(o,n,s=>(r=s,!1)),r}function Ot(t,e){let n=typeof e=="string"?nt(e):[{combinator:tt,matchers:e}],r=new Q,o=t[R];return o&&n[0].matchers.length&&wn(o,n,s=>{r.push(s)}),r}function nt(t,e=!1,n=!1){let r={combinator:tt,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 a=0,l;for(;l=s.exec(i);){l.index!==a&&W(t),l[1]&&(r.matchers.length===0&&!(n&&o.length===1)&&W(t),l[1]===">"?r.combinator=er:l[1]==="+"?r.combinator=Tn:l[1]==="~"?r.combinator=Nn:r.combinator=et,r={combinator:tt,matchers:[]},o.push(r));let u=l[8]?G(l[8]):l[2]||l[7];l[7]!=null&&!l[6]&&r.matchers.length>0&&W(t);let h,g=l[4]??l[5]??l[7];if(l[2]){Tt.test(u)||W(t);let y=l[5],O=y?.[0];if(l[3]==null&&(O===\'"\'||O==="\'")){let b=l[0].lastIndexOf(y);g=i.slice(l.index+b+1),s.lastIndex=i.length}else y!=null&&!Tt.test(y)&&W(t);h=rr}else l[6]?(Tt.test(u)||W(t),h=l[6]==="#"?xt:vt):l[8]?h=l[9]==null?En:or:l[7]==="*"?h=tr:l[7]&&Tt.test(l[7])?h=nr:W(t);l[9]?([g,s.lastIndex]=so(i,s.lastIndex),u!=="has"&&u!=="not"&&W(t),u==="has"&&e&&W(t),nt(g,e||u==="has",u==="has")):h===En&&W(t),r.matchers.push({type:h,name:u,value:g}),a=s.lastIndex}return(a!==i.length||r.matchers.length===0)&&W(t),o}function io(t,e){let n=nt(e);return n[0]?.matchers.length?Je(t,n):!1}function ao(t,e){let n=nt(e,!0,!0),r=n[0];if(n.length===1&&r.matchers.length===0)return!1;let o=et,s={type:sr,name:":scope"};if(r.matchers.length===0?(o=r.combinator,r.matchers.push(s)):n.unshift({combinator:et,matchers:[s]}),n.some(({matchers:l})=>l.length===0))return!1;let i=o===Tn||o===Nn?t[f]:t[R];if(!i)return!1;let a=!1;return wn(i,n,()=>(a=!0,!1),t),a}function wn(t,e,n,r){let o=[],s=t;for(;s;){if(j(s)){if(Je(s,e,r)&&n(s)===!1)return!1;let i=s[R];if(i){let a=s[f];a&&o.push(a),s=i;continue}}s=s[f]??o.pop()??null}return!0}function Je(t,e,n){let{combinator:r,matchers:o}=e[e.length-1];if(r===tt){if(!wt(t,o,n))return!1;let a=e.slice(0,-1);return a.length===0||Je(t,a,n)}let s=r===er||r===et?Y:M,i=t[s];if(!i)return!1;if(r===et||r===Nn){for(;i;){if(j(i)&&wt(i,o,n)){let a=e.slice(0,-1);if(a.length===0||Je(i,a,n))return!0}i=i[s]}return!1}else{if(r===Tn&&!j(i)){for(;i&&!j(i);)i=i[s];if(!i)return!1}if(!j(i)||!wt(i,o,n))return!1;let a=e.slice(0,-1);return a.length===0||Je(i,a,n)}}function bn(t,e){return t.getAttributeNS(null,t.namespaceURI===A?G(e):e)}function wt(t,e,n){if(!t)return!1;if(Array.isArray(e)){for(let i of e)if(wt(t,i,n)===!1)return!1;return!0}let{type:r,name:o,value:s}=e;switch(r){case tr:return o==="*";case nr:return t.namespaceURI===A?t.localName===G(o):t.localName===o;case xt:return bn(t,"id")===o;case vt:let i=bn(t,"class");return i?ft(i).includes(o):!1;case rr:let a=bn(t,o);return s==null?a!=null:a===s;case sr:return t===n;case En:W(`:${o}`);case or:switch(o){case"has":return ao(t,s||"");case"not":return!io(t,s||"");default:W(`:${o}(${s})`)}}return!1}function lo(t){return t.nodeType===ke}function rt(t){return K in t}function vn(t){return t.nodeType===Ie}function co(t){return t.nodeType===Me}function j(t){return t.nodeType===X}function xn(t){return t.nodeType===fe}function cr(t){return"appendChild"in t}function Rt(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 a=[];for(let l of st(i)){if(o.has(l)||(o.add(l),e.push(l),a.push(l),!j(l)))continue;let u=l[ne];if(u)for(let h of u)o.has(h)||(o.add(h),e.push(h));let m=l[se];m&&!o.has(m)&&!r.has(m)&&(r.add(m),n.push(m))}s??=a}return{nodes:e,treeNodes:s}}function ot(t,e){for(let n of t)n[I]=e}function ir(t,e){let n=t.constructor,r=new n(t.name,t.value,t.namespaceURI);return r[I]=e,r}function ar(t,e){if(vn(t))return e.createTextNode(t.data);if(co(t))return e.createComment(t.data);if(lo(t))return ir(t,e);if(j(t)){let n=e[Ce](t[v],t.namespaceURI,t[ue],t.localName);if(t[ne])for(let r=0;r<t[ne].length;r++){let o=t[ne].item(r);n.attributes.setNamedItem(ir(o,e))}return n}else{if(xn(t))return e.createDocumentFragment();{let n=new t.constructor;return n[I]=e,n}}}function At(t,e,n=t.ownerDocument){if(t.nodeType===Te)throw C("Cannot clone a document node","NotSupportedError");let r=ar(t,n);if(!e||!j(t)&&!xn(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],a,l;if(i.cloningContent)if(i.contentSource&&i.contentDestination)a=i.contentSource.childNodes[i.childIndex++],l=i.contentDestination;else{s.pop(),i.appendTo&&i.appendTo.appendChild(i.destination);continue}else if(a=i.source.childNodes[i.childIndex++],l=i.destination,!a){if(i.cloningContent=!0,i.childIndex=0,j(i.source)&&i.source.namespaceURI===A&&i.source.localName==="template"){let m=i.source[se];m&&(o.has(m)&&lr(),o.add(m),i.contentSource=m,i.contentDestination=i.destination.content)}continue}if(!a){s.pop(),i.appendTo&&i.appendTo.appendChild(i.destination);continue}o.has(a)&&lr(),o.add(a);let u=ar(a,n);j(a)||xn(a)?s.push({source:a,destination:u,appendTo:l,childIndex:0,cloningContent:!1}):l.appendChild(u)}return r}function lr(){throw new Error("Cannot clone a cyclic or repeated node graph")}function _t(t,e){let n=String(e);return n===""?null:St(t,[{type:xt,name:n}])}function Pt(t,e){let n=[...new Set(ft(String(e)))];return Ot(t,n.map(r=>({type:vt,name:r})))}function Ct(t,e){let n=String(e),r=G(n),o=[];for(let s of kt(t))j(s)&&(n==="*"||(s.namespaceURI===A?s[v]===r:s[v]===n))&&o.push(s);return o}function kt(t){let e=[],n=[],r=t[R];for(;r;){e.push(r);let o=r[R],s=r[f];o?(s&&n.push(s),r=o):r=s??n.pop()??null}return e}function st(t){let e=kt(t);return e.unshift(t),e}var J=class extends pe{nodeType=qn;[v]="";[Y]=null;[me]=null;[R]=null;[M]=null;[f]=null;[U]=!1;get[D](){return this[I].defaultView[Ne]}get localName(){return this[v]}get nodeName(){return this[v]}get ownerDocument(){return this[I]}get isConnected(){return this[U]}isDefaultNamespace(e){let n=ie(e);return uo(this)===n}get parentNode(){return this[Y]}set parentNode(e){}get parentElement(){let e=this[Y];return!e||e.nodeType!==1?null:e}set parentElement(e){}get previousSibling(){return this[M]}set previousSibling(e){}get nextSibling(){return this[f]}set nextSibling(e){}get previousElementSibling(){let e=this[M];for(;e&&e.nodeType!==1;)e=e[M];return e}set previousElementSibling(e){}get nextElementSibling(){let e=this[f];for(;e&&e.nodeType!==1;)e=e[f];return e}set nextElementSibling(e){}get firstChild(){return this[R]}set firstChild(e){}get lastChild(){let e=this[R];for(;e;){let n=e[f];if(n==null)break;e=n}return e}set lastChild(e){}get nodeValue(){return rt(this)?this.data:null}set nodeValue(e){rt(this)&&(this.data=e)}get textContent(){if(rt(this))return this.data;let e="";for(let n of kt(this))vn(n)&&(e+=n.data);return e}set textContent(e){if(rt(this))this.data=e;else if(cr(this)){let n=e==null?"":String(e);n===""?this.replaceChildren():this.replaceChildren(n)}}cloneNode(e){return At(this,e)}contains(e){let n=e;for(;n!=null;){if(n===this)return!0;n=n.parentNode}return!1}};function uo(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(Xe,"xmlns");if(r!=null&&r.prefix==null)return ie(r.value);e=n.parentElement;break}case Te:e=e.documentElement;break;case Yn:case fe:return null;case ke:e=e.ownerElement;break;default:e=e.parentElement}return null}var ee=Symbol("insertNode"),Rn=Symbol("preflightInsertions"),It=Symbol("replaceNode"),he=class extends J{remove(){let e=this.parentNode;e&&e.removeChild(this)}replaceWith(...e){let n=xe(e),r=this.parentNode;if(r)return Sn(o=>{ae(r,n);let s=this[f];for(;s&&n.includes(s);)s=s[f];let i=On(r,n,o);this.parentNode===r?r[It](i,this,o):r[ee](i,s,o)})}before(...e){let n=xe(e),r=this.parentNode;if(r)return Sn(o=>{ae(r,n);let s=this[M];for(;s&&n.includes(s);)s=s[M];let i=On(r,n,o);r[ee](i,s?s[f]:r.firstChild,o)})}after(...e){let n=xe(e),r=this.parentNode;if(r)return Sn(o=>{ae(r,n);let s=this[f];for(;s&&n.includes(s);)s=s[f];let i=On(r,n,o);r[ee](i,s,o)})}};function Sn(t){return B(()=>{let e=[];try{t(e)}catch(n){try{we(e)}catch{}throw n}we(e)})}function xe(t){return t.map(e=>e instanceof J?e:String(e))}function it(t,e){return e instanceof J?e:t.ownerDocument.createTextNode(String(e))}function ae(t,e){for(let n of e){if(!(n instanceof J))continue;let r=t;for(;r;){if(r===n)throw C("Cannot insert a node into itself or one of its descendants","HierarchyRequestError");r=r[Y]??r[me]}}}function On(t,e,n){let r=[];for(let s of e)r.push(it(t,s));if(r.length===1)return r[0];let o=t.ownerDocument.createDocumentFragment();o[Rn](r);for(let s of r)o[ee](s,null,n);return o}var Mt,An=0,ur=0,dr=0,mr=0,De=!1,Pn=!1,at=!1,Dt=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=mo(n),o=Mt??=new WeakMap,s=o.get(e);s==null&&(s=new Map,o.set(e,s));let i=s.get(this);i==null?An++:_n(i,-1),s.set(this,r),_n(r,1),this.#e.add(e)}disconnect(){let e=Mt;if(e!=null){for(let n of this.#e){let r=e.get(n),o=r?.get(this);o!=null&&(r.delete(this),An--,_n(o,-1)),r?.size===0&&e.delete(n)}this.#e.clear(),this.#n.length=0,An===0&&(Mt=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 te(t){let e=Mt;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 a=!1;if(t.type==="attributes"){if(!i.attributes||i.attributeFilter&&!i.attributeFilter.has(t.attributeName??""))continue;a=i.attributeOldValue}else if(t.type==="characterData"){if(!i.characterData)continue;a=i.characterDataOldValue}else if(!i.childList)continue;n.set(s,n.get(s)===!0||a)}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 Lt(...t){let e=new Q;return e.push(...t),e}function mo(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 _n(t,e){t.attributes&&(ur+=e),t.characterData&&(dr+=e),t.childList&&(mr+=e),De=ur>0,Pn=dr>0,at=mr>0}var re=class extends he{childNodes=new Q;children=new Q;appendChild(e){return B(()=>this[ee](e,null))}insertBefore(e,n){return B(()=>this[ee](e,n||null))}append(...e){return B(()=>{let n=xe(e.filter(r=>r!=null));n.length>1&&ae(this,n);for(let r of n)this[ee](it(this,r),null)})}prepend(...e){return B(()=>{let n=xe(e.filter(o=>o!=null));n.length>1&&ae(this,n);let r=this.firstChild;for(let o of n)this[ee](it(this,o),r)})}replaceChildren(...e){return B(()=>{let n=xe(e.filter(o=>o!=null));ae(this,n);let r;for(;r=this.firstChild;)this.removeChildImmediately(r);for(let o of n)this[ee](it(this,o),null)})}removeChild(e){return B(()=>(this.removeChildImmediately(e),e))}removeChildImmediately(e){if(e.parentNode!==this)throw C("The node is not a child of this node","NotFoundError");let n=this[U]?st(e):void 0,r=e[M],o=e[f],s=Gt(this,e);if(n)for(let i of n)i[U]=!1;this.queueRemovalMutationRecord(this,e,r,o),n&&this.enqueueTreeReactions(n,"disconnectedCallback"),we(this.collectRemovalHookEffects(e,s))}replaceChild(e,n){return B(()=>this[It](e,n))}[It](e,n,r){if(ae(this,[e]),n.parentNode!==this)throw C("The reference node is not a child of this parent","NotFoundError");let o=n[M],s=n[f],i=this.prepareInsertion(e),a=this[U]?st(n):void 0,l=new Set(i.map(({node:g})=>g)),u=s;for(;u&&l.has(u);)u=u[f];let m=Gt(this,n);if(a){for(let y of a)y[U]=!1;let g=new Set(a);for(let y of i)g.has(y.node)&&(y.shouldDisconnect=!1)}this.commitInsertion(i,u);let h=this[U];return this.queueRemovalMutationRecord(this,n,o,s),this.queueInsertionMutationRecords(i),a&&this.enqueueTreeReactions(a,"disconnectedCallback"),this.enqueueInsertionReactions(i,h),this.performOrCollectHookEffects([...this.collectRemovalHookEffects(n,m),...this.collectInsertionHookEffects(i)],r),n}querySelectorAll(e){return Ot(this,e)}querySelector(e){return St(this,e)}[ee](e,n,r){return this.validateInsertion(e,n),this.insertIntoValidated(e,n,r),e}[Rn](e){for(let n of e)this.validateInsertion(n,null),this.prepareInsertion(n)}validateInsertion(e,n){if(ae(this,[e]),n&&n.parentNode!==this)throw C("The reference node is not a child of this parent","NotFoundError")}insertIntoValidated(e,n,r){e===n&&(n=e[f]);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):we(e)}prepareInsertion(e){let n=[];if(e.nodeType===fe){let i=e[R];for(;i;)n.push(i),i=i[f]}else n.push(e);let r=this[U],o=this[I],s=[];for(let i of n){let a=i[U],l=a||r,u,m;if(i[I]===o)l&&(u=st(i));else{let h=Rt(i);m=h.nodes,l&&(u=h.treeNodes)}s.push({node:i,nodes:u,adoption:m,shouldDisconnect:a})}return s}commitInsertion(e,n){for(let s of e){let i=s.node[Y];if(i){let a=s.node[M],l=s.node[f];s.source={parent:i,index:Gt(i,s.node),previousSibling:a,nextSibling:l}}}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&&ot(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[M];e[f]=n,e[M]=s,s?s[f]=e:this[R]=e,n[M]=e}else{e[f]=null;let s=this[R];if(s){let i;for(;i=s[f];)s=i;s[f]=e,e[M]=s}else this[R]=e,e[M]=null}let r=j(e);e[Y]=this;let o;if(n){if(o=this.childNodes.indexOf(n),this.childNodes.splice(o,0,e),r){let s=n;for(;s&&!j(s);)s=s[f];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[M],nextSibling:e[f]}}queueRemovalMutationRecord(e,n,r,o){at&&te({type:"childList",target:e,removedNodes:Lt(n),previousSibling:r,nextSibling:o})}queueInsertionMutationRecords(e){if(at)for(let n of e){let{node:r,source:o}=n;o&&this.queueRemovalMutationRecord(o.parent,r,o.previousSibling,o.nextSibling),te({type:"childList",target:this,addedNodes:Lt(r),previousSibling:n.previousSibling,nextSibling:n.nextSibling})}}collectRemovalHookEffects(e,n){return this.nodeType!==X||Ze(this)?[]:[[()=>this[D].removeChild?.(this,e,n)]]}collectInsertionHookEffects(e){let n=[];for(let r of e){let{node:o,source:s}=r;s?.parent.nodeType===X&&!Ze(s.parent)&&n.push([()=>s.parent[D].removeChild?.(s.parent,o,s.index)]),this.nodeType===X&&!Ze(this)&&n.push([()=>this[D].insertChild?.(this,o,r.insertIndex),o])}return n}enqueueInsertionReactions(e,n){for(let r of e){let{nodes:o}=r;o&&(r.shouldDisconnect&&this.enqueueTreeReactions(o,"disconnectedCallback"),n&&this.enqueueTreeReactions(o,"connectedCallback"))}}enqueueTreeReactions(e,n){pr(e,n)}};function fr(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[M],i=e[f],a=Gt(t,e);if(o)for(let u of o)u[U]=!1;ot(n.nodes,r),at&&te({type:"childList",target:t,removedNodes:Lt(e),previousSibling:s,nextSibling:i}),o&&pr(o,"disconnectedCallback");let l=[];t.nodeType===X&&!Ze(t)&&l.push([()=>t[D].removeChild?.(t,e,a)]),we(l)}function Gt(t,e){let n=e[M],r=e[f];n?n[f]=r:t[R]=r,r&&(r[M]=n);let o=t.childNodes.indexOf(e);return t.childNodes.splice(o,1),j(e)&&t.children.splice(t.children.indexOf(e),1),e[Y]=null,e[f]=null,e[M]=null,o}function pr(t,e){for(let n of t){let r=n[e];typeof r=="function"&&bt(n,()=>r.call(n))}}function lt(t,e,n,r,o){let{observedAttributes:s}=t.constructor,{attributeChangedCallback:i}=t;i==null||s==null||!s.includes(e)||bt(t,()=>i.call(t,e,n,r,o))}var Ht=class{[R]=null;constructor(e){this[q]=e}getNamedItem(e){let n=String(e),r=this[q][S]===A?G(n):n,o=this[R];for(;o;){if(o.name===r)return o;o=o[f]}return null}getNamedItemNS(e,n){let r=ie(e),o=String(n),s=this[R];for(;s;){if(s.localName===o&&s[S]===r)return s;s=s[f]}return null}item(e){let n=this[R],r=0;for(;n;){if(r++===e)return n;n=n[f]}return null}get length(){let e=0,n=this[R];for(;n;)e++,n=n[f];return e}removeNamedItem(e){let n=String(e),r=this[q][S]===A?G(n):n;return B(()=>this.removeNamedItemImmediately(o=>o.name===r))}removeNamedItemNS(e,n){let r=ie(e),o=String(n);return B(()=>this.removeNamedItemImmediately(s=>s.localName===o&&s[S]===r))}removeNamedItemImmediately(e){let n=this[q],r=this[R],o=null;for(;r!=null;){if(e(r)){o&&(o[f]=r[f]),this[R]===r&&(this[R]=r[f]);let s=r.value;return r[f]=null,r[q]=null,De&&te({type:"attributes",target:n,attributeName:r.name,attributeNamespace:r[S],oldValue:s}),n[D].removeAttribute?.(n,r.name,r[S]),lt(n,r.localName,s,null,r[S]),r}o=r,r=r[f]}return null}setNamedItem(e){return B(()=>this.setNamedItemImmediately(e))}setNamedItemImmediately(e){let n=this[q],r=e[q];if(r!=null&&r!==n)throw C("The attribute is already in use by another element.","InUseAttributeError");let o=null,s=this[R],i=null;for(;s;){if(s.localName===e.localName&&s[S]===e[S]){if(s===e)return s;i?i[f]=e:this[R]=e,e[f]=s[f],s[f]=null,o=s;break}i=s,s=s[f]}o==null&&(i?i[f]=e:this[R]=e),e[q]=n,e[I]=n[I],o&&(o[q]=null);let a=o==null||o.value!==e.value,l=o!=null&&o.name!==e.name;return a&&De&&te({type:"attributes",target:n,attributeName:e.name,attributeNamespace:e[S],oldValue:o?.value??null}),l&&n[D].removeAttribute?.(n,o.name,o[S]),(a||l)&&n[D].setAttribute?.(n,e.name,e.value,e[S]),a&<(n,e.localName,o?.value??null,e.value,e[S]),o}setNamedItemNS(e){return this.setNamedItem(e)}*[Symbol.iterator](){let e=this[R];for(;e;)yield e,e=e[f]}};var ve=class extends J{nodeType=ke;[S]=null;[f]=null;[q]=null;constructor(e,n,r){super(),this[v]=e,this[de]=n,r&&(this[S]=r)}get nodeName(){return this[v]}set nodeName(e){}get name(){return this[v]}set name(e){}get localName(){if(this[S]==null)return this[v];let e=this[v].indexOf(":");return e<0?this[v]:this[v].slice(e+1)}get prefix(){if(this[S]==null)return null;let e=this[v].indexOf(":");return e<0?null:this[v].slice(0,e)}get value(){return this[de]}set value(e){let n=String(e),r=this[q];if(!r){this[de]=n;return}B(()=>{let o=this[de];this[de]=n,De&&o!==n&&te({type:"attributes",target:r,attributeName:this[v],attributeNamespace:this[S],oldValue:o}),this[D].setAttribute?.(r,this[v],n,this[S]),lt(r,this.localName,o,n,this[S])})}get nodeValue(){return this.value}set nodeValue(e){this.value=e}get ownerElement(){return this[q]}get namespaceURI(){return this[S]}get specified(){return!0}};var fo={amp:"&",AMP:"&",apos:"\'",gt:">",GT:">",lt:"<",LT:"<",quot:\'"\',QUOT:\'"\'},po=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),ho=/(?:<([a-z][a-z0-9-:]*)((?:[\\s]+[^<>\'"=/\\s]+(?:=([\'"])[^]*?\\3|=[^>\'"\\s]*|))*)[\\s]*(\\/?)\\s*>|<\\/([a-z][a-z0-9-:]*)>|<!--(.*?)-->|([^<>]+))/gi,yr=/\\s([^<>\'"=/\\n\\s]+)(?:=(["\'])([\\s\\S]*?)\\2|=([^>\'"\\n\\s]*)|)/g,go="|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|",yo=/^(?:color|face|size)$/i;function hr(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 fo[n];let s=Number.parseInt(r??o,r?10:16);try{return String.fromCodePoint(s)}catch{return e}})}function br(t){return t.namespaceURI===A&&po.has(t.localName)}function gr(t){let e=t.localName;return t[S]===Z&&(e==="foreignObject"||e==="desc"||e==="title")}function bo(t,e){if(go.includes(`|${t}|`))return!0;if(t!=="font")return!1;for(let n of e.matchAll(yr))if(yo.test(n[1]))return!0;return!1}function Ut(t,e){let n=e.ownerDocument,r=n.createDocumentFragment(),o=[],s=r;for(let i of t.matchAll(ho)){let a=i[1];if(a){let l=i[2],u=G(a),m=o[o.length-1]?.element??e,h=m[S]===Z?Z:A;if(u==="svg")h=Z;else if(h===Z){if(gr(m))h=A;else if(bo(u,l)){for(;o.length>0;){let O=o[o.length-1];if(O.element[S]!==Z||gr(O.element))break;o.pop(),s=O.target}h=A}}let g=h===A?u:a,y=n[Ce](g,h,null,g);for(let O of l.matchAll(yr))y.setAttribute(O[1],hr(O[3]||O[4]||""));if(s.append(y),br(y)||h!==A&&i[4])continue;o.push({element:y,target:s}),s=h===A&&u==="template"?y.content:y}else if(i[5]){let l=G(i[5]);for(let u=o.length-1;u>=0;u--){let m=o[u],h=G(m.element[v]);if(h===l){s=m.target,o.length=u;break}if(m.element[S]===A&&h==="template")break}}else i[6]?s.append(n.createComment(i[6])):s.append(hr(i[7]))}return r}function Vt(t){return Nr([{type:"content",child:t[R]}])}function Er(t){return Nr([{type:"opening",node:t}])}function Nr(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[v]}`);let s=o[ne]?.[R];for(;s;){e.push(` ${s[v]}`);let a=s[de];a!==""&&(a=String(a).replace(/&/g,"&").replace(/"/g,"""),e.push(`="${a}"`)),s=s[f]}if(e.push(">"),br(o))break;let i=o.namespaceURI===A&&o.localName==="template"?o[se]:o;t.push({type:"closing",name:o[v]}),t.push({type:"content",child:i?.[R]??null});break}case Ie:{let o=r;e.push(o[K].replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">"));break}case Me:{let o=r;e.push(`<!--${o[K]}-->`);break}}break}case"content":{let r=n.child;r&&(t.push({type:"content",child:r[f]}),t.push({type:"opening",node:r}));break}case"closing":e.push(`</${n.name}>`);break}return e.join("")}var H=class extends re{nodeType=X;[S]=A;[ue]=null;get namespaceURI(){return this[S]}get prefix(){return this[ue]}get localName(){let e=this[ue];return e==null?this[v]:this[v].slice(e.length+1)}get nodeName(){return this[S]===A?Xn(this[v]):this[v]}get tagName(){return this.nodeName}get id(){return this.getAttributeNS(null,"id")??""}set id(e){this.setAttribute("id",String(e))}get slot(){return this.getAttributeNS(null,"slot")??""}set slot(e){let n=String(e);this.getAttributeNS(null,"slot")!==n&&this.attributes.setNamedItem(new ve("slot",n))}get attributes(){let e=this[ne];return e||(e=new Ht(this),this[ne]=e),e}getAttributeNames(){return[...this.attributes].map(e=>e.name)}getElementsByTagName(e){return Ct(this,e)}get firstElementChild(){return this.children[0]??null}getElementsByClassName(e){return Pt(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[S]===A?G(r):r,i=this.attributes.getNamedItemNS(null,s);i?i.value=o:this.attributes.setNamedItem(new ve(s,o))}setAttributeNS(e,n,r){let o=ie(e),s=String(n),i=String(r),a=pt(o,s,"attribute"),l=this.attributes.getNamedItemNS(a.namespace,a.localName);l?l.value=i:this.attributes.setNamedItemNS(new ve(a.qualifiedName,i,a.namespace))}toggleAttribute(e,n){let r=String(e);mn(r);let o=this[S]===A?G(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 ve(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[S]===A?G(n):n;this.attributes.removeNamedItemNS(null,r)}removeAttributeNS(e,n){this.attributes.removeNamedItemNS(e,n)}get outerHTML(){return Er(this)}get innerHTML(){return Vt(this)}set innerHTML(e){if(e==null||e==="")this.replaceChildren();else{let n=Ut(String(e),this);this.replaceChildren(n)}}};var Le=class t extends H{[S]=Z;get ownerSVGElement(){let e=null,n=this.parentNode;for(;n instanceof t;)e=n,n=n.parentNode;return e}};var ge=class extends he{[K]="";constructor(e){super(),this[K]=e==null?"":String(e)}setData(e){let n=Pn,r=n?this[K]:null,o="";e!=null&&(o=typeof e=="string"?e:String(e)),this[K]=o,n&&r!==o&&te({type:"characterData",target:this,oldValue:r}),this[D].setText?.(this,o)}get data(){return this[K]}set data(e){this.setData(e)}};var Ge=class extends ge{nodeType=Ie;[v]="#text"};var He=class extends ge{nodeType=Me;[v]="#comment"};var Ue=class extends re{nodeType=fe;[v]="#document-fragment";[I]=typeof window<"u"?window.document:null;getElementById(e){return _t(this,e)}};var Ve=class extends H{get content(){let e=this[se];return e||(e=this.ownerDocument.createDocumentFragment(),e[me]=this,this[se]=e),e}set content(e){}set innerHTML(e){this.content.replaceChildren(Ut(String(e),this))}get innerHTML(){let e=this[se];return e?Vt(e):""}};var Bt=class extends H{};var zt=class extends H{};var jt=class extends H{};var ct=class extends re{nodeType=Te;[v]="#document";[U]=!0;constructor(e){super(),this.defaultView=e,this[I]=this,this.documentElement=qt(new jt,this,"html"),this.body=qt(new Bt,this,"body"),this.head=qt(new zt,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 Pt(this,e)}createElement(e){let n=String(e);return Zn(n),Cn(this,G(n))}createElementNS(e,n){let r=pt(e,n,"element");return Cn(this,r.qualifiedName,r.namespace,r.prefix,r.localName)}[Ce](e,n,r,o){return Cn(this,e,n,r,o)}createTextNode(e){let n=Ft(new Ge(e),this);return this[D].createText?.(n,n.data),n}createComment(e){return Ft(new He(e),this)}createDocumentFragment(){return Ft(new Ue,this)}createEvent(){return new V("")}getElementById(e){return _t(this,e)}getElementsByTagName(e){return Ct(this,e)}importNode(e,n){if(e.nodeType===Te)throw C("Cannot import a document node","NotSupportedError");return At(e,n,this)}adoptNode(e){if(e[I]===this)return e;let n=Rt(e);return B(()=>{let r=e.parentNode;return r?fr(r,e,n,this):ot(n.nodes,this),e})}};function Ft(t,e){return Object.defineProperty(t,I,{value:e,writable:!0,enumerable:!1}),t}function Cn(t,e,n=A,r=null,o=e){let s;if(n===Z)s=new Le;else if(n===A&&o==="template")s=new Ve;else if(n===A){let i=t.defaultView.customElements.get(o);s=i?new i:new H}else s=new H;return qt(s,t,e,n,r)}function qt(t,e,n,r=A,o=null){return Ft(t,e),Object.defineProperties(t,{[v]:{value:n},[S]:{value:r},[ue]:{value:o}}),e[D].createElement?.(t,r),t}var Yt=class extends V{constructor(e,n){super(e,n),this.detail=n?.detail??null}initCustomEvent(e,n,r,o){super.initEvent(e,n,r),this.detail=o??null}};var Wt=class extends V{constructor(e,n){super(e,n),this.message=n.message,this.filename=n.filename,this.lineno=n.lineno,this.colno=n.colno,this.error=n.error}};var Xt=class extends V{constructor(e,n){super(e,n),this.promise=n.promise,this.reason=n.reason}};var $t=class extends V{constructor(e,n){super(e,n),this.oldState=n.oldState,this.newState=n.newState}};var Kt=class extends V{constructor(e,n={}){super(e,n),this.relatedTarget=n.relatedTarget??null}};var Zt=class extends V{constructor(e,n={}){super(e,n),this.clipboardData=n.clipboardData??null}};var Qt=class extends H{};var Eo=/^[a-z][^A-Z\\u0000\\t\\n\\f\\r />]*-[^A-Z\\u0000\\t\\n\\f\\r />]*$/u,No=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);function Tr(t){return Eo.test(t)&&!No.has(t)}function wr(t){return C(`Invalid custom element name: "${t}"`,"SyntaxError")}var Jt=class{registry=new Map;listenersByName=new Map;define(e,n,r){if(!Tr(e))throw wr(e);if(this.registry.has(e))throw C(`A custom element named "${e}" has already been defined`,"NotSupportedError");if(this.getName(n)!=null)throw C("This constructor has already been registered in this custom element registry","NotSupportedError");this.registry.set(e,n);let o=this.listenersByName.get(e);if(o!=null){this.listenersByName.delete(e);for(let s of o)s(n)}}get(e){return this.registry.get(e)}getName(e){for(let[n,r]of this.registry)if(r===e)return n;return null}whenDefined(e){if(!Tr(e))return Promise.reject(wr(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 To=["onerror","onunhandledrejection"],vr=Symbol.for("@remote-dom/polyfill/global-property");function Sr(t){return Object.getOwnPropertyDescriptors(t)}function Or(t){let e={};for(let[n,r]of Object.entries(Object.getOwnPropertyDescriptors(pe.prototype)))n!=="constructor"&&typeof r.value=="function"&&(r.value=kn(r.value.bind(t)),e[n]=r);return e}function Rr(t){let e={};for(let n of To)e[n]={configurable:!0,enumerable:!0,get:kn(()=>t[n]),set:kn(r=>{t[n]=r})};return e}function wo(t){return Object.assign(Sr(t),Or(t),Rr(t))}function kn(t){return Object.defineProperty(t,vr,{value:!0}),t}function xr(t,e){for(let n of Reflect.ownKeys(e)){let r=xo(t,n);(r==null||vo(r))&&Object.defineProperty(t,n,e[n])}}function xo(t,e){let n=t;for(;n;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function vo(t){return[t.value,t.get,t.set].some(e=>typeof e=="function"&&e[vr]===!0)}var Se=class extends pe{[D]={};[mt]=[];[Ne]=Oo(this);name="";window=this;parent=this;self=this;top=this;document=new ct(this);customElements=new Jt;location=globalThis.location;navigator=globalThis.navigator;Event=V;ErrorEvent=Wt;PromiseRejectionEvent=Xt;ToggleEvent=$t;FocusEvent=Kt;ClipboardEvent=Zt;EventTarget=pe;CustomEvent=Yt;Node=J;ParentNode=re;ChildNode=he;DocumentFragment=Ue;Document=ct;CharacterData=ge;Comment=He;Text=Ge;Element=H;HTMLElement=Qt;SVGElement=Le;HTMLTemplateElement=Ve;MutationObserver=Dt;#t=null;#n=null;#e=null;static with(...e){let n=this;return class extends n{constructor(){super();for(let o of e)So(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=Sr(e),s=Object.assign(Or(e),Rr(e));delete o.self,Object.defineProperties(globalThis,o),xr(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),xr(n,s))}static setGlobalThis(e){for(let n in e)e[n]===e&&(e[n]=globalThis);Object.defineProperties(globalThis,wo(e))}};function So(t,e){t[mt].push(e(t)??{})}function Oo(t){return{createElement:le.bind(null,t,"createElement"),setAttribute:le.bind(null,t,"setAttribute"),removeAttribute:le.bind(null,t,"removeAttribute"),createText:le.bind(null,t,"createText"),setText:le.bind(null,t,"setText"),insertChild:le.bind(null,t,"insertChild"),removeChild:le.bind(null,t,"removeChild"),addEventListener:le.bind(null,t,"addEventListener"),removeEventListener:le.bind(null,t,"removeEventListener")}}function le(t,e,...n){for(let s of t[mt])s[e]?.apply(s,n);let r=t[D];r[e]?.apply(r,n)}var en=new Se;var In="~";var ye=new WeakMap;function Be(t){return ye.get(t)}var Gn=new WeakMap,Ao=0;function $(t){let e=Gn.get(t);return e==null&&(e=String(Ao++),tn(t,e)),e}function tn(t,e){Gn.set(t,e)}var Dn=new WeakMap;function _o(t){return Dn.get(t)}var Ln=new WeakMap;function Po(t){let e=Ln.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 Co=new WeakMap;function ko(t){return Co.get(t)}function Hn(t,e,n){let r=Dn.get(t);if(r==null&&(r={},Dn.set(t,r)),r[e]===n)return;r[e]=n;let o=ye.get(t);o?.mutate([[3,$(t),e,n,1]])}function be(t,e,n){let r=Ln.get(t);if(r==null&&(r={},Ln.set(t,r)),r[e]===n)return;n==null?delete r[e]:r[e]=String(n);let o=ye.get(t);o?.mutate([[3,$(t),e,n,2]])}function ze(t,e){if(ye.get(t)!==e&&(ye.set(t,e),t.childNodes))for(let r=0;r<t.childNodes.length;r++)ze(t.childNodes[r],e)}function nn(t){if(ye.get(t)!=null&&(ye.delete(t),t.childNodes))for(let n=0;n<t.childNodes.length;n++)nn(t.childNodes[n])}function je(t){let{nodeType:e}=t;switch(e){case 1:return{id:$(t),type:e,element:t.localName,properties:Mn(_o(t)),attributes:Mn(Po(t)),eventListeners:Mn(ko(t)),children:Array.from(t.childNodes).map(je)};case 3:case 8:return{id:$(t),type:e,data:t.data};default:throw new Error(`Cannot serialize node of type ${t.nodeType} (${typeof t.nodeType})`)}}function Mn(t){return t?{...t}:void 0}function Un(t,e,...n){let r=Gn.get(t),o=ye.get(t);if(r==null||o==null)throw new Error(`Cannot call method ${e} on an unconnected node`);return o.call(r,e,...n)}var Fe=en[D];Fe.insertChild=(t,e,n)=>{let r=Be(t);r!=null&&(ze(e,r),r.mutate([[0,$(t),je(e),n]]))};Fe.removeChild=(t,e,n)=>{let r=Be(t);r!=null&&(nn(e),r.mutate([[1,$(t),n]]))};Fe.setText=(t,e)=>{let n=Be(t);n?.mutate([[2,$(t),e]])};Fe.setAttribute=(t,e,n)=>{t.tagName.includes("-")||be(t,e,n)};Fe.removeAttribute=(t,e)=>{t.tagName.includes("-")||be(t,e)};Se.setGlobal(en);function rn(t){if(typeof t=="string")return{type:"navigate",to:t};let{place:e,record:n,where:r,section:o}=t??{},s={...r===void 0?{}:{where:r},...o===void 0?{}:{section:String(o)}};return typeof e=="string"?{type:"navigate",place:e,...s}:typeof n=="string"?{type:"navigate",to:n,...s}:void 0}var _r=["wheel","drag","pinch"];function Pr(t){let e=t;return typeof t=="object"&&t!==null&&e.graview==="host-hello"&&typeof e.nonce=="string"}function kr(t,e={}){let n,r="",o,s=0,i=new Set,a=new Map,l=[],u=b=>{n?n.postMessage({...b,nonce:r}):l.push(b)},m=b=>{let N=b.data;if(!(!N||typeof N!="object")){if(N.type==="props"){o=N.props;for(let k of i)k(N.props)}else N.type==="answer"?(a.get(N.id)?.(N),a.delete(N.id)):N.type==="event"&&typeof N.listener=="number"?e.onEvent?.(N):N.type==="heartbeat"&&typeof N.beat=="number"&&u({type:"heartbeat",beat:N.beat});e.onMessage?.(N)}},h=()=>{},g=b=>{if(n||!t.fromHost(b)||!Pr(b.data)||b.data.protocol!==1)return;let N=b.ports[0];if(N){n=N,r=b.data.nonce,n.onmessage=m,n.start?.(),h();for(let k of l.splice(0))u(k)}};h=t.listen(g),t.ready({graview:"guest-ready",protocol:1});let y,O={get props(){return o},subscribe(b){return i.add(b),()=>i.delete(b)},act(b,N={}){let k=s+=1;return new Promise(L=>{a.set(k,L),u({type:"act",id:k,name:b,args:N})})},navigate(b){let N=rn(b);N&&u(N)},size(b){u({type:"size",height:b})},autoSize(b){let N=b??globalThis.document?.documentElement,k=globalThis.ResizeObserver;if(!N||!k||typeof N.getBoundingClientRect!="function")return()=>{};y?.disconnect();let L=new k(()=>O.size(Math.ceil(N.getBoundingClientRect().height)));return L.observe(N),y=L,()=>L.disconnect()},close(){y?.disconnect(),h(),n?.close(),i.clear()}};return{guest:O,send:u}}var Mr=["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"],Dr=["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"],Lr=["self","postMessage","setTimeout","clearTimeout","setInterval","clearInterval","queueMicrotask","structuredClone","crypto","console","DOMException"],Gr=["TEMPORARY","PERSISTENT"],ul=Object.freeze([...Mr,...Dr,...Lr,...Gr]),dl=Object.freeze(["constructor","__defineGetter__","__defineSetter__","hasOwnProperty","__lookupGetter__","__lookupSetter__","isPrototypeOf","propertyIsEnumerable","toString","valueOf","__proto__","toLocaleString"]),Ir=t=>typeof t=="symbol"?`[${t.description??"symbol"}]`:t;function Hr(t=globalThis,e=[],n={}){let r=[],o=[],s=new Set([...Mr,...Dr,...Lr,...e,"constructor",Symbol.toStringTag]),i=(x,P)=>{let F=Reflect.getOwnPropertyDescriptor(x,P);return F===void 0||!("value"in F)||F.writable||F.configurable?!1:n.primitivesStay&&typeof P=="symbol"&&(typeof F.value!="object"||F.value===null)&&typeof F.value!="function"?!0:Gr.includes(P)&&typeof F.value=="number"},a=t,l=a.setTimeout,u=a.setInterval,m=a.crypto,h=(x,P)=>function(F,Ye,...dt){if(typeof F!="function")throw new TypeError(`${P} takes a function: a guest view cannot run code from text`);return x.call(t,F,Ye,...dt)},g=m?Object.freeze({getRandomValues:x=>m.getRandomValues(x)}):void 0,y=a.document?.defaultView;if(y&&y!==a)for(let x of Reflect.ownKeys(y))typeof x=="symbol"||s.has(x)||Reflect.deleteProperty(y,x)||o.push(`window.${x}`);let O=[];for(let x=t;x&&x!==Object.prototype;x=Object.getPrototypeOf(x))O.push(x);for(let x of O)for(let P of Reflect.ownKeys(x))s.has(P)||(Reflect.deleteProperty(x,P)?r.push(Ir(P)):i(x,P)||o.push(Ir(P)));let b=()=>function(){throw new EvalError("A guest view cannot make code from text.")},N=[Function.prototype,Object.getPrototypeOf(async function(){}),Object.getPrototypeOf(function*(){}),Object.getPrototypeOf(async function*(){})];for(let x of N){let P=b();Object.defineProperty(P,"prototype",{value:x,writable:!1,enumerable:!1,configurable:!1}),Reflect.defineProperty(x,"constructor",{value:P,writable:!1,enumerable:!1,configurable:!1})||o.push("Function.prototype.constructor"),x===Function.prototype&&Reflect.defineProperty(t,"Function",{value:P,writable:!0,enumerable:!1,configurable:!0})}let k=(x,P)=>{Reflect.defineProperty(t,x,{value:P,writable:!0,enumerable:!0,configurable:!0})||o.push(x)};k("setTimeout",h(l,"setTimeout")),k("setInterval",h(u,"setInterval")),g&&k("crypto",g);for(let x of O.slice(1))Object.freeze(x);for(let x of Reflect.ownKeys(t)){let P=Reflect.getOwnPropertyDescriptor(t,x);Reflect.defineProperty(t,x,"value"in P?{...P,writable:!1,configurable:!1}:{...P,configurable:!1})}let L;try{L=Reflect.preventExtensions(t)}catch{L=!1}return{removed:r,stuck:o,sealed:L}}var ut=class extends HTMLElement{constructor(){super(),tn(this,In)}connect(e){if(Be(this)===e||(ze(this,e),this.childNodes.length===0))return;let n=[];for(let r=0;r<this.childNodes.length;r++){let o=this.childNodes[r];n.push([0,In,je(o),r])}e.mutate(n)}updateRemoteProperty(e,n){Hn(this,e,n)}callRemoteMethod(e,...n){return Un(this,e,...n)}};var d={},on={empty:!0},Io={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"},Vn={div:d,section:d,article:d,aside:d,header:d,footer:d,nav:d,hgroup:d,search:d,address:d,figure:d,figcaption:d,blockquote:d,p:d,pre:d,hr:on,br:on,wbr:on,h1:d,h2:d,h3:d,h4:d,h5:d,h6:d,span:d,strong:d,em:d,b:d,i:d,u:d,s:d,small:d,mark:d,abbr:d,cite:d,q:d,code:d,kbd:d,samp:d,var:d,sub:d,sup:d,dfn:d,bdi:d,bdo:d,ruby:d,rt:d,rp:d,time:{attributes:{datetime:"text"}},data:{attributes:{value:"text"}},del:{attributes:{datetime:"text"}},ins:{attributes:{datetime:"text"}},a:{attributes:{href:"link"}},ul:d,menu:d,dl:d,dt:d,dd:d,ol:{attributes:{start:"number",reversed:"boolean",type:{oneOf:["1","a","A","i","I"]}}},li:{attributes:{value:"number"}},table:d,caption:d,thead:d,tbody:d,tfoot:d,tr:d,colgroup:{attributes:{span:"number"}},col:{attributes:{span:"number"},empty:!0},th:{attributes:{colspan:"number",rowspan:"number",headers:"text",scope:{oneOf:["row","col","rowgroup","colgroup"]},abbr:"text"}},td:{attributes:{colspan:"number",rowspan:"number",headers:"text"}},details:{attributes:{open:"boolean",name:"text"}},summary:d,button:{attributes:{type:{oneOf:["button"]},disabled:"boolean",name:"text",value:"text"}},input:{empty:!0,attributes:{type:{oneOf:["text","search","number","range","checkbox","radio","date","time","datetime-local","month","week","color","email","tel","url"]},name:"text",value:"text",placeholder:"text",min:"text",max:"text",step:"text",checked:"boolean",disabled:"boolean",readonly:"boolean",required:"boolean",maxlength:"number",minlength:"number",size:"number",pattern:"text",multiple:"boolean",inputmode:"text",enterkeyhint:"text"}},select:{attributes:{name:"text",disabled:"boolean",multiple:"boolean",required:"boolean",size:"number"}},option:{attributes:{value:"text",selected:"boolean",disabled:"boolean",label:"text"}},optgroup:{attributes:{label:"text",disabled:"boolean"}},textarea:{attributes:{name:"text",placeholder:"text",rows:"number",cols:"number",disabled:"boolean",readonly:"boolean",required:"boolean",maxlength:"number",minlength:"number",wrap:{oneOf:["soft","hard","off"]}}},label:{attributes:{for:"text"}},fieldset:{attributes:{disabled:"boolean",name:"text"}},legend:d,output:d,meter:{attributes:{value:"number",min:"number",max:"number",low:"number",high:"number",optimum:"number"}},progress:{attributes:{value:"number",max:"number"}},img:{empty:!0,attributes:{src:"image",alt:"text",width:"number",height:"number",decoding:{oneOf:["async","sync","auto"]}}},"graview-video":on},Mo=["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"],Do={id:"text",class:"text",style:"style",lang:"text",role:"text",tabindex:{oneOf:["-1","0"]},transform:"geometry",...Object.fromEntries(Mo.map(t=>[t,"css"]))},qe={x:"geometry",y:"geometry",width:"geometry",height:"geometry"},sn={viewBox:"geometry",preserveAspectRatio:"geometry"},Ur={gradientUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]},gradientTransform:"geometry",spreadMethod:{oneOf:["pad","reflect","repeat"]},href:"fragment"},Vr={svg:{attributes:{...qe,...sn}},g:d,defs:d,symbol:{attributes:{...qe,...sn,refX:"geometry",refY:"geometry"}},use:{attributes:{...qe,href:"fragment"}},title:d,desc:d,path:{attributes:{d:"geometry",pathLength:"number"}},rect:{attributes:{...qe,rx:"geometry",ry:"geometry",pathLength:"number"}},circle:{attributes:{cx:"geometry",cy:"geometry",r:"geometry",pathLength:"number"}},ellipse:{attributes:{cx:"geometry",cy:"geometry",rx:"geometry",ry:"geometry",pathLength:"number"}},line:{attributes:{x1:"geometry",y1:"geometry",x2:"geometry",y2:"geometry",pathLength:"number"}},polyline:{attributes:{points:"geometry",pathLength:"number"}},polygon:{attributes:{points:"geometry",pathLength:"number"}},text:{attributes:{x:"geometry",y:"geometry",dx:"geometry",dy:"geometry",rotate:"geometry",textLength:"geometry",lengthAdjust:{oneOf:["spacing","spacingAndGlyphs"]}}},tspan:{attributes:{x:"geometry",y:"geometry",dx:"geometry",dy:"geometry",rotate:"geometry",textLength:"geometry"}},textPath:{attributes:{href:"fragment",startOffset:"geometry",method:{oneOf:["align","stretch"]},spacing:{oneOf:["auto","exact"]},side:{oneOf:["left","right"]}}},linearGradient:{attributes:{x1:"geometry",y1:"geometry",x2:"geometry",y2:"geometry",...Ur}},radialGradient:{attributes:{cx:"geometry",cy:"geometry",r:"geometry",fx:"geometry",fy:"geometry",fr:"geometry",...Ur}},stop:{attributes:{offset:"geometry"}},clipPath:{attributes:{clipPathUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]}}},mask:{attributes:{...qe,maskUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]},maskContentUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]}}},pattern:{attributes:{...qe,...sn,patternUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]},patternContentUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]},patternTransform:"geometry",href:"fragment"}},marker:{attributes:{...sn,markerWidth:"geometry",markerHeight:"geometry",refX:"geometry",refY:"geometry",orient:"geometry",markerUnits:{oneOf:["strokeWidth","userSpaceOnUse"]}}}};var Br={section:["aria-label","aria-labelledby","title"]};function Lo(t){return/^aria-[a-z]+$/.test(t)}function Go(t){return/^data-[a-z0-9][a-z0-9_.-]*$/.test(t)}var Ho=new Map(Object.keys(Vr).map(t=>[t.toLowerCase(),t]));function zr(t){return Ho.get(t.toLowerCase())}function jr(t,e,n){let r=n.toLowerCase(),o=t==="html"?[Vn[e]?.attributes,Io]:[Vr[e]?.attributes,Do],s=t==="svg"&&r==="xlink:href"?"href":r;for(let i of o)if(i){for(let[a,l]of Object.entries(i))if(a.toLowerCase()===s)return{name:a,kind:l}}if(Lo(r)||Go(r))return{name:r,kind:"text"}}var Fr="~",an=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),oe=(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=>oe(n,e+1)):Object.fromEntries(Object.entries(t).map(([n,r])=>[n,oe(r,e+1)]))};function qr(){let t=new Map,e=new Map,n=new Map([[Fr,{children:[],listeners:new Map}]]),r=0,o=u=>{let m=e.get(u);return m===void 0&&(m=r+=1,e.set(u,m),t.set(m,{listener:u,count:0})),t.get(m).count+=1,m},s=u=>{let m=t.get(u);m&&(m.count-=1,!(m.count>0)&&(t.delete(u),e.delete(m.listener)))},i=u=>{let m=n.get(u);if(m){n.delete(u);for(let h of m.listeners.values())s(h);for(let h of m.children)i(h)}},a=(u,m,h=0)=>{if(!an(u)||h>64)return oe(u);let g=typeof u.id=="string"?u.id:void 0,y=m&&g!==void 0&&g!==Fr;y&&i(g);let O={children:[],listeners:new Map};y&&n.set(g,O);let b={};for(let[N,k]of Object.entries(u))N==="children"&&Array.isArray(k)?b[N]=k.map(L=>{let x=a(L,y,h+1);return y&&an(L)&&typeof L.id=="string"&&O.children.push(L.id),x}):N==="eventListeners"&&an(k)?b[N]=Object.fromEntries(Object.entries(k).map(([L,x])=>{if(typeof x!="function"||!y)return[L,void 0];let P=o(x);return O.listeners.set(L,P),[L,{listener:P}]})):b[N]=oe(k,h+1);return b},l=u=>{if(!Array.isArray(u))return oe(u);let[m,h]=u,g=typeof h=="string"?n.get(h):void 0;if(m===0){let y=a(u[2],g!==void 0),O=an(u[2])?u[2].id:void 0;if(g&&typeof O=="string"&&n.has(O)){let b=Number(u[3]);g.children.splice(Number.isInteger(b)&&b>=0&&b<=g.children.length?b:g.children.length,0,O)}return[m,oe(h),y,oe(u[3])]}if(m===1){let y=Number(u[2]);return g&&Number.isInteger(y)&&y>=0&&y<g.children.length&&i(g.children.splice(y,1)[0]),oe(u)}if(m===3&&u[4]===3){let y=String(u[2]),O=u[3],b=g&&typeof O=="function"?o(O):void 0,N=g?.listeners.get(y);return N!==void 0&&s(N),b===void 0?g?.listeners.delete(y):g.listeners.set(y,b),[m,oe(h),y,b===void 0?void 0:{listener:b},3]}return oe(u)};return{encode:u=>u.map(l),listener:u=>t.get(u)?.listener,get listening(){return t.size},get nodes(){return n.size-1}}}var ln="graview-view-root",Uo=["value","checked","key","pressed","files","refused","x","y","width","height","deltaX","deltaY","deltaMode","ctrlKey","metaKey","phase","pointerId","button","pressure","dx","dy","scale","rotation"],Vo=t=>t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/\'/g,"'"),Bo=t=>Object.freeze({html:t,toString:()=>t}),Yr=t=>typeof t=="object"&&t!==null&&typeof t.html=="string"&&Object.isFrozen(t),Wr=t=>t==null||t===!1?"":Array.isArray(t)?t.map(Wr).join(""):Yr(t)?t.html:Vo(String(t));function Xr(t){customElements.get(ln)||customElements.define(ln,ut);let e=Event,n=qr(),r=new Set,o=new Set,s,i=[],a=new Set;for(let c of["closest","matches","dataset"]){let p=()=>{throw new TypeError(`A view\'s element has no ${c}: graview.on hands event.element, the element its selector matched; read event.element.getAttribute("data-\\u2026").`)};c in Element.prototype||Object.defineProperty(Element.prototype,c,c==="dataset"?{get:p}:{value:p})}let l=document.createElement(ln),u=c=>{let p=E=>{for(let w of Array.from(E.childNodes)){if(w.nodeType!==1)continue;if($(w)===c)return w;let T=p(w);if(T)return T}};return p(l)},m=c=>{let p=u(c.target);if(!p)return;let E=new e(c.event,{bubbles:!0}),w={};for(let T of Uo)c[T]!==void 0&&(w[T]=c[T]);for(let T of Object.keys(w))Object.defineProperty(E,T,{value:w[T],enumerable:!0});p.dispatchEvent(E);for(let T of o){if(T.type!==c.event)continue;let _;try{_=new Set(Array.from(l.querySelectorAll(T.selector)))}catch{continue}for(let z=p;z&&z!==l;z=z.parentNode)if(_.has(z)){T.listener(Object.freeze({type:c.event,target:p,element:z,...w}));break}}},h=c=>{if(c.type==="dom-event"&&typeof c.target=="string")return m(c);if(c.type==="notice")return t.warn(c.text);if(c.type!=="props")return;s=c.props;let p=t.now();for(let T of r)try{T(c.props)}catch(_){t.threw(_)}let E=t.now()-p,w=c.push;typeof w=="number"&&t.microtask(()=>t.microtask(()=>t.send({type:"pushed",push:w,ms:E})))},g;l.connect({mutate(c){g||(g=[],t.microtask(()=>{let p=g??[];g=void 0,t.send({type:"render",records:n.encode(p)})})),g.push(...c)},call:()=>{}});let y=c=>c.nodeType===1?c.getAttribute("data-key")??c.getAttribute("id"):null,O=(c,p)=>c.nodeType===p.nodeType&&(c.nodeType!==1||c.localName===p.localName&&c.namespaceURI===p.namespaceURI&&y(c)===y(p));function b(c,p){let E=Array.from(p.childNodes),w=0;for(let T of E){let _=c.childNodes[w]??null;if(_&&O(_,T)){N(_,T),w+=1;continue}if(y(T)!==null){let ce=Array.from(c.childNodes).slice(w+1).find(We=>O(We,T));if(ce){c.insertBefore(ce,_),N(ce,T),w+=1;continue}}c.insertBefore(T,_),w+=1}for(;c.childNodes.length>w;)c.removeChild(c.lastChild)}function N(c,p){if(c.nodeType!==1){c.data!==p.data&&(c.data=p.data);return}let E=c,w=p,T=k(E);for(let _ of E.getAttributeNames())w.hasAttribute(_)||(E.removeAttribute(_),T&&be(E,_,void 0));for(let _ of w.getAttributeNames()){let z=w.getAttribute(_);E.getAttribute(_)!==z&&E.setAttribute(_,z),T&&be(E,_,z)}b(E,w)}let k=c=>c.localName.includes("-");function L(c){for(let p of Array.from(c.childNodes)){if(p.nodeType!==1)continue;let E=p;if(k(E))for(let w of E.getAttributeNames())be(E,w,E.getAttribute(w)??void 0);L(E)}}function x(c,p,E){for(let w of Array.from(c.childNodes)){if(w.nodeType!==1)continue;let T=w,_=T.localName,z=p||_.toLowerCase()==="svg",ce=z?zr(_):Object.prototype.hasOwnProperty.call(Vn,_.toLowerCase())?_.toLowerCase():void 0;if(!ce){E.add(`<${_}>`);continue}for(let We of T.getAttributeNames())(!jr(z?"svg":"html",ce,We)||!z&&Br[ce]?.includes(We.toLowerCase()))&&E.add(`${ce} ${We}`);x(T,z,E)}}function P(c){let p=document.createElement("div"),E=Array.isArray(c)?c:[c];for(let T of E)if(T!=null)if(typeof T=="string"||Yr(T)){let _=document.createElement("div");_.innerHTML=typeof T=="string"?T:T.html,p.append(...Array.from(_.childNodes))}else p.append(T);let w=new Set;x(p,!1,w),i=[...w],i.length>0&&t.warn(`The host will not draw: ${i.join(", ")}`),L(p),b(l,p)}let F=[],Ye=new Set(_r),dt="[]",cn=!1,Fn=()=>{cn||(cn=!0,t.microtask(()=>{cn=!1;let c=[...new Map([...o].filter(E=>Ye.has(E.type)).map(E=>[`${E.type} ${E.selector}`,{event:E.type,selector:E.selector}])).entries()].sort(([E],[w])=>E<w?-1:E>w?1:0).map(([,E])=>E),p=JSON.stringify(c);p!==dt&&(dt=p,t.send({type:"gestures",bound:c}))}))};return{view:Object.freeze({get props(){return s},onProps(c){return r.add(c),s&&c(s),()=>void r.delete(c)},render:P,style(c){typeof c!="string"||F.includes(c)||(F.push(c),t.send({type:"style",sheets:[...F]}))},on(c,p,E){let w={type:c,selector:p,listener:E};return o.add(w),typeof c=="string"&&!a.has(c)&&(a.add(c),t.send({type:"hears",events:[c]})),Ye.has(c)&&Fn(),()=>{o.delete(w),Ye.has(c)&&Fn()}},act:(c,p={})=>t.act(c,p),navigate(c){if(typeof c=="string")return t.navigate(c);let p=rn(c);p&&t.send(p)},html(c,...p){return Bo(c.reduce((E,w,T)=>E+w+(T<p.length?Wr(p[T]):""),""))},get refused(){return i},get hardening(){return t.hardening()}}),hear:h,find:c=>{try{let p=l.querySelectorAll(c)[0];return p?$(p):void 0}catch{return}},listened:c=>{let p=new Set;for(let E of o)if(E.type===c)try{for(let w of Array.from(l.querySelectorAll(E.selector))){let T=$(w);T&&p.add(T)}}catch{}return[...p]}}}var jn={removed:[],stuck:[],sealed:!1,worker:!1},Bn=kr({listen(t){return Re.listen(t),()=>Re.unlisten(t)},fromHost:()=>!0,ready:t=>Re.post(t)},{onMessage:t=>$r.hear(t)}),$r=Xr({send:t=>Bn.send(t),act:(t,e)=>Bn.guest.act(t,e),navigate:t=>Bn.guest.navigate(t),microtask:Re.microtask,now:Re.now,threw:t=>console.error(t),warn:t=>console.warn(t),hardening:()=>jn}),zo=$r.view;Object.defineProperty(globalThis,"graview",{value:zo,enumerable:!0,configurable:!0,writable:!1});var zn="WorkerGlobalScope"in globalThis?Hr(globalThis,["graview"]):jn;jn=zn;if(zn.stuck.length>0)throw new Error(`The view\'s worker could not be hardened: ${zn.stuck.join(", ")} would not go.`);})();\n';export{e as VIEW_RUNTIME};
|
|
1
|
+
import"./chunk.AJZBJBMO.js";var e='"use strict";\n/*! @remote-dom/core and @remote-dom/polyfill \u2014 Copyright 2020-present, Shopify Inc. \u2014 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 \u2014 Elastic License 2.0. */\n"use strict";(()=>{var Oe=globalThis,Jr=Oe.addEventListener,eo=Oe.removeEventListener,to=Oe.postMessage,no=globalThis.queueMicrotask,dn=globalThis.performance,ro=dn?dn.now.bind(dn):Date.now,Re={listen:t=>Jr.call(Oe,"message",t),unlisten:t=>eo.call(Oe,"message",t),post:t=>to.call(Oe,t),microtask:t=>no.call(globalThis,t),now:()=>ro()};var v=Symbol("name"),ue=Symbol("prefix"),de=Symbol("value"),S=Symbol("ns"),q=Symbol("owner"),I=Symbol("owner_document"),ne=Symbol("attributes"),M=Symbol("prev"),p=Symbol("next"),R=Symbol("child"),Y=Symbol("parent"),me=Symbol("host"),K=Symbol("data"),Ee=Symbol("listeners"),mn=Symbol("isTrusted"),Ae=Symbol("path"),_e=Symbol("stop_immediate_propagation"),Pe=Symbol("dispatching"),se=Symbol("content"),D=Symbol("hooks"),mt=Symbol("extensions"),Ne=Symbol("hooks_dispatch"),U=Symbol("is_connected"),ke=Symbol("create_element"),Xn=0,X=1,Ce=2,Ie=3,Me=8,Te=9,$n=10,fe=11,A="http://www.w3.org/1999/xhtml",Z="http://www.w3.org/2000/svg",Kn="http://www.w3.org/XML/1998/namespace",Xe="http://www.w3.org/2000/xmlns/";function ft(t){return t.split(/[\\t\\n\\f\\r ]+/).filter(Boolean)}function G(t){return t.replace(/[A-Z]/g,e=>String.fromCharCode(e.charCodeAt(0)+32))}function Zn(t){return t.replace(/[a-z]/g,e=>String.fromCharCode(e.charCodeAt(0)-32))}function k(t,e){let n=globalThis.DOMException;if(typeof n=="function")return new n(t,e);let r=new Error(t);return r.name=e,r}var Qn=/^(?:[A-Za-z][^\\0\\t\\n\\f\\r\\u0020/>]*|[:_\\u0080-\\u{10FFFF}][A-Za-z0-9-.:_\\u0080-\\u{10FFFF}]*)$/u,Jn=/[\\0\\t\\n\\f\\r />=]/u,oo=/[\\0\\t\\n\\f\\r />]/u;function ie(t){if(t==null)return null;let e=String(t);return e===""?null:e}function er(t){Qn.test(t)||pn(t)}function fn(t){(t===""||Jn.test(t))&&pn(t)}function pt(t,e,n){let r=ie(t),o=String(e),s=o.indexOf(":"),i=s<0?null:o.slice(0,s),a=s<0?o:o.slice(s+1);if((i!=null&&(i===""||oo.test(i))||(n==="element"?!Qn.test(a):a===""||Jn.test(a)))&&pn(o),i!=null&&r==null)throw k(`A namespace is required for the prefix in "${o}"`,"NamespaceError");if(i==="xml"&&r!==Kn)throw k("The xml prefix requires the XML namespace","NamespaceError");if((o==="xmlns"||i==="xmlns")&&r!==Xe)throw k("The xmlns name requires the XMLNS namespace","NamespaceError");if(r===Xe&&o!=="xmlns"&&i!=="xmlns")throw k("The XMLNS namespace requires the xmlns name or prefix","NamespaceError");return{namespace:r,qualifiedName:o,prefix:i,localName:a}}function pn(t){throw k(`Invalid name: "${t}"`,"InvalidCharacterError")}var ht=0,gt=1,tr=2,hn=3,so=typeof performance>"u"?Date.now:performance.now.bind(performance),V=class{static NONE=ht;static CAPTURING_PHASE=gt;static AT_TARGET=tr;static BUBBLING_PHASE=hn;timeStamp=so();target=null;currentTarget=null;srcElement=null;bubbles=!1;cancelable=!1;composed=!1;defaultPrevented=!1;cancelBubble=!1;eventPhase=ht;[Ae]=[];[_e]=!1;[Pe]=!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[Ae]]}stopPropagation(){this.cancelBubble=!0}stopImmediatePropagation(){this[_e]=!0,this.cancelBubble=!0}preventDefault(){this.cancelable&&(this.defaultPrevented=!0)}set returnValue(e){e||this.preventDefault()}get returnValue(){return!this.defaultPrevented}initEvent(e,n,r){this.type=e,this.bubbles=!!n,this.cancelable=!!r}};function gn(t,e,n){if(t.cancelBubble)return;let o=e[Ee]?.get(t.type)?.[n===gt?"capture":"bubble"];if(o)for(let s of[...o]){if(!o.has(s)||s.signal?.aborted)continue;t.eventPhase=t.target===e?tr:n,t.currentTarget=e;let i=s.normalizedListener;try{typeof i=="object"?i.handleEvent(t):i.call(e,t)}catch(a){setTimeout(io,0,a)}if(t[_e])break}}function io(t){throw t}var $e=[],yt=new WeakMap;function bt(t,e){let n=yt.get(t);n?n.push(e):yt.set(t,[e]),$e[$e.length-1].push(t)}function B(t){let e=[];$e.push(e);let n;try{n=t()}catch(r){$e.pop();try{nr(e)}catch{}throw r}return $e.pop(),nr(e),n}function nr(t){let e,n=!1;for(let r of t){let o=yt.get(r);if(o){for(;o.length>0;){let s=o.shift();try{s()}catch(i){n||(e=i,n=!0)}}yt.delete(r)}}if(n)throw e}var Et=[],Ke=[],yn=!1;function we(t){for(let e of t)Et.push(e),e[1]&&Ke.push(e[1]);if(!yn){yn=!0;try{let e,n=!1;for(let r=0;r<Et.length;r++){let[o,s]=Et[r];s&&Ke.splice(Ke.indexOf(s),1);try{o()}catch(i){n||(e=i,n=!0)}}if(n)throw e}finally{Et.length=0,Ke.length=0,yn=!1}}}function Ze(t){let e=t;for(;e;){if(Ke.includes(e))return!0;e=e[Y]??e[me]}return!1}var Qe=Symbol("listenerRegistrations"),pe=class{[Ee]=void 0;[Qe]=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 a=bn(o),c=this[Qe];c||(c=new Map,this[Qe]=c);let u=c.get(e);u||(u={},c.set(e,u));let m=u[a];if(m||(m=new Map,u[a]=m),m.has(n))return;let h=this,g={type:e,listener:n,capture:o,once:s,normalizedListener:n,signal:i};(s||i)&&(g.normalizedListener=function(...C){if(g.signal?.aborted){Nt(h,g);return}return g.once&&Nt(h,g),typeof g.listener=="object"?g.listener.handleEvent(...C):g.listener.call(this,...C)});let y=this[Ee];y||(y=new Map,this[Ee]=y);let O=y.get(e);O||(O={},y.set(e,O));let E=O[a];if(E||(E=new Set,O[a]=E),m.set(n,g),E.add(g),i){let N=()=>{Nt(h,g)};g.abortListener=N,i.addEventListener("abort",N,{once:!0})}this[I]?.defaultView[Ne].addEventListener?.(this,e,n,r)}removeEventListener(e,n,r){return ao.call(this,e,n,r)}dispatchEvent(e){if(e[Pe])throw k("Failed to execute \'dispatchEvent\' on \'EventTarget\': The event is already being dispatched.","InvalidStateError");e[Pe]=!0;try{let n=[],r=this;for(;r!=null;)n.push(r),r=r.parentNode;e.target=this,e.srcElement=this,e[Ae]=n;for(let s=n.length;s--;)if(gn(e,n[s],gt),e.cancelBubble)return!e.defaultPrevented;let o=e.bubbles?n:n.slice(0,1);for(let s=0;s<o.length;s++)if(gn(e,o[s],hn),e.cancelBubble)return!e.defaultPrevented;return!e.defaultPrevented}finally{e[Pe]=!1,e.cancelBubble=!1,e[_e]=!1,e.eventPhase=ht,e.currentTarget=null,e[Ae]=[]}}};function ao(t,e,n){if(e==null)return;let r=n===!0||n&&n.capture===!0,o=bn(!!r),s=this[Qe]?.get(t)?.[o]?.get(e);s&&Nt(this,s)}function bn(t){return t?"capture":"bubble"}function Nt(t,e){let n=bn(e.capture),r=t[Qe],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[Ee],a=i?.get(e.type);if(!a)return;let c=a[n];c?.delete(e)&&(c.size===0&&delete a[n],!a.bubble&&!a.capture&&i?.delete(e.type),t[I]?.defaultView[Ne].removeEventListener?.(t,e.type,e.listener,e.capture))}var Q=class extends Array{item(e){return this[e]??null}};var et=0,rr=1,Tn=2,wn=3,tt=4,or=0,sr=1,xt=2,vt=3,ir=4,Nn=5,ar=6,lr=7,Tt=/^(?:--|-?[A-Za-z_\\u0080-\\u{10FFFF}])[A-Za-z0-9_\\u0080-\\u{10FFFF}-]*$/u;function lo(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 k(`Invalid or unsupported selector: "${t}"`,"SyntaxError")}function St(t,e){let n=typeof e=="string"?nt(e):[{combinator:tt,matchers:e}],r=null,o=t[R];return o&&n[0].matchers.length&&xn(o,n,s=>(r=s,!1)),r}function Ot(t,e){let n=typeof e=="string"?nt(e):[{combinator:tt,matchers:e}],r=new Q,o=t[R];return o&&n[0].matchers.length&&xn(o,n,s=>{r.push(s)}),r}function nt(t,e=!1,n=!1){let r={combinator:tt,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 a=0,c;for(;c=s.exec(i);){c.index!==a&&W(t),c[1]&&(r.matchers.length===0&&!(n&&o.length===1)&&W(t),c[1]===">"?r.combinator=rr:c[1]==="+"?r.combinator=wn:c[1]==="~"?r.combinator=Tn:r.combinator=et,r={combinator:tt,matchers:[]},o.push(r));let u=c[8]?G(c[8]):c[2]||c[7];c[7]!=null&&!c[6]&&r.matchers.length>0&&W(t);let h,g=c[4]??c[5]??c[7];if(c[2]){Tt.test(u)||W(t);let y=c[5],O=y?.[0];if(c[3]==null&&(O===\'"\'||O==="\'")){let E=c[0].lastIndexOf(y);g=i.slice(c.index+E+1),s.lastIndex=i.length}else y!=null&&!Tt.test(y)&&W(t);h=ir}else c[6]?(Tt.test(u)||W(t),h=c[6]==="#"?xt:vt):c[8]?h=c[9]==null?Nn:ar:c[7]==="*"?h=or:c[7]&&Tt.test(c[7])?h=sr:W(t);c[9]?([g,s.lastIndex]=lo(i,s.lastIndex),u!=="has"&&u!=="not"&&W(t),u==="has"&&e&&W(t),nt(g,e||u==="has",u==="has")):h===Nn&&W(t),r.matchers.push({type:h,name:u,value:g}),a=s.lastIndex}return(a!==i.length||r.matchers.length===0)&&W(t),o}function co(t,e){let n=nt(e);return n[0]?.matchers.length?Je(t,n):!1}function uo(t,e){let n=nt(e,!0,!0),r=n[0];if(n.length===1&&r.matchers.length===0)return!1;let o=et,s={type:lr,name:":scope"};if(r.matchers.length===0?(o=r.combinator,r.matchers.push(s)):n.unshift({combinator:et,matchers:[s]}),n.some(({matchers:c})=>c.length===0))return!1;let i=o===wn||o===Tn?t[p]:t[R];if(!i)return!1;let a=!1;return xn(i,n,()=>(a=!0,!1),t),a}function xn(t,e,n,r){let o=[],s=t;for(;s;){if(j(s)){if(Je(s,e,r)&&n(s)===!1)return!1;let i=s[R];if(i){let a=s[p];a&&o.push(a),s=i;continue}}s=s[p]??o.pop()??null}return!0}function Je(t,e,n){let{combinator:r,matchers:o}=e[e.length-1];if(r===tt){if(!wt(t,o,n))return!1;let a=e.slice(0,-1);return a.length===0||Je(t,a,n)}let s=r===rr||r===et?Y:M,i=t[s];if(!i)return!1;if(r===et||r===Tn){for(;i;){if(j(i)&&wt(i,o,n)){let a=e.slice(0,-1);if(a.length===0||Je(i,a,n))return!0}i=i[s]}return!1}else{if(r===wn&&!j(i)){for(;i&&!j(i);)i=i[s];if(!i)return!1}if(!j(i)||!wt(i,o,n))return!1;let a=e.slice(0,-1);return a.length===0||Je(i,a,n)}}function En(t,e){return t.getAttributeNS(null,t.namespaceURI===A?G(e):e)}function wt(t,e,n){if(!t)return!1;if(Array.isArray(e)){for(let i of e)if(wt(t,i,n)===!1)return!1;return!0}let{type:r,name:o,value:s}=e;switch(r){case or:return o==="*";case sr:return t.namespaceURI===A?t.localName===G(o):t.localName===o;case xt:return En(t,"id")===o;case vt:let i=En(t,"class");return i?ft(i).includes(o):!1;case ir:let a=En(t,o);return s==null?a!=null:a===s;case lr:return t===n;case Nn:W(`:${o}`);case ar:switch(o){case"has":return uo(t,s||"");case"not":return!co(t,s||"");default:W(`:${o}(${s})`)}}return!1}function mo(t){return t.nodeType===Ce}function rt(t){return K in t}function Sn(t){return t.nodeType===Ie}function fo(t){return t.nodeType===Me}function j(t){return t.nodeType===X}function vn(t){return t.nodeType===fe}function mr(t){return"appendChild"in t}function Rt(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 a=[];for(let c of st(i)){if(o.has(c)||(o.add(c),e.push(c),a.push(c),!j(c)))continue;let u=c[ne];if(u)for(let h of u)o.has(h)||(o.add(h),e.push(h));let m=c[se];m&&!o.has(m)&&!r.has(m)&&(r.add(m),n.push(m))}s??=a}return{nodes:e,treeNodes:s}}function ot(t,e){for(let n of t)n[I]=e}function cr(t,e){let n=t.constructor,r=new n(t.name,t.value,t.namespaceURI);return r[I]=e,r}function ur(t,e){if(Sn(t))return e.createTextNode(t.data);if(fo(t))return e.createComment(t.data);if(mo(t))return cr(t,e);if(j(t)){let n=e[ke](t[v],t.namespaceURI,t[ue],t.localName);if(t[ne])for(let r=0;r<t[ne].length;r++){let o=t[ne].item(r);n.attributes.setNamedItem(cr(o,e))}return n}else{if(vn(t))return e.createDocumentFragment();{let n=new t.constructor;return n[I]=e,n}}}function At(t,e,n=t.ownerDocument){if(t.nodeType===Te)throw k("Cannot clone a document node","NotSupportedError");let r=ur(t,n);if(!e||!j(t)&&!vn(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],a,c;if(i.cloningContent)if(i.contentSource&&i.contentDestination)a=i.contentSource.childNodes[i.childIndex++],c=i.contentDestination;else{s.pop(),i.appendTo&&i.appendTo.appendChild(i.destination);continue}else if(a=i.source.childNodes[i.childIndex++],c=i.destination,!a){if(i.cloningContent=!0,i.childIndex=0,j(i.source)&&i.source.namespaceURI===A&&i.source.localName==="template"){let m=i.source[se];m&&(o.has(m)&&dr(),o.add(m),i.contentSource=m,i.contentDestination=i.destination.content)}continue}if(!a){s.pop(),i.appendTo&&i.appendTo.appendChild(i.destination);continue}o.has(a)&&dr(),o.add(a);let u=ur(a,n);j(a)||vn(a)?s.push({source:a,destination:u,appendTo:c,childIndex:0,cloningContent:!1}):c.appendChild(u)}return r}function dr(){throw new Error("Cannot clone a cyclic or repeated node graph")}function _t(t,e){let n=String(e);return n===""?null:St(t,[{type:xt,name:n}])}function Pt(t,e){let n=[...new Set(ft(String(e)))];return Ot(t,n.map(r=>({type:vt,name:r})))}function kt(t,e){let n=String(e),r=G(n),o=[];for(let s of Ct(t))j(s)&&(n==="*"||(s.namespaceURI===A?s[v]===r:s[v]===n))&&o.push(s);return o}function Ct(t){let e=[],n=[],r=t[R];for(;r;){e.push(r);let o=r[R],s=r[p];o?(s&&n.push(s),r=o):r=s??n.pop()??null}return e}function st(t){let e=Ct(t);return e.unshift(t),e}var J=class extends pe{nodeType=Xn;[v]="";[Y]=null;[me]=null;[R]=null;[M]=null;[p]=null;[U]=!1;get[D](){return this[I].defaultView[Ne]}get localName(){return this[v]}get nodeName(){return this[v]}get ownerDocument(){return this[I]}get isConnected(){return this[U]}isDefaultNamespace(e){let n=ie(e);return po(this)===n}get parentNode(){return this[Y]}set parentNode(e){}get parentElement(){let e=this[Y];return!e||e.nodeType!==1?null:e}set parentElement(e){}get previousSibling(){return this[M]}set previousSibling(e){}get nextSibling(){return this[p]}set nextSibling(e){}get previousElementSibling(){let e=this[M];for(;e&&e.nodeType!==1;)e=e[M];return e}set previousElementSibling(e){}get nextElementSibling(){let e=this[p];for(;e&&e.nodeType!==1;)e=e[p];return e}set nextElementSibling(e){}get firstChild(){return this[R]}set firstChild(e){}get lastChild(){let e=this[R];for(;e;){let n=e[p];if(n==null)break;e=n}return e}set lastChild(e){}get nodeValue(){return rt(this)?this.data:null}set nodeValue(e){rt(this)&&(this.data=e)}get textContent(){if(rt(this))return this.data;let e="";for(let n of Ct(this))Sn(n)&&(e+=n.data);return e}set textContent(e){if(rt(this))this.data=e;else if(mr(this)){let n=e==null?"":String(e);n===""?this.replaceChildren():this.replaceChildren(n)}}cloneNode(e){return At(this,e)}contains(e){let n=e;for(;n!=null;){if(n===this)return!0;n=n.parentNode}return!1}};function po(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(Xe,"xmlns");if(r!=null&&r.prefix==null)return ie(r.value);e=n.parentElement;break}case Te:e=e.documentElement;break;case $n:case fe:return null;case Ce:e=e.ownerElement;break;default:e=e.parentElement}return null}var ee=Symbol("insertNode"),An=Symbol("preflightInsertions"),It=Symbol("replaceNode"),he=class extends J{remove(){let e=this.parentNode;e&&e.removeChild(this)}replaceWith(...e){let n=xe(e),r=this.parentNode;if(r)return On(o=>{ae(r,n);let s=this[p];for(;s&&n.includes(s);)s=s[p];let i=Rn(r,n,o);this.parentNode===r?r[It](i,this,o):r[ee](i,s,o)})}before(...e){let n=xe(e),r=this.parentNode;if(r)return On(o=>{ae(r,n);let s=this[M];for(;s&&n.includes(s);)s=s[M];let i=Rn(r,n,o);r[ee](i,s?s[p]:r.firstChild,o)})}after(...e){let n=xe(e),r=this.parentNode;if(r)return On(o=>{ae(r,n);let s=this[p];for(;s&&n.includes(s);)s=s[p];let i=Rn(r,n,o);r[ee](i,s,o)})}};function On(t){return B(()=>{let e=[];try{t(e)}catch(n){try{we(e)}catch{}throw n}we(e)})}function xe(t){return t.map(e=>e instanceof J?e:String(e))}function it(t,e){return e instanceof J?e:t.ownerDocument.createTextNode(String(e))}function ae(t,e){for(let n of e){if(!(n instanceof J))continue;let r=t;for(;r;){if(r===n)throw k("Cannot insert a node into itself or one of its descendants","HierarchyRequestError");r=r[Y]??r[me]}}}function Rn(t,e,n){let r=[];for(let s of e)r.push(it(t,s));if(r.length===1)return r[0];let o=t.ownerDocument.createDocumentFragment();o[An](r);for(let s of r)o[ee](s,null,n);return o}var Mt,_n=0,fr=0,pr=0,hr=0,De=!1,kn=!1,at=!1,Dt=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=ho(n),o=Mt??=new WeakMap,s=o.get(e);s==null&&(s=new Map,o.set(e,s));let i=s.get(this);i==null?_n++:Pn(i,-1),s.set(this,r),Pn(r,1),this.#e.add(e)}disconnect(){let e=Mt;if(e!=null){for(let n of this.#e){let r=e.get(n),o=r?.get(this);o!=null&&(r.delete(this),_n--,Pn(o,-1)),r?.size===0&&e.delete(n)}this.#e.clear(),this.#n.length=0,_n===0&&(Mt=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 te(t){let e=Mt;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 a=!1;if(t.type==="attributes"){if(!i.attributes||i.attributeFilter&&!i.attributeFilter.has(t.attributeName??""))continue;a=i.attributeOldValue}else if(t.type==="characterData"){if(!i.characterData)continue;a=i.characterDataOldValue}else if(!i.childList)continue;n.set(s,n.get(s)===!0||a)}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 Lt(...t){let e=new Q;return e.push(...t),e}function ho(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 Pn(t,e){t.attributes&&(fr+=e),t.characterData&&(pr+=e),t.childList&&(hr+=e),De=fr>0,kn=pr>0,at=hr>0}var re=class extends he{childNodes=new Q;children=new Q;appendChild(e){return B(()=>this[ee](e,null))}insertBefore(e,n){return B(()=>this[ee](e,n||null))}append(...e){return B(()=>{let n=xe(e.filter(r=>r!=null));n.length>1&&ae(this,n);for(let r of n)this[ee](it(this,r),null)})}prepend(...e){return B(()=>{let n=xe(e.filter(o=>o!=null));n.length>1&&ae(this,n);let r=this.firstChild;for(let o of n)this[ee](it(this,o),r)})}replaceChildren(...e){return B(()=>{let n=xe(e.filter(o=>o!=null));ae(this,n);let r;for(;r=this.firstChild;)this.removeChildImmediately(r);for(let o of n)this[ee](it(this,o),null)})}removeChild(e){return B(()=>(this.removeChildImmediately(e),e))}removeChildImmediately(e){if(e.parentNode!==this)throw k("The node is not a child of this node","NotFoundError");let n=this[U]?st(e):void 0,r=e[M],o=e[p],s=Gt(this,e);if(n)for(let i of n)i[U]=!1;this.queueRemovalMutationRecord(this,e,r,o),n&&this.enqueueTreeReactions(n,"disconnectedCallback"),we(this.collectRemovalHookEffects(e,s))}replaceChild(e,n){return B(()=>this[It](e,n))}[It](e,n,r){if(ae(this,[e]),n.parentNode!==this)throw k("The reference node is not a child of this parent","NotFoundError");let o=n[M],s=n[p],i=this.prepareInsertion(e),a=this[U]?st(n):void 0,c=new Set(i.map(({node:g})=>g)),u=s;for(;u&&c.has(u);)u=u[p];let m=Gt(this,n);if(a){for(let y of a)y[U]=!1;let g=new Set(a);for(let y of i)g.has(y.node)&&(y.shouldDisconnect=!1)}this.commitInsertion(i,u);let h=this[U];return this.queueRemovalMutationRecord(this,n,o,s),this.queueInsertionMutationRecords(i),a&&this.enqueueTreeReactions(a,"disconnectedCallback"),this.enqueueInsertionReactions(i,h),this.performOrCollectHookEffects([...this.collectRemovalHookEffects(n,m),...this.collectInsertionHookEffects(i)],r),n}querySelectorAll(e){return Ot(this,e)}querySelector(e){return St(this,e)}[ee](e,n,r){return this.validateInsertion(e,n),this.insertIntoValidated(e,n,r),e}[An](e){for(let n of e)this.validateInsertion(n,null),this.prepareInsertion(n)}validateInsertion(e,n){if(ae(this,[e]),n&&n.parentNode!==this)throw k("The reference node is not a child of this parent","NotFoundError")}insertIntoValidated(e,n,r){e===n&&(n=e[p]);let o=this.prepareInsertion(e);this.commitInsertion(o,n);let s=this[U];this.queueInsertionMutationRecords(o),this.enqueueInsertionReactions(o,s),this.performOrCollectHookEffects(this.collectInsertionHookEffects(o),r)}performOrCollectHookEffects(e,n){n?n.push(...e):we(e)}prepareInsertion(e){let n=[];if(e.nodeType===fe){let i=e[R];for(;i;)n.push(i),i=i[p]}else n.push(e);let r=this[U],o=this[I],s=[];for(let i of n){let a=i[U],c=a||r,u,m;if(i[I]===o)c&&(u=st(i));else{let h=Rt(i);m=h.nodes,c&&(u=h.treeNodes)}s.push({node:i,nodes:u,adoption:m,shouldDisconnect:a})}return s}commitInsertion(e,n){for(let s of e){let i=s.node[Y];if(i){let a=s.node[M],c=s.node[p];s.source={parent:i,index:Gt(i,s.node),previousSibling:a,nextSibling:c}}}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&&ot(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[M];e[p]=n,e[M]=s,s?s[p]=e:this[R]=e,n[M]=e}else{e[p]=null;let s=this[R];if(s){let i;for(;i=s[p];)s=i;s[p]=e,e[M]=s}else this[R]=e,e[M]=null}let r=j(e);e[Y]=this;let o;if(n){if(o=this.childNodes.indexOf(n),this.childNodes.splice(o,0,e),r){let s=n;for(;s&&!j(s);)s=s[p];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[M],nextSibling:e[p]}}queueRemovalMutationRecord(e,n,r,o){at&&te({type:"childList",target:e,removedNodes:Lt(n),previousSibling:r,nextSibling:o})}queueInsertionMutationRecords(e){if(at)for(let n of e){let{node:r,source:o}=n;o&&this.queueRemovalMutationRecord(o.parent,r,o.previousSibling,o.nextSibling),te({type:"childList",target:this,addedNodes:Lt(r),previousSibling:n.previousSibling,nextSibling:n.nextSibling})}}collectRemovalHookEffects(e,n){return this.nodeType!==X||Ze(this)?[]:[[()=>this[D].removeChild?.(this,e,n)]]}collectInsertionHookEffects(e){let n=[];for(let r of e){let{node:o,source:s}=r;s?.parent.nodeType===X&&!Ze(s.parent)&&n.push([()=>s.parent[D].removeChild?.(s.parent,o,s.index)]),this.nodeType===X&&!Ze(this)&&n.push([()=>this[D].insertChild?.(this,o,r.insertIndex),o])}return n}enqueueInsertionReactions(e,n){for(let r of e){let{nodes:o}=r;o&&(r.shouldDisconnect&&this.enqueueTreeReactions(o,"disconnectedCallback"),n&&this.enqueueTreeReactions(o,"connectedCallback"))}}enqueueTreeReactions(e,n){yr(e,n)}};function gr(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[M],i=e[p],a=Gt(t,e);if(o)for(let u of o)u[U]=!1;ot(n.nodes,r),at&&te({type:"childList",target:t,removedNodes:Lt(e),previousSibling:s,nextSibling:i}),o&&yr(o,"disconnectedCallback");let c=[];t.nodeType===X&&!Ze(t)&&c.push([()=>t[D].removeChild?.(t,e,a)]),we(c)}function Gt(t,e){let n=e[M],r=e[p];n?n[p]=r:t[R]=r,r&&(r[M]=n);let o=t.childNodes.indexOf(e);return t.childNodes.splice(o,1),j(e)&&t.children.splice(t.children.indexOf(e),1),e[Y]=null,e[p]=null,e[M]=null,o}function yr(t,e){for(let n of t){let r=n[e];typeof r=="function"&&bt(n,()=>r.call(n))}}function lt(t,e,n,r,o){let{observedAttributes:s}=t.constructor,{attributeChangedCallback:i}=t;i==null||s==null||!s.includes(e)||bt(t,()=>i.call(t,e,n,r,o))}var Ht=class{[R]=null;constructor(e){this[q]=e}getNamedItem(e){let n=String(e),r=this[q][S]===A?G(n):n,o=this[R];for(;o;){if(o.name===r)return o;o=o[p]}return null}getNamedItemNS(e,n){let r=ie(e),o=String(n),s=this[R];for(;s;){if(s.localName===o&&s[S]===r)return s;s=s[p]}return null}item(e){let n=this[R],r=0;for(;n;){if(r++===e)return n;n=n[p]}return null}get length(){let e=0,n=this[R];for(;n;)e++,n=n[p];return e}removeNamedItem(e){let n=String(e),r=this[q][S]===A?G(n):n;return B(()=>this.removeNamedItemImmediately(o=>o.name===r))}removeNamedItemNS(e,n){let r=ie(e),o=String(n);return B(()=>this.removeNamedItemImmediately(s=>s.localName===o&&s[S]===r))}removeNamedItemImmediately(e){let n=this[q],r=this[R],o=null;for(;r!=null;){if(e(r)){o&&(o[p]=r[p]),this[R]===r&&(this[R]=r[p]);let s=r.value;return r[p]=null,r[q]=null,De&&te({type:"attributes",target:n,attributeName:r.name,attributeNamespace:r[S],oldValue:s}),n[D].removeAttribute?.(n,r.name,r[S]),lt(n,r.localName,s,null,r[S]),r}o=r,r=r[p]}return null}setNamedItem(e){return B(()=>this.setNamedItemImmediately(e))}setNamedItemImmediately(e){let n=this[q],r=e[q];if(r!=null&&r!==n)throw k("The attribute is already in use by another element.","InUseAttributeError");let o=null,s=this[R],i=null;for(;s;){if(s.localName===e.localName&&s[S]===e[S]){if(s===e)return s;i?i[p]=e:this[R]=e,e[p]=s[p],s[p]=null,o=s;break}i=s,s=s[p]}o==null&&(i?i[p]=e:this[R]=e),e[q]=n,e[I]=n[I],o&&(o[q]=null);let a=o==null||o.value!==e.value,c=o!=null&&o.name!==e.name;return a&&De&&te({type:"attributes",target:n,attributeName:e.name,attributeNamespace:e[S],oldValue:o?.value??null}),c&&n[D].removeAttribute?.(n,o.name,o[S]),(a||c)&&n[D].setAttribute?.(n,e.name,e.value,e[S]),a&<(n,e.localName,o?.value??null,e.value,e[S]),o}setNamedItemNS(e){return this.setNamedItem(e)}*[Symbol.iterator](){let e=this[R];for(;e;)yield e,e=e[p]}};var ve=class extends J{nodeType=Ce;[S]=null;[p]=null;[q]=null;constructor(e,n,r){super(),this[v]=e,this[de]=n,r&&(this[S]=r)}get nodeName(){return this[v]}set nodeName(e){}get name(){return this[v]}set name(e){}get localName(){if(this[S]==null)return this[v];let e=this[v].indexOf(":");return e<0?this[v]:this[v].slice(e+1)}get prefix(){if(this[S]==null)return null;let e=this[v].indexOf(":");return e<0?null:this[v].slice(0,e)}get value(){return this[de]}set value(e){let n=String(e),r=this[q];if(!r){this[de]=n;return}B(()=>{let o=this[de];this[de]=n,De&&o!==n&&te({type:"attributes",target:r,attributeName:this[v],attributeNamespace:this[S],oldValue:o}),this[D].setAttribute?.(r,this[v],n,this[S]),lt(r,this.localName,o,n,this[S])})}get nodeValue(){return this.value}set nodeValue(e){this.value=e}get ownerElement(){return this[q]}get namespaceURI(){return this[S]}get specified(){return!0}};var go={amp:"&",AMP:"&",apos:"\'",gt:">",GT:">",lt:"<",LT:"<",quot:\'"\',QUOT:\'"\'},yo=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),bo=/(?:<([a-z][a-z0-9-:]*)((?:[\\s]+[^<>\'"=/\\s]+(?:=([\'"])[^]*?\\3|=[^>\'"\\s]*|))*)[\\s]*(\\/?)\\s*>|<\\/([a-z][a-z0-9-:]*)>|<!--(.*?)-->|([^<>]+))/gi,Nr=/\\s([^<>\'"=/\\n\\s]+)(?:=(["\'])([\\s\\S]*?)\\2|=([^>\'"\\n\\s]*)|)/g,Eo="|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|",No=/^(?:color|face|size)$/i;function br(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 go[n];let s=Number.parseInt(r??o,r?10:16);try{return String.fromCodePoint(s)}catch{return e}})}function Tr(t){return t.namespaceURI===A&&yo.has(t.localName)}function Er(t){let e=t.localName;return t[S]===Z&&(e==="foreignObject"||e==="desc"||e==="title")}function To(t,e){if(Eo.includes(`|${t}|`))return!0;if(t!=="font")return!1;for(let n of e.matchAll(Nr))if(No.test(n[1]))return!0;return!1}function Ut(t,e){let n=e.ownerDocument,r=n.createDocumentFragment(),o=[],s=r;for(let i of t.matchAll(bo)){let a=i[1];if(a){let c=i[2],u=G(a),m=o[o.length-1]?.element??e,h=m[S]===Z?Z:A;if(u==="svg")h=Z;else if(h===Z){if(Er(m))h=A;else if(To(u,c)){for(;o.length>0;){let O=o[o.length-1];if(O.element[S]!==Z||Er(O.element))break;o.pop(),s=O.target}h=A}}let g=h===A?u:a,y=n[ke](g,h,null,g);for(let O of c.matchAll(Nr))y.setAttribute(O[1],br(O[3]||O[4]||""));if(s.append(y),Tr(y)||h!==A&&i[4])continue;o.push({element:y,target:s}),s=h===A&&u==="template"?y.content:y}else if(i[5]){let c=G(i[5]);for(let u=o.length-1;u>=0;u--){let m=o[u],h=G(m.element[v]);if(h===c){s=m.target,o.length=u;break}if(m.element[S]===A&&h==="template")break}}else i[6]?s.append(n.createComment(i[6])):s.append(br(i[7]))}return r}function Vt(t){return xr([{type:"content",child:t[R]}])}function wr(t){return xr([{type:"opening",node:t}])}function xr(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[v]}`);let s=o[ne]?.[R];for(;s;){e.push(` ${s[v]}`);let a=s[de];a!==""&&(a=String(a).replace(/&/g,"&").replace(/"/g,"""),e.push(`="${a}"`)),s=s[p]}if(e.push(">"),Tr(o))break;let i=o.namespaceURI===A&&o.localName==="template"?o[se]:o;t.push({type:"closing",name:o[v]}),t.push({type:"content",child:i?.[R]??null});break}case Ie:{let o=r;e.push(o[K].replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">"));break}case Me:{let o=r;e.push(`<!--${o[K]}-->`);break}}break}case"content":{let r=n.child;r&&(t.push({type:"content",child:r[p]}),t.push({type:"opening",node:r}));break}case"closing":e.push(`</${n.name}>`);break}return e.join("")}var H=class extends re{nodeType=X;[S]=A;[ue]=null;get namespaceURI(){return this[S]}get prefix(){return this[ue]}get localName(){let e=this[ue];return e==null?this[v]:this[v].slice(e.length+1)}get nodeName(){return this[S]===A?Zn(this[v]):this[v]}get tagName(){return this.nodeName}get id(){return this.getAttributeNS(null,"id")??""}set id(e){this.setAttribute("id",String(e))}get slot(){return this.getAttributeNS(null,"slot")??""}set slot(e){let n=String(e);this.getAttributeNS(null,"slot")!==n&&this.attributes.setNamedItem(new ve("slot",n))}get attributes(){let e=this[ne];return e||(e=new Ht(this),this[ne]=e),e}getAttributeNames(){return[...this.attributes].map(e=>e.name)}getElementsByTagName(e){return kt(this,e)}get firstElementChild(){return this.children[0]??null}getElementsByClassName(e){return Pt(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);fn(r);let s=this[S]===A?G(r):r,i=this.attributes.getNamedItemNS(null,s);i?i.value=o:this.attributes.setNamedItem(new ve(s,o))}setAttributeNS(e,n,r){let o=ie(e),s=String(n),i=String(r),a=pt(o,s,"attribute"),c=this.attributes.getNamedItemNS(a.namespace,a.localName);c?c.value=i:this.attributes.setNamedItemNS(new ve(a.qualifiedName,i,a.namespace))}toggleAttribute(e,n){let r=String(e);fn(r);let o=this[S]===A?G(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 ve(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[S]===A?G(n):n;this.attributes.removeNamedItemNS(null,r)}removeAttributeNS(e,n){this.attributes.removeNamedItemNS(e,n)}get outerHTML(){return wr(this)}get innerHTML(){return Vt(this)}set innerHTML(e){if(e==null||e==="")this.replaceChildren();else{let n=Ut(String(e),this);this.replaceChildren(n)}}};var Le=class t extends H{[S]=Z;get ownerSVGElement(){let e=null,n=this.parentNode;for(;n instanceof t;)e=n,n=n.parentNode;return e}};var ge=class extends he{[K]="";constructor(e){super(),this[K]=e==null?"":String(e)}setData(e){let n=kn,r=n?this[K]:null,o="";e!=null&&(o=typeof e=="string"?e:String(e)),this[K]=o,n&&r!==o&&te({type:"characterData",target:this,oldValue:r}),this[D].setText?.(this,o)}get data(){return this[K]}set data(e){this.setData(e)}};var Ge=class extends ge{nodeType=Ie;[v]="#text"};var He=class extends ge{nodeType=Me;[v]="#comment"};var Ue=class extends re{nodeType=fe;[v]="#document-fragment";[I]=typeof window<"u"?window.document:null;getElementById(e){return _t(this,e)}};var Ve=class extends H{get content(){let e=this[se];return e||(e=this.ownerDocument.createDocumentFragment(),e[me]=this,this[se]=e),e}set content(e){}set innerHTML(e){this.content.replaceChildren(Ut(String(e),this))}get innerHTML(){let e=this[se];return e?Vt(e):""}};var Bt=class extends H{};var zt=class extends H{};var jt=class extends H{};var ct=class extends re{nodeType=Te;[v]="#document";[U]=!0;constructor(e){super(),this.defaultView=e,this[I]=this,this.documentElement=qt(new jt,this,"html"),this.body=qt(new Bt,this,"body"),this.head=qt(new zt,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 Pt(this,e)}createElement(e){let n=String(e);return er(n),Cn(this,G(n))}createElementNS(e,n){let r=pt(e,n,"element");return Cn(this,r.qualifiedName,r.namespace,r.prefix,r.localName)}[ke](e,n,r,o){return Cn(this,e,n,r,o)}createTextNode(e){let n=Ft(new Ge(e),this);return this[D].createText?.(n,n.data),n}createComment(e){return Ft(new He(e),this)}createDocumentFragment(){return Ft(new Ue,this)}createEvent(){return new V("")}getElementById(e){return _t(this,e)}getElementsByTagName(e){return kt(this,e)}importNode(e,n){if(e.nodeType===Te)throw k("Cannot import a document node","NotSupportedError");return At(e,n,this)}adoptNode(e){if(e[I]===this)return e;let n=Rt(e);return B(()=>{let r=e.parentNode;return r?gr(r,e,n,this):ot(n.nodes,this),e})}};function Ft(t,e){return Object.defineProperty(t,I,{value:e,writable:!0,enumerable:!1}),t}function Cn(t,e,n=A,r=null,o=e){let s;if(n===Z)s=new Le;else if(n===A&&o==="template")s=new Ve;else if(n===A){let i=t.defaultView.customElements.get(o);s=i?new i:new H}else s=new H;return qt(s,t,e,n,r)}function qt(t,e,n,r=A,o=null){return Ft(t,e),Object.defineProperties(t,{[v]:{value:n},[S]:{value:r},[ue]:{value:o}}),e[D].createElement?.(t,r),t}var Yt=class extends V{constructor(e,n){super(e,n),this.detail=n?.detail??null}initCustomEvent(e,n,r,o){super.initEvent(e,n,r),this.detail=o??null}};var Wt=class extends V{constructor(e,n){super(e,n),this.message=n.message,this.filename=n.filename,this.lineno=n.lineno,this.colno=n.colno,this.error=n.error}};var Xt=class extends V{constructor(e,n){super(e,n),this.promise=n.promise,this.reason=n.reason}};var $t=class extends V{constructor(e,n){super(e,n),this.oldState=n.oldState,this.newState=n.newState}};var Kt=class extends V{constructor(e,n={}){super(e,n),this.relatedTarget=n.relatedTarget??null}};var Zt=class extends V{constructor(e,n={}){super(e,n),this.clipboardData=n.clipboardData??null}};var Qt=class extends H{};var wo=/^[a-z][^A-Z\\u0000\\t\\n\\f\\r />]*-[^A-Z\\u0000\\t\\n\\f\\r />]*$/u,xo=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);function vr(t){return wo.test(t)&&!xo.has(t)}function Sr(t){return k(`Invalid custom element name: "${t}"`,"SyntaxError")}var Jt=class{registry=new Map;listenersByName=new Map;define(e,n,r){if(!vr(e))throw Sr(e);if(this.registry.has(e))throw k(`A custom element named "${e}" has already been defined`,"NotSupportedError");if(this.getName(n)!=null)throw k("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(!vr(e))return Promise.reject(Sr(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 vo=["onerror","onunhandledrejection"],Rr=Symbol.for("@remote-dom/polyfill/global-property");function Ar(t){return Object.getOwnPropertyDescriptors(t)}function _r(t){let e={};for(let[n,r]of Object.entries(Object.getOwnPropertyDescriptors(pe.prototype)))n!=="constructor"&&typeof r.value=="function"&&(r.value=In(r.value.bind(t)),e[n]=r);return e}function Pr(t){let e={};for(let n of vo)e[n]={configurable:!0,enumerable:!0,get:In(()=>t[n]),set:In(r=>{t[n]=r})};return e}function So(t){return Object.assign(Ar(t),_r(t),Pr(t))}function In(t){return Object.defineProperty(t,Rr,{value:!0}),t}function Or(t,e){for(let n of Reflect.ownKeys(e)){let r=Oo(t,n);(r==null||Ro(r))&&Object.defineProperty(t,n,e[n])}}function Oo(t,e){let n=t;for(;n;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function Ro(t){return[t.value,t.get,t.set].some(e=>typeof e=="function"&&e[Rr]===!0)}var Se=class extends pe{[D]={};[mt]=[];[Ne]=_o(this);name="";window=this;parent=this;self=this;top=this;document=new ct(this);customElements=new Jt;location=globalThis.location;navigator=globalThis.navigator;Event=V;ErrorEvent=Wt;PromiseRejectionEvent=Xt;ToggleEvent=$t;FocusEvent=Kt;ClipboardEvent=Zt;EventTarget=pe;CustomEvent=Yt;Node=J;ParentNode=re;ChildNode=he;DocumentFragment=Ue;Document=ct;CharacterData=ge;Comment=He;Text=Ge;Element=H;HTMLElement=Qt;SVGElement=Le;HTMLTemplateElement=Ve;MutationObserver=Dt;#t=null;#n=null;#e=null;static with(...e){let n=this;return class extends n{constructor(){super();for(let o of e)Ao(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=Ar(e),s=Object.assign(_r(e),Pr(e));delete o.self,Object.defineProperties(globalThis,o),Or(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),Or(n,s))}static setGlobalThis(e){for(let n in e)e[n]===e&&(e[n]=globalThis);Object.defineProperties(globalThis,So(e))}};function Ao(t,e){t[mt].push(e(t)??{})}function _o(t){return{createElement:le.bind(null,t,"createElement"),setAttribute:le.bind(null,t,"setAttribute"),removeAttribute:le.bind(null,t,"removeAttribute"),createText:le.bind(null,t,"createText"),setText:le.bind(null,t,"setText"),insertChild:le.bind(null,t,"insertChild"),removeChild:le.bind(null,t,"removeChild"),addEventListener:le.bind(null,t,"addEventListener"),removeEventListener:le.bind(null,t,"removeEventListener")}}function le(t,e,...n){for(let s of t[mt])s[e]?.apply(s,n);let r=t[D];r[e]?.apply(r,n)}var en=new Se;var Mn="~";var ye=new WeakMap;function Be(t){return ye.get(t)}var Hn=new WeakMap,ko=0;function $(t){let e=Hn.get(t);return e==null&&(e=String(ko++),tn(t,e)),e}function tn(t,e){Hn.set(t,e)}var Ln=new WeakMap;function Co(t){return Ln.get(t)}var Gn=new WeakMap;function Io(t){let e=Gn.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 Mo=new WeakMap;function Do(t){return Mo.get(t)}function Un(t,e,n){let r=Ln.get(t);if(r==null&&(r={},Ln.set(t,r)),r[e]===n)return;r[e]=n;let o=ye.get(t);o?.mutate([[3,$(t),e,n,1]])}function be(t,e,n){let r=Gn.get(t);if(r==null&&(r={},Gn.set(t,r)),r[e]===n)return;n==null?delete r[e]:r[e]=String(n);let o=ye.get(t);o?.mutate([[3,$(t),e,n,2]])}function ze(t,e){if(ye.get(t)!==e&&(ye.set(t,e),t.childNodes))for(let r=0;r<t.childNodes.length;r++)ze(t.childNodes[r],e)}function nn(t){if(ye.get(t)!=null&&(ye.delete(t),t.childNodes))for(let n=0;n<t.childNodes.length;n++)nn(t.childNodes[n])}function je(t){let{nodeType:e}=t;switch(e){case 1:return{id:$(t),type:e,element:t.localName,properties:Dn(Co(t)),attributes:Dn(Io(t)),eventListeners:Dn(Do(t)),children:Array.from(t.childNodes).map(je)};case 3:case 8:return{id:$(t),type:e,data:t.data};default:throw new Error(`Cannot serialize node of type ${t.nodeType} (${typeof t.nodeType})`)}}function Dn(t){return t?{...t}:void 0}function Vn(t,e,...n){let r=Hn.get(t),o=ye.get(t);if(r==null||o==null)throw new Error(`Cannot call method ${e} on an unconnected node`);return o.call(r,e,...n)}var Fe=en[D];Fe.insertChild=(t,e,n)=>{let r=Be(t);r!=null&&(ze(e,r),r.mutate([[0,$(t),je(e),n]]))};Fe.removeChild=(t,e,n)=>{let r=Be(t);r!=null&&(nn(e),r.mutate([[1,$(t),n]]))};Fe.setText=(t,e)=>{let n=Be(t);n?.mutate([[2,$(t),e]])};Fe.setAttribute=(t,e,n)=>{t.tagName.includes("-")||be(t,e,n)};Fe.removeAttribute=(t,e)=>{t.tagName.includes("-")||be(t,e)};Se.setGlobal(en);function rn(t){if(typeof t=="string")return{type:"navigate",to:t};let{place:e,record:n,where:r,section:o}=t??{},s={...r===void 0?{}:{where:r},...o===void 0?{}:{section:String(o)}};return typeof e=="string"?{type:"navigate",place:e,...s}:typeof n=="string"?{type:"navigate",to:n,...s}:void 0}var Cr=["wheel","drag","pinch"];function Ir(t){let e=t;return typeof t=="object"&&t!==null&&e.graview==="host-hello"&&typeof e.nonce=="string"}function Dr(t,e={}){let n,r="",o,s=0,i=new Set,a=new Map,c=[],u=E=>{n?n.postMessage({...E,nonce:r}):c.push(E)},m=E=>{let N=E.data;if(!(!N||typeof N!="object")){if(N.type==="props"){o=N.props;for(let C of i)C(N.props)}else N.type==="answer"?(a.get(N.id)?.(N),a.delete(N.id)):N.type==="event"&&typeof N.listener=="number"?e.onEvent?.(N):N.type==="heartbeat"&&typeof N.beat=="number"&&u({type:"heartbeat",beat:N.beat});e.onMessage?.(N)}},h=()=>{},g=E=>{if(n||!t.fromHost(E)||!Ir(E.data)||E.data.protocol!==1)return;let N=E.ports[0];if(N){n=N,r=E.data.nonce,n.onmessage=m,n.start?.(),h();for(let C of c.splice(0))u(C)}};h=t.listen(g),t.ready({graview:"guest-ready",protocol:1});let y,O={get props(){return o},subscribe(E){return i.add(E),()=>i.delete(E)},act(E,N={}){let C=s+=1;return new Promise(L=>{a.set(C,L),u({type:"act",id:C,name:E,args:N})})},navigate(E){let N=rn(E);N&&u(N)},size(E){u({type:"size",height:E})},autoSize(E){let N=E??globalThis.document?.documentElement,C=globalThis.ResizeObserver;if(!N||!C||typeof N.getBoundingClientRect!="function")return()=>{};y?.disconnect();let L=new C(()=>O.size(Math.ceil(N.getBoundingClientRect().height)));return L.observe(N),y=L,()=>L.disconnect()},close(){y?.disconnect(),h(),n?.close(),i.clear()}};return{guest:O,send:u}}var Gr=["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"],Hr=["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"],Ur=["self","postMessage","setTimeout","clearTimeout","setInterval","clearInterval","queueMicrotask","structuredClone","crypto","console","DOMException"],Vr=["TEMPORARY","PERSISTENT"],fl=Object.freeze([...Gr,...Hr,...Ur,...Vr]),pl=Object.freeze(["constructor","__defineGetter__","__defineSetter__","hasOwnProperty","__lookupGetter__","__lookupSetter__","isPrototypeOf","propertyIsEnumerable","toString","valueOf","__proto__","toLocaleString"]),Lr=t=>typeof t=="symbol"?`[${t.description??"symbol"}]`:t;function Br(t=globalThis,e=[],n={}){let r=[],o=[],s=new Set([...Gr,...Hr,...Ur,...e,"constructor",Symbol.toStringTag]),i=(x,P)=>{let F=Reflect.getOwnPropertyDescriptor(x,P);return F===void 0||!("value"in F)||F.writable||F.configurable?!1:n.primitivesStay&&typeof P=="symbol"&&(typeof F.value!="object"||F.value===null)&&typeof F.value!="function"?!0:Vr.includes(P)&&typeof F.value=="number"},a=t,c=a.setTimeout,u=a.setInterval,m=a.crypto,h=(x,P)=>function(F,Ye,...dt){if(typeof F!="function")throw new TypeError(`${P} takes a function: a guest view cannot run code from text`);return x.call(t,F,Ye,...dt)},g=m?Object.freeze({getRandomValues:x=>m.getRandomValues(x)}):void 0,y=a.document?.defaultView;if(y&&y!==a)for(let x of Reflect.ownKeys(y))typeof x=="symbol"||s.has(x)||Reflect.deleteProperty(y,x)||o.push(`window.${x}`);let O=[];for(let x=t;x&&x!==Object.prototype;x=Object.getPrototypeOf(x))O.push(x);for(let x of O)for(let P of Reflect.ownKeys(x))s.has(P)||(Reflect.deleteProperty(x,P)?r.push(Lr(P)):i(x,P)||o.push(Lr(P)));let E=()=>function(){throw new EvalError("A guest view cannot make code from text.")},N=[Function.prototype,Object.getPrototypeOf(async function(){}),Object.getPrototypeOf(function*(){}),Object.getPrototypeOf(async function*(){})];for(let x of N){let P=E();Object.defineProperty(P,"prototype",{value:x,writable:!1,enumerable:!1,configurable:!1}),Reflect.defineProperty(x,"constructor",{value:P,writable:!1,enumerable:!1,configurable:!1})||o.push("Function.prototype.constructor"),x===Function.prototype&&Reflect.defineProperty(t,"Function",{value:P,writable:!0,enumerable:!1,configurable:!0})}let C=(x,P)=>{Reflect.defineProperty(t,x,{value:P,writable:!0,enumerable:!0,configurable:!0})||o.push(x)};C("setTimeout",h(c,"setTimeout")),C("setInterval",h(u,"setInterval")),g&&C("crypto",g);for(let x of O.slice(1))Object.freeze(x);for(let x of Reflect.ownKeys(t)){let P=Reflect.getOwnPropertyDescriptor(t,x);Reflect.defineProperty(t,x,"value"in P?{...P,writable:!1,configurable:!1}:{...P,configurable:!1})}let L;try{L=Reflect.preventExtensions(t)}catch{L=!1}return{removed:r,stuck:o,sealed:L}}var ut=class extends HTMLElement{constructor(){super(),tn(this,Mn)}connect(e){if(Be(this)===e||(ze(this,e),this.childNodes.length===0))return;let n=[];for(let r=0;r<this.childNodes.length;r++){let o=this.childNodes[r];n.push([0,Mn,je(o),r])}e.mutate(n)}updateRemoteProperty(e,n){Un(this,e,n)}callRemoteMethod(e,...n){return Vn(this,e,...n)}};var d={},on={empty:!0},Lo={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"},Bn={div:d,section:d,article:d,aside:d,header:d,footer:d,nav:d,hgroup:d,search:d,address:d,figure:d,figcaption:d,blockquote:d,p:d,pre:d,hr:on,br:on,wbr:on,h1:d,h2:d,h3:d,h4:d,h5:d,h6:d,span:d,strong:d,em:d,b:d,i:d,u:d,s:d,small:d,mark:d,abbr:d,cite:d,q:d,code:d,kbd:d,samp:d,var:d,sub:d,sup:d,dfn:d,bdi:d,bdo:d,ruby:d,rt:d,rp:d,time:{attributes:{datetime:"text"}},data:{attributes:{value:"text"}},del:{attributes:{datetime:"text"}},ins:{attributes:{datetime:"text"}},a:{attributes:{href:"link"}},ul:d,menu:d,dl:d,dt:d,dd:d,ol:{attributes:{start:"number",reversed:"boolean",type:{oneOf:["1","a","A","i","I"]}}},li:{attributes:{value:"number"}},table:d,caption:d,thead:d,tbody:d,tfoot:d,tr:d,colgroup:{attributes:{span:"number"}},col:{attributes:{span:"number"},empty:!0},th:{attributes:{colspan:"number",rowspan:"number",headers:"text",scope:{oneOf:["row","col","rowgroup","colgroup"]},abbr:"text"}},td:{attributes:{colspan:"number",rowspan:"number",headers:"text"}},details:{attributes:{open:"boolean",name:"text"}},summary:d,button:{attributes:{type:{oneOf:["button"]},disabled:"boolean",name:"text",value:"text"}},input:{empty:!0,attributes:{type:{oneOf:["text","search","number","range","checkbox","radio","date","time","datetime-local","month","week","color","email","tel","url"]},name:"text",value:"text",placeholder:"text",min:"text",max:"text",step:"text",checked:"boolean",disabled:"boolean",readonly:"boolean",required:"boolean",maxlength:"number",minlength:"number",size:"number",pattern:"text",multiple:"boolean",inputmode:"text",enterkeyhint:"text"}},select:{attributes:{name:"text",disabled:"boolean",multiple:"boolean",required:"boolean",size:"number"}},option:{attributes:{value:"text",selected:"boolean",disabled:"boolean",label:"text"}},optgroup:{attributes:{label:"text",disabled:"boolean"}},textarea:{attributes:{name:"text",placeholder:"text",rows:"number",cols:"number",disabled:"boolean",readonly:"boolean",required:"boolean",maxlength:"number",minlength:"number",wrap:{oneOf:["soft","hard","off"]}}},label:{attributes:{for:"text"}},fieldset:{attributes:{disabled:"boolean",name:"text"}},legend:d,output:d,meter:{attributes:{value:"number",min:"number",max:"number",low:"number",high:"number",optimum:"number"}},progress:{attributes:{value:"number",max:"number"}},img:{empty:!0,attributes:{src:"image",alt:"text",width:"number",height:"number",decoding:{oneOf:["async","sync","auto"]}}},"graview-video":on},Go=["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"],Ho={id:"text",class:"text",style:"style",lang:"text",role:"text",tabindex:{oneOf:["-1","0"]},transform:"geometry",...Object.fromEntries(Go.map(t=>[t,"css"]))},qe={x:"geometry",y:"geometry",width:"geometry",height:"geometry"},sn={viewBox:"geometry",preserveAspectRatio:"geometry"},zr={gradientUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]},gradientTransform:"geometry",spreadMethod:{oneOf:["pad","reflect","repeat"]},href:"fragment"},jr={svg:{attributes:{...qe,...sn}},g:d,defs:d,symbol:{attributes:{...qe,...sn,refX:"geometry",refY:"geometry"}},use:{attributes:{...qe,href:"fragment"}},title:d,desc:d,path:{attributes:{d:"geometry",pathLength:"number"}},rect:{attributes:{...qe,rx:"geometry",ry:"geometry",pathLength:"number"}},circle:{attributes:{cx:"geometry",cy:"geometry",r:"geometry",pathLength:"number"}},ellipse:{attributes:{cx:"geometry",cy:"geometry",rx:"geometry",ry:"geometry",pathLength:"number"}},line:{attributes:{x1:"geometry",y1:"geometry",x2:"geometry",y2:"geometry",pathLength:"number"}},polyline:{attributes:{points:"geometry",pathLength:"number"}},polygon:{attributes:{points:"geometry",pathLength:"number"}},text:{attributes:{x:"geometry",y:"geometry",dx:"geometry",dy:"geometry",rotate:"geometry",textLength:"geometry",lengthAdjust:{oneOf:["spacing","spacingAndGlyphs"]}}},tspan:{attributes:{x:"geometry",y:"geometry",dx:"geometry",dy:"geometry",rotate:"geometry",textLength:"geometry"}},textPath:{attributes:{href:"fragment",startOffset:"geometry",method:{oneOf:["align","stretch"]},spacing:{oneOf:["auto","exact"]},side:{oneOf:["left","right"]}}},linearGradient:{attributes:{x1:"geometry",y1:"geometry",x2:"geometry",y2:"geometry",...zr}},radialGradient:{attributes:{cx:"geometry",cy:"geometry",r:"geometry",fx:"geometry",fy:"geometry",fr:"geometry",...zr}},stop:{attributes:{offset:"geometry"}},clipPath:{attributes:{clipPathUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]}}},mask:{attributes:{...qe,maskUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]},maskContentUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]}}},pattern:{attributes:{...qe,...sn,patternUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]},patternContentUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]},patternTransform:"geometry",href:"fragment"}},marker:{attributes:{...sn,markerWidth:"geometry",markerHeight:"geometry",refX:"geometry",refY:"geometry",orient:"geometry",markerUnits:{oneOf:["strokeWidth","userSpaceOnUse"]}}}};var Fr={section:["aria-label","aria-labelledby","title"]};function Uo(t){return/^aria-[a-z]+$/.test(t)}function Vo(t){return/^data-[a-z0-9][a-z0-9_.-]*$/.test(t)}var Bo=new Map(Object.keys(jr).map(t=>[t.toLowerCase(),t]));function qr(t){return Bo.get(t.toLowerCase())}function Yr(t,e,n){let r=n.toLowerCase(),o=t==="html"?[Bn[e]?.attributes,Lo]:[jr[e]?.attributes,Ho],s=t==="svg"&&r==="xlink:href"?"href":r;for(let i of o)if(i){for(let[a,c]of Object.entries(i))if(a.toLowerCase()===s)return{name:a,kind:c}}if(Uo(r)||Vo(r))return{name:r,kind:"text"}}var Wr="~",an=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),oe=(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=>oe(n,e+1)):Object.fromEntries(Object.entries(t).map(([n,r])=>[n,oe(r,e+1)]))};function Xr(){let t=new Map,e=new Map,n=new Map([[Wr,{children:[],listeners:new Map}]]),r=0,o=u=>{let m=e.get(u);return m===void 0&&(m=r+=1,e.set(u,m),t.set(m,{listener:u,count:0})),t.get(m).count+=1,m},s=u=>{let m=t.get(u);m&&(m.count-=1,!(m.count>0)&&(t.delete(u),e.delete(m.listener)))},i=u=>{let m=n.get(u);if(m){n.delete(u);for(let h of m.listeners.values())s(h);for(let h of m.children)i(h)}},a=(u,m,h=0)=>{if(!an(u)||h>64)return oe(u);let g=typeof u.id=="string"?u.id:void 0,y=m&&g!==void 0&&g!==Wr;y&&i(g);let O={children:[],listeners:new Map};y&&n.set(g,O);let E={};for(let[N,C]of Object.entries(u))N==="children"&&Array.isArray(C)?E[N]=C.map(L=>{let x=a(L,y,h+1);return y&&an(L)&&typeof L.id=="string"&&O.children.push(L.id),x}):N==="eventListeners"&&an(C)?E[N]=Object.fromEntries(Object.entries(C).map(([L,x])=>{if(typeof x!="function"||!y)return[L,void 0];let P=o(x);return O.listeners.set(L,P),[L,{listener:P}]})):E[N]=oe(C,h+1);return E},c=u=>{if(!Array.isArray(u))return oe(u);let[m,h]=u,g=typeof h=="string"?n.get(h):void 0;if(m===0){let y=a(u[2],g!==void 0),O=an(u[2])?u[2].id:void 0;if(g&&typeof O=="string"&&n.has(O)){let E=Number(u[3]);g.children.splice(Number.isInteger(E)&&E>=0&&E<=g.children.length?E:g.children.length,0,O)}return[m,oe(h),y,oe(u[3])]}if(m===1){let y=Number(u[2]);return g&&Number.isInteger(y)&&y>=0&&y<g.children.length&&i(g.children.splice(y,1)[0]),oe(u)}if(m===3&&u[4]===3){let y=String(u[2]),O=u[3],E=g&&typeof O=="function"?o(O):void 0,N=g?.listeners.get(y);return N!==void 0&&s(N),E===void 0?g?.listeners.delete(y):g.listeners.set(y,E),[m,oe(h),y,E===void 0?void 0:{listener:E},3]}return oe(u)};return{encode:u=>u.map(c),listener:u=>t.get(u)?.listener,get listening(){return t.size},get nodes(){return n.size-1}}}var ln="graview-view-root",zo=["value","checked","key","pressed","files","refused","x","y","width","height","deltaX","deltaY","deltaMode","ctrlKey","metaKey","phase","pointerId","button","pressure","dx","dy","scale","rotation"],jo=t=>t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/\'/g,"'"),Fo=t=>Object.freeze({html:t,toString:()=>t}),$r=t=>typeof t=="object"&&t!==null&&typeof t.html=="string"&&Object.isFrozen(t),Kr=t=>t==null||t===!1?"":Array.isArray(t)?t.map(Kr).join(""):$r(t)?t.html:jo(String(t));function Zr(t){customElements.get(ln)||customElements.define(ln,ut);let e=Event,n=Xr(),r=new Set,o=new Set,s,i=[],a=new Set;for(let l of["closest","matches","dataset"]){let f=()=>{throw new TypeError(`A view\'s element has no ${l}: graview.on hands event.element, the element its selector matched; read event.element.getAttribute("data-\\u2026").`)};l in Element.prototype||Object.defineProperty(Element.prototype,l,l==="dataset"?{get:f}:{value:f})}let c=document.createElement(ln),u=l=>{let f=b=>{for(let w of Array.from(b.childNodes)){if(w.nodeType!==1)continue;if($(w)===l)return w;let T=f(w);if(T)return T}};return f(c)},m=l=>{let f=u(l.target);if(!f)return;let b=new e(l.event,{bubbles:!0}),w={};for(let T of zo)l[T]!==void 0&&(w[T]=l[T]);for(let T of Object.keys(w))Object.defineProperty(b,T,{value:w[T],enumerable:!0});f.dispatchEvent(b);for(let T of o){if(T.type!==l.event)continue;let _;try{_=new Set(Array.from(c.querySelectorAll(T.selector)))}catch{continue}for(let z=f;z&&z!==c;z=z.parentNode)if(_.has(z)){T.listener(Object.freeze({type:l.event,target:f,element:z,...w}));break}}},h=l=>{if(l.type==="dom-event"&&typeof l.target=="string")return m(l);if(l.type==="notice")return t.warn(l.text);if(l.type!=="props")return;s=l.props;let f=t.now();for(let T of r)try{T(l.props)}catch(_){t.threw(_)}let b=t.now()-f,w=l.push;typeof w=="number"&&t.microtask(()=>t.microtask(()=>t.send({type:"pushed",push:w,ms:b})))},g;c.connect({mutate(l){g||(g=[],t.microtask(()=>{let f=g??[];g=void 0,t.send({type:"render",records:n.encode(f)})})),g.push(...l)},call:()=>{}});let y=l=>l.nodeType===1?l.getAttribute("data-key")??l.getAttribute("id"):null,O=(l,f)=>l.nodeType===f.nodeType&&(l.nodeType!==1||l.localName===f.localName&&l.namespaceURI===f.namespaceURI&&y(l)===y(f));function E(l,f){let b=Array.from(f.childNodes),w=0;for(let T of b){let _=l.childNodes[w]??null;if(_&&O(_,T)){N(_,T),w+=1;continue}if(y(T)!==null){let ce=Array.from(l.childNodes).slice(w+1).find(We=>O(We,T));if(ce){l.insertBefore(ce,_),N(ce,T),w+=1;continue}}l.insertBefore(T,_),w+=1}for(;l.childNodes.length>w;)l.removeChild(l.lastChild)}function N(l,f){if(l.nodeType!==1){l.data!==f.data&&(l.data=f.data);return}let b=l,w=f,T=C(b);for(let _ of b.getAttributeNames())w.hasAttribute(_)||(b.removeAttribute(_),T&&be(b,_,void 0));for(let _ of w.getAttributeNames()){let z=w.getAttribute(_);b.getAttribute(_)!==z&&b.setAttribute(_,z),T&&be(b,_,z)}E(b,w)}let C=l=>l.localName.includes("-");function L(l){for(let f of Array.from(l.childNodes)){if(f.nodeType!==1)continue;let b=f;if(C(b))for(let w of b.getAttributeNames())be(b,w,b.getAttribute(w)??void 0);L(b)}}function x(l,f,b){for(let w of Array.from(l.childNodes)){if(w.nodeType!==1)continue;let T=w,_=T.localName,z=f||_.toLowerCase()==="svg",ce=z?qr(_):Object.prototype.hasOwnProperty.call(Bn,_.toLowerCase())?_.toLowerCase():void 0;if(!ce){b.add(`<${_}>`);continue}for(let We of T.getAttributeNames())(!Yr(z?"svg":"html",ce,We)||!z&&Fr[ce]?.includes(We.toLowerCase()))&&b.add(`${ce} ${We}`);x(T,z,b)}}function P(l){let f=document.createElement("div"),b=Array.isArray(l)?l:[l];for(let T of b)if(T!=null)if(typeof T=="string"||$r(T)){let _=document.createElement("div");_.innerHTML=typeof T=="string"?T:T.html,f.append(...Array.from(_.childNodes))}else f.append(T);let w=new Set;x(f,!1,w),i=[...w],i.length>0&&t.warn(`The host will not draw: ${i.join(", ")}`),L(f),E(c,f)}let F=[],Ye=new Set(Cr),dt="[]",cn=!1,qn=()=>{cn||(cn=!0,t.microtask(()=>{cn=!1;let l=[...new Map([...o].filter(b=>Ye.has(b.type)).map(b=>[`${b.type} ${b.selector}`,{event:b.type,selector:b.selector}])).entries()].sort(([b],[w])=>b<w?-1:b>w?1:0).map(([,b])=>b),f=JSON.stringify(l);f!==dt&&(dt=f,t.send({type:"gestures",bound:l}))}))},Yn="[]",un=!1,Wn=()=>{un||(un=!0,t.microtask(()=>{un=!1;let l=[...new Set([...o].filter(b=>b.type==="click"&&typeof b.selector=="string").map(b=>b.selector))].sort().slice(0,200),f=JSON.stringify(l);f!==Yn&&(Yn=f,t.send({type:"clicks",selectors:l}))}))};return{view:Object.freeze({get props(){return s},onProps(l){return r.add(l),s&&l(s),()=>void r.delete(l)},render:P,style(l){typeof l!="string"||F.includes(l)||(F.push(l),t.send({type:"style",sheets:[...F]}))},on(l,f,b){let w={type:l,selector:f,listener:b};return o.add(w),typeof l=="string"&&!a.has(l)&&(a.add(l),t.send({type:"hears",events:[l]})),Ye.has(l)&&qn(),l==="click"&&Wn(),()=>{o.delete(w),Ye.has(l)&&qn(),l==="click"&&Wn()}},act:(l,f={})=>t.act(l,f),navigate(l){if(typeof l=="string")return t.navigate(l);let f=rn(l);f&&t.send(f)},html(l,...f){return Fo(l.reduce((b,w,T)=>b+w+(T<f.length?Kr(f[T]):""),""))},get refused(){return i},get hardening(){return t.hardening()}}),hear:h,find:l=>{try{let f=c.querySelectorAll(l)[0];return f?$(f):void 0}catch{return}},listened:l=>{let f=new Set;for(let b of o)if(b.type===l)try{for(let w of Array.from(c.querySelectorAll(b.selector))){let T=$(w);T&&f.add(T)}}catch{}return[...f]}}}var Fn={removed:[],stuck:[],sealed:!1,worker:!1},zn=Dr({listen(t){return Re.listen(t),()=>Re.unlisten(t)},fromHost:()=>!0,ready:t=>Re.post(t)},{onMessage:t=>Qr.hear(t)}),Qr=Zr({send:t=>zn.send(t),act:(t,e)=>zn.guest.act(t,e),navigate:t=>zn.guest.navigate(t),microtask:Re.microtask,now:Re.now,threw:t=>console.error(t),warn:t=>console.warn(t),hardening:()=>Fn}),qo=Qr.view;Object.defineProperty(globalThis,"graview",{value:qo,enumerable:!0,configurable:!0,writable:!1});var jn="WorkerGlobalScope"in globalThis?Br(globalThis,["graview"]):Fn;Fn=jn;if(jn.stuck.length>0)throw new Error(`The view\'s worker could not be hardened: ${jn.stuck.join(", ")} would not go.`);})();\n';export{e as VIEW_RUNTIME};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};function s(e){let t=[];return typeof e!="string"?["A view's source is text."]:(/\bimport\b/.test(e)&&t.push("It says import: a view loads nothing, so the word may not appear in it at all, even in a string or a comment."),/\bimportScripts\b/.test(e)&&t.push("It names importScripts: a view loads nothing."),/^\s*export\b/m.test(e)&&t.push("It exports something: a view is a plain script that draws through the graview global, not a module."),/\brequire\s*\(/.test(e)&&t.push("It calls require(): a view has no modules to require."),t)}var i,n=()=>i??=(__graviewPreload(import.meta.url,["./chunk.AJZBJBMO.js"]),import("./chunk.
|
|
1
|
+
var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};function s(e){let t=[];return typeof e!="string"?["A view's source is text."]:(/\bimport\b/.test(e)&&t.push("It says import: a view loads nothing, so the word may not appear in it at all, even in a string or a comment."),/\bimportScripts\b/.test(e)&&t.push("It names importScripts: a view loads nothing."),/^\s*export\b/m.test(e)&&t.push("It exports something: a view is a plain script that draws through the graview global, not a module."),/\brequire\s*\(/.test(e)&&t.push("It calls require(): a view has no modules to require."),t)}var i,n=()=>i??=(__graviewPreload(import.meta.url,["./chunk.AJZBJBMO.js"]),import("./chunk.KQSD5MLY.js")).catch(e=>{throw i=void 0,e});async function p(e){let{VIEW_RUNTIME:t}=await n();return`${t}
|
|
2
2
|
;(function () {
|
|
3
3
|
"use strict";
|
|
4
4
|
${e}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{g as F,l as b}from"./chunk.
|
|
1
|
+
import{g as F,l as b}from"./chunk.TABIRLQS.js";function L(t,o){return o===1&&["every","some","sum","min","max","sort"].includes(t.fn)}function M(t){let o=new Set,e=new Set,r=[],s=[],a=new Set(F),i=(l,f)=>{switch(l.t){case"lit":return;case"ident":f||o.add(l.name);return;case"list":l.items.forEach(c=>i(c,f));return;case"member":i(l.object,f);return;case"unary":i(l.operand,f);return;case"binary":i(l.left,f),i(l.right,f);return;case"where":i(l.set,f),i(l.filter,!0);return;case"call":{e.add(l.fn);let c=(l.fn==="out"||l.fn==="in")&&l.args.length===2?l.args[1]:l.args[0],m=c?.t==="lit"&&typeof c.value=="string"?c.value:void 0;l.fn==="all"&&m&&r.push(m),(l.fn==="out"||l.fn==="in")&&m&&s.push(m),l.args.forEach((v,k)=>i(v,f||L(l,k)));return}}};return i(t,!1),{names:o,functions:e,unknownFunctions:[...e].filter(l=>!a.has(l)),sweeps:r,edges:s}}var p=class extends Error{constructor(e,r,s){super(`${e} (at character ${r+1} of "${s}")`);this.sentence=e;this.at=r;this.source=s}},D=["||","&&","==","!=","<=",">=","<",">","!","|","&","+","-","*","/","%","(",")","[","]",",","."],j={and:"&&",or:"||",not:"!"},T=2e3;function H(t){let o=[],e=0;for(;e<t.length;){let r=t[e];if(r===" "||r===" "||r===`
|
|
2
2
|
`||r==="\r"){e++;continue}if(r>="0"&&r<="9"){let a=e;for(;e<t.length&&/[0-9.]/.test(t[e]);)e++;let i=t.slice(a,e),l=Number(i);if(!Number.isFinite(l)||i.split(".").length>2)throw new p(`"${i}" is not a number`,a,t);o.push({k:"num",v:l,at:a});continue}if(r==="'"||r==='"'){let a=e++,i="";for(;e<t.length&&t[e]!==r;)t[e]==="\\"&&e+1<t.length&&e++,i+=t[e++];if(e>=t.length)throw new p("a quoted word is never closed",a,t);e++,o.push({k:"str",v:i,at:a});continue}if(/[A-Za-z_]/.test(r)){let a=e;for(;e<t.length&&/[A-Za-z0-9_]/.test(t[e]);)e++;let i=t.slice(a,e),l=Object.hasOwn(j,i)?j[i]:void 0;o.push(l?{k:"op",v:l,at:a}:{k:"id",v:i,at:a});continue}let s=D.find(a=>t.startsWith(a,e));if(!s)throw new p(`"${r}" is not part of the rule language`,e,t);o.push({k:"op",v:s,at:e}),e+=s.length}return o.push({k:"end",at:t.length}),o}function w(t){if(t.length>T)throw new p(`an expression may be at most ${T} characters`,0,t.slice(0,40));let o=H(t),e=0,r=()=>o[e],s=n=>{let d=r();return d.k==="op"&&d.v===n},a=n=>{let d=r();return d.k==="id"&&d.v===n},i=(n,d)=>{if(!s(n))throw new p(`expected ${d}`,r().at,t);e++},l=0,f=(n,d)=>{if(++l>64)throw new p("the expression nests too deeply",n,t);try{return d()}finally{l--}},c=(n,d)=>()=>{let g=d();for(;;){let y=r(),S=y.k==="op"?n.find(q=>q===y.v):y.k==="id"&&y.v==="in"&&n.includes("in")?"in":void 0;if(!S)return g;e++,g={t:"binary",op:S,left:g,right:d(),at:y.at}}},m=()=>{let n=r();if(n.k==="num")return e++,{t:"lit",value:n.v,at:n.at};if(n.k==="str")return e++,{t:"lit",value:n.v,at:n.at};if(n.k==="id"){if(e++,n.v==="true"||n.v==="false")return{t:"lit",value:n.v==="true",at:n.at};if(n.v==="null")return{t:"lit",value:null,at:n.at};if(s("(")){e++;let d=[];if(!s(")"))for(;;){if(d.push(h()),s(",")){e++;continue}break}return i(")",`")" to close ${n.v}(\u2026)`),{t:"call",fn:n.v,args:d,at:n.at}}return{t:"ident",name:n.v,at:n.at}}if(n.k==="op"&&n.v==="("){e++;let d=f(n.at,h);return i(")",'a ")"'),d}if(n.k==="op"&&n.v==="["){e++;let d=[];if(!s("]"))for(;;){if(d.push(h()),s(",")){e++;continue}break}return i("]",'a "]" to close the list'),{t:"list",items:d,at:n.at}}throw n.k==="end"?new p("the expression ends too soon",n.at,t):new p(`"${n.k==="op"?n.v:""}" cannot start a value here`,n.at,t)},v=()=>{let n=m();for(;;){if(s(".")){let d=r();e++;let g=r();if(g.k!=="id")throw new p('expected a field name after "."',g.at,t);e++,n={t:"member",object:n,name:g.v,at:d.at};continue}if(a("where")){let d=r().at;e++,n={t:"where",set:n,filter:f(d,h),at:d};continue}return n}},k=()=>{let n=r();return n.k==="op"&&(n.v==="!"||n.v==="-")?(e++,{t:"unary",op:n.v,operand:f(n.at,k),at:n.at}):v()},P=c(["*","/","%"],k),z=c(["+","-"],P),N=c(["&"],z),R=c(["|"],N),_=()=>{let n=R(),d=r(),g=d.k==="op"&&["==","!=","<","<=",">",">="].includes(d.v)?d.v:d.k==="id"&&d.v==="in"?"in":void 0;return g?(e++,{t:"binary",op:g,left:n,right:R(),at:d.at}):n},O=()=>{let n=r();return n.k==="op"&&n.v==="!"?(e++,{t:"unary",op:"!",operand:f(n.at,O),at:n.at}):_()},B=c(["&&"],O),I=c(["||"],B);function h(){return I()}let K=h();if(r().k!=="end")throw new p("there is more after the end of the expression",r().at,t);return K}function E(t){let o,e=-1,r=0;for(let s=0;s<t.length;s++){let a=t[s];if(o){a==="\\"?s++:a===o&&(o=void 0);continue}a==="'"||a==='"'?o=a:a==="("||a==="["?r++:a===")"||a==="]"?r--:a==="|"&&r===0&&(t[s+1]==="|"?s++:e=s)}if(e>0&&t.slice(e+1).trim()===x){let s=E(t.slice(0,e));if(s>=0)return s}return e}var x="capital",$=/\s*(?:'((?:[^'\\]|\\.)*)'|"((?:[^"\\]|\\.)*)")\s*(,|$)/y;function U(t){let o=E(t);if(o>=0){if(t.slice(o+1).trim()!==x)throw new u('only "capital" may follow another formatter, like {n | words | capital}');let e=t.slice(0,o);if(e.trim()===x)throw new u('"capital" is said once');return{...C(e),capital:!0}}return t.trim()===x?{args:[],capital:!0}:C(t)}function C(t){let o=t.indexOf(":"),e=(o>=0?t.slice(0,o):t).trim();if(!b.includes(e))throw new u(`"${e}" is not a formatter; use one of ${[...b,x].join(", ")}`);let r=[];if(o>=0&&e==="excerpt"){let s=t.slice(o+1).trim();if(!/^\d+$/.test(s)||Number(s)<20||Number(s)>1e3)throw new u("excerpt is told at most how many characters, 20 to 1000: {summary | excerpt: 80}");r.push(s)}else if(o>=0){let s=t.slice(o+1),a=0;for(;a<s.length;){$.lastIndex=a;let i=$.exec(s);if(!i)throw new u(`"${e}" is told quoted words, like ${e}: 'offer'`);if(r.push((i[1]??i[2]??"").replace(/\\(.)/g,"$1")),a=$.lastIndex,i[3]==="")break}}if(e==="plural"&&(r.length<1||r.length>2))throw new u("plural is told its noun, like {count | plural: 'offer'}, and its plural where English does not make it: plural: 'person', 'people'");if(e!=="plural"&&e!=="excerpt"&&r.length>0)throw new u(`"${e}" takes nothing after it`);return{format:e,args:r}}var u=class extends Error{constructor(e){super(e);this.sentence=e}};function Y(t){let o=[],e=0;for(;e<t.length;){let r=t.indexOf("{",e);if(r<0){o.push({text:t.slice(e)});break}r>e&&o.push({text:t.slice(e,r)});let s=t.indexOf("}",r);if(s<0)throw new u(`a "{" at character ${r+1} is never closed`);let a=t.slice(r+1,s),i=E(a),l=(i>=0?a.slice(0,i):a).trim(),f=i>=0?U(a.slice(i+1)):void 0,c=E(l);if(c>=0&&b.includes(l.slice(c+1).split(":")[0].trim()))throw new u('only "capital" may follow another formatter, like {n | words | capital}');o.push({expr:w(l),source:l,...f?.format?{format:f.format}:{},...f&&f.args.length>0?{formatArgs:f.args}:{},...f?.capital?{capital:!0}:{}}),e=s+1}return o}function A(t){let o=new Map;for(let[e,r]of Object.entries(t?.computed??{}))o.set(e,typeof r=="string"?{expr:r}:r);return o}function re(t){let o=A(t);if(o.size===0)return;let e=new Map;for(let[r,s]of o)try{e.set(r,w(s.expr))}catch(a){if(!(a instanceof p))throw a}return e}function Z(t,o,e=new Set){let r=A(t).get(o);if(!r||e.has(o))return!1;let s;try{s=w(r.expr)}catch{return!1}let a=M(s);if(a.edges.length>0||a.sweeps.length>0||[...a.functions].some(c=>c==="out"||c==="in"||c==="all"))return!1;let i=t.fields,l=c=>i instanceof Set?i.has(c):Object.hasOwn(i,c),f=new Set([...e,o]);return[...a.names].every(c=>l(c)||Z(t,c,f))}export{M as a,p as b,w as c,u as d,Y as e,A as f,re as g,Z as h};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as y,b as h}from"./chunk.
|
|
1
|
+
import{a as y,b as h}from"./chunk.2QKSWK4U.js";import"./chunk.AVDXG57A.js";import"./chunk.LD6S2FL5.js";import"./chunk.TABIRLQS.js";import{Rc as b}from"./chunk.PFEKS3KO.js";import"./chunk.2AZTW66C.js";import"./chunk.AJZBJBMO.js";var k=(d,i)=>({id:i.id,said:h(d,i),when:i.when,...i.alsoMine?{alsoMine:!0}:{}});async function A(d,i,t){let a=b(t.principal);if(a.id===void 0)return{ok:!1,error:"This seat acts for nobody the app knows by id, so there is nobody to tell. Nothing was kept."};let r=t.store.seenBy(a),p=async()=>(await t.subscriptions.list(a.id)).filter(n=>n.app===t.app);if(d==="list_subscriptions")return{ok:!0,data:{subscriptions:(await p()).map(n=>k(r,n))}};if(d==="unsubscribe"){let n=String(i.id??"");return(await p()).some(g=>g.id===n)?(await t.subscriptions.remove(n),{ok:!0,data:{removed:n}}):{ok:!1,error:`No subscription "${n}" of yours. list_subscriptions says which there are.`}}let o=String(i.on??""),c=n=>typeof i[n]=="string"&&i[n].trim()!==""?i[n].trim():void 0,e=c("record");if(e!==void 0&&!r.graph.getNode(e)){let n=t.store.resolveRef({name:"record",kinds:["*"]},e,a);if(!n.ok)return{ok:!1,error:`${n.message} Nothing was kept.`};e=n.id}let s=c("kind")??(e!==void 0&&o!=="act"?r.graph.getNode(e)?.kind:void 0),f=c("act"),m=c("condition"),u=o==="act"?{on:o,...f!==void 0?{act:f}:{},...e!==void 0?{record:e}:{}}:o==="created"&&s!==void 0?{on:o,kind:s}:o==="changed"?{on:o,...s!==void 0&&e===void 0?{kind:s}:{},...e!==void 0?{record:e}:{}}:o==="reaches"&&s!==void 0?{on:o,kind:s,condition:m??"",...e!==void 0?{record:e}:{}}:void 0;if(!u)return{ok:!1,error:'Say what to be told of: on is "act", "created", "changed" or "reaches", with a kind (or a record) for all but act. Nothing was kept.'};let l=y({schema:r.schema,allMutations:()=>t.store.allMutations(),graph:r.graph},u);if(l)return{ok:!1,error:`${l} Nothing was kept.`};let S=await t.subscriptions.add({who:a,app:t.app,when:u,...i.alsoMine===!0?{alsoMine:!0}:{}});return{ok:!0,data:{subscription:k(r,S)}}}export{A as runSubscriptionTool};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{a as D,b as L,c as C,d as M,e as _,f as N,h as T}from"./chunk.BRDAO2OF.js";import"./chunk.AJZBJBMO.js";var W=0,K=1,z=2,X=3,I=1,Y=2,j=3,J=1,q=3,Q=8,P="~",A=r=>typeof r=="object"&&r!==null&&!Array.isArray(r),F=new Set(["input","select","textarea","option"]),Z=new Set(["value","checked","selected"]);function H(r,t){let l=r.ownerDocument??r,h=t.maxNodes??5e3,y=[],g=new Map,E=new WeakMap,x={dom:r,name:"div",namespace:"html",children:[],id:P};g.set(P,x);let R=0,S=!1,O=new Map,u=e=>{y.push(e),y.length>200&&y.shift(),t.onRefused?.(e)},s=()=>({dom:l.createComment(""),children:[],refused:!0}),o=(e,a)=>{if(e.namespace==="html"&&e.name&&F.has(e.name))return e.dom;if(a?.namespace==="html"&&a.name==="textarea")return a.dom},m=(e,a,f)=>{let i=e.dom;if(f!=null&&typeof f!="string")return u({reason:"value",element:e.name,name:a});let n=T(e.namespace,e.name,a,f??null,t);if("refused"in n){let v=T(e.namespace,e.name,a,null,t);return"refused"in v||i.removeAttribute(v.name),u(n.refused)}for(let v of n.dropped??[])u(v);let d=e.namespace==="html"&&Z.has(n.name)&&F.has(e.name),c=i,p=d?n.name==="value"?c.value:n.name==="checked"?c.checked:c.selected:void 0;n.value===null?i.removeAttribute(n.name):i.setAttribute(n.name,n.value),t.onAttribute?.(i,n.name),d&&(n.name==="value"&&"value"in c?(c.value=n.value??"",p!==c.value&&t.onFieldSet?.(i)):n.name==="checked"&&"checked"in c?(c.checked=n.value!==null,p!==c.checked&&t.onFieldSet?.(i)):n.name==="selected"&&"selected"in c&&(c.selected=n.value!==null,p!==c.selected&&t.onFieldSet?.(i.parentElement?.closest("select")??i)))},w=e=>{if(!e.refused){R-=1,e.id!==void 0&&g.delete(e.id);for(let a of e.children)w(a)}},b=(e,a)=>{if(!A(e)||typeof e.id!="string"||g.has(e.id))return u({reason:"record"}),s();if(R>=h)return u({reason:"budget"}),S||(S=!0,t.onOverBudget?.()),s();let f=e.id;if(e.type===Q)return s();if(e.type===q){if(N(a.namespace,a.name))return u({reason:"child",element:a.name}),s();let p=l.createTextNode(String(e.data??"").slice(0,D)),v={dom:p,children:[],text:!0,id:f,parent:a};return g.set(f,v),E.set(p,f),R+=1,v}if(e.type!==J)return u({reason:"record"}),s();let i=String(e.element);if(N(a.namespace,a.name))return u({reason:"child",element:i}),s();let n=_(i,a.namespace);if("refused"in n)return u(n.refused),s();let d=l.createElementNS(n.namespace==="svg"?C:L,n.name);n.as&&d.setAttribute("data-graview-as",n.as),n.namespace==="html"&&n.name==="img"&&d.setAttribute("referrerpolicy","no-referrer"),n.namespace==="html"&&n.name==="a"&&(d.setAttribute("target","_blank"),d.setAttribute("rel","noopener noreferrer"),d.setAttribute("referrerpolicy","no-referrer"));let c={dom:d,name:n.name,namespace:n.namespace,children:[],id:f,parent:a};if(g.set(f,c),E.set(d,f),R+=1,A(e.attributes))for(let[p,v]of Object.entries(e.attributes))m(c,p,v);if(t.decorate?.(d,n.name,n.namespace),A(e.properties))for(let p of Object.keys(e.properties))u({reason:"attribute",element:n.name,name:p});if(A(e.eventListeners))for(let p of Object.keys(e.eventListeners))e.eventListeners[p]!=null&&u({reason:"attribute",element:n.name,name:`on${p}`});if(Array.isArray(e.children))for(let p of e.children){let v=b(p,c);c.children.push(v),d.appendChild(v.dom)}return c},k=e=>{if(!Array.isArray(e))return u({reason:"record"});let[a,f]=e,i=typeof f=="string"?g.get(f):void 0;if(!i)return u({reason:"record"});switch(a){case W:{if(i.text)return u({reason:"record"});let n=Number(e[3]),d=Number.isInteger(n)&&n>=0&&n<=i.children.length?n:i.children.length,c=e[2],p=A(c)&&typeof c.id=="string"?O.get(c.id):void 0,v;p&&p.parent?.namespace===i.namespace&&!N(i.namespace,i.name)?(O.delete(c.id),p.parent=i,v=p):v=b(c,i),i.dom.insertBefore(v.dom,i.children[d]?.dom??null),i.children.splice(d,0,v),i.namespace==="html"&&i.name==="textarea"&&t.onFieldSet?.(i.dom);return}case K:{let n=Number(e[2]),d=i.children[n];if(!d)return u({reason:"record"});i.children.splice(n,1),d.dom.parentNode?.removeChild(d.dom),d.id!==void 0&&!d.refused?O.set(d.id,d):w(d);return}case z:{if(!i.text)return u({reason:"record"});i.dom.data=String(e[2]??"").slice(0,D);let n=o(i,i.parent);n&&t.onFieldSet?.(n);return}case X:{if(i===x||i.text)return u({reason:"record"});let n=String(e[2]),d=e[4]??I;return d===Y?m(i,n,e[3]):u(d===I||d===j?{reason:"attribute",element:i.name,name:d===j?`on${n}`:n}:{reason:"record"})}default:return u({reason:"record"})}};return{apply(e,a){if(!Array.isArray(e))return u({reason:"record"}),!0;try{for(let f=0;f<e.length;f+=1){if(a&&f%32===0&&a())return!1;k(e[f])}return!0}finally{for(let f of O.values())w(f);O.clear()}},get refused(){return y},get size(){return R},idOf:e=>E.get(e),elementOf(e){let a=g.get(e);return a&&!a.text&&a!==x?a.dom:void 0},dispose(){for(let e of x.children)w(e);for(x.children.length=0;r.firstChild;)r.removeChild(r.firstChild)}}}var B=["https:","mailto:","tel:"];function U(r){if(!(typeof r!="string"||r.length>2e3||/[\s<>"]/.test(r.trim())||r.trim()!==r))try{let t=new URL(r);return!B.includes(t.protocol)||t.protocol==="https:"&&(t.hostname===""||t.username!==""||t.password!=="")?void 0:t.href}catch{return}}function ee(r){let t=new Set,l=h=>{if(typeof h!="string"||!/^(https|mailto|tel):/i.test(h))return;let y=U(h);y&&t.add(y)};for(let h of[...r?.node?[r.node]:[],...r?.nodes??[]])for(let[y,g]of Object.entries(h))y==="id"||y==="kind"||(Array.isArray(g)?g.forEach(l):l(g));return t}function G(r){return(r??[]).flatMap(t=>{try{let l=new URL(t);return l.protocol==="https:"&&l.hostname!==""&&l.username===""&&l.password===""?[l.origin]:[]}catch{return[]}})}function te(r,t){let l=U(r);if(l&&(t.handed.has(l)||l.startsWith("https:")&&G(t.origins).includes(new URL(l).origin)))return l}function ne(r,t){let l=r.length>120?`${r.slice(0,119)}\u2026`:r,h="";try{h=new URL(r).protocol}catch{h=""}if(!B.includes(h))return`The link "${l}" was not drawn: a view links only to an https:, mailto: or tel: address.`;let y=G(t);return`The link "${l}" was not drawn: it is no address this view was handed. A view links out only to an address a record it was shown holds (a url field), as the record holds it${y.length>0?`, or an https: address on ${y.join(", ")}`:""}; a record or a place of this app is <a data-record> or <a data-place>.`}var re=`
|
|
2
|
+
:host { display: block; position: relative; contain: layout paint style; isolation: isolate; overflow: clip; min-width: 0; }
|
|
3
|
+
:host(:focus-within) { overflow-clip-margin: var(--graview-ring-reach, 4px); }
|
|
4
|
+
[data-graview-view-root] { display: flow-root; color: var(--graview-ink, CanvasText); font-family: var(--graview-font-body, system-ui, sans-serif); line-height: 1.45; }
|
|
5
|
+
:where([data-graview-view-root]) :where(button) { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; text-align: inherit; appearance: none; cursor: pointer; }
|
|
6
|
+
:where([data-graview-view-root]) :where(a[data-graview-link]) { color: inherit; text-decoration: none; }
|
|
7
|
+
[data-graview-view-root] :is([data-graview-link], [data-graview-press]) { cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: rgb(128 128 128 / 0.16); }
|
|
8
|
+
[data-graview-view-root] :focus-visible { outline: max(2px, var(--graview-focus-width, 2px)) solid var(--graview-focus-color, var(--graview-accent, Highlight)) !important; outline-offset: var(--graview-focus-offset, 2px) !important; }
|
|
9
|
+
[data-graview-view-root] [data-graview-ring-inside]:focus-visible { outline-offset: calc(-1 * max(2px, var(--graview-focus-width, 2px))) !important; }
|
|
10
|
+
[data-graview-view-root] .graview-sr { position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0 !important; border: 0 !important; overflow: hidden !important; clip-path: inset(50%) !important; white-space: nowrap !important; }
|
|
11
|
+
[data-graview-view-root] a[href]:not([data-graview-link])::after { content: " \u2197" !important; content: " \u2197" / " (opens in a new tab)" !important; }
|
|
12
|
+
`,V=4,oe=16;function ie(r){let t=r.ownerDocument.defaultView?.getComputedStyle(r);if(!t)return V;let l=Number.parseFloat(t.outlineWidth)||0,h=Math.max(0,Number.parseFloat(t.outlineOffset)||0);return Math.min(oe,Math.max(V,Math.ceil(l+h)))}var se=new Set(["Enter"," ","Escape","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End"]),$=["click","input","change","keydown"];function me(r,t){let l=r.ownerDocument,h=l.createElement("style");h.setAttribute("data-graview-region",""),h.textContent=re;let y=l.createElement("style");y.setAttribute("data-graview-view-style","");let g=l.createElement("div");g.setAttribute("data-graview-view-root",""),r.append(h,y,g);let E=H(g,{origin:t.origin,...t.asset?{asset:t.asset}:{},...t.imageOrigins?{imageOrigins:t.imageOrigins}:{},...t.picture?{picture:t.picture}:{},...t.link?{link:t.link}:{},...t.onRefused?{onRefused:t.onRefused}:{},...t.maxNodes!==void 0?{maxNodes:t.maxNodes}:{},...t.onOverBudget?{onOverBudget:t.onOverBudget}:{},decorate:(s,o,m)=>{m==="html"&&o==="button"&&s.setAttribute("type","button"),m==="html"&&(o==="input"||o==="textarea"||o==="select")&&s.setAttribute("autocomplete","off"),t.decorate?.(s,o,m)},...t.onFieldSet?{onFieldSet:t.onFieldSet}:{},...t.onAttribute?{onAttribute:t.onAttribute}:{}}),x=[],R="",S=s=>{for(let o=s.composedPath()[0];o&&o!==g&&o!==r;o=o.parentNode)if(o.nodeType===1&&E.idOf(o)!==void 0)return o},O=s=>{let o=S(s);if(!o||s.type==="keydown"&&!se.has(s.key))return;let m=t.before?.(s,o,g);if(m===!1)return;let w=o,b=o.namespaceURI==="http://www.w3.org/1999/xhtml"&&["input","select","textarea"].includes(o.localName);t.send({type:"dom-event",target:E.idOf(o),event:s.type,...b?{value:String(w.value??"")}:{},...b&&(w.type==="checkbox"||w.type==="radio")?{checked:w.checked}:{},...s.type==="keydown"?{key:s.key}:{},...m??{}});let k=s.type==="keydown"?s.key:void 0;(k==="Enter"||k===" ")&&o.hasAttribute("data-graview-press")&&s.composedPath()[0]===o&&(s.preventDefault(),t.send({type:"dom-event",target:E.idOf(o),event:"click"}))};for(let s of $)r.addEventListener(s,O);r.addEventListener("toggle",O,!0);let u=typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("overflow-clip-margin","4px");return r.addEventListener("focusin",s=>{let o=s.composedPath()[0],m=r.host;if(!o||o.nodeType!==1||!g.contains(o))return;let w=ie(o);if(u){m.style.setProperty("--graview-ring-reach",`${w}px`);return}let b=m.getBoundingClientRect(),k=o.getBoundingClientRect(),e=w*(m.offsetWidth>0?b.width/m.offsetWidth:1),a=k.left-b.left<e||b.right-k.right<e||k.top-b.top<e||b.bottom-k.bottom<e;o.toggleAttribute("data-graview-ring-inside",a)}),{apply(s,o){let m=r.activeElement,w=m?E.idOf(m):void 0,b=E.apply(s,o);if(w!==void 0&&r.activeElement!==m){let k=E.elementOf(w);k?.isConnected&&typeof k.focus=="function"&&k.focus({preventScroll:!0})}return b},style(s){let o=M(s);x.length=0;for(let m of o.refused)x.push({reason:"css",name:"stylesheet",css:m}),x.length>200&&x.shift();R=o.css,y.textContent=R},renderer:E,get refused(){return[...E.refused,...x]},get css(){return R},dispose(){for(let s of $)r.removeEventListener(s,O);r.removeEventListener("toggle",O,!0),E.dispose(),r.replaceChildren()}}}export{re as REGION_CSS,me as createOpenDrawing,ee as handedLinks,te as judgeLink,ne as linkRefusedWords,ie as ringReach};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as p}from"./chunk.
|
|
1
|
+
import{h as p}from"./chunk.423SZS7C.js";import{R as c}from"./chunk.TM6JVVGW.js";import{kc as u}from"./chunk.PFEKS3KO.js";import{b as h}from"./chunk.AJZBJBMO.js";var s={person:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"><circle cx="11.6" cy="5.4" r="2.5"/><path d="M7.9 12.4c0-2.1 1.7-3.8 3.7-3.8s3.7 1.7 3.7 3.8v3.2H7.9z"/><path d="M8 12.6 6.4 17.2"/><path d="M15.2 12.6 16.8 17.2"/><path d="M9.8 15.6v5"/><path d="M13.4 15.6v5"/></svg>',plot:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"><path d="M2.6 9.4 12 4.6l9.4 4.8-9.4 4.8z"/><path d="M2.6 9.4v4.4l9.4 4.8 9.4-4.8V9.4"/><path d="M12 14.2v4.4"/><path d="M7 11.9v3"/><path d="M17 11.9v3"/></svg>',box:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"><path d="M3.4 7.9 12 3.6l8.6 4.3-8.6 4.3z"/><path d="M3.4 7.9v8.2L12 20.4l8.6-4.3V7.9"/><path d="M12 12.2v8.2"/></svg>',task:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"><path d="M4.4 6.6 12 2.9l7.6 3.7v9.5L12 19.8 4.4 16.1z"/><path d="M12 12.4v7.4"/><path d="M4.4 6.6 12 10.3l7.6-3.7"/><path d="M8 9.6l2.4 2.4L16 8.4"/></svg>',shift:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"><path d="M3.2 8.2 12 4l8.8 4.2-8.8 4.2z"/><path d="M3.2 8.2v7.2L12 19.6l8.8-4.2V8.2"/><path d="M12 12.4v7.2"/><path d="M6.6 10.8v3.4"/><path d="M9.3 12v3.4"/></svg>',list:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"><path d="M2.8 10.4 12 6l9.2 4.4-9.2 4.4z"/><path d="M2.8 10.4v3.2L12 18l9.2-4.4v-3.2"/><path d="M6.6 8.6 15.8 13"/><path d="M9.4 7.2 18.6 11.6"/></svg>',vehicle:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"><path d="M2.8 14.2 5 9.4l8.6-1.6 5.4 3-1 3.6z"/><path d="M2.8 14.2v2.2h2.4"/><path d="M18 16.4h1.9l.1-2.2"/><circle cx="7.6" cy="16.6" r="1.9"/><circle cx="16.1" cy="16.6" r="1.9"/><path d="M8.6 8.2 9.8 12l7.2-1"/></svg>',rule:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"><path d="M5.4 19.4V6.6l12 12.8z"/><path d="M5.4 6.6 7.6 5.5l12 12.8-2.2 1.1"/><path d="M5.4 19.4 7.6 18.3h12"/><path d="M5.4 10.1h1.7"/><path d="M5.4 13.3h1.7"/><path d="M5.4 16.5h1.7"/></svg>',note:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"><path d="M6.2 6.2 14.8 10.5v9L6.2 15.2z"/><path d="M12.4 9.3 14.8 10.5l-.6 2.3"/><path d="M8.2 10.6 12.8 12.9"/><path d="M8.2 13.2 11.4 14.8"/></svg>'},v=Object.keys(s);function i(e){if(e)return s[e]??(e.trimStart().startsWith("<svg")?e:void 0)}var a=h(c(),1);function A({kind:e,schema:o,brand:n,size:r=16,title:t}){let f=o?.tryDefinition?.(e)?.figure,d=i(n?.figures?.[e]??f),l=Math.round(u(e,n?.accents)),g=p(d);return d?(0,a.jsx)("span",{"aria-hidden":t===void 0?"true":void 0,...t===void 0?{}:{role:"img","aria-label":t},"data-graview-figure":e,"data-graview-figure-kind":"figure",dangerouslySetInnerHTML:g,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:r,height:r,flex:"0 0 auto",color:`hsl(${l} 55% 52%)`,"--graview-figure-size":`${r}px`}}):(0,a.jsx)("span",{"aria-hidden":t===void 0?"true":void 0,...t===void 0?{}:{role:"img","aria-label":t},"data-graview-figure":e,"data-graview-figure-kind":"dot",style:{display:"inline-block",width:Math.round(r*.8),height:Math.round(r*.5),flex:"0 0 auto",background:`hsl(${l} 55% 52%)`,clipPath:"polygon(50% 0, 100% 50%, 50% 100%, 0 50%)"}})}function C(e,o,n){return i(n?.figures?.[e]??o?.tryDefinition?.(e)?.figure)!==void 0}export{A as a,C as b};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import"./chunk.
|
|
1
|
+
import"./chunk.WQN7EFW3.js";import{a as _,b as ge,c as me,e as fe}from"./chunk.6EHE26ZS.js";import"./chunk.7JW5SHRR.js";import"./chunk.HJCQ6I3S.js";import{a as ve,d as ye}from"./chunk.DFGXNFFE.js";import"./chunk.XN7PIWVC.js";import{a as de}from"./chunk.AP22NNIM.js";import{d as he}from"./chunk.SPZVEQC5.js";import"./chunk.FNK2ZZ5E.js";import"./chunk.RSR2M7ZO.js";import"./chunk.AGVFW6WC.js";import"./chunk.SIVMZNHZ.js";import"./chunk.NQ7SRWXA.js";import"./chunk.AOEXSQDG.js";import"./chunk.3NEALGMI.js";import"./chunk.UT6642FC.js";import"./chunk.D4K23FUB.js";import"./chunk.WVUJXDXZ.js";import"./chunk.NQDGUIUQ.js";import"./chunk.DTRNDSMS.js";import"./chunk.3EW6L5DY.js";import"./chunk.AVDXG57A.js";import"./chunk.LD6S2FL5.js";import"./chunk.TABIRLQS.js";import"./chunk.GZHZLJBF.js";import{o as ue,r as K}from"./chunk.FOYVTN5B.js";import"./chunk.OJGHDWI6.js";import{a as ce}from"./chunk.OTF3NNTI.js";import"./chunk.A7HMVWMG.js";import"./chunk.GRLPNTUW.js";import{c as le}from"./chunk.EJAVIZ7Y.js";import{r as pe}from"./chunk.423SZS7C.js";import{G as xe,K as I,Ka as se,La as W,R as re,T as ie,_ as T,aa as R,j as M,ja as G,l as ne,m as B,r as P,v as ae,z as oe}from"./chunk.TM6JVVGW.js";import"./chunk.SDO3U72B.js";import{Hc as te,U as D,ca as $,da as F,ga as q,ia as L,ma as ee}from"./chunk.PFEKS3KO.js";import"./chunk.2AZTW66C.js";import{b as V}from"./chunk.AJZBJBMO.js";var l=V(xe(),1);var e=V(re(),1),Se=pe.part((t,u)=>(0,e.jsx)(t.ProblemRows,{...u}),{what:"The problems",as:"li"}),A="var(--graview-gap, 8px)",ke=720;function qe({showing:t}){return t.what==="lens"?(0,e.jsx)(Ae,{kind:t.kind},`lens:${t.kind}`):t.what==="record"?(0,e.jsx)(Pe,{id:t.id},`record:${t.id}`):(0,e.jsx)(Ne,{kind:t.kind},`district:${t.kind}`)}function Y({label:t,wide:u,testId:a,head:o,onClose:s,children:d,sheetHeight:p}){let i=(0,l.useRef)(null),[h,m]=(0,l.useState)(!1);(0,l.useLayoutEffect)(()=>{let r=i.current?.parentElement;if(!r)return;let f=()=>m(r.getBoundingClientRect().width<ke);if(f(),typeof ResizeObserver>"u")return;let x=new ResizeObserver(f);return x.observe(r),()=>x.disconnect()},[]);let v=(0,l.useRef)(s);return v.current=s,(0,l.useEffect)(()=>{let r=k=>{if(k.key!=="Escape"||k.defaultPrevented)return;let y=document.activeElement;y instanceof HTMLInputElement||y instanceof HTMLTextAreaElement||document.querySelector("[data-graview-popover]:popover-open")||f||v.current()},f=!1,x=()=>{f=document.querySelector('[data-testid="following-who"]')!==null};return window.addEventListener("keydown",x,!0),document.addEventListener("keydown",r),()=>{window.removeEventListener("keydown",x,!0),document.removeEventListener("keydown",r)}},[]),(0,e.jsxs)("section",{ref:i,"aria-label":t,"data-testid":a,"data-graview-map-panel":h?"sheet":"dock","data-graview-overlay":"","data-graview-offstage":"",className:"graview-map-panel",style:{position:"absolute",zIndex:te("rail"),boxSizing:"border-box",display:"flex",flexDirection:"column",background:"var(--graview-panel)",color:"var(--graview-ink)",overflow:"hidden",border:"1px solid var(--graview-edge)",borderRadius:"var(--graview-radius, 12px)",boxShadow:"var(--graview-lift-high)",...h?{left:A,right:A,bottom:`calc(${A} + env(safe-area-inset-bottom, 0px))`,height:p}:{top:A,right:A,bottom:A,width:u}},children:[h?(0,e.jsx)("style",{children:`:has(> [data-graview-map-panel="sheet"]) { --graview-sheet: calc(${p} + 2 * ${A} + env(safe-area-inset-bottom, 0px)); }`}):(0,e.jsx)("style",{children:`:has(> [data-graview-map-panel="dock"]) { --graview-dock: calc(${u} + 2 * ${A}); }`}),(0,e.jsxs)("header",{style:{display:"flex",alignItems:"flex-start",gap:10,padding:"14px 14px 10px 18px",borderBottom:"1px solid var(--graview-edge)"},children:[(0,e.jsx)("div",{style:{flex:"1 1 auto",minWidth:0},children:o}),(0,e.jsx)("button",{type:"button","data-testid":"map-panel-close","aria-label":"Close",title:"Close (Escape)",onClick:s,style:{flex:"0 0 auto",minWidth:32,height:32,borderRadius:8,fontSize:"1.1rem",lineHeight:1},children:"\xD7"})]}),(0,e.jsx)("div",{style:{flex:"1 1 auto",minHeight:0,overflow:"auto"},children:d})]})}var U={fontSize:"0.75rem",letterSpacing:"0.09em",textTransform:"uppercase",color:"var(--graview-ink-faint)"},J={margin:"2px 0 0",fontSize:"1.125rem",fontWeight:600,lineHeight:1.3,overflowWrap:"anywhere"},Q={margin:"4px 0 0",fontSize:"0.875rem",color:"var(--graview-ink-muted)"},j={margin:"14px 18px 6px",fontSize:"0.8125rem",fontWeight:600,color:"var(--graview-ink-muted)"},z={listStyle:"none",margin:0,padding:"0 10px 6px"},X={all:"unset",outline:"revert-layer",boxSizing:"border-box",display:"flex",alignItems:"baseline",gap:8,width:"100%",padding:"6px 8px",borderRadius:6,cursor:"pointer",fontSize:"0.875rem"},H={minHeight:30,padding:"0 12px",borderRadius:8,fontSize:"0.8125rem"};function Z(){let{setSelection:t,setMenuAt:u}=T();return(a,o)=>{a.preventDefault(),t([o]),u({x:a.clientX,y:a.clientY,on:o})}}function we({on:t,about:u}){let{setSelection:a,setMenuAt:o}=T();return(0,e.jsx)("button",{type:"button","data-testid":"map-panel-acts","aria-label":`What can be done with ${u}`,"aria-haspopup":"menu",style:H,onClick:s=>{let d=s.currentTarget.getBoundingClientRect();a([t]),o({x:Math.round(d.left),y:Math.round(d.bottom+4),on:t})},children:"Acts\u2026"})}var be=(t,u)=>({...M(B(t,!1),u),relation:null});function Ee(t,u){let a=`[data-graview-stage] [data-graview-view="${CSS.escape(t)}"][tabindex]`,o=null;for(let i=u?.parentElement??null;i&&!o;i=i.parentElement)o=i.querySelector(".graview-ground");o??=document.querySelector(".graview-ground");let s=o!==null&&!o.hasAttribute("tabindex");o&&s&&(o.setAttribute("tabindex","-1"),o.addEventListener("focusout",i=>{i.target===o&&o.removeAttribute("tabindex")},{once:!0})),o?.focus({preventScroll:!0});let d=performance.now()+5e3,p=()=>{let i=document.activeElement;if(!(i===null||i===document.body||i===document.documentElement||i===u||i===o))return;let m=document.querySelector(a);if(m&&m.isConnected&&!m.closest("[inert]"))return m.focus({preventScroll:!0});performance.now()<d&&requestAnimationFrame(p)};requestAnimationFrame(p)}function Ae({kind:t}){let u=Z(),{store:a,views:o,view:s,selection:d,setSelection:p}=T(),{go:i}=W(),h=R(),m=s.within?.view,v=o.places().filter(w=>w.kind===t),r=(m!==void 0?v.find(w=>w.as===m):void 0)??v.at(-1),f=o.resolve(t,{cardinality:"many",fidelity:"full"},r?.as??m),x=f?.view,k=a.schema.tryDefinition(t),y=(0,l.useMemo)(()=>a.graph.nodesOfKind(t).filter(w=>s.past===!0||$(k,w)),[a,t,h,s.past,k]),E=f?.title??r?.title??L(a.schema,t),C=x!==void 0&&G(x),c=d.filter(w=>a.graph.getNode(w)!==void 0),g=ce();return(0,e.jsxs)(Y,{label:E,testId:"lens-panel",wide:"min(max(440px, 46%), 760px)",sheetHeight:"60%",onClose:()=>i(ne(M(s,null),"view",null)),head:C?null:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{style:U,children:L(a.schema,t)}),(0,e.jsx)("h2",{style:J,"data-testid":"lens-panel-title",children:E}),(0,e.jsxs)("p",{style:Q,children:[q(a.schema,t,y.length),k?.description?` \xB7 ${k.description}`:""]}),r?(0,e.jsx)("div",{style:{marginTop:10},children:(0,e.jsx)("button",{type:"button","data-testid":"lens-panel-open",style:H,title:`Open ${E} on its own`,onClick:()=>i(oe(s,t,r.as)),children:"Open \u2197"})}):null]}),children:[(0,e.jsx)("style",{children:`.graview-ground[data-graview-altitude] .graview-plot:not([data-graview-plot="${P(t)}"]) { opacity: 0.35; }
|
|
2
2
|
.graview-ground[data-graview-altitude] [data-graview-view^="kind:"]:not([data-graview-view="${P(t)}"]) { opacity: 0.4; }`}),(0,e.jsx)("div",{"data-graview-lens":r?.as??"",style:{padding:"8px 12px 16px",minHeight:"100%",boxSizing:"border-box",display:"grid",gridTemplateRows:"1fr",gridTemplateColumns:"minmax(0, 1fr)",alignItems:"start"},onClick:w=>{let n=I(w.target);if(!n||a.graph.getNode(n)===void 0)return;let b=w.target.closest("button, a, input, select, textarea, [contenteditable='true']");b&&!b.hasAttribute("data-graview-pick")||p([n])},onDoubleClick:w=>{let n=I(w.target);!n||a.graph.getNode(n)===void 0||i(be(s,n))},onContextMenu:w=>{let n=I(w.target);!n||a.graph.getNode(n)===void 0||u(w,n)},children:x?(0,e.jsx)(de.Provider,{value:E,children:(0,e.jsx)(ie,{mode:"fullscreen",children:(0,e.jsx)(K,{kind:t,...f?.title?{view:f.title}:{},children:(0,e.jsx)(x,{nodes:y,label:E,fidelity:"full",cardinality:"many",mode:"fullscreen",selected:!1,...c.length>0?{implicated:c}:{},...g.length>0?{flagged:g}:{}})})})}):null})]})}function Ce(t,u,a,o){let s=o(a),d=new Map;for(let p of u){let i=p.from===a;if(!i&&p.to!==a)continue;let h=i?p.to:p.from,m=o(h);if(m===void 0||s===void 0)continue;let v=`${p.kind}|${i?"out":"in"}|${m}`,r=d.get(v);if(r){r.others.includes(h)||r.others.push(h);continue}d.set(v,{key:v,edge:p.kind,words:le(t,i?s:m,p.kind,i?"out":"in"),kind:m,others:[h]})}return[...d.values()]}function Pe({id:t}){let u=Z(),{store:a,views:o,view:s,setSelection:d}=T(),{go:p}=W(),i=R(),h=a.graph.getNode(t),m=c=>a.graph.getNode(c)?.kind,v=(0,l.useMemo)(()=>Ce(a.schema,a.graph.allEdges(),t,m),[a,t,i]);if(!h)return null;let r=h.kind,f=c=>{let g=a.graph.getNode(c);return g?F(a.schema.tryDefinition(g.kind),g):c},x=ee(a.schema.tryDefinition(r),r),y=o.resolve(r,{cardinality:"one",fidelity:"full"})?.view,E=y!==void 0&&!G(y),C=()=>s.focusId===t?p({...M(s,null),selection:[]}):d([]);return(0,e.jsxs)(Y,{label:`${f(t)}: its links`,testId:"record-panel",wide:E?"min(max(440px, 46%), 760px)":"min(360px, 40%)",sheetHeight:"52%",onClose:C,head:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{style:U,children:x}),(0,e.jsx)("h2",{style:J,"data-testid":"record-panel-title",children:f(t)}),(0,e.jsxs)("div",{style:{display:"flex",gap:8,flexWrap:"wrap",marginTop:10},children:[(0,e.jsx)("button",{type:"button","data-testid":"record-panel-go",style:H,onClick:c=>{p(be(s,t)),Ee(t,c.currentTarget)},children:"Go to it"}),(0,e.jsx)(we,{on:t,about:f(t)}),(0,e.jsxs)("button",{type:"button","data-testid":"record-panel-district",style:H,onClick:()=>d([P(r)]),children:["All ",L(a.schema,r).toLowerCase()]})]})]}),children:[(0,e.jsx)("div",{"data-graview-record-card":t,style:{padding:"8px 18px 0"},children:E?(0,e.jsx)(K,{kind:r,children:(0,e.jsx)(y,{node:h,fidelity:"full",cardinality:"one",mode:"fullscreen",selected:!1})}):(0,e.jsx)(he,{id:t,shown:[f(t)]})}),v.length===0?(0,e.jsx)("p",{style:{...Q,margin:"14px 18px"},children:"No links yet."}):null,v.map(c=>(0,e.jsxs)("section",{"aria-label":c.words,"data-graview-links":c.edge,children:[(0,e.jsxs)("h3",{style:j,children:[c.words.charAt(0).toUpperCase()+c.words.slice(1)," ",(0,e.jsxs)("span",{style:{fontWeight:400,color:"var(--graview-ink-faint)"},children:["\xB7 ",c.others.length]})]}),(0,e.jsx)("ul",{style:z,children:c.others.map(g=>(0,e.jsx)("li",{children:(0,e.jsxs)("button",{type:"button",className:"graview-map-panel-row","data-graview-record":g,style:X,onClick:()=>d([g]),onContextMenu:N=>u(N,g),children:[(0,e.jsx)("span",{style:{flex:"1 1 auto",minWidth:0,overflowWrap:"anywhere"},children:f(g)}),c.kind!==r?null:(0,e.jsx)("span",{style:{fontSize:"0.75rem",color:"var(--graview-ink-faint)"},children:x})]})},g))})]},c.key))]})}var Te=24;function Ne({kind:t}){let u=Z(),{store:a,view:o,setSelection:s,setEmphasis:d}=T(),{go:p}=W(),i=R(),[h,m]=(0,l.useState)(""),v=a.schema.tryDefinition(t),r=(0,l.useMemo)(()=>a.graph.nodesOfKind(t).filter(n=>o.past===!0||$(v,n)).map(n=>({id:n.id,name:F(v,n)})).sort((n,b)=>n.name.localeCompare(b.name)),[a,t,i,o.past,v]),f=(0,l.useMemo)(()=>{let n=S=>{let O=a.graph.getNode(S);return O!==void 0&&(o.past===!0||$(a.schema.tryDefinition(O.kind),O))},b=a.graph.allEdges().filter(S=>n(S.from)&&n(S.to));return ve(b,S=>a.graph.getNode(S)?.kind).filter(S=>S.from===t||S.to===t)},[a,t,i,o.past]);(0,l.useEffect)(()=>()=>d(null),[d]);let x=se(),k=ue().marks.flag,y=(0,l.useMemo)(()=>{let n=new Set(r.map(b=>b.id));return x.filter(b=>b.nodeIds.some(S=>n.has(S)))},[x,r]),E=(0,l.useMemo)(()=>[...new Set(y.flatMap(n=>n.nodeIds))].filter(n=>a.graph.getNode(n)?.kind===t).slice(0,300),[y,a,t]),C=(0,l.useRef)(null),c=(0,l.useSyncExternalStore)(ge,_,_);(0,l.useEffect)(()=>{c?.kind!==t||y.length===0||(C.current?.scrollIntoView?.({block:"start"}),C.current?.focus({preventScroll:!0}))},[c?.n,c?.kind,t,y.length>0]),(0,l.useEffect)(()=>()=>{me(),setTimeout(()=>{let n=document.activeElement;if(n&&n!==document.body)return;let b=CSS.escape(t);document.querySelector(`[data-testid="district-problems-${b}"]`)?.focus({preventScroll:!0})??document.querySelector(`[data-graview-view="${P(t).replace(/["\\]/g,"\\$&")}"]`)?.focus({preventScroll:!0})},0)},[t]);let g=L(a.schema,t),N=h.trim().toLowerCase(),w=N?r.filter(n=>n.name.toLowerCase().includes(N)):r;return(0,e.jsxs)(Y,{label:g,testId:"district-panel",wide:"min(360px, 40%)",sheetHeight:"52%",onClose:()=>s([]),head:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{style:U,children:"District"}),(0,e.jsx)("h2",{style:J,"data-testid":"district-panel-title",children:g}),(0,e.jsxs)("p",{style:Q,children:[q(a.schema,t,r.length),v?.description?` \xB7 ${v.description}`:""]}),(0,e.jsxs)("div",{style:{display:"flex",gap:8,flexWrap:"wrap",marginTop:10},children:[(0,e.jsx)("button",{type:"button","data-testid":"district-panel-go",style:H,onClick:()=>p({...M(B(o,!1),ae(t)),relation:null}),children:"Go in"}),(0,e.jsx)(we,{on:P(t),about:`the ${g.toLowerCase()}`})]})]}),children:[y.length>0?(0,e.jsxs)("section",{"aria-label":"Problems","data-testid":"district-problems","data-graview-problems":y.length,children:[(0,e.jsx)("style",{children:`${E.map(n=>`.graview-ground[data-graview-altitude] .graview-building[data-graview-building="${CSS.escape(n)}"] polygon`).join(`,
|
|
3
3
|
`)} { stroke: var(--graview-accent); stroke-width: 2.2; stroke-opacity: 1; }`}),(0,e.jsxs)("h3",{ref:C,tabIndex:-1,"data-testid":"district-problems-heading",style:{display:"flex",alignItems:"baseline",gap:8,margin:0,padding:"14px 18px 8px",fontSize:"0.9375rem",fontWeight:600,color:"var(--graview-warn)",borderTop:"1px solid var(--graview-edge)",scrollMarginTop:0,outlineOffset:-2},children:[(0,e.jsx)("span",{"aria-hidden":"true",children:k}),(0,e.jsx)("span",{style:{color:"var(--graview-ink)"},children:fe(y.length,g)})]}),(0,e.jsx)("ol",{style:z,"data-testid":"district-problem-rows",children:(0,e.jsx)(l.Suspense,{fallback:null,children:(0,e.jsx)(Se,{violations:y,pick:n=>{let b=n.subjectId??n.nodeIds[0];b!==void 0&&s([b])}})})})]}):null,f.length>0?(0,e.jsxs)("section",{"aria-label":"Relations",children:[(0,e.jsx)("h3",{style:j,children:"Relations"}),(0,e.jsx)("ul",{style:z,children:f.map(n=>(0,e.jsx)("li",{children:(0,e.jsxs)("div",{"data-graview-relation-said":n.edge,tabIndex:0,style:{...X,cursor:"default"},onPointerEnter:()=>d(n.edge),onPointerLeave:()=>d(null),onFocus:()=>d(n.edge),onBlur:()=>d(null),children:[(0,e.jsx)("span",{style:{flex:"1 1 auto",minWidth:0},children:ye(a.schema,n)}),(0,e.jsx)("span",{style:{fontSize:"0.75rem",color:"var(--graview-ink-faint)",fontVariantNumeric:"tabular-nums"},title:`${D(n.links)} links`,children:D(n.links)})]})},n.key))})]}):null,(0,e.jsxs)("div",{role:"group","aria-label":g,children:[(0,e.jsxs)("h3",{style:j,children:[g," ",(0,e.jsxs)("span",{style:{fontWeight:400,color:"var(--graview-ink-faint)"},children:["\xB7 ",r.length]})]}),r.length>Te?(0,e.jsx)("div",{style:{padding:"0 18px 6px"},children:(0,e.jsx)("input",{type:"search","data-testid":"district-panel-narrow","aria-label":`Narrow the ${g.toLowerCase()} by name`,placeholder:"Narrow by name",value:h,onChange:n=>m(n.target.value),style:{width:"100%",boxSizing:"border-box",minHeight:32}})}):null,(0,e.jsx)("ul",{style:z,children:w.map(n=>(0,e.jsx)("li",{children:(0,e.jsx)("button",{type:"button",className:"graview-map-panel-row","data-graview-record":n.id,style:X,onClick:()=>s([n.id]),onContextMenu:b=>u(b,n.id),children:(0,e.jsx)("span",{style:{flex:"1 1 auto",minWidth:0,overflowWrap:"anywhere"},children:n.name})})},n.id))})]})]})}export{qe as MapPanelFor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ca as y,da as V}from"./chunk.
|
|
1
|
+
import{ca as y,da as V}from"./chunk.TM6JVVGW.js";import"./chunk.SDO3U72B.js";import{cd as u,fd as m}from"./chunk.PFEKS3KO.js";import"./chunk.2AZTW66C.js";import"./chunk.AJZBJBMO.js";var c=t=>[t,...u.filter(r=>r!==t)];function w(t,r){if(r.hidden.length===0&&r.removed.length===0)return t;let f=new Set(r.removed.filter(e=>!e.lens).map(e=>e.name)),o=new Set(r.hidden),s=e=>e?.name!==void 0&&(f.has(e.name)||o.has(e.name)),a=(e,i,d)=>[...t.registrations()].reverse().find(n=>n.kind===e&&n.cardinality===i&&n.fidelity===d&&!n.beside&&!n.hidden&&!s(n)),h=(e,i)=>{for(let d of c(i.fidelity)){let n=a(e,i.cardinality,d);if(n)return n}if(i.cardinality==="one")for(let d of c(i.fidelity)){let n=a(e,"many",d);if(n)return n}},l={...t,register(e,i,d,n){return t.register(e,i,d,n),l},lookup(e,i){return t.lookup(e,i)===void 0?void 0:a(e,i.cardinality,i.fidelity)?.view},places:()=>t.places().filter(e=>!(e.name!==void 0&&f.has(e.name))).map(e=>e.name!==void 0&&o.has(e.name)&&!e.hidden?{...e,hidden:!0}:e),resolve(e,i,d){let n=t.resolve(e,i,d);return!n||!s(n)||d!==void 0&&n.name!==void 0&&!f.has(n.name)&&n.title!==void 0&&m(n.title)===d?n:h(e,i)},all:()=>t.all().filter(e=>!(e.name!==void 0&&f.has(e.name)))};return y(t)&&V(l),l}function v(t,r,f){let o,s=()=>{let a=r.current();o&&a.hidden===o.hidden&&a.removed===o.removed||(o=a,f(w(t,a)))};return s(),r.onChange?.(s)??(()=>{})}export{w as tidyViews,v as watchTidied};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Gc as e}from"./chunk.PFEKS3KO.js";var i=`
|
|
2
2
|
.graview-spec{display:flex;flex-direction:column;gap:6px;min-width:0;color:var(--graview-ink)}
|
|
3
3
|
|
|
4
4
|
.graview-spec-row{flex-direction:row;flex-wrap:wrap;align-items:center;gap:4px 10px;box-sizing:border-box;max-width:100%;padding:5px 10px;border:1px solid var(--graview-edge);border-radius:var(--graview-radius-sm,8px);background:var(--graview-panel);font-size:.875rem}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as a}from"./chunk.
|
|
1
|
+
import{e as a}from"./chunk.AGVFW6WC.js";import{l as i}from"./chunk.TM6JVVGW.js";import{md as o}from"./chunk.PFEKS3KO.js";function p(t){let r=t.within??{};return o({...r.sort?{sort:r.sort}:{},...r.filter?{filter:r.filter}:{},...r.group?{group:r.group}:{},...r.q?{q:r.q}:{},...r.archived?{archived:r.archived}:{}})}function c(t,r){let m=a(r),e=t;for(let n of["sort","filter","group","q","archived"])e=i(e,n,m[n]??null);return e}export{p as a,c as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var o=new Set(["tell","me","about","what","how","show","describe","the","a","an","and","please"])
|
|
1
|
+
var o=new Set(["tell","me","about","what","how","show","describe","the","a","an","and","please"]),k=new Set([...o,"where","is","are","was","find","any","anything","something","things","called","named","which","who","of","for","with","to","in","on","i","my","do","does","have","has","can","you","it","that","this","there","we","our","got","be"]);function S(t){return t.flatMap(e=>{let n=e.repairs.find(s=>!s.missing?.length);return n?[{mutation:n.mutation,args:{...n.args},why:e.message}]:[]})}export{S as a};
|