graview 0.1.70 → 0.1.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/preview/chunk.23DATB5Y.js +1 -0
- package/dist/preview/chunk.2INDKSJI.js +1 -0
- package/dist/preview/chunk.3CLTABGP.js +1 -0
- package/dist/preview/{chunk.4O3STSC4.js → chunk.3RRK6UTN.js} +1 -1
- package/dist/preview/chunk.45HUV56Z.js +1 -0
- package/dist/preview/chunk.4HU2ILFY.js +1 -0
- package/dist/preview/{chunk.M7DJJRFH.js → chunk.4LWWXIM4.js} +1 -1
- package/dist/preview/chunk.4O64QV2Y.js +1 -0
- package/dist/preview/{chunk.KP7HUXH5.js → chunk.4QMAYVPU.js} +1 -1
- package/dist/preview/chunk.4UDST6IF.js +1 -0
- package/dist/preview/{chunk.7TZXDPPO.js → chunk.4YZ2A6SJ.js} +3 -3
- package/dist/preview/{chunk.PAIBRJVZ.js → chunk.4ZEHLUXV.js} +1 -1
- package/dist/preview/{chunk.I7CSRZC2.js → chunk.5EQRIZ6I.js} +1 -1
- package/dist/preview/chunk.5OS4SYHE.js +1 -0
- package/dist/preview/{chunk.ZIGW5VOT.js → chunk.5PQV7GFE.js} +1 -1
- package/dist/preview/{chunk.SSHEFQ4R.js → chunk.5WCSQFS5.js} +1 -1
- package/dist/preview/{chunk.RJ7UV3XI.js → chunk.64K5ELSQ.js} +1 -1
- package/dist/preview/{chunk.2T24FYAO.js → chunk.67S2UWBT.js} +1 -1
- package/dist/preview/{chunk.FXCKKVT5.js → chunk.6A3KTD66.js} +1 -1
- package/dist/preview/chunk.6BBUTKFC.js +23 -0
- package/dist/preview/chunk.6IMRCKB4.js +1 -0
- package/dist/preview/chunk.6L6RUOSF.js +5 -0
- package/dist/preview/{chunk.ZGJUCVT5.js → chunk.6TBQV3NO.js} +1 -1
- package/dist/preview/chunk.6ZRVVRDQ.js +1 -0
- package/dist/preview/{chunk.4VTUC5TF.js → chunk.7FI75ZVE.js} +1 -1
- package/dist/preview/{chunk.NKUNCQB3.js → chunk.7KX36ENH.js} +1 -1
- package/dist/preview/{chunk.JPJHM62B.js → chunk.7LPHWJB4.js} +1 -1
- package/dist/preview/chunk.7MDGPTYF.js +1 -0
- package/dist/preview/{chunk.JEQ6CA5M.js → chunk.7PWLRRUS.js} +2 -2
- package/dist/preview/{chunk.YBQUP3KE.js → chunk.7TACFS7Q.js} +1 -1
- package/dist/preview/{chunk.DIVANC3G.js → chunk.7THS3DLZ.js} +1 -1
- package/dist/preview/{chunk.5W7EGQCQ.js → chunk.7XGU6KVF.js} +2 -2
- package/dist/preview/chunk.7ZLCA3WK.js +1 -0
- package/dist/preview/{chunk.4BSEYZMS.js → chunk.ARGEGV5T.js} +1 -1
- package/dist/preview/{chunk.3KF5RYPW.js → chunk.BSWR5SGX.js} +1 -1
- package/dist/preview/{chunk.BBMX3IIO.js → chunk.BWMPC7LK.js} +1 -1
- package/dist/preview/{chunk.55C7WO4X.js → chunk.CEJIH3CN.js} +1 -1
- package/dist/preview/{chunk.F5756PXX.js → chunk.CEOQY5KS.js} +2 -2
- package/dist/preview/{chunk.NZFO6BM3.js → chunk.CGRX6SDE.js} +1 -1
- package/dist/preview/{chunk.C67TMA4U.js → chunk.CPK6CYKN.js} +1 -1
- package/dist/preview/{chunk.T552MHMU.js → chunk.CVN2XFMF.js} +1 -1
- package/dist/preview/{chunk.MGG5DH2S.js → chunk.D4F6QX5L.js} +1 -1
- package/dist/preview/{chunk.M3HLZX6Q.js → chunk.D6ODKMOV.js} +1 -1
- package/dist/preview/{chunk.RECTEAG4.js → chunk.DDSAFU3B.js} +1 -1
- package/dist/preview/{chunk.UJF6YTEO.js → chunk.DG3YNOH3.js} +1 -1
- package/dist/preview/chunk.DGYWNM5U.js +1 -0
- package/dist/preview/{chunk.NBB5ALVJ.js → chunk.DHO3QZYK.js} +1 -1
- package/dist/preview/{chunk.4QBW46XV.js → chunk.DJGZOPAS.js} +1 -1
- package/dist/preview/{chunk.2MWEYNVH.js → chunk.DX7RGK5G.js} +1 -1
- package/dist/preview/{chunk.CZI6J5CE.js → chunk.EA2KYBBR.js} +1 -1
- package/dist/preview/{chunk.DWMFLLJO.js → chunk.EEGVI266.js} +1 -1
- package/dist/preview/{chunk.BQWMHHAZ.js → chunk.EHLV3LND.js} +2 -2
- package/dist/preview/{chunk.3MPLUSVY.js → chunk.EJC7ACZT.js} +1 -1
- package/dist/preview/{chunk.6NYSB6OZ.js → chunk.EJIQDMLU.js} +1 -1
- package/dist/preview/{chunk.QQUZ5RTQ.js → chunk.EOSN5DWW.js} +1 -1
- package/dist/preview/{chunk.2QALBEWP.js → chunk.EPSYX2SF.js} +1 -1
- package/dist/preview/chunk.EUXAIG73.js +1 -0
- package/dist/preview/{chunk.S4QSZRKH.js → chunk.EZQK23AB.js} +1 -1
- package/dist/preview/{chunk.ZTHZHBVN.js → chunk.F5O3HR7X.js} +1 -1
- package/dist/preview/chunk.F6MY6WJ4.js +1 -0
- package/dist/preview/{chunk.UVMHC6VM.js → chunk.F7KVEWFH.js} +1 -1
- package/dist/preview/{chunk.FJXKQZZS.js → chunk.FIUPDGUZ.js} +1 -1
- package/dist/preview/chunk.FNSVGSZI.js +1 -0
- package/dist/preview/chunk.FOHZPYUV.js +1 -0
- package/dist/preview/chunk.FW6M6GIU.js +32 -0
- package/dist/preview/{chunk.IJVR7ZL7.js → chunk.G5AF5IXL.js} +1 -1
- package/dist/preview/{chunk.SCN6IYDG.js → chunk.G767NLBH.js} +1 -1
- package/dist/preview/{chunk.X7HMTN3Z.js → chunk.GFBE4VNT.js} +1 -1
- package/dist/preview/{chunk.U5Q7EVZQ.js → chunk.GFOZVQBQ.js} +1 -1
- package/dist/preview/{chunk.KJAOJTZZ.js → chunk.GKYJQE5A.js} +1 -1
- package/dist/preview/{chunk.YCMMATFK.js → chunk.GOVRX2YX.js} +1 -1
- package/dist/preview/{chunk.U3CV227I.js → chunk.H33XWGAY.js} +1 -1
- package/dist/preview/{chunk.DGDOZHYK.js → chunk.H4BPTMED.js} +1 -1
- package/dist/preview/chunk.HLKDYI6J.js +1 -0
- package/dist/preview/{chunk.C4LC2UEU.js → chunk.HPFEYMGP.js} +1 -1
- package/dist/preview/{chunk.CLJKQLK2.js → chunk.HT35PAHI.js} +2 -2
- package/dist/preview/{chunk.6VG2LCES.js → chunk.HXRHEPPJ.js} +1 -1
- package/dist/preview/{chunk.LZNHTROY.js → chunk.IXYG65TM.js} +1 -1
- package/dist/preview/chunk.IZDB777E.js +1 -0
- package/dist/preview/{chunk.ZQSV5XVB.js → chunk.JAPTTM6Y.js} +1 -1
- package/dist/preview/{chunk.CUA7F3YJ.js → chunk.JCKIJSW7.js} +1 -1
- package/dist/preview/{chunk.WAIIXXVI.js → chunk.JLNTE5CH.js} +2 -2
- package/dist/preview/{chunk.5FQHZVE3.js → chunk.JNK5WBSU.js} +1 -1
- package/dist/preview/chunk.JREA2XDG.js +1 -0
- package/dist/preview/{chunk.CHG522KL.js → chunk.KBJ3UUER.js} +1 -1
- package/dist/preview/{chunk.VBHV4TLG.js → chunk.KHRS2SKB.js} +1 -1
- package/dist/preview/{chunk.CZUUFO6A.js → chunk.KJPLX72N.js} +1 -1
- package/dist/preview/{chunk.7LAXSQQY.js → chunk.KZUHXOZU.js} +2 -2
- package/dist/preview/{chunk.R65YX332.js → chunk.L3MLGFIS.js} +1 -1
- package/dist/preview/{chunk.RXUL6P7Y.js → chunk.L6P55HFW.js} +1 -1
- package/dist/preview/{chunk.J4NY2K2A.js → chunk.LDWWUKKX.js} +1 -1
- package/dist/preview/{chunk.RIP2SAQ5.js → chunk.LHCGC3K6.js} +1 -1
- package/dist/preview/{chunk.IQCMV5WD.js → chunk.LNKY6MT4.js} +1 -1
- package/dist/preview/chunk.LQ5J6YQW.js +1 -0
- package/dist/preview/{chunk.O2XPLDMM.js → chunk.MEAUTBVM.js} +1 -1
- package/dist/preview/chunk.MEBKTW7H.js +17 -0
- package/dist/preview/{chunk.K6EKSURO.js → chunk.MFMC35ET.js} +1 -1
- package/dist/preview/chunk.MJ4T6YXI.js +1 -0
- package/dist/preview/{chunk.SWY6DIE4.js → chunk.MKJV3BM5.js} +3 -3
- package/dist/preview/chunk.ML4X7VVK.js +1 -0
- package/dist/preview/{chunk.ZOSTOVXR.js → chunk.MM7MLBGB.js} +1 -1
- package/dist/preview/{chunk.NCBUECIW.js → chunk.MQNW3O67.js} +1 -1
- package/dist/preview/{chunk.CVVNHQPO.js → chunk.MT252WP4.js} +1 -1
- package/dist/preview/{chunk.VKQONZKR.js → chunk.MWWNKM3I.js} +1 -1
- package/dist/preview/chunk.N3MXLORL.js +3 -0
- package/dist/preview/{chunk.SUYYDJGZ.js → chunk.NH3VXTGX.js} +1 -1
- package/dist/preview/{chunk.IRPMGHZN.js → chunk.NI4OPHTL.js} +1 -1
- package/dist/preview/chunk.NNGG7RCO.js +1 -0
- package/dist/preview/{chunk.MZSWWMX6.js → chunk.NXHEOHRR.js} +1 -1
- package/dist/preview/{chunk.A5ENJJZN.js → chunk.O5RPSUXV.js} +1 -1
- package/dist/preview/{chunk.CM7EDQ4E.js → chunk.OKHXXIMN.js} +1 -1
- package/dist/preview/chunk.OOQG2AEF.js +1 -0
- package/dist/preview/{chunk.MYR36HW4.js → chunk.OPMGQS5J.js} +1 -1
- package/dist/preview/{chunk.TUVPQLFL.js → chunk.OUF2QFZL.js} +1 -1
- package/dist/preview/{chunk.6QMRDSTD.js → chunk.OVSKPBPS.js} +1 -1
- package/dist/preview/chunk.OYMN3IFX.js +1 -0
- package/dist/preview/{chunk.3HFBHLXC.js → chunk.P43LPXXJ.js} +1 -1
- package/dist/preview/{chunk.FSZQTX3K.js → chunk.PGT4ZQDG.js} +4 -4
- package/dist/preview/{chunk.5IM2X3VT.js → chunk.PQTXM4VY.js} +1 -1
- package/dist/preview/{chunk.U2DZE7A5.js → chunk.Q6GEPVQ7.js} +1 -1
- package/dist/preview/{chunk.HMV4ILAC.js → chunk.QDDDKEBH.js} +1 -1
- package/dist/preview/{chunk.6KYTCEIH.js → chunk.QJJWAYHB.js} +1 -1
- package/dist/preview/{chunk.QAERSZVB.js → chunk.QK4QZVQG.js} +1 -1
- package/dist/preview/{chunk.XAN7QXMQ.js → chunk.QKRQPUCE.js} +1 -1
- package/dist/preview/{chunk.I3ADXJQW.js → chunk.QNWGDG2Z.js} +1 -1
- package/dist/preview/{chunk.NZ5TJKPT.js → chunk.QVBP4UZG.js} +2 -2
- package/dist/preview/{chunk.YTRUZ56A.js → chunk.RDUGUC7R.js} +1 -1
- package/dist/preview/{chunk.TVNY7F64.js → chunk.RHIP2UYE.js} +1 -1
- package/dist/preview/{chunk.PYGNO2AV.js → chunk.RJ7VSWTA.js} +3 -3
- package/dist/preview/{chunk.LEZGBHPZ.js → chunk.RO3D2RNP.js} +1 -1
- package/dist/preview/{chunk.KOVTQCHX.js → chunk.S2BMI23H.js} +1 -1
- package/dist/preview/{chunk.XJ4JYROM.js → chunk.SPJ34VHA.js} +1 -1
- package/dist/preview/{chunk.LZ3HO3HM.js → chunk.T6KOL7TW.js} +1 -1
- package/dist/preview/{chunk.BJ3G7J2Z.js → chunk.T6UJEXFL.js} +3 -2
- package/dist/preview/{chunk.T4QRIJE4.js → chunk.TBEKEHFS.js} +1 -1
- package/dist/preview/chunk.TO3ZKCA2.js +1 -0
- package/dist/preview/{chunk.QILGAV7H.js → chunk.TQ3MNB6K.js} +1 -1
- package/dist/preview/{chunk.F5XWYO5W.js → chunk.TRP66PHK.js} +1 -1
- package/dist/preview/{chunk.QODVFVWE.js → chunk.TSZ2S3VG.js} +1 -1
- package/dist/preview/{chunk.DWPM7AWA.js → chunk.TTM5GQ2U.js} +1 -1
- package/dist/preview/chunk.TUBY6SV3.js +1 -0
- package/dist/preview/{chunk.7QWGIGHM.js → chunk.U5KJQFAP.js} +1 -1
- package/dist/preview/chunk.U6V4KZF5.js +1 -0
- package/dist/preview/chunk.UJ7RTNT4.js +1 -0
- package/dist/preview/{chunk.MR776WQ2.js → chunk.UQZ2P6KD.js} +1 -1
- package/dist/preview/{chunk.OXXZGPJZ.js → chunk.UZKBFI52.js} +1 -1
- package/dist/preview/{chunk.HIJ72QX6.js → chunk.V5JB5UJS.js} +1 -1
- package/dist/preview/{chunk.3I2SGKKF.js → chunk.VDFQFLTU.js} +1 -1
- package/dist/preview/{chunk.I6HIVTXU.js → chunk.VGYG2IBZ.js} +1 -1
- package/dist/preview/chunk.VICBF3MQ.js +2 -0
- package/dist/preview/{chunk.TD2V74XU.js → chunk.VL3YDD7D.js} +1 -1
- package/dist/preview/{chunk.A7JORJJL.js → chunk.VPFUOTY7.js} +1 -1
- package/dist/preview/{chunk.UWEFODVV.js → chunk.VUDNQOOX.js} +1 -1
- package/dist/preview/{chunk.YIDNZTON.js → chunk.VVIQSFM4.js} +1 -1
- package/dist/preview/{chunk.J65CZJIC.js → chunk.W332P5T3.js} +1 -1
- package/dist/preview/{chunk.S6IKR6RD.js → chunk.W3TJF4EH.js} +1 -1
- package/dist/preview/{chunk.7FTATAH2.js → chunk.W5O5F4FT.js} +1 -1
- package/dist/preview/chunk.W6L2VAJG.js +2 -0
- package/dist/preview/{chunk.QG3LV4RH.js → chunk.WGH2P2YL.js} +1 -1
- package/dist/preview/{chunk.KV3N6VRG.js → chunk.WS5ORRGS.js} +1 -1
- package/dist/preview/{chunk.7HNMG6LG.js → chunk.WU6D3SPL.js} +1 -1
- package/dist/preview/{chunk.MSWOETXN.js → chunk.X2UYEA7H.js} +1 -1
- package/dist/preview/{chunk.FBDCHJS2.js → chunk.X45EITTK.js} +1 -1
- package/dist/preview/{chunk.JIEBGUCA.js → chunk.X7U3JMBR.js} +1 -1
- package/dist/preview/chunk.XSM4OTF4.js +1 -0
- package/dist/preview/{chunk.5A5DI36V.js → chunk.XTHSPLZZ.js} +1 -1
- package/dist/preview/{chunk.TS5APXWC.js → chunk.Y5WQD6KV.js} +1 -1
- package/dist/preview/{chunk.3QPMFUMV.js → chunk.YXVUJ3NB.js} +1 -1
- package/dist/preview/{chunk.F5STM4DX.js → chunk.Z22C2JJ4.js} +1 -1
- package/dist/preview/{chunk.BBLA4PSP.js → chunk.Z2BCOZDZ.js} +1 -1
- package/dist/preview/{chunk.BZXJKWNI.js → chunk.Z3TK2LJM.js} +1 -1
- package/dist/preview/chunk.ZGLOXN7O.js +1 -0
- package/dist/preview/{chunk.UJM5EZDM.js → chunk.ZLQIGZXO.js} +1 -1
- package/dist/preview/{chunk.FUTSLXWN.js → chunk.ZONRIOIA.js} +1 -1
- package/dist/preview/{chunk.NTAC5NNE.js → chunk.ZY3NAJDM.js} +1 -1
- package/dist/preview/index.html +55 -55
- package/dist/preview/page.js +2 -2
- package/package.json +6 -6
- package/dist/preview/chunk.2QOB62XU.js +0 -1
- package/dist/preview/chunk.36FKQJFM.js +0 -2
- package/dist/preview/chunk.3A3DCALP.js +0 -1
- package/dist/preview/chunk.3GPYKWAD.js +0 -1
- package/dist/preview/chunk.3ZP6IDUC.js +0 -1
- package/dist/preview/chunk.53HW224Y.js +0 -1
- package/dist/preview/chunk.AW74DZ5V.js +0 -17
- package/dist/preview/chunk.CCCSZRKU.js +0 -1
- package/dist/preview/chunk.DBSSCJQM.js +0 -1
- package/dist/preview/chunk.DW6KXAUM.js +0 -1
- package/dist/preview/chunk.HHQUCFN4.js +0 -1
- package/dist/preview/chunk.HPWMCS3H.js +0 -23
- package/dist/preview/chunk.HRLCDBMO.js +0 -1
- package/dist/preview/chunk.I7ODVOO5.js +0 -1
- package/dist/preview/chunk.IANOWT3Z.js +0 -1
- package/dist/preview/chunk.IFPJPJ4M.js +0 -1
- package/dist/preview/chunk.IUVRJDL3.js +0 -5
- package/dist/preview/chunk.J4CSY2D5.js +0 -2
- package/dist/preview/chunk.JJIKTTXB.js +0 -1
- package/dist/preview/chunk.KDOJC4FX.js +0 -1
- package/dist/preview/chunk.KLZPUTMU.js +0 -1
- package/dist/preview/chunk.LQ2PDW2M.js +0 -32
- package/dist/preview/chunk.MNWP3TPN.js +0 -1
- package/dist/preview/chunk.NILR2BWR.js +0 -1
- package/dist/preview/chunk.NNYKLENL.js +0 -1
- package/dist/preview/chunk.PZHCWMKT.js +0 -1
- package/dist/preview/chunk.QVID5WHS.js +0 -1
- package/dist/preview/chunk.RHV73CBA.js +0 -3
- package/dist/preview/chunk.RP6C2IUM.js +0 -1
- package/dist/preview/chunk.RPHZY7N4.js +0 -1
- package/dist/preview/chunk.UYBSVE2W.js +0 -1
- package/dist/preview/chunk.WMZ2BINI.js +0 -1
- package/dist/preview/chunk.X2RHBTJI.js +0 -1
- package/dist/preview/chunk.X3FPVFFB.js +0 -1
- package/dist/preview/chunk.X4PFLIXB.js +0 -1
- package/dist/preview/chunk.YR7DKU5T.js +0 -1
- package/dist/preview/chunk.ZBK3FCVE.js +0 -1
- package/dist/preview/chunk.ZH5L746C.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
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};
|
|
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.6L6RUOSF.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.JCKIJSW7.js","./chunk.SDO3U72B.js","./chunk.6L6RUOSF.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.4ZEHLUXV.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
2
|
/*! Bundled license information:
|
|
3
3
|
|
|
4
4
|
react/cjs/react.production.js:
|