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 +0,0 @@
|
|
|
1
|
-
import{a as O,b,c as w,d as R,e as V}from"./chunk.I7KN732Z.js";import{h as d,i as S}from"./chunk.TLPCYKLW.js";import{Qa as $,Ra as F}from"./chunk.DHPXRDT5.js";var E=["card","row","page"],j=["good","warn","bad","neutral","accent"],U=["money","percent","date","time","datetime","relative","count"],_=4,T=40,I=120,L=["number","money","percent"],B=["large"],C=["card","row"],M=1e3,ce=100;function X(e){let n=/^\s*(out|in)\(\s*['"]([A-Za-z][A-Za-z0-9_-]*)['"]\s*\)\s*$/.exec(e);return n?{edge:n[2],way:n[1]}:/^[A-Za-z][A-Za-z0-9_-]*$/.test(e)?{edge:e}:void 0}var v={title:[],headline:[],list:["sort","limit","group","empty","as"],text:["tone","lines"],badge:["tone"],field:["as","currency","label"],image:["as","label"],progress:["label"],group:["direction"],when:["show"],divider:[],figure:["as","currency","label","emphasis"]},Z=Object.keys(v),G=`{"title": "{name}"}, {"headline": "{count(all('offer'))} offers"}, {"figure": expr, "as"?: "number"|"money"|"percent", "currency"?, "label"?, "emphasis"?: "large"}, {"list": expr, "sort"?, "limit"?, "group"?, "empty"?, "as"?: "card"|"row"}, {"text": "\u2026", "tone"?, "lines"?: 0-12}, {"badge": "{status}", "tone"?}, {"field": "quote", "as"?, "currency"?, "label"?}, {"image": "photos", "as"?: "thumb"|"gallery"}, {"progress": {"value": expr, "max": expr}, "label"?}, {"group": [blocks], "direction"?: "row"|"column"}, {"when": expr, "show": [blocks]}, {"divider": true}, {"figure": true}`,Y=e=>/^(image|video|file)$/.test(e?.of??e?.type??"");function ge(e){return Object.fromEntries(Object.entries(e.views??{}).filter(([,n])=>!Array.isArray(n)))}function ye(e){let n=e.views?.home;return Array.isArray(n)?n:void 0}var q={field:()=>!1,relation:()=>!1,figure:!1},z=e=>e.kind??"the home",m=(e,n)=>e!==void 0&&Object.hasOwn(e,n),g=e=>typeof e=="object"&&e!==null&&!Array.isArray(e);function W(e,n,t){let s=O(e);for(let a of s.unknownFunctions)t.findings.push(d("unknown-function",n,`"${a}" is not a function the rule language knows`,"see docs/declaration-document.md#expression-language"));for(let a of s.names){if(t.kind===null){t.findings.push(d("view-name",n,`"${a}" names nothing here: these blocks are about no one record`,"reach records with all('<kind>'), like count(all('offer')) or first(all('party') where role == 'client').name"));continue}a==="id"||t.spec.field(a)||t.spec.relation(a)||t.findings.push(d("view-name",n,`${t.kind} has no field or relation called "${a}"`))}for(let a of s.edges)t.edges.has(a)||t.findings.push(d("view-edge",n,`"${a}" is not a relation any kind declares`));for(let a of s.sweeps)t.kinds.has(a)||t.findings.push(d("view-kind",n,`"${a}" is not a kind this document declares`))}function k(e,n,t){if(typeof e!="string"||e.length===0||e.length>2e3){t.findings.push(d("view-expression",n,`an expression is a line of the rule language, like "status == 'booked'"`));return}try{W(w(e),n,t)}catch(s){if(!(s instanceof b))throw s;t.findings.push(d("expression",n,`${s.sentence} (at character ${s.at+1})`))}}function A(e,n,t,s,a=!1){let l=s==="text";if(typeof e!="string"||e.length===0||e.length>300){t.findings.push(d("view-template",n,'a template is words with {field} in braces, like "{name}" or "{quote|money}", at most 300 characters'));return}let r;try{r=V(e)}catch(i){if(i instanceof R||i instanceof b){t.findings.push(d("template",n,i.sentence));return}throw i}for(let i of r)if(i.expr){if(W(i.expr,n,t),l&&!a&&!i.format&&i.expr.t==="ident"&&(t.slot==="card"||t.slot==="row")&&t.spec.prose?.(i.expr.name)){let o=i.expr.name;t.findings.push(S("view-whole-text",n,`${t.kind} ${t.slot} shows ${o} whole; it will be clamped. Use {${o}|excerpt} or move it to the page.`,`write {${o}|excerpt}, or {${o}|excerpt: 80} for fewer characters`))}if(s==="headline"&&!i.format&&i.expr.t==="ident"&&t.spec.prose?.(i.expr.name)){let o=i.expr.name;t.findings.push(S("view-headline-long",n,`${z(t)}${t.slot?` ${t.slot}`:""} heads it with ${o}, a long text, drawn at a headline's size; a headline is a few words.`,`say it in a text block, {"text": "{${o}}"}, or head it with {${o}|excerpt: 60}`))}}}var K=12;function J(e,n,t){typeof e=="number"&&Number.isInteger(e)&&e>=0&&e<=K||t.findings.push(d("view-lines",n,`lines is ${JSON.stringify(e)}, and a text block's lines is a whole number from 1 to ${K}, or 0 to show it whole`,'{"text": "{awards}", "lines": 6}, or "lines": 0 for no cut at all'))}function Q(e,n,t){if(typeof e=="string"){j.includes(e)||t.findings.push(d("view-tone",n,`"${e}" is not a tone`,`use one of ${j.join(", ")}, or {"expr": "if(status == 'booked', 'good', 'neutral')"}`));return}if(g(e)&&Object.keys(e).length===1&&"expr"in e){k(e.expr,`${n}.expr`,t);return}t.findings.push(d("view-tone",n,'a tone is a word or {"expr": \u2026}',`one of ${j.join(", ")}`))}function x(e,n,t,s){if(!Array.isArray(e)){s.findings.push(d("view-shape",n,"a view is a list of blocks"));return}if(t>_){s.findings.push(d("view-depth",n,`blocks nest at most ${_} deep`,"flatten a group or a condition"));return}e.forEach((a,l)=>ee(a,`${n}.${l}`,t,s))}function ee(e,n,t,s){if(t===1&&s.count++,s.all++,!g(e)){s.findings.push(d("view-block",n,"a block is an object naming what it shows",`one of ${G}`));return}let a=Object.keys(e),l=a.filter(o=>Z.includes(o)&&!(o==="group"&&a.includes("list")));if(l.length===0){s.findings.push(d("view-block",n,`${a.length>0?a.map(o=>`"${o}"`).join(", "):"an empty object"} is not a block Graview knows`,`one of ${G}`));return}if(l.length>1){s.findings.push(d("view-block",n,`a block is one thing, and this says ${l.map(o=>`"${o}"`).join(" and ")}`,"split it into two blocks"));return}let r=l[0];for(let o of a)o!==r&&o!="key"&&!v[r].includes(o)&&s.findings.push(d("unknown-key",`${n}.${o}`,`"${o}" is not part of a ${r} block`,v[r].length>0?`a ${r} block may also say ${v[r].map(f=>`"${f}"`).join(", ")}`:`a ${r} block says nothing else`));let i=e[r];switch(r){case"title":case"headline":case"text":case"badge":A(i,`${n}.${r}`,s,r==="text"||r==="headline"?r:void 0,r==="text"&&"lines"in e),"tone"in e&&Q(e.tone,`${n}.tone`,s),r==="text"&&"lines"in e&&J(e.lines,`${n}.lines`,s);return;case"image":case"field":{let o=r==="image";if(typeof i!="string"||!(o?s.spec.files?.(i):s.spec.field(i))){let u=typeof i=="string"&&s.spec.relation(i);s.findings.push(d(`view-${r}`,`${n}.${r}`,`${s.kind} has no ${o?"image, video or file ":""}field ${typeof i=="string"?`"${i}"`:"by that name"}`,u?`"${i}" is a relation; show it with {"text": "{${i}.name}"}`:void 0))}let f=o?["thumb","gallery"]:U;"as"in e&&!f.includes(e.as)&&s.findings.push(d("view-format",`${n}.as`,`"${String(e.as)}" is not a way to show ${o?"pictures":"a field"}`,`use one of ${f.join(", ")}`)),o||D(e,n,s,"field"),"label"in e&&oe(e.label,`${n}.label`,s);return}case"progress":{!g(i)||Object.keys(i).some(o=>o!=="value"&&o!=="max")||!("value"in i)||!("max"in i)?s.findings.push(d("view-progress",`${n}.progress`,'progress is {"value": expression, "max": expression}')):(k(i.value,`${n}.progress.value`,s),k(i.max,`${n}.progress.max`,s)),"label"in e&&A(e.label,`${n}.label`,s);return}case"group":"direction"in e&&e.direction!=="row"&&e.direction!=="column"&&s.findings.push(d("view-direction",`${n}.direction`,`a group runs "row" or "column", not "${String(e.direction)}"`)),x(i,`${n}.group`,t+1,s);return;case"when":k(i,`${n}.when`,s),"show"in e?x(e.show,`${n}.show`,t+1,s):s.findings.push(d("view-when",n,'a condition says what it shows: {"when": expr, "show": [blocks]}'));return;case"figure":if(typeof i=="string")return ne(e,n,s);for(let o of["as","currency","label","emphasis"])o in e&&s.findings.push(d("unknown-key",`${n}.${o}`,`"${o}" belongs to a figure that works a number out; {"figure": true} is the kind's picture`,`write {"figure": "count(all('offer'))", "as": "number"}`));i!==!0?s.findings.push(d("view-block",`${n}.figure`,`a figure is a number worked out, {"figure": "sum(all('offer'), net)", "as": "money"}, or the kind's picture, {"figure": true}`)):s.spec.figure||s.findings.push(d("view-figure",`${n}.figure`,`${z(s)} has no figure to show`,s.kind===null?`work a number out: {"figure": "count(all('offer'))"}`:'give the kind a "figure", or leave this block out'));return;case"list":return te(e,n,s);case"divider":i!==!0&&s.findings.push(d("view-block",`${n}.${r}`,`write {"${r}": true}`));return}}function ne(e,n,t){k(e.figure,`${n}.figure`,t),"as"in e&&!L.includes(e.as)&&t.findings.push(d("view-format",`${n}.as`,`"${String(e.as)}" is not a way to say a figure`,`use one of ${L.join(", ")}`)),D(e,n,t,"figure"),"label"in e&&A(e.label,`${n}.label`,t),"emphasis"in e&&!B.includes(e.emphasis)&&t.findings.push(d("view-emphasis",`${n}.emphasis`,`"${String(e.emphasis)}" is not how loudly a figure is said`,`use ${B.map(s=>`"${s}"`).join(", ")}, or leave it out for the figure's own size`))}function D(e,n,t,s){"currency"in e&&(typeof e.currency!="string"||!/^[A-Z]{3}$/.test(e.currency)?t.findings.push(d("view-currency",`${n}.currency`,'a currency is its three-letter code, like "USD" or "EUR"')):e.as!=="money"&&t.findings.push(d("view-currency",`${n}.currency`,`a currency belongs on a ${s} shown as money`,'add "as": "money"')))}function ie(e,n){let t=[...n.kinds],s=(l,r)=>{let i=new Set;for(let o of l){let f=n.vocabulary.namesOf(o)?.targets?.(r);if(f==="*")return t;for(let u of f??[])i.add(u)}return i.size>0?[...i]:void 0},a=l=>{switch(l.t){case"ident":return n.kind!==null&&n.spec.relation(l.name)?s([n.kind],l.name):void 0;case"member":{let r=a(l.object);return r?s(r,l.name):void 0}case"where":return a(l.set);case"call":{let r=l.args[0],i=r?.t==="lit"&&typeof r.value=="string"?r.value:void 0;if(l.fn==="all")return i!==void 0&&n.kinds.has(i)?[i]:void 0;let o=l.args.length===2&&l.args[1]?.t==="lit"&&typeof l.args[1].value=="string"?l.args[1].value:void 0;if(l.fn==="out"&&o!==void 0){let f=a(r);return f?s(f,o):void 0}if(l.fn==="out")return i!==void 0&&n.kind!==null?s([n.kind],i):void 0;if(l.fn==="in"){let f=o??i,u=o!==void 0?a(r):n.kind!==null?[n.kind]:void 0,c=f!==void 0?n.vocabulary.sources(f).filter(p=>{let y=n.vocabulary.namesOf(p)?.targets?.(f);return!u||y==="*"||u.some(h=>y?.includes(h))}):[];return c.length>0?c:void 0}if((l.fn==="sort"||l.fn==="first")&&r)return a(r);if(l.fn==="either"){let f=l.args.map(a);return f.every(u=>u!==void 0)?[...new Set(f.flatMap(u=>u??[]))]:void 0}return}default:return}};return a(e)}function N(e,n,t,s){let a;try{a=w(e)}catch(r){if(!(r instanceof b))throw r;s.findings.push(d("expression",n,`${r.sentence} (at character ${r.at+1})`));return}let l=O(a);for(let r of l.unknownFunctions)s.findings.push(d("unknown-function",n,`"${r}" is not a function the rule language knows`,"see docs/declaration-document.md#expression-language"));for(let r of l.edges)s.edges.has(r)||s.findings.push(d("view-edge",n,`"${r}" is not a relation any kind declares`));if(t)for(let r of l.names)r==="id"||t.some(i=>s.vocabulary.namesOf(i)?.field(r)||s.vocabulary.namesOf(i)?.relation(r))||s.findings.push(d("view-name",n,`${t.join(" and ")} ${t.length===1?"has":"have"} no field or relation called "${r}"`))}function te(e,n,t){let s=e.list;k(s,`${n}.list`,t);let a;if(typeof s=="string")try{a=ie(w(s),t)}catch{a=void 0}let l=i=>{if(!a)return[...t.kinds].map(f=>t.vocabulary.namesOf(f)?.choices?.(i)).find(f=>f!==void 0);let o=a.map(f=>t.vocabulary.namesOf(f)?.choices?.(i));return o.every(f=>f!==void 0)?[...new Set(o.flatMap(f=>f??[]))]:void 0},r=a?a.join(" and "):"any kind";if("sort"in e){let i=e.sort;if(typeof i=="string")N(i,`${n}.sort`,a,t);else if(g(i)&&typeof i.by=="string"&&Object.keys(i).every(o=>o==="by"||o==="direction")){let o=i.direction;o!==void 0&&o!=="asc"&&o!=="desc"&&o!=="choices"?t.findings.push(d("list-sort",`${n}.sort.direction`,`a list is sorted "asc", "desc" or "choices", not "${String(o)}"`,'"choices" puts a choice field in the order its choices are declared')):o==="choices"?l(i.by)===void 0&&t.findings.push(d("list-sort",`${n}.sort.by`,`"${i.by}" is not a choice field of ${r}, so it has no declared order`,'sort by a choice field, or say "asc" or "desc"')):N(i.by,`${n}.sort.by`,a,t)}else t.findings.push(d("list-sort",`${n}.sort`,'a sort is a key, like "net", or {"by": key, "direction": "asc" | "desc" | "choices"}'))}if("limit"in e){let i=e.limit;(typeof i!="number"||!Number.isInteger(i)||i<1||i>M)&&t.findings.push(d("list-limit",`${n}.limit`,`a limit is a whole number from 1 to ${M}`))}if("group"in e){let i=e.group,o=typeof i=="string"?i:g(i)&&typeof i.by=="string"?i.by:void 0;if(!(typeof i=="string"||g(i)&&Object.keys(i).every(u=>u==="by"||u==="headings"))||o===void 0)t.findings.push(d("list-group",`${n}.group`,'a group is a choice field, like "type", or {"by": "type", "headings": {"pain": "What hurts"}} \u2014 or a relation, like "inGenre", a heading per linked record'));else{let u=l(o),c=u===void 0?X(o):void 0,p=c!==void 0&&(c.way!==void 0?t.edges.has(c.edge):a?a.every(y=>t.vocabulary.namesOf(y)?.relation(c.edge)):t.edges.has(c.edge));if(u===void 0&&!p&&t.findings.push(d("list-group",`${n}.group`,`"${o}" is not a choice field or a relation of ${r}, so it has nothing to group by`,'group by a field whose type is enum, or by a relation of the kind listed, like "inGenre"')),g(i)&&"headings"in i){let y=i.headings;if(!g(y)||Object.values(y).some(h=>typeof h!="string"||h.length===0||h.length>80))t.findings.push(d("list-group",`${n}.group.headings`,'headings are words per choice, like {"pain": "What hurts"}, at most 80 characters each'));else if(u)for(let h of Object.keys(y))u.includes(h)||t.findings.push(d("list-group",`${n}.group.headings.${h}`,`"${h}" is not one of ${o}'s choices`,`use ${u.join(", ")}`))}}}"empty"in e&&(typeof e.empty!="string"||e.empty.length===0||e.empty.length>200)&&t.findings.push(d("list-empty",`${n}.empty`,"what an empty list says is a sentence, at most 200 characters")),"as"in e&&!C.includes(e.as)&&t.findings.push(d("list-as",`${n}.as`,`a list draws each record as its "card" or its "row", not "${String(e.as)}"`))}function oe(e,n,t){(typeof e!="string"||e.length===0||e.length>60)&&t.findings.push(d("view-label",n,"a label is a few words, at most 60 characters"))}function P(e,n,t,s,a,l,r){let i={kind:null,spec:q,kinds:s,edges:a,vocabulary:t,findings:l,count:0,all:0};Array.isArray(e)&&e.length===0&&l.push(d("view-shape",n,`${r} has no blocks`,'give it one: {"headline": "\u2026"}')),x(e,n,1,i),H(i,n,r,"show less")}function H(e,n,t,s){e.count>T?e.findings.push(d("view-size",n,`${t} has ${e.count} blocks at its top; a view has at most ${T} there, a group or a condition counting as one`,`${s}, or gather some into a group`)):e.all>I&&e.findings.push(d("view-size",n,`${t} has ${e.all} blocks counting the ones inside its groups and conditions; a view has at most ${I} in all`,s))}function se(e,n,t,s,a){Array.isArray(e)&&e.forEach((l,r)=>{if(!g(l)||l.name!=="blocks"||!g(l.options)||!("blocks"in l.options))return;let i=[];P(l.options.blocks,`lenses.${r}.options.blocks`,n,t,s,i,`the lens "${String(l.title??r)}"`);for(let o of i)a.push({...o,severity:"warning"})})}function re(e,n,t,s,a,l,r){let i=[];if(e===void 0)return i;if(!g(e))return i.push(d("view-shape",n,'views are an object of kinds, each with a "card", a "row" or a "page"')),i;for(let[o,f]of Object.entries(e)){if(o==="home"&&Array.isArray(f)){P(f,`${n}.home`,r,s,a,i,"the home");continue}let u=t(o);if(!u){i.push(d("view-kind",`${n}.${o}`,`"${o}" is not a kind this ${l} declares`));continue}if(!g(f)){i.push(d("view-shape",`${n}.${o}`,`a kind's views are {"card": [blocks], "row": [blocks], "page": [blocks]}`));continue}for(let c of Object.keys(f))E.includes(c)||i.push(d("view-slot",`${n}.${o}.${c}`,`"${c}" is not a place a view is drawn`,`use ${E.map(p=>`"${p}"`).join(", ")}`));for(let c of E){let p=f[c];if(p===void 0)continue;let y={kind:o,spec:u,kinds:s,edges:a,vocabulary:r,findings:i,count:0,all:0,slot:c};x(p,`${n}.${o}.${c}`,1,y),H(y,`${n}.${o}.${c}`,`this ${c}`,"show less, or move detail to the page")}}return i}function he(e){let n=new Set(Object.keys(e.kinds)),t=new Set(Object.values(e.kinds).flatMap(r=>Object.keys($(r.edges)))),s=r=>{let i=m(e.kinds,r)?e.kinds[r]:void 0;return i?{field:o=>m(i.fields,o)||m(i.computed,o)||F(i.edges).has(o),relation:o=>m($(i.edges),o),figure:i.figure!==void 0,files:o=>m(i.fields,o)&&Y(i.fields[o]),choices:o=>m(i.fields,o)&&i.fields[o].type==="enum"?i.fields[o].options:void 0,targets:o=>m($(i.edges),o)?i.edges[o].to:void 0,prose:o=>m(i.fields,o)&&i.fields[o].type==="text"}:void 0},a={namesOf:s,sources:r=>Object.keys(e.kinds).filter(i=>m(e.kinds[i].edges,r))},l=re(e.views,"views",s,n,t,"document",a);return se(e.lenses,a,n,t,l),l}export{j as a,U as b,L as c,B as d,M as e,ce as f,X as g,ge as h,ye as i,he as j};
|
|
@@ -1,25 +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 tt}from"./chunk.SDO3U72B.js";import{Ad as vo,Ae as jt,Cd as bo,Id as xo,N as go,Oa as mo,Od as Po,Rc as Wt,Sa as Nt,Ua as ho,ce as Eo,eb as wo,me as Ao,ne as ko,td as So,te as Ro,xe as To,ze as et}from"./chunk.DHPXRDT5.js";import{a as Qe,b as D}from"./chunk.AJZBJBMO.js";var $o=Qe(v=>{"use strict";var Ut=Symbol.for("react.transitional.element"),bi=Symbol.for("react.portal"),xi=Symbol.for("react.fragment"),Pi=Symbol.for("react.strict_mode"),Ei=Symbol.for("react.profiler"),Ai=Symbol.for("react.consumer"),ki=Symbol.for("react.context"),Ri=Symbol.for("react.forward_ref"),Ti=Symbol.for("react.suspense"),Ci=Symbol.for("react.memo"),Go=Symbol.for("react.lazy"),Mi=Symbol.for("react.activity"),Do=Symbol.iterator;function Oi(e){return e===null||typeof e!="object"?null:(e=Do&&e[Do]||e["@@iterator"],typeof e=="function"?e:null)}var Fo={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Bo=Object.assign,Ko={};function be(e,t,n){this.props=e,this.context=t,this.refs=Ko,this.updater=n||Fo}be.prototype.isReactComponent={};be.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};be.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function qo(){}qo.prototype=be.prototype;function Yt(e,t,n){this.props=e,this.context=t,this.refs=Ko,this.updater=n||Fo}var Zt=Yt.prototype=new qo;Zt.constructor=Yt;Bo(Zt,be.prototype);Zt.isPureReactComponent=!0;var No=Array.isArray;function $t(){}var I={H:null,A:null,T:null,S:null},zo=Object.prototype.hasOwnProperty;function Xt(e,t,n){var o=n.ref;return{$$typeof:Ut,type:e,key:t,ref:o!==void 0?o:null,props:n}}function Vi(e,t){return Xt(e.type,t,e.props)}function Jt(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ut}function Ii(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Wo=/\/+/g;function zt(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Ii(""+e.key):t.toString(36)}function Hi(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then($t,$t):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function ve(e,t,n,o,r){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(i){case"bigint":case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Ut:case bi:a=!0;break;case Go:return a=e._init,ve(a(e._payload),t,n,o,r)}}if(a)return r=r(e),a=o===""?"."+zt(e,0):o,No(r)?(n="",a!=null&&(n=a.replace(Wo,"$&/")+"/"),ve(r,t,n,"",function(c){return c})):r!=null&&(Jt(r)&&(r=Vi(r,n+(r.key==null||e&&e.key===r.key?"":(""+r.key).replace(Wo,"$&/")+"/")+a)),t.push(r)),1;a=0;var s=o===""?".":o+":";if(No(e))for(var l=0;l<e.length;l++)o=e[l],i=s+zt(o,l),a+=ve(o,t,n,i,r);else if(l=Oi(e),typeof l=="function")for(e=l.call(e),l=0;!(o=e.next()).done;)o=o.value,i=s+zt(o,l++),a+=ve(o,t,n,i,r);else if(i==="object"){if(typeof e.then=="function")return ve(Hi(e),t,n,o,r);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return a}function dt(e,t,n){if(e==null)return e;var o=[],r=0;return ve(e,o,"","",function(i){return t.call(n,i,r++)}),o}function Li(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var jo=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},_i={map:dt,forEach:function(e,t,n){dt(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return dt(e,function(){t++}),t},toArray:function(e){return dt(e,function(t){return t})||[]},only:function(e){if(!Jt(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};v.Activity=Mi;v.Children=_i;v.Component=be;v.Fragment=xi;v.Profiler=Ei;v.PureComponent=Yt;v.StrictMode=Pi;v.Suspense=Ti;v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I;v.__COMPILER_RUNTIME={__proto__:null,c:function(e){return I.H.useMemoCache(e)}};v.cache=function(e){return function(){return e.apply(null,arguments)}};v.cacheSignal=function(){return null};v.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var o=Bo({},e.props),r=e.key;if(t!=null)for(i in t.key!==void 0&&(r=""+t.key),t)!zo.call(t,i)||i==="key"||i==="__self"||i==="__source"||i==="ref"&&t.ref===void 0||(o[i]=t[i]);var i=arguments.length-2;if(i===1)o.children=n;else if(1<i){for(var a=Array(i),s=0;s<i;s++)a[s]=arguments[s+2];o.children=a}return Xt(e.type,r,o)};v.createContext=function(e){return e={$$typeof:ki,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:Ai,_context:e},e};v.createElement=function(e,t,n){var o,r={},i=null;if(t!=null)for(o in t.key!==void 0&&(i=""+t.key),t)zo.call(t,o)&&o!=="key"&&o!=="__self"&&o!=="__source"&&(r[o]=t[o]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var s=Array(a),l=0;l<a;l++)s[l]=arguments[l+2];r.children=s}if(e&&e.defaultProps)for(o in a=e.defaultProps,a)r[o]===void 0&&(r[o]=a[o]);return Xt(e,i,r)};v.createRef=function(){return{current:null}};v.forwardRef=function(e){return{$$typeof:Ri,render:e}};v.isValidElement=Jt;v.lazy=function(e){return{$$typeof:Go,_payload:{_status:-1,_result:e},_init:Li}};v.memo=function(e,t){return{$$typeof:Ci,type:e,compare:t===void 0?null:t}};v.startTransition=function(e){var t=I.T,n={};I.T=n;try{var o=e(),r=I.S;r!==null&&r(n,o),typeof o=="object"&&o!==null&&typeof o.then=="function"&&o.then($t,jo)}catch(i){jo(i)}finally{t!==null&&n.types!==null&&(t.types=n.types),I.T=t}};v.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()};v.use=function(e){return I.H.use(e)};v.useActionState=function(e,t,n){return I.H.useActionState(e,t,n)};v.useCallback=function(e,t){return I.H.useCallback(e,t)};v.useContext=function(e){return I.H.useContext(e)};v.useDebugValue=function(){};v.useDeferredValue=function(e,t){return I.H.useDeferredValue(e,t)};v.useEffect=function(e,t){return I.H.useEffect(e,t)};v.useEffectEvent=function(e){return I.H.useEffectEvent(e)};v.useId=function(){return I.H.useId()};v.useImperativeHandle=function(e,t,n){return I.H.useImperativeHandle(e,t,n)};v.useInsertionEffect=function(e,t){return I.H.useInsertionEffect(e,t)};v.useLayoutEffect=function(e,t){return I.H.useLayoutEffect(e,t)};v.useMemo=function(e,t){return I.H.useMemo(e,t)};v.useOptimistic=function(e,t){return I.H.useOptimistic(e,t)};v.useReducer=function(e,t,n){return I.H.useReducer(e,t,n)};v.useRef=function(e){return I.H.useRef(e)};v.useState=function(e){return I.H.useState(e)};v.useSyncExternalStore=function(e,t,n){return I.H.useSyncExternalStore(e,t,n)};v.useTransition=function(){return I.H.useTransition()};v.version="19.2.8"});var j=Qe((Ss,Uo)=>{"use strict";Uo.exports=$o()});var ir=Qe(pt=>{"use strict";var $i=Symbol.for("react.transitional.element"),Ui=Symbol.for("react.fragment");function rr(e,t,n){var o=null;if(n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),"key"in t){n={};for(var r in t)r!=="key"&&(n[r]=t[r])}else n=t;return t=n.ref,{$$typeof:$i,type:e,key:o,ref:t!==void 0?t:null,props:n}}pt.Fragment=Ui;pt.jsx=rr;pt.jsxs=rr});var De=Qe((Ms,ar)=>{"use strict";ar.exports=ir()});var we={focusId:null,relation:null,expanded:[],pins:{}},nt=e=>{let t=Number(e);return Number.isFinite(t)?t:null};function Y(e){let t=new URLSearchParams;e.focusId&&t.set("focus",e.focusId),e.relation&&t.set("relation",e.relation),e.overview&&t.set("overview","1"),e.zoom&&t.set("zoom","1"),e.past&&t.set("past","1"),e.shown&&e.shown.length>0&&t.set("show",[...e.shown].sort().join(",")),e.selection!==void 0&&e.selection.length>0&&t.set("sel",[...e.selection].sort().join(",")),e.expanded.length>0&&t.set("expand",[...e.expanded].sort().join(","));for(let o of Object.keys(e.pins).sort()){let r=e.pins[o];t.set(`pin.${o}`,`${ot(r.x)},${ot(r.y)}`)}e.pan&&(e.pan.x!==0||e.pan.y!==0)&&t.set("pan",`${ot(e.pan.x)},${ot(e.pan.y)}`);for(let o of Object.keys(e.within??{}).sort()){let r=e.within[o];r.length>0&&t.set(`in.${o}`,r)}e.q&&e.q.trim().length>0&&t.set("q",e.q);let n=t.toString();return n?`#${n}`:"#"}function gi(e){return e&&e.startsWith("agg:")?`aggregate:${e.slice(4)}`:e}function rt(e){let t=e.includes("#")?e.slice(e.indexOf("#")+1):e,n=new URLSearchParams(t),o=Object.create(null);for(let[y,g]of n){if(!y.startsWith("pin."))continue;let[m,b]=g.split(","),T=m===void 0?null:nt(m),f=b===void 0?null:nt(b);T===null||f===null||(o[y.slice(4)]={x:T,y:f})}let r=Object.create(null);for(let[y,g]of n)!y.startsWith("in.")||g.length===0||(r[y.slice(3)]=g);let i=n.get("view");i&&i.length>0&&r.view===void 0&&(r.view=i);let a=n.get("pan")?.split(",")??[],s=a[0]===void 0?null:nt(a[0]),l=a[1]===void 0?null:nt(a[1]),c=(n.get("sel")??"").split(",").filter(y=>y.length>0).sort(),u=n.get("overview")==="1";return{...c.length>0?{selection:c}:{},...u?{overview:!0}:{},...n.get("zoom")==="1"?{zoom:!0}:{},...n.get("past")==="1"?{past:!0}:{},...n.get("show")?{shown:[...new Set(n.get("show").split(",").filter(Boolean))].sort()}:{},...s!==null&&l!==null?{pan:{x:s,y:l}}:{},...Object.keys(r).length>0?{within:r}:{},...n.get("q")?.trim()?{q:n.get("q")}:{},focusId:gi(n.get("focus")),relation:n.get("relation"),expanded:(n.get("expand")??"").split(",").filter(y=>y.length>0&&(u||!y.startsWith("kind:"))).sort(),pins:o}}function ns(e){let t=rt(e);return Y(t)==="#"?{...t,overview:!0}:t}function os(e){let t=Y(e);return t==="#overview=1"?"":t}function ot(e){return Math.round(e*100)/100}function Mo(e,t){return Y(e)===Y(t)}var Co="edge:";function Oo(e){if(!e.startsWith(Co))return null;let t=e.slice(Co.length).split(":");if(t.length!==3)return null;let[n,o,r]=t;if(!n||!o||!r)return null;try{return{kind:decodeURIComponent(n),from:decodeURIComponent(o),to:decodeURIComponent(r)}}catch{return null}}function Gt(e){let{pan:t,...n}=e;return{...n,pins:{}}}function z(e,t){if(t===e.focusId)return{...e,focusId:t};let n=Gt(e);return{...n.within?.q!==void 0?ne(n,"q",null):n,focusId:t}}function Vo(e,t){return{...e,relation:t}}function ne(e,t,n){let o={...e.within??{}};if(n===null?delete o[t]:o[t]=n,Object.keys(o).length===0){let{within:r,...i}=e;return i}return{...e,within:o}}function ue(e,t){if(t!==e.overview&&(e=Gt(e)),!t){let n=e.expanded.filter(o=>!o.startsWith("kind:"));return{...e,overview:!1,expanded:n}}return{...e,overview:t}}function it(e,t){if(t.length===0){let{selection:n,...o}=e;return o}return{...e,selection:[...t]}}function Le(e,t){if(t!==(e.zoom===!0)&&(e=Gt(e)),!t){let{zoom:n,...o}=e;return o}return{...e,zoom:!0}}function at(e,t){let n=new Set(e.expanded);return n.has(t)?n.delete(t):n.add(t),{...e,expanded:[...n].sort()}}var lt="aggregate:",st="kind:";function Ft(e){return`${st}${e}`}function Se(e){return e.startsWith(st)?e.slice(st.length):null}var as="kinds:beyond";function mi(e){let t=Se(e);return t?[t]:ce(e)}function oe(...e){return`${lt}${[...e].sort().join("+")}`}function Io(e){return e.startsWith(lt)}function ce(e){return!Io(e)||e.includes("|")?[]:e.slice(lt.length).split("+").filter(Boolean)}function Ho(e,t,n={}){let o=Se(t);if(o!==null&&e.overview&&n.ownPicture!==!0)return at(e,t);let r=o!==null?oe(o):t;if(e.zoom&&e.focusId===r&&!(o!==null&&n.carry))return Le(e,!1);if(o!==null&&n.carry){let i=ue({...z(e,r),relation:null},!1);return ne(Le(i,!0),"q",n.carry)}return Le({...z(e,r),relation:null},!0)}function hi(e,t,n){return ne(ue(z(e,oe(t)),!1),"view",n)}function ss(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var Lo="aggregate:";function Bt(e){return e.startsWith(Lo)&&e.includes("|")}var Kt=e=>e?.off===!0,wi=e=>e!==void 0&&!Kt(e)&&(e.fast!==void 0||e.thinking!==void 0||e.answer!==void 0||e.decide!==void 0||e.complete!==void 0||e.turn!==void 0),_o=e=>e!==void 0&&!Kt(e)&&(e.fast!==void 0||e.decide!==void 0),Si=e=>e?.suggestOnOpen!==!1&&_o(e),vi=e=>e?.hoverChips===!0&&_o(e);var qt={};var Yo=D(j(),1),Di={turns:[],outcomes:new Map,busy:!1,pending:null,draft:null,draftNote:null},Zo=e=>`graview:seat:${e}`;function Ni(e){if(!e)return{};try{let t=sessionStorage.getItem(e);if(!t)return{};let n=JSON.parse(t);return{...Array.isArray(n.turns)?{turns:n.turns}:{},...Array.isArray(n.outcomes)?{outcomes:new Map(n.outcomes)}:{},...n.draft?.drawn?{draft:n.draft}:{}}}catch{return{}}}function Wi(e,t){if(e)try{sessionStorage.setItem(e,JSON.stringify({turns:t.turns.slice(-40),outcomes:[...t.outcomes],draft:t.draft}))}catch{}}function Qt(e){let t=e===null?null:Zo(e),n={...Di,...Ni(t)},o=new Set,r=(i,a=!0)=>{n=i,a&&Wi(t,n);for(let s of[...o])s()};return{get:()=>n,subscribe(i){return o.add(i),()=>void o.delete(i)},setTurns:i=>r({...n,turns:i(n.turns)}),settle:(i,a)=>r({...n,outcomes:new Map(n.outcomes).set(i,a)}),setBusy:i=>r({...n,busy:i},!1),ask:i=>r({...n,pending:i.trim()||null}),takePending(){let i=n.pending;return i!==null&&r({...n,pending:null},!1),i},setDraft:(i,a=null)=>r({...n,draft:i,draftNote:a})}}function ji(e){return(0,Yo.useSyncExternalStore)(e.subscribe,e.get,e.get)}var Jo=D(j(),1),Gi={entries:[],ghost:null,loaded:!1};function Xo(e,t){let n=new Map(e.map(o=>[o.id,o]));for(let o of t)n.set(o.id,{...n.get(o.id),...o});return[...n.values()].sort((o,r)=>o.at<r.at?1:o.at>r.at?-1:0)}function en(e){let t=Gi,n=new Set,o=r=>{t=r;for(let i of[...n])i()};return{get:()=>t,subscribe:r=>(n.add(r),()=>n.delete(r)),record:r=>{o({...t,entries:Xo(t.entries,[r])}),Promise.resolve(e()?.keep?.(r)).catch(i=>{console.warn("The host did not keep an AI interaction:",i)})},setGhost:r=>o({...t,ghost:r}),load:()=>{if(t.loaded)return;o({...t,loaded:!0});let r=e()?.load;r&&Promise.resolve(r()).then(i=>o({...t,entries:Xo(t.entries,i)})).catch(i=>{console.warn("The host's AI interactions could not be read:",i)})}}}function Fi(e){return(0,Jo.useSyncExternalStore)(e.subscribe,e.get,e.get)}function Qo(e){return e?.closest?.("[data-graview-pick]")?.getAttribute("data-graview-pick")??null}function xs(e,t,n,o){for(let r=e;r&&r!==t?.parentElement;r=r.parentElement){if(typeof r.querySelectorAll!="function")continue;let i=[...new Set([...r.querySelectorAll("[data-graview-pick]")].map(s=>s.getAttribute("data-graview-pick")??"").filter(s=>s!==""&&s!==o))];if(i.length===0)continue;let a=i[0];return i.slice(1).every(s=>n(a,s))?a:null}return null}var xe=D(j(),1),ut=(0,xe.createContext)(void 0),Bi=()=>(0,xe.useContext)(ut),ct=(0,xe.createContext)(void 0),Ki=()=>(0,xe.useContext)(ct);var A=D(j(),1),_e=(0,A.createContext)(null);function tr(){return(0,A.useContext)(_e)}function qi(e,t){let n=tr(),o=(0,A.useMemo)(()=>n?n.live.seenBy(t):e,[n,e,t]),r=(0,A.useRef)(0),i=(0,A.useCallback)(a=>o.subscribe(()=>{r.current+=1,a()}),[o]);return(0,A.useSyncExternalStore)(i,()=>r.current,()=>0),o}var nr=tt(()=>(__graviewPreload(import.meta.url,["./chunk.YFVJUHAK.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.FC6AF6CC.js")));function tn(e){let[,t]=(0,A.useReducer)(o=>o+1,0),n=e.publishing?.mode==="on-publish"&&!vo();return(0,A.useEffect)(()=>{n&&nr().then(t,()=>{})},[n]),!n}var er,zi=400;function nn(e,t,n){let o=(0,A.useContext)(_e),r=o!==null&&o.owns(e,t),[i,a]=(0,A.useState)(null),[s,l]=(0,A.useState)(er);(0,A.useEffect)(()=>{if(s||r||i===null)return;let P=!0;return nr().then(O=>{er=O,P&&l(O)},()=>{}),()=>{P=!1}},[s,r,i]);let[c,u]=(0,A.useState)(0),[y,g]=(0,A.useMemo)(()=>r||i===null||!s?[]:[i>=e.log.length?void 0:s.askArchived(e,i,n)??s.askDeclaration(n,i),s.keptOf(e,n)],[r,e,i,n,s,c]),m=y&&"waiting"in y?y.waiting:void 0,b=y&&"seq"in y?y:null,[T,f]=(0,A.useState)(void 0);(0,A.useEffect)(()=>{if(!m)return;let P=!0,O=setTimeout(()=>P&&f(m),zi);return m.then(()=>P&&u(L=>L+1)),()=>{P=!1,clearTimeout(O)}},[m]);let h=m!==void 0&&T!==m||b!==null,w=(0,A.useMemo)(()=>{if(r||i===null||i>=e.log.length||!s||h)return null;try{let P=s.pastAt(e,i,n);return{seq:i,at:P.past?.at,store:P}}catch{return null}},[r,e,i,n,s,h,c]),k=(0,A.useRef)(null),E=h?k.current:w;(0,A.useEffect)(()=>{k.current=E},[E]);let B=(0,A.useCallback)(P=>a(P===null?null:P>=e.log.length?Number.POSITIVE_INFINITY:P),[e]),G=(0,A.useCallback)((P,O)=>[e,E?.store].some(L=>L!==void 0&&(L===P||L.seenBy(O)===P)),[e,E]),N=i!==null,H=(0,A.useMemo)(()=>({past:E,open:N,show:B,live:e,host:n,owns:G,archive:b,kept:g}),[E,N,B,e,n,G,b,g]);return r?o:H}var or=D(j(),1),on=(0,or.createContext)(null);var sr=e=>`graview:setting:${e}`;function lr(){return localStorage}function dr(e,t){try{let n=(t??lr()).getItem(sr(e.name));if(n!==null&&e.options.some(o=>o.value===n))return n}catch{}return e.initial}function ur(e,t,n){try{(n??lr()).setItem(sr(e.name),t)}catch{}}function cr(e,t){if(typeof document>"u")return;let n=document.documentElement;if(e.honored==="root-font-size"){n.style.fontSize=t===e.initial?"":t;return}let o=`graview${e.name.replace(/-([a-z0-9])/g,(r,i)=>i.toUpperCase()).replace(/^[a-z]/,r=>r.toUpperCase())}`;t===e.initial?delete n.dataset[o]:n.dataset[o]=t}var R=D(j(),1);function rn(e){return et(e)}var Yi=12,Zi=4;function Xi(e,t,n){let o=rn(t);return e.get(o)??{participant:o,who:t.id??t.kind,at:null,mode:"docked",since:n,trail:[]}}var ft=(e,t)=>t===null||e[e.length-1]===t?e:[...e,t].slice(-Yi);function pr(e,t){let n=e.filter(r=>r.length>0);if(n.length===0)return null;if(n.length<=Zi)return n[0];let o=new Set(n.map(r=>t(r)).filter(r=>r!==void 0));return o.size===1?Ft([...o][0]):n[0]}function an(e,t,n){let o=new Map(e);if(t.type==="rest"){for(let[a,s]of e)s.mode!=="asking"&&s.mode!=="docked"&&t.at-s.since>=t.holdMs&&o.set(a,{...s,mode:"docked",at:null,trail:[],say:void 0,confidence:void 0});return o}if(t.author.kind!=="agent")return o;let r=Xi(e,t.author,t.at),i=a=>o.set(r.participant,{...r,...a,since:t.at});switch(t.type){case"read":{let a=pr(t.ids,n);return i({at:a,mode:"reading",trail:ft(r.trail,a)}),o}case"about-to-write":case"write":{let a=pr(t.ids,n);return i({at:a,mode:"writing",trail:ft(r.trail,a),say:void 0,confidence:void 0}),o}case"refused":return i({at:t.where,mode:"refused",say:t.say,confidence:void 0,trail:ft(r.trail,t.where)}),o;case"asking":return i({at:t.where??r.at,mode:"asking",say:t.say,...t.confidence!==void 0?{confidence:t.confidence}:{confidence:void 0},trail:ft(r.trail,t.where)}),o;case"said":return i({say:t.say,...t.confidence!==void 0?{confidence:t.confidence}:{confidence:void 0},...t.caption?{caption:t.caption}:{}}),o;case"over":return i({over:t.over}),o;case"home":return i({at:null,mode:"docked",trail:[],say:void 0,confidence:void 0,over:null}),o;default:return o}}var fr="graview:session";function gr(e){let t=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID().slice(0,8):Math.random().toString(36).slice(2,10);try{let n=e??sessionStorage,o=n.getItem(fr);if(o)return o;let r=t();return n.setItem(fr,r),r}catch{return t()}}var sn={name:"share-where",title:"Where you are",description:"Whether the others here see which stop you are on.",honored:"root-attribute",options:[{value:"shared",label:"Shown"},{value:"private",label:"Hidden"}],initial:"shared"},ln={name:"share-over",title:"What you point at",description:"Whether the others see the thing under your pointer, outlined in your color.",honored:"root-attribute",options:[{value:"private",label:"Kept to yourself"},{value:"shared",label:"Outlined for others"}],initial:"private"},mr=[sn,ln],yr=800;function hr(e){let{channel:t,store:n,view:o,principal:r,session:i,robots:a,seatWho:s,settingValues:l,setView:c,ttlMs:u=To,people:y,seats:g}=e,[m,b]=(0,R.useState)(()=>new Map),[T,f]=(0,R.useState)(null),[h,w]=(0,R.useState)(null),[k,E]=(0,R.useState)(null),B=typeof r.id=="string"&&r.id.length>0,G=B&&(l[sn.name]??sn.initial)==="shared",N=G&&(l[ln.name]??ln.initial)==="shared",H=rn({kind:r.kind,...r.id?{id:r.id}:{},session:i}),P=B?wo(r,{graph:n.graph,schema:n.schema,...g?{seats:g}:{},...y?{people:y}:{}}):"",O=s?a.get(`agent:${s}:${i}`):void 0,L=(0,R.useMemo)(()=>!t||!G?null:{participant:H,kind:r.kind,name:P,...r.onBehalfOf?.id?{onBehalfOf:r.onBehalfOf.id,...r.onBehalfOf.name?{onBehalfOfName:r.onBehalfOf.name}:{}}:{},hue:Wt(r.id??"nobody"),stop:k??Y(o),...N?{over:T}:{},...O?{robot:{at:O.at,mode:O.mode}}:{},at:new Date().toISOString()},[t,G,N,H,P,r.id,r.kind,r.onBehalfOf?.id,r.onBehalfOf?.name,o,k,T,O?.at,O?.mode]),Ge=(0,R.useRef)(null),ie=x=>x&&t?.here({...x,caret:Ge.current??void 0,at:new Date().toISOString()}),Fe=(0,R.useCallback)(x=>{Ge.current=x,ie(L)},[t,L]);(0,R.useEffect)(()=>{if(!L)return;ie(L);let x=setInterval(()=>ie(L),yr);return()=>clearInterval(x)},[t,L]),(0,R.useEffect)(()=>t?t.onWho(_=>b(jt(new Map,_,Date.now(),u))):void 0,[t,u]);let Be=m.size>0;(0,R.useEffect)(()=>{if(!Be)return;let x=setInterval(()=>{b(_=>{let se=jt(_,[],Date.now(),u);return se.size===_.size?_:se})},Math.max(250,Math.min(1e3,u/4)));return()=>clearInterval(x)},[Be,u]),(0,R.useEffect)(()=>{if(!t||typeof window>"u")return;let x=()=>t.leave();return window.addEventListener("pagehide",x),()=>window.removeEventListener("pagehide",x)},[t]),(0,R.useEffect)(()=>{if(!N||typeof document>"u")return;let x=null,_=se=>{let ge=Qo(se.target);ge!==x&&(x=ge,f(ge))};return document.addEventListener("pointermove",_,{passive:!0}),()=>document.removeEventListener("pointermove",_)},[N]);let ye=(0,R.useRef)(null),J=h?m.get(h)??null:null,Re=(0,R.useCallback)(x=>{ye.current=null,w(x)},[]);(0,R.useEffect)(()=>{if(h){if(!J){w(null);return}J.stop!==ye.current?.stop&&(ye.current={stop:J.stop,at:Date.now()},c(rt(J.stop)))}},[h,J,c]),(0,R.useEffect)(()=>{let x=ye.current;!h||x===null||Date.now()-x.at<400||Mo(o,rt(x.stop))||w(null)},[o,h]),(0,R.useEffect)(()=>{if(!h||typeof document>"u")return;let x=_=>{_.key==="Escape"&&w(null)};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[h]);let[$,At]=(0,R.useState)(null),Ke=(0,R.useRef)(Y(o));Ke.current=k??Y(o);let qe=(0,R.useCallback)(x=>At(_=>(x===null&&_&&t?.alsoHere?.({..._,at:new Date().toISOString(),until:new Date().toISOString()}),x===null?null:{hue:Wt("graview"),...x,stop:Ke.current,at:new Date().toISOString()})),[t]);(0,R.useEffect)(()=>{if(!$||!t?.alsoHere)return;let x=()=>t.alsoHere?.({...$,at:new Date().toISOString()});x();let _=setInterval(x,yr);return()=>clearInterval(_)},[$,t]);let ze=(0,R.useMemo)(()=>{if(!$)return m;let x=new Map(m);return x.set($.participant,{...$,at:new Date().toISOString()}),x},[m,$]),Q=L!==null,ae=(0,R.useMemo)(()=>Q?{participant:H,name:P}:null,[Q,H,P]);return(0,R.useMemo)(()=>({who:ze,aiHere:qe,sharing:ae,following:J,follow:Re,sayWhere:E,sayCaret:Fe}),[ze,qe,ae,J,Re,Fe])}var Z=D(j(),1);function wr(e){return et(e.author)}function Ji(e,t){return e.length>1?"co-edited":t==="rule"?"rule":t==="agent"?"autonomous":"directed"}function Sr(e,t,n,o,r){let i=new Map;for(let[l,c]of e)o-c.at<r&&i.set(l,c);let a=new Set(n.flatMap(l=>l.nodeIds)),s=(l,c,u)=>{let y=i.get(l),g=y?.participants.includes(wr(c))?y.participants:[...y?.participants??[],wr(c)];i.set(l,{at:o,manner:Ji(g,c.author.kind),intent:c.intent,wrote:(y?.wrote??!1)||(u.wrote??!1),read:(y?.read??!1)||(u.read??!1),broke:(y?.broke??!1)||a.has(l),participants:g})};for(let l of t){for(let c of l.writes)s(c,l,{wrote:!0});for(let c of l.reads)l.writes.includes(c)||s(c,l,{read:!0})}for(let l of n)for(let c of l.nodeIds){let u=i.get(c);i.set(c,{at:o,manner:u?.manner??"rule",intent:u?.intent??l.message,wrote:u?.wrote??!1,read:u?.read??!1,broke:!0,participants:u?.participants??["rule::"]})}return i}var Qi=2600;function vr(e,t=Qi){let[n,o]=(0,Z.useState)(()=>new Map),r=(0,Z.useRef)(n);r.current=n;let i=(0,Z.useRef)(null),a=(0,Z.useCallback)(l=>{r.current=l,o(l),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{r.current=new Map,o(new Map)},t)},[t]);(0,Z.useEffect)(()=>{let l=e.violations(),c=e.subscribe((u,y)=>{let g=e.violations(),m=Po(e.allInvariants(),l,g).introduces;l=g,a(Sr(r.current,y,m.map(b=>({nodeIds:b.nodeIds,message:b.message})),Date.now(),t))});return()=>{c(),i.current&&clearTimeout(i.current)}},[e,t,a]);let s=(0,Z.useCallback)(l=>{l.reads.length!==0&&a(Sr(r.current,[ea(l)],[],Date.now(),t))},[t,a]);return{activity:n,noteAttention:s}}function ea(e){return{id:`attention:${e.intent}`,seq:-1,batch:"attention",author:e.author,intent:e.intent,mutation:null,primitives:[],reads:e.reads,writes:[],at:new Date().toISOString()}}var d=D(j(),1);function br(){let e=null,t=new Set,n=new Set,o=r=>{for(let i of n)i(r)};return{subscribe(r){return t.add(r),t.size===1&&o(!0),()=>{t.delete(r),t.size===0&&(e=null,o(!1))}},snapshot:()=>e,set(r){if(!(e===r||e&&r&&e.x===r.x&&e.y===r.y)){e=r;for(let i of t)i()}},get listeners(){return t.size},onActive(r){return n.add(r),()=>void n.delete(r)}}}var yt=D(j(),1),ta=e=>e.definitions.some(t=>mo(t).size>0);function xr(e,t,n){let[o,r]=(0,yt.useState)(void 0),i=(n.roles??[]).join("\0"),a=n.onBehalfOf?JSON.stringify(n.onBehalfOf):"";return(0,yt.useEffect)(()=>{if(!t||!ta(e.schema)){r(void 0);return}let s=!0,l=!1,c=e.graph,u=()=>{l||(l=!0,queueMicrotask(()=>{l=!1,s&&e.reread()}))},y=ho(t,{kind:n.kind,...n.id===void 0?{}:{id:n.id},...n.roles?{roles:n.roles}:{},...n.onBehalfOf?{onBehalfOf:n.onBehalfOf}:{}},u);return Nt(c,y.read),r(y),e.reread(),()=>{s=!1,Nt(c,void 0)}},[e,t,n.kind,n.id,i,a]),o}function Pr(){let e=!1,t=new Set;return{moving:()=>e,set(n){if(n!==e){e=n;for(let o of t)o()}},subscribe(n){return t.add(n),()=>t.delete(n)}}}var ee=D(De(),1),na="graview:place-menu",Ne=(0,d.createContext)(null),Rr=(0,d.createContext)("scene");function oa({mode:e,children:t}){return(0,ee.jsx)(Rr.Provider,{value:e,children:t})}function ra(){return(0,d.useContext)(Rr)}var Tr={kind:"human"},ia=[],aa=[],sa=[],dn=[];function Cr(e,t){let n=(0,d.useId)();(0,d.useEffect)(()=>{if(!globalThis.__graviewWatch)return;let o=t??Tr,r=()=>xo(e,o,n);r();let i,a=e.subscribe(()=>{clearTimeout(i),i=setTimeout(r,250)});return()=>{clearTimeout(i),a(),globalThis.__graviewWatch?.unseen?.({words:[],from:n,gone:!0})}},[e,t,n])}var la=()=>{try{return typeof location<"u"&&new URLSearchParams(location.search).get("as")==="published"?"published":void 0}catch{return}},da={off:!0};function ua({store:e,views:t,initialView:n,scheme:o="dark",initialSelection:r,principal:i,as:a,seats:s=ia,onSeat:l,people:c=aa,memory:u,presenceTtlMs:y,app:g,settings:m=g?.settings??sa,presence:b,typing:T,brand:f,locale:h,timeZone:w,onKeepLens:k,onProposeChange:E,composeChange:B,onDraftChange:G,providers:N,ai:H,files:P,assetsAt:O,resolveApp:L,history:Ge,linkedRecords:ie,menuSections:Fe,keptViews:Be,onExport:ye,subscriptions:J,dismissals:Re,whileAway:$,notifications:At,onNotificationsSeen:Ke,workflowRuns:qe,signIn:ze,view:Q,onViewChange:ae,children:x}){let _=(0,d.useContext)(Ne),se=Fe??_?.menuSections,ge=ze??_?.signIn,kt=qe??_?.workflowRuns,Rt=Be??_?.keptViews,Tt=ye??_?.onExport,Ct=At??_?.notifications,Mt=Ke??_?.onNotificationsSeen,[ti,ni]=(0,d.useState)(null),me=ti??i??s[0]?.principal??Tr,$e=nn(e,me,Ge),kn=$e.past&&$e.live===e?$e.past.store:e,Ot=a??la(),Vt=!tn(e),W=(0,d.useMemo)(()=>Vt?e:kn.seenBy(me,Ot?{as:Ot}:void 0),[Vt,e,kn,me,Ot]);Cr(e,me);let[le]=(0,d.useState)(()=>gr(u)),[Rn,oi]=(0,d.useState)(!1),Tn=(0,d.useCallback)(()=>oi(!0),[]),de=(0,d.useMemo)(()=>b?[...m,...mr]:m,[m,b]),[It]=(0,d.useState)(()=>n??fn(t,e.schema)),[ri,Cn]=(0,d.useState)(()=>it(It??we,r??It?.selection??[])),Te=(0,d.useRef)(It??we).current,[Mn,ii]=(0,d.useState)(null),[On,ai]=(0,d.useState)(null),K=(0,d.useContext)(Ne),[Vn]=(0,d.useState)(()=>K?.seatTalk??Qt(f?.name??e.schema.kinds.join(","))),Ht=H??K?.ai??qt,Ue=(0,d.useMemo)(()=>Ht.off?da:Ht,[Ht]),In=(0,d.useRef)(Ue.interactions);In.current=Ue.interactions;let[Hn]=(0,d.useState)(()=>K?.aiDesk??en(()=>In.current)),[si]=(0,d.useState)(()=>K?.subscriptions??bo()),Ln=J??K?.subscriptions??si,Lt=k??K?.onKeepLens,_n=E??K?.onProposeChange,Dn=B??K?.composeChange,Nn=G??K?.onDraftChange,Ye=g??K?.app,Ze=h??K?.locale,li=f?.locale??Ye?.brand?.locale,Xe=w??K?.timeZone;go({reader:Ze,app:li,readerTimeZone:Xe,appTimeZone:f?.timeZone??Ye?.brand?.timeZone});let Wn=(0,d.useRef)(null),jn=(0,d.useCallback)(p=>{Wn.current=p},[]),Gn=(0,d.useCallback)(p=>Wn.current?.whereIs(p)??null,[]),[Fn]=(0,d.useState)(()=>br()),[Bn]=(0,d.useState)(()=>Pr()),[_t,di]=(0,d.useState)(null),[Ce,Kn]=(0,d.useState)(()=>new Map),Me=(0,d.useRef)(Ce);Me.current=Ce;let Oe=(0,d.useRef)(null),Dt=(0,d.useCallback)(p=>W.graph.getNode(p)?.kind,[W]),te=(0,d.useCallback)(p=>{let S=an(Me.current,p,Dt);Me.current=S,Kn(S),Oe.current&&clearTimeout(Oe.current),[...S.values()].some(V=>V.mode!=="docked"&&V.mode!=="asking")&&(Oe.current=setTimeout(()=>{let V=an(Me.current,{type:"rest",at:Date.now(),holdMs:pn},Dt);Me.current=V,Kn(V)},pn+20))},[Dt]),qn=(0,d.useCallback)(p=>te({...p,at:p.at??Date.now()}),[te]),zn=(0,d.useCallback)(p=>{di(p),p&&te({type:"home",author:{kind:"agent",id:p,session:le},at:Date.now()})},[te,le]);(0,d.useEffect)(()=>W.subscribe((p,S)=>{for(let C of S)C.author.kind==="agent"&&te({type:"write",author:C.author,ids:C.writes,at:Date.now()})}),[W,te]),(0,d.useEffect)(()=>()=>{Oe.current&&clearTimeout(Oe.current)},[]);let U=(0,d.useMemo)(()=>({...me,session:le}),[me,le]),$n=xr(W,ie,U),Un=(0,d.useCallback)(p=>{ni(p),l?.(p)},[l]),[Ve,ui]=(0,d.useState)(()=>Object.fromEntries(de.map(p=>[p.name,dr(p,u)])));(0,d.useEffect)(()=>{for(let p of de)cr(p,Ve[p.name]??p.initial)},[de,Ve]);let Yn=(0,d.useCallback)((p,S)=>{let C=de.find(V=>V.name===p);!C||!C.options.some(V=>V.value===S)||(ur(C,S,u),ui(V=>({...V,[p]:S})))},[de,u]),[Zn,ci]=(0,d.useState)(null),{activity:Xn,noteAttention:Jn}=vr(W),Qn=(0,d.useCallback)(p=>{Jn(p),te({type:"read",author:p.author,ids:p.reads,at:Date.now()})},[Jn,te]),he=(0,d.useCallback)(p=>{if(Se(p)!==null||ce(p).length>0||Bt(p))return!0;let S=Oo(p);return S?W.graph.allEdges().some(C=>C.kind===S.kind&&C.from===S.from&&C.to===S.to):W.graph.getNode(p)!==void 0},[W]),eo=(0,d.useCallback)(p=>{let S=p.selection??dn,C=S.filter(he),V=C.length===S.length?p:it(p,C);return V.focusId!==null&&!he(V.focusId)&&(V=z(V,null)),V},[he]),Ie=(0,d.useCallback)(p=>{let S=eo(p),C=kr(W,U,S.shown);if(S.focusId!==null&&C.size>0){let V=ce(S.focusId),yo=W.graph.getNode(S.focusId);(V.length>0?V.every(yi=>C.has(yi)):yo?C.has(yo.kind):!1)&&(S={...S,focusId:null})}if(!S.overview&&S.focusId===null){let V=Te.focusId!==null&&!he(Te.focusId)?fn(t,e.schema)??{...we,overview:!0}:Te;V.focusId!==null&&he(V.focusId)?S={...S,focusId:V.focusId}:V.overview===!0&&(S={...S,overview:!0})}return S},[eo,he,W,Te,U,t,e.schema]),q=Ie(Q??ri),to=(0,d.useMemo)(()=>kr(W,U,q.shown),[W,U,q.shown]),no=(0,d.useMemo)(()=>[...W.modules.administered.entries()].map(([p,S])=>{let C=W.mayAdminister(p,U);return{name:p,...S.description?{description:S.description}:{},kinds:S.kinds??[],canShow:C,shown:C&&(q.shown??[]).includes(p)}}),[W,U,q.shown]),He=(0,d.useCallback)(p=>{let S=C=>Ie(typeof p=="function"?p(C):p);if(Q!==void 0){ae?.(S(Q));return}ae&&ae(S(q)),Cn(C=>S(C))},[q,ae,Q,Ie]);(0,d.useEffect)(()=>{Q===void 0&&Cn(p=>{let S=Ie(p);return S===p?p:S})},[q,Q,Ie]);let oo=q.selection??dn,ro=(0,d.useCallback)(p=>{He(S=>it(S,typeof p=="function"?p(S.selection??dn):p))},[He]),{who:Je,aiHere:io,following:ao,follow:so,sayWhere:pi,sayCaret:lo,sharing:uo}=hr({channel:b,store:W,view:q,principal:U,session:le,robots:Ce,seatWho:_t,settingValues:Ve,setView:He,seats:s,people:c,...y!==void 0?{ttlMs:y}:{}}),fi=(0,d.useMemo)(()=>({store:W,scheme:o,views:t,view:q,setView:He,homeView:Te,selection:oo,setSelection:ro,menuAt:Mn,setMenuAt:ii,whereIs:Gn,pointer:Fn,motion:Bn,registerScene:jn,robots:Ce,noteSeat:qn,seatWho:_t,registerSeatWho:zn,actsDoor:On,registerActsDoor:ai,seatTalk:Vn,aiDesk:Hn,...u?{memory:u}:{},who:Je,aiHere:io,following:ao,follow:so,sayWhere:pi,sharing:uo,session:le,ai:Ue,resolveApp:L,linkedRecords:ie,menuSections:se,...Rt?{keptViews:Rt}:{},...Tt?{onExport:Tt}:{},subscriptions:Ln,dismissals:Re,whileAway:$,...Ct?{notifications:Ct}:{},...Mt?{onNotificationsSeen:Mt}:{},...kt?{workflowRuns:kt}:{},signIn:ge,linkedReads:$n,movedByHand:Rn,noteMoved:Tn,emphasis:Zn,setEmphasis:ci,activity:Xn,noteAttention:Qn,principal:U,seats:s,people:c,takeSeat:Un,settings:de,settingValues:Ve,chooseSetting:Yn,hiddenKinds:to,administered:no,...N?{providers:N}:{},...f?{brand:f}:{},...Lt?{onKeepLens:Lt}:{},..._n?{onProposeChange:_n}:{},...Dn?{composeChange:Dn}:{},...Nn?{onDraftChange:Nn}:{},app:Ye,...Ze?{locale:Ze}:{},...Xe?{timeZone:Xe}:{}}),[W,o,t,q,He,oo,ro,Mn,Gn,Fn,Bn,jn,Ce,qn,_t,zn,On,Vn,Hn,u,Je,io,ao,so,uo,le,Ue,L,ie,se,Rt,Tt,Ln,Re,$,Ct,Mt,kt,ge,$n,Rn,Tn,Zn,Xn,Qn,U,s,c,Un,de,Ve,Yn,to,no,N,f,Lt,Ye,Ze,Xe]),co=(0,d.useMemo)(()=>T?{typing:T,sayCaret:lo,who:Je}:null,[T,lo,Je]),po=O?(0,ee.jsx)(ct.Provider,{value:O,children:x}):x,fo=P?(0,ee.jsx)(ut.Provider,{value:P,children:po}):po;return(0,ee.jsx)(Ne.Provider,{value:fi,children:(0,ee.jsx)(_e.Provider,{value:$e,children:(0,ee.jsx)(ga,{children:Vt?null:co?(0,ee.jsx)(on.Provider,{value:co,children:fo}):fo})})})}var Mr=(0,d.createContext)(null),un,cn=new Set,ca=e=>(cn.add(e),()=>void cn.delete(e)),Er=()=>un;function pa(e){if(!un){un=e;for(let t of[...cn])t()}}var fa=300;function ya(e){let t=0;return async(n,o)=>{let r=++t;return await new Promise(i=>setTimeout(i,fa)),r===t?e(n,o):[]}}function ga({children:e}){let{store:t,view:n,views:o,principal:r,hiddenKinds:i,selection:a,ai:s}=re(),l=gt(),c=n.q,u=n.focusId,y=!!(c&&c.trim().length>0),g=(0,d.useSyncExternalStore)(ca,Er,Er),m=(0,d.useMemo)(()=>y&&g?{flagged:new Set(t.violations().flatMap(k=>k.nodeIds)),touched:g.touchWeights(t.log.all())}:null,[t,l,y,g]),b=u?t.graph.getNode(u)?.kind??Se(u)??(ce(u).length===1?ce(u)[0]:void 0):void 0,T=(0,d.useMemo)(()=>s.near&&ya(s.near),[s.near]),f=(0,d.useMemo)(()=>!c||!m||!g?null:g.search(t,c,{...b?{inKind:b}:{},principal:r,places:o.places(),kinds:t.schema.kinds.filter(k=>!i.has(k)),from:[...a,...u&&t.graph.has(u)?[u]:[]],flagged:m.flagged,touched:m.touched,limit:200,rank:T}),[t,c,r,o,i,a,u,b,m,T]),[h,w]=(0,d.useState)();return(0,d.useEffect)(()=>void f?.later?.then(k=>w([f,k])),[f]),(0,ee.jsx)(Mr.Provider,{value:h?.[0]===f?h[1]:f,children:e})}var Ar=new WeakMap;function sl(e){let t=Ar.get(e);return t||Ar.set(e,t=new Set(e.matched)),t}function ma(){return(0,d.useContext)(Mr)}function re(){let e=(0,d.useContext)(Ne);if(!e)throw new Error("useGraview must be used inside a <GraviewProvider>.");return e}function yn(){return(0,d.useContext)(Ne)??null}function gt(){let{store:e}=re(),t=(0,d.useRef)(null),n=(0,d.useRef)(null),o=(0,d.useCallback)(()=>(n.current!==e&&(n.current=e,t.current=null),t.current??=e.graph.allNodes(),t.current),[e]),r=(0,d.useCallback)(i=>e.subscribe(()=>{t.current=null,i()}),[e]);return(0,d.useSyncExternalStore)(r,o,o)}function ha(e){let{store:t}=re(),n=(0,d.useCallback)(r=>t.subscribe(r),[t]),o=(0,d.useCallback)(()=>e===null?void 0:t.graph.getNode(e),[t,e]);return(0,d.useSyncExternalStore)(n,o,o)}function kr(e,t,n){let o=new Set(e.modules.disabledKinds);for(let r of e.kindsKeptFrom(t))o.add(r);for(let[r,i]of e.modules.administered)if(!(e.mayAdminister(r,t)&&(n??[]).includes(r)))for(let a of i.kinds??[])o.add(a);return o}var pn=2600;var Or=new WeakSet,wa=e=>Or.has(e),Sa=e=>void Or.add(e);function fn(e,t){let n=Ro(e.arrangement?.()?.first,t,e.places());if(!(!n||n.to==="home"))return n.to==="place"?{...we,focusId:oe(n.place.kind),within:{view:n.place.as}}:{...we,focusId:oe(n.kind)}}var pe=D(j(),1);var gn=D(j(),1),va=(0,gn.createContext)(null),mn=(0,gn.createContext)(null);var Vr=(0,pe.createContext)(null);function ba(){let e=(0,pe.useContext)(Vr),t=yn(),n=(0,pe.useContext)(mn),o=(i,a,s)=>t?.setView(l=>ne(ne(ue(z(l,oe(i)),!1),"view",a),"filter",s?.filter??null)),r=()=>t?.setView(i=>ne(ue(i,!0),"view",null));return(0,pe.useMemo)(()=>e??{record:i=>{t&&(t.setView(a=>z(ue(a,!1),i)),t.setSelection([i]))},place:(i,a)=>{if(i===ko)return r();if(i===Ao)return n?n.open("/"):r();let s=t?.views.places().find(l=>l.as===i);s&&o(s.kind,s.as,a)},list:(i,a)=>o(i,null,a)},[e,t,n])}var Ir=D(j(),1),xa=(0,Ir.createContext)(!1);var mt=Symbol.for("graview.default-view");function Hr(e){return Object.defineProperty(e,mt,{value:!0,enumerable:!1}),e}function Lr(e){return typeof e=="function"&&e[mt]===!0}var ht=Symbol.for("graview.replaces-page");function _r(e){return Object.defineProperty(e,ht,{value:!0,enumerable:!1}),e}function Dr(e){return typeof e=="function"&&e[ht]===!0}var wt=Symbol.for("graview.bleeds");function Nr(e){return Object.defineProperty(e,wt,{value:!0,enumerable:!1}),e}function Wr(e){return typeof e=="function"&&e[wt]===!0}var St=Symbol.for("graview.previews");function jr(e,t={}){return Object.defineProperty(e,St,{value:t,enumerable:!1}),e}function Gr(e){return typeof e=="function"?e[St]:void 0}function Pa(e){return Eo(e)}function Ea(e,t){if(t===e)return e;for(let r of t.registrations())e.register(r.kind,r,r.view,r);let n=t.arrangement?.();n&&e.arrange?.(n);let o=t.homes?.()??[];if(o.length>0)for(let r of o)e.home?.(r.view,r.name!==void 0?{name:r.name}:void 0);else{let r=t.homeView?.();r&&e.home?.(r)}return e}var M=D(j(),1),X=D(De(),1),hn=new Set,vt=0;function wn(e){return()=>{vt+=1;let t=e();return t.then(()=>void(vt-=1),()=>void(vt-=1)),t}}var Aa=()=>vt,xt=(0,M.createContext)(null);function ka(){return{waiting:new Map,at:0}}function Ra(e){for(let[t,n]of e.waiting)n<e.at&&e.waiting.delete(t);e.at+=1}var Ta=e=>e?.waiting.size??0;function Kr(e,t){e?.waiting.set(t,e.at)}function qr(e){let t=(0,M.useContext)(xt);(0,M.useLayoutEffect)(()=>{t?.waiting.delete(e)},[t,e])}function Ca(e){let t={},n=!1,o=new Set,r=(0,M.lazy)(wn(()=>e().then(a=>{n=!0;let s=a.default;function l(c){return qr(t),(0,M.createElement)(s,c)}return{default:l}},a=>{for(let s of o)s.waiting.delete(t);throw a})));function i(a){let s=(0,M.useContext)(xt);return!n&&s&&(o.add(s),Kr(s,t)),(0,M.createElement)(r,a)}return i}var zr=!1,$r=!1,bt=new Set;function Ma(){zr=!0}function Oa(){$r=!0;for(let e of[...bt])e();bt.clear()}var Ur=()=>$r||!zr;function Va(e){return Ur()?(e(),()=>{}):(bt.add(e),()=>void bt.delete(e))}var Fr=!1;function Sn(){for(let e of[...hn])e()}function Ia(){Fr||typeof window>"u"||(Fr=!0,window.addEventListener("online",Sn))}function vn(e){let t,n=!1,o=!1,r,i=0,a=new Set,s=()=>{i+=1;for(let g of[...a])g()},l=g=>(a.add(g),()=>void a.delete(g)),c=()=>i,u=()=>void y().catch(()=>{});function y(){if(n)return Promise.resolve(t);if(r)return r;let g=e().then(m=>(t=m,n=!0,o=!1,r=void 0,hn.delete(u),s(),m),m=>{throw r=void 0,o=!0,hn.add(u),Ia(),s(),m});return g.catch(()=>{}),r=g,g}return{load:y,prefetch:u,get current(){return t},get failed(){return o},part(g,m={}){let b=m.what??"This part",T={};function f(k){(0,M.useSyncExternalStore)(l,c,c),qr(T);let E=(0,M.useRef)(null),B=(0,M.useRef)(null),G=(0,M.useRef)(!1);return(0,M.useEffect)(()=>{o&&r===void 0&&u()},[]),n&&typeof document<"u"&&E.current!==null&&document.activeElement===E.current&&(G.current=!0),(0,M.useLayoutEffect)(()=>{if(!(!n||!G.current)){G.current=!1;for(let N=B.current?.nextElementSibling??null;N!==null;N=N.nextElementSibling){let H=N.matches(Br)?N:N.querySelector(Br);if(H instanceof HTMLElement){H.focus();return}}}}),n?(0,X.jsxs)(X.Fragment,{children:[G.current?(0,X.jsx)("span",{ref:B,hidden:!0}):null,g(t,k)]}):m.quiet?null:(0,X.jsx)(Ha,{what:b,button:E,...m.as?{as:m.as}:{}})}let h=(0,M.lazy)(wn(()=>y().then(()=>({default:f}),()=>({default:f}))));function w(k){let E=(0,M.useContext)(xt),[B]=(0,M.useState)(()=>n||o);return!n&&!o&&Kr(E,T),(0,M.createElement)(B?f:h,k)}return w}}}var Br="button,a[href],input,select,textarea,[tabindex]:not([tabindex='-1'])";function Ha({what:e,button:t,as:n="p"}){let r=typeof navigator<"u"&&navigator.onLine===!1?`${e} will load when you're back online.`:`${e} didn't load.`;return(0,X.jsxs)(n,{"data-testid":"lazy-part-missing",style:{margin:0,fontSize:"0.875rem",color:"var(--graview-ink-muted)"},children:[(0,X.jsx)("span",{role:"status",children:r})," ",(0,X.jsx)("button",{ref:t,type:"button","data-testid":"lazy-part-retry",onClick:Sn,style:{font:"inherit",fontWeight:600,color:"var(--graview-ink)",background:"none",border:"1px solid var(--graview-edge)",borderRadius:6,padding:"2px 10px"},children:"Try again"})]})}var Ee=D(j(),1);function La(){let{selection:e,setSelection:t}=re();return(0,Ee.useMemo)(()=>({selection:e,set:n=>t(n),clear:()=>t([]),toggle:n=>t(o=>o.includes(n)?o.filter(r=>r!==n):[...o,n]),isSelected:n=>e.includes(n)}),[e,t])}function _a(){let{store:e}=re(),t=gt();return(0,Ee.useMemo)(()=>Da(e),[e,t])}var Yr=new WeakMap;function Da(e){let t=Yr.get(e);if(!t){let n={violations:null};e.subscribe(()=>{n.violations=null}),Yr.set(e,n),t=n}return t.violations??=e.violations(),t.violations}function Na(){let{view:e,setView:t}=re();return(0,Ee.useMemo)(()=>({view:e,url:Y(e),focus:n=>t(o=>z(o,n)),show:n=>t(o=>Vo(o,n)),toggle:n=>t(o=>at(o,n)),go:n=>t(n)}),[e,t])}var Pe={at:0,depth:0,listeners:new Set,tell(){for(let e of this.listeners)e()}};typeof window<"u"&&window.addEventListener("popstate",e=>{let t=e.state;Pe.at=typeof t?.graview=="number"?t.graview:0,Pe.at>Pe.depth&&(Pe.depth=Pe.at),Pe.tell()});var F=D(j(),1),xn={profile:{trigger:"profile-button",pane:"profile",opens:"press",focus:"into",drawn:["shell","embed"]},problems:{trigger:"standing",pane:"problems",opens:"press",focus:"into",drawn:["shell","embed"]},places:{trigger:"app-places-open",pane:"app-places",opens:"press",focus:"into",drawn:["embed"]},here:{trigger:"here-open",pane:"here-list",opens:"press",focus:"into",drawn:["shell","embed","pages"]},"app-menu":{trigger:"app-menu-open",pane:"app-menu",opens:"press",focus:"into",drawn:["shell","embed","pages"]},inbox:{trigger:"inbox-button",pane:"inbox",opens:"press",focus:"into",drawn:["shell","embed","pages"]},share:{trigger:"app-share-open",pane:"app-share",opens:"press",focus:"into",drawn:["embed"]},"host-actions":{trigger:"host-bar-actions-open",pane:"host-bar-actions",opens:"press",focus:"into",drawn:["shell","embed"]},activity:{trigger:"activity-button",pane:"activity",opens:"press",focus:"into",drawn:["studio"]},find:{trigger:"find-box",pane:"find-strip",opens:"typing",focus:"stays",drawn:["shell"]},districts:{trigger:"beyond-more",pane:"beyond-list",opens:"press",focus:"into",drawn:["shell","embed"]},acts:{trigger:null,pane:"context-menu",opens:"context-menu",focus:"into",drawn:["shell","embed","pages"]},arrange:{trigger:"arrange-add",pane:"arrange-list",opens:"press",focus:"into",drawn:["pages"]},"studio-ask":{trigger:"studio-agent",pane:"studio-agent-panel",opens:"press",focus:"into",drawn:["studio"]}},Wa={position:"fixed",inset:"auto",margin:0,zIndex:So("popover"),boxSizing:"border-box"},Pt=6,fe=8,ja=e=>typeof e.showPopover=="function";function We(e){try{return e.matches(":popover-open")}catch{return!1}}function Ga(e){if(typeof e=="function"){let o=e();return o?{left:o.x,right:o.x,top:o.y,bottom:o.y}:null}let t=e.current;if(!t||!t.isConnected)return null;let n=t.getBoundingClientRect();return{left:n.left,right:n.right,top:n.top,bottom:n.bottom}}function Et(e,t,n={}){let o=Ga(t);if(!o)return;let r={width:document.documentElement.clientWidth||innerWidth,height:innerHeight},i=e.dataset.graviewDesignedHeight??=e.style.maxHeight;e.style.maxHeight=i;let a=e.getBoundingClientRect(),s=r.height-o.bottom-Pt-fe,l=o.top-Pt-fe,c=a.height<=s||s>=l,u=Math.max(96,Math.floor(c?s:l)),y=Math.min(a.height,u);a.height>u&&(e.style.maxHeight=i?`min(${i}, ${u}px)`:`${u}px`);let g=a.width,m=n.align==="start"?o.left:o.right-g,b=typeof t=="function"?null:t.current?.closest("[data-graview-embed]")?.getBoundingClientRect();b&&g<=b.right-b.left&&(m<b.left?m=o.left+g<=b.right?o.left:b.left:m+g>b.right&&(m=o.right-g>=b.left?o.right-g:b.right-g));let T=g>=r.width-2*fe?Math.max(0,(r.width-g)/2):Math.max(fe,Math.min(m,r.width-fe-g)),f=Math.round(c?o.bottom+Pt:Math.max(fe,o.top-Pt-y));e.style.left=`${Math.round(T)}px`,e.style.top=`${f}px`;let h=e.getBoundingClientRect();if(We(e)&&(Math.abs(h.left-Math.round(T))>2||Math.abs(h.top-f)>2)){let w=e.style.position;e.style.position=w==="absolute"?"fixed":"absolute",e.offsetWidth,e.style.position=w}}function Zr(e,t,n,o={}){let r=o.align??"end";(0,F.useLayoutEffect)(()=>{let i=e.current;if(!t||!i)return;if(ja(i)&&!We(i))try{i.showPopover(),Ba()}catch{}let a=0,s=u=>{u?.target instanceof Node&&i.contains(u.target)||(cancelAnimationFrame(a),a=requestAnimationFrame(()=>Et(i,n,{align:r})))};Et(i,n,{align:r});let l=()=>{let u=i.style.top;cancelAnimationFrame(a),a=requestAnimationFrame(()=>{Et(i,n,{align:r});let y=Number.parseFloat(u);typeof n=="function"&&Number.isFinite(y)&&y+i.getBoundingClientRect().height<=innerHeight-fe&&(i.style.top=u)})};addEventListener("resize",s),addEventListener("scroll",s,!0);let c=typeof ResizeObserver>"u"?null:new ResizeObserver(()=>l());return c?.observe(i),()=>{if(cancelAnimationFrame(a),removeEventListener("resize",s),removeEventListener("scroll",s,!0),c?.disconnect(),i.isConnected&&We(i))try{i.hidePopover()}catch{}}},[t,e,r])}var Pn=new Set;function Fa(e){return Pn.add(e),()=>Pn.delete(e)}function Ba(){for(let e of Pn)if(!(!e.isConnected||!We(e)))try{e.hidePopover(),e.showPopover()}catch{}}var Ae=null,Ka='button:not([disabled]), [href], input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), summary, [tabindex]:not([tabindex="-1"])';function qa(e){for(let t of e.querySelectorAll(Ka))if(t.closest("[hidden]")===null&&!t.hasAttribute("data-graview-not-first")&&getComputedStyle(t).visibility!=="hidden")return t;return e}var bn=()=>{let e=document.activeElement;return e===null||e===document.body};function za(e,t={}){let{at:n,returnTo:o,onOpenChange:r}=t,i=t.popover!==!1,[a,s]=(0,F.useState)(!1),l=t.open??a,c=(0,F.useRef)(null),u=(0,F.useRef)(null),y=(0,F.useCallback)(w=>{c.current=w},[]),g=(0,F.useCallback)(w=>{u.current=w},[]),m=`graview-popover-${(0,F.useId)().replace(/:/g,"")}`,b=(0,F.useRef)({onOpenChange:r,returnTo:o,controlled:t.open!==void 0});b.current={onOpenChange:r,returnTo:o,controlled:t.open!==void 0};let T=(0,F.useCallback)(w=>{b.current.controlled||s(w),b.current.onOpenChange?.(w)},[]),f=(0,F.useCallback)(()=>{(document.querySelector(`[aria-controls="${m}"]`)??c.current??b.current.returnTo?.()??null)?.focus({preventScroll:!0})},[m]),h=(0,F.useCallback)(w=>{let k=u.current,E=typeof document>"u"?null:document.activeElement,B=E===null||E===document.body||k!==null&&k.contains(E);T(!1),!(!w||!B)&&(f(),requestAnimationFrame(()=>{bn()&&f()}))},[T,f]);return Zr(u,i&&l,n??c,t.align?{align:t.align}:{}),(0,F.useEffect)(()=>{if(!i||!l)return;let w={name:e,close:()=>h(!1)};if(Ae&&Ae.close!==w.close&&Ae.close(),Ae=w,xn[e].focus==="into"){let H=u.current;H&&!H.contains(document.activeElement)&&qa(H).focus({preventScroll:!0})}let k=H=>{H.key==="Escape"&&h(!0)},E=H=>{let P=H.target;if(!(P instanceof Node))return;let O=u.current;if(O?.contains(P)||c.current?.contains(P))return;let L=P instanceof Element?P.closest('[role="dialog"], [role="alertdialog"]'):null;L&&!(O&&L.contains(O))||(h(!1),xn[e].focus==="into"&&requestAnimationFrame(()=>{(bn()||O!==null&&O.contains(document.activeElement))&&f()}))},B=null,G=null,N=H=>{let P=H.target;if(!(P instanceof Element))return;let O=u.current,L=P.closest('[role="dialog"], [role="alertdialog"]');!L||O&&(O.contains(L)||L.contains(O))||(B=L,h(!1))};return document.addEventListener("keydown",k),document.addEventListener("pointerdown",E,!0),document.addEventListener("focusin",N),()=>{document.removeEventListener("keydown",k),document.removeEventListener("pointerdown",E,!0),document.removeEventListener("focusin",N);let H=B;H&&typeof MutationObserver<"u"&&(G?.disconnect(),G=new MutationObserver(()=>{H.isConnected||(G?.disconnect(),requestAnimationFrame(()=>{(bn()||document.activeElement.closest("[hidden]")!==null)&&f()}))}),G.observe(document.body,{childList:!0,subtree:!0}),setTimeout(()=>G?.disconnect(),10*6e4)),Ae?.close===w.close&&(Ae=null)}},[i,l,e,h,f]),{open:l,setOpen:w=>w?T(!0):h(!0),toggle:()=>l?h(!0):T(!0),trigger:{ref:y,"aria-expanded":l,"aria-controls":m,"data-graview-popover-trigger":e},pane:{ref:g,id:m,popover:"manual",tabIndex:-1,"data-graview-popover":e,"data-graview-overlay":""}}}var ke=D(j(),1);var $a=vn(tt(()=>(__graviewPreload(import.meta.url,["./chunk.FWXW4T4I.js","./chunk.SDO3U72B.js","./chunk.DHPXRDT5.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.523EFGHU.js"))));function Ua(e,t,n){let o,r=!1,i=()=>{let{hidden:s,removed:l}=t.current();o||r||s.length+l.length===0||(o=()=>{},$a.load().then(c=>{r||(o=c.watchTidied(e,t,n))},String))};i();let a=t.onChange?.(i);return()=>{r=!0,a?.(),o?.()}}function Ya(e,t){let[n,o]=(0,ke.useState)();return(0,ke.useEffect)(()=>t?Ua(e,t,r=>o([e,r])):void 0,[e,t]),n?.[0]===e?n[1]:e}var Xr=D(j(),1),Za=(0,Xr.createContext)(!1);var Jr=D(j(),1),Xa=(0,Jr.createContext)(null);var Qr=D(j(),1),En='button:not([disabled]), a[href], input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), summary, [tabindex]:not([tabindex="-1"])',An=e=>e instanceof HTMLElement&&(e.matches(En)||e.hasAttribute("tabindex")),je=e=>typeof e.checkVisibility=="function"?e.checkVisibility():e.getClientRects().length>0;function Ja(e,t){let n=l=>l.replace(/["\\]/g,"\\$&"),o=t.getAttribute("data-testid"),r=t.getAttribute("data-graview-pick"),i=t.getAttribute("aria-label"),a=o?`[data-testid="${n(o)}"]`:r?`[data-graview-pick="${n(r)}"]`:i?`${t.tagName.toLowerCase()}[aria-label="${n(i)}"]`:null;if(!a)return null;let s=e.querySelector(a);return s&&An(s)&&je(s)?s:null}var Qa=e=>e.isConnected&&An(e)&&!e.matches(":disabled")&&e instanceof HTMLElement&&je(e);function ei(e,t){let n=t?Ja(e,t):null;if(n)return n;let o=e.querySelector("[data-graview-view][tabindex]");if(o&&je(o))return o;for(let r of e.querySelectorAll(En))if(je(r))return r;return An(e)&&je(e)?e:null}function es(e){(0,Qr.useEffect)(()=>{let t=e.current;if(!t||typeof MutationObserver>"u")return;let n=[],o=f=>{let h=f.target;if(h instanceof Element){n=[];for(let w=h;w&&w!==t.parentElement;w=w.parentElement)n.push(w)}},r=!1,i=!1,a=t.ownerDocument,s=()=>!i&&a.defaultView!==null,l=(f,h)=>void setTimeout(()=>s()&&h(),f),c=f=>void requestAnimationFrame(()=>s()&&f()),u=f=>{if(r=!1,i)return;let h=a.activeElement;if(!(!(h===null||h===a.body||h===a.documentElement)||n.length===0)){if(Qa(n[0])){f&&n[0]instanceof HTMLElement&&n[0].focus({preventScroll:!0});return}for(let k of n.slice(1)){if(!k.isConnected)continue;let E=ei(k,n[0]);if(E){E.focus({preventScroll:!0}),n=[];return}}}},y=(f,h=Date.now()+2500)=>{l(100,()=>{u(f);let w=a.activeElement;(w===null||w===a.body||w===a.documentElement)&&n.length>0&&Date.now()<h&&y(f,h)})},g=()=>{r||n.length===0||(r=!0,l(60,()=>c(()=>{u(!1),y(!1)})))},m=f=>{if(!(f instanceof KeyboardEvent&&!["Enter"," ","Escape"].includes(f.key))){if(!(f instanceof KeyboardEvent)){let h=f.target instanceof Element?f.target.closest(En):null,w=a.activeElement,k=w===null||w===a.body||w===a.documentElement;if(h&&k&&t.contains(h)){n=[];for(let E=h;E&&E!==t.parentElement;E=E.parentElement)n.push(E);l(150,()=>c(()=>{u(!1),y(!1)}));return}}!(f instanceof KeyboardEvent)&&!(f.target instanceof Node&&n[0]?.contains(f.target))||l(150,()=>c(()=>{u(!0),y(!0)}))}},b=new MutationObserver(()=>{n.length>0&&!n[0].isConnected&&g()}),T=f=>{f.relatedTarget===null&&g()};return t.addEventListener("focusin",o),t.addEventListener("focusout",T),t.addEventListener("click",m),t.addEventListener("keydown",m),b.observe(t,{childList:!0,subtree:!0}),()=>{i=!0,t.removeEventListener("focusin",o),t.removeEventListener("focusout",T),t.removeEventListener("click",m),t.removeEventListener("keydown",m),b.disconnect()}},[e])}export{we as a,Y as b,rt as c,ns as d,os as e,Mo as f,Co as g,Oo as h,Gt as i,z as j,Vo as k,ne as l,ue as m,it as n,Le as o,at as p,lt as q,Ft as r,Se as s,as as t,mi as u,oe as v,Io as w,ce as x,Ho as y,hi as z,ss as A,Lo as B,Bt as C,wi as D,Si as E,vi as F,j as G,Qt as H,ji as I,Fi as J,Qo as K,xs as L,ut as M,Bi as N,ct as O,Ki as P,_e as Q,tr as R,qi as S,tn as T,nn as U,on as V,De as W,na as X,Ne as Y,oa as Z,ra as _,Cr as $,ua as aa,pa as ba,sl as ca,ma as da,re as ea,yn as fa,gt as ga,ha,wa as ia,Sa as ja,fn as ka,va as la,mn as ma,Vr as na,ba as oa,xa as pa,Hr as qa,Lr as ra,_r as sa,Dr as ta,Nr as ua,Wr as va,jr as wa,Gr as xa,Pa as ya,Ea as za,wn as Aa,Aa as Ba,xt as Ca,ka as Da,Ra as Ea,Ta as Fa,Ca as Ga,Ma as Ha,Oa as Ia,Ur as Ja,Va as Ka,vn as La,Ya as Ma,Za as Na,Xa as Oa,La as Pa,_a as Qa,Na as Ra,Pe as Sa,es as Ta,Wa as Ua,We as Va,Zr as Wa,Fa as Xa,za as Ya};
|
|
2
|
-
/*! Bundled license information:
|
|
3
|
-
|
|
4
|
-
react/cjs/react.production.js:
|
|
5
|
-
(**
|
|
6
|
-
* @license React
|
|
7
|
-
* react.production.js
|
|
8
|
-
*
|
|
9
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
10
|
-
*
|
|
11
|
-
* This source code is licensed under the MIT license found in the
|
|
12
|
-
* LICENSE file in the root directory of this source tree.
|
|
13
|
-
*)
|
|
14
|
-
|
|
15
|
-
react/cjs/react-jsx-runtime.production.js:
|
|
16
|
-
(**
|
|
17
|
-
* @license React
|
|
18
|
-
* react-jsx-runtime.production.js
|
|
19
|
-
*
|
|
20
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
21
|
-
*
|
|
22
|
-
* This source code is licensed under the MIT license found in the
|
|
23
|
-
* LICENSE file in the root directory of this source tree.
|
|
24
|
-
*)
|
|
25
|
-
*/
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as me,b as z}from"./chunk.ZRBGYXAO.js";import{a as ue}from"./chunk.CEQQIW7Z.js";import{a as de,e as ce}from"./chunk.WQ7K5O2I.js";import{b as te,c as oe,d as ae,e as ie,f as se,g as le}from"./chunk.ZT3ZG52B.js";import"./chunk.QDVGHI7R.js";import"./chunk.ROYCJXPE.js";import{a as J,b as U,d as Q}from"./chunk.6ZFYFT5A.js";import"./chunk.MIE4TJRW.js";import{w as D}from"./chunk.SCVKHGO3.js";import"./chunk.RD2FSSLV.js";import"./chunk.AZRICZKT.js";import"./chunk.MH3AQO2R.js";import"./chunk.J2N7EKMX.js";import"./chunk.P26ATAAI.js";import"./chunk.FIY4RUK5.js";import"./chunk.IY3DV52G.js";import{G as re,N as O,Na as _,P as E,R as L,W as N,fa as A,la as $,oa as P,ra as x,sa as K,ua as F,wa as q}from"./chunk.FWXW4T4I.js";import"./chunk.SDO3U72B.js";import"./chunk.DHPXRDT5.js";import"./chunk.FQLNBIQ5.js";import{b as S}from"./chunk.AJZBJBMO.js";var i=S(re(),1);var a=S(N(),1);function fe(e,r){let n=e?.logo;if(!r||!n)return e;let s=o=>o.startsWith("/graview/assets/")?r(o):o;return{...e,logo:typeof n=="string"?s(n):{...n,light:s(n.light),...n.dark?{dark:s(n.dark)}:{}}}}var we=e=>({...e.node?{node:{id:e.node.id}}:{},...e.nodes?{nodes:e.nodes.map(r=>({id:r.id}))}:{},...e.label!==void 0?{label:e.label}:{},fidelity:e.fidelity,cardinality:e.cardinality,mode:e.mode,selected:e.selected,...e.implicated?{implicated:e.implicated}:{},...e.flagged?{flagged:e.flagged}:{}});function Y(e){let r=L(),n=r?.past?.seq,s=r?.host?.viewAt,o=(0,i.useMemo)(()=>n===void 0||!s||e.draft?void 0:s(e.manifest.name,n),[s,n,e]);return(0,i.useMemo)(()=>o===null?null:o===void 0?e:{...e,worker:o},[o,e])}var H=new WeakMap,T=new Set,pe=e=>(T.add(e),()=>void T.delete(e));function ye(e,r){r===void 0?H.delete(e):H.set(e,r);for(let n of[...T])n()}function Z({definition:e,store:r,principal:n,input:s,goTo:o,places:l,arrangement:d,scheme:c,brand:f,onFailure:m,drawsItsOwn:w,tick:p}){let y=(0,i.useSyncExternalStore)(pe,()=>H.get(e),()=>{}),t=(0,i.useMemo)(()=>y===void 0?e:{...e,worker:{source:y}},[e,y]),V=(0,i.useRef)(null),k=(0,i.useRef)(null),v=O(),b=E(),I=(0,i.useContext)($),C=(0,i.useMemo)(()=>fe(f,b),[f,b]),u=(0,i.useRef)({input:s,goTo:o,places:l,arrangement:d,onFailure:m,brand:C,hostFiles:v,hostAssets:b,told:I});u.current={input:s,goTo:o,places:l,arrangement:d,onFailure:m,brand:C,hostFiles:v,hostAssets:b,told:I},(0,i.useEffect)(()=>{let W=V.current;if(!W)return;let j=t.file??(u.current.hostFiles?.src?g=>u.current.hostFiles?.src?.(g)??g:void 0);typeof t.worker=="function"&&z(t.worker).catch(()=>{});let B=g=>({manifest:t.manifest,worker:g,store:r,principal:n,input:()=>u.current.input?.()??{},goTo:()=>u.current.goTo,places:()=>u.current.places?.()??[],arrangement:()=>u.current.arrangement?.(),brand:()=>u.current.brand,onFailure:(h,ne)=>u.current.onFailure(h,ne),...w?{fallback:!1}:{},...t.limits?{limits:t.limits}:{},...t.author?{author:t.author}:{},...t.onProblem?{onProblem:t.onProblem}:{},...t.asset?{asset:t.asset}:u.current.hostAssets?{asset:h=>u.current.hostAssets?.(h)??h}:{},...j?{file:j}:{},...t.images?{images:t.images}:{},...t.links?{links:t.links}:{},files:()=>u.current.hostFiles,onContentHeight:h=>u.current.told?.(h)}),ee=U(J,g=>{k.current=g.mountWorkerView(W,B(t.worker)),D(W,g.viewPlaceHandle({element:W,definition:t,mounted:()=>k.current,optionsFor:B,draw:h=>ye(e,h),mount:g.mountWorkerView,pressing:Q}))});return()=>{ee(),D(W,null),k.current?.dispose(),k.current=null}},[t,r,n]),(0,i.useEffect)(()=>k.current?.update(),[c,C,p]);let M=(0,a.jsx)("div",{ref:V,"data-worker-view-place":t.manifest.name,style:{minWidth:0}});if(!t.draft)return M;let R=t.manifest.title??t.manifest.name;return(0,a.jsxs)("div",{role:"group","aria-label":`Draft: ${R}`,"data-graview-draft-view":t.manifest.name,style:{display:"grid",gap:8,alignContent:"start",minWidth:0},children:[(0,a.jsxs)("p",{"data-testid":"draft-view-line",style:ke,children:[(0,a.jsxs)("span",{children:["Draft \u2014 ",(0,a.jsx)("span",{style:{color:"var(--graview-ink)",fontWeight:600},children:R})]}),(0,a.jsx)("span",{"aria-hidden":"true",children:"\xB7"}),(0,a.jsx)("span",{children:"Not kept"})]}),M]})}var ke={margin:0,display:"flex",flexWrap:"wrap",alignItems:"baseline",gap:"4px 8px",fontSize:"0.875rem",color:"var(--graview-ink-muted)",borderBottom:"1px solid var(--graview-edge)",paddingBottom:8};function X({view:e,props:r,fellBack:n}){return(0,a.jsx)("div",{"data-worker-view-fallback":"",...n?{"data-worker-view-fell-back":n.name,"data-worker-view-failed":n.reason}:{},style:{display:"contents"},children:(0,a.jsx)(e,{...r})})}function ge({name:e,reason:r,children:n}){return(0,a.jsx)("div",{"data-worker-view-fell-back":e,"data-worker-view-failed":r,style:{display:"contents"},children:n})}function G(e,r={}){let n=r.fallback,s=e.manifest.replaces==="page";function o(l){let d=A(),c=P(),f=(0,i.useContext)(_),[m,w]=(0,i.useState)(null),p=(0,i.useRef)(l);p.current=l;let y=Y(e);if(!d)return null;if(y===null)return n&&!(f&&x(n)&&!s)?(0,a.jsx)(X,{view:n,props:l}):null;if(m&&n)return f&&x(n)&&!s?null:(0,a.jsx)(X,{view:n,props:l,fellBack:{name:e.manifest.name,reason:m}});let t=r.beside&&!(f&&x(r.beside))?r.beside:void 0,V=(0,a.jsx)(Z,{definition:y,store:d.store,principal:d.principal,input:()=>we(p.current),goTo:c,places:()=>d.views.places(),arrangement:()=>d.views.arrangement?.(),scheme:d.scheme,brand:d.brand,tick:l,drawsItsOwn:n!==void 0,onFailure:(k,v)=>{w(k),e.onFailure?.(k,v)}});return t?(0,a.jsxs)("div",{"data-worker-view-beside":e.manifest.name,style:{display:"grid",gap:12,minWidth:0},children:[V,(0,a.jsx)(t,{...l})]}):V}return o.displayName=`WorkerView(${e.manifest.name})`,o}function he(e,r){let{manifest:n}=r;if(n.attach==="home"){if(!e.home)throw new Error(`The worker view "${n.name}" is the home's body: draw it with workerHome, on the home.`);let m=e.homes?.(),w=r.draft?void 0:m?m.filter(y=>y.name===void 0).at(-1)?.view:e.homeView?.(),p=G(r,w?{fallback:w}:{});return e.home(n.bleed===!0?F(p):p,r.draft?void 0:{name:n.name}),e}let s={cardinality:n.cardinality,fidelity:"full"},o=e.lookup(n.attach,s)??e.resolve(n.attach,s)?.view,l=n.cardinality==="one",d=r.draft===!0,c=G(r,{...o&&!d?{fallback:o}:{},...l&&n.replaces!=="page"&&o?{beside:o}:{}});n.replaces==="page"&&K(c);let f=o?.says;return l&&n.replaces!=="page"&&typeof f=="function"&&(c.says=f),n.bleed===!0&&F(c),c.flows=n.flows!==!1,n.heading==="own"&&(c.ownHeading=!0),q(c,n.scene?.maxHeight!==void 0?{maxHeight:n.scene.maxHeight}:{}),e.register(n.attach,s,c,n.title?{title:n.title,...d?{}:{name:n.name},lens:"view",...n.reads?.kinds?.length?{reads:n.reads.kinds}:{}}:d?void 0:{name:n.name}),e}function Ve(e,r={}){let n=r.fallback;function s({context:o}){let l=A(),d=P(),[c,f]=(0,i.useState)(null),m=Y(e);return c&&n?(0,a.jsx)(ge,{name:e.manifest.name,reason:c,children:(0,a.jsx)(n,{context:o})}):m===null&&n?(0,a.jsx)(n,{context:o}):m===null?null:(0,a.jsx)(Z,{definition:m,store:o.store,principal:o.principal??l?.principal??{kind:"human"},goTo:d,...l?{places:()=>l.views.places(),arrangement:()=>l.views.arrangement?.(),scheme:l.scheme,brand:l.brand}:{},drawsItsOwn:n!==void 0,onFailure:(w,p)=>{f(w),e.onFailure?.(w,p)}})}return s.displayName=`WorkerHome(${e.manifest.name})`,s}export{oe as checkManifest,ue as checkViewSource,ce as judgeCodeAct,te as manifestActs,se as readsComputed,he as registerWorkerView,de as sightIsTotal,ae as unreadEdges,ie as unreadEdgesSentence,me as viewScript,Ve as workerHome,G as workerView,le as workerViewProps};
|
|
@@ -1,2 +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 Ve,b as Qt}from"./chunk.VBHV4TLG.js";import"./chunk.T6PU3NKP.js";import"./chunk.W3WXI5B3.js";import"./chunk.ZU3RPI34.js";import{j as Bt,k as Ut,l as Gt}from"./chunk.4R7H3GIL.js";import"./chunk.CCCONK73.js";import"./chunk.PJL3I2IW.js";import"./chunk.YJ4PFOPC.js";import"./chunk.LKM2R5UF.js";import"./chunk.HJCQ6I3S.js";import"./chunk.EL7XXGQY.js";import"./chunk.CDSHUWSK.js";import"./chunk.B5EFNTDA.js";import{a as jt,b as O}from"./chunk.47VEV4BX.js";import{a as Ye,b as Ft}from"./chunk.FE3SINPK.js";import"./chunk.MUWI54IP.js";import"./chunk.3D37E2G5.js";import"./chunk.TBY5IR7C.js";import"./chunk.WFJCC6G3.js";import"./chunk.BIDL7GQD.js";import"./chunk.IO5VFTXC.js";import"./chunk.7L3I776Z.js";import{b as qt,c as Kt}from"./chunk.CLIC2QBA.js";import"./chunk.UPOYRCKI.js";import"./chunk.XOZU4OFA.js";import"./chunk.WV6SP6IJ.js";import"./chunk.Q5WEOX3Q.js";import"./chunk.MATUPDZ3.js";import"./chunk.SAWASNDO.js";import"./chunk.YFVJUHAK.js";import"./chunk.HCX6KPRF.js";import"./chunk.B422DSYN.js";import"./chunk.ZE5RSKXF.js";import"./chunk.DKUEZPGR.js";import"./chunk.EP7YT7LT.js";import"./chunk.I7KN732Z.js";import"./chunk.TLPCYKLW.js";import{v as _t}from"./chunk.SCVKHGO3.js";import"./chunk.RD2FSSLV.js";import"./chunk.AZRICZKT.js";import"./chunk.MH3AQO2R.js";import"./chunk.J2N7EKMX.js";import{l as Wt}from"./chunk.P26ATAAI.js";import{b as Nt}from"./chunk.FIY4RUK5.js";import"./chunk.IY3DV52G.js";import{a as Be,c as Ue,e as Ge,f as zt,m as Qe}from"./chunk.NLZHNPDU.js";import"./chunk.QNC2OKLF.js";import{G as Se,Pa as Ke,Ua as Dt,W as Ot,Ya as Pt,ea as xe,h as Lt,u as It}from"./chunk.FWXW4T4I.js";import"./chunk.SDO3U72B.js";import{Lc as Rt,Nc as $t,Pb as Et,nd as Ht,pa as At,ta as ve,td as Ct,ua as ke}from"./chunk.DHPXRDT5.js";import"./chunk.FQLNBIQ5.js";import{b as ee}from"./chunk.AJZBJBMO.js";var s=ee(Se(),1);function Yt(a){return a.toLowerCase().normalize("NFKD").replace(/[̀-ͯ]/g,"").split(/[^\p{L}\p{N}]+/u).filter(Boolean)}function Vt(a,r){let n=Yt(r);if(n.length===0)return!0;let l=Yt(a);return n.every(b=>l.some(m=>m.startsWith(b)))}var te=ee(Se(),1),Je=250,Xe=.2,Ln=a=>a===void 0||a.off?void 0:a.fast??(a.decide?{model:a.name??"decide",decide:a.decide}:void 0);function Jt(a,r,n){let[l,b]=(0,te.useState)(null),m=(0,te.useRef)(n);m.current=n;let y=n.map(c=>`${c.key}\0${c.label}`).join(""),u=Ln(a);return(0,te.useEffect)(()=>{let c=r.trim();if(!u||c===""||m.current.length===0)return;let g=!0,x=new Map(m.current.map((w,f)=>[`r${f+1}`,w])),v=setTimeout(()=>{u.decide({typed:c},{row:{type:"choice",instructions:`Which of these menu rows does somebody typing \u201C${c}\u201D mean?`,criteria:{...Object.fromEntries([...x].map(([w,f])=>[w,f.label])),none:"None of these rows"}}}).then(w=>{a?.meter?.({tier:"fast",model:u.model,inputTokens:w.usage.inputTokens,outputTokens:w.usage.outputTokens,interaction:"menu"});let f=w.answers.row;if(!g||f?.type!=="choice")return;let k=new Map;for(let[G,ne]of Object.entries(f.probabilities)){let B=x.get(G);B&&k.set(B.key,ne)}if(f.choice==="none")return b({words:c,chances:new Map});let S=x.get(f.choice);S&&!k.has(S.key)&&k.set(S.key,f.confidence),b({words:c,chances:k})}).catch(()=>{})},Je);return()=>{g=!1,clearTimeout(v)}},[r,y,u===void 0]),l!==null&&l.words===r.trim()?l.chances:null}var z=ee(Se(),1),Zt=2,Xt,In=()=>Xt??=(__graviewPreload(import.meta.url,["./chunk.DU76ASS4.js","./chunk.BJUUSIQY.js","./chunk.ZE5RSKXF.js","./chunk.IY3DV52G.js","./chunk.NLZHNPDU.js","./chunk.QNC2OKLF.js","./chunk.FWXW4T4I.js","./chunk.SDO3U72B.js","./chunk.DHPXRDT5.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.KW7PHJYX.js")).catch(a=>(Xt=void 0,Promise.reject(a)));function en(a,r,n,l,b,m,y=4){let u=a&&!a.off?a.told:void 0,c=l.trim()!=="",[g,x]=(0,z.useState)(null);(0,z.useEffect)(()=>x(null),[m]);let[v,w]=(0,z.useState)(!1);return(0,z.useEffect)(()=>{if(!u||m===null||m===void 0)return;let f=globalThis;if(!f.requestIdleCallback)return;let k=f.requestIdleCallback(()=>w(!0),{timeout:3e3});return()=>f.cancelIdleCallback?.(k)},[u,m]),(0,z.useEffect)(()=>{if(!u||g||!(c||v))return;let f=!0;return In().then(async k=>{let S=await k.readToldHere(u,r,n);f&&x({tellings:S,module:k})}).catch(()=>{}),()=>{f=!1}},[u,c,v,g,r,n]),(0,z.useMemo)(()=>g?c?g.module.toldSuggestionsFrom(g.tellings,r,n,l,b,y):g.module.toldForHere(g.tellings,r,n,b,3):[],[g,c,l,r,n,b,y])}var K=ee(Se(),1),tn=a=>a.replace(/\s*…\s*$/u,"").replace(/\s+/g," ").trim().toLowerCase();function on(a,r,n={},l){if(!r)return[];let b=[],m=[];for(let y of a){if(y.destructive||y.setsAside||y.ties)continue;let u=y.open.filter(f=>!f.optional);if(u.length===0&&y.open.length===0&&l){let f=y.label.replace(/\b(it|this one|this)\b/u,`\u201C${l}\u201D`);m.push({key:`act:${y.id}`,label:f!==y.label?f:`${y.label} \u201C${l}\u201D`,mode:"chat",source:"act"});continue}let c=u[0];if(u.length!==1||c?.shape?.type!=="choice"||!c.shape.options||c.shape.options.length<2)continue;let g=c.shape.options,x=g.indexOf(String(r[c.name]??"")),v=x>=0?g[x+1]:void 0;if(v===void 0)continue;let w=n[c.name]?.[v]??v.replace(/[-_]+/g," ").replace(/^./u,f=>f.toUpperCase());b.push({key:`act:${y.id}:${v}`,label:`${y.label.replace(/\s*…\s*$/u,"")} to ${w}`,mode:"chat",source:"act"})}return[...b,...m]}function rn(a,r){let n=new Set(r.map(tn));return a.filter(l=>!n.has(tn(l.label)))}var On=3,Dn=a=>a===void 0||a.off||a.suggestOnOpen===!1?void 0:a.fast??(a.decide?{model:a.name??"decide",decide:a.decide}:void 0),Ze=new WeakMap,nn=(a,r)=>a?Ze.get(a)?.get(r):void 0;function Pn(a){let r=u=>a.filter(c=>c.source===u),[n,l,b]=[r("nudge"),r("told"),r("act")],m=[],y=Math.max(n.length,l.length,b.length);for(let u=0;u<y;u++)for(let c of[n,l,b])c[u]&&m.push(c[u]);return m}function an(a,r,n,l){let b=Dn(a),m=r.map(v=>`${v.key}\0${v.label}`).join(""),[y,u]=(0,K.useState)(null),c=nn(n.depends,m)??y;(0,K.useEffect)(()=>{if(nn(n.depends,m)||(u(null),!b||r.length===0||n.opened===null||n.opened===void 0))return;let v=!0,w=new Map(r.map((k,S)=>[`s${S+1}`,k])),f={pick:{type:"choice",instructions:`Somebody right-clicked \u201C${n.name}\u201D in an app. Which of these would they most likely want to do next?`,criteria:Object.fromEntries([...w].map(([k,S])=>[k,S.label]))}};if(n.better)for(let[k,S]of w)f[`about_${k}`]={type:"choice",instructions:`Is \u201C${S.label}\u201D about how \u201C${n.name}\u201D looks or is laid out, or about the records in it?`,criteria:{look:"How it looks or is laid out: style, size, what each row or card shows, its order or grouping",records:"The records themselves: changing, finishing, adding, assigning or asking about them"}};return b.decide({on:n.name},f).then(k=>{if(a?.meter?.({tier:"fast",model:b.model,inputTokens:k.usage.inputTokens,outputTokens:k.usage.outputTokens,interaction:"menu"}),!v)return;let S=k.answers.pick,G=R=>S?.type==="choice"?S.probabilities[R]??(S.choice===R?S.confidence:0):0,ne=[...w.keys()].sort((R,oe)=>G(oe)-G(R)).map(R=>w.get(R).key),B=new Map;for(let[R,oe]of w){let Q=k.answers[`about_${R}`];Q?.type==="choice"&&B.set(oe.key,Q.choice==="look"?"better":"chat")}let p={said:m,order:ne,modes:B};if(n.depends){let R=Ze.get(n.depends)??new Map;R.set(m,p),Ze.set(n.depends,R)}u(p)}).catch(()=>{}),()=>{v=!1}},[m,n.opened,n.depends,b===void 0]);let g=(0,K.useMemo)(()=>(c&&c.said===m?c.order.map(w=>r.find(f=>f.key===w)).filter(Boolean):Pn(r)).slice(0,On).map(w=>({...w,mode:c?.modes.get(w.key)??w.mode})),[c,m,r]),x=(0,K.useRef)(g);return l||(x.current=g),l?x.current:g}var i=ee(Ot(),1);function po(a,r,n){let l=r.on??r.about[r.about.length-1];Bt(a,r.about,{...n,pins:Ve(),...l===void 0?{}:{focus:l}})}function ho({placement:a="float",chosen:r=!0}={}){let{menuAt:n}=xe();return a==="menu"&&n===null?r?(0,i.jsx)(zn,{}):null:(0,i.jsx)(Wn,{placement:a})}function zn(){let{store:a,setMenuAt:r,view:n}=xe(),{selection:l}=Ke(),b=(0,s.useRef)(null),[m,y]=(0,s.useState)(null),[u,c]=(0,s.useState)(null);(0,s.useLayoutEffect)(()=>{let x=b.current?.offsetParent??b.current?.parentElement;if(!x)return;let v=x.getBoundingClientRect(),w=Math.round(v.width);w!==m&&y(w);let f=[...x.querySelectorAll('[data-testid="lines-key"][data-graview-up-row], [data-testid="overview"]')].map(S=>S.getBoundingClientRect()).filter(S=>S.width>0&&S.top-v.top<40),k=f.length>0?Math.round(v.right-Math.min(...f.map(S=>S.left))+8):null;k!==u&&c(k)});let g=l.length===1&&!n.overview?a.graph.getNode(l[0]):void 0;return!g||m===null||m>=dn?(0,i.jsx)("span",{ref:b,hidden:!0}):(0,i.jsx)("button",{type:"button",ref:b,"data-testid":"chosen-acts","aria-label":`What can be done with ${O(a,g.id)}`,"aria-haspopup":"menu",onClick:x=>{let v=x.currentTarget.getBoundingClientRect();r({x:Math.round(v.right),y:Math.round(v.bottom+4),on:g.id})},style:{position:"absolute",...u!==null?{right:u,top:14,minHeight:38}:{right:"calc(14px + var(--graview-dock, 0px))",top:98},zIndex:"var(--graview-layer-overview, 10)",...u===null?{minHeight:30}:{},padding:"0 12px",borderRadius:8,fontSize:"0.8125rem",background:"var(--graview-float)",boxShadow:"var(--graview-lift-low)"},children:"Acts\u2026"})}function Nn(a,r,n){let l=u=>ke(a.schema.tryDefinition(u),u),b=u=>At(a.schema,u).toLowerCase(),m=r.filter(u=>a.allMutations().some(c=>{let g=c.subject;return g?.kinds==="*"||(g?.kinds??[]).includes(u)})),y=n.length!==1||n.some(u=>u.startsWith("aggregate:"));return m.length>0&&y?r.length===1?`Nothing here is done to all the ${b(r[0])} at once. Right-click one ${l(r[0])} to see what you can do with it.`:"Nothing here is done to all of these at once. Right-click one of them to see what you can do with it.":m.length>0?`There is nothing you can do with ${r.length===1?ve(l(r[0])):"these"} here right now.`:r.length===1?`There is nothing to do with ${ve(l(r[0]))} in this app yet.`:"There is nothing to do with these in this app yet."}var dn=564;function Wn({placement:a}){let{store:r,menuAt:n,setMenuAt:l,view:b,signIn:m,aiDesk:y,ai:u,principal:c}=xe(),g=(0,s.useRef)(null),x=(0,s.useRef)(null),v=(0,s.useRef)(null),w=(0,s.useRef)(null);n?.returnTo&&(w.current=n.returnTo);let f=e=>{let t=e.closest("[data-graview-asking]")?.getAttribute("data-graview-asking"),o=e.getAttribute("data-pin-for"),d=t??e.getAttribute("data-affordance")??(o===null?null:`pin:${o}`)??e.getAttribute("data-menu-item");x.current=d===null?null:{key:d,element:e}};(0,s.useEffect)(()=>{let e=g.current,t=x.current;if(t===null||document.activeElement!==document.body||t.element.isConnected)return;let o=t.key;if(!e){x.current=null;let M=w.current;w.current=null,(M?.isConnected?M:v.current)?.focus();return}((o.startsWith("pin:")?e.querySelector(`[data-pin-for="${CSS.escape(o.slice(4))}"]`):null)??e.querySelector(`[data-affordance="${CSS.escape(o)}"]:not([disabled])`)??e).focus()});let[k,S]=(0,s.useState)(null);(0,s.useLayoutEffect)(()=>{let e=g.current?.offsetParent??g.current?.parentElement;if(e instanceof HTMLElement&&(v.current=e),!e)return;let t=e.getBoundingClientRect();S(o=>o&&o.left===t.left&&o.top===t.top&&o.width===t.width&&o.height===t.height?o:{left:t.left,top:t.top,width:t.width,height:t.height})});let{selection:G,set:ne,clear:B}=Ke(),p=n?.about??G,[R,oe]=(0,s.useState)(()=>Ve()),Q=n?.on??p[p.length-1],Ae=n?.about,cn=(0,s.useMemo)(()=>({pins:R,...Q===void 0?{}:{focus:Q},...Ae?{about:Ae}:{}}),[R,Q,Ae]),gn=(0,s.useMemo)(()=>new Set(r.allMutations().filter(e=>e.pinned).map(e=>e.name)),[r]),{affordances:T,withheld:de,observations:Ee}=Ut(cn),re=$t(de,m),D=re?Un:de,pn=n===null?null:{face:n.face??"scene",on:n.on,about:p,field:n.field,place:n.place,href:n.href,act:n.act,column:n.column,...n.section?{section:n.section}:{},...n.page?{page:n.page}:{},element:n.returnTo},P=_t(pn),tt=Ee.some(e=>e.id.startsWith("schema:waits:")),{apply:hn,preview:mn}=Gt(),[ie,Y]=(0,s.useState)(null),[Re,fn]=(0,s.useState)(null),[nt,$e]=(0,s.useState)(!1),[ot,rt]=(0,s.useState)(!1),[ue,ce]=(0,s.useState)(""),yn=Ft({letters:n===null}),[H,ge]=(0,s.useState)(""),it=(0,s.useRef)(null);(0,s.useEffect)(()=>ge(""),[n]);let V=zt(y),U=en(V?u:void 0,r,c,n===null?"":H,n?.on,n),bn=(0,s.useMemo)(()=>n===null?[]:[...P.start.flatMap(e=>(e.items??[]).map(t=>({key:`item:${t.id}`,label:t.label}))),...T.map(e=>({key:`act:${e.id}`,label:e.label})),...P.end.flatMap(e=>(e.items??[]).map(t=>({key:`item:${t.id}`,label:t.label}))),...U.map(e=>({key:e.key,label:e.label}))],[n,P,T,U]),at=Jt(u,n===null?"":H,bn),[ae,lt]=(0,s.useState)(!1),He=(0,s.useRef)({words:"",rank:null});ae||(He.current={words:H.trim(),rank:at});let N=ae?He.current.words===H.trim()?He.current.rank:null:at,L=(0,s.useMemo)(()=>[...P.start,...P.end].find(e=>e.mode)?.mode,[P]),$=n===null?[]:[...V?["chat"]:[],...L?["better"]:[]],[wn,st]=(0,s.useState)(null),[Ce,vn]=(0,s.useState)(null);(0,s.useEffect)(()=>st(null),[n,H]),(0,s.useEffect)(()=>{let e=H.trim();if(!L||!V||e==="")return;let t=!0,o=setTimeout(()=>void L.claims(e).then(d=>t&&vn({words:e,mode:d?"better":"chat"}),()=>{}),Je);return()=>{t=!1,clearTimeout(o)}},[H,L,V]);let pe=$.length===0?null:wn??($.length===1?$[0]:Ce&&Ce.words===H.trim()?Ce.mode:"chat"),kn=(0,s.useMemo)(()=>{if(n===null||$.length===0)return[];let e=(L?.nudges?.()??[]).map((C,q)=>({key:`nudge:${q}`,label:C,mode:"better",source:"nudge"})),t=U.slice(0,2).map(C=>({key:C.key,label:C.label,mode:"chat",source:"told"})),o=n.on??(p.length===1?p[0]:void 0),d=o!==void 0?r.graph.getNode(o):void 0,M=on(T,d,d?Ht(r.schema,[d.kind])[d.kind]:void 0,d?O(r,d.id):void 0).slice(0,2);return rn(V?[...e,...t,...M]:e,[...T,...de].map(C=>C.label))},[n,$.length,L,U,T,de,V,r,p]),Sn=(0,s.useMemo)(()=>(n?.on!==void 0?r.graph.getNode(n.on):void 0)??Fn(r),[n,r,T]),Le=an(u,kn,{name:n?.title??(p.length===1?O(r,p[0]):"this"),opened:n,better:L!==void 0,depends:Sn},ae),[dt,Ie]=(0,s.useState)(null),Oe=(0,s.useRef)([]),he=(e,t)=>{try{return mn(e,t),hn(e,t),Ie(null),l(null),Oe.current=[],!0}catch(o){return Ie(Wt(r.schema,r.allMutations(),o)),Oe.current=o instanceof Et?o.issues.map(d=>String(d.path[0]??"")).filter(Boolean):[],!1}},me=[...new Set(p.flatMap(e=>{let t=r.graph.getNode(e);return t?[t.kind]:[]}))],fe=me.length>0?me:[...new Set(p.flatMap(e=>It(e)))],A=p.length===1?Lt(p[0]):null,De=A?{from:r.graph.getNode(A.from),to:r.graph.getNode(A.to)}:null,ut=A?Kt(r,A):void 0,ct=ut?.provisional?ut:void 0,gt=A?(()=>{let e=r.schema.tryDefinition(r.graph.getNode(A.from)?.kind??"")?.edges?.[A.kind],t=r.graph.getNode(A.to);return e?.inverse&&t?`From ${O(r,t.id)}: ${e.inverse}`:null})():null;(0,s.useEffect)(()=>{Y(null),$e(!1),rt(!1),Ie(null),ce("")},[p,n?.about]);let pt=(0,s.useRef)(null);(0,s.useEffect)(()=>{let e=n?.begin;if(!e||pt.current===n)return;let t=T.find(d=>d.mutation===e.act);if(!t)return;pt.current=n;let o={...e.given};fn({id:t.id,given:o}),t.open.every(d=>d.name in o)?he({...t,args:{...t.args,...o},open:[]}):Y(t.id)},[n,T]);let h=n!==null,xn=a==="menu"&&!h,J=(0,s.useRef)(n);J.current=n;let ht=Pt("acts",{open:h&&a==="menu",onOpenChange:e=>{e||l(null)},at:()=>J.current?{x:J.current.x,y:J.current.y}:null,returnTo:()=>{let e=J.current?.returnTo;if(e?.isConnected)return e;let t=J.current?.on;return t?document.querySelector(`[data-graview-view="${CSS.escape(t)}"]`):null},align:"start"}),mt=(k?.width??Number.POSITIVE_INFINITY)<dn;if((0,s.useLayoutEffect)(()=>{let e=g.current?.offsetParent;if(!e||!mt||h)return;let t=g.current?.getBoundingClientRect().height??0,o=`${Math.round(t)+20}px`;if(e.style.paddingBottom===o)return;let d=e.style.paddingBottom;return e.style.paddingBottom=o,()=>{e.style.paddingBottom=d}}),p.length===0&&!h)return null;let ft=n?.title!==void 0||p.length>0&&!(p.length===1&&p[0]===b.focusId),le=h?4:Math.max(1,Math.min(9,T.length)),W=[...T.filter(e=>e.provider==="invariant"&&!e.destructive),...T.filter(e=>e.pinned&&e.provider!=="invariant"&&!e.destructive),...T.filter(e=>!e.ties&&!e.destructive&&!e.pinned&&e.provider!=="invariant"),...T.filter(e=>e.ties&&!e.destructive&&!e.pinned&&e.provider!=="invariant"),...T.filter(e=>e.destructive)],yt=W.length>le&&!h,bt=ue.trim().toLowerCase(),_=yt&&bt.length>0?W.filter(e=>`${e.label} ${e.why}`.toLowerCase().includes(bt)):null,E=h?H.trim():"",Pe=(e,t)=>E===""||Vt(t,E)||(N?.get(e)??0)>=Xe,F=(_??(nt||h?W:W.slice(0,le))).filter(e=>Pe(`act:${e.id}`,e.label)),wt=_||E?0:W.length-F.length,ye=E?D.filter(e=>Pe(`act:${e.id}`,e.label)):D,vt=e=>E===""?e:e.flatMap(t=>{let o=(t.items??[]).filter(d=>Pe(`item:${d.id}`,d.label));return o.length>0?[{id:t.id,...t.heading?{heading:t.heading}:{},items:o}]:[]}),j=h&&!nt&&E==="",ze=vt(P.start).filter(e=>(e.items?.length??0)>0||e.render),be=vt(P.end).filter(e=>(e.items?.length??0)>0||e.render),kt=new Set(j?F.slice(le).map(e=>e.id):[]),Ne=j&&W.length>=le,Mn=j&&(W.length>le||Ne&&D.length>0||Ee.length>0||P.end.some(e=>(e.items?.length??0)>0||e.render)),Tn=n?.title??(p.length===1?O(r,p[0]):p.length>1?`${p.length} selected`:"this"),St=h&&E!==""&&$.length>0,We=h&&E!==""?(N===null?U:[...U].sort((e,t)=>(N.get(t.key)??0)-(N.get(e.key)??0))).slice(0,Zt):[],An=[...ze.flatMap(e=>(e.items??[]).map(t=>`item:${t.id}`)),...F.filter(e=>!e.destructive).map(e=>`act:${e.id}`),...be.flatMap(e=>(e.items??[]).map(t=>`item:${t.id}`)),...We.map(e=>e.key)],En=N===null?void 0:[...An].sort((e,t)=>(N.get(t)??0)-(N.get(e)??0)).find(e=>(N.get(e)??0)>=Xe),I=E===""?null:En??ze.flatMap(e=>(e.items??[]).map(t=>`item:${t.id}`))[0]??F.filter(e=>!e.destructive).map(e=>`act:${e.id}`)[0]??be.flatMap(e=>(e.items??[]).map(t=>`item:${t.id}`))[0]??(St&&pe?"mode":null),Rn=(e=E)=>{if(!n)return;let t=n.returnTo??null,o=Be(g.current);l(null),Ge(y,{pointed:{on:n.on,about:p,field:n.field,place:n.place},...e?{asked:e}:{},returnTo:t,...o?{from:o}:{}})},_e=(e,t=E)=>{if(n){if(e==="chat")return Rn(t);l(null),L?.open(t||void 0)}},$n=e=>{let t=e.source==="told"?U.find(o=>o.key===e.key):void 0;if(t&&e.mode==="chat")return xt(t);_e(e.mode==="better"&&L?"better":"chat",e.label)},xt=e=>{if(!n)return;let t=n.returnTo??null,o=Be(g.current);l(null),Ge(y,{pointed:{on:n.on,about:p,field:n.field,place:n.place},asked:e.label,suggested:e.telling.id,returnTo:t,...o?{from:o}:{}})},Fe=()=>[...g.current?.querySelectorAll("[data-affordance]:not([disabled]), [data-menu-item]:not([data-menu-mode])")??[]].filter(e=>e.closest("[data-graview-asking], [hidden]")===null),je=()=>g.current?.querySelector("[data-menu-lit]")??null,Hn=e=>{let t=e.target,o=it.current;if(!o||t===o||e.metaKey||e.ctrlKey||e.altKey||t.closest("[data-graview-asking]")||_n(t))return;let d=e.key.length===1&&e.key!==" ";if(d||e.key==="Backspace"&&H!==""){e.preventDefault(),e.stopPropagation(),d&&H===""&&y&&Ue(y),ge(M=>d?M+e.key:M.slice(0,-1)),o.focus({preventScroll:!0});return}e.key==="ArrowUp"&&Fe()[0]===t&&(e.preventDefault(),e.stopPropagation(),o.focus({preventScroll:!0}))},we=[];for(let e of F){let t=!h&&e.provider==="invariant",o=!h&&!t&&e.pinned!==void 0&&!e.destructive,d=!h&&!t&&!o&&e.ties===!0&&!e.destructive,M=t?e.why:o?"pinned":d?"its ties":null,C=t?"violation":o||d?"ties":null,q=we[we.length-1];q&&q.heading===M?q.items.push(e):we.push({heading:M,tone:C,items:[e]})}let X=T.find(e=>e.id===ie),qe=X&&Re?.id===X.id?{...X,args:{...X.args,...Re.given},open:X.open.filter(e=>!(e.name in Re.given))}:X,se=p.length===1?O(r,p[0]):null,Mt=e=>{if(!se)return e;let t=e.startsWith(`"${se}"`)?e.slice(se.length+2):e.startsWith(se)?e.slice(se.length):null;if(t===null)return e;let o=t.trimStart();return o.length===0?e:o[0].toUpperCase()+o.slice(1)},Cn=new Set(h?[]:F.filter(e=>e.provider==="invariant").map(e=>e.why)),Z=Ee.filter(e=>!Cn.has(e.text)).map(e=>({...e,text:Mt(e.text)}));return xn?null:(0,i.jsxs)("section",{...h?ht.pane:{},ref:e=>{g.current=e,h&&ht.pane.ref(e)},"aria-label":"Inspector","data-graview-offstage":"","data-testid":h?"context-menu":"inspector-strip",tabIndex:-1,onFocus:e=>f(e.target),onBlur:e=>{e.relatedTarget!==null&&(x.current=null)},onMouseDown:e=>e.stopPropagation(),onKeyDownCapture:h?e=>Hn(e):void 0,onPointerMove:h?e=>{let t=e.target.closest?.("[data-menu-item], [data-affordance]")!=null;t!==ae&<(t)}:void 0,onPointerLeave:h&&ae?()=>lt(!1):void 0,style:{...h?Dt:{position:"absolute",zIndex:Ct("rail")},boxSizing:"border-box",display:"flex",flexDirection:"column",gap:7,padding:"9px 12px",borderRadius:"var(--graview-radius, 12px)",border:"1px solid var(--graview-edge)",background:"var(--graview-float)",boxShadow:"var(--graview-lift-high)",...h?{width:300,maxHeight:"min(52cqh, 420px)",overflow:"auto"}:mt?{left:10,right:10,width:"auto",bottom:10,maxHeight:"min(42cqh, 300px)",overflow:"auto"}:{left:14,top:b.overview?"min(296px, 38cqh)":44,width:236,maxHeight:b.overview?"calc(100cqh - min(296px, 38cqh) - 20px)":"calc(68cqh - 94px)",overflow:"auto"}},children:[(0,i.jsx)("h2",{style:{...Qe,margin:0},children:"Inspector"}),(0,i.jsxs)("div",{style:{display:ft||!h?"flex":"none",alignItems:"baseline",flexWrap:"wrap",gap:"2px 8px",minWidth:0,paddingRight:h?0:24},children:[ft?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("strong",{style:{fontSize:"0.9375rem",whiteSpace:"nowrap"},children:n?.title??(p.length===1?O(r,p[0]):`${p.length} selected`)}),me.length>0||A?(0,i.jsx)("span",{style:{fontSize:"0.75rem",color:"var(--graview-ink-faint)",whiteSpace:"nowrap"},children:A?"relation":me.map(e=>ke(r.schema.tryDefinition(e),e)).join(" \xB7 ")}):null,p.length===1&&!A&&n?.face!=="pages"?(0,i.jsx)("span",{style:{fontSize:"0.75rem",color:"var(--graview-ink-faint)",whiteSpace:"nowrap"},children:b.expanded.includes(p[0])?"\xB7 double-click closes":"\xB7 double-click opens"}):null]}):null,(0,i.jsx)("span",{style:{flex:"1 1 auto"}})]}),h?null:(0,i.jsx)("button",{type:"button",onClick:()=>{l(null),B()},"aria-label":"Clear selection",title:"Clear selection",style:{position:"absolute",top:6,right:6,flex:"0 0 auto",width:24,height:24,display:"grid",placeItems:"center",padding:0,fontSize:"0.875rem",lineHeight:1,borderRadius:7},children:"\xD7"}),h?(0,i.jsx)("input",{ref:it,type:"text","data-testid":"menu-type",...jn()?{}:{"data-graview-not-first":""},value:H,onChange:e=>{H===""&&e.target.value!==""&&y&&Ue(y),ge(e.target.value)},onKeyDown:e=>{if(e.key==="Enter"){e.preventDefault();let t=je();t?.focus({preventScroll:!0}),t?.click()}else e.key==="ArrowDown"?(e.preventDefault(),(je()??Fe()[0])?.focus()):e.key==="ArrowUp"?(e.preventDefault(),Fe().at(-1)?.focus()):e.key==="Enter"&&!je()&&pe?(e.preventDefault(),_e(pe)):e.key==="Escape"&&H!==""&&(e.preventDefault(),e.stopPropagation(),ge(""))},placeholder:$.length>0?"Tell Graview what you want\u2026":"Type to filter\u2026","aria-label":$.length>0?`Tell Graview what you want with ${Tn}, or filter what can be done here`:"Filter what can be done here",autoComplete:"off",autoCorrect:"off",spellCheck:!1,enterKeyHint:"go",style:{boxSizing:"border-box",width:"100%",font:"inherit",fontSize:"max(1rem, 16px)",padding:"5px 9px",borderRadius:8,border:"1px solid var(--graview-edge)",background:"var(--graview-panel)",color:"var(--graview-ink)"}}):null,h&&$.length>0?(0,i.jsx)("div",{role:"group","aria-label":$.length>1?"Chat or Better UI":"Chat","data-testid":"menu-modes",style:{display:"flex",gap:6},children:$.map(e=>{let t=pe===e,o=e==="chat"?"Chat":L?.label??"Better UI",d=e==="chat"?"\u{1F4AC}":L?.mark??"\u2728";return(0,i.jsxs)("button",{type:"button","data-menu-mode":e,...e==="chat"?{"data-menu-item":"ask-typed"}:{},"data-menu-lit":I==="mode"&&t||void 0,"aria-pressed":t,"aria-label":E?`${o}: ${E}`:o,onClick:()=>_e(e),onKeyDown:M=>{if(M.key!=="ArrowLeft"&&M.key!=="ArrowRight")return;M.preventDefault(),M.stopPropagation();let C=$[($.indexOf(e)+(M.key==="ArrowRight"?1:$.length-1))%$.length];st(C),g.current?.querySelector(`[data-menu-mode="${C}"]`)?.focus()},style:t?qn:Kn,children:[(0,i.jsx)("span",{"aria-hidden":"true",children:d})," ",o,I==="mode"&&t?Te:null]},e)})}):null,h&&E===""&&Le.length>0?(0,i.jsxs)("div",{"data-menu-section":"suggested",role:"group","aria-label":"Suggested",style:{display:"grid",gap:2,borderTop:"1px solid var(--graview-edge)",paddingTop:5,minHeight:Le.length*31+22},children:[(0,i.jsx)("span",{"aria-hidden":"true",style:Bn,children:"Suggested"}),Le.map((e,t)=>(0,i.jsxs)("button",{type:"button","data-menu-item":`suggested-${t}`,"data-suggested-mode":e.mode,onClick:()=>$n(e),style:{...Me,display:"flex",gap:8,alignItems:"baseline",minWidth:0},children:[(0,i.jsx)("span",{"aria-hidden":"true",style:{color:"var(--graview-accent)"},children:"\u2726"}),(0,i.jsx)("span",{title:e.label,style:{flex:"1 1 auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.label}),(0,i.jsxs)("span",{title:e.mode==="better"?"Better UI":"Chat",style:{fontSize:"0.8125rem"},children:[(0,i.jsx)("span",{"aria-hidden":"true",children:e.mode==="better"?"\u2728":"\u{1F4AC}"}),(0,i.jsx)("span",{style:Qe,children:e.mode==="better"?" (Better UI)":" (Chat)"})]})]},e.key))]}):null,A&&De?(0,i.jsxs)("div",{style:{display:"grid",gap:6},children:[gt?(0,i.jsx)("p",{"data-testid":"edge-said",style:{margin:0,fontSize:"0.8125rem",lineHeight:1.45,color:"var(--graview-ink-muted)"},children:gt}):null,ct?(0,i.jsx)("p",{"data-testid":"edge-provisional",style:{margin:0,fontSize:"0.8125rem",lineHeight:1.45,color:"var(--graview-ink-muted)"},children:qt(ct)}):null,(0,i.jsx)("div",{style:{display:"flex",alignItems:"center",gap:6,flexWrap:"wrap"},children:[["from",De.from],["to",De.to]].map(([e,t],o)=>(0,i.jsxs)(s.Fragment,{children:[o===1?(0,i.jsx)("span",{"aria-hidden":"true",style:{color:"var(--graview-ink-faint)"},children:"\u2192"}):null,t?(0,i.jsx)("button",{type:"button","data-testid":`edge-${e}`,onClick:()=>ne([t.id]),title:`Select ${O(r,t.id)}`,style:{fontSize:"0.8125rem",padding:"3px 9px",borderRadius:6},children:O(r,t.id)}):(0,i.jsx)("span",{style:{fontSize:"0.8125rem",color:"var(--graview-ink-faint)"},children:"gone"})]},e))})]}):null,!A&&p.length===1&&Rt(r,p[0])?(0,i.jsx)("p",{"data-testid":"left-alone",style:{margin:0,fontSize:"0.8125rem",lineHeight:1.45,color:"var(--graview-ink-muted)"},children:"Left alone: nothing automated changes it."}):null,Z.length>0?(0,i.jsx)("div",{"data-testid":"observations",title:Z.map(e=>e.text).join(`
|
|
2
|
-
`),hidden:j,style:{display:j?"none":"grid",gap:3},children:Z.slice(0,2).map(e=>(0,i.jsxs)("p",{style:{margin:0,fontSize:"0.8125rem",lineHeight:1.45,color:"var(--graview-ink-muted)"},children:[e.text,e===Z[1]&&Z.length>2?(0,i.jsxs)("span",{style:{color:"var(--graview-ink-faint)"},children:[" +",Z.length-2]}):null]},e.id))}):null,h?ze.map(e=>(0,i.jsx)(sn,{section:e,lit:I,close:()=>l(null)},e.id)):null,dt?(0,i.jsx)("p",{"data-testid":"refused",style:{margin:0,fontSize:"0.8125rem",lineHeight:1.45,color:"var(--graview-warn)"},children:dt}):null,yt?(0,i.jsx)("input",{"data-testid":"action-filter",value:ue,onChange:e=>ce(e.target.value),placeholder:`Filter ${W.length} actions\u2026`,"aria-label":"Filter actions",onKeyDown:e=>{if(e.key==="Escape"){e.stopPropagation(),ue.length>0?ce(""):e.currentTarget.blur();return}if(e.key==="Enter"&&_?.length===1){let t=_[0];if(t.destructive)return;t.open.length>0?Y(t.id):he(t)&&ce("")}},style:{font:"inherit",fontSize:"0.875rem",padding:"5px 9px",borderRadius:8,border:"1px solid var(--graview-edge)",background:"var(--graview-panel)",color:"var(--graview-ink)"}}):null,_!==null&&_.length===0?(0,i.jsxs)("p",{"data-testid":"no-matches",style:{margin:0,fontSize:"0.8125rem",lineHeight:1.45,color:"var(--graview-ink-muted)"},children:["Nothing offered here matches \u201C",ue.trim(),"\u201D."]}):null,E!==""&&F.length===0||re&&T.length===0||T.length===0&&!tt&&p.length===0?null:T.length===0&&!tt?(0,i.jsx)("p",{"data-testid":"no-affordances",style:{margin:0,fontSize:"0.8125rem",lineHeight:1.45,color:"var(--graview-ink-muted)"},children:D.length>0?`Nothing you may do with ${A?"this relation":fe.length===1?ve(ke(r.schema.tryDefinition(fe[0]),fe[0])):"this mix of kinds"} \u2014 ${D.length} action${D.length===1?"":"s"} withheld.`:A?`There is nothing to do with this line here: nothing in this app makes or breaks \u201C${Nt(r.schema,r.graph.getNode(A.from)?.kind??"",A.kind,"out")}\u201D.`:Nn(r,fe,p)}):(0,i.jsxs)("ol",{...yn,"data-testid":"affordances",style:{margin:0,padding:0,listStyle:"none",display:"flex",flexDirection:"column",flexWrap:"nowrap",gap:2},children:[we.map((e,t)=>(0,i.jsxs)(s.Fragment,{children:[e.heading?(0,i.jsxs)("li",{"data-graview-heading":e.tone,style:{fontSize:"0.75rem",lineHeight:1.4,color:e.tone==="violation"?"var(--graview-warn)":"var(--graview-ink-faint)",...e.tone!=="violation"?{letterSpacing:"0.12em",textTransform:"uppercase",fontSize:"0.75rem"}:{},padding:"2px 2px 1px",marginTop:t>0?6:0},children:[e.tone==="violation"?"\u26A0 ":"",e.tone==="violation"?Mt(e.heading):e.heading]}):t>0?(0,i.jsx)("li",{"aria-hidden":"true",style:{borderTop:"1px solid var(--graview-edge)",margin:"6px 0 3px"}}):null,e.items.map(o=>(0,i.jsxs)("li",{hidden:kt.has(o.id),style:{display:kt.has(o.id)?"none":"flex",gap:2,alignItems:"stretch"},onKeyDown:d=>{if(d.metaKey||d.ctrlKey||d.altKey)return;let M=d.currentTarget.querySelector("[data-affordance]"),C=d.currentTarget.querySelector("[data-pin-for]"),q=d.target===C,Tt=d.key==="ArrowRight"&&!q?C:q&&["ArrowLeft","ArrowUp","ArrowDown"].includes(d.key)?M:null;Tt&&(d.preventDefault(),d.stopPropagation(),Tt.focus())},children:[(0,i.jsxs)("button",{type:"button",[Ye]:"","data-affordance":o.id,"data-rank":o.rank,"data-graview-destructive":o.destructive||void 0,"data-menu-lit":I===`act:${o.id}`||void 0,"aria-pressed":ie===o.id,title:o.why,style:{padding:"5px 10px",fontSize:"0.875rem",borderRadius:8,width:"100%",textAlign:"left",borderWidth:1,borderStyle:"solid",borderColor:ie===o.id?"var(--graview-accent)":h?"transparent":"var(--graview-edge)",background:h?"none":"var(--graview-panel)",boxShadow:"none",...o.destructive?{color:"var(--graview-warn)"}:{},...ie===o.id?{color:"var(--graview-accent)"}:{},...I===`act:${o.id}`?et:{}},onClick:()=>{if(o.open.length>0){Y(ie===o.id?null:o.id);return}he(o)},children:[o.label,o.open.length>0?(0,i.jsx)("span",{style:{color:"var(--graview-ink-faint)"},children:" \u2026"}):null,I===`act:${o.id}`?Te:null,_?.length===1&&_[0]?.id===o.id&&!o.destructive?(0,i.jsx)("span",{"aria-hidden":"true",title:"Enter runs it",style:{float:"right",color:"var(--graview-ink-faint)",fontSize:"0.75rem"},children:"\u21B5"}):null]}),(0,i.jsx)("button",{type:"button","data-testid":"pin-toggle",tabIndex:-1,"data-pin-for":o.mutation,"aria-pressed":o.pinned!==void 0,"aria-label":o.pinned!==void 0?`Unpin ${o.label}`:`Pin ${o.label}`,title:o.pinned==="declared"?"Pinned by the app \u2014 unpin it for yourself":o.pinned==="user"?"Unpin":"Pin to the top",onClick:()=>oe(Qt(R,o.mutation,gn.has(o.mutation))),style:{flex:"0 0 auto",width:24,minHeight:24,display:"grid",placeItems:"center",padding:0,fontSize:"0.75rem",border:"1px solid transparent",background:"none",boxShadow:"none",borderRadius:7,color:o.pinned==="user"?"var(--graview-accent)":o.pinned==="declared"?"var(--graview-ink-muted)":"var(--graview-ink-faint)"},children:o.pinned!==void 0?"\u2605":"\u2606"})]},o.id))]},`${e.heading??"plain"}-${t}`)),wt>0&&!h?(0,i.jsx)("li",{children:(0,i.jsxs)("button",{type:"button",[Ye]:"",onClick:()=>$e(!0),title:`Show all ${T.length} actions`,style:{padding:"4px 10px",fontSize:"0.875rem",borderRadius:8},children:["Show ",wt," more"]})}):null]}),re?(0,i.jsx)("button",{type:"button","data-testid":"sign-in",onClick:()=>{l(null),re.run()},style:{padding:"5px 10px",fontSize:"0.875rem",borderRadius:8,width:"100%",textAlign:"left"},children:re.label}):null,ye.length>0?(0,i.jsxs)("ul",{hidden:Ne,"data-testid":"withheld",style:{margin:0,padding:0,listStyle:"none",display:Ne?"none":"flex",flexDirection:"column",flexWrap:"nowrap",gap:2},children:[ye.slice(0,h||ot?ye.length:3).map(e=>(0,i.jsxs)("li",{style:{display:"grid",gap:2},children:[(0,i.jsx)("button",{type:"button",disabled:!0,"data-affordance":e.id,"data-rank":e.rank,"data-withheld":e.refusal.wouldNeed.join(",")||"nobody",style:{padding:"4px 10px",fontSize:"0.875rem",borderRadius:8,borderStyle:"dashed",width:"100%",textAlign:"left",background:"none"},children:(0,i.jsx)("s",{children:e.label})}),(0,i.jsx)("span",{"data-testid":"withheld-why",style:{fontSize:"0.8125rem",lineHeight:1.4,color:"var(--graview-ink-muted)",padding:"0 10px"},children:e.refusal.message})]},e.id)),!h&&!ot&&D.length>3?(0,i.jsx)("li",{children:(0,i.jsxs)("button",{type:"button","data-testid":"withheld-more",onClick:()=>rt(!0),title:`Show all ${D.length} actions this seat may not take`,style:{padding:"4px 10px",fontSize:"0.875rem",borderRadius:8},children:["Show ",D.length-3," more withheld"]})}):null]}):null,Mn?(0,i.jsx)("button",{type:"button","data-menu-item":"more",onClick:e=>{let o=[...e.currentTarget.parentElement?.querySelectorAll("li[hidden], [data-menu-more][hidden]")??[]];$e(!0),requestAnimationFrame(()=>{for(let d of o){let M=d.querySelector("button:not([disabled]), a[href], input");if(M&&M.getClientRects().length>0)return M.focus()}})},style:{...Me,color:"var(--graview-ink-muted)"},children:"More\u2026"}):null,h&&be.length>0?(0,i.jsx)("div",{"data-menu-more":"",hidden:j,style:{display:j?"none":"contents"},children:be.filter(e=>!j||!e.render).map(e=>(0,i.jsx)(sn,{section:e,lit:I,close:()=>l(null)},e.id))}):null,We.length>0?(0,i.jsx)("div",{"data-menu-section":"told",role:"group","aria-label":"Suggested",style:{display:"grid",gap:2,borderTop:"1px solid var(--graview-edge)",paddingTop:5},children:We.map(e=>(0,i.jsxs)("button",{type:"button","data-menu-item":e.key,"data-told-suggestion":e.telling.id,"data-menu-lit":I===e.key||void 0,onClick:()=>xt(e),style:{...Me,...I===e.key?et:{}},children:[e.label,I===e.key?Te:null]},e.key))}):null,h&&E!==""&&!St&&I===null&&F.length===0&&ye.length===0?(0,i.jsxs)("p",{"data-testid":"menu-no-match",style:{margin:0,fontSize:"0.8125rem",lineHeight:1.45,color:"var(--graview-ink-muted)"},children:["Nothing here matches \u201C",E,"\u201D."]}):null,qe?(0,i.jsx)(jt,{affordance:qe,onApply:e=>{if(he(qe,e))Y(null);else return Oe.current},onCancel:()=>Y(null)}):null]})}function _n(a){return a.isContentEditable||a instanceof HTMLTextAreaElement||a instanceof HTMLSelectElement?!0:a instanceof HTMLInputElement&&!["button","submit","reset","checkbox","radio","image","file","color","range"].includes(a.type)}var Me={padding:"5px 10px",fontSize:"0.875rem",borderRadius:8,width:"100%",textAlign:"left",borderWidth:1,borderStyle:"solid",borderColor:"transparent",background:"none",boxShadow:"none"},et={background:"var(--graview-panel-muted)"},ln=new WeakMap;function Fn(a){let r=a.log.all().length,n=ln.get(a);if(n&&n.length===r)return n.stamp;let l={length:r};return ln.set(a,{length:r,stamp:l}),l}var jn=()=>typeof matchMedia=="function"&&matchMedia("(pointer: fine)").matches,un={display:"inline-flex",alignItems:"center",gap:5,minHeight:30,padding:"0 11px",fontSize:"0.8125rem",borderRadius:999,cursor:"pointer",borderWidth:1,borderStyle:"solid",boxShadow:"none"},qn={...un,borderColor:"var(--graview-accent)",background:"color-mix(in srgb, var(--graview-accent) 14%, transparent)",color:"var(--graview-ink)",fontWeight:600},Kn={...un,borderColor:"var(--graview-edge)",background:"none",color:"var(--graview-ink-muted)"},Bn={fontSize:"0.6875rem",letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--graview-ink-faint)",padding:"0 10px"},Te=(0,i.jsx)("span",{"aria-hidden":"true",title:"Enter runs it",style:{float:"right",color:"var(--graview-ink-faint)",fontSize:"0.75rem"},children:"\u21B5"}),Un=[];function sn({section:a,lit:r=null,close:n}){return(0,i.jsxs)("div",{"data-menu-section":a.id,...a.heading?{role:"group","aria-label":a.heading}:{},style:{display:"grid",gap:2,borderTop:"1px solid var(--graview-edge)",paddingTop:5},children:[a.heading?(0,i.jsx)("p",{"aria-hidden":"true",style:{margin:0,padding:"2px 2px 1px",fontSize:"0.75rem",lineHeight:1.4,letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--graview-ink-faint)"},children:a.heading}):null,a.items&&a.items.length>0?(0,i.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none",display:"flex",flexDirection:"column",gap:2},children:a.items.map(l=>(0,i.jsx)("li",{children:(0,i.jsxs)("button",{type:"button","data-menu-item":l.id,"data-menu-lit":r===`item:${l.id}`||void 0,onClick:()=>{n(),l.run()},style:{...Me,...r===`item:${l.id}`?et:{}},children:[l.label,l.hint?(0,i.jsxs)("span",{style:{color:"var(--graview-ink-faint)"},children:[" \xB7 ",l.hint]}):null,r===`item:${l.id}`?Te:null]})},l.id))}):null,a.render?.(n)]})}export{ho as InspectorPane,po as prepareActs};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b}from"./chunk.C6CT6F4C.js";import"./chunk.U5P23GO7.js";import"./chunk.GTF6EMVE.js";import"./chunk.NLZHNPDU.js";import"./chunk.QNC2OKLF.js";import"./chunk.FWXW4T4I.js";import"./chunk.SDO3U72B.js";import"./chunk.DHPXRDT5.js";import"./chunk.FQLNBIQ5.js";import"./chunk.AJZBJBMO.js";export{a as ActivityFilter,b as InteractionRow};
|