graview 0.1.70 → 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.4O3STSC4.js → chunk.3RRK6UTN.js} +1 -1
- package/dist/preview/chunk.45HUV56Z.js +1 -0
- package/dist/preview/chunk.4HU2ILFY.js +1 -0
- package/dist/preview/{chunk.M7DJJRFH.js → chunk.4LWWXIM4.js} +1 -1
- package/dist/preview/chunk.4O64QV2Y.js +1 -0
- package/dist/preview/{chunk.KP7HUXH5.js → chunk.4QMAYVPU.js} +1 -1
- package/dist/preview/chunk.4UDST6IF.js +1 -0
- package/dist/preview/{chunk.7TZXDPPO.js → chunk.4YZ2A6SJ.js} +3 -3
- package/dist/preview/{chunk.PAIBRJVZ.js → chunk.4ZEHLUXV.js} +1 -1
- package/dist/preview/{chunk.I7CSRZC2.js → chunk.5EQRIZ6I.js} +1 -1
- package/dist/preview/chunk.5OS4SYHE.js +1 -0
- package/dist/preview/{chunk.ZIGW5VOT.js → chunk.5PQV7GFE.js} +1 -1
- package/dist/preview/{chunk.SSHEFQ4R.js → chunk.5WCSQFS5.js} +1 -1
- package/dist/preview/{chunk.RJ7UV3XI.js → chunk.64K5ELSQ.js} +1 -1
- package/dist/preview/{chunk.2T24FYAO.js → chunk.67S2UWBT.js} +1 -1
- package/dist/preview/{chunk.FXCKKVT5.js → chunk.6A3KTD66.js} +1 -1
- 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.ZGJUCVT5.js → chunk.6TBQV3NO.js} +1 -1
- package/dist/preview/chunk.6ZRVVRDQ.js +1 -0
- package/dist/preview/{chunk.4VTUC5TF.js → chunk.7FI75ZVE.js} +1 -1
- package/dist/preview/{chunk.NKUNCQB3.js → chunk.7KX36ENH.js} +1 -1
- package/dist/preview/{chunk.JPJHM62B.js → chunk.7LPHWJB4.js} +1 -1
- package/dist/preview/chunk.7MDGPTYF.js +1 -0
- package/dist/preview/{chunk.JEQ6CA5M.js → chunk.7PWLRRUS.js} +2 -2
- package/dist/preview/{chunk.YBQUP3KE.js → chunk.7TACFS7Q.js} +1 -1
- package/dist/preview/{chunk.DIVANC3G.js → chunk.7THS3DLZ.js} +1 -1
- package/dist/preview/{chunk.5W7EGQCQ.js → chunk.7XGU6KVF.js} +2 -2
- package/dist/preview/chunk.7ZLCA3WK.js +1 -0
- package/dist/preview/{chunk.4BSEYZMS.js → chunk.ARGEGV5T.js} +1 -1
- package/dist/preview/{chunk.3KF5RYPW.js → chunk.BSWR5SGX.js} +1 -1
- package/dist/preview/{chunk.BBMX3IIO.js → chunk.BWMPC7LK.js} +1 -1
- package/dist/preview/{chunk.55C7WO4X.js → chunk.CEJIH3CN.js} +1 -1
- package/dist/preview/{chunk.F5756PXX.js → chunk.CEOQY5KS.js} +2 -2
- package/dist/preview/{chunk.NZFO6BM3.js → chunk.CGRX6SDE.js} +1 -1
- package/dist/preview/{chunk.C67TMA4U.js → chunk.CPK6CYKN.js} +1 -1
- package/dist/preview/{chunk.T552MHMU.js → chunk.CVN2XFMF.js} +1 -1
- package/dist/preview/{chunk.MGG5DH2S.js → chunk.D4F6QX5L.js} +1 -1
- package/dist/preview/{chunk.M3HLZX6Q.js → chunk.D6ODKMOV.js} +1 -1
- package/dist/preview/{chunk.RECTEAG4.js → chunk.DDSAFU3B.js} +1 -1
- package/dist/preview/{chunk.UJF6YTEO.js → chunk.DG3YNOH3.js} +1 -1
- package/dist/preview/chunk.DGYWNM5U.js +1 -0
- package/dist/preview/{chunk.NBB5ALVJ.js → chunk.DHO3QZYK.js} +1 -1
- package/dist/preview/{chunk.4QBW46XV.js → chunk.DJGZOPAS.js} +1 -1
- package/dist/preview/{chunk.2MWEYNVH.js → chunk.DX7RGK5G.js} +1 -1
- package/dist/preview/{chunk.CZI6J5CE.js → chunk.EA2KYBBR.js} +1 -1
- package/dist/preview/{chunk.DWMFLLJO.js → chunk.EEGVI266.js} +1 -1
- package/dist/preview/{chunk.BQWMHHAZ.js → chunk.EHLV3LND.js} +2 -2
- package/dist/preview/{chunk.3MPLUSVY.js → chunk.EJC7ACZT.js} +1 -1
- package/dist/preview/{chunk.6NYSB6OZ.js → chunk.EJIQDMLU.js} +1 -1
- package/dist/preview/{chunk.QQUZ5RTQ.js → chunk.EOSN5DWW.js} +1 -1
- package/dist/preview/{chunk.2QALBEWP.js → chunk.EPSYX2SF.js} +1 -1
- package/dist/preview/chunk.EUXAIG73.js +1 -0
- package/dist/preview/{chunk.S4QSZRKH.js → chunk.EZQK23AB.js} +1 -1
- package/dist/preview/{chunk.ZTHZHBVN.js → chunk.F5O3HR7X.js} +1 -1
- package/dist/preview/chunk.F6MY6WJ4.js +1 -0
- package/dist/preview/{chunk.UVMHC6VM.js → chunk.F7KVEWFH.js} +1 -1
- package/dist/preview/{chunk.FJXKQZZS.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.IJVR7ZL7.js → chunk.G5AF5IXL.js} +1 -1
- package/dist/preview/{chunk.SCN6IYDG.js → chunk.G767NLBH.js} +1 -1
- package/dist/preview/{chunk.X7HMTN3Z.js → chunk.GFBE4VNT.js} +1 -1
- package/dist/preview/{chunk.U5Q7EVZQ.js → chunk.GFOZVQBQ.js} +1 -1
- package/dist/preview/{chunk.KJAOJTZZ.js → chunk.GKYJQE5A.js} +1 -1
- package/dist/preview/{chunk.YCMMATFK.js → chunk.GOVRX2YX.js} +1 -1
- package/dist/preview/{chunk.U3CV227I.js → chunk.H33XWGAY.js} +1 -1
- package/dist/preview/{chunk.DGDOZHYK.js → chunk.H4BPTMED.js} +1 -1
- package/dist/preview/chunk.HLKDYI6J.js +1 -0
- package/dist/preview/{chunk.C4LC2UEU.js → chunk.HPFEYMGP.js} +1 -1
- package/dist/preview/{chunk.CLJKQLK2.js → chunk.HT35PAHI.js} +2 -2
- package/dist/preview/{chunk.6VG2LCES.js → chunk.HXRHEPPJ.js} +1 -1
- package/dist/preview/{chunk.LZNHTROY.js → chunk.IXYG65TM.js} +1 -1
- package/dist/preview/chunk.IZDB777E.js +1 -0
- package/dist/preview/{chunk.ZQSV5XVB.js → chunk.JAPTTM6Y.js} +1 -1
- package/dist/preview/{chunk.CUA7F3YJ.js → chunk.JCKIJSW7.js} +1 -1
- package/dist/preview/{chunk.WAIIXXVI.js → chunk.JLNTE5CH.js} +2 -2
- package/dist/preview/{chunk.5FQHZVE3.js → chunk.JNK5WBSU.js} +1 -1
- package/dist/preview/chunk.JREA2XDG.js +1 -0
- package/dist/preview/{chunk.CHG522KL.js → chunk.KBJ3UUER.js} +1 -1
- package/dist/preview/{chunk.VBHV4TLG.js → chunk.KHRS2SKB.js} +1 -1
- package/dist/preview/{chunk.CZUUFO6A.js → chunk.KJPLX72N.js} +1 -1
- package/dist/preview/{chunk.7LAXSQQY.js → chunk.KZUHXOZU.js} +2 -2
- package/dist/preview/{chunk.R65YX332.js → chunk.L3MLGFIS.js} +1 -1
- package/dist/preview/{chunk.RXUL6P7Y.js → chunk.L6P55HFW.js} +1 -1
- package/dist/preview/{chunk.J4NY2K2A.js → chunk.LDWWUKKX.js} +1 -1
- package/dist/preview/{chunk.RIP2SAQ5.js → chunk.LHCGC3K6.js} +1 -1
- package/dist/preview/{chunk.IQCMV5WD.js → chunk.LNKY6MT4.js} +1 -1
- package/dist/preview/chunk.LQ5J6YQW.js +1 -0
- package/dist/preview/{chunk.O2XPLDMM.js → chunk.MEAUTBVM.js} +1 -1
- package/dist/preview/chunk.MEBKTW7H.js +17 -0
- package/dist/preview/{chunk.K6EKSURO.js → chunk.MFMC35ET.js} +1 -1
- package/dist/preview/chunk.MJ4T6YXI.js +1 -0
- package/dist/preview/{chunk.SWY6DIE4.js → chunk.MKJV3BM5.js} +3 -3
- package/dist/preview/chunk.ML4X7VVK.js +1 -0
- package/dist/preview/{chunk.ZOSTOVXR.js → chunk.MM7MLBGB.js} +1 -1
- package/dist/preview/{chunk.NCBUECIW.js → chunk.MQNW3O67.js} +1 -1
- package/dist/preview/{chunk.CVVNHQPO.js → chunk.MT252WP4.js} +1 -1
- package/dist/preview/{chunk.VKQONZKR.js → chunk.MWWNKM3I.js} +1 -1
- package/dist/preview/chunk.N3MXLORL.js +3 -0
- package/dist/preview/{chunk.SUYYDJGZ.js → chunk.NH3VXTGX.js} +1 -1
- package/dist/preview/{chunk.IRPMGHZN.js → chunk.NI4OPHTL.js} +1 -1
- package/dist/preview/chunk.NNGG7RCO.js +1 -0
- package/dist/preview/{chunk.MZSWWMX6.js → chunk.NXHEOHRR.js} +1 -1
- package/dist/preview/{chunk.A5ENJJZN.js → chunk.O5RPSUXV.js} +1 -1
- package/dist/preview/{chunk.CM7EDQ4E.js → chunk.OKHXXIMN.js} +1 -1
- package/dist/preview/chunk.OOQG2AEF.js +1 -0
- package/dist/preview/{chunk.MYR36HW4.js → chunk.OPMGQS5J.js} +1 -1
- package/dist/preview/{chunk.TUVPQLFL.js → chunk.OUF2QFZL.js} +1 -1
- package/dist/preview/{chunk.6QMRDSTD.js → chunk.OVSKPBPS.js} +1 -1
- package/dist/preview/chunk.OYMN3IFX.js +1 -0
- package/dist/preview/{chunk.3HFBHLXC.js → chunk.P43LPXXJ.js} +1 -1
- package/dist/preview/{chunk.FSZQTX3K.js → chunk.PGT4ZQDG.js} +4 -4
- package/dist/preview/{chunk.5IM2X3VT.js → chunk.PQTXM4VY.js} +1 -1
- package/dist/preview/{chunk.U2DZE7A5.js → chunk.Q6GEPVQ7.js} +1 -1
- package/dist/preview/{chunk.HMV4ILAC.js → chunk.QDDDKEBH.js} +1 -1
- package/dist/preview/{chunk.6KYTCEIH.js → chunk.QJJWAYHB.js} +1 -1
- package/dist/preview/{chunk.QAERSZVB.js → chunk.QK4QZVQG.js} +1 -1
- package/dist/preview/{chunk.XAN7QXMQ.js → chunk.QKRQPUCE.js} +1 -1
- package/dist/preview/{chunk.I3ADXJQW.js → chunk.QNWGDG2Z.js} +1 -1
- package/dist/preview/{chunk.NZ5TJKPT.js → chunk.QVBP4UZG.js} +2 -2
- package/dist/preview/{chunk.YTRUZ56A.js → chunk.RDUGUC7R.js} +1 -1
- package/dist/preview/{chunk.TVNY7F64.js → chunk.RHIP2UYE.js} +1 -1
- package/dist/preview/{chunk.PYGNO2AV.js → chunk.RJ7VSWTA.js} +3 -3
- package/dist/preview/{chunk.LEZGBHPZ.js → chunk.RO3D2RNP.js} +1 -1
- package/dist/preview/{chunk.KOVTQCHX.js → chunk.S2BMI23H.js} +1 -1
- package/dist/preview/{chunk.XJ4JYROM.js → chunk.SPJ34VHA.js} +1 -1
- package/dist/preview/{chunk.LZ3HO3HM.js → chunk.T6KOL7TW.js} +1 -1
- package/dist/preview/{chunk.BJ3G7J2Z.js → chunk.T6UJEXFL.js} +3 -2
- package/dist/preview/{chunk.T4QRIJE4.js → chunk.TBEKEHFS.js} +1 -1
- package/dist/preview/chunk.TO3ZKCA2.js +1 -0
- package/dist/preview/{chunk.QILGAV7H.js → chunk.TQ3MNB6K.js} +1 -1
- package/dist/preview/{chunk.F5XWYO5W.js → chunk.TRP66PHK.js} +1 -1
- package/dist/preview/{chunk.QODVFVWE.js → chunk.TSZ2S3VG.js} +1 -1
- package/dist/preview/{chunk.DWPM7AWA.js → chunk.TTM5GQ2U.js} +1 -1
- package/dist/preview/chunk.TUBY6SV3.js +1 -0
- package/dist/preview/{chunk.7QWGIGHM.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.MR776WQ2.js → chunk.UQZ2P6KD.js} +1 -1
- package/dist/preview/{chunk.OXXZGPJZ.js → chunk.UZKBFI52.js} +1 -1
- package/dist/preview/{chunk.HIJ72QX6.js → chunk.V5JB5UJS.js} +1 -1
- package/dist/preview/{chunk.3I2SGKKF.js → chunk.VDFQFLTU.js} +1 -1
- package/dist/preview/{chunk.I6HIVTXU.js → chunk.VGYG2IBZ.js} +1 -1
- package/dist/preview/chunk.VICBF3MQ.js +2 -0
- package/dist/preview/{chunk.TD2V74XU.js → chunk.VL3YDD7D.js} +1 -1
- package/dist/preview/{chunk.A7JORJJL.js → chunk.VPFUOTY7.js} +1 -1
- package/dist/preview/{chunk.UWEFODVV.js → chunk.VUDNQOOX.js} +1 -1
- package/dist/preview/{chunk.YIDNZTON.js → chunk.VVIQSFM4.js} +1 -1
- package/dist/preview/{chunk.J65CZJIC.js → chunk.W332P5T3.js} +1 -1
- package/dist/preview/{chunk.S6IKR6RD.js → chunk.W3TJF4EH.js} +1 -1
- package/dist/preview/{chunk.7FTATAH2.js → chunk.W5O5F4FT.js} +1 -1
- package/dist/preview/chunk.W6L2VAJG.js +2 -0
- package/dist/preview/{chunk.QG3LV4RH.js → chunk.WGH2P2YL.js} +1 -1
- package/dist/preview/{chunk.KV3N6VRG.js → chunk.WS5ORRGS.js} +1 -1
- package/dist/preview/{chunk.7HNMG6LG.js → chunk.WU6D3SPL.js} +1 -1
- package/dist/preview/{chunk.MSWOETXN.js → chunk.X2UYEA7H.js} +1 -1
- package/dist/preview/{chunk.FBDCHJS2.js → chunk.X45EITTK.js} +1 -1
- package/dist/preview/{chunk.JIEBGUCA.js → chunk.X7U3JMBR.js} +1 -1
- package/dist/preview/chunk.XSM4OTF4.js +1 -0
- package/dist/preview/{chunk.5A5DI36V.js → chunk.XTHSPLZZ.js} +1 -1
- package/dist/preview/{chunk.TS5APXWC.js → chunk.Y5WQD6KV.js} +1 -1
- package/dist/preview/{chunk.3QPMFUMV.js → chunk.YXVUJ3NB.js} +1 -1
- package/dist/preview/{chunk.F5STM4DX.js → chunk.Z22C2JJ4.js} +1 -1
- package/dist/preview/{chunk.BBLA4PSP.js → chunk.Z2BCOZDZ.js} +1 -1
- package/dist/preview/{chunk.BZXJKWNI.js → chunk.Z3TK2LJM.js} +1 -1
- package/dist/preview/chunk.ZGLOXN7O.js +1 -0
- package/dist/preview/{chunk.UJM5EZDM.js → chunk.ZLQIGZXO.js} +1 -1
- package/dist/preview/{chunk.FUTSLXWN.js → chunk.ZONRIOIA.js} +1 -1
- package/dist/preview/{chunk.NTAC5NNE.js → chunk.ZY3NAJDM.js} +1 -1
- package/dist/preview/index.html +55 -55
- package/dist/preview/page.js +2 -2
- package/package.json +6 -6
- package/dist/preview/chunk.2QOB62XU.js +0 -1
- package/dist/preview/chunk.36FKQJFM.js +0 -2
- package/dist/preview/chunk.3A3DCALP.js +0 -1
- package/dist/preview/chunk.3GPYKWAD.js +0 -1
- package/dist/preview/chunk.3ZP6IDUC.js +0 -1
- package/dist/preview/chunk.53HW224Y.js +0 -1
- package/dist/preview/chunk.AW74DZ5V.js +0 -17
- package/dist/preview/chunk.CCCSZRKU.js +0 -1
- package/dist/preview/chunk.DBSSCJQM.js +0 -1
- package/dist/preview/chunk.DW6KXAUM.js +0 -1
- package/dist/preview/chunk.HHQUCFN4.js +0 -1
- package/dist/preview/chunk.HPWMCS3H.js +0 -23
- package/dist/preview/chunk.HRLCDBMO.js +0 -1
- package/dist/preview/chunk.I7ODVOO5.js +0 -1
- package/dist/preview/chunk.IANOWT3Z.js +0 -1
- package/dist/preview/chunk.IFPJPJ4M.js +0 -1
- package/dist/preview/chunk.IUVRJDL3.js +0 -5
- package/dist/preview/chunk.J4CSY2D5.js +0 -2
- package/dist/preview/chunk.JJIKTTXB.js +0 -1
- package/dist/preview/chunk.KDOJC4FX.js +0 -1
- package/dist/preview/chunk.KLZPUTMU.js +0 -1
- package/dist/preview/chunk.LQ2PDW2M.js +0 -32
- package/dist/preview/chunk.MNWP3TPN.js +0 -1
- package/dist/preview/chunk.NILR2BWR.js +0 -1
- package/dist/preview/chunk.NNYKLENL.js +0 -1
- package/dist/preview/chunk.PZHCWMKT.js +0 -1
- package/dist/preview/chunk.QVID5WHS.js +0 -1
- package/dist/preview/chunk.RHV73CBA.js +0 -3
- package/dist/preview/chunk.RP6C2IUM.js +0 -1
- package/dist/preview/chunk.RPHZY7N4.js +0 -1
- package/dist/preview/chunk.UYBSVE2W.js +0 -1
- package/dist/preview/chunk.WMZ2BINI.js +0 -1
- package/dist/preview/chunk.X2RHBTJI.js +0 -1
- package/dist/preview/chunk.X3FPVFFB.js +0 -1
- package/dist/preview/chunk.X4PFLIXB.js +0 -1
- package/dist/preview/chunk.YR7DKU5T.js +0 -1
- package/dist/preview/chunk.ZBK3FCVE.js +0 -1
- package/dist/preview/chunk.ZH5L746C.js +0 -1
package/dist/preview/index.html
CHANGED
|
@@ -5,72 +5,72 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
6
|
<title>Graview preview</title>
|
|
7
7
|
<link rel="preload" href="/graview/document" as="fetch" crossorigin="anonymous">
|
|
8
|
-
<link rel="modulepreload" href="/chunk.
|
|
9
|
-
<link rel="modulepreload" href="/chunk.
|
|
10
|
-
<link rel="modulepreload" href="/chunk.
|
|
11
|
-
<link rel="modulepreload" href="/chunk.
|
|
12
|
-
<link rel="modulepreload" href="/chunk.
|
|
8
|
+
<link rel="modulepreload" href="/chunk.G5AF5IXL.js">
|
|
9
|
+
<link rel="modulepreload" href="/chunk.5WCSQFS5.js">
|
|
10
|
+
<link rel="modulepreload" href="/chunk.TBEKEHFS.js">
|
|
11
|
+
<link rel="modulepreload" href="/chunk.LHCGC3K6.js">
|
|
12
|
+
<link rel="modulepreload" href="/chunk.L3MLGFIS.js">
|
|
13
13
|
<link rel="modulepreload" href="/chunk.Q5WEOX3Q.js">
|
|
14
|
-
<link rel="modulepreload" href="/chunk.
|
|
15
|
-
<link rel="modulepreload" href="/chunk.
|
|
16
|
-
<link rel="modulepreload" href="/chunk.
|
|
17
|
-
<link rel="modulepreload" href="/chunk.
|
|
18
|
-
<link rel="modulepreload" href="/chunk.
|
|
14
|
+
<link rel="modulepreload" href="/chunk.OYMN3IFX.js">
|
|
15
|
+
<link rel="modulepreload" href="/chunk.N3MXLORL.js">
|
|
16
|
+
<link rel="modulepreload" href="/chunk.RJ7VSWTA.js">
|
|
17
|
+
<link rel="modulepreload" href="/chunk.P43LPXXJ.js">
|
|
18
|
+
<link rel="modulepreload" href="/chunk.JCKIJSW7.js">
|
|
19
19
|
<link rel="modulepreload" href="/chunk.SDO3U72B.js">
|
|
20
|
-
<link rel="modulepreload" href="/chunk.
|
|
20
|
+
<link rel="modulepreload" href="/chunk.6L6RUOSF.js">
|
|
21
21
|
<link rel="modulepreload" href="/chunk.FQLNBIQ5.js">
|
|
22
22
|
<link rel="modulepreload" href="/chunk.AJZBJBMO.js">
|
|
23
|
-
<link rel="modulepreload" href="/chunk.
|
|
24
|
-
<link rel="modulepreload" href="/chunk.
|
|
25
|
-
<link rel="modulepreload" href="/chunk.
|
|
26
|
-
<link rel="modulepreload" href="/chunk.
|
|
27
|
-
<link rel="modulepreload" href="/chunk.
|
|
23
|
+
<link rel="modulepreload" href="/chunk.EUXAIG73.js">
|
|
24
|
+
<link rel="modulepreload" href="/chunk.6BBUTKFC.js">
|
|
25
|
+
<link rel="modulepreload" href="/chunk.Z22C2JJ4.js">
|
|
26
|
+
<link rel="modulepreload" href="/chunk.MKJV3BM5.js">
|
|
27
|
+
<link rel="modulepreload" href="/chunk.CEOQY5KS.js">
|
|
28
28
|
<link rel="modulepreload" href="/chunk.Q355UPFG.js">
|
|
29
|
-
<link rel="modulepreload" href="/chunk.
|
|
30
|
-
<link rel="modulepreload" href="/chunk.
|
|
31
|
-
<link rel="modulepreload" href="/chunk.
|
|
32
|
-
<link rel="modulepreload" href="/chunk.
|
|
33
|
-
<link rel="modulepreload" href="/chunk.
|
|
34
|
-
<link rel="modulepreload" href="/chunk.
|
|
35
|
-
<link rel="modulepreload" href="/chunk.
|
|
36
|
-
<link rel="modulepreload" href="/chunk.
|
|
37
|
-
<link rel="modulepreload" href="/chunk.
|
|
38
|
-
<link rel="modulepreload" href="/chunk.
|
|
39
|
-
<link rel="modulepreload" href="/chunk.
|
|
40
|
-
<link rel="modulepreload" href="/chunk.
|
|
29
|
+
<link rel="modulepreload" href="/chunk.4HU2ILFY.js">
|
|
30
|
+
<link rel="modulepreload" href="/chunk.WGH2P2YL.js">
|
|
31
|
+
<link rel="modulepreload" href="/chunk.EHLV3LND.js">
|
|
32
|
+
<link rel="modulepreload" href="/chunk.EPSYX2SF.js">
|
|
33
|
+
<link rel="modulepreload" href="/chunk.EOSN5DWW.js">
|
|
34
|
+
<link rel="modulepreload" href="/chunk.T6UJEXFL.js">
|
|
35
|
+
<link rel="modulepreload" href="/chunk.7THS3DLZ.js">
|
|
36
|
+
<link rel="modulepreload" href="/chunk.4QMAYVPU.js">
|
|
37
|
+
<link rel="modulepreload" href="/chunk.ARGEGV5T.js">
|
|
38
|
+
<link rel="modulepreload" href="/chunk.WS5ORRGS.js">
|
|
39
|
+
<link rel="modulepreload" href="/chunk.ZONRIOIA.js">
|
|
40
|
+
<link rel="modulepreload" href="/chunk.NXHEOHRR.js">
|
|
41
41
|
<link rel="modulepreload" href="/chunk.MB7LKKUD.js">
|
|
42
|
-
<link rel="modulepreload" href="/chunk.
|
|
43
|
-
<link rel="modulepreload" href="/chunk.
|
|
44
|
-
<link rel="modulepreload" href="/chunk.
|
|
45
|
-
<link rel="modulepreload" href="/chunk.
|
|
46
|
-
<link rel="modulepreload" href="/chunk.
|
|
47
|
-
<link rel="modulepreload" href="/chunk.
|
|
48
|
-
<link rel="modulepreload" href="/chunk.
|
|
49
|
-
<link rel="modulepreload" href="/chunk.
|
|
50
|
-
<link rel="modulepreload" href="/chunk.
|
|
42
|
+
<link rel="modulepreload" href="/chunk.QJJWAYHB.js">
|
|
43
|
+
<link rel="modulepreload" href="/chunk.6A3KTD66.js">
|
|
44
|
+
<link rel="modulepreload" href="/chunk.MQNW3O67.js">
|
|
45
|
+
<link rel="modulepreload" href="/chunk.67S2UWBT.js">
|
|
46
|
+
<link rel="modulepreload" href="/chunk.7PWLRRUS.js">
|
|
47
|
+
<link rel="modulepreload" href="/chunk.OKHXXIMN.js">
|
|
48
|
+
<link rel="modulepreload" href="/chunk.NH3VXTGX.js">
|
|
49
|
+
<link rel="modulepreload" href="/chunk.6IMRCKB4.js">
|
|
50
|
+
<link rel="modulepreload" href="/chunk.7KX36ENH.js">
|
|
51
51
|
<link rel="modulepreload" href="/chunk.BJUUSIQY.js">
|
|
52
|
-
<link rel="modulepreload" href="/chunk.
|
|
53
|
-
<link rel="modulepreload" href="/chunk.
|
|
52
|
+
<link rel="modulepreload" href="/chunk.QDDDKEBH.js">
|
|
53
|
+
<link rel="modulepreload" href="/chunk.QKRQPUCE.js">
|
|
54
54
|
<link rel="modulepreload" href="/chunk.XOZU4OFA.js">
|
|
55
|
-
<link rel="modulepreload" href="/chunk.
|
|
55
|
+
<link rel="modulepreload" href="/chunk.KBJ3UUER.js">
|
|
56
56
|
<link rel="modulepreload" href="/chunk.WVUJXDXZ.js">
|
|
57
|
-
<link rel="modulepreload" href="/chunk.
|
|
58
|
-
<link rel="modulepreload" href="/chunk.
|
|
59
|
-
<link rel="modulepreload" href="/chunk.
|
|
60
|
-
<link rel="modulepreload" href="/chunk.
|
|
61
|
-
<link rel="modulepreload" href="/chunk.
|
|
57
|
+
<link rel="modulepreload" href="/chunk.NI4OPHTL.js">
|
|
58
|
+
<link rel="modulepreload" href="/chunk.U5KJQFAP.js">
|
|
59
|
+
<link rel="modulepreload" href="/chunk.FOHZPYUV.js">
|
|
60
|
+
<link rel="modulepreload" href="/chunk.IXYG65TM.js">
|
|
61
|
+
<link rel="modulepreload" href="/chunk.W6L2VAJG.js">
|
|
62
62
|
<link rel="modulepreload" href="/chunk.MIE4TJRW.js">
|
|
63
|
-
<link rel="modulepreload" href="/chunk.
|
|
63
|
+
<link rel="modulepreload" href="/chunk.3CLTABGP.js">
|
|
64
64
|
<link rel="modulepreload" href="/chunk.RD2FSSLV.js">
|
|
65
|
-
<link rel="modulepreload" href="/chunk.
|
|
66
|
-
<link rel="modulepreload" href="/chunk.
|
|
67
|
-
<link rel="modulepreload" href="/chunk.
|
|
68
|
-
<link rel="modulepreload" href="/chunk.
|
|
69
|
-
<link rel="modulepreload" href="/chunk.
|
|
70
|
-
<link rel="modulepreload" href="/chunk.
|
|
71
|
-
<link rel="modulepreload" href="/chunk.
|
|
72
|
-
<link rel="modulepreload" href="/chunk.
|
|
73
|
-
<script>(()=>{const later=["/chunk.
|
|
65
|
+
<link rel="modulepreload" href="/chunk.CVN2XFMF.js">
|
|
66
|
+
<link rel="modulepreload" href="/chunk.6TBQV3NO.js">
|
|
67
|
+
<link rel="modulepreload" href="/chunk.MT252WP4.js">
|
|
68
|
+
<link rel="modulepreload" href="/chunk.VVIQSFM4.js">
|
|
69
|
+
<link rel="modulepreload" href="/chunk.TQ3MNB6K.js">
|
|
70
|
+
<link rel="modulepreload" href="/chunk.VGYG2IBZ.js">
|
|
71
|
+
<link rel="modulepreload" href="/chunk.DGYWNM5U.js">
|
|
72
|
+
<link rel="modulepreload" href="/chunk.5EQRIZ6I.js">
|
|
73
|
+
<script>(()=>{const later=["/chunk.MJ4T6YXI.js","/chunk.V5JB5UJS.js","/chunk.JLNTE5CH.js","/chunk.DDSAFU3B.js","/chunk.HJCQ6I3S.js","/chunk.DJGZOPAS.js","/chunk.GFOZVQBQ.js","/chunk.PQTXM4VY.js","/chunk.BIDL7GQD.js","/chunk.4O64QV2Y.js","/chunk.UQZ2P6KD.js","/chunk.OOQG2AEF.js","/chunk.LNKY6MT4.js","/chunk.FW6M6GIU.js","/chunk.3RRK6UTN.js","/chunk.MWWNKM3I.js","/chunk.5OS4SYHE.js","/chunk.U5P23GO7.js","/chunk.RO3D2RNP.js","/chunk.MEAUTBVM.js","/chunk.GFBE4VNT.js","/chunk.RDUGUC7R.js","/chunk.OPMGQS5J.js","/chunk.X7U3JMBR.js"],first=[...document.querySelectorAll('link[rel="modulepreload"]')];let left=first.length;const go=()=>{for(const href of later){const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};if(left===0)return go();const one=()=>{if(--left===0)go()};for(const link of first){link.addEventListener("load",one,{once:true});link.addEventListener("error",one,{once:true})}})()</script>
|
|
74
74
|
<style>html,body{margin:0;height:100%}#graview-app{min-height:100dvh}</style>
|
|
75
75
|
</head>
|
|
76
76
|
<body>
|
package/dist/preview/page.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
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 Wt,b as cr,c as lr,d as ur,e as fr,f as Dt,g as pr,h as jt}from"./chunk.IJVR7ZL7.js";import{a as fo}from"./chunk.SSHEFQ4R.js";import{a as mr,b as hr,c as Kt,d as yr,e as zt,f as wr,g as vr,h as br,i as Gt,j as Sr,k as Pr,l as Ar,m as Rr,n as kr,o as Er,p as Tr,q as xr,r as Fr,s as Or,t as Cr,u as Ye}from"./chunk.T4QRIJE4.js";import{b as gr}from"./chunk.RIP2SAQ5.js";import{c as qt}from"./chunk.R65YX332.js";import{a as Ot}from"./chunk.Q5WEOX3Q.js";import{b as Ct,i as Hn}from"./chunk.DW6KXAUM.js";import{k as ct}from"./chunk.RHV73CBA.js";import{D as _t,G as ar,L as ir,P as sr,Q as dr,k as Xn,n as er,o as tr,p as It,q as nr,s as rr,w as or}from"./chunk.PYGNO2AV.js";import{c as uo}from"./chunk.3HFBHLXC.js";import{Ea as qn,Fa as Kn,G as $n,Ga as zn,Ha as Gn,Ia as Un,Ka as Jn,La as Yn,Na as Qn,Oa as $t,Ra as Zn,Ua as ft,Y as In,a as Nn,b as lt,c as ut,ca as _n,j as Vn,la as Wn,m as Vt,ma as Dn,oa as jn}from"./chunk.CUA7F3YJ.js";import{a as Ne}from"./chunk.SDO3U72B.js";import{Be as Bt,Ce as Mt,De as Ht,Ge as Mn,Hc as Lt,He as Nt,Ib as st,Ic as En,Jb as An,Kd as Tn,Ld as xn,Td as Fn,Vd as On,Wd as Cn,Yb as Rn,Yd as dt,_b as kn,ue as Fe,ve as Ln,we as Bn,xb as Ke,zb as Pn}from"./chunk.IUVRJDL3.js";import"./chunk.FQLNBIQ5.js";import{b as qe}from"./chunk.AJZBJBMO.js";async function pt(t,r={}){let o=t.compiled===void 0||!mo(t.compiled,t.document)?void 0:Hn(t.compiled,r);if(o?.ok)return o;let{compileDocumentWithoutCheck:s}=await po();return s(t.document,r)}var Lr,po=()=>Lr??=(__graviewPreload(import.meta.url,["./chunk.ZBK3FCVE.js","./chunk.DW6KXAUM.js","./chunk.HRLCDBMO.js","./chunk.36FKQJFM.js","./chunk.RHV73CBA.js","./chunk.IUVRJDL3.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.3GPYKWAD.js")).catch(t=>{throw Lr=void 0,t});function mo(t,r){let o=typeof t=="object"&&t!==null?t.document:void 0,s=r;if(typeof s=="string")try{s=JSON.parse(s)}catch{return!1}return o!==void 0&&Ot(Ct(o).document)===Ot(Ct(s).document)}var c=qe($n(),1);var ht=qe($n(),1),Ut="data-graview-drawn",ho=200,Br=50,yo=1e4,mt=()=>typeof performance<"u"?performance.now():Date.now();function go(t){let r=[...t.querySelectorAll("img")];for(let o of t.querySelectorAll("[data-worker-view]"))o.shadowRoot&&r.push(...o.shadowRoot.querySelectorAll("img"));return r}function wo(t,r){if(t.ownerDocument.fonts?.status==="loading"||qn()>0||Un(r)>0||t.querySelector('[aria-busy="true"]')||go(t).some(s=>!s.complete&&s.loading!=="lazy"))return!1;for(let s of t.querySelectorAll("[data-worker-view-place]"))if(!s.querySelector("[data-worker-view][data-worker-view-drawn], [data-worker-view][data-worker-view-failed]"))return!1;return!0}function Mr(t){let r=t.querySelector("[data-embed-content]"),o=[...t.querySelectorAll("[data-worker-view]")].map(s=>`${s.offsetWidth}x${s.offsetHeight}`);return`${t.scrollWidth}x${t.scrollHeight}|${r?`${r.scrollWidth}x${r.scrollHeight}`:""}|${o.join(",")}`}function vo(t,r,o,s){t.removeAttribute(Ut);let l=t.ownerDocument.defaultView;if(!l)return()=>{};let m=mt(),d=m,w=Mr(t),h=!1,E,L=typeof MutationObserver>"u"?void 0:new MutationObserver(x=>{x.some(B=>!(B.target===t&&B.attributeName===Ut))&&(d=mt())});L?.observe(t,{childList:!0,subtree:!0,characterData:!0,attributes:!0});let _=()=>{h=!0,L?.disconnect(),E!==void 0&&clearTimeout(E)},v=x=>{let B=!1,te=()=>{B||(B=!0,x())};typeof l.requestAnimationFrame=="function"&&l.requestAnimationFrame(()=>setTimeout(te,0)),setTimeout(te,100)},T=()=>{if(h)return;let x=Mr(t);x!==w&&(w=x,d=mt());let B=mt();if(wo(t,s)&&B-d>=ho||B-m>=yo){v(()=>{h||(_(),t.setAttribute(Ut,r),Yn(),o())});return}E=setTimeout(T,Br)};return E=setTimeout(T,Br),_}function Hr(t,r,o,s,l){Jn();let m=(0,ht.useRef)({place:o,onDrawn:s});m.current={place:o,onDrawn:s},(0,ht.useLayoutEffect)(()=>{l&&Gn(l);let d=E=>vo(E,m.current.place.path,()=>m.current.onDrawn?.(m.current.place),l);if(t.current)return d(t.current);let w,h=!1;return queueMicrotask(()=>{!h&&t.current&&(w=d(t.current))}),()=>{h=!0,w?.()}},[r,t,l])}var $r=qe(fo(),1);var C=qe(uo(),1);var g=qe(In(),1);function yt(t,r={}){let o=$t(t);return{Face:o.part((l,m)=>(0,c.createElement)(l,m),r),fetch:()=>o.load().then(()=>{}),here:()=>o.current!==void 0||o.failed}}var Qt=t=>Promise.all([t,sr()]).then(([r])=>r),Ir=Ne(()=>(__graviewPreload(import.meta.url,["./chunk.3ZP6IDUC.js","./chunk.2QALBEWP.js","./chunk.WAIIXXVI.js","./chunk.BJ3G7J2Z.js","./chunk.KP7HUXH5.js","./chunk.FUTSLXWN.js","./chunk.MZSWWMX6.js","./chunk.HJCQ6I3S.js","./chunk.4QBW46XV.js","./chunk.U5Q7EVZQ.js","./chunk.4O3STSC4.js","./chunk.VKQONZKR.js","./chunk.FXCKKVT5.js","./chunk.U5P23GO7.js","./chunk.LEZGBHPZ.js","./chunk.O2XPLDMM.js","./chunk.CM7EDQ4E.js","./chunk.SUYYDJGZ.js","./chunk.YR7DKU5T.js","./chunk.X7HMTN3Z.js","./chunk.YTRUZ56A.js","./chunk.MYR36HW4.js","./chunk.5IM2X3VT.js","./chunk.BIDL7GQD.js","./chunk.NKUNCQB3.js","./chunk.HMV4ILAC.js","./chunk.XAN7QXMQ.js","./chunk.T4QRIJE4.js","./chunk.RIP2SAQ5.js","./chunk.Q5WEOX3Q.js","./chunk.ZBK3FCVE.js","./chunk.DW6KXAUM.js","./chunk.MR776WQ2.js","./chunk.HRLCDBMO.js","./chunk.LZNHTROY.js","./chunk.36FKQJFM.js","./chunk.RHV73CBA.js","./chunk.MIE4TJRW.js","./chunk.RP6C2IUM.js","./chunk.RD2FSSLV.js","./chunk.T552MHMU.js","./chunk.ZGJUCVT5.js","./chunk.CVVNHQPO.js","./chunk.YIDNZTON.js","./chunk.QILGAV7H.js","./chunk.I6HIVTXU.js","./chunk.PYGNO2AV.js","./chunk.3HFBHLXC.js","./chunk.CUA7F3YJ.js","./chunk.SDO3U72B.js","./chunk.IUVRJDL3.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.7TZXDPPO.js"))),bo=Ne(()=>(__graviewPreload(import.meta.url,["./chunk.HPWMCS3H.js","./chunk.F5STM4DX.js","./chunk.SWY6DIE4.js","./chunk.F5756PXX.js","./chunk.Q355UPFG.js","./chunk.3ZP6IDUC.js","./chunk.QG3LV4RH.js","./chunk.BQWMHHAZ.js","./chunk.2QALBEWP.js","./chunk.QQUZ5RTQ.js","./chunk.BJ3G7J2Z.js","./chunk.DIVANC3G.js","./chunk.KP7HUXH5.js","./chunk.4BSEYZMS.js","./chunk.KV3N6VRG.js","./chunk.FUTSLXWN.js","./chunk.MZSWWMX6.js","./chunk.MB7LKKUD.js","./chunk.6KYTCEIH.js","./chunk.FXCKKVT5.js","./chunk.NCBUECIW.js","./chunk.2T24FYAO.js","./chunk.JEQ6CA5M.js","./chunk.CM7EDQ4E.js","./chunk.SUYYDJGZ.js","./chunk.YR7DKU5T.js","./chunk.NKUNCQB3.js","./chunk.BJUUSIQY.js","./chunk.HMV4ILAC.js","./chunk.XAN7QXMQ.js","./chunk.XOZU4OFA.js","./chunk.CHG522KL.js","./chunk.WVUJXDXZ.js","./chunk.IRPMGHZN.js","./chunk.7QWGIGHM.js","./chunk.HRLCDBMO.js","./chunk.LZNHTROY.js","./chunk.36FKQJFM.js","./chunk.RHV73CBA.js","./chunk.MIE4TJRW.js","./chunk.RP6C2IUM.js","./chunk.RD2FSSLV.js","./chunk.T552MHMU.js","./chunk.ZGJUCVT5.js","./chunk.CVVNHQPO.js","./chunk.YIDNZTON.js","./chunk.QILGAV7H.js","./chunk.I6HIVTXU.js","./chunk.PYGNO2AV.js","./chunk.3HFBHLXC.js","./chunk.CUA7F3YJ.js","./chunk.SDO3U72B.js","./chunk.IUVRJDL3.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.IANOWT3Z.js"))),So=Ne(()=>(__graviewPreload(import.meta.url,["./chunk.HPWMCS3H.js","./chunk.F5STM4DX.js","./chunk.SWY6DIE4.js","./chunk.F5756PXX.js","./chunk.Q355UPFG.js","./chunk.3ZP6IDUC.js","./chunk.QG3LV4RH.js","./chunk.BQWMHHAZ.js","./chunk.2QALBEWP.js","./chunk.QQUZ5RTQ.js","./chunk.BJ3G7J2Z.js","./chunk.DIVANC3G.js","./chunk.KP7HUXH5.js","./chunk.4BSEYZMS.js","./chunk.KV3N6VRG.js","./chunk.FUTSLXWN.js","./chunk.MZSWWMX6.js","./chunk.MB7LKKUD.js","./chunk.6KYTCEIH.js","./chunk.FXCKKVT5.js","./chunk.NCBUECIW.js","./chunk.2T24FYAO.js","./chunk.JEQ6CA5M.js","./chunk.CM7EDQ4E.js","./chunk.SUYYDJGZ.js","./chunk.YR7DKU5T.js","./chunk.NKUNCQB3.js","./chunk.BJUUSIQY.js","./chunk.HMV4ILAC.js","./chunk.XAN7QXMQ.js","./chunk.XOZU4OFA.js","./chunk.CHG522KL.js","./chunk.WVUJXDXZ.js","./chunk.IRPMGHZN.js","./chunk.7QWGIGHM.js","./chunk.HRLCDBMO.js","./chunk.LZNHTROY.js","./chunk.36FKQJFM.js","./chunk.RHV73CBA.js","./chunk.MIE4TJRW.js","./chunk.RP6C2IUM.js","./chunk.RD2FSSLV.js","./chunk.T552MHMU.js","./chunk.ZGJUCVT5.js","./chunk.CVVNHQPO.js","./chunk.YIDNZTON.js","./chunk.QILGAV7H.js","./chunk.I6HIVTXU.js","./chunk.PYGNO2AV.js","./chunk.3HFBHLXC.js","./chunk.CUA7F3YJ.js","./chunk.SDO3U72B.js","./chunk.IUVRJDL3.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.MNWP3TPN.js"))),_r=yt(()=>Qt(Ir().then(t=>t.SceneFace)),{what:"This view"}),Wr=yt(()=>Ir().then(t=>t.SceneKeeping),{quiet:!0}),Dr=yt(()=>Qt(bo().then(t=>t.PagesContent)),{what:"This page"}),jr=yt(()=>Qt(So().then(t=>t.PictureFace)),{what:"This picture"}),Po=_r.Face,Ao=Wr.Face,Ro=Dr.Face,ko=jr.Face;qt(Ne(()=>(__graviewPreload(import.meta.url,["./chunk.U2DZE7A5.js","./chunk.CEQQIW7Z.js","./chunk.BBLA4PSP.js","./chunk.QG3LV4RH.js","./chunk.YCMMATFK.js","./chunk.F5XWYO5W.js","./chunk.FSZQTX3K.js","./chunk.OXXZGPJZ.js","./chunk.K6EKSURO.js","./chunk.KJAOJTZZ.js","./chunk.S4QSZRKH.js","./chunk.QDVGHI7R.js","./chunk.M5FP4Y4Q.js","./chunk.RSMCTI2N.js","./chunk.5IM2X3VT.js","./chunk.NKUNCQB3.js","./chunk.MR776WQ2.js","./chunk.CVVNHQPO.js","./chunk.IUVRJDL3.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.7LAXSQQY.js"))));function Ve(...t){let r=t.length>0?t:["scene","pages","picture"],o=new Set(r.flatMap(qr));return Promise.all([...[...o].map(s=>s.fetch()),rr()]).then(()=>{},()=>{})}var qr=t=>t==="pages"?[Dr]:t==="picture"?[jr]:[_r,Wr],Kr=t=>qr(t).every(r=>r.here()),Eo=150,Jt=0;function Nr(t,r){if(Kr(t))return r();let o=++Jt,s=()=>{o===Jt&&(Jt+=1,r())};Ve(t).then(s),setTimeout(s,Eo)}var To=768;function xo(t,r){let o=r!==null&&r>=To;(0,c.useEffect)(()=>{if(!o||t==="picture")return;let s=t==="pages"?"scene":"pages";if(Kr(s))return;let l=globalThis,m=()=>void Ve(s),d=()=>{},w=Qn(()=>{if(l.requestIdleCallback&&l.cancelIdleCallback){let h=l.requestIdleCallback(m,{timeout:4e3});d=()=>l.cancelIdleCallback?.(h)}else{let h=setTimeout(m,1500);d=()=>clearTimeout(h)}});return()=>(w(),d())},[t,o])}function Fo({asked:t,shown:r,onDrawn:o}){return(0,c.useLayoutEffect)(()=>o(t,r),[t,r,o]),null}function Oo({auto:t,scene:r}){return(0,g.jsx)("div",{"data-embed-content":"","aria-busy":"true",style:{flex:t?r?`0 0 ${Gt}px`:"0 0 auto":"1 1 auto",minHeight:0,background:"var(--graview-ground)"}})}var Co=$t(Ne(()=>(__graviewPreload(import.meta.url,["./chunk.AJZBJBMO.js"]),import("./chunk.5JNXQHN4.js")))).part((t,r)=>(0,g.jsx)(t.StudioPlace,{...r}),{quiet:!0});function zr(t,r,o,s,l){return Dt(t,fr(r?ut(r):l??Nn,s),o)}function Zt(t){return t&&ut(t).overview?"graview":"scene"}function Vr(t,r){if(r.homeView?.()===void 0)return!1;let o=t.pages?.first?.trim();return o===void 0||o===""||o==="/"||o.toLowerCase()==="home"}function Gr(t){let[,r]=(0,c.useState)(!1),o=(0,c.useCallback)(()=>r(!0),[]),s=(0,c.useRef)(!1);return t.at&&!gt?(0,g.jsx)(Kt,{onReady:o,fetch:Xt}):!s.current&&hr(t.draftView)?(0,g.jsx)(Kt,{onReady:o,fetch:mr}):(s.current=!0,(0,g.jsx)(Lo,{...t}))}function Lo(t){let{app:r,stop:o,bar:s=!0,standing:l="Everything is in order",principal:m,heading:d=2}=t,{rootRef:w,scope:h,css:E,scheme:L,store:_,presence:v,brand:T,auto:x,height:B}=Sr(t),te=yr(t.draftView),k=vr(t,dr,te.over),[le]=(0,c.useState)(zn),u=t.basePath===void 0?{}:{basePath:t.basePath},[$]=(0,c.useState)(It),I=t.notices??$,z=p=>Bt(p,u),oe={...t.routing?{routing:t.routing}:{},...u},[ae]=(0,c.useState)(()=>{let p=t.at?.face;if(p)return p;let j=o===void 0&&Vr(r,k)?"pages":Zt(o),ve=Wt({...oe,face:j});return t.face===void 0&&t.onOpening?.(ve),ve}),[Se,O]=(0,c.useState)(()=>t.face!==void 0&&t.face!=="pages"&&!t.at&&o===void 0&&cr(oe)&&Vr(r,k)),Pe=(0,c.useRef)(t.onFace);Pe.current=t.onFace,(0,c.useLayoutEffect)(()=>{Se&&(Pe.current?.("pages"),O(!1))},[Se]);let R=Se?"pages":t.face??ae,b=r.schema.kinds,V=t.routing==="address",Ae=(0,c.useMemo)(()=>t.at?gt.settleAt(t,_.seenBy(m??{kind:"human"}),k.places()):void 0,[]),M=(0,c.useMemo)(()=>Dn(k,r.schema),[k,r.schema]),me=(0,c.useMemo)(()=>{let p=Ae?.stop??(V?lr(t.basePath):void 0)??o;return R==="scene"&&p===void 0&&M===void 0&&(t.path===void 0||Yt(t.path))?jt(void 0):zr(R,p,b,k.places(),M)},[]),[W]=(0,c.useState)(R);(0,c.useEffect)(()=>{W!=="pages"&&Wn(k)},[W,k]);let H=(0,c.useRef)(void 0),q=p=>p===void 0||Yt(p)?"/":p;H.current??={path:q(Ae?.path??(V?R==="pages"?(Mt(window.location.pathname,t.basePath)??"/")+window.location.search:"/":t.path)),asked:t.path},t.path!==H.current.asked&&(H.current={path:q(t.path),asked:t.path});let Z=(0,c.useRef)(t.onNavigate);Z.current=t.onNavigate;let Ce=(0,c.useCallback)((p,j)=>{H.current.path=p,Z.current?.(p,j)},[]),{at:he,setAt:D,steering:G,steer:ne}=Fr(H.current.path),N=(0,c.useContext)(Ur);N&&(N.pages=()=>H.current.path);let[$e]=(0,c.useState)(()=>({})),Y=N??$e,ie=(0,c.useMemo)(()=>er(I),[I]),K=(0,c.useRef)(void 0),Le=(0,c.useCallback)(p=>void(H.current.path=p),[]),U=Xn(w),[ue,Be]=(0,c.useState)(!1),Re=t.pagesBelow!==void 0&&U!==null&&U<t.pagesBelow&&(R==="scene"||R==="graview")&&!ue,S=Re?"pages":R,ye=(0,c.useRef)(!1);ye.current=ue&&t.pagesBelow!==void 0&&U!==null&&U<t.pagesBelow&&(R==="scene"||R==="graview"),N&&(N.shown=S);let ge=(0,c.useRef)(R==="graview"?"graview":"scene");(S==="scene"||S==="graview")&&(ge.current=S),(0,c.useState)(()=>{if(!V||typeof window>"u"||S==="pages"||S==="picture")return;let{pathname:p,search:j,hash:ve}=window.location;Mt(p,t.basePath)==="/"&&window.history.replaceState(window.history.state,"",`${z(Fe)}${j}${ve}`)}),br(w,S,t.onIntrinsicHeight),xo(S,U);let ke=Or(t.onError,S),fe=Cr(t.onReady,S),Me=(0,c.useRef)(t.onFaceDrawn);Me.current=t.onFaceDrawn;let He=(0,c.useCallback)((p,j)=>{fe(j),Me.current?.(p)},[fe]),[Ze,Ie]=(0,c.useState)(null),Xe=k.places(),_e=(0,c.useRef)({shown:S,onFace:t.onFace});_e.current={shown:S,onFace:t.onFace};let We=(0,c.useCallback)((p,j,ve)=>{if(V){K.current?.(p,j,ve);return}_e.current.onFace?.(p),Z.current?.(p==="pages"?j??H.current.path:Fe,"push")},[V]),[J,se]=(0,c.useState)(void 0);(0,c.useEffect)(()=>{S==="pages"&&se(void 0)},[S]);let Q=(0,c.useRef)(o);(0,c.useEffect)(()=>{Q.current!==o&&(Q.current=o,se(void 0))},[o]);let De=(0,c.useCallback)(p=>{if(_e.current.shown==="pages"){if(Be(!0),se(p),R==="scene"||R==="graview"){Nr(R,()=>{V?window.history.pushState(null,"",`${z(Fe)}${p??""}`):Z.current?.(Fe,"push")});return}Nr(ge.current,()=>We(ge.current,void 0,p))}},[V,R,t.basePath,We]),de=(0,c.useCallback)(p=>{if(_e.current.shown==="pages"){G.go.current||(H.current.path=p),ne(p);return}if(H.current.path=p,D(p),ye.current){Be(!1),V?window.history.pushState(null,"",z(p)):Z.current?.(p,"push");return}We("pages",p)},[G,ne,D,We,V,t.basePath]),et=k.arrangement?.(),Ee=S==="pages",we=t.hrefOf,Te=we??(V?z:void 0),Pt=(0,c.useMemo)(()=>({open:de,...we?{href:we}:V?{href:p=>Bt(p,t.basePath===void 0?{}:{basePath:t.basePath})}:{}}),[de,V,t.basePath,we]);return(0,g.jsxs)("section",{ref:w,className:h,"aria-label":t.label??r.name,"data-graview-embed":S,"data-graview-scheme":L,...Re?{"data-graview-embed-narrow":""}:{},style:{position:"relative",isolation:"isolate",height:B,minHeight:x?0:320,display:"flex",flexDirection:"column",overflow:"hidden",borderRadius:"var(--graview-radius, 12px)"},children:[(0,g.jsx)("style",{children:E}),(0,g.jsxs)(Zn.Provider,{value:ke,children:[(0,g.jsx)(Pr,{rootRef:w,board:I,onReport:t.onReport,where:()=>S==="pages"?Ar(he):S==="picture"?{place:"picture"}:tr(Y.view?.focusId)}),(0,g.jsx)(wr,{rootRef:w,firstLook:t.firstLook,app:ar(T??{name:r.name},r.schema)}),(0,g.jsx)(Ye,{module:"@graview/react",report:ke,content:!0,children:(0,g.jsx)(Kn.Provider,{value:le,children:(0,g.jsx)(_n,{store:_,views:k,initialView:me,scheme:L,...Rr(t,v,T),...t.onSeat?{onSeat:t.onSeat}:{},children:(0,g.jsxs)(nr.Provider,{value:ie,children:[(0,g.jsx)(No,{face:S,stop:J??o,kinds:b,places:Xe,opens:M}),(0,g.jsx)(Bo,{into:Y}),(0,g.jsx)(Mo,{rootRef:w,face:R,shown:S,path:he,stop:o,draft:te.n,onDrawn:t.onDrawn,parts:le}),V?(0,g.jsx)(ur,{pagesWere:Ae?.path,basePath:t.basePath,shown:S,onFace:t.onFace,toggle:K,kinds:b,places:Xe,opens:M,landed:Le}):null,s&&S!=="picture"?(0,g.jsx)(Ye,{module:"@graview/embed",report:ke,children:(0,g.jsx)(kr,{name:T?.name??r.name,heading:d,named:zt(s).name!==!1,faces:zt(s).faces===!1?void 0:{scene:{label:Ln(et),current:!Ee,go:()=>De(),reach:()=>void Ve(ge.current)},pages:{label:Bn(et),current:Ee,go:()=>de(H.current.path),reach:()=>void Ve("pages")}},at:Ee?he:null,without:t.pages?.without(),home:{...Te?.("/")!==void 0?{href:Te("/")}:{},go:()=>de("/"),current:Ee&&he.split("?")[0]==="/"},reach:{...Te?{href:Te}:{},go:p=>de(p.path)},standing:l,hostActions:t.hostActions,barActions:t.barActions,appMenu:t.appMenu,schemeChoice:t.schemeChoice,share:t.share,status:t.status,keeping:Ee?void 0:(0,g.jsx)(Vo,{app:r,studio:t.studio,report:ke}),onFind:Ie})}):null,(0,g.jsx)(or.Provider,{value:Ze,children:(0,g.jsx)(Ye,{module:S==="pages"||S==="picture"?"@graview/pages":"@graview/react",report:ke,content:!0,children:(0,g.jsxs)(c.Suspense,{fallback:(0,g.jsx)(Oo,{auto:x,scene:S!=="pages"&&S!=="picture"}),children:[S==="picture"?(0,g.jsx)(ko,{scope:h,store:_,views:k,as:(o?ut(o).within?.view:void 0)??""}):S==="pages"?(0,g.jsx)(Ro,{store:_,views:k,presence:v,auto:x,brand:T,steering:G,overview:De,scope:h,titleLevel:xr(d),quickAsk:_t(t.quickAsk),props:{...t,onNavigate:Ce,...V?{}:{path:H.current.path}}}):(0,g.jsx)(jn.Provider,{value:Pt,children:(0,g.jsx)(Po,{address:V,auto:x,scheme:L,scope:h,quickAsk:_t(t.quickAsk)})}),(0,g.jsx)(Fo,{asked:R,shown:S,onDrawn:He})]})},S)})]})})})})]})]})}var Yt=t=>t.split(/[?#]/)[0]===Fe,Ur=(0,c.createContext)(null);function Bo({into:t}){return t.view=ft().view,null}function Mo({rootRef:t,face:r,shown:o,path:s,stop:l,draft:m,onDrawn:d,parts:w}){let{view:h}=ft(),E=o==="scene"||o==="graview",L=lt(h),{pan:_,...v}=h,T=h.pan?lt(v):L,x={face:r,path:E?Fe:o==="picture"?l??"#":s,stop:L};return Hr(t,`${o} ${E?T:x.path} ${m}`,x,d,w),null}var gt,Ho=Ne(()=>(__graviewPreload(import.meta.url,["./chunk.IJVR7ZL7.js","./chunk.PYGNO2AV.js","./chunk.3HFBHLXC.js","./chunk.CUA7F3YJ.js","./chunk.SDO3U72B.js","./chunk.IUVRJDL3.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.S6IKR6RD.js"))),Xt=()=>Ho().then(t=>void(gt=t),()=>new Promise(t=>{let r=()=>{window.removeEventListener("online",r),clearTimeout(o),t()},o=setTimeout(r,1e4);window.addEventListener("online",r)}).then(Xt));function No({face:t,stop:r,kinds:o,places:s,opens:l}){let{view:m,go:d}=ft(),w=(0,c.useRef)({face:t,stop:r});return(0,c.useLayoutEffect)(()=>{let h=w.current.stop!==r,E=w.current.face!==t,L=w.current.face==="pages";if(w.current={face:t,stop:r},!h&&!E||t==="pages"||t==="picture")return;let _=(h||L)&&r!==void 0?zr(t,r,o,s):L&&pr(m)?Dt(t,jt(l),o):t==="graview"?Vt(m,!0):m.overview?Vn(Vt(m,!1),ir(m,o)):m;d(_)},[t,r,o,m,d,l]),null}function Vo({app:t,studio:r,report:o}){return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(c.Suspense,{fallback:null,children:(0,g.jsx)(Ao,{})}),r!==!1?(0,g.jsx)(Ye,{module:"@graview/studio",report:o,children:(0,g.jsx)($o,{app:t,studio:r})}):null]})}function $o({app:t,studio:r}){let o={app:t,within:"box",...r?{onApply:r.onApply}:{},...r?.landmark?{landmark:r.landmark}:{},...r?.offered!==void 0?{offered:r.offered}:{}},s=r?.place;return s?(0,g.jsx)(s,{...o}):(0,g.jsx)(c.Suspense,{fallback:null,children:(0,g.jsx)(Co,{...o})})}function Io({path:t,stop:r,...o},s){return{...o,app:s.app,at:s.at,remote:s.remote,...s.remote.presence?{presence:s.remote.presence}:{}}}function en(t,r){let o=r.store??r.remote?.store??gr(r.app,r.seed),s=r.notices??It(),l=null,m={},d=0,w=r.label,h=r.app,E=Promise.resolve(),L=r.at?.face??r.face,_=L===void 0?void 0:Wt({...r,face:L}),v=_??Zt(r.stop),T=null,x=[],B=u=>{if(T=u,u!==v)return;let $=x;x=[];for(let I of $)I()};function te(){let[u,$]=(0,c.useState)(_),[I,z]=(0,c.useState)(r.stop),[oe,ae]=(0,c.useState)(r.path),[Se,O]=(0,c.useState)(r.scheme??"auto"),[Pe,R]=(0,c.useState)(r.principal),[b,V]=(0,c.useState)(r.seats),[Ae,M]=(0,c.useState)(r.quickAsk),[me,W]=(0,c.useState)(r.people),[H,q]=(0,c.useState)(r.hostContext),[Z,Ce]=(0,c.useState)(r.brand),[he,D]=(0,c.useState)(r.whileAway),[G,ne]=(0,c.useState)(r.label),[N,$e]=(0,c.useState)(r.hostActions),[Y,ie]=(0,c.useState)(r.barActions),[K,Le]=(0,c.useState)(()=>Er(r)),[U,ue]=(0,c.useState)(void 0),[Be,Re]=(0,c.useState)(r.draftView);return l={app:S=>{ue(S),ae(void 0),z(void 0)},face:$,stop:z,path:ae,scheme:O,seat:R,seats:V,quickAsk:M,people:W,hostContext:q,brand:Ce,whileAway:D,label:ne,hostActions:$e,barActions:ie,hostBar:S=>Le(ye=>({...ye,...S})),draft:Re},(0,g.jsx)(Ur.Provider,{value:m,children:(0,g.jsx)(Gr,{...U?Io(r,U):r,store:o,notices:s,...u!==void 0?{face:u}:{},onOpening:S=>{v=S},...I!==void 0?{stop:I}:{},...oe!==void 0?{path:oe}:{},...Pe?{principal:Pe}:{},...b?{seats:b}:{},...Ae!==void 0?{quickAsk:Ae}:{},...me?{people:me}:{},...H?{hostContext:H}:{},...Z?{brand:Z}:{},whileAway:he,label:G,hostActions:N,barActions:Y,...Tr(K),draftView:Be,scheme:Se,onFace:S=>{v=S,$(S)},onSeat:R,onFaceDrawn:B},U?.n??0)})}let k=()=>{let u=m.view?.focusId,$=u?o.graph.getNode(u)?.kind:void 0,I=(m.shown??v)==="scene"||(m.shown??v)==="graview";return{face:v,path:I?Fe:m.pages?.()??r.path??"/",stop:m.view?lt(m.view):r.stop??"#",...$?{kind:$}:{}}},le=(0,$r.createRoot)(t);return(0,C.flushSync)(()=>le.render((0,g.jsx)(te,{}))),{get store(){return o},where:k,setApp:(u,$,I)=>{let z="graph"in $?{store:$}:$,oe=()=>{let ae=k();o=z.store,w=I?.label??(w===h.name?u.name:w),h=u,(0,C.flushSync)(()=>{l?.label(w),l?.app({app:u,remote:z,at:ae,n:++d})})};gt?oe():E=E.then(Xt).then(oe)},setFace:u=>{v=u,(0,C.flushSync)(()=>l?.face(u))},setStop:u=>(0,C.flushSync)(()=>l?.stop(u)),setPath:u=>(0,C.flushSync)(()=>{if(Yt(u)){(v==="pages"||v==="picture")&&(v="scene",l?.face("scene"));return}l?.path(u),v!=="pages"&&(v="pages",l?.face("pages"))}),setScheme:u=>(0,C.flushSync)(()=>l?.scheme(u)),setSeat:u=>(0,C.flushSync)(()=>l?.seat(u)),setSeats:u=>(0,C.flushSync)(()=>l?.seats(u)),setQuickAsk:u=>(0,C.flushSync)(()=>l?.quickAsk(u)),setPeople:u=>(0,C.flushSync)(()=>l?.people(u)),setHostContext:u=>(0,C.flushSync)(()=>l?.hostContext(u)),setBrand:u=>(0,C.flushSync)(()=>l?.brand(u)),setWhileAway:u=>(0,C.flushSync)(()=>l?.whileAway(u)),setDraftView:u=>(0,C.flushSync)(()=>l?.draft(u)),setLabel:u=>{w=u,(0,C.flushSync)(()=>l?.label(u))},setHostActions:u=>(0,C.flushSync)(()=>l?.hostActions(u)),setBarActions:u=>(0,C.flushSync)(()=>l?.barActions(u)),setAppMenu:u=>(0,C.flushSync)(()=>l?.hostBar({appMenu:u})),setShare:u=>(0,C.flushSync)(()=>l?.hostBar({share:u})),setStatus:u=>(0,C.flushSync)(()=>l?.hostBar({status:u})),setSchemeChoice:u=>(0,C.flushSync)(()=>l?.hostBar({schemeChoice:u})),setNotifications:u=>(0,C.flushSync)(()=>l?.hostBar({notifications:u})),drawn:()=>E.then(()=>T===v?void 0:new Promise(u=>x.push(u))),notify:u=>{let $;return(0,C.flushSync)(()=>{$=s.notify(u)}),$},unmount:()=>le.unmount()}}var wt=t=>`s${(t+1).toString(36)}`;var ee={seat:"x-graview-seat",roles:"x-graview-roles",kind:"x-graview-kind",name:"x-graview-name",for:"x-graview-for",forRoles:"x-graview-for-roles",forName:"x-graview-for-name",profile:"x-graview-profile",profileName:"x-graview-profile-name",forProfile:"x-graview-for-profile",forProfileName:"x-graview-for-profile-name",via:"x-graview-via"},ze={header:"x-graview-key",param:"graview_key",cookie:"graview_key"};function vt(t,r={}){try{let o=new URL(t),s=o.searchParams.get(ze.param);if(s)return o.searchParams.delete(ze.param),{url:o.origin+o.pathname.replace(/\/$/,"")+o.search,key:s,headers:{[ze.header]:s,...r}}}catch{}return{url:t.replace(/\/$/,""),headers:r}}var Jr="/graview/friction";var Yr="/graview/live",tn="graview.ship",nn=`${tn}.${st}`;var Ge=class extends Error{constructor(r){super(r),this.name="Superseded"}},Oe=t=>t?.lineage?{lineage:t.lineage}:{},_o=(t,r)=>`${t.calls.map(o=>o.name.replace(/-/g," ")).join(", ")} (${r instanceof Error?r.message.split(`
|
|
2
|
-
`)[0]??"":String(r)})`;function Wo(t){if(!t)return[];try{let r=t.storage.getItem(t.key);if(r===null)return[];t.storage.removeItem(t.key);let o=JSON.parse(r);return Array.isArray(o)?o.filter(s=>!!s&&Array.isArray(s.calls)):[]}catch{return[]}}var Ue=class extends Error{constructor(o){super(o.sentence);this.refusal=o;this.name="RemoteRefusedError"}},Do={401:"forbidden",403:"forbidden",404:"missing",413:"limit"},pe=class extends Error{constructor(o,s){super(o);this.conflicts=s;this.name="StaleWrite"}},Qe=class extends Error{constructor(r){super(r),this.name="Unreached"}},jo=new Set([502,503,504]);async function qo(t){try{return(await t.clone().json()).reason==="unavailable"}catch{return!1}}function Ko(){let t=Math.random().toString(36).slice(2,8),r=0;return()=>`local-${t}-${++r}`}var zo=1,Go=()=>({refusals:new Set,conflicts:new Set,statuses:new Set,helds:new Set,builds:new Set,who:new Set,declarations:new Set,tally:{reconnects:0,rebases:0,conflicts:0,resyncs:0}});async function bt(t){return(await Qr(t,Wo(t.carry),"This app was updated while your changes were on the way.",Go())).remote}async function Qr(t,r,o,s){let{key:l,...m}=vt(t.url,t.headers),d={...t,...m},w=d.fetch??fetch,h={"content-type":"application/json",...d.headers??{}},E={...St(d.principal),[ee.via]:d.via??"web"};Object.assign(h,E);let L=d.live===!0,_=d.presenceEveryMs,v=d.visible??Yo,T="connecting",x=s.statuses,B=s.tally,te=[],k,le=[],u=()=>T==="online"&&k!==void 0?"held":T,$=()=>{let e=u();if(s.told!==e){s.told=e;for(let n of[...x])n(e)}},I=e=>{if(!(e===T||ce)&&(T==="offline"&&e==="online"&&B.reconnects++,T=e,$(),e==="online"))for(let n of te.splice(0))n.again()},z=e=>{if(ce)return;let n=typeof e=="string"&&e.length>0?e:void 0,i=n!==k;if(k=n,oe(),!!i&&($(),n===void 0)){for(let a of le.splice(0))a();X&&clearTimeout(X),dn()}},oe=()=>{if(s.toldHeld!==k){s.toldHeld=k;for(let e of[...s.helds])e(k??null)}},ae=async(e,n)=>{let i;try{i=await w(e,n)}catch(a){throw p()||I("offline"),new Qe(a instanceof Error?a.message:String(a))}if(i.status===503&&await qo(i))return I("online"),i;if(jo.has(i.status))throw p()||I("offline"),new Qe(`The server is away (${i.status})`);return I("online"),i},Se=async(e=!1)=>{let n=`${d.url}/graview/state?opFormat=${Ke.op}`,i=e?await w(n,{headers:h}):await ae(n,{headers:h});if(!i.ok)throw new Error((await i.json().catch(()=>({}))).error??`The server refused (${i.status})`);return await i.json()},O=d.state??await Se(!0);L||(T="online"),k=typeof O.held=="string"&&O.held.length>0?O.held:void 0,oe();let Pe=O.enabledModules??d.enabledModules,R=d.localApp?d.localApp(d.app):d.app,b=new Cn({schema:R.schema,mutations:R.mutations??[],invariants:R.invariants??[],...R.policy?{policy:R.policy}:{},...R.publishing?{publishing:R.publishing}:{},...R.tidying?{tidying:R.tidying}:{},...R.modules?{modules:R.modules}:{},...Pe?{enabledModules:Pe}:{},...R.intelligence?{intelligence:R.intelligence}:{},...R.brand?.timeZone?{timeZone:R.brand.timeZone}:{},snapshot:O.snapshot,log:O.log,...O.horizon!==void 0?{horizon:O.horizon}:{},ids:Ko(),...d.storeOptions??{}});kn.served.add(b);let V=d.friction!==!1&&d.principal?.kind!=="visitor";V&&Tn(b,e=>{V&&w(`${d.url}${Jr}`,{method:"POST",headers:h,body:JSON.stringify({event:e})}).then(n=>void(V=n.status!==404&&n.status!==410),()=>{})});let Ae=Fn(b),M=O.log.at(-1)?.seq??(O.horizon??0)-1,me=Lt.of(O.log,{horizon:O.horizon??0}),W=null,H,q=new Map,Z=s.who,Ce=!1,he=e=>{if(ce)return;Ce=!0;let n=Mn(new Map,e,Date.now(),Ht,W?.participant);H!==void 0&&n.delete(H);let i=n.size!==q.size;if(!i)for(let[a,f]of n)Nt(f,q.get(a))||(i=!0);if(q=n,!!i)for(let a of[...Z])a([...q.values()])},D=[],G=new Set,ne=e=>{let n=D.indexOf(e);n>=0&&D.splice(n,1)},N=new Map,$e=(e,n)=>{let i=N.get(e);i&&(N.delete(e),i.resolve({ops:n.filter(a=>a.batch===e),batch:e}))},Y,ie=[],K=(e,n=[])=>{if(e.length===0&&n.length===0)return[];if(Y)return ie.push({ops:e,drop:n}),[];let i=Math.min(...e.filter(P=>P.seq>M).map(P=>P.seq));if(Number.isFinite(i)&&i>M+1)return ie.push({ops:e,drop:n}),U(),[];let a=D.filter(P=>e.some(re=>re.batch===P)),f=[...new Set([...n,...a])].filter(P=>G.has(P)),y,A=D.filter(P=>!a.includes(P));try{y=b.rebase({confirmed:e,pending:A,drop:f}).confirmed}catch(P){if(!(P instanceof On))throw P;return ie.push({ops:e,drop:n}),U(),[]}for(let P of a)ne(P);e.some(P=>P.seq>M)&&A.some(P=>!f.includes(P))&&B.rebases++,e.length>0&&(M=Math.max(M,...e.map(P=>P.seq)),me.note(e));for(let P of f)G.delete(P);for(let P of a)$e(P,e);return e.some(P=>P.lineage?.liftedStop===!0||P.undoes!==void 0&&(b.log.get(P.undoes)?.lineage?.stopsKind===!0||b.log.get(P.undoes)===void 0&&(b.stopsServed?.stops.length??0)>0))&&U(),y},Le=e=>{let n=e.stops??[],i=e.stoppedKinds??[];n.length===0&&i.length===0&&!b.stopsServed||(b.stopsServed=n.length>0||i.length>0?{stops:n,kinds:i}:void 0,b.notify(Pn,[]))};(O.stops||O.stoppedKinds)&&(b.stopsServed={stops:O.stops??[],kinds:O.stoppedKinds??[]});let U=()=>{Y||(Y=He(Se().then(e=>{if(ue(e)){ie=[];return}Le(e);let n=new Set(e.log.map(f=>f.batch)),i=D.filter(f=>n.has(f));for(let f of i)ne(f);let a=b.adopt({snapshot:e.snapshot,log:e.log,...e.horizon!==void 0?{horizon:e.horizon}:{},pending:[...D],drop:[...G].filter(f=>!D.includes(f))});G.clear();for(let f of a.pending)G.add(f.batch);M=e.log.at(-1)?.seq??(e.horizon??0)-1,me=Lt.of(e.log,{horizon:e.horizon??0}),B.resyncs++;for(let f of i)$e(f,e.log)}).then(()=>{Y=void 0;let e=ie;ie=[];for(let{ops:n,drop:i}of e)K(n,i)},()=>{Y=void 0,ie=[]})))},ue=e=>(typeof e.build=="string"&&ln(e.build),typeof e.version=="number"&&z(e.held),typeof e.version!="number"||e.version===O.version?!1:(kt(e.version),!0)),Be=async e=>{let i=await(await ae(`${d.url}/graview/since?seq=${wt(e)}&opFormat=${Ke.op}`,{headers:h})).json();return ue(i)?[]:((i.ops?.length??0)>0&&Le(i),i.reset===!0?(U(),[]):i.ops??[])},Re=async()=>{let e=await S();return Y&&await Y,e},S=async()=>{if(W&&!p()&&v()){let n=await(await ae(`${d.url}/graview/here?opFormat=${Ke.op}`,{method:"POST",headers:h,body:JSON.stringify({presence:W,seq:wt(M)})})).json();return ue(n)?[]:(typeof n.participant=="string"&&(H=n.participant),he(n.who??[]),K(n.ops??[]))}return K(await Be(M))},ye=new Map,ge=new Map,ke=new Set,fe=new Map,Me=new Set,He=e=>(Me.add(e),e.finally(()=>Me.delete(e)).catch(()=>{}),e),Ze=Promise.resolve(),Ie=0,Xe=(e,n)=>{let i=Ze.then(()=>We(e,n));return Ze=i.catch(()=>{}),i},_e=()=>new Promise((e,n)=>te.push({again:e,give:n})),We=async(e,n)=>{let i,a;for(;;){try{i=await ae(`${d.url}/graview/ops`,{method:"POST",headers:h,body:JSON.stringify({...e,opFormat:Ke.op})})}catch(F){if(!(F instanceof Qe)||Q)throw F;if(await _e(),p())return tt(e,n);continue}if(a=await i.json().catch(()=>({})),i.status===503&&a.reason==="unavailable"&&typeof a.held=="string"&&!Q){if(typeof a.version=="number"?ue(a):(z(a.held),!1))break;if(k!==void 0&&(Ft>0||L)){if(await new Promise(F=>le.push(F)),Q)throw new Ge("The client closed.");if(p())return tt(e,n);continue}}let A;if(i.status===503&&a.reason==="unavailable"&&!Q)A=rn(d.backoff,Ie++);else{if(Ie=0,i.status!==429||Q)break;A=Uo(i.headers.get("retry-after"),a.retryAfter)}if(await new Promise(F=>setTimeout(F,A)),p())return tt(e,n)}if(ce||ue(a))throw new Ge("The app was changed.");if(!i.ok){let A=a.error??`The server refused (${i.status})`;throw a.conflict?new pe(A,a.conflicts??[]):new Ue({reason:a.reason??Do[i.status]??"invalid",sentence:A,...a.wouldNeed?.length?{wouldNeed:a.wouldNeed}:{}})}let f=a.ops??[],y=f[0]?.seq;return y!==void 0&&y>M+1&&(f=await Be(M)),n!==void 0&&(a.batch&&ye.set(n,a.batch),ne(n)),K(f,n!==void 0?[n]:[]),{ops:a.ops??[],...a.batch?{batch:a.batch}:{}}},J,se=!1,Q=!1,De=0,de,et=0,Ee=0,we=null,Te=()=>{},Pt=new Promise(e=>{Te=e}),p=()=>L&&se&&J?.readyState===zo,j=e=>{if(!p())return!1;try{return J.send(JSON.stringify(e)),!0}catch{return!1}},ve=(e=!1)=>{!W||!p()||!v()||!e&&we&&Nt(W,we)&&(_===void 0||Date.now()-Ee<_)||j({t:"here",presence:W})&&(we=W,Ee=Date.now())},xe=new Set,X,dn=()=>{if(X=void 0,k!==void 0)return;let e=[...N.entries()].filter(([n])=>xe.has(n));xe.clear();for(let[,n]of e)j(n.message)},cn=(e,n)=>{N.has(e)&&(xe.add(e),X&&clearTimeout(X),X=setTimeout(dn,Math.max(0,n)))},eo=e=>{N.has(e)&&xe.add(e)},tt=(e,n)=>new Promise((i,a)=>{let f=n??`send-${++et}`,y=e.undo?{t:"undo",cid:f,batches:e.undo,...e.intent?{intent:e.intent}:{},...e.batch?{batch:e.batch}:{},...e.via?{via:e.via}:{},...Oe(e)}:{t:"call",cid:f,calls:e.calls??[],...e.intent?{intent:e.intent}:{},...e.batch?{batch:e.batch}:{},...e.base?.length?{base:e.base}:{},...e.via?{via:e.via}:{},...Oe(e)};if(N.set(f,{message:y,...n!==void 0?{mine:n}:{},resolve:i,reject:a}),xe.size>0||k!==void 0){xe.add(f);return}j(y)}),nt=(e,n)=>p()?tt(e,n):Xe(e,n),to=e=>{switch(e.t){case"welcome":{if(Le(e),ln(e.build),typeof e.version=="number"&&e.version!==O.version){kt(e.version);return}if(se=!0,De=0,typeof e.participant=="string"&&(H=e.participant),z(e.held),e.state?U():K(e.ops??[]),xe.clear(),X&&clearTimeout(X),X=void 0,k!==void 0)for(let n of N.keys())xe.add(n);else for(let n of N.values())j(n.message);ve(!0),I("online"),Te();return}case"ops":K(e.ops??[]);return;case"ack":{let n=N.get(e.cid);if(!n){K(e.ops??[]);return}N.delete(e.cid),Ie=0,n.mine!==void 0&&(ye.set(n.mine,e.batch),ne(n.mine)),K(e.ops??[],n.mine!==void 0?[n.mine]:[]),n.resolve({ops:e.ops??[],batch:e.batch});return}case"refused":case"conflict":{let n=N.get(e.cid);if(!n)return;if(e.t==="refused"&&e.reason==="unavailable"){k!==void 0?eo(e.cid):cn(e.cid,rn(d.backoff,Ie++));return}N.delete(e.cid),n.reject(e.t==="conflict"?new pe(e.sentence,e.conflicts??[]):new Ue({reason:e.reason??"invalid",sentence:e.sentence,...e.wouldNeed?.length?{wouldNeed:[...e.wouldNeed]}:{}}));return}case"busy":typeof e.cid=="string"&&cn(e.cid,typeof e.retryAfter=="number"?e.retryAfter:1e3);return;case"presence":he(e.who??[]);return;case"held":z(e.sentence);return;case"declaration":typeof e.version=="number"&&e.version!==O.version&&kt(e.version);return;case"reload":mn(typeof e.reason=="string"?e.reason:"This app was updated.");return;case"error":if(e.reopen===!0&&J){let n=J;yn(n);try{n.close(1e3,"Opening again.")}catch{}}return;default:return}},ce=!1,At=s.declarations,Rt=s.builds,ln=e=>{if(!(ce||s.otherBuild!==void 0||!d.build||typeof e!="string"||e.length===0||e===d.build)){s.otherBuild=e;for(let n of[...Rt])n(e)}},un=()=>{let e=[],n=0;for(let i of D){let a=fe.get(i);a?e.push({calls:a.calls,...a.intent?{intent:a.intent}:{},...a.via?{via:a.via}:{},...Oe(a),batch:i}):n++}return{carried:e,undos:n}},fn=(e,n)=>`${n} while ${e===1?"an undo of yours was":"undos of yours were"} on the way; ${e===1?"it was":"they were"} not made.`,pn=e=>{ce=!0,W=null;let n=new Ge(e);for(let a of N.values())a.reject(n);N.clear(),at&&clearInterval(at),Q=!0,de&&clearTimeout(de),X&&clearTimeout(X),be&&clearTimeout(be);for(let a of te.splice(0))a.give(n);for(let a of le.splice(0))a();let i=J;J=void 0,se=!1;try{i?.close(1e3,e)}catch{}Te()};async function kt(e){if(ce)return;if(!d.resolveApp){mn(`This app was changed on its server (version ${e}); reload the page to carry on.`);return}let{carried:n,undos:i}=un(),a=d.resolveApp,f=W;pn("The app was changed.");try{let y=await a(e),{state:A,...F}=d,P=await Qr({...F,app:y},n,"The app was changed while your changes were on the way.",s);f&&P.remote.presence.here(f);for(let it of[...At])it(P.remote,e);let re=[...i>0?[rt(fn(i,"The app was changed"))]:[],...P.unheard()];for(let it of re)for(let lo of je)lo(it.sentence,it)}catch(y){let A=`The app was changed, but the new version could not be opened: ${y instanceof Error?y.message:String(y)}`;for(let F of je)F(A,rt(A))}}function mn(e){if(ce)return;let{carried:n,undos:i}=un();pn(e);let a=!1;if(d.carry&&n.length>0)try{d.carry.storage.setItem(d.carry.key,JSON.stringify(n)),a=!0}catch{}let f=[];!a&&n.length>0&&f.push(`${e} ${n.length===1?"A change of yours was":`${n.length} changes of yours were`} not sent; make ${n.length===1?"it":"them"} again after the page reloads.`),i>0&&f.push(fn(i,"This app was updated"));for(let y of f)for(let A of je)A(y,rt(y));(d.reloadPage??Jo)()}let hn=()=>{if(Q||!L)return;let e=`${d.url.replace(/^http/,"ws").replace(/\/$/,"")}${Yr}`,{"content-type":n,...i}=h,a;try{a=d.socket?d.socket(e,i,[nn]):co(e,i)}catch{return gn()}J=a,se=!1,a.onopen=()=>{J===a&&a.send(JSON.stringify({t:"hello",seq:wt(M),protocol:st,wire:tn,opFormat:Ke.op,...d.build?{build:d.build.slice(0,64)}:{},...d.hostProtocol!==void 0?{hostProtocol:d.hostProtocol}:{}}))},a.onmessage=f=>{if(J!==a)return;let y;try{y=JSON.parse(String(f.data))}catch{return}to(y)},a.onclose=()=>yn(a),a.onerror=()=>{}},be,no=()=>{Ce=!1,be&&clearTimeout(be),be=setTimeout(()=>{if(be=void 0,Ce||Q)return;let e=new Map([...q].filter(([,n])=>n.held!=="socket"));if(e.size!==q.size){q=e;for(let n of Z)n([...q.values()])}},Ht),be.unref?.()};function yn(e){if(J!==e)return;let n=se;J=void 0,se=!1,we=null,n&&(I("offline"),no()),gn()}let gn=()=>{if(Q)return;let e=rn(d.backoff,De);De++,de=setTimeout(hn,e)},wn=b.applyAll.bind(b),ro=b.undo.bind(b),oo=b.previewAll.bind(b);b.previewAll=(e,n)=>oo(e,{...d.principal?{author:d.principal}:{},...n});let je=s.refusals,Je=[],rt=e=>({reason:"invalid",sentence:e}),ot=s.conflicts,Et=!1,vn,Tt=async(e,n)=>{if(n instanceof Ge||ce)return;let i=n instanceof Ue?n.refusal:Rn(n),a=i.sentence,f=n instanceof pe?vn?.yoursOf(b,fe.get(e)?.calls??[]):void 0;ne(e);try{K([],[e])}catch{}let y=fe.get(e);fe.delete(e);let A=y?.calls[0];if(A&&!(n instanceof pe)){let F=b.allMutations().find(re=>re.name===A.name)?.subject?.arg,P=F&&b.graph.getNode(A.args[F])?.kind;xn(b,{type:"refused",act:A.name,code:i.reason,...P?{kind:P}:{}},d.principal)}if(n instanceof pe&&B.conflicts++,n instanceof pe&&!p()&&await Re().catch(()=>[]),n instanceof pe&&Y&&await Y,n instanceof pe&&ot.size>0){let F=!1,P={sentence:a,conflicts:f?n.conflicts.map(re=>re.node===f.node&&re.field===f.field?{...re,yours:f.yours}:re):n.conflicts,keepTheirs(){F=!0},useMine(){if(!(F||!y)){F=!0,Et=!0;try{b.applyAll(f?[f.over(M)]:y.calls,{...y.intent?{intent:y.intent}:{},...y.via?{via:y.via}:{},...Oe(y)})}finally{Et=!1}}}};for(let re of ot)re(P);return}for(let F of je)F(a,i)},ao=(e,n)=>e.flatMap(i=>i.mutation?.name===An?[]:i.primitives.flatMap(a=>a.op==="splice-text"&&!n.has(a.id)&&!n.has(`${a.id}\0${a.field}`)?[{node:a.id,field:a.field,rev:M}]:[]));b.applyAll=(e,n)=>{let i=En(b.log.all().filter(A=>G.has(A.batch))),a=wn(e,{...d.principal?{author:d.principal}:{},...n}),f=e.map((A,F)=>{let P=a.minted?.[F];return P===void 0||A.args?.id!==void 0?A:{...A,mintedHint:P}});D.push(a.batch),G.add(a.batch),fe.set(a.batch,{calls:f,...n?.intent?{intent:n.intent}:{},...n?.via?{via:n.via}:{},...Oe(n)});let y=Et?[]:[...me.baseFor(a.ops,i,(A,F)=>b.collaborative(A,F)),...ao(a.ops,i)];return ge.set(a.batch,He(nt({calls:f,...n?.intent?{intent:n.intent}:{},batch:a.batch,...y.length>0?{base:y}:{},...n?.via?{via:n.via}:{},...Oe(n)},a.batch).catch(A=>Tt(a.batch,A)))),a},b.apply=(e,n)=>b.applyAll([e],n),b.undo=(e,n)=>{let i=typeof e=="string"?[e]:e,a=ro(i.map(y=>ye.get(y)??y),{...d.principal?{author:d.principal}:{},...n});D.push(a.batch),G.add(a.batch);let f=Promise.allSettled(i.map(y=>ge.get(y)));return ge.set(a.batch,He(f.then(()=>{let y=i.filter(A=>!ke.has(A));if(y.length===0){ne(a.batch),fe.delete(a.batch),K([],[a.batch]);return}return nt({undo:y.map(A=>ye.get(A)??A),...n?.intent?{intent:n.intent}:{},batch:a.batch,...n?.via?{via:n.via}:{},...Oe(n)},a.batch)}).catch(y=>Tt(a.batch,y)))),a};let io=async(e,n={})=>{xt++;try{return(await He(nt({calls:e,...n}))).ops}finally{xt--}},xt=0,bn={here(e){W=e,ve()},onWho(e){return Z.add(e),q.size>0&&e([...q.values()]),()=>{Z.delete(e)}},leave(){if(!W)return;let e=JSON.stringify({participant:H??W.participant});if(W=null,j({t:"bye"}))return;let n=globalThis.navigator?.sendBeacon;n?n.call(globalThis.navigator,`${d.url}/graview/leave${l!==void 0?`?${ze.param}=${encodeURIComponent(l)}`:""}`,e):w(`${d.url}/graview/leave`,{method:"POST",headers:h,body:e}).catch(()=>{})}},Ft=d.pollMs??800,at=Ft>0&&typeof setInterval=="function"?setInterval(()=>{p()||Re().catch(()=>{})},Ft):null;if(L){hn();let e;await Promise.race([Pt,new Promise(n=>e=setTimeout(n,d.openTimeoutMs??3e3))]),clearTimeout(e)}if(r.length>0&&!ce){let e=[],n=new Set(b.log.all().map(i=>i.batch));for(let i of r)if(!(i.batch!==void 0&&n.has(i.batch)))try{b.applyAll(i.calls,{...i.intent?{intent:i.intent}:{},...i.batch?{batch:i.batch}:{},...i.via?{via:i.via}:{},...Oe(i)})}catch(a){e.push(_o(i,a))}e.length>0&&Je.push(rt(`${o} ${e.length===1?"One no longer fits and was not made":`${e.length} no longer fit and were not made`}: ${e.join("; ")}.`))}let Sn=new Map,so=()=>({store:b,author:d.principal,appliedAll:wn,pending:D,provisional:G,asked:fe,answers:ge,letGo:ke,sent:(e,n)=>He(nt({calls:n,batch:e},e).catch(i=>Tt(e,i))),settle:ne,land:K,seen:()=>M,gone:()=>Q||ce});return{remote:{store:b,typing(e,n){let i=`${e}\0${n}`,a=Sn.get(i);return a||(a=(__graviewPreload(import.meta.url,["./chunk.MYR36HW4.js","./chunk.IUVRJDL3.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.TVNY7F64.js")).then(f=>(vn=f,f.typingOf(e,n,f.wireOf(so())))),Sn.set(i,a)),a},version:O.version,migrated:O.migrated??[],send:io,pull:Re,onRefusal(e){je.add(e);let n=Je;Je=[];for(let i of n)e(i.sentence,i);return()=>je.delete(e)},onDeclaration(e){return At.add(e),()=>At.delete(e)},onBuild(e){return Rt.add(e),s.otherBuild!==void 0&&e(s.otherBuild),()=>Rt.delete(e)},onConflict(e){return ot.add(e),()=>ot.delete(e)},revision:(e,n)=>me.of(e,n),seq:()=>M,participant:()=>H,transport:()=>p()?"socket":"poll",status:u,onStatus(e){return x.add(e),()=>x.delete(e)},held:()=>k,onHeld(e){return s.helds.add(e),k!==void 0&&e(k),()=>s.helds.delete(e)},counters:()=>({...B}),who:()=>[...q.values()],pending:()=>D.length+xt,async settled(){for(;Me.size>0;)await Promise.allSettled([...Me])},presence:bn,close(){at&&clearInterval(at),Ae(),bn.leave(),Q=!0,de&&clearTimeout(de),X&&clearTimeout(X),be&&clearTimeout(be);for(let n of te.splice(0))n.give(new Error("The client closed before the server could be reached."));for(let n of le.splice(0))n();let e=J;J=void 0,se=!1;try{e?.close(1e3,"Closed.")}catch{}}},unheard(){let e=Je;return Je=[],e}};function co(e,n){let i=globalThis.WebSocket;if(!i)throw new Error("This runtime has no WebSocket; the client polls instead.");let a=typeof globalThis.document<"u",f=d.subprotocol?[nn]:[];if(!a)try{return new i(e,{headers:n,...f.length>0?{protocols:f}:{}})}catch{}let y=new URL(e);for(let[A,F]of Object.entries(E))y.searchParams.set(A,F);return l!==void 0&&y.searchParams.set(ze.param,l),f.length>0?new i(y.toString(),f):new i(y.toString())}}function Uo(t,r,o=Date.now()){let s,l=t?.trim();if(l)if(/^\d+(\.\d+)?$/.test(l))s=Number(l)*1e3;else{let w=Date.parse(l);Number.isFinite(w)&&(s=Math.max(0,w-o))}let m=typeof r=="number"&&Number.isFinite(r)&&r>=0?r:void 0,d=m!==void 0&&m<50&&s!==void 0&&Math.abs(m*1e3-s)<1e3;return m!==void 0&&!d?m:s??1e3}function Jo(){globalThis.location?.reload?.()}function Yo(){return globalThis.document?.visibilityState!=="hidden"}function rn(t,r){if(typeof t=="function")return Math.max(0,t(r));let{min:o=250,max:s=1e4,factor:l=2}=t??{};return Math.min(s,o*l**r)*(.75+Math.random()*.5)}function St(t){let r={};if(!t)return r;t.id&&(r[ee.seat]=t.id),t.roles?.length&&(r[ee.roles]=t.roles.join(",")),t.kind!=="human"&&(r[ee.kind]=t.kind),t.name&&(r[ee.name]=encodeURIComponent(t.name)),t.profile&&(r[ee.profile]=t.profile.id,r[ee.profileName]=encodeURIComponent(t.profile.name));let o=t.onBehalfOf;return o?.profile&&(r[ee.forProfile]=o.profile.id,r[ee.forProfileName]=encodeURIComponent(o.profile.name)),o?.id&&(r[ee.for]=o.id),o?.roles?.length&&(r[ee.forRoles]=o.roles.join(",")),o?.name&&(r[ee.forName]=encodeURIComponent(o.name)),r}var Zr="/graview/views";function on(t){let r=t.fetch??fetch,o=vt(t.url,t.headers),s=o.url,l={"content-type":"application/json",...t.principal?St(t.principal):{},...o.headers},m=t.state?{hidden:t.state.hidden??[],removed:t.state.removed??[],may:t.state.may??dt.may}:dt,d=new Set,w=v=>{if(JSON.stringify(v)!==JSON.stringify(m)){m=v;for(let T of d)T()}},h=async(v,T)=>{let x=await r(`${s}${t.path??Zr}`,{method:v,headers:l,...T!==void 0?{body:JSON.stringify(T)}:{}}),B=await x.json();if(!x.ok)throw new Error(B.error??`The store answered ${x.status}.`);w({hidden:B.hidden??[],removed:B.removed??[],may:B.may??dt.may})},E=()=>h("GET"),L=t.state?Promise.resolve():E().catch(()=>{}),_=t.pollMs?setInterval(()=>void E().catch(()=>{}),t.pollMs):void 0;return{ready:L,refresh:E,close:()=>clearInterval(_),current:()=>m,onChange(v){return d.add(v),()=>void d.delete(v)},hide:v=>h("POST",{hide:v}),show:v=>h("POST",{show:v}),remove:(v,T)=>h("POST",{remove:v,...T?{about:T}:{}}),async restore(v){let T=m.removed.find(x=>x.name===v)?.lens;await h("POST",{restore:v}),T&&await t.onDeclaration?.()},async lens(v){await h("POST",{lens:v}),await t.onDeclaration?.()}}}var sn=document.getElementById("graview-app"),an=/^\/forms\/([^/]+)\/?$/.exec(location.pathname),Xr=an?(__graviewPreload(import.meta.url,["./chunk.F5STM4DX.js","./chunk.YR7DKU5T.js","./chunk.XOZU4OFA.js","./chunk.CHG522KL.js","./chunk.SSHEFQ4R.js","./chunk.RIP2SAQ5.js","./chunk.ZGJUCVT5.js","./chunk.CVVNHQPO.js","./chunk.YIDNZTON.js","./chunk.QILGAV7H.js","./chunk.I6HIVTXU.js","./chunk.3HFBHLXC.js","./chunk.CUA7F3YJ.js","./chunk.SDO3U72B.js","./chunk.IUVRJDL3.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.RXUL6P7Y.js")):Ve("pages");try{an?await Qo(decodeURIComponent(an[1])):await Zo()}catch(t){let r=document.createElement("pre");r.setAttribute("role","alert"),r.style.cssText="margin:2rem;font:14px/1.5 ui-monospace,monospace;white-space:pre-wrap",r.textContent=t instanceof Error?t.message:String(t),sn.replaceChildren(r),window.__graviewFailed=r.textContent}async function Qo(t){let r=await fetch(`/graview/document?form=${encodeURIComponent(t)}`),o=await r.json();if(!r.ok)throw new Error(o.error??`The preview server did not hand over the form (${r.status}).`);let s=await pt(o);if(!s.ok)throw new Error(ct(s.findings));let l=s.app,m=o.principal,d=await bt({app:l,url:location.origin,principal:m,...o.state?{state:o.state,openTimeoutMs:0}:{openTimeoutMs:3e3}});document.title=l.forms?.[t]?.title??l.name;let{mount:w}=await Xr;window.__graview=w(sn,{app:l,form:t,principal:m,remote:d,height:"100dvh",onSubmitted:()=>window.__graviewSubmitted=!0}),window.__graviewReady=!0}async function Zo(){let t=await fetch("/graview/document");if(!t.ok)throw new Error(`The preview server did not hand over the document (${t.status}).`);let r=await t.json(),s=await(async h=>{if(typeof h.module=="string")return(await import(h.module)).app;let E=await pt(h);if(!E.ok)throw new Error(ct(E.findings));return E.app})(r);if(!s||typeof s!="object"||!("schema"in s))throw new Error("The app module the preview server handed does not export an app.");let l=r.principal,m=await bt({app:s,url:location.origin,principal:l,live:!0,subprotocol:!0,pollMs:1200,...r.state?{state:r.state,openTimeoutMs:0}:{openTimeoutMs:3e3}});document.title=s.name;let d,w=on({url:location.origin,principal:l,...r.views?{state:r.views}:{},onDeclaration:async()=>{let h=await(await fetch("/graview/document")).json();if(typeof h.module=="string")return;let E=await pt(h);E.ok&&d?.setApp(E.app,m)}});await Promise.all([Xr,w.ready]),d=en(sn,{app:s,remote:m,principal:l,studio:!1,face:"pages",routing:"address",bar:!0,height:"100dvh",label:s.name,heading:1,keptViews:w,...r.draftView?{draftView:r.draftView}:{}}),window.__graview=d,d.drawn().then(()=>{window.__graviewReady=!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 Wt,b as cr,c as lr,d as ur,e as fr,f as Dt,g as pr,h as jt}from"./chunk.G5AF5IXL.js";import{a as fo}from"./chunk.5WCSQFS5.js";import{a as mr,b as hr,c as Kt,d as yr,e as zt,f as wr,g as vr,h as br,i as Gt,j as Sr,k as Pr,l as Ar,m as Rr,n as kr,o as Er,p as Tr,q as xr,r as Fr,s as Or,t as Cr,u as Ye}from"./chunk.TBEKEHFS.js";import{b as gr}from"./chunk.LHCGC3K6.js";import{c as qt}from"./chunk.L3MLGFIS.js";import{a as Ot}from"./chunk.Q5WEOX3Q.js";import{b as Ct,i as Hn}from"./chunk.OYMN3IFX.js";import{n as ct}from"./chunk.N3MXLORL.js";import{D as _t,G as ar,L as ir,P as sr,Q as dr,k as Xn,n as er,o as tr,p as It,q as nr,s as rr,w as or}from"./chunk.RJ7VSWTA.js";import{c as uo}from"./chunk.P43LPXXJ.js";import{Ea as qn,Fa as Kn,G as $n,Ga as zn,Ha as Gn,Ia as Un,Ka as Jn,La as Yn,Na as Qn,Oa as $t,Ra as Zn,Ua as ft,Y as In,a as Nn,b as lt,c as ut,ca as _n,j as Vn,la as Wn,m as Vt,ma as Dn,oa as jn}from"./chunk.JCKIJSW7.js";import{a as Ne}from"./chunk.SDO3U72B.js";import{Be as Bt,Ce as Mt,De as Ht,Ge as Mn,Hc as Lt,He as Nt,Ib as st,Ic as En,Jb as An,Kd as Tn,Ld as xn,Td as Fn,Vd as On,Wd as Cn,Yb as Rn,Yd as dt,_b as kn,ue as Fe,ve as Ln,we as Bn,xb as Ke,zb as Pn}from"./chunk.6L6RUOSF.js";import"./chunk.FQLNBIQ5.js";import{b as qe}from"./chunk.AJZBJBMO.js";async function pt(t,r={}){let o=t.compiled===void 0||!mo(t.compiled,t.document)?void 0:Hn(t.compiled,r);if(o?.ok)return o;let{compileDocumentWithoutCheck:s}=await po();return s(t.document,r)}var Lr,po=()=>Lr??=(__graviewPreload(import.meta.url,["./chunk.4O64QV2Y.js","./chunk.OYMN3IFX.js","./chunk.FOHZPYUV.js","./chunk.W6L2VAJG.js","./chunk.N3MXLORL.js","./chunk.6L6RUOSF.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.JREA2XDG.js")).catch(t=>{throw Lr=void 0,t});function mo(t,r){let o=typeof t=="object"&&t!==null?t.document:void 0,s=r;if(typeof s=="string")try{s=JSON.parse(s)}catch{return!1}return o!==void 0&&Ot(Ct(o).document)===Ot(Ct(s).document)}var c=qe($n(),1);var ht=qe($n(),1),Ut="data-graview-drawn",ho=200,Br=50,yo=1e4,mt=()=>typeof performance<"u"?performance.now():Date.now();function go(t){let r=[...t.querySelectorAll("img")];for(let o of t.querySelectorAll("[data-worker-view]"))o.shadowRoot&&r.push(...o.shadowRoot.querySelectorAll("img"));return r}function wo(t,r){if(t.ownerDocument.fonts?.status==="loading"||qn()>0||Un(r)>0||t.querySelector('[aria-busy="true"]')||go(t).some(s=>!s.complete&&s.loading!=="lazy"))return!1;for(let s of t.querySelectorAll("[data-worker-view-place]"))if(!s.querySelector("[data-worker-view][data-worker-view-drawn], [data-worker-view][data-worker-view-failed]"))return!1;return!0}function Mr(t){let r=t.querySelector("[data-embed-content]"),o=[...t.querySelectorAll("[data-worker-view]")].map(s=>`${s.offsetWidth}x${s.offsetHeight}`);return`${t.scrollWidth}x${t.scrollHeight}|${r?`${r.scrollWidth}x${r.scrollHeight}`:""}|${o.join(",")}`}function vo(t,r,o,s){t.removeAttribute(Ut);let l=t.ownerDocument.defaultView;if(!l)return()=>{};let m=mt(),d=m,w=Mr(t),h=!1,E,L=typeof MutationObserver>"u"?void 0:new MutationObserver(x=>{x.some(B=>!(B.target===t&&B.attributeName===Ut))&&(d=mt())});L?.observe(t,{childList:!0,subtree:!0,characterData:!0,attributes:!0});let _=()=>{h=!0,L?.disconnect(),E!==void 0&&clearTimeout(E)},v=x=>{let B=!1,te=()=>{B||(B=!0,x())};typeof l.requestAnimationFrame=="function"&&l.requestAnimationFrame(()=>setTimeout(te,0)),setTimeout(te,100)},T=()=>{if(h)return;let x=Mr(t);x!==w&&(w=x,d=mt());let B=mt();if(wo(t,s)&&B-d>=ho||B-m>=yo){v(()=>{h||(_(),t.setAttribute(Ut,r),Yn(),o())});return}E=setTimeout(T,Br)};return E=setTimeout(T,Br),_}function Hr(t,r,o,s,l){Jn();let m=(0,ht.useRef)({place:o,onDrawn:s});m.current={place:o,onDrawn:s},(0,ht.useLayoutEffect)(()=>{l&&Gn(l);let d=E=>vo(E,m.current.place.path,()=>m.current.onDrawn?.(m.current.place),l);if(t.current)return d(t.current);let w,h=!1;return queueMicrotask(()=>{!h&&t.current&&(w=d(t.current))}),()=>{h=!0,w?.()}},[r,t,l])}var $r=qe(fo(),1);var C=qe(uo(),1);var g=qe(In(),1);function yt(t,r={}){let o=$t(t);return{Face:o.part((l,m)=>(0,c.createElement)(l,m),r),fetch:()=>o.load().then(()=>{}),here:()=>o.current!==void 0||o.failed}}var Qt=t=>Promise.all([t,sr()]).then(([r])=>r),Ir=Ne(()=>(__graviewPreload(import.meta.url,["./chunk.4HU2ILFY.js","./chunk.EPSYX2SF.js","./chunk.JLNTE5CH.js","./chunk.T6UJEXFL.js","./chunk.4QMAYVPU.js","./chunk.ZONRIOIA.js","./chunk.NXHEOHRR.js","./chunk.HJCQ6I3S.js","./chunk.DJGZOPAS.js","./chunk.GFOZVQBQ.js","./chunk.3RRK6UTN.js","./chunk.MWWNKM3I.js","./chunk.6A3KTD66.js","./chunk.U5P23GO7.js","./chunk.RO3D2RNP.js","./chunk.MEAUTBVM.js","./chunk.OKHXXIMN.js","./chunk.NH3VXTGX.js","./chunk.6IMRCKB4.js","./chunk.GFBE4VNT.js","./chunk.RDUGUC7R.js","./chunk.OPMGQS5J.js","./chunk.PQTXM4VY.js","./chunk.BIDL7GQD.js","./chunk.7KX36ENH.js","./chunk.QDDDKEBH.js","./chunk.QKRQPUCE.js","./chunk.TBEKEHFS.js","./chunk.LHCGC3K6.js","./chunk.Q5WEOX3Q.js","./chunk.4O64QV2Y.js","./chunk.OYMN3IFX.js","./chunk.UQZ2P6KD.js","./chunk.FOHZPYUV.js","./chunk.IXYG65TM.js","./chunk.W6L2VAJG.js","./chunk.N3MXLORL.js","./chunk.MIE4TJRW.js","./chunk.3CLTABGP.js","./chunk.RD2FSSLV.js","./chunk.CVN2XFMF.js","./chunk.6TBQV3NO.js","./chunk.MT252WP4.js","./chunk.VVIQSFM4.js","./chunk.TQ3MNB6K.js","./chunk.VGYG2IBZ.js","./chunk.RJ7VSWTA.js","./chunk.P43LPXXJ.js","./chunk.JCKIJSW7.js","./chunk.SDO3U72B.js","./chunk.6L6RUOSF.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.4YZ2A6SJ.js"))),bo=Ne(()=>(__graviewPreload(import.meta.url,["./chunk.6BBUTKFC.js","./chunk.Z22C2JJ4.js","./chunk.MKJV3BM5.js","./chunk.CEOQY5KS.js","./chunk.Q355UPFG.js","./chunk.4HU2ILFY.js","./chunk.WGH2P2YL.js","./chunk.EHLV3LND.js","./chunk.EPSYX2SF.js","./chunk.EOSN5DWW.js","./chunk.T6UJEXFL.js","./chunk.7THS3DLZ.js","./chunk.4QMAYVPU.js","./chunk.ARGEGV5T.js","./chunk.WS5ORRGS.js","./chunk.ZONRIOIA.js","./chunk.NXHEOHRR.js","./chunk.MB7LKKUD.js","./chunk.QJJWAYHB.js","./chunk.6A3KTD66.js","./chunk.MQNW3O67.js","./chunk.67S2UWBT.js","./chunk.7PWLRRUS.js","./chunk.OKHXXIMN.js","./chunk.NH3VXTGX.js","./chunk.6IMRCKB4.js","./chunk.7KX36ENH.js","./chunk.BJUUSIQY.js","./chunk.QDDDKEBH.js","./chunk.QKRQPUCE.js","./chunk.XOZU4OFA.js","./chunk.KBJ3UUER.js","./chunk.WVUJXDXZ.js","./chunk.NI4OPHTL.js","./chunk.U5KJQFAP.js","./chunk.FOHZPYUV.js","./chunk.IXYG65TM.js","./chunk.W6L2VAJG.js","./chunk.N3MXLORL.js","./chunk.MIE4TJRW.js","./chunk.3CLTABGP.js","./chunk.RD2FSSLV.js","./chunk.CVN2XFMF.js","./chunk.6TBQV3NO.js","./chunk.MT252WP4.js","./chunk.VVIQSFM4.js","./chunk.TQ3MNB6K.js","./chunk.VGYG2IBZ.js","./chunk.RJ7VSWTA.js","./chunk.P43LPXXJ.js","./chunk.JCKIJSW7.js","./chunk.SDO3U72B.js","./chunk.6L6RUOSF.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.EUXAIG73.js"))),So=Ne(()=>(__graviewPreload(import.meta.url,["./chunk.6BBUTKFC.js","./chunk.Z22C2JJ4.js","./chunk.MKJV3BM5.js","./chunk.CEOQY5KS.js","./chunk.Q355UPFG.js","./chunk.4HU2ILFY.js","./chunk.WGH2P2YL.js","./chunk.EHLV3LND.js","./chunk.EPSYX2SF.js","./chunk.EOSN5DWW.js","./chunk.T6UJEXFL.js","./chunk.7THS3DLZ.js","./chunk.4QMAYVPU.js","./chunk.ARGEGV5T.js","./chunk.WS5ORRGS.js","./chunk.ZONRIOIA.js","./chunk.NXHEOHRR.js","./chunk.MB7LKKUD.js","./chunk.QJJWAYHB.js","./chunk.6A3KTD66.js","./chunk.MQNW3O67.js","./chunk.67S2UWBT.js","./chunk.7PWLRRUS.js","./chunk.OKHXXIMN.js","./chunk.NH3VXTGX.js","./chunk.6IMRCKB4.js","./chunk.7KX36ENH.js","./chunk.BJUUSIQY.js","./chunk.QDDDKEBH.js","./chunk.QKRQPUCE.js","./chunk.XOZU4OFA.js","./chunk.KBJ3UUER.js","./chunk.WVUJXDXZ.js","./chunk.NI4OPHTL.js","./chunk.U5KJQFAP.js","./chunk.FOHZPYUV.js","./chunk.IXYG65TM.js","./chunk.W6L2VAJG.js","./chunk.N3MXLORL.js","./chunk.MIE4TJRW.js","./chunk.3CLTABGP.js","./chunk.RD2FSSLV.js","./chunk.CVN2XFMF.js","./chunk.6TBQV3NO.js","./chunk.MT252WP4.js","./chunk.VVIQSFM4.js","./chunk.TQ3MNB6K.js","./chunk.VGYG2IBZ.js","./chunk.RJ7VSWTA.js","./chunk.P43LPXXJ.js","./chunk.JCKIJSW7.js","./chunk.SDO3U72B.js","./chunk.6L6RUOSF.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.TUBY6SV3.js"))),_r=yt(()=>Qt(Ir().then(t=>t.SceneFace)),{what:"This view"}),Wr=yt(()=>Ir().then(t=>t.SceneKeeping),{quiet:!0}),Dr=yt(()=>Qt(bo().then(t=>t.PagesContent)),{what:"This page"}),jr=yt(()=>Qt(So().then(t=>t.PictureFace)),{what:"This picture"}),Po=_r.Face,Ao=Wr.Face,Ro=Dr.Face,ko=jr.Face;qt(Ne(()=>(__graviewPreload(import.meta.url,["./chunk.Q6GEPVQ7.js","./chunk.CEQQIW7Z.js","./chunk.Z2BCOZDZ.js","./chunk.WGH2P2YL.js","./chunk.GOVRX2YX.js","./chunk.TRP66PHK.js","./chunk.PGT4ZQDG.js","./chunk.UZKBFI52.js","./chunk.MFMC35ET.js","./chunk.GKYJQE5A.js","./chunk.EZQK23AB.js","./chunk.QDVGHI7R.js","./chunk.M5FP4Y4Q.js","./chunk.RSMCTI2N.js","./chunk.PQTXM4VY.js","./chunk.7KX36ENH.js","./chunk.UQZ2P6KD.js","./chunk.MT252WP4.js","./chunk.6L6RUOSF.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.KZUHXOZU.js"))));function Ve(...t){let r=t.length>0?t:["scene","pages","picture"],o=new Set(r.flatMap(qr));return Promise.all([...[...o].map(s=>s.fetch()),rr()]).then(()=>{},()=>{})}var qr=t=>t==="pages"?[Dr]:t==="picture"?[jr]:[_r,Wr],Kr=t=>qr(t).every(r=>r.here()),Eo=150,Jt=0;function Nr(t,r){if(Kr(t))return r();let o=++Jt,s=()=>{o===Jt&&(Jt+=1,r())};Ve(t).then(s),setTimeout(s,Eo)}var To=768;function xo(t,r){let o=r!==null&&r>=To;(0,c.useEffect)(()=>{if(!o||t==="picture")return;let s=t==="pages"?"scene":"pages";if(Kr(s))return;let l=globalThis,m=()=>void Ve(s),d=()=>{},w=Qn(()=>{if(l.requestIdleCallback&&l.cancelIdleCallback){let h=l.requestIdleCallback(m,{timeout:4e3});d=()=>l.cancelIdleCallback?.(h)}else{let h=setTimeout(m,1500);d=()=>clearTimeout(h)}});return()=>(w(),d())},[t,o])}function Fo({asked:t,shown:r,onDrawn:o}){return(0,c.useLayoutEffect)(()=>o(t,r),[t,r,o]),null}function Oo({auto:t,scene:r}){return(0,g.jsx)("div",{"data-embed-content":"","aria-busy":"true",style:{flex:t?r?`0 0 ${Gt}px`:"0 0 auto":"1 1 auto",minHeight:0,background:"var(--graview-ground)"}})}var Co=$t(Ne(()=>(__graviewPreload(import.meta.url,["./chunk.AJZBJBMO.js"]),import("./chunk.5JNXQHN4.js")))).part((t,r)=>(0,g.jsx)(t.StudioPlace,{...r}),{quiet:!0});function zr(t,r,o,s,l){return Dt(t,fr(r?ut(r):l??Nn,s),o)}function Zt(t){return t&&ut(t).overview?"graview":"scene"}function Vr(t,r){if(r.homeView?.()===void 0)return!1;let o=t.pages?.first?.trim();return o===void 0||o===""||o==="/"||o.toLowerCase()==="home"}function Gr(t){let[,r]=(0,c.useState)(!1),o=(0,c.useCallback)(()=>r(!0),[]),s=(0,c.useRef)(!1);return t.at&&!gt?(0,g.jsx)(Kt,{onReady:o,fetch:Xt}):!s.current&&hr(t.draftView)?(0,g.jsx)(Kt,{onReady:o,fetch:mr}):(s.current=!0,(0,g.jsx)(Lo,{...t}))}function Lo(t){let{app:r,stop:o,bar:s=!0,standing:l="Everything is in order",principal:m,heading:d=2}=t,{rootRef:w,scope:h,css:E,scheme:L,store:_,presence:v,brand:T,auto:x,height:B}=Sr(t),te=yr(t.draftView),k=vr(t,dr,te.over),[le]=(0,c.useState)(zn),u=t.basePath===void 0?{}:{basePath:t.basePath},[$]=(0,c.useState)(It),I=t.notices??$,z=p=>Bt(p,u),oe={...t.routing?{routing:t.routing}:{},...u},[ae]=(0,c.useState)(()=>{let p=t.at?.face;if(p)return p;let j=o===void 0&&Vr(r,k)?"pages":Zt(o),ve=Wt({...oe,face:j});return t.face===void 0&&t.onOpening?.(ve),ve}),[Se,O]=(0,c.useState)(()=>t.face!==void 0&&t.face!=="pages"&&!t.at&&o===void 0&&cr(oe)&&Vr(r,k)),Pe=(0,c.useRef)(t.onFace);Pe.current=t.onFace,(0,c.useLayoutEffect)(()=>{Se&&(Pe.current?.("pages"),O(!1))},[Se]);let R=Se?"pages":t.face??ae,b=r.schema.kinds,V=t.routing==="address",Ae=(0,c.useMemo)(()=>t.at?gt.settleAt(t,_.seenBy(m??{kind:"human"}),k.places()):void 0,[]),M=(0,c.useMemo)(()=>Dn(k,r.schema),[k,r.schema]),me=(0,c.useMemo)(()=>{let p=Ae?.stop??(V?lr(t.basePath):void 0)??o;return R==="scene"&&p===void 0&&M===void 0&&(t.path===void 0||Yt(t.path))?jt(void 0):zr(R,p,b,k.places(),M)},[]),[W]=(0,c.useState)(R);(0,c.useEffect)(()=>{W!=="pages"&&Wn(k)},[W,k]);let H=(0,c.useRef)(void 0),q=p=>p===void 0||Yt(p)?"/":p;H.current??={path:q(Ae?.path??(V?R==="pages"?(Mt(window.location.pathname,t.basePath)??"/")+window.location.search:"/":t.path)),asked:t.path},t.path!==H.current.asked&&(H.current={path:q(t.path),asked:t.path});let Z=(0,c.useRef)(t.onNavigate);Z.current=t.onNavigate;let Ce=(0,c.useCallback)((p,j)=>{H.current.path=p,Z.current?.(p,j)},[]),{at:he,setAt:D,steering:G,steer:ne}=Fr(H.current.path),N=(0,c.useContext)(Ur);N&&(N.pages=()=>H.current.path);let[$e]=(0,c.useState)(()=>({})),Y=N??$e,ie=(0,c.useMemo)(()=>er(I),[I]),K=(0,c.useRef)(void 0),Le=(0,c.useCallback)(p=>void(H.current.path=p),[]),U=Xn(w),[ue,Be]=(0,c.useState)(!1),Re=t.pagesBelow!==void 0&&U!==null&&U<t.pagesBelow&&(R==="scene"||R==="graview")&&!ue,S=Re?"pages":R,ye=(0,c.useRef)(!1);ye.current=ue&&t.pagesBelow!==void 0&&U!==null&&U<t.pagesBelow&&(R==="scene"||R==="graview"),N&&(N.shown=S);let ge=(0,c.useRef)(R==="graview"?"graview":"scene");(S==="scene"||S==="graview")&&(ge.current=S),(0,c.useState)(()=>{if(!V||typeof window>"u"||S==="pages"||S==="picture")return;let{pathname:p,search:j,hash:ve}=window.location;Mt(p,t.basePath)==="/"&&window.history.replaceState(window.history.state,"",`${z(Fe)}${j}${ve}`)}),br(w,S,t.onIntrinsicHeight),xo(S,U);let ke=Or(t.onError,S),fe=Cr(t.onReady,S),Me=(0,c.useRef)(t.onFaceDrawn);Me.current=t.onFaceDrawn;let He=(0,c.useCallback)((p,j)=>{fe(j),Me.current?.(p)},[fe]),[Ze,Ie]=(0,c.useState)(null),Xe=k.places(),_e=(0,c.useRef)({shown:S,onFace:t.onFace});_e.current={shown:S,onFace:t.onFace};let We=(0,c.useCallback)((p,j,ve)=>{if(V){K.current?.(p,j,ve);return}_e.current.onFace?.(p),Z.current?.(p==="pages"?j??H.current.path:Fe,"push")},[V]),[J,se]=(0,c.useState)(void 0);(0,c.useEffect)(()=>{S==="pages"&&se(void 0)},[S]);let Q=(0,c.useRef)(o);(0,c.useEffect)(()=>{Q.current!==o&&(Q.current=o,se(void 0))},[o]);let De=(0,c.useCallback)(p=>{if(_e.current.shown==="pages"){if(Be(!0),se(p),R==="scene"||R==="graview"){Nr(R,()=>{V?window.history.pushState(null,"",`${z(Fe)}${p??""}`):Z.current?.(Fe,"push")});return}Nr(ge.current,()=>We(ge.current,void 0,p))}},[V,R,t.basePath,We]),de=(0,c.useCallback)(p=>{if(_e.current.shown==="pages"){G.go.current||(H.current.path=p),ne(p);return}if(H.current.path=p,D(p),ye.current){Be(!1),V?window.history.pushState(null,"",z(p)):Z.current?.(p,"push");return}We("pages",p)},[G,ne,D,We,V,t.basePath]),et=k.arrangement?.(),Ee=S==="pages",we=t.hrefOf,Te=we??(V?z:void 0),Pt=(0,c.useMemo)(()=>({open:de,...we?{href:we}:V?{href:p=>Bt(p,t.basePath===void 0?{}:{basePath:t.basePath})}:{}}),[de,V,t.basePath,we]);return(0,g.jsxs)("section",{ref:w,className:h,"aria-label":t.label??r.name,"data-graview-embed":S,"data-graview-scheme":L,...Re?{"data-graview-embed-narrow":""}:{},style:{position:"relative",isolation:"isolate",height:B,minHeight:x?0:320,display:"flex",flexDirection:"column",overflow:"hidden",borderRadius:"var(--graview-radius, 12px)"},children:[(0,g.jsx)("style",{children:E}),(0,g.jsxs)(Zn.Provider,{value:ke,children:[(0,g.jsx)(Pr,{rootRef:w,board:I,onReport:t.onReport,where:()=>S==="pages"?Ar(he):S==="picture"?{place:"picture"}:tr(Y.view?.focusId)}),(0,g.jsx)(wr,{rootRef:w,firstLook:t.firstLook,app:ar(T??{name:r.name},r.schema)}),(0,g.jsx)(Ye,{module:"@graview/react",report:ke,content:!0,children:(0,g.jsx)(Kn.Provider,{value:le,children:(0,g.jsx)(_n,{store:_,views:k,initialView:me,scheme:L,...Rr(t,v,T),...t.onSeat?{onSeat:t.onSeat}:{},children:(0,g.jsxs)(nr.Provider,{value:ie,children:[(0,g.jsx)(No,{face:S,stop:J??o,kinds:b,places:Xe,opens:M}),(0,g.jsx)(Bo,{into:Y}),(0,g.jsx)(Mo,{rootRef:w,face:R,shown:S,path:he,stop:o,draft:te.n,onDrawn:t.onDrawn,parts:le}),V?(0,g.jsx)(ur,{pagesWere:Ae?.path,basePath:t.basePath,shown:S,onFace:t.onFace,toggle:K,kinds:b,places:Xe,opens:M,landed:Le}):null,s&&S!=="picture"?(0,g.jsx)(Ye,{module:"@graview/embed",report:ke,children:(0,g.jsx)(kr,{name:T?.name??r.name,heading:d,named:zt(s).name!==!1,faces:zt(s).faces===!1?void 0:{scene:{label:Ln(et),current:!Ee,go:()=>De(),reach:()=>void Ve(ge.current)},pages:{label:Bn(et),current:Ee,go:()=>de(H.current.path),reach:()=>void Ve("pages")}},at:Ee?he:null,without:t.pages?.without(),home:{...Te?.("/")!==void 0?{href:Te("/")}:{},go:()=>de("/"),current:Ee&&he.split("?")[0]==="/"},reach:{...Te?{href:Te}:{},go:p=>de(p.path)},standing:l,hostActions:t.hostActions,barActions:t.barActions,appMenu:t.appMenu,schemeChoice:t.schemeChoice,share:t.share,status:t.status,keeping:Ee?void 0:(0,g.jsx)(Vo,{app:r,studio:t.studio,report:ke}),onFind:Ie})}):null,(0,g.jsx)(or.Provider,{value:Ze,children:(0,g.jsx)(Ye,{module:S==="pages"||S==="picture"?"@graview/pages":"@graview/react",report:ke,content:!0,children:(0,g.jsxs)(c.Suspense,{fallback:(0,g.jsx)(Oo,{auto:x,scene:S!=="pages"&&S!=="picture"}),children:[S==="picture"?(0,g.jsx)(ko,{scope:h,store:_,views:k,as:(o?ut(o).within?.view:void 0)??""}):S==="pages"?(0,g.jsx)(Ro,{store:_,views:k,presence:v,auto:x,brand:T,steering:G,overview:De,scope:h,titleLevel:xr(d),quickAsk:_t(t.quickAsk),props:{...t,onNavigate:Ce,...V?{}:{path:H.current.path}}}):(0,g.jsx)(jn.Provider,{value:Pt,children:(0,g.jsx)(Po,{address:V,auto:x,scheme:L,scope:h,quickAsk:_t(t.quickAsk)})}),(0,g.jsx)(Fo,{asked:R,shown:S,onDrawn:He})]})},S)})]})})})})]})]})}var Yt=t=>t.split(/[?#]/)[0]===Fe,Ur=(0,c.createContext)(null);function Bo({into:t}){return t.view=ft().view,null}function Mo({rootRef:t,face:r,shown:o,path:s,stop:l,draft:m,onDrawn:d,parts:w}){let{view:h}=ft(),E=o==="scene"||o==="graview",L=lt(h),{pan:_,...v}=h,T=h.pan?lt(v):L,x={face:r,path:E?Fe:o==="picture"?l??"#":s,stop:L};return Hr(t,`${o} ${E?T:x.path} ${m}`,x,d,w),null}var gt,Ho=Ne(()=>(__graviewPreload(import.meta.url,["./chunk.G5AF5IXL.js","./chunk.RJ7VSWTA.js","./chunk.P43LPXXJ.js","./chunk.JCKIJSW7.js","./chunk.SDO3U72B.js","./chunk.6L6RUOSF.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.W3TJF4EH.js"))),Xt=()=>Ho().then(t=>void(gt=t),()=>new Promise(t=>{let r=()=>{window.removeEventListener("online",r),clearTimeout(o),t()},o=setTimeout(r,1e4);window.addEventListener("online",r)}).then(Xt));function No({face:t,stop:r,kinds:o,places:s,opens:l}){let{view:m,go:d}=ft(),w=(0,c.useRef)({face:t,stop:r});return(0,c.useLayoutEffect)(()=>{let h=w.current.stop!==r,E=w.current.face!==t,L=w.current.face==="pages";if(w.current={face:t,stop:r},!h&&!E||t==="pages"||t==="picture")return;let _=(h||L)&&r!==void 0?zr(t,r,o,s):L&&pr(m)?Dt(t,jt(l),o):t==="graview"?Vt(m,!0):m.overview?Vn(Vt(m,!1),ir(m,o)):m;d(_)},[t,r,o,m,d,l]),null}function Vo({app:t,studio:r,report:o}){return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(c.Suspense,{fallback:null,children:(0,g.jsx)(Ao,{})}),r!==!1?(0,g.jsx)(Ye,{module:"@graview/studio",report:o,children:(0,g.jsx)($o,{app:t,studio:r})}):null]})}function $o({app:t,studio:r}){let o={app:t,within:"box",...r?{onApply:r.onApply}:{},...r?.landmark?{landmark:r.landmark}:{},...r?.offered!==void 0?{offered:r.offered}:{}},s=r?.place;return s?(0,g.jsx)(s,{...o}):(0,g.jsx)(c.Suspense,{fallback:null,children:(0,g.jsx)(Co,{...o})})}function Io({path:t,stop:r,...o},s){return{...o,app:s.app,at:s.at,remote:s.remote,...s.remote.presence?{presence:s.remote.presence}:{}}}function en(t,r){let o=r.store??r.remote?.store??gr(r.app,r.seed),s=r.notices??It(),l=null,m={},d=0,w=r.label,h=r.app,E=Promise.resolve(),L=r.at?.face??r.face,_=L===void 0?void 0:Wt({...r,face:L}),v=_??Zt(r.stop),T=null,x=[],B=u=>{if(T=u,u!==v)return;let $=x;x=[];for(let I of $)I()};function te(){let[u,$]=(0,c.useState)(_),[I,z]=(0,c.useState)(r.stop),[oe,ae]=(0,c.useState)(r.path),[Se,O]=(0,c.useState)(r.scheme??"auto"),[Pe,R]=(0,c.useState)(r.principal),[b,V]=(0,c.useState)(r.seats),[Ae,M]=(0,c.useState)(r.quickAsk),[me,W]=(0,c.useState)(r.people),[H,q]=(0,c.useState)(r.hostContext),[Z,Ce]=(0,c.useState)(r.brand),[he,D]=(0,c.useState)(r.whileAway),[G,ne]=(0,c.useState)(r.label),[N,$e]=(0,c.useState)(r.hostActions),[Y,ie]=(0,c.useState)(r.barActions),[K,Le]=(0,c.useState)(()=>Er(r)),[U,ue]=(0,c.useState)(void 0),[Be,Re]=(0,c.useState)(r.draftView);return l={app:S=>{ue(S),ae(void 0),z(void 0)},face:$,stop:z,path:ae,scheme:O,seat:R,seats:V,quickAsk:M,people:W,hostContext:q,brand:Ce,whileAway:D,label:ne,hostActions:$e,barActions:ie,hostBar:S=>Le(ye=>({...ye,...S})),draft:Re},(0,g.jsx)(Ur.Provider,{value:m,children:(0,g.jsx)(Gr,{...U?Io(r,U):r,store:o,notices:s,...u!==void 0?{face:u}:{},onOpening:S=>{v=S},...I!==void 0?{stop:I}:{},...oe!==void 0?{path:oe}:{},...Pe?{principal:Pe}:{},...b?{seats:b}:{},...Ae!==void 0?{quickAsk:Ae}:{},...me?{people:me}:{},...H?{hostContext:H}:{},...Z?{brand:Z}:{},whileAway:he,label:G,hostActions:N,barActions:Y,...Tr(K),draftView:Be,scheme:Se,onFace:S=>{v=S,$(S)},onSeat:R,onFaceDrawn:B},U?.n??0)})}let k=()=>{let u=m.view?.focusId,$=u?o.graph.getNode(u)?.kind:void 0,I=(m.shown??v)==="scene"||(m.shown??v)==="graview";return{face:v,path:I?Fe:m.pages?.()??r.path??"/",stop:m.view?lt(m.view):r.stop??"#",...$?{kind:$}:{}}},le=(0,$r.createRoot)(t);return(0,C.flushSync)(()=>le.render((0,g.jsx)(te,{}))),{get store(){return o},where:k,setApp:(u,$,I)=>{let z="graph"in $?{store:$}:$,oe=()=>{let ae=k();o=z.store,w=I?.label??(w===h.name?u.name:w),h=u,(0,C.flushSync)(()=>{l?.label(w),l?.app({app:u,remote:z,at:ae,n:++d})})};gt?oe():E=E.then(Xt).then(oe)},setFace:u=>{v=u,(0,C.flushSync)(()=>l?.face(u))},setStop:u=>(0,C.flushSync)(()=>l?.stop(u)),setPath:u=>(0,C.flushSync)(()=>{if(Yt(u)){(v==="pages"||v==="picture")&&(v="scene",l?.face("scene"));return}l?.path(u),v!=="pages"&&(v="pages",l?.face("pages"))}),setScheme:u=>(0,C.flushSync)(()=>l?.scheme(u)),setSeat:u=>(0,C.flushSync)(()=>l?.seat(u)),setSeats:u=>(0,C.flushSync)(()=>l?.seats(u)),setQuickAsk:u=>(0,C.flushSync)(()=>l?.quickAsk(u)),setPeople:u=>(0,C.flushSync)(()=>l?.people(u)),setHostContext:u=>(0,C.flushSync)(()=>l?.hostContext(u)),setBrand:u=>(0,C.flushSync)(()=>l?.brand(u)),setWhileAway:u=>(0,C.flushSync)(()=>l?.whileAway(u)),setDraftView:u=>(0,C.flushSync)(()=>l?.draft(u)),setLabel:u=>{w=u,(0,C.flushSync)(()=>l?.label(u))},setHostActions:u=>(0,C.flushSync)(()=>l?.hostActions(u)),setBarActions:u=>(0,C.flushSync)(()=>l?.barActions(u)),setAppMenu:u=>(0,C.flushSync)(()=>l?.hostBar({appMenu:u})),setShare:u=>(0,C.flushSync)(()=>l?.hostBar({share:u})),setStatus:u=>(0,C.flushSync)(()=>l?.hostBar({status:u})),setSchemeChoice:u=>(0,C.flushSync)(()=>l?.hostBar({schemeChoice:u})),setNotifications:u=>(0,C.flushSync)(()=>l?.hostBar({notifications:u})),drawn:()=>E.then(()=>T===v?void 0:new Promise(u=>x.push(u))),notify:u=>{let $;return(0,C.flushSync)(()=>{$=s.notify(u)}),$},unmount:()=>le.unmount()}}var wt=t=>`s${(t+1).toString(36)}`;var ee={seat:"x-graview-seat",roles:"x-graview-roles",kind:"x-graview-kind",name:"x-graview-name",for:"x-graview-for",forRoles:"x-graview-for-roles",forName:"x-graview-for-name",profile:"x-graview-profile",profileName:"x-graview-profile-name",forProfile:"x-graview-for-profile",forProfileName:"x-graview-for-profile-name",via:"x-graview-via"},ze={header:"x-graview-key",param:"graview_key",cookie:"graview_key"};function vt(t,r={}){try{let o=new URL(t),s=o.searchParams.get(ze.param);if(s)return o.searchParams.delete(ze.param),{url:o.origin+o.pathname.replace(/\/$/,"")+o.search,key:s,headers:{[ze.header]:s,...r}}}catch{}return{url:t.replace(/\/$/,""),headers:r}}var Jr="/graview/friction";var Yr="/graview/live",tn="graview.ship",nn=`${tn}.${st}`;var Ge=class extends Error{constructor(r){super(r),this.name="Superseded"}},Oe=t=>t?.lineage?{lineage:t.lineage}:{},_o=(t,r)=>`${t.calls.map(o=>o.name.replace(/-/g," ")).join(", ")} (${r instanceof Error?r.message.split(`
|
|
2
|
+
`)[0]??"":String(r)})`;function Wo(t){if(!t)return[];try{let r=t.storage.getItem(t.key);if(r===null)return[];t.storage.removeItem(t.key);let o=JSON.parse(r);return Array.isArray(o)?o.filter(s=>!!s&&Array.isArray(s.calls)):[]}catch{return[]}}var Ue=class extends Error{constructor(o){super(o.sentence);this.refusal=o;this.name="RemoteRefusedError"}},Do={401:"forbidden",403:"forbidden",404:"missing",413:"limit"},pe=class extends Error{constructor(o,s){super(o);this.conflicts=s;this.name="StaleWrite"}},Qe=class extends Error{constructor(r){super(r),this.name="Unreached"}},jo=new Set([502,503,504]);async function qo(t){try{return(await t.clone().json()).reason==="unavailable"}catch{return!1}}function Ko(){let t=Math.random().toString(36).slice(2,8),r=0;return()=>`local-${t}-${++r}`}var zo=1,Go=()=>({refusals:new Set,conflicts:new Set,statuses:new Set,helds:new Set,builds:new Set,who:new Set,declarations:new Set,tally:{reconnects:0,rebases:0,conflicts:0,resyncs:0}});async function bt(t){return(await Qr(t,Wo(t.carry),"This app was updated while your changes were on the way.",Go())).remote}async function Qr(t,r,o,s){let{key:l,...m}=vt(t.url,t.headers),d={...t,...m},w=d.fetch??fetch,h={"content-type":"application/json",...d.headers??{}},E={...St(d.principal),[ee.via]:d.via??"web"};Object.assign(h,E);let L=d.live===!0,_=d.presenceEveryMs,v=d.visible??Yo,T="connecting",x=s.statuses,B=s.tally,te=[],k,le=[],u=()=>T==="online"&&k!==void 0?"held":T,$=()=>{let e=u();if(s.told!==e){s.told=e;for(let n of[...x])n(e)}},I=e=>{if(!(e===T||ce)&&(T==="offline"&&e==="online"&&B.reconnects++,T=e,$(),e==="online"))for(let n of te.splice(0))n.again()},z=e=>{if(ce)return;let n=typeof e=="string"&&e.length>0?e:void 0,i=n!==k;if(k=n,oe(),!!i&&($(),n===void 0)){for(let a of le.splice(0))a();X&&clearTimeout(X),dn()}},oe=()=>{if(s.toldHeld!==k){s.toldHeld=k;for(let e of[...s.helds])e(k??null)}},ae=async(e,n)=>{let i;try{i=await w(e,n)}catch(a){throw p()||I("offline"),new Qe(a instanceof Error?a.message:String(a))}if(i.status===503&&await qo(i))return I("online"),i;if(jo.has(i.status))throw p()||I("offline"),new Qe(`The server is away (${i.status})`);return I("online"),i},Se=async(e=!1)=>{let n=`${d.url}/graview/state?opFormat=${Ke.op}`,i=e?await w(n,{headers:h}):await ae(n,{headers:h});if(!i.ok)throw new Error((await i.json().catch(()=>({}))).error??`The server refused (${i.status})`);return await i.json()},O=d.state??await Se(!0);L||(T="online"),k=typeof O.held=="string"&&O.held.length>0?O.held:void 0,oe();let Pe=O.enabledModules??d.enabledModules,R=d.localApp?d.localApp(d.app):d.app,b=new Cn({schema:R.schema,mutations:R.mutations??[],invariants:R.invariants??[],...R.policy?{policy:R.policy}:{},...R.publishing?{publishing:R.publishing}:{},...R.tidying?{tidying:R.tidying}:{},...R.modules?{modules:R.modules}:{},...Pe?{enabledModules:Pe}:{},...R.intelligence?{intelligence:R.intelligence}:{},...R.brand?.timeZone?{timeZone:R.brand.timeZone}:{},snapshot:O.snapshot,log:O.log,...O.horizon!==void 0?{horizon:O.horizon}:{},ids:Ko(),...d.storeOptions??{}});kn.served.add(b);let V=d.friction!==!1&&d.principal?.kind!=="visitor";V&&Tn(b,e=>{V&&w(`${d.url}${Jr}`,{method:"POST",headers:h,body:JSON.stringify({event:e})}).then(n=>void(V=n.status!==404&&n.status!==410),()=>{})});let Ae=Fn(b),M=O.log.at(-1)?.seq??(O.horizon??0)-1,me=Lt.of(O.log,{horizon:O.horizon??0}),W=null,H,q=new Map,Z=s.who,Ce=!1,he=e=>{if(ce)return;Ce=!0;let n=Mn(new Map,e,Date.now(),Ht,W?.participant);H!==void 0&&n.delete(H);let i=n.size!==q.size;if(!i)for(let[a,f]of n)Nt(f,q.get(a))||(i=!0);if(q=n,!!i)for(let a of[...Z])a([...q.values()])},D=[],G=new Set,ne=e=>{let n=D.indexOf(e);n>=0&&D.splice(n,1)},N=new Map,$e=(e,n)=>{let i=N.get(e);i&&(N.delete(e),i.resolve({ops:n.filter(a=>a.batch===e),batch:e}))},Y,ie=[],K=(e,n=[])=>{if(e.length===0&&n.length===0)return[];if(Y)return ie.push({ops:e,drop:n}),[];let i=Math.min(...e.filter(P=>P.seq>M).map(P=>P.seq));if(Number.isFinite(i)&&i>M+1)return ie.push({ops:e,drop:n}),U(),[];let a=D.filter(P=>e.some(re=>re.batch===P)),f=[...new Set([...n,...a])].filter(P=>G.has(P)),y,A=D.filter(P=>!a.includes(P));try{y=b.rebase({confirmed:e,pending:A,drop:f}).confirmed}catch(P){if(!(P instanceof On))throw P;return ie.push({ops:e,drop:n}),U(),[]}for(let P of a)ne(P);e.some(P=>P.seq>M)&&A.some(P=>!f.includes(P))&&B.rebases++,e.length>0&&(M=Math.max(M,...e.map(P=>P.seq)),me.note(e));for(let P of f)G.delete(P);for(let P of a)$e(P,e);return e.some(P=>P.lineage?.liftedStop===!0||P.undoes!==void 0&&(b.log.get(P.undoes)?.lineage?.stopsKind===!0||b.log.get(P.undoes)===void 0&&(b.stopsServed?.stops.length??0)>0))&&U(),y},Le=e=>{let n=e.stops??[],i=e.stoppedKinds??[];n.length===0&&i.length===0&&!b.stopsServed||(b.stopsServed=n.length>0||i.length>0?{stops:n,kinds:i}:void 0,b.notify(Pn,[]))};(O.stops||O.stoppedKinds)&&(b.stopsServed={stops:O.stops??[],kinds:O.stoppedKinds??[]});let U=()=>{Y||(Y=He(Se().then(e=>{if(ue(e)){ie=[];return}Le(e);let n=new Set(e.log.map(f=>f.batch)),i=D.filter(f=>n.has(f));for(let f of i)ne(f);let a=b.adopt({snapshot:e.snapshot,log:e.log,...e.horizon!==void 0?{horizon:e.horizon}:{},pending:[...D],drop:[...G].filter(f=>!D.includes(f))});G.clear();for(let f of a.pending)G.add(f.batch);M=e.log.at(-1)?.seq??(e.horizon??0)-1,me=Lt.of(e.log,{horizon:e.horizon??0}),B.resyncs++;for(let f of i)$e(f,e.log)}).then(()=>{Y=void 0;let e=ie;ie=[];for(let{ops:n,drop:i}of e)K(n,i)},()=>{Y=void 0,ie=[]})))},ue=e=>(typeof e.build=="string"&&ln(e.build),typeof e.version=="number"&&z(e.held),typeof e.version!="number"||e.version===O.version?!1:(kt(e.version),!0)),Be=async e=>{let i=await(await ae(`${d.url}/graview/since?seq=${wt(e)}&opFormat=${Ke.op}`,{headers:h})).json();return ue(i)?[]:((i.ops?.length??0)>0&&Le(i),i.reset===!0?(U(),[]):i.ops??[])},Re=async()=>{let e=await S();return Y&&await Y,e},S=async()=>{if(W&&!p()&&v()){let n=await(await ae(`${d.url}/graview/here?opFormat=${Ke.op}`,{method:"POST",headers:h,body:JSON.stringify({presence:W,seq:wt(M)})})).json();return ue(n)?[]:(typeof n.participant=="string"&&(H=n.participant),he(n.who??[]),K(n.ops??[]))}return K(await Be(M))},ye=new Map,ge=new Map,ke=new Set,fe=new Map,Me=new Set,He=e=>(Me.add(e),e.finally(()=>Me.delete(e)).catch(()=>{}),e),Ze=Promise.resolve(),Ie=0,Xe=(e,n)=>{let i=Ze.then(()=>We(e,n));return Ze=i.catch(()=>{}),i},_e=()=>new Promise((e,n)=>te.push({again:e,give:n})),We=async(e,n)=>{let i,a;for(;;){try{i=await ae(`${d.url}/graview/ops`,{method:"POST",headers:h,body:JSON.stringify({...e,opFormat:Ke.op})})}catch(F){if(!(F instanceof Qe)||Q)throw F;if(await _e(),p())return tt(e,n);continue}if(a=await i.json().catch(()=>({})),i.status===503&&a.reason==="unavailable"&&typeof a.held=="string"&&!Q){if(typeof a.version=="number"?ue(a):(z(a.held),!1))break;if(k!==void 0&&(Ft>0||L)){if(await new Promise(F=>le.push(F)),Q)throw new Ge("The client closed.");if(p())return tt(e,n);continue}}let A;if(i.status===503&&a.reason==="unavailable"&&!Q)A=rn(d.backoff,Ie++);else{if(Ie=0,i.status!==429||Q)break;A=Uo(i.headers.get("retry-after"),a.retryAfter)}if(await new Promise(F=>setTimeout(F,A)),p())return tt(e,n)}if(ce||ue(a))throw new Ge("The app was changed.");if(!i.ok){let A=a.error??`The server refused (${i.status})`;throw a.conflict?new pe(A,a.conflicts??[]):new Ue({reason:a.reason??Do[i.status]??"invalid",sentence:A,...a.wouldNeed?.length?{wouldNeed:a.wouldNeed}:{}})}let f=a.ops??[],y=f[0]?.seq;return y!==void 0&&y>M+1&&(f=await Be(M)),n!==void 0&&(a.batch&&ye.set(n,a.batch),ne(n)),K(f,n!==void 0?[n]:[]),{ops:a.ops??[],...a.batch?{batch:a.batch}:{}}},J,se=!1,Q=!1,De=0,de,et=0,Ee=0,we=null,Te=()=>{},Pt=new Promise(e=>{Te=e}),p=()=>L&&se&&J?.readyState===zo,j=e=>{if(!p())return!1;try{return J.send(JSON.stringify(e)),!0}catch{return!1}},ve=(e=!1)=>{!W||!p()||!v()||!e&&we&&Nt(W,we)&&(_===void 0||Date.now()-Ee<_)||j({t:"here",presence:W})&&(we=W,Ee=Date.now())},xe=new Set,X,dn=()=>{if(X=void 0,k!==void 0)return;let e=[...N.entries()].filter(([n])=>xe.has(n));xe.clear();for(let[,n]of e)j(n.message)},cn=(e,n)=>{N.has(e)&&(xe.add(e),X&&clearTimeout(X),X=setTimeout(dn,Math.max(0,n)))},eo=e=>{N.has(e)&&xe.add(e)},tt=(e,n)=>new Promise((i,a)=>{let f=n??`send-${++et}`,y=e.undo?{t:"undo",cid:f,batches:e.undo,...e.intent?{intent:e.intent}:{},...e.batch?{batch:e.batch}:{},...e.via?{via:e.via}:{},...Oe(e)}:{t:"call",cid:f,calls:e.calls??[],...e.intent?{intent:e.intent}:{},...e.batch?{batch:e.batch}:{},...e.base?.length?{base:e.base}:{},...e.via?{via:e.via}:{},...Oe(e)};if(N.set(f,{message:y,...n!==void 0?{mine:n}:{},resolve:i,reject:a}),xe.size>0||k!==void 0){xe.add(f);return}j(y)}),nt=(e,n)=>p()?tt(e,n):Xe(e,n),to=e=>{switch(e.t){case"welcome":{if(Le(e),ln(e.build),typeof e.version=="number"&&e.version!==O.version){kt(e.version);return}if(se=!0,De=0,typeof e.participant=="string"&&(H=e.participant),z(e.held),e.state?U():K(e.ops??[]),xe.clear(),X&&clearTimeout(X),X=void 0,k!==void 0)for(let n of N.keys())xe.add(n);else for(let n of N.values())j(n.message);ve(!0),I("online"),Te();return}case"ops":K(e.ops??[]);return;case"ack":{let n=N.get(e.cid);if(!n){K(e.ops??[]);return}N.delete(e.cid),Ie=0,n.mine!==void 0&&(ye.set(n.mine,e.batch),ne(n.mine)),K(e.ops??[],n.mine!==void 0?[n.mine]:[]),n.resolve({ops:e.ops??[],batch:e.batch});return}case"refused":case"conflict":{let n=N.get(e.cid);if(!n)return;if(e.t==="refused"&&e.reason==="unavailable"){k!==void 0?eo(e.cid):cn(e.cid,rn(d.backoff,Ie++));return}N.delete(e.cid),n.reject(e.t==="conflict"?new pe(e.sentence,e.conflicts??[]):new Ue({reason:e.reason??"invalid",sentence:e.sentence,...e.wouldNeed?.length?{wouldNeed:[...e.wouldNeed]}:{}}));return}case"busy":typeof e.cid=="string"&&cn(e.cid,typeof e.retryAfter=="number"?e.retryAfter:1e3);return;case"presence":he(e.who??[]);return;case"held":z(e.sentence);return;case"declaration":typeof e.version=="number"&&e.version!==O.version&&kt(e.version);return;case"reload":mn(typeof e.reason=="string"?e.reason:"This app was updated.");return;case"error":if(e.reopen===!0&&J){let n=J;yn(n);try{n.close(1e3,"Opening again.")}catch{}}return;default:return}},ce=!1,At=s.declarations,Rt=s.builds,ln=e=>{if(!(ce||s.otherBuild!==void 0||!d.build||typeof e!="string"||e.length===0||e===d.build)){s.otherBuild=e;for(let n of[...Rt])n(e)}},un=()=>{let e=[],n=0;for(let i of D){let a=fe.get(i);a?e.push({calls:a.calls,...a.intent?{intent:a.intent}:{},...a.via?{via:a.via}:{},...Oe(a),batch:i}):n++}return{carried:e,undos:n}},fn=(e,n)=>`${n} while ${e===1?"an undo of yours was":"undos of yours were"} on the way; ${e===1?"it was":"they were"} not made.`,pn=e=>{ce=!0,W=null;let n=new Ge(e);for(let a of N.values())a.reject(n);N.clear(),at&&clearInterval(at),Q=!0,de&&clearTimeout(de),X&&clearTimeout(X),be&&clearTimeout(be);for(let a of te.splice(0))a.give(n);for(let a of le.splice(0))a();let i=J;J=void 0,se=!1;try{i?.close(1e3,e)}catch{}Te()};async function kt(e){if(ce)return;if(!d.resolveApp){mn(`This app was changed on its server (version ${e}); reload the page to carry on.`);return}let{carried:n,undos:i}=un(),a=d.resolveApp,f=W;pn("The app was changed.");try{let y=await a(e),{state:A,...F}=d,P=await Qr({...F,app:y},n,"The app was changed while your changes were on the way.",s);f&&P.remote.presence.here(f);for(let it of[...At])it(P.remote,e);let re=[...i>0?[rt(fn(i,"The app was changed"))]:[],...P.unheard()];for(let it of re)for(let lo of je)lo(it.sentence,it)}catch(y){let A=`The app was changed, but the new version could not be opened: ${y instanceof Error?y.message:String(y)}`;for(let F of je)F(A,rt(A))}}function mn(e){if(ce)return;let{carried:n,undos:i}=un();pn(e);let a=!1;if(d.carry&&n.length>0)try{d.carry.storage.setItem(d.carry.key,JSON.stringify(n)),a=!0}catch{}let f=[];!a&&n.length>0&&f.push(`${e} ${n.length===1?"A change of yours was":`${n.length} changes of yours were`} not sent; make ${n.length===1?"it":"them"} again after the page reloads.`),i>0&&f.push(fn(i,"This app was updated"));for(let y of f)for(let A of je)A(y,rt(y));(d.reloadPage??Jo)()}let hn=()=>{if(Q||!L)return;let e=`${d.url.replace(/^http/,"ws").replace(/\/$/,"")}${Yr}`,{"content-type":n,...i}=h,a;try{a=d.socket?d.socket(e,i,[nn]):co(e,i)}catch{return gn()}J=a,se=!1,a.onopen=()=>{J===a&&a.send(JSON.stringify({t:"hello",seq:wt(M),protocol:st,wire:tn,opFormat:Ke.op,...d.build?{build:d.build.slice(0,64)}:{},...d.hostProtocol!==void 0?{hostProtocol:d.hostProtocol}:{}}))},a.onmessage=f=>{if(J!==a)return;let y;try{y=JSON.parse(String(f.data))}catch{return}to(y)},a.onclose=()=>yn(a),a.onerror=()=>{}},be,no=()=>{Ce=!1,be&&clearTimeout(be),be=setTimeout(()=>{if(be=void 0,Ce||Q)return;let e=new Map([...q].filter(([,n])=>n.held!=="socket"));if(e.size!==q.size){q=e;for(let n of Z)n([...q.values()])}},Ht),be.unref?.()};function yn(e){if(J!==e)return;let n=se;J=void 0,se=!1,we=null,n&&(I("offline"),no()),gn()}let gn=()=>{if(Q)return;let e=rn(d.backoff,De);De++,de=setTimeout(hn,e)},wn=b.applyAll.bind(b),ro=b.undo.bind(b),oo=b.previewAll.bind(b);b.previewAll=(e,n)=>oo(e,{...d.principal?{author:d.principal}:{},...n});let je=s.refusals,Je=[],rt=e=>({reason:"invalid",sentence:e}),ot=s.conflicts,Et=!1,vn,Tt=async(e,n)=>{if(n instanceof Ge||ce)return;let i=n instanceof Ue?n.refusal:Rn(n),a=i.sentence,f=n instanceof pe?vn?.yoursOf(b,fe.get(e)?.calls??[]):void 0;ne(e);try{K([],[e])}catch{}let y=fe.get(e);fe.delete(e);let A=y?.calls[0];if(A&&!(n instanceof pe)){let F=b.allMutations().find(re=>re.name===A.name)?.subject?.arg,P=F&&b.graph.getNode(A.args[F])?.kind;xn(b,{type:"refused",act:A.name,code:i.reason,...P?{kind:P}:{}},d.principal)}if(n instanceof pe&&B.conflicts++,n instanceof pe&&!p()&&await Re().catch(()=>[]),n instanceof pe&&Y&&await Y,n instanceof pe&&ot.size>0){let F=!1,P={sentence:a,conflicts:f?n.conflicts.map(re=>re.node===f.node&&re.field===f.field?{...re,yours:f.yours}:re):n.conflicts,keepTheirs(){F=!0},useMine(){if(!(F||!y)){F=!0,Et=!0;try{b.applyAll(f?[f.over(M)]:y.calls,{...y.intent?{intent:y.intent}:{},...y.via?{via:y.via}:{},...Oe(y)})}finally{Et=!1}}}};for(let re of ot)re(P);return}for(let F of je)F(a,i)},ao=(e,n)=>e.flatMap(i=>i.mutation?.name===An?[]:i.primitives.flatMap(a=>a.op==="splice-text"&&!n.has(a.id)&&!n.has(`${a.id}\0${a.field}`)?[{node:a.id,field:a.field,rev:M}]:[]));b.applyAll=(e,n)=>{let i=En(b.log.all().filter(A=>G.has(A.batch))),a=wn(e,{...d.principal?{author:d.principal}:{},...n}),f=e.map((A,F)=>{let P=a.minted?.[F];return P===void 0||A.args?.id!==void 0?A:{...A,mintedHint:P}});D.push(a.batch),G.add(a.batch),fe.set(a.batch,{calls:f,...n?.intent?{intent:n.intent}:{},...n?.via?{via:n.via}:{},...Oe(n)});let y=Et?[]:[...me.baseFor(a.ops,i,(A,F)=>b.collaborative(A,F)),...ao(a.ops,i)];return ge.set(a.batch,He(nt({calls:f,...n?.intent?{intent:n.intent}:{},batch:a.batch,...y.length>0?{base:y}:{},...n?.via?{via:n.via}:{},...Oe(n)},a.batch).catch(A=>Tt(a.batch,A)))),a},b.apply=(e,n)=>b.applyAll([e],n),b.undo=(e,n)=>{let i=typeof e=="string"?[e]:e,a=ro(i.map(y=>ye.get(y)??y),{...d.principal?{author:d.principal}:{},...n});D.push(a.batch),G.add(a.batch);let f=Promise.allSettled(i.map(y=>ge.get(y)));return ge.set(a.batch,He(f.then(()=>{let y=i.filter(A=>!ke.has(A));if(y.length===0){ne(a.batch),fe.delete(a.batch),K([],[a.batch]);return}return nt({undo:y.map(A=>ye.get(A)??A),...n?.intent?{intent:n.intent}:{},batch:a.batch,...n?.via?{via:n.via}:{},...Oe(n)},a.batch)}).catch(y=>Tt(a.batch,y)))),a};let io=async(e,n={})=>{xt++;try{return(await He(nt({calls:e,...n}))).ops}finally{xt--}},xt=0,bn={here(e){W=e,ve()},onWho(e){return Z.add(e),q.size>0&&e([...q.values()]),()=>{Z.delete(e)}},leave(){if(!W)return;let e=JSON.stringify({participant:H??W.participant});if(W=null,j({t:"bye"}))return;let n=globalThis.navigator?.sendBeacon;n?n.call(globalThis.navigator,`${d.url}/graview/leave${l!==void 0?`?${ze.param}=${encodeURIComponent(l)}`:""}`,e):w(`${d.url}/graview/leave`,{method:"POST",headers:h,body:e}).catch(()=>{})}},Ft=d.pollMs??800,at=Ft>0&&typeof setInterval=="function"?setInterval(()=>{p()||Re().catch(()=>{})},Ft):null;if(L){hn();let e;await Promise.race([Pt,new Promise(n=>e=setTimeout(n,d.openTimeoutMs??3e3))]),clearTimeout(e)}if(r.length>0&&!ce){let e=[],n=new Set(b.log.all().map(i=>i.batch));for(let i of r)if(!(i.batch!==void 0&&n.has(i.batch)))try{b.applyAll(i.calls,{...i.intent?{intent:i.intent}:{},...i.batch?{batch:i.batch}:{},...i.via?{via:i.via}:{},...Oe(i)})}catch(a){e.push(_o(i,a))}e.length>0&&Je.push(rt(`${o} ${e.length===1?"One no longer fits and was not made":`${e.length} no longer fit and were not made`}: ${e.join("; ")}.`))}let Sn=new Map,so=()=>({store:b,author:d.principal,appliedAll:wn,pending:D,provisional:G,asked:fe,answers:ge,letGo:ke,sent:(e,n)=>He(nt({calls:n,batch:e},e).catch(i=>Tt(e,i))),settle:ne,land:K,seen:()=>M,gone:()=>Q||ce});return{remote:{store:b,typing(e,n){let i=`${e}\0${n}`,a=Sn.get(i);return a||(a=(__graviewPreload(import.meta.url,["./chunk.OPMGQS5J.js","./chunk.6L6RUOSF.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.RHIP2UYE.js")).then(f=>(vn=f,f.typingOf(e,n,f.wireOf(so())))),Sn.set(i,a)),a},version:O.version,migrated:O.migrated??[],send:io,pull:Re,onRefusal(e){je.add(e);let n=Je;Je=[];for(let i of n)e(i.sentence,i);return()=>je.delete(e)},onDeclaration(e){return At.add(e),()=>At.delete(e)},onBuild(e){return Rt.add(e),s.otherBuild!==void 0&&e(s.otherBuild),()=>Rt.delete(e)},onConflict(e){return ot.add(e),()=>ot.delete(e)},revision:(e,n)=>me.of(e,n),seq:()=>M,participant:()=>H,transport:()=>p()?"socket":"poll",status:u,onStatus(e){return x.add(e),()=>x.delete(e)},held:()=>k,onHeld(e){return s.helds.add(e),k!==void 0&&e(k),()=>s.helds.delete(e)},counters:()=>({...B}),who:()=>[...q.values()],pending:()=>D.length+xt,async settled(){for(;Me.size>0;)await Promise.allSettled([...Me])},presence:bn,close(){at&&clearInterval(at),Ae(),bn.leave(),Q=!0,de&&clearTimeout(de),X&&clearTimeout(X),be&&clearTimeout(be);for(let n of te.splice(0))n.give(new Error("The client closed before the server could be reached."));for(let n of le.splice(0))n();let e=J;J=void 0,se=!1;try{e?.close(1e3,"Closed.")}catch{}}},unheard(){let e=Je;return Je=[],e}};function co(e,n){let i=globalThis.WebSocket;if(!i)throw new Error("This runtime has no WebSocket; the client polls instead.");let a=typeof globalThis.document<"u",f=d.subprotocol?[nn]:[];if(!a)try{return new i(e,{headers:n,...f.length>0?{protocols:f}:{}})}catch{}let y=new URL(e);for(let[A,F]of Object.entries(E))y.searchParams.set(A,F);return l!==void 0&&y.searchParams.set(ze.param,l),f.length>0?new i(y.toString(),f):new i(y.toString())}}function Uo(t,r,o=Date.now()){let s,l=t?.trim();if(l)if(/^\d+(\.\d+)?$/.test(l))s=Number(l)*1e3;else{let w=Date.parse(l);Number.isFinite(w)&&(s=Math.max(0,w-o))}let m=typeof r=="number"&&Number.isFinite(r)&&r>=0?r:void 0,d=m!==void 0&&m<50&&s!==void 0&&Math.abs(m*1e3-s)<1e3;return m!==void 0&&!d?m:s??1e3}function Jo(){globalThis.location?.reload?.()}function Yo(){return globalThis.document?.visibilityState!=="hidden"}function rn(t,r){if(typeof t=="function")return Math.max(0,t(r));let{min:o=250,max:s=1e4,factor:l=2}=t??{};return Math.min(s,o*l**r)*(.75+Math.random()*.5)}function St(t){let r={};if(!t)return r;t.id&&(r[ee.seat]=t.id),t.roles?.length&&(r[ee.roles]=t.roles.join(",")),t.kind!=="human"&&(r[ee.kind]=t.kind),t.name&&(r[ee.name]=encodeURIComponent(t.name)),t.profile&&(r[ee.profile]=t.profile.id,r[ee.profileName]=encodeURIComponent(t.profile.name));let o=t.onBehalfOf;return o?.profile&&(r[ee.forProfile]=o.profile.id,r[ee.forProfileName]=encodeURIComponent(o.profile.name)),o?.id&&(r[ee.for]=o.id),o?.roles?.length&&(r[ee.forRoles]=o.roles.join(",")),o?.name&&(r[ee.forName]=encodeURIComponent(o.name)),r}var Zr="/graview/views";function on(t){let r=t.fetch??fetch,o=vt(t.url,t.headers),s=o.url,l={"content-type":"application/json",...t.principal?St(t.principal):{},...o.headers},m=t.state?{hidden:t.state.hidden??[],removed:t.state.removed??[],may:t.state.may??dt.may}:dt,d=new Set,w=v=>{if(JSON.stringify(v)!==JSON.stringify(m)){m=v;for(let T of d)T()}},h=async(v,T)=>{let x=await r(`${s}${t.path??Zr}`,{method:v,headers:l,...T!==void 0?{body:JSON.stringify(T)}:{}}),B=await x.json();if(!x.ok)throw new Error(B.error??`The store answered ${x.status}.`);w({hidden:B.hidden??[],removed:B.removed??[],may:B.may??dt.may})},E=()=>h("GET"),L=t.state?Promise.resolve():E().catch(()=>{}),_=t.pollMs?setInterval(()=>void E().catch(()=>{}),t.pollMs):void 0;return{ready:L,refresh:E,close:()=>clearInterval(_),current:()=>m,onChange(v){return d.add(v),()=>void d.delete(v)},hide:v=>h("POST",{hide:v}),show:v=>h("POST",{show:v}),remove:(v,T)=>h("POST",{remove:v,...T?{about:T}:{}}),async restore(v){let T=m.removed.find(x=>x.name===v)?.lens;await h("POST",{restore:v}),T&&await t.onDeclaration?.()},async lens(v){await h("POST",{lens:v}),await t.onDeclaration?.()}}}var sn=document.getElementById("graview-app"),an=/^\/forms\/([^/]+)\/?$/.exec(location.pathname),Xr=an?(__graviewPreload(import.meta.url,["./chunk.Z22C2JJ4.js","./chunk.6IMRCKB4.js","./chunk.XOZU4OFA.js","./chunk.KBJ3UUER.js","./chunk.5WCSQFS5.js","./chunk.LHCGC3K6.js","./chunk.6TBQV3NO.js","./chunk.MT252WP4.js","./chunk.VVIQSFM4.js","./chunk.TQ3MNB6K.js","./chunk.VGYG2IBZ.js","./chunk.P43LPXXJ.js","./chunk.JCKIJSW7.js","./chunk.SDO3U72B.js","./chunk.6L6RUOSF.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.L6P55HFW.js")):Ve("pages");try{an?await Qo(decodeURIComponent(an[1])):await Zo()}catch(t){let r=document.createElement("pre");r.setAttribute("role","alert"),r.style.cssText="margin:2rem;font:14px/1.5 ui-monospace,monospace;white-space:pre-wrap",r.textContent=t instanceof Error?t.message:String(t),sn.replaceChildren(r),window.__graviewFailed=r.textContent}async function Qo(t){let r=await fetch(`/graview/document?form=${encodeURIComponent(t)}`),o=await r.json();if(!r.ok)throw new Error(o.error??`The preview server did not hand over the form (${r.status}).`);let s=await pt(o);if(!s.ok)throw new Error(ct(s.findings));let l=s.app,m=o.principal,d=await bt({app:l,url:location.origin,principal:m,...o.state?{state:o.state,openTimeoutMs:0}:{openTimeoutMs:3e3}});document.title=l.forms?.[t]?.title??l.name;let{mount:w}=await Xr;window.__graview=w(sn,{app:l,form:t,principal:m,remote:d,height:"100dvh",onSubmitted:()=>window.__graviewSubmitted=!0}),window.__graviewReady=!0}async function Zo(){let t=await fetch("/graview/document");if(!t.ok)throw new Error(`The preview server did not hand over the document (${t.status}).`);let r=await t.json(),s=await(async h=>{if(typeof h.module=="string")return(await import(h.module)).app;let E=await pt(h);if(!E.ok)throw new Error(ct(E.findings));return E.app})(r);if(!s||typeof s!="object"||!("schema"in s))throw new Error("The app module the preview server handed does not export an app.");let l=r.principal,m=await bt({app:s,url:location.origin,principal:l,live:!0,subprotocol:!0,pollMs:1200,...r.state?{state:r.state,openTimeoutMs:0}:{openTimeoutMs:3e3}});document.title=s.name;let d,w=on({url:location.origin,principal:l,...r.views?{state:r.views}:{},onDeclaration:async()=>{let h=await(await fetch("/graview/document")).json();if(typeof h.module=="string")return;let E=await pt(h);E.ok&&d?.setApp(E.app,m)}});await Promise.all([Xr,w.ready]),d=en(sn,{app:s,remote:m,principal:l,studio:!1,face:"pages",routing:"address",bar:!0,height:"100dvh",label:s.name,heading:1,keptViews:w,...r.draftView?{draftView:r.draftView}:{}}),window.__graview=d,d.drawn().then(()=>{window.__graviewReady=!0})}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graview",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.71",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "The Graview command line: start a product, check its declaration, write its agent docs, serve its store, preview a document with no product and photograph its places, say whether a product is on one release, host it for an agent over MCP, apply an act to it, sync its seed, install the authoring skills. The tool; @graview/* is the framework.",
|
|
6
6
|
"keywords": [
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@graview/core": "0.1.
|
|
33
|
-
"@graview/
|
|
34
|
-
"@graview/
|
|
35
|
-
"@graview/
|
|
36
|
-
"@graview/
|
|
32
|
+
"@graview/core": "0.1.71",
|
|
33
|
+
"@graview/guest": "0.1.71",
|
|
34
|
+
"@graview/ship": "0.1.71",
|
|
35
|
+
"@graview/skills": "0.1.71",
|
|
36
|
+
"@graview/tools": "0.1.71"
|
|
37
37
|
},
|
|
38
38
|
"engines": {
|
|
39
39
|
"node": ">=22.22.0"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as n}from"./chunk.KOVTQCHX.js";import{c as a}from"./chunk.VKQONZKR.js";import"./chunk.FXCKKVT5.js";import"./chunk.U5P23GO7.js";import"./chunk.LEZGBHPZ.js";import"./chunk.O2XPLDMM.js";import"./chunk.CM7EDQ4E.js";import"./chunk.SUYYDJGZ.js";import"./chunk.YR7DKU5T.js";import"./chunk.X7HMTN3Z.js";import"./chunk.YTRUZ56A.js";import"./chunk.MYR36HW4.js";import"./chunk.UVMHC6VM.js";import"./chunk.XAN7QXMQ.js";import"./chunk.MIE4TJRW.js";import"./chunk.RP6C2IUM.js";import"./chunk.RD2FSSLV.js";import"./chunk.T552MHMU.js";import"./chunk.ZGJUCVT5.js";import"./chunk.CVVNHQPO.js";import"./chunk.YIDNZTON.js";import"./chunk.QILGAV7H.js";import"./chunk.I6HIVTXU.js";import"./chunk.PYGNO2AV.js";import"./chunk.3HFBHLXC.js";import{Y as i}from"./chunk.CUA7F3YJ.js";import"./chunk.SDO3U72B.js";import"./chunk.IUVRJDL3.js";import"./chunk.FQLNBIQ5.js";import{b as o}from"./chunk.AJZBJBMO.js";var e=o(i(),1);function m({entries:d,style:l,headingStyle:p,className:r}){return(0,e.jsxs)("section",{...r?{className:r}:{},"data-testid":"record-ai","aria-label":"What AI did here",style:{display:"grid",gap:10,...l},children:[(0,e.jsx)("h2",{style:p??{margin:0,fontSize:"1rem"},children:"What AI did here"}),(0,e.jsx)("ol",{style:{margin:0,padding:0,listStyle:"none",display:"grid",gap:8,fontSize:"0.875rem"},children:d.slice(0,8).map(t=>(0,e.jsx)(n,{entry:t,undo:s=>(0,e.jsx)(a,{batch:s})},t.id))})]})}export{m as RecordInteractions};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{g as F,l as b}from"./chunk.RHV73CBA.js";function L(t,o){return o===1&&["every","some","sum","min","max","sort"].includes(t.fn)}function M(t){let o=new Set,e=new Set,r=[],s=[],a=new Set(F),i=(l,f)=>{switch(l.t){case"lit":return;case"ident":f||o.add(l.name);return;case"list":l.items.forEach(c=>i(c,f));return;case"member":i(l.object,f);return;case"unary":i(l.operand,f);return;case"binary":i(l.left,f),i(l.right,f);return;case"where":i(l.set,f),i(l.filter,!0);return;case"call":{e.add(l.fn);let c=(l.fn==="out"||l.fn==="in")&&l.args.length===2?l.args[1]:l.args[0],g=c?.t==="lit"&&typeof c.value=="string"?c.value:void 0;l.fn==="all"&&g&&r.push(g),(l.fn==="out"||l.fn==="in")&&g&&s.push(g),l.args.forEach((v,k)=>i(v,f||L(l,k)));return}}};return i(t,!1),{names:o,functions:e,unknownFunctions:[...e].filter(l=>!a.has(l)),sweeps:r,edges:s}}var p=class extends Error{constructor(e,r,s){super(`${e} (at character ${r+1} of "${s}")`);this.sentence=e;this.at=r;this.source=s}},D=["||","&&","==","!=","<=",">=","<",">","!","|","&","+","-","*","/","%","(",")","[","]",",","."],j={and:"&&",or:"||",not:"!"},T=2e3;function H(t){let o=[],e=0;for(;e<t.length;){let r=t[e];if(r===" "||r===" "||r===`
|
|
2
|
-
`||r==="\r"){e++;continue}if(r>="0"&&r<="9"){let a=e;for(;e<t.length&&/[0-9.]/.test(t[e]);)e++;let i=t.slice(a,e),l=Number(i);if(!Number.isFinite(l)||i.split(".").length>2)throw new p(`"${i}" is not a number`,a,t);o.push({k:"num",v:l,at:a});continue}if(r==="'"||r==='"'){let a=e++,i="";for(;e<t.length&&t[e]!==r;)t[e]==="\\"&&e+1<t.length&&e++,i+=t[e++];if(e>=t.length)throw new p("a quoted word is never closed",a,t);e++,o.push({k:"str",v:i,at:a});continue}if(/[A-Za-z_]/.test(r)){let a=e;for(;e<t.length&&/[A-Za-z0-9_]/.test(t[e]);)e++;let i=t.slice(a,e),l=Object.hasOwn(j,i)?j[i]:void 0;o.push(l?{k:"op",v:l,at:a}:{k:"id",v:i,at:a});continue}let s=D.find(a=>t.startsWith(a,e));if(!s)throw new p(`"${r}" is not part of the rule language`,e,t);o.push({k:"op",v:s,at:e}),e+=s.length}return o.push({k:"end",at:t.length}),o}function w(t){if(t.length>T)throw new p(`an expression may be at most ${T} characters`,0,t.slice(0,40));let o=H(t),e=0,r=()=>o[e],s=n=>{let d=r();return d.k==="op"&&d.v===n},a=n=>{let d=r();return d.k==="id"&&d.v===n},i=(n,d)=>{if(!s(n))throw new p(`expected ${d}`,r().at,t);e++},l=0,f=(n,d)=>{if(++l>64)throw new p("the expression nests too deeply",n,t);try{return d()}finally{l--}},c=(n,d)=>()=>{let m=d();for(;;){let y=r(),S=y.k==="op"?n.find(q=>q===y.v):y.k==="id"&&y.v==="in"&&n.includes("in")?"in":void 0;if(!S)return m;e++,m={t:"binary",op:S,left:m,right:d(),at:y.at}}},g=()=>{let n=r();if(n.k==="num")return e++,{t:"lit",value:n.v,at:n.at};if(n.k==="str")return e++,{t:"lit",value:n.v,at:n.at};if(n.k==="id"){if(e++,n.v==="true"||n.v==="false")return{t:"lit",value:n.v==="true",at:n.at};if(n.v==="null")return{t:"lit",value:null,at:n.at};if(s("(")){e++;let d=[];if(!s(")"))for(;;){if(d.push(h()),s(",")){e++;continue}break}return i(")",`")" to close ${n.v}(\u2026)`),{t:"call",fn:n.v,args:d,at:n.at}}return{t:"ident",name:n.v,at:n.at}}if(n.k==="op"&&n.v==="("){e++;let d=f(n.at,h);return i(")",'a ")"'),d}if(n.k==="op"&&n.v==="["){e++;let d=[];if(!s("]"))for(;;){if(d.push(h()),s(",")){e++;continue}break}return i("]",'a "]" to close the list'),{t:"list",items:d,at:n.at}}throw n.k==="end"?new p("the expression ends too soon",n.at,t):new p(`"${n.k==="op"?n.v:""}" cannot start a value here`,n.at,t)},v=()=>{let n=g();for(;;){if(s(".")){let d=r();e++;let m=r();if(m.k!=="id")throw new p('expected a field name after "."',m.at,t);e++,n={t:"member",object:n,name:m.v,at:d.at};continue}if(a("where")){let d=r().at;e++,n={t:"where",set:n,filter:f(d,h),at:d};continue}return n}},k=()=>{let n=r();return n.k==="op"&&(n.v==="!"||n.v==="-")?(e++,{t:"unary",op:n.v,operand:f(n.at,k),at:n.at}):v()},P=c(["*","/","%"],k),z=c(["+","-"],P),N=c(["&"],z),R=c(["|"],N),_=()=>{let n=R(),d=r(),m=d.k==="op"&&["==","!=","<","<=",">",">="].includes(d.v)?d.v:d.k==="id"&&d.v==="in"?"in":void 0;return m?(e++,{t:"binary",op:m,left:n,right:R(),at:d.at}):n},O=()=>{let n=r();return n.k==="op"&&n.v==="!"?(e++,{t:"unary",op:"!",operand:f(n.at,O),at:n.at}):_()},B=c(["&&"],O),I=c(["||"],B);function h(){return I()}let K=h();if(r().k!=="end")throw new p("there is more after the end of the expression",r().at,t);return K}function E(t){let o,e=-1,r=0;for(let s=0;s<t.length;s++){let a=t[s];if(o){a==="\\"?s++:a===o&&(o=void 0);continue}a==="'"||a==='"'?o=a:a==="("||a==="["?r++:a===")"||a==="]"?r--:a==="|"&&r===0&&(t[s+1]==="|"?s++:e=s)}if(e>0&&t.slice(e+1).trim()===x){let s=E(t.slice(0,e));if(s>=0)return s}return e}var x="capital",$=/\s*(?:'((?:[^'\\]|\\.)*)'|"((?:[^"\\]|\\.)*)")\s*(,|$)/y;function U(t){let o=E(t);if(o>=0){if(t.slice(o+1).trim()!==x)throw new u('only "capital" may follow another formatter, like {n | words | capital}');let e=t.slice(0,o);if(e.trim()===x)throw new u('"capital" is said once');return{...C(e),capital:!0}}return t.trim()===x?{args:[],capital:!0}:C(t)}function C(t){let o=t.indexOf(":"),e=(o>=0?t.slice(0,o):t).trim();if(!b.includes(e))throw new u(`"${e}" is not a formatter; use one of ${[...b,x].join(", ")}`);let r=[];if(o>=0&&e==="excerpt"){let s=t.slice(o+1).trim();if(!/^\d+$/.test(s)||Number(s)<20||Number(s)>1e3)throw new u("excerpt is told at most how many characters, 20 to 1000: {summary | excerpt: 80}");r.push(s)}else if(o>=0&&e==="money"){if(t.slice(o+1).trim()!=="0")throw new u("money is told 0 for whole units, rounded \u2014 {total | money: 0} \u2014 or nothing, for cents only where a sum has them");r.push("0")}else if(o>=0){let s=t.slice(o+1),a=0;for(;a<s.length;){$.lastIndex=a;let i=$.exec(s);if(!i)throw new u(`"${e}" is told quoted words, like ${e}: 'offer'`);if(r.push((i[1]??i[2]??"").replace(/\\(.)/g,"$1")),a=$.lastIndex,i[3]==="")break}}if(e==="plural"&&(r.length<1||r.length>2))throw new u("plural is told its noun, like {count | plural: 'offer'}, and its plural where English does not make it: plural: 'person', 'people'");if(e!=="plural"&&e!=="excerpt"&&e!=="money"&&r.length>0)throw new u(`"${e}" takes nothing after it`);return{format:e,args:r}}var u=class extends Error{constructor(e){super(e);this.sentence=e}};function Y(t){let o=[],e=0;for(;e<t.length;){let r=t.indexOf("{",e);if(r<0){o.push({text:t.slice(e)});break}r>e&&o.push({text:t.slice(e,r)});let s=t.indexOf("}",r);if(s<0)throw new u(`a "{" at character ${r+1} is never closed`);let a=t.slice(r+1,s),i=E(a),l=(i>=0?a.slice(0,i):a).trim(),f=i>=0?U(a.slice(i+1)):void 0,c=E(l);if(c>=0&&b.includes(l.slice(c+1).split(":")[0].trim()))throw new u('only "capital" may follow another formatter, like {n | words | capital}');o.push({expr:w(l),source:l,...f?.format?{format:f.format}:{},...f&&f.args.length>0?{formatArgs:f.args}:{},...f?.capital?{capital:!0}:{}}),e=s+1}return o}function A(t){let o=new Map;for(let[e,r]of Object.entries(t?.computed??{}))o.set(e,typeof r=="string"?{expr:r}:r);return o}function re(t){let o=A(t);if(o.size===0)return;let e=new Map;for(let[r,s]of o)try{e.set(r,w(s.expr))}catch(a){if(!(a instanceof p))throw a}return e}function Z(t,o,e=new Set){let r=A(t).get(o);if(!r||e.has(o))return!1;let s;try{s=w(r.expr)}catch{return!1}let a=M(s);if(a.edges.length>0||a.sweeps.length>0||[...a.functions].some(c=>c==="out"||c==="in"||c==="all"))return!1;let i=t.fields,l=c=>i instanceof Set?i.has(c):Object.hasOwn(i,c),f=new Set([...e,o]);return[...a.names].every(c=>l(c)||Z(t,c,f))}export{M as a,p as b,w as c,u as d,Y as e,A as f,re as g,Z as h};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i}from"./chunk.QQUZ5RTQ.js";import"./chunk.BJ3G7J2Z.js";import"./chunk.DIVANC3G.js";import"./chunk.KP7HUXH5.js";import"./chunk.KV3N6VRG.js";import"./chunk.FUTSLXWN.js";import"./chunk.MZSWWMX6.js";import"./chunk.NCBUECIW.js";import"./chunk.2T24FYAO.js";import"./chunk.JEQ6CA5M.js";import"./chunk.SUYYDJGZ.js";import"./chunk.YR7DKU5T.js";import"./chunk.WVUJXDXZ.js";import{e as l}from"./chunk.IRPMGHZN.js";import"./chunk.7QWGIGHM.js";import"./chunk.HRLCDBMO.js";import"./chunk.LZNHTROY.js";import"./chunk.36FKQJFM.js";import"./chunk.RHV73CBA.js";import"./chunk.MIE4TJRW.js";import"./chunk.RP6C2IUM.js";import"./chunk.RD2FSSLV.js";import"./chunk.T552MHMU.js";import"./chunk.ZGJUCVT5.js";import"./chunk.CVVNHQPO.js";import"./chunk.YIDNZTON.js";import"./chunk.QILGAV7H.js";import"./chunk.I6HIVTXU.js";import"./chunk.PYGNO2AV.js";import"./chunk.3HFBHLXC.js";import{Y as m}from"./chunk.CUA7F3YJ.js";import"./chunk.SDO3U72B.js";import"./chunk.IUVRJDL3.js";import"./chunk.FQLNBIQ5.js";import{b as g}from"./chunk.AJZBJBMO.js";var a=g(m(),1),r=new WeakMap;function c(n){let o=r.get(n);if(!o){let t=l(n);o=e=>e.mode==="fullscreen"?(0,a.jsx)(i,{blocks:t,slot:"home",heading:2,firstHeading:1,...e.flagged?{flagged:e.flagged}:{}}):(0,a.jsx)(i,{blocks:t,slot:"home",heading:3,firstHeading:2,...e.flagged?{flagged:e.flagged}:{}}),r.set(n,o)}return o}export{c as homeView};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as b,b as c,c as d,d as e,e as f}from"./chunk.ZBK3FCVE.js";import"./chunk.DW6KXAUM.js";import"./chunk.HRLCDBMO.js";import"./chunk.36FKQJFM.js";import"./chunk.RHV73CBA.js";import{Xb as a}from"./chunk.IUVRJDL3.js";import"./chunk.FQLNBIQ5.js";import"./chunk.AJZBJBMO.js";export{a as ActRefusal,e as compileDocumentWithoutCheck,d as effectsOf,f as inDocumentWords,c as kindShapes,b as readDocument};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{a as re}from"./chunk.BJ3G7J2Z.js";import{p as De,q as te,t as G,u as Ie,y as oe}from"./chunk.RP6C2IUM.js";import{m as Z,n as Ee,o as Te,p as ee,q as ne}from"./chunk.RD2FSSLV.js";import{b as xe}from"./chunk.QILGAV7H.js";import{b as Me,d as J,e as X,g as Ae,q as Pe}from"./chunk.PYGNO2AV.js";import{b as ve}from"./chunk.3HFBHLXC.js";import{D as H,F as U,G as R,J as ye,Ma as Se,Na as be,Oa as I,Sa as $,T as we,Ua as Q,Y as A,ga as b,ha as V,ia as ke,m as me,v as he,z as ge}from"./chunk.CUA7F3YJ.js";import{a as D}from"./chunk.SDO3U72B.js";import{Zd as fe,qa as q,ud as de,zd as pe}from"./chunk.IUVRJDL3.js";import{b as w}from"./chunk.AJZBJBMO.js";var x=w(R(),1),P=w(A(),1),ie=I(D(()=>(__graviewPreload(import.meta.url,["./chunk.CUA7F3YJ.js","./chunk.SDO3U72B.js","./chunk.IUVRJDL3.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.BBMX3IIO.js")))),Ne=ie.part(n=>(0,P.jsx)(n.HoverChipDoor,{}),{quiet:!0}),Re="A",K=I(D(()=>(__graviewPreload(import.meta.url,["./chunk.VBHV4TLG.js","./chunk.T6PU3NKP.js","./chunk.X3FPVFFB.js","./chunk.53HW224Y.js","./chunk.WAIIXXVI.js","./chunk.RECTEAG4.js","./chunk.KP7HUXH5.js","./chunk.FUTSLXWN.js","./chunk.MZSWWMX6.js","./chunk.HJCQ6I3S.js","./chunk.4QBW46XV.js","./chunk.U5Q7EVZQ.js","./chunk.SCN6IYDG.js","./chunk.O2XPLDMM.js","./chunk.CM7EDQ4E.js","./chunk.SUYYDJGZ.js","./chunk.YR7DKU5T.js","./chunk.YTRUZ56A.js","./chunk.TBY5IR7C.js","./chunk.5IM2X3VT.js","./chunk.BIDL7GQD.js","./chunk.NKUNCQB3.js","./chunk.HMV4ILAC.js","./chunk.XAN7QXMQ.js","./chunk.XJ4JYROM.js","./chunk.XOZU4OFA.js","./chunk.CHG522KL.js","./chunk.Q5WEOX3Q.js","./chunk.ZBK3FCVE.js","./chunk.DW6KXAUM.js","./chunk.YFVJUHAK.js","./chunk.MR776WQ2.js","./chunk.IRPMGHZN.js","./chunk.7QWGIGHM.js","./chunk.HRLCDBMO.js","./chunk.LZNHTROY.js","./chunk.36FKQJFM.js","./chunk.RHV73CBA.js","./chunk.RP6C2IUM.js","./chunk.RD2FSSLV.js","./chunk.T552MHMU.js","./chunk.ZGJUCVT5.js","./chunk.CVVNHQPO.js","./chunk.YIDNZTON.js","./chunk.QILGAV7H.js","./chunk.I6HIVTXU.js","./chunk.PYGNO2AV.js","./chunk.3HFBHLXC.js","./chunk.CUA7F3YJ.js","./chunk.SDO3U72B.js","./chunk.IUVRJDL3.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.J4CSY2D5.js"))));var We=K.part((n,e)=>(0,P.jsx)(n.InspectorPane,{...e}),{what:"This card's acts"});function He(n){let e=()=>{(typeof navigator>"u"||navigator.onLine!==!1)&&n()},t=globalThis;if(t.requestIdleCallback){let a=t.requestIdleCallback(e,{timeout:5e3});return()=>t.cancelIdleCallback?.(a)}let r=setTimeout(e,2500);return()=>clearTimeout(r)}var Ge=150,Be="[data-graview-pick], [data-graview-view], [data-graview-record], [data-graview-act], [data-graview-field], a[href]";function ze(n){if(n.closest("[data-graview-face='pages'], [data-graview-popover]"))return null;let e=n.closest("[data-graview-pick]")?.getAttribute("data-graview-pick")??n.closest("[data-graview-view]")?.getAttribute("data-graview-view");return e?{face:"scene",on:e,about:[e]}:null}function Fe(n){let{store:e,principal:t,providers:r,ai:a}=b(),l=Ie(),p=U(a),o=(0,x.useRef)({aimAt:n,store:e,principal:t,providers:r,prepareSections:l,chipsOn:p});o.current={aimAt:n,store:e,principal:t,providers:r,prepareSections:l,chipsOn:p},(0,x.useEffect)(()=>{if(typeof document>"u")return;let u=null,g=null,k=null,d=v=>{let m=o.current,M=m.chipsOn?m.aimAt(v):null;M&&(k=v,ie.load().then(_=>{k===v&&_.restOn(M,v)},()=>{}))},h=()=>{u&&clearTimeout(u.timer),u=null},c=v=>{let m=o.current,M=m.aimAt(v);if(!M)return;let _=JSON.stringify([M.face,M.on,M.about,M.field,M.place,M.act,m.store.log.length]);_!==g&&(g=_,m.prepareSections(M),K.load().then(Oe=>Oe.prepareActs(m.store,M,{principal:m.principal,providers:m.providers}),()=>{}))},i=v=>v.target instanceof Element?v.target.closest(Be):null,f=v=>{if(v.pointerType==="touch")return;let m=i(v);m!==null&&m===u?.element||(h(),m!==null&&(u={element:m,timer:setTimeout(()=>{u=null,c(m),d(m)},Ge)}))},y=v=>{let m=v.relatedTarget;k!==null&&!(m instanceof Node&&k.contains(m))&&(k=null,ie.current?.leaveRest()),u!==null&&(m instanceof Node&&u.element.contains(m)||h())},S=v=>{if(v.pointerType==="mouse")return;let m=i(v);m&&c(m)},T=v=>{if(!Se())return;let m=i(v);m&&c(m)};return document.addEventListener("pointerover",f,{passive:!0}),document.addEventListener("pointerout",y,{passive:!0}),document.addEventListener("pointerdown",S,{capture:!0,passive:!0}),document.addEventListener("focusin",T),()=>{h(),document.removeEventListener("pointerover",f),document.removeEventListener("pointerout",y),document.removeEventListener("pointerdown",S,{capture:!0}),document.removeEventListener("focusin",T)}},[])}function dn({placement:n="float",openActs:e,aimAt:t}={}){let{menuAt:r,setMenuAt:a,registerActsDoor:l,ai:p}=b(),{selection:o}=$();Fe(t??ze),(0,x.useEffect)(()=>{if(K.current)return;let h=()=>{y(),K.prefetch()},c=()=>{},i=be(()=>void(c=He(h))),f=["pointerdown","keydown"];for(let S of f)document.addEventListener(S,h,{capture:!0,passive:!0});function y(){i(),c();for(let S of f)document.removeEventListener(S,h,{capture:!0})}return y},[]),(0,x.useEffect)(()=>{if(n==="menu")return l({key:Re,open:e??(h=>{let c=h.getBoundingClientRect(),i=h.closest("[data-graview-pick]")?.getAttribute("data-graview-pick")??h.closest("[data-graview-view]")?.getAttribute("data-graview-view")??void 0;a({x:Math.round(c.left+Math.min(16,c.width/2)),y:Math.round(Math.min(c.bottom,c.top+36)),...i?{on:i}:{}})})}),()=>l(null)},[n,l,a,e]);let u=r!==null||o.length>0&&e===void 0,[g,k]=(0,x.useState)(u);(0,x.useEffect)(()=>{u&&k(!0)},[u]);let d=U(p)?(0,P.jsx)(x.Suspense,{fallback:null,children:(0,P.jsx)(Ne,{})}):null;return!g&&!u?d:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(x.Suspense,{fallback:null,children:(0,P.jsx)(We,{placement:n,chosen:e===void 0})}),d]})}var j=w(R(),1),Y=w(A(),1),_e=I(D(()=>(__graviewPreload(import.meta.url,["./chunk.VBHV4TLG.js","./chunk.T6PU3NKP.js","./chunk.X3FPVFFB.js","./chunk.53HW224Y.js","./chunk.ZOSTOVXR.js","./chunk.HIJ72QX6.js","./chunk.BQWMHHAZ.js","./chunk.2QALBEWP.js","./chunk.WAIIXXVI.js","./chunk.RECTEAG4.js","./chunk.QQUZ5RTQ.js","./chunk.BJ3G7J2Z.js","./chunk.DIVANC3G.js","./chunk.KP7HUXH5.js","./chunk.4BSEYZMS.js","./chunk.KV3N6VRG.js","./chunk.FUTSLXWN.js","./chunk.MZSWWMX6.js","./chunk.HJCQ6I3S.js","./chunk.4QBW46XV.js","./chunk.U5Q7EVZQ.js","./chunk.NCBUECIW.js","./chunk.2T24FYAO.js","./chunk.JEQ6CA5M.js","./chunk.25VJPUDH.js","./chunk.SCN6IYDG.js","./chunk.O2XPLDMM.js","./chunk.CM7EDQ4E.js","./chunk.SUYYDJGZ.js","./chunk.YR7DKU5T.js","./chunk.YTRUZ56A.js","./chunk.TBY5IR7C.js","./chunk.5IM2X3VT.js","./chunk.BIDL7GQD.js","./chunk.NKUNCQB3.js","./chunk.HMV4ILAC.js","./chunk.XAN7QXMQ.js","./chunk.XJ4JYROM.js","./chunk.XOZU4OFA.js","./chunk.CHG522KL.js","./chunk.Q5WEOX3Q.js","./chunk.ZBK3FCVE.js","./chunk.DW6KXAUM.js","./chunk.YFVJUHAK.js","./chunk.MR776WQ2.js","./chunk.WVUJXDXZ.js","./chunk.IRPMGHZN.js","./chunk.7QWGIGHM.js","./chunk.HRLCDBMO.js","./chunk.LZNHTROY.js","./chunk.36FKQJFM.js","./chunk.RHV73CBA.js","./chunk.MIE4TJRW.js","./chunk.RP6C2IUM.js","./chunk.RD2FSSLV.js","./chunk.T552MHMU.js","./chunk.ZGJUCVT5.js","./chunk.CVVNHQPO.js","./chunk.YIDNZTON.js","./chunk.QILGAV7H.js","./chunk.I6HIVTXU.js","./chunk.PYGNO2AV.js","./chunk.3HFBHLXC.js","./chunk.CUA7F3YJ.js","./chunk.SDO3U72B.js","./chunk.IUVRJDL3.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.UWEFODVV.js")))),qe=_e.part((n,e)=>{let t=n.DraftFrame;return(0,Y.jsx)(t,{...e})},{what:"The view"});function hn(n){let{seatTalk:e}=b();return(0,j.useSyncExternalStore)(e.subscribe,()=>e.get().draft!==null,()=>!1)?(0,Y.jsx)(j.Suspense,{fallback:null,children:(0,Y.jsx)(qe,{...n})}):null}var L=w(R(),1),C=w(A(),1),se=I(D(()=>(__graviewPreload(import.meta.url,["./chunk.MZSWWMX6.js","./chunk.M7DJJRFH.js","./chunk.6VG2LCES.js","./chunk.I3ADXJQW.js","./chunk.BJUUSIQY.js","./chunk.HMV4ILAC.js","./chunk.UVMHC6VM.js","./chunk.XAN7QXMQ.js","./chunk.XJ4JYROM.js","./chunk.XOZU4OFA.js","./chunk.CHG522KL.js","./chunk.7QWGIGHM.js","./chunk.ZGJUCVT5.js","./chunk.CVVNHQPO.js","./chunk.YIDNZTON.js","./chunk.QILGAV7H.js","./chunk.I6HIVTXU.js","./chunk.PYGNO2AV.js","./chunk.3HFBHLXC.js","./chunk.CUA7F3YJ.js","./chunk.SDO3U72B.js","./chunk.IUVRJDL3.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.YBQUP3KE.js")))),Ve=se.part((n,e)=>{let t=n.QuickAskCard;return(0,C.jsx)(t,{...e})},{what:"The quick ask"});function Sn({face:n,on:e=!0}){let{ai:t,aiDesk:r,selection:a,view:l}=b(),p=we()?.open??!1,o=e&&H(t)&&!p,u=Ae(r),g=(0,L.useRef)(null),k=(0,L.useRef)({selection:a,place:l.within?.view});return k.current={selection:a,place:l.within?.view},(0,L.useEffect)(()=>{if(!o)return;let d=Me(r);return d.drawn+=1,d.preload=()=>{se.load().catch(()=>{}),(__graviewPreload(import.meta.url,["./chunk.I3ADXJQW.js","./chunk.BJUUSIQY.js","./chunk.7QWGIGHM.js","./chunk.I6HIVTXU.js","./chunk.IUVRJDL3.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.C4LC2UEU.js")).catch(()=>{})},J(d),()=>{d.drawn=Math.max(0,d.drawn-1),d.drawn===0&&(d.open=null),J(d)}},[o,r]),(0,L.useEffect)(()=>{if(!o)return;let d=h=>{if(h.defaultPrevented||h.key.toLowerCase()!=="k"||!(h.metaKey||h.ctrlKey)||h.altKey||h.shiftKey)return;let c=g.current?.closest("[data-graview-embed]"),i=h.target,f=!(i instanceof Node)||i===document.body||i===document.documentElement;if(c&&!(f||i instanceof Node&&c.contains(i)))return;h.preventDefault(),se.prefetch();let y=document.activeElement,{selection:S,place:T}=k.current;X(r,{pointed:{...S[0]!==void 0?{on:S[0]}:{},about:S,...T?{place:T}:{}},returnTo:y instanceof HTMLElement&&y!==document.body?y:null})};return window.addEventListener("keydown",d,!0),()=>window.removeEventListener("keydown",d,!0)},[o,r]),o?(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("span",{ref:g,hidden:!0,"data-graview-quick-ask":n}),u?(0,C.jsx)(L.Suspense,{fallback:null,children:(0,C.jsx)(Ve,{face:n,opening:u,close:()=>X(r,null)},u.at)}):null]}):null}var B=w(R(),1),O=w(A(),1),ae=I(D(()=>(__graviewPreload(import.meta.url,["./chunk.M7DJJRFH.js","./chunk.6VG2LCES.js","./chunk.I3ADXJQW.js","./chunk.BJUUSIQY.js","./chunk.HMV4ILAC.js","./chunk.UVMHC6VM.js","./chunk.XAN7QXMQ.js","./chunk.XJ4JYROM.js","./chunk.XOZU4OFA.js","./chunk.CHG522KL.js","./chunk.7QWGIGHM.js","./chunk.ZGJUCVT5.js","./chunk.CVVNHQPO.js","./chunk.YIDNZTON.js","./chunk.QILGAV7H.js","./chunk.I6HIVTXU.js","./chunk.PYGNO2AV.js","./chunk.3HFBHLXC.js","./chunk.CUA7F3YJ.js","./chunk.SDO3U72B.js","./chunk.IUVRJDL3.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.QVID5WHS.js")))),$e=ae.part((n,e)=>{let t=n.InlineAiMenu;return(0,O.jsx)(t,{...e})},{what:"The AI's suggestions"}),Qe=ae.part((n,e)=>{let t=n.GhostTray;return(0,O.jsx)(t,{...e})},{quiet:!0});function Ke(){let{ai:n}=b(),e=H(n);return(0,B.useMemo)(()=>e?t=>({id:"inline-ai",heading:"AI",render:r=>(0,O.jsx)(B.Suspense,{fallback:null,children:(0,O.jsx)($e,{target:t,close:r})}),prepare:()=>ae.prefetch()}):null,[e])}var Ye=[];function xn({children:n}){let e=Ke(),t=(0,B.useMemo)(()=>e?[e]:Ye,[e]);return(0,O.jsx)(G,{sections:t,children:n})}function Dn(n){let{ai:e,aiDesk:t}=b(),{ghost:r}=ye(t);return r===null||r.onCard||e.off?null:(0,O.jsx)(B.Suspense,{fallback:null,children:(0,O.jsx)(Qe,{...n})})}var W=w(R(),1);var Le=w(A(),1),Ue=n=>globalThis[Symbol.for("graview.shown-lists")]?.get(n),Ce=I(D(()=>(__graviewPreload(import.meta.url,["./chunk.PYGNO2AV.js","./chunk.3HFBHLXC.js","./chunk.CUA7F3YJ.js","./chunk.SDO3U72B.js","./chunk.IUVRJDL3.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.NZFO6BM3.js"))));function Je(n){let e=n.about[0];if(n.about.length!==1||!e?.startsWith("aggregate:"))return;let t=e.slice(10).split("+");return t.length===1?t[0]:void 0}function Xe(n,e){return n.filter(t=>t.as!==e.as&&!t.hidden&&(t.kind===e.kind||t.over?.includes(e.kind)===!0)).at(-1)}function Ze(n){let e=V(),t=e?.keptViews,r=e?.views,a=(0,W.useContext)(Pe);return(0,W.useMemo)(()=>r?l=>{let p=t?.current(),o=Je(l),u=c=>c.length>0?{id:"tidy-view",items:c,prepare:()=>Ce.prefetch()}:null,g=(c,...i)=>Ce.load().then(f=>f[c](...i),()=>!1),k=(c,i)=>Ue(c)?.().menu(i,t,a)??[];if(l.place===void 0){if(l.face!=="pages"||o===void 0||l.on!==void 0)return null;let c=p?.may.lenses===!0&&t?.lens!==void 0,i=q(e.store.schema,o),f=r.arrangement?.()?.hide?.includes(o)===!0;return u([...c?[{id:f?"show-list":"hide-list",label:f?"Show":"Hide",hint:f?"Back in the places, for everyone":"Off the places, for everyone; still at its address",run:()=>void g("setListHidden",o,i,t,!f,a)}]:[],...k(`list:${o}`,c)])}let d=r.places().find(c=>c.as===l.place&&(o===void 0||c.kind===o||c.over?.includes(o)===!0));if(!d)return null;let h=t&&p?fe(d,p,t):null;return u([...h?[d.hidden?{id:"show-view",label:"Show",hint:"Back in the places, for everyone",run:()=>void g("setHidden",d,h,t,!1,a)}:{id:"hide-view",label:"Hide",hint:"Off the places and the scene, for everyone",run:()=>void g("setHidden",d,h,t,!0,a)},{id:"delete-view",label:"Delete",hint:`Kept ${30} days under Recently deleted`,run:()=>{let c=Xe(r.places(),d);g("remove",d,h,t,a).then(i=>i&&n?.(d,c))}}]:[],...k(`place:${d.as}`,h==="lens")])}:null,[t,r,a,n])}var en=[];function Wn({children:n}){let{view:e,go:t}=Q(),r=(0,W.useCallback)((p,o)=>{let u=e.within?.view;e.focusId===he(p.kind)&&(u===void 0||u===p.as)&&t(o?ge(e,o.kind,o.as):me(e,!0))},[e,t]),a=Ze(r),l=(0,W.useMemo)(()=>a?[a]:en,[a]);return(0,Le.jsx)(G,{sections:l,children:n})}var E=w(R(),1),ue=w(A(),1),N,ce=new Set,le=n=>(ce.add(n),()=>void ce.delete(n)),z=()=>(__graviewPreload(import.meta.url,["./chunk.PZHCWMKT.js","./chunk.DOJCYXIJ.js","./chunk.J65CZJIC.js","./chunk.FSZQTX3K.js","./chunk.TBY5IR7C.js","./chunk.BIDL7GQD.js","./chunk.6VG2LCES.js","./chunk.I3ADXJQW.js","./chunk.BJUUSIQY.js","./chunk.XJ4JYROM.js","./chunk.XOZU4OFA.js","./chunk.CHG522KL.js","./chunk.Q5WEOX3Q.js","./chunk.ZBK3FCVE.js","./chunk.DW6KXAUM.js","./chunk.7QWGIGHM.js","./chunk.HRLCDBMO.js","./chunk.LZNHTROY.js","./chunk.36FKQJFM.js","./chunk.RHV73CBA.js","./chunk.MIE4TJRW.js","./chunk.RP6C2IUM.js","./chunk.RD2FSSLV.js","./chunk.T552MHMU.js","./chunk.ZGJUCVT5.js","./chunk.CVVNHQPO.js","./chunk.YIDNZTON.js","./chunk.QILGAV7H.js","./chunk.I6HIVTXU.js","./chunk.PYGNO2AV.js","./chunk.3HFBHLXC.js","./chunk.CUA7F3YJ.js","./chunk.SDO3U72B.js","./chunk.IUVRJDL3.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.X4PFLIXB.js")).then(n=>{N=n,ce.forEach(e=>e())});function nn(){let n=b(),{ai:e,keptViews:t,onProposeChange:r,composeChange:a}=n,l=(0,E.useRef)(n);l.current=n;let p=r!==void 0&&a!==void 0||typeof t?.fork=="function",o=H(e)&&(typeof t?.revise=="function"||p);o&&oe(z);let u=(0,E.useSyncExternalStore)(le,()=>N!==void 0,()=>!1);return(0,E.useMemo)(()=>o?g=>g.section||g.page||g.face==="scene"&&p&&(g.on!==void 0||g.place!==void 0||g.about.length===1)?N?N.sectionFor(g,l.current):(z(),null):null:null,[o,p,u])}function Fn(n){let e=b(),t=(0,E.useRef)(e);t.current=e;let r=(0,E.useRef)(n);r.current=n;let a=e.onProposeChange!==void 0&&e.composeChange!==void 0;a&&oe(z);let l=(0,E.useSyncExternalStore)(le,()=>N!==void 0,()=>!1);return(0,E.useMemo)(()=>a?p=>!p.page||p.face!=="pages"?null:N?N.displayOptionsSection(p,t.current,r.current):(z(),null):null,[a,l])}var tn=[];function _n({children:n}){let e=nn(),t=(0,E.useMemo)(()=>e?[e]:tn,[e]);return(0,ue.jsx)(G,{sections:t,children:n})}function qn(){let n=(0,E.useSyncExternalStore)(le,()=>N?.SectionDoor,()=>{});return(0,E.useEffect)(()=>{try{sessionStorage.getItem("graview.better.from-scene")&&z()}catch{}},[]),n?(0,ue.jsx)(n,{}):null}function Kn(n={}){return n.scope===void 0?re:ve(re,n.scope)}var F=w(R(),1),s=w(A(),1);function et({inside:n=!1,widthOf:e}={}){let{store:t,view:r,emphasis:a,setEmphasis:l}=b(),p=De(),{selection:o,set:u}=$(),{show:g}=Q(),k=ke(),d=(0,F.useMemo)(()=>{let i=new Map;for(let f of t.graph.allEdges()){let y=i.get(f.kind)??{count:0,ends:new Set};y.count+=1;for(let S of[f.from,f.to]){let T=t.graph.getNode(S);T&&y.ends.add(`kind:${T.kind}`)}i.set(f.kind,y)}return[...i.entries()].sort(([f],[y])=>f.localeCompare(y)).map(([f,y])=>({kind:f,count:y.count,ends:[...y.ends]}))},[t,k]),h=Math.max(0,...d.map(i=>i.count));if((0,F.useEffect)(()=>()=>l(null),[l]),!r.overview&&!n||d.length===0)return null;let c=new Set;for(let i of o){if(i.startsWith("kind:")){c.add(i);continue}let f=t.graph.getNode(i);f&&c.add(`kind:${f.kind}`)}return(0,s.jsxs)("section",{"aria-label":"What the lines mean",role:n?"group":void 0,"data-testid":"relation-key",style:n?{display:"grid",gap:1}:{position:"absolute",left:16,top:14,zIndex:pe("rail"),display:"grid",gap:1,padding:"8px 10px",borderRadius:10,border:"1px solid var(--graview-edge)",background:"var(--graview-float)",boxShadow:"var(--graview-lift-low)",maxWidth:on,animation:"graview-settle 380ms 280ms ease backwards"},children:[n?null:(0,s.jsx)("span",{style:{fontSize:"0.75rem",letterSpacing:"0.16em",textTransform:"uppercase",color:"var(--graview-ink-faint)",paddingBottom:2},children:d.length===1?"1 relation":`${d.length} relations`}),e?(0,s.jsx)(sn,{aloft:r.overview===!0}):null,d.map(({kind:i,count:f,ends:y})=>{let{connector:S,style:T}=te(p,i),v=rn(t.schema,i),m=a!==null?a===i:c.size===0||y.some(M=>c.has(M));return(0,s.jsxs)("button",{type:"button",title:t.schema.edge(i)?.description===void 0?`${f} of these`:v.words,onMouseEnter:()=>l(i),onMouseLeave:()=>l(null),onFocus:()=>l(i),onBlur:()=>l(null),onClick:()=>{u(y),g(null)},style:{all:"unset",outline:"revert-layer",cursor:"pointer",display:"grid",gridTemplateColumns:"30px 1fr auto",alignItems:"center",gap:8,minHeight:23,padding:"2px 4px",borderRadius:6,opacity:m?1:.4},children:[(0,s.jsx)("svg",{width:"30",height:"10","aria-hidden":"true",style:{display:"block",opacity:S.visible?1:.35},children:r.overview&&e?(0,s.jsx)("path",{d:"M 1 5 L 29 5",fill:"none",className:"graview-key-ribbon",stroke:"var(--graview-ink)",strokeOpacity:.35,strokeWidth:e(f,h)}):(0,s.jsx)("path",{d:"M 1 5 L 29 5",fill:"none",stroke:ee(T),strokeWidth:ne(T,!0),strokeDasharray:Z[T.pattern],strokeLinecap:"round"})}),(0,s.jsxs)("span",{style:{display:"grid",minWidth:0},"data-graview-relation-words":i,children:[(0,s.jsx)("span",{style:{fontSize:"0.8125rem",color:"var(--graview-ink)"},children:v.words}),(0,s.jsx)("span",{style:{fontSize:"0.6875rem",color:"var(--graview-ink-faint)"},children:v.ends})]}),S.visible?null:(0,s.jsx)("span",{"data-graview-quiet":i,style:{fontSize:"0.75rem",color:"var(--graview-ink-faint)",fontStyle:"italic"},children:"not drawn"}),(0,s.jsx)("span",{style:{fontSize:"0.75rem",color:"var(--graview-ink-faint)",fontVariantNumeric:"tabular-nums"},children:f})]},i)})]})}var on="min(280px, calc(100% - 28px))";function rn(n,e,t){let r=n.edge(e)?.from??[],a=new Map;for(let o of t!==void 0&&r.includes(t)?[t]:r.length>0?r:[""]){let u=xe(n,o,e,"out");a.set(u,[...a.get(u)??[],o])}let l=o=>o==="*"?"anything":q(n,o),p=[...a].map(([o,u])=>{let g=u.flatMap(d=>n.tryDefinition(d)?.edges[e]?.to??[]),k=u[0]&&g.length>0?`${u.map(l).join(", ")} \u2192 ${(g.includes("*")?["*"]:[...new Set(g)]).map(l).join(", ")}`:"";return[o.charAt(0).toUpperCase()+o.slice(1),k]});return{words:p.map(([o])=>o).join(" \xB7 "),ends:p.flatMap(([,o])=>o?[o]:[]).join(" \xB7 ")}}function nt({edgeKind:n,kit:e,width:t=30}){let r=V(),a=(0,F.useMemo)(()=>de(e??r?.brand?.kit),[e,r?.brand?.kit]),{connector:l,style:p}=te(a,n);return(0,s.jsx)("svg",{width:t,height:"8","aria-hidden":"true","data-testid":"relation-mark","data-graview-relation":n,style:{display:"inline-block",verticalAlign:"middle",opacity:l.visible?1:.35},children:(0,s.jsx)("path",{d:`M 1 4 L ${t-1} 4`,fill:"none",stroke:ee(p),strokeWidth:ne(p,!0),strokeDasharray:Z[p.pattern],strokeLinecap:"round"})})}function sn({aloft:n}){let e={display:"grid",gridTemplateColumns:"30px 1fr",alignItems:"center",gap:8,minHeight:23,padding:"2px 4px"},t={fontSize:"0.75rem",color:"var(--graview-ink-muted)"};return(0,s.jsxs)("div",{role:"group","aria-label":"The lines","data-testid":"line-manners",style:{display:"grid",gap:1,paddingBottom:6,marginBottom:4,borderBottom:"1px solid var(--graview-edge)"},children:[n?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{style:e,"data-graview-manner":"ribbon",children:[(0,s.jsx)("svg",{width:"30",height:"10","aria-hidden":"true",children:(0,s.jsx)("path",{d:"M 1 5 L 29 5",stroke:"var(--graview-ink)",strokeOpacity:.35,strokeWidth:6})}),(0,s.jsx)("span",{style:t,children:"A relation between two districts, as wide as the links along it \u2014 point at one for its words"})]}),(0,s.jsxs)("div",{style:e,"data-graview-manner":"record",children:[(0,s.jsxs)("svg",{width:"30",height:"10","aria-hidden":"true",children:[(0,s.jsx)("path",{d:"M 1 5 L 25 5",stroke:"var(--graview-accent)",strokeWidth:1.8,strokeLinecap:"round"}),(0,s.jsx)("circle",{cx:26,cy:5,r:3,fill:"var(--graview-accent)"})]}),(0,s.jsx)("span",{style:t,children:"A chosen record's link to another record, labeled with the relation"})]}),(0,s.jsxs)("div",{style:e,"data-graview-manner":"district",children:[(0,s.jsx)("svg",{width:"30",height:"10","aria-hidden":"true",children:(0,s.jsx)("path",{d:"M 1 5 L 29 5",stroke:"var(--graview-accent)",strokeWidth:1.8,strokeDasharray:"5 4"})}),(0,s.jsx)("span",{style:t,children:"A chosen record's links into a district, with how many"})]})]}):null,(0,s.jsxs)("div",{style:e,"data-graview-manner":"unsure",children:[(0,s.jsx)("svg",{width:"30",height:"10","aria-hidden":"true",children:(0,s.jsx)("path",{d:"M 1 5 L 29 5",stroke:"var(--graview-accent)",strokeOpacity:Te,strokeWidth:1.8,strokeDasharray:Ee,strokeLinecap:"round"})}),(0,s.jsx)("span",{style:t,children:"Unsure: a link its maker was less than sure of, until a person keeps it \u2014 point at its words for what it was based on"})]})]})}export{dn as a,hn as b,Sn as c,et as d,on as e,nt as f,Ke as g,xn as h,Dn as i,Ze as j,Wn as k,nn as l,Fn as m,_n as n,qn as o,Kn as p};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as $}from"./chunk.RECTEAG4.js";import{a as C}from"./chunk.HMV4ILAC.js";import{l as M}from"./chunk.YIDNZTON.js";import{Yb as x,ma as k,na as v,oa as j}from"./chunk.IUVRJDL3.js";function N(a,s){let c=a.tryDefinition(s),r=Object.keys(c?.fields?.shape??{}),m=[c?.lifecycle?.field,...r.filter(l=>/^(status|stage|state|phase)$/i.test(l))].filter(l=>l!==void 0&&r.includes(l));return[...new Set(m)].slice(0,1)}function P(a,s){return a.tryDefinition(s)?.fieldRoles?.title??"label"}function V(a,s,c={}){let r=s.map(e=>a.graph.getNode(e)).filter(e=>e!==void 0);if(r.length===0)return{acts:[],withheld:[]};let u=c.principal??{kind:"human"},m=C(a,r.map(e=>e.id),{...c.derive,principal:u,...c.context?{context:c.context}:{}}),l=new Map(a.allMutations().map(e=>[e.name,e])),g=[...new Set(r.map(e=>e.kind))],p=new Set(g.map(e=>P(a.schema,e))),h=new Set(m.affordances.filter(e=>e.provider==="schema").map(e=>e.mutation)),o=e=>{let n=l.get(e.mutation);if(!n?.subject)return;let t=r.length===1&&e.provider==="invariant"&&!h.has(e.mutation)&&e.args[n.subject.arg]===r[0].id;if(!(e.provider!=="schema"&&!t)&&!(r.length>1&&e.batch?.length!==r.length)&&n.derived?.act!=="edit"&&!e.open.some(i=>p.has(i.name)))return n},y=[],b=new Set;for(let e of m.affordances){let n=o(e);if(!n||b.has(n.name))continue;b.add(n.name);let{[n.subject.arg]:t,...i}=e.args;y.push({id:e.id,label:v(n),mutation:n.name,subject:n.subject.arg,args:i,open:e.open,...e.destructive||e.setsAside?{more:!0}:{},...e.destructive?{destructive:!0}:{},affordance:{...e,label:v(n)}})}if(g.length===1){let e=g[0];for(let n of N(a.schema,e))for(let t of $(a.schema,[...l.values()],e,n)){if(t.by==="none"||r.every(d=>d[n]===t.value))continue;let i=r.find(d=>d[n]!==t.value),f=t.acts.find(d=>{let D=t.by==="step"?{[d.subject.arg]:i.id}:{[d.subject.arg]:i.id,[n]:t.value};return a.permits({name:d.name,args:D},u).ok});if(!f)continue;let w=t.by==="step"?{}:{[n]:t.value};if(t.by==="step"&&y.some(d=>d.mutation===f.name))continue;let R=t.by==="step"?v(f):`Move to ${t.label}`,O=`set:${n}:${t.value}`;y.push({id:O,label:R,mutation:f.name,subject:f.subject.arg,args:w,open:[],affordance:{id:O,label:R,provider:"schema",mutation:f.name,args:{[f.subject.arg]:i.id,...w},open:[],score:0,why:`every one is ${e}`,nodeIds:r.map(d=>d.id)}})}}let S=[...y.filter(e=>!e.more),...y.filter(e=>e.more)],A=m.withheld.filter(e=>{let n=l.get(e.mutation);return n?.subject!==void 0&&n.derived?.act!=="edit"&&(r.length===1||e.batch?.length===r.length)}).map(e=>({label:v(l.get(e.mutation)),message:e.refusal.message}));return{acts:S,withheld:A}}function _(a,s,c,r={}){let u=r.author,m=a.allMutations().find(e=>e.name===s.mutation),l=e=>M(a.schema,a.allMutations(),e),g=e=>{let n=a.graph.getNode(e);return n?k(a.schema.tryDefinition(n.kind),n):e},p=[],h=[],o=[];for(let e of[...new Set(c)]){let n={name:s.mutation,args:{...s.args,[s.subject]:e}};if(!m){p.push({id:e,label:g(e),message:`There is no act \u201C${s.mutation}\u201D.`,reason:"invalid"});continue}let t=a.permits(n,u);if(!t.ok){p.push({id:e,label:g(e),message:t.refusal.message,reason:"forbidden"});continue}if(!a.wouldChange(n,u)){h.push(e);continue}o.push({id:e,call:n})}let y=e=>a.previewAll(e,{...u?{author:u}:{},...r.context?{context:r.context}:{}});for(let e=0;o.length>0;e+=1)try{y(o.map(n=>n.call));break}catch(n){let t=[];for(let i of o)try{y([i.call]),t.push(i)}catch(f){p.push({id:i.id,label:g(i.id),message:l(f),reason:x(f).reason})}if(t.length===o.length||e>o.length){for(let i of t)p.push({id:i.id,label:g(i.id),message:l(n),reason:x(n).reason});o=[];break}o=t}if(o.length===0)return{applied:[],unchanged:h,refused:p};let b=s.label??(m?v(m):s.mutation),S=[...new Set(o.map(e=>a.graph.getNode(e.id)?.kind))],A=`${b} \u2014 ${S.length===1&&S[0]?j(a.schema,S[0],o.length):`${o.length} records`}`;try{let e=a.applyAll(o.map(n=>n.call),{intent:A,...u?{author:u}:{},...r.via?{via:r.via}:{}});return{batch:e.batch,intent:A,applied:o.map(n=>n.id),unchanged:h,refused:p,result:e}}catch(e){let n=l(e),t=x(e).reason;return{applied:[],unchanged:h,refused:[...p,...o.map(i=>({id:i.id,label:g(i.id),message:n,reason:t}))],allOrNothing:!0}}}export{V as a,_ as b};
|
|
@@ -1,17 +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 G,b as J}from"./chunk.53HW224Y.js";import"./chunk.RECTEAG4.js";import{a as S,b as W}from"./chunk.MB7LKKUD.js";import{a as K}from"./chunk.O2XPLDMM.js";import"./chunk.CM7EDQ4E.js";import"./chunk.YR7DKU5T.js";import"./chunk.NKUNCQB3.js";import"./chunk.HMV4ILAC.js";import"./chunk.XAN7QXMQ.js";import"./chunk.CHG522KL.js";import"./chunk.IRPMGHZN.js";import"./chunk.7QWGIGHM.js";import"./chunk.HRLCDBMO.js";import"./chunk.LZNHTROY.js";import"./chunk.36FKQJFM.js";import"./chunk.RHV73CBA.js";import"./chunk.ZGJUCVT5.js";import"./chunk.CVVNHQPO.js";import"./chunk.YIDNZTON.js";import"./chunk.QILGAV7H.js";import"./chunk.I6HIVTXU.js";import"./chunk.PYGNO2AV.js";import"./chunk.3HFBHLXC.js";import{D as H,E as V,G as ee,Oa as _,Y as D,Ya as x,ha as F}from"./chunk.CUA7F3YJ.js";import{a as j}from"./chunk.SDO3U72B.js";import{oa as q,zd as B}from"./chunk.IUVRJDL3.js";import"./chunk.FQLNBIQ5.js";import{b}from"./chunk.AJZBJBMO.js";var t=b(ee(),1);var a=b(D(),1);function ae(n){let r=[];return n.applied.length>0&&n.intent&&r.push(`${n.intent}.`),n.unchanged.length>0&&r.push(`${n.unchanged.length} already so.`),n.allOrNothing&&r.push("None of it was kept."),r.join(" ")}var re=_(j(()=>(__graviewPreload(import.meta.url,["./chunk.M7DJJRFH.js","./chunk.6VG2LCES.js","./chunk.I3ADXJQW.js","./chunk.BJUUSIQY.js","./chunk.HMV4ILAC.js","./chunk.UVMHC6VM.js","./chunk.XAN7QXMQ.js","./chunk.XJ4JYROM.js","./chunk.XOZU4OFA.js","./chunk.CHG522KL.js","./chunk.7QWGIGHM.js","./chunk.ZGJUCVT5.js","./chunk.CVVNHQPO.js","./chunk.YIDNZTON.js","./chunk.QILGAV7H.js","./chunk.I6HIVTXU.js","./chunk.PYGNO2AV.js","./chunk.3HFBHLXC.js","./chunk.CUA7F3YJ.js","./chunk.SDO3U72B.js","./chunk.IUVRJDL3.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.ZQSV5XVB.js")))),te=re.part((n,r)=>(0,a.jsx)(n.SeveralAi,{...r}),{quiet:!0});function ne(n){let r=F()?.ai;return!H(r)||!V(r)?null:(0,a.jsx)(t.Suspense,{fallback:null,children:(0,a.jsx)(te,{...n})})}function ge({store:n,chosen:r,principal:d,context:v,via:k,anchor:A,of:g,onChooseAll:E,onClear:m,onActed:Q}){let[U,X]=(0,t.useState)(0);(0,t.useEffect)(()=>n.subscribe(()=>X(e=>e+1)),[n]);let f=r.join(`
|
|
2
|
-
`),{acts:c,withheld:N}=(0,t.useMemo)(()=>G(n,r,{...d?{principal:d}:{},...v?{context:v}:{}}),[n,f,d,v,U]),[O,p]=(0,t.useState)(!1),[l,u]=(0,t.useState)(null),[s,P]=(0,t.useState)(null),h=(0,t.useRef)(null),L=(0,t.useId)(),w=(0,t.useMemo)(()=>[...new Set(r.map(e=>n.graph.getNode(e)?.kind))],[n,f]),Y=w.length===1&&w[0]?`${q(n.schema,w[0],r.length)} chosen`:`${r.length} chosen`,M=typeof matchMedia=="function"&&matchMedia("(pointer: coarse), (max-width: 599px)").matches?2:3,C=c.filter(e=>!e.more),Z=C.slice(0,M),R=[...C.slice(M),...c.filter(e=>e.more)];(0,t.useEffect)(()=>{u(null),p(!1)},[f]),(0,t.useLayoutEffect)(()=>{let e=h.current;if(!e)return;if(typeof e.showPopover=="function"&&!x(e))try{e.showPopover()}catch{}let i=()=>{W(e,A?.()??null),dispatchEvent(new Event(S))};i(),addEventListener("resize",i),addEventListener("scroll",i,!0);let o=typeof ResizeObserver=="function"?new ResizeObserver(i):null;return o?.observe(e),()=>{if(o?.disconnect(),removeEventListener("resize",i),removeEventListener("scroll",i,!0),e.isConnected&&x(e))try{e.hidePopover()}catch{}dispatchEvent(new Event(S))}},[A]);let y=(0,t.useRef)({asking:l,onClear:m});y.current={asking:l,onClear:m},(0,t.useEffect)(()=>{let e=i=>{if(i.key!=="Escape"||i.defaultPrevented)return;let o=document.activeElement;if(!(!(h.current?.contains(o)??!1)&&(o instanceof HTMLTextAreaElement||o instanceof HTMLInputElement&&o.type!=="checkbox"||o instanceof HTMLSelectElement))){if(i.preventDefault(),i.stopPropagation(),y.current.asking){u(null);return}y.current.onClear()}};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[]);let T=(e,i={})=>{let o=J(n,{mutation:e.mutation,subject:e.subject,args:{...e.args,...i},label:e.label},r,{...d?{author:d}:{},...k?{via:k}:{},...v?{context:v}:{}});u(null),p(!1),P(o.refused.length>0||o.applied.length===0?o:null),Q(o.refused.map(I=>I.id))},$=e=>{P(null),p(!1),e.open.length>0?u(e):T(e)},z=e=>(0,a.jsxs)("button",{type:"button",className:"graview-several-act","data-testid":"several-act","data-act":e.id,"data-mutation":e.mutation,...e.destructive?{"data-tone":"warn"}:{},"aria-pressed":l?.id===e.id?!0:void 0,onClick:()=>$(e),children:[e.label,e.open.length>0?"\u2026":""]},e.id);return(0,a.jsxs)("div",{ref:h,popover:"manual",role:"region","aria-label":"The chosen records",className:"graview-several-bar","data-testid":"several-bar","data-graview-foot":"","data-graview-overlay":"","data-graview-popover":"","data-graview-offstage":"",style:ie,children:[(0,a.jsx)("style",{children:oe}),(0,a.jsxs)("div",{className:"graview-several-line",children:[(0,a.jsx)("span",{role:"status","aria-live":"polite",className:"graview-several-count","data-testid":"several-count",children:Y}),(0,a.jsxs)("div",{role:"group","aria-label":`What to do with the ${r.length} chosen`,className:"graview-several-acts",children:[Z.map(z),R.length>0?(0,a.jsx)("button",{type:"button",className:"graview-several-act","data-testid":"several-more","aria-expanded":O,"aria-controls":L,onClick:()=>p(e=>!e),children:"More"}):null,E&&g!==void 0&&g>r.length?(0,a.jsxs)("button",{type:"button",className:"graview-several-quiet","data-testid":"several-all",onClick:E,children:["Choose all ",g]}):null,(0,a.jsx)("button",{type:"button",className:"graview-several-quiet","data-testid":"several-clear","aria-keyshortcuts":"Escape",title:"Put the choice down \u2014 Escape",onClick:m,children:"Clear"})]})]}),c.length>0&&r.length>1?(0,a.jsx)(ne,{chosen:r,acts:c,onAct:$}):null,O?(0,a.jsx)("div",{id:L,role:"group","aria-label":"More",className:"graview-several-acts","data-testid":"several-more-acts",children:R.map(z)}):null,c.length===0?(0,a.jsx)("p",{className:"graview-several-said","data-testid":"several-none",children:N.length>0?`Nothing here can be done to all of them by you: ${N[0].message}`:"Nothing can be done to all of these at once."}):null,l?(0,a.jsx)("div",{className:"graview-several-ask",role:"group","aria-label":`${l.label}, for all ${r.length}`,"data-testid":"several-ask",children:(0,a.jsx)(K,{store:n,affordance:l.affordance,onApply:e=>T(l,e),onCancel:()=>u(null)})}):null,s?(0,a.jsxs)("div",{role:"alert",className:"graview-several-said","data-testid":"several-outcome",children:[ae(s),s.refused.length>0?(0,a.jsxs)(a.Fragment,{children:[" ",s.refused.length===1?"One was not changed, and is still chosen:":`${s.refused.length} were not changed, and are still chosen:`,(0,a.jsx)("ul",{"data-testid":"several-refused",children:s.refused.map(e=>(0,a.jsxs)("li",{"data-record":e.id,children:["\u201C",e.label,"\u201D \u2014 ",e.message]},e.id))})]}):null]}):null]})}var ie={position:"fixed",inset:"auto",margin:0,zIndex:B("toast"),boxSizing:"border-box",width:"max-content",height:"auto",bottom:"calc(16px + env(safe-area-inset-bottom, 0px))",left:16,overflow:"visible"},oe=`
|
|
3
|
-
.graview-several-bar{display:grid;gap:8px;padding:8px 10px;border:1px solid var(--graview-edge);border-radius:var(--graview-radius,12px);background:var(--graview-float);color:var(--graview-ink);box-shadow:var(--graview-lift-high);font-size:.875rem;line-height:1.4;max-height:70vh;overflow:auto}
|
|
4
|
-
.graview-several-line{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;min-width:0}
|
|
5
|
-
.graview-several-count{font-weight:600;white-space:nowrap}
|
|
6
|
-
.graview-several-acts{display:flex;flex-wrap:wrap;align-items:center;gap:6px;min-width:0}
|
|
7
|
-
.graview-several-act,.graview-several-quiet{min-height:32px;padding:0 12px;border-radius:8px;font:inherit;cursor:pointer;box-shadow:none}
|
|
8
|
-
.graview-several-act{border:1px solid var(--graview-edge);background:transparent;color:var(--graview-ink);font-weight:600}
|
|
9
|
-
.graview-several-act:hover,.graview-several-act[aria-pressed=true],.graview-several-act[aria-expanded=true]{background:color-mix(in srgb,var(--graview-accent) 14%,transparent)}
|
|
10
|
-
.graview-several-act[data-tone=warn]{color:var(--graview-warn)}
|
|
11
|
-
.graview-several-quiet{border:0;background:none;color:var(--graview-ink-muted);text-decoration:underline;text-underline-offset:2px}
|
|
12
|
-
.graview-several-bar :focus-visible{outline:2px solid var(--graview-accent);outline-offset:2px}
|
|
13
|
-
.graview-several-said{margin:0;max-width:52ch;overflow-wrap:anywhere}
|
|
14
|
-
.graview-several-said ul{margin:4px 0 0;padding-left:18px}
|
|
15
|
-
.graview-several-ask{padding:8px 4px 2px;border-top:1px solid var(--graview-edge)}
|
|
16
|
-
@media (pointer: coarse){.graview-several-act,.graview-several-quiet{min-height:44px}}
|
|
17
|
-
`;export{ge as SeveralBar};
|