graview 0.1.69 → 0.1.71
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/preview/chunk.23DATB5Y.js +1 -0
- package/dist/preview/chunk.2INDKSJI.js +1 -0
- package/dist/preview/chunk.3CLTABGP.js +1 -0
- package/dist/preview/chunk.3RRK6UTN.js +8 -0
- package/dist/preview/chunk.45HUV56Z.js +1 -0
- package/dist/preview/chunk.4HU2ILFY.js +1 -0
- package/dist/preview/{chunk.3VNOTHA5.js → chunk.4LWWXIM4.js} +1 -1
- package/dist/preview/chunk.4O64QV2Y.js +1 -0
- package/dist/preview/{chunk.PJL3I2IW.js → chunk.4QMAYVPU.js} +1 -1
- package/dist/preview/chunk.4UDST6IF.js +1 -0
- package/dist/preview/{chunk.6BNSDPZE.js → chunk.4YZ2A6SJ.js} +3 -3
- package/dist/preview/{chunk.523EFGHU.js → chunk.4ZEHLUXV.js} +1 -1
- package/dist/preview/{chunk.F4CDJBDS.js → chunk.5EQRIZ6I.js} +1 -1
- package/dist/preview/chunk.5OS4SYHE.js +1 -0
- package/dist/preview/{chunk.BO32A3W5.js → chunk.5PQV7GFE.js} +1 -1
- package/dist/preview/{chunk.PZ3KM3TY.js → chunk.5WCSQFS5.js} +1 -1
- package/dist/preview/{chunk.HU3KEWFO.js → chunk.64K5ELSQ.js} +1 -1
- package/dist/preview/{chunk.MKN7ADJB.js → chunk.67S2UWBT.js} +1 -1
- package/dist/preview/chunk.6A3KTD66.js +1 -0
- package/dist/preview/chunk.6BBUTKFC.js +23 -0
- package/dist/preview/chunk.6IMRCKB4.js +1 -0
- package/dist/preview/chunk.6L6RUOSF.js +5 -0
- package/dist/preview/{chunk.MH3AQO2R.js → chunk.6TBQV3NO.js} +1 -1
- package/dist/preview/chunk.6ZRVVRDQ.js +1 -0
- package/dist/preview/{chunk.YZKHTBTC.js → chunk.7FI75ZVE.js} +1 -1
- package/dist/preview/{chunk.IO5VFTXC.js → chunk.7KX36ENH.js} +1 -1
- package/dist/preview/chunk.7LPHWJB4.js +3 -0
- package/dist/preview/chunk.7MDGPTYF.js +1 -0
- package/dist/preview/{chunk.I4H2GS4O.js → chunk.7PWLRRUS.js} +2 -2
- package/dist/preview/{chunk.7T2P42VW.js → chunk.7TACFS7Q.js} +1 -1
- package/dist/preview/{chunk.KLEKC4ZX.js → chunk.7THS3DLZ.js} +1 -1
- package/dist/preview/{chunk.CSVDBDRZ.js → chunk.7XGU6KVF.js} +2 -2
- package/dist/preview/chunk.7ZLCA3WK.js +1 -0
- package/dist/preview/{chunk.RRCPEHM4.js → chunk.AIFT2HNP.js} +1 -1
- package/dist/preview/{chunk.LMZ2WMGH.js → chunk.ARGEGV5T.js} +1 -1
- package/dist/preview/{chunk.4FJ4OPSJ.js → chunk.BSWR5SGX.js} +1 -1
- package/dist/preview/{chunk.RNAL35ID.js → chunk.BWMPC7LK.js} +1 -1
- package/dist/preview/{chunk.KW7PHJYX.js → chunk.CEJIH3CN.js} +1 -1
- package/dist/preview/chunk.CEOQY5KS.js +5 -0
- package/dist/preview/{chunk.G43YUGNW.js → chunk.CGRX6SDE.js} +1 -1
- package/dist/preview/chunk.CPK6CYKN.js +111 -0
- package/dist/preview/{chunk.AZRICZKT.js → chunk.CVN2XFMF.js} +1 -1
- package/dist/preview/chunk.D4F6QX5L.js +1 -0
- package/dist/preview/{chunk.JPAE6K4E.js → chunk.D6ODKMOV.js} +1 -1
- package/dist/preview/{chunk.CCCONK73.js → chunk.DDSAFU3B.js} +1 -1
- package/dist/preview/{chunk.AHYMIVBX.js → chunk.DG3YNOH3.js} +1 -1
- package/dist/preview/chunk.DGYWNM5U.js +1 -0
- package/dist/preview/{chunk.ML5EHDZG.js → chunk.DHO3QZYK.js} +1 -1
- package/dist/preview/{chunk.EL7XXGQY.js → chunk.DJGZOPAS.js} +1 -1
- package/dist/preview/chunk.DOJCYXIJ.js +1 -0
- package/dist/preview/{chunk.CKSRW3LA.js → chunk.DX7RGK5G.js} +1 -1
- package/dist/preview/{chunk.QK7EUIPL.js → chunk.EA2KYBBR.js} +1 -1
- package/dist/preview/chunk.EEGVI266.js +1 -0
- package/dist/preview/{chunk.I7OFRF6N.js → chunk.EHLV3LND.js} +2 -2
- package/dist/preview/{chunk.QEBD7SC4.js → chunk.EJC7ACZT.js} +4 -2
- package/dist/preview/{chunk.QRNKGPAD.js → chunk.EJIQDMLU.js} +1 -1
- package/dist/preview/chunk.EOSN5DWW.js +1 -0
- package/dist/preview/{chunk.4RPKCW4J.js → chunk.EPSYX2SF.js} +1 -1
- package/dist/preview/chunk.EUXAIG73.js +1 -0
- package/dist/preview/chunk.EZQK23AB.js +1 -0
- package/dist/preview/{chunk.KKFKSJUN.js → chunk.F5O3HR7X.js} +1 -1
- package/dist/preview/chunk.F6MY6WJ4.js +1 -0
- package/dist/preview/{chunk.GTF6EMVE.js → chunk.F7KVEWFH.js} +1 -1
- package/dist/preview/{chunk.EEUCRZA3.js → chunk.FIUPDGUZ.js} +1 -1
- package/dist/preview/chunk.FNSVGSZI.js +1 -0
- package/dist/preview/chunk.FOHZPYUV.js +1 -0
- package/dist/preview/chunk.FW6M6GIU.js +32 -0
- package/dist/preview/{chunk.VXPEXUQF.js → chunk.G5AF5IXL.js} +1 -1
- package/dist/preview/chunk.G767NLBH.js +1 -0
- package/dist/preview/chunk.GFBE4VNT.js +1 -0
- package/dist/preview/{chunk.CDSHUWSK.js → chunk.GFOZVQBQ.js} +1 -1
- package/dist/preview/chunk.GKYJQE5A.js +1 -0
- package/dist/preview/chunk.GOVRX2YX.js +4 -0
- package/dist/preview/{chunk.T3PELB6I.js → chunk.H33XWGAY.js} +1 -1
- package/dist/preview/{chunk.2AL26ZPJ.js → chunk.H4BPTMED.js} +1 -1
- package/dist/preview/chunk.HLKDYI6J.js +1 -0
- package/dist/preview/{chunk.VEQIH7HR.js → chunk.HPFEYMGP.js} +1 -1
- package/dist/preview/chunk.HT35PAHI.js +21 -0
- package/dist/preview/{chunk.VR553M6J.js → chunk.HXRHEPPJ.js} +1 -1
- package/dist/preview/chunk.IPKODEOZ.js +1 -0
- package/dist/preview/{chunk.EP7YT7LT.js → chunk.IXYG65TM.js} +1 -1
- package/dist/preview/chunk.IZDB777E.js +1 -0
- package/dist/preview/{chunk.VBBH5R5T.js → chunk.JAPTTM6Y.js} +1 -1
- package/dist/preview/chunk.JCKIJSW7.js +25 -0
- package/dist/preview/{chunk.4R7H3GIL.js → chunk.JLNTE5CH.js} +2 -2
- package/dist/preview/chunk.JNK5WBSU.js +1 -0
- package/dist/preview/chunk.JREA2XDG.js +1 -0
- package/dist/preview/{chunk.WV6SP6IJ.js → chunk.KBJ3UUER.js} +1 -1
- package/dist/preview/{chunk.VBHV4TLG.js → chunk.KHRS2SKB.js} +1 -1
- package/dist/preview/{chunk.ISZFRLNJ.js → chunk.KJPLX72N.js} +1 -1
- package/dist/preview/chunk.KZUHXOZU.js +21 -0
- package/dist/preview/{chunk.6ZFYFT5A.js → chunk.L3MLGFIS.js} +1 -1
- package/dist/preview/{chunk.KEGL6NBD.js → chunk.L6P55HFW.js} +1 -1
- package/dist/preview/{chunk.N7A3T5QU.js → chunk.LDWWUKKX.js} +1 -1
- package/dist/preview/{chunk.CA2SYEYE.js → chunk.LHCGC3K6.js} +1 -1
- package/dist/preview/{chunk.BQORHDAH.js → chunk.LNKY6MT4.js} +1 -1
- package/dist/preview/chunk.LQ5J6YQW.js +1 -0
- package/dist/preview/{chunk.47VEV4BX.js → chunk.MEAUTBVM.js} +1 -1
- package/dist/preview/chunk.MEBKTW7H.js +17 -0
- package/dist/preview/{chunk.WQ7K5O2I.js → chunk.MFMC35ET.js} +1 -1
- package/dist/preview/chunk.MJ4T6YXI.js +1 -0
- package/dist/preview/chunk.MKJV3BM5.js +240 -0
- package/dist/preview/chunk.ML4X7VVK.js +1 -0
- package/dist/preview/chunk.MM7MLBGB.js +1 -0
- package/dist/preview/{chunk.5MOXQUZH.js → chunk.MQNW3O67.js} +1 -1
- package/dist/preview/{chunk.J2N7EKMX.js → chunk.MT252WP4.js} +1 -1
- package/dist/preview/chunk.MWWNKM3I.js +1 -0
- package/dist/preview/chunk.N3MXLORL.js +3 -0
- package/dist/preview/chunk.NH3VXTGX.js +1 -0
- package/dist/preview/{chunk.B422DSYN.js → chunk.NI4OPHTL.js} +1 -1
- package/dist/preview/chunk.NNGG7RCO.js +1 -0
- package/dist/preview/{chunk.LKM2R5UF.js → chunk.NXHEOHRR.js} +1 -1
- package/dist/preview/{chunk.TQQDUJLX.js → chunk.O5RPSUXV.js} +1 -1
- package/dist/preview/{chunk.FE3SINPK.js → chunk.OKHXXIMN.js} +1 -1
- package/dist/preview/chunk.ONAH6MC4.js +1 -0
- package/dist/preview/chunk.OOQG2AEF.js +1 -0
- package/dist/preview/{chunk.ZQYHNFRZ.js → chunk.OPMGQS5J.js} +1 -1
- package/dist/preview/{chunk.UHJSZ2XZ.js → chunk.OUF2QFZL.js} +1 -1
- package/dist/preview/{chunk.CUEIGKFG.js → chunk.OVSKPBPS.js} +1 -1
- package/dist/preview/chunk.OYMN3IFX.js +1 -0
- package/dist/preview/{chunk.QNC2OKLF.js → chunk.P43LPXXJ.js} +1 -1
- package/dist/preview/chunk.PGT4ZQDG.js +4 -0
- package/dist/preview/{chunk.WFJCC6G3.js → chunk.PQTXM4VY.js} +1 -1
- package/dist/preview/{chunk.KHKCTVHD.js → chunk.Q6GEPVQ7.js} +1 -1
- package/dist/preview/chunk.QDDDKEBH.js +1 -0
- package/dist/preview/{chunk.26RYER7Y.js → chunk.QJJWAYHB.js} +1 -1
- package/dist/preview/chunk.QK4QZVQG.js +1 -0
- package/dist/preview/{chunk.CLIC2QBA.js → chunk.QKRQPUCE.js} +1 -1
- package/dist/preview/{chunk.DU76ASS4.js → chunk.QNWGDG2Z.js} +2 -2
- package/dist/preview/{chunk.447RWLS7.js → chunk.QVBP4UZG.js} +2 -2
- package/dist/preview/chunk.RDUGUC7R.js +1 -0
- package/dist/preview/{chunk.EK3JXEZL.js → chunk.RHIP2UYE.js} +1 -1
- package/dist/preview/chunk.RJ7VSWTA.js +87 -0
- package/dist/preview/{chunk.JHAMSDAI.js → chunk.RO3D2RNP.js} +1 -1
- package/dist/preview/{chunk.C6CT6F4C.js → chunk.S2BMI23H.js} +1 -1
- package/dist/preview/{chunk.ZRBGYXAO.js → chunk.SGYZM6ZU.js} +1 -1
- package/dist/preview/{chunk.UPOYRCKI.js → chunk.SPJ34VHA.js} +1 -1
- package/dist/preview/{chunk.UAEOCWSG.js → chunk.T6KOL7TW.js} +1 -1
- package/dist/preview/{chunk.AUNQNTKY.js → chunk.T6UJEXFL.js} +3 -2
- package/dist/preview/chunk.TBEKEHFS.js +1 -0
- package/dist/preview/chunk.TO3ZKCA2.js +1 -0
- package/dist/preview/{chunk.FIY4RUK5.js → chunk.TQ3MNB6K.js} +1 -1
- package/dist/preview/{chunk.GG47EIKO.js → chunk.TRP66PHK.js} +1 -1
- package/dist/preview/{chunk.LGNGFG5V.js → chunk.TSZ2S3VG.js} +1 -1
- package/dist/preview/chunk.TTM5GQ2U.js +1 -0
- package/dist/preview/chunk.TUBY6SV3.js +1 -0
- package/dist/preview/{chunk.ZE5RSKXF.js → chunk.U5KJQFAP.js} +1 -1
- package/dist/preview/chunk.U6V4KZF5.js +1 -0
- package/dist/preview/chunk.UJ7RTNT4.js +1 -0
- package/dist/preview/{chunk.HCX6KPRF.js → chunk.UQZ2P6KD.js} +1 -1
- package/dist/preview/{chunk.CLZYNFFH.js → chunk.UZKBFI52.js} +1 -1
- package/dist/preview/{chunk.66TRDXYR.js → chunk.V5JB5UJS.js} +2 -2
- package/dist/preview/{chunk.3TKIZGC7.js → chunk.VDFQFLTU.js} +1 -1
- package/dist/preview/{chunk.IY3DV52G.js → chunk.VGYG2IBZ.js} +1 -1
- package/dist/preview/chunk.VICBF3MQ.js +2 -0
- package/dist/preview/{chunk.EQZPEOIW.js → chunk.VL3YDD7D.js} +1 -1
- package/dist/preview/{chunk.IYHY4VEC.js → chunk.VPFUOTY7.js} +1 -1
- package/dist/preview/chunk.VUDNQOOX.js +1 -0
- package/dist/preview/{chunk.P26ATAAI.js → chunk.VVIQSFM4.js} +1 -1
- package/dist/preview/{chunk.DO3FQM6R.js → chunk.W332P5T3.js} +6 -6
- package/dist/preview/{chunk.POKGLN4T.js → chunk.W3TJF4EH.js} +1 -1
- package/dist/preview/{chunk.D5JZQZ74.js → chunk.W5O5F4FT.js} +1 -1
- package/dist/preview/chunk.W6L2VAJG.js +2 -0
- package/dist/preview/{chunk.O7NYSO6F.js → chunk.WGH2P2YL.js} +1 -1
- package/dist/preview/{chunk.OD5QZHRC.js → chunk.WS5ORRGS.js} +1 -1
- package/dist/preview/{chunk.VQDL4EEP.js → chunk.WU6D3SPL.js} +1 -1
- package/dist/preview/{chunk.MV27WMNW.js → chunk.X2UYEA7H.js} +1 -1
- package/dist/preview/chunk.X45EITTK.js +18 -0
- package/dist/preview/{chunk.TAJBXG5U.js → chunk.X7U3JMBR.js} +1 -1
- package/dist/preview/chunk.XSM4OTF4.js +1 -0
- package/dist/preview/{chunk.DRAPVGQZ.js → chunk.XTHSPLZZ.js} +1 -1
- package/dist/preview/{chunk.VQOYFBEV.js → chunk.Y5WQD6KV.js} +1 -1
- package/dist/preview/chunk.YXVUJ3NB.js +1 -0
- package/dist/preview/{chunk.NRECR3NQ.js → chunk.Z22C2JJ4.js} +1 -1
- package/dist/preview/{chunk.TQRC5VAM.js → chunk.Z2BCOZDZ.js} +1 -1
- package/dist/preview/{chunk.S2NQRD6W.js → chunk.Z3TK2LJM.js} +1 -1
- package/dist/preview/chunk.ZGLOXN7O.js +1 -0
- package/dist/preview/{chunk.R7POSVUK.js → chunk.ZLQIGZXO.js} +2 -2
- package/dist/preview/{chunk.YJ4PFOPC.js → chunk.ZONRIOIA.js} +1 -1
- package/dist/preview/{chunk.QVCKTDG3.js → chunk.ZY3NAJDM.js} +1 -1
- package/dist/preview/index.html +55 -55
- package/dist/preview/page.js +2 -2
- package/package.json +7 -7
- package/dist/preview/chunk.2WFOKJB4.js +0 -1
- package/dist/preview/chunk.32SHA3EY.js +0 -1
- package/dist/preview/chunk.3D37E2G5.js +0 -1
- package/dist/preview/chunk.3PT3BU6K.js +0 -1
- package/dist/preview/chunk.3XTIYX6M.js +0 -1
- package/dist/preview/chunk.4O7WYLCK.js +0 -1
- package/dist/preview/chunk.5DU6FA5R.js +0 -1
- package/dist/preview/chunk.5TWRTGP6.js +0 -1
- package/dist/preview/chunk.6BR2SUAE.js +0 -1
- package/dist/preview/chunk.6TDVNWFU.js +0 -17
- package/dist/preview/chunk.6XBQDXT6.js +0 -3
- package/dist/preview/chunk.7L3I776Z.js +0 -1
- package/dist/preview/chunk.7OLKVOS6.js +0 -1
- package/dist/preview/chunk.AG7WJYM5.js +0 -3
- package/dist/preview/chunk.AMAOZVEO.js +0 -1
- package/dist/preview/chunk.AMV2ILR6.js +0 -1
- package/dist/preview/chunk.B5EFNTDA.js +0 -1
- package/dist/preview/chunk.BBLIT7S7.js +0 -1
- package/dist/preview/chunk.BSQI3KM2.js +0 -1
- package/dist/preview/chunk.CYEPHT7V.js +0 -1
- package/dist/preview/chunk.D3SWJ7OS.js +0 -1
- package/dist/preview/chunk.DHPXRDT5.js +0 -5
- package/dist/preview/chunk.DKUEZPGR.js +0 -1
- package/dist/preview/chunk.FWXW4T4I.js +0 -25
- package/dist/preview/chunk.GF5CZPZ7.js +0 -1
- package/dist/preview/chunk.GPBHUIZQ.js +0 -2
- package/dist/preview/chunk.GVFGS2HY.js +0 -1
- package/dist/preview/chunk.HGH27XZG.js +0 -23
- package/dist/preview/chunk.HMJXB6KC.js +0 -5
- package/dist/preview/chunk.HTEQCRVP.js +0 -1
- package/dist/preview/chunk.I7KN732Z.js +0 -2
- package/dist/preview/chunk.IAVIYJTL.js +0 -1
- package/dist/preview/chunk.IPKESOIU.js +0 -21
- package/dist/preview/chunk.IRNEWNUB.js +0 -1
- package/dist/preview/chunk.J7O23NKZ.js +0 -22
- package/dist/preview/chunk.JDUA5PH2.js +0 -1
- package/dist/preview/chunk.JN3WZGJY.js +0 -1
- package/dist/preview/chunk.JQEXH23N.js +0 -1
- package/dist/preview/chunk.KVQYOFDV.js +0 -1
- package/dist/preview/chunk.LAVLPYSC.js +0 -1
- package/dist/preview/chunk.MATUPDZ3.js +0 -1
- package/dist/preview/chunk.MD3N26BC.js +0 -23
- package/dist/preview/chunk.MHHNO3O2.js +0 -1
- package/dist/preview/chunk.MUWI54IP.js +0 -1
- package/dist/preview/chunk.NLZHNPDU.js +0 -93
- package/dist/preview/chunk.NSAGOOJW.js +0 -1
- package/dist/preview/chunk.NYLKG25K.js +0 -4
- package/dist/preview/chunk.OWO3OV62.js +0 -1
- package/dist/preview/chunk.ROYCJXPE.js +0 -1
- package/dist/preview/chunk.RZ73YG5K.js +0 -1
- package/dist/preview/chunk.SAWASNDO.js +0 -1
- package/dist/preview/chunk.SCVKHGO3.js +0 -1
- package/dist/preview/chunk.SM37MNS2.js +0 -1
- package/dist/preview/chunk.T2BZBR7S.js +0 -50
- package/dist/preview/chunk.TLPCYKLW.js +0 -3
- package/dist/preview/chunk.U563J5IM.js +0 -1
- package/dist/preview/chunk.U6QXLNHF.js +0 -15
- package/dist/preview/chunk.VBYJBW32.js +0 -1
- package/dist/preview/chunk.VHLL6VC6.js +0 -1
- package/dist/preview/chunk.W3WXI5B3.js +0 -1
- package/dist/preview/chunk.W43XWQRC.js +0 -1
- package/dist/preview/chunk.WJHLE73Y.js +0 -111
- package/dist/preview/chunk.ZT3ZG52B.js +0 -1
- package/dist/preview/chunk.ZU3RPI34.js +0 -1
|
@@ -1,22 +0,0 @@
|
|
|
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)}};import{c as st}from"./chunk.KHKCTVHD.js";import{a as Ye}from"./chunk.CEQQIW7Z.js";import{a as B,b as He,c as G,d as q,e as ae,g as me,h as Se,i as Fe,j as X}from"./chunk.TQRC5VAM.js";import"./chunk.O7NYSO6F.js";import{a as Ke,b as Je,c as Xe,d as Qe}from"./chunk.32SHA3EY.js";import{h as Be}from"./chunk.GG47EIKO.js";import{a as Me,b as Le}from"./chunk.NYLKG25K.js";import{h as J,i as et,k as tt}from"./chunk.CLZYNFFH.js";import{e as Ze}from"./chunk.WQ7K5O2I.js";import{b as ye,c as We,f as Ge,g as qe}from"./chunk.ZT3ZG52B.js";import{d as ze}from"./chunk.QDVGHI7R.js";import{f as _e,g as Ve}from"./chunk.ROYCJXPE.js";import{a as ie,c as ne,d as he,e as Ue,h as le,j as ge}from"./chunk.M5FP4Y4Q.js";import{d as rt,k as nt}from"./chunk.RSMCTI2N.js";import"./chunk.WFJCC6G3.js";import{a as xe,b as je,c as De}from"./chunk.IO5VFTXC.js";import"./chunk.HCX6KPRF.js";import"./chunk.J2N7EKMX.js";import{Mb as pe,Pb as fe,Qd as Pe,la as Ie,me as Ce,ne as Re}from"./chunk.DHPXRDT5.js";import"./chunk.FQLNBIQ5.js";import"./chunk.AJZBJBMO.js";var It="http://www.w3.org/1999/xhtml",se=class{constructor(t){this.ownerDocument=t}parentNode=null;childNodes=[];get firstChild(){return this.childNodes[0]??null}get parentElement(){return this.parentNode instanceof F?this.parentNode:null}get textContent(){return this.childNodes.map(t=>t.textContent).join("")}insertBefore(t,n){t.parentNode&&t.parentNode.removeChild(t);let s=n?this.childNodes.indexOf(n):-1;return s<0?this.childNodes.push(t):this.childNodes.splice(s,0,t),t.parentNode=this,t}appendChild(t){return this.insertBefore(t,null)}removeChild(t){let n=this.childNodes.indexOf(t);return n>=0&&this.childNodes.splice(n,1),t.parentNode=null,t}},Q=class extends se{constructor(n,s){super(n);this.data=s}nodeType=3;get textContent(){return this.data}},$e=class extends se{nodeType=8;get textContent(){return""}},F=class extends se{constructor(n,s,a){super(n);this.namespaceURI=s;this.localName=a}nodeType=1;attributes=new Map;value="";checked=!1;selected=!1;setAttribute(n,s){this.attributes.set(n,String(s))}removeAttribute(n){this.attributes.delete(n)}getAttribute(n){return this.attributes.get(n)??null}hasAttribute(n){return this.attributes.has(n)}closest(n){for(let s=this;s;s=s.parentElement)if(s.localName===n)return s;return null}},Ae=class extends se{nodeType=9;constructor(){super(null)}createElementNS(t,n){return new F(this,t,n)}createElement(t){return new F(this,It,t)}createTextNode(t){return new Q(this,t)}createComment(t){return new $e(this)}};function ot(){let e=new Ae,t=e.createElement("div");return t.setAttribute("data-graview-view-root",""),e.appendChild(t),{document:e,root:t}}var de=function*(e){for(let t of e.childNodes)t instanceof F&&(yield t,yield*de(t))},be=(e,t,n)=>{for(let s=e;s&&s!==t;s=s.parentElement)if(n(s))return s},at=e=>{let t=["id","class","data-record","data-place","data-act","role","name"].flatMap(n=>e.getAttribute(n)===null?[]:[` ${n}="${e.getAttribute(n).slice(0,80)}"`]);return`<${e.localName}${t.join("")}>`},it=e=>e.childNodes.map(t=>t instanceof F?it(t):t.nodeType===3?t.textContent:"").join("");function Te(e,t,n){let s=n.typed??{},a=[],l=[...de(e)].filter(u=>u.getAttribute("data-act")!==null).map(u=>u.getAttribute("data-act"));for(let u of de(e)){let i=u.getAttribute("name");if(!i||!["input","select","textarea"].includes(u.localName))continue;let f=(u.getAttribute("type")??"text").toLowerCase(),m=Object.hasOwn(s,i);if(f==="radio"){let b=u.getAttribute("value")??"on";if(m?String(s[i])!==b:!u.checked)continue;a.push({name:i,value:b,typed:m,empty:!1,chosen:!0})}else if(u.localName==="select"){let b=[...de(u)].filter(T=>T.localName==="option"),o=b.find(T=>T.selected||T.getAttribute("selected")!==null)??b[0],N=m?String(s[i]):o?o.getAttribute("value")??it(o).trim():"";a.push({name:i,value:N,typed:m,empty:N===""&&!m,chosen:!0})}else if(f==="checkbox"){let b=m?s[i]===!0||s[i]==="true"||s[i]==="on":u.checked;a.push({name:i,value:b,typed:m,empty:!b&&!m})}else{let b=be(u,e,k=>k.getAttribute("data-record")!==null)?.getAttribute("data-record")??t,o=u.value===""&&u.getAttribute("data-prefill")===i&&b?tt(n.store,n.principal,n.manifest,n.shown,{record:b,field:i,acts:l}):void 0,N=o!==void 0?{record:b,field:i,value:o}:void 0,T=m?s[i]:o??u.value,y=(f==="number"||f==="range")&&T!==""&&Number.isFinite(Number(T))?Number(T):typeof T=="boolean"?String(T):T;a.push({name:i,value:y,typed:m||N!==void 0,empty:y===""&&!m&&!N,...N?{from:N}:{}})}}return a}function lt(e,t,n,s){let a=n.asked.slice(e.asked),l=n.went.slice(e.went),u=n.renders.length>e.renders,i=e.target!==void 0?t.elementOf(e.target):void 0,f=[...a.map(y=>`its code asked for "${y.name}"`),...l.map(y=>`its code asked to go to "${"record"in y?y.record:y.place}"`),...u?["it drew again"]:[]],m=f.length>0?` When the view heard the click, ${f.join(", ")}.`:"";if(!i)return{selector:e.selector,asked:a,went:l,redrew:u,says:`"${e.selector}" matches nothing the view drew: there is nothing there to press.`};let b=t.root,o={},N=[],T=ge(i,b,y=>le(y,[...de(y)].some(ie)));if(T){let y=T.getAttribute("data-filter"),k=T.getAttribute("data-section"),v=T.getAttribute("data-record"),$={...y?{where:me(y)}:{},...k?{section:k}:{}},c=v?{record:v,...$}:{place:T.getAttribute("data-place")??"",...$},h=X(c,{sees:r=>s.shown.has(r),places:s.places,lists:s.lists,schema:s.store.schema});if(h.ok){o.opens=h.arrival;let r=h.arrival,d="filter"in r&&r.filter?`, narrowed to ${r.filter}`:"";N.push(`It opens ${"record"in r?`the record "${r.record}"`:"place"in r?`the place "${r.place}"`:`the list of ${r.list}`}${d}${r.section?`, at "${r.section}"`:""}.`)}else{let r="place"in c?c.place:c.record,d=!("record"in c&&s.shown.has(c.record))&&!B(s.places,r)&&!s.lists.some(g=>g.slug===r||g.kind===r);o.lost=s.placesUnsure&&d?`${h.says}${q}`:h.says,N.push(`It lands in a link that goes nowhere: ${o.lost}`)}}let p=be(i,b,y=>y.getAttribute("data-act")!==null);if(p){let y=p.getAttribute("data-act"),k=ne(p);if(k)N.push(`It is bound to "${y}", and is never pressed: ${k}`);else if(he(p)){let v=be(p,b,d=>d.getAttribute("data-record")!==null)?.getAttribute("data-record")??void 0,$=be(p,b,d=>d.localName==="fieldset"||d.getAttribute("role")==="group")??b,c={as:y,...v!==void 0?{record:v}:{},fields:Te($,v,s)},h=J(s.store,s.manifest,s.shown,c);if(!h.ok)o.act={as:y,ok:!1,reason:h.reason,message:h.message};else try{let d=s.store.previewAll([{name:h.name,args:h.args}],{author:s.principal,via:`view:${s.manifest.name}`});o.act={as:y,ok:!0,name:h.name,args:h.args,intent:d.intent,changes:d.ops.length>0}}catch(d){o.act=d instanceof pe?{as:y,ok:!1,reason:"refused",message:d.refusal.message}:d instanceof fe?{as:y,ok:!1,reason:"failed",message:_e(d)}:{as:y,ok:!1,reason:"failed",message:"The act could not be applied."}}let r=o.act;N.push(r.ok?`It asks for "${r.name}" with ${JSON.stringify(r.args)}: ${r.changes?`\u201C${r.intent}\u201D, applied for this seat, were it pressed.`:"applied for this seat, it would change nothing."}`:`It asks for "${y}", which the host refuses (${r.reason}): ${r.message}`)}}return N.length===0&&N.push(`It is bound to no act and lands in no link: the host does nothing there${f.length>0?"":", and the view's code does nothing either"}.`),{selector:e.selector,element:at(i),...o,asked:a,went:l,redrew:u,says:`A press on ${at(i)}: ${N.join(" ")}${m}`}}var ce=function*(e){for(let t of e.childNodes)t instanceof F&&(yield t,yield*ce(t))},we=(e,t,n)=>{for(let s=e;s&&s!==t;s=s.parentElement)if(n(s))return s},pt=e=>e.childNodes.map(t=>t instanceof F?t.getAttribute("aria-hidden")==="true"?"":pt(t):t.nodeType===3?t.textContent:"").join(""),ft=e=>{let t=["id","class","data-record","data-place","data-act","data-file","href","role","name"].flatMap(n=>e.getAttribute(n)===null?[]:[` ${n}="${e.getAttribute(n).slice(0,80)}"`]);return`<${e.localName}${t.join("")}>`},P=e=>{let t=(e.getAttribute("aria-label")??pt(e)).replace(/\s+/g," ").trim()||e.getAttribute("title")||e.getAttribute("name")||"";return t?`\u201C${t.length>60?`${t.slice(0,59)}\u2026`:t}\u201D`:ft(e)},dt={number:"1",range:"1",date:"2026-01-15","datetime-local":"2026-01-15T09:00",time:"09:00",month:"2026-01",week:"2026-W03",email:"someone@example.com",url:"https://example.com",tel:"+1 555 0100",text:"A test",search:"A test",textarea:"A test"},ct=e=>e.localName==="textarea"?dt.textarea:dt[(e.getAttribute("type")??"text").toLowerCase()],ut=new Set(["input","textarea","select"]),Pt=e=>e.localName==="button"&&e.namespaceURI==="http://www.w3.org/1999/xhtml"||Ue(e)||["link","menuitem","menuitemcheckbox","menuitemradio","option"].includes(e.getAttribute("role")??"")||e.localName==="a"&&!e.hasAttribute("href")&&!e.hasAttribute("data-record")&&!e.hasAttribute("data-place")&&!e.hasAttribute("data-file"),Ct=e=>e.localName==="summary"||e.hasAttribute("data-lightbox")||e.hasAttribute("data-drop")||e.localName==="graview-video";async function mt(e){let{drawn:t,store:n,principal:s,manifest:a}=e,l=t.root,u=[...ce(l)],i=new Set(e.clicks),f=r=>we(r,l,d=>i.has(t.idOf(d)??""))!==void 0,m=new Set(u.flatMap(r=>r.getAttribute("id")?[r.getAttribute("id")]:[])),b=[],o=(r,d,g,w)=>b.push({control:P(r),element:ft(r),does:d,ok:g,says:w}),N=`view:${a.name}`,T=(r,d)=>{try{return{ok:!0,intent:n.previewAll([{name:r,args:d}],{author:s,via:N}).intent}}catch(g){return g instanceof pe?{ok:!1,message:`this seat may not: ${g.refusal.message}`,missing:!1}:g instanceof fe?{ok:!1,message:Ve(g),missing:g.issues.some(w=>/required|received undefined/i.test(w.message))}:{ok:!1,message:`the act threw: ${g instanceof Error?g.message.slice(0,200):String(g)}`,missing:!1}}},p=(r,d)=>{let g=we(r,l,O=>O.getAttribute("data-record")!==null)?.getAttribute("data-record")??void 0,w=we(r,l,O=>O.localName==="fieldset"||O.getAttribute("role")==="group")??l;return{as:r.getAttribute("data-act"),...g!==void 0?{record:g}:{},fields:Te(w,g,{store:n,principal:s,manifest:a,shown:e.shown,places:e.places,lists:e.lists,typed:d})}},y=(r,d)=>{let g=p(r,d),w=J(n,a,e.shown,g);if(!w.ok)return{ok:!1,message:w.message,missing:!1,press:g};let O=T(w.name,w.args);return O.ok?{ok:!0,intent:O.intent,args:w.args,press:g}:{...O,press:g}},k=(r,d)=>{let g=P(r),w=r.getAttribute("data-act"),O=we(r,l,x=>x.localName==="fieldset"||x.getAttribute("role")==="group")??l,Y=[...ce(O)].filter(x=>ut.has(x.localName)&&x.getAttribute("name")),E=y(r,{}),K=!1,H=Y.filter(x=>x.value===""&&!E.press.fields.find(M=>M.name===x.getAttribute("name"))?.from&&ct(x)!==void 0),A=Object.fromEntries(H.map(x=>[x.getAttribute("name"),ct(x)]));if(H.length>0){let x=y(r,A);x.ok?[E,K]=[x,!E.ok]:(E.ok||E.missing)&&(E=x)}if(!E.ok)return o(r,d,!1,`${g} is refused: ${E.message.replace(/\.$/,"")}.`);let D=n.allMutations().find(x=>x.name===J(n,a,e.shown,E.press).name)?.input?.shape??{},V=E.press.fields.filter(x=>x.from&&Object.hasOwn(D,x.name)&&et(D[x.name],void 0)).map(x=>x.name);if(V.length>0){let x={...K?A:{},...Object.fromEntries(V.map(j=>[j,""]))},M=y(r,x);if(!M.ok)return o(r,d,!1,`${g} is refused when ${V.map(j=>`\u201C${j}\u201D`).join(" and ")} ${V.length===1?"is":"are"} emptied: ${M.message.replace(/\.$/,"")}.`)}return o(r,d,!0,`${g} asks for \u201C${w}\u201D${K?" once its fields are filled":""}${E.intent?`: \u201C${E.intent}\u201D`:", which changes nothing as it is drawn"}.`)},v=0,$=e.maxRuns??24;for(let r of u){if(Ct(r))continue;if(r.hasAttribute("data-act")){let A=ne(r);if(ut.has(r.localName)&&r.hasAttribute("data-save")){let I=r.getAttribute("data-save");I!=="input"&&I!=="change"?o(r,"save",!1,`${P(r)} saves nothing: data-save is "input" or "change", not "${I}".`):k(r,"save")}else A?o(r,"act",!1,`${P(r)} is bound to \u201C${r.getAttribute("data-act")}\u201D and is never pressed: ${A}`):he(r)&&k(r,"act");continue}if(r.localName==="a"&&(r.getAttribute("href")??"").startsWith("#")){let A=r.getAttribute("href").slice(1);o(r,"jump",m.has(A),m.has(A)?`${P(r)} jumps to #${A}.`:`${P(r)} jumps to #${A}, and the view drew no element with that id.`);continue}if(r.hasAttribute("data-file")){let A=r.getAttribute("data-file")??"",I=r.getAttribute("data-field")??"",D=e.shown.has(A)?n.seenBy(s).graph.getNode(A):void 0,V=D&&I?ze(D[I]):[],x=Number(r.getAttribute("data-index")??"0"),M=V[Number.isInteger(x)&&x>=0?x:0];r.localName!=="a"?o(r,"file",!1,`${P(r)} is a file link on a <${r.localName}>: a file link is an <a data-file>.`):D?M?o(r,"file",!0,`${P(r)} ${r.hasAttribute("data-download")?"downloads":"opens"} \u201C${M.name??"the file"}\u201D.`):o(r,"file",!1,`${P(r)} links to the file in "${I||"(no data-field)"}" of "${A}", which holds none.`):o(r,"file",!1,`${P(r)} links to a file of "${A}", which is no record this view was shown.`);continue}if(le(r,[...ce(r)].some(ie))){let A=r.getAttribute("data-filter"),I=r.getAttribute("data-section"),D=r.getAttribute("data-record"),V={...A?{where:me(A)}:{},...I?{section:I}:{}},x=D?{record:D,...V}:{place:r.getAttribute("data-place")??"",...V},M=X(x,{sees:j=>e.shown.has(j),places:e.places,lists:e.lists,schema:n.schema});if(M.ok){let j=M.arrival;o(r,"link",!0,`${P(r)} opens ${"record"in j?`the record "${j.record}"`:"place"in j?`the place "${j.place}"`:`the list of ${j.list}`}.`)}else{let j="place"in x?x.place:x.record,oe="place"in x&&!B(e.places,j)&&!e.lists.some(re=>re.slug===j||re.kind===j);e.placesUnsure&&oe?o(r,"link",!0,`${P(r)} may go nowhere: ${M.says}${q}`):o(r,"link",!1,`${P(r)} goes nowhere: ${M.says}`)}continue}let d=t.idOf(r),g=i.has(d??"");if(!Pt(r)&&!g||!g&&ge(r,l,A=>le(A,[...ce(A)].some(ie))))continue;if(!f(r)){o(r,"nothing",!1,`${P(r)} does nothing: it is bound to no act (data-act), goes nowhere (data-record, data-place), and the view hears no click on it.`);continue}if(d===void 0)continue;if(v>=$){o(r,"code",!0,`${P(r)} was not pressed: the check presses ${$} controls the view's code hears, and this is past them.`);continue}v+=1;let w=await e.rerun(d);if(!w.ok){o(r,"code",!1,w.reason==="error"?`${P(r)} throws when pressed: ${w.detail.replace(/^It threw: /,"")}`:`${P(r)}, pressed, stopped the view (${w.reason}): ${w.detail}`);continue}let O=w.transcript.pressed;if(!O||O.target===void 0){o(r,"code",!1,`${P(r)} could not be pressed in a run of its own: it was not drawn there the same way.`);continue}let Y=w.transcript.asked.slice(O.asked),E=w.transcript.went.slice(O.went),K=w.transcript.renders.length>O.renders,H=[];for(let A of Y){let I=Ze(n,a,A.name,A.args??{},{shown:e.shown,file:()=>{},dropped:()=>{}});if(!I.ok)H.push(`it asks for \u201C${A.name}\u201D from its code, which is refused: ${I.message}${I.reason==="press-only"?` Bind the button to it instead: data-act="${A.name}".`:""}`);else{let D=T(I.name,I.args);D.ok||H.push(`it asks for \u201C${A.name}\u201D, which is refused: ${D.message}`)}}for(let A of E){let I=X(A,{sees:D=>e.shown.has(D),places:e.places,lists:e.lists,schema:n.schema});I.ok||H.push(`it asks to go nowhere: ${I.says}`)}H.length>0?o(r,"code",!1,`${P(r)}, pressed: ${H.join("; ")}`):Y.length===0&&E.length===0&&!K?o(r,"code",!1,`${P(r)} does nothing when pressed: the view hears the click, and asks for no act, goes nowhere and draws nothing new.`):o(r,"code",!0,`${P(r)}, pressed, ${[...Y.length>0?[`asks for ${Y.map(A=>`\u201C${A.name}\u201D`).join(", ")}`]:[],...E.length>0?["goes where it says"]:[],...K?["draws again"]:[]].join(" and ")}.`)}let c=b.filter(r=>!r.ok),h=[`Presses: ${b.length} control${b.length===1?"":"s"} pressed, ${c.length===0?"every one does what it says":`${c.length} ${c.length===1?"fails":"fail"}`}.`];for(let r of b)h.push(` ${r.ok?"ok ":"FAILS"} ${r.says}`);return{ok:c.length===0,controls:b,problems:c,text:`${h.join(`
|
|
2
|
-
`)}
|
|
3
|
-
`}}var Rt=e=>`
|
|
4
|
-
;(function () {
|
|
5
|
-
var post = self.postMessage.bind(self);
|
|
6
|
-
self.addEventListener("message", function (event) {
|
|
7
|
-
var run = self[${JSON.stringify(e)}];
|
|
8
|
-
if (typeof run !== "function") return post({ ok: false, error: "The view's run did not start." });
|
|
9
|
-
Promise.resolve(run(event.data)).then(
|
|
10
|
-
function (text) { post(typeof text === "string" ? { ok: true, text: text } : { ok: false, error: "The view's run did not finish." }); },
|
|
11
|
-
function (error) { post({ ok: false, error: String(error && error.message ? error.message : error).slice(0, 500) }); }
|
|
12
|
-
);
|
|
13
|
-
});
|
|
14
|
-
})();
|
|
15
|
-
`;function ht(){return e=>new Promise((t,n)=>{let s=URL.createObjectURL(new Blob([Rt(e.entry),e.script],{type:"text/javascript"})),a;try{a=new Worker(s)}catch(f){URL.revokeObjectURL(s),n(Object.assign(new Error(f instanceof Error?f.message:"The isolate could not start."),{reason:"isolate"}));return}let l=!1,u=f=>{l||(l=!0,clearTimeout(i),a.terminate(),URL.revokeObjectURL(s),f())},i=setTimeout(()=>u(()=>n(Object.assign(new Error("It ran past its deadline."),{reason:"slow"}))),e.timeoutMs+500);a.onmessage=f=>{let m=f.data;m.ok&&typeof m.text=="string"?u(()=>t(m.text)):u(()=>n(Object.assign(new Error(m.error??"The isolate could not run it."),{reason:"isolate"})))},a.onerror=f=>u(()=>n(Object.assign(new Error(f.message||"The isolate could not run it."),{reason:"isolate"}))),a.postMessage(e.input)})}var jt=new Set(["video/mp4","video/webm","video/ogg"]);function Dt(e,t){let n=e.poster===!0||typeof e.poster=="string"&&e.poster.length>0,s=jt.has(e.type.toLowerCase()),a=!s&&!n?`its source is ${e.type}, which not every browser plays, and it has no poster`:s?n?void 0:"it has no poster, so nothing stands before it plays or where a person asked for less motion":`its source is ${e.type}, which not every browser plays`;return{record:t.record,field:t.field,text:typeof e.caption=="string"&&e.caption.trim()?e.caption.trim():e.name,name:e.name,source:e.type,...typeof e.duration=="number"?{duration:e.duration}:{},poster:n,autoplay:t.autoplay,cover:t.cover,playable:s&&n,...a?{why:a}:{}}}var Ee={h1:1,h2:2,h3:3,h4:4,h5:5,h6:6},gt=new Set(["a","abbr","b","bdi","bdo","br","cite","code","data","del","dfn","em","i","ins","kbd","q","s","samp","small","span","strong","sub","sup","time","u","var","wbr","label"]),yt=new Set(["style","template","datalist","option"]),C=e=>e.replace(/\s+/g," ").trim();function Mt(e){let t=e.duration===void 0?0:Math.round(e.duration);if(t<1)return"a video";if(t<60)return`a ${t}-second video`;let n=Math.round(t/60);return n<60?`a ${n}-minute video`:`a ${Math.floor(n/60)}-hour${n%60>0?` ${n%60}-minute`:""} video`}var _=e=>e instanceof F,ue=e=>e.hasAttribute("hidden")||e.getAttribute("aria-hidden")==="true";function R(e){return e instanceof Q?e.data:!_(e)||ue(e)||yt.has(e.localName)?"":e.localName==="br"?" ":e.localName==="img"?e.getAttribute("alt")??"":e.childNodes.map(R).join(e.localName==="td"||e.localName==="th"?" ":"")}var Lt=/(\s+[·•|—–-]\s+)/;function Ht(e,t){if(!t||!e.includes(t))return e;let n=l=>l.length>0&&l.split(" ").length<=3,s=C(e).split(Lt),a=[];for(let l=0;l<s.length;l+=2){let u=s[l],i=u.startsWith(`${t} `)?u.slice(t.length+1):void 0,f=u.endsWith(` ${t}`)?u.slice(0,-t.length-1):void 0,m=u===t?"":i!==void 0&&n(i)?i:f!==void 0&&n(f)?f:u;m&&a.push(...a.length>0?[s[l-1]]:[],m)}return a.join("")}function bt(e,t,n){let s=[];for(let a of e){if(a.t==="list"&&a.groups.every(l=>l.items.every(u=>u.id===t&&u.title===n))){s.push(...bt(a.groups.flatMap(l=>l.items.flatMap(u=>u.parts)),t,n));continue}if(a.t==="text"){let l=Ht(a.text,n);l&&s.push(l===a.text?a:{...a,text:l});continue}s.push(a)}return s}function*ee(e){for(let t of e.childNodes)_(t)&&(yield t,yield*ee(t))}function Ut(e){let t=e.getAttribute("data-save"),n=e.getAttribute("data-debounce");if(t===null&&n===null)return[];let s=`drawing <${e.localName}${t!==null?` data-save="${t}"`:` data-debounce="${n}"`}>`,a=[];if(t===null)return[{at:s,says:'data-debounce is read only on a field that saves as it is typed (data-save="input").'}];if(!["input","textarea","select"].includes(e.localName))a.push({at:s,says:"Only a field saves as it is typed: an input, a textarea or a select. A button is pressed (data-act alone)."});else if(t!=="input"&&t!=="change")a.push({at:s,says:`data-save is "input" (saved as the person types, once they pause, and when they leave it) or "change" (saved when they leave it or pick), not "${t}".`});else if(e.getAttribute("data-act")===null)a.push({at:s,says:'It saves through no act: a field saved as it is typed names its act itself, data-act="\u2026", one in the manifest.'});else if(!e.getAttribute("name"))a.push({at:s,says:"It has no name: the host sends a field as the act's argument its name says."});else{let l=!1,u=!1;for(let i=e;i;i=i.parentElement)i.getAttribute("data-record")!==null&&(u=!0),i!==e&&(i.localName==="fieldset"||i.getAttribute("role")==="group")&&(l=!0);(!l||!u)&&a.push({at:s,says:'It is in no fieldset bound to a record: the host saves a field inside <fieldset data-record="\u2026">, with the fields beside it, to the record the fieldset names.'})}return n!==null&&t!=="input"?a.push({at:s,says:'data-debounce is read only with data-save="input": a "change" saves at once.'}):n!==null&&!(n.trim()!==""&&Number.isFinite(Number(n))&&Number(n)>=250&&Number(n)<=1e4)&&a.push({at:s,says:`data-debounce is how long the host waits for the person to pause, in milliseconds from 250 to 10 000, not "${n}"; left out, it waits 1 000.`}),a}function Ft(e,t,n){let s=e.getAttribute("data-drop");if(s===null)return[];let a=`drawing <${e.localName} data-drop="${s}">`,l=[],u=(t.accepts??[]).filter(m=>m.kind===s),i=e.getAttribute("data-drop-field");u.length===0?l.push({at:a,says:`The view's accepts names no field of "${s}", so the host offers no drop target here: say the field files go in, accepts: [{ "kind": "${s}", "field": "<its image, video or file field>" }].`}):i!==null&&!u.some(m=>m.field===i)&&l.push({at:a,says:`data-drop-field names "${i}", which the view's accepts does not name for "${s}" (${u.map(m=>`"${m.field}"`).join(", ")}): the host offers no drop target here.`});let f=e.getAttribute("data-drop-connect");if(f!==null){let m=f.indexOf(":"),b=m>0?f.slice(m+1):"";m<=0||b===""||n.has(f)?l.push({at:a,says:`data-drop-connect is "<relation>:<record id>" \u2014 "takenOn:day:saturday" \u2014 not "${f}"${n.has(f)?", which names a record and no relation":""}.`}):n.has(b)||l.push({at:a,says:`data-drop-connect names "${b}", which this seat was not shown: the host offers no drop target here.`})}return l}function wt(e,t){let n=[],s=new Set,a=new Set,l=[],u=new Map;for(let p of[...t.props.node?[t.props.node]:[],...t.props.nodes??[]])u.set(p.id,p);let i=p=>B(t.places,p)!==void 0;for(let p of ee(e)){let y=p.getAttribute("data-act");y!==null&&s.add(y);let k=y!==null&&p.getAttribute("data-debounce")===null?ne(p):void 0;k&&n.push({at:`drawing <${p.localName} data-act="${y}">`,says:k});let v=p.getAttribute("data-record");v!==null&&(a.add(v),!u.has(v)&&!i(v)&&n.push({at:`drawing <${p.localName} data-record="${v}">`,says:t.placesUnsure?`It names "${v}", which this seat was not shown and is none of the places this run was told of. A view goes to a record by its id, or to a place by its slug.${G(t.places)}${q}`:`It names "${v}", which this seat was not shown and is no place of this app: the host will not follow it. A view goes to a record by its id, or to a place by its slug.${G(t.places)}`}));let $=p.getAttribute("data-place");$!==null&&!i($)&&n.push({at:`drawing <${p.localName} data-place="${$}">`,says:t.placesUnsure?`It names the place "${$}", which is none of the places this run was told of.${G(t.places)}${q}`:`It names the place "${$}", which this app does not have.${G(t.places)}`}),n.push(...Ut(p)),n.push(...Ft(p,t,u))}let f=p=>{if(p.localName==="graview-video")return;let y=p.getAttribute("data-record");if(y!==null)return y;let k=p.getAttribute("data-key")??p.getAttribute("id");if(k!==null&&u.has(k))return k;let v=new Set;for(let $ of ee(p)){let c=$.getAttribute("data-record");c!==null&&$.localName!=="graview-video"&&v.add(c)}return v.size===1?[...v][0]:void 0},m=(p,y)=>{let k=u.get(y),v=k?.kind??(y.includes(":")?y.slice(0,y.indexOf(":")):""),$=[...ee(p)],c=$.find(r=>r.localName in Ee)??$.find(r=>r.localName==="a"&&r.getAttribute("data-record")===y)??$.find(r=>r.localName==="strong"||r.localName==="b"),h=C(c?R(c):"")||k?.label||y;return{id:y,kind:v,title:h,parts:bt(o(p,c),y,h)}},b=p=>{let y=[...ee(p)].filter(c=>c.localName==="tr"&&!ue(c)),k=y.find(c=>c.parentElement?.localName==="thead"||c.childNodes.every(h=>!_(h)||h.localName==="th")),v=k?k.childNodes.filter(_).map(c=>C(R(c))):[];return{t:"list",as:"row",columns:1,groups:[{items:y.filter(c=>c!==k).map(c=>{let h=c.childNodes.filter(_),r=f(c),d=r?u.get(r):void 0;return{id:r??"",kind:d?.kind??"",title:C(R(h[0]??c)),parts:h.slice(1).map((g,w)=>({t:"field",label:v[w+1]??"",text:C(R(g))}))}})}]}};function o(p,y){let k=[],v="",$=()=>{let h=C(v);v="",h&&k.push({t:"text",text:h})},c=p.childNodes;for(let h=0;h<c.length;h+=1){let r=c[h];if(r===y)continue;if(r instanceof Q){v+=r.data;continue}if(!_(r)||ue(r)||yt.has(r.localName))continue;if(y&&[...ee(r)].includes(y)){$(),k.push(...o(r,y));continue}let d=[];for(let g=h;g<c.length;g+=1){let w=c[g];if(w instanceof Q&&C(w.data)==="")continue;if(!_(w)||ue(w)||gt.has(w.localName)||w.localName in Ee)break;let O=f(w);if(!O)break;d.push({element:w,id:O}),h=g}if(d.length>0){$();let g=d.every(w=>w.element.localName==="li"||w.element.localName==="tr");k.push({t:"list",as:g?"row":"card",columns:1,groups:[{items:d.map(w=>m(w.element,w.id))}]});continue}k.push(...N(r,g=>v+=g,$))}return $(),k}function N(p,y,k){let v=p.localName;if(gt.has(v)&&v!=="label")return y(R(p)),[];if(v==="mark"){k();let c=C(R(p));return c?[{t:"badge",text:c}]:[]}k();let $=Ee[v]??(p.getAttribute("role")==="heading"?Number(p.getAttribute("aria-level")??2):void 0);if($!==void 0){let c=C(R(p));return c?[{t:"heading",level:$,text:c}]:[]}switch(v){case"ul":case"ol":case"menu":return[{t:"list",as:"row",columns:1,groups:[{items:p.childNodes.filter(h=>_(h)&&h.localName==="li"&&!ue(h)).map(h=>{let r=f(h);if(r)return m(h,r);let d=o(h),g=d[0],w=g&&(g.t==="text"||g.t==="heading")?g.text:"";return{id:"",kind:"",title:w,parts:w?d.slice(1):d}})}]}];case"table":return[b(p)];case"dl":{let c=[],h="";for(let r of p.childNodes.filter(_))if(r.localName==="dt")h=C(R(r));else if(r.localName==="dd")c.push({t:"field",label:h,text:C(R(r))});else if(r.localName==="div")for(let d of r.childNodes.filter(_))d.localName==="dt"?h=C(R(d)):d.localName==="dd"&&c.push({t:"field",label:h,text:C(R(d))});return c}case"figure":{let c=p.childNodes.find(d=>_(d)&&d.localName==="figcaption"),h=C(p.childNodes.filter(d=>d!==c).map(R).join(" ")),r=c?C(R(c)):"";return h?[{t:"figure",text:h,...r?{label:r}:{}}]:r?[{t:"text",text:r}]:[]}case"meter":case"progress":{let c=Number(p.getAttribute("value")??0),h=Number(p.getAttribute("max")??1)||1;return[{t:"progress",label:p.getAttribute("aria-label")??p.getAttribute("title")??"",text:`${Math.round(c/h*100)}%`}]}case"svg":{let c=p.childNodes.find(d=>_(d)&&d.localName==="title"),h=C(p.getAttribute("aria-label")??(c?R(c):""));if(h)return[{t:"text",text:h,tone:"picture"}];let r=[...ee(p)].filter(d=>d.localName==="text").map(d=>C(R(d))).filter(Boolean);return r.length>0?[{t:"text",text:r.join(" \xB7 "),tone:"picture"}]:[]}case"img":{let c=C(p.getAttribute("alt")??"");return c?[{t:"text",text:c,tone:"picture"}]:[]}case"graview-video":{let c=p.getAttribute("data-field")??"",h=p.getAttribute("data-record")??"",r=u.get(h),d=r&&c&&Object.hasOwn(r,c)?r[c]:void 0,g=(Array.isArray(d)?d:[d])[Number(p.getAttribute("data-index")??"0")];if(!g||typeof g.name!="string"||typeof g.type!="string"||!g.type.startsWith("video/"))return n.push({at:`drawing <graview-video data-field="${c}">`,says:"It names no video on a record this seat was shown: the host draws no player there. A <graview-video> names a record the view was shown (data-record) and its video field (data-field)."}),[];let w=Dt(g,{record:h,field:c,autoplay:p.getAttribute("autoplay")!==null,cover:p.getAttribute("cover")!==null});l.push(w);let O=w.autoplay?`, playing as a background, muted and looping${w.cover?", filling its box":""}`:"";return[{t:"text",text:`${w.text}, ${Mt(w.duration!==void 0?{duration:w.duration}:{})}${O}`,tone:"picture"}]}case"button":{let c=C(R(p));return c?[{t:"text",text:c,tone:"button"}]:[]}case"input":case"textarea":case"select":{let c=C(p.getAttribute("aria-label")??p.getAttribute("placeholder")??p.getAttribute("name")??""),h=v==="select"?C(R(p.childNodes.find(r=>_(r)&&r.localName==="option"&&r.selected)??p)):p.value;return[{t:"field",label:c,text:h}]}case"label":return o(p);default:return o(p)}}return{parts:o(e),problems:n,acts:[...s],records:[...a],videos:l}}function vt(e,t,n){let{root:s}=ot(),a=!1,l=Ke(s,{origin:n.origin??"null",...n.imageOrigins?{imageOrigins:n.imageOrigins}:{},...n.asset?{asset:n.asset}:{},...n.link?{link:n.link}:{},maxNodes:n.maxNodes,onOverBudget:()=>a=!0});for(let b of e)l.apply(b);let u=[...l.refused],i="";if(t){let b=Le(t);i=b.css;for(let o of b.refused)u.push({reason:"css",name:"stylesheet",css:o})}let f=n.theme?Me(n.theme).css:"",m=f&&i?`${f}
|
|
16
|
-
${i}`:f||i;return{root:s,refused:u,size:l.size,over:a,css:m,elementOf:b=>l.elementOf(b),idOf:b=>l.idOf(b)}}var ve=" SMIL can set an attribute after the host judged it, and runs past a person's reduced-motion setting: animate with CSS @keyframes, which is held to it.",kt={animate:ve,animateTransform:ve,animateMotion:ve,set:ve,feImage:" It loads an image: a filter here is made of the view's own pixels.","@property":" It registers a property for the whole page, the app's own --graview-* among them: animate a transform, an opacity or a color in @keyframes.","a href":" An <a> in SVG goes to a record or a place (data-record, data-place); a link out is an HTML <a href>.",role:` A role of the app's chrome or notices is the app's; role="region" is drawn while it has a name (aria-label).`};function _t(e,t={}){let n="element"in e&&e.element?`<${e.element}>`:"",s=e.name?` ${e.name}`:"",a=l=>l&&Object.prototype.hasOwnProperty.call(kt,l)?kt[l]:"";switch(e.reason){case"element":return{at:`drawing ${n}`,says:`Not drawn: ${n} is not in the open kit.${a("element"in e?e.element:void 0)}`};case"attribute":return{at:`drawing ${n}${s}`,says:`Not drawn: ${n||"an element"} does not take${s}.${a(`${"element"in e?e.element:""}${s}`)}`};case"value":return{at:`drawing ${n}${s}`,says:`Not drawn: the value of${s} is not one the open kit takes.${a(e.name)}`};case"url":return"element"in e&&e.element==="a"&&e.address!==void 0?{at:`drawing ${n}${s}`,says:`Not drawn: ${Qe(e.address,t.linkOrigins)}`}:{at:`drawing ${n}${s}`,says:e.address!==void 0&&"element"in e&&e.element==="img"?`Not drawn: ${Be(e.address,t,"length"in e?e.length:void 0)}`:"Not drawn: an address. A view loads nothing; an image is a data: image."};case"child":return{at:`drawing ${n}`,says:`Not drawn: ${n} holds nothing.`};case"record":return{at:"drawing",says:"Not drawn: a record the drawing's format does not know."};case"budget":return{at:"drawing",says:"Not drawn: more nodes than a view may draw."};case"reference":{let l="ids"in e&&e.ids?e.ids:[],u=l.length>0?l.map(i=>`"${i}"`).join(", "):"no id";return{at:`drawing ${n}${s}`,says:`Not drawn: ${n||"an element"}${s} names ${u}, ${l.length===1?"which is":"which are"} no element of this view. It names elements the view draws itself, by their id (<h2 id="\u2026">), drawn once each is there.`}}case"css":return{at:`stylesheet${s===" stylesheet"?"":s}`,says:`Not drawn: CSS the open kit leaves out${e.css?` (${e.css.reason}${e.css.name?` ${e.css.name}`:""})`:""}.${a(e.css?.name)}`}}}function Nt(e,t,n={}){let{limits:s}=t;if(e.messages>s.messages)return{ok:!1,reason:"flood",detail:`It sent ${e.messages} messages, more than the ${s.messages} a view may send in a second.`};let a=new Set(t.acts);for(let o of e.asked)if(!a.has(o.name))return{ok:!1,reason:"act",detail:`It asks for the act "${o.name}", which its manifest does not name.`};let l=Je(t.props),u=vt(e.renders,e.sheets,{maxNodes:s.maxNodes,...t.origin?{origin:t.origin}:{},...t.imageOrigins?{imageOrigins:t.imageOrigins}:{},...t.assets?{asset:o=>o}:{},...n.theme?{theme:n.theme}:{},link:o=>Xe(o,{handed:l,...t.linkOrigins?{origins:t.linkOrigins}:{}})});if(u.over)return{ok:!1,reason:"nodes",detail:`It drew more than the ${s.maxNodes.toLocaleString("en-US")} things a view may draw.`};let i=[...t.places,...(t.lists??[]).filter(o=>!t.places.some(N=>N.as===o)).map(o=>({as:o}))],f=t.placesUnsure===!0,m=wt(u.root,{props:t.props,places:i,...f?{placesUnsure:!0}:{},...t.accepts?{accepts:t.accepts}:{}});for(let o of m.acts)if(!a.has(o))return{ok:!1,reason:"act",detail:`It binds a press to the act "${o}" (data-act), which its manifest does not name.`};let b=[...u.refused.map(o=>_t(o,{...t.imageOrigins?{origins:t.imageOrigins}:{},assets:t.assets===!0,...t.linkOrigins?{linkOrigins:t.linkOrigins}:{}})),...m.problems];for(let o of e.went)"record"in o&&!(t.props.node?.id===o.record||(t.props.nodes??[]).some(N=>N.id===o.record)||B(i,o.record))&&b.push({at:"navigate",says:f?`It goes to ${ae(o.record)}, which this seat was not shown and is none of the places this run was told of. A view goes to a record by its id, or to a place by its slug.${G(i)}${q}`:`It goes to ${ae(o.record)}, which this seat was not shown and is no place of this app: the host will not follow it. A view goes to a record by its id, or to a place by its slug.${G(i)}`}),"place"in o&&!B(i,o.place)&&b.push({at:"navigate",says:f?`It goes to the place ${ae(o.place)}, which is none of the places this run was told of.${G(i)}${q}`:`It goes to the place ${ae(o.place)}, which this app does not have.${G(i)}`});return{ok:!0,parts:m.parts,problems:b,drawn:u,videos:m.videos}}var xt="graviewHeadless",St="graviewHeadlessView";var $t='"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 M=Symbol("name"),Ce=Symbol("prefix"),Ie=Symbol("value"),L=Symbol("ns"),se=Symbol("owner"),F=Symbol("owner_document"),Ee=Symbol("attributes"),B=Symbol("prev"),A=Symbol("next"),H=Symbol("child"),ie=Symbol("parent"),De=Symbol("host"),ue=Symbol("data"),ze=Symbol("listeners"),ur=Symbol("isTrusted"),Qe=Symbol("path"),et=Symbol("stop_immediate_propagation"),tt=Symbol("dispatching"),Se=Symbol("content"),Y=Symbol("hooks"),Qt=Symbol("extensions"),Ve=Symbol("hooks_dispatch"),Z=Symbol("is_connected"),nt=Symbol("create_element"),lo=0,le=1,rt=2,ot=3,st=8,Fe=9,co=10,Me=11,G="http://www.w3.org/1999/xhtml",fe="http://www.w3.org/2000/svg",uo="http://www.w3.org/XML/1998/namespace",kt="http://www.w3.org/2000/xmlns/";function en(t){return t.split(/[\\t\\n\\f\\r ]+/).filter(Boolean)}function X(t){return t.replace(/[A-Z]/g,e=>String.fromCharCode(e.charCodeAt(0)+32))}function fo(t){return t.replace(/[a-z]/g,e=>String.fromCharCode(e.charCodeAt(0)-32))}function j(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 po=/^(?:[A-Za-z][^\\0\\t\\n\\f\\r\\u0020/>]*|[:_\\u0080-\\u{10FFFF}][A-Za-z0-9-.:_\\u0080-\\u{10FFFF}]*)$/u,mo=/[\\0\\t\\n\\f\\r />=]/u,pi=/[\\0\\t\\n\\f\\r />]/u;function ve(t){if(t==null)return null;let e=String(t);return e===""?null:e}function ho(t){po.test(t)||pr(t)}function fr(t){(t===""||mo.test(t))&&pr(t)}function tn(t,e,n){let r=ve(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===""||pi.test(i))||(n==="element"?!po.test(a):a===""||mo.test(a)))&&pr(o),i!=null&&r==null)throw j(`A namespace is required for the prefix in "${o}"`,"NamespaceError");if(i==="xml"&&r!==uo)throw j("The xml prefix requires the XML namespace","NamespaceError");if((o==="xmlns"||i==="xmlns")&&r!==kt)throw j("The xmlns name requires the XMLNS namespace","NamespaceError");if(r===kt&&o!=="xmlns"&&i!=="xmlns")throw j("The XMLNS namespace requires the xmlns name or prefix","NamespaceError");return{namespace:r,qualifiedName:o,prefix:i,localName:a}}function pr(t){throw j(`Invalid name: "${t}"`,"InvalidCharacterError")}var nn=0,rn=1,go=2,mr=3,mi=typeof performance>"u"?Date.now:performance.now.bind(performance),J=class{static NONE=nn;static CAPTURING_PHASE=rn;static AT_TARGET=go;static BUBBLING_PHASE=mr;timeStamp=mi();target=null;currentTarget=null;srcElement=null;bubbles=!1;cancelable=!1;composed=!1;defaultPrevented=!1;cancelBubble=!1;eventPhase=nn;[Qe]=[];[et]=!1;[tt]=!1;constructor(e,n){this.type=e,Object.defineProperty(this,ur,{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[ur]}composedPath(){return[...this[Qe]]}stopPropagation(){this.cancelBubble=!0}stopImmediatePropagation(){this[et]=!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 hr(t,e,n){if(t.cancelBubble)return;let o=e[ze]?.get(t.type)?.[n===rn?"capture":"bubble"];if(o)for(let s of[...o]){if(!o.has(s)||s.signal?.aborted)continue;t.eventPhase=t.target===e?go:n,t.currentTarget=e;let i=s.normalizedListener;try{typeof i=="object"?i.handleEvent(t):i.call(e,t)}catch(a){setTimeout(hi,0,a)}if(t[et])break}}function hi(t){throw t}var At=[],on=new WeakMap;function sn(t,e){let n=on.get(t);n?n.push(e):on.set(t,[e]),At[At.length-1].push(t)}function Q(t){let e=[];At.push(e);let n;try{n=t()}catch(r){At.pop();try{yo(e)}catch{}throw r}return At.pop(),yo(e),n}function yo(t){let e,n=!1;for(let r of t){let o=on.get(r);if(o){for(;o.length>0;){let s=o.shift();try{s()}catch(i){n||(e=i,n=!0)}}on.delete(r)}}if(n)throw e}var an=[],Ot=[],gr=!1;function Be(t){for(let e of t)an.push(e),e[1]&&Ot.push(e[1]);if(!gr){gr=!0;try{let e,n=!1;for(let r=0;r<an.length;r++){let[o,s]=an[r];s&&Ot.splice(Ot.indexOf(s),1);try{o()}catch(i){n||(e=i,n=!0)}}if(n)throw e}finally{an.length=0,Ot.length=0,gr=!1}}}function Rt(t){let e=t;for(;e;){if(Ot.includes(e))return!0;e=e[ie]??e[De]}return!1}var Pt=Symbol("listenerRegistrations"),Le=class{[ze]=void 0;[Pt]=void 0;[F]=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=yr(o),l=this[Pt];l||(l=new Map,this[Pt]=l);let c=l.get(e);c||(c={},l.set(e,c));let m=c[a];if(m||(m=new Map,c[a]=m),m.has(n))return;let h=this,E={type:e,listener:n,capture:o,once:s,normalizedListener:n,signal:i};(s||i)&&(E.normalizedListener=function(...y){if(E.signal?.aborted){ln(h,E);return}return E.once&&ln(h,E),typeof E.listener=="object"?E.listener.handleEvent(...y):E.listener.call(this,...y)});let b=this[ze];b||(b=new Map,this[ze]=b);let u=b.get(e);u||(u={},b.set(e,u));let O=u[a];if(O||(O=new Set,u[a]=O),m.set(n,E),O.add(E),i){let d=()=>{ln(h,E)};E.abortListener=d,i.addEventListener("abort",d,{once:!0})}this[F]?.defaultView[Ve].addEventListener?.(this,e,n,r)}removeEventListener(e,n,r){return gi.call(this,e,n,r)}dispatchEvent(e){if(e[tt])throw j("Failed to execute \'dispatchEvent\' on \'EventTarget\': The event is already being dispatched.","InvalidStateError");e[tt]=!0;try{let n=[],r=this;for(;r!=null;)n.push(r),r=r.parentNode;e.target=this,e.srcElement=this,e[Qe]=n;for(let s=n.length;s--;)if(hr(e,n[s],rn),e.cancelBubble)return!e.defaultPrevented;let o=e.bubbles?n:n.slice(0,1);for(let s=0;s<o.length;s++)if(hr(e,o[s],mr),e.cancelBubble)return!e.defaultPrevented;return!e.defaultPrevented}finally{e[tt]=!1,e.cancelBubble=!1,e[et]=!1,e.eventPhase=nn,e.currentTarget=null,e[Qe]=[]}}};function gi(t,e,n){if(e==null)return;let r=n===!0||n&&n.capture===!0,o=yr(!!r),s=this[Pt]?.get(t)?.[o]?.get(e);s&&ln(this,s)}function yr(t){return t?"capture":"bubble"}function ln(t,e){let n=yr(e.capture),r=t[Pt],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[ze],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[F]?.defaultView[Ve].removeEventListener?.(t,e.type,e.listener,e.capture))}var pe=class extends Array{item(e){return this[e]??null}};var Ct=0,bo=1,wr=2,Nr=3,It=4,Eo=0,wo=1,un=2,fn=3,No=4,Er=5,To=6,xo=7,cn=/^(?:--|-?[A-Za-z_\\u0080-\\u{10FFFF}])[A-Za-z0-9_\\u0080-\\u{10FFFF}-]*$/u;function yi(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 ae(t){throw j(`Invalid or unsupported selector: "${t}"`,"SyntaxError")}function pn(t,e){let n=typeof e=="string"?Dt(e):[{combinator:It,matchers:e}],r=null,o=t[H];return o&&n[0].matchers.length&&Tr(o,n,s=>(r=s,!1)),r}function mn(t,e){let n=typeof e=="string"?Dt(e):[{combinator:It,matchers:e}],r=new pe,o=t[H];return o&&n[0].matchers.length&&Tr(o,n,s=>{r.push(s)}),r}function Dt(t,e=!1,n=!1){let r={combinator:It,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===""&&ae(t);let a=0,l;for(;l=s.exec(i);){l.index!==a&&ae(t),l[1]&&(r.matchers.length===0&&!(n&&o.length===1)&&ae(t),l[1]===">"?r.combinator=bo:l[1]==="+"?r.combinator=Nr:l[1]==="~"?r.combinator=wr:r.combinator=Ct,r={combinator:It,matchers:[]},o.push(r));let c=l[8]?X(l[8]):l[2]||l[7];l[7]!=null&&!l[6]&&r.matchers.length>0&&ae(t);let h,E=l[4]??l[5]??l[7];if(l[2]){cn.test(c)||ae(t);let b=l[5],u=b?.[0];if(l[3]==null&&(u===\'"\'||u==="\'")){let O=l[0].lastIndexOf(b);E=i.slice(l.index+O+1),s.lastIndex=i.length}else b!=null&&!cn.test(b)&&ae(t);h=No}else l[6]?(cn.test(c)||ae(t),h=l[6]==="#"?un:fn):l[8]?h=l[9]==null?Er:To:l[7]==="*"?h=Eo:l[7]&&cn.test(l[7])?h=wo:ae(t);l[9]?([E,s.lastIndex]=yi(i,s.lastIndex),c!=="has"&&c!=="not"&&ae(t),c==="has"&&e&&ae(t),Dt(E,e||c==="has",c==="has")):h===Er&&ae(t),r.matchers.push({type:h,name:c,value:E}),a=s.lastIndex}return(a!==i.length||r.matchers.length===0)&&ae(t),o}function bi(t,e){let n=Dt(e);return n[0]?.matchers.length?_t(t,n):!1}function Ei(t,e){let n=Dt(e,!0,!0),r=n[0];if(n.length===1&&r.matchers.length===0)return!1;let o=Ct,s={type:xo,name:":scope"};if(r.matchers.length===0?(o=r.combinator,r.matchers.push(s)):n.unshift({combinator:Ct,matchers:[s]}),n.some(({matchers:l})=>l.length===0))return!1;let i=o===Nr||o===wr?t[A]:t[H];if(!i)return!1;let a=!1;return Tr(i,n,()=>(a=!0,!1),t),a}function Tr(t,e,n,r){let o=[],s=t;for(;s;){if(oe(s)){if(_t(s,e,r)&&n(s)===!1)return!1;let i=s[H];if(i){let a=s[A];a&&o.push(a),s=i;continue}}s=s[A]??o.pop()??null}return!0}function _t(t,e,n){let{combinator:r,matchers:o}=e[e.length-1];if(r===It){if(!dn(t,o,n))return!1;let a=e.slice(0,-1);return a.length===0||_t(t,a,n)}let s=r===bo||r===Ct?ie:B,i=t[s];if(!i)return!1;if(r===Ct||r===wr){for(;i;){if(oe(i)&&dn(i,o,n)){let a=e.slice(0,-1);if(a.length===0||_t(i,a,n))return!0}i=i[s]}return!1}else{if(r===Nr&&!oe(i)){for(;i&&!oe(i);)i=i[s];if(!i)return!1}if(!oe(i)||!dn(i,o,n))return!1;let a=e.slice(0,-1);return a.length===0||_t(i,a,n)}}function br(t,e){return t.getAttributeNS(null,t.namespaceURI===G?X(e):e)}function dn(t,e,n){if(!t)return!1;if(Array.isArray(e)){for(let i of e)if(dn(t,i,n)===!1)return!1;return!0}let{type:r,name:o,value:s}=e;switch(r){case Eo:return o==="*";case wo:return t.namespaceURI===G?t.localName===X(o):t.localName===o;case un:return br(t,"id")===o;case fn:let i=br(t,"class");return i?en(i).includes(o):!1;case No:let a=br(t,o);return s==null?a!=null:a===s;case xo:return t===n;case Er:ae(`:${o}`);case To:switch(o){case"has":return Ei(t,s||"");case"not":return!bi(t,s||"");default:ae(`:${o}(${s})`)}}return!1}function wi(t){return t.nodeType===rt}function Mt(t){return ue in t}function Sr(t){return t.nodeType===ot}function Ni(t){return t.nodeType===st}function oe(t){return t.nodeType===le}function xr(t){return t.nodeType===Me}function Ao(t){return"appendChild"in t}function hn(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 $t(i)){if(o.has(l)||(o.add(l),e.push(l),a.push(l),!oe(l)))continue;let c=l[Ee];if(c)for(let h of c)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 Lt(t,e){for(let n of t)n[F]=e}function So(t,e){let n=t.constructor,r=new n(t.name,t.value,t.namespaceURI);return r[F]=e,r}function vo(t,e){if(Sr(t))return e.createTextNode(t.data);if(Ni(t))return e.createComment(t.data);if(wi(t))return So(t,e);if(oe(t)){let n=e[nt](t[M],t.namespaceURI,t[Ce],t.localName);if(t[Ee])for(let r=0;r<t[Ee].length;r++){let o=t[Ee].item(r);n.attributes.setNamedItem(So(o,e))}return n}else{if(xr(t))return e.createDocumentFragment();{let n=new t.constructor;return n[F]=e,n}}}function gn(t,e,n=t.ownerDocument){if(t.nodeType===Fe)throw j("Cannot clone a document node","NotSupportedError");let r=vo(t,n);if(!e||!oe(t)&&!xr(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,oe(i.source)&&i.source.namespaceURI===G&&i.source.localName==="template"){let m=i.source[Se];m&&(o.has(m)&&ko(),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)&&ko(),o.add(a);let c=vo(a,n);oe(a)||xr(a)?s.push({source:a,destination:c,appendTo:l,childIndex:0,cloningContent:!1}):l.appendChild(c)}return r}function ko(){throw new Error("Cannot clone a cyclic or repeated node graph")}function yn(t,e){let n=String(e);return n===""?null:pn(t,[{type:un,name:n}])}function bn(t,e){let n=[...new Set(en(String(e)))];return mn(t,n.map(r=>({type:fn,name:r})))}function En(t,e){let n=String(e),r=X(n),o=[];for(let s of wn(t))oe(s)&&(n==="*"||(s.namespaceURI===G?s[M]===r:s[M]===n))&&o.push(s);return o}function wn(t){let e=[],n=[],r=t[H];for(;r;){e.push(r);let o=r[H],s=r[A];o?(s&&n.push(s),r=o):r=s??n.pop()??null}return e}function $t(t){let e=wn(t);return e.unshift(t),e}var me=class extends Le{nodeType=lo;[M]="";[ie]=null;[De]=null;[H]=null;[B]=null;[A]=null;[Z]=!1;get[Y](){return this[F].defaultView[Ve]}get localName(){return this[M]}get nodeName(){return this[M]}get ownerDocument(){return this[F]}get isConnected(){return this[Z]}isDefaultNamespace(e){let n=ve(e);return Ti(this)===n}get parentNode(){return this[ie]}set parentNode(e){}get parentElement(){let e=this[ie];return!e||e.nodeType!==1?null:e}set parentElement(e){}get previousSibling(){return this[B]}set previousSibling(e){}get nextSibling(){return this[A]}set nextSibling(e){}get previousElementSibling(){let e=this[B];for(;e&&e.nodeType!==1;)e=e[B];return e}set previousElementSibling(e){}get nextElementSibling(){let e=this[A];for(;e&&e.nodeType!==1;)e=e[A];return e}set nextElementSibling(e){}get firstChild(){return this[H]}set firstChild(e){}get lastChild(){let e=this[H];for(;e;){let n=e[A];if(n==null)break;e=n}return e}set lastChild(e){}get nodeValue(){return Mt(this)?this.data:null}set nodeValue(e){Mt(this)&&(this.data=e)}get textContent(){if(Mt(this))return this.data;let e="";for(let n of wn(this))Sr(n)&&(e+=n.data);return e}set textContent(e){if(Mt(this))this.data=e;else if(Ao(this)){let n=e==null?"":String(e);n===""?this.replaceChildren():this.replaceChildren(n)}}cloneNode(e){return gn(this,e)}contains(e){let n=e;for(;n!=null;){if(n===this)return!0;n=n.parentNode}return!1}};function Ti(t){let e=t;for(;e;)switch(e.nodeType){case le:{let n=e;if(n.prefix==null&&n.namespaceURI!=null)return n.namespaceURI;let r=n.attributes.getNamedItemNS(kt,"xmlns");if(r!=null&&r.prefix==null)return ve(r.value);e=n.parentElement;break}case Fe:e=e.documentElement;break;case co:case Me:return null;case rt:e=e.ownerElement;break;default:e=e.parentElement}return null}var he=Symbol("insertNode"),Ar=Symbol("preflightInsertions"),Nn=Symbol("replaceNode"),$e=class extends me{remove(){let e=this.parentNode;e&&e.removeChild(this)}replaceWith(...e){let n=Ye(e),r=this.parentNode;if(r)return vr(o=>{ke(r,n);let s=this[A];for(;s&&n.includes(s);)s=s[A];let i=kr(r,n,o);this.parentNode===r?r[Nn](i,this,o):r[he](i,s,o)})}before(...e){let n=Ye(e),r=this.parentNode;if(r)return vr(o=>{ke(r,n);let s=this[B];for(;s&&n.includes(s);)s=s[B];let i=kr(r,n,o);r[he](i,s?s[A]:r.firstChild,o)})}after(...e){let n=Ye(e),r=this.parentNode;if(r)return vr(o=>{ke(r,n);let s=this[A];for(;s&&n.includes(s);)s=s[A];let i=kr(r,n,o);r[he](i,s,o)})}};function vr(t){return Q(()=>{let e=[];try{t(e)}catch(n){try{Be(e)}catch{}throw n}Be(e)})}function Ye(t){return t.map(e=>e instanceof me?e:String(e))}function Ht(t,e){return e instanceof me?e:t.ownerDocument.createTextNode(String(e))}function ke(t,e){for(let n of e){if(!(n instanceof me))continue;let r=t;for(;r;){if(r===n)throw j("Cannot insert a node into itself or one of its descendants","HierarchyRequestError");r=r[ie]??r[De]}}}function kr(t,e,n){let r=[];for(let s of e)r.push(Ht(t,s));if(r.length===1)return r[0];let o=t.ownerDocument.createDocumentFragment();o[Ar](r);for(let s of r)o[he](s,null,n);return o}var Tn,Or=0,Oo=0,Ro=0,Po=0,it=!1,Pr=!1,Ut=!1,xn=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=xi(n),o=Tn??=new WeakMap,s=o.get(e);s==null&&(s=new Map,o.set(e,s));let i=s.get(this);i==null?Or++:Rr(i,-1),s.set(this,r),Rr(r,1),this.#e.add(e)}disconnect(){let e=Tn;if(e!=null){for(let n of this.#e){let r=e.get(n),o=r?.get(this);o!=null&&(r.delete(this),Or--,Rr(o,-1)),r?.size===0&&e.delete(n)}this.#e.clear(),this.#n.length=0,Or===0&&(Tn=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 ge(t){let e=Tn;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 pe,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 pe,target:t.target,type:t.type})}function Sn(...t){let e=new pe;return e.push(...t),e}function xi(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 Rr(t,e){t.attributes&&(Oo+=e),t.characterData&&(Ro+=e),t.childList&&(Po+=e),it=Oo>0,Pr=Ro>0,Ut=Po>0}var we=class extends $e{childNodes=new pe;children=new pe;appendChild(e){return Q(()=>this[he](e,null))}insertBefore(e,n){return Q(()=>this[he](e,n||null))}append(...e){return Q(()=>{let n=Ye(e.filter(r=>r!=null));n.length>1&&ke(this,n);for(let r of n)this[he](Ht(this,r),null)})}prepend(...e){return Q(()=>{let n=Ye(e.filter(o=>o!=null));n.length>1&&ke(this,n);let r=this.firstChild;for(let o of n)this[he](Ht(this,o),r)})}replaceChildren(...e){return Q(()=>{let n=Ye(e.filter(o=>o!=null));ke(this,n);let r;for(;r=this.firstChild;)this.removeChildImmediately(r);for(let o of n)this[he](Ht(this,o),null)})}removeChild(e){return Q(()=>(this.removeChildImmediately(e),e))}removeChildImmediately(e){if(e.parentNode!==this)throw j("The node is not a child of this node","NotFoundError");let n=this[Z]?$t(e):void 0,r=e[B],o=e[A],s=vn(this,e);if(n)for(let i of n)i[Z]=!1;this.queueRemovalMutationRecord(this,e,r,o),n&&this.enqueueTreeReactions(n,"disconnectedCallback"),Be(this.collectRemovalHookEffects(e,s))}replaceChild(e,n){return Q(()=>this[Nn](e,n))}[Nn](e,n,r){if(ke(this,[e]),n.parentNode!==this)throw j("The reference node is not a child of this parent","NotFoundError");let o=n[B],s=n[A],i=this.prepareInsertion(e),a=this[Z]?$t(n):void 0,l=new Set(i.map(({node:E})=>E)),c=s;for(;c&&l.has(c);)c=c[A];let m=vn(this,n);if(a){for(let b of a)b[Z]=!1;let E=new Set(a);for(let b of i)E.has(b.node)&&(b.shouldDisconnect=!1)}this.commitInsertion(i,c);let h=this[Z];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 mn(this,e)}querySelector(e){return pn(this,e)}[he](e,n,r){return this.validateInsertion(e,n),this.insertIntoValidated(e,n,r),e}[Ar](e){for(let n of e)this.validateInsertion(n,null),this.prepareInsertion(n)}validateInsertion(e,n){if(ke(this,[e]),n&&n.parentNode!==this)throw j("The reference node is not a child of this parent","NotFoundError")}insertIntoValidated(e,n,r){e===n&&(n=e[A]);let o=this.prepareInsertion(e);this.commitInsertion(o,n);let s=this[Z];this.queueInsertionMutationRecords(o),this.enqueueInsertionReactions(o,s),this.performOrCollectHookEffects(this.collectInsertionHookEffects(o),r)}performOrCollectHookEffects(e,n){n?n.push(...e):Be(e)}prepareInsertion(e){let n=[];if(e.nodeType===Me){let i=e[H];for(;i;)n.push(i),i=i[A]}else n.push(e);let r=this[Z],o=this[F],s=[];for(let i of n){let a=i[Z],l=a||r,c,m;if(i[F]===o)l&&(c=$t(i));else{let h=hn(i);m=h.nodes,l&&(c=h.treeNodes)}s.push({node:i,nodes:c,adoption:m,shouldDisconnect:a})}return s}commitInsertion(e,n){for(let s of e){let i=s.node[ie];if(i){let a=s.node[B],l=s.node[A];s.source={parent:i,index:vn(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[F];for(let{adoption:s}of e)s&&Lt(s,r);let o=this[Z];for(let{nodes:s}of e)if(s)for(let i of s)i[Z]=o}attachChild(e,n){if(n){let s=n[B];e[A]=n,e[B]=s,s?s[A]=e:this[H]=e,n[B]=e}else{e[A]=null;let s=this[H];if(s){let i;for(;i=s[A];)s=i;s[A]=e,e[B]=s}else this[H]=e,e[B]=null}let r=oe(e);e[ie]=this;let o;if(n){if(o=this.childNodes.indexOf(n),this.childNodes.splice(o,0,e),r){let s=n;for(;s&&!oe(s);)s=s[A];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[B],nextSibling:e[A]}}queueRemovalMutationRecord(e,n,r,o){Ut&&ge({type:"childList",target:e,removedNodes:Sn(n),previousSibling:r,nextSibling:o})}queueInsertionMutationRecords(e){if(Ut)for(let n of e){let{node:r,source:o}=n;o&&this.queueRemovalMutationRecord(o.parent,r,o.previousSibling,o.nextSibling),ge({type:"childList",target:this,addedNodes:Sn(r),previousSibling:n.previousSibling,nextSibling:n.nextSibling})}}collectRemovalHookEffects(e,n){return this.nodeType!==le||Rt(this)?[]:[[()=>this[Y].removeChild?.(this,e,n)]]}collectInsertionHookEffects(e){let n=[];for(let r of e){let{node:o,source:s}=r;s?.parent.nodeType===le&&!Rt(s.parent)&&n.push([()=>s.parent[Y].removeChild?.(s.parent,o,s.index)]),this.nodeType===le&&!Rt(this)&&n.push([()=>this[Y].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){Co(e,n)}};function _o(t,e,n,r){if(e.parentNode!==t)throw Error("not a child of this node");let o=t[Z]?n.treeNodes:void 0,s=e[B],i=e[A],a=vn(t,e);if(o)for(let c of o)c[Z]=!1;Lt(n.nodes,r),Ut&&ge({type:"childList",target:t,removedNodes:Sn(e),previousSibling:s,nextSibling:i}),o&&Co(o,"disconnectedCallback");let l=[];t.nodeType===le&&!Rt(t)&&l.push([()=>t[Y].removeChild?.(t,e,a)]),Be(l)}function vn(t,e){let n=e[B],r=e[A];n?n[A]=r:t[H]=r,r&&(r[B]=n);let o=t.childNodes.indexOf(e);return t.childNodes.splice(o,1),oe(e)&&t.children.splice(t.children.indexOf(e),1),e[ie]=null,e[A]=null,e[B]=null,o}function Co(t,e){for(let n of t){let r=n[e];typeof r=="function"&&sn(n,()=>r.call(n))}}function Gt(t,e,n,r,o){let{observedAttributes:s}=t.constructor,{attributeChangedCallback:i}=t;i==null||s==null||!s.includes(e)||sn(t,()=>i.call(t,e,n,r,o))}var kn=class{[H]=null;constructor(e){this[se]=e}getNamedItem(e){let n=String(e),r=this[se][L]===G?X(n):n,o=this[H];for(;o;){if(o.name===r)return o;o=o[A]}return null}getNamedItemNS(e,n){let r=ve(e),o=String(n),s=this[H];for(;s;){if(s.localName===o&&s[L]===r)return s;s=s[A]}return null}item(e){let n=this[H],r=0;for(;n;){if(r++===e)return n;n=n[A]}return null}get length(){let e=0,n=this[H];for(;n;)e++,n=n[A];return e}removeNamedItem(e){let n=String(e),r=this[se][L]===G?X(n):n;return Q(()=>this.removeNamedItemImmediately(o=>o.name===r))}removeNamedItemNS(e,n){let r=ve(e),o=String(n);return Q(()=>this.removeNamedItemImmediately(s=>s.localName===o&&s[L]===r))}removeNamedItemImmediately(e){let n=this[se],r=this[H],o=null;for(;r!=null;){if(e(r)){o&&(o[A]=r[A]),this[H]===r&&(this[H]=r[A]);let s=r.value;return r[A]=null,r[se]=null,it&&ge({type:"attributes",target:n,attributeName:r.name,attributeNamespace:r[L],oldValue:s}),n[Y].removeAttribute?.(n,r.name,r[L]),Gt(n,r.localName,s,null,r[L]),r}o=r,r=r[A]}return null}setNamedItem(e){return Q(()=>this.setNamedItemImmediately(e))}setNamedItemImmediately(e){let n=this[se],r=e[se];if(r!=null&&r!==n)throw j("The attribute is already in use by another element.","InUseAttributeError");let o=null,s=this[H],i=null;for(;s;){if(s.localName===e.localName&&s[L]===e[L]){if(s===e)return s;i?i[A]=e:this[H]=e,e[A]=s[A],s[A]=null,o=s;break}i=s,s=s[A]}o==null&&(i?i[A]=e:this[H]=e),e[se]=n,e[F]=n[F],o&&(o[se]=null);let a=o==null||o.value!==e.value,l=o!=null&&o.name!==e.name;return a&&it&&ge({type:"attributes",target:n,attributeName:e.name,attributeNamespace:e[L],oldValue:o?.value??null}),l&&n[Y].removeAttribute?.(n,o.name,o[L]),(a||l)&&n[Y].setAttribute?.(n,e.name,e.value,e[L]),a&&Gt(n,e.localName,o?.value??null,e.value,e[L]),o}setNamedItemNS(e){return this.setNamedItem(e)}*[Symbol.iterator](){let e=this[H];for(;e;)yield e,e=e[A]}};var We=class extends me{nodeType=rt;[L]=null;[A]=null;[se]=null;constructor(e,n,r){super(),this[M]=e,this[Ie]=n,r&&(this[L]=r)}get nodeName(){return this[M]}set nodeName(e){}get name(){return this[M]}set name(e){}get localName(){if(this[L]==null)return this[M];let e=this[M].indexOf(":");return e<0?this[M]:this[M].slice(e+1)}get prefix(){if(this[L]==null)return null;let e=this[M].indexOf(":");return e<0?null:this[M].slice(0,e)}get value(){return this[Ie]}set value(e){let n=String(e),r=this[se];if(!r){this[Ie]=n;return}Q(()=>{let o=this[Ie];this[Ie]=n,it&&o!==n&&ge({type:"attributes",target:r,attributeName:this[M],attributeNamespace:this[L],oldValue:o}),this[Y].setAttribute?.(r,this[M],n,this[L]),Gt(r,this.localName,o,n,this[L])})}get nodeValue(){return this.value}set nodeValue(e){this.value=e}get ownerElement(){return this[se]}get namespaceURI(){return this[L]}get specified(){return!0}};var Si={amp:"&",AMP:"&",apos:"\'",gt:">",GT:">",lt:"<",LT:"<",quot:\'"\',QUOT:\'"\'},vi=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),ki=/(?:<([a-z][a-z0-9-:]*)((?:[\\s]+[^<>\'"=/\\s]+(?:=([\'"])[^]*?\\3|=[^>\'"\\s]*|))*)[\\s]*(\\/?)\\s*>|<\\/([a-z][a-z0-9-:]*)>|<!--(.*?)-->|([^<>]+))/gi,Mo=/\\s([^<>\'"=/\\n\\s]+)(?:=(["\'])([\\s\\S]*?)\\2|=([^>\'"\\n\\s]*)|)/g,Ai="|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|",Oi=/^(?:color|face|size)$/i;function Io(t){return t.replace(/&(?:(amp|AMP|apos|gt|GT|lt|LT|quot|QUOT)|#(\\d+)|#[xX]([\\da-fA-F]+));/g,(e,n,r,o)=>{if(n)return Si[n];let s=Number.parseInt(r??o,r?10:16);try{return String.fromCodePoint(s)}catch{return e}})}function Lo(t){return t.namespaceURI===G&&vi.has(t.localName)}function Do(t){let e=t.localName;return t[L]===fe&&(e==="foreignObject"||e==="desc"||e==="title")}function Ri(t,e){if(Ai.includes(`|${t}|`))return!0;if(t!=="font")return!1;for(let n of e.matchAll(Mo))if(Oi.test(n[1]))return!0;return!1}function An(t,e){let n=e.ownerDocument,r=n.createDocumentFragment(),o=[],s=r;for(let i of t.matchAll(ki)){let a=i[1];if(a){let l=i[2],c=X(a),m=o[o.length-1]?.element??e,h=m[L]===fe?fe:G;if(c==="svg")h=fe;else if(h===fe){if(Do(m))h=G;else if(Ri(c,l)){for(;o.length>0;){let u=o[o.length-1];if(u.element[L]!==fe||Do(u.element))break;o.pop(),s=u.target}h=G}}let E=h===G?c:a,b=n[nt](E,h,null,E);for(let u of l.matchAll(Mo))b.setAttribute(u[1],Io(u[3]||u[4]||""));if(s.append(b),Lo(b)||h!==G&&i[4])continue;o.push({element:b,target:s}),s=h===G&&c==="template"?b.content:b}else if(i[5]){let l=X(i[5]);for(let c=o.length-1;c>=0;c--){let m=o[c],h=X(m.element[M]);if(h===l){s=m.target,o.length=c;break}if(m.element[L]===G&&h==="template")break}}else i[6]?s.append(n.createComment(i[6])):s.append(Io(i[7]))}return r}function On(t){return Ho([{type:"content",child:t[H]}])}function $o(t){return Ho([{type:"opening",node:t}])}function Ho(t){let e=[],n;for(;n=t.pop();)switch(n.type){case"opening":{let r=n.node;switch(r.nodeType){case le:{let o=r;e.push(`<${o[M]}`);let s=o[Ee]?.[H];for(;s;){e.push(` ${s[M]}`);let a=s[Ie];a!==""&&(a=String(a).replace(/&/g,"&").replace(/"/g,"""),e.push(`="${a}"`)),s=s[A]}if(e.push(">"),Lo(o))break;let i=o.namespaceURI===G&&o.localName==="template"?o[Se]:o;t.push({type:"closing",name:o[M]}),t.push({type:"content",child:i?.[H]??null});break}case ot:{let o=r;e.push(o[ue].replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">"));break}case st:{let o=r;e.push(`<!--${o[ue]}-->`);break}}break}case"content":{let r=n.child;r&&(t.push({type:"content",child:r[A]}),t.push({type:"opening",node:r}));break}case"closing":e.push(`</${n.name}>`);break}return e.join("")}var K=class extends we{nodeType=le;[L]=G;[Ce]=null;get namespaceURI(){return this[L]}get prefix(){return this[Ce]}get localName(){let e=this[Ce];return e==null?this[M]:this[M].slice(e.length+1)}get nodeName(){return this[L]===G?fo(this[M]):this[M]}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 We("slot",n))}get attributes(){let e=this[Ee];return e||(e=new kn(this),this[Ee]=e),e}getAttributeNames(){return[...this.attributes].map(e=>e.name)}getElementsByTagName(e){return En(this,e)}get firstElementChild(){return this.children[0]??null}getElementsByClassName(e){return bn(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);fr(r);let s=this[L]===G?X(r):r,i=this.attributes.getNamedItemNS(null,s);i?i.value=o:this.attributes.setNamedItem(new We(s,o))}setAttributeNS(e,n,r){let o=ve(e),s=String(n),i=String(r),a=tn(o,s,"attribute"),l=this.attributes.getNamedItemNS(a.namespace,a.localName);l?l.value=i:this.attributes.setNamedItemNS(new We(a.qualifiedName,i,a.namespace))}toggleAttribute(e,n){let r=String(e);fr(r);let o=this[L]===G?X(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 We(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[L]===G?X(n):n;this.attributes.removeNamedItemNS(null,r)}removeAttributeNS(e,n){this.attributes.removeNamedItemNS(e,n)}get outerHTML(){return $o(this)}get innerHTML(){return On(this)}set innerHTML(e){if(e==null||e==="")this.replaceChildren();else{let n=An(String(e),this);this.replaceChildren(n)}}};var at=class t extends K{[L]=fe;get ownerSVGElement(){let e=null,n=this.parentNode;for(;n instanceof t;)e=n,n=n.parentNode;return e}};var He=class extends $e{[ue]="";constructor(e){super(),this[ue]=e==null?"":String(e)}setData(e){let n=Pr,r=n?this[ue]:null,o="";e!=null&&(o=typeof e=="string"?e:String(e)),this[ue]=o,n&&r!==o&&ge({type:"characterData",target:this,oldValue:r}),this[Y].setText?.(this,o)}get data(){return this[ue]}set data(e){this.setData(e)}};var lt=class extends He{nodeType=ot;[M]="#text"};var ct=class extends He{nodeType=st;[M]="#comment"};var dt=class extends we{nodeType=Me;[M]="#document-fragment";[F]=typeof window<"u"?window.document:null;getElementById(e){return yn(this,e)}};var ut=class extends K{get content(){let e=this[Se];return e||(e=this.ownerDocument.createDocumentFragment(),e[De]=this,this[Se]=e),e}set content(e){}set innerHTML(e){this.content.replaceChildren(An(String(e),this))}get innerHTML(){let e=this[Se];return e?On(e):""}};var Rn=class extends K{};var Pn=class extends K{};var _n=class extends K{};var jt=class extends we{nodeType=Fe;[M]="#document";[Z]=!0;constructor(e){super(),this.defaultView=e,this[F]=this,this.documentElement=In(new _n,this,"html"),this.body=In(new Rn,this,"body"),this.head=In(new Pn,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 bn(this,e)}createElement(e){let n=String(e);return ho(n),_r(this,X(n))}createElementNS(e,n){let r=tn(e,n,"element");return _r(this,r.qualifiedName,r.namespace,r.prefix,r.localName)}[nt](e,n,r,o){return _r(this,e,n,r,o)}createTextNode(e){let n=Cn(new lt(e),this);return this[Y].createText?.(n,n.data),n}createComment(e){return Cn(new ct(e),this)}createDocumentFragment(){return Cn(new dt,this)}createEvent(){return new J("")}getElementById(e){return yn(this,e)}getElementsByTagName(e){return En(this,e)}importNode(e,n){if(e.nodeType===Fe)throw j("Cannot import a document node","NotSupportedError");return gn(e,n,this)}adoptNode(e){if(e[F]===this)return e;let n=hn(e);return Q(()=>{let r=e.parentNode;return r?_o(r,e,n,this):Lt(n.nodes,this),e})}};function Cn(t,e){return Object.defineProperty(t,F,{value:e,writable:!0,enumerable:!1}),t}function _r(t,e,n=G,r=null,o=e){let s;if(n===fe)s=new at;else if(n===G&&o==="template")s=new ut;else if(n===G){let i=t.defaultView.customElements.get(o);s=i?new i:new K}else s=new K;return In(s,t,e,n,r)}function In(t,e,n,r=G,o=null){return Cn(t,e),Object.defineProperties(t,{[M]:{value:n},[L]:{value:r},[Ce]:{value:o}}),e[Y].createElement?.(t,r),t}var Dn=class extends J{constructor(e,n){super(e,n),this.detail=n?.detail??null}initCustomEvent(e,n,r,o){super.initEvent(e,n,r),this.detail=o??null}};var Mn=class extends J{constructor(e,n){super(e,n),this.message=n.message,this.filename=n.filename,this.lineno=n.lineno,this.colno=n.colno,this.error=n.error}};var Ln=class extends J{constructor(e,n){super(e,n),this.promise=n.promise,this.reason=n.reason}};var $n=class extends J{constructor(e,n){super(e,n),this.oldState=n.oldState,this.newState=n.newState}};var Hn=class extends J{constructor(e,n={}){super(e,n),this.relatedTarget=n.relatedTarget??null}};var Un=class extends J{constructor(e,n={}){super(e,n),this.clipboardData=n.clipboardData??null}};var Gn=class extends K{};var Pi=/^[a-z][^A-Z\\u0000\\t\\n\\f\\r />]*-[^A-Z\\u0000\\t\\n\\f\\r />]*$/u,_i=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);function Uo(t){return Pi.test(t)&&!_i.has(t)}function Go(t){return j(`Invalid custom element name: "${t}"`,"SyntaxError")}var jn=class{registry=new Map;listenersByName=new Map;define(e,n,r){if(!Uo(e))throw Go(e);if(this.registry.has(e))throw j(`A custom element named "${e}" has already been defined`,"NotSupportedError");if(this.getName(n)!=null)throw j("This constructor has already been registered in this custom element registry","NotSupportedError");this.registry.set(e,n);let o=this.listenersByName.get(e);if(o!=null){this.listenersByName.delete(e);for(let s of o)s(n)}}get(e){return this.registry.get(e)}getName(e){for(let[n,r]of this.registry)if(r===e)return n;return null}whenDefined(e){if(!Uo(e))return Promise.reject(Go(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 Ci=["onerror","onunhandledrejection"],zo=Symbol.for("@remote-dom/polyfill/global-property");function Vo(t){return Object.getOwnPropertyDescriptors(t)}function Fo(t){let e={};for(let[n,r]of Object.entries(Object.getOwnPropertyDescriptors(Le.prototype)))n!=="constructor"&&typeof r.value=="function"&&(r.value=Cr(r.value.bind(t)),e[n]=r);return e}function Bo(t){let e={};for(let n of Ci)e[n]={configurable:!0,enumerable:!0,get:Cr(()=>t[n]),set:Cr(r=>{t[n]=r})};return e}function Ii(t){return Object.assign(Vo(t),Fo(t),Bo(t))}function Cr(t){return Object.defineProperty(t,zo,{value:!0}),t}function jo(t,e){for(let n of Reflect.ownKeys(e)){let r=Di(t,n);(r==null||Mi(r))&&Object.defineProperty(t,n,e[n])}}function Di(t,e){let n=t;for(;n;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function Mi(t){return[t.value,t.get,t.set].some(e=>typeof e=="function"&&e[zo]===!0)}var qe=class extends Le{[Y]={};[Qt]=[];[Ve]=$i(this);name="";window=this;parent=this;self=this;top=this;document=new jt(this);customElements=new jn;location=globalThis.location;navigator=globalThis.navigator;Event=J;ErrorEvent=Mn;PromiseRejectionEvent=Ln;ToggleEvent=$n;FocusEvent=Hn;ClipboardEvent=Un;EventTarget=Le;CustomEvent=Dn;Node=me;ParentNode=we;ChildNode=$e;DocumentFragment=dt;Document=jt;CharacterData=He;Comment=ct;Text=lt;Element=K;HTMLElement=Gn;SVGElement=at;HTMLTemplateElement=ut;MutationObserver=xn;#t=null;#n=null;#e=null;static with(...e){let n=this;return class extends n{constructor(){super();for(let o of e)Li(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=Vo(e),s=Object.assign(Fo(e),Bo(e));delete o.self,Object.defineProperties(globalThis,o),jo(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),jo(n,s))}static setGlobalThis(e){for(let n in e)e[n]===e&&(e[n]=globalThis);Object.defineProperties(globalThis,Ii(e))}};function Li(t,e){t[Qt].push(e(t)??{})}function $i(t){return{createElement:Ae.bind(null,t,"createElement"),setAttribute:Ae.bind(null,t,"setAttribute"),removeAttribute:Ae.bind(null,t,"removeAttribute"),createText:Ae.bind(null,t,"createText"),setText:Ae.bind(null,t,"setText"),insertChild:Ae.bind(null,t,"insertChild"),removeChild:Ae.bind(null,t,"removeChild"),addEventListener:Ae.bind(null,t,"addEventListener"),removeEventListener:Ae.bind(null,t,"removeEventListener")}}function Ae(t,e,...n){for(let s of t[Qt])s[e]?.apply(s,n);let r=t[Y];r[e]?.apply(r,n)}var zn=new qe;var Ir="~";var Ue=new WeakMap;function ft(t){return Ue.get(t)}var $r=new WeakMap,Ui=0;function ce(t){let e=$r.get(t);return e==null&&(e=String(Ui++),Vn(t,e)),e}function Vn(t,e){$r.set(t,e)}var Mr=new WeakMap;function Gi(t){return Mr.get(t)}var Lr=new WeakMap;function ji(t){let e=Lr.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 zi=new WeakMap;function Vi(t){return zi.get(t)}function Hr(t,e,n){let r=Mr.get(t);if(r==null&&(r={},Mr.set(t,r)),r[e]===n)return;r[e]=n;let o=Ue.get(t);o?.mutate([[3,ce(t),e,n,1]])}function Ge(t,e,n){let r=Lr.get(t);if(r==null&&(r={},Lr.set(t,r)),r[e]===n)return;n==null?delete r[e]:r[e]=String(n);let o=Ue.get(t);o?.mutate([[3,ce(t),e,n,2]])}function pt(t,e){if(Ue.get(t)!==e&&(Ue.set(t,e),t.childNodes))for(let r=0;r<t.childNodes.length;r++)pt(t.childNodes[r],e)}function Fn(t){if(Ue.get(t)!=null&&(Ue.delete(t),t.childNodes))for(let n=0;n<t.childNodes.length;n++)Fn(t.childNodes[n])}function mt(t){let{nodeType:e}=t;switch(e){case 1:return{id:ce(t),type:e,element:t.localName,properties:Dr(Gi(t)),attributes:Dr(ji(t)),eventListeners:Dr(Vi(t)),children:Array.from(t.childNodes).map(mt)};case 3:case 8:return{id:ce(t),type:e,data:t.data};default:throw new Error(`Cannot serialize node of type ${t.nodeType} (${typeof t.nodeType})`)}}function Dr(t){return t?{...t}:void 0}function Ur(t,e,...n){let r=$r.get(t),o=Ue.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 ht=zn[Y];ht.insertChild=(t,e,n)=>{let r=ft(t);r!=null&&(pt(e,r),r.mutate([[0,ce(t),mt(e),n]]))};ht.removeChild=(t,e,n)=>{let r=ft(t);r!=null&&(Fn(e),r.mutate([[1,ce(t),n]]))};ht.setText=(t,e)=>{let n=ft(t);n?.mutate([[2,ce(t),e]])};ht.setAttribute=(t,e,n)=>{t.tagName.includes("-")||Ge(t,e,n)};ht.removeAttribute=(t,e)=>{t.tagName.includes("-")||Ge(t,e)};qe.setGlobal(zn);var qo=["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"],Xo=["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"],Ko=["self","postMessage","setTimeout","clearTimeout","setInterval","clearInterval","queueMicrotask","structuredClone","crypto","console","DOMException"],Zo=["TEMPORARY","PERSISTENT"],pu=Object.freeze([...qo,...Xo,...Ko,...Zo]),mu=Object.freeze(["constructor","__defineGetter__","__defineSetter__","hasOwnProperty","__lookupGetter__","__lookupSetter__","isPrototypeOf","propertyIsEnumerable","toString","valueOf","__proto__","toLocaleString"]),Wo=t=>typeof t=="symbol"?`[${t.description??"symbol"}]`:t;function Jo(t=globalThis,e=[],n={}){let r=[],o=[],s=new Set([...qo,...Xo,...Ko,...e,"constructor",Symbol.toStringTag]),i=(p,w)=>{let T=Reflect.getOwnPropertyDescriptor(p,w);return T===void 0||!("value"in T)||T.writable||T.configurable?!1:n.primitivesStay&&typeof w=="symbol"&&(typeof T.value!="object"||T.value===null)&&typeof T.value!="function"?!0:Zo.includes(w)&&typeof T.value=="number"},a=t,l=a.setTimeout,c=a.setInterval,m=a.crypto,h=(p,w)=>function(T,f,...v){if(typeof T!="function")throw new TypeError(`${w} takes a function: a guest view cannot run code from text`);return p.call(t,T,f,...v)},E=m?Object.freeze({getRandomValues:p=>m.getRandomValues(p)}):void 0,b=a.document?.defaultView;if(b&&b!==a)for(let p of Reflect.ownKeys(b))typeof p=="symbol"||s.has(p)||Reflect.deleteProperty(b,p)||o.push(`window.${p}`);let u=[];for(let p=t;p&&p!==Object.prototype;p=Object.getPrototypeOf(p))u.push(p);for(let p of u)for(let w of Reflect.ownKeys(p))s.has(w)||(Reflect.deleteProperty(p,w)?r.push(Wo(w)):i(p,w)||o.push(Wo(w)));let O=()=>function(){throw new EvalError("A guest view cannot make code from text.")},d=[Function.prototype,Object.getPrototypeOf(async function(){}),Object.getPrototypeOf(function*(){}),Object.getPrototypeOf(async function*(){})];for(let p of d){let w=O();Object.defineProperty(w,"prototype",{value:p,writable:!1,enumerable:!1,configurable:!1}),Reflect.defineProperty(p,"constructor",{value:w,writable:!1,enumerable:!1,configurable:!1})||o.push("Function.prototype.constructor"),p===Function.prototype&&Reflect.defineProperty(t,"Function",{value:w,writable:!0,enumerable:!1,configurable:!0})}let y=(p,w)=>{Reflect.defineProperty(t,p,{value:w,writable:!0,enumerable:!0,configurable:!0})||o.push(p)};y("setTimeout",h(l,"setTimeout")),y("setInterval",h(c,"setInterval")),E&&y("crypto",E);for(let p of u.slice(1))Object.freeze(p);for(let p of Reflect.ownKeys(t)){let w=Reflect.getOwnPropertyDescriptor(t,p);Reflect.defineProperty(t,p,"value"in w?{...w,writable:!1,configurable:!1}:{...w,configurable:!1})}let R;try{R=Reflect.preventExtensions(t)}catch{R=!1}return{removed:r,stuck:o,sealed:R}}var zt=class extends HTMLElement{constructor(){super(),Vn(this,Ir)}connect(e){if(ft(this)===e||(pt(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,Ir,mt(o),r])}e.mutate(n)}updateRemoteProperty(e,n){Hr(this,e,n)}callRemoteMethod(e,...n){return Ur(this,e,...n)}};var x={},Gr={empty:!0},Fi={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"},gt={div:x,section:x,article:x,aside:x,header:x,footer:x,nav:x,hgroup:x,search:x,address:x,figure:x,figcaption:x,blockquote:x,p:x,pre:x,hr:Gr,br:Gr,wbr:Gr,h1:x,h2:x,h3:x,h4:x,h5:x,h6:x,span:x,strong:x,em:x,b:x,i:x,u:x,s:x,small:x,mark:x,abbr:x,cite:x,q:x,code:x,kbd:x,samp:x,var:x,sub:x,sup:x,dfn:x,bdi:x,bdo:x,ruby:x,rt:x,rp:x,time:{attributes:{datetime:"text"}},data:{attributes:{value:"text"}},del:{attributes:{datetime:"text"}},ins:{attributes:{datetime:"text"}},a:{attributes:{href:"link"}},ul:x,menu:x,dl:x,dt:x,dd:x,ol:{attributes:{start:"number",reversed:"boolean",type:{oneOf:["1","a","A","i","I"]}}},li:{attributes:{value:"number"}},table:x,caption:x,thead:x,tbody:x,tfoot:x,tr:x,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:x,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:x,output:x,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":{empty:!0,attributes:{autoplay:"boolean",cover:"boolean"}}},Bi=["fill","fill-opacity","fill-rule","stroke","stroke-width","stroke-linecap","stroke-linejoin","stroke-dasharray","stroke-dashoffset","stroke-opacity","stroke-miterlimit","opacity","color","display","visibility","transform-origin","clip-path","clip-rule","marker-start","marker-mid","marker-end","font-family","font-size","font-weight","font-style","text-anchor","dominant-baseline","alignment-baseline","letter-spacing","text-decoration","paint-order","vector-effect","shape-rendering","pointer-events","stop-color","stop-opacity","overflow","mask","filter","flood-color","flood-opacity","lighting-color","color-interpolation-filters"],Yi={id:"text",class:"text",style:"style",lang:"text",role:"text",tabindex:{oneOf:["-1","0"]},transform:"geometry",...Object.fromEntries(Bi.map(t=>[t,"css"]))},Oe={x:"geometry",y:"geometry",width:"geometry",height:"geometry"},Bn={viewBox:"geometry",preserveAspectRatio:"geometry"},Qo={oneOf:["userSpaceOnUse","objectBoundingBox"]},es={oneOf:["R","G","B","A"]},ye={...Oe,in:"text",result:"text"},ts={gradientUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]},gradientTransform:"geometry",spreadMethod:{oneOf:["pad","reflect","repeat"]},href:"fragment"},Yn={svg:{attributes:{...Oe,...Bn}},g:x,defs:x,symbol:{attributes:{...Oe,...Bn,refX:"geometry",refY:"geometry"}},use:{attributes:{...Oe,href:"fragment"}},title:x,desc:x,path:{attributes:{d:"geometry",pathLength:"number"}},rect:{attributes:{...Oe,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",...ts}},radialGradient:{attributes:{cx:"geometry",cy:"geometry",r:"geometry",fx:"geometry",fy:"geometry",fr:"geometry",...ts}},stop:{attributes:{offset:"geometry"}},clipPath:{attributes:{clipPathUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]}}},mask:{attributes:{...Oe,maskUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]},maskContentUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]}}},pattern:{attributes:{...Oe,...Bn,patternUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]},patternContentUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]},patternTransform:"geometry",href:"fragment"}},marker:{attributes:{...Bn,markerWidth:"geometry",markerHeight:"geometry",refX:"geometry",refY:"geometry",orient:"geometry",markerUnits:{oneOf:["strokeWidth","userSpaceOnUse"]}}},a:x,filter:{attributes:{...Oe,filterUnits:Qo,primitiveUnits:Qo}},feBlend:{attributes:{...ye,in2:"text",mode:"text"}},feColorMatrix:{attributes:{...ye,type:{oneOf:["matrix","saturate","hueRotate","luminanceToAlpha"]},values:"geometry"}},feComponentTransfer:{attributes:ye},...Object.fromEntries(["feFuncR","feFuncG","feFuncB","feFuncA"].map(t=>[t,{attributes:{type:{oneOf:["identity","table","discrete","linear","gamma"]},tableValues:"geometry",slope:"number",intercept:"number",amplitude:"number",exponent:"number",offset:"number"}}])),feComposite:{attributes:{...ye,in2:"text",operator:{oneOf:["over","in","out","atop","xor","lighter","arithmetic"]},k1:"number",k2:"number",k3:"number",k4:"number"}},feDisplacementMap:{attributes:{...ye,in2:"text",scale:"number",xChannelSelector:es,yChannelSelector:es}},feDropShadow:{attributes:{...ye,dx:"number",dy:"number",stdDeviation:"geometry"}},feFlood:{attributes:ye},feGaussianBlur:{attributes:{...ye,stdDeviation:"geometry",edgeMode:{oneOf:["duplicate","wrap","none"]}}},feMerge:{attributes:ye},feMergeNode:{attributes:{in:"text"}},feMorphology:{attributes:{...ye,operator:{oneOf:["erode","dilate"]},radius:"geometry"}},feOffset:{attributes:{...ye,dx:"number",dy:"number"}},feTurbulence:{attributes:{...Oe,result:"text",type:{oneOf:["fractalNoise","turbulence"]},baseFrequency:"geometry",numOctaves:"number",seed:"number",stitchTiles:{oneOf:["stitch","noStitch"]}}}};var ns=["alert","alertdialog","dialog","banner","main","navigation","contentinfo","complementary","search","form","application","status","log","marquee","timer"],rs=["region"],jr={nav:"div",header:"div",footer:"div",aside:"div",search:"div",output:"span"},Wn={section:["aria-label","title"]},os=["aria-labelledby","aria-describedby"];function Wi(t){return/^aria-[a-z]+$/.test(t)}function qi(t){return/^data-[a-z0-9][a-z0-9_.-]*$/.test(t)}var zr=4e3,ss=1e5,Vt=512e3,Vr=1e4,is="http://www.w3.org/1999/xhtml",as="http://www.w3.org/2000/svg",Xi=new Map(Object.keys(Yn).map(t=>[t.toLowerCase(),t]));function qn(t){return Xi.get(t.toLowerCase())}function Xn(t,e,n){let r=n.toLowerCase(),o=t==="html"?[gt[e]?.attributes,Fi]:[Yn[e]?.attributes,Yi],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(Wi(r)||qi(r))return{name:r,kind:"text"}}function ls(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 cs=["wheel","drag","pinch"];var Kn=/^\\d{4}-\\d{2}-\\d{2}$/;function Ki(t,e){if(typeof t!="string"||typeof e!="string"||!Kn.test(t)||!Kn.test(e))return;let n=Math.round((Date.parse(`${t}T00:00:00Z`)-Date.parse(`${e}T00:00:00Z`))/864e5);return Number.isFinite(n)?n:void 0}function ds(t,e,n={}){let r=Ki(t,e);if(r===void 0)return"";if(r===0)return"today";if(r===1)return"tomorrow";if(r<0&&n.due===!0)return"overdue";if(r===-1)return"yesterday";let o=Math.abs(r),[s,i]=o<14?[o,"day"]:o<60?[Math.round(o/7),"week"]:o<730?[Math.round(o/30.44),"month"]:[Math.round(o/365.25),"year"],a=`${s} ${i}${s===1?"":"s"}`;return r>0?`in ${a}`:`${a} ago`}function us(t,e){if(typeof t!="string")return;if(Kn.test(t))return t;let n=Date.parse(t);if(Number.isFinite(n)){if(!/(Z|[+-]\\d\\d:?\\d\\d)$/.test(t))return Kn.test(t.slice(0,10))?t.slice(0,10):void 0;try{let r=new Intl.DateTimeFormat("en-CA",{timeZone:e||"UTC",year:"numeric",month:"2-digit",day:"2-digit"}).formatToParts(n),o=s=>r.find(i=>i.type===s)?.value??"";return`${o("year")}-${o("month")}-${o("day")}`}catch{return new Date(n).toISOString().slice(0,10)}}}var fs="~",Zn=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),Ne=(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=>Ne(n,e+1)):Object.fromEntries(Object.entries(t).map(([n,r])=>[n,Ne(r,e+1)]))};function ps(){let t=new Map,e=new Map,n=new Map([[fs,{children:[],listeners:new Map}]]),r=0,o=c=>{let m=e.get(c);return m===void 0&&(m=r+=1,e.set(c,m),t.set(m,{listener:c,count:0})),t.get(m).count+=1,m},s=c=>{let m=t.get(c);m&&(m.count-=1,!(m.count>0)&&(t.delete(c),e.delete(m.listener)))},i=c=>{let m=n.get(c);if(m){n.delete(c);for(let h of m.listeners.values())s(h);for(let h of m.children)i(h)}},a=(c,m,h=0)=>{if(!Zn(c)||h>64)return Ne(c);let E=typeof c.id=="string"?c.id:void 0,b=m&&E!==void 0&&E!==fs;b&&i(E);let u={children:[],listeners:new Map};b&&n.set(E,u);let O={};for(let[d,y]of Object.entries(c))d==="children"&&Array.isArray(y)?O[d]=y.map(R=>{let p=a(R,b,h+1);return b&&Zn(R)&&typeof R.id=="string"&&u.children.push(R.id),p}):d==="eventListeners"&&Zn(y)?O[d]=Object.fromEntries(Object.entries(y).map(([R,p])=>{if(typeof p!="function"||!b)return[R,void 0];let w=o(p);return u.listeners.set(R,w),[R,{listener:w}]})):O[d]=Ne(y,h+1);return O},l=c=>{if(!Array.isArray(c))return Ne(c);let[m,h]=c,E=typeof h=="string"?n.get(h):void 0;if(m===0){let b=a(c[2],E!==void 0),u=Zn(c[2])?c[2].id:void 0;if(E&&typeof u=="string"&&n.has(u)){let O=Number(c[3]);E.children.splice(Number.isInteger(O)&&O>=0&&O<=E.children.length?O:E.children.length,0,u)}return[m,Ne(h),b,Ne(c[3])]}if(m===1){let b=Number(c[2]);return E&&Number.isInteger(b)&&b>=0&&b<E.children.length&&i(E.children.splice(b,1)[0]),Ne(c)}if(m===3&&c[4]===3){let b=String(c[2]),u=c[3],O=E&&typeof u=="function"?o(u):void 0,d=E?.listeners.get(b);return d!==void 0&&s(d),O===void 0?E?.listeners.delete(b):E.listeners.set(b,O),[m,Ne(h),b,O===void 0?void 0:{listener:O},3]}return Ne(c)};return{encode:c=>c.map(l),listener:c=>t.get(c)?.listener,get listening(){return t.size},get nodes(){return n.size-1}}}var Fr="graview-view-root",Zi=["value","checked","key","pressed","files","refused","x","y","width","height","deltaX","deltaY","deltaMode","ctrlKey","metaKey","phase","pointerId","button","pressure","dx","dy","scale","rotation"],Ji=t=>t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/\'/g,"'"),Qi=t=>Object.freeze({html:t,toString:()=>t}),ms=t=>typeof t=="object"&&t!==null&&typeof t.html=="string"&&Object.isFrozen(t),hs=t=>t==null||t===!1?"":Array.isArray(t)?t.map(hs).join(""):ms(t)?t.html:Ji(String(t));function gs(t){customElements.get(Fr)||customElements.define(Fr,zt);let e=Event,n=ps(),r=new Set,o=new Set,s,i=[],a=new Set;for(let g of["closest","matches","dataset"]){let k=()=>{throw new TypeError(`A view\'s element has no ${g}: graview.on hands event.element, the element its selector matched; read event.element.getAttribute("data-\\u2026").`)};g in Element.prototype||Object.defineProperty(Element.prototype,g,g==="dataset"?{get:k}:{value:k})}let l=document.createElement(Fr),c=g=>{let k=P=>{for(let I of Array.from(P.childNodes)){if(I.nodeType!==1)continue;if(ce(I)===g)return I;let D=k(I);if(D)return D}};return k(l)},m=g=>{let k=c(g.target);if(!k)return;let P=new e(g.event,{bubbles:!0}),I={};for(let D of Zi)g[D]!==void 0&&(I[D]=g[D]);for(let D of Object.keys(I))Object.defineProperty(P,D,{value:I[D],enumerable:!0});k.dispatchEvent(P);for(let D of o){if(D.type!==g.event)continue;let U;try{U=new Set(Array.from(l.querySelectorAll(D.selector)))}catch{continue}for(let re=k;re&&re!==l;re=re.parentNode)if(U.has(re)){D.listener(Object.freeze({type:g.event,target:k,element:re,...I}));break}}},h=g=>{if(g.type==="dom-event"&&typeof g.target=="string")return m(g);if(g.type==="notice")return t.warn(g.text);if(g.type!=="props")return;s=g.props;let k=t.now();for(let D of r)try{D(g.props)}catch(U){t.threw(U)}let P=t.now()-k,I=g.push;typeof I=="number"&&t.microtask(()=>t.microtask(()=>t.send({type:"pushed",push:I,ms:P})))},E;l.connect({mutate(g){E||(E=[],t.microtask(()=>{let k=E??[];E=void 0,t.send({type:"render",records:n.encode(k)})})),E.push(...g)},call:()=>{}});let b=g=>g.nodeType===1?g.getAttribute("data-key")??g.getAttribute("id"):null,u=(g,k)=>g.nodeType===k.nodeType&&(g.nodeType!==1||g.localName===k.localName&&g.namespaceURI===k.namespaceURI&&b(g)===b(k));function O(g,k){let P=Array.from(k.childNodes),I=0;for(let D of P){let U=g.childNodes[I]??null;if(U&&u(U,D)){d(U,D),I+=1;continue}if(b(D)!==null){let _e=Array.from(g.childNodes).slice(I+1).find(vt=>u(vt,D));if(_e){g.insertBefore(_e,U),d(_e,D),I+=1;continue}}g.insertBefore(D,U),I+=1}for(;g.childNodes.length>I;)g.removeChild(g.lastChild)}function d(g,k){if(g.nodeType!==1){g.data!==k.data&&(g.data=k.data);return}let P=g,I=k,D=y(P);for(let U of P.getAttributeNames())I.hasAttribute(U)||(P.removeAttribute(U),D&&Ge(P,U,void 0));for(let U of I.getAttributeNames()){let re=I.getAttribute(U);P.getAttribute(U)!==re&&P.setAttribute(U,re),D&&Ge(P,U,re)}O(P,I)}let y=g=>g.localName.includes("-");function R(g){for(let k of Array.from(g.childNodes)){if(k.nodeType!==1)continue;let P=k;if(y(P))for(let I of P.getAttributeNames())Ge(P,I,P.getAttribute(I)??void 0);R(P)}}function p(g,k,P){for(let I of Array.from(g.childNodes)){if(I.nodeType!==1)continue;let D=I,U=D.localName,re=k||U.toLowerCase()==="svg",_e=re?qn(U):Object.prototype.hasOwnProperty.call(gt,U.toLowerCase())?U.toLowerCase():void 0;if(!_e){P.add(`<${U}>`);continue}for(let vt of D.getAttributeNames())(!Xn(re?"svg":"html",_e,vt)||!re&&Wn[_e]?.includes(vt.toLowerCase()))&&P.add(`${_e} ${vt}`);p(D,re,P)}}function w(g){let k=document.createElement("div"),P=Array.isArray(g)?g:[g];for(let D of P)if(D!=null)if(typeof D=="string"||ms(D)){let U=document.createElement("div");U.innerHTML=typeof D=="string"?D:D.html,k.append(...Array.from(U.childNodes))}else k.append(D);let I=new Set;p(k,!1,I),i=[...I],i.length>0&&t.warn(`The host will not draw: ${i.join(", ")}`),R(k),O(l,k)}let T=[],f=new Set(cs),v="[]",N=!1,C=()=>{N||(N=!0,t.microtask(()=>{N=!1;let g=[...new Map([...o].filter(P=>f.has(P.type)).map(P=>[`${P.type} ${P.selector}`,{event:P.type,selector:P.selector}])).entries()].sort(([P],[I])=>P<I?-1:P>I?1:0).map(([,P])=>P),k=JSON.stringify(g);k!==v&&(v=k,t.send({type:"gestures",bound:g}))}))},_="[[],[]]",S=!1,z=()=>{S||(S=!0,t.microtask(()=>{S=!1;let g=D=>[...new Set([...o].filter(U=>U.type===D&&typeof U.selector=="string").map(U=>U.selector))].sort().slice(0,200),k=g("click"),P=g("acted"),I=JSON.stringify([k,P]);I!==_&&(_=I,t.send({type:"clicks",selectors:k,...P.length>0?{acted:P}:{}}))}))},$=Object.freeze({get props(){return s},onProps(g){return r.add(g),s&&g(s),()=>void r.delete(g)},render:w,style(g){typeof g!="string"||T.includes(g)||(T.push(g),t.send({type:"style",sheets:[...T]}))},on(g,k,P){let I={type:g,selector:k,listener:P};return o.add(I),typeof g=="string"&&!a.has(g)&&(a.add(g),t.send({type:"hears",events:[g]})),f.has(g)&&C(),(g==="click"||g==="acted")&&z(),()=>{o.delete(I),f.has(g)&&C(),(g==="click"||g==="acted")&&z()}},act:(g,k={})=>t.act(g,k),navigate(g){if(typeof g=="string")return t.navigate(g);let k=ls(g);k&&t.send(k)},html(g,...k){return Qi(g.reduce((P,I,D)=>P+I+(D<k.length?hs(k[D]):""),""))},get today(){return s?.today??new Date().toISOString().slice(0,10)},fromToday(g,k){let P=us(g,s?.timeZone);return P===void 0?"":ds(P,$.today,k)},get refused(){return i},get hardening(){return t.hardening()}});return{view:$,hear:h,find:g=>{try{let k=l.querySelectorAll(g)[0];return k?ce(k):void 0}catch{return}},listened:g=>{let k=new Set;for(let P of o)if(P.type===g)try{for(let I of Array.from(l.querySelectorAll(P.selector))){let D=ce(I);D&&k.add(D)}}catch{}return[...k]}}}var ys=t=>t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"");function Ft(t,e){let n=t.find(s=>s.as===e);if(n)return n;let r=e.trim().toLowerCase(),o=ys(e);return t.find(s=>s.title!==void 0&&s.title.trim().toLowerCase()===r)??(o?t.find(s=>s.as===o||s.title!==void 0&&ys(s.title)===o):void 0)}var Te=t=>` Its places: ${t.map(e=>typeof e=="string"?`"${e}"`:e.title&&e.title!==e.as?`"${e.as}" (${e.title})`:`"${e.as}"`).join(", ")||"none"}.`,yt=" This run was not handed the views the host keeps, so a titled view\'s place is not among these: if it names one, the link goes there.",Bt=t=>`"${t.length>80?`${t.slice(0,79)}\\u2026`:t}"`;var ea=t=>typeof t=="string"&&/^#[A-Za-z_][A-Za-z0-9_.:-]{0,199}$/.test(t),bs=["https:","mailto:","tel:"];function Es(t){if(!(typeof t!="string"||t.length>2e3||/[\\s<>"]/.test(t.trim())||t.trim()!==t))try{let e=new URL(t);return!bs.includes(e.protocol)||e.protocol==="https:"&&(e.hostname===""||e.username!==""||e.password!=="")?void 0:e.href}catch{return}}function ws(t){let e=new Set,n=r=>{if(typeof r!="string"||!/^(https|mailto|tel):/i.test(r))return;let o=Es(r);o&&e.add(o)};for(let r of[...t?.node?[t.node]:[],...t?.nodes??[]])for(let[o,s]of Object.entries(r))o==="id"||o==="kind"||(Array.isArray(s)?s.forEach(n):n(s));return e}function Ns(t){return(t??[]).flatMap(e=>{try{let n=new URL(e);return n.protocol==="https:"&&n.hostname!==""&&n.username===""&&n.password===""?[n.origin]:[]}catch{return[]}})}function Ts(t,e){if(ea(t))return t;let n=Es(t);if(n&&(e.handed.has(n)||n.startsWith("https:")&&Ns(e.origins).includes(new URL(n).origin)))return n}function xs(t,e){let n=t.length>120?`${t.slice(0,119)}\\u2026`:t,r="";try{r=new URL(t).protocol}catch{r=""}if(!bs.includes(r))return`The link "${n}" was not drawn: a view links only to an https:, mailto: or tel: address.`;let o=Ns(e);return`The link "${n}" 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${o.length>0?`, or an https: address on ${o.join(", ")}`:""}; a record or a place of this app is <a data-record> or <a data-place>.`}var Br={nav:"div",header:"div",footer:"div",aside:"div",search:"div",output:"span"},Ss=["all","display","position","top","right","bottom","left","inset","inset-block","inset-inline","inset-block-start","inset-block-end","inset-inline-start","inset-inline-end","width","height","min-width","min-height","max-width","max-height","inline-size","block-size","min-inline-size","min-block-size","max-inline-size","max-block-size","margin","margin-top","margin-right","margin-bottom","margin-left","margin-block","margin-inline","margin-block-start","margin-block-end","margin-inline-start","margin-inline-end","padding","padding-top","padding-right","padding-bottom","padding-left","padding-block","padding-inline","padding-block-start","padding-block-end","padding-inline-start","padding-inline-end","box-sizing","overflow","overflow-x","overflow-y","overflow-wrap","float","clear","z-index","aspect-ratio","object-fit","object-position","vertical-align","isolation","contain","container","container-type","container-name","content-visibility","flex","flex-direction","flex-wrap","flex-flow","flex-grow","flex-shrink","flex-basis","order","grid","grid-template","grid-template-columns","grid-template-rows","grid-template-areas","grid-auto-columns","grid-auto-rows","grid-auto-flow","grid-area","grid-column","grid-row","grid-column-start","grid-column-end","grid-row-start","grid-row-end","gap","row-gap","column-gap","align-items","align-content","align-self","justify-items","justify-content","justify-self","place-items","place-content","place-self","columns","column-count","column-width","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-fill","color","background","background-color","background-image","background-position","background-position-x","background-position-y","background-size","background-repeat","background-origin","background-clip","background-attachment","background-blend-mode","border","border-top","border-right","border-bottom","border-left","border-block","border-inline","border-block-start","border-block-end","border-inline-start","border-inline-end","border-width","border-style","border-color","border-top-width","border-right-width","border-bottom-width","border-left-width","border-top-style","border-right-style","border-bottom-style","border-left-style","border-top-color","border-right-color","border-bottom-color","border-left-color","border-radius","border-top-left-radius","border-top-right-radius","border-bottom-right-radius","border-bottom-left-radius","border-start-start-radius","border-start-end-radius","border-end-start-radius","border-end-end-radius","border-collapse","border-spacing","outline","outline-width","outline-style","outline-color","outline-offset","box-shadow","opacity","visibility","mix-blend-mode","filter","backdrop-filter","clip-path","accent-color","caret-color","color-scheme","appearance","-webkit-appearance","mask-image","mask-size","mask-position","mask-repeat","mask-origin","mask-clip","mask-composite","mask-mode","mask-type","-webkit-mask","-webkit-mask-image","-webkit-mask-size","-webkit-mask-position","-webkit-mask-repeat","-webkit-mask-origin","-webkit-mask-clip","-webkit-mask-composite","font","font-family","font-size","font-weight","font-style","font-stretch","font-variant","font-variant-numeric","font-variant-caps","font-variant-ligatures","font-feature-settings","font-variation-settings","font-kerning","font-optical-sizing","font-size-adjust","font-synthesis","line-height","letter-spacing","word-spacing","text-align","text-align-last","text-indent","text-transform","text-decoration","text-decoration-line","text-decoration-color","text-decoration-style","text-decoration-thickness","text-underline-offset","text-underline-position","text-shadow","text-overflow","text-wrap","text-wrap-mode","text-wrap-style","white-space","white-space-collapse","word-break","line-break","hyphens","tab-size","direction","unicode-bidi","writing-mode","text-orientation","text-rendering","-webkit-font-smoothing","-webkit-line-clamp","-webkit-box-orient","line-clamp","-webkit-text-fill-color","-webkit-background-clip","-webkit-text-stroke","-webkit-text-stroke-width","-webkit-text-stroke-color","list-style","list-style-type","list-style-position","content","quotes","counter-reset","counter-increment","counter-set","table-layout","caption-side","empty-cells","transform","transform-origin","transform-box","transform-style","translate","rotate","scale","perspective","perspective-origin","backface-visibility","transition","transition-property","transition-duration","transition-timing-function","transition-delay","transition-behavior","animation","animation-name","animation-duration","animation-timing-function","animation-delay","animation-iteration-count","animation-direction","animation-fill-mode","animation-play-state","animation-composition","will-change","animation-timeline","animation-range","animation-range-start","animation-range-end","scroll-timeline","scroll-timeline-name","scroll-timeline-axis","view-timeline","view-timeline-name","view-timeline-axis","view-timeline-inset","timeline-scope","cursor","pointer-events","user-select","-webkit-user-select","touch-action","resize","scroll-behavior","overscroll-behavior","overscroll-behavior-x","overscroll-behavior-y","scroll-snap-type","scroll-snap-align","scroll-snap-stop","scroll-margin","scroll-padding","scroll-margin-top","scroll-margin-right","scroll-margin-bottom","scroll-margin-left","scroll-margin-block","scroll-margin-block-start","scroll-margin-block-end","scroll-margin-inline","scroll-margin-inline-start","scroll-margin-inline-end","scroll-padding-top","scroll-padding-right","scroll-padding-bottom","scroll-padding-left","scroll-padding-block","scroll-padding-block-start","scroll-padding-block-end","scroll-padding-inline","scroll-padding-inline-start","scroll-padding-inline-end","scrollbar-width","scrollbar-color","scrollbar-gutter","fill","fill-opacity","fill-rule","stroke","stroke-width","stroke-linecap","stroke-linejoin","stroke-dasharray","stroke-dashoffset","stroke-opacity","stroke-miterlimit","stop-color","stop-opacity","clip-rule","marker","marker-start","marker-mid","marker-end","paint-order","vector-effect","shape-rendering","text-anchor","dominant-baseline","alignment-baseline","r","cx","cy","rx","ry","x","y","d","mask","flood-color","flood-opacity","lighting-color","color-interpolation-filters"],vs=["var","env","calc","min","max","clamp","round","mod","rem","abs","sign","sin","cos","tan","asin","acos","atan","atan2","pow","sqrt","hypot","log","exp","rgb","rgba","hsl","hsla","hwb","lab","lch","oklab","oklch","color","color-mix","light-dark","linear-gradient","radial-gradient","conic-gradient","repeating-linear-gradient","repeating-radial-gradient","repeating-conic-gradient","translate","translatex","translatey","translatez","translate3d","rotate","rotatex","rotatey","rotatez","rotate3d","scale","scalex","scaley","scalez","scale3d","skew","skewx","skewy","matrix","matrix3d","perspective","cubic-bezier","steps","linear","repeat","minmax","fit-content","blur","brightness","contrast","drop-shadow","grayscale","hue-rotate","invert","saturate","sepia","opacity","circle","ellipse","inset","polygon","path","xywh","rect","counter","counters","scroll","view"],ks=["fill","stroke","clip-path","mask","marker","marker-start","marker-mid","marker-end","filter"],As=["media","supports","container","keyframes"],Os={position:["static","relative","absolute","sticky"],all:[],appearance:["auto","none","menulist-button","textfield"],"-webkit-appearance":["auto","none","menulist-button","textfield"]},Rs=["host","host-context","slotted","part","backdrop","picker","view-transition","view-transition-group","view-transition-image-pair","view-transition-old","view-transition-new"],Ps=["-webkit-details-marker"],Yt=64e3;var ee=t=>t>=48&&t<=57,_s=t=>ee(t)||t>=65&&t<=70||t>=97&&t<=102,Kr=t=>t>=65&&t<=90||t>=97&&t<=122,Zr=t=>t>=128,Jn=t=>Kr(t)||Zr(t)||t===95,Cs=t=>Jn(t)||ee(t)||t===45,Is=t=>t===10,Re=t=>t===10||t===9||t===32,ta=t=>t>=0&&t<=8||t===11||t>=14&&t<=31||t===127,be=-1;function na(t){let e=[];for(let n=0;n<t.length;n+=1){let r=t.codePointAt(n);r>65535&&(n+=1),r===13?(t.charCodeAt(n+1)===10&&(n+=1),r=10):r===12?r=10:(r===0||r>=55296&&r<=57343)&&(r=65533),e.push(r)}return e}function Jr(t){let e=na(t),n=0,r=(d=0)=>n+d<e.length?e[n+d]:be,o=[],s=(d,y)=>d===92&&y!==10&&y!==be,i=(d,y,R)=>d===45?Jn(y)||y===45||s(y,R):Jn(d)?!0:s(d,y),a=(d,y,R)=>d===43||d===45?ee(y)||y===46&&ee(R):ee(d===46?y:d),l=()=>{let d=r();if(n+=1,d===be)return 65533;if(_s(d)){let y=String.fromCodePoint(d);for(;y.length<6&&_s(r());)y+=String.fromCodePoint(r()),n+=1;Re(r())&&(n+=1);let R=parseInt(y,16);return R===0||R>=55296&&R<=57343||R>1114111?65533:R}return d},c=()=>{let d="";for(;;){let y=r();if(Cs(y))d+=String.fromCodePoint(y),n+=1;else if(s(y,r(1)))n+=1,d+=String.fromCodePoint(l());else return d}},m=()=>{let d="";for((r()===43||r()===45)&&(d+=String.fromCodePoint(e[n++]));ee(r());)d+=String.fromCodePoint(e[n++]);if(r()===46&&ee(r(1)))for(d+=String.fromCodePoint(e[n++],e[n++]);ee(r());)d+=String.fromCodePoint(e[n++]);if((r()===69||r()===101)&&(ee(r(1))||(r(1)===43||r(1)===45)&&ee(r(2))))for(d+=String.fromCodePoint(e[n++]),ee(r())||(d+=String.fromCodePoint(e[n++]));ee(r());)d+=String.fromCodePoint(e[n++]);return d},h=()=>{let d=m();return i(r(),r(1),r(2))?{type:"dimension",repr:d,unit:c()}:r()===37?(n+=1,{type:"percentage",repr:d}):{type:"number",repr:d}},E=()=>{for(;;){let d=r();if(n+=1,d===41||d===be)return;s(d,r())&&l()}},b=()=>{let d="";for(;Re(r());)n+=1;for(;;){let y=r();if(n+=1,y===41)return{type:"url",value:d};if(y===be)return{type:"url",value:d};if(Re(y)){for(;Re(r());)n+=1;return r()===41||r()===be?(r()===41&&(n+=1),{type:"url",value:d}):(E(),{type:"bad-url"})}if(y===34||y===39||y===40||ta(y))return E(),{type:"bad-url"};if(y===92){if(s(y,r()))d+=String.fromCodePoint(l());else return E(),{type:"bad-url"};continue}d+=String.fromCodePoint(y)}},u=()=>{let d=c();if(d.toLowerCase()==="url"&&r()===40){for(n+=1;Re(r())&&Re(r(1));)n+=1;let y=Re(r())?r(1):r();return y===34||y===39?{type:"function",value:d}:b()}return r()===40?(n+=1,{type:"function",value:d}):{type:"ident",value:d}},O=d=>{let y="";for(;;){let R=r();if(n+=1,R===d||R===be)return{type:"string",value:y};if(Is(R))return n-=1,{type:"bad-string"};if(R===92){if(r()===be)continue;if(Is(r())){n+=1;continue}y+=String.fromCodePoint(l());continue}y+=String.fromCodePoint(R)}};for(;;){for(;r()===47&&r(1)===42;){for(n+=2;r()!==be&&!(r()===42&&r(1)===47);)n+=1;r()!==be&&(n+=2)}let d=r();if(d===be)return o;if(Re(d)){for(;Re(r());)n+=1;o.push({type:"whitespace"});continue}switch(n+=1,d){case 34:case 39:o.push(O(d));continue;case 35:if(Cs(r())||s(r(),r(1))){let y=i(r(),r(1),r(2));o.push({type:"hash",value:c(),id:y})}else o.push({type:"delim",value:"#"});continue;case 40:o.push({type:"("});continue;case 41:o.push({type:")"});continue;case 43:case 46:a(d,r(),r(1))?(n-=1,o.push(h())):o.push({type:"delim",value:String.fromCodePoint(d)});continue;case 44:o.push({type:","});continue;case 45:a(d,r(),r(1))?(n-=1,o.push(h())):r()===45&&r(1)===62?(n+=2,o.push({type:"CDC"})):i(d,r(),r(1))?(n-=1,o.push(u())):o.push({type:"delim",value:"-"});continue;case 58:o.push({type:":"});continue;case 59:o.push({type:";"});continue;case 60:r()===33&&r(1)===45&&r(2)===45?(n+=3,o.push({type:"CDO"})):o.push({type:"delim",value:"<"});continue;case 64:i(r(),r(1),r(2))?o.push({type:"at-keyword",value:c()}):o.push({type:"delim",value:"@"});continue;case 91:o.push({type:"["});continue;case 92:s(d,r())?(n-=1,o.push(u())):o.push({type:"delim",value:"\\\\"});continue;case 93:o.push({type:"]"});continue;case 123:o.push({type:"{"});continue;case 125:o.push({type:"}"});continue;default:ee(d)?(n-=1,o.push(h())):Jn(d)?(n-=1,o.push(u())):o.push({type:"delim",value:String.fromCodePoint(d)})}}}var Hs={"{":"}","[":"]","(":")"},Us=32,Wr=class{tokens;i=0;constructor(e){this.tokens=e}peek(){return this.tokens[this.i]}next(){return this.tokens[this.i++]}};function Gs(t,e){let n=t.next();return n.type==="{"||n.type==="["||n.type==="("?{type:"block",open:n.type,value:Ds(t,Hs[n.type],e+1)}:n.type==="function"?{type:"func",name:n.value,value:Ds(t,")",e+1)}:n}function Ds(t,e,n){let r=[];for(;;){let o=t.peek();if(!o)return r;if(o.type===e)return t.next(),r;if(n>Us){t.next(),r.push({type:"bad-string"});continue}r.push(Gs(t,n))}}function bt(t,e){let n=[],r=0;for(;r<t.length;){let o=t[r];if(o.type==="whitespace"||e&&(o.type==="CDO"||o.type==="CDC")){r+=1;continue}if(o.type==="at-keyword"){let a=[];r+=1;let l;for(;r<t.length;){let c=t[r];if(r+=1,c.type===";")break;if(c.type==="block"&&c.open==="{"){l=c.value;break}a.push(c)}n.push({type:"at-rule",name:o.value,prelude:a,...l?{block:l}:{}});continue}let s=[],i;for(;r<t.length;){let a=t[r];if(r+=1,a.type==="block"&&a.open==="{"){i=a.value;break}s.push(a)}i&&n.push({type:"qualified",prelude:s,block:i})}return n}function Qr(t){let e=[],n=0;for(;n<t.length;){let r=t[n];if(r.type==="whitespace"||r.type===";"){n+=1;continue}if(r.type==="at-keyword"){let s=(()=>{for(let i=n+1;i<t.length;i+=1){let a=t[i];if(a.type===";"||a.type==="block"&&a.open==="{")return i+1}return t.length})();e.push(...bt(t.slice(n,s),!1)),n=s;continue}if(r.type==="ident"){let s=n+1;for(;t[s]?.type==="whitespace";)s+=1;if(t[s]?.type===":"){let i=s+1;for(;i<t.length&&t[i].type!==";";)i+=1;let a=js(r.value,t.slice(s+1,i));if(a.value.some(l=>l.type==="block"&&l.open==="{")){let l=t.findIndex((c,m)=>m>n&&c.type==="block"&&c.open==="{");e.push(...bt(t.slice(n,l+1),!1)),n=l+1;continue}e.push(a),n=i+1;continue}}let o=n;for(;o<t.length&&!(t[o].type==="block"&&t[o].open==="{")&&t[o].type!==";";)o+=1;o<t.length&&t[o].type==="block"&&e.push(...bt(t.slice(n,o+1),!1)),n=o+1}return e}function js(t,e){let n=[...e];for(;n[0]?.type==="whitespace";)n.shift();for(;n.at(-1)?.type==="whitespace";)n.pop();let r=!1,s=n.length-1;if(n[s]?.type==="ident"&&n[s].value.toLowerCase()==="important"){for(s-=1;n[s]?.type==="whitespace";)s-=1;let i=n[s];if(i?.type==="delim"&&i.value==="!")for(r=!0,n.length=s;n.at(-1)?.type==="whitespace";)n.pop()}return{type:"declaration",name:t,value:n,important:r}}function eo(t){let e=new Wr(Jr(t)),n=[];for(;e.peek();)n.push(Gs(e,0));return n}function Et(t){let e="",n=[...t].map(r=>r.codePointAt(0));return n.forEach((r,o)=>{r===0?e+="\\uFFFD":r>=1&&r<=31||r===127||o===0&&ee(r)||o===1&&ee(r)&&n[0]===45?e+=`\\\\${r.toString(16)} `:o===0&&r===45&&n.length===1?e+="\\\\-":Zr(r)||r===45||r===95||ee(r)||Kr(r)?e+=String.fromCodePoint(r):e+=`\\\\${String.fromCodePoint(r)}`}),e}function Qn(t){let e="";for(let n of t){let r=n.codePointAt(0);Zr(r)||r===45||r===95||ee(r)||Kr(r)?e+=n:r>=1&&r<=31||r===127?e+=`\\\\${r.toString(16)} `:e+=`\\\\${n}`}return e}function Wt(t){let e=\'"\';for(let n of t){let r=n.codePointAt(0);r===0?e+="\\uFFFD":r>=1&&r<=31||r===127||r===60||r===62?e+=`\\\\${r.toString(16)} `:r===34||r===92?e+=`\\\\${n}`:e+=n}return`${e}"`}function ra(t){let e=Qn(t);return/^[eE]([0-9]|[+-][0-9])/.test(t)?`\\\\${t.codePointAt(0).toString(16)} ${Qn(t.slice(1))}`:e}var Ms=t=>{switch(t.type){case"ident":case"url":case"bad-url":case"number":case"percentage":case"dimension":case"CDC":case"hash":case"at-keyword":return t.type;case"func":case"function":return"function";case"block":return t.open==="("?"(":"other";case"(":return"(";case"delim":return`delim${t.value}`;default:return"other"}};function oa(t,e){let n=["ident","function","url","bad-url","delim-","number","percentage","dimension","CDC"];return t==="ident"?[...n,"("].includes(e):t==="at-keyword"||t==="hash"||t==="dimension"||t==="delim#"||t==="delim-"?n.includes(e):t==="number"?["ident","function","url","bad-url","number","percentage","dimension","delim%"].includes(e):t==="delim@"?["ident","function","url","bad-url","delim-","CDC"].includes(e):t==="delim."||t==="delim+"?["number","percentage","dimension"].includes(e):t==="delim/"?e==="delim*":!1}function sa(t){switch(t.type){case"whitespace":return" ";case"ident":return Et(t.value);case"at-keyword":return`@${Et(t.value)}`;case"hash":return`#${Qn(t.value)}`;case"string":return Wt(t.value);case"url":return`url(${Wt(t.value)})`;case"delim":return t.value==="\\\\"?`\\\\\n`:t.value;case"CDO":return"<!--";case"CDC":return"-->";case"number":return t.repr;case"percentage":return`${t.repr}%`;case"dimension":return`${t.repr}${ra(t.unit)}`;case"func":return`${Et(t.name)}(${je(t.value)})`;case"block":return`${t.open}${je(t.value)}${Hs[t.open]}`;case":":case";":case",":case"[":case"]":case"(":case")":case"{":case"}":return t.type;default:return""}}function je(t){let e="",n;for(let r of t)r.type==="whitespace"&&n?.type==="whitespace"||(n&&oa(Ms(n),Ms(r))&&(e+="/**/"),e+=sa(r),n=r);return e}var ia=new Set(Ss),zs=new Set(vs),Ls=new Set(ks),aa=new Set(As),la=new Set(Rs),ca=new Set(Ps),$s=/^#[A-Za-z_][A-Za-z0-9_.:-]*$/,Pe=t=>t.replace(/[A-Z]/g,e=>e.toLowerCase()),da=t=>Pe(t);function qr(t,e,n){let r=[];for(let o of e){if(o.type==="bad-url"||o.type==="bad-string"){n({reason:"unreadable",...t?{name:t}:{}});return}if(o.type==="url"){if(t&&Ls.has(t)&&$s.test(o.value)){r.push({type:"func",name:"url",value:[{type:"string",value:o.value}]});continue}n({reason:"url",...t?{name:t}:{}});return}if(o.type==="func"){let s=Pe(o.name);if(s==="url"||s==="src"){let a=o.value.filter(c=>c.type!=="whitespace"),l=a[0];if(s==="url"&&a.length===1&&l?.type==="string"&&t&&Ls.has(t)&&$s.test(l.value)){r.push({type:"func",name:"url",value:[{type:"string",value:l.value}]});continue}n({reason:"url",...t?{name:t}:{}});return}if(!zs.has(s)){n({reason:"function",name:s});return}let i=qr(t,o.value,n);if(!i)return;s==="var"?r.push({type:"whitespace"},{type:"func",name:s,value:i},{type:"whitespace"}):r.push({type:"func",name:s,value:i});continue}if(o.type==="block"){if(o.open==="{"||o.open==="("&&r.at(-1)?.type==="ident"){n({reason:"unreadable",...t?{name:t}:{}});return}let s=qr(t,o.value,n);if(!s)return;r.push({type:"block",open:o.open,value:s});continue}if(o.type==="at-keyword"||o.type==="CDO"||o.type==="CDC"||o.type==="{"||o.type==="}"||o.type===";"||o.type==="delim"&&o.value==="\\\\"){n({reason:"unreadable",...t?{name:t}:{}});return}r.push(o)}return r}var ua=/^(animation|transition|scroll-behavior)/;function tr(t,e,n=!1){let r=t.name.startsWith("--"),o=r?t.name:da(t.name);if(!r&&!ia.has(o)){e({reason:"property",name:o});return}let s=Os[o];if(s){let l=t.value.filter(h=>h.type!=="whitespace"),c=l[0],m=l.length===1&&c?.type==="ident"?Pe(c.value):void 0;if(!m||![...s,"inherit","initial","unset","revert"].includes(m)){e({reason:"value",name:o});return}return`${o}: ${m}${t.important?" !important":""}`}let i=qr(r?void 0:o,t.value,e);if(!i)return;let a=je(i).trim();return`${r?`--${Qn(t.name.slice(2))}`:o}: ${a}${t.important&&!(n&&ua.test(o))?" !important":""}`}function Vs(t,e){let n=r=>{for(let o=0;o<r.length;o+=1){let s=r[o];if(o>0&&r[o-1].type===":"&&(s.type==="ident"||s.type==="func")){let a=Pe(s.type==="ident"?s.value:s.name);if(la.has(a)||(a.startsWith("-webkit-")||a.startsWith("-moz-"))&&!ca.has(a))return e({reason:"selector",name:a}),!1}if(s.type==="url"||s.type==="bad-url"||s.type==="bad-string"||s.type==="at-keyword"||s.type==="CDO"||s.type==="CDC"||s.type==="block"&&s.open==="{")return e({reason:"unreadable",name:"selector"}),!1;if(s.type==="func"&&!n(s.value)||s.type==="block"&&!n(s.value))return!1}return!0};return n(t)}function Yr(t,e,n){let r=[];for(let o of Qr(t))if(o.type==="declaration"){let s=tr(o,e);s&&r.push(`${s};`)}else{let s=er(o,e,n+1,"style");s&&r.push(s)}return r.join(" ")}function fa(t,e,n){let r=o=>o.every(s=>{if(s.type==="url"||s.type==="bad-url"||s.type==="bad-string"||s.type==="block"&&s.open==="{")return n({reason:s.type==="url"?"url":"unreadable",name:`@${e}`}),!1;if(s.type==="func"){let i=Pe(s.name);return e==="supports"&&i==="selector"?Vs(s.value,n):zs.has(i)?r(s.value):(n({reason:"function",name:i}),!1)}if(s.type==="block"){if(e==="supports"){let i=Qr(s.value);if(i.length===1&&i[0].type==="declaration")return tr(i[0],n)!==void 0}return r(s.value)}return!0});return r(t)?je(t).trim():void 0}function Xr(t){return t.map((e,n)=>{let r=t[n-1],o=r?.type===":"||r?.type==="delim"&&(r.value==="."||r.value==="|");return e.type==="ident"&&!o&&Object.prototype.hasOwnProperty.call(Br,Pe(e.value))?{type:"block",open:"[",value:[{type:"ident",value:"data-graview-as"},{type:"delim",value:"="},{type:"string",value:Pe(e.value)}]}:e.type==="func"?{type:"func",name:e.name,value:Xr(e.value)}:e.type==="block"&&e.open==="("?{type:"block",open:"(",value:Xr(e.value)}:e})}function er(t,e,n,r){if(n>Us){e({reason:"unreadable",name:"nesting"});return}if(t.type==="qualified"){if(r==="keyframes"){if(!t.prelude.every(m=>m.type==="whitespace"||m.type===","||m.type==="percentage"||m.type==="ident"&&["from","to"].includes(Pe(m.value)))){e({reason:"unreadable",name:"keyframe"});return}return`${je(t.prelude).trim()} { ${Yr(t.block,e,n)} }`}if(!Vs(t.prelude,e))return;let l=je(Xr(t.prelude)).trim();if(l===""){e({reason:"unreadable",name:"selector"});return}return`${l} { ${Yr(t.block,e,n)} }`}let o=Pe(t.name),s=o==="-webkit-keyframes"?"keyframes":o;if(!aa.has(s)||r==="keyframes"){e({reason:"at-rule",name:`@${o}`});return}if(!t.block){e({reason:"unreadable",name:`@${o}`});return}if(s==="keyframes"){if(r!=="sheet"){e({reason:"at-rule",name:"@keyframes"});return}let l=t.prelude.filter(E=>E.type!=="whitespace"),c=l[0];if(l.length!==1||!c||c.type!=="ident"&&c.type!=="string"){e({reason:"unreadable",name:"@keyframes"});return}let m=bt(t.block,!1).map(E=>er(E,e,n+1,"keyframes")).filter(E=>E!==void 0);return`@keyframes ${c.type==="ident"?Et(c.value):Wt(c.value)} { ${m.join(" ")} }`}let i=fa(t.prelude,s,e);if(i===void 0)return;let a=r==="style"?Yr(t.block,e,n):bt(t.block,!1).map(l=>er(l,e,n+1,"sheet")).filter(l=>l!==void 0).join(" ");return`@${s} ${i} { ${a} }`}function qt(t,e=Yt){let n=[];if(t.length>e)return{css:"",refused:[{reason:"size"}]};let r=s=>void n.push(s);return{css:bt(eo(t),!0).map(s=>er(s,r,0,"sheet")).filter(s=>s!==void 0).join(`\n`),refused:n}}function nr(t,e=Yt){let n=[],r=[],o=0;for(let s of t){if(o+s.length>e){r.push({reason:"size"});continue}o+=s.length;let i=qt(s,e);i.css&&n.push(i.css),r.push(...i.refused)}return{css:n.join(`\n`),refused:r}}function rr(t,e=Yt){let n=[];if(t.length>e)return{css:"",refused:[{reason:"size"}]};let r=s=>void n.push(s),o=[];for(let s of Qr(eo(t))){if(s.type!=="declaration"){r({reason:"unreadable",name:"a rule in a style attribute"});continue}let i=tr(s,r,!0);i&&o.push(i)}return{css:o.join("; "),refused:n}}function or(t,e){let n,r=tr(js(t,eo(e)),o=>n??=o);return r===void 0||n?{refused:n??{reason:"unreadable",name:t}}:{value:r.slice(r.indexOf(":")+1).trim()}}function Fs(t,e){if(e==="svg"){let r=qn(t);return r?{namespace:"svg",name:r}:{refused:{reason:"element",element:t}}}let n=t.toLowerCase();return n==="svg"?{namespace:"svg",name:"svg"}:Object.prototype.hasOwnProperty.call(gt,n)?Object.prototype.hasOwnProperty.call(jr,n)?{namespace:"html",name:jr[n],as:n}:{namespace:"html",name:n}:{refused:{reason:"element",element:t}}}function sr(t,e){return(t==="html"?gt[e]:Yn[e])?.empty===!0}var pa=/^[+-]?(\\d+\\.?\\d*|\\.\\d+)([eE][+-]?\\d+)?$/,ma=/^[0-9A-Za-z\\s.,+\\-%()]*$/,ha=/^#[A-Za-z_][A-Za-z0-9_.:-]*$/,ga=/^data:image\\/(png|gif|jpeg|webp|avif|bmp|svg\\+xml)(;[A-Za-z0-9=._+-]+)*,/i,ya=/^\\/graview\\/assets\\/[0-9a-f]{64}\\.(png|gif|jpe?g|webp|avif|svg|ico)$/,Bs=/\\/graview\\/assets\\/[0-9a-f]{64}\\.(png|gif|jpe?g|webp|avif|svg|ico)$/,ba=/^\\/(?!\\/)(?!(?:.*\\/)?\\.\\.?(?:\\/|$))(?!.*%(?:2e|2f|5c))[^\\\\\\s?#"\'<>]*$/i;function Ea(t,e){if(ya.test(t))return t;let n=t;if(/^https?:\\/\\//i.test(t))try{let r=new URL(t);if(e==="null"||r.origin!==e||r.username!==""||r.password!==""||r.search!==""||r.hash!=="")return;n=t.slice(r.origin.length)}catch{return}if(ba.test(n))return Bs.exec(n)?.[0]}function Ys(t,e={},n){let r=t.length>120?`${t.slice(0,119)}\\u2026`:t,o=Ws(e.origins),s=Bs.exec(t.split(/[?#]/)[0])?.[0],i=n!==void 0&&n>Vt?` It is a data: image of ${n.toLocaleString("en-US")} characters, more than the ${Vt.toLocaleString("en-US")} a view\'s own data: image may be. A picture on a record is drawn at any size by the src the host hands the view (pictures in its manifest), used as it was handed.`:s?e.assets?` It is the app\'s own image only by its path, or under the app\'s base on this page\'s origin: write it as its path, ${s}.`:" This host has not said where the app\'s own images live (asset, on the view\'s definition), so a view here cannot draw one by its path.":/^https:\\/\\//i.test(t)?o.length>0?` Its origin is not one the host lists for images (${o.join(", ")}).`:" The host lists no origin a view\'s images may come from (images.origins, on the view\'s definition).":"",a=["a data: image",...e.assets?["the app\'s own image by the path add_image answered (/graview/assets/<sha256>.<ext>)"]:[],"a picture on a record (pictures in its manifest)",...o.length>0?[`an https: image from ${o.join(", ")}`]:[]];return`The image "${r}" was not drawn.${i} A view here shows ${a.slice(0,-1).join(", ")} or ${a[a.length-1]}.`}function Ws(t){return(t??[]).flatMap(e=>{try{let n=new URL(e);return n.protocol==="https:"&&n.hostname!==""&&n.username===""&&n.password===""?[n.origin]:[]}catch{return[]}})}function wa(t,e){if(!(!e||e.length===0||!/^https:\\/\\//i.test(t)))try{let n=new URL(t);return n.protocol!=="https:"||n.username!==""||n.password!==""?void 0:Ws(e).includes(n.origin)?n.href:void 0}catch{return}}function to(t,e,n,r,o){let s=Xn(t,e,n);if(!s)return{refused:{reason:"attribute",element:e,name:n}};if(t==="html"&&Wn[e]?.includes(s.name))return{refused:{reason:"attribute",element:e,name:n}};if(r===null)return{name:s.name,value:null};let i=Na(s.name,s.kind,r,o);return"refused"in i?{refused:{...i.refused,element:e,...s.kind==="image"&&i.refused.reason==="url"?{address:r.slice(0,200),...r.length>Vt?{length:r.length}:{}}:{},...s.kind==="link"?{address:r.slice(0,200)}:{}}}:s.name==="role"&&i.value.split(/\\s+/).some(a=>ns.includes(a.toLowerCase()))?{refused:{reason:"value",element:e,name:n}}:s.name==="aria-live"&&!["polite","off"].includes(i.value.toLowerCase())?{refused:{reason:"value",element:e,name:n}}:{name:s.name,value:i.value,...i.dropped?{dropped:i.dropped.map(a=>({reason:a.reason==="url"?"url":"css",element:e,name:s.name,css:a}))}:{}}}function Na(t,e,n,r){let o=(s,i)=>({refused:{reason:s,name:t,...i?{css:i}:{}}});if(e==="geometry")return n.length>ss||!ma.test(n)||/url/i.test(n)?o("value"):{value:n};if(e==="image"){let s=r.picture?.(n);if(s!==void 0)return{value:s};if(n.length>Vt)return o("url");if(ga.test(n))return{value:n};if(n.startsWith(`blob:${r.origin}/`)&&/^blob:[^\\s"\'<>]+$/.test(n))return{value:n};let i=r.asset?Ea(n,r.origin):void 0;if(i!==void 0){let l=r.asset(i);if(l)return{value:l}}let a=wa(n,r.imageOrigins);return a?{value:a}:o("url")}if(e==="link"){let s=r.link?.(n);return s===void 0?o("url"):{value:s}}if(n.length>zr)return o("value");if(typeof e=="object"){let s=e.oneOf.find(i=>i.toLowerCase()===n.toLowerCase());return s===void 0?o("value"):{value:s}}switch(e){case"text":return{value:n};case"number":return pa.test(n.trim())&&Number.isFinite(Number(n))?{value:n.trim()}:o("value");case"boolean":return{value:""};case"fragment":return ha.test(n)?{value:n}:o("url");case"style":{let s=rr(n,zr);return s.refused.length>0&&s.css===""?o(s.refused[0].reason==="url"?"url":"css",s.refused[0]):{value:s.css,...s.refused.length>0?{dropped:s.refused}:{}}}case"css":{let s=or(t,n);return"refused"in s?o(s.refused.reason==="url"?"url":"css",s.refused):{value:s.value}}}}var Ta="http://www.w3.org/1999/xhtml",xa=new Set(["button","submit","reset","checkbox","radio","image"]);var ir=(t,...e)=>t.namespaceURI===Ta&&e.includes(t.localName),Sa=t=>(t.getAttribute("type")??"text").toLowerCase(),va=t=>ir(t,"textarea","select")||ir(t,"input")&&!xa.has(Sa(t));function qs(t){if(ir(t,"option","optgroup","datalist"))return\'An option is never pressed by itself: put data-act on its select, with data-save="change", or on a button.\';if(ir(t,"label"))return"A press on a label presses its field too, and would ask for the act twice: put data-act on a button, or on the field.";if(va(t)&&!t.hasAttribute("data-save"))return\'A click into a field to type or to pick is not a press: give it data-save ("input" or "change") to save it as it is typed, or put data-act on a button beside it.\'}var ka="http://www.w3.org/1999/xhtml",wt=class{constructor(e){this.ownerDocument=e}parentNode=null;childNodes=[];get firstChild(){return this.childNodes[0]??null}get parentElement(){return this.parentNode instanceof Ke?this.parentNode:null}get textContent(){return this.childNodes.map(e=>e.textContent).join("")}insertBefore(e,n){e.parentNode&&e.parentNode.removeChild(e);let r=n?this.childNodes.indexOf(n):-1;return r<0?this.childNodes.push(e):this.childNodes.splice(r,0,e),e.parentNode=this,e}appendChild(e){return this.insertBefore(e,null)}removeChild(e){let n=this.childNodes.indexOf(e);return n>=0&&this.childNodes.splice(n,1),e.parentNode=null,e}},Xe=class extends wt{constructor(n,r){super(n);this.data=r}nodeType=3;get textContent(){return this.data}},no=class extends wt{nodeType=8;get textContent(){return""}},Ke=class extends wt{constructor(n,r,o){super(n);this.namespaceURI=r;this.localName=o}nodeType=1;attributes=new Map;value="";checked=!1;selected=!1;setAttribute(n,r){this.attributes.set(n,String(r))}removeAttribute(n){this.attributes.delete(n)}getAttribute(n){return this.attributes.get(n)??null}hasAttribute(n){return this.attributes.has(n)}closest(n){for(let r=this;r;r=r.parentElement)if(r.localName===n)return r;return null}},ro=class extends wt{nodeType=9;constructor(){super(null)}createElementNS(e,n){return new Ke(this,e,n)}createElement(e){return new Ke(this,ka,e)}createTextNode(e){return new Xe(this,e)}createComment(e){return new no(this)}};function Xs(){let t=new ro,e=t.createElement("div");return e.setAttribute("data-graview-view-root",""),t.appendChild(e),{document:t,root:e}}var Aa=new Set(["video/mp4","video/webm","video/ogg"]);function Oa(t,e){let n=t.poster===!0||typeof t.poster=="string"&&t.poster.length>0,r=Aa.has(t.type.toLowerCase()),o=!r&&!n?`its source is ${t.type}, which not every browser plays, and it has no poster`:r?n?void 0:"it has no poster, so nothing stands before it plays or where a person asked for less motion":`its source is ${t.type}, which not every browser plays`;return{record:e.record,field:e.field,text:typeof t.caption=="string"&&t.caption.trim()?t.caption.trim():t.name,name:t.name,source:t.type,...typeof t.duration=="number"?{duration:t.duration}:{},poster:n,autoplay:e.autoplay,cover:e.cover,playable:r&&n,...o?{why:o}:{}}}var oo={h1:1,h2:2,h3:3,h4:4,h5:5,h6:6},Ks=new Set(["a","abbr","b","bdi","bdo","br","cite","code","data","del","dfn","em","i","ins","kbd","q","s","samp","small","span","strong","sub","sup","time","u","var","wbr","label"]),Zs=new Set(["style","template","datalist","option"]),q=t=>t.replace(/\\s+/g," ").trim();function Ra(t){let e=t.duration===void 0?0:Math.round(t.duration);if(e<1)return"a video";if(e<60)return`a ${e}-second video`;let n=Math.round(e/60);return n<60?`a ${n}-minute video`:`a ${Math.floor(n/60)}-hour${n%60>0?` ${n%60}-minute`:""} video`}var de=t=>t instanceof Ke,Xt=t=>t.hasAttribute("hidden")||t.getAttribute("aria-hidden")==="true";function te(t){return t instanceof Xe?t.data:!de(t)||Xt(t)||Zs.has(t.localName)?"":t.localName==="br"?" ":t.localName==="img"?t.getAttribute("alt")??"":t.childNodes.map(te).join(t.localName==="td"||t.localName==="th"?" ":"")}var Pa=/(\\s+[\xB7\u2022|\u2014\u2013-]\\s+)/;function _a(t,e){if(!e||!t.includes(e))return t;let n=s=>s.length>0&&s.split(" ").length<=3,r=q(t).split(Pa),o=[];for(let s=0;s<r.length;s+=2){let i=r[s],a=i.startsWith(`${e} `)?i.slice(e.length+1):void 0,l=i.endsWith(` ${e}`)?i.slice(0,-e.length-1):void 0,c=i===e?"":a!==void 0&&n(a)?a:l!==void 0&&n(l)?l:i;c&&o.push(...o.length>0?[r[s-1]]:[],c)}return o.join("")}function Js(t,e,n){let r=[];for(let o of t){if(o.t==="list"&&o.groups.every(s=>s.items.every(i=>i.id===e&&i.title===n))){r.push(...Js(o.groups.flatMap(s=>s.items.flatMap(i=>i.parts)),e,n));continue}if(o.t==="text"){let s=_a(o.text,n);s&&r.push(s===o.text?o:{...o,text:s});continue}r.push(o)}return r}function*Ze(t){for(let e of t.childNodes)de(e)&&(yield e,yield*Ze(e))}function Ca(t){let e=t.getAttribute("data-save"),n=t.getAttribute("data-debounce");if(e===null&&n===null)return[];let r=`drawing <${t.localName}${e!==null?` data-save="${e}"`:` data-debounce="${n}"`}>`,o=[];if(e===null)return[{at:r,says:\'data-debounce is read only on a field that saves as it is typed (data-save="input").\'}];if(!["input","textarea","select"].includes(t.localName))o.push({at:r,says:"Only a field saves as it is typed: an input, a textarea or a select. A button is pressed (data-act alone)."});else if(e!=="input"&&e!=="change")o.push({at:r,says:`data-save is "input" (saved as the person types, once they pause, and when they leave it) or "change" (saved when they leave it or pick), not "${e}".`});else if(t.getAttribute("data-act")===null)o.push({at:r,says:\'It saves through no act: a field saved as it is typed names its act itself, data-act="\\u2026", one in the manifest.\'});else if(!t.getAttribute("name"))o.push({at:r,says:"It has no name: the host sends a field as the act\'s argument its name says."});else{let s=!1,i=!1;for(let a=t;a;a=a.parentElement)a.getAttribute("data-record")!==null&&(i=!0),a!==t&&(a.localName==="fieldset"||a.getAttribute("role")==="group")&&(s=!0);(!s||!i)&&o.push({at:r,says:\'It is in no fieldset bound to a record: the host saves a field inside <fieldset data-record="\\u2026">, with the fields beside it, to the record the fieldset names.\'})}return n!==null&&e!=="input"?o.push({at:r,says:\'data-debounce is read only with data-save="input": a "change" saves at once.\'}):n!==null&&!(n.trim()!==""&&Number.isFinite(Number(n))&&Number(n)>=250&&Number(n)<=1e4)&&o.push({at:r,says:`data-debounce is how long the host waits for the person to pause, in milliseconds from 250 to 10 000, not "${n}"; left out, it waits 1 000.`}),o}function Ia(t,e,n){let r=t.getAttribute("data-drop");if(r===null)return[];let o=`drawing <${t.localName} data-drop="${r}">`,s=[],i=(e.accepts??[]).filter(c=>c.kind===r),a=t.getAttribute("data-drop-field");i.length===0?s.push({at:o,says:`The view\'s accepts names no field of "${r}", so the host offers no drop target here: say the field files go in, accepts: [{ "kind": "${r}", "field": "<its image, video or file field>" }].`}):a!==null&&!i.some(c=>c.field===a)&&s.push({at:o,says:`data-drop-field names "${a}", which the view\'s accepts does not name for "${r}" (${i.map(c=>`"${c.field}"`).join(", ")}): the host offers no drop target here.`});let l=t.getAttribute("data-drop-connect");if(l!==null){let c=l.indexOf(":"),m=c>0?l.slice(c+1):"";c<=0||m===""||n.has(l)?s.push({at:o,says:`data-drop-connect is "<relation>:<record id>" \\u2014 "takenOn:day:saturday" \\u2014 not "${l}"${n.has(l)?", which names a record and no relation":""}.`}):n.has(m)||s.push({at:o,says:`data-drop-connect names "${m}", which this seat was not shown: the host offers no drop target here.`})}return s}function Qs(t,e){let n=[],r=new Set,o=new Set,s=[],i=new Map;for(let u of[...e.props.node?[e.props.node]:[],...e.props.nodes??[]])i.set(u.id,u);let a=u=>Ft(e.places,u)!==void 0;for(let u of Ze(t)){let O=u.getAttribute("data-act");O!==null&&r.add(O);let d=O!==null&&u.getAttribute("data-debounce")===null?qs(u):void 0;d&&n.push({at:`drawing <${u.localName} data-act="${O}">`,says:d});let y=u.getAttribute("data-record");y!==null&&(o.add(y),!i.has(y)&&!a(y)&&n.push({at:`drawing <${u.localName} data-record="${y}">`,says:e.placesUnsure?`It names "${y}", which this seat was not shown and is none of the places this run was told of. A view goes to a record by its id, or to a place by its slug.${Te(e.places)}${yt}`:`It names "${y}", which this seat was not shown and is no place of this app: the host will not follow it. A view goes to a record by its id, or to a place by its slug.${Te(e.places)}`}));let R=u.getAttribute("data-place");R!==null&&!a(R)&&n.push({at:`drawing <${u.localName} data-place="${R}">`,says:e.placesUnsure?`It names the place "${R}", which is none of the places this run was told of.${Te(e.places)}${yt}`:`It names the place "${R}", which this app does not have.${Te(e.places)}`}),n.push(...Ca(u)),n.push(...Ia(u,e,i))}let l=u=>{if(u.localName==="graview-video")return;let O=u.getAttribute("data-record");if(O!==null)return O;let d=u.getAttribute("data-key")??u.getAttribute("id");if(d!==null&&i.has(d))return d;let y=new Set;for(let R of Ze(u)){let p=R.getAttribute("data-record");p!==null&&R.localName!=="graview-video"&&y.add(p)}return y.size===1?[...y][0]:void 0},c=(u,O)=>{let d=i.get(O),y=d?.kind??(O.includes(":")?O.slice(0,O.indexOf(":")):""),R=[...Ze(u)],p=R.find(T=>T.localName in oo)??R.find(T=>T.localName==="a"&&T.getAttribute("data-record")===O)??R.find(T=>T.localName==="strong"||T.localName==="b"),w=q(p?te(p):"")||d?.label||O;return{id:O,kind:y,title:w,parts:Js(h(u,p),O,w)}},m=u=>{let O=[...Ze(u)].filter(p=>p.localName==="tr"&&!Xt(p)),d=O.find(p=>p.parentElement?.localName==="thead"||p.childNodes.every(w=>!de(w)||w.localName==="th")),y=d?d.childNodes.filter(de).map(p=>q(te(p))):[];return{t:"list",as:"row",columns:1,groups:[{items:O.filter(p=>p!==d).map(p=>{let w=p.childNodes.filter(de),T=l(p),f=T?i.get(T):void 0;return{id:T??"",kind:f?.kind??"",title:q(te(w[0]??p)),parts:w.slice(1).map((v,N)=>({t:"field",label:y[N+1]??"",text:q(te(v))}))}})}]}};function h(u,O){let d=[],y="",R=()=>{let w=q(y);y="",w&&d.push({t:"text",text:w})},p=u.childNodes;for(let w=0;w<p.length;w+=1){let T=p[w];if(T===O)continue;if(T instanceof Xe){y+=T.data;continue}if(!de(T)||Xt(T)||Zs.has(T.localName))continue;if(O&&[...Ze(T)].includes(O)){R(),d.push(...h(T,O));continue}let f=[];for(let v=w;v<p.length;v+=1){let N=p[v];if(N instanceof Xe&&q(N.data)==="")continue;if(!de(N)||Xt(N)||Ks.has(N.localName)||N.localName in oo)break;let C=l(N);if(!C)break;f.push({element:N,id:C}),w=v}if(f.length>0){R();let v=f.every(N=>N.element.localName==="li"||N.element.localName==="tr");d.push({t:"list",as:v?"row":"card",columns:1,groups:[{items:f.map(N=>c(N.element,N.id))}]});continue}d.push(...E(T,v=>y+=v,R))}return R(),d}function E(u,O,d){let y=u.localName;if(Ks.has(y)&&y!=="label")return O(te(u)),[];if(y==="mark"){d();let p=q(te(u));return p?[{t:"badge",text:p}]:[]}d();let R=oo[y]??(u.getAttribute("role")==="heading"?Number(u.getAttribute("aria-level")??2):void 0);if(R!==void 0){let p=q(te(u));return p?[{t:"heading",level:R,text:p}]:[]}switch(y){case"ul":case"ol":case"menu":return[{t:"list",as:"row",columns:1,groups:[{items:u.childNodes.filter(w=>de(w)&&w.localName==="li"&&!Xt(w)).map(w=>{let T=l(w);if(T)return c(w,T);let f=h(w),v=f[0],N=v&&(v.t==="text"||v.t==="heading")?v.text:"";return{id:"",kind:"",title:N,parts:N?f.slice(1):f}})}]}];case"table":return[m(u)];case"dl":{let p=[],w="";for(let T of u.childNodes.filter(de))if(T.localName==="dt")w=q(te(T));else if(T.localName==="dd")p.push({t:"field",label:w,text:q(te(T))});else if(T.localName==="div")for(let f of T.childNodes.filter(de))f.localName==="dt"?w=q(te(f)):f.localName==="dd"&&p.push({t:"field",label:w,text:q(te(f))});return p}case"figure":{let p=u.childNodes.find(f=>de(f)&&f.localName==="figcaption"),w=q(u.childNodes.filter(f=>f!==p).map(te).join(" ")),T=p?q(te(p)):"";return w?[{t:"figure",text:w,...T?{label:T}:{}}]:T?[{t:"text",text:T}]:[]}case"meter":case"progress":{let p=Number(u.getAttribute("value")??0),w=Number(u.getAttribute("max")??1)||1;return[{t:"progress",label:u.getAttribute("aria-label")??u.getAttribute("title")??"",text:`${Math.round(p/w*100)}%`}]}case"svg":{let p=u.childNodes.find(f=>de(f)&&f.localName==="title"),w=q(u.getAttribute("aria-label")??(p?te(p):""));if(w)return[{t:"text",text:w,tone:"picture"}];let T=[...Ze(u)].filter(f=>f.localName==="text").map(f=>q(te(f))).filter(Boolean);return T.length>0?[{t:"text",text:T.join(" \\xB7 "),tone:"picture"}]:[]}case"img":{let p=q(u.getAttribute("alt")??"");return p?[{t:"text",text:p,tone:"picture"}]:[]}case"graview-video":{let p=u.getAttribute("data-field")??"",w=u.getAttribute("data-record")??"",T=i.get(w),f=T&&p&&Object.hasOwn(T,p)?T[p]:void 0,v=(Array.isArray(f)?f:[f])[Number(u.getAttribute("data-index")??"0")];if(!v||typeof v.name!="string"||typeof v.type!="string"||!v.type.startsWith("video/"))return n.push({at:`drawing <graview-video data-field="${p}">`,says:"It names no video on a record this seat was shown: the host draws no player there. A <graview-video> names a record the view was shown (data-record) and its video field (data-field)."}),[];let N=Oa(v,{record:w,field:p,autoplay:u.getAttribute("autoplay")!==null,cover:u.getAttribute("cover")!==null});s.push(N);let C=N.autoplay?`, playing as a background, muted and looping${N.cover?", filling its box":""}`:"";return[{t:"text",text:`${N.text}, ${Ra(N.duration!==void 0?{duration:N.duration}:{})}${C}`,tone:"picture"}]}case"button":{let p=q(te(u));return p?[{t:"text",text:p,tone:"button"}]:[]}case"input":case"textarea":case"select":{let p=q(u.getAttribute("aria-label")??u.getAttribute("placeholder")??u.getAttribute("name")??""),w=y==="select"?q(te(u.childNodes.find(T=>de(T)&&T.localName==="option"&&T.selected)??u)):u.value;return[{t:"field",label:p,text:w}]}case"label":return h(u);default:return h(u)}}return{parts:h(t),problems:n,acts:[...r],records:[...o],videos:s}}var Da=0,Ma=1,La=2,$a=3,ei=1,Ha=2,ti=3,Ua=1,Ga=3,ja=8,ni="~",Kt=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),ri=new Set(["input","select","textarea","option"]),za=new Set(["value","checked","selected"]),oi=["aria-label","aria-labelledby","title"],Va=t=>oi.some(e=>(t.getAttribute(e)??"").trim()!=="");function si(t,e){let n=t.ownerDocument??t,r=e.maxNodes??5e3,o=[],s=new Map,i=new WeakMap,a={dom:t,name:"div",namespace:"html",children:[],id:ni};s.set(ni,a);let l=0,c=!1,m=new WeakMap,h=new Map,E=new Map,b=f=>{o.push(f),o.length>200&&o.shift(),e.onRefused?.(f)},u=()=>({dom:n.createComment(""),children:[],refused:!0}),O=(f,v)=>{if(f.namespace==="html"&&f.name&&ri.has(f.name))return f.dom;if(v?.namespace==="html"&&v.name==="textarea")return v.dom},d=(f,v)=>{let N=f.dom,C=m.get(N)??N.getAttribute("role");if(C===null||!C.split(/\\s+/).some(_=>rs.includes(_.toLowerCase())))return void m.delete(N);if(Va(N)){m.delete(N),N.getAttribute("role")!==C&&N.setAttribute("role",C);return}m.set(N,C),N.removeAttribute("role"),v&&b({reason:"value",element:f.name,name:"role"})},y=()=>{if(E.size===0)return;let f=new Set,v=N=>{for(let C of N.children){if(C.refused||C.text)continue;let _=C.dom.getAttribute("id");_&&f.add(_),v(C)}};v(a);for(let[N,C]of E){if(N.id===void 0||s.get(N.id)!==N){E.delete(N);continue}let _=N.dom;for(let[S,z]of C){let $=z.value.split(/\\s+/).filter(ne=>ne!==""),W=$.filter(ne=>!f.has(ne));if($.length>0&&W.length===0){if(z.drawn)continue;z.drawn=!0,_.setAttribute(S,z.value),d(N,!1)}else z.drawn&&(z.drawn=!1,_.removeAttribute(S),b({reason:"reference",element:N.name,name:S,ids:W.length>0?W:$}),d(N,!0))}}},R=(f,v,N,C=!0)=>{let _=f.dom;if(N!=null&&typeof N!="string")return b({reason:"value",element:f.name,name:v});let S=to(f.namespace,f.name,v,N??null,e);if("refused"in S){let ne=to(f.namespace,f.name,v,null,e);return"refused"in ne||_.removeAttribute(ne.name),!("refused"in ne)&&ne.name==="role"&&m.delete(_),b(S.refused)}for(let ne of S.dropped??[])b(ne);let z=f.namespace==="html"&&za.has(S.name)&&ri.has(f.name),$=_,W=z?S.name==="value"?$.value:S.name==="checked"?$.checked:$.selected:void 0;if(S.name==="role"&&m.delete(_),os.includes(S.name)){let ne=E.get(f)??new Map;S.value===null?ne.delete(S.name):ne.set(S.name,{value:S.value,drawn:!0}),ne.size>0?E.set(f,ne):E.delete(f)}S.value===null?_.removeAttribute(S.name):_.setAttribute(S.name,S.value),C&&(S.name==="role"||oi.includes(S.name))&&d(f,S.name==="role"),e.onAttribute?.(_,S.name),z&&(S.name==="value"&&"value"in $?($.value=S.value??"",W!==$.value&&e.onFieldSet?.(_)):S.name==="checked"&&"checked"in $?($.checked=S.value!==null,W!==$.checked&&e.onFieldSet?.(_)):S.name==="selected"&&"selected"in $&&($.selected=S.value!==null,W!==$.selected&&e.onFieldSet?.(_.parentElement?.closest("select")??_)))},p=f=>{if(!f.refused){l-=1,f.id!==void 0&&s.delete(f.id);for(let v of f.children)p(v)}},w=(f,v)=>{if(!Kt(f)||typeof f.id!="string"||s.has(f.id))return b({reason:"record"}),u();if(l>=r)return b({reason:"budget"}),c||(c=!0,e.onOverBudget?.()),u();let N=f.id;if(f.type===ja)return u();if(f.type===Ga){if(sr(v.namespace,v.name))return b({reason:"child",element:v.name}),u();let $=n.createTextNode(String(f.data??"").slice(0,Vr)),W={dom:$,children:[],text:!0,id:N,parent:v};return s.set(N,W),i.set($,N),l+=1,W}if(f.type!==Ua)return b({reason:"record"}),u();let C=String(f.element);if(sr(v.namespace,v.name))return b({reason:"child",element:C}),u();let _=Fs(C,v.namespace);if("refused"in _)return b(_.refused),u();let S=n.createElementNS(_.namespace==="svg"?as:is,_.name);_.as&&S.setAttribute("data-graview-as",_.as),_.namespace==="html"&&_.name==="img"&&S.setAttribute("referrerpolicy","no-referrer"),_.namespace==="html"&&_.name==="a"&&(S.setAttribute("target","_blank"),S.setAttribute("rel","noopener noreferrer"),S.setAttribute("referrerpolicy","no-referrer"));let z={dom:S,name:_.name,namespace:_.namespace,children:[],id:N,parent:v};if(s.set(N,z),i.set(S,N),l+=1,Kt(f.attributes)){for(let[$,W]of Object.entries(f.attributes))R(z,$,W,!1);d(z,!0)}if(e.decorate?.(S,_.name,_.namespace),Kt(f.properties))for(let $ of Object.keys(f.properties))b({reason:"attribute",element:_.name,name:$});if(Kt(f.eventListeners))for(let $ of Object.keys(f.eventListeners))f.eventListeners[$]!=null&&b({reason:"attribute",element:_.name,name:`on${$}`});if(Array.isArray(f.children))for(let $ of f.children){let W=w($,z);z.children.push(W),S.appendChild(W.dom)}return z},T=f=>{if(!Array.isArray(f))return b({reason:"record"});let[v,N]=f,C=typeof N=="string"?s.get(N):void 0;if(!C)return b({reason:"record"});switch(v){case Da:{if(C.text)return b({reason:"record"});let _=Number(f[3]),S=Number.isInteger(_)&&_>=0&&_<=C.children.length?_:C.children.length,z=f[2],$=Kt(z)&&typeof z.id=="string"?h.get(z.id):void 0,W;$&&$.parent?.namespace===C.namespace&&!sr(C.namespace,C.name)?(h.delete(z.id),$.parent=C,W=$):W=w(z,C),C.dom.insertBefore(W.dom,C.children[S]?.dom??null),C.children.splice(S,0,W),C.namespace==="html"&&C.name==="textarea"&&e.onFieldSet?.(C.dom);return}case Ma:{let _=Number(f[2]),S=C.children[_];if(!S)return b({reason:"record"});C.children.splice(_,1),S.dom.parentNode?.removeChild(S.dom),S.id!==void 0&&!S.refused?h.set(S.id,S):p(S);return}case La:{if(!C.text)return b({reason:"record"});C.dom.data=String(f[2]??"").slice(0,Vr);let _=O(C,C.parent);_&&e.onFieldSet?.(_);return}case $a:{if(C===a||C.text)return b({reason:"record"});let _=String(f[2]),S=f[4]??ei;return S===Ha?R(C,_,f[3]):b(S===ei||S===ti?{reason:"attribute",element:C.name,name:S===ti?`on${_}`:_}:{reason:"record"})}default:return b({reason:"record"})}};return{apply(f,v){if(!Array.isArray(f))return b({reason:"record"}),!0;try{for(let N=0;N<f.length;N+=1){if(v&&N%32===0&&v())return!1;T(f[N])}return!0}finally{for(let N of h.values())p(N);h.clear(),y()}},get refused(){return o},get size(){return l},idOf:f=>i.get(f),elementOf(f){let v=s.get(f);return v&&!v.text&&v!==a?v.dom:void 0},dispose(){for(let f of a.children)p(f);for(a.children.length=0;t.firstChild;)t.removeChild(t.firstChild)}}}function ii(t,e,n){let{root:r}=Xs(),o=!1,s=si(r,{origin:n.origin??"null",...n.imageOrigins?{imageOrigins:n.imageOrigins}:{},...n.asset?{asset:n.asset}:{},...n.link?{link:n.link}:{},maxNodes:n.maxNodes,onOverBudget:()=>o=!0});for(let m of t)s.apply(m);let i=[...s.refused],a="";if(e){let m=nr(e);a=m.css;for(let h of m.refused)i.push({reason:"css",name:"stylesheet",css:h})}let l=n.theme?qt(n.theme).css:"",c=l&&a?`${l}\n${a}`:l||a;return{root:r,refused:i,size:s.size,over:o,css:c,elementOf:m=>s.elementOf(m),idOf:m=>s.idOf(m)}}var ar=" SMIL can set an attribute after the host judged it, and runs past a person\'s reduced-motion setting: animate with CSS @keyframes, which is held to it.",ai={animate:ar,animateTransform:ar,animateMotion:ar,set:ar,feImage:" It loads an image: a filter here is made of the view\'s own pixels.","@property":" It registers a property for the whole page, the app\'s own --graview-* among them: animate a transform, an opacity or a color in @keyframes.","a href":" An <a> in SVG goes to a record or a place (data-record, data-place); a link out is an HTML <a href>.",role:` A role of the app\'s chrome or notices is the app\'s; role="region" is drawn while it has a name (aria-label).`};function Fa(t,e={}){let n="element"in t&&t.element?`<${t.element}>`:"",r=t.name?` ${t.name}`:"",o=s=>s&&Object.prototype.hasOwnProperty.call(ai,s)?ai[s]:"";switch(t.reason){case"element":return{at:`drawing ${n}`,says:`Not drawn: ${n} is not in the open kit.${o("element"in t?t.element:void 0)}`};case"attribute":return{at:`drawing ${n}${r}`,says:`Not drawn: ${n||"an element"} does not take${r}.${o(`${"element"in t?t.element:""}${r}`)}`};case"value":return{at:`drawing ${n}${r}`,says:`Not drawn: the value of${r} is not one the open kit takes.${o(t.name)}`};case"url":return"element"in t&&t.element==="a"&&t.address!==void 0?{at:`drawing ${n}${r}`,says:`Not drawn: ${xs(t.address,e.linkOrigins)}`}:{at:`drawing ${n}${r}`,says:t.address!==void 0&&"element"in t&&t.element==="img"?`Not drawn: ${Ys(t.address,e,"length"in t?t.length:void 0)}`:"Not drawn: an address. A view loads nothing; an image is a data: image."};case"child":return{at:`drawing ${n}`,says:`Not drawn: ${n} holds nothing.`};case"record":return{at:"drawing",says:"Not drawn: a record the drawing\'s format does not know."};case"budget":return{at:"drawing",says:"Not drawn: more nodes than a view may draw."};case"reference":{let s="ids"in t&&t.ids?t.ids:[],i=s.length>0?s.map(a=>`"${a}"`).join(", "):"no id";return{at:`drawing ${n}${r}`,says:`Not drawn: ${n||"an element"}${r} names ${i}, ${s.length===1?"which is":"which are"} no element of this view. It names elements the view draws itself, by their id (<h2 id="\\u2026">), drawn once each is there.`}}case"css":return{at:`stylesheet${r===" stylesheet"?"":r}`,says:`Not drawn: CSS the open kit leaves out${t.css?` (${t.css.reason}${t.css.name?` ${t.css.name}`:""})`:""}.${o(t.css?.name)}`}}}function li(t,e,n={}){let{limits:r}=e;if(t.messages>r.messages)return{ok:!1,reason:"flood",detail:`It sent ${t.messages} messages, more than the ${r.messages} a view may send in a second.`};let o=new Set(e.acts);for(let h of t.asked)if(!o.has(h.name))return{ok:!1,reason:"act",detail:`It asks for the act "${h.name}", which its manifest does not name.`};let s=ws(e.props),i=ii(t.renders,t.sheets,{maxNodes:r.maxNodes,...e.origin?{origin:e.origin}:{},...e.imageOrigins?{imageOrigins:e.imageOrigins}:{},...e.assets?{asset:h=>h}:{},...n.theme?{theme:n.theme}:{},link:h=>Ts(h,{handed:s,...e.linkOrigins?{origins:e.linkOrigins}:{}})});if(i.over)return{ok:!1,reason:"nodes",detail:`It drew more than the ${r.maxNodes.toLocaleString("en-US")} things a view may draw.`};let a=[...e.places,...(e.lists??[]).filter(h=>!e.places.some(E=>E.as===h)).map(h=>({as:h}))],l=e.placesUnsure===!0,c=Qs(i.root,{props:e.props,places:a,...l?{placesUnsure:!0}:{},...e.accepts?{accepts:e.accepts}:{}});for(let h of c.acts)if(!o.has(h))return{ok:!1,reason:"act",detail:`It binds a press to the act "${h}" (data-act), which its manifest does not name.`};let m=[...i.refused.map(h=>Fa(h,{...e.imageOrigins?{origins:e.imageOrigins}:{},assets:e.assets===!0,...e.linkOrigins?{linkOrigins:e.linkOrigins}:{}})),...c.problems];for(let h of t.went)"record"in h&&!(e.props.node?.id===h.record||(e.props.nodes??[]).some(E=>E.id===h.record)||Ft(a,h.record))&&m.push({at:"navigate",says:l?`It goes to ${Bt(h.record)}, which this seat was not shown and is none of the places this run was told of. A view goes to a record by its id, or to a place by its slug.${Te(a)}${yt}`:`It goes to ${Bt(h.record)}, which this seat was not shown and is no place of this app: the host will not follow it. A view goes to a record by its id, or to a place by its slug.${Te(a)}`}),"place"in h&&!Ft(a,h.place)&&m.push({at:"navigate",says:l?`It goes to the place ${Bt(h.place)}, which is none of the places this run was told of.${Te(a)}${yt}`:`It goes to the place ${Bt(h.place)}, which this app does not have.${Te(a)}`});return{ok:!0,parts:c.parts,problems:m,drawn:i,videos:c.videos}}var so="graviewHeadless",io="graviewHeadlessView";var ui=globalThis,Ba=Promise.prototype.then,Ya=Promise.resolve(),cr=t=>void Ba.call(Ya,t),lr=ui.performance,Zt=lr&&typeof lr.now=="function"?lr.now.bind(lr):Date.now,Je=JSON.stringify,fi=JSON.parse,Wa=Object.defineProperty,dr=t=>(t instanceof Error?`${t.name}: ${t.message}`:String(t)).slice(0,500),Nt=t=>{try{return fi(Je(t??null))}catch{return null}},V={renders:[],asked:[],went:[],ms:0,logs:[],messages:0},xe,Jt=(t,e)=>{xe??={reason:t,detail:e}},Tt=t=>{V.logs.length<50&&V.logs.push(t.slice(0,500))},St={removed:[],stuck:[],sealed:!1},xt=gs({send(t){V.messages+=1,t.type==="render"?V.renders.push(Nt(t.records)):t.type==="style"?V.sheets=(Nt(t.sheets)??[]).map(String):t.type==="gestures"?V.gestures=Nt(t.bound):t.type==="navigate"&&"place"in t?V.went.push({place:String(t.place),...t.where!==void 0?{where:Nt(t.where)}:{},...t.section!==void 0?{section:String(t.section)}:{}}):t.type==="navigate"&&"to"in t&&V.went.push({record:String(t.to),...t.where!==void 0?{where:Nt(t.where)}:{},...t.section!==void 0?{section:String(t.section)}:{}})},act(t,e){return V.messages+=1,V.asked.push({name:String(t),args:Nt(e)}),Promise.resolve({type:"answer",id:V.asked.length,ok:!1,reason:"refused",message:"Nothing is applied in a headless run."})},navigate(t){V.messages+=1,V.went.push({record:String(t)})},microtask:cr,now:Zt,threw:t=>Jt("error",`It threw: ${dr(t)}`),warn:Tt,hardening:()=>St}),ci=!1,ao=!1;function qa(t){if(ao||typeof t!="function"||(ao=!0,xe))return;let e=Zt();try{t.call(void 0,xt.view)}catch(n){Jt("error",`It threw: ${dr(n)}`)}V.ms+=Zt()-e}async function Xa(t){if(ci)return Je({ok:!1,reason:"refused",detail:"A headless script runs one view, once: something called its entry before the host did."});ci=!0;let e;try{e=fi(String(t))}catch{return Je({ok:!1,reason:"isolate",detail:"The run was not handed its input as JSON."})}if(!ao&&!xe)return Je({ok:!1,reason:"isolate",detail:"The script held no view."});let n=Zt();xe||xt.hear({type:"props",props:e.props,push:1}),V.ms+=Zt()-n,V.ms>=e.limits.pushMs&&Jt("slow",`It took longer than ${e.limits.pushMs.toLocaleString("en-US")} ms to draw what it was shown.`);for(let o=0;o<64&&!xe;o+=1)await new Promise(s=>cr(s));if(xe||(V.clicks=xt.listened("click").slice(0,2e3)),e.press&&typeof e.press.selector=="string"&&!xe){let o=typeof e.press.target=="string"?e.press.target:xt.find(e.press.selector);if(V.pressed={selector:e.press.selector.slice(0,200),...o!==void 0?{target:o}:{},asked:V.asked.length,went:V.went.length,renders:V.renders.length},o!==void 0){try{xt.hear({type:"dom-event",target:o,event:"click"})}catch(s){Jt("error",`It threw: ${dr(s)}`)}for(let s=0;s<64&&!xe;s+=1)await new Promise(i=>cr(i))}}if(xe)return Je({ok:!1,...xe,transcript:V});let r=li(V,e);return r.ok?Je({ok:!0,transcript:V,drawn:{parts:r.parts,problems:r.problems},hardening:{removed:St.removed.length,sealed:St.sealed}}):Je({ok:!1,reason:r.reason,detail:r.detail,transcript:V})}var Ka=Object.freeze({log:(...t)=>Tt(t.map(String).join(" ")),info:(...t)=>Tt(t.map(String).join(" ")),debug:(...t)=>Tt(t.map(String).join(" ")),warn:(...t)=>Tt(t.map(String).join(" ")),error:(...t)=>Tt(t.map(dr).join(" "))}),Za=0,di=()=>Za+=1,Ja=[["console",Ka],["setTimeout",di],["setInterval",di],["clearTimeout",()=>{}],["clearInterval",()=>{}],["queueMicrotask",cr],["graview",xt.view],[io,qa],[so,t=>Xa(t)]];for(let[t,e]of Ja)Wa(ui,t,{value:e,writable:!0,enumerable:!1,configurable:!0});St=Jo(globalThis,["graview",io,so],{primitivesStay:!0});St.stuck.length>0&&Jt("refused",`This isolate could not be hardened: ${St.stuck.join(", ")} would not go.`);})();\n';function Vt(e){return`${$t}
|
|
17
|
-
;${St}(function (graview) {
|
|
18
|
-
"use strict";
|
|
19
|
-
${e}
|
|
20
|
-
});
|
|
21
|
-
`}var Bt={scheme:"light",accent:"#2f7d8c",ground:"#f6f8f9",panel:"#ffffff",ink:"#14212b",inkMuted:"#4f6470",edge:"rgba(20, 33, 43, 0.14)",fontBody:"system-ui, sans-serif",fontDisplay:"system-ui, sans-serif",fontMono:"ui-monospace, monospace",radius:"12px"},z=(e,t,n)=>({ok:!1,reason:e,detail:t,...n?{transcript:n}:{}}),te=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),zt=["manifest","source","refused","error","silent","nodes","flood","slow","act","isolate"];function Wt(e){if(!te(e))return;let{renders:t,sheets:n,asked:s,went:a,ms:l,logs:u,messages:i,gestures:f,pressed:m,clicks:b}=e;if(!(!Array.isArray(t)||!t.every(Array.isArray)||!Array.isArray(s)||!Array.isArray(a)||!Array.isArray(u))&&!(typeof l!="number"||typeof i!="number"||n!==void 0&&!(Array.isArray(n)&&n.every(o=>typeof o=="string"))))return{renders:t,...Array.isArray(n)?{sheets:n}:{},asked:s.filter(te).map(o=>({name:String(o.name),args:o.args})),went:a.filter(te).flatMap(o=>{let N=typeof o.section=="string"?{section:o.section}:{},T=o.where!==void 0?{where:o.where}:{};return typeof o.record=="string"?[{record:o.record,...T,...N}]:typeof o.place=="string"?[{place:o.place,...T,...N}]:[]}),ms:l,logs:u.map(String).slice(0,50),messages:i,...Array.isArray(b)?{clicks:b.filter(o=>typeof o=="string").slice(0,2e3)}:{},...Array.isArray(f)?{gestures:f.filter(te).slice(0,32).map(o=>({event:String(o.event),selector:String(o.selector)}))}:{},...te(m)&&typeof m.selector=="string"&&[m.asked,m.went,m.renders].every(o=>typeof o=="number")?{pressed:{selector:m.selector,...typeof m.target=="string"?{target:m.target}:{},asked:m.asked,went:m.went,renders:m.renders}}:{}}}function Gt(e,t){let n=t.gestures??[];return n.length>0&&e.gestures!==!0?[{at:"gestures",says:`It listens for ${n.map(a=>`${a.event} on "${a.selector}"`).join(", ")}, and its manifest does not say "gestures": true: the host forwards no wheel, drag or pinch, and the page scrolls under it. Say "gestures": true in the manifest.`}]:n.length===0&&e.gestures===!0?[{at:"gestures",says:'Its manifest says "gestures": true, and it listens for no wheel, drag or pinch: graview.on("wheel" | "drag" | "pinch", selector, \u2026) is where the host sends one.'}]:[]}var qt=e=>e.kind==="system"?"the system":(e.roles??[]).length>0?(e.roles??[]).join(", "):e.kind,Zt=e=>e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"");async function Yt(e,t){let n=f=>typeof f=="object"&&f!==null&&!(typeof f.kind=="string"&&f.kind.length>0),s=f=>{let{as:m,slug:b}=f;return typeof m=="string"&&m.length>0?m:typeof b=="string"&&b.length>0?b:void 0},a=e.filter(f=>n(f)&&![void 0,Ce,Re].includes(s(f)));if(a.length===0)return e;let l=t.app?je(t.app,{views:t.views}):De(t.schema,t.views.flatMap(f=>xe(f)??[])),u=f=>l.find(m=>m.slug===s(f)&&m.kind!==null),i=a.filter(f=>!u(f)).map(f=>`"${s(f)}"`);if(i.length>0){let f=i.length===1?"that slug":"those slugs",m=t.app?`the app declares no place by ${f}`:`no kind's list or view the run holds is at ${f}, and the app, which would say its lenses, was not handed (\`app\`)`;throw new TypeError(`runWorkerViewHeadless was handed the place${i.length===1?"":"s"} ${i.join(", ")} without ${i.length===1?"its kind":"their kinds"}, and ${m}: hand each place's \`kind\` as \`placesOf(app)\` lists it, or the app.`)}return e.map(f=>{if(!a.includes(f))return f;let m=u(f);return{...f,kind:m.kind,...m.over?{over:m.over}:{}}})}async function Oe(e){if(typeof e.run!="function")throw new TypeError("runWorkerViewHeadless runs a view only in an isolate the host supplies (`run`); it never runs one in the host's own context.");let{manifest:t,source:n,store:s,principal:a}=e,l={maxSourceBytes:e.limits?.maxSourceBytes??256e3,maxNodes:e.limits?.maxNodes??5e3,messages:e.limits?.messages??120,pushMs:e.limits?.pushMs??1e3,runMs:e.limits?.runMs??5e3},u=We(t,s);if(u.length>0)return z("manifest",u.join(" "));if(typeof n!="string")return z("source","A view's source is text.");if(new TextEncoder().encode(n).length>l.maxSourceBytes)return z("source",`Its code is longer than the ${l.maxSourceBytes.toLocaleString("en-US")} bytes a view may be.`);let i=Ye(n);if(i.length>0)return z("source",i.join(" "));let f=[...e.views??[],t].flatMap(S=>xe(S)??[]).map(S=>({as:S.as,title:S.title,kind:S.kind})),m=new Set([...s.kindsKeptFrom(a),...s.modules.disabledKinds]),b=await Yt(e.places??[],{schema:s.schema,...e.app?{app:e.app}:{},views:[...e.views??[],t]}),o=Fe(s.schema,[...b,...f],{kept:m}),N=e.views===void 0,T=Ge(s,t)?(await (__graviewPreload(import.meta.url,["./chunk.WVUJXDXZ.js","./chunk.B422DSYN.js","./chunk.ZE5RSKXF.js","./chunk.DKUEZPGR.js","./chunk.EP7YT7LT.js","./chunk.I7KN732Z.js","./chunk.TLPCYKLW.js","./chunk.FIY4RUK5.js","./chunk.IY3DV52G.js","./chunk.DHPXRDT5.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.3PT3BU6K.js"))).computedOn(s.schema):void 0,p=qe(s,a,{manifest:t,...e.input?{input:e.input}:{},theme:e.theme??Bt,places:He(o),...T?{computed:T}:{}}),y=t.pictures?nt(p,{view:`"${t.title??t.name}"`,pictures:t.pictures,standIn:rt,limits:{...e.limits?.pictureBytes!==void 0?{pictureBytes:e.limits.pictureBytes}:{},...e.limits?.picturesBytes!==void 0?{picturesBytes:e.limits.picturesBytes}:{}}}):{props:p,left:[]},k=y.props,v={props:k,acts:ye(t).map(S=>S.as??S.act),...t.accepts?{accepts:t.accepts.map(({kind:S,field:U})=>({kind:S,field:U}))}:{},places:o.map(S=>({as:S.as,title:S.title})),...N?{placesUnsure:!0}:{},...e.images?{imageOrigins:[...e.images.origins]}:{},...e.links?{linkOrigins:[...e.links.origins]}:{},...e.asset?{assets:!0}:{},...e.origin?{origin:e.origin}:{},lists:Se(s.schema,new Set([...s.kindsKeptFrom(a),...s.modules.disabledKinds])).flatMap(S=>[S.slug,S.kind]),limits:{maxNodes:l.maxNodes,messages:l.messages,pushMs:l.pushMs},...e.press!==void 0?{press:{selector:typeof e.press=="string"?e.press:e.press.selector}}:{}},$=async S=>{let U,W;try{let Z=e.run({script:Vt(n),entry:xt,input:JSON.stringify(S),timeoutMs:l.runMs}),Et=new Promise((tr,Ot)=>{W=setTimeout(()=>Ot(Object.assign(new Error("past runMs"),{reason:"slow"})),l.runMs+1e3)});U=await Promise.race([Z,Et])}catch(Z){return te(Z)&&Z.reason==="slow"?z("slow",`It ran longer than the ${l.runMs.toLocaleString("en-US")} ms a headless run may take.`):z("isolate",`The isolate could not run it: ${Z instanceof Error?Z.message:String(Z)}`)}finally{W!==void 0&&clearTimeout(W)}let L;try{L=JSON.parse(String(U))}catch{return z("isolate","The isolate answered with something that is not an outcome.")}if(!te(L))return z("isolate","The isolate answered with something that is not an outcome.");let Ne=Wt(L.transcript);if(L.ok!==!0){let Z=zt.includes(L.reason)?L.reason:"isolate";return z(Z,typeof L.detail=="string"?L.detail.slice(0,2e3):"It failed, and the isolate did not say why.",Ne)}return Ne?{ok:!0,transcript:Ne}:z("isolate","The isolate answered without what the view sent.")},c=await $(v);if(!c.ok)return c;let h=c.transcript,r=e.press!==void 0?h.pressed:void 0,d=Nt(r?{...h,renders:h.renders.slice(0,r.renders)}:h,v,e.brand?.views?.css?{theme:e.brand.views.css}:{});if(!d.ok)return z(d.reason,d.detail,h);let g=new Set([...k.node?[k.node.id]:[],...(k.nodes??[]).map(S=>S.id)]),w=Se(s.schema,new Set([...s.kindsKeptFrom(a),...s.modules.disabledKinds])),O=[];for(let S of h.went){if(!("where"in S)&&!("section"in S))continue;let U=X(S,{sees:L=>g.has(L),places:o,lists:w,schema:s.schema}),W="place"in S?B(v.places,S.place)!==void 0||(v.lists??[]).includes(S.place):!0;!U.ok&&W&&O.push({at:"navigate",says:U.says})}let Y=typeof e.press=="object"&&e.press.typed?{typed:e.press.typed}:{},E=r?lt(r,d.drawn,h,{store:s,principal:a,manifest:t,shown:g,places:o,lists:w,...N?{placesUnsure:!0}:{},...Y}):void 0,K=E&&(!E.element||E.lost)?[{at:`press "${E.selector}"`,says:E.lost??E.says}]:[],H;if(e.presses){let S=d.drawn;H=await(typeof e.presses=="function"?e.presses:e.presses.check)({store:s,principal:a,manifest:t,shown:g,places:o,lists:w,...N?{placesUnsure:!0}:{},drawn:S,clicks:h.clicks??[],...typeof e.presses=="object"&&e.presses.maxRuns!==void 0?{maxRuns:e.presses.maxRuns}:{},rerun:async W=>{let L=await $({...v,press:{selector:`[data-graview-check="${W}"]`,target:W}});return L.ok?L:{ok:!1,reason:L.reason,detail:L.detail}}})}let A=t.title??t.name,I=k.today?st(n,{today:k.today,title:t.attach==="home"?"Home":A,...k.locale?{locale:k.locale}:{}}):[],D=[...y.left.map(S=>({at:"pictures",says:S})),...d.problems,...O,...Gt(t,h),...K,...(H?.problems??[]).map(S=>({at:`press ${S.control}`,says:S.says})),...I.map(({at:S,says:U})=>({at:S,says:U}))],V=t.title?Zt(t.title):t.name,x=t.attach==="home"?null:t.attach,M={place:{slug:t.attach==="home"?"home":V,title:A,kind:x,address:t.attach==="home"?"/":`/places/${encodeURIComponent(V)}`},seat:qt(a),width:e.width??1440,variant:(e.width??1440)<640?"phone":"wide",drawnBy:`view:${t.name}`,parts:d.parts,...d.videos.length>0?{videos:d.videos}:{},problems:D},{placeText:j}=await (__graviewPreload(import.meta.url,["./chunk.CCCONK73.js","./chunk.IO5VFTXC.js","./chunk.WV6SP6IJ.js","./chunk.B422DSYN.js","./chunk.ZE5RSKXF.js","./chunk.DKUEZPGR.js","./chunk.EP7YT7LT.js","./chunk.I7KN732Z.js","./chunk.TLPCYKLW.js","./chunk.P26ATAAI.js","./chunk.FIY4RUK5.js","./chunk.IY3DV52G.js","./chunk.DHPXRDT5.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.2WFOKJB4.js")),oe,re;if(e.audit===!0){let{auditView:S}=await (__graviewPreload(import.meta.url,["./chunk.JO2X52D4.js","./chunk.M5FP4Y4Q.js","./chunk.DHPXRDT5.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.DRAPVGQZ.js")),U=(h.clicks??[]).flatMap(W=>d.drawn.elementOf(W)??[]);oe=S(d.drawn.root,{host:"pending",clicked:U}),e.drawing===!0&&(re={root:d.drawn.root,clicked:U})}return{ok:!0,description:{...M,text:j(M)},props:k,transcript:h,css:d.drawn.css,...E?{pressed:E}:{},...oe?{audit:oe}:{},...re?{drawing:re}:{},...H?{presses:H}:{}}}var Kt=6,ke=function*(e){for(let t of e.childNodes)t.nodeType===1&&(yield t,yield*ke(t))},Jt=(e,t)=>{for(let n=t;n;n=n.parentElement)if(n===e)return!0;return!1};function At(e,t){let n=[...ke(e)].filter(i=>i.getAttribute("data-record")===t);if(n.length===0)return null;let s=n[0];for(;s&&!n.every(i=>Jt(s,i));)s=s.parentElement;let a=s??e,l=[a,...ke(a)].flatMap(i=>i.getAttribute("data-act")?[i.getAttribute("data-act")]:[]),u=[a,...ke(a)].flatMap(i=>i.getAttribute("aria-pressed")||i.getAttribute("aria-checked")?[`${i.getAttribute("aria-pressed")??""}${i.getAttribute("aria-checked")??""}`]:[]);return`${a.textContent.replace(/\s+/g," ").trim()}|${l.join(",")}|${u.join(",")}`}var Tt=(e,t)=>new RegExp(`\\s${t}="([^"]*)"`).exec(e)?.[1];function Xt(e){return new Pe({schema:e.schema,mutations:e.allMutations(),invariants:e.allInvariants(),...e.policy?{policy:e.policy}:{},snapshot:e.graph.snapshot()})}var Qt=e=>JSON.stringify(Object.entries(e??{}).filter(([,t])=>typeof t=="boolean").sort(([t],[n])=>t.localeCompare(n)));async function sn(e){let t=ht(),n=await Oe({...e,run:t,presses:mt,audit:!0,drawing:!0});if(!n.ok||!n.presses||!n.drawing)return n;let s=await er(e,n.presses,n.drawing.root,t);if(s.length===0)return n;let a=[...n.presses.problems,...s];return{...n,presses:{...n.presses,ok:!1,controls:[...n.presses.controls,...s],problems:a,text:`${n.presses.text}${s.map(l=>` FAILS ${l.says}
|
|
22
|
-
`).join("")}`}}}async function er(e,t,n,s){let{store:a,principal:l,manifest:u}=e,i=new Set(a.graph.allNodes().map(b=>b.id)),f=new Set,m=[];for(let b of t.controls){if(f.size>=Kt)break;if(b.does!=="act"||!b.ok)continue;let o=Tt(b.element,"data-act"),N=Tt(b.element,"data-record");if(!o||!N)continue;let T=a.graph.getNode(N),p=`${o}|${Qt(T)}`;if(f.has(p))continue;f.add(p);let y=J(a,u,i,{as:o,record:N,fields:[]});if(!y.ok)continue;let k={name:y.name,args:y.args},v=T?`\u201C${Ie(a.schema.tryDefinition(T.kind),T)}\u201D`:`\u201C${N}\u201D`;if(!a.wouldChange(k,l)){let h=g=>new Set(a.allMutations().find(w=>w.name===g)?.writes??[]),r=h(y.name),d=ye(u).filter(g=>g.act!==y.name&&r.size>0&&[...h(g.act)].some(w=>r.has(w))).filter(g=>{let w=J(a,u,i,{as:g.as??g.act,record:N,fields:[]});return w.ok&&a.wouldChange({name:w.name,args:w.args},l)}).map(g=>`\u201C${g.as??g.act}\u201D`);m.push({control:b.control,element:b.element,does:"act",ok:!1,says:`On ${v} it asks for \u201C${o}\u201D, which changes nothing there: it is so already.${d.length>0?` Bind its press there to ${d.join(" or ")} instead, as the page did, so a person can take it back.`:""}`});continue}let $=Xt(a);try{$.apply(k,{author:l})}catch{continue}let c=await Oe({...e,store:$,run:s,audit:!0,drawing:!0});!c.ok||!c.drawing||At(c.drawing.root,N)===At(n,N)&&m.push({control:b.control,element:b.element,does:"act",ok:!1,says:`Pressed on ${v}, it lands, and the design draws ${v} just as before it: show what it changed \u2014 its words or its control (a finished task says so and offers the act that takes it back).`})}return m}export{At as drawnRecord,sn as pressedHere};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k}from"./chunk.CLZYNFFH.js";import"./chunk.WQ7K5O2I.js";import"./chunk.ZT3ZG52B.js";import"./chunk.QDVGHI7R.js";import"./chunk.ROYCJXPE.js";import"./chunk.M5FP4Y4Q.js";import"./chunk.DHPXRDT5.js";import"./chunk.FQLNBIQ5.js";import"./chunk.AJZBJBMO.js";export{d as SAVE_DEBOUNCE_MS,i as accepts,a as createPressReader,f as createSaver,g as fillPrefills,h as judgePress,b as markPresses,k as prefillOf,c as quietPictures,e as saveDebounceOf,j as writesBack};
|
|
@@ -1 +0,0 @@
|
|
|
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)}};import{a as N,g as ae,h as ie}from"./chunk.CYEPHT7V.js";import{a as S,b as T,c as A,d as j}from"./chunk.U5P23GO7.js";import{a as R}from"./chunk.JHAMSDAI.js";import{a as Z,b as ee,c as te}from"./chunk.B5EFNTDA.js";import{b as k}from"./chunk.47VEV4BX.js";import{a as ne}from"./chunk.CLIC2QBA.js";import{a as C}from"./chunk.MH3AQO2R.js";import{m as Q}from"./chunk.NLZHNPDU.js";import{G,J as _,La as K,R as H,S as z,W as X,ea as b,oa as J}from"./chunk.FWXW4T4I.js";import{a as Y}from"./chunk.SDO3U72B.js";import{Ce as U,Jb as x,eb as q,fb as B,ga as V,la as P}from"./chunk.DHPXRDT5.js";import{b as D}from"./chunk.AJZBJBMO.js";var u=D(G(),1);var oe=D(G(),1);function E(){let{ai:n,aiDesk:a}=b(),{entries:o}=_(a),i=n.off===!0;return(0,oe.useEffect)(()=>{i||a.load()},[a,i]),i?[]:o}var t=D(X(),1),se=K(Y(()=>(__graviewPreload(import.meta.url,["./chunk.C6CT6F4C.js","./chunk.U5P23GO7.js","./chunk.GTF6EMVE.js","./chunk.NLZHNPDU.js","./chunk.QNC2OKLF.js","./chunk.FWXW4T4I.js","./chunk.SDO3U72B.js","./chunk.DHPXRDT5.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.GVFGS2HY.js")))),he=se.part((n,a)=>(0,t.jsx)(n.InteractionRow,{...a}),{quiet:!0,as:"li"}),ye=se.part((n,a)=>(0,t.jsx)(n.ActivityFilter,{...a}),{quiet:!0,as:"div"}),fe=n=>n.undoes===void 0&&n.primitives.some(a=>a.op==="remove-node"||a.op==="patch-node"&&a.after[B]===!0&&a.before[B]!==!0);function ve(n){let a=[...new Set(n.ops.filter(o=>!x(o)&&fe(o)).map(o=>o.intent))].filter(o=>o!==n.intent);return a.length===0?n.intent:`${n.intent} \u2014 ${a.join("; ")}`}var re=(n,a,o=le(n,[a]))=>({intent:ve(a),author:a.author.kind,...a.author.id?{authorId:a.author.id}:{},by:a.author,...a.ops[0]?.via?{via:a.ops[0].via}:{},...a.lineage?{basis:ne(a.lineage)}:{},touched:[...new Set(a.ops.filter(i=>!x(i)).flatMap(i=>i.writes))],...me(a.ops.filter(i=>!x(i)).flatMap(i=>i.writes),o),batch:a.id,at:a.at,...a.lineage?.interaction?{interaction:a.lineage.interaction}:{},seq:a.ops.at(-1).seq+1,...a.ops.every(x)?{withheld:!0}:{}});function de(n=4){let{store:a,principal:o}=b(),i=z(a,o),s=i.log.length;return(0,u.useMemo)(()=>{let l=i.batches(),d=le(i,l);return ee(l,r=>i.log.get(r)).reverse().slice(0,n).map(r=>{if("batch"in r){let p=re(i,r.batch,d);return r.typed?{...p,intent:Z(r.typed,i.schema,i.graph),batches:r.typed.batches.filter(v=>!v.undone).map(v=>v.id)}:p}let h=[...r.digest.batches].reverse().map(p=>re(i,p,d));return{intent:te(r.digest),author:r.digest.author.kind,...r.digest.author.id?{authorId:r.digest.author.id}:{},by:r.digest.author,touched:[...new Set(h.flatMap(p=>p.touched))],batch:"",...h[0]?.at?{at:h[0].at}:{},seq:h[0]?.seq??0,digest:h}})},[i,s,n])}function le(n,a){let o=new Map;for(let i of a)for(let s of i.ops)if(!x(s))for(let l of s.primitives)(l.op==="add-node"||l.op==="remove-node")&&l.node&&o.set(l.node.id,P(n.schema.tryDefinition(l.node.kind),l.node));return o}function me(n,a){let o={};for(let i of n){let s=a.get(i);s!==void 0&&(o[i]=s)}return Object.keys(o).length>0?{named:o}:{}}function we({change:n}){let{store:a,principal:o,seats:i,people:s}=b();return(0,t.jsxs)("strong",{style:{fontWeight:600},children:[n.author==="human"&&n.by?.onBehalfOf===void 0&&(n.authorId===void 0||o.id===void 0||n.authorId===o.id)?"you":q(n.by??{kind:n.author,id:n.authorId},{graph:a.graph,schema:a.schema,seats:i,people:s}),C(n.via)?(0,t.jsxs)("span",{style:{fontWeight:400,color:"var(--graview-ink-muted)"},children:[", ",C(n.via)]}):null]})}function be({change:n,goes:a}){let{store:o}=b(),[i,s]=(0,u.useState)(!1),l=n.digest??[];return(0,t.jsxs)("li",{"data-testid":"activity-digest",style:{...S,gap:5},children:[(0,t.jsxs)("div",{"data-graview-activity-head":"",style:T,children:[(0,t.jsxs)("span",{"data-graview-activity-words":"",style:A,children:[(0,t.jsx)(we,{change:n})," ",(0,t.jsx)("span",{style:{color:"var(--graview-ink-muted)"},children:n.intent})]}),(0,t.jsx)("button",{type:"button","data-testid":"digest-toggle","aria-expanded":i,onClick:()=>s(d=>!d),style:{marginLeft:"auto",flex:"0 0 auto",display:"inline-flex",alignItems:"center",minHeight:24,minWidth:24,padding:"1px 8px",fontSize:"0.75rem"},children:i?"Hide":"Show each"})]}),i?(0,t.jsx)("ol",{"data-testid":"digest-changes",style:{margin:0,padding:"0 0 0 10px",listStyle:"none",display:"grid",gap:6,borderLeft:"1px solid var(--graview-edge)"},children:l.map(d=>(0,t.jsxs)("li",{"data-testid":"digest-change",style:S,children:[(0,t.jsxs)("div",{"data-graview-activity-head":"",style:T,children:[(0,t.jsxs)("span",{"data-graview-activity-words":"",style:A,children:[(0,t.jsx)("span",{style:{color:"var(--graview-ink-muted)"},children:d.intent}),d.basis?(0,t.jsxs)("span",{"data-graview-lineage":"",style:{color:"var(--graview-ink-faint)"},children:[" \xB7 ",d.basis]}):null]}),d.withheld?null:(0,t.jsx)($,{batch:d.batch})]}),d.touched.length>0?(0,t.jsx)("div",{"data-touched":d.touched.join(" "),style:j,children:d.touched.slice(0,4).map(r=>(0,t.jsx)(R,{id:r,label:o.graph.has(r)?k(o,r):d.named?.[r]??k(o,r),go:a(r),testId:"activity-record"},r))}):null]},d.batch))}):null]})}function $({batch:n}){let{store:a,principal:o,noteSeat:i}=b(),s=z(a,o),l=H()?.open??!1,d=s.log.length,[r,h]=(0,u.useState)(null),p=(0,u.useMemo)(()=>s.canUndo(n),[s,n,d]),v=(0,u.useMemo)(()=>p.ok?s.mayUndo(n,o):{ok:!0},[s,n,d,o,p]);if(l||!p.ok&&p.ops.length===0||!v.ok)return null;let m=!p.ok,W=m?p.includeBatches:[];return(0,t.jsxs)("span",{style:{marginLeft:"auto",flex:"0 0 auto",display:"grid",justifyItems:"end",gap:2},children:[(0,t.jsx)("button",{type:"button","data-testid":"undo-turn",title:m?`${p.message} \u2014 undo those too`:"Take this back, keeping everything since",onClick:()=>{h(null);try{let y=typeof n=="string"?[n]:n,L=s.log.all().find(I=>y.includes(I.batch)&&I.author.kind==="agent");s.undo(m?[...y,...W]:typeof n=="string"?n:[...n],{author:o}),L&&i({type:"home",author:L.author})}catch(y){h(y instanceof Error?y.message:String(y))}},style:{display:"inline-flex",alignItems:"center",minHeight:24,minWidth:24,padding:"1px 8px",fontSize:"0.75rem",...m?{borderColor:"var(--graview-warn)",color:"var(--graview-warn)"}:{}},children:m?`undo +${W.length}`:"undo"}),r?(0,t.jsx)("span",{"data-testid":"undo-refused",role:"alert",style:{fontSize:"0.75rem",lineHeight:1.4,color:"var(--graview-warn)",maxWidth:260,textAlign:"right"},children:r}):null]})}function ke({seq:n,intent:a}){let o=H();if(!o)return null;let i=o.past?.seq===n;return(0,t.jsx)("button",{type:"button","data-testid":"show-past","aria-label":`Show the app as it was after \u201C${a}\u201D`,title:"Show the app as it was here","aria-pressed":i,onPointerEnter:N,onFocus:N,onClick:()=>o.show(n),style:{display:"inline-flex",alignItems:"center",justifyContent:"center",minHeight:24,minWidth:24,padding:"1px 6px",fontSize:"0.75rem",flex:"0 0 auto"},children:(0,t.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 16 16","aria-hidden":"true",focusable:"false",children:[(0,t.jsx)("path",{d:"M2.5 8 a5.5 5.5 0 1 0 1.6-3.9",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),(0,t.jsx)("path",{d:"M2 2.5 V5.5 H5",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,t.jsx)("path",{d:"M8 5 V8 L10 9.25",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})})}function xe(){let n=()=>U(window.location.href);return(0,t.jsx)("a",{href:"#fresh","data-testid":"start-fresh",title:"Forget every edit made in this browser and return to the example",onClick:a=>{a.preventDefault(),window.location.assign(n())},style:{display:"inline-flex",alignItems:"center",minHeight:24,minWidth:24,fontSize:"0.8125rem",color:"var(--graview-ink-muted)",textDecoration:"underline",textDecorationColor:"var(--graview-edge-bright)",textUnderlineOffset:3},children:"Start fresh"})}function Ee({calls:n,seat:a,remembers:o=!1,close:i,headed:s=!0}){let l=de(),{store:d,principal:r,seats:h,people:p}=b(),v=E(),[m,W]=(0,u.useState)("all"),[y,L]=(0,u.useState)(!1),I=e=>e!==void 0&&(e.id===r.id||e.onBehalfOf?.id===r.id)&&r.id!==void 0,pe=new Set(v.map(e=>e.id)),ge=l.filter(e=>!(e.interaction!==void 0&&pe.has(e.interaction))&&(!y||I(e.by))),ce=v.filter(e=>!y||I(e.by)).slice(0,4),O=[...m==="ai"?[]:ge.map(e=>({at:e.at??"",change:e})),...m==="changes"?[]:ce.map(e=>({at:e.at,entry:e}))].sort((e,f)=>e.at<f.at?1:e.at>f.at?-1:0),w=z(d,r),ue=J(),F=H(),M=e=>w.graph.has(e)?f=>{i(),F?.past&&F.show(null),ue.record(f)}:null;return(0,t.jsxs)(t.Fragment,{children:[s?(0,t.jsx)("h2",{style:{...Q,margin:0},children:"Activity"}):null,a!==void 0?(0,t.jsxs)("div",{"data-testid":"agent-seat-row",style:{display:"grid",gap:5,paddingBottom:n.length>0||O.length>0?9:0,...n.length>0||O.length>0?{borderBottom:"1px solid var(--graview-edge)"}:{}},children:[(0,t.jsx)("span",{style:{fontSize:"0.75rem",letterSpacing:"0.14em",textTransform:"uppercase",color:"var(--graview-ink-faint)"},children:"The agent's seat"}),a]}):null,n.length>0?(0,t.jsx)("ol",{style:{margin:0,padding:0,listStyle:"none",display:"grid",gap:7},children:n.slice(0,6).map((e,f)=>(0,t.jsxs)("li",{style:{...S,gap:2,fontSize:"0.8125rem"},children:[(0,t.jsxs)("div",{"data-graview-activity-head":"",style:T,children:[(0,t.jsx)("span",{"aria-hidden":"true",style:{width:6,height:6,borderRadius:999,flex:"0 0 auto",background:e.phase==="running"?"var(--graview-accent)":e.phase==="failed"?"var(--graview-warn)":"var(--graview-edge-bright)"}}),(0,t.jsxs)("span",{"data-graview-activity-words":"",style:{...A,color:"var(--graview-ink)"},children:[e.mutating?"changed":"read"," \xB7"," ",w.allMutations().find(g=>g.name===e.name)?.title??V(e.name)]})]}),!e.mutating&&e.reads&&e.reads.length>0?(0,t.jsxs)("div",{"data-testid":"activity-reads",style:{display:"flex",flexWrap:"wrap",gap:4,paddingLeft:12},children:[[...new Set(e.reads)].slice(0,3).map(g=>(0,t.jsx)(R,{id:g,label:k(w,g),go:M(g),testId:"activity-record"},g)),new Set(e.reads).size>3?(0,t.jsxs)("span",{style:{color:"var(--graview-ink-muted)"},children:["+",new Set(e.reads).size-3]}):null]}):Object.values(e.args).some(g=>typeof g=="string")?(0,t.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:4,paddingLeft:12},children:Object.entries(e.args).filter(g=>typeof g[1]=="string").slice(0,3).map(([g,c])=>(0,t.jsx)(R,{id:c,label:k(w,c),go:M(c),testId:"activity-record"},g))}):null,e.error?(0,t.jsx)("div",{style:{paddingLeft:12,color:"var(--graview-warn)"},children:e.error}):null]},`${e.at}:${f}`))}):null,v.length>0?(0,t.jsx)(u.Suspense,{fallback:null,children:(0,t.jsx)(ye,{shows:m,onShows:W,mine:y,onMine:L})}):null,O.length>0?(0,t.jsx)("ol",{"data-testid":"diff-log",style:{margin:0,padding:0,listStyle:"none",display:"grid",gap:6,fontSize:"0.8125rem"},children:O.map(({change:e,entry:f},g)=>f!==void 0?(0,t.jsx)(u.Suspense,{fallback:null,children:(0,t.jsx)(he,{entry:f,undo:c=>(0,t.jsx)($,{batch:c})})},`ai:${f.id}`):e.digest?(0,t.jsx)(be,{change:e,goes:M},`digest:${e.digest[0]?.batch??g}`):e.withheld?(0,t.jsx)("li",{"data-testid":"withheld-change",style:S,children:(0,t.jsx)("span",{"data-touched":"",style:{...A,color:"var(--graview-ink-muted)",fontStyle:"italic"},children:e.intent})},`change:${g}`):(0,t.jsxs)("li",{"data-batch":e.batch,style:S,children:[(0,t.jsxs)("div",{"data-graview-activity-head":"",style:T,children:[(0,t.jsxs)("span",{"data-graview-activity-words":"",style:A,children:[(0,t.jsxs)("strong",{style:{fontWeight:600},children:[e.author==="human"&&e.by?.onBehalfOf===void 0&&(e.authorId===void 0||r.id===void 0||e.authorId===r.id)?"you":q(e.by??{kind:e.author,id:e.authorId},{graph:w.graph,schema:w.schema,seats:h,people:p}),C(e.via)?(0,t.jsxs)("span",{style:{fontWeight:400,color:"var(--graview-ink-muted)"},children:[", ",C(e.via)]}):null]})," ",(0,t.jsx)("span",{style:{color:"var(--graview-ink-muted)"},children:e.intent}),e.basis?(0,t.jsxs)("span",{"data-graview-lineage":"",style:{color:"var(--graview-ink-faint)"},children:[" \xB7 ",e.basis]}):null]}),e.batch?(0,t.jsx)(ke,{seq:e.seq,intent:e.intent}):null,e.batch?(0,t.jsx)($,{batch:e.batches&&e.batches.length>0?e.batches.length===1?e.batches[0]:e.batches:e.batch}):null]}),(0,t.jsx)("div",{"data-touched":e.touched.join(" "),style:j,children:e.touched.slice(0,4).map(c=>(0,t.jsx)(R,{id:c,label:w.graph.has(c)?k(w,c):e.named?.[c]??k(w,c),go:M(c),testId:"activity-record"},c))})]},`change:${g}`))}):null,(0,t.jsx)(ie,{style:{paddingTop:8,borderTop:"1px solid var(--graview-edge)"}}),o?(0,t.jsxs)("div",{"data-testid":"remembered",style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:10,paddingTop:8,borderTop:"1px solid var(--graview-edge)",fontSize:"0.8125rem",color:"var(--graview-ink-faint)"},children:[(0,t.jsx)("span",{children:"Remembered in this browser"}),(0,t.jsx)(xe,{})]}):null]})}function $e({calls:n,seat:a,remembers:o=!1}){let i=de(),s=E(),l=ae();return{has:!(a===void 0&&n.length===0&&i.length===0&&s.length===0&&!o&&l===0),recent:i.length,running:n.some(d=>d.phase==="running")}}export{E as a,he as b,$ as c,Ee as d,$e as e};
|