graview 0.1.70 → 0.1.72
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.2IOJNFCR.js +1 -0
- package/dist/preview/{chunk.I7CSRZC2.js → chunk.2Q4ZXP7P.js} +1 -1
- package/dist/preview/{chunk.O2XPLDMM.js → chunk.2TTKQAWQ.js} +1 -1
- package/dist/preview/chunk.2YSE3SQN.js +23 -0
- package/dist/preview/{chunk.NZFO6BM3.js → chunk.2ZPR6FRI.js} +1 -1
- package/dist/preview/chunk.3BE4SHZD.js +1 -0
- package/dist/preview/{chunk.QODVFVWE.js → chunk.43HWCHBN.js} +1 -1
- package/dist/preview/{chunk.QILGAV7H.js → chunk.45OLF6BK.js} +1 -1
- package/dist/preview/{chunk.NTAC5NNE.js → chunk.47QWCVZD.js} +1 -1
- package/dist/preview/{chunk.7HNMG6LG.js → chunk.4A7BRBEA.js} +1 -1
- package/dist/preview/chunk.4EPCI6VY.js +1 -0
- package/dist/preview/{chunk.OXXZGPJZ.js → chunk.4PB5UFUJ.js} +1 -1
- package/dist/preview/{chunk.SWY6DIE4.js → chunk.4TDYDIIM.js} +3 -3
- package/dist/preview/{chunk.6VG2LCES.js → chunk.4VX7GPFS.js} +1 -1
- package/dist/preview/{chunk.TUVPQLFL.js → chunk.523X2YEQ.js} +1 -1
- package/dist/preview/{chunk.CHG522KL.js → chunk.53GQQETN.js} +1 -1
- package/dist/preview/{chunk.NBB5ALVJ.js → chunk.5MKZTHU2.js} +1 -1
- package/dist/preview/chunk.5OS4SYHE.js +1 -0
- package/dist/preview/{chunk.ZTHZHBVN.js → chunk.5ZT4R227.js} +1 -1
- package/dist/preview/{chunk.RIP2SAQ5.js → chunk.65SI77M7.js} +1 -1
- package/dist/preview/chunk.6ESAFTWB.js +1 -0
- package/dist/preview/chunk.6GUIFP2A.js +1 -0
- package/dist/preview/{chunk.M3HLZX6Q.js → chunk.6GZYKHEN.js} +1 -1
- package/dist/preview/{chunk.UVMHC6VM.js → chunk.6YKKZI4H.js} +1 -1
- package/dist/preview/{chunk.BBLA4PSP.js → chunk.73RMM4W7.js} +1 -1
- package/dist/preview/chunk.7DCBIMOI.js +1 -0
- package/dist/preview/chunk.7JE3J7H4.js +1 -0
- package/dist/preview/{chunk.YTRUZ56A.js → chunk.7QGDWAHH.js} +1 -1
- package/dist/preview/{chunk.JEQ6CA5M.js → chunk.7VCYVCYM.js} +2 -2
- package/dist/preview/{chunk.X7HMTN3Z.js → chunk.A4TBVXHQ.js} +1 -1
- package/dist/preview/{chunk.J4NY2K2A.js → chunk.A6LJPXJ3.js} +1 -1
- package/dist/preview/chunk.AAPXF6NP.js +1 -0
- package/dist/preview/chunk.APUICV5Z.js +1 -0
- package/dist/preview/chunk.ASNVH2G4.js +25 -0
- package/dist/preview/{chunk.CM7EDQ4E.js → chunk.CJHCUHVN.js} +1 -1
- package/dist/preview/chunk.CUEPNS3Z.js +1 -0
- package/dist/preview/{chunk.U3CV227I.js → chunk.CUJRWBPX.js} +1 -1
- package/dist/preview/{chunk.7TZXDPPO.js → chunk.D5PW6YWF.js} +3 -3
- package/dist/preview/chunk.DCIYOZYP.js +1 -0
- package/dist/preview/chunk.DEBW4FH6.js +1 -0
- package/dist/preview/{chunk.MR776WQ2.js → chunk.DYPSFTRP.js} +1 -1
- package/dist/preview/{chunk.BBMX3IIO.js → chunk.E6QZUT4L.js} +1 -1
- package/dist/preview/chunk.E7QZZRAQ.js +17 -0
- package/dist/preview/chunk.EHCMBAZO.js +3 -0
- package/dist/preview/chunk.EXTD5JWD.js +1 -0
- package/dist/preview/{chunk.KOVTQCHX.js → chunk.EZF2T3XQ.js} +1 -1
- package/dist/preview/chunk.EZSST3IU.js +1 -0
- package/dist/preview/{chunk.DIVANC3G.js → chunk.F2BZ4SC4.js} +1 -1
- package/dist/preview/chunk.F2I7ERGM.js +1 -0
- package/dist/preview/{chunk.UWEFODVV.js → chunk.FCV3NX6L.js} +1 -1
- package/dist/preview/{chunk.NZ5TJKPT.js → chunk.FFTBUXKX.js} +2 -2
- package/dist/preview/chunk.FILBI7XA.js +1 -0
- package/dist/preview/{chunk.MGG5DH2S.js → chunk.FKSI5522.js} +1 -1
- package/dist/preview/{chunk.I3ADXJQW.js → chunk.FQ2QUDZS.js} +1 -1
- package/dist/preview/{chunk.A5ENJJZN.js → chunk.G2ZDDO3C.js} +1 -1
- package/dist/preview/{chunk.IPKODEOZ.js → chunk.GAVEWSXU.js} +1 -1
- package/dist/preview/chunk.GH6QX7JR.js +87 -0
- package/dist/preview/chunk.GMHBAS45.js +1 -0
- package/dist/preview/{chunk.YCMMATFK.js → chunk.GOVRX2YX.js} +1 -1
- package/dist/preview/chunk.GXK5PI7I.js +1 -0
- package/dist/preview/{chunk.RECTEAG4.js → chunk.GYP3EF6Z.js} +1 -1
- package/dist/preview/chunk.H2RVMT4Y.js +111 -0
- package/dist/preview/chunk.HCHGKI64.js +1 -0
- package/dist/preview/chunk.HE7SAJKZ.js +1 -0
- package/dist/preview/{chunk.WAIIXXVI.js → chunk.HIIYDKFC.js} +2 -2
- package/dist/preview/chunk.HPDUGKEF.js +32 -0
- package/dist/preview/{chunk.DGDOZHYK.js → chunk.HQRPOGTS.js} +1 -1
- package/dist/preview/chunk.HUJLELZ3.js +1 -0
- package/dist/preview/chunk.HVRUHRXR.js +1 -0
- package/dist/preview/{chunk.6KYTCEIH.js → chunk.I46VNAMS.js} +1 -1
- package/dist/preview/{chunk.QAERSZVB.js → chunk.ID4GOKT6.js} +1 -1
- package/dist/preview/{chunk.RJ7UV3XI.js → chunk.IZKCTF2R.js} +1 -1
- package/dist/preview/chunk.IZUAZ6EV.js +1 -0
- package/dist/preview/{chunk.ZIGW5VOT.js → chunk.J3CUBMUZ.js} +1 -1
- package/dist/preview/{chunk.3HFBHLXC.js → chunk.J4D4BIB4.js} +1 -1
- package/dist/preview/{chunk.IRPMGHZN.js → chunk.J7GH2CGV.js} +1 -1
- package/dist/preview/{chunk.SSHEFQ4R.js → chunk.JE4RBRKH.js} +1 -1
- package/dist/preview/{chunk.4BSEYZMS.js → chunk.JJSZLCNU.js} +1 -1
- package/dist/preview/{chunk.KV3N6VRG.js → chunk.JKX4J3KG.js} +1 -1
- package/dist/preview/{chunk.FUTSLXWN.js → chunk.JMXBMLKH.js} +1 -1
- package/dist/preview/chunk.JOB3EKS6.js +1 -0
- package/dist/preview/{chunk.5IM2X3VT.js → chunk.JP33TNCH.js} +1 -1
- package/dist/preview/{chunk.BZXJKWNI.js → chunk.K6EN2YR4.js} +1 -1
- package/dist/preview/chunk.K6YKXTKC.js +1 -0
- package/dist/preview/{chunk.A7JORJJL.js → chunk.KAIZDIRK.js} +1 -1
- package/dist/preview/{chunk.7LAXSQQY.js → chunk.KAQGSLC6.js} +3 -3
- package/dist/preview/{chunk.QG3LV4RH.js → chunk.KFYSKZC4.js} +1 -1
- package/dist/preview/{chunk.VBHV4TLG.js → chunk.KHRS2SKB.js} +1 -1
- package/dist/preview/chunk.KHVW6Q3T.js +1 -0
- package/dist/preview/chunk.KMFH26SS.js +1 -0
- package/dist/preview/{chunk.2T24FYAO.js → chunk.L3ST2YKI.js} +1 -1
- package/dist/preview/{chunk.HIJ72QX6.js → chunk.L6BLZJ6K.js} +1 -1
- package/dist/preview/{chunk.NCBUECIW.js → chunk.LG2BQ5LB.js} +1 -1
- package/dist/preview/{chunk.LZ3HO3HM.js → chunk.LLYHHG67.js} +1 -1
- package/dist/preview/{chunk.VKQONZKR.js → chunk.LPWANRBL.js} +1 -1
- package/dist/preview/{chunk.3MPLUSVY.js → chunk.LSS64NAA.js} +1 -1
- package/dist/preview/{chunk.SUYYDJGZ.js → chunk.MFNWHXGL.js} +1 -1
- package/dist/preview/{chunk.UJF6YTEO.js → chunk.MNH3WUAB.js} +1 -1
- package/dist/preview/chunk.MQ7AB5N4.js +1 -0
- package/dist/preview/{chunk.CZUUFO6A.js → chunk.MU5JK5TK.js} +1 -1
- package/dist/preview/{chunk.RXUL6P7Y.js → chunk.N5CACZ5F.js} +1 -1
- package/dist/preview/{chunk.S6IKR6RD.js → chunk.NFC2TYA6.js} +1 -1
- package/dist/preview/{chunk.TD2V74XU.js → chunk.NKRDVOLJ.js} +1 -1
- package/dist/preview/{chunk.SGYZM6ZU.js → chunk.NNK2E2EP.js} +1 -1
- package/dist/preview/{chunk.J65CZJIC.js → chunk.NVPKYWMF.js} +1 -1
- package/dist/preview/{chunk.DWMFLLJO.js → chunk.NWJ7ELHN.js} +1 -1
- package/dist/preview/{chunk.NKUNCQB3.js → chunk.O5P6LXHF.js} +1 -1
- package/dist/preview/{chunk.2MWEYNVH.js → chunk.OFK6673S.js} +1 -1
- package/dist/preview/{chunk.C4LC2UEU.js → chunk.OG6FEP3K.js} +1 -1
- package/dist/preview/{chunk.CZI6J5CE.js → chunk.OHGAZ3D5.js} +1 -1
- package/dist/preview/{chunk.XJ4JYROM.js → chunk.ONVYKLRX.js} +1 -1
- package/dist/preview/chunk.OQ3FKUP2.js +1 -0
- package/dist/preview/chunk.OUJV4CYS.js +1 -0
- package/dist/preview/{chunk.T552MHMU.js → chunk.OWHH7JDV.js} +1 -1
- package/dist/preview/{chunk.SCN6IYDG.js → chunk.OXDCGGZV.js} +1 -1
- package/dist/preview/{chunk.YIDNZTON.js → chunk.P3Z4ZCL3.js} +1 -1
- package/dist/preview/chunk.PF7XQ5R5.js +1 -0
- package/dist/preview/{chunk.FSZQTX3K.js → chunk.PGT4ZQDG.js} +4 -4
- package/dist/preview/chunk.PH547SON.js +1 -0
- package/dist/preview/chunk.PS765ODQ.js +3 -0
- package/dist/preview/{chunk.MZSWWMX6.js → chunk.PVAYYFT2.js} +1 -1
- package/dist/preview/{chunk.F5STM4DX.js → chunk.Q6WOIE5I.js} +1 -1
- package/dist/preview/{chunk.55C7WO4X.js → chunk.QE257AXE.js} +1 -1
- package/dist/preview/chunk.QKNC5OUC.js +1 -0
- package/dist/preview/chunk.QMGBAKX6.js +2 -0
- package/dist/preview/{chunk.4QBW46XV.js → chunk.QNFX5VHW.js} +1 -1
- package/dist/preview/chunk.QPCDAQTW.js +1 -0
- package/dist/preview/{chunk.TS5APXWC.js → chunk.QPTQIGLX.js} +1 -1
- package/dist/preview/{chunk.LZNHTROY.js → chunk.R5YGW5ZX.js} +1 -1
- package/dist/preview/{chunk.4VTUC5TF.js → chunk.RJ6KEVZC.js} +1 -1
- package/dist/preview/{chunk.6QMRDSTD.js → chunk.RKVMRP7B.js} +1 -1
- package/dist/preview/{chunk.YBQUP3KE.js → chunk.S7U2CHHG.js} +1 -1
- package/dist/preview/{chunk.CLJKQLK2.js → chunk.SD2UYSV6.js} +2 -2
- package/dist/preview/chunk.SI5GGFQR.js +1 -0
- package/dist/preview/{chunk.7QWGIGHM.js → chunk.SMF5S4DQ.js} +1 -1
- package/dist/preview/{chunk.LEZGBHPZ.js → chunk.SNDFIJVX.js} +1 -1
- package/dist/preview/{chunk.F5756PXX.js → chunk.STHWM422.js} +2 -2
- package/dist/preview/{chunk.JIEBGUCA.js → chunk.SV75TRCH.js} +1 -1
- package/dist/preview/{chunk.U2DZE7A5.js → chunk.SXGPRFA4.js} +1 -1
- package/dist/preview/{chunk.ZGJUCVT5.js → chunk.T3RFZ66S.js} +1 -1
- package/dist/preview/{chunk.I6HIVTXU.js → chunk.T6ISUVUP.js} +1 -1
- package/dist/preview/{chunk.R65YX332.js → chunk.TBLOBXZ2.js} +1 -1
- package/dist/preview/{chunk.CVVNHQPO.js → chunk.TDWJU6GW.js} +1 -1
- package/dist/preview/{chunk.2QALBEWP.js → chunk.THLT6NVO.js} +1 -1
- package/dist/preview/{chunk.7FTATAH2.js → chunk.TQCVEKPH.js} +1 -1
- package/dist/preview/{chunk.PAIBRJVZ.js → chunk.TQF5XCUS.js} +1 -1
- package/dist/preview/{chunk.F5XWYO5W.js → chunk.TRP66PHK.js} +1 -1
- package/dist/preview/chunk.TWXYI5AP.js +2 -0
- package/dist/preview/{chunk.IQCMV5WD.js → chunk.UOUQZYVD.js} +1 -1
- package/dist/preview/{chunk.FJXKQZZS.js → chunk.UPL3D3ZO.js} +1 -1
- package/dist/preview/{chunk.U5Q7EVZQ.js → chunk.UXW43HNW.js} +1 -1
- package/dist/preview/{chunk.ZOSTOVXR.js → chunk.V4GSVXSV.js} +1 -1
- package/dist/preview/chunk.VCEDSOAK.js +1 -0
- package/dist/preview/{chunk.4O3STSC4.js → chunk.VE4AQFLW.js} +1 -1
- package/dist/preview/{chunk.HMV4ILAC.js → chunk.VGQDPEB5.js} +1 -1
- package/dist/preview/{chunk.5A5DI36V.js → chunk.VMYXBFPE.js} +1 -1
- package/dist/preview/{chunk.BQWMHHAZ.js → chunk.VNI6HZEF.js} +2 -2
- package/dist/preview/chunk.VQRY2NQ6.js +1 -0
- package/dist/preview/{chunk.K6EKSURO.js → chunk.VUE6ILQV.js} +1 -1
- package/dist/preview/{chunk.3KF5RYPW.js → chunk.W2VSEEKX.js} +1 -1
- package/dist/preview/{chunk.KP7HUXH5.js → chunk.WAPY4RCS.js} +1 -1
- package/dist/preview/chunk.WFRSGGU5.js +1 -0
- package/dist/preview/{chunk.XAN7QXMQ.js → chunk.WIVNFOQR.js} +1 -1
- package/dist/preview/chunk.WRIBFLVG.js +1 -0
- package/dist/preview/{chunk.TVNY7F64.js → chunk.WWD2TS47.js} +1 -1
- package/dist/preview/{chunk.5W7EGQCQ.js → chunk.WWFOQDPR.js} +2 -2
- package/dist/preview/{chunk.FBDCHJS2.js → chunk.X45EITTK.js} +1 -1
- package/dist/preview/{chunk.5FQHZVE3.js → chunk.X5MCAUFX.js} +1 -1
- package/dist/preview/{chunk.IJVR7ZL7.js → chunk.XBWFQ54R.js} +1 -1
- package/dist/preview/{chunk.JPJHM62B.js → chunk.XMBGT6UT.js} +1 -1
- package/dist/preview/chunk.XP4IVKKR.js +1 -0
- package/dist/preview/chunk.XYBWBMNU.js +1 -0
- package/dist/preview/{chunk.MYR36HW4.js → chunk.YC2IDHQX.js} +1 -1
- package/dist/preview/{chunk.ZQSV5XVB.js → chunk.YCYJHPWS.js} +1 -1
- package/dist/preview/{chunk.BJ3G7J2Z.js → chunk.YF5GCOSZ.js} +3 -2
- package/dist/preview/{chunk.3I2SGKKF.js → chunk.YGGBGHZU.js} +1 -1
- package/dist/preview/chunk.YRC6PKXP.js +1 -0
- package/dist/preview/{chunk.6NYSB6OZ.js → chunk.YRN67Z5K.js} +1 -1
- package/dist/preview/chunk.ZDUKVXBI.js +5 -0
- package/dist/preview/index.html +55 -55
- package/dist/preview/page.js +2 -2
- package/package.json +6 -6
- package/dist/preview/chunk.2QOB62XU.js +0 -1
- package/dist/preview/chunk.36FKQJFM.js +0 -2
- package/dist/preview/chunk.3A3DCALP.js +0 -1
- package/dist/preview/chunk.3GPYKWAD.js +0 -1
- package/dist/preview/chunk.3QPMFUMV.js +0 -1
- package/dist/preview/chunk.3ZP6IDUC.js +0 -1
- package/dist/preview/chunk.53HW224Y.js +0 -1
- package/dist/preview/chunk.AW74DZ5V.js +0 -17
- package/dist/preview/chunk.C67TMA4U.js +0 -111
- package/dist/preview/chunk.CCCSZRKU.js +0 -1
- package/dist/preview/chunk.CUA7F3YJ.js +0 -25
- package/dist/preview/chunk.DBSSCJQM.js +0 -1
- package/dist/preview/chunk.DW6KXAUM.js +0 -1
- package/dist/preview/chunk.DWPM7AWA.js +0 -1
- package/dist/preview/chunk.FXCKKVT5.js +0 -1
- package/dist/preview/chunk.HHQUCFN4.js +0 -1
- package/dist/preview/chunk.HPWMCS3H.js +0 -23
- package/dist/preview/chunk.HRLCDBMO.js +0 -1
- package/dist/preview/chunk.I7ODVOO5.js +0 -1
- package/dist/preview/chunk.IANOWT3Z.js +0 -1
- package/dist/preview/chunk.IFPJPJ4M.js +0 -1
- package/dist/preview/chunk.IUVRJDL3.js +0 -5
- package/dist/preview/chunk.J4CSY2D5.js +0 -2
- package/dist/preview/chunk.JJIKTTXB.js +0 -1
- package/dist/preview/chunk.KDOJC4FX.js +0 -1
- package/dist/preview/chunk.KJAOJTZZ.js +0 -1
- package/dist/preview/chunk.KLZPUTMU.js +0 -1
- package/dist/preview/chunk.LQ2PDW2M.js +0 -32
- package/dist/preview/chunk.M7DJJRFH.js +0 -1
- package/dist/preview/chunk.MNWP3TPN.js +0 -1
- package/dist/preview/chunk.MSWOETXN.js +0 -1
- package/dist/preview/chunk.NILR2BWR.js +0 -1
- package/dist/preview/chunk.NNYKLENL.js +0 -1
- package/dist/preview/chunk.PYGNO2AV.js +0 -87
- package/dist/preview/chunk.PZHCWMKT.js +0 -1
- package/dist/preview/chunk.QQUZ5RTQ.js +0 -1
- package/dist/preview/chunk.QVID5WHS.js +0 -1
- package/dist/preview/chunk.RHV73CBA.js +0 -3
- package/dist/preview/chunk.RP6C2IUM.js +0 -1
- package/dist/preview/chunk.RPHZY7N4.js +0 -1
- package/dist/preview/chunk.RSMCTI2N.js +0 -1
- package/dist/preview/chunk.S4QSZRKH.js +0 -1
- package/dist/preview/chunk.T4QRIJE4.js +0 -1
- package/dist/preview/chunk.UJM5EZDM.js +0 -3
- package/dist/preview/chunk.UJPX3BUV.js +0 -1
- package/dist/preview/chunk.UYBSVE2W.js +0 -1
- package/dist/preview/chunk.WMZ2BINI.js +0 -1
- package/dist/preview/chunk.X2RHBTJI.js +0 -1
- package/dist/preview/chunk.X3FPVFFB.js +0 -1
- package/dist/preview/chunk.X4PFLIXB.js +0 -1
- package/dist/preview/chunk.YR7DKU5T.js +0 -1
- package/dist/preview/chunk.ZBK3FCVE.js +0 -1
- package/dist/preview/chunk.ZH5L746C.js +0 -1
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{a as G,b as J}from"./chunk.53HW224Y.js";import"./chunk.RECTEAG4.js";import{a as S,b as W}from"./chunk.MB7LKKUD.js";import{a as K}from"./chunk.O2XPLDMM.js";import"./chunk.CM7EDQ4E.js";import"./chunk.YR7DKU5T.js";import"./chunk.NKUNCQB3.js";import"./chunk.HMV4ILAC.js";import"./chunk.XAN7QXMQ.js";import"./chunk.CHG522KL.js";import"./chunk.IRPMGHZN.js";import"./chunk.7QWGIGHM.js";import"./chunk.HRLCDBMO.js";import"./chunk.LZNHTROY.js";import"./chunk.36FKQJFM.js";import"./chunk.RHV73CBA.js";import"./chunk.ZGJUCVT5.js";import"./chunk.CVVNHQPO.js";import"./chunk.YIDNZTON.js";import"./chunk.QILGAV7H.js";import"./chunk.I6HIVTXU.js";import"./chunk.PYGNO2AV.js";import"./chunk.3HFBHLXC.js";import{D as H,E as V,G as ee,Oa as _,Y as D,Ya as x,ha as F}from"./chunk.CUA7F3YJ.js";import{a as j}from"./chunk.SDO3U72B.js";import{oa as q,zd as B}from"./chunk.IUVRJDL3.js";import"./chunk.FQLNBIQ5.js";import{b}from"./chunk.AJZBJBMO.js";var t=b(ee(),1);var a=b(D(),1);function ae(n){let r=[];return n.applied.length>0&&n.intent&&r.push(`${n.intent}.`),n.unchanged.length>0&&r.push(`${n.unchanged.length} already so.`),n.allOrNothing&&r.push("None of it was kept."),r.join(" ")}var re=_(j(()=>(__graviewPreload(import.meta.url,["./chunk.M7DJJRFH.js","./chunk.6VG2LCES.js","./chunk.I3ADXJQW.js","./chunk.BJUUSIQY.js","./chunk.HMV4ILAC.js","./chunk.UVMHC6VM.js","./chunk.XAN7QXMQ.js","./chunk.XJ4JYROM.js","./chunk.XOZU4OFA.js","./chunk.CHG522KL.js","./chunk.7QWGIGHM.js","./chunk.ZGJUCVT5.js","./chunk.CVVNHQPO.js","./chunk.YIDNZTON.js","./chunk.QILGAV7H.js","./chunk.I6HIVTXU.js","./chunk.PYGNO2AV.js","./chunk.3HFBHLXC.js","./chunk.CUA7F3YJ.js","./chunk.SDO3U72B.js","./chunk.IUVRJDL3.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.ZQSV5XVB.js")))),te=re.part((n,r)=>(0,a.jsx)(n.SeveralAi,{...r}),{quiet:!0});function ne(n){let r=F()?.ai;return!H(r)||!V(r)?null:(0,a.jsx)(t.Suspense,{fallback:null,children:(0,a.jsx)(te,{...n})})}function ge({store:n,chosen:r,principal:d,context:v,via:k,anchor:A,of:g,onChooseAll:E,onClear:m,onActed:Q}){let[U,X]=(0,t.useState)(0);(0,t.useEffect)(()=>n.subscribe(()=>X(e=>e+1)),[n]);let f=r.join(`
|
|
2
|
-
`),{acts:c,withheld:N}=(0,t.useMemo)(()=>G(n,r,{...d?{principal:d}:{},...v?{context:v}:{}}),[n,f,d,v,U]),[O,p]=(0,t.useState)(!1),[l,u]=(0,t.useState)(null),[s,P]=(0,t.useState)(null),h=(0,t.useRef)(null),L=(0,t.useId)(),w=(0,t.useMemo)(()=>[...new Set(r.map(e=>n.graph.getNode(e)?.kind))],[n,f]),Y=w.length===1&&w[0]?`${q(n.schema,w[0],r.length)} chosen`:`${r.length} chosen`,M=typeof matchMedia=="function"&&matchMedia("(pointer: coarse), (max-width: 599px)").matches?2:3,C=c.filter(e=>!e.more),Z=C.slice(0,M),R=[...C.slice(M),...c.filter(e=>e.more)];(0,t.useEffect)(()=>{u(null),p(!1)},[f]),(0,t.useLayoutEffect)(()=>{let e=h.current;if(!e)return;if(typeof e.showPopover=="function"&&!x(e))try{e.showPopover()}catch{}let i=()=>{W(e,A?.()??null),dispatchEvent(new Event(S))};i(),addEventListener("resize",i),addEventListener("scroll",i,!0);let o=typeof ResizeObserver=="function"?new ResizeObserver(i):null;return o?.observe(e),()=>{if(o?.disconnect(),removeEventListener("resize",i),removeEventListener("scroll",i,!0),e.isConnected&&x(e))try{e.hidePopover()}catch{}dispatchEvent(new Event(S))}},[A]);let y=(0,t.useRef)({asking:l,onClear:m});y.current={asking:l,onClear:m},(0,t.useEffect)(()=>{let e=i=>{if(i.key!=="Escape"||i.defaultPrevented)return;let o=document.activeElement;if(!(!(h.current?.contains(o)??!1)&&(o instanceof HTMLTextAreaElement||o instanceof HTMLInputElement&&o.type!=="checkbox"||o instanceof HTMLSelectElement))){if(i.preventDefault(),i.stopPropagation(),y.current.asking){u(null);return}y.current.onClear()}};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[]);let T=(e,i={})=>{let o=J(n,{mutation:e.mutation,subject:e.subject,args:{...e.args,...i},label:e.label},r,{...d?{author:d}:{},...k?{via:k}:{},...v?{context:v}:{}});u(null),p(!1),P(o.refused.length>0||o.applied.length===0?o:null),Q(o.refused.map(I=>I.id))},$=e=>{P(null),p(!1),e.open.length>0?u(e):T(e)},z=e=>(0,a.jsxs)("button",{type:"button",className:"graview-several-act","data-testid":"several-act","data-act":e.id,"data-mutation":e.mutation,...e.destructive?{"data-tone":"warn"}:{},"aria-pressed":l?.id===e.id?!0:void 0,onClick:()=>$(e),children:[e.label,e.open.length>0?"\u2026":""]},e.id);return(0,a.jsxs)("div",{ref:h,popover:"manual",role:"region","aria-label":"The chosen records",className:"graview-several-bar","data-testid":"several-bar","data-graview-foot":"","data-graview-overlay":"","data-graview-popover":"","data-graview-offstage":"",style:ie,children:[(0,a.jsx)("style",{children:oe}),(0,a.jsxs)("div",{className:"graview-several-line",children:[(0,a.jsx)("span",{role:"status","aria-live":"polite",className:"graview-several-count","data-testid":"several-count",children:Y}),(0,a.jsxs)("div",{role:"group","aria-label":`What to do with the ${r.length} chosen`,className:"graview-several-acts",children:[Z.map(z),R.length>0?(0,a.jsx)("button",{type:"button",className:"graview-several-act","data-testid":"several-more","aria-expanded":O,"aria-controls":L,onClick:()=>p(e=>!e),children:"More"}):null,E&&g!==void 0&&g>r.length?(0,a.jsxs)("button",{type:"button",className:"graview-several-quiet","data-testid":"several-all",onClick:E,children:["Choose all ",g]}):null,(0,a.jsx)("button",{type:"button",className:"graview-several-quiet","data-testid":"several-clear","aria-keyshortcuts":"Escape",title:"Put the choice down \u2014 Escape",onClick:m,children:"Clear"})]})]}),c.length>0&&r.length>1?(0,a.jsx)(ne,{chosen:r,acts:c,onAct:$}):null,O?(0,a.jsx)("div",{id:L,role:"group","aria-label":"More",className:"graview-several-acts","data-testid":"several-more-acts",children:R.map(z)}):null,c.length===0?(0,a.jsx)("p",{className:"graview-several-said","data-testid":"several-none",children:N.length>0?`Nothing here can be done to all of them by you: ${N[0].message}`:"Nothing can be done to all of these at once."}):null,l?(0,a.jsx)("div",{className:"graview-several-ask",role:"group","aria-label":`${l.label}, for all ${r.length}`,"data-testid":"several-ask",children:(0,a.jsx)(K,{store:n,affordance:l.affordance,onApply:e=>T(l,e),onCancel:()=>u(null)})}):null,s?(0,a.jsxs)("div",{role:"alert",className:"graview-several-said","data-testid":"several-outcome",children:[ae(s),s.refused.length>0?(0,a.jsxs)(a.Fragment,{children:[" ",s.refused.length===1?"One was not changed, and is still chosen:":`${s.refused.length} were not changed, and are still chosen:`,(0,a.jsx)("ul",{"data-testid":"several-refused",children:s.refused.map(e=>(0,a.jsxs)("li",{"data-record":e.id,children:["\u201C",e.label,"\u201D \u2014 ",e.message]},e.id))})]}):null]}):null]})}var ie={position:"fixed",inset:"auto",margin:0,zIndex:B("toast"),boxSizing:"border-box",width:"max-content",height:"auto",bottom:"calc(16px + env(safe-area-inset-bottom, 0px))",left:16,overflow:"visible"},oe=`
|
|
3
|
-
.graview-several-bar{display:grid;gap:8px;padding:8px 10px;border:1px solid var(--graview-edge);border-radius:var(--graview-radius,12px);background:var(--graview-float);color:var(--graview-ink);box-shadow:var(--graview-lift-high);font-size:.875rem;line-height:1.4;max-height:70vh;overflow:auto}
|
|
4
|
-
.graview-several-line{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;min-width:0}
|
|
5
|
-
.graview-several-count{font-weight:600;white-space:nowrap}
|
|
6
|
-
.graview-several-acts{display:flex;flex-wrap:wrap;align-items:center;gap:6px;min-width:0}
|
|
7
|
-
.graview-several-act,.graview-several-quiet{min-height:32px;padding:0 12px;border-radius:8px;font:inherit;cursor:pointer;box-shadow:none}
|
|
8
|
-
.graview-several-act{border:1px solid var(--graview-edge);background:transparent;color:var(--graview-ink);font-weight:600}
|
|
9
|
-
.graview-several-act:hover,.graview-several-act[aria-pressed=true],.graview-several-act[aria-expanded=true]{background:color-mix(in srgb,var(--graview-accent) 14%,transparent)}
|
|
10
|
-
.graview-several-act[data-tone=warn]{color:var(--graview-warn)}
|
|
11
|
-
.graview-several-quiet{border:0;background:none;color:var(--graview-ink-muted);text-decoration:underline;text-underline-offset:2px}
|
|
12
|
-
.graview-several-bar :focus-visible{outline:2px solid var(--graview-accent);outline-offset:2px}
|
|
13
|
-
.graview-several-said{margin:0;max-width:52ch;overflow-wrap:anywhere}
|
|
14
|
-
.graview-several-said ul{margin:4px 0 0;padding-left:18px}
|
|
15
|
-
.graview-several-ask{padding:8px 4px 2px;border-top:1px solid var(--graview-edge)}
|
|
16
|
-
@media (pointer: coarse){.graview-several-act,.graview-several-quiet{min-height:44px}}
|
|
17
|
-
`;export{ge as SeveralBar};
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import{b as W,e as Oe,f as Be,g as Fe,h as He,i as Ie,j as ze,k as Ke,l as ne,m as Ve}from"./chunk.MGG5DH2S.js";import{a as Ge,c as je}from"./chunk.ZOSTOVXR.js";import{b as De}from"./chunk.HIJ72QX6.js";import{a as Me,b as Pe,c as qe,d as j}from"./chunk.BQWMHHAZ.js";import"./chunk.2QALBEWP.js";import{k as Te,l as Ee}from"./chunk.WAIIXXVI.js";import"./chunk.RECTEAG4.js";import"./chunk.QQUZ5RTQ.js";import"./chunk.BJ3G7J2Z.js";import"./chunk.DIVANC3G.js";import{e as Ce}from"./chunk.KP7HUXH5.js";import{m as $e}from"./chunk.4BSEYZMS.js";import{a as Re,b as Le}from"./chunk.KV3N6VRG.js";import{h as Ae}from"./chunk.FUTSLXWN.js";import{e as be,f as ke}from"./chunk.MZSWWMX6.js";import"./chunk.HJCQ6I3S.js";import"./chunk.4QBW46XV.js";import"./chunk.U5Q7EVZQ.js";import"./chunk.NCBUECIW.js";import"./chunk.2T24FYAO.js";import"./chunk.JEQ6CA5M.js";import{a as me}from"./chunk.O2XPLDMM.js";import"./chunk.CM7EDQ4E.js";import"./chunk.SUYYDJGZ.js";import"./chunk.YR7DKU5T.js";import{a as ye,b as xe,j as Se}from"./chunk.RJ7UV3XI.js";import"./chunk.G4JJXA63.js";import{a as fe}from"./chunk.TBY5IR7C.js";import"./chunk.5IM2X3VT.js";import"./chunk.BIDL7GQD.js";import"./chunk.NKUNCQB3.js";import"./chunk.HMV4ILAC.js";import"./chunk.XAN7QXMQ.js";import"./chunk.XJ4JYROM.js";import"./chunk.XOZU4OFA.js";import"./chunk.CHG522KL.js";import"./chunk.Q5WEOX3Q.js";import"./chunk.ZBK3FCVE.js";import"./chunk.DW6KXAUM.js";import"./chunk.MR776WQ2.js";import"./chunk.WVUJXDXZ.js";import"./chunk.IRPMGHZN.js";import"./chunk.7QWGIGHM.js";import"./chunk.HRLCDBMO.js";import"./chunk.LZNHTROY.js";import"./chunk.36FKQJFM.js";import"./chunk.RHV73CBA.js";import"./chunk.MIE4TJRW.js";import{s as he}from"./chunk.RP6C2IUM.js";import"./chunk.RD2FSSLV.js";import"./chunk.T552MHMU.js";import"./chunk.ZGJUCVT5.js";import"./chunk.CVVNHQPO.js";import{l as ue}from"./chunk.YIDNZTON.js";import"./chunk.QILGAV7H.js";import"./chunk.I6HIVTXU.js";import{G as Ne,t as U}from"./chunk.PYGNO2AV.js";import"./chunk.3HFBHLXC.js";import{$ as we,G as Je,Ta as ae,Ua as Y,Y as ge,ga as I,ia as te,j as le,l as pe,m as ce,r as J,ta as ve}from"./chunk.CUA7F3YJ.js";import"./chunk.SDO3U72B.js";import{L as ie,T as oe,Z as C,ma as re,oa as ee,qa as se,sa as de}from"./chunk.IUVRJDL3.js";import"./chunk.FQLNBIQ5.js";import{b as Z}from"./chunk.AJZBJBMO.js";var o=Z(Je(),1);var e=Z(ge(),1),Ye=560;function Ue(t,n){let[d,g]=(0,o.useState)(0);return(0,o.useEffect)(()=>{let r=t.current;if(!r||!n){g(0);return}let i=0,c=()=>{i=0;let f=r.getBoundingClientRect().bottom;g([...r.querySelectorAll('[data-testid="kind-stop-table"] tbody tr[data-graview-pick]')].filter(S=>S.getBoundingClientRect().top>f-24).length)},b=()=>{i||(i=requestAnimationFrame(c))};c(),r.addEventListener("scroll",b,{passive:!0});let L=typeof ResizeObserver>"u"?null:new ResizeObserver(b);L?.observe(r);let R=r.querySelector('[data-testid="kind-stop-body"]');return R&&L?.observe(R),()=>{r.removeEventListener("scroll",b),L?.disconnect(),i&&cancelAnimationFrame(i)}},[t,n]),d}function Xe({narrow:t,at:n,children:d}){return t?(0,e.jsx)("div",{ref:n,className:"graview-kind-stop-scroll","data-testid":"kind-stop-scroll",children:d}):(0,e.jsx)(e.Fragment,{children:d})}function Ze(t){let[n,d]=(0,o.useState)(!1);return(0,o.useLayoutEffect)(()=>{let g=t.current;if(!g)return;let r=()=>{let c=g.getBoundingClientRect().width;c>0&&d(c<Ye)};if(r(),typeof ResizeObserver>"u")return;let i=new ResizeObserver(r);return i.observe(g),()=>i.disconnect()},[t]),n}var _e="as",et=(t,n)=>`graview:kind-seen:${t}:${n}`;function tt(t){try{return localStorage.getItem(t)}catch{return null}}function at(t,n){try{localStorage.setItem(t,n)}catch{}}var nt=(t,n)=>({...le(ce(t,!1),n),relation:null});function Mt({kind:t,members:n,flagged:d=[],label:g,retired:r=0}){let{store:i,brand:c,principal:b,views:L,view:R}=I(),{go:f}=Y(),S=te(),w=i.schema,$=w.tryDefinition(t),p=g??se(w,t),A=i.today()??ie(),l=n,N=(0,o.useId)(),h=(0,o.useMemo)(()=>Oe(w,t,l,A),[w,t,l,A]),u=R.within?.[_e]==="table"?{shape:"table"}:h,y=Re(R),T=u.shape==="table"&&!y.sort?Be(w,t):void 0,x=T?{...y,sort:T}:y,M=(0,o.useMemo)(()=>new Set(d),[d]),s=(0,o.useMemo)(()=>Ae(l,x,{schema:w,graph:i.graph,flagged:M,today:A}),[l,x,w,i,M,A,S]),k=(0,o.useMemo)(()=>ke(w,be(w,t)),[w,t]),D=L.arrangement?.()?.lists?.[t]?.filters,H=q=>f(Le(R,q)),V=(0,o.useMemo)(()=>({name:c?.name??"app",schema:w,...i.policy?{policy:i.policy}:{}}),[c,w,i]),_=JSON.stringify(Fe(t,u,x)),O=(0,o.useMemo)(()=>{let q=Se(JSON.parse(_),{app:V,sight:xe(V,b)});return ye(q)?void 0:q},[_,V,b]),G=u.shape!=="table"&&O!==void 0,z=(0,o.useRef)(null),P=Ze(z),[K,a]=(0,o.useState)(!1),m=(0,o.useId)(),B=(0,o.useMemo)(()=>fe(i,b),[i,b]),F=(l.length>1||r>0)&&!G?(0,e.jsx)($e,{schema:w,graph:i.graph,kind:t,arrangement:x,onChange:H,offers:k,...D?{filters:D}:{},kept:{shown:s.nodes.length,of:l.length},testId:"kind-arrange",chips:{nodes:l,flagged:M,today:A},...r>0?{past:{count:r,widen:()=>f(Ce(R,!0))}}:{}}):null,E=!!x.query||(x.filter?.length??0)>0,Q=(0,o.useRef)(null),X=Ue(Q,P&&!G);return(0,e.jsxs)("section",{ref:z,"aria-labelledby":N,className:"graview-kind-stop","data-testid":"kind-stop","data-graview-kind-stop":t,"data-graview-shape":u.shape,"data-graview-narrow":P||void 0,children:[(0,e.jsx)("style",{children:ct}),(0,e.jsxs)(Xe,{narrow:P,at:Q,children:[(0,e.jsx)(it,{kind:t,plural:p,count:l.length,headingId:N,description:$?.description,...P?{tools:{open:K,id:m,toggle:()=>a(q=>!q),narrowed:E}}:{}}),P&&K?(0,e.jsxs)("div",{id:m,className:"graview-kind-stop-tools","data-testid":"kind-stop-tools",role:"group","aria-label":`Find, filter and arrange the ${p.toLowerCase()}`,children:[F,l.length>0?(0,e.jsx)(We,{derived:h,shape:u,draft:O,author:!1}):null,(0,e.jsx)(Qe,{kind:t,plural:p})]}):null,(0,e.jsx)(rt,{kind:t,plural:p,members:l,today:A,arrangement:x,onArrange:H,compact:P}),P&&E&&!K?(0,e.jsxs)("p",{className:"graview-kind-stop-narrowed","data-testid":"kind-stop-narrowed",children:[(0,e.jsxs)("span",{className:"graview-kind-stop-quiet-text",children:[C(s.nodes.length)," of ",C(l.length)," shown"]})," ",(0,e.jsx)("button",{type:"button",className:"graview-kind-stop-link",onClick:()=>H({}),children:"Show all"})]}):null,P?null:F,l.length>0&&!P?(0,e.jsx)(We,{derived:h,shape:u,draft:O,author:B}):null,(0,e.jsx)("div",{className:"graview-kind-stop-body","data-testid":"kind-stop-body",children:l.length===0?(0,e.jsx)("p",{className:"graview-kind-stop-empty","data-testid":"kind-stop-empty",children:"Nothing here yet."}):G?(0,e.jsx)(lt,{draft:O,nodes:l}):s.nodes.length===0?(0,e.jsxs)("p",{className:"graview-kind-stop-empty","data-testid":"kind-stop-none-kept",children:["None of the ",C(l.length)," ",p.toLowerCase()," ",x.query?`says \u201C${x.query}\u201D`:"is kept by these filters","."," ",(0,e.jsx)("button",{type:"button",className:"graview-kind-stop-link",onClick:()=>H({}),children:"Show them all"})]}):(0,e.jsx)(pt,{kind:t,nodes:s.nodes,groups:s.grouped?s.groups.map(q=>({key:q.key,label:q.label,nodes:q.nodes})):void 0,flagged:M,plural:p,arrangement:x})})]}),X>0?(0,e.jsxs)("button",{type:"button",className:"graview-kind-stop-below","data-testid":"kind-stop-below","data-graview-below":X,onClick:()=>Q.current?.scrollBy({top:Math.round(Q.current.clientHeight*.8),behavior:"smooth"}),children:[ee(w,t,X).replace(/^(\S+)\s/,"$1 more ")," below ",(0,e.jsx)("span",{"aria-hidden":"true",children:"\u2193"})]}):null]})}function Qe({kind:t,plural:n}){let{setSelection:d,setMenuAt:g}=I();return(0,e.jsx)("button",{type:"button",className:"graview-kind-stop-quiet","data-testid":"kind-stop-acts","aria-haspopup":"menu","aria-label":`What can be done with the ${n.toLowerCase()}`,onClick:r=>{let i=r.currentTarget.getBoundingClientRect();d([J(t)]),g({x:Math.round(i.left),y:Math.round(i.bottom+4),on:J(t)})},children:"Acts\u2026"})}function it({kind:t,plural:n,count:d,headingId:g,description:r,tools:i}){let{store:c}=I(),b=(0,o.useMemo)(()=>({about:[J(t)]}),[t]),{affordances:L}=Te(b),{apply:R,preview:f}=Ee(),S=(0,o.useMemo)(()=>{let v=u=>c.allMutations().find(y=>y.name===u.mutation)?.creates?.includes(t)??!1;return L.find(u=>!u.destructive&&!u.setsAside&&v(u))},[L,c,t]),[w,$]=(0,o.useState)(!1),[p,A]=(0,o.useState)(null),l=(0,o.useRef)(null),N=(0,o.useRef)(null);(0,o.useEffect)(()=>{let v=N.current;if(!v||v.closest('[data-testid="kind-stop"]')?.contains(document.activeElement))return;let u=!1;try{u=document.activeElement instanceof HTMLElement&&document.activeElement!==document.body&&document.activeElement.matches(":focus-visible")}catch{u=!0}u?delete v.dataset.graviewQuietFocus:v.dataset.graviewQuietFocus="",v.focus({preventScroll:!0})},[t]);let h=(v,u)=>{try{f(v,u),R(v,u),A(null),$(!1),requestAnimationFrame(()=>l.current?.focus())}catch(y){return A(ue(c.schema,c.allMutations(),y)),[]}};return(0,e.jsxs)("header",{className:"graview-kind-stop-head",children:[(0,e.jsxs)("div",{className:"graview-kind-stop-title",children:[(0,e.jsx)("h2",{id:g,ref:N,tabIndex:-1,"data-testid":"kind-stop-title",onKeyDown:v=>delete v.currentTarget.dataset.graviewQuietFocus,onBlur:v=>delete v.currentTarget.dataset.graviewQuietFocus,children:n}),(0,e.jsxs)("p",{"data-testid":"kind-stop-count",children:[ee(c.schema,t,d),r?` \xB7 ${r}`:""]})]}),(0,e.jsxs)("div",{className:"graview-kind-stop-acts",children:[S?(0,e.jsx)("button",{ref:l,type:"button",className:"graview-kind-stop-primary","data-testid":"kind-stop-primary","data-affordance":S.id,"aria-expanded":S.open.length>0?w:void 0,onClick:()=>{A(null),S.open.length===0?h(S):$(v=>!v)},children:S.label}):null,i?(0,e.jsx)("button",{type:"button",className:"graview-kind-stop-more-tools","data-testid":"kind-stop-tools-open","aria-expanded":i.open,"aria-controls":i.open?i.id:void 0,"aria-label":`Find, filter, arrange and act on the ${n.toLowerCase()}`,title:"Find, filter, arrange and acts","data-narrowed":i.narrowed||void 0,onClick:i.toggle,children:(0,e.jsx)("span",{"aria-hidden":"true",children:"\u22EF"})}):(0,e.jsx)(Qe,{kind:t,plural:n})]}),w&&S?(0,e.jsx)("div",{className:"graview-kind-stop-ask","data-testid":"kind-stop-ask","aria-label":S.label,role:"group",children:(0,e.jsx)(me,{affordance:S,onApply:v=>h(S,v),onCancel:()=>{$(!1),l.current?.focus()}})}):null,p?(0,e.jsx)("p",{role:"alert",className:"graview-kind-stop-failed","data-testid":"kind-stop-failed",children:p}):null]})}var ot=U.part((t,n)=>(0,e.jsx)(t.ProblemRows,{...n}),{what:"The problems",as:"li"});function rt({kind:t,plural:n,members:d,today:g,arrangement:r,onArrange:i,compact:c=!1}){let{store:b,brand:L,setSelection:R}=I(),f=b.schema,S=ae(),w=(0,o.useMemo)(()=>new Set(d.map(s=>s.id)),[d]),$=(0,o.useMemo)(()=>ze(S,w,s=>b.allInvariants().find(k=>k.name===s)?.label),[S,w,b]),p=(0,o.useMemo)(()=>Ke(f,t,d,g),[f,t,d,g]),A=et(Ne(L,f),t),[l]=(0,o.useState)(()=>tt(A));(0,o.useEffect)(()=>()=>at(A,new Date().toISOString()),[A]);let N=te(),h=(0,o.useMemo)(()=>l?Ve(b.log.all(),t,l,s=>b.graph.getNode(s)?.kind):null,[l,b,t,N]),[v,u]=(0,o.useState)(null),y=s=>i({...r,filter:[...(r.filter??[]).filter(k=>!s?.some(D=>D.key===k.key)),...s??[]]}),T=$.reduce((s,k)=>s+k.violations.length,0),x=[];if(p&&(p.overdue>0||p.soon>0)){let s=p.field;x.push((0,e.jsxs)("li",{"data-testid":"kind-stop-dates",children:[p.overdue>0?(0,e.jsxs)("button",{type:"button",className:"graview-kind-stop-fact","data-tone":"warn",onClick:()=>y(ne(p,"overdue",g)),"aria-label":`${C(p.overdue)} overdue \u2014 show only these`,children:[C(p.overdue)," overdue"]}):null,p.soon>0?(0,e.jsxs)("button",{type:"button",className:"graview-kind-stop-fact",onClick:()=>y(ne(p,"soon",g)),"aria-label":`${C(p.soon)} in the next 7 days \u2014 show only these`,children:[C(p.soon)," ",p.due?"due":""," in the next 7 days"]}):null,(0,e.jsxs)("span",{className:"graview-kind-stop-quiet-text",children:[" by ",de(f.tryDefinition(t),s).toLowerCase()]})]},"dates"))}let M=(r.filter??[]).some(s=>s.key==="is"&&s.value==="flagged");if($.length>0&&c){let s=$.map(k=>k.label).join(", ");x.push((0,e.jsxs)("li",{className:"graview-kind-stop-problems-line","data-testid":"kind-stop-problems","data-graview-problems":T,children:[(0,e.jsxs)("span",{className:"graview-kind-stop-warn",children:[(0,e.jsx)("span",{"aria-hidden":"true",children:"\u26A0 "}),T===1?"1 problem":`${C(T)} problems`]}),(0,e.jsxs)("span",{className:"graview-kind-stop-quiet-text graview-kind-stop-rules-said",title:s,children:[" ","\xB7 ",s]}),(0,e.jsx)("button",{type:"button",className:"graview-kind-stop-link","data-testid":"kind-stop-only-problems","aria-pressed":M,"aria-label":M?`Show all the ${n.toLowerCase()}`:`Show only the ${n.toLowerCase()} with a problem`,onClick:()=>M?i({...r,filter:(r.filter??[]).filter(k=>!(k.key==="is"&&k.value==="flagged"))}):y([{key:"is",value:"flagged"}]),children:M?"Show all":"Show"})]},"problems"))}else $.length>0&&x.push((0,e.jsxs)("li",{"data-testid":"kind-stop-problems","data-graview-problems":T,children:[(0,e.jsxs)("span",{className:"graview-kind-stop-warn",children:[(0,e.jsx)("span",{"aria-hidden":"true",children:"\u26A0 "}),T===1?"1 problem":`${C(T)} problems`]}),(0,e.jsxs)("span",{className:"graview-kind-stop-quiet-text",children:[" in ",n.toLowerCase(),":"]}),(0,e.jsx)("ul",{className:"graview-kind-stop-rules",children:$.map(s=>(0,e.jsx)(st,{group:s,open:v===s.invariant,onToggle:()=>u(k=>k===s.invariant?null:s.invariant),onPick:k=>R([k])},s.invariant))}),(0,e.jsxs)("button",{type:"button",className:"graview-kind-stop-link","data-testid":"kind-stop-only-problems",onClick:()=>y([{key:"is",value:"flagged"}]),children:["Show only the ",n.toLowerCase()," with a problem"]})]},"problems"));if(h&&(h.added>0||h.changed>0)){let s=[h.added>0?`${C(h.added)} added`:"",h.changed>0?`${C(h.changed)} changed`:""].filter(Boolean);x.push((0,e.jsxs)("li",{"data-testid":"kind-stop-since",children:[(0,e.jsxs)("span",{className:"graview-kind-stop-quiet-text",children:["Since you last looked (",oe(l.slice(0,10)),"):"]})," ",s.join(", ")]},"since"))}return x.length===0?null:(0,e.jsx)("ul",{className:"graview-kind-stop-going-on","aria-label":`What is going on in the ${n.toLowerCase()}`,"data-testid":"kind-stop-going-on",children:x})}function st({group:t,open:n,onToggle:d,onPick:g}){let r=(0,o.useId)();return(0,e.jsxs)("li",{"data-graview-rule":t.invariant,children:[(0,e.jsxs)("button",{type:"button",className:"graview-kind-stop-rule","aria-expanded":n,"aria-controls":r,onClick:d,onPointerEnter:U.prefetch,onFocus:U.prefetch,children:[(0,e.jsx)("span",{"aria-hidden":"true",className:"graview-kind-stop-chevron","data-open":n||void 0,children:"\u203A"}),t.label," ",(0,e.jsxs)("span",{className:"graview-kind-stop-quiet-text",children:["\xB7 ",C(t.violations.length)]})]}),n?(0,e.jsx)("ol",{id:r,className:"graview-kind-stop-problem-rows","data-testid":"kind-stop-problem-rows",children:(0,e.jsx)(o.Suspense,{fallback:null,children:(0,e.jsx)(ot,{violations:t.violations,pick:i=>{let c=i.subjectId??t.records[0]??i.nodeIds[0];c!==void 0&&g(c)}})})}):null]})}var dt={board:"Board",calendar:"Calendar",table:"Table"};function We({derived:t,shape:n,draft:d,author:g}){let{view:r}=I(),{go:i}=Y(),{keep:c}=Ge(je()),[b,L]=(0,o.useState)(!1),R=t.shape==="table"?[]:[t.shape,"table"];return!g&&R.length===0?null:(0,e.jsxs)("div",{className:"graview-kind-stop-shape","data-testid":"kind-stop-shape",children:[R.length>0?(0,e.jsx)("span",{role:"group","aria-label":"Show as",className:"graview-kind-stop-switch",children:R.map(f=>(0,e.jsx)("button",{type:"button","aria-pressed":n.shape===f,"data-testid":`kind-stop-as-${f}`,onClick:()=>i(pe(r,_e,f===t.shape?null:f)),children:dt[f]},f))}):null,g?(0,e.jsx)("span",{className:"graview-kind-stop-quiet-text","data-testid":"kind-stop-derived",children:d?`${d.said.replace(/\.$/,"")}, derived from the declaration`:"Derived from the declaration"}):null,d&&g?(0,e.jsx)("button",{type:"button",className:"graview-kind-stop-link","data-testid":"kind-stop-keep",disabled:b,title:`Keep \u201C${d.title}\u201D as a lens: a place of its own`,onClick:()=>{L(!0),c(d).finally(()=>L(!1))},children:"Keep as a lens"}):null]})}function lt({draft:t,nodes:n}){let d=De(t.drawn);return(0,e.jsx)("div",{className:"graview-kind-stop-lens","data-graview-draft":t.lens.name,children:(0,e.jsx)(we,{mode:"scene",children:(0,e.jsx)(he,{kind:t.kind,view:t.title,children:(0,e.jsx)(d,{nodes:n,label:t.title,fidelity:"full",cardinality:"many",mode:"fullscreen",selected:!1})})})})}function pt({kind:t,nodes:n,groups:d,flagged:g,plural:r,arrangement:i}){let{store:c,views:b,view:L,selection:R,setSelection:f,setMenuAt:S,principal:w}=I(),{go:$}=Y(),p=c.schema,A=c.graph,l=(0,o.useMemo)(()=>(d?d.flatMap(a=>a.nodes):n).map(a=>a.id),[n,d]),N=Me(l),h=(0,o.useMemo)(()=>c.permittedMutations(w).some(a=>{let m=a.subject?.kinds;return m!==void 0&&(m==="*"||m.includes(t))}),[c,w,t]),v=(0,o.useRef)(null),u=a=>{N.choose(a),requestAnimationFrame(()=>{let m=N.list.current;((a[0]===void 0?null:m?.querySelector(`[data-graview-choose-box="${CSS.escape(a[0])}"]`))??m)?.focus({preventScroll:!0})})},y=N.chosen.length,T=b.lookup(t,{cardinality:"one",fidelity:"glyph"}),x=T!==void 0&&!ve(T)?T:void 0,M=a=>R.includes(a),s=ae(),k=(0,o.useMemo)(()=>He(p,t,n,A),[p,t,n,A]),[D,H]=(0,o.useState)(W);(0,o.useEffect)(()=>H(W),[i.query,i.filter?.length,i.sort?.by,i.group?.by]);let V=p.tryDefinition(t),_=a=>s.filter(m=>m.nodeIds.includes(a)||m.subjectId===a).map(m=>m.message),O=i.sort?.by,G=`${r}${i.sort?`, in order of ${k.find(a=>a.key===O)?.label.toLowerCase()??O}`:""}`,z=D,P=a=>{let m=re(V,a),B=g.has(a.id)?_(a.id):[];return(0,e.jsxs)("tr",{"data-graview-pick":a.id,tabIndex:-1,"data-graview-record":a.id,"data-flagged":B.length>0||void 0,...h?{"data-graview-choose":a.id}:{},children:[h?(0,e.jsx)("td",{className:"graview-choose-at",children:(0,e.jsx)("input",{...N.boxProps(a.id,m),onPointerEnter:j,onFocus:j})}):null,(0,e.jsxs)("th",{scope:"row",className:"graview-kind-stop-name",children:[x?(0,e.jsx)("div",{"data-graview-pick":a.id,className:"graview-kind-stop-own-row",children:(0,e.jsx)(x,{node:a,cardinality:"one",fidelity:"glyph",mode:"scene",selected:M(a.id),...B.length>0?{flagged:[a.id]}:{}})}):(0,e.jsx)("button",{type:"button","data-testid":"kind-stop-row-go",title:`Go to ${m}`,onClick:()=>$(nt(L,a.id)),children:m}),B.length>0?(0,e.jsxs)("span",{className:"graview-kind-stop-flag",title:B.join(" \xB7 "),children:[(0,e.jsx)("span",{"aria-hidden":"true",children:"\u26A0"}),(0,e.jsx)("span",{className:"graview-kind-stop-hidden",children:`Problem: ${B.join(". ")}`})]}):null]}),k.map(F=>{let E=Ie(p,a,F,A);return(0,e.jsx)("td",{"data-label":F.label,"data-short":E.text.length>0&&E.text.length<=14||void 0,"data-empty":E.text?void 0:"",...E.title?{title:E.title}:{},children:E.text?(0,e.jsx)("span",{children:E.text}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("b",{"aria-hidden":"true",children:"\u2014"}),(0,e.jsx)("i",{className:"graview-kind-stop-hidden",children:"none"})]})},F.key)}),(0,e.jsx)("td",{className:"graview-kind-stop-row-acts",children:(0,e.jsx)("button",{type:"button","data-testid":"kind-stop-row-acts","aria-haspopup":"menu","aria-label":`What can be done with ${m}`,onClick:F=>{let E=F.currentTarget.getBoundingClientRect();f([a.id]),S({x:Math.round(E.left),y:Math.round(E.bottom+4),on:a.id})},children:(0,e.jsx)("span",{"aria-hidden":"true",children:"\u22EF"})})})]},a.id)},K=a=>{let m=a.slice(0,Math.max(0,z));return z-=m.length,m.map(P)};return(0,e.jsxs)("div",{className:"graview-kind-stop-table-at",...h?{...N.listProps,ref:a=>{v.current=a,N.list.current=a},tabIndex:-1,role:"group","aria-label":y>0?`${r}, ${y} chosen`:r,"data-graview-choosable":""}:{},children:[h?(0,e.jsx)("style",{children:Pe}):null,(0,e.jsxs)("table",{className:"graview-kind-stop-table","data-testid":"kind-stop-table",children:[(0,e.jsx)("caption",{className:"graview-kind-stop-hidden",children:G}),(0,e.jsx)("thead",{children:(0,e.jsxs)("tr",{children:[h?(0,e.jsx)("td",{className:"graview-choose-at graview-choose-all",children:(0,e.jsx)("input",{type:"checkbox",className:"graview-choose-box","data-testid":"kind-stop-choose-all","aria-label":`Choose all ${C(n.length)} ${r.toLowerCase()}`,checked:y>0&&y===n.length,ref:a=>{a&&(a.indeterminate=y>0&&y<n.length)},onPointerEnter:j,onFocus:j,onChange:()=>y===n.length?N.clear():N.choose(l)})}):null,(0,e.jsx)("th",{scope:"col","aria-sort":O==="label"?i.sort?.direction==="desc"?"descending":"ascending":void 0,children:"Name"}),k.map(a=>(0,e.jsx)("th",{scope:"col","aria-sort":a.about==="field"&&a.key===O?i.sort?.direction==="desc"?"descending":"ascending":void 0,children:a.label},a.key)),(0,e.jsx)("th",{scope:"col",children:(0,e.jsx)("span",{className:"graview-kind-stop-hidden",children:"Acts"})})]})}),d?d.map(a=>z<=0?null:(0,e.jsxs)("tbody",{"data-graview-group":a.key,children:[(0,e.jsx)("tr",{className:"graview-kind-stop-group",children:(0,e.jsxs)("th",{scope:"rowgroup",colSpan:k.length+(h?3:2),children:[a.label," ",(0,e.jsxs)("span",{className:"graview-kind-stop-quiet-text",children:["\xB7 ",C(a.nodes.length)]})]})}),K(a.nodes)]},a.key||"-")):(0,e.jsx)("tbody",{children:K(n)})]}),h?(0,e.jsx)(qe,{store:c,chosen:N.chosen,principal:w,anchor:()=>v.current?.closest('[data-testid="kind-stop"]')??null,of:l.length,onChooseAll:()=>N.choose(l),onClear:N.clear,onActed:u}):null,n.length>D?(0,e.jsxs)("p",{className:"graview-kind-stop-more",children:[(0,e.jsxs)("span",{className:"graview-kind-stop-quiet-text","data-testid":"kind-stop-shown",children:[C(D)," of ",C(n.length)," shown"]})," ",(0,e.jsxs)("button",{type:"button",className:"graview-kind-stop-link","data-testid":"kind-stop-more",onClick:()=>H(a=>a+W),children:["Show ",C(Math.min(W,n.length-D))," more"]})]}):null]})}var ct=`
|
|
2
|
-
.graview-kind-stop{container-type:inline-size;box-sizing:border-box;height:100%;min-height:0;display:flex;flex-direction:column;gap:10px;padding:16px 18px 12px;border:1px solid var(--graview-edge);border-radius:var(--graview-radius,12px);background:var(--graview-panel);color:var(--graview-ink);box-shadow:var(--graview-lift-low);overflow:auto;overscroll-behavior:contain}
|
|
3
|
-
[data-graview-map-panel] .graview-kind-stop{height:auto;padding:4px 6px 12px;border:0;box-shadow:none;background:none;overflow:visible}
|
|
4
|
-
.graview-kind-stop :focus-visible{outline:2px solid var(--graview-accent);outline-offset:2px}
|
|
5
|
-
.graview-kind-stop h2[data-graview-quiet-focus]:focus{outline:none}
|
|
6
|
-
.graview-kind-stop button{font:inherit;cursor:pointer}
|
|
7
|
-
.graview-kind-stop :is(.graview-kind-stop-more-tools,.graview-kind-stop-link,.graview-kind-stop-rule,.graview-kind-stop-name button,.graview-kind-stop-row-acts button,.graview-kind-stop-fact,.graview-kind-stop-switch button){box-shadow:none}
|
|
8
|
-
.graview-kind-stop-head{display:flex;flex-wrap:wrap;align-items:flex-start;gap:8px 16px}
|
|
9
|
-
.graview-kind-stop-title{flex:1 1 16rem;min-width:0}
|
|
10
|
-
.graview-kind-stop-title h2{margin:0;outline-offset:2px;font-size:var(--graview-text-heading);line-height:1.3;overflow-wrap:anywhere}
|
|
11
|
-
.graview-kind-stop-title p{margin:2px 0 0;font-size:.875rem;color:var(--graview-ink-muted);overflow-wrap:anywhere}
|
|
12
|
-
.graview-kind-stop-acts{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
|
|
13
|
-
.graview-kind-stop-primary,.graview-kind-stop-quiet{min-height:32px;padding:0 14px;border-radius:8px;font-size:.875rem}
|
|
14
|
-
.graview-kind-stop-primary{border:1px solid var(--graview-accent);background:var(--graview-accent);color:var(--graview-accent-ink);font-weight:600}
|
|
15
|
-
.graview-kind-stop-quiet{border:1px solid var(--graview-edge);background:transparent;color:var(--graview-ink)}
|
|
16
|
-
.graview-kind-stop-ask{flex:1 1 100%;min-width:0;padding:10px 12px;border:1px solid var(--graview-edge);border-radius:10px}
|
|
17
|
-
.graview-kind-stop-failed{flex:1 1 100%;margin:0;font-size:var(--graview-text-small);color:var(--graview-warn)}
|
|
18
|
-
.graview-kind-stop-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
|
|
19
|
-
.graview-kind-stop-going-on{list-style:none;margin:0;padding:0;display:grid;gap:6px;font-size:.875rem}
|
|
20
|
-
.graview-kind-stop-going-on>li{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;min-width:0}
|
|
21
|
-
.graview-kind-stop-fact{min-height:28px;padding:0 10px;border:1px solid var(--graview-edge);border-radius:999px;background:transparent;color:var(--graview-ink)}
|
|
22
|
-
.graview-kind-stop-fact[data-tone=warn],.graview-kind-stop-warn{color:var(--graview-warn);font-weight:600}
|
|
23
|
-
.graview-kind-stop-quiet-text{color:var(--graview-ink-muted)}
|
|
24
|
-
.graview-kind-stop-rules{list-style:none;margin:0;padding:0;flex:1 1 100%;display:grid;gap:2px}
|
|
25
|
-
.graview-kind-stop-rule{display:inline-flex;align-items:center;gap:6px;min-height:28px;max-width:100%;padding:0 6px;border:1px solid transparent;border-radius:7px;background:none;color:var(--graview-ink);text-align:left;overflow-wrap:anywhere}
|
|
26
|
-
.graview-kind-stop-rule:hover{border-color:var(--graview-edge)}
|
|
27
|
-
.graview-kind-stop-chevron{display:inline-block;width:.8em}
|
|
28
|
-
.graview-kind-stop-chevron[data-open]{transform:rotate(90deg)}
|
|
29
|
-
.graview-kind-stop-problem-rows{list-style:none;margin:2px 0 6px 18px;padding:0;max-width:44rem}
|
|
30
|
-
.graview-kind-stop-link{min-height:28px;padding:0 4px;border:0;background:none;color:var(--graview-accent);text-decoration:underline;text-underline-offset:2px}
|
|
31
|
-
.graview-kind-stop-link:disabled{opacity:.6;cursor:default}
|
|
32
|
-
.graview-kind-stop-shape{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;font-size:var(--graview-text-small)}
|
|
33
|
-
.graview-kind-stop-switch{display:inline-flex;border:1px solid var(--graview-edge);border-radius:8px;overflow:hidden}
|
|
34
|
-
.graview-kind-stop-switch button{min-height:28px;padding:0 12px;border:0;background:transparent;color:var(--graview-ink-muted)}
|
|
35
|
-
.graview-kind-stop-switch button+button{border-left:1px solid var(--graview-edge)}
|
|
36
|
-
.graview-kind-stop-switch button[aria-pressed=true]{background:color-mix(in srgb,var(--graview-accent) 16%,transparent);color:var(--graview-ink);font-weight:600}
|
|
37
|
-
.graview-kind-stop-body{flex:1 0 auto;min-width:0}
|
|
38
|
-
.graview-kind-stop-empty{margin:24px 0;color:var(--graview-ink-muted)}
|
|
39
|
-
.graview-kind-stop-lens{min-width:0}
|
|
40
|
-
|
|
41
|
-
.graview-kind-stop-table-at{min-width:0}
|
|
42
|
-
.graview-kind-stop-table{width:100%;border-collapse:collapse;font-size:.875rem}
|
|
43
|
-
.graview-kind-stop-table th,.graview-kind-stop-table td{padding:7px 8px;text-align:left;vertical-align:top;border-top:1px solid var(--graview-edge);overflow-wrap:break-word}
|
|
44
|
-
.graview-kind-stop-table td{color:var(--graview-ink)}
|
|
45
|
-
.graview-kind-stop-table td>span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
|
|
46
|
-
.graview-kind-stop-table td[data-short]{white-space:nowrap;font-variant-numeric:tabular-nums}
|
|
47
|
-
.graview-kind-stop-table thead th{border-top:0;font-size:var(--graview-text-small);font-weight:600;letter-spacing:.04em;color:var(--graview-ink-muted)}
|
|
48
|
-
.graview-kind-stop-name{font-weight:500;min-width:8rem;max-width:22rem}
|
|
49
|
-
.graview-kind-stop-name button{display:inline-block;min-width:24px;min-height:24px;padding:0;border:0;background:none;color:var(--graview-ink);font-weight:500;text-align:left;text-decoration:underline;text-decoration-color:var(--graview-edge);text-underline-offset:3px}
|
|
50
|
-
.graview-kind-stop-name button:hover{text-decoration-color:currentColor}
|
|
51
|
-
.graview-kind-stop-own-row{display:inline-block;max-width:100%;cursor:pointer}
|
|
52
|
-
.graview-kind-stop-flag{margin-left:6px;color:var(--graview-warn)}
|
|
53
|
-
.graview-kind-stop-group th{padding-top:12px;font-weight:600;color:var(--graview-ink)}
|
|
54
|
-
.graview-kind-stop-row-acts{width:1%;white-space:nowrap;text-align:right}
|
|
55
|
-
.graview-kind-stop-row-acts button{min-width:32px;min-height:28px;border:1px solid var(--graview-edge-bright,var(--graview-edge));border-radius:7px;background:none;color:var(--graview-ink);font-size:1.125rem;font-weight:700;line-height:1}
|
|
56
|
-
.graview-kind-stop-row-acts button:hover{background:color-mix(in srgb,var(--graview-ink) 8%,transparent)}
|
|
57
|
-
.graview-kind-stop-table td[data-empty] b{font-weight:400;color:var(--graview-ink-faint)}
|
|
58
|
-
.graview-kind-stop-table tr[data-graview-pick]{cursor:default}
|
|
59
|
-
.graview-kind-stop-more{margin:10px 0 0;font-size:.875rem}
|
|
60
|
-
.graview-kind-stop-table-at[data-graview-choosable]{outline:none}
|
|
61
|
-
[data-graview-choosable]:hover .graview-choose-all .graview-choose-box{opacity:1}
|
|
62
|
-
.graview-kind-stop-table .graview-choose-at{width:1%;padding-right:0;vertical-align:middle}
|
|
63
|
-
.graview-kind-stop-more-tools{position:relative;min-width:32px;min-height:32px;padding:0 8px;border:0;border-radius:8px;background:none;color:var(--graview-ink);font-size:1.125rem;line-height:1}
|
|
64
|
-
.graview-kind-stop-more-tools:hover,.graview-kind-stop-more-tools[aria-expanded=true]{background:color-mix(in srgb,var(--graview-ink) 8%,transparent)}
|
|
65
|
-
.graview-kind-stop-more-tools[data-narrowed]::after{content:"";position:absolute;top:8px;right:6px;width:7px;height:7px;border-radius:50%;background:var(--graview-accent)}
|
|
66
|
-
.graview-kind-stop-tools{display:grid;gap:8px;justify-items:start;padding:10px;border:1px solid var(--graview-edge);border-radius:10px}
|
|
67
|
-
.graview-kind-stop-tools>*{max-width:100%}
|
|
68
|
-
.graview-kind-stop-problems-line{flex-wrap:nowrap!important}
|
|
69
|
-
.graview-kind-stop-problems-line .graview-kind-stop-warn{flex:0 0 auto;white-space:nowrap}
|
|
70
|
-
.graview-kind-stop-rules-said{flex:1 1 auto;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
|
|
71
|
-
.graview-kind-stop-problems-line .graview-kind-stop-link{flex:0 0 auto}
|
|
72
|
-
.graview-kind-stop-narrowed{margin:0;font-size:.875rem}
|
|
73
|
-
.graview-kind-stop[data-graview-narrow]{overflow:hidden}
|
|
74
|
-
|
|
75
|
-
.graview-kind-stop[data-graview-narrow]{height:auto;max-height:100%;flex:0 1 auto;margin-bottom:auto}
|
|
76
|
-
.graview-kind-stop-scroll{flex:1 1 auto;min-height:0;padding:4px;margin:-4px;display:flex;flex-direction:column;gap:10px;overflow:auto;overscroll-behavior:contain}
|
|
77
|
-
[data-graview-map-panel] .graview-kind-stop-scroll{overflow:visible}
|
|
78
|
-
[data-graview-map-panel] .graview-kind-stop[data-graview-narrow]{overflow:visible}
|
|
79
|
-
.graview-kind-stop-below{align-self:stretch;flex:0 0 auto;margin:0 -16px -12px;min-height:44px;padding:0 16px;border:0;border-top:1px solid var(--graview-edge);background:var(--graview-panel);color:var(--graview-accent);font-size:.875rem;text-align:left}
|
|
80
|
-
@container (max-width: 559px){
|
|
81
|
-
.graview-kind-stop{padding:14px 16px 12px}
|
|
82
|
-
.graview-kind-stop-head{position:relative;padding-right:52px}
|
|
83
|
-
.graview-kind-stop-acts{flex:1 1 100%}
|
|
84
|
-
.graview-kind-stop-primary{flex:0 0 auto}
|
|
85
|
-
.graview-kind-stop-more-tools{position:absolute;top:-6px;right:0}
|
|
86
|
-
.graview-kind-stop-name button{text-decoration:none}
|
|
87
|
-
.graview-kind-stop-row-acts button{border-color:transparent;font-weight:400;color:var(--graview-ink-muted)}
|
|
88
|
-
.graview-kind-stop-row-acts button:hover{color:var(--graview-ink)}
|
|
89
|
-
.graview-kind-stop-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
|
|
90
|
-
.graview-kind-stop-table,.graview-kind-stop-table tbody,.graview-kind-stop-table tr{display:block}
|
|
91
|
-
.graview-kind-stop-table tr{position:relative;padding:8px 40px 8px 0;border-top:1px solid var(--graview-edge)}
|
|
92
|
-
.graview-kind-stop-table th,.graview-kind-stop-table td{display:block;padding:1px 0;border:0}
|
|
93
|
-
.graview-kind-stop-table td>span{display:inline}
|
|
94
|
-
.graview-kind-stop-table td[data-short]{white-space:normal}
|
|
95
|
-
.graview-kind-stop-table td[data-label]::before{content:attr(data-label) " \xB7 ";color:var(--graview-ink-muted)}
|
|
96
|
-
.graview-kind-stop-row-acts{position:absolute;top:6px;right:0;width:auto}
|
|
97
|
-
.graview-kind-stop-table [data-graview-choose]{padding-left:34px}
|
|
98
|
-
.graview-kind-stop-table td.graview-choose-at{position:absolute;left:0;top:8px;width:auto;padding:0}
|
|
99
|
-
.graview-kind-stop-table thead .graview-choose-at{position:static}
|
|
100
|
-
}
|
|
101
|
-
@media (pointer: coarse){
|
|
102
|
-
.graview-kind-stop-table-at:not([data-graview-choosing]) .graview-choose-at{display:none}
|
|
103
|
-
.graview-kind-stop-table-at:not([data-graview-choosing]) [data-graview-choose]{padding-left:0}
|
|
104
|
-
}
|
|
105
|
-
@media (pointer: coarse){
|
|
106
|
-
.graview-kind-stop-primary,.graview-kind-stop-quiet,.graview-kind-stop-fact,.graview-kind-stop-rule,.graview-kind-stop-link,.graview-kind-stop-switch button,.graview-kind-stop-row-acts button{min-height:44px}
|
|
107
|
-
.graview-kind-stop-row-acts button,.graview-kind-stop-more-tools{min-width:44px;min-height:44px}
|
|
108
|
-
.graview-kind-stop-name button{min-height:44px}
|
|
109
|
-
}
|
|
110
|
-
@media (prefers-reduced-motion: reduce){.graview-kind-stop *{transition:none!important;animation:none!important}}
|
|
111
|
-
`;export{Mt as KindStop};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as G}from"./chunk.PZHCWMKT.js";import{e as Ne}from"./chunk.JPJHM62B.js";import"./chunk.J65CZJIC.js";import{b as He}from"./chunk.3I2SGKKF.js";import"./chunk.FSZQTX3K.js";import{a as Le,c as M,d as Te}from"./chunk.MGG5DH2S.js";import{b as Re}from"./chunk.HIJ72QX6.js";import"./chunk.BQWMHHAZ.js";import"./chunk.2QALBEWP.js";import"./chunk.WAIIXXVI.js";import"./chunk.RECTEAG4.js";import"./chunk.QQUZ5RTQ.js";import"./chunk.BJ3G7J2Z.js";import"./chunk.DIVANC3G.js";import"./chunk.KP7HUXH5.js";import"./chunk.4BSEYZMS.js";import"./chunk.KV3N6VRG.js";import"./chunk.FUTSLXWN.js";import"./chunk.MZSWWMX6.js";import"./chunk.HJCQ6I3S.js";import"./chunk.4QBW46XV.js";import{e as $e}from"./chunk.U5Q7EVZQ.js";import"./chunk.NCBUECIW.js";import"./chunk.2T24FYAO.js";import"./chunk.JEQ6CA5M.js";import"./chunk.SUYYDJGZ.js";import"./chunk.YR7DKU5T.js";import{a as Z,b as Ae,c as ee,f as Ee,j as xe,l as Ie}from"./chunk.RJ7UV3XI.js";import"./chunk.G4JJXA63.js";import{a as Ce}from"./chunk.TBY5IR7C.js";import"./chunk.5IM2X3VT.js";import"./chunk.BIDL7GQD.js";import"./chunk.NKUNCQB3.js";import"./chunk.6VG2LCES.js";import"./chunk.I3ADXJQW.js";import"./chunk.BJUUSIQY.js";import"./chunk.HMV4ILAC.js";import"./chunk.XAN7QXMQ.js";import"./chunk.XJ4JYROM.js";import"./chunk.XOZU4OFA.js";import"./chunk.CHG522KL.js";import"./chunk.Q5WEOX3Q.js";import"./chunk.ZBK3FCVE.js";import"./chunk.DW6KXAUM.js";import"./chunk.MR776WQ2.js";import"./chunk.WVUJXDXZ.js";import"./chunk.IRPMGHZN.js";import{a as ve}from"./chunk.7QWGIGHM.js";import"./chunk.HRLCDBMO.js";import"./chunk.LZNHTROY.js";import"./chunk.36FKQJFM.js";import"./chunk.RHV73CBA.js";import"./chunk.MIE4TJRW.js";import{s as De}from"./chunk.RP6C2IUM.js";import"./chunk.RD2FSSLV.js";import"./chunk.T552MHMU.js";import"./chunk.ZGJUCVT5.js";import"./chunk.CVVNHQPO.js";import"./chunk.YIDNZTON.js";import"./chunk.QILGAV7H.js";import"./chunk.I6HIVTXU.js";import{G as Pe}from"./chunk.PYGNO2AV.js";import{c as fn}from"./chunk.3HFBHLXC.js";import{D as be,G as yn,Y as Oe,ga as Y,ia as Se}from"./chunk.CUA7F3YJ.js";import"./chunk.SDO3U72B.js";import{L as he,ea as me,la as X,ma as ge,sa as we,va as ke}from"./chunk.IUVRJDL3.js";import"./chunk.FQLNBIQ5.js";import{b as _}from"./chunk.AJZBJBMO.js";var u=_(yn(),1),tn=_(fn(),1);var je=4,un=/^\d{4}-\d{2}-\d{2}/,hn=e=>e.charAt(0).toUpperCase()+e.slice(1),Ke=(e,n)=>e.tryDefinition(n)?.fields?.shape??{};function mn(e,n){let t=Ke(e,n),r=Object.keys(t).filter(i=>{let d=ve(t[i]);return d?.type==="enum"&&!d.multiple}),o=$e(e,n)?.field;return o&&r.includes(o)?[o,...r.filter(i=>i!==o)]:r}function gn(e,n,t){let r=d=>t.some(c=>typeof c[d]=="string"&&un.test(c[d])),o=Te(e,n);if(o&&r(o.field))return{start:o.field,...o.end?{end:o.end}:{},...o.done?{done:o.done}:{}};let i=Object.keys(Ke(e,n)).find(d=>["date","datetime"].includes(M(e,n,d)??"")&&r(d));return i?{start:i}:void 0}function wn(e){let{app:n,kind:t,nodes:r,today:o}=e,i=n.schema,d=i.tryDefinition(t),c=m=>we(d,m).toLowerCase(),s=m=>r.some(C=>C[m]!==void 0&&C[m]!==null&&C[m]!==""),f=mn(i,t).filter(s),y=[],l=f[0];l&&r.length<=Le&&y.push({recipe:{lens:"columns",kind:t,column:l},label:`Board by ${c(l)}`,phrase:`a board by ${c(l)}`,shape:"board"});let h=gn(i,t,r);if(h){let m=o.slice(0,7),C=r.some(b=>typeof b[h.start]=="string"&&b[h.start].startsWith(m)),A={lens:"calendar",kind:t,start:h.start,...h.end?{end:h.end}:{},...h.done?{done:h.done}:{},range:"month"};y.push(C?{recipe:A,label:`Calendar by ${c(h.start)}`,phrase:`a calendar by ${c(h.start)}`,shape:"calendar"}:{recipe:{lens:"blocks",kind:t,as:"row",sort:{by:h.start}},label:`In order of ${c(h.start)}`,phrase:`a list in order of ${c(h.start)}`,shape:"order"})}let S=d?.fieldRoles??{},[v,I,D]=[S.start,S.end,S.column??S.day];v&&I&&D&&M(i,t,v)==="number"&&M(i,t,I)==="number"&&M(i,t,D)==="enum"&&s(v)&&s(D)&&y.push({recipe:{lens:"timeline",kind:t,start:v,end:I,column:D},label:`Timeline by ${c(D)}`,phrase:`a timeline by ${c(D)}`,shape:"timeline"});for(let[m,C]of Object.entries(d?.edges??{})){let A=Array.isArray(C?.to)?C.to.find(w=>w!==t&&i.tryDefinition(w)):void 0;if(!A||!e.linked||!r.some(w=>e.linked(w.id,m)))continue;let b=ke(i.tryDefinition(A),A);y.push({recipe:{lens:"coverage",kind:t,across:A,link:m},label:`Grid by ${b}`,phrase:`a grid by ${b}`,shape:"grid"});break}return y.push({recipe:{lens:"blocks",kind:t,as:"card"},label:"Cards",phrase:"cards",shape:"cards"}),l?y.push({recipe:{lens:"blocks",kind:t,as:"row",group:l},label:`Rows by ${c(l)}`,phrase:`rows by ${c(l)}`,shape:"rows"}):e.place!==void 0&&y.push({recipe:{lens:"blocks",kind:t,as:"row"},label:"Rows",phrase:"rows",shape:"rows"}),y}var L=e=>JSON.stringify([e.name??e.lens,e.bindings??{},e.options?.blocks??e.options?.range??null]);function Me(e){return e.name==="columns"?"board":e.name==="coverage"?"grid":e.name==="blocks"?e.options?.blocks?.some(n=>n.as==="card")?"cards":"rows":e.name}var T=e=>e.lenses??[],We=(e,n)=>e.on===n||e.on===void 0&&Object.prototype.hasOwnProperty.call(e.bindings??{},n),oe=e=>e.app.pages?.lists?.[e.kind]?.opens;function Fe(e,n){let t={lens:n.name,on:e.kind,...n.bindings?{bindings:n.bindings}:{},...n.options?{options:n.options}:{}};if(e.place!==void 0){let r=T(e.app).find(o=>o.title===e.place);return[{op:"add-lens",title:e.place,...t,replace:e.place,...r?.create===!1?{create:!1}:{}}]}return[{op:"add-lens",title:n.title,...t},{op:"set-lens-hidden",title:n.title,on:e.kind,hidden:!0},q(e,n.title)]}var q=(e,n)=>({op:"arrange-pages",opens:{[e.kind]:n}}),_e=(e,n)=>{if(e.place!==void 0)return;let t=L(n),r=JSON.stringify(n.options??{});return T(e.app).find(o=>o.hidden===!0&&We(o,e.kind)&&L(o)===t&&JSON.stringify(o.options??{})===r)};function ne(e,n){if(!e.compose||!e.document)return!1;try{return e.compose({document:e.document,edits:n}).ok}catch{return!1}}function kn(e,n){let t=new Set(T(e).map(r=>r.title));if(!t.has(n))return n;for(let r=2;;r++)if(!t.has(`${n} ${r}`))return`${n} ${r}`}var Ge=e=>{let n=e.place===void 0?void 0:T(e.app).find(t=>t.title===e.place);return n!==void 0&&G(n,e.kind)};function qe(e){let n=e.place??oe(e),t=n===void 0?void 0:T(e.app).find(r=>r.title===n);return t&&!G(t,e.kind)?L(t):void 0}function Be(e,n,t){if(Ge(e))return;let r=Ee(n),o=L(r);if(o===qe(e))return;let i={...r,on:e.kind,title:kn(e.app,r.title)},d=ee(e.app,i,e.sight);if(!d.ok)return;let c=_e(e,i);if(c&&c.title===oe(e))return;let s=c?[q(e,c.title)]:Fe(e,i);if(ne(e,s))return{...t,shape:Me(i),title:c?.title??i.title,drawing:o,drawn:d.drawn,edits:s}}function Ue(e){if(e.nodes.length===0||Ge(e))return[];let n=qe(e),t=new Set(n?[n]:[]),r=[];if(e.place===void 0)for(let o of T(e.app)){if(o.title===void 0||o.hidden===!0||!We(o,e.kind)||o.title===oe(e)||G(o,e.kind))continue;let i=ee({...e.app,lenses:T(e.app).filter(s=>s!==o)},{...o,on:e.kind},e.sight);if(!i.ok)continue;let d=[q(e,o.title)];if(!ne(e,d))continue;let c=L(o);t.add(c),r.push({key:`place:${o.title}`,label:o.title,phrase:`\u201C${o.title}\u201D`,shape:Me(o),from:"place",title:o.title,drawing:c,drawn:i.drawn,edits:d})}for(let o of wn(e)){let i=xe(o.recipe,{app:e.app,...e.sight?{sight:e.sight}:{}});if(Z(i))continue;let d=L(i.lens);if(t.has(d))continue;let c=_e(e,i.lens),s=c?[q(e,c.title)]:Fe(e,i.lens);ne(e,s)&&(t.add(d),r.push({key:`${o.shape}:${d}`,label:o.label,phrase:o.phrase,shape:o.shape,from:"graview",title:c?.title??i.lens.title,drawing:d,drawn:i.drawn,edits:s}))}for(let o of e.offers??[]){let i=re(e,o);!i||t.has(i.drawing)||(t.add(i.drawing),r.push(i))}return Sn(r,e.choices??[],e.kind)}var bn=e=>{let n=e;return typeof n?.id=="string"&&n.id!==""&&typeof n.label=="string"&&n.label!==""&&typeof n.lens=="object"&&n.lens!==null};function re(e,n){if(bn(n))try{return Be(e,n.lens,{key:`host:${n.id}`,label:n.label,phrase:me(n.label),from:"host",hostId:n.id,...typeof n.weight=="number"?{weight:n.weight}:{}})}catch{return}}function Je(e,n){try{let t=e?.offers?.(n);if(Array.isArray(t))return{now:t};if(typeof t?.then=="function")return{now:[],late:Promise.resolve(t).then(r=>Array.isArray(r)?r:[],()=>[])}}catch{}return{now:[]}}function Ve(e){try{let n=e?.chosen?.();return Array.isArray(n)?n.filter(Qe):[]}catch{return[]}}async function ze(e,n){try{let t=await Ie(`Whatever would make ${e.name.toLowerCase()} clearest to read`,{app:e.app,complete:n,...e.sight?{sight:e.sight}:{}});if(Z(t))return;let r=t.lens;return Be(e,{lens:r.name,title:r.title,...r.bindings?{bindings:r.bindings}:{},...r.options?{options:r.options}:{}},{key:`model:${L(r)}`,label:hn(r.title),phrase:`\u201C${r.title}\u201D`,from:"model"})}catch{return}}function On(e,n,t){let r=o=>n.reduce((i,d)=>i+(d.key===o.key||d.shape===o.shape?d.kind===t?3:1:0),o.weight??0);return e.map((o,i)=>({option:o,at:i,score:r(o)})).sort((o,i)=>i.score-o.score||o.at-i.at).map(o=>o.option)}function Sn(e,n,t){let r=On(e,n,t),o=r.slice(0,je),i=r.find(d=>d.from==="host");return i&&!o.includes(i)&&(o[o.length-1]=i),o}var Qe=e=>{let n=e;return typeof n?.key=="string"&&typeof n.shape=="string"&&typeof n.kind=="string"},te=e=>`graview:display-choices:${e}`,vn=40,Xe=new Map;function B(e){try{let n=JSON.parse(localStorage.getItem(te(e))??"null");if(Array.isArray(n))return n.filter(Qe)}catch{}return Xe.get(e)??[]}function Ye(e,n){Xe.set(e,n);try{n.length===0?localStorage.removeItem(te(e)):localStorage.setItem(te(e),JSON.stringify(n))}catch{}}function Dn(e,n){Ye(e,[...B(e),n].slice(-vn))}function Cn(e,n,t){Ye(e,B(e).filter(r=>!(r.key===n&&r.at===t)))}function An(e,n){let t=`${n} shows as ${e.phrase}.`;return{said:t,add:[],drop:[],card:{said:t,adds:[],keeps:[],drops:[],breaking:[]},edits:e.edits}}function Ze(e){let n=new Set,t={options:e.options,shown:null,phase:"choosing",canUndo:!1},r,o,i=[],d=s=>{t={...t,...s},n.forEach(f=>f())},c=s=>{if(o)try{e.onKept?.({kept:o,offered:i,undone:s})}catch{}};return{get:()=>t,subscribe(s){return n.add(s),()=>void n.delete(s)},flip(s){if(t.phase!=="choosing"||s===t.shown||s!==null&&!t.options.some(l=>l.key===s))return;let{said:f,...y}=t;t=y,d({shown:s})},join(s){if(t.phase!=="choosing")return;let f=s.filter(l=>!t.options.some(h=>h.key===l.key||h.drawing===l.drawing));if(f.length===0)return;let y=[...t.options,...f];for(let l=y.length-1;l>=0&&y.length>je;l--)y[l].from!=="host"&&y[l].from!=="model"&&y[l].key!==t.shown&&y.splice(l,1);d({options:y})},drop(s){t.options.some(f=>f.key===s)&&d({options:t.options.filter(f=>f.key!==s),shown:t.shown===s?null:t.shown})},async keep(){let s=t.options.find(y=>y.key===t.shown);if(!s||t.phase!=="choosing")return;d({phase:"keeping"});let f;try{f=await e.propose(An(s,e.name))}catch{return d({phase:"choosing",said:"It couldn't be kept."})}if(f==="declined")return d({phase:"choosing",said:"It wasn't kept."});typeof f=="object"&&(r=f.undo),i=t.options.map(y=>y.key),o={key:s.key,kind:e.kind??"",shape:s.shape,from:s.from,...s.hostId?{hostId:s.hostId}:{},at:new Date().toISOString()},e.appKey!==void 0&&Dn(e.appKey,o),c(!1),d({phase:"kept",said:`${e.name} now shows as ${s.phrase}.`,canUndo:r!==void 0,...typeof f=="object"&&f.note?{note:f.note}:{}})},async undo(){let s=r;if(t.phase!=="kept"||!s)return;r=void 0;try{await s()}catch{return r=s,d({said:"It couldn't be put back."})}o&&e.appKey!==void 0&&Cn(e.appKey,o.key,o.at),c(!0);let{note:f,...y}=t;t=y,d({phase:"undone",said:`${e.name} is as it was.`,canUndo:!1})}}}function en(e,n,t){let r=e.tryDefinition(n);return t.slice(0,200).map(o=>ge(r,o)).filter(o=>o.length>1)}var k=_(Oe(),1),ie=new Map,En=e=>e?.querySelector("main")??e??null,U=e=>En(e.main?.isConnected?e.main:document.querySelector("[data-graview-page-main], main")??document.querySelector("[data-graview-face]"));function nn(e){let n=e.querySelector("[data-graview-page-title]"),t=n?.closest("header")??n?.parentElement??null;return t&&t!==e&&e.contains(t)?t:null}var j="data-graview-under-option",se="data-graview-option-wide",N="__now__",xn=(0,u.memo)(function({option:n,shown:t,names:r,nodes:o,drew:i,failed:d}){let c=(0,u.useRef)(null),s=(0,u.useRef)(null);(0,u.useLayoutEffect)(()=>{s.current&&(s.current.inert=!0)},[]),(0,u.useLayoutEffect)(()=>{let l=()=>{let S=(c.current?.textContent??"").toLowerCase();return r.some(v=>S.includes(v.toLowerCase()))};if(l())return i(n.key);let h=[100,400,1500].map((S,v,I)=>setTimeout(()=>{l()?i(n.key):v===I.length-1&&d(n.key)},S));return()=>h.forEach(clearTimeout)},[n.key]);let f=(0,u.useMemo)(()=>Re(n.drawn),[n.drawn]),y=n.drawn.lens==="blocks";return(0,k.jsx)("div",{ref:c,"data-testid":"display-option-pane","data-display-option":n.key,"data-shown":t?"":void 0,style:{...y?Rn:$n,...t?{}:Ln},children:(0,k.jsx)("div",{ref:s,style:y?void 0:Tn,children:(0,k.jsx)(De,{kind:n.drawn.kinds[0]??"",view:n.title,children:(0,k.jsx)(f,{nodes:o,label:n.title,fidelity:"full",cardinality:"many",mode:"fullscreen",selected:!1})})})})});function In({options:e,shown:n,names:t,drew:r,failed:o,kind:i}){let{store:d}=Y();Se();let c=d.schema.tryDefinition(i),s=d.graph.nodesOfKind(i).filter(f=>X(c,f));return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)("style",{children:`[${j}]{display:none !important}[${se}]{max-width:1160px !important}`}),e.map(f=>(0,k.jsx)(xn,{option:f,shown:f.key===n,names:t,nodes:s,drew:r,failed:o},f.key))]})}function nt({ask:e,close:n}){let t=Y(),{ai:r,app:o,brand:i,composeChange:d,displayOptions:c,onProposeChange:s,principal:f,store:y}=t,l=e.part,h=l.kind,S=Pe(i,y.schema),v=()=>y.graph.nodesOfKind(h).filter(a=>X(y.schema.tryDefinition(h),a)),[I]=(0,u.useState)(()=>en(y.schema,h,v())),[D]=(0,u.useState)(()=>{let a=ie.get(e.at);if(a)return a;let p={...o,schema:y.schema},g={app:p,document:He(o??{}),compose:d,kind:h,name:l.name,nodes:v(),today:y.today()??he(),sight:Ae(p,f),linked:(x,H)=>y.graph.outEdges(x).some(R=>R.kind===H),...l.slot==="place"?{place:l.name}:{}},E=[...B(S),...Ve(c)],pn={kind:h,name:l.name,...l.slot==="place"?{place:l.name}:{}},fe=Je(c,pn),Q=Ze({options:Ue({...g,choices:E,offers:fe.now}),name:l.name,kind:h,appKey:S,propose:x=>s(x),...c?.onChoice?{onKept:c.onChoice}:{}});if(fe.late?.then(x=>Q.join(x.flatMap(H=>re(g,H)??[]))),be(r)){let x=r.thinking,H=x?R=>x.think({prompt:R.prompt,system:R.system??"",state:{},catalog:[]}):r.complete;H&&ze(g,H).then(R=>R?Q.join([R]):void 0)}let ue={flips:Q,opened:!1};return ie.set(e.at,ue),ue}),{flips:m}=D,C=(0,u.useSyncExternalStore)(m.subscribe,m.get,m.get),{options:A,shown:b,phase:w,said:ae,note:de}=C,P=w==="choosing"||w==="keeping",[rn,sn]=(0,u.useState)(()=>new Set),an=(0,u.useMemo)(()=>a=>sn(p=>p.has(a)?p:new Set([...p,a])),[]),dn=(0,u.useMemo)(()=>a=>m.drop(a),[m]),K=A.filter(a=>rn.has(a.key));(0,u.useEffect)(()=>{D.opened||w!=="choosing"||K.length===0||(D.opened=!0,m.flip(K[0].key))},[D,m,w,K]);let[O,le]=(0,u.useState)(null);(0,u.useLayoutEffect)(()=>{if(!P)return;let a=U(l);if(!a)return;let p=document.createElement("div");p.setAttribute("data-testid","display-options-stage"),Object.assign(p.style,Pn);let g=nn(a);return g?.parentElement?g.parentElement.insertBefore(p,g.nextSibling):a.insertBefore(p,a.firstChild),le(p),()=>{p.remove(),le(null)}},[P]),(0,u.useLayoutEffect)(()=>{let a=O?U(l):null;if(!a)return;let p=b===null;if(O.style.position=p?"absolute":"relative",O.style.height=p?"0":"auto",O.style.visibility=p?"hidden":"visible",O.setAttribute("data-display-shown",b??N),!p){a.setAttribute(se,"");for(let g=O;g!==a&&g.parentElement;g=g.parentElement)for(let E of g.parentElement.children)E!==g&&E!==nn(a)&&E.localName!=="style"&&E.setAttribute(j,"")}return()=>{a.removeAttribute(se);for(let g of a.querySelectorAll(`[${j}]`))g.removeAttribute(j)}});let ce=()=>{ie.delete(e.at),n()},W=()=>{let a=U(l);for(let g of a?.querySelectorAll(`[${j}]`)??[])g.removeAttribute(j);O&&(O.style.display="none");let p=e.returnTo?.isConnected?e.returnTo:document.querySelector("[data-graview-page-title], main h1");p&&!p.hasAttribute("tabindex")&&!p.matches("a[href], button, input, select, textarea")&&p.setAttribute("tabindex","-1"),p?.focus?.({preventScroll:!0}),ce()};(0,u.useEffect)(()=>{if(!P||!O)return;let a=location.pathname,p=()=>U(l)?.querySelector("[data-graview-page-title]")?.textContent??null,g=p(),E=setInterval(()=>{m.get().phase!=="keeping"&&(location.pathname!==a||!O.isConnected||p()!==g)&&ce()},250);return()=>clearInterval(E)},[P,O]);let pe=(0,u.useRef)(W);pe.current=W,(0,u.useEffect)(()=>{let a=p=>{p.key!=="Escape"||m.get().phase==="keeping"||document.querySelector("[data-graview-popover]:not([data-better-bar]):not([hidden]), [data-testid='context-menu']")||(p.preventDefault(),pe.current())};return document.addEventListener("keydown",a,!0),()=>document.removeEventListener("keydown",a,!0)},[m]);let F=Ce(y,f);(0,u.useEffect)(()=>{!F&&w==="choosing"&&W()},[F,w]);let J=(0,u.useRef)(null),ye=(0,u.useRef)(!1);(0,u.useEffect)(()=>{w!=="choosing"||b===null||ye.current||(ye.current=!0,J.current?.querySelector('[role="radio"][aria-checked="true"]')?.focus({preventScroll:!0}))},[w,K.length,b]);let $=[{key:N,label:"As it is now"},...K],ln=a=>{let p=a.key==="ArrowRight"||a.key==="ArrowDown"?1:a.key==="ArrowLeft"||a.key==="ArrowUp"?-1:0,g=p!==0?$[($.findIndex(E=>E.key===(b??N))+p+$.length)%$.length]:a.key==="Home"?$[0]:a.key==="End"?$.at(-1):void 0;g&&(a.preventDefault(),m.flip(g.key===N?null:g.key),J.current?.querySelector(`[data-option="${CSS.escape(g.key)}"]`)?.focus({preventScroll:!0}))},V=A.find(a=>a.key===b),cn=P?ae??(V?V.label:`${l.name} as it is now`):ae??"",z=w==="choosing"&&A.length===0;return(0,k.jsxs)(k.Fragment,{children:[O&&P?(0,tn.createPortal)((0,k.jsx)(In,{options:A,shown:b,names:I,drew:an,failed:dn,kind:h}),O):null,(0,k.jsx)(Ne,{phase:`options-${w}`,name:l.name,said:z?`There are no other ways to show ${l.name} yet.`:cn,...P&&!z?{scope:"Nothing changes until you keep one. Everyone in this app sees the one you keep."}:{},...de?{note:de}:{},...w==="choosing"&&V&&F?{keep:()=>void m.keep()}:{},...w==="kept"&&C.canUndo&&F?{undo:()=>void m.undo()}:{},...w!=="keeping"?{close:W}:{},children:w==="choosing"&&!z?(0,k.jsx)("div",{ref:J,role:"radiogroup","aria-label":`Ways to show ${l.name}`,"data-testid":"display-options",onKeyDown:ln,style:Hn,children:$.map(a=>{let p=a.key===(b??N);return(0,k.jsx)("button",{type:"button",role:"radio","aria-checked":p,tabIndex:p?0:-1,"data-testid":"display-option","data-option":a.key,onClick:()=>m.flip(a.key===N?null:a.key),style:p?Nn:on,children:a.label},a.key)})}):null})]})}var Pn={position:"relative",minWidth:"0",maxWidth:"100%",width:"100%",overflow:"clip"},$n={boxSizing:"border-box",height:"min(72vh, 760px)",display:"grid",gridTemplateRows:"minmax(0, 1fr)",gridTemplateColumns:"minmax(0, 1fr)",overflow:"auto",maxWidth:"100%",borderRadius:12,border:"1px solid var(--graview-edge)",background:"var(--graview-panel)"},Rn={display:"grid",gridTemplateColumns:"minmax(0, 1fr)",maxWidth:"100%"},Ln={position:"absolute",top:0,left:0,right:0,visibility:"hidden",pointerEvents:"none"},Tn={display:"grid",gridTemplateRows:"minmax(0, 1fr)",gridTemplateColumns:"minmax(0, 1fr)",minWidth:0,minHeight:0},Hn={display:"flex",flexWrap:"wrap",gap:6,marginTop:4},on={minHeight:34,padding:"0 12px",font:"inherit",borderRadius:8,cursor:"pointer",color:"var(--graview-ink)",background:"transparent",border:"1px solid var(--graview-edge)"},Nn={...on,fontWeight:600,border:"1px solid var(--graview-accent)",boxShadow:"inset 0 0 0 1px var(--graview-accent)"};export{nt as DisplaySwitch};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{a as ot}from"./chunk.SDO3U72B.js";import{De as Io,Fe as nt,Gd as Ao,Ge as Gt,Id as ko,N as vo,Od as Ro,Pa as bo,Ta as Wt,Ud as To,Va as xo,Xc as jt,ie as Co,pb as Po,se as Mo,te as Oo,zd as Eo,ze as Vo}from"./chunk.IUVRJDL3.js";import{a as tt,b as _}from"./chunk.AJZBJBMO.js";var Jo=tt(v=>{"use strict";var Yt=Symbol.for("react.transitional.element"),Ri=Symbol.for("react.portal"),Ti=Symbol.for("react.fragment"),Ci=Symbol.for("react.strict_mode"),Mi=Symbol.for("react.profiler"),Oi=Symbol.for("react.consumer"),Vi=Symbol.for("react.context"),Ii=Symbol.for("react.forward_ref"),Hi=Symbol.for("react.suspense"),Li=Symbol.for("react.memo"),zo=Symbol.for("react.lazy"),_i=Symbol.for("react.activity"),Fo=Symbol.iterator;function Di(e){return e===null||typeof e!="object"?null:(e=Fo&&e[Fo]||e["@@iterator"],typeof e=="function"?e:null)}var $o={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Uo=Object.assign,Yo={};function be(e,t,n){this.props=e,this.context=t,this.refs=Yo,this.updater=n||$o}be.prototype.isReactComponent={};be.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};be.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Zo(){}Zo.prototype=be.prototype;function Zt(e,t,n){this.props=e,this.context=t,this.refs=Yo,this.updater=n||$o}var Xt=Zt.prototype=new Zo;Xt.constructor=Zt;Uo(Xt,be.prototype);Xt.isPureReactComponent=!0;var Bo=Array.isArray;function Ut(){}var H={H:null,A:null,T:null,S:null},Xo=Object.prototype.hasOwnProperty;function Jt(e,t,n){var o=n.ref;return{$$typeof:Yt,type:e,key:t,ref:o!==void 0?o:null,props:n}}function Ni(e,t){return Jt(e.type,t,e.props)}function Qt(e){return typeof e=="object"&&e!==null&&e.$$typeof===Yt}function Wi(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Ko=/\/+/g;function $t(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Wi(""+e.key):t.toString(36)}function ji(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Ut,Ut):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function ve(e,t,n,o,r){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(i){case"bigint":case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Yt:case Ri:a=!0;break;case zo:return a=e._init,ve(a(e._payload),t,n,o,r)}}if(a)return r=r(e),a=o===""?"."+$t(e,0):o,Bo(r)?(n="",a!=null&&(n=a.replace(Ko,"$&/")+"/"),ve(r,t,n,"",function(c){return c})):r!=null&&(Qt(r)&&(r=Ni(r,n+(r.key==null||e&&e.key===r.key?"":(""+r.key).replace(Ko,"$&/")+"/")+a)),t.push(r)),1;a=0;var s=o===""?".":o+":";if(Bo(e))for(var l=0;l<e.length;l++)o=e[l],i=s+$t(o,l),a+=ve(o,t,n,i,r);else if(l=Di(e),typeof l=="function")for(e=l.call(e),l=0;!(o=e.next()).done;)o=o.value,i=s+$t(o,l++),a+=ve(o,t,n,i,r);else if(i==="object"){if(typeof e.then=="function")return ve(ji(e),t,n,o,r);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return a}function ct(e,t,n){if(e==null)return e;var o=[],r=0;return ve(e,o,"","",function(i){return t.call(n,i,r++)}),o}function Gi(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var qo=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Fi={map:ct,forEach:function(e,t,n){ct(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ct(e,function(){t++}),t},toArray:function(e){return ct(e,function(t){return t})||[]},only:function(e){if(!Qt(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};v.Activity=_i;v.Children=Fi;v.Component=be;v.Fragment=Ti;v.Profiler=Mi;v.PureComponent=Zt;v.StrictMode=Ci;v.Suspense=Hi;v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=H;v.__COMPILER_RUNTIME={__proto__:null,c:function(e){return H.H.useMemoCache(e)}};v.cache=function(e){return function(){return e.apply(null,arguments)}};v.cacheSignal=function(){return null};v.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var o=Uo({},e.props),r=e.key;if(t!=null)for(i in t.key!==void 0&&(r=""+t.key),t)!Xo.call(t,i)||i==="key"||i==="__self"||i==="__source"||i==="ref"&&t.ref===void 0||(o[i]=t[i]);var i=arguments.length-2;if(i===1)o.children=n;else if(1<i){for(var a=Array(i),s=0;s<i;s++)a[s]=arguments[s+2];o.children=a}return Jt(e.type,r,o)};v.createContext=function(e){return e={$$typeof:Vi,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:Oi,_context:e},e};v.createElement=function(e,t,n){var o,r={},i=null;if(t!=null)for(o in t.key!==void 0&&(i=""+t.key),t)Xo.call(t,o)&&o!=="key"&&o!=="__self"&&o!=="__source"&&(r[o]=t[o]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var s=Array(a),l=0;l<a;l++)s[l]=arguments[l+2];r.children=s}if(e&&e.defaultProps)for(o in a=e.defaultProps,a)r[o]===void 0&&(r[o]=a[o]);return Jt(e,i,r)};v.createRef=function(){return{current:null}};v.forwardRef=function(e){return{$$typeof:Ii,render:e}};v.isValidElement=Qt;v.lazy=function(e){return{$$typeof:zo,_payload:{_status:-1,_result:e},_init:Gi}};v.memo=function(e,t){return{$$typeof:Li,type:e,compare:t===void 0?null:t}};v.startTransition=function(e){var t=H.T,n={};H.T=n;try{var o=e(),r=H.S;r!==null&&r(n,o),typeof o=="object"&&o!==null&&typeof o.then=="function"&&o.then(Ut,qo)}catch(i){qo(i)}finally{t!==null&&n.types!==null&&(t.types=n.types),H.T=t}};v.unstable_useCacheRefresh=function(){return H.H.useCacheRefresh()};v.use=function(e){return H.H.use(e)};v.useActionState=function(e,t,n){return H.H.useActionState(e,t,n)};v.useCallback=function(e,t){return H.H.useCallback(e,t)};v.useContext=function(e){return H.H.useContext(e)};v.useDebugValue=function(){};v.useDeferredValue=function(e,t){return H.H.useDeferredValue(e,t)};v.useEffect=function(e,t){return H.H.useEffect(e,t)};v.useEffectEvent=function(e){return H.H.useEffectEvent(e)};v.useId=function(){return H.H.useId()};v.useImperativeHandle=function(e,t,n){return H.H.useImperativeHandle(e,t,n)};v.useInsertionEffect=function(e,t){return H.H.useInsertionEffect(e,t)};v.useLayoutEffect=function(e,t){return H.H.useLayoutEffect(e,t)};v.useMemo=function(e,t){return H.H.useMemo(e,t)};v.useOptimistic=function(e,t){return H.H.useOptimistic(e,t)};v.useReducer=function(e,t,n){return H.H.useReducer(e,t,n)};v.useRef=function(e){return H.H.useRef(e)};v.useState=function(e){return H.H.useState(e)};v.useSyncExternalStore=function(e,t,n){return H.H.useSyncExternalStore(e,t,n)};v.useTransition=function(){return H.H.useTransition()};v.version="19.2.8"});var W=tt((ks,Qo)=>{"use strict";Qo.exports=Jo()});var ur=tt(gt=>{"use strict";var ea=Symbol.for("react.transitional.element"),ta=Symbol.for("react.fragment");function dr(e,t,n){var o=null;if(n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),"key"in t){n={};for(var r in t)r!=="key"&&(n[r]=t[r])}else n=t;return t=n.ref,{$$typeof:ea,type:e,key:o,ref:t!==void 0?t:null,props:n}}gt.Fragment=ta;gt.jsx=dr;gt.jsxs=dr});var De=tt((Ds,cr)=>{"use strict";cr.exports=ur()});var we={focusId:null,relation:null,expanded:[],pins:{}},rt=e=>{let t=Number(e);return Number.isFinite(t)?t:null};function Y(e){let t=new URLSearchParams;e.focusId&&t.set("focus",e.focusId),e.relation&&t.set("relation",e.relation),e.overview&&t.set("overview","1"),e.zoom&&t.set("zoom","1"),e.past&&t.set("past","1"),e.shown&&e.shown.length>0&&t.set("show",[...e.shown].sort().join(",")),e.selection!==void 0&&e.selection.length>0&&t.set("sel",[...e.selection].sort().join(",")),e.expanded.length>0&&t.set("expand",[...e.expanded].sort().join(","));for(let o of Object.keys(e.pins).sort()){let r=e.pins[o];t.set(`pin.${o}`,`${it(r.x)},${it(r.y)}`)}e.pan&&(e.pan.x!==0||e.pan.y!==0)&&t.set("pan",`${it(e.pan.x)},${it(e.pan.y)}`);for(let o of Object.keys(e.within??{}).sort()){let r=e.within[o];r.length>0&&t.set(`in.${o}`,r)}e.q&&e.q.trim().length>0&&t.set("q",e.q);let n=t.toString();return n?`#${n}`:"#"}function bi(e){return e&&e.startsWith("agg:")?`aggregate:${e.slice(4)}`:e}function at(e){let t=e.includes("#")?e.slice(e.indexOf("#")+1):e,n=new URLSearchParams(t),o=Object.create(null);for(let[y,g]of n){if(!y.startsWith("pin."))continue;let[m,x]=g.split(","),T=m===void 0?null:rt(m),f=x===void 0?null:rt(x);T===null||f===null||(o[y.slice(4)]={x:T,y:f})}let r=Object.create(null);for(let[y,g]of n)!y.startsWith("in.")||g.length===0||(r[y.slice(3)]=g);let i=n.get("view");i&&i.length>0&&r.view===void 0&&(r.view=i);let a=n.get("pan")?.split(",")??[],s=a[0]===void 0?null:rt(a[0]),l=a[1]===void 0?null:rt(a[1]),c=(n.get("sel")??"").split(",").filter(y=>y.length>0).sort(),u=n.get("overview")==="1";return{...c.length>0?{selection:c}:{},...u?{overview:!0}:{},...n.get("zoom")==="1"?{zoom:!0}:{},...n.get("past")==="1"?{past:!0}:{},...n.get("show")?{shown:[...new Set(n.get("show").split(",").filter(Boolean))].sort()}:{},...s!==null&&l!==null?{pan:{x:s,y:l}}:{},...Object.keys(r).length>0?{within:r}:{},...n.get("q")?.trim()?{q:n.get("q")}:{},focusId:bi(n.get("focus")),relation:n.get("relation"),expanded:(n.get("expand")??"").split(",").filter(y=>y.length>0&&(u||!y.startsWith("kind:"))).sort(),pins:o}}function ds(e){let t=at(e);return Y(t)==="#"?{...t,overview:!0}:t}function us(e){let t=Y(e);return t==="#overview=1"?"":t}function it(e){return Math.round(e*100)/100}function Lo(e,t){return Y(e)===Y(t)}var Ho="edge:";function _o(e){if(!e.startsWith(Ho))return null;let t=e.slice(Ho.length).split(":");if(t.length!==3)return null;let[n,o,r]=t;if(!n||!o||!r)return null;try{return{kind:decodeURIComponent(n),from:decodeURIComponent(o),to:decodeURIComponent(r)}}catch{return null}}function Ft(e){let{pan:t,...n}=e;return{...n,pins:{}}}function $(e,t){if(t===e.focusId)return{...e,focusId:t};let n=Ft(e);return{...n.within?.q!==void 0?ne(n,"q",null):n,focusId:t}}function Do(e,t){return{...e,relation:t}}function ne(e,t,n){let o={...e.within??{}};if(n===null?delete o[t]:o[t]=n,Object.keys(o).length===0){let{within:r,...i}=e;return i}return{...e,within:o}}function de(e,t){if(t!==e.overview&&(e=Ft(e)),!t){let n=e.expanded.filter(o=>!o.startsWith("kind:"));return{...e,overview:!1,expanded:n}}return{...e,overview:t}}function st(e,t){if(t.length===0){let{selection:n,...o}=e;return o}return{...e,selection:[...t]}}function Le(e,t){if(t!==(e.zoom===!0)&&(e=Ft(e)),!t){let{zoom:n,...o}=e;return o}return{...e,zoom:!0}}function lt(e,t){let n=new Set(e.expanded);return n.has(t)?n.delete(t):n.add(t),{...e,expanded:[...n].sort()}}var ut="aggregate:",dt="kind:";function Bt(e){return`${dt}${e}`}function Se(e){return e.startsWith(dt)?e.slice(dt.length):null}var fs="kinds:beyond";function xi(e){let t=Se(e);return t?[t]:ue(e)}function oe(...e){return`${ut}${[...e].sort().join("+")}`}function No(e){return e.startsWith(ut)}function ue(e){return!No(e)||e.includes("|")?[]:e.slice(ut.length).split("+").filter(Boolean)}function Wo(e,t,n={}){let o=Se(t);if(o!==null&&e.overview&&n.ownPicture!==!0)return lt(e,t);let r=o!==null?oe(o):t;if(e.zoom&&e.focusId===r&&!(o!==null&&n.carry))return Le(e,!1);if(o!==null&&n.carry){let i=de({...$(e,r),relation:null},!1);return ne(Le(i,!0),"q",n.carry)}return Le({...$(e,r),relation:null},!0)}function Pi(e,t,n){return ne(de($(e,oe(t)),!1),"view",n)}function ys(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var jo="aggregate:";function Kt(e){return e.startsWith(jo)&&e.includes("|")}var qt=e=>e?.off===!0,Ei=e=>e!==void 0&&!qt(e)&&(e.fast!==void 0||e.thinking!==void 0||e.answer!==void 0||e.decide!==void 0||e.complete!==void 0||e.turn!==void 0),Go=e=>e!==void 0&&!qt(e)&&(e.fast!==void 0||e.decide!==void 0),Ai=e=>e?.suggestOnOpen!==!1&&Go(e),ki=e=>e?.hoverChips===!0&&Go(e);var zt={};var er=_(W(),1),Bi={turns:[],outcomes:new Map,busy:!1,pending:null,draft:null,draftNote:null},tr=e=>`graview:seat:${e}`;function Ki(e){if(!e)return{};try{let t=sessionStorage.getItem(e);if(!t)return{};let n=JSON.parse(t);return{...Array.isArray(n.turns)?{turns:n.turns}:{},...Array.isArray(n.outcomes)?{outcomes:new Map(n.outcomes)}:{},...n.draft?.drawn?{draft:n.draft}:{}}}catch{return{}}}function qi(e,t){if(e)try{sessionStorage.setItem(e,JSON.stringify({turns:t.turns.slice(-40),outcomes:[...t.outcomes],draft:t.draft}))}catch{}}function en(e){let t=e===null?null:tr(e),n={...Bi,...Ki(t)},o=new Set,r=(i,a=!0)=>{n=i,a&&qi(t,n);for(let s of[...o])s()};return{get:()=>n,subscribe(i){return o.add(i),()=>void o.delete(i)},setTurns:i=>r({...n,turns:i(n.turns)}),settle:(i,a)=>r({...n,outcomes:new Map(n.outcomes).set(i,a)}),setBusy:i=>r({...n,busy:i},!1),ask:i=>r({...n,pending:i.trim()||null}),takePending(){let i=n.pending;return i!==null&&r({...n,pending:null},!1),i},setDraft:(i,a=null)=>r({...n,draft:i,draftNote:a})}}function zi(e){return(0,er.useSyncExternalStore)(e.subscribe,e.get,e.get)}var or=_(W(),1),$i={entries:[],ghost:null,loaded:!1};function nr(e,t){let n=new Map(e.map(o=>[o.id,o]));for(let o of t)n.set(o.id,{...n.get(o.id),...o});return[...n.values()].sort((o,r)=>o.at<r.at?1:o.at>r.at?-1:0)}function tn(e){let t=$i,n=new Set,o=r=>{t=r;for(let i of[...n])i()};return{get:()=>t,subscribe:r=>(n.add(r),()=>n.delete(r)),record:r=>{o({...t,entries:nr(t.entries,[r])}),Promise.resolve(e()?.keep?.(r)).catch(i=>{console.warn("The host did not keep an AI interaction:",i)})},setGhost:r=>o({...t,ghost:r}),load:()=>{if(t.loaded)return;o({...t,loaded:!0});let r=e()?.load;r&&Promise.resolve(r()).then(i=>o({...t,entries:nr(t.entries,i)})).catch(i=>{console.warn("The host's AI interactions could not be read:",i)})}}}function Ui(e){return(0,or.useSyncExternalStore)(e.subscribe,e.get,e.get)}function rr(e){return e?.closest?.("[data-graview-pick]")?.getAttribute("data-graview-pick")??null}function Cs(e,t,n,o){for(let r=e;r&&r!==t?.parentElement;r=r.parentElement){if(typeof r.querySelectorAll!="function")continue;let i=[...new Set([...r.querySelectorAll("[data-graview-pick]")].map(s=>s.getAttribute("data-graview-pick")??"").filter(s=>s!==""&&s!==o))];if(i.length===0)continue;let a=i[0];return i.slice(1).every(s=>n(a,s))?a:null}return null}var re=_(W(),1),pt=(0,re.createContext)(void 0),Yi=()=>(0,re.useContext)(pt),ft=(0,re.createContext)(void 0),Zi=()=>(0,re.useContext)(ft),yt=(0,re.createContext)(void 0),Xi=()=>(0,re.useContext)(yt);var A=_(W(),1),_e=(0,A.createContext)(null);function ar(){return(0,A.useContext)(_e)}function Ji(e,t){let n=ar(),o=(0,A.useMemo)(()=>n?n.live.seenBy(t):e,[n,e,t]),r=(0,A.useRef)(0),i=(0,A.useCallback)(a=>o.subscribe(()=>{r.current+=1,a()}),[o]);return(0,A.useSyncExternalStore)(i,()=>r.current,()=>0),o}var sr=ot(()=>(__graviewPreload(import.meta.url,["./chunk.YFVJUHAK.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.FC6AF6CC.js")));function nn(e){let[,t]=(0,A.useReducer)(o=>o+1,0),n=e.publishing?.mode==="on-publish"&&!Ao();return(0,A.useEffect)(()=>{n&&sr().then(t,()=>{})},[n]),!n}var ir,Qi=400;function on(e,t,n){let o=(0,A.useContext)(_e),r=o!==null&&o.owns(e,t),[i,a]=(0,A.useState)(null),[s,l]=(0,A.useState)(ir);(0,A.useEffect)(()=>{if(s||r||i===null)return;let E=!0;return sr().then(V=>{ir=V,E&&l(V)},()=>{}),()=>{E=!1}},[s,r,i]);let[c,u]=(0,A.useState)(0),[y,g]=(0,A.useMemo)(()=>r||i===null||!s?[]:[i>=e.log.length?void 0:s.askArchived(e,i,n)??s.askDeclaration(n,i),s.keptOf(e,n)],[r,e,i,n,s,c]),m=y&&"waiting"in y?y.waiting:void 0,x=y&&"seq"in y?y:null,[T,f]=(0,A.useState)(void 0);(0,A.useEffect)(()=>{if(!m)return;let E=!0,V=setTimeout(()=>E&&f(m),Qi);return m.then(()=>E&&u(L=>L+1)),()=>{E=!1,clearTimeout(V)}},[m]);let h=m!==void 0&&T!==m||x!==null,w=(0,A.useMemo)(()=>{if(r||i===null||i>=e.log.length||!s||h)return null;try{let E=s.pastAt(e,i,n);return{seq:i,at:E.past?.at,store:E}}catch{return null}},[r,e,i,n,s,h,c]),k=(0,A.useRef)(null),P=h?k.current:w;(0,A.useEffect)(()=>{k.current=P},[P]);let B=(0,A.useCallback)(E=>a(E===null?null:E>=e.log.length?Number.POSITIVE_INFINITY:E),[e]),j=(0,A.useCallback)((E,V)=>[e,P?.store].some(L=>L!==void 0&&(L===E||L.seenBy(V)===E)),[e,P]),G=i!==null,C=(0,A.useMemo)(()=>({past:P,open:G,show:B,live:e,host:n,owns:j,archive:x,kept:g}),[P,G,B,e,n,j,x,g]);return r?o:C}var lr=_(W(),1),rn=(0,lr.createContext)(null);var pr=e=>`graview:setting:${e}`;function fr(){return localStorage}function yr(e,t){try{let n=(t??fr()).getItem(pr(e.name));if(n!==null&&e.options.some(o=>o.value===n))return n}catch{}return e.initial}function gr(e,t,n){try{(n??fr()).setItem(pr(e.name),t)}catch{}}function mr(e,t){if(typeof document>"u")return;let n=document.documentElement;if(e.honored==="root-font-size"){n.style.fontSize=t===e.initial?"":t;return}let o=`graview${e.name.replace(/-([a-z0-9])/g,(r,i)=>i.toUpperCase()).replace(/^[a-z]/,r=>r.toUpperCase())}`;t===e.initial?delete n.dataset[o]:n.dataset[o]=t}var R=_(W(),1);function an(e){return nt(e)}var na=12,oa=4;function ra(e,t,n){let o=an(t);return e.get(o)??{participant:o,who:t.id??t.kind,at:null,mode:"docked",since:n,trail:[]}}var mt=(e,t)=>t===null||e[e.length-1]===t?e:[...e,t].slice(-na);function hr(e,t){let n=e.filter(r=>r.length>0);if(n.length===0)return null;if(n.length<=oa)return n[0];let o=new Set(n.map(r=>t(r)).filter(r=>r!==void 0));return o.size===1?Bt([...o][0]):n[0]}function sn(e,t,n){let o=new Map(e);if(t.type==="rest"){for(let[a,s]of e)s.mode!=="asking"&&s.mode!=="docked"&&t.at-s.since>=t.holdMs&&o.set(a,{...s,mode:"docked",at:null,trail:[],say:void 0,confidence:void 0});return o}if(t.author.kind!=="agent")return o;let r=ra(e,t.author,t.at),i=a=>o.set(r.participant,{...r,...a,since:t.at});switch(t.type){case"read":{let a=hr(t.ids,n);return i({at:a,mode:"reading",trail:mt(r.trail,a)}),o}case"about-to-write":case"write":{let a=hr(t.ids,n);return i({at:a,mode:"writing",trail:mt(r.trail,a),say:void 0,confidence:void 0}),o}case"refused":return i({at:t.where,mode:"refused",say:t.say,confidence:void 0,trail:mt(r.trail,t.where)}),o;case"asking":return i({at:t.where??r.at,mode:"asking",say:t.say,...t.confidence!==void 0?{confidence:t.confidence}:{confidence:void 0},trail:mt(r.trail,t.where)}),o;case"said":return i({say:t.say,...t.confidence!==void 0?{confidence:t.confidence}:{confidence:void 0},...t.caption?{caption:t.caption}:{}}),o;case"over":return i({over:t.over}),o;case"home":return i({at:null,mode:"docked",trail:[],say:void 0,confidence:void 0,over:null}),o;default:return o}}var wr="graview:session";function vr(e){let t=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID().slice(0,8):Math.random().toString(36).slice(2,10);try{let n=e??sessionStorage,o=n.getItem(wr);if(o)return o;let r=t();return n.setItem(wr,r),r}catch{return t()}}var ln={name:"share-where",title:"Where you are",description:"Whether the others here see which stop you are on.",honored:"root-attribute",options:[{value:"shared",label:"Shown"},{value:"private",label:"Hidden"}],initial:"shared"},dn={name:"share-over",title:"What you point at",description:"Whether the others see the thing under your pointer, outlined in your color.",honored:"root-attribute",options:[{value:"private",label:"Kept to yourself"},{value:"shared",label:"Outlined for others"}],initial:"private"},br=[ln,dn],Sr=800;function xr(e){let{channel:t,store:n,view:o,principal:r,session:i,robots:a,seatWho:s,settingValues:l,setView:c,ttlMs:u=Io,people:y,seats:g}=e,[m,x]=(0,R.useState)(()=>new Map),[T,f]=(0,R.useState)(null),[h,w]=(0,R.useState)(null),[k,P]=(0,R.useState)(null),B=typeof r.id=="string"&&r.id.length>0,j=B&&(l[ln.name]??ln.initial)==="shared",G=j&&(l[dn.name]??dn.initial)==="shared",C=an({kind:r.kind,...r.id?{id:r.id}:{},session:i}),E=B?Po(r,{graph:n.graph,schema:n.schema,...g?{seats:g}:{},...y?{people:y}:{}}):"",V=s?a.get(`agent:${s}:${i}`):void 0,L=(0,R.useMemo)(()=>!t||!j?null:{participant:C,kind:r.kind,name:E,...r.onBehalfOf?.id?{onBehalfOf:r.onBehalfOf.id,...r.onBehalfOf.name?{onBehalfOfName:r.onBehalfOf.name}:{}}:{},hue:jt(r.id??"nobody"),stop:k??Y(o),...G?{over:T}:{},...V?{robot:{at:V.at,mode:V.mode}}:{},at:new Date().toISOString()},[t,j,G,C,E,r.id,r.kind,r.onBehalfOf?.id,r.onBehalfOf?.name,o,k,T,V?.at,V?.mode]),ke=(0,R.useRef)(null),fe=b=>b&&t?.here({...b,caret:ke.current??void 0,at:new Date().toISOString()}),Fe=(0,R.useCallback)(b=>{ke.current=b,fe(L)},[t,L]);(0,R.useEffect)(()=>{if(!L)return;fe(L);let b=setInterval(()=>fe(L),Sr);return()=>clearInterval(b)},[t,L]),(0,R.useEffect)(()=>t?t.onWho(D=>x(Gt(new Map,D,Date.now(),u))):void 0,[t,u]);let ye=m.size>0;(0,R.useEffect)(()=>{if(!ye)return;let b=setInterval(()=>{x(D=>{let ae=Gt(D,[],Date.now(),u);return ae.size===D.size?D:ae})},Math.max(250,Math.min(1e3,u/4)));return()=>clearInterval(b)},[ye,u]),(0,R.useEffect)(()=>{if(!t||typeof window>"u")return;let b=()=>t.leave();return window.addEventListener("pagehide",b),()=>window.removeEventListener("pagehide",b)},[t]),(0,R.useEffect)(()=>{if(!G||typeof document>"u")return;let b=null,D=ae=>{let q=rr(ae.target);q!==b&&(b=q,f(q))};return document.addEventListener("pointermove",D,{passive:!0}),()=>document.removeEventListener("pointermove",D)},[G]);let ge=(0,R.useRef)(null),Q=h?m.get(h)??null:null,Be=(0,R.useCallback)(b=>{ge.current=null,w(b)},[]);(0,R.useEffect)(()=>{if(h){if(!Q){w(null);return}Q.stop!==ge.current?.stop&&(ge.current={stop:Q.stop,at:Date.now()},c(at(Q.stop)))}},[h,Q,c]),(0,R.useEffect)(()=>{let b=ge.current;!h||b===null||Date.now()-b.at<400||Lo(o,at(b.stop))||w(null)},[o,h]),(0,R.useEffect)(()=>{if(!h||typeof document>"u")return;let b=D=>{D.key==="Escape"&&w(null)};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[h]);let[ee,Ke]=(0,R.useState)(null),Re=(0,R.useRef)(Y(o));Re.current=k??Y(o);let qe=(0,R.useCallback)(b=>Ke(D=>(b===null&&D&&t?.alsoHere?.({...D,at:new Date().toISOString(),until:new Date().toISOString()}),b===null?null:{hue:jt("graview"),...b,stop:Re.current,at:new Date().toISOString()})),[t]);(0,R.useEffect)(()=>{if(!ee||!t?.alsoHere)return;let b=()=>t.alsoHere?.({...ee,at:new Date().toISOString()});b();let D=setInterval(b,Sr);return()=>clearInterval(D)},[ee,t]);let ze=(0,R.useMemo)(()=>{if(!ee)return m;let b=new Map(m);return b.set(ee.participant,{...ee,at:new Date().toISOString()}),b},[m,ee]),$e=L!==null,Ue=(0,R.useMemo)(()=>$e?{participant:C,name:E}:null,[$e,C,E]);return(0,R.useMemo)(()=>({who:ze,aiHere:qe,sharing:Ue,following:Q,follow:Be,sayWhere:P,sayCaret:Fe}),[ze,qe,Ue,Q,Be,Fe])}var Z=_(W(),1);function Pr(e){return nt(e.author)}function ia(e,t){return e.length>1?"co-edited":t==="rule"?"rule":t==="agent"?"autonomous":"directed"}function Er(e,t,n,o,r){let i=new Map;for(let[l,c]of e)o-c.at<r&&i.set(l,c);let a=new Set(n.flatMap(l=>l.nodeIds)),s=(l,c,u)=>{let y=i.get(l),g=y?.participants.includes(Pr(c))?y.participants:[...y?.participants??[],Pr(c)];i.set(l,{at:o,manner:ia(g,c.author.kind),intent:c.intent,wrote:(y?.wrote??!1)||(u.wrote??!1),read:(y?.read??!1)||(u.read??!1),broke:(y?.broke??!1)||a.has(l),participants:g})};for(let l of t){for(let c of l.writes)s(c,l,{wrote:!0});for(let c of l.reads)l.writes.includes(c)||s(c,l,{read:!0})}for(let l of n)for(let c of l.nodeIds){let u=i.get(c);i.set(c,{at:o,manner:u?.manner??"rule",intent:u?.intent??l.message,wrote:u?.wrote??!1,read:u?.read??!1,broke:!0,participants:u?.participants??["rule::"]})}return i}var aa=2600;function Ar(e,t=aa){let[n,o]=(0,Z.useState)(()=>new Map),r=(0,Z.useRef)(n);r.current=n;let i=(0,Z.useRef)(null),a=(0,Z.useCallback)(l=>{r.current=l,o(l),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{r.current=new Map,o(new Map)},t)},[t]);(0,Z.useEffect)(()=>{let l=e.violations(),c=e.subscribe((u,y)=>{let g=e.violations(),m=To(e.allInvariants(),l,g).introduces;l=g,a(Er(r.current,y,m.map(x=>({nodeIds:x.nodeIds,message:x.message})),Date.now(),t))});return()=>{c(),i.current&&clearTimeout(i.current)}},[e,t,a]);let s=(0,Z.useCallback)(l=>{l.reads.length!==0&&a(Er(r.current,[sa(l)],[],Date.now(),t))},[t,a]);return{activity:n,noteAttention:s}}function sa(e){return{id:`attention:${e.intent}`,seq:-1,batch:"attention",author:e.author,intent:e.intent,mutation:null,primitives:[],reads:e.reads,writes:[],at:new Date().toISOString()}}var d=_(W(),1);function kr(){let e=null,t=new Set,n=new Set,o=r=>{for(let i of n)i(r)};return{subscribe(r){return t.add(r),t.size===1&&o(!0),()=>{t.delete(r),t.size===0&&(e=null,o(!1))}},snapshot:()=>e,set(r){if(!(e===r||e&&r&&e.x===r.x&&e.y===r.y)){e=r;for(let i of t)i()}},get listeners(){return t.size},onActive(r){return n.add(r),()=>void n.delete(r)}}}var ht=_(W(),1),la=e=>e.definitions.some(t=>bo(t).size>0);function Rr(e,t,n){let[o,r]=(0,ht.useState)(void 0),i=(n.roles??[]).join("\0"),a=n.onBehalfOf?JSON.stringify(n.onBehalfOf):"";return(0,ht.useEffect)(()=>{if(!t||!la(e.schema)){r(void 0);return}let s=!0,l=!1,c=e.graph,u=()=>{l||(l=!0,queueMicrotask(()=>{l=!1,s&&e.reread()}))},y=xo(t,{kind:n.kind,...n.id===void 0?{}:{id:n.id},...n.roles?{roles:n.roles}:{},...n.onBehalfOf?{onBehalfOf:n.onBehalfOf}:{}},u);return Wt(c,y.read),r(y),e.reread(),()=>{s=!1,Wt(c,void 0)}},[e,t,n.kind,n.id,i,a]),o}function Tr(){let e=!1,t=new Set;return{moving:()=>e,set(n){if(n!==e){e=n;for(let o of t)o()}},subscribe(n){return t.add(n),()=>t.delete(n)}}}var X=_(De(),1),da="graview:place-menu",Ne=(0,d.createContext)(null),Vr=(0,d.createContext)("scene");function ua({mode:e,children:t}){return(0,X.jsx)(Vr.Provider,{value:e,children:t})}function ca(){return(0,d.useContext)(Vr)}var Ir={kind:"human"},pa=[],fa=[],ya=[],un=[];function Hr(e,t){let n=(0,d.useId)();(0,d.useEffect)(()=>{if(!globalThis.__graviewWatch)return;let o=t??Ir,r=()=>Ro(e,o,n);r();let i,a=e.subscribe(()=>{clearTimeout(i),i=setTimeout(r,250)});return()=>{clearTimeout(i),a(),globalThis.__graviewWatch?.unseen?.({words:[],from:n,gone:!0})}},[e,t,n])}var ga=()=>{try{return typeof location<"u"&&new URLSearchParams(location.search).get("as")==="published"?"published":void 0}catch{return}},ma={off:!0};function ha({store:e,views:t,initialView:n,scheme:o="dark",initialSelection:r,principal:i,as:a,seats:s=pa,onSeat:l,people:c=fa,memory:u,presenceTtlMs:y,app:g,settings:m=g?.settings??ya,presence:x,typing:T,brand:f,locale:h,timeZone:w,onKeepLens:k,onProposeChange:P,composeChange:B,onDraftChange:j,displayOptions:G,providers:C,ai:E,files:V,viewerState:L,assetsAt:ke,resolveApp:fe,history:Fe,linkedRecords:ye,menuSections:ge,keptViews:Q,onExport:Be,subscriptions:ee,dismissals:Ke,whileAway:Re,notifications:qe,onNotificationsSeen:ze,workflowRuns:$e,signIn:Ue,view:b,onViewChange:D,children:ae}){let q=(0,d.useContext)(Ne),Rn=ge??q?.menuSections,Tn=Ue??q?.signIn,Rt=$e??q?.workflowRuns,Tt=Q??q?.keptViews,Ct=Be??q?.onExport,Mt=qe??q?.notifications,Ot=ze??q?.onNotificationsSeen,[si,li]=(0,d.useState)(null),me=si??i??s[0]?.principal??Ir,Ye=on(e,me,Fe),Cn=Ye.past&&Ye.live===e?Ye.past.store:e,Vt=a??ga(),It=!nn(e),N=(0,d.useMemo)(()=>It?e:Cn.seenBy(me,Vt?{as:Vt}:void 0),[It,e,Cn,me,Vt]);Hr(e,me);let[se]=(0,d.useState)(()=>vr(u)),[Mn,di]=(0,d.useState)(!1),On=(0,d.useCallback)(()=>di(!0),[]),le=(0,d.useMemo)(()=>x?[...m,...br]:m,[m,x]),[Ht]=(0,d.useState)(()=>n??yn(t,e.schema)),[ui,Vn]=(0,d.useState)(()=>st(Ht??we,r??Ht?.selection??[])),Te=(0,d.useRef)(Ht??we).current,[In,ci]=(0,d.useState)(null),[Hn,pi]=(0,d.useState)(null),K=(0,d.useContext)(Ne),[Ln]=(0,d.useState)(()=>K?.seatTalk??en(f?.name??e.schema.kinds.join(","))),Lt=E??K?.ai??zt,Ze=(0,d.useMemo)(()=>Lt.off?ma:Lt,[Lt]),_n=(0,d.useRef)(Ze.interactions);_n.current=Ze.interactions;let[Dn]=(0,d.useState)(()=>K?.aiDesk??tn(()=>_n.current)),[fi]=(0,d.useState)(()=>K?.subscriptions??ko()),Nn=ee??K?.subscriptions??fi,_t=k??K?.onKeepLens,Wn=P??K?.onProposeChange,jn=B??K?.composeChange,Gn=j??K?.onDraftChange,Fn=G??K?.displayOptions,Xe=g??K?.app,Je=h??K?.locale,yi=f?.locale??Xe?.brand?.locale,Qe=w??K?.timeZone;vo({reader:Je,app:yi,readerTimeZone:Qe,appTimeZone:f?.timeZone??Xe?.brand?.timeZone});let Bn=(0,d.useRef)(null),Kn=(0,d.useCallback)(p=>{Bn.current=p},[]),qn=(0,d.useCallback)(p=>Bn.current?.whereIs(p)??null,[]),[zn]=(0,d.useState)(()=>kr()),[$n]=(0,d.useState)(()=>Tr()),[Dt,gi]=(0,d.useState)(null),[Ce,Un]=(0,d.useState)(()=>new Map),Me=(0,d.useRef)(Ce);Me.current=Ce;let Oe=(0,d.useRef)(null),Nt=(0,d.useCallback)(p=>N.graph.getNode(p)?.kind,[N]),te=(0,d.useCallback)(p=>{let S=sn(Me.current,p,Nt);Me.current=S,Un(S),Oe.current&&clearTimeout(Oe.current),[...S.values()].some(I=>I.mode!=="docked"&&I.mode!=="asking")&&(Oe.current=setTimeout(()=>{let I=sn(Me.current,{type:"rest",at:Date.now(),holdMs:fn},Nt);Me.current=I,Un(I)},fn+20))},[Nt]),Yn=(0,d.useCallback)(p=>te({...p,at:p.at??Date.now()}),[te]),Zn=(0,d.useCallback)(p=>{gi(p),p&&te({type:"home",author:{kind:"agent",id:p,session:se},at:Date.now()})},[te,se]);(0,d.useEffect)(()=>N.subscribe((p,S)=>{for(let M of S)M.author.kind==="agent"&&te({type:"write",author:M.author,ids:M.writes,at:Date.now()})}),[N,te]),(0,d.useEffect)(()=>()=>{Oe.current&&clearTimeout(Oe.current)},[]);let U=(0,d.useMemo)(()=>({...me,session:se}),[me,se]),Xn=Rr(N,ye,U),Jn=(0,d.useCallback)(p=>{li(p),l?.(p)},[l]),[Ve,mi]=(0,d.useState)(()=>Object.fromEntries(le.map(p=>[p.name,yr(p,u)])));(0,d.useEffect)(()=>{for(let p of le)mr(p,Ve[p.name]??p.initial)},[le,Ve]);let Qn=(0,d.useCallback)((p,S)=>{let M=le.find(I=>I.name===p);!M||!M.options.some(I=>I.value===S)||(gr(M,S,u),mi(I=>({...I,[p]:S})))},[le,u]),[eo,hi]=(0,d.useState)(null),{activity:to,noteAttention:no}=Ar(N),oo=(0,d.useCallback)(p=>{no(p),te({type:"read",author:p.author,ids:p.reads,at:Date.now()})},[no,te]),he=(0,d.useCallback)(p=>{if(Se(p)!==null||ue(p).length>0||Kt(p))return!0;let S=_o(p);return S?N.graph.allEdges().some(M=>M.kind===S.kind&&M.from===S.from&&M.to===S.to):N.graph.getNode(p)!==void 0},[N]),ro=(0,d.useCallback)(p=>{let S=p.selection??un,M=S.filter(he),I=M.length===S.length?p:st(p,M);return I.focusId!==null&&!he(I.focusId)&&(I=$(I,null)),I},[he]),Ie=(0,d.useCallback)(p=>{let S=ro(p),M=Or(N,U,S.shown);if(S.focusId!==null&&M.size>0){let I=ue(S.focusId),So=N.graph.getNode(S.focusId);(I.length>0?I.every(vi=>M.has(vi)):So?M.has(So.kind):!1)&&(S={...S,focusId:null})}if(!S.overview&&S.focusId===null){let I=Te.focusId!==null&&!he(Te.focusId)?yn(t,e.schema)??{...we,overview:!0}:Te;I.focusId!==null&&he(I.focusId)?S={...S,focusId:I.focusId}:I.overview===!0&&(S={...S,overview:!0})}return S},[ro,he,N,Te,U,t,e.schema]),z=Ie(b??ui),io=(0,d.useMemo)(()=>Or(N,U,z.shown),[N,U,z.shown]),ao=(0,d.useMemo)(()=>[...N.modules.administered.entries()].map(([p,S])=>{let M=N.mayAdminister(p,U);return{name:p,...S.description?{description:S.description}:{},kinds:S.kinds??[],canShow:M,shown:M&&(z.shown??[]).includes(p)}}),[N,U,z.shown]),He=(0,d.useCallback)(p=>{let S=M=>Ie(typeof p=="function"?p(M):p);if(b!==void 0){D?.(S(b));return}D&&D(S(z)),Vn(M=>S(M))},[z,D,b,Ie]);(0,d.useEffect)(()=>{b===void 0&&Vn(p=>{let S=Ie(p);return S===p?p:S})},[z,b,Ie]);let so=z.selection??un,lo=(0,d.useCallback)(p=>{He(S=>st(S,typeof p=="function"?p(S.selection??un):p))},[He]),{who:et,aiHere:uo,following:co,follow:po,sayWhere:wi,sayCaret:fo,sharing:yo}=xr({channel:x,store:N,view:z,principal:U,session:se,robots:Ce,seatWho:Dt,settingValues:Ve,setView:He,seats:s,people:c,...y!==void 0?{ttlMs:y}:{}}),Si=(0,d.useMemo)(()=>({store:N,scheme:o,views:t,view:z,setView:He,homeView:Te,selection:so,setSelection:lo,menuAt:In,setMenuAt:ci,whereIs:qn,pointer:zn,motion:$n,registerScene:Kn,robots:Ce,noteSeat:Yn,seatWho:Dt,registerSeatWho:Zn,actsDoor:Hn,registerActsDoor:pi,seatTalk:Ln,aiDesk:Dn,...u?{memory:u}:{},who:et,aiHere:uo,following:co,follow:po,sayWhere:wi,sharing:yo,session:se,ai:Ze,resolveApp:fe,linkedRecords:ye,menuSections:Rn,...Tt?{keptViews:Tt}:{},...Ct?{onExport:Ct}:{},subscriptions:Nn,dismissals:Ke,whileAway:Re,...Mt?{notifications:Mt}:{},...Ot?{onNotificationsSeen:Ot}:{},...Rt?{workflowRuns:Rt}:{},signIn:Tn,linkedReads:Xn,movedByHand:Mn,noteMoved:On,emphasis:eo,setEmphasis:hi,activity:to,noteAttention:oo,principal:U,seats:s,people:c,takeSeat:Jn,settings:le,settingValues:Ve,chooseSetting:Qn,hiddenKinds:io,administered:ao,...C?{providers:C}:{},...f?{brand:f}:{},..._t?{onKeepLens:_t}:{},...Wn?{onProposeChange:Wn}:{},...jn?{composeChange:jn}:{},...Gn?{onDraftChange:Gn}:{},...Fn?{displayOptions:Fn}:{},app:Xe,...Je?{locale:Je}:{},...Qe?{timeZone:Qe}:{}}),[N,o,t,z,He,so,lo,In,qn,zn,$n,Kn,Ce,Yn,Dt,Zn,Hn,Ln,Dn,u,et,uo,co,po,yo,se,Ze,fe,ye,Rn,Tt,Ct,Nn,Ke,Re,Mt,Ot,Rt,Tn,Xn,Mn,On,eo,to,oo,U,s,c,Jn,le,Ve,Qn,io,ao,C,f,_t,Xe,Je,Qe]),go=(0,d.useMemo)(()=>T?{typing:T,sayCaret:fo,who:et}:null,[T,fo,et]),mo=ke?(0,X.jsx)(ft.Provider,{value:ke,children:ae}):ae,ho=V?(0,X.jsx)(pt.Provider,{value:V,children:mo}):mo,wo=L?(0,X.jsx)(yt.Provider,{value:L,children:ho}):ho;return(0,X.jsx)(Ne.Provider,{value:Si,children:(0,X.jsx)(_e.Provider,{value:Ye,children:(0,X.jsx)(xa,{children:It?null:go?(0,X.jsx)(rn.Provider,{value:go,children:wo}):wo})})})}var Lr=(0,d.createContext)(null),cn,pn=new Set,wa=e=>(pn.add(e),()=>void pn.delete(e)),Cr=()=>cn;function Sa(e){if(!cn){cn=e;for(let t of[...pn])t()}}var va=300;function ba(e){let t=0;return async(n,o)=>{let r=++t;return await new Promise(i=>setTimeout(i,va)),r===t?e(n,o):[]}}function xa({children:e}){let{store:t,view:n,views:o,principal:r,hiddenKinds:i,selection:a,ai:s}=ie(),l=wt(),c=n.q,u=n.focusId,y=!!(c&&c.trim().length>0),g=(0,d.useSyncExternalStore)(wa,Cr,Cr),m=(0,d.useMemo)(()=>y&&g?{flagged:new Set(t.violations().flatMap(k=>k.nodeIds)),touched:g.touchWeights(t.log.all())}:null,[t,l,y,g]),x=u?t.graph.getNode(u)?.kind??Se(u)??(ue(u).length===1?ue(u)[0]:void 0):void 0,T=(0,d.useMemo)(()=>s.near&&ba(s.near),[s.near]),f=(0,d.useMemo)(()=>!c||!m||!g?null:g.search(t,c,{...x?{inKind:x}:{},principal:r,places:o.places(),kinds:t.schema.kinds.filter(k=>!i.has(k)),from:[...a,...u&&t.graph.has(u)?[u]:[]],flagged:m.flagged,touched:m.touched,limit:200,rank:T}),[t,c,r,o,i,a,u,x,m,T]),[h,w]=(0,d.useState)();return(0,d.useEffect)(()=>void f?.later?.then(k=>w([f,k])),[f]),(0,X.jsx)(Lr.Provider,{value:h?.[0]===f?h[1]:f,children:e})}var Mr=new WeakMap;function yl(e){let t=Mr.get(e);return t||Mr.set(e,t=new Set(e.matched)),t}function Pa(){return(0,d.useContext)(Lr)}function ie(){let e=(0,d.useContext)(Ne);if(!e)throw new Error("useGraview must be used inside a <GraviewProvider>.");return e}function gn(){return(0,d.useContext)(Ne)??null}function wt(){let{store:e}=ie(),t=(0,d.useRef)(null),n=(0,d.useRef)(null),o=(0,d.useCallback)(()=>(n.current!==e&&(n.current=e,t.current=null),t.current??=e.graph.allNodes(),t.current),[e]),r=(0,d.useCallback)(i=>e.subscribe(()=>{t.current=null,i()}),[e]);return(0,d.useSyncExternalStore)(r,o,o)}function Ea(e){let{store:t}=ie(),n=(0,d.useCallback)(r=>t.subscribe(r),[t]),o=(0,d.useCallback)(()=>e===null?void 0:t.graph.getNode(e),[t,e]);return(0,d.useSyncExternalStore)(n,o,o)}function Or(e,t,n){let o=new Set(e.modules.disabledKinds);for(let r of e.kindsKeptFrom(t))o.add(r);for(let[r,i]of e.modules.administered)if(!(e.mayAdminister(r,t)&&(n??[]).includes(r)))for(let a of i.kinds??[])o.add(a);return o}var fn=2600;var _r=new WeakSet,Aa=e=>_r.has(e),ka=e=>void _r.add(e);function yn(e,t){let n=Vo(e.arrangement?.()?.first,t,e.places());if(!(!n||n.to==="home"))return n.to==="place"?{...we,focusId:oe(n.place.kind),within:{view:n.place.as}}:{...we,focusId:oe(n.kind)}}var ce=_(W(),1);var mn=_(W(),1),Ra=(0,mn.createContext)(null),hn=(0,mn.createContext)(null);var Dr=(0,ce.createContext)(null);function Ta(){let e=(0,ce.useContext)(Dr),t=gn(),n=(0,ce.useContext)(hn),o=(i,a,s)=>t?.setView(l=>ne(ne(de($(l,oe(i)),!1),"view",a),"filter",s?.filter??null)),r=()=>t?.setView(i=>ne(de(i,!0),"view",null));return(0,ce.useMemo)(()=>e??{record:i=>{t&&(t.setView(a=>$(de(a,!1),i)),t.setSelection([i]))},place:(i,a)=>{if(i===Oo)return r();if(i===Mo)return n?n.open("/"):r();let s=t?.views.places().find(l=>l.as===i);s&&o(s.kind,s.as,a)},list:(i,a)=>o(i,null,a)},[e,t,n])}var Nr=_(W(),1),Ca=(0,Nr.createContext)(!1);var St=Symbol.for("graview.default-view");function Wr(e){return Object.defineProperty(e,St,{value:!0,enumerable:!1}),e}function jr(e){return typeof e=="function"&&e[St]===!0}var vt=Symbol.for("graview.replaces-page");function Gr(e){return Object.defineProperty(e,vt,{value:!0,enumerable:!1}),e}function Fr(e){return typeof e=="function"&&e[vt]===!0}var We=Symbol.for("graview.bleeds");function Br(e,t=!0){return Object.defineProperty(e,We,{value:t,enumerable:!1,configurable:!0}),e}function Kr(e){let t=typeof e=="function"?e[We]:void 0;return t===!0||t==="full"}function qr(e){return typeof e=="function"&&e[We]==="full"}var bt=Symbol.for("graview.previews");function zr(e,t={}){return Object.defineProperty(e,bt,{value:t,enumerable:!1}),e}function $r(e){return typeof e=="function"?e[bt]:void 0}function Ma(e){return Co(e)}function Oa(e,t){if(t===e)return e;for(let r of t.registrations())e.register(r.kind,r,r.view,r);let n=t.arrangement?.();n&&e.arrange?.(n);let o=t.homes?.()??[];if(o.length>0)for(let r of o)e.home?.(r.view,r.name!==void 0?{name:r.name}:void 0);else{let r=t.homeView?.();r&&e.home?.(r)}return e}var O=_(W(),1),J=_(De(),1),wn=new Set,xt=0;function Sn(e){return()=>{xt+=1;let t=e();return t.then(()=>void(xt-=1),()=>void(xt-=1)),t}}var Va=()=>xt,Et=(0,O.createContext)(null);function Ia(){return{waiting:new Map,at:0}}function Ha(e){for(let[t,n]of e.waiting)n<e.at&&e.waiting.delete(t);e.at+=1}var La=e=>e?.waiting.size??0;function Zr(e,t){e?.waiting.set(t,e.at)}function Xr(e){let t=(0,O.useContext)(Et);(0,O.useLayoutEffect)(()=>{t?.waiting.delete(e)},[t,e])}function _a(e){let t={},n=!1,o=new Set,r=(0,O.lazy)(Sn(()=>e().then(a=>{n=!0;let s=a.default;function l(c){return Xr(t),(0,O.createElement)(s,c)}return{default:l}},a=>{for(let s of o)s.waiting.delete(t);throw a})));function i(a){let s=(0,O.useContext)(Et);return!n&&s&&(o.add(s),Zr(s,t)),(0,O.createElement)(r,a)}return i}var Jr=!1,Qr=!1,Pt=new Set;function Da(){Jr=!0}function Na(){Qr=!0;for(let e of[...Pt])e();Pt.clear()}var ei=()=>Qr||!Jr;function Wa(e){return ei()?(e(),()=>{}):(Pt.add(e),()=>void Pt.delete(e))}var Ur=!1;function vn(){for(let e of[...wn])e()}function ja(){Ur||typeof window>"u"||(Ur=!0,window.addEventListener("online",vn))}function bn(e){let t,n=!1,o=!1,r,i=0,a=new Set,s=()=>{i+=1;for(let g of[...a])g()},l=g=>(a.add(g),()=>void a.delete(g)),c=()=>i,u=()=>void y().catch(()=>{});function y(){if(n)return Promise.resolve(t);if(r)return r;let g=e().then(m=>(t=m,n=!0,o=!1,r=void 0,wn.delete(u),s(),m),m=>{throw r=void 0,o=!0,wn.add(u),ja(),s(),m});return g.catch(()=>{}),r=g,g}return{load:y,prefetch:u,get current(){return t},get failed(){return o},part(g,m={}){let x=m.what??"This part",T={};function f(k){(0,O.useSyncExternalStore)(l,c,c),Xr(T);let P=(0,O.useRef)(null),B=(0,O.useRef)(null),j=(0,O.useRef)(!1);return(0,O.useEffect)(()=>{o&&r===void 0&&u()},[]),n&&typeof document<"u"&&P.current!==null&&document.activeElement===P.current&&(j.current=!0),(0,O.useLayoutEffect)(()=>{if(!(!n||!j.current)){j.current=!1;for(let G=B.current?.nextElementSibling??null;G!==null;G=G.nextElementSibling){let C=G.matches(Yr)?G:G.querySelector(Yr);if(C instanceof HTMLElement){C.focus();return}}}}),n?(0,J.jsxs)(J.Fragment,{children:[j.current?(0,J.jsx)("span",{ref:B,hidden:!0}):null,g(t,k)]}):m.quiet?null:(0,J.jsx)(Ga,{what:x,button:P,...m.as?{as:m.as}:{}})}let h=(0,O.lazy)(Sn(()=>y().then(()=>({default:f}),()=>({default:f}))));function w(k){let P=(0,O.useContext)(Et),[B]=(0,O.useState)(()=>n||o);return!n&&!o&&Zr(P,T),(0,O.createElement)(B?f:h,k)}return w}}}var Yr="button,a[href],input,select,textarea,[tabindex]:not([tabindex='-1'])";function Ga({what:e,button:t,as:n="p"}){let r=typeof navigator<"u"&&navigator.onLine===!1?`${e} will load when you're back online.`:`${e} didn't load.`;return(0,J.jsxs)(n,{"data-testid":"lazy-part-missing",style:{margin:0,fontSize:"0.875rem",color:"var(--graview-ink-muted)"},children:[(0,J.jsx)("span",{role:"status",children:r})," ",(0,J.jsx)("button",{ref:t,type:"button","data-testid":"lazy-part-retry",onClick:vn,style:{font:"inherit",fontWeight:600,color:"var(--graview-ink)",background:"none",border:"1px solid var(--graview-edge)",borderRadius:6,padding:"2px 10px"},children:"Try again"})]})}var Pe=_(W(),1);function Fa(){let{selection:e,setSelection:t}=ie();return(0,Pe.useMemo)(()=>({selection:e,set:n=>t(n),clear:()=>t([]),toggle:n=>t(o=>o.includes(n)?o.filter(r=>r!==n):[...o,n]),isSelected:n=>e.includes(n)}),[e,t])}function Ba(){let{store:e}=ie(),t=wt();return(0,Pe.useMemo)(()=>Ka(e),[e,t])}var ti=new WeakMap;function Ka(e){let t=ti.get(e);if(!t){let n={violations:null};e.subscribe(()=>{n.violations=null}),ti.set(e,n),t=n}return t.violations??=e.violations(),t.violations}function qa(){let{view:e,setView:t}=ie();return(0,Pe.useMemo)(()=>({view:e,url:Y(e),focus:n=>t(o=>$(o,n)),show:n=>t(o=>Do(o,n)),toggle:n=>t(o=>lt(o,n)),go:n=>t(n)}),[e,t])}var xe={at:0,depth:0,listeners:new Set,tell(){for(let e of this.listeners)e()}};typeof window<"u"&&window.addEventListener("popstate",e=>{let t=e.state;xe.at=typeof t?.graview=="number"?t.graview:0,xe.at>xe.depth&&(xe.depth=xe.at),xe.tell()});var F=_(W(),1),Pn={profile:{trigger:"profile-button",pane:"profile",opens:"press",focus:"into",drawn:["shell","embed"]},places:{trigger:"app-places-open",pane:"app-places",opens:"press",focus:"into",drawn:["embed"]},here:{trigger:"here-open",pane:"here-list",opens:"press",focus:"into",drawn:["shell","embed","pages"]},"app-menu":{trigger:"app-menu-open",pane:"app-menu",opens:"press",focus:"into",drawn:["shell","embed","pages"]},inbox:{trigger:"inbox-button",pane:"inbox",opens:"press",focus:"into",drawn:["shell","embed","pages"]},share:{trigger:"app-share-open",pane:"app-share",opens:"press",focus:"into",drawn:["embed"]},"host-actions":{trigger:"host-bar-actions-open",pane:"host-bar-actions",opens:"press",focus:"into",drawn:["shell","embed"]},activity:{trigger:"activity-button",pane:"activity",opens:"press",focus:"into",drawn:["studio"]},find:{trigger:"find-box",pane:"find-strip",opens:"typing",focus:"stays",drawn:["shell"]},districts:{trigger:"beyond-more",pane:"beyond-list",opens:"press",focus:"into",drawn:["shell","embed"]},acts:{trigger:null,pane:"context-menu",opens:"context-menu",focus:"into",drawn:["shell","embed","pages"]},arrange:{trigger:"arrange-add",pane:"arrange-list",opens:"press",focus:"into",drawn:["pages"]},"studio-ask":{trigger:"studio-agent",pane:"studio-agent-panel",opens:"press",focus:"into",drawn:["studio"]}},za={position:"fixed",inset:"auto",margin:0,zIndex:Eo("popover"),boxSizing:"border-box"},At=6,pe=8,$a=e=>typeof e.showPopover=="function";function je(e){try{return e.matches(":popover-open")}catch{return!1}}function Ua(e){if(typeof e=="function"){let o=e();return o?{left:o.x,right:o.x,top:o.y,bottom:o.y}:null}let t=e.current;if(!t||!t.isConnected)return null;let n=t.getBoundingClientRect();return{left:n.left,right:n.right,top:n.top,bottom:n.bottom}}function kt(e,t,n={}){let o=Ua(t);if(!o)return;let r={width:document.documentElement.clientWidth||innerWidth,height:innerHeight},i=e.dataset.graviewDesignedHeight??=e.style.maxHeight;e.style.maxHeight=i;let a=e.getBoundingClientRect(),s=r.height-o.bottom-At-pe,l=o.top-At-pe,c=a.height<=s||s>=l,u=Math.max(96,Math.floor(c?s:l)),y=Math.min(a.height,u);a.height>u&&(e.style.maxHeight=i?`min(${i}, ${u}px)`:`${u}px`);let g=a.width,m=n.align==="start"?o.left:o.right-g,x=typeof t=="function"?null:t.current?.closest("[data-graview-embed]")?.getBoundingClientRect();x&&g<=x.right-x.left&&(m<x.left?m=o.left+g<=x.right?o.left:x.left:m+g>x.right&&(m=o.right-g>=x.left?o.right-g:x.right-g));let T=g>=r.width-2*pe?Math.max(0,(r.width-g)/2):Math.max(pe,Math.min(m,r.width-pe-g)),f=Math.round(c?o.bottom+At:Math.max(pe,o.top-At-y));e.style.left=`${Math.round(T)}px`,e.style.top=`${f}px`;let h=e.getBoundingClientRect();if(je(e)&&(Math.abs(h.left-Math.round(T))>2||Math.abs(h.top-f)>2)){let w=e.style.position;e.style.position=w==="absolute"?"fixed":"absolute",e.offsetWidth,e.style.position=w}}function ni(e,t,n,o={}){let r=o.align??"end";(0,F.useLayoutEffect)(()=>{let i=e.current;if(!t||!i)return;if($a(i)&&!je(i))try{i.showPopover(),Za()}catch{}let a=0,s=u=>{u?.target instanceof Node&&i.contains(u.target)||(cancelAnimationFrame(a),a=requestAnimationFrame(()=>kt(i,n,{align:r})))};kt(i,n,{align:r});let l=()=>{let u=i.style.top;cancelAnimationFrame(a),a=requestAnimationFrame(()=>{kt(i,n,{align:r});let y=Number.parseFloat(u);typeof n=="function"&&Number.isFinite(y)&&y+i.getBoundingClientRect().height<=innerHeight-pe&&(i.style.top=u)})};addEventListener("resize",s),addEventListener("scroll",s,!0);let c=typeof ResizeObserver>"u"?null:new ResizeObserver(()=>l());return c?.observe(i),()=>{if(cancelAnimationFrame(a),removeEventListener("resize",s),removeEventListener("scroll",s,!0),c?.disconnect(),i.isConnected&&je(i))try{i.hidePopover()}catch{}}},[t,e,r])}var En=new Set;function Ya(e){return En.add(e),()=>En.delete(e)}function Za(){for(let e of En)if(!(!e.isConnected||!je(e)))try{e.hidePopover(),e.showPopover()}catch{}}var Ee=null,Xa='button:not([disabled]), [href], input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), summary, [tabindex]:not([tabindex="-1"])';function Ja(e){for(let t of e.querySelectorAll(Xa))if(t.closest("[hidden]")===null&&!t.hasAttribute("data-graview-not-first")&&getComputedStyle(t).visibility!=="hidden")return t;return e}var xn=()=>{let e=document.activeElement;return e===null||e===document.body};function Qa(e,t={}){let{at:n,returnTo:o,onOpenChange:r}=t,i=t.popover!==!1,[a,s]=(0,F.useState)(!1),l=t.open??a,c=(0,F.useRef)(null),u=(0,F.useRef)(null),y=(0,F.useCallback)(w=>{c.current=w},[]),g=(0,F.useCallback)(w=>{u.current=w},[]),m=`graview-popover-${(0,F.useId)().replace(/:/g,"")}`,x=(0,F.useRef)({onOpenChange:r,returnTo:o,controlled:t.open!==void 0});x.current={onOpenChange:r,returnTo:o,controlled:t.open!==void 0};let T=(0,F.useCallback)(w=>{x.current.controlled||s(w),x.current.onOpenChange?.(w)},[]),f=(0,F.useCallback)(()=>{(document.querySelector(`[aria-controls="${m}"]`)??c.current??x.current.returnTo?.()??null)?.focus({preventScroll:!0})},[m]),h=(0,F.useCallback)(w=>{let k=u.current,P=typeof document>"u"?null:document.activeElement,B=P===null||P===document.body||k!==null&&k.contains(P);T(!1),!(!w||!B)&&(f(),requestAnimationFrame(()=>{xn()&&f()}))},[T,f]);return ni(u,i&&l,n??c,t.align?{align:t.align}:{}),(0,F.useEffect)(()=>{if(!i||!l)return;let w={name:e,close:()=>h(!1)};if(Ee&&Ee.close!==w.close&&Ee.close(),Ee=w,Pn[e].focus==="into"){let C=u.current;C&&!C.contains(document.activeElement)&&Ja(C).focus({preventScroll:!0})}let k=C=>{C.key==="Escape"&&h(!0)},P=C=>{let E=C.target;if(!(E instanceof Node))return;let V=u.current;if(V?.contains(E)||c.current?.contains(E))return;let L=E instanceof Element?E.closest('[role="dialog"], [role="alertdialog"]'):null;L&&!(V&&L.contains(V))||(h(!1),Pn[e].focus==="into"&&requestAnimationFrame(()=>{(xn()||V!==null&&V.contains(document.activeElement))&&f()}))},B=null,j=null,G=C=>{let E=C.target;if(!(E instanceof Element))return;let V=u.current,L=E.closest('[role="dialog"], [role="alertdialog"]');!L||V&&(V.contains(L)||L.contains(V))||(B=L,h(!1))};return document.addEventListener("keydown",k),document.addEventListener("pointerdown",P,!0),document.addEventListener("focusin",G),()=>{document.removeEventListener("keydown",k),document.removeEventListener("pointerdown",P,!0),document.removeEventListener("focusin",G);let C=B;C&&typeof MutationObserver<"u"&&(j?.disconnect(),j=new MutationObserver(()=>{C.isConnected||(j?.disconnect(),requestAnimationFrame(()=>{(xn()||document.activeElement.closest("[hidden]")!==null)&&f()}))}),j.observe(document.body,{childList:!0,subtree:!0}),setTimeout(()=>j?.disconnect(),10*6e4)),Ee?.close===w.close&&(Ee=null)}},[i,l,e,h,f]),{open:l,setOpen:w=>w?T(!0):h(!0),toggle:()=>l?h(!0):T(!0),trigger:{ref:y,"aria-expanded":l,"aria-controls":m,"data-graview-popover-trigger":e},pane:{ref:g,id:m,popover:"manual",tabIndex:-1,"data-graview-popover":e,"data-graview-overlay":""}}}var Ae=_(W(),1);var es=bn(ot(()=>(__graviewPreload(import.meta.url,["./chunk.CUA7F3YJ.js","./chunk.SDO3U72B.js","./chunk.IUVRJDL3.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.PAIBRJVZ.js"))));function ts(e,t,n){let o,r=!1,i=()=>{let{hidden:s,removed:l}=t.current();o||r||s.length+l.length===0||(o=()=>{},es.load().then(c=>{r||(o=c.watchTidied(e,t,n))},String))};i();let a=t.onChange?.(i);return()=>{r=!0,a?.(),o?.()}}function ns(e,t){let[n,o]=(0,Ae.useState)();return(0,Ae.useEffect)(()=>t?ts(e,t,r=>o([e,r])):void 0,[e,t]),n?.[0]===e?n[1]:e}var oi=_(W(),1),os=(0,oi.createContext)(!1);var ri=_(W(),1),rs=(0,ri.createContext)(null);var ii=_(W(),1),An='button:not([disabled]), a[href], input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), summary, [tabindex]:not([tabindex="-1"])',kn=e=>e instanceof HTMLElement&&(e.matches(An)||e.hasAttribute("tabindex")),Ge=e=>typeof e.checkVisibility=="function"?e.checkVisibility():e.getClientRects().length>0;function is(e,t){let n=l=>l.replace(/["\\]/g,"\\$&"),o=t.getAttribute("data-testid"),r=t.getAttribute("data-graview-pick"),i=t.getAttribute("aria-label"),a=o?`[data-testid="${n(o)}"]`:r?`[data-graview-pick="${n(r)}"]`:i?`${t.tagName.toLowerCase()}[aria-label="${n(i)}"]`:null;if(!a)return null;let s=e.querySelector(a);return s&&kn(s)&&Ge(s)?s:null}var as=e=>e.isConnected&&kn(e)&&!e.matches(":disabled")&&e instanceof HTMLElement&&Ge(e);function ai(e,t){let n=t?is(e,t):null;if(n)return n;let o=e.querySelector("[data-graview-view][tabindex]");if(o&&Ge(o))return o;for(let r of e.querySelectorAll(An))if(Ge(r))return r;return kn(e)&&Ge(e)?e:null}function ss(e){(0,ii.useEffect)(()=>{let t=e.current;if(!t||typeof MutationObserver>"u")return;let n=[],o=f=>{let h=f.target;if(h instanceof Element){n=[];for(let w=h;w&&w!==t.parentElement;w=w.parentElement)n.push(w)}},r=!1,i=!1,a=t.ownerDocument,s=()=>!i&&a.defaultView!==null,l=(f,h)=>void setTimeout(()=>s()&&h(),f),c=f=>void requestAnimationFrame(()=>s()&&f()),u=f=>{if(r=!1,i)return;let h=a.activeElement;if(!(!(h===null||h===a.body||h===a.documentElement)||n.length===0)){if(as(n[0])){f&&n[0]instanceof HTMLElement&&n[0].focus({preventScroll:!0});return}for(let k of n.slice(1)){if(!k.isConnected)continue;let P=ai(k,n[0]);if(P){P.focus({preventScroll:!0}),n=[];return}}}},y=(f,h=Date.now()+2500)=>{l(100,()=>{u(f);let w=a.activeElement;(w===null||w===a.body||w===a.documentElement)&&n.length>0&&Date.now()<h&&y(f,h)})},g=()=>{r||n.length===0||(r=!0,l(60,()=>c(()=>{u(!1),y(!1)})))},m=f=>{if(!(f instanceof KeyboardEvent&&!["Enter"," ","Escape"].includes(f.key))){if(!(f instanceof KeyboardEvent)){let h=f.target instanceof Element?f.target.closest(An):null,w=a.activeElement,k=w===null||w===a.body||w===a.documentElement;if(h&&k&&t.contains(h)){n=[];for(let P=h;P&&P!==t.parentElement;P=P.parentElement)n.push(P);l(150,()=>c(()=>{u(!1),y(!1)}));return}}!(f instanceof KeyboardEvent)&&!(f.target instanceof Node&&n[0]?.contains(f.target))||l(150,()=>c(()=>{u(!0),y(!0)}))}},x=new MutationObserver(()=>{n.length>0&&!n[0].isConnected&&g()}),T=f=>{f.relatedTarget===null&&g()};return t.addEventListener("focusin",o),t.addEventListener("focusout",T),t.addEventListener("click",m),t.addEventListener("keydown",m),x.observe(t,{childList:!0,subtree:!0}),()=>{i=!0,t.removeEventListener("focusin",o),t.removeEventListener("focusout",T),t.removeEventListener("click",m),t.removeEventListener("keydown",m),x.disconnect()}},[e])}export{we as a,Y as b,at as c,ds as d,us as e,Lo as f,Ho as g,_o as h,Ft as i,$ as j,Do as k,ne as l,de as m,st as n,Le as o,lt as p,ut as q,Bt as r,Se as s,fs as t,xi as u,oe as v,No as w,ue as x,Wo as y,Pi as z,ys as A,jo as B,Kt as C,Ei as D,Ai as E,ki as F,W as G,en as H,zi as I,Ui as J,rr as K,Cs as L,pt as M,Yi as N,ft as O,Zi as P,yt as Q,Xi as R,_e as S,ar as T,Ji as U,nn as V,on as W,rn as X,De as Y,da as Z,Ne as _,ua as $,ca as aa,Hr as ba,ha as ca,Sa as da,yl as ea,Pa as fa,ie as ga,gn as ha,wt as ia,Ea as ja,Aa as ka,ka as la,yn as ma,Ra as na,hn as oa,Dr as pa,Ta as qa,Ca as ra,Wr as sa,jr as ta,Gr as ua,Fr as va,Br as wa,Kr as xa,qr as ya,zr as za,$r as Aa,Ma as Ba,Oa as Ca,Sn as Da,Va as Ea,Et as Fa,Ia as Ga,Ha,La as Ia,_a as Ja,Da as Ka,Na as La,ei as Ma,Wa as Na,bn as Oa,ns as Pa,os as Qa,rs as Ra,Fa as Sa,Ba as Ta,qa as Ua,xe as Va,ss as Wa,za as Xa,je as Ya,ni as Za,Ya as _a,Qa as $a};
|
|
2
|
-
/*! Bundled license information:
|
|
3
|
-
|
|
4
|
-
react/cjs/react.production.js:
|
|
5
|
-
(**
|
|
6
|
-
* @license React
|
|
7
|
-
* react.production.js
|
|
8
|
-
*
|
|
9
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
10
|
-
*
|
|
11
|
-
* This source code is licensed under the MIT license found in the
|
|
12
|
-
* LICENSE file in the root directory of this source tree.
|
|
13
|
-
*)
|
|
14
|
-
|
|
15
|
-
react/cjs/react-jsx-runtime.production.js:
|
|
16
|
-
(**
|
|
17
|
-
* @license React
|
|
18
|
-
* react-jsx-runtime.production.js
|
|
19
|
-
*
|
|
20
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
21
|
-
*
|
|
22
|
-
* This source code is licensed under the MIT license found in the
|
|
23
|
-
* LICENSE file in the root directory of this source tree.
|
|
24
|
-
*)
|
|
25
|
-
*/
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as $}from"./chunk.F5XWYO5W.js";import{f as w,g as F,h as m}from"./chunk.FSZQTX3K.js";import"./chunk.AJZBJBMO.js";function O(s,t){let a=`The app's face "${String(s.family)}" for its views is not loaded`,r=m(s,F(t.typography));if(r)return{refused:`${a}: ${r}.`};let o=w(s.src);if("asset"in o){let i=t.asset?.(o.asset);return i?{url:i}:{refused:`${a}: this host says nowhere the app's own files are served (\`asset\`), so ${s.src} is not fetched.`}}return $(t.origins).includes(new URL(o.https).origin)?{url:o.https}:{refused:`${a}: ${o.origin} is no origin this host lists for a view's images (\`images.origins\`), so it is not fetched.`}}var v=new WeakMap;function b(s,t,a,r){let o=s.defaultView,i=v.get(s)??new Map;v.set(s,i);let g=[];t.length>8&&r(`The app lends its views ${t.length} faces and at most ${8} are loaded, so ${t.slice(8).map(e=>`"${e.family}"`).join(", ")} ${t.length-8===1?"is":"are"} not.`);for(let e of t.slice(0,8)){let n=O(e,a);if("refused"in n){r(n.refused);continue}let f=o?.FontFace;if(!f||!s.fonts)continue;let c=JSON.stringify([e.family,n.url,e.weight??"",e.style??""]);g.push(c);let y=i.get(c);if(y){y.holders+=1;continue}let p=`url(${JSON.stringify(n.url)})`,h={display:"swap",...e.weight!==void 0?{weight:String(e.weight)}:{},...e.style?{style:e.style}:{}},l=new f(e.family,p,h);l.status==="error"&&(l=new f(JSON.stringify(e.family),p,h)),s.fonts.add(l),i.set(c,{face:l,holders:1}),l.load().catch(()=>r(`The app's face "${e.family}" for its views could not be loaded from ${n.url}.`))}let u=!1;return()=>{if(!u){u=!0;for(let e of g){let n=i.get(e);n&&(n.holders-=1,!(n.holders>0)&&(i.delete(e),s.fonts?.delete(n.face)))}}}}export{b as loadViewFonts,O as viewFontAddress};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as kn,c as wn,d as oe,e as bn,f as Y,h as Ee,i as je,n as vn,s as se,u as On}from"./chunk.RHV73CBA.js";import{$a as on,B as we,C as ue,Db as Se,Eb as dn,F as _e,Fa as Oe,H as He,Ia as en,K as Ue,L as We,La as nn,Na as tn,Ra as xe,Sa as Re,Xb as U,Ya as rn,_c as mn,ac as cn,b as Fe,bc as ln,c as Ne,d as Ce,dc as fn,e as K,g as ye,h as Z,ha as Je,i as Ie,ia as Ye,ic as pn,j as Ve,k as he,ka as Qe,l as Ke,ld as gn,m as Ze,md as yn,nc as un,nd as Ae,o as qe,od as hn,p as fe,pd as ze,q as ve,ua as Xe,v as Be,vb as an,x as pe,yb as sn,z as ke}from"./chunk.IUVRJDL3.js";var Tn=[{where:"settings[]",was:"honoured",now:"honored",since:"0.1.16"},{where:"pages",was:"overview",now:"scene",since:"0.1.17"}],q=e=>typeof e=="object"&&e!==null&&!Array.isArray(e);function xn(e,d=Tn){if(!q(e))return{document:e,respelled:[]};let n=[],t=e;for(let a of d)t=De(t,a.where.split("."),a,"",n);return{document:t,respelled:n}}function De(e,d,n,t,a){if(d.length===0){if(!q(e)||!Object.hasOwn(e,n.was))return e;a.push(`${t}${n.was}`);let{[n.was]:ie,...B}=e;return Object.hasOwn(e,n.now)?B:{...B,[n.now]:ie}}if(!q(e))return e;let[f,...E]=d,k=f.endsWith("[]"),O=k?f.slice(0,-2):f,M=e[O],X=M;if(!k)X=De(M,E,n,`${t}${O}.`,a);else if(Array.isArray(M)){let ie=M.map((B,T)=>De(B,E,n,`${t}${O}.${T}.`,a));X=ie.some((B,T)=>B!==M[T])?ie:M}return X===M?e:{...e,[O]:X}}var Rn=new WeakMap;function Sn(e,d){Rn.set(e,d)}function Zn(e){return Rn.get(e)}function An(e){if(typeof e=="string")return{form:"string",light:e};if(typeof e!="object"||e===null)return;let d=e,n=k=>typeof d[k]=="string"?d[k]:void 0,t=n("light")??n("src");if(t===void 0)return;let[a,f,E]=[n("dark"),n("alt"),n("darkFallback")];return{form:n("light")!==void 0?"light":"src",light:t,...a!==void 0?{dark:a}:{},...f!==void 0?{alt:f}:{},...E!==void 0?{darkFallback:E}:{}}}function Qn(e,d){let n=e.brand??{},t=n.ground,a=n.accent?ze(n.accent,t):void 0;t&&hn(a?.ok?a.schemes:Ae(t),n.accent)&&(d.push(je("brand","brand.ground","words would not read on that page background, so the app keeps Graview's","pick a lighter ground for the light scheme, a darker one for the dark")),t=void 0,a=n.accent?ze(n.accent):void 0),a&&!a.ok&&d.push(je("brand","brand.accent",`that accent cannot make a readable brand, so the app keeps Graview's colors: ${a.why}`,"pick a color further from orange-red, or a darker one"));let f=An(n.logo),E=n.name??e.name,k=n.typography?Object.fromEntries(Object.entries(n.typography).filter(([,O])=>typeof O=="string"&&yn(O)===null).map(([O,M])=>[O,gn(M)])):void 0;return{name:E,schemes:a?.ok?a.schemes:t?Ae(t):mn,...n.currency?{currency:n.currency}:{},...n.locale?{locale:n.locale}:{},...n.timeZone?{timeZone:n.timeZone}:{},...f?{logo:f.dark||f.darkFallback==="invert"?{light:f.light,...f.dark?{dark:f.dark}:{darkFallback:"invert"}}:f.light,logoAlt:f.alt??E}:{},...n.favicon?{favicon:n.favicon}:{},...e.description?{subtitle:e.description}:{},...n.subtitle===!1?{subtitleDrawn:!1}:{},...k?{typography:k}:{},...n.shape?{shape:n.shape}:{},...n.accents?{accents:n.accents}:{},...n.scheme?{scheme:n.scheme}:{},...n.views&&(n.views.css||n.views.motion||n.views.fonts?.length)?{views:{...n.views.css?{css:n.views.css}:{},...n.views.motion?{motion:n.views.motion}:{},...n.views.fonts?.length?{fonts:n.views.fonts}:{}}}:{}}}function zn(e){let{currency:d,locale:n,timeZone:t}=e.brand??{};return{...d?{currency:d}:{},...n?{locale:n}:{},...t?{timeZone:t}:{}}}var Mn=Symbol.for("@graview/core:typed-field"),En=(e,d)=>(/^(phone|place|duration)$/.test(d)&&(ue(e)[Mn]=d),e),jn=/^(?=(?:\D*\d){3})\+?[\d ()./-]+(?: *(?:ext\.?|x|#) *\d+)?$/i;function Dn(e){let d=Z().check(K(300),ke(t=>nn(t,e)!==void 0,`a record of ${e.kinds.join(" or ")} in ${e.address}, as "<kind>:<id>"`)),n=e.cardinality==="one"?d:fe(d).check(K(200));return tn(e.description?n.check(we(e.description)):n,e)}var $n="graview-compiled@1";function Fn(e,d){return e.find(([n,t])=>n!==Q&&"ref"in t&&(t.ref==="*"||t.ref.includes(d)))?.[0]}var Q="id",me=e=>typeof e=="string"&&/^\$[A-Za-z][A-Za-z0-9]*$/.test(e)?e.slice(1):void 0;function Ln(e){let d=Object.entries(e.fields),n=t=>["name","title","label"].find(a=>t.some(([f])=>f===a))??t[0]?.[0];return n(d.filter(([,t])=>t.required&&(t.type==="string"||t.type==="text")))??n(d.filter(([,t])=>t.type==="string"))}function Pn(e,d,n){let t;switch(e.type){case"string":case"place":t=Z().check(K(500));break;case"phone":t=Z().check(K(40),ye(jn,"a phone number"));break;case"text":t=Z().check(K(2e4)),e.format&&(ue(t)[Symbol.for("@graview/core:markdown")]=1);break;case"number":case"integer":case"duration":{let f=e.min??(e.type==="duration"?0:void 0),E=[...e.type==="number"?[]:[Ke()],...f===void 0?[]:[Ne(f)],...e.max===void 0?[]:[Fe(e.max)],...e.step===void 0?[]:[Ce(e.step)]];t=E.length>0?he().check(...E):he();break}case"boolean":t=Ze();break;case"date":t=Z().check(ye(He,"a date like 2026-10-02, or a month (2016-05) or a year (2006) alone"));break;case"datetime":t=Z().check(ke(Ue,"a date and time like 2026-10-02T14:30:00Z"));break;case"enum":t=Be(e.options),e.multiple&&(t=fe(t).check(K(e.options.length)));break;case"list":t=fe(e.of==="number"?he():e.of==="date"?Z().check(ye(_e)):e.of==="image"||e.of==="video"||e.of==="file"?Oe(e.of):Z().check(K(500))).check(K(200));break;case"image":case"video":case"file":t=Oe(e.type);break;case"app-link":t=en();break;case"url":t=Ve();break;case"email":t=Ie();break}let a=e.type==="number"||e.type==="integer";return En(t,a&&e.format==="duration"?"duration":e.type),e.collaborative!==void 0&&(e.type==="text"||e.type==="string")&&(ue(t)[Symbol.for("@graview/core:collaborative")]=e.collaborative?1:0),e.description&&(t=t.check(we(e.description))),a&&(e.format==="money"||e.format==="percent"||!e.format&&e.unit)&&pn(t,{...n,...e.format?{format:e.format}:{},...e.unit?{unit:e.unit}:{},...e.places===0?{places:0}:{}}),d?pe(t):t}var ge=e=>{throw new U(`there is no record "${e}"`,"invalid")},Nn=(e,d)=>"field"in e?Pn(e.field,e.optional,d):"ref"in e?un(e.ref):pe(qe()),Cn=new WeakMap;var $e=(e,d)=>q(d)&&Object.keys(e??{}).length===Object.keys(d).length&&Object.keys(e??{}).every(n=>Object.hasOwn(d,n));function xt(e,d={}){let n=q(e)?e.format:void 0;if(n!==$n)return{ok:!1,findings:[Ee("compiled-format","format",n===void 0?"this is not a compiled Graview app":`this compiled app is ${JSON.stringify(n)}, and this build reads ${$n}`,"compile the document instead")]};let t=e,a=xn(t.document).document,f=a===t.document?t:{...t,document:a},E=q(a)&&typeof a.name=="string"&&q(a.kinds)&&$e(a.kinds,f.kinds)&&$e(a.acts,f.acts)&&$e(a.rules,f.rules)&&Array.isArray(f.edges)&&Array.isArray(f.findings),k={ok:!1,findings:[Ee("compiled-shape","","this compiled app's parts do not match its document","compile the document instead")]};if(!E)return k;try{return In(f,d)}catch{return k}}function In(e,d={}){let{document:n}=e,t=n.brand?.timeZone,a=d.today??(()=>We(t)),f={...n.brand?.locale?{locale:n.brand.locale}:{},...t?{timeZone:t}:{}},E=new Map(e.edges.map(([p,o])=>[p,o])),k=new Map;for(let[p,o]of Object.entries(n.kinds)){let x=e.kinds[p]?.computed,b=Re(o.edges),j=new Map(Object.entries(o.fields).flatMap(([S,v])=>v.type==="enum"?[[S,v.optionLabels??{}]]:[]));k.set(p,{fields:new Set([...Object.keys(o.fields),...b.keys()]),edges:new Map(Object.entries(xe(o.edges)).map(([S,v])=>[S,v.cardinality??"many"])),...x?{computed:new Map(x)}:{},...b.size>0?{linked:b}:{},...j.size>0?{choices:j}:{}})}e.facts&&k.set(wn,{computed:new Map(e.facts)});let O=zn(n),M=p=>({from:p.from,via:p.via,sourceEnd:p.sourceEnd,back:p.back,values(o,x,b){let j={};for(let[S,v]of p.set)if("value"in v)j[S]=v.value;else try{let L=Y(v.expr,{graph:o,subject:x,kinds:k,bindings:{to:b},today:a(),...f});(L===null||typeof L!="object"||Array.isArray(L))&&(j[S]=L)}catch(L){if(!(L instanceof oe))throw L}return j}}),X=new Map,ie=Object.entries(n.kinds).map(([p,o])=>{let x={};for(let[r,i]of Object.entries(o.fields))x[r]=Pn(i,!i.required,O),i.repeats&&(x[rn(r)]=pe(on()));for(let[r,i]of Re(o.edges))x[r]=pe(Dn(i));let{label:b,describe:j,durations:S}=e.kinds[p]??{},v=Object.entries(o.computed??{}).map(([r,i])=>[r,typeof i=="string"?{expr:i}:i]),L=Object.hasOwn(o.fields,"label")&&!o.fields.label.label&&!/\{\s*label\b/.test(o.label??`{${Ln(o)??""}}`),ee=Object.fromEntries([...L?[["label","Label"]]:[],...Object.entries(o.fields).filter(([,r])=>r.label).map(([r,i])=>[r,i.label]),...v.filter(([,r])=>r.label).map(([r,i])=>[r,i.label])]),W=Object.keys(ee).length>0,$=Object.entries(o.fields).filter(([,r])=>r.type==="enum"&&(r.optionLabels&&Object.keys(r.optionLabels).length>0||r.multiple)),l=r=>i=>typeof i=="string"&&r.optionLabels&&Object.hasOwn(r.optionLabels,i)?r.optionLabels[i]:Ye(String(i)),G=Object.fromEntries($.map(([r,i])=>[r,i.multiple?z=>Array.isArray(z)?z.map(l(i)).join(", "):l(i)(z):l(i)])),N=$.length>0,C=Object.fromEntries(Object.entries(o.fields).filter(([,r])=>r.default!==void 0).map(([r,i])=>[r,i.default]));X.set(p,C);let _=Object.fromEntries(Object.entries(xe(o.edges)).map(([r,{renamedFrom:i,...z}])=>[r,z])),I=Object.entries(o.fields).flatMap(([r,i])=>i.aliases?[[r,i.aliases]]:[]),P=r=>o[r]?{[r]:o[r]}:{};return Qe(p,{fields:ve(x),edges:_,...P("plural"),...P("noun"),...P("aliases"),...I.length>0?{fieldAliases:Object.fromEntries(I)}:{},...P("description"),...b?{label:r=>se(b,{node:r,kinds:k,today:a(),money:O})||r.id}:{},...j?{describe:r=>se(j,{node:r,kinds:k,today:a(),money:O})}:{},...P("lifecycle"),...P("figure"),...P("fieldRoles"),...P("people"),archives:o.archives,...o.tidying?{tidying:o.tidying}:{},...v.length>0?{computed:Object.fromEntries(v.map(([r,i])=>[r,Vn(i,S?.includes(r)??!1,O)??o.computed[r]]))}:{},...W||N||o.glance||o.page?{display:{...W?{labels:ee}:{},...N?{format:G}:{},...o.glance?{glance:[...o.glance]}:{},...o.page?{page:o.page}:{}}}:{},...Object.keys(C).length>0?{defaults:C}:{},...e.kinds[p]?.keptInStep?{keptInStep:e.kinds[p].keptInStep}:{},...e.kinds[p]?.derives?{derives:M(e.kinds[p].derives)}:{}})}),B=an(ie,n.computed);function T(p){return B.tryDefinition(p.kind)?.label?.(p)??p.id}let Le=p=>({id:"",kind:p,...X.get(p)}),Pe=[];for(let[p,o]of Object.entries(n.acts??{})){let x=e.acts[p],{title:b,effects:j,guard:S,refusal:v,destructive:L,idempotent:ee,creates:W,connects:$,severs:l,writes:G,writesOther:N,sets:C}=x,_={};for(let c of j)"through"in c&&(_[c.through]=[...new Set([..._[c.through]??[],...Object.keys(c.set)])]);let I=new Map(x.args),P={};for(let[c,A]of I)P[c]=Nn(A,O);let r=[o.on??[]].flat(),i=new Map(x.exprs),z=j.find(c=>"create"in c),J=(c,A,u,w=null)=>{if(q(c)&&"expr"in c)return Y(i.get(c.expr),{graph:u,subject:w,kinds:k,bindings:A,today:a(),...f});let h=me(c);return h===void 0?typeof c=="string"&&c.startsWith("$$")?c.slice(1):c:h==="now"?new Date().toISOString():h==="today"?a():A[h]},de=(c,A)=>{if(!z)return"";let u=n.kinds[z.create].fields,w=Le(z.create),h=[];for(let[R,ce]of Object.entries(z.set??{})){try{w[R]=J(ce,c,A)??w[R]}catch{}let ae=me(ce);ae&&c[ae]!==void 0&&h.push(R)}let V=T(w).trim(),ne=h.filter(R=>w[R]!==!1&&u[R].type!=="text"&&!(/[^]{41}/.test(w[R])||/ .*[.!?]$/.test(w[R])&&!/[ .][A-Z]\w{0,3}\.$/.test(w[R]))&&T({...w,[R]:void 0}).trim()===V).map(R=>w[R]===!0?u[R].label??Je(R):vn(w[R],u[R].format,a(),[],O));return V&&ne.length>0?`${V} (${ne.join(", ")})`:V};Pe.push(fn(p,{input:ve(P),title:b,...o.description?{description:o.description}:{},...o.fromTheOtherEnd?{fromTheOtherEnd:o.fromTheOtherEnd}:{},...I.has(Q)?{subject:{kinds:r.length>0?r:"*",arg:Q}}:{},...L?{destructive:!0}:{},...ee?{idempotent:!0}:{},...JSON.stringify(o).includes('"$me"')?{doneAsMe:!0}:{},...W.length>0?{creates:W}:{},...$.length>0?{connects:$}:{},...l.length>0?{severs:l}:{},writes:G,...Object.keys(N).length>0?{writesOther:N}:{},...Object.keys(_).length>0?{writesLinked:_}:{},...Object.keys(C).length>0?{sets:C}:{},...S?{allowedOn:(c,A)=>{let u=c.getNode(A);if(!u||r.length>0&&!r.includes(u.kind))return!1;try{return Y(S,{graph:c,subject:u,kinds:k,bindings:{},today:a(),...f})===!0}catch{return!1}}}:{},describe:(c,A)=>{let u=typeof c[Q]=="string"?A.getNode(c[Q]):void 0,w=u?T(u):de(c,A);return w?`${b}: ${w}`:b},apply(c,A){let u=c.graph,w=typeof A[Q]=="string"?A[Q]:void 0,h=w?u.getNode(w):void 0;if(w&&!h&&ge(w),h&&r.length>0&&!r.includes(h.kind))throw new U(`"${b}" acts on ${r.join(" or ")}, not on ${Xe(h.kind)}`,"invalid");let V={};for(let[s,m]of Object.entries(A))m!==void 0&&(V[s]=m);if(S&&h){let s;try{s=Y(S,{graph:u,subject:h,kinds:k,bindings:V,today:a(),...f})}catch(m){throw m instanceof oe?new U(`"${b}" could not be judged: ${m.sentence}`):m}if(s!==!0)throw new U(v?se(v,{node:h,kinds:k,graph:u,bindings:V,today:a(),money:O}):`"${b}" is not allowed for ${T(h)} right now`)}let ne=new Map,R=s=>u.has(s)||[...ne.values()].includes(s),ce=new Set,ae=s=>{let m=sn(s);ce.has(m)||(ce.add(m),c.removeEdge(s))},te=(s,m)=>{let g=me(s);if(g==="subject")return w;if(g==="me"){let y=c.me;if(y&&n.kinds[u.getNode(y)?.kind]?.people)return y;throw new U(`"${b}" is done as you, and you have no record here`)}if(ne.has(g))return ne.get(g);try{return J(s,V,u,m??h??null)}catch(y){throw y instanceof oe?new U(`"${b}" could not work out a value: ${y.sentence}`):y}};for(let s of j)if("create"in s){let m=n.kinds[s.create],g=Le(s.create);for(let[H,re]of Object.entries(s.set??{})){let Ge=te(re,void 0);Ge!==void 0&&(g[H]=Ge)}let y=Ln(m),D=String((y&&g[y])??s.create),le=ln(D,s.create,g,(H,re)=>cn(n.policy?.sees,H,re)),F=c.freshId(le?s.create:D,s.create,g);c.addNode({...g,id:F}),s.as&&ne.set(s.as,F)}else if("connect"in s||"sever"in s){let m="connect"in s?s.connect:s.sever,g=String(te(s.from,void 0)??""),y=String(te(s.to,void 0)??"");if(R(g)||ge(g),R(y)||ge(y),"connect"in s){if(E.get(m)?.cardinality==="one")for(let D of u.out(g,m))D.id!==y&&ae({kind:m,from:g,to:D.id});u.out(g,m).some(D=>D.id===y)||c.addEdge({kind:m,from:g,to:y})}else ae({kind:m,from:g,to:y})}else if("through"in s){if(!h)throw new U(`"${b}" carries a change to linked records, and has no record to start from`,"invalid");let g=E.get(s.through)?.from.includes(h.kind)??!0?u.out(h.id,s.through):u.in(h.id,s.through);for(let y of g){let D={};for(let[le,F]of Object.entries(s.set)){let H;if(me(F)==="to")H=y.id;else if(q(F)&&"expr"in F)try{H=Y(i.get(F.expr),{graph:u,subject:h,kinds:k,bindings:{...V,to:y},today:a(),...f})}catch(re){throw re instanceof oe?new U(`"${b}" could not work out a value for ${T(y)}: ${re.sentence}`):re}else H=te(F,void 0);H!==void 0&&(D[le]=H)}Object.keys(D).length>0&&c.patchNode(y.id,D)}}else if("set"in s){let m=String(te(s.target??"$subject",void 0)??""),g=u.getNode(m);!g&&!R(m)&&ge(m);let y={};for(let[D,le]of Object.entries(s.set)){let F=te(le,g);F!==void 0&&(y[D]=F)}Object.keys(y).length>0&&c.patchNode(m,y)}else if("remove"in s){let m=String(te(s.remove,void 0)??"");u.has(m)||ge(m),c.removeNode(m)}else if("replace"in s&&h){let m=A.to;for(let g of s.replace){let y=E.get(g)?.from.includes(h.kind)??!0;for(let D of y?u.out(h.id,g):u.in(h.id,g))g===s.keep&&D.id===m||ae(y?{kind:g,from:h.id,to:D.id}:{kind:g,from:D.id,to:h.id})}}}}))}let Te=[];for(let[p,o]of Object.entries(n.rules??{})){let{title:x,require:b,when:j,says:S,covers:v}=e.rules[p],L=o.repairs??[],ee=($,l,G=a(),N)=>{let C=[],_={graph:$,subject:l,kinds:k,today:G,...f,...N?{linked:N}:{},onUnread:i=>C.push(i)},I,P=[];try{if(j&&Y(j,_)!==!0)return[];if(v&&l?(P=On($,l,v),I=P.length===0):I=Y(b,_)===!0,!I&&C.length>0)throw new oe(`it reads ${kn(C[0])}`,0)}catch(i){throw i instanceof bn?new dn(i.sentence):i instanceof oe?new Error(i.sentence):i}if(I)return[];let r=L.flatMap(i=>{let z=n.acts?.[i.act],J={},de=l&&z?.on&&z.fromTheOtherEnd&&![z.on].flat().includes(l.kind)?Fn(e.acts[i.act].args,l.kind):void 0;de?J[de]=l.id:l&&(z?.on||/^(edit|remove|archive|unarchive|merge|skip|detach|split)-/.test(i.act))&&(J[Q]=l.id);for(let[u,w]of Object.entries(i.args??{}))J[u]=me(w)==="subject"?l?.id:w;let A=(z?e.acts[i.act].args:[]).filter(([u,w])=>w.required&&J[u]===void 0).map(([u])=>u);return[{mutation:i.act,label:i.label??(de?z.fromTheOtherEnd:z?.title)??i.act.replace(/-/g," "),args:J,...A.length>0?{missing:A}:{}}]});return v&&l?P.map(i=>({invariant:p,subjectId:l.id,label:x,message:S?se(S,{node:l,kinds:k,graph:$,today:G,money:O,bindings:{[l.kind]:l,[i.kind]:i}}):`${T(l)}: ${x} \u2014 ${T(i)}`,nodeIds:[l.id,i.id],repairs:r})):[{invariant:p,...l?{subjectId:l.id}:{},label:x,message:S?se(S,{node:l,kinds:k,graph:$,today:G,money:O}):l?`${T(l)}: ${x}`:x,nodeIds:l?[l.id]:[],repairs:r}]},W={label:x,shape:{over:o.over,require:b,...v?{covers:v}:{},when:j,says:S,declared:n.kinds,money:O,kinds:k,today:a},judgment:{...o.require?{require:o.require}:{},...o.covers?{covers:o.covers}:{},...o.when?{when:o.when}:{},...o.says?{says:o.says}:{}},...o.description?{description:o.description}:{},...L.length>0?{repairs:L.map($=>$.act)}:{}};Te.push(o.over==="graph"?Se(p,{scope:"graph",...W,evaluate:({graph:$,today:l,context:G})=>ee($,null,l,G?.linked)}):Se(p,{scope:{kind:o.over},...W,evaluate:({graph:$,subject:l,today:G,context:N})=>ee($,l,G,N?.linked)}))}let Me=n.policy&&{...n.policy,...n.roles?{roles:n.roles}:{}},be={name:n.name,schema:B,mutations:Pe,invariants:Te,...Me?{policy:Me}:{},...e.brand?{brand:e.brand}:{},...n.modules?{modules:n.modules}:{},...n.lenses?{lenses:n.lenses}:{},...n.pages?{pages:n.pages}:{},...n.settings?{settings:n.settings}:{},...n.connections?{connections:n.connections}:{},...n.forms?{forms:n.forms}:{},...n.publishing?{publishing:n.publishing}:{},...n.tidying?{tidying:n.tidying}:{},...n.purpose?{purpose:n.purpose}:{},...e.viewSpecs?{viewSpecs:e.viewSpecs}:{},...e.home?{home:e.home}:{},version:n.version??1};return Sn(be,n),Cn.set(be,e),{ok:!0,app:be,document:n,findings:e.findings,sights:n.policy?.sees,kinds:k}}function Vn(e,d,n){let t=d||e.format==="duration",a=e.format==="money"||e.format==="percent"||!e.format&&e.unit!==void 0;if(!(!t&&!a))return{...e,...t?{as:"duration"}:{},...a?{amount:{...n,...e.format?{format:e.format}:{},...e.unit?{unit:e.unit}:{},...e.places===0?{places:0}:{}}}:{}}}export{q as a,xn as b,Zn as c,Qn as d,$n as e,Q as f,me as g,Ln as h,xt as i,In as j};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as X}from"./chunk.JEQ6CA5M.js";import"./chunk.PYGNO2AV.js";import"./chunk.3HFBHLXC.js";import{G as ce,Y,ga as N,ja as _}from"./chunk.CUA7F3YJ.js";import"./chunk.SDO3U72B.js";import{Ee as U,Jb as R}from"./chunk.IUVRJDL3.js";import"./chunk.FQLNBIQ5.js";import{b as O}from"./chunk.AJZBJBMO.js";var u=O(ce(),1);function M(e,t,s=!1){if(e<t.at||e===t.at&&s)return e;let i=t.at+t.removed.length;return e>=i?e+t.inserted.length-t.removed.length:s?t.at:t.at+t.inserted.length}var G=e=>e>=55296&&e<=56319,V=e=>e>=56320&&e<=57343;function q(e,t,s){let i=Math.min(e.length,t.length),n=0,l=Math.max(0,Math.min(i,t.length-s));for(;n<l&&e.charCodeAt(e.length-1-n)===t.charCodeAt(t.length-1-n);)n++;let r=0;for(;r<i-n&&e.charCodeAt(r)===t.charCodeAt(r);)r++;return r>0&&G(e.charCodeAt(r-1))&&r--,n>0&&V(e.charCodeAt(e.length-n))&&n--,{at:r,removed:e.slice(r,e.length-n),inserted:t.slice(r,t.length-n)}}function B(e,t){let s=Math.min(e.length,t.length),i=0;for(;i<s&&e.charCodeAt(i)===t.charCodeAt(i);)i++;i>0&&G(e.charCodeAt(i-1))&&i--;let n=0;for(;n<s-i&&e.charCodeAt(e.length-1-n)===t.charCodeAt(t.length-1-n);)n++;return n>0&&V(e.charCodeAt(e.length-n))&&n--,{at:i,removed:e.slice(i,e.length-n),inserted:t.slice(i,t.length-n)}}function Z(e,t){let s=c=>c.at+c.removed.length;if(s(e)<t.at)return e;if(e.at>s(t))return{...e,at:e.at+t.inserted.length-t.removed.length};let i=Math.min(e.at,t.at),n=s(e)-s(t),l=e.removed.slice(0,t.at-i)+t.inserted+(n>0?e.removed.slice(e.removed.length-n):""),r=t.at<=e.at?t.inserted+e.inserted:e.inserted+t.inserted,d=B(l,r);return{...d,at:i+d.at}}function I(e,t){let s=M(e.start,t,!0),i=e.end===e.start?s:M(e.end,t);return{start:s,end:Math.max(s,i)}}function le(e,t){let{kind:s,id:i,session:n}=e.author,l=`${s}:${i??""}:`;return t.startsWith(l)&&(!n||t.slice(l.length)===n)}function J(e,t,s,i){let n=e.anchor,l=e.head;for(let d of s)if(!(d.seq<e.rev||le(d,t)))for(let c of d.primitives)c.op!=="splice-text"||c.id!==e.node||c.field!==e.field||(n=M(n,c),l=M(l,c));let r=d=>Math.max(0,Math.min(i,d));return{start:r(n),end:r(l)}}var W=(e,t,s)=>e.ops.length>0&&e.ops.every(i=>{let n=i.mutation?.args;return i.mutation?.name===R&&n?.node===t&&n.field===s}),de=(e,t,s,i)=>t.ops.length>0&&t.ops.every(n=>n.undoes!==void 0)&&e.batches().some(n=>t.ops.some(l=>l.undoes===n.id||l.undoes===n.ops[0]?.id)&&W(n,s,i)),Q=(e,t)=>e.author.kind==="human"&&(t?.id===void 0||e.author.id===void 0||e.author.id===t.id);function j(e,t,s,i){let n=e.batches();for(let l=n.length-1;l>=0;l--){let r=n[l];if(!(!Q(r,t)||r.undone||!W(r,s,i))&&e.canUndo(r.id).ok)return r.id}}function ee(e,t,s,i){let n=e.batches();for(let l=n.length-1;l>=0;l--){let r=n[l];if(Q(r,t)){if(W(r,s,i))return;if(de(e,r,s,i))return r.undone?void 0:r.id}}}var p=O(Y(),1);function ue(e){let{store:t}=N(),{live:s,nodeId:i,field:n}=e,[l,r]=(0,u.useState)(null);return(0,u.useEffect)(()=>{let d=!0;return s.typing(i,n).then(c=>d&&r(c)),()=>{d=!1}},[i,n]),l&&!t.collaborative(i,n)?(0,p.jsx)(p.Fragment,{children:e.writtenWhole}):(0,p.jsx)(pe,{...e,typing:l})}function pe({nodeId:e,field:t,label:s,markdown:i,live:n,onDone:l,typing:r}){let{store:d,principal:c}=N(),m=_(e),f=ne(m?.[t]),[T,ie]=(0,u.useState)(!1),v=(0,u.useRef)(null),D=(0,u.useRef)(f),E=(0,u.useRef)(!1),H=(0,u.useRef)(n);H.current=n;let K=()=>ne(d.graph.getNode(e)?.[t]),b=!r||d.permits({name:R,args:{node:e,field:t,at:0,remove:0,insert:""}},c).ok;(0,u.useEffect)(()=>v.current?.focus(),[T,r]);let C=(0,u.useRef)(void 0),k=()=>{C.current===void 0&&(C.current=setTimeout(()=>{C.current=void 0;let o=v.current;if(!o||o.ownerDocument.activeElement!==o)return;let a=o.selectionDirection==="backward";H.current.sayCaret({node:e,field:t,anchor:a?o.selectionEnd:o.selectionStart,head:a?o.selectionStart:o.selectionEnd,rev:d.log.length})},ge))};(0,u.useEffect)(()=>()=>{clearTimeout(C.current),H.current.sayCaret(null)},[]);let F=o=>{let a=v.current;if(a){if(a.value!==o){let h=I({start:a.selectionStart,end:a.selectionEnd},B(a.value,o)),g=a.selectionDirection??"none";a.value=o,a.setSelectionRange(h.start,h.end,g)}D.current=o}},$=()=>{let o=v.current;if(!o||!r||!b||E.current)return;let a=D.current,h=K(),g=q(a,o.value,o.selectionEnd);if(g.removed===""&&g.inserted==="")return F(h);let y=a===h?g:Z(g,B(a,h));try{r.splice(y.at,y.removed.length,y.inserted)}catch{}let w=K();if(o.value!==w){o.value=w;let S=Math.min(w.length,y.at+y.inserted.length);o.setSelectionRange(S,S)}D.current=w,k()};(0,u.useLayoutEffect)(()=>{E.current||F(f)},[f]);let ae=async o=>{if(!r)return;r.flush();for(let h=0;r.waiting()>0&&h<100;h++)await new Promise(g=>setTimeout(g,30));let a=o?ee(d,c,e,t):j(d,c,e,t);if(a)try{o?d.redo(a,{author:c}):d.undo(a,{author:c})}catch{}},x=o=>{r?.flush(),n.sayCaret(null),l(o)},A=(0,u.useRef)(void 0);(0,u.useEffect)(()=>()=>A.current?.(),[]);let se=o=>{A.current?.();let a=o.ownerDocument,h=v.current?.closest("[data-graview-live]"),g=P=>{let L=P.target;if(L instanceof Node&&h?.contains(L))return S();L instanceof Element&&L.closest(te)||(S(),x(!0))},y=()=>{let P=a.activeElement;P!==null&&P!==a.body||o.isConnected&&fe(o)||(S(),v.current?.focus({preventScroll:!0}))},w=new MutationObserver(y);w.observe(a.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["open","hidden"]}),a.addEventListener("focusin",g),a.addEventListener("toggle",y,!0);let S=()=>{A.current=void 0,w.disconnect(),a.removeEventListener("focusin",g),a.removeEventListener("toggle",y,!0)};A.current=S},z=[...n.who.values()].filter(o=>o.caret?.node===e&&o.caret.field===t);return(0,p.jsxs)("div",{style:{display:"grid",gap:8,minWidth:0},"data-graview-live":t,children:[T?(0,p.jsx)("div",{"data-graview-preview":t,"aria-label":`${s}, as it will read`,role:"region",style:ye,children:(0,p.jsx)(X,{text:f,markdown:!0})}):(0,p.jsxs)("div",{style:{position:"relative",minWidth:0},children:[(0,p.jsx)("textarea",{ref:v,"aria-label":s,"data-graview-field":t,defaultValue:f,readOnly:!r||!b,rows:3,onInput:$,onCompositionStart:()=>{E.current=!0},onCompositionEnd:()=>{E.current=!1,$()},onSelect:k,onFocus:k,onPointerDown:()=>r?.flush(),onKeyDown:o=>{let a=o.key;a==="Escape"?(o.preventDefault(),x(!1)):(o.metaKey||o.ctrlKey)&&!o.altKey&&a.toLowerCase()==="z"?(o.preventDefault(),ae(o.shiftKey)):(o.metaKey||o.ctrlKey)&&a==="Enter"?(o.preventDefault(),x(!1)):(a==="Enter"||me.has(a))&&r?.flush()},onKeyUp:k,onBlur:o=>{r?.flush(),n.sayCaret(null);let a=o.relatedTarget;if(a instanceof Node&&o.currentTarget.closest("[data-graview-live]")?.contains(a))return;let h=a instanceof Element?a.closest(te):null;if(h)return se(h);x(!0)},style:ve}),z.length>0?(0,p.jsx)(he,{text:f,others:z,area:v,log:d.log.all()}):null]}),(0,p.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:8},children:[(0,p.jsx)("button",{type:"button",onClick:()=>x(!1),style:re,children:"Done"}),i?(0,p.jsx)("button",{type:"button","aria-pressed":T,onClick:()=>ie(!T),style:re,children:T?"Write":"Preview"}):null,(0,p.jsx)("span",{style:{fontSize:"0.75rem",color:"var(--graview-ink-faint)"},...b?{}:{"data-graview-readonly":""},children:b?"Saved as you type \xB7 Ctrl or \u2318 Z takes back your typing":`Read only: the ${s.toLowerCase()} can't be changed here now`})]})]})}function he({text:e,others:t,area:s,log:i}){let n=(0,u.useRef)(null);(0,u.useLayoutEffect)(()=>{let c=s.current,m=n.current;if(!c||!m)return;let f=()=>{m.scrollTop=c.scrollTop};return f(),c.addEventListener("scroll",f),()=>c.removeEventListener("scroll",f)});let l=t.map(c=>({one:c,at:J(c.caret,c.participant,i,e.length).end})).sort((c,m)=>c.at-m.at),r=[],d=0;for(let{one:c,at:m}of l){r.push(e.slice(d,m)),d=m;let f=U(c)||"Somebody";r.push((0,p.jsx)("span",{"data-graview-caret":c.participant,title:`${f} is typing here`,style:{borderLeft:`2px solid hsl(${Math.round(c.hue)} 55% 52%)`,marginLeft:-1,marginRight:-1,pointerEvents:"auto"}},c.participant))}return r.push(`${e.slice(d)}\u200B`),(0,p.jsx)("div",{ref:n,"aria-hidden":"true",style:we,children:r})}var te='[data-graview-overlay], dialog, [role="dialog"], [role="alertdialog"], [popover]',fe=e=>{if(e.hasAttribute("hidden")||e instanceof HTMLDialogElement&&!e.open)return!1;if(e.hasAttribute("popover"))try{return e.matches(":popover-open")}catch{}return!0},ge=120,ne=e=>typeof e=="string"?e:"",me=new Set(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End","PageUp","PageDown"]),ye={minHeight:"7.5em",padding:"8px 10px",border:"1px dashed var(--graview-edge-bright)",borderRadius:6,lineHeight:1.6,minWidth:0},re={font:"inherit",fontSize:"0.8125rem",minHeight:28,padding:"2px 12px"},oe={font:"inherit",lineHeight:1.5,width:"100%",boxSizing:"border-box",minHeight:"7.5em",padding:"8px 10px",borderRadius:6},ve={...oe,resize:"vertical",fieldSizing:"content",color:"var(--graview-ink)",background:"var(--graview-panel, transparent)",border:"1px solid var(--graview-edge-bright)"},we={...oe,position:"absolute",inset:0,height:"100%",border:"1px solid transparent",color:"transparent",whiteSpace:"pre-wrap",overflowWrap:"break-word",overflow:"hidden",pointerEvents:"none"};export{ue as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{t as P}from"./chunk.RP6C2IUM.js";import{G as M,Oa as S,T as w,Y as y,ga as m,ha as I,s as b,w as T,x as A}from"./chunk.CUA7F3YJ.js";import{a as p}from"./chunk.SDO3U72B.js";import{b as f}from"./chunk.AJZBJBMO.js";var C=f(M(),1),h=f(y(),1),x=S(p(()=>(__graviewPreload(import.meta.url,["./chunk.X7HMTN3Z.js","./chunk.YTRUZ56A.js","./chunk.MYR36HW4.js","./chunk.PYGNO2AV.js","./chunk.3HFBHLXC.js","./chunk.CUA7F3YJ.js","./chunk.SDO3U72B.js","./chunk.IUVRJDL3.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.3QPMFUMV.js")))),O=x.part((e,n)=>(0,h.jsx)(e.Timeline,{...n}),{what:"The timeline"}),q=()=>x.prefetch();function K({face:e}){return w()?.open?(0,h.jsx)(C.Suspense,{fallback:null,children:(0,h.jsx)(O,{face:e})}):null}var i=f(M(),1),u=f(y(),1),v=new WeakMap,D=e=>{let n=v.get(e);return n||v.set(e,n={ask:null,doors:[],listeners:new Set}),n},k=e=>{for(let n of e.listeners)n()};function g(e,n){let t=D(e);t.ask=n,k(t)}var N=S(p(()=>(__graviewPreload(import.meta.url,["./chunk.TD2V74XU.js","./chunk.MYR36HW4.js","./chunk.LZNHTROY.js","./chunk.36FKQJFM.js","./chunk.RHV73CBA.js","./chunk.PYGNO2AV.js","./chunk.3HFBHLXC.js","./chunk.CUA7F3YJ.js","./chunk.SDO3U72B.js","./chunk.IUVRJDL3.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.ZIGW5VOT.js")))),B=N.part((e,n)=>{let t=e.NotifySheet;return(0,u.jsx)(t,{...n})},{what:"Notify me"}),W=N.part((e,n)=>{let t=e.NotifiedList;return(0,u.jsx)(t,{...n})},{quiet:!0}),E=(e,n)=>n===void 0&&(e.onBehalfOf??e).id!==void 0;function F(e,n,t){let c=d=>t.tryDefinition(d)?.noun??d.replace(/[-_]+/g," "),o=e.on!==void 0?e.on:e.about.length===1?e.about[0]:void 0;if(e.act!==void 0){let d=o!==void 0&&n(o)!==void 0?o:void 0;return{label:"Notify me when someone does this\u2026",choices:[{on:"act",act:e.act,...d!==void 0?{record:d}:{}},...d!==void 0?[{on:"act",act:e.act}]:[]]}}if(o===void 0)return null;let s=n(o);if(s!==void 0)return{label:"Notify me when this changes\u2026",choices:[{on:"changed",record:o},{on:"act",record:o},{on:"reaches",kind:s,condition:"",record:o}]};let r=b(o)!==null?[b(o)]:T(o)?A(o):[];if(r.length!==1||!t.kinds.includes(r[0]))return null;let l=r[0],a=c(l);return{label:`Notify me when ${/^[aeiou]/i.test(a)?"an":"a"} ${a} is added\u2026`,choices:[{on:"created",kind:l},{on:"changed",kind:l},{on:"reaches",kind:l,condition:""}]}}function L(){let{store:e,principal:n,subscriptions:t,signIn:c}=m(),o=E(n,c);return(0,i.useMemo)(()=>o?s=>{let r=F(s,a=>e.graph.getNode(a)?.kind,e.schema);return r?{id:"notify",items:[{id:"notify-me",label:r.label,run:()=>g(t,{choices:r.choices,returnTo:s.element??null})}],prepare:()=>N.prefetch()}:null}:null,[o,e,t])}var z=[];function U({children:e}){let n=L(),t=(0,i.useMemo)(()=>n?[n]:z,[n]);return(0,u.jsx)(P,{sections:t,children:e})}function V(){let{subscriptions:e}=m(),n=(0,i.useId)(),t=D(e);(0,i.useEffect)(()=>(t.doors.push(n),k(t),()=>{t.doors.splice(t.doors.indexOf(n),1),k(t)}),[t,n]);let c=(0,i.useMemo)(()=>r=>(t.listeners.add(r),()=>void t.listeners.delete(r)),[t]),o=(0,i.useSyncExternalStore)(c,()=>t.ask,()=>null),s=(0,i.useSyncExternalStore)(c,()=>t.doors[0]===n,()=>!1);return!o||!s?null:(0,u.jsx)(i.Suspense,{fallback:null,children:(0,u.jsx)(B,{ask:o,close:()=>g(e,null)})})}function X({choices:e,label:n="Notify me",style:t,className:c,testId:o="notify-me"}){let{principal:s,subscriptions:r,signIn:l}=m();return E(s,l)?(0,u.jsx)("button",{type:"button","data-testid":o,className:c,onClick:a=>g(r,{choices:e,returnTo:a.currentTarget}),style:t,children:n}):null}function G(){let e=I(),n=e?.subscriptions,t=e?(e.principal.onBehalfOf??e.principal).id:void 0,[c,o]=(0,i.useState)(0);return(0,i.useEffect)(()=>{if(t===void 0||!n)return;let s=!0,r=()=>void Promise.resolve(n.list(t)).then(a=>s&&o(a.length),()=>s&&o(0));r();let l=n.onChange?.(r);return()=>{s=!1,l?.()}},[n,t]),c}function Y({style:e}){return G()===0?null:(0,u.jsx)(i.Suspense,{fallback:null,children:(0,u.jsx)(W,{...e?{style:e}:{}})})}export{q as a,K as b,L as c,U as d,V as e,X as f,G as g,Y as h};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as c,b as d,c as e,d as f,e as g,f as h,g as i,h as j,i as k,j as l,k as m,l as n,m as o,n as p}from"./chunk.4BSEYZMS.js";import{a,b}from"./chunk.KV3N6VRG.js";import"./chunk.FUTSLXWN.js";import"./chunk.MZSWWMX6.js";import"./chunk.ZGJUCVT5.js";import"./chunk.CVVNHQPO.js";import"./chunk.YIDNZTON.js";import"./chunk.QILGAV7H.js";import"./chunk.I6HIVTXU.js";import"./chunk.PYGNO2AV.js";import"./chunk.3HFBHLXC.js";import"./chunk.CUA7F3YJ.js";import"./chunk.SDO3U72B.js";import"./chunk.IUVRJDL3.js";import"./chunk.FQLNBIQ5.js";import"./chunk.AJZBJBMO.js";export{j as ARRANGE_NARROW,o as ArrangeBar,e as CHIP_FIELDS,d as MANY_AT_THE_FAR_END,c as TYPED_FROM,p as arrangementCaption,a as arrangementOf,i as chipOffers,m as directionWords,g as farCount,f as farCounts,l as inSentence,h as offeredFilters,n as preloadArrangeLists,k as sayCondition,b as withArrangement};
|