graview 0.1.57 → 0.1.58
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.N33WUCAN.js → chunk.27CW6SCT.js} +1 -1
- package/dist/preview/{chunk.XTBS64IT.js → chunk.2EDC63RI.js} +1 -1
- package/dist/preview/{chunk.JD5HSAMC.js → chunk.2VYNNWW5.js} +3 -3
- package/dist/preview/chunk.32FMOHZK.js +1 -0
- package/dist/preview/{chunk.LHIT3EZD.js → chunk.34TW32TB.js} +2 -2
- package/dist/preview/{chunk.QMYHXMRV.js → chunk.3FCOFEGW.js} +1 -1
- package/dist/preview/{chunk.JETT6ELP.js → chunk.3OYGXYQY.js} +1 -1
- package/dist/preview/{chunk.RQX4CQJN.js → chunk.3YZHZGTM.js} +1 -1
- package/dist/preview/{chunk.YS5U3DUX.js → chunk.43OKZU73.js} +1 -1
- package/dist/preview/{chunk.O47MN7E5.js → chunk.4444RPWW.js} +1 -1
- package/dist/preview/{chunk.N2DM42SG.js → chunk.47JQPYXL.js} +2 -2
- package/dist/preview/{chunk.57BKS5KD.js → chunk.4AFFPYOK.js} +1 -1
- package/dist/preview/chunk.4GGPPCMM.js +1 -0
- package/dist/preview/{chunk.534TBZJ3.js → chunk.4HSH2UIK.js} +2 -2
- package/dist/preview/{chunk.LKJ6FD6Y.js → chunk.4KC35UNR.js} +1 -1
- package/dist/preview/{chunk.EZ4NUZWX.js → chunk.4Y2JTY6Q.js} +1 -1
- package/dist/preview/{chunk.5BPRGXIW.js → chunk.5ICIMQE6.js} +1 -1
- package/dist/preview/{chunk.YR75TWDV.js → chunk.64R3K2OE.js} +1 -1
- package/dist/preview/chunk.6K7EN2YI.js +1 -0
- package/dist/preview/{chunk.YQXA4WAM.js → chunk.6VC6AGYV.js} +2 -2
- package/dist/preview/{chunk.4HPP35XQ.js → chunk.6W7O5YLL.js} +1 -1
- package/dist/preview/chunk.7BBGRTXM.js +5 -0
- package/dist/preview/{chunk.IRQOJATD.js → chunk.7MSFDD7J.js} +1 -1
- package/dist/preview/{chunk.XVN3CQKH.js → chunk.7SQAKSJD.js} +1 -1
- package/dist/preview/{chunk.DM5X3JBH.js → chunk.7V23SXGJ.js} +1 -1
- package/dist/preview/{chunk.DWLKJGVT.js → chunk.A6C4AGJJ.js} +1 -1
- package/dist/preview/{chunk.LWRXCO2Z.js → chunk.ACYDJQRC.js} +1 -1
- package/dist/preview/{chunk.RVR6FWAF.js → chunk.ARWBIBSI.js} +1 -1
- package/dist/preview/{chunk.7VIFAN3O.js → chunk.B2GVJD6H.js} +1 -1
- package/dist/preview/{chunk.NL3AJZ3N.js → chunk.B3WZHPM3.js} +1 -1
- package/dist/preview/{chunk.5NZDFT6R.js → chunk.BB33TI4S.js} +1 -1
- package/dist/preview/{chunk.UBNZDSS7.js → chunk.BKVBX2YB.js} +1 -1
- package/dist/preview/{chunk.FLMNWVSY.js → chunk.BTVBZ6KE.js} +2 -2
- package/dist/preview/{chunk.JBSW7ZNH.js → chunk.CCWPF5PK.js} +1 -1
- package/dist/preview/{chunk.7UBABS2T.js → chunk.D5KTGX7F.js} +1 -1
- package/dist/preview/{chunk.YPP7FSEZ.js → chunk.DBZHRYBK.js} +1 -1
- package/dist/preview/{chunk.NUS5K56R.js → chunk.DM767F2Q.js} +2 -2
- package/dist/preview/{chunk.MAZFQIL5.js → chunk.E34OQVSR.js} +1 -1
- package/dist/preview/{chunk.72IHABM5.js → chunk.E5MSFXL6.js} +1 -1
- package/dist/preview/{chunk.7ML2BWSP.js → chunk.EB4NVTJL.js} +1 -1
- package/dist/preview/{chunk.ZNXRHOUI.js → chunk.ELAMMS2V.js} +1 -1
- package/dist/preview/{chunk.QPL3OXW3.js → chunk.ELERUERU.js} +1 -1
- package/dist/preview/{chunk.I636CZE4.js → chunk.EPPXZZPK.js} +1 -1
- package/dist/preview/{chunk.LUIRQ5UF.js → chunk.EQTSV7BK.js} +1 -1
- package/dist/preview/{chunk.MRHPOUA4.js → chunk.ETBFD76E.js} +1 -1
- package/dist/preview/{chunk.VHPGGC2P.js → chunk.F7SF6EP2.js} +1 -1
- package/dist/preview/{chunk.DSLGMCB6.js → chunk.GCBZ3WE2.js} +1 -1
- package/dist/preview/{chunk.IX63LTRQ.js → chunk.GDOTG7YA.js} +1 -1
- package/dist/preview/{chunk.LE2KAR25.js → chunk.GEB2DFBU.js} +1 -1
- package/dist/preview/{chunk.V6FUYRZI.js → chunk.GKSUTAIX.js} +1 -1
- package/dist/preview/{chunk.4L4F47QP.js → chunk.GP7F3PEF.js} +1 -1
- package/dist/preview/{chunk.FJTWAU7N.js → chunk.GQBJVCSM.js} +1 -1
- package/dist/preview/{chunk.IV7AUO53.js → chunk.GUEHKCWN.js} +1 -1
- package/dist/preview/{chunk.4HFCOMR3.js → chunk.GZB6A6KF.js} +1 -1
- package/dist/preview/{chunk.D3LQJXVP.js → chunk.H3BFHI3G.js} +1 -1
- package/dist/preview/{chunk.NZDWXX6H.js → chunk.HEWVPXRE.js} +1 -1
- package/dist/preview/{chunk.4NPXMYA5.js → chunk.HMFJT4KO.js} +1 -1
- package/dist/preview/{chunk.UGOKORIF.js → chunk.HS3GHAUR.js} +1 -1
- package/dist/preview/{chunk.DBMZ3AQB.js → chunk.HT2BEOEV.js} +1 -1
- package/dist/preview/{chunk.7IXTNST2.js → chunk.HXRV3WVJ.js} +1 -1
- package/dist/preview/{chunk.PQMMISCQ.js → chunk.HZB5F476.js} +1 -1
- package/dist/preview/{chunk.H5CRRBNU.js → chunk.I3WWCPQ2.js} +1 -1
- package/dist/preview/{chunk.UWQ3I5OW.js → chunk.IDJPBWL2.js} +1 -1
- package/dist/preview/{chunk.HFSG3F5Z.js → chunk.ILRCNTGT.js} +1 -1
- package/dist/preview/{chunk.I5PSHASU.js → chunk.INZQ6WZM.js} +1 -1
- package/dist/preview/{chunk.FLVE6IBM.js → chunk.IULQRCEE.js} +1 -1
- package/dist/preview/{chunk.JNNBHD4Z.js → chunk.JB7TTJXQ.js} +1 -1
- package/dist/preview/{chunk.Q6OZLBNL.js → chunk.JES77WXG.js} +1 -1
- package/dist/preview/{chunk.BUSFJM6P.js → chunk.JGKA5QBX.js} +1 -1
- package/dist/preview/chunk.JOAN54PN.js +1 -0
- package/dist/preview/{chunk.EXZLG3HK.js → chunk.JUNMJYH5.js} +1 -1
- package/dist/preview/{chunk.TVURUMU4.js → chunk.KFQSYCY3.js} +1 -1
- package/dist/preview/{chunk.NGK6IRV3.js → chunk.KJ264E6K.js} +1 -1
- package/dist/preview/{chunk.4XKRCAJZ.js → chunk.KJHPDL4N.js} +1 -1
- package/dist/preview/{chunk.FPGU43SC.js → chunk.KKNDX4JT.js} +1 -1
- package/dist/preview/{chunk.KYOI7BG3.js → chunk.KWJWAIQJ.js} +1 -1
- package/dist/preview/{chunk.MBLFZF5R.js → chunk.KXPRILAO.js} +1 -1
- package/dist/preview/chunk.L7V24JPO.js +1 -0
- package/dist/preview/chunk.LA4CPZ2N.js +1 -0
- package/dist/preview/{chunk.EZ4TZUMM.js → chunk.LCPGZK7G.js} +1 -1
- package/dist/preview/{chunk.7INWDFNG.js → chunk.LDAYDCUO.js} +1 -1
- package/dist/preview/{chunk.C7EJPV2N.js → chunk.LL2MLSPH.js} +1 -1
- package/dist/preview/{chunk.C5EFUODO.js → chunk.LMN4TSAP.js} +1 -1
- package/dist/preview/{chunk.TBRXNU6T.js → chunk.LO3U3P55.js} +1 -1
- package/dist/preview/{chunk.VDS3IOTK.js → chunk.LRUNFSHP.js} +1 -1
- package/dist/preview/{chunk.4W5GCPAP.js → chunk.LY3YOWKV.js} +1 -1
- package/dist/preview/{chunk.33PZEW5A.js → chunk.M34CS7DI.js} +1 -1
- package/dist/preview/{chunk.D4EP7FEC.js → chunk.MQ5HBUBL.js} +1 -1
- package/dist/preview/chunk.MV3AJ7JH.js +1 -0
- package/dist/preview/chunk.MYNQWWCL.js +1 -0
- package/dist/preview/{chunk.5GTOF5D5.js → chunk.NFX24NUI.js} +1 -1
- package/dist/preview/{chunk.47T3KUAA.js → chunk.NKC3JILT.js} +1 -1
- package/dist/preview/{chunk.N5MQARN6.js → chunk.NOFWGDOT.js} +1 -1
- package/dist/preview/{chunk.4UQBMFJZ.js → chunk.O4CVKTPJ.js} +1 -1
- package/dist/preview/{chunk.4OP4IEEY.js → chunk.OASYYMG5.js} +1 -1
- package/dist/preview/{chunk.VW4JAQCH.js → chunk.OHQ3JH65.js} +1 -1
- package/dist/preview/{chunk.NF72Z2HG.js → chunk.PBCNOFQH.js} +1 -1
- package/dist/preview/chunk.PM3SYXKB.js +1 -0
- package/dist/preview/{chunk.66LWZIY5.js → chunk.POBMGM3X.js} +1 -1
- package/dist/preview/{chunk.DJ4A76SX.js → chunk.PZG3B7F4.js} +1 -1
- package/dist/preview/chunk.QB25SMP6.js +1 -0
- package/dist/preview/{chunk.BZEJM2PY.js → chunk.QGV7H7RQ.js} +1 -1
- package/dist/preview/chunk.QPXXY2DL.js +1133 -0
- package/dist/preview/{chunk.BPEUHOKH.js → chunk.R7LFO7KI.js} +1 -1
- package/dist/preview/{chunk.NX7CR4AE.js → chunk.RE7DELSR.js} +1 -1
- package/dist/preview/{chunk.KPIDJYIU.js → chunk.RRKYJYZJ.js} +1 -1
- package/dist/preview/{chunk.KTV24HY7.js → chunk.S2H7B6RG.js} +1 -1
- package/dist/preview/chunk.S5MGE2U5.js +1 -0
- package/dist/preview/{chunk.Y3EOGXRS.js → chunk.SDVPJYVF.js} +1 -1
- package/dist/preview/{chunk.VSGTNYM2.js → chunk.SPXRLO5K.js} +1 -1
- package/dist/preview/{chunk.Z5UVYOGC.js → chunk.TBW7CU4G.js} +1 -1
- package/dist/preview/{chunk.4JDHBNEA.js → chunk.TF5I4VHX.js} +1 -1
- package/dist/preview/{chunk.4K6VAC2S.js → chunk.TJ647W6J.js} +2 -2
- package/dist/preview/{chunk.QS6YW7UY.js → chunk.TJOXNEFU.js} +1 -1
- package/dist/preview/{chunk.EQAAKYLA.js → chunk.TUUVVO5U.js} +1 -1
- package/dist/preview/{chunk.M72JKVHP.js → chunk.TWKXSLYY.js} +1 -1
- package/dist/preview/chunk.TXGNPW76.js +1 -0
- package/dist/preview/{chunk.WASWMHND.js → chunk.U6O3MMQR.js} +1 -1
- package/dist/preview/{chunk.6SD7YZ4U.js → chunk.UAP5M3CD.js} +2 -2
- package/dist/preview/chunk.UKMVJV6Q.js +1 -0
- package/dist/preview/chunk.UUG3BYVN.js +1 -0
- package/dist/preview/{chunk.BCE6LIDR.js → chunk.VG7OWV2H.js} +1 -1
- package/dist/preview/{chunk.MWWOI5PW.js → chunk.VHSWBFXB.js} +1 -1
- package/dist/preview/{chunk.3DPTDMJ7.js → chunk.VUPLFUUS.js} +1 -1
- package/dist/preview/chunk.WJFQIE3Y.js +1 -0
- package/dist/preview/{chunk.547FQPYG.js → chunk.WNQFHMNR.js} +1 -1
- package/dist/preview/{chunk.SAJLIA5M.js → chunk.WNSC3RWD.js} +1 -1
- package/dist/preview/{chunk.UV3U4FRT.js → chunk.WQOI6BLM.js} +1 -1
- package/dist/preview/{chunk.CUKRUQQ2.js → chunk.WXIEQZLY.js} +1 -1
- package/dist/preview/{chunk.53U6E5LD.js → chunk.XN2RVXOI.js} +1 -1
- package/dist/preview/{chunk.RALAID6N.js → chunk.XU34T2H4.js} +1 -1
- package/dist/preview/{chunk.JQFIZRAZ.js → chunk.YD3TKV6P.js} +2 -2
- package/dist/preview/{chunk.FRERJWZJ.js → chunk.YHTE34RN.js} +1 -1
- package/dist/preview/{chunk.CMLNBJZG.js → chunk.YIA2EDVF.js} +1 -1
- package/dist/preview/{chunk.AD3EC5DU.js → chunk.YP2F5UGY.js} +1 -1
- package/dist/preview/{chunk.G3BDQ6EA.js → chunk.YS6GVLIP.js} +1 -1
- package/dist/preview/{chunk.S5ECRIG5.js → chunk.YZZONE4M.js} +1 -1
- package/dist/preview/{chunk.2PWVDUOU.js → chunk.ZN5HTWSI.js} +1 -1
- package/dist/preview/{chunk.4BRM5SGO.js → chunk.ZOHMWSHD.js} +1 -1
- package/dist/preview/index.html +50 -50
- package/dist/preview/page.js +2 -2
- package/package.json +6 -6
- package/dist/preview/chunk.4SBYXHCQ.js +0 -1
- package/dist/preview/chunk.57KRCHQT.js +0 -1
- package/dist/preview/chunk.6AH26OL7.js +0 -1132
- package/dist/preview/chunk.7VZA34T4.js +0 -1
- package/dist/preview/chunk.CXB4BSI4.js +0 -1
- package/dist/preview/chunk.DIFR37EZ.js +0 -5
- package/dist/preview/chunk.DQUISKTC.js +0 -1
- package/dist/preview/chunk.DSWMXM57.js +0 -1
- package/dist/preview/chunk.GBAUQXXD.js +0 -1
- package/dist/preview/chunk.I2NI7CT7.js +0 -1
- package/dist/preview/chunk.I6H3HRWT.js +0 -1
- package/dist/preview/chunk.KO7IOFNY.js +0 -1
- package/dist/preview/chunk.OYUDK3LK.js +0 -1
- package/dist/preview/chunk.PF5P5YVD.js +0 -1
- package/dist/preview/chunk.WYPL2QUA.js +0 -1
- package/dist/preview/chunk.Y4KNR76Z.js +0 -1
- package/dist/preview/chunk.YDTXCVBU.js +0 -1
package/dist/preview/index.html
CHANGED
|
@@ -5,67 +5,67 @@
|
|
|
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.
|
|
13
|
-
<link rel="modulepreload" href="/chunk.
|
|
14
|
-
<link rel="modulepreload" href="/chunk.
|
|
15
|
-
<link rel="modulepreload" href="/chunk.
|
|
16
|
-
<link rel="modulepreload" href="/chunk.
|
|
8
|
+
<link rel="modulepreload" href="/chunk.PBCNOFQH.js">
|
|
9
|
+
<link rel="modulepreload" href="/chunk.S2H7B6RG.js">
|
|
10
|
+
<link rel="modulepreload" href="/chunk.RRKYJYZJ.js">
|
|
11
|
+
<link rel="modulepreload" href="/chunk.NOFWGDOT.js">
|
|
12
|
+
<link rel="modulepreload" href="/chunk.GUEHKCWN.js">
|
|
13
|
+
<link rel="modulepreload" href="/chunk.YIA2EDVF.js">
|
|
14
|
+
<link rel="modulepreload" href="/chunk.YD3TKV6P.js">
|
|
15
|
+
<link rel="modulepreload" href="/chunk.4KC35UNR.js">
|
|
16
|
+
<link rel="modulepreload" href="/chunk.HT2BEOEV.js">
|
|
17
17
|
<link rel="modulepreload" href="/chunk.SDO3U72B.js">
|
|
18
|
-
<link rel="modulepreload" href="/chunk.
|
|
18
|
+
<link rel="modulepreload" href="/chunk.7BBGRTXM.js">
|
|
19
19
|
<link rel="modulepreload" href="/chunk.FQLNBIQ5.js">
|
|
20
20
|
<link rel="modulepreload" href="/chunk.AJZBJBMO.js">
|
|
21
|
-
<link rel="modulepreload" href="/chunk.
|
|
22
|
-
<link rel="modulepreload" href="/chunk.
|
|
23
|
-
<link rel="modulepreload" href="/chunk.
|
|
24
|
-
<link rel="modulepreload" href="/chunk.
|
|
25
|
-
<link rel="modulepreload" href="/chunk.
|
|
26
|
-
<link rel="modulepreload" href="/chunk.
|
|
21
|
+
<link rel="modulepreload" href="/chunk.32FMOHZK.js">
|
|
22
|
+
<link rel="modulepreload" href="/chunk.2VYNNWW5.js">
|
|
23
|
+
<link rel="modulepreload" href="/chunk.TF5I4VHX.js">
|
|
24
|
+
<link rel="modulepreload" href="/chunk.TWKXSLYY.js">
|
|
25
|
+
<link rel="modulepreload" href="/chunk.6VC6AGYV.js">
|
|
26
|
+
<link rel="modulepreload" href="/chunk.IDJPBWL2.js">
|
|
27
27
|
<link rel="modulepreload" href="/chunk.UGFDSE37.js">
|
|
28
28
|
<link rel="modulepreload" href="/chunk.PXQVXBNG.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.
|
|
41
|
-
<link rel="modulepreload" href="/chunk.
|
|
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.
|
|
29
|
+
<link rel="modulepreload" href="/chunk.BTVBZ6KE.js">
|
|
30
|
+
<link rel="modulepreload" href="/chunk.3OYGXYQY.js">
|
|
31
|
+
<link rel="modulepreload" href="/chunk.GCBZ3WE2.js">
|
|
32
|
+
<link rel="modulepreload" href="/chunk.GDOTG7YA.js">
|
|
33
|
+
<link rel="modulepreload" href="/chunk.EPPXZZPK.js">
|
|
34
|
+
<link rel="modulepreload" href="/chunk.KFQSYCY3.js">
|
|
35
|
+
<link rel="modulepreload" href="/chunk.WQOI6BLM.js">
|
|
36
|
+
<link rel="modulepreload" href="/chunk.LCPGZK7G.js">
|
|
37
|
+
<link rel="modulepreload" href="/chunk.NKC3JILT.js">
|
|
38
|
+
<link rel="modulepreload" href="/chunk.HEWVPXRE.js">
|
|
39
|
+
<link rel="modulepreload" href="/chunk.LMN4TSAP.js">
|
|
40
|
+
<link rel="modulepreload" href="/chunk.HS3GHAUR.js">
|
|
41
|
+
<link rel="modulepreload" href="/chunk.LRUNFSHP.js">
|
|
42
|
+
<link rel="modulepreload" href="/chunk.43OKZU73.js">
|
|
43
|
+
<link rel="modulepreload" href="/chunk.WNSC3RWD.js">
|
|
44
|
+
<link rel="modulepreload" href="/chunk.ACYDJQRC.js">
|
|
45
|
+
<link rel="modulepreload" href="/chunk.S5MGE2U5.js">
|
|
46
|
+
<link rel="modulepreload" href="/chunk.34TW32TB.js">
|
|
47
47
|
<link rel="modulepreload" href="/chunk.BJUUSIQY.js">
|
|
48
|
-
<link rel="modulepreload" href="/chunk.
|
|
49
|
-
<link rel="modulepreload" href="/chunk.
|
|
48
|
+
<link rel="modulepreload" href="/chunk.VG7OWV2H.js">
|
|
49
|
+
<link rel="modulepreload" href="/chunk.KXPRILAO.js">
|
|
50
50
|
<link rel="modulepreload" href="/chunk.XOZU4OFA.js">
|
|
51
|
-
<link rel="modulepreload" href="/chunk.
|
|
51
|
+
<link rel="modulepreload" href="/chunk.BB33TI4S.js">
|
|
52
52
|
<link rel="modulepreload" href="/chunk.MB7LKKUD.js">
|
|
53
53
|
<link rel="modulepreload" href="/chunk.WVUJXDXZ.js">
|
|
54
|
-
<link rel="modulepreload" href="/chunk.
|
|
55
|
-
<link rel="modulepreload" href="/chunk.
|
|
56
|
-
<link rel="modulepreload" href="/chunk.
|
|
57
|
-
<link rel="modulepreload" href="/chunk.
|
|
58
|
-
<link rel="modulepreload" href="/chunk.
|
|
54
|
+
<link rel="modulepreload" href="/chunk.LDAYDCUO.js">
|
|
55
|
+
<link rel="modulepreload" href="/chunk.KKNDX4JT.js">
|
|
56
|
+
<link rel="modulepreload" href="/chunk.GKSUTAIX.js">
|
|
57
|
+
<link rel="modulepreload" href="/chunk.5ICIMQE6.js">
|
|
58
|
+
<link rel="modulepreload" href="/chunk.QGV7H7RQ.js">
|
|
59
59
|
<link rel="modulepreload" href="/chunk.GZHZLJBF.js">
|
|
60
|
-
<link rel="modulepreload" href="/chunk.
|
|
60
|
+
<link rel="modulepreload" href="/chunk.ELERUERU.js">
|
|
61
61
|
<link rel="modulepreload" href="/chunk.OJGHDWI6.js">
|
|
62
|
-
<link rel="modulepreload" href="/chunk.
|
|
63
|
-
<link rel="modulepreload" href="/chunk.
|
|
64
|
-
<link rel="modulepreload" href="/chunk.
|
|
65
|
-
<link rel="modulepreload" href="/chunk.
|
|
66
|
-
<link rel="modulepreload" href="/chunk.
|
|
67
|
-
<link rel="modulepreload" href="/chunk.
|
|
68
|
-
<script>(()=>{const later=["/chunk.
|
|
62
|
+
<link rel="modulepreload" href="/chunk.YHTE34RN.js">
|
|
63
|
+
<link rel="modulepreload" href="/chunk.3YZHZGTM.js">
|
|
64
|
+
<link rel="modulepreload" href="/chunk.EQTSV7BK.js">
|
|
65
|
+
<link rel="modulepreload" href="/chunk.27CW6SCT.js">
|
|
66
|
+
<link rel="modulepreload" href="/chunk.6K7EN2YI.js">
|
|
67
|
+
<link rel="modulepreload" href="/chunk.KWJWAIQJ.js">
|
|
68
|
+
<script>(()=>{const later=["/chunk.QB25SMP6.js","/chunk.I3WWCPQ2.js","/chunk.UAP5M3CD.js","/chunk.HJCQ6I3S.js","/chunk.HXRV3WVJ.js","/chunk.MQ5HBUBL.js","/chunk.7SQAKSJD.js","/chunk.LL2MLSPH.js","/chunk.EB4NVTJL.js","/chunk.2EDC63RI.js","/chunk.LA4CPZ2N.js","/chunk.YP2F5UGY.js","/chunk.4HSH2UIK.js","/chunk.R7LFO7KI.js","/chunk.ZOHMWSHD.js","/chunk.PZG3B7F4.js","/chunk.B3WZHPM3.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>
|
|
69
69
|
<style>html,body{margin:0;height:100%}#graview-app{min-height:100dvh}</style>
|
|
70
70
|
</head>
|
|
71
71
|
<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 ro}from"./chunk.NF72Z2HG.js";import{a as Wt,b as lr,c as ur,d as fr,e as It,f as pr,g as mr,h as hr,i as yr,j as gr,k as wr,l as vr,m as br,n as Ue}from"./chunk.KTV24HY7.js";import{b as dr}from"./chunk.KPIDJYIU.js";import{a as Bt,b as or,c as ar,d as ir,e as sr,f as $t,g as cr,h as Nt}from"./chunk.N5MQARN6.js";import{a as Rt,g as Ln}from"./chunk.IV7AUO53.js";import{k as it}from"./chunk.CMLNBJZG.js";import{E as tr,I as nr,J as rr,h as Yn,k as Dt,l as Qn,n as Zn,r as Xn,w as Vt,z as er}from"./chunk.JQFIZRAZ.js";import{c as no}from"./chunk.LKJ6FD6Y.js";import{Aa as qn,Ca as zn,Da as Gn,Fa as Un,G as Mt,Ga as Ht,Ka as Kn,La as Jn,Oa as dt,T as Dn,Z as Vn,a as Mn,b as st,c as ct,ga as Bn,ha as $n,j as Hn,m as Lt,va as Nn,wa as Wn,xa as In,ya as _n,za as jn}from"./chunk.DBMZ3AQB.js";import{a as Te}from"./chunk.SDO3U72B.js";import{$d as Cn,Eb as Sn,Pd as Re,Qd as Fn,Rd as On,Wd as xt,Xc as kn,Xd as Ft,Yd as Ot,ae as Ct,fb as _e,hc as Tt,hd as An,ic as Pn,id as En,nd as Rn,pd as Tn,qb as ot,qd as xn,rb as bn,sd as at}from"./chunk.DIFR37EZ.js";import"./chunk.FQLNBIQ5.js";import{b as De}from"./chunk.AJZBJBMO.js";function _t(e){if(Array.isArray(e))return e.map(_t);if(e&&typeof e=="object"){let n={};for(let o of Object.keys(e).sort()){let i=e[o];i!==void 0&&(n[o]=_t(i))}return n}return e}function jt(e){return JSON.stringify(_t(e))??"undefined"}async function lt(e,n={}){let o=e.compiled===void 0||!ao(e.compiled,e.document)?void 0:Ln(e.compiled,n);if(o?.ok)return o;let{compileDocumentWithoutCheck:i}=await oo();return i(e.document,n)}var Sr,oo=()=>Sr??=(__graviewPreload(import.meta.url,["./chunk.IV7AUO53.js","./chunk.V6FUYRZI.js","./chunk.BZEJM2PY.js","./chunk.CMLNBJZG.js","./chunk.DIFR37EZ.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.DQUISKTC.js")).catch(e=>{throw Sr=void 0,e});function ao(e,n){let o=typeof e=="object"&&e!==null?e.document:void 0,i=n;if(typeof i=="string")try{i=JSON.parse(i)}catch{return!1}return o!==void 0&&jt(Rt(o).document)===jt(Rt(i).document)}var d=De(Mt(),1);var ft=De(Mt(),1),qt="data-graview-drawn",io=200,Pr=50,so=1e4,ut=()=>typeof performance<"u"?performance.now():Date.now();function co(e){let n=[...e.querySelectorAll("img")];for(let o of e.querySelectorAll("[data-worker-view]"))o.shadowRoot&&n.push(...o.shadowRoot.querySelectorAll("img"));return n}function lo(e,n){if(e.ownerDocument.fonts?.status==="loading"||Wn()>0||qn(n)>0||e.querySelector('[aria-busy="true"]')||co(e).some(i=>!i.complete&&i.loading!=="lazy"))return!1;for(let i of e.querySelectorAll("[data-worker-view-place]"))if(!i.querySelector("[data-worker-view][data-worker-view-drawn], [data-worker-view][data-worker-view-failed]"))return!1;return!0}function kr(e){let n=e.querySelector("[data-embed-content]"),o=[...e.querySelectorAll("[data-worker-view]")].map(i=>`${i.offsetWidth}x${i.offsetHeight}`);return`${e.scrollWidth}x${e.scrollHeight}|${n?`${n.scrollWidth}x${n.scrollHeight}`:""}|${o.join(",")}`}function uo(e,n,o,i){e.removeAttribute(qt);let c=e.ownerDocument.defaultView;if(!c)return()=>{};let l=ut(),S=l,p=kr(e),w=!1,E,T=typeof MutationObserver>"u"?void 0:new MutationObserver(v=>{v.some(_=>!(_.target===e&&_.attributeName===qt))&&(S=ut())});T?.observe(e,{childList:!0,subtree:!0,characterData:!0,attributes:!0});let P=()=>{w=!0,T?.disconnect(),E!==void 0&&clearTimeout(E)},k=v=>{let _=!1,de=()=>{_||(_=!0,v())};typeof c.requestAnimationFrame=="function"&&c.requestAnimationFrame(()=>setTimeout(de,0)),setTimeout(de,100)},F=()=>{if(w)return;let v=kr(e);v!==p&&(p=v,S=ut());let _=ut();if(lo(e,i)&&_-S>=io||_-l>=so){k(()=>{w||(P(),e.setAttribute(qt,n),Gn(),o())});return}E=setTimeout(F,Pr)};return E=setTimeout(F,Pr),P}function Ar(e,n,o,i,c){zn();let l=(0,ft.useRef)({place:o,onDrawn:i});l.current={place:o,onDrawn:i},(0,ft.useLayoutEffect)(()=>{c&&jn(c);let S=E=>uo(E,l.current.place.path,()=>l.current.onDrawn?.(l.current.place),c);if(e.current)return S(e.current);let p,w=!1;return queueMicrotask(()=>{!w&&e.current&&(p=S(e.current))}),()=>{w=!0,p?.()}},[n,e,c])}var ve=De(Mt(),1),Ke,fo=Te(()=>(__graviewPreload(import.meta.url,["./chunk.5IEFTFKQ.js","./chunk.4UQBMFJZ.js","./chunk.QMYHXMRV.js","./chunk.Z5UVYOGC.js","./chunk.VSGTNYM2.js","./chunk.DBMZ3AQB.js","./chunk.SDO3U72B.js","./chunk.DIFR37EZ.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.FJTWAU7N.js"))),Er=()=>fo().then(e=>void(Ke=e),()=>new Promise(e=>setTimeout(e,2e3)).then(Er)),zt=Nn(Er),Rr=e=>!!e&&Ke===void 0;function Gt({onReady:e,fetch:n}){return(0,ve.useLayoutEffect)(()=>void n().then(e),[e,n]),null}var po=0;function Tr(e){let[n,o]=(0,ve.useState)(()=>Ke);(0,ve.useEffect)(()=>{if(!e||n)return;let l=!1;return zt().then(()=>{l||o(Ke)}),()=>{l=!0}},[e,n]);let i=(0,ve.useMemo)(()=>po+=1,[e]);return{over:(0,ve.useMemo)(()=>{let l=n??Ke;if(!e||!l)return;let{source:S,worker:p,...w}=e,E={...w,worker:p??{source:S},draft:!0};return{name:e.manifest.name,home:e.manifest.attach==="home",register:T=>l.registerWorkerView(T,E)}},[e,n]),n:i}}var Or=De(ro(),1),I=De(no(),1);var g=De(Dn(),1);function pt(e,n={}){let o=Ht(e);return{Face:o.part((c,l)=>(0,d.createElement)(c,l),n),fetch:()=>o.load().then(()=>{}),here:()=>o.current!==void 0||o.failed}}var Jt=e=>Promise.all([e,nr()]).then(([n])=>n),Cr=Te(()=>(__graviewPreload(import.meta.url,["./chunk.UWQ3I5OW.js","./chunk.JETT6ELP.js","./chunk.6SD7YZ4U.js","./chunk.IX63LTRQ.js","./chunk.TVURUMU4.js","./chunk.47T3KUAA.js","./chunk.NZDWXX6H.js","./chunk.HJCQ6I3S.js","./chunk.7IXTNST2.js","./chunk.D4EP7FEC.js","./chunk.BPEUHOKH.js","./chunk.UGOKORIF.js","./chunk.4BRM5SGO.js","./chunk.DJ4A76SX.js","./chunk.VDS3IOTK.js","./chunk.SAJLIA5M.js","./chunk.I2NI7CT7.js","./chunk.C7EJPV2N.js","./chunk.7ML2BWSP.js","./chunk.BCE6LIDR.js","./chunk.MBLFZF5R.js","./chunk.KTV24HY7.js","./chunk.KPIDJYIU.js","./chunk.XTBS64IT.js","./chunk.GZHZLJBF.js","./chunk.QPL3OXW3.js","./chunk.OJGHDWI6.js","./chunk.FRERJWZJ.js","./chunk.RQX4CQJN.js","./chunk.LUIRQ5UF.js","./chunk.N33WUCAN.js","./chunk.JQFIZRAZ.js","./chunk.LKJ6FD6Y.js","./chunk.DBMZ3AQB.js","./chunk.SDO3U72B.js","./chunk.DIFR37EZ.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.6AH26OL7.js"))),mo=Te(()=>(__graviewPreload(import.meta.url,["./chunk.JD5HSAMC.js","./chunk.4JDHBNEA.js","./chunk.M72JKVHP.js","./chunk.YQXA4WAM.js","./chunk.UWQ3I5OW.js","./chunk.UGFDSE37.js","./chunk.PXQVXBNG.js","./chunk.FLMNWVSY.js","./chunk.JETT6ELP.js","./chunk.DSLGMCB6.js","./chunk.IX63LTRQ.js","./chunk.I636CZE4.js","./chunk.TVURUMU4.js","./chunk.UV3U4FRT.js","./chunk.EZ4TZUMM.js","./chunk.47T3KUAA.js","./chunk.NZDWXX6H.js","./chunk.C5EFUODO.js","./chunk.UGOKORIF.js","./chunk.VDS3IOTK.js","./chunk.YS5U3DUX.js","./chunk.SAJLIA5M.js","./chunk.LWRXCO2Z.js","./chunk.I2NI7CT7.js","./chunk.LHIT3EZD.js","./chunk.BJUUSIQY.js","./chunk.BCE6LIDR.js","./chunk.MBLFZF5R.js","./chunk.XOZU4OFA.js","./chunk.5NZDFT6R.js","./chunk.MB7LKKUD.js","./chunk.WVUJXDXZ.js","./chunk.7INWDFNG.js","./chunk.FPGU43SC.js","./chunk.V6FUYRZI.js","./chunk.5BPRGXIW.js","./chunk.BZEJM2PY.js","./chunk.CMLNBJZG.js","./chunk.GZHZLJBF.js","./chunk.QPL3OXW3.js","./chunk.OJGHDWI6.js","./chunk.FRERJWZJ.js","./chunk.RQX4CQJN.js","./chunk.LUIRQ5UF.js","./chunk.N33WUCAN.js","./chunk.JQFIZRAZ.js","./chunk.LKJ6FD6Y.js","./chunk.DBMZ3AQB.js","./chunk.SDO3U72B.js","./chunk.DIFR37EZ.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.I6H3HRWT.js"))),ho=Te(()=>(__graviewPreload(import.meta.url,["./chunk.JD5HSAMC.js","./chunk.4JDHBNEA.js","./chunk.M72JKVHP.js","./chunk.YQXA4WAM.js","./chunk.UWQ3I5OW.js","./chunk.UGFDSE37.js","./chunk.PXQVXBNG.js","./chunk.FLMNWVSY.js","./chunk.JETT6ELP.js","./chunk.DSLGMCB6.js","./chunk.IX63LTRQ.js","./chunk.I636CZE4.js","./chunk.TVURUMU4.js","./chunk.UV3U4FRT.js","./chunk.EZ4TZUMM.js","./chunk.47T3KUAA.js","./chunk.NZDWXX6H.js","./chunk.C5EFUODO.js","./chunk.UGOKORIF.js","./chunk.VDS3IOTK.js","./chunk.YS5U3DUX.js","./chunk.SAJLIA5M.js","./chunk.LWRXCO2Z.js","./chunk.I2NI7CT7.js","./chunk.LHIT3EZD.js","./chunk.BJUUSIQY.js","./chunk.BCE6LIDR.js","./chunk.MBLFZF5R.js","./chunk.XOZU4OFA.js","./chunk.5NZDFT6R.js","./chunk.MB7LKKUD.js","./chunk.WVUJXDXZ.js","./chunk.7INWDFNG.js","./chunk.FPGU43SC.js","./chunk.V6FUYRZI.js","./chunk.5BPRGXIW.js","./chunk.BZEJM2PY.js","./chunk.CMLNBJZG.js","./chunk.GZHZLJBF.js","./chunk.QPL3OXW3.js","./chunk.OJGHDWI6.js","./chunk.FRERJWZJ.js","./chunk.RQX4CQJN.js","./chunk.LUIRQ5UF.js","./chunk.N33WUCAN.js","./chunk.JQFIZRAZ.js","./chunk.LKJ6FD6Y.js","./chunk.DBMZ3AQB.js","./chunk.SDO3U72B.js","./chunk.DIFR37EZ.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.4SBYXHCQ.js"))),Lr=pt(()=>Jt(Cr().then(e=>e.SceneFace)),{what:"This view"}),Mr=pt(()=>Cr().then(e=>e.SceneKeeping),{quiet:!0}),Hr=pt(()=>Jt(mo().then(e=>e.PagesContent)),{what:"This page"}),Dr=pt(()=>Jt(ho().then(e=>e.PictureFace)),{what:"This picture"}),yo=Lr.Face,go=Mr.Face,wo=Hr.Face,vo=Dr.Face;function Ve(...e){let n=e.length>0?e:["scene","pages","picture"],o=new Set(n.flatMap(Vr));return Promise.all([...[...o].map(i=>i.fetch()),Zn()]).then(()=>{},()=>{})}var Vr=e=>e==="pages"?[Hr]:e==="picture"?[Dr]:[Lr,Mr],Br=e=>Vr(e).every(n=>n.here()),bo=150,Ut=0;function xr(e,n){if(Br(e))return n();let o=++Ut,i=()=>{o===Ut&&(Ut+=1,n())};Ve(e).then(i),setTimeout(i,bo)}var So=768;function Po(e,n){let o=n!==null&&n>=So;(0,d.useEffect)(()=>{if(!o||e==="picture")return;let i=e==="pages"?"scene":"pages";if(Br(i))return;let c=globalThis,l=()=>void Ve(i),S=()=>{},p=Un(()=>{if(c.requestIdleCallback&&c.cancelIdleCallback){let w=c.requestIdleCallback(l,{timeout:4e3});S=()=>c.cancelIdleCallback?.(w)}else{let w=setTimeout(l,1500);S=()=>clearTimeout(w)}});return()=>(p(),S())},[e,o])}function ko({asked:e,shown:n,onDrawn:o}){return(0,d.useLayoutEffect)(()=>o(e,n),[e,n,o]),null}function Ao({auto:e,scene:n}){return(0,g.jsx)("div",{"data-embed-content":"","aria-busy":"true",style:{flex:e?n?`0 0 ${It}px`:"0 0 auto":"1 1 auto",minHeight:0,background:"var(--graview-ground)"}})}var Eo=Ht(Te(()=>(__graviewPreload(import.meta.url,["./chunk.AJZBJBMO.js"]),import("./chunk.5JNXQHN4.js")))).part((e,n)=>(0,g.jsx)(e.StudioPlace,{...n}),{quiet:!0});function $r(e,n,o,i,c){return $t(e,sr(n?ct(n):c??Mn,i),o)}function Yt(e){return e&&ct(e).overview?"graview":"scene"}function Fr(e,n){if(n.homeView?.()===void 0)return!1;let o=e.pages?.first?.trim();return o===void 0||o===""||o==="/"||o.toLowerCase()==="home"}function Nr(e){let[,n]=(0,d.useState)(!1),o=(0,d.useCallback)(()=>n(!0),[]),i=(0,d.useRef)(!1);return e.at&&!mt?(0,g.jsx)(Gt,{onReady:o,fetch:Qt}):!i.current&&Rr(e.draftView)?(0,g.jsx)(Gt,{onReady:o,fetch:zt}):(i.current=!0,(0,g.jsx)(Ro,{...e}))}function Ro(e){let{app:n,stop:o,bar:i=!0,standing:c="Everything is in order",principal:l,heading:S=2}=e,{rootRef:p,scope:w,css:E,scheme:T,store:P,presence:k,brand:F,auto:v,height:_}=pr(e),de=Tr(e.draftView),D=ur(e,rr,de.over),[ie]=(0,d.useState)(_n),f=e.basePath===void 0?{}:{basePath:e.basePath},[V]=(0,d.useState)(Dt),j=e.notices??V,Z=h=>xt(h,f),x={...e.routing?{routing:e.routing}:{},...f},[me]=(0,d.useState)(()=>{let h=e.at?.face;if(h)return h;let Q=o===void 0&&Fr(n,D)?"pages":Yt(o),K=Bt({...x,face:Q});return e.face===void 0&&e.onOpening?.(K),K}),[B,R]=(0,d.useState)(()=>e.face!==void 0&&e.face!=="pages"&&!e.at&&o===void 0&&or(x)&&Fr(n,D)),he=(0,d.useRef)(e.onFace);he.current=e.onFace,(0,d.useLayoutEffect)(()=>{B&&(he.current?.("pages"),R(!1))},[B]);let L=B?"pages":e.face??me,O=n.schema.kinds,C=e.routing==="address",H=(0,d.useMemo)(()=>e.at?mt.settleAt(e,P.seenBy(l??{kind:"human"}),D.places()):void 0,[]),X=(0,d.useMemo)(()=>$n(D,n.schema),[D,n.schema]),q=(0,d.useMemo)(()=>{let h=H?.stop??(C?ar(e.basePath):void 0)??o;return L==="scene"&&h===void 0&&X===void 0&&(e.path===void 0||Kt(e.path))?Nt(void 0):$r(L,h,O,D.places(),X)},[]),[ye]=(0,d.useState)(L);(0,d.useEffect)(()=>{ye!=="pages"&&Bn(D)},[ye,D]);let $=(0,d.useRef)(void 0),Fe=h=>h===void 0||Kt(h)?"/":h;$.current??={path:Fe(H?.path??(C?L==="pages"?(Ft(window.location.pathname,e.basePath)??"/")+window.location.search:"/":e.path)),asked:e.path},e.path!==$.current.asked&&($.current={path:Fe(e.path),asked:e.path});let M=(0,d.useRef)(e.onNavigate);M.current=e.onNavigate;let ee=(0,d.useCallback)((h,Q)=>{$.current.path=h,M.current?.(h,Q)},[]),{at:te,setAt:N,steering:Se,steer:J}=wr($.current.path),z=(0,d.useContext)(Wr);z&&(z.pages=()=>$.current.path);let G=(0,d.useRef)(void 0),le=(0,d.useCallback)(h=>void($.current.path=h),[]),ne=Yn(p),[Oe,Pe]=(0,d.useState)(!1),se=e.pagesBelow!==void 0&&ne!==null&&ne<e.pagesBelow&&(L==="scene"||L==="graview")&&!Oe,A=se?"pages":L,Ce=(0,d.useRef)(!1);Ce.current=Oe&&e.pagesBelow!==void 0&&ne!==null&&ne<e.pagesBelow&&(L==="scene"||L==="graview"),z&&(z.shown=A);let Le=(0,d.useRef)(L==="graview"?"graview":"scene");(A==="scene"||A==="graview")&&(Le.current=A),(0,d.useState)(()=>{if(!C||typeof window>"u"||A==="pages"||A==="picture")return;let{pathname:h,search:Q,hash:K}=window.location;Ft(h,e.basePath)==="/"&&window.history.replaceState(window.history.state,"",`${Z(Re)}${Q}${K}`)}),fr(p,A,e.onIntrinsicHeight),Po(A,ne);let re=vr(e.onError,A),Me=br(e.onReady,A),ke=(0,d.useRef)(e.onFaceDrawn);ke.current=e.onFaceDrawn;let Ye=(0,d.useCallback)((h,Q)=>{Me(Q),ke.current?.(h)},[Me]),[Be,wt]=(0,d.useState)(null),Qe=D.places(),$e=(0,d.useRef)({shown:A,onFace:e.onFace});$e.current={shown:A,onFace:e.onFace};let W=(0,d.useCallback)((h,Q,K)=>{if(C){G.current?.(h,Q,K);return}$e.current.onFace?.(h),M.current?.(h==="pages"?Q??$.current.path:Re,"push")},[C]),[ge,U]=(0,d.useState)(void 0);(0,d.useEffect)(()=>{A==="pages"&&U(void 0)},[A]);let Ne=(0,d.useRef)(o);(0,d.useEffect)(()=>{Ne.current!==o&&(Ne.current=o,U(void 0))},[o]);let Ae=(0,d.useCallback)(h=>{if($e.current.shown==="pages"){if(Pe(!0),U(h),L==="scene"||L==="graview"){xr(L,()=>{C?window.history.pushState(null,"",`${Z(Re)}${h??""}`):M.current?.(Re,"push")});return}xr(Le.current,()=>W(Le.current,void 0,h))}},[C,L,e.basePath,W]),He=(0,d.useCallback)(h=>{if($e.current.shown==="pages"){Se.go.current||($.current.path=h),J(h);return}if($.current.path=h,N(h),Ce.current){Pe(!1),C?window.history.pushState(null,"",Z(h)):M.current?.(h,"push");return}W("pages",h)},[Se,J,N,W,C,e.basePath]),ze=D.arrangement?.(),ue=A==="pages",Ee=e.hrefOf,We=Ee??(C?Z:void 0),Y=(0,d.useMemo)(()=>({open:He,...Ee?{href:Ee}:C?{href:h=>xt(h,e.basePath===void 0?{}:{basePath:e.basePath})}:{}}),[He,C,e.basePath,Ee]);return(0,g.jsxs)("section",{ref:p,className:w,"aria-label":e.label??n.name,"data-graview-embed":A,"data-graview-scheme":T,...se?{"data-graview-embed-narrow":""}:{},style:{position:"relative",isolation:"isolate",height:_,minHeight:v?0:320,display:"flex",flexDirection:"column",overflow:"hidden",borderRadius:"var(--graview-radius, 12px)"},children:[(0,g.jsx)("style",{children:E}),(0,g.jsxs)(Jn.Provider,{value:re,children:[(0,g.jsx)(mr,{rootRef:p,board:j}),(0,g.jsx)(lr,{rootRef:p,firstLook:e.firstLook,app:er(F??{name:n.name},n.schema)}),(0,g.jsx)(Ue,{module:"@graview/react",report:re,content:!0,children:(0,g.jsx)(In.Provider,{value:ie,children:(0,g.jsx)(Vn,{store:P,views:D,initialView:q,scheme:T,...hr(e,k,F),...e.onSeat?{onSeat:e.onSeat}:{},children:(0,g.jsxs)(Qn.Provider,{value:j,children:[(0,g.jsx)(Oo,{face:A,stop:ge??o,kinds:O,places:Qe,opens:X}),z?(0,g.jsx)(To,{into:z}):null,(0,g.jsx)(xo,{rootRef:p,face:L,shown:A,path:te,stop:o,draft:de.n,onDrawn:e.onDrawn,parts:ie}),C?(0,g.jsx)(ir,{pagesWere:H?.path,basePath:e.basePath,shown:A,onFace:e.onFace,toggle:G,kinds:O,places:Qe,opens:X,landed:le}):null,i&&A!=="picture"?(0,g.jsx)(Ue,{module:"@graview/embed",report:re,children:(0,g.jsx)(yr,{name:F?.name??n.name,heading:S,named:Wt(i).name!==!1,faces:Wt(i).faces===!1?void 0:{scene:{label:Fn(ze),current:!ue,go:()=>Ae(),reach:()=>void Ve(Le.current)},pages:{label:On(ze),current:ue,go:()=>He($.current.path),reach:()=>void Ve("pages")}},at:ue?te:null,without:e.pages?.without(),home:{...We?.("/")!==void 0?{href:We("/")}:{},go:()=>He("/"),current:ue&&te.split("?")[0]==="/"},reach:{...We?{href:We}:{},go:h=>He(h.path)},standing:c,hostActions:e.hostActions,keeping:ue?void 0:(0,g.jsx)(Co,{app:n,studio:e.studio,report:re}),onFind:wt,switch:e.switch})}):null,(0,g.jsx)(Xn.Provider,{value:Be,children:(0,g.jsx)(Ue,{module:A==="pages"||A==="picture"?"@graview/pages":"@graview/react",report:re,content:!0,children:(0,g.jsxs)(d.Suspense,{fallback:(0,g.jsx)(Ao,{auto:v,scene:A!=="pages"&&A!=="picture"}),children:[A==="picture"?(0,g.jsx)(vo,{scope:w,store:P,views:D,as:(o?ct(o).within?.view:void 0)??""}):A==="pages"?(0,g.jsx)(wo,{store:P,views:D,presence:k,auto:v,brand:F,steering:Se,overview:Ae,scope:w,titleLevel:gr(S),quickAsk:Vt(e.quickAsk),props:{...e,onNavigate:ee,...C?{}:{path:$.current.path}}}):(0,g.jsx)(Kn.Provider,{value:Y,children:(0,g.jsx)(yo,{address:C,auto:v,scheme:T,scope:w,quickAsk:Vt(e.quickAsk)})}),(0,g.jsx)(ko,{asked:L,shown:A,onDrawn:Ye})]})},A)})]})})})})]})]})}var Kt=e=>e.split(/[?#]/)[0]===Re,Wr=(0,d.createContext)(null);function To({into:e}){return e.view=dt().view,null}function xo({rootRef:e,face:n,shown:o,path:i,stop:c,draft:l,onDrawn:S,parts:p}){let{view:w}=dt(),E=o==="scene"||o==="graview",T=st(w),{pan:P,...k}=w,F=w.pan?st(k):T,v={face:n,path:E?Re:o==="picture"?c??"#":i,stop:T};return Ar(e,`${o} ${E?F:v.path} ${l}`,v,S,p),null}var mt,Fo=Te(()=>(__graviewPreload(import.meta.url,["./chunk.N5MQARN6.js","./chunk.JQFIZRAZ.js","./chunk.LKJ6FD6Y.js","./chunk.DBMZ3AQB.js","./chunk.SDO3U72B.js","./chunk.DIFR37EZ.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.4NPXMYA5.js"))),Qt=()=>Fo().then(e=>void(mt=e),()=>new Promise(e=>{let n=()=>{window.removeEventListener("online",n),clearTimeout(o),e()},o=setTimeout(n,1e4);window.addEventListener("online",n)}).then(Qt));function Oo({face:e,stop:n,kinds:o,places:i,opens:c}){let{view:l,go:S}=dt(),p=(0,d.useRef)({face:e,stop:n});return(0,d.useLayoutEffect)(()=>{let w=p.current.stop!==n,E=p.current.face!==e,T=p.current.face==="pages";if(p.current={face:e,stop:n},!w&&!E||e==="pages"||e==="picture")return;let P=(w||T)&&n!==void 0?$r(e,n,o,i):T&&cr(l)?$t(e,Nt(c),o):e==="graview"?Lt(l,!0):l.overview?Hn(Lt(l,!1),tr(l,o)):l;S(P)},[e,n,o,l,S,c]),null}function Co({app:e,studio:n,report:o}){return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(d.Suspense,{fallback:null,children:(0,g.jsx)(go,{})}),n!==!1?(0,g.jsx)(Ue,{module:"@graview/studio",report:o,children:(0,g.jsx)(Lo,{app:e,studio:n})}):null]})}function Lo({app:e,studio:n}){let o={app:e,within:"box",...n?{onApply:n.onApply}:{},...n?.landmark?{landmark:n.landmark}:{},...n?.offered!==void 0?{offered:n.offered}:{}},i=n?.place;return i?(0,g.jsx)(i,{...o}):(0,g.jsx)(d.Suspense,{fallback:null,children:(0,g.jsx)(Eo,{...o})})}function Mo({path:e,stop:n,...o},i){return{...o,app:i.app,at:i.at,remote:i.remote,...i.remote.presence?{presence:i.remote.presence}:{}}}function Zt(e,n){let o=n.store??n.remote?.store??dr(n.app,n.seed),i=n.notices??Dt(),c=null,l={},S=0,p=n.label,w=n.app,E=Promise.resolve(),T=n.at?.face??n.face,P=T===void 0?void 0:Bt({...n,face:T}),k=P??Yt(n.stop),F=null,v=[],_=f=>{if(F=f,f!==k)return;let V=v;v=[];for(let j of V)j()};function de(){let[f,V]=(0,d.useState)(P),[j,Z]=(0,d.useState)(n.stop),[x,me]=(0,d.useState)(n.path),[B,R]=(0,d.useState)(n.scheme??"auto"),[he,L]=(0,d.useState)(n.principal),[O,C]=(0,d.useState)(n.seats),[H,X]=(0,d.useState)(n.quickAsk),[q,ye]=(0,d.useState)(n.people),[$,Fe]=(0,d.useState)(n.hostContext),[M,ee]=(0,d.useState)(n.brand),[te,N]=(0,d.useState)(n.whileAway),[Se,J]=(0,d.useState)(n.label),[z,G]=(0,d.useState)(n.hostActions),[le,ne]=(0,d.useState)(void 0),[Oe,Pe]=(0,d.useState)(n.draftView);return c={app:se=>{ne(se),me(void 0),Z(void 0)},face:V,stop:Z,path:me,scheme:R,seat:L,seats:C,quickAsk:X,people:ye,hostContext:Fe,brand:ee,whileAway:N,label:J,hostActions:G,draft:Pe},(0,g.jsx)(Wr.Provider,{value:l,children:(0,g.jsx)(Nr,{...le?Mo(n,le):n,store:o,notices:i,...f!==void 0?{face:f}:{},onOpening:se=>{k=se},...j!==void 0?{stop:j}:{},...x!==void 0?{path:x}:{},...he?{principal:he}:{},...O?{seats:O}:{},...H!==void 0?{quickAsk:H}:{},...q?{people:q}:{},...$?{hostContext:$}:{},...M?{brand:M}:{},whileAway:te,label:Se,hostActions:z,draftView:Oe,scheme:B,onFace:se=>{k=se,V(se)},onSeat:L,onFaceDrawn:_},le?.n??0)})}let D=()=>{let f=l.view?.focusId,V=f?o.graph.getNode(f)?.kind:void 0,j=(l.shown??k)==="scene"||(l.shown??k)==="graview";return{face:k,path:j?Re:l.pages?.()??n.path??"/",stop:l.view?st(l.view):n.stop??"#",...V?{kind:V}:{}}},ie=(0,Or.createRoot)(e);return(0,I.flushSync)(()=>ie.render((0,g.jsx)(de,{}))),{get store(){return o},where:D,setApp:(f,V,j)=>{let Z="graph"in V?{store:V}:V,x=()=>{let me=D();o=Z.store,p=j?.label??(p===w.name?f.name:p),w=f,(0,I.flushSync)(()=>{c?.label(p),c?.app({app:f,remote:Z,at:me,n:++S})})};mt?x():E=E.then(Qt).then(x)},setFace:f=>{k=f,(0,I.flushSync)(()=>c?.face(f))},setStop:f=>(0,I.flushSync)(()=>c?.stop(f)),setPath:f=>(0,I.flushSync)(()=>{if(Kt(f)){(k==="pages"||k==="picture")&&(k="scene",c?.face("scene"));return}c?.path(f),k!=="pages"&&(k="pages",c?.face("pages"))}),setScheme:f=>(0,I.flushSync)(()=>c?.scheme(f)),setSeat:f=>(0,I.flushSync)(()=>c?.seat(f)),setSeats:f=>(0,I.flushSync)(()=>c?.seats(f)),setQuickAsk:f=>(0,I.flushSync)(()=>c?.quickAsk(f)),setPeople:f=>(0,I.flushSync)(()=>c?.people(f)),setHostContext:f=>(0,I.flushSync)(()=>c?.hostContext(f)),setBrand:f=>(0,I.flushSync)(()=>c?.brand(f)),setWhileAway:f=>(0,I.flushSync)(()=>c?.whileAway(f)),setDraftView:f=>(0,I.flushSync)(()=>c?.draft(f)),setLabel:f=>{p=f,(0,I.flushSync)(()=>c?.label(f))},setHostActions:f=>(0,I.flushSync)(()=>c?.hostActions(f)),drawn:()=>E.then(()=>F===k?void 0:new Promise(f=>v.push(f))),notify:f=>{let V;return(0,I.flushSync)(()=>{V=i.notify(f)}),V},unmount:()=>ie.unmount()}}var ht=e=>`s${(e+1).toString(36)}`;var Ir="/graview/friction";var _r="/graview/live",Xt="graview.ship",en=`${Xt}.${ot}`;var be={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",via:"x-graview-via"};var je=class extends Error{constructor(n){super(n),this.name="Superseded"}},xe=e=>e?.lineage?{lineage:e.lineage}:{},Ho=(e,n)=>`${e.calls.map(o=>o.name.replace(/-/g," ")).join(", ")} (${n instanceof Error?n.message.split(`
|
|
2
|
-
`)[0]??"":String(n)})`;function Do(e){if(!e)return[];try{let n=e.storage.getItem(e.key);if(n===null)return[];e.storage.removeItem(e.key);let o=JSON.parse(n);return Array.isArray(o)?o.filter(i=>!!i&&Array.isArray(i.calls)):[]}catch{return[]}}var qe=class extends Error{constructor(o){super(o.sentence);this.refusal=o;this.name="RemoteRefusedError"}},Vo={401:"forbidden",403:"forbidden",404:"missing",413:"limit"},pe=class extends Error{constructor(o,i){super(o);this.conflicts=i;this.name="StaleWrite"}},Je=class extends Error{constructor(n){super(n),this.name="Unreached"}},Bo=new Set([502,503,504]);async function $o(e){try{return(await e.clone().json()).reason==="unavailable"}catch{return!1}}function No(){let e=Math.random().toString(36).slice(2,8),n=0;return()=>`local-${e}-${++n}`}var Wo=1,Io=()=>({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 yt(e){return(await jr(e,Do(e.carry),"This app was updated while your changes were on the way.",Io())).remote}async function jr(e,n,o,i){let c=e.fetch??fetch,l={"content-type":"application/json",...e.headers??{}},S={...gt(e.principal),[be.via]:e.via??"web"};Object.assign(l,S);let p=e.live===!0,w=e.presenceEveryMs,E=e.visible??qo,T="connecting",P=i.statuses,k=i.tally,F=[],v,_=[],de=()=>T==="online"&&v!==void 0?"held":T,D=()=>{let t=de();if(i.told!==t){i.told=t;for(let r of[...P])r(t)}},ie=t=>{if(!(t===T||ce)&&(T==="offline"&&t==="online"&&k.reconnects++,T=t,D(),t==="online"))for(let r of F.splice(0))r.again()},f=t=>{if(ce)return;let r=typeof t=="string"&&t.length>0?t:void 0,s=r!==v;if(v=r,V(),!!s&&(D(),r===void 0)){for(let a of _.splice(0))a();oe&&clearTimeout(oe),an()}},V=()=>{if(i.toldHeld!==v){i.toldHeld=v;for(let t of[...i.helds])t(v??null)}},j=async(t,r)=>{let s;try{s=await c(t,r)}catch(a){throw Y()||ie("offline"),new Je(a instanceof Error?a.message:String(a))}if(s.status===503&&await $o(s))return ie("online"),s;if(Bo.has(s.status))throw Y()||ie("offline"),new Je(`The server is away (${s.status})`);return ie("online"),s},Z=async(t=!1)=>{let r=`${e.url}/graview/state?opFormat=${_e.op}`,s=t?await c(r,{headers:l}):await j(r,{headers:l});if(!s.ok)throw new Error((await s.json().catch(()=>({}))).error??`The server refused (${s.status})`);return await s.json()},x=e.state??await Z(!0);p||(T="online"),v=typeof x.held=="string"&&x.held.length>0?x.held:void 0,V();let me=x.enabledModules??e.enabledModules,B=e.localApp?e.localApp(e.app):e.app,R=new xn({schema:B.schema,mutations:B.mutations??[],invariants:B.invariants??[],...B.policy?{policy:B.policy}:{},...B.publishing?{publishing:B.publishing}:{},...B.modules?{modules:B.modules}:{},...me?{enabledModules:me}:{},...B.intelligence?{intelligence:B.intelligence}:{},...B.brand?.timeZone?{timeZone:B.brand.timeZone}:{},snapshot:x.snapshot,log:x.log,...x.horizon!==void 0?{horizon:x.horizon}:{},ids:No(),...e.storeOptions??{}});kn.served.add(R);let he=e.friction!==!1&&e.principal?.kind!=="visitor";he&&An(R,t=>{he&&c(`${e.url}${Ir}`,{method:"POST",headers:l,body:JSON.stringify({event:t})}).then(r=>void(he=r.status!==404&&r.status!==410),()=>{})});let L=Rn(R),O=x.log.at(-1)?.seq??(x.horizon??0)-1,C=Tt.of(x.log,{horizon:x.horizon??0}),H=null,X,q=new Map,ye=i.who,$=!1,Fe=t=>{if(ce)return;$=!0;let r=Cn(new Map,t,Date.now(),Ot,H?.participant);X!==void 0&&r.delete(X);let s=r.size!==q.size;if(!s)for(let[a,u]of r)Ct(u,q.get(a))||(s=!0);if(q=r,!!s)for(let a of[...ye])a([...q.values()])},M=[],ee=new Set,te=t=>{let r=M.indexOf(t);r>=0&&M.splice(r,1)},N=new Map,Se=(t,r)=>{let s=N.get(t);s&&(N.delete(t),s.resolve({ops:r.filter(a=>a.batch===t),batch:t}))},J,z=[],G=(t,r=[])=>{if(t.length===0&&r.length===0)return[];if(J)return z.push({ops:t,drop:r}),[];let s=Math.min(...t.filter(m=>m.seq>O).map(m=>m.seq));if(Number.isFinite(s)&&s>O+1)return z.push({ops:t,drop:r}),le(),[];let a=M.filter(m=>t.some(ae=>ae.batch===m)),u=[...new Set([...r,...a])].filter(m=>ee.has(m)),y,b=M.filter(m=>!a.includes(m));try{y=R.rebase({confirmed:t,pending:b,drop:u}).confirmed}catch(m){if(!(m instanceof Tn))throw m;return z.push({ops:t,drop:r}),le(),[]}for(let m of a)te(m);t.some(m=>m.seq>O)&&b.some(m=>!u.includes(m))&&k.rebases++,t.length>0&&(O=Math.max(O,...t.map(m=>m.seq)),C.note(t));for(let m of u)ee.delete(m);for(let m of a)Se(m,t);return y},le=()=>{J||(J=ke(Z().then(t=>{if(ne(t)){z=[];return}let r=new Set(t.log.map(u=>u.batch)),s=M.filter(u=>r.has(u));for(let u of s)te(u);let a=R.adopt({snapshot:t.snapshot,log:t.log,...t.horizon!==void 0?{horizon:t.horizon}:{},pending:[...M],drop:[...ee].filter(u=>!M.includes(u))});ee.clear();for(let u of a.pending)ee.add(u.batch);O=t.log.at(-1)?.seq??(t.horizon??0)-1,C=Tt.of(t.log,{horizon:t.horizon??0}),k.resyncs++;for(let u of s)Se(u,t.log)}).then(()=>{J=void 0;let t=z;z=[];for(let{ops:r,drop:s}of t)G(r,s)},()=>{J=void 0,z=[]})))},ne=t=>(typeof t.build=="string"&&cn(t.build),typeof t.version=="number"&&f(t.held),typeof t.version!="number"||t.version===x.version?!1:(St(t.version),!0)),Oe=async t=>{let s=await(await j(`${e.url}/graview/since?seq=${ht(t)}&opFormat=${_e.op}`,{headers:l})).json();return ne(s)?[]:s.reset===!0?(le(),[]):s.ops??[]},Pe=async()=>{let t=await se();return J&&await J,t},se=async()=>{if(H&&!Y()&&E()){let r=await(await j(`${e.url}/graview/here?opFormat=${_e.op}`,{method:"POST",headers:l,body:JSON.stringify({presence:H,seq:ht(O)})})).json();return ne(r)?[]:(typeof r.participant=="string"&&(X=r.participant),Fe(r.who??[]),G(r.ops??[]))}return G(await Oe(O))},A=new Map,Ce=new Map,Le=new Set,re=new Map,Me=new Set,ke=t=>(Me.add(t),t.finally(()=>Me.delete(t)).catch(()=>{}),t),Ye=Promise.resolve(),Be=0,wt=(t,r)=>{let s=Ye.then(()=>$e(t,r));return Ye=s.catch(()=>{}),s},Qe=()=>new Promise((t,r)=>F.push({again:t,give:r})),$e=async(t,r)=>{let s,a;for(;;){try{s=await j(`${e.url}/graview/ops`,{method:"POST",headers:l,body:JSON.stringify({...t,opFormat:_e.op})})}catch(m){if(!(m instanceof Je)||U)throw m;if(await Qe(),Y())return Ze(t,r);continue}if(a=await s.json().catch(()=>({})),s.status===503&&a.reason==="unavailable"&&typeof a.held=="string"&&!U){if(typeof a.version=="number"?ne(a):(f(a.held),!1))break;if(v!==void 0&&(Et>0||p)){if(await new Promise(m=>_.push(m)),U)throw new je("The client closed.");if(Y())return Ze(t,r);continue}}let b;if(s.status===503&&a.reason==="unavailable"&&!U)b=tn(e.backoff,Be++);else{if(Be=0,s.status!==429||U)break;b=_o(s.headers.get("retry-after"),a.retryAfter)}if(await new Promise(m=>setTimeout(m,b)),Y())return Ze(t,r)}if(ce||ne(a))throw new je("The app was changed.");if(!s.ok){let b=a.error??`The server refused (${s.status})`;throw a.conflict?new pe(b,a.conflicts??[]):new qe({reason:a.reason??Vo[s.status]??"invalid",sentence:b,...a.wouldNeed?.length?{wouldNeed:a.wouldNeed}:{}})}let u=a.ops??[],y=u[0]?.seq;return y!==void 0&&y>O+1&&(u=await Oe(O)),r!==void 0&&(a.batch&&A.set(r,a.batch),te(r)),G(u,r!==void 0?[r]:[]),{ops:a.ops??[],...a.batch?{batch:a.batch}:{}}},W,ge=!1,U=!1,Ne=0,Ae,He=0,ze=0,ue=null,Ee=()=>{},We=new Promise(t=>{Ee=t}),Y=()=>p&&ge&&W?.readyState===Wo,h=t=>{if(!Y())return!1;try{return W.send(JSON.stringify(t)),!0}catch{return!1}},Q=(t=!1)=>{!H||!Y()||!E()||!t&&ue&&Ct(H,ue)&&(w===void 0||Date.now()-ze<w)||h({t:"here",presence:H})&&(ue=H,ze=Date.now())},K=new Set,oe,an=()=>{if(oe=void 0,v!==void 0)return;let t=[...N.entries()].filter(([r])=>K.has(r));K.clear();for(let[,r]of t)h(r.message)},sn=(t,r)=>{N.has(t)&&(K.add(t),oe&&clearTimeout(oe),oe=setTimeout(an,Math.max(0,r)))},Gr=t=>{N.has(t)&&K.add(t)},Ze=(t,r)=>new Promise((s,a)=>{let u=r??`send-${++He}`,y=t.undo?{t:"undo",cid:u,batches:t.undo,...t.intent?{intent:t.intent}:{},...t.batch?{batch:t.batch}:{},...t.via?{via:t.via}:{},...xe(t)}:{t:"call",cid:u,calls:t.calls??[],...t.intent?{intent:t.intent}:{},...t.batch?{batch:t.batch}:{},...t.base?.length?{base:t.base}:{},...t.via?{via:t.via}:{},...xe(t)};if(N.set(u,{message:y,...r!==void 0?{mine:r}:{},resolve:s,reject:a}),K.size>0||v!==void 0){K.add(u);return}h(y)}),Xe=(t,r)=>Y()?Ze(t,r):wt(t,r),Ur=t=>{switch(t.t){case"welcome":{if(cn(t.build),typeof t.version=="number"&&t.version!==x.version){St(t.version);return}if(ge=!0,Ne=0,typeof t.participant=="string"&&(X=t.participant),f(t.held),t.state?le():G(t.ops??[]),K.clear(),oe&&clearTimeout(oe),oe=void 0,v!==void 0)for(let r of N.keys())K.add(r);else for(let r of N.values())h(r.message);Q(!0),ie("online"),Ee();return}case"ops":G(t.ops??[]);return;case"ack":{let r=N.get(t.cid);if(!r){G(t.ops??[]);return}N.delete(t.cid),Be=0,r.mine!==void 0&&(A.set(r.mine,t.batch),te(r.mine)),G(t.ops??[],r.mine!==void 0?[r.mine]:[]),r.resolve({ops:t.ops??[],batch:t.batch});return}case"refused":case"conflict":{let r=N.get(t.cid);if(!r)return;if(t.t==="refused"&&t.reason==="unavailable"){v!==void 0?Gr(t.cid):sn(t.cid,tn(e.backoff,Be++));return}N.delete(t.cid),r.reject(t.t==="conflict"?new pe(t.sentence,t.conflicts??[]):new qe({reason:t.reason??"invalid",sentence:t.sentence,...t.wouldNeed?.length?{wouldNeed:[...t.wouldNeed]}:{}}));return}case"busy":typeof t.cid=="string"&&sn(t.cid,typeof t.retryAfter=="number"?t.retryAfter:1e3);return;case"presence":Fe(t.who??[]);return;case"held":f(t.sentence);return;case"declaration":typeof t.version=="number"&&t.version!==x.version&&St(t.version);return;case"reload":fn(typeof t.reason=="string"?t.reason:"This app was updated.");return;case"error":if(t.reopen===!0&&W){let r=W;mn(r);try{r.close(1e3,"Opening again.")}catch{}}return;default:return}},ce=!1,vt=i.declarations,bt=i.builds,cn=t=>{if(!(ce||i.otherBuild!==void 0||!e.build||typeof t!="string"||t.length===0||t===e.build)){i.otherBuild=t;for(let r of[...bt])r(t)}},dn=()=>{let t=[],r=0;for(let s of M){let a=re.get(s);a?t.push({calls:a.calls,...a.intent?{intent:a.intent}:{},...a.via?{via:a.via}:{},...xe(a),batch:s}):r++}return{carried:t,undos:r}},ln=(t,r)=>`${r} while ${t===1?"an undo of yours was":"undos of yours were"} on the way; ${t===1?"it was":"they were"} not made.`,un=t=>{ce=!0,H=null;let r=new je(t);for(let a of N.values())a.reject(r);N.clear(),nt&&clearInterval(nt),U=!0,Ae&&clearTimeout(Ae),oe&&clearTimeout(oe),we&&clearTimeout(we);for(let a of F.splice(0))a.give(r);for(let a of _.splice(0))a();let s=W;W=void 0,ge=!1;try{s?.close(1e3,t)}catch{}Ee()};async function St(t){if(ce)return;if(!e.resolveApp){fn(`This app was changed on its server (version ${t}); reload the page to carry on.`);return}let{carried:r,undos:s}=dn(),a=e.resolveApp,u=H;un("The app was changed.");try{let y=await a(t),{state:b,...m}=e,ae=await jr({...m,app:y},r,"The app was changed while your changes were on the way.",i);u&&ae.remote.presence.here(u);for(let rt of[...vt])rt(ae.remote,t);let fe=[...s>0?[et(ln(s,"The app was changed"))]:[],...ae.unheard()];for(let rt of fe)for(let to of Ie)to(rt.sentence,rt)}catch(y){let b=`The app was changed, but the new version could not be opened: ${y instanceof Error?y.message:String(y)}`;for(let m of Ie)m(b,et(b))}}function fn(t){if(ce)return;let{carried:r,undos:s}=dn();un(t);let a=!1;if(e.carry&&r.length>0)try{e.carry.storage.setItem(e.carry.key,JSON.stringify(r)),a=!0}catch{}let u=[];!a&&r.length>0&&u.push(`${t} ${r.length===1?"A change of yours was":`${r.length} changes of yours were`} not sent; make ${r.length===1?"it":"them"} again after the page reloads.`),s>0&&u.push(ln(s,"This app was updated"));for(let y of u)for(let b of Ie)b(y,et(y));(e.reloadPage??jo)()}let pn=()=>{if(U||!p)return;let t=`${e.url.replace(/^http/,"ws").replace(/\/$/,"")}${_r}`,{"content-type":r,...s}=l,a;try{a=e.socket?e.socket(t,s,[en]):eo(t,s)}catch{return hn()}W=a,ge=!1,a.onopen=()=>{W===a&&a.send(JSON.stringify({t:"hello",seq:ht(O),protocol:ot,wire:Xt,opFormat:_e.op,...e.build?{build:e.build.slice(0,64)}:{},...e.hostProtocol!==void 0?{hostProtocol:e.hostProtocol}:{}}))},a.onmessage=u=>{if(W!==a)return;let y;try{y=JSON.parse(String(u.data))}catch{return}Ur(y)},a.onclose=()=>mn(a),a.onerror=()=>{}},we,Kr=()=>{$=!1,we&&clearTimeout(we),we=setTimeout(()=>{if(we=void 0,$||U)return;let t=new Map([...q].filter(([,r])=>r.held!=="socket"));if(t.size!==q.size){q=t;for(let r of ye)r([...q.values()])}},Ot),we.unref?.()};function mn(t){if(W!==t)return;let r=ge;W=void 0,ge=!1,ue=null,r&&(ie("offline"),Kr()),hn()}let hn=()=>{if(U)return;let t=tn(e.backoff,Ne);Ne++,Ae=setTimeout(pn,t)},yn=R.applyAll.bind(R),Jr=R.undo.bind(R),Yr=R.previewAll.bind(R);R.previewAll=(t,r)=>Yr(t,{...e.principal?{author:e.principal}:{},...r});let Ie=i.refusals,Ge=[],et=t=>({reason:"invalid",sentence:t}),tt=i.conflicts,Pt=!1,gn,kt=async(t,r)=>{if(r instanceof je||ce)return;let s=r instanceof qe?r.refusal:Sn(r),a=s.sentence,u=r instanceof pe?gn?.yoursOf(R,re.get(t)?.calls??[]):void 0;te(t);try{G([],[t])}catch{}let y=re.get(t);re.delete(t);let b=y?.calls[0];if(b&&!(r instanceof pe)){let m=R.allMutations().find(fe=>fe.name===b.name)?.subject?.arg,ae=m&&R.graph.getNode(b.args[m])?.kind;En(R,{type:"refused",act:b.name,code:s.reason,...ae?{kind:ae}:{}},e.principal)}if(r instanceof pe&&k.conflicts++,r instanceof pe&&!Y()&&await Pe().catch(()=>[]),r instanceof pe&&J&&await J,r instanceof pe&&tt.size>0){let m=!1,ae={sentence:a,conflicts:u?r.conflicts.map(fe=>fe.node===u.node&&fe.field===u.field?{...fe,yours:u.yours}:fe):r.conflicts,keepTheirs(){m=!0},useMine(){if(!(m||!y)){m=!0,Pt=!0;try{R.applyAll(u?[u.over(O)]:y.calls,{...y.intent?{intent:y.intent}:{},...y.via?{via:y.via}:{},...xe(y)})}finally{Pt=!1}}}};for(let fe of tt)fe(ae);return}for(let m of Ie)m(a,s)},Qr=(t,r)=>t.flatMap(s=>s.mutation?.name===bn?[]:s.primitives.flatMap(a=>a.op==="splice-text"&&!r.has(a.id)&&!r.has(`${a.id}\0${a.field}`)?[{node:a.id,field:a.field,rev:O}]:[]));R.applyAll=(t,r)=>{let s=Pn(R.log.all().filter(b=>ee.has(b.batch))),a=yn(t,{...e.principal?{author:e.principal}:{},...r}),u=t.map((b,m)=>{let ae=a.minted?.[m];return ae===void 0||b.args?.id!==void 0?b:{...b,mintedHint:ae}});M.push(a.batch),ee.add(a.batch),re.set(a.batch,{calls:u,...r?.intent?{intent:r.intent}:{},...r?.via?{via:r.via}:{},...xe(r)});let y=Pt?[]:[...C.baseFor(a.ops,s,(b,m)=>R.collaborative(b,m)),...Qr(a.ops,s)];return Ce.set(a.batch,ke(Xe({calls:u,...r?.intent?{intent:r.intent}:{},batch:a.batch,...y.length>0?{base:y}:{},...r?.via?{via:r.via}:{},...xe(r)},a.batch).catch(b=>kt(a.batch,b)))),a},R.apply=(t,r)=>R.applyAll([t],r),R.undo=(t,r)=>{let s=typeof t=="string"?[t]:t,a=Jr(s.map(y=>A.get(y)??y),{...e.principal?{author:e.principal}:{},...r});M.push(a.batch),ee.add(a.batch);let u=Promise.allSettled(s.map(y=>Ce.get(y)));return Ce.set(a.batch,ke(u.then(()=>{let y=s.filter(b=>!Le.has(b));if(y.length===0){te(a.batch),re.delete(a.batch),G([],[a.batch]);return}return Xe({undo:y.map(b=>A.get(b)??b),...r?.intent?{intent:r.intent}:{},batch:a.batch,...r?.via?{via:r.via}:{},...xe(r)},a.batch)}).catch(y=>kt(a.batch,y)))),a};let Zr=async(t,r={})=>{At++;try{return(await ke(Xe({calls:t,...r}))).ops}finally{At--}},At=0,wn={here(t){H=t,Q()},onWho(t){return ye.add(t),q.size>0&&t([...q.values()]),()=>{ye.delete(t)}},leave(){if(!H)return;let t=JSON.stringify({participant:X??H.participant});if(H=null,h({t:"bye"}))return;let r=globalThis.navigator?.sendBeacon;r?r.call(globalThis.navigator,`${e.url}/graview/leave`,t):c(`${e.url}/graview/leave`,{method:"POST",headers:l,body:t}).catch(()=>{})}},Et=e.pollMs??800,nt=Et>0&&typeof setInterval=="function"?setInterval(()=>{Y()||Pe().catch(()=>{})},Et):null;if(p){pn();let t;await Promise.race([We,new Promise(r=>t=setTimeout(r,e.openTimeoutMs??3e3))]),clearTimeout(t)}if(n.length>0&&!ce){let t=[],r=new Set(R.log.all().map(s=>s.batch));for(let s of n)if(!(s.batch!==void 0&&r.has(s.batch)))try{R.applyAll(s.calls,{...s.intent?{intent:s.intent}:{},...s.batch?{batch:s.batch}:{},...s.via?{via:s.via}:{},...xe(s)})}catch(a){t.push(Ho(s,a))}t.length>0&&Ge.push(et(`${o} ${t.length===1?"One no longer fits and was not made":`${t.length} no longer fit and were not made`}: ${t.join("; ")}.`))}let vn=new Map,Xr=()=>({store:R,author:e.principal,appliedAll:yn,pending:M,provisional:ee,asked:re,answers:Ce,letGo:Le,sent:(t,r)=>ke(Xe({calls:r,batch:t},t).catch(s=>kt(t,s))),settle:te,land:G,seen:()=>O,gone:()=>U||ce});return{remote:{store:R,typing(t,r){let s=`${t}\0${r}`,a=vn.get(s);return a||(a=(__graviewPreload(import.meta.url,["./chunk.PQMMISCQ.js","./chunk.DIFR37EZ.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.4OP4IEEY.js")).then(u=>(gn=u,u.typingOf(t,r,u.wireOf(Xr())))),vn.set(s,a)),a},version:x.version,migrated:x.migrated??[],send:Zr,pull:Pe,onRefusal(t){Ie.add(t);let r=Ge;Ge=[];for(let s of r)t(s.sentence,s);return()=>Ie.delete(t)},onDeclaration(t){return vt.add(t),()=>vt.delete(t)},onBuild(t){return bt.add(t),i.otherBuild!==void 0&&t(i.otherBuild),()=>bt.delete(t)},onConflict(t){return tt.add(t),()=>tt.delete(t)},revision:(t,r)=>C.of(t,r),seq:()=>O,participant:()=>X,transport:()=>Y()?"socket":"poll",status:de,onStatus(t){return P.add(t),()=>P.delete(t)},held:()=>v,onHeld(t){return i.helds.add(t),v!==void 0&&t(v),()=>i.helds.delete(t)},counters:()=>({...k}),who:()=>[...q.values()],pending:()=>M.length+At,async settled(){for(;Me.size>0;)await Promise.allSettled([...Me])},presence:wn,close(){nt&&clearInterval(nt),L(),wn.leave(),U=!0,Ae&&clearTimeout(Ae),oe&&clearTimeout(oe),we&&clearTimeout(we);for(let r of F.splice(0))r.give(new Error("The client closed before the server could be reached."));for(let r of _.splice(0))r();let t=W;W=void 0,ge=!1;try{t?.close(1e3,"Closed.")}catch{}}},unheard(){let t=Ge;return Ge=[],t}};function eo(t,r){let s=globalThis.WebSocket;if(!s)throw new Error("This runtime has no WebSocket; the client polls instead.");let a=typeof globalThis.document<"u",u=e.subprotocol?[en]:[];if(!a)try{return new s(t,{headers:r,...u.length>0?{protocols:u}:{}})}catch{}let y=new URL(t);for(let[b,m]of Object.entries(S))y.searchParams.set(b,m);return u.length>0?new s(y.toString(),u):new s(y.toString())}}function _o(e,n,o=Date.now()){let i,c=e?.trim();if(c)if(/^\d+(\.\d+)?$/.test(c))i=Number(c)*1e3;else{let p=Date.parse(c);Number.isFinite(p)&&(i=Math.max(0,p-o))}let l=typeof n=="number"&&Number.isFinite(n)&&n>=0?n:void 0,S=l!==void 0&&l<50&&i!==void 0&&Math.abs(l*1e3-i)<1e3;return l!==void 0&&!S?l:i??1e3}function jo(){globalThis.location?.reload?.()}function qo(){return globalThis.document?.visibilityState!=="hidden"}function tn(e,n){if(typeof e=="function")return Math.max(0,e(n));let{min:o=250,max:i=1e4,factor:c=2}=e??{};return Math.min(i,o*c**n)*(.75+Math.random()*.5)}function gt(e){let n={};if(!e)return n;e.id&&(n[be.seat]=e.id),e.roles?.length&&(n[be.roles]=e.roles.join(",")),e.kind!=="human"&&(n[be.kind]=e.kind),e.name&&(n[be.name]=encodeURIComponent(e.name));let o=e.onBehalfOf;return o?.id&&(n[be.for]=o.id),o?.roles?.length&&(n[be.forRoles]=o.roles.join(",")),o?.name&&(n[be.forName]=encodeURIComponent(o.name)),n}var qr="/graview/views";function nn(e){let n=e.fetch??fetch,o=e.url.replace(/\/$/,""),i={"content-type":"application/json",...e.principal?gt(e.principal):{},...e.headers??{}},c=e.state?{hidden:e.state.hidden??[],removed:e.state.removed??[],may:e.state.may??at.may}:at,l=new Set,S=P=>{if(JSON.stringify(P)!==JSON.stringify(c)){c=P;for(let k of l)k()}},p=async(P,k)=>{let F=await n(`${o}${e.path??qr}`,{method:P,headers:i,...k!==void 0?{body:JSON.stringify(k)}:{}}),v=await F.json();if(!F.ok)throw new Error(v.error??`The store answered ${F.status}.`);S({hidden:v.hidden??[],removed:v.removed??[],may:v.may??at.may})},w=()=>p("GET"),E=e.state?Promise.resolve():w().catch(()=>{}),T=e.pollMs?setInterval(()=>void w().catch(()=>{}),e.pollMs):void 0;return{ready:E,refresh:w,close:()=>clearInterval(T),current:()=>c,onChange(P){return l.add(P),()=>void l.delete(P)},hide:P=>p("POST",{hide:P}),show:P=>p("POST",{show:P}),remove:(P,k)=>p("POST",{remove:P,...k?{about:k}:{}}),async restore(P){let k=c.removed.find(F=>F.name===P)?.lens;await p("POST",{restore:P}),k&&await e.onDeclaration?.()},async lens(P){await p("POST",{lens:P}),await e.onDeclaration?.()}}}var on=document.getElementById("graview-app"),rn=/^\/forms\/([^/]+)\/?$/.exec(location.pathname),zr=rn?(__graviewPreload(import.meta.url,["./chunk.4JDHBNEA.js","./chunk.I2NI7CT7.js","./chunk.XOZU4OFA.js","./chunk.5NZDFT6R.js","./chunk.NF72Z2HG.js","./chunk.KPIDJYIU.js","./chunk.RQX4CQJN.js","./chunk.LUIRQ5UF.js","./chunk.N33WUCAN.js","./chunk.LKJ6FD6Y.js","./chunk.DBMZ3AQB.js","./chunk.SDO3U72B.js","./chunk.DIFR37EZ.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.BUSFJM6P.js")):Ve("pages");try{rn?await zo(decodeURIComponent(rn[1])):await Go()}catch(e){let n=document.createElement("pre");n.setAttribute("role","alert"),n.style.cssText="margin:2rem;font:14px/1.5 ui-monospace,monospace;white-space:pre-wrap",n.textContent=e instanceof Error?e.message:String(e),on.replaceChildren(n),window.__graviewFailed=n.textContent}async function zo(e){let n=await fetch(`/graview/document?form=${encodeURIComponent(e)}`),o=await n.json();if(!n.ok)throw new Error(o.error??`The preview server did not hand over the form (${n.status}).`);let i=await lt(o);if(!i.ok)throw new Error(it(i.findings));let c=i.app,l=o.principal,S=await yt({app:c,url:location.origin,principal:l,...o.state?{state:o.state,openTimeoutMs:0}:{openTimeoutMs:3e3}});document.title=c.forms?.[e]?.title??c.name;let{mount:p}=await zr;window.__graview=p(on,{app:c,form:e,principal:l,remote:S,height:"100dvh",onSubmitted:()=>window.__graviewSubmitted=!0}),window.__graviewReady=!0}async function Go(){let e=await fetch("/graview/document");if(!e.ok)throw new Error(`The preview server did not hand over the document (${e.status}).`);let n=await e.json(),i=await(async w=>{if(typeof w.module=="string")return(await import(w.module)).app;let E=await lt(w);if(!E.ok)throw new Error(it(E.findings));return E.app})(n);if(!i||typeof i!="object"||!("schema"in i))throw new Error("The app module the preview server handed does not export an app.");let c=n.principal,l=await yt({app:i,url:location.origin,principal:c,live:!0,subprotocol:!0,pollMs:1200,...n.state?{state:n.state,openTimeoutMs:0}:{openTimeoutMs:3e3}});document.title=i.name;let S,p=nn({url:location.origin,principal:c,...n.views?{state:n.views}:{},onDeclaration:async()=>{let w=await(await fetch("/graview/document")).json();if(typeof w.module=="string")return;let E=await lt(w);E.ok&&S?.setApp(E.app,l)}});await Promise.all([zr,p.ready]),S=Zt(on,{app:i,remote:l,principal:c,studio:!1,face:"pages",routing:"address",bar:!0,height:"100dvh",label:i.name,heading:1,keptViews:p,...n.draftView?{draftView:n.draftView}:{}}),window.__graview=S,S.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 ro}from"./chunk.PBCNOFQH.js";import{a as Wt,b as lr,c as ur,d as fr,e as It,f as pr,g as mr,h as hr,i as yr,j as gr,k as wr,l as vr,m as br,n as Ue}from"./chunk.S2H7B6RG.js";import{b as dr}from"./chunk.RRKYJYZJ.js";import{a as Bt,b as or,c as ar,d as ir,e as sr,f as $t,g as cr,h as Nt}from"./chunk.NOFWGDOT.js";import{a as Rt,g as Ln}from"./chunk.GUEHKCWN.js";import{k as it}from"./chunk.YIA2EDVF.js";import{E as tr,I as nr,J as rr,h as Yn,k as Dt,l as Qn,n as Zn,r as Xn,w as Vt,z as er}from"./chunk.YD3TKV6P.js";import{c as no}from"./chunk.4KC35UNR.js";import{Aa as qn,Ca as zn,Da as Gn,Fa as Un,G as Mt,Ga as Ht,Ka as Kn,La as Jn,Oa as dt,T as Dn,Z as Vn,a as Mn,b as st,c as ct,ga as Bn,ha as $n,j as Hn,m as Lt,va as Nn,wa as Wn,xa as In,ya as _n,za as jn}from"./chunk.HT2BEOEV.js";import{a as Te}from"./chunk.SDO3U72B.js";import{$d as Cn,Eb as Sn,Pd as Re,Qd as Fn,Rd as On,Wd as xt,Xc as kn,Xd as Ft,Yd as Ot,ae as Ct,fb as _e,hc as Tt,hd as An,ic as Pn,id as En,nd as Rn,pd as Tn,qb as ot,qd as xn,rb as bn,sd as at}from"./chunk.7BBGRTXM.js";import"./chunk.FQLNBIQ5.js";import{b as De}from"./chunk.AJZBJBMO.js";function _t(e){if(Array.isArray(e))return e.map(_t);if(e&&typeof e=="object"){let n={};for(let o of Object.keys(e).sort()){let i=e[o];i!==void 0&&(n[o]=_t(i))}return n}return e}function jt(e){return JSON.stringify(_t(e))??"undefined"}async function lt(e,n={}){let o=e.compiled===void 0||!ao(e.compiled,e.document)?void 0:Ln(e.compiled,n);if(o?.ok)return o;let{compileDocumentWithoutCheck:i}=await oo();return i(e.document,n)}var Sr,oo=()=>Sr??=(__graviewPreload(import.meta.url,["./chunk.GUEHKCWN.js","./chunk.GKSUTAIX.js","./chunk.QGV7H7RQ.js","./chunk.YIA2EDVF.js","./chunk.7BBGRTXM.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.WJFQIE3Y.js")).catch(e=>{throw Sr=void 0,e});function ao(e,n){let o=typeof e=="object"&&e!==null?e.document:void 0,i=n;if(typeof i=="string")try{i=JSON.parse(i)}catch{return!1}return o!==void 0&&jt(Rt(o).document)===jt(Rt(i).document)}var d=De(Mt(),1);var ft=De(Mt(),1),qt="data-graview-drawn",io=200,Pr=50,so=1e4,ut=()=>typeof performance<"u"?performance.now():Date.now();function co(e){let n=[...e.querySelectorAll("img")];for(let o of e.querySelectorAll("[data-worker-view]"))o.shadowRoot&&n.push(...o.shadowRoot.querySelectorAll("img"));return n}function lo(e,n){if(e.ownerDocument.fonts?.status==="loading"||Wn()>0||qn(n)>0||e.querySelector('[aria-busy="true"]')||co(e).some(i=>!i.complete&&i.loading!=="lazy"))return!1;for(let i of e.querySelectorAll("[data-worker-view-place]"))if(!i.querySelector("[data-worker-view][data-worker-view-drawn], [data-worker-view][data-worker-view-failed]"))return!1;return!0}function kr(e){let n=e.querySelector("[data-embed-content]"),o=[...e.querySelectorAll("[data-worker-view]")].map(i=>`${i.offsetWidth}x${i.offsetHeight}`);return`${e.scrollWidth}x${e.scrollHeight}|${n?`${n.scrollWidth}x${n.scrollHeight}`:""}|${o.join(",")}`}function uo(e,n,o,i){e.removeAttribute(qt);let c=e.ownerDocument.defaultView;if(!c)return()=>{};let l=ut(),S=l,p=kr(e),w=!1,E,T=typeof MutationObserver>"u"?void 0:new MutationObserver(v=>{v.some(_=>!(_.target===e&&_.attributeName===qt))&&(S=ut())});T?.observe(e,{childList:!0,subtree:!0,characterData:!0,attributes:!0});let P=()=>{w=!0,T?.disconnect(),E!==void 0&&clearTimeout(E)},k=v=>{let _=!1,de=()=>{_||(_=!0,v())};typeof c.requestAnimationFrame=="function"&&c.requestAnimationFrame(()=>setTimeout(de,0)),setTimeout(de,100)},F=()=>{if(w)return;let v=kr(e);v!==p&&(p=v,S=ut());let _=ut();if(lo(e,i)&&_-S>=io||_-l>=so){k(()=>{w||(P(),e.setAttribute(qt,n),Gn(),o())});return}E=setTimeout(F,Pr)};return E=setTimeout(F,Pr),P}function Ar(e,n,o,i,c){zn();let l=(0,ft.useRef)({place:o,onDrawn:i});l.current={place:o,onDrawn:i},(0,ft.useLayoutEffect)(()=>{c&&jn(c);let S=E=>uo(E,l.current.place.path,()=>l.current.onDrawn?.(l.current.place),c);if(e.current)return S(e.current);let p,w=!1;return queueMicrotask(()=>{!w&&e.current&&(p=S(e.current))}),()=>{w=!0,p?.()}},[n,e,c])}var ve=De(Mt(),1),Ke,fo=Te(()=>(__graviewPreload(import.meta.url,["./chunk.5IEFTFKQ.js","./chunk.O4CVKTPJ.js","./chunk.3FCOFEGW.js","./chunk.TBW7CU4G.js","./chunk.SPXRLO5K.js","./chunk.HT2BEOEV.js","./chunk.SDO3U72B.js","./chunk.7BBGRTXM.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.GQBJVCSM.js"))),Er=()=>fo().then(e=>void(Ke=e),()=>new Promise(e=>setTimeout(e,2e3)).then(Er)),zt=Nn(Er),Rr=e=>!!e&&Ke===void 0;function Gt({onReady:e,fetch:n}){return(0,ve.useLayoutEffect)(()=>void n().then(e),[e,n]),null}var po=0;function Tr(e){let[n,o]=(0,ve.useState)(()=>Ke);(0,ve.useEffect)(()=>{if(!e||n)return;let l=!1;return zt().then(()=>{l||o(Ke)}),()=>{l=!0}},[e,n]);let i=(0,ve.useMemo)(()=>po+=1,[e]);return{over:(0,ve.useMemo)(()=>{let l=n??Ke;if(!e||!l)return;let{source:S,worker:p,...w}=e,E={...w,worker:p??{source:S},draft:!0};return{name:e.manifest.name,home:e.manifest.attach==="home",register:T=>l.registerWorkerView(T,E)}},[e,n]),n:i}}var Or=De(ro(),1),I=De(no(),1);var g=De(Dn(),1);function pt(e,n={}){let o=Ht(e);return{Face:o.part((c,l)=>(0,d.createElement)(c,l),n),fetch:()=>o.load().then(()=>{}),here:()=>o.current!==void 0||o.failed}}var Jt=e=>Promise.all([e,nr()]).then(([n])=>n),Cr=Te(()=>(__graviewPreload(import.meta.url,["./chunk.IDJPBWL2.js","./chunk.3OYGXYQY.js","./chunk.UAP5M3CD.js","./chunk.GDOTG7YA.js","./chunk.KFQSYCY3.js","./chunk.NKC3JILT.js","./chunk.HEWVPXRE.js","./chunk.HJCQ6I3S.js","./chunk.HXRV3WVJ.js","./chunk.MQ5HBUBL.js","./chunk.R7LFO7KI.js","./chunk.HS3GHAUR.js","./chunk.ZOHMWSHD.js","./chunk.PZG3B7F4.js","./chunk.LRUNFSHP.js","./chunk.WNSC3RWD.js","./chunk.S5MGE2U5.js","./chunk.LL2MLSPH.js","./chunk.EB4NVTJL.js","./chunk.VG7OWV2H.js","./chunk.KXPRILAO.js","./chunk.S2H7B6RG.js","./chunk.RRKYJYZJ.js","./chunk.2EDC63RI.js","./chunk.GZHZLJBF.js","./chunk.ELERUERU.js","./chunk.OJGHDWI6.js","./chunk.YHTE34RN.js","./chunk.3YZHZGTM.js","./chunk.EQTSV7BK.js","./chunk.27CW6SCT.js","./chunk.YD3TKV6P.js","./chunk.4KC35UNR.js","./chunk.HT2BEOEV.js","./chunk.SDO3U72B.js","./chunk.7BBGRTXM.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.QPXXY2DL.js"))),mo=Te(()=>(__graviewPreload(import.meta.url,["./chunk.2VYNNWW5.js","./chunk.TF5I4VHX.js","./chunk.TWKXSLYY.js","./chunk.6VC6AGYV.js","./chunk.IDJPBWL2.js","./chunk.UGFDSE37.js","./chunk.PXQVXBNG.js","./chunk.BTVBZ6KE.js","./chunk.3OYGXYQY.js","./chunk.GCBZ3WE2.js","./chunk.GDOTG7YA.js","./chunk.EPPXZZPK.js","./chunk.KFQSYCY3.js","./chunk.WQOI6BLM.js","./chunk.LCPGZK7G.js","./chunk.NKC3JILT.js","./chunk.HEWVPXRE.js","./chunk.LMN4TSAP.js","./chunk.HS3GHAUR.js","./chunk.LRUNFSHP.js","./chunk.43OKZU73.js","./chunk.WNSC3RWD.js","./chunk.ACYDJQRC.js","./chunk.S5MGE2U5.js","./chunk.34TW32TB.js","./chunk.BJUUSIQY.js","./chunk.VG7OWV2H.js","./chunk.KXPRILAO.js","./chunk.XOZU4OFA.js","./chunk.BB33TI4S.js","./chunk.MB7LKKUD.js","./chunk.WVUJXDXZ.js","./chunk.LDAYDCUO.js","./chunk.KKNDX4JT.js","./chunk.GKSUTAIX.js","./chunk.5ICIMQE6.js","./chunk.QGV7H7RQ.js","./chunk.YIA2EDVF.js","./chunk.GZHZLJBF.js","./chunk.ELERUERU.js","./chunk.OJGHDWI6.js","./chunk.YHTE34RN.js","./chunk.3YZHZGTM.js","./chunk.EQTSV7BK.js","./chunk.27CW6SCT.js","./chunk.YD3TKV6P.js","./chunk.4KC35UNR.js","./chunk.HT2BEOEV.js","./chunk.SDO3U72B.js","./chunk.7BBGRTXM.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.32FMOHZK.js"))),ho=Te(()=>(__graviewPreload(import.meta.url,["./chunk.2VYNNWW5.js","./chunk.TF5I4VHX.js","./chunk.TWKXSLYY.js","./chunk.6VC6AGYV.js","./chunk.IDJPBWL2.js","./chunk.UGFDSE37.js","./chunk.PXQVXBNG.js","./chunk.BTVBZ6KE.js","./chunk.3OYGXYQY.js","./chunk.GCBZ3WE2.js","./chunk.GDOTG7YA.js","./chunk.EPPXZZPK.js","./chunk.KFQSYCY3.js","./chunk.WQOI6BLM.js","./chunk.LCPGZK7G.js","./chunk.NKC3JILT.js","./chunk.HEWVPXRE.js","./chunk.LMN4TSAP.js","./chunk.HS3GHAUR.js","./chunk.LRUNFSHP.js","./chunk.43OKZU73.js","./chunk.WNSC3RWD.js","./chunk.ACYDJQRC.js","./chunk.S5MGE2U5.js","./chunk.34TW32TB.js","./chunk.BJUUSIQY.js","./chunk.VG7OWV2H.js","./chunk.KXPRILAO.js","./chunk.XOZU4OFA.js","./chunk.BB33TI4S.js","./chunk.MB7LKKUD.js","./chunk.WVUJXDXZ.js","./chunk.LDAYDCUO.js","./chunk.KKNDX4JT.js","./chunk.GKSUTAIX.js","./chunk.5ICIMQE6.js","./chunk.QGV7H7RQ.js","./chunk.YIA2EDVF.js","./chunk.GZHZLJBF.js","./chunk.ELERUERU.js","./chunk.OJGHDWI6.js","./chunk.YHTE34RN.js","./chunk.3YZHZGTM.js","./chunk.EQTSV7BK.js","./chunk.27CW6SCT.js","./chunk.YD3TKV6P.js","./chunk.4KC35UNR.js","./chunk.HT2BEOEV.js","./chunk.SDO3U72B.js","./chunk.7BBGRTXM.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.MYNQWWCL.js"))),Lr=pt(()=>Jt(Cr().then(e=>e.SceneFace)),{what:"This view"}),Mr=pt(()=>Cr().then(e=>e.SceneKeeping),{quiet:!0}),Hr=pt(()=>Jt(mo().then(e=>e.PagesContent)),{what:"This page"}),Dr=pt(()=>Jt(ho().then(e=>e.PictureFace)),{what:"This picture"}),yo=Lr.Face,go=Mr.Face,wo=Hr.Face,vo=Dr.Face;function Ve(...e){let n=e.length>0?e:["scene","pages","picture"],o=new Set(n.flatMap(Vr));return Promise.all([...[...o].map(i=>i.fetch()),Zn()]).then(()=>{},()=>{})}var Vr=e=>e==="pages"?[Hr]:e==="picture"?[Dr]:[Lr,Mr],Br=e=>Vr(e).every(n=>n.here()),bo=150,Ut=0;function xr(e,n){if(Br(e))return n();let o=++Ut,i=()=>{o===Ut&&(Ut+=1,n())};Ve(e).then(i),setTimeout(i,bo)}var So=768;function Po(e,n){let o=n!==null&&n>=So;(0,d.useEffect)(()=>{if(!o||e==="picture")return;let i=e==="pages"?"scene":"pages";if(Br(i))return;let c=globalThis,l=()=>void Ve(i),S=()=>{},p=Un(()=>{if(c.requestIdleCallback&&c.cancelIdleCallback){let w=c.requestIdleCallback(l,{timeout:4e3});S=()=>c.cancelIdleCallback?.(w)}else{let w=setTimeout(l,1500);S=()=>clearTimeout(w)}});return()=>(p(),S())},[e,o])}function ko({asked:e,shown:n,onDrawn:o}){return(0,d.useLayoutEffect)(()=>o(e,n),[e,n,o]),null}function Ao({auto:e,scene:n}){return(0,g.jsx)("div",{"data-embed-content":"","aria-busy":"true",style:{flex:e?n?`0 0 ${It}px`:"0 0 auto":"1 1 auto",minHeight:0,background:"var(--graview-ground)"}})}var Eo=Ht(Te(()=>(__graviewPreload(import.meta.url,["./chunk.AJZBJBMO.js"]),import("./chunk.5JNXQHN4.js")))).part((e,n)=>(0,g.jsx)(e.StudioPlace,{...n}),{quiet:!0});function $r(e,n,o,i,c){return $t(e,sr(n?ct(n):c??Mn,i),o)}function Yt(e){return e&&ct(e).overview?"graview":"scene"}function Fr(e,n){if(n.homeView?.()===void 0)return!1;let o=e.pages?.first?.trim();return o===void 0||o===""||o==="/"||o.toLowerCase()==="home"}function Nr(e){let[,n]=(0,d.useState)(!1),o=(0,d.useCallback)(()=>n(!0),[]),i=(0,d.useRef)(!1);return e.at&&!mt?(0,g.jsx)(Gt,{onReady:o,fetch:Qt}):!i.current&&Rr(e.draftView)?(0,g.jsx)(Gt,{onReady:o,fetch:zt}):(i.current=!0,(0,g.jsx)(Ro,{...e}))}function Ro(e){let{app:n,stop:o,bar:i=!0,standing:c="Everything is in order",principal:l,heading:S=2}=e,{rootRef:p,scope:w,css:E,scheme:T,store:P,presence:k,brand:F,auto:v,height:_}=pr(e),de=Tr(e.draftView),D=ur(e,rr,de.over),[ie]=(0,d.useState)(_n),f=e.basePath===void 0?{}:{basePath:e.basePath},[V]=(0,d.useState)(Dt),j=e.notices??V,Z=h=>xt(h,f),x={...e.routing?{routing:e.routing}:{},...f},[me]=(0,d.useState)(()=>{let h=e.at?.face;if(h)return h;let Q=o===void 0&&Fr(n,D)?"pages":Yt(o),K=Bt({...x,face:Q});return e.face===void 0&&e.onOpening?.(K),K}),[B,R]=(0,d.useState)(()=>e.face!==void 0&&e.face!=="pages"&&!e.at&&o===void 0&&or(x)&&Fr(n,D)),he=(0,d.useRef)(e.onFace);he.current=e.onFace,(0,d.useLayoutEffect)(()=>{B&&(he.current?.("pages"),R(!1))},[B]);let L=B?"pages":e.face??me,O=n.schema.kinds,C=e.routing==="address",H=(0,d.useMemo)(()=>e.at?mt.settleAt(e,P.seenBy(l??{kind:"human"}),D.places()):void 0,[]),X=(0,d.useMemo)(()=>$n(D,n.schema),[D,n.schema]),q=(0,d.useMemo)(()=>{let h=H?.stop??(C?ar(e.basePath):void 0)??o;return L==="scene"&&h===void 0&&X===void 0&&(e.path===void 0||Kt(e.path))?Nt(void 0):$r(L,h,O,D.places(),X)},[]),[ye]=(0,d.useState)(L);(0,d.useEffect)(()=>{ye!=="pages"&&Bn(D)},[ye,D]);let $=(0,d.useRef)(void 0),Fe=h=>h===void 0||Kt(h)?"/":h;$.current??={path:Fe(H?.path??(C?L==="pages"?(Ft(window.location.pathname,e.basePath)??"/")+window.location.search:"/":e.path)),asked:e.path},e.path!==$.current.asked&&($.current={path:Fe(e.path),asked:e.path});let M=(0,d.useRef)(e.onNavigate);M.current=e.onNavigate;let ee=(0,d.useCallback)((h,Q)=>{$.current.path=h,M.current?.(h,Q)},[]),{at:te,setAt:N,steering:Se,steer:J}=wr($.current.path),z=(0,d.useContext)(Wr);z&&(z.pages=()=>$.current.path);let G=(0,d.useRef)(void 0),le=(0,d.useCallback)(h=>void($.current.path=h),[]),ne=Yn(p),[Oe,Pe]=(0,d.useState)(!1),se=e.pagesBelow!==void 0&&ne!==null&&ne<e.pagesBelow&&(L==="scene"||L==="graview")&&!Oe,A=se?"pages":L,Ce=(0,d.useRef)(!1);Ce.current=Oe&&e.pagesBelow!==void 0&&ne!==null&&ne<e.pagesBelow&&(L==="scene"||L==="graview"),z&&(z.shown=A);let Le=(0,d.useRef)(L==="graview"?"graview":"scene");(A==="scene"||A==="graview")&&(Le.current=A),(0,d.useState)(()=>{if(!C||typeof window>"u"||A==="pages"||A==="picture")return;let{pathname:h,search:Q,hash:K}=window.location;Ft(h,e.basePath)==="/"&&window.history.replaceState(window.history.state,"",`${Z(Re)}${Q}${K}`)}),fr(p,A,e.onIntrinsicHeight),Po(A,ne);let re=vr(e.onError,A),Me=br(e.onReady,A),ke=(0,d.useRef)(e.onFaceDrawn);ke.current=e.onFaceDrawn;let Ye=(0,d.useCallback)((h,Q)=>{Me(Q),ke.current?.(h)},[Me]),[Be,wt]=(0,d.useState)(null),Qe=D.places(),$e=(0,d.useRef)({shown:A,onFace:e.onFace});$e.current={shown:A,onFace:e.onFace};let W=(0,d.useCallback)((h,Q,K)=>{if(C){G.current?.(h,Q,K);return}$e.current.onFace?.(h),M.current?.(h==="pages"?Q??$.current.path:Re,"push")},[C]),[ge,U]=(0,d.useState)(void 0);(0,d.useEffect)(()=>{A==="pages"&&U(void 0)},[A]);let Ne=(0,d.useRef)(o);(0,d.useEffect)(()=>{Ne.current!==o&&(Ne.current=o,U(void 0))},[o]);let Ae=(0,d.useCallback)(h=>{if($e.current.shown==="pages"){if(Pe(!0),U(h),L==="scene"||L==="graview"){xr(L,()=>{C?window.history.pushState(null,"",`${Z(Re)}${h??""}`):M.current?.(Re,"push")});return}xr(Le.current,()=>W(Le.current,void 0,h))}},[C,L,e.basePath,W]),He=(0,d.useCallback)(h=>{if($e.current.shown==="pages"){Se.go.current||($.current.path=h),J(h);return}if($.current.path=h,N(h),Ce.current){Pe(!1),C?window.history.pushState(null,"",Z(h)):M.current?.(h,"push");return}W("pages",h)},[Se,J,N,W,C,e.basePath]),ze=D.arrangement?.(),ue=A==="pages",Ee=e.hrefOf,We=Ee??(C?Z:void 0),Y=(0,d.useMemo)(()=>({open:He,...Ee?{href:Ee}:C?{href:h=>xt(h,e.basePath===void 0?{}:{basePath:e.basePath})}:{}}),[He,C,e.basePath,Ee]);return(0,g.jsxs)("section",{ref:p,className:w,"aria-label":e.label??n.name,"data-graview-embed":A,"data-graview-scheme":T,...se?{"data-graview-embed-narrow":""}:{},style:{position:"relative",isolation:"isolate",height:_,minHeight:v?0:320,display:"flex",flexDirection:"column",overflow:"hidden",borderRadius:"var(--graview-radius, 12px)"},children:[(0,g.jsx)("style",{children:E}),(0,g.jsxs)(Jn.Provider,{value:re,children:[(0,g.jsx)(mr,{rootRef:p,board:j}),(0,g.jsx)(lr,{rootRef:p,firstLook:e.firstLook,app:er(F??{name:n.name},n.schema)}),(0,g.jsx)(Ue,{module:"@graview/react",report:re,content:!0,children:(0,g.jsx)(In.Provider,{value:ie,children:(0,g.jsx)(Vn,{store:P,views:D,initialView:q,scheme:T,...hr(e,k,F),...e.onSeat?{onSeat:e.onSeat}:{},children:(0,g.jsxs)(Qn.Provider,{value:j,children:[(0,g.jsx)(Oo,{face:A,stop:ge??o,kinds:O,places:Qe,opens:X}),z?(0,g.jsx)(To,{into:z}):null,(0,g.jsx)(xo,{rootRef:p,face:L,shown:A,path:te,stop:o,draft:de.n,onDrawn:e.onDrawn,parts:ie}),C?(0,g.jsx)(ir,{pagesWere:H?.path,basePath:e.basePath,shown:A,onFace:e.onFace,toggle:G,kinds:O,places:Qe,opens:X,landed:le}):null,i&&A!=="picture"?(0,g.jsx)(Ue,{module:"@graview/embed",report:re,children:(0,g.jsx)(yr,{name:F?.name??n.name,heading:S,named:Wt(i).name!==!1,faces:Wt(i).faces===!1?void 0:{scene:{label:Fn(ze),current:!ue,go:()=>Ae(),reach:()=>void Ve(Le.current)},pages:{label:On(ze),current:ue,go:()=>He($.current.path),reach:()=>void Ve("pages")}},at:ue?te:null,without:e.pages?.without(),home:{...We?.("/")!==void 0?{href:We("/")}:{},go:()=>He("/"),current:ue&&te.split("?")[0]==="/"},reach:{...We?{href:We}:{},go:h=>He(h.path)},standing:c,hostActions:e.hostActions,keeping:ue?void 0:(0,g.jsx)(Co,{app:n,studio:e.studio,report:re}),onFind:wt,switch:e.switch})}):null,(0,g.jsx)(Xn.Provider,{value:Be,children:(0,g.jsx)(Ue,{module:A==="pages"||A==="picture"?"@graview/pages":"@graview/react",report:re,content:!0,children:(0,g.jsxs)(d.Suspense,{fallback:(0,g.jsx)(Ao,{auto:v,scene:A!=="pages"&&A!=="picture"}),children:[A==="picture"?(0,g.jsx)(vo,{scope:w,store:P,views:D,as:(o?ct(o).within?.view:void 0)??""}):A==="pages"?(0,g.jsx)(wo,{store:P,views:D,presence:k,auto:v,brand:F,steering:Se,overview:Ae,scope:w,titleLevel:gr(S),quickAsk:Vt(e.quickAsk),props:{...e,onNavigate:ee,...C?{}:{path:$.current.path}}}):(0,g.jsx)(Kn.Provider,{value:Y,children:(0,g.jsx)(yo,{address:C,auto:v,scheme:T,scope:w,quickAsk:Vt(e.quickAsk)})}),(0,g.jsx)(ko,{asked:L,shown:A,onDrawn:Ye})]})},A)})]})})})})]})]})}var Kt=e=>e.split(/[?#]/)[0]===Re,Wr=(0,d.createContext)(null);function To({into:e}){return e.view=dt().view,null}function xo({rootRef:e,face:n,shown:o,path:i,stop:c,draft:l,onDrawn:S,parts:p}){let{view:w}=dt(),E=o==="scene"||o==="graview",T=st(w),{pan:P,...k}=w,F=w.pan?st(k):T,v={face:n,path:E?Re:o==="picture"?c??"#":i,stop:T};return Ar(e,`${o} ${E?F:v.path} ${l}`,v,S,p),null}var mt,Fo=Te(()=>(__graviewPreload(import.meta.url,["./chunk.NOFWGDOT.js","./chunk.YD3TKV6P.js","./chunk.4KC35UNR.js","./chunk.HT2BEOEV.js","./chunk.SDO3U72B.js","./chunk.7BBGRTXM.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.HMFJT4KO.js"))),Qt=()=>Fo().then(e=>void(mt=e),()=>new Promise(e=>{let n=()=>{window.removeEventListener("online",n),clearTimeout(o),e()},o=setTimeout(n,1e4);window.addEventListener("online",n)}).then(Qt));function Oo({face:e,stop:n,kinds:o,places:i,opens:c}){let{view:l,go:S}=dt(),p=(0,d.useRef)({face:e,stop:n});return(0,d.useLayoutEffect)(()=>{let w=p.current.stop!==n,E=p.current.face!==e,T=p.current.face==="pages";if(p.current={face:e,stop:n},!w&&!E||e==="pages"||e==="picture")return;let P=(w||T)&&n!==void 0?$r(e,n,o,i):T&&cr(l)?$t(e,Nt(c),o):e==="graview"?Lt(l,!0):l.overview?Hn(Lt(l,!1),tr(l,o)):l;S(P)},[e,n,o,l,S,c]),null}function Co({app:e,studio:n,report:o}){return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(d.Suspense,{fallback:null,children:(0,g.jsx)(go,{})}),n!==!1?(0,g.jsx)(Ue,{module:"@graview/studio",report:o,children:(0,g.jsx)(Lo,{app:e,studio:n})}):null]})}function Lo({app:e,studio:n}){let o={app:e,within:"box",...n?{onApply:n.onApply}:{},...n?.landmark?{landmark:n.landmark}:{},...n?.offered!==void 0?{offered:n.offered}:{}},i=n?.place;return i?(0,g.jsx)(i,{...o}):(0,g.jsx)(d.Suspense,{fallback:null,children:(0,g.jsx)(Eo,{...o})})}function Mo({path:e,stop:n,...o},i){return{...o,app:i.app,at:i.at,remote:i.remote,...i.remote.presence?{presence:i.remote.presence}:{}}}function Zt(e,n){let o=n.store??n.remote?.store??dr(n.app,n.seed),i=n.notices??Dt(),c=null,l={},S=0,p=n.label,w=n.app,E=Promise.resolve(),T=n.at?.face??n.face,P=T===void 0?void 0:Bt({...n,face:T}),k=P??Yt(n.stop),F=null,v=[],_=f=>{if(F=f,f!==k)return;let V=v;v=[];for(let j of V)j()};function de(){let[f,V]=(0,d.useState)(P),[j,Z]=(0,d.useState)(n.stop),[x,me]=(0,d.useState)(n.path),[B,R]=(0,d.useState)(n.scheme??"auto"),[he,L]=(0,d.useState)(n.principal),[O,C]=(0,d.useState)(n.seats),[H,X]=(0,d.useState)(n.quickAsk),[q,ye]=(0,d.useState)(n.people),[$,Fe]=(0,d.useState)(n.hostContext),[M,ee]=(0,d.useState)(n.brand),[te,N]=(0,d.useState)(n.whileAway),[Se,J]=(0,d.useState)(n.label),[z,G]=(0,d.useState)(n.hostActions),[le,ne]=(0,d.useState)(void 0),[Oe,Pe]=(0,d.useState)(n.draftView);return c={app:se=>{ne(se),me(void 0),Z(void 0)},face:V,stop:Z,path:me,scheme:R,seat:L,seats:C,quickAsk:X,people:ye,hostContext:Fe,brand:ee,whileAway:N,label:J,hostActions:G,draft:Pe},(0,g.jsx)(Wr.Provider,{value:l,children:(0,g.jsx)(Nr,{...le?Mo(n,le):n,store:o,notices:i,...f!==void 0?{face:f}:{},onOpening:se=>{k=se},...j!==void 0?{stop:j}:{},...x!==void 0?{path:x}:{},...he?{principal:he}:{},...O?{seats:O}:{},...H!==void 0?{quickAsk:H}:{},...q?{people:q}:{},...$?{hostContext:$}:{},...M?{brand:M}:{},whileAway:te,label:Se,hostActions:z,draftView:Oe,scheme:B,onFace:se=>{k=se,V(se)},onSeat:L,onFaceDrawn:_},le?.n??0)})}let D=()=>{let f=l.view?.focusId,V=f?o.graph.getNode(f)?.kind:void 0,j=(l.shown??k)==="scene"||(l.shown??k)==="graview";return{face:k,path:j?Re:l.pages?.()??n.path??"/",stop:l.view?st(l.view):n.stop??"#",...V?{kind:V}:{}}},ie=(0,Or.createRoot)(e);return(0,I.flushSync)(()=>ie.render((0,g.jsx)(de,{}))),{get store(){return o},where:D,setApp:(f,V,j)=>{let Z="graph"in V?{store:V}:V,x=()=>{let me=D();o=Z.store,p=j?.label??(p===w.name?f.name:p),w=f,(0,I.flushSync)(()=>{c?.label(p),c?.app({app:f,remote:Z,at:me,n:++S})})};mt?x():E=E.then(Qt).then(x)},setFace:f=>{k=f,(0,I.flushSync)(()=>c?.face(f))},setStop:f=>(0,I.flushSync)(()=>c?.stop(f)),setPath:f=>(0,I.flushSync)(()=>{if(Kt(f)){(k==="pages"||k==="picture")&&(k="scene",c?.face("scene"));return}c?.path(f),k!=="pages"&&(k="pages",c?.face("pages"))}),setScheme:f=>(0,I.flushSync)(()=>c?.scheme(f)),setSeat:f=>(0,I.flushSync)(()=>c?.seat(f)),setSeats:f=>(0,I.flushSync)(()=>c?.seats(f)),setQuickAsk:f=>(0,I.flushSync)(()=>c?.quickAsk(f)),setPeople:f=>(0,I.flushSync)(()=>c?.people(f)),setHostContext:f=>(0,I.flushSync)(()=>c?.hostContext(f)),setBrand:f=>(0,I.flushSync)(()=>c?.brand(f)),setWhileAway:f=>(0,I.flushSync)(()=>c?.whileAway(f)),setDraftView:f=>(0,I.flushSync)(()=>c?.draft(f)),setLabel:f=>{p=f,(0,I.flushSync)(()=>c?.label(f))},setHostActions:f=>(0,I.flushSync)(()=>c?.hostActions(f)),drawn:()=>E.then(()=>F===k?void 0:new Promise(f=>v.push(f))),notify:f=>{let V;return(0,I.flushSync)(()=>{V=i.notify(f)}),V},unmount:()=>ie.unmount()}}var ht=e=>`s${(e+1).toString(36)}`;var Ir="/graview/friction";var _r="/graview/live",Xt="graview.ship",en=`${Xt}.${ot}`;var be={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",via:"x-graview-via"};var je=class extends Error{constructor(n){super(n),this.name="Superseded"}},xe=e=>e?.lineage?{lineage:e.lineage}:{},Ho=(e,n)=>`${e.calls.map(o=>o.name.replace(/-/g," ")).join(", ")} (${n instanceof Error?n.message.split(`
|
|
2
|
+
`)[0]??"":String(n)})`;function Do(e){if(!e)return[];try{let n=e.storage.getItem(e.key);if(n===null)return[];e.storage.removeItem(e.key);let o=JSON.parse(n);return Array.isArray(o)?o.filter(i=>!!i&&Array.isArray(i.calls)):[]}catch{return[]}}var qe=class extends Error{constructor(o){super(o.sentence);this.refusal=o;this.name="RemoteRefusedError"}},Vo={401:"forbidden",403:"forbidden",404:"missing",413:"limit"},pe=class extends Error{constructor(o,i){super(o);this.conflicts=i;this.name="StaleWrite"}},Je=class extends Error{constructor(n){super(n),this.name="Unreached"}},Bo=new Set([502,503,504]);async function $o(e){try{return(await e.clone().json()).reason==="unavailable"}catch{return!1}}function No(){let e=Math.random().toString(36).slice(2,8),n=0;return()=>`local-${e}-${++n}`}var Wo=1,Io=()=>({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 yt(e){return(await jr(e,Do(e.carry),"This app was updated while your changes were on the way.",Io())).remote}async function jr(e,n,o,i){let c=e.fetch??fetch,l={"content-type":"application/json",...e.headers??{}},S={...gt(e.principal),[be.via]:e.via??"web"};Object.assign(l,S);let p=e.live===!0,w=e.presenceEveryMs,E=e.visible??qo,T="connecting",P=i.statuses,k=i.tally,F=[],v,_=[],de=()=>T==="online"&&v!==void 0?"held":T,D=()=>{let t=de();if(i.told!==t){i.told=t;for(let r of[...P])r(t)}},ie=t=>{if(!(t===T||ce)&&(T==="offline"&&t==="online"&&k.reconnects++,T=t,D(),t==="online"))for(let r of F.splice(0))r.again()},f=t=>{if(ce)return;let r=typeof t=="string"&&t.length>0?t:void 0,s=r!==v;if(v=r,V(),!!s&&(D(),r===void 0)){for(let a of _.splice(0))a();oe&&clearTimeout(oe),an()}},V=()=>{if(i.toldHeld!==v){i.toldHeld=v;for(let t of[...i.helds])t(v??null)}},j=async(t,r)=>{let s;try{s=await c(t,r)}catch(a){throw Y()||ie("offline"),new Je(a instanceof Error?a.message:String(a))}if(s.status===503&&await $o(s))return ie("online"),s;if(Bo.has(s.status))throw Y()||ie("offline"),new Je(`The server is away (${s.status})`);return ie("online"),s},Z=async(t=!1)=>{let r=`${e.url}/graview/state?opFormat=${_e.op}`,s=t?await c(r,{headers:l}):await j(r,{headers:l});if(!s.ok)throw new Error((await s.json().catch(()=>({}))).error??`The server refused (${s.status})`);return await s.json()},x=e.state??await Z(!0);p||(T="online"),v=typeof x.held=="string"&&x.held.length>0?x.held:void 0,V();let me=x.enabledModules??e.enabledModules,B=e.localApp?e.localApp(e.app):e.app,R=new xn({schema:B.schema,mutations:B.mutations??[],invariants:B.invariants??[],...B.policy?{policy:B.policy}:{},...B.publishing?{publishing:B.publishing}:{},...B.modules?{modules:B.modules}:{},...me?{enabledModules:me}:{},...B.intelligence?{intelligence:B.intelligence}:{},...B.brand?.timeZone?{timeZone:B.brand.timeZone}:{},snapshot:x.snapshot,log:x.log,...x.horizon!==void 0?{horizon:x.horizon}:{},ids:No(),...e.storeOptions??{}});kn.served.add(R);let he=e.friction!==!1&&e.principal?.kind!=="visitor";he&&An(R,t=>{he&&c(`${e.url}${Ir}`,{method:"POST",headers:l,body:JSON.stringify({event:t})}).then(r=>void(he=r.status!==404&&r.status!==410),()=>{})});let L=Rn(R),O=x.log.at(-1)?.seq??(x.horizon??0)-1,C=Tt.of(x.log,{horizon:x.horizon??0}),H=null,X,q=new Map,ye=i.who,$=!1,Fe=t=>{if(ce)return;$=!0;let r=Cn(new Map,t,Date.now(),Ot,H?.participant);X!==void 0&&r.delete(X);let s=r.size!==q.size;if(!s)for(let[a,u]of r)Ct(u,q.get(a))||(s=!0);if(q=r,!!s)for(let a of[...ye])a([...q.values()])},M=[],ee=new Set,te=t=>{let r=M.indexOf(t);r>=0&&M.splice(r,1)},N=new Map,Se=(t,r)=>{let s=N.get(t);s&&(N.delete(t),s.resolve({ops:r.filter(a=>a.batch===t),batch:t}))},J,z=[],G=(t,r=[])=>{if(t.length===0&&r.length===0)return[];if(J)return z.push({ops:t,drop:r}),[];let s=Math.min(...t.filter(m=>m.seq>O).map(m=>m.seq));if(Number.isFinite(s)&&s>O+1)return z.push({ops:t,drop:r}),le(),[];let a=M.filter(m=>t.some(ae=>ae.batch===m)),u=[...new Set([...r,...a])].filter(m=>ee.has(m)),y,b=M.filter(m=>!a.includes(m));try{y=R.rebase({confirmed:t,pending:b,drop:u}).confirmed}catch(m){if(!(m instanceof Tn))throw m;return z.push({ops:t,drop:r}),le(),[]}for(let m of a)te(m);t.some(m=>m.seq>O)&&b.some(m=>!u.includes(m))&&k.rebases++,t.length>0&&(O=Math.max(O,...t.map(m=>m.seq)),C.note(t));for(let m of u)ee.delete(m);for(let m of a)Se(m,t);return y},le=()=>{J||(J=ke(Z().then(t=>{if(ne(t)){z=[];return}let r=new Set(t.log.map(u=>u.batch)),s=M.filter(u=>r.has(u));for(let u of s)te(u);let a=R.adopt({snapshot:t.snapshot,log:t.log,...t.horizon!==void 0?{horizon:t.horizon}:{},pending:[...M],drop:[...ee].filter(u=>!M.includes(u))});ee.clear();for(let u of a.pending)ee.add(u.batch);O=t.log.at(-1)?.seq??(t.horizon??0)-1,C=Tt.of(t.log,{horizon:t.horizon??0}),k.resyncs++;for(let u of s)Se(u,t.log)}).then(()=>{J=void 0;let t=z;z=[];for(let{ops:r,drop:s}of t)G(r,s)},()=>{J=void 0,z=[]})))},ne=t=>(typeof t.build=="string"&&cn(t.build),typeof t.version=="number"&&f(t.held),typeof t.version!="number"||t.version===x.version?!1:(St(t.version),!0)),Oe=async t=>{let s=await(await j(`${e.url}/graview/since?seq=${ht(t)}&opFormat=${_e.op}`,{headers:l})).json();return ne(s)?[]:s.reset===!0?(le(),[]):s.ops??[]},Pe=async()=>{let t=await se();return J&&await J,t},se=async()=>{if(H&&!Y()&&E()){let r=await(await j(`${e.url}/graview/here?opFormat=${_e.op}`,{method:"POST",headers:l,body:JSON.stringify({presence:H,seq:ht(O)})})).json();return ne(r)?[]:(typeof r.participant=="string"&&(X=r.participant),Fe(r.who??[]),G(r.ops??[]))}return G(await Oe(O))},A=new Map,Ce=new Map,Le=new Set,re=new Map,Me=new Set,ke=t=>(Me.add(t),t.finally(()=>Me.delete(t)).catch(()=>{}),t),Ye=Promise.resolve(),Be=0,wt=(t,r)=>{let s=Ye.then(()=>$e(t,r));return Ye=s.catch(()=>{}),s},Qe=()=>new Promise((t,r)=>F.push({again:t,give:r})),$e=async(t,r)=>{let s,a;for(;;){try{s=await j(`${e.url}/graview/ops`,{method:"POST",headers:l,body:JSON.stringify({...t,opFormat:_e.op})})}catch(m){if(!(m instanceof Je)||U)throw m;if(await Qe(),Y())return Ze(t,r);continue}if(a=await s.json().catch(()=>({})),s.status===503&&a.reason==="unavailable"&&typeof a.held=="string"&&!U){if(typeof a.version=="number"?ne(a):(f(a.held),!1))break;if(v!==void 0&&(Et>0||p)){if(await new Promise(m=>_.push(m)),U)throw new je("The client closed.");if(Y())return Ze(t,r);continue}}let b;if(s.status===503&&a.reason==="unavailable"&&!U)b=tn(e.backoff,Be++);else{if(Be=0,s.status!==429||U)break;b=_o(s.headers.get("retry-after"),a.retryAfter)}if(await new Promise(m=>setTimeout(m,b)),Y())return Ze(t,r)}if(ce||ne(a))throw new je("The app was changed.");if(!s.ok){let b=a.error??`The server refused (${s.status})`;throw a.conflict?new pe(b,a.conflicts??[]):new qe({reason:a.reason??Vo[s.status]??"invalid",sentence:b,...a.wouldNeed?.length?{wouldNeed:a.wouldNeed}:{}})}let u=a.ops??[],y=u[0]?.seq;return y!==void 0&&y>O+1&&(u=await Oe(O)),r!==void 0&&(a.batch&&A.set(r,a.batch),te(r)),G(u,r!==void 0?[r]:[]),{ops:a.ops??[],...a.batch?{batch:a.batch}:{}}},W,ge=!1,U=!1,Ne=0,Ae,He=0,ze=0,ue=null,Ee=()=>{},We=new Promise(t=>{Ee=t}),Y=()=>p&&ge&&W?.readyState===Wo,h=t=>{if(!Y())return!1;try{return W.send(JSON.stringify(t)),!0}catch{return!1}},Q=(t=!1)=>{!H||!Y()||!E()||!t&&ue&&Ct(H,ue)&&(w===void 0||Date.now()-ze<w)||h({t:"here",presence:H})&&(ue=H,ze=Date.now())},K=new Set,oe,an=()=>{if(oe=void 0,v!==void 0)return;let t=[...N.entries()].filter(([r])=>K.has(r));K.clear();for(let[,r]of t)h(r.message)},sn=(t,r)=>{N.has(t)&&(K.add(t),oe&&clearTimeout(oe),oe=setTimeout(an,Math.max(0,r)))},Gr=t=>{N.has(t)&&K.add(t)},Ze=(t,r)=>new Promise((s,a)=>{let u=r??`send-${++He}`,y=t.undo?{t:"undo",cid:u,batches:t.undo,...t.intent?{intent:t.intent}:{},...t.batch?{batch:t.batch}:{},...t.via?{via:t.via}:{},...xe(t)}:{t:"call",cid:u,calls:t.calls??[],...t.intent?{intent:t.intent}:{},...t.batch?{batch:t.batch}:{},...t.base?.length?{base:t.base}:{},...t.via?{via:t.via}:{},...xe(t)};if(N.set(u,{message:y,...r!==void 0?{mine:r}:{},resolve:s,reject:a}),K.size>0||v!==void 0){K.add(u);return}h(y)}),Xe=(t,r)=>Y()?Ze(t,r):wt(t,r),Ur=t=>{switch(t.t){case"welcome":{if(cn(t.build),typeof t.version=="number"&&t.version!==x.version){St(t.version);return}if(ge=!0,Ne=0,typeof t.participant=="string"&&(X=t.participant),f(t.held),t.state?le():G(t.ops??[]),K.clear(),oe&&clearTimeout(oe),oe=void 0,v!==void 0)for(let r of N.keys())K.add(r);else for(let r of N.values())h(r.message);Q(!0),ie("online"),Ee();return}case"ops":G(t.ops??[]);return;case"ack":{let r=N.get(t.cid);if(!r){G(t.ops??[]);return}N.delete(t.cid),Be=0,r.mine!==void 0&&(A.set(r.mine,t.batch),te(r.mine)),G(t.ops??[],r.mine!==void 0?[r.mine]:[]),r.resolve({ops:t.ops??[],batch:t.batch});return}case"refused":case"conflict":{let r=N.get(t.cid);if(!r)return;if(t.t==="refused"&&t.reason==="unavailable"){v!==void 0?Gr(t.cid):sn(t.cid,tn(e.backoff,Be++));return}N.delete(t.cid),r.reject(t.t==="conflict"?new pe(t.sentence,t.conflicts??[]):new qe({reason:t.reason??"invalid",sentence:t.sentence,...t.wouldNeed?.length?{wouldNeed:[...t.wouldNeed]}:{}}));return}case"busy":typeof t.cid=="string"&&sn(t.cid,typeof t.retryAfter=="number"?t.retryAfter:1e3);return;case"presence":Fe(t.who??[]);return;case"held":f(t.sentence);return;case"declaration":typeof t.version=="number"&&t.version!==x.version&&St(t.version);return;case"reload":fn(typeof t.reason=="string"?t.reason:"This app was updated.");return;case"error":if(t.reopen===!0&&W){let r=W;mn(r);try{r.close(1e3,"Opening again.")}catch{}}return;default:return}},ce=!1,vt=i.declarations,bt=i.builds,cn=t=>{if(!(ce||i.otherBuild!==void 0||!e.build||typeof t!="string"||t.length===0||t===e.build)){i.otherBuild=t;for(let r of[...bt])r(t)}},dn=()=>{let t=[],r=0;for(let s of M){let a=re.get(s);a?t.push({calls:a.calls,...a.intent?{intent:a.intent}:{},...a.via?{via:a.via}:{},...xe(a),batch:s}):r++}return{carried:t,undos:r}},ln=(t,r)=>`${r} while ${t===1?"an undo of yours was":"undos of yours were"} on the way; ${t===1?"it was":"they were"} not made.`,un=t=>{ce=!0,H=null;let r=new je(t);for(let a of N.values())a.reject(r);N.clear(),nt&&clearInterval(nt),U=!0,Ae&&clearTimeout(Ae),oe&&clearTimeout(oe),we&&clearTimeout(we);for(let a of F.splice(0))a.give(r);for(let a of _.splice(0))a();let s=W;W=void 0,ge=!1;try{s?.close(1e3,t)}catch{}Ee()};async function St(t){if(ce)return;if(!e.resolveApp){fn(`This app was changed on its server (version ${t}); reload the page to carry on.`);return}let{carried:r,undos:s}=dn(),a=e.resolveApp,u=H;un("The app was changed.");try{let y=await a(t),{state:b,...m}=e,ae=await jr({...m,app:y},r,"The app was changed while your changes were on the way.",i);u&&ae.remote.presence.here(u);for(let rt of[...vt])rt(ae.remote,t);let fe=[...s>0?[et(ln(s,"The app was changed"))]:[],...ae.unheard()];for(let rt of fe)for(let to of Ie)to(rt.sentence,rt)}catch(y){let b=`The app was changed, but the new version could not be opened: ${y instanceof Error?y.message:String(y)}`;for(let m of Ie)m(b,et(b))}}function fn(t){if(ce)return;let{carried:r,undos:s}=dn();un(t);let a=!1;if(e.carry&&r.length>0)try{e.carry.storage.setItem(e.carry.key,JSON.stringify(r)),a=!0}catch{}let u=[];!a&&r.length>0&&u.push(`${t} ${r.length===1?"A change of yours was":`${r.length} changes of yours were`} not sent; make ${r.length===1?"it":"them"} again after the page reloads.`),s>0&&u.push(ln(s,"This app was updated"));for(let y of u)for(let b of Ie)b(y,et(y));(e.reloadPage??jo)()}let pn=()=>{if(U||!p)return;let t=`${e.url.replace(/^http/,"ws").replace(/\/$/,"")}${_r}`,{"content-type":r,...s}=l,a;try{a=e.socket?e.socket(t,s,[en]):eo(t,s)}catch{return hn()}W=a,ge=!1,a.onopen=()=>{W===a&&a.send(JSON.stringify({t:"hello",seq:ht(O),protocol:ot,wire:Xt,opFormat:_e.op,...e.build?{build:e.build.slice(0,64)}:{},...e.hostProtocol!==void 0?{hostProtocol:e.hostProtocol}:{}}))},a.onmessage=u=>{if(W!==a)return;let y;try{y=JSON.parse(String(u.data))}catch{return}Ur(y)},a.onclose=()=>mn(a),a.onerror=()=>{}},we,Kr=()=>{$=!1,we&&clearTimeout(we),we=setTimeout(()=>{if(we=void 0,$||U)return;let t=new Map([...q].filter(([,r])=>r.held!=="socket"));if(t.size!==q.size){q=t;for(let r of ye)r([...q.values()])}},Ot),we.unref?.()};function mn(t){if(W!==t)return;let r=ge;W=void 0,ge=!1,ue=null,r&&(ie("offline"),Kr()),hn()}let hn=()=>{if(U)return;let t=tn(e.backoff,Ne);Ne++,Ae=setTimeout(pn,t)},yn=R.applyAll.bind(R),Jr=R.undo.bind(R),Yr=R.previewAll.bind(R);R.previewAll=(t,r)=>Yr(t,{...e.principal?{author:e.principal}:{},...r});let Ie=i.refusals,Ge=[],et=t=>({reason:"invalid",sentence:t}),tt=i.conflicts,Pt=!1,gn,kt=async(t,r)=>{if(r instanceof je||ce)return;let s=r instanceof qe?r.refusal:Sn(r),a=s.sentence,u=r instanceof pe?gn?.yoursOf(R,re.get(t)?.calls??[]):void 0;te(t);try{G([],[t])}catch{}let y=re.get(t);re.delete(t);let b=y?.calls[0];if(b&&!(r instanceof pe)){let m=R.allMutations().find(fe=>fe.name===b.name)?.subject?.arg,ae=m&&R.graph.getNode(b.args[m])?.kind;En(R,{type:"refused",act:b.name,code:s.reason,...ae?{kind:ae}:{}},e.principal)}if(r instanceof pe&&k.conflicts++,r instanceof pe&&!Y()&&await Pe().catch(()=>[]),r instanceof pe&&J&&await J,r instanceof pe&&tt.size>0){let m=!1,ae={sentence:a,conflicts:u?r.conflicts.map(fe=>fe.node===u.node&&fe.field===u.field?{...fe,yours:u.yours}:fe):r.conflicts,keepTheirs(){m=!0},useMine(){if(!(m||!y)){m=!0,Pt=!0;try{R.applyAll(u?[u.over(O)]:y.calls,{...y.intent?{intent:y.intent}:{},...y.via?{via:y.via}:{},...xe(y)})}finally{Pt=!1}}}};for(let fe of tt)fe(ae);return}for(let m of Ie)m(a,s)},Qr=(t,r)=>t.flatMap(s=>s.mutation?.name===bn?[]:s.primitives.flatMap(a=>a.op==="splice-text"&&!r.has(a.id)&&!r.has(`${a.id}\0${a.field}`)?[{node:a.id,field:a.field,rev:O}]:[]));R.applyAll=(t,r)=>{let s=Pn(R.log.all().filter(b=>ee.has(b.batch))),a=yn(t,{...e.principal?{author:e.principal}:{},...r}),u=t.map((b,m)=>{let ae=a.minted?.[m];return ae===void 0||b.args?.id!==void 0?b:{...b,mintedHint:ae}});M.push(a.batch),ee.add(a.batch),re.set(a.batch,{calls:u,...r?.intent?{intent:r.intent}:{},...r?.via?{via:r.via}:{},...xe(r)});let y=Pt?[]:[...C.baseFor(a.ops,s,(b,m)=>R.collaborative(b,m)),...Qr(a.ops,s)];return Ce.set(a.batch,ke(Xe({calls:u,...r?.intent?{intent:r.intent}:{},batch:a.batch,...y.length>0?{base:y}:{},...r?.via?{via:r.via}:{},...xe(r)},a.batch).catch(b=>kt(a.batch,b)))),a},R.apply=(t,r)=>R.applyAll([t],r),R.undo=(t,r)=>{let s=typeof t=="string"?[t]:t,a=Jr(s.map(y=>A.get(y)??y),{...e.principal?{author:e.principal}:{},...r});M.push(a.batch),ee.add(a.batch);let u=Promise.allSettled(s.map(y=>Ce.get(y)));return Ce.set(a.batch,ke(u.then(()=>{let y=s.filter(b=>!Le.has(b));if(y.length===0){te(a.batch),re.delete(a.batch),G([],[a.batch]);return}return Xe({undo:y.map(b=>A.get(b)??b),...r?.intent?{intent:r.intent}:{},batch:a.batch,...r?.via?{via:r.via}:{},...xe(r)},a.batch)}).catch(y=>kt(a.batch,y)))),a};let Zr=async(t,r={})=>{At++;try{return(await ke(Xe({calls:t,...r}))).ops}finally{At--}},At=0,wn={here(t){H=t,Q()},onWho(t){return ye.add(t),q.size>0&&t([...q.values()]),()=>{ye.delete(t)}},leave(){if(!H)return;let t=JSON.stringify({participant:X??H.participant});if(H=null,h({t:"bye"}))return;let r=globalThis.navigator?.sendBeacon;r?r.call(globalThis.navigator,`${e.url}/graview/leave`,t):c(`${e.url}/graview/leave`,{method:"POST",headers:l,body:t}).catch(()=>{})}},Et=e.pollMs??800,nt=Et>0&&typeof setInterval=="function"?setInterval(()=>{Y()||Pe().catch(()=>{})},Et):null;if(p){pn();let t;await Promise.race([We,new Promise(r=>t=setTimeout(r,e.openTimeoutMs??3e3))]),clearTimeout(t)}if(n.length>0&&!ce){let t=[],r=new Set(R.log.all().map(s=>s.batch));for(let s of n)if(!(s.batch!==void 0&&r.has(s.batch)))try{R.applyAll(s.calls,{...s.intent?{intent:s.intent}:{},...s.batch?{batch:s.batch}:{},...s.via?{via:s.via}:{},...xe(s)})}catch(a){t.push(Ho(s,a))}t.length>0&&Ge.push(et(`${o} ${t.length===1?"One no longer fits and was not made":`${t.length} no longer fit and were not made`}: ${t.join("; ")}.`))}let vn=new Map,Xr=()=>({store:R,author:e.principal,appliedAll:yn,pending:M,provisional:ee,asked:re,answers:Ce,letGo:Le,sent:(t,r)=>ke(Xe({calls:r,batch:t},t).catch(s=>kt(t,s))),settle:te,land:G,seen:()=>O,gone:()=>U||ce});return{remote:{store:R,typing(t,r){let s=`${t}\0${r}`,a=vn.get(s);return a||(a=(__graviewPreload(import.meta.url,["./chunk.HZB5F476.js","./chunk.7BBGRTXM.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.OASYYMG5.js")).then(u=>(gn=u,u.typingOf(t,r,u.wireOf(Xr())))),vn.set(s,a)),a},version:x.version,migrated:x.migrated??[],send:Zr,pull:Pe,onRefusal(t){Ie.add(t);let r=Ge;Ge=[];for(let s of r)t(s.sentence,s);return()=>Ie.delete(t)},onDeclaration(t){return vt.add(t),()=>vt.delete(t)},onBuild(t){return bt.add(t),i.otherBuild!==void 0&&t(i.otherBuild),()=>bt.delete(t)},onConflict(t){return tt.add(t),()=>tt.delete(t)},revision:(t,r)=>C.of(t,r),seq:()=>O,participant:()=>X,transport:()=>Y()?"socket":"poll",status:de,onStatus(t){return P.add(t),()=>P.delete(t)},held:()=>v,onHeld(t){return i.helds.add(t),v!==void 0&&t(v),()=>i.helds.delete(t)},counters:()=>({...k}),who:()=>[...q.values()],pending:()=>M.length+At,async settled(){for(;Me.size>0;)await Promise.allSettled([...Me])},presence:wn,close(){nt&&clearInterval(nt),L(),wn.leave(),U=!0,Ae&&clearTimeout(Ae),oe&&clearTimeout(oe),we&&clearTimeout(we);for(let r of F.splice(0))r.give(new Error("The client closed before the server could be reached."));for(let r of _.splice(0))r();let t=W;W=void 0,ge=!1;try{t?.close(1e3,"Closed.")}catch{}}},unheard(){let t=Ge;return Ge=[],t}};function eo(t,r){let s=globalThis.WebSocket;if(!s)throw new Error("This runtime has no WebSocket; the client polls instead.");let a=typeof globalThis.document<"u",u=e.subprotocol?[en]:[];if(!a)try{return new s(t,{headers:r,...u.length>0?{protocols:u}:{}})}catch{}let y=new URL(t);for(let[b,m]of Object.entries(S))y.searchParams.set(b,m);return u.length>0?new s(y.toString(),u):new s(y.toString())}}function _o(e,n,o=Date.now()){let i,c=e?.trim();if(c)if(/^\d+(\.\d+)?$/.test(c))i=Number(c)*1e3;else{let p=Date.parse(c);Number.isFinite(p)&&(i=Math.max(0,p-o))}let l=typeof n=="number"&&Number.isFinite(n)&&n>=0?n:void 0,S=l!==void 0&&l<50&&i!==void 0&&Math.abs(l*1e3-i)<1e3;return l!==void 0&&!S?l:i??1e3}function jo(){globalThis.location?.reload?.()}function qo(){return globalThis.document?.visibilityState!=="hidden"}function tn(e,n){if(typeof e=="function")return Math.max(0,e(n));let{min:o=250,max:i=1e4,factor:c=2}=e??{};return Math.min(i,o*c**n)*(.75+Math.random()*.5)}function gt(e){let n={};if(!e)return n;e.id&&(n[be.seat]=e.id),e.roles?.length&&(n[be.roles]=e.roles.join(",")),e.kind!=="human"&&(n[be.kind]=e.kind),e.name&&(n[be.name]=encodeURIComponent(e.name));let o=e.onBehalfOf;return o?.id&&(n[be.for]=o.id),o?.roles?.length&&(n[be.forRoles]=o.roles.join(",")),o?.name&&(n[be.forName]=encodeURIComponent(o.name)),n}var qr="/graview/views";function nn(e){let n=e.fetch??fetch,o=e.url.replace(/\/$/,""),i={"content-type":"application/json",...e.principal?gt(e.principal):{},...e.headers??{}},c=e.state?{hidden:e.state.hidden??[],removed:e.state.removed??[],may:e.state.may??at.may}:at,l=new Set,S=P=>{if(JSON.stringify(P)!==JSON.stringify(c)){c=P;for(let k of l)k()}},p=async(P,k)=>{let F=await n(`${o}${e.path??qr}`,{method:P,headers:i,...k!==void 0?{body:JSON.stringify(k)}:{}}),v=await F.json();if(!F.ok)throw new Error(v.error??`The store answered ${F.status}.`);S({hidden:v.hidden??[],removed:v.removed??[],may:v.may??at.may})},w=()=>p("GET"),E=e.state?Promise.resolve():w().catch(()=>{}),T=e.pollMs?setInterval(()=>void w().catch(()=>{}),e.pollMs):void 0;return{ready:E,refresh:w,close:()=>clearInterval(T),current:()=>c,onChange(P){return l.add(P),()=>void l.delete(P)},hide:P=>p("POST",{hide:P}),show:P=>p("POST",{show:P}),remove:(P,k)=>p("POST",{remove:P,...k?{about:k}:{}}),async restore(P){let k=c.removed.find(F=>F.name===P)?.lens;await p("POST",{restore:P}),k&&await e.onDeclaration?.()},async lens(P){await p("POST",{lens:P}),await e.onDeclaration?.()}}}var on=document.getElementById("graview-app"),rn=/^\/forms\/([^/]+)\/?$/.exec(location.pathname),zr=rn?(__graviewPreload(import.meta.url,["./chunk.TF5I4VHX.js","./chunk.S5MGE2U5.js","./chunk.XOZU4OFA.js","./chunk.BB33TI4S.js","./chunk.PBCNOFQH.js","./chunk.RRKYJYZJ.js","./chunk.3YZHZGTM.js","./chunk.EQTSV7BK.js","./chunk.27CW6SCT.js","./chunk.4KC35UNR.js","./chunk.HT2BEOEV.js","./chunk.SDO3U72B.js","./chunk.7BBGRTXM.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.JGKA5QBX.js")):Ve("pages");try{rn?await zo(decodeURIComponent(rn[1])):await Go()}catch(e){let n=document.createElement("pre");n.setAttribute("role","alert"),n.style.cssText="margin:2rem;font:14px/1.5 ui-monospace,monospace;white-space:pre-wrap",n.textContent=e instanceof Error?e.message:String(e),on.replaceChildren(n),window.__graviewFailed=n.textContent}async function zo(e){let n=await fetch(`/graview/document?form=${encodeURIComponent(e)}`),o=await n.json();if(!n.ok)throw new Error(o.error??`The preview server did not hand over the form (${n.status}).`);let i=await lt(o);if(!i.ok)throw new Error(it(i.findings));let c=i.app,l=o.principal,S=await yt({app:c,url:location.origin,principal:l,...o.state?{state:o.state,openTimeoutMs:0}:{openTimeoutMs:3e3}});document.title=c.forms?.[e]?.title??c.name;let{mount:p}=await zr;window.__graview=p(on,{app:c,form:e,principal:l,remote:S,height:"100dvh",onSubmitted:()=>window.__graviewSubmitted=!0}),window.__graviewReady=!0}async function Go(){let e=await fetch("/graview/document");if(!e.ok)throw new Error(`The preview server did not hand over the document (${e.status}).`);let n=await e.json(),i=await(async w=>{if(typeof w.module=="string")return(await import(w.module)).app;let E=await lt(w);if(!E.ok)throw new Error(it(E.findings));return E.app})(n);if(!i||typeof i!="object"||!("schema"in i))throw new Error("The app module the preview server handed does not export an app.");let c=n.principal,l=await yt({app:i,url:location.origin,principal:c,live:!0,subprotocol:!0,pollMs:1200,...n.state?{state:n.state,openTimeoutMs:0}:{openTimeoutMs:3e3}});document.title=i.name;let S,p=nn({url:location.origin,principal:c,...n.views?{state:n.views}:{},onDeclaration:async()=>{let w=await(await fetch("/graview/document")).json();if(typeof w.module=="string")return;let E=await lt(w);E.ok&&S?.setApp(E.app,l)}});await Promise.all([zr,p.ready]),S=Zt(on,{app:i,remote:l,principal:c,studio:!1,face:"pages",routing:"address",bar:!0,height:"100dvh",label:i.name,heading:1,keptViews:p,...n.draftView?{draftView:n.draftView}:{}}),window.__graview=S,S.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.58",
|
|
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/
|
|
33
|
-
"@graview/
|
|
34
|
-
"@graview/
|
|
35
|
-
"@graview/
|
|
36
|
-
"@graview/
|
|
32
|
+
"@graview/core": "0.1.58",
|
|
33
|
+
"@graview/ship": "0.1.58",
|
|
34
|
+
"@graview/guest": "0.1.58",
|
|
35
|
+
"@graview/skills": "0.1.58",
|
|
36
|
+
"@graview/tools": "0.1.58"
|
|
37
37
|
},
|
|
38
38
|
"engines": {
|
|
39
39
|
"node": ">=22"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as n}from"./chunk.JD5HSAMC.js";import"./chunk.4JDHBNEA.js";import"./chunk.M72JKVHP.js";import"./chunk.YQXA4WAM.js";import{l as s}from"./chunk.UWQ3I5OW.js";import"./chunk.UGFDSE37.js";import"./chunk.PXQVXBNG.js";import"./chunk.FLMNWVSY.js";import"./chunk.JETT6ELP.js";import"./chunk.DSLGMCB6.js";import"./chunk.IX63LTRQ.js";import"./chunk.I636CZE4.js";import"./chunk.TVURUMU4.js";import"./chunk.UV3U4FRT.js";import"./chunk.EZ4TZUMM.js";import"./chunk.47T3KUAA.js";import"./chunk.NZDWXX6H.js";import"./chunk.C5EFUODO.js";import"./chunk.UGOKORIF.js";import"./chunk.VDS3IOTK.js";import"./chunk.YS5U3DUX.js";import"./chunk.SAJLIA5M.js";import"./chunk.LWRXCO2Z.js";import"./chunk.I2NI7CT7.js";import"./chunk.LHIT3EZD.js";import"./chunk.BJUUSIQY.js";import"./chunk.BCE6LIDR.js";import"./chunk.MBLFZF5R.js";import"./chunk.XOZU4OFA.js";import"./chunk.5NZDFT6R.js";import"./chunk.MB7LKKUD.js";import"./chunk.WVUJXDXZ.js";import"./chunk.7INWDFNG.js";import"./chunk.FPGU43SC.js";import"./chunk.V6FUYRZI.js";import"./chunk.5BPRGXIW.js";import"./chunk.BZEJM2PY.js";import"./chunk.CMLNBJZG.js";import"./chunk.GZHZLJBF.js";import"./chunk.QPL3OXW3.js";import"./chunk.OJGHDWI6.js";import"./chunk.FRERJWZJ.js";import"./chunk.RQX4CQJN.js";import"./chunk.LUIRQ5UF.js";import"./chunk.N33WUCAN.js";import"./chunk.JQFIZRAZ.js";import"./chunk.LKJ6FD6Y.js";import{G as y,T as i}from"./chunk.DBMZ3AQB.js";import"./chunk.SDO3U72B.js";import"./chunk.DIFR37EZ.js";import"./chunk.FQLNBIQ5.js";import{b as r}from"./chunk.AJZBJBMO.js";var c=r(y(),1),e=r(i(),1);function v({store:d,views:t,as:a,scope:o}){let l=(0,c.useMemo)(()=>s({scope:`.${o}`}),[o]);return(0,e.jsxs)("div",{"data-testid":"embed-picture","data-embed-content":"",tabIndex:0,"aria-label":t.places().find(m=>m.as===a)?.title??"The picture",style:{flex:"1 1 auto",minHeight:0,display:"grid",gridTemplateRows:"minmax(0, 1fr)",overflow:"auto",background:"var(--graview-ground)",color:"var(--graview-ink)",fontFamily:"var(--graview-font-body, system-ui)"},children:[(0,e.jsx)("style",{children:l}),(0,e.jsx)(n,{store:d,views:t,as:a})]})}export{v as PictureFace};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o}from"./chunk.4W5GCPAP.js";import"./chunk.G4JJXA63.js";import"./chunk.C7EJPV2N.js";import"./chunk.7ML2BWSP.js";import"./chunk.RALAID6N.js";import"./chunk.XOZU4OFA.js";import"./chunk.5NZDFT6R.js";import"./chunk.XTBS64IT.js";import"./chunk.WVUJXDXZ.js";import"./chunk.7INWDFNG.js";import"./chunk.FPGU43SC.js";import"./chunk.V6FUYRZI.js";import"./chunk.5BPRGXIW.js";import"./chunk.BZEJM2PY.js";import"./chunk.CMLNBJZG.js";import"./chunk.RQX4CQJN.js";import"./chunk.LUIRQ5UF.js";import"./chunk.N33WUCAN.js";import"./chunk.DIFR37EZ.js";import"./chunk.FQLNBIQ5.js";import"./chunk.AJZBJBMO.js";export{i as draftAnswer,h as draftFromLens,b as draftSight,l as draftView,a as isDraftFailure,c as judgeLens,d as lensEditOf,f as lensFromSpec,j as recipeDraft,g as recipeOfLens,m as refineDraft,o as runDraftTool,e as takeBackEditOf,k as templateDraft,n as withReaderLenses};
|