graview 0.1.52 → 0.1.53
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.2IKVO743.js +1 -0
- package/dist/preview/{chunk.C4EPMV7O.js → chunk.2LQ37DC2.js} +1 -1
- package/dist/preview/{chunk.IVI3HRSF.js → chunk.3377DLPA.js} +1 -1
- package/dist/preview/chunk.34Q7OKK3.js +1 -0
- package/dist/preview/{chunk.3FKP32RG.js → chunk.36XV4ZMC.js} +2 -2
- package/dist/preview/{chunk.LESRQN3Y.js → chunk.3FRVG6JW.js} +1 -1
- package/dist/preview/{chunk.XLM4ONUB.js → chunk.3FUFVVR4.js} +1 -1
- package/dist/preview/chunk.3Y7BDRP3.js +1 -0
- package/dist/preview/{chunk.7FZY5E2U.js → chunk.4DCPB67O.js} +1 -1
- package/dist/preview/chunk.4DFO43VM.js +1 -0
- package/dist/preview/chunk.4QVZXCV5.js +1 -0
- package/dist/preview/chunk.4SVAHPJA.js +1 -0
- package/dist/preview/chunk.52Y37IAD.js +1 -0
- package/dist/preview/chunk.56UFDIX5.js +1 -0
- package/dist/preview/chunk.5E4UGVAD.js +1 -0
- package/dist/preview/chunk.5H3VCAPN.js +1 -0
- package/dist/preview/chunk.5K5D4IMM.js +1 -0
- package/dist/preview/{chunk.C4UNAJWC.js → chunk.5XFRWXYQ.js} +1 -1
- package/dist/preview/{chunk.ULAMIQ52.js → chunk.65F3DF5Q.js} +1 -1
- package/dist/preview/{chunk.QWQBPJ4U.js → chunk.6CVW53WA.js} +1 -1
- package/dist/preview/chunk.6ESAZJBN.js +1 -0
- package/dist/preview/chunk.6S3B4XC4.js +1 -0
- package/dist/preview/{chunk.VOHRQXCF.js → chunk.6W2DUW5S.js} +2 -2
- package/dist/preview/{chunk.7EA7THSM.js → chunk.72Q4R7N6.js} +1 -1
- package/dist/preview/chunk.7BXOQEUP.js +1 -0
- package/dist/preview/{chunk.7UJZP3YK.js → chunk.7NFCI4LH.js} +2 -2
- package/dist/preview/{chunk.4LI73QOY.js → chunk.7R6GXJS4.js} +1 -1
- package/dist/preview/chunk.A2RQFAZ6.js +1 -0
- package/dist/preview/{chunk.J2R55TM7.js → chunk.AQJD23AN.js} +1 -1
- package/dist/preview/{chunk.7XJ3XQZD.js → chunk.ASCTAUFD.js} +1 -1
- package/dist/preview/chunk.B3T4N2XM.js +25 -0
- package/dist/preview/chunk.B3WVCSW5.js +1 -0
- package/dist/preview/{chunk.NAPTE3S6.js → chunk.BB5XKTVC.js} +1 -1
- package/dist/preview/{chunk.Y37DXEHG.js → chunk.BG2SC77J.js} +1 -1
- package/dist/preview/{chunk.7UXDIEPK.js → chunk.BPPDBPTL.js} +1 -1
- package/dist/preview/chunk.BQHRZJ5Z.js +1 -0
- package/dist/preview/{chunk.BJL6EL6B.js → chunk.CANTHIRO.js} +1 -1
- package/dist/preview/chunk.CIUQWCU4.js +1 -0
- package/dist/preview/{chunk.SZCZD2GM.js → chunk.CSA6SWTI.js} +1 -1
- package/dist/preview/{chunk.52J42KR5.js → chunk.CWPRQSED.js} +1 -1
- package/dist/preview/{chunk.5DDHFNZM.js → chunk.CYP5KXIQ.js} +1 -1
- package/dist/preview/chunk.D3A24PQ6.js +1 -0
- package/dist/preview/{chunk.CBGKWYGI.js → chunk.DQPEVPKQ.js} +1 -1
- package/dist/preview/{chunk.R7ZZJOJW.js → chunk.DUZS52WX.js} +1 -1
- package/dist/preview/chunk.E52UTLQ2.js +1 -0
- package/dist/preview/{chunk.QPP3OJVR.js → chunk.E647LWH5.js} +1 -1
- package/dist/preview/chunk.EG2N5F6L.js +1 -0
- package/dist/preview/{chunk.T2Q3AAQI.js → chunk.EZXGVTT2.js} +1 -1
- package/dist/preview/chunk.F5RN6YXG.js +4 -0
- package/dist/preview/chunk.FBRARPGR.js +4 -0
- package/dist/preview/{chunk.J263VQF5.js → chunk.FCAKLO5U.js} +1 -1
- package/dist/preview/{chunk.3TME4BG3.js → chunk.FGJM4LJO.js} +1 -1
- package/dist/preview/{chunk.OS3WZV6C.js → chunk.FJN4OGAS.js} +1 -1
- package/dist/preview/chunk.FXNUR5JI.js +88 -0
- package/dist/preview/chunk.G226CUJQ.js +1 -0
- package/dist/preview/chunk.G6DISMVT.js +67 -0
- package/dist/preview/{chunk.LTJYKQJG.js → chunk.GANAZIRD.js} +1 -1
- package/dist/preview/{chunk.KFTZLNHY.js → chunk.GBIVIHGD.js} +19 -14
- package/dist/preview/chunk.GGHZEAAT.js +1 -0
- package/dist/preview/chunk.GPYZR6HE.js +1 -0
- package/dist/preview/{chunk.7KZ44FEU.js → chunk.GYO57LKD.js} +1 -1
- package/dist/preview/{chunk.NHIPVAGR.js → chunk.GZBODS7Z.js} +1 -1
- package/dist/preview/chunk.GZWC72HS.js +1 -0
- package/dist/preview/{chunk.FJEXINFF.js → chunk.H2B3SEI7.js} +1 -1
- package/dist/preview/{chunk.R6FHEEJ7.js → chunk.H6EMDQP5.js} +1 -1
- package/dist/preview/chunk.HAIHXBVX.js +1 -0
- package/dist/preview/{chunk.BHPZK4WJ.js → chunk.HBVURYWY.js} +2 -2
- package/dist/preview/{chunk.VKOCD5CL.js → chunk.HDXDYS4C.js} +1 -1
- package/dist/preview/chunk.HE545Z6I.js +1 -0
- package/dist/preview/chunk.HIDLE6BN.js +18 -0
- package/dist/preview/chunk.HIFLBWQJ.js +9 -0
- package/dist/preview/chunk.I62MCBQM.js +1 -0
- package/dist/preview/chunk.I6SUHXJF.js +1 -0
- package/dist/preview/chunk.I6W3IQ4W.js +1 -0
- package/dist/preview/chunk.ICYJ7QJG.js +2 -0
- package/dist/preview/{chunk.C7EEYSAM.js → chunk.IYVBJDR7.js} +1 -1
- package/dist/preview/{chunk.RWCWRJJC.js → chunk.J6OT74RM.js} +1 -1
- package/dist/preview/{chunk.GZHEGKPF.js → chunk.JCJ7NTW4.js} +1 -1
- package/dist/preview/{chunk.P5PXWOHI.js → chunk.JKCLYLT4.js} +1 -1
- package/dist/preview/chunk.JQTO52Q7.js +1 -0
- package/dist/preview/chunk.JRU5BT7K.js +5 -0
- package/dist/preview/{chunk.I43ONAEL.js → chunk.K7WME4P4.js} +1 -1
- package/dist/preview/{chunk.FLNYLE6S.js → chunk.KAKJYAHM.js} +1 -1
- package/dist/preview/chunk.KCM2VOC7.js +1 -0
- package/dist/preview/{chunk.LSL25VXW.js → chunk.KWMBRB6O.js} +1 -1
- package/dist/preview/{chunk.KVEDMKUN.js → chunk.KY7QD22S.js} +1 -1
- package/dist/preview/{chunk.RBWYXVUW.js → chunk.LAOZEYYQ.js} +1 -1
- package/dist/preview/{chunk.JQBP6QWQ.js → chunk.LCG3VLCB.js} +1 -1
- package/dist/preview/{chunk.7FMS57QO.js → chunk.LDLWYAHK.js} +1 -1
- package/dist/preview/chunk.LEKML4S4.js +1 -0
- package/dist/preview/{chunk.73EKJ4JN.js → chunk.MDIAWTNK.js} +1 -1
- package/dist/preview/chunk.MKWVNW4Q.js +35 -0
- package/dist/preview/{chunk.VGTEEANA.js → chunk.MSPRCR3Q.js} +1 -1
- package/dist/preview/{chunk.CV4QA4ZF.js → chunk.MT45H2T5.js} +1 -1
- package/dist/preview/chunk.MXTDQXVW.js +1 -0
- package/dist/preview/{chunk.M33LUF3Q.js → chunk.N6A3DIOY.js} +1 -1
- package/dist/preview/{chunk.DXZ5VYCQ.js → chunk.NAEEPUWJ.js} +1 -1
- package/dist/preview/{chunk.HSGUXMAO.js → chunk.NCTTPW7A.js} +1 -1
- package/dist/preview/chunk.OCWZJNZF.js +1 -0
- package/dist/preview/chunk.OP3ZUI4W.js +1 -0
- package/dist/preview/{chunk.J6IB2HUZ.js → chunk.OPKXCL5R.js} +1 -1
- package/dist/preview/chunk.OXLYDXQV.js +1 -0
- package/dist/preview/{chunk.DGWNVDZB.js → chunk.OZYZBRWO.js} +1 -1
- package/dist/preview/{chunk.CHMUL36A.js → chunk.P2W727C7.js} +1 -1
- package/dist/preview/{chunk.I2W7HSBU.js → chunk.P7FN3SFB.js} +1 -1
- package/dist/preview/{chunk.INL4OZI7.js → chunk.PEA4D66Y.js} +1 -1
- package/dist/preview/chunk.Q5JVKSEN.js +1 -0
- package/dist/preview/chunk.QATG5HNV.js +1 -0
- package/dist/preview/{chunk.KPUX27ZT.js → chunk.R3DWF35R.js} +1 -1
- package/dist/preview/{chunk.XZLKTOJE.js → chunk.RIS3OKAI.js} +1 -1
- package/dist/preview/{chunk.R77TACXU.js → chunk.RUTZEEBR.js} +1 -1
- package/dist/preview/{chunk.OYRZ2DEI.js → chunk.S2ATSY6P.js} +1 -1
- package/dist/preview/{chunk.NB6WN4DO.js → chunk.S6TN3MLY.js} +1 -1
- package/dist/preview/{chunk.FJC6PMOG.js → chunk.T56SOSIR.js} +4 -4
- package/dist/preview/chunk.THL67D77.js +1 -0
- package/dist/preview/{chunk.GL3YVGAP.js → chunk.TLQTDKOL.js} +2 -2
- package/dist/preview/{chunk.5WU2UTP7.js → chunk.TRPPN2GD.js} +1 -1
- package/dist/preview/{chunk.YKACMLLU.js → chunk.TTFYXKLI.js} +1 -1
- package/dist/preview/{chunk.FEBCIEI3.js → chunk.TXEWSZGO.js} +1 -1
- package/dist/preview/chunk.U4T4Y2MT.js +1 -0
- package/dist/preview/chunk.ULTYDYTS.js +19 -0
- package/dist/preview/chunk.UQ4CASST.js +1 -0
- package/dist/preview/chunk.UQENE3VE.js +1 -0
- package/dist/preview/chunk.USAGE5C6.js +28 -0
- package/dist/preview/{chunk.ZK42LPF5.js → chunk.UVMLX4US.js} +1 -1
- package/dist/preview/{chunk.G7XKQNOL.js → chunk.UXNZPPWR.js} +1 -1
- package/dist/preview/chunk.UYCPQ6IW.js +1 -0
- package/dist/preview/chunk.V6X3U3JF.js +1 -0
- package/dist/preview/{chunk.2K3YQJW3.js → chunk.VOHDRH3P.js} +1 -1
- package/dist/preview/{chunk.R7CRV2FE.js → chunk.VRJ4TULC.js} +1 -1
- package/dist/preview/{chunk.QRCTTDDQ.js → chunk.VTCPA4V4.js} +1 -1
- package/dist/preview/chunk.VTRI2MT2.js +2 -0
- package/dist/preview/chunk.W54NXXC5.js +293 -0
- package/dist/preview/{chunk.NVNQSZ43.js → chunk.WDEMPWS4.js} +1 -1
- package/dist/preview/chunk.XBNASVTY.js +1 -0
- package/dist/preview/{chunk.EIWTZC4A.js → chunk.XDEKL6TJ.js} +1 -1
- package/dist/preview/chunk.XE72DFBV.js +13 -0
- package/dist/preview/{chunk.N7D5LKBI.js → chunk.XFIZLWYA.js} +1 -1
- package/dist/preview/{chunk.U6PCKJ26.js → chunk.XXCT6DLX.js} +1 -1
- package/dist/preview/{chunk.7354O67H.js → chunk.Y4VOCJ7R.js} +1 -1
- package/dist/preview/chunk.YA7ZMGOL.js +1 -0
- package/dist/preview/{chunk.D62V3TBW.js → chunk.YI7WHBAD.js} +2 -2
- package/dist/preview/{chunk.6CY3EA6U.js → chunk.Z4YSCHZT.js} +1 -1
- package/dist/preview/{chunk.MBNZ2HK7.js → chunk.ZQWKS6K5.js} +1 -1
- package/dist/preview/{chunk.7IOC6U3C.js → chunk.ZYYM52N5.js} +1 -1
- package/dist/preview/index.html +50 -50
- package/dist/preview/page.js +2 -2
- package/package.json +6 -6
- package/dist/preview/chunk.2EB7COX5.js +0 -1
- package/dist/preview/chunk.2X3UZJWI.js +0 -1
- package/dist/preview/chunk.337JMOTL.js +0 -1
- package/dist/preview/chunk.3ZQAPPJ5.js +0 -18
- package/dist/preview/chunk.4VI3EYDL.js +0 -1
- package/dist/preview/chunk.4ZLCMATU.js +0 -2
- package/dist/preview/chunk.5LWPNOJA.js +0 -1
- package/dist/preview/chunk.63SRVTG2.js +0 -19
- package/dist/preview/chunk.6BA6RUK7.js +0 -1
- package/dist/preview/chunk.6JERQFZI.js +0 -1
- package/dist/preview/chunk.6NIE3ILA.js +0 -1
- package/dist/preview/chunk.6QNBUBGD.js +0 -1
- package/dist/preview/chunk.7OAXW7QF.js +0 -1
- package/dist/preview/chunk.7SNIX56B.js +0 -1
- package/dist/preview/chunk.AI2HBKVP.js +0 -359
- package/dist/preview/chunk.BDQ4FUKO.js +0 -1
- package/dist/preview/chunk.BRDAO2OF.js +0 -4
- package/dist/preview/chunk.CC7E6NUQ.js +0 -1
- package/dist/preview/chunk.D2T563AA.js +0 -1
- package/dist/preview/chunk.DC7M56NM.js +0 -9
- package/dist/preview/chunk.DIS7JS7X.js +0 -1
- package/dist/preview/chunk.DVLWSCIC.js +0 -35
- package/dist/preview/chunk.EHOEMVQP.js +0 -1
- package/dist/preview/chunk.EME5HQ3H.js +0 -1
- package/dist/preview/chunk.G446PWV6.js +0 -1
- package/dist/preview/chunk.HST7BYFW.js +0 -1
- package/dist/preview/chunk.JOWJNIWH.js +0 -4
- package/dist/preview/chunk.JV7FLVUV.js +0 -1
- package/dist/preview/chunk.KQSD5MLY.js +0 -1
- package/dist/preview/chunk.KSJ3J5UN.js +0 -1
- package/dist/preview/chunk.LXJW2Z2M.js +0 -1
- package/dist/preview/chunk.MCFLCC42.js +0 -12
- package/dist/preview/chunk.MYKRJ4SV.js +0 -1
- package/dist/preview/chunk.NICCIJV4.js +0 -1
- package/dist/preview/chunk.NQPNK6I5.js +0 -1
- package/dist/preview/chunk.NWK4E7TJ.js +0 -1
- package/dist/preview/chunk.NZB5S5UO.js +0 -1
- package/dist/preview/chunk.PRCWGE7A.js +0 -1
- package/dist/preview/chunk.PXHBPLTQ.js +0 -1
- package/dist/preview/chunk.PXVJBL2C.js +0 -1
- package/dist/preview/chunk.Q3XKNZQW.js +0 -1
- package/dist/preview/chunk.Q5IAXTF5.js +0 -25
- package/dist/preview/chunk.QXCYAFRT.js +0 -1
- package/dist/preview/chunk.RMRO5JZX.js +0 -1
- package/dist/preview/chunk.S4ZWBCYC.js +0 -1
- package/dist/preview/chunk.SELLAVIQ.js +0 -1
- package/dist/preview/chunk.SM6HTPYF.js +0 -1
- package/dist/preview/chunk.T6KKNWZT.js +0 -1
- package/dist/preview/chunk.UEPVA6IS.js +0 -1
- package/dist/preview/chunk.UMS7XRPO.js +0 -1
- package/dist/preview/chunk.VGIWQNJB.js +0 -1
- package/dist/preview/chunk.W5UJLKIT.js +0 -1
- package/dist/preview/chunk.WUEU3QBL.js +0 -1
- package/dist/preview/chunk.WWUMSCYC.js +0 -1
- package/dist/preview/chunk.XPR3QFF4.js +0 -1
- package/dist/preview/chunk.YKXUDACI.js +0 -28
- package/dist/preview/chunk.YUEOUV7G.js +0 -5
- package/dist/preview/chunk.YYWLYVAW.js +0 -1
- package/dist/preview/chunk.Z2JMTRF4.js +0 -1
- package/dist/preview/chunk.Z2UFPOAN.js +0 -88
- package/dist/preview/chunk.ZEKKIMKI.js +0 -1
- package/dist/preview/chunk.ZZGXVYW2.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{Fa as o,G as k,T as n}from"./chunk.Q5IAXTF5.js";import{a as t}from"./chunk.SDO3U72B.js";import{b as p}from"./chunk.AJZBJBMO.js";var f=o(t(()=>(__graviewPreload(import.meta.url,["./chunk.WVUJXDXZ.js","./chunk.QRCTTDDQ.js","./chunk.3TME4BG3.js","./chunk.I43ONAEL.js","./chunk.73EKJ4JN.js","./chunk.INL4OZI7.js","./chunk.5WU2UTP7.js","./chunk.GZHZLJBF.js","./chunk.YKACMLLU.js","./chunk.OJGHDWI6.js","./chunk.337JMOTL.js","./chunk.CV4QA4ZF.js","./chunk.OYRZ2DEI.js","./chunk.7EA7THSM.js","./chunk.AI2HBKVP.js","./chunk.Q5IAXTF5.js","./chunk.SDO3U72B.js","./chunk.VOHRQXCF.js","./chunk.SLBWPVIY.js","./chunk.AJZBJBMO.js"]),import("./chunk.WUEU3QBL.js")))),y=f.part((e,r)=>e.drawFiles(r),{quiet:!0});var d=o(t(()=>(__graviewPreload(import.meta.url,["./chunk.GZHZLJBF.js","./chunk.YKACMLLU.js","./chunk.OJGHDWI6.js","./chunk.337JMOTL.js","./chunk.CV4QA4ZF.js","./chunk.OYRZ2DEI.js","./chunk.7EA7THSM.js","./chunk.AI2HBKVP.js","./chunk.Q5IAXTF5.js","./chunk.SDO3U72B.js","./chunk.VOHRQXCF.js","./chunk.SLBWPVIY.js","./chunk.AJZBJBMO.js"]),import("./chunk.BDQ4FUKO.js")))),I=d.part((e,r)=>e.drawLinkedRecord(r),{quiet:!0}),w=d.part((e,r)=>e.drawLinkedPicker(r),{what:"Picking a linked record"});var s=p(n(),1),m=o(t(()=>(__graviewPreload(import.meta.url,["./chunk.GZHZLJBF.js","./chunk.YKACMLLU.js","./chunk.OJGHDWI6.js","./chunk.337JMOTL.js","./chunk.CV4QA4ZF.js","./chunk.OYRZ2DEI.js","./chunk.7EA7THSM.js","./chunk.AI2HBKVP.js","./chunk.Q5IAXTF5.js","./chunk.SDO3U72B.js","./chunk.VOHRQXCF.js","./chunk.SLBWPVIY.js","./chunk.AJZBJBMO.js"]),import("./chunk.S4ZWBCYC.js")))),E=m.part((e,r)=>(0,s.jsx)(e.RepeatPicker,{...r}),{quiet:!0}),W=m.part((e,r)=>(0,s.jsx)(e.RepeatEditor,{...r}),{quiet:!0});var a=p(k(),1),i=p(n(),1),c=o(t(()=>(__graviewPreload(import.meta.url,["./chunk.CV4QA4ZF.js","./chunk.OYRZ2DEI.js","./chunk.7EA7THSM.js","./chunk.AI2HBKVP.js","./chunk.Q5IAXTF5.js","./chunk.SDO3U72B.js","./chunk.VOHRQXCF.js","./chunk.SLBWPVIY.js","./chunk.AJZBJBMO.js"]),import("./chunk.2X3UZJWI.js")))),l=c.part((e,r)=>(0,i.jsx)(e.WhenInput,{...r}),{quiet:!0});function M(e){return(0,i.jsx)(a.Suspense,{fallback:(0,i.jsx)("span",{"data-graview-when-arriving":"",style:{display:"inline-block",minHeight:24}}),children:(0,i.jsx)(l,{...e})})}var N=()=>c.load().then(()=>{},()=>{});export{y as a,I as b,w as c,E as d,W as e,M as f,N as g};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk.AJZBJBMO.js";var e='"use strict";\n/*! @remote-dom/core and @remote-dom/polyfill \u2014 Copyright 2020-present, Shopify Inc. \u2014 MIT License.\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * @graview/guest\'s worker runtime \u2014 Elastic License 2.0. */\n"use strict";(()=>{var Oe=globalThis,Jr=Oe.addEventListener,eo=Oe.removeEventListener,to=Oe.postMessage,no=globalThis.queueMicrotask,dn=globalThis.performance,ro=dn?dn.now.bind(dn):Date.now,Re={listen:t=>Jr.call(Oe,"message",t),unlisten:t=>eo.call(Oe,"message",t),post:t=>to.call(Oe,t),microtask:t=>no.call(globalThis,t),now:()=>ro()};var v=Symbol("name"),ue=Symbol("prefix"),de=Symbol("value"),S=Symbol("ns"),q=Symbol("owner"),I=Symbol("owner_document"),ne=Symbol("attributes"),M=Symbol("prev"),p=Symbol("next"),R=Symbol("child"),Y=Symbol("parent"),me=Symbol("host"),K=Symbol("data"),Ee=Symbol("listeners"),mn=Symbol("isTrusted"),Ae=Symbol("path"),_e=Symbol("stop_immediate_propagation"),Pe=Symbol("dispatching"),se=Symbol("content"),D=Symbol("hooks"),mt=Symbol("extensions"),Ne=Symbol("hooks_dispatch"),U=Symbol("is_connected"),ke=Symbol("create_element"),Xn=0,X=1,Ce=2,Ie=3,Me=8,Te=9,$n=10,fe=11,A="http://www.w3.org/1999/xhtml",Z="http://www.w3.org/2000/svg",Kn="http://www.w3.org/XML/1998/namespace",Xe="http://www.w3.org/2000/xmlns/";function ft(t){return t.split(/[\\t\\n\\f\\r ]+/).filter(Boolean)}function G(t){return t.replace(/[A-Z]/g,e=>String.fromCharCode(e.charCodeAt(0)+32))}function Zn(t){return t.replace(/[a-z]/g,e=>String.fromCharCode(e.charCodeAt(0)-32))}function k(t,e){let n=globalThis.DOMException;if(typeof n=="function")return new n(t,e);let r=new Error(t);return r.name=e,r}var Qn=/^(?:[A-Za-z][^\\0\\t\\n\\f\\r\\u0020/>]*|[:_\\u0080-\\u{10FFFF}][A-Za-z0-9-.:_\\u0080-\\u{10FFFF}]*)$/u,Jn=/[\\0\\t\\n\\f\\r />=]/u,oo=/[\\0\\t\\n\\f\\r />]/u;function ie(t){if(t==null)return null;let e=String(t);return e===""?null:e}function er(t){Qn.test(t)||pn(t)}function fn(t){(t===""||Jn.test(t))&&pn(t)}function pt(t,e,n){let r=ie(t),o=String(e),s=o.indexOf(":"),i=s<0?null:o.slice(0,s),a=s<0?o:o.slice(s+1);if((i!=null&&(i===""||oo.test(i))||(n==="element"?!Qn.test(a):a===""||Jn.test(a)))&&pn(o),i!=null&&r==null)throw k(`A namespace is required for the prefix in "${o}"`,"NamespaceError");if(i==="xml"&&r!==Kn)throw k("The xml prefix requires the XML namespace","NamespaceError");if((o==="xmlns"||i==="xmlns")&&r!==Xe)throw k("The xmlns name requires the XMLNS namespace","NamespaceError");if(r===Xe&&o!=="xmlns"&&i!=="xmlns")throw k("The XMLNS namespace requires the xmlns name or prefix","NamespaceError");return{namespace:r,qualifiedName:o,prefix:i,localName:a}}function pn(t){throw k(`Invalid name: "${t}"`,"InvalidCharacterError")}var ht=0,gt=1,tr=2,hn=3,so=typeof performance>"u"?Date.now:performance.now.bind(performance),V=class{static NONE=ht;static CAPTURING_PHASE=gt;static AT_TARGET=tr;static BUBBLING_PHASE=hn;timeStamp=so();target=null;currentTarget=null;srcElement=null;bubbles=!1;cancelable=!1;composed=!1;defaultPrevented=!1;cancelBubble=!1;eventPhase=ht;[Ae]=[];[_e]=!1;[Pe]=!1;constructor(e,n){this.type=e,Object.defineProperty(this,mn,{writable:!0,value:!1}),n&&(n.bubbles&&(this.bubbles=n.bubbles),n.cancelable&&(this.cancelable=n.cancelable),n.composed&&(this.composed=n.composed))}get isTrusted(){return this[mn]}composedPath(){return[...this[Ae]]}stopPropagation(){this.cancelBubble=!0}stopImmediatePropagation(){this[_e]=!0,this.cancelBubble=!0}preventDefault(){this.cancelable&&(this.defaultPrevented=!0)}set returnValue(e){e||this.preventDefault()}get returnValue(){return!this.defaultPrevented}initEvent(e,n,r){this.type=e,this.bubbles=!!n,this.cancelable=!!r}};function gn(t,e,n){if(t.cancelBubble)return;let o=e[Ee]?.get(t.type)?.[n===gt?"capture":"bubble"];if(o)for(let s of[...o]){if(!o.has(s)||s.signal?.aborted)continue;t.eventPhase=t.target===e?tr:n,t.currentTarget=e;let i=s.normalizedListener;try{typeof i=="object"?i.handleEvent(t):i.call(e,t)}catch(a){setTimeout(io,0,a)}if(t[_e])break}}function io(t){throw t}var $e=[],yt=new WeakMap;function bt(t,e){let n=yt.get(t);n?n.push(e):yt.set(t,[e]),$e[$e.length-1].push(t)}function B(t){let e=[];$e.push(e);let n;try{n=t()}catch(r){$e.pop();try{nr(e)}catch{}throw r}return $e.pop(),nr(e),n}function nr(t){let e,n=!1;for(let r of t){let o=yt.get(r);if(o){for(;o.length>0;){let s=o.shift();try{s()}catch(i){n||(e=i,n=!0)}}yt.delete(r)}}if(n)throw e}var Et=[],Ke=[],yn=!1;function we(t){for(let e of t)Et.push(e),e[1]&&Ke.push(e[1]);if(!yn){yn=!0;try{let e,n=!1;for(let r=0;r<Et.length;r++){let[o,s]=Et[r];s&&Ke.splice(Ke.indexOf(s),1);try{o()}catch(i){n||(e=i,n=!0)}}if(n)throw e}finally{Et.length=0,Ke.length=0,yn=!1}}}function Ze(t){let e=t;for(;e;){if(Ke.includes(e))return!0;e=e[Y]??e[me]}return!1}var Qe=Symbol("listenerRegistrations"),pe=class{[Ee]=void 0;[Qe]=void 0;[I]=void 0;addEventListener(e,n,r){if(n==null)return;let o=r===!0||typeof r=="object"&&r.capture===!0,s=typeof r=="object"&&r.once===!0,i=typeof r=="object"?r.signal:void 0;if(i?.aborted)return;let a=bn(o),c=this[Qe];c||(c=new Map,this[Qe]=c);let u=c.get(e);u||(u={},c.set(e,u));let m=u[a];if(m||(m=new Map,u[a]=m),m.has(n))return;let h=this,g={type:e,listener:n,capture:o,once:s,normalizedListener:n,signal:i};(s||i)&&(g.normalizedListener=function(...C){if(g.signal?.aborted){Nt(h,g);return}return g.once&&Nt(h,g),typeof g.listener=="object"?g.listener.handleEvent(...C):g.listener.call(this,...C)});let y=this[Ee];y||(y=new Map,this[Ee]=y);let O=y.get(e);O||(O={},y.set(e,O));let E=O[a];if(E||(E=new Set,O[a]=E),m.set(n,g),E.add(g),i){let N=()=>{Nt(h,g)};g.abortListener=N,i.addEventListener("abort",N,{once:!0})}this[I]?.defaultView[Ne].addEventListener?.(this,e,n,r)}removeEventListener(e,n,r){return ao.call(this,e,n,r)}dispatchEvent(e){if(e[Pe])throw k("Failed to execute \'dispatchEvent\' on \'EventTarget\': The event is already being dispatched.","InvalidStateError");e[Pe]=!0;try{let n=[],r=this;for(;r!=null;)n.push(r),r=r.parentNode;e.target=this,e.srcElement=this,e[Ae]=n;for(let s=n.length;s--;)if(gn(e,n[s],gt),e.cancelBubble)return!e.defaultPrevented;let o=e.bubbles?n:n.slice(0,1);for(let s=0;s<o.length;s++)if(gn(e,o[s],hn),e.cancelBubble)return!e.defaultPrevented;return!e.defaultPrevented}finally{e[Pe]=!1,e.cancelBubble=!1,e[_e]=!1,e.eventPhase=ht,e.currentTarget=null,e[Ae]=[]}}};function ao(t,e,n){if(e==null)return;let r=n===!0||n&&n.capture===!0,o=bn(!!r),s=this[Qe]?.get(t)?.[o]?.get(e);s&&Nt(this,s)}function bn(t){return t?"capture":"bubble"}function Nt(t,e){let n=bn(e.capture),r=t[Qe],o=r?.get(e.type);if(!o)return;let s=o[n];if(!s||s.get(e.listener)!==e)return;s.delete(e.listener),s.size===0&&delete o[n],!o.bubble&&!o.capture&&r?.delete(e.type),e.signal&&e.abortListener&&e.signal.removeEventListener("abort",e.abortListener);let i=t[Ee],a=i?.get(e.type);if(!a)return;let c=a[n];c?.delete(e)&&(c.size===0&&delete a[n],!a.bubble&&!a.capture&&i?.delete(e.type),t[I]?.defaultView[Ne].removeEventListener?.(t,e.type,e.listener,e.capture))}var Q=class extends Array{item(e){return this[e]??null}};var et=0,rr=1,Tn=2,wn=3,tt=4,or=0,sr=1,xt=2,vt=3,ir=4,Nn=5,ar=6,lr=7,Tt=/^(?:--|-?[A-Za-z_\\u0080-\\u{10FFFF}])[A-Za-z0-9_\\u0080-\\u{10FFFF}-]*$/u;function lo(t,e){let n=1,r=null;for(let o=e;o<t.length;o++){let s=t[o];if(r){s==="\\\\"?o++:s===r&&(r=null);continue}if(s===\'"\'||s==="\'")r=s;else if(s==="(")n++;else if(s===")"&&--n===0)return[t.slice(e,o),o+1]}return[t.slice(e),t.length]}function W(t){throw k(`Invalid or unsupported selector: "${t}"`,"SyntaxError")}function St(t,e){let n=typeof e=="string"?nt(e):[{combinator:tt,matchers:e}],r=null,o=t[R];return o&&n[0].matchers.length&&xn(o,n,s=>(r=s,!1)),r}function Ot(t,e){let n=typeof e=="string"?nt(e):[{combinator:tt,matchers:e}],r=new Q,o=t[R];return o&&n[0].matchers.length&&xn(o,n,s=>{r.push(s)}),r}function nt(t,e=!1,n=!1){let r={combinator:tt,matchers:[]},o=[r],s=/[\\t\\n\\f\\r ]*?([>\\t\\n\\f\\r +~]?)[\\t\\n\\f\\r ]*?(?:(?:\\[[\\t\\n\\f\\r ]*([^\\]=\\t\\n\\f\\r ]+)[\\t\\n\\f\\r ]*(?:=[\\t\\n\\f\\r ]*(?:([\'"])(.*?)\\3|([^\\]\\t\\n\\f\\r ]+)))?[\\t\\n\\f\\r ]*(?:\\]|$))|([#.]?)([^\\t\\n\\f\\r #.[>:+~()]+)|:(\\w+)(\\()?)/gi,i=t.replace(/^[\\t\\n\\f\\r ]+|[\\t\\n\\f\\r ]+$/g,"");i===""&&W(t);let a=0,c;for(;c=s.exec(i);){c.index!==a&&W(t),c[1]&&(r.matchers.length===0&&!(n&&o.length===1)&&W(t),c[1]===">"?r.combinator=rr:c[1]==="+"?r.combinator=wn:c[1]==="~"?r.combinator=Tn:r.combinator=et,r={combinator:tt,matchers:[]},o.push(r));let u=c[8]?G(c[8]):c[2]||c[7];c[7]!=null&&!c[6]&&r.matchers.length>0&&W(t);let h,g=c[4]??c[5]??c[7];if(c[2]){Tt.test(u)||W(t);let y=c[5],O=y?.[0];if(c[3]==null&&(O===\'"\'||O==="\'")){let E=c[0].lastIndexOf(y);g=i.slice(c.index+E+1),s.lastIndex=i.length}else y!=null&&!Tt.test(y)&&W(t);h=ir}else c[6]?(Tt.test(u)||W(t),h=c[6]==="#"?xt:vt):c[8]?h=c[9]==null?Nn:ar:c[7]==="*"?h=or:c[7]&&Tt.test(c[7])?h=sr:W(t);c[9]?([g,s.lastIndex]=lo(i,s.lastIndex),u!=="has"&&u!=="not"&&W(t),u==="has"&&e&&W(t),nt(g,e||u==="has",u==="has")):h===Nn&&W(t),r.matchers.push({type:h,name:u,value:g}),a=s.lastIndex}return(a!==i.length||r.matchers.length===0)&&W(t),o}function co(t,e){let n=nt(e);return n[0]?.matchers.length?Je(t,n):!1}function uo(t,e){let n=nt(e,!0,!0),r=n[0];if(n.length===1&&r.matchers.length===0)return!1;let o=et,s={type:lr,name:":scope"};if(r.matchers.length===0?(o=r.combinator,r.matchers.push(s)):n.unshift({combinator:et,matchers:[s]}),n.some(({matchers:c})=>c.length===0))return!1;let i=o===wn||o===Tn?t[p]:t[R];if(!i)return!1;let a=!1;return xn(i,n,()=>(a=!0,!1),t),a}function xn(t,e,n,r){let o=[],s=t;for(;s;){if(j(s)){if(Je(s,e,r)&&n(s)===!1)return!1;let i=s[R];if(i){let a=s[p];a&&o.push(a),s=i;continue}}s=s[p]??o.pop()??null}return!0}function Je(t,e,n){let{combinator:r,matchers:o}=e[e.length-1];if(r===tt){if(!wt(t,o,n))return!1;let a=e.slice(0,-1);return a.length===0||Je(t,a,n)}let s=r===rr||r===et?Y:M,i=t[s];if(!i)return!1;if(r===et||r===Tn){for(;i;){if(j(i)&&wt(i,o,n)){let a=e.slice(0,-1);if(a.length===0||Je(i,a,n))return!0}i=i[s]}return!1}else{if(r===wn&&!j(i)){for(;i&&!j(i);)i=i[s];if(!i)return!1}if(!j(i)||!wt(i,o,n))return!1;let a=e.slice(0,-1);return a.length===0||Je(i,a,n)}}function En(t,e){return t.getAttributeNS(null,t.namespaceURI===A?G(e):e)}function wt(t,e,n){if(!t)return!1;if(Array.isArray(e)){for(let i of e)if(wt(t,i,n)===!1)return!1;return!0}let{type:r,name:o,value:s}=e;switch(r){case or:return o==="*";case sr:return t.namespaceURI===A?t.localName===G(o):t.localName===o;case xt:return En(t,"id")===o;case vt:let i=En(t,"class");return i?ft(i).includes(o):!1;case ir:let a=En(t,o);return s==null?a!=null:a===s;case lr:return t===n;case Nn:W(`:${o}`);case ar:switch(o){case"has":return uo(t,s||"");case"not":return!co(t,s||"");default:W(`:${o}(${s})`)}}return!1}function mo(t){return t.nodeType===Ce}function rt(t){return K in t}function Sn(t){return t.nodeType===Ie}function fo(t){return t.nodeType===Me}function j(t){return t.nodeType===X}function vn(t){return t.nodeType===fe}function mr(t){return"appendChild"in t}function Rt(t){let e=[],n=[t],r=new Set(n),o=new Set,s;for(;n.length>0;){let i=n.pop();if(r.delete(i),o.has(i))continue;let a=[];for(let c of st(i)){if(o.has(c)||(o.add(c),e.push(c),a.push(c),!j(c)))continue;let u=c[ne];if(u)for(let h of u)o.has(h)||(o.add(h),e.push(h));let m=c[se];m&&!o.has(m)&&!r.has(m)&&(r.add(m),n.push(m))}s??=a}return{nodes:e,treeNodes:s}}function ot(t,e){for(let n of t)n[I]=e}function cr(t,e){let n=t.constructor,r=new n(t.name,t.value,t.namespaceURI);return r[I]=e,r}function ur(t,e){if(Sn(t))return e.createTextNode(t.data);if(fo(t))return e.createComment(t.data);if(mo(t))return cr(t,e);if(j(t)){let n=e[ke](t[v],t.namespaceURI,t[ue],t.localName);if(t[ne])for(let r=0;r<t[ne].length;r++){let o=t[ne].item(r);n.attributes.setNamedItem(cr(o,e))}return n}else{if(vn(t))return e.createDocumentFragment();{let n=new t.constructor;return n[I]=e,n}}}function At(t,e,n=t.ownerDocument){if(t.nodeType===Te)throw k("Cannot clone a document node","NotSupportedError");let r=ur(t,n);if(!e||!j(t)&&!vn(t))return r;let o=new Set([t]),s=[{source:t,destination:r,childIndex:0,cloningContent:!1}];for(;s.length>0;){let i=s[s.length-1],a,c;if(i.cloningContent)if(i.contentSource&&i.contentDestination)a=i.contentSource.childNodes[i.childIndex++],c=i.contentDestination;else{s.pop(),i.appendTo&&i.appendTo.appendChild(i.destination);continue}else if(a=i.source.childNodes[i.childIndex++],c=i.destination,!a){if(i.cloningContent=!0,i.childIndex=0,j(i.source)&&i.source.namespaceURI===A&&i.source.localName==="template"){let m=i.source[se];m&&(o.has(m)&&dr(),o.add(m),i.contentSource=m,i.contentDestination=i.destination.content)}continue}if(!a){s.pop(),i.appendTo&&i.appendTo.appendChild(i.destination);continue}o.has(a)&&dr(),o.add(a);let u=ur(a,n);j(a)||vn(a)?s.push({source:a,destination:u,appendTo:c,childIndex:0,cloningContent:!1}):c.appendChild(u)}return r}function dr(){throw new Error("Cannot clone a cyclic or repeated node graph")}function _t(t,e){let n=String(e);return n===""?null:St(t,[{type:xt,name:n}])}function Pt(t,e){let n=[...new Set(ft(String(e)))];return Ot(t,n.map(r=>({type:vt,name:r})))}function kt(t,e){let n=String(e),r=G(n),o=[];for(let s of Ct(t))j(s)&&(n==="*"||(s.namespaceURI===A?s[v]===r:s[v]===n))&&o.push(s);return o}function Ct(t){let e=[],n=[],r=t[R];for(;r;){e.push(r);let o=r[R],s=r[p];o?(s&&n.push(s),r=o):r=s??n.pop()??null}return e}function st(t){let e=Ct(t);return e.unshift(t),e}var J=class extends pe{nodeType=Xn;[v]="";[Y]=null;[me]=null;[R]=null;[M]=null;[p]=null;[U]=!1;get[D](){return this[I].defaultView[Ne]}get localName(){return this[v]}get nodeName(){return this[v]}get ownerDocument(){return this[I]}get isConnected(){return this[U]}isDefaultNamespace(e){let n=ie(e);return po(this)===n}get parentNode(){return this[Y]}set parentNode(e){}get parentElement(){let e=this[Y];return!e||e.nodeType!==1?null:e}set parentElement(e){}get previousSibling(){return this[M]}set previousSibling(e){}get nextSibling(){return this[p]}set nextSibling(e){}get previousElementSibling(){let e=this[M];for(;e&&e.nodeType!==1;)e=e[M];return e}set previousElementSibling(e){}get nextElementSibling(){let e=this[p];for(;e&&e.nodeType!==1;)e=e[p];return e}set nextElementSibling(e){}get firstChild(){return this[R]}set firstChild(e){}get lastChild(){let e=this[R];for(;e;){let n=e[p];if(n==null)break;e=n}return e}set lastChild(e){}get nodeValue(){return rt(this)?this.data:null}set nodeValue(e){rt(this)&&(this.data=e)}get textContent(){if(rt(this))return this.data;let e="";for(let n of Ct(this))Sn(n)&&(e+=n.data);return e}set textContent(e){if(rt(this))this.data=e;else if(mr(this)){let n=e==null?"":String(e);n===""?this.replaceChildren():this.replaceChildren(n)}}cloneNode(e){return At(this,e)}contains(e){let n=e;for(;n!=null;){if(n===this)return!0;n=n.parentNode}return!1}};function po(t){let e=t;for(;e;)switch(e.nodeType){case X:{let n=e;if(n.prefix==null&&n.namespaceURI!=null)return n.namespaceURI;let r=n.attributes.getNamedItemNS(Xe,"xmlns");if(r!=null&&r.prefix==null)return ie(r.value);e=n.parentElement;break}case Te:e=e.documentElement;break;case $n:case fe:return null;case Ce:e=e.ownerElement;break;default:e=e.parentElement}return null}var ee=Symbol("insertNode"),An=Symbol("preflightInsertions"),It=Symbol("replaceNode"),he=class extends J{remove(){let e=this.parentNode;e&&e.removeChild(this)}replaceWith(...e){let n=xe(e),r=this.parentNode;if(r)return On(o=>{ae(r,n);let s=this[p];for(;s&&n.includes(s);)s=s[p];let i=Rn(r,n,o);this.parentNode===r?r[It](i,this,o):r[ee](i,s,o)})}before(...e){let n=xe(e),r=this.parentNode;if(r)return On(o=>{ae(r,n);let s=this[M];for(;s&&n.includes(s);)s=s[M];let i=Rn(r,n,o);r[ee](i,s?s[p]:r.firstChild,o)})}after(...e){let n=xe(e),r=this.parentNode;if(r)return On(o=>{ae(r,n);let s=this[p];for(;s&&n.includes(s);)s=s[p];let i=Rn(r,n,o);r[ee](i,s,o)})}};function On(t){return B(()=>{let e=[];try{t(e)}catch(n){try{we(e)}catch{}throw n}we(e)})}function xe(t){return t.map(e=>e instanceof J?e:String(e))}function it(t,e){return e instanceof J?e:t.ownerDocument.createTextNode(String(e))}function ae(t,e){for(let n of e){if(!(n instanceof J))continue;let r=t;for(;r;){if(r===n)throw k("Cannot insert a node into itself or one of its descendants","HierarchyRequestError");r=r[Y]??r[me]}}}function Rn(t,e,n){let r=[];for(let s of e)r.push(it(t,s));if(r.length===1)return r[0];let o=t.ownerDocument.createDocumentFragment();o[An](r);for(let s of r)o[ee](s,null,n);return o}var Mt,_n=0,fr=0,pr=0,hr=0,De=!1,kn=!1,at=!1,Dt=class{#t;#n=[];#e=new Set;#r=!1;constructor(e){if(typeof e!="function")throw new TypeError("MutationObserver callback must be a function");this.#t=e}observe(e,n={}){let r=ho(n),o=Mt??=new WeakMap,s=o.get(e);s==null&&(s=new Map,o.set(e,s));let i=s.get(this);i==null?_n++:Pn(i,-1),s.set(this,r),Pn(r,1),this.#e.add(e)}disconnect(){let e=Mt;if(e!=null){for(let n of this.#e){let r=e.get(n),o=r?.get(this);o!=null&&(r.delete(this),_n--,Pn(o,-1)),r?.size===0&&e.delete(n)}this.#e.clear(),this.#n.length=0,_n===0&&(Mt=void 0)}}takeRecords(){return this.#n.splice(0)}enqueue(e){this.#n.push(e),!this.#r&&(this.#r=!0,queueMicrotask(()=>{this.#r=!1;let n=this.takeRecords();n.length>0&&this.#t.call(this,n,this)}))}};function te(t){let e=Mt;if(e==null)return;let n=new Map,r=t.target;for(;r;){let o=e.get(r);if(o)for(let[s,i]of o){if(r!==t.target&&!i.subtree)continue;let a=!1;if(t.type==="attributes"){if(!i.attributes||i.attributeFilter&&!i.attributeFilter.has(t.attributeName??""))continue;a=i.attributeOldValue}else if(t.type==="characterData"){if(!i.characterData)continue;a=i.characterDataOldValue}else if(!i.childList)continue;n.set(s,n.get(s)===!0||a)}r=r.parentNode}for(let[o,s]of n)o.enqueue({addedNodes:t.addedNodes??new Q,attributeName:t.attributeName??null,attributeNamespace:t.attributeNamespace??null,nextSibling:t.nextSibling??null,oldValue:s?t.oldValue??null:null,previousSibling:t.previousSibling??null,removedNodes:t.removedNodes??new Q,target:t.target,type:t.type})}function Lt(...t){let e=new Q;return e.push(...t),e}function ho(t){if(t.attributes===!1&&(t.attributeOldValue||t.attributeFilter!=null))throw new TypeError("attributeOldValue and attributeFilter require attributes to be enabled");if(t.characterData===!1&&t.characterDataOldValue)throw new TypeError("characterDataOldValue requires characterData to be enabled");let e=t.attributes??(t.attributeOldValue===!0||t.attributeFilter!=null),n=t.characterData??t.characterDataOldValue===!0,r=t.childList===!0;if(!e&&!n&&!r)throw new TypeError("MutationObserver options must enable childList, attributes, or characterData");return{attributes:e,attributeFilter:t.attributeFilter==null?void 0:new Set(t.attributeFilter.map(String)),attributeOldValue:t.attributeOldValue===!0,characterData:n,characterDataOldValue:t.characterDataOldValue===!0,childList:r,subtree:t.subtree===!0}}function Pn(t,e){t.attributes&&(fr+=e),t.characterData&&(pr+=e),t.childList&&(hr+=e),De=fr>0,kn=pr>0,at=hr>0}var re=class extends he{childNodes=new Q;children=new Q;appendChild(e){return B(()=>this[ee](e,null))}insertBefore(e,n){return B(()=>this[ee](e,n||null))}append(...e){return B(()=>{let n=xe(e.filter(r=>r!=null));n.length>1&&ae(this,n);for(let r of n)this[ee](it(this,r),null)})}prepend(...e){return B(()=>{let n=xe(e.filter(o=>o!=null));n.length>1&&ae(this,n);let r=this.firstChild;for(let o of n)this[ee](it(this,o),r)})}replaceChildren(...e){return B(()=>{let n=xe(e.filter(o=>o!=null));ae(this,n);let r;for(;r=this.firstChild;)this.removeChildImmediately(r);for(let o of n)this[ee](it(this,o),null)})}removeChild(e){return B(()=>(this.removeChildImmediately(e),e))}removeChildImmediately(e){if(e.parentNode!==this)throw k("The node is not a child of this node","NotFoundError");let n=this[U]?st(e):void 0,r=e[M],o=e[p],s=Gt(this,e);if(n)for(let i of n)i[U]=!1;this.queueRemovalMutationRecord(this,e,r,o),n&&this.enqueueTreeReactions(n,"disconnectedCallback"),we(this.collectRemovalHookEffects(e,s))}replaceChild(e,n){return B(()=>this[It](e,n))}[It](e,n,r){if(ae(this,[e]),n.parentNode!==this)throw k("The reference node is not a child of this parent","NotFoundError");let o=n[M],s=n[p],i=this.prepareInsertion(e),a=this[U]?st(n):void 0,c=new Set(i.map(({node:g})=>g)),u=s;for(;u&&c.has(u);)u=u[p];let m=Gt(this,n);if(a){for(let y of a)y[U]=!1;let g=new Set(a);for(let y of i)g.has(y.node)&&(y.shouldDisconnect=!1)}this.commitInsertion(i,u);let h=this[U];return this.queueRemovalMutationRecord(this,n,o,s),this.queueInsertionMutationRecords(i),a&&this.enqueueTreeReactions(a,"disconnectedCallback"),this.enqueueInsertionReactions(i,h),this.performOrCollectHookEffects([...this.collectRemovalHookEffects(n,m),...this.collectInsertionHookEffects(i)],r),n}querySelectorAll(e){return Ot(this,e)}querySelector(e){return St(this,e)}[ee](e,n,r){return this.validateInsertion(e,n),this.insertIntoValidated(e,n,r),e}[An](e){for(let n of e)this.validateInsertion(n,null),this.prepareInsertion(n)}validateInsertion(e,n){if(ae(this,[e]),n&&n.parentNode!==this)throw k("The reference node is not a child of this parent","NotFoundError")}insertIntoValidated(e,n,r){e===n&&(n=e[p]);let o=this.prepareInsertion(e);this.commitInsertion(o,n);let s=this[U];this.queueInsertionMutationRecords(o),this.enqueueInsertionReactions(o,s),this.performOrCollectHookEffects(this.collectInsertionHookEffects(o),r)}performOrCollectHookEffects(e,n){n?n.push(...e):we(e)}prepareInsertion(e){let n=[];if(e.nodeType===fe){let i=e[R];for(;i;)n.push(i),i=i[p]}else n.push(e);let r=this[U],o=this[I],s=[];for(let i of n){let a=i[U],c=a||r,u,m;if(i[I]===o)c&&(u=st(i));else{let h=Rt(i);m=h.nodes,c&&(u=h.treeNodes)}s.push({node:i,nodes:u,adoption:m,shouldDisconnect:a})}return s}commitInsertion(e,n){for(let s of e){let i=s.node[Y];if(i){let a=s.node[M],c=s.node[p];s.source={parent:i,index:Gt(i,s.node),previousSibling:a,nextSibling:c}}}for(let s of e){let i=this.attachChild(s.node,n);s.insertIndex=i.index,s.previousSibling=i.previousSibling,s.nextSibling=i.nextSibling}let r=this[I];for(let{adoption:s}of e)s&&ot(s,r);let o=this[U];for(let{nodes:s}of e)if(s)for(let i of s)i[U]=o}attachChild(e,n){if(n){let s=n[M];e[p]=n,e[M]=s,s?s[p]=e:this[R]=e,n[M]=e}else{e[p]=null;let s=this[R];if(s){let i;for(;i=s[p];)s=i;s[p]=e,e[M]=s}else this[R]=e,e[M]=null}let r=j(e);e[Y]=this;let o;if(n){if(o=this.childNodes.indexOf(n),this.childNodes.splice(o,0,e),r){let s=n;for(;s&&!j(s);)s=s[p];s?this.children.splice(this.children.indexOf(s),0,e):this.children.push(e)}}else o=this.childNodes.length,this.childNodes.push(e),r&&this.children.push(e);return{index:o,previousSibling:e[M],nextSibling:e[p]}}queueRemovalMutationRecord(e,n,r,o){at&&te({type:"childList",target:e,removedNodes:Lt(n),previousSibling:r,nextSibling:o})}queueInsertionMutationRecords(e){if(at)for(let n of e){let{node:r,source:o}=n;o&&this.queueRemovalMutationRecord(o.parent,r,o.previousSibling,o.nextSibling),te({type:"childList",target:this,addedNodes:Lt(r),previousSibling:n.previousSibling,nextSibling:n.nextSibling})}}collectRemovalHookEffects(e,n){return this.nodeType!==X||Ze(this)?[]:[[()=>this[D].removeChild?.(this,e,n)]]}collectInsertionHookEffects(e){let n=[];for(let r of e){let{node:o,source:s}=r;s?.parent.nodeType===X&&!Ze(s.parent)&&n.push([()=>s.parent[D].removeChild?.(s.parent,o,s.index)]),this.nodeType===X&&!Ze(this)&&n.push([()=>this[D].insertChild?.(this,o,r.insertIndex),o])}return n}enqueueInsertionReactions(e,n){for(let r of e){let{nodes:o}=r;o&&(r.shouldDisconnect&&this.enqueueTreeReactions(o,"disconnectedCallback"),n&&this.enqueueTreeReactions(o,"connectedCallback"))}}enqueueTreeReactions(e,n){yr(e,n)}};function gr(t,e,n,r){if(e.parentNode!==t)throw Error("not a child of this node");let o=t[U]?n.treeNodes:void 0,s=e[M],i=e[p],a=Gt(t,e);if(o)for(let u of o)u[U]=!1;ot(n.nodes,r),at&&te({type:"childList",target:t,removedNodes:Lt(e),previousSibling:s,nextSibling:i}),o&&yr(o,"disconnectedCallback");let c=[];t.nodeType===X&&!Ze(t)&&c.push([()=>t[D].removeChild?.(t,e,a)]),we(c)}function Gt(t,e){let n=e[M],r=e[p];n?n[p]=r:t[R]=r,r&&(r[M]=n);let o=t.childNodes.indexOf(e);return t.childNodes.splice(o,1),j(e)&&t.children.splice(t.children.indexOf(e),1),e[Y]=null,e[p]=null,e[M]=null,o}function yr(t,e){for(let n of t){let r=n[e];typeof r=="function"&&bt(n,()=>r.call(n))}}function lt(t,e,n,r,o){let{observedAttributes:s}=t.constructor,{attributeChangedCallback:i}=t;i==null||s==null||!s.includes(e)||bt(t,()=>i.call(t,e,n,r,o))}var Ht=class{[R]=null;constructor(e){this[q]=e}getNamedItem(e){let n=String(e),r=this[q][S]===A?G(n):n,o=this[R];for(;o;){if(o.name===r)return o;o=o[p]}return null}getNamedItemNS(e,n){let r=ie(e),o=String(n),s=this[R];for(;s;){if(s.localName===o&&s[S]===r)return s;s=s[p]}return null}item(e){let n=this[R],r=0;for(;n;){if(r++===e)return n;n=n[p]}return null}get length(){let e=0,n=this[R];for(;n;)e++,n=n[p];return e}removeNamedItem(e){let n=String(e),r=this[q][S]===A?G(n):n;return B(()=>this.removeNamedItemImmediately(o=>o.name===r))}removeNamedItemNS(e,n){let r=ie(e),o=String(n);return B(()=>this.removeNamedItemImmediately(s=>s.localName===o&&s[S]===r))}removeNamedItemImmediately(e){let n=this[q],r=this[R],o=null;for(;r!=null;){if(e(r)){o&&(o[p]=r[p]),this[R]===r&&(this[R]=r[p]);let s=r.value;return r[p]=null,r[q]=null,De&&te({type:"attributes",target:n,attributeName:r.name,attributeNamespace:r[S],oldValue:s}),n[D].removeAttribute?.(n,r.name,r[S]),lt(n,r.localName,s,null,r[S]),r}o=r,r=r[p]}return null}setNamedItem(e){return B(()=>this.setNamedItemImmediately(e))}setNamedItemImmediately(e){let n=this[q],r=e[q];if(r!=null&&r!==n)throw k("The attribute is already in use by another element.","InUseAttributeError");let o=null,s=this[R],i=null;for(;s;){if(s.localName===e.localName&&s[S]===e[S]){if(s===e)return s;i?i[p]=e:this[R]=e,e[p]=s[p],s[p]=null,o=s;break}i=s,s=s[p]}o==null&&(i?i[p]=e:this[R]=e),e[q]=n,e[I]=n[I],o&&(o[q]=null);let a=o==null||o.value!==e.value,c=o!=null&&o.name!==e.name;return a&&De&&te({type:"attributes",target:n,attributeName:e.name,attributeNamespace:e[S],oldValue:o?.value??null}),c&&n[D].removeAttribute?.(n,o.name,o[S]),(a||c)&&n[D].setAttribute?.(n,e.name,e.value,e[S]),a&<(n,e.localName,o?.value??null,e.value,e[S]),o}setNamedItemNS(e){return this.setNamedItem(e)}*[Symbol.iterator](){let e=this[R];for(;e;)yield e,e=e[p]}};var ve=class extends J{nodeType=Ce;[S]=null;[p]=null;[q]=null;constructor(e,n,r){super(),this[v]=e,this[de]=n,r&&(this[S]=r)}get nodeName(){return this[v]}set nodeName(e){}get name(){return this[v]}set name(e){}get localName(){if(this[S]==null)return this[v];let e=this[v].indexOf(":");return e<0?this[v]:this[v].slice(e+1)}get prefix(){if(this[S]==null)return null;let e=this[v].indexOf(":");return e<0?null:this[v].slice(0,e)}get value(){return this[de]}set value(e){let n=String(e),r=this[q];if(!r){this[de]=n;return}B(()=>{let o=this[de];this[de]=n,De&&o!==n&&te({type:"attributes",target:r,attributeName:this[v],attributeNamespace:this[S],oldValue:o}),this[D].setAttribute?.(r,this[v],n,this[S]),lt(r,this.localName,o,n,this[S])})}get nodeValue(){return this.value}set nodeValue(e){this.value=e}get ownerElement(){return this[q]}get namespaceURI(){return this[S]}get specified(){return!0}};var go={amp:"&",AMP:"&",apos:"\'",gt:">",GT:">",lt:"<",LT:"<",quot:\'"\',QUOT:\'"\'},yo=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),bo=/(?:<([a-z][a-z0-9-:]*)((?:[\\s]+[^<>\'"=/\\s]+(?:=([\'"])[^]*?\\3|=[^>\'"\\s]*|))*)[\\s]*(\\/?)\\s*>|<\\/([a-z][a-z0-9-:]*)>|<!--(.*?)-->|([^<>]+))/gi,Nr=/\\s([^<>\'"=/\\n\\s]+)(?:=(["\'])([\\s\\S]*?)\\2|=([^>\'"\\n\\s]*)|)/g,Eo="|b|big|blockquote|body|br|center|code|dd|div|dl|dt|em|embed|h1|h2|h3|h4|h5|h6|head|hr|i|img|li|listing|menu|meta|nobr|ol|p|pre|ruby|s|small|span|strong|strike|sub|sup|table|tt|u|ul|var|",No=/^(?:color|face|size)$/i;function br(t){return t.replace(/&(?:(amp|AMP|apos|gt|GT|lt|LT|quot|QUOT)|#(\\d+)|#[xX]([\\da-fA-F]+));/g,(e,n,r,o)=>{if(n)return go[n];let s=Number.parseInt(r??o,r?10:16);try{return String.fromCodePoint(s)}catch{return e}})}function Tr(t){return t.namespaceURI===A&&yo.has(t.localName)}function Er(t){let e=t.localName;return t[S]===Z&&(e==="foreignObject"||e==="desc"||e==="title")}function To(t,e){if(Eo.includes(`|${t}|`))return!0;if(t!=="font")return!1;for(let n of e.matchAll(Nr))if(No.test(n[1]))return!0;return!1}function Ut(t,e){let n=e.ownerDocument,r=n.createDocumentFragment(),o=[],s=r;for(let i of t.matchAll(bo)){let a=i[1];if(a){let c=i[2],u=G(a),m=o[o.length-1]?.element??e,h=m[S]===Z?Z:A;if(u==="svg")h=Z;else if(h===Z){if(Er(m))h=A;else if(To(u,c)){for(;o.length>0;){let O=o[o.length-1];if(O.element[S]!==Z||Er(O.element))break;o.pop(),s=O.target}h=A}}let g=h===A?u:a,y=n[ke](g,h,null,g);for(let O of c.matchAll(Nr))y.setAttribute(O[1],br(O[3]||O[4]||""));if(s.append(y),Tr(y)||h!==A&&i[4])continue;o.push({element:y,target:s}),s=h===A&&u==="template"?y.content:y}else if(i[5]){let c=G(i[5]);for(let u=o.length-1;u>=0;u--){let m=o[u],h=G(m.element[v]);if(h===c){s=m.target,o.length=u;break}if(m.element[S]===A&&h==="template")break}}else i[6]?s.append(n.createComment(i[6])):s.append(br(i[7]))}return r}function Vt(t){return xr([{type:"content",child:t[R]}])}function wr(t){return xr([{type:"opening",node:t}])}function xr(t){let e=[],n;for(;n=t.pop();)switch(n.type){case"opening":{let r=n.node;switch(r.nodeType){case X:{let o=r;e.push(`<${o[v]}`);let s=o[ne]?.[R];for(;s;){e.push(` ${s[v]}`);let a=s[de];a!==""&&(a=String(a).replace(/&/g,"&").replace(/"/g,"""),e.push(`="${a}"`)),s=s[p]}if(e.push(">"),Tr(o))break;let i=o.namespaceURI===A&&o.localName==="template"?o[se]:o;t.push({type:"closing",name:o[v]}),t.push({type:"content",child:i?.[R]??null});break}case Ie:{let o=r;e.push(o[K].replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">"));break}case Me:{let o=r;e.push(`<!--${o[K]}-->`);break}}break}case"content":{let r=n.child;r&&(t.push({type:"content",child:r[p]}),t.push({type:"opening",node:r}));break}case"closing":e.push(`</${n.name}>`);break}return e.join("")}var H=class extends re{nodeType=X;[S]=A;[ue]=null;get namespaceURI(){return this[S]}get prefix(){return this[ue]}get localName(){let e=this[ue];return e==null?this[v]:this[v].slice(e.length+1)}get nodeName(){return this[S]===A?Zn(this[v]):this[v]}get tagName(){return this.nodeName}get id(){return this.getAttributeNS(null,"id")??""}set id(e){this.setAttribute("id",String(e))}get slot(){return this.getAttributeNS(null,"slot")??""}set slot(e){let n=String(e);this.getAttributeNS(null,"slot")!==n&&this.attributes.setNamedItem(new ve("slot",n))}get attributes(){let e=this[ne];return e||(e=new Ht(this),this[ne]=e),e}getAttributeNames(){return[...this.attributes].map(e=>e.name)}getElementsByTagName(e){return kt(this,e)}get firstElementChild(){return this.children[0]??null}getElementsByClassName(e){return Pt(this,e)}get lastElementChild(){return this.children[this.children.length-1]??null}get nextElementSibling(){let e=this.nextSibling;for(;e&&e.nodeType!==1;)e=e.nextSibling;return e}get previousElementSibling(){let e=this.previousSibling;for(;e&&e.nodeType!==1;)e=e.previousSibling;return e}setAttribute(e,n){let r=String(e),o=String(n);fn(r);let s=this[S]===A?G(r):r,i=this.attributes.getNamedItemNS(null,s);i?i.value=o:this.attributes.setNamedItem(new ve(s,o))}setAttributeNS(e,n,r){let o=ie(e),s=String(n),i=String(r),a=pt(o,s,"attribute"),c=this.attributes.getNamedItemNS(a.namespace,a.localName);c?c.value=i:this.attributes.setNamedItemNS(new ve(a.qualifiedName,i,a.namespace))}toggleAttribute(e,n){let r=String(e);fn(r);let o=this[S]===A?G(r):r,s=this.attributes.getNamedItemNS(null,o),i=n===void 0?void 0:!!n;return s==null?i===!1?!1:(this.attributes.setNamedItem(new ve(o,"")),!0):i===!0?!0:(this.attributes.removeNamedItemNS(null,o),!1)}getAttribute(e){let n=this.attributes.getNamedItem(e);return n&&n.value}getAttributeNS(e,n){let r=this.attributes.getNamedItemNS(e,n);return r&&r.value}hasAttribute(e){return this.attributes.getNamedItem(e)!=null}hasAttributeNS(e,n){return this.attributes.getNamedItemNS(e,n)!=null}removeAttribute(e){let n=String(e),r=this[S]===A?G(n):n;this.attributes.removeNamedItemNS(null,r)}removeAttributeNS(e,n){this.attributes.removeNamedItemNS(e,n)}get outerHTML(){return wr(this)}get innerHTML(){return Vt(this)}set innerHTML(e){if(e==null||e==="")this.replaceChildren();else{let n=Ut(String(e),this);this.replaceChildren(n)}}};var Le=class t extends H{[S]=Z;get ownerSVGElement(){let e=null,n=this.parentNode;for(;n instanceof t;)e=n,n=n.parentNode;return e}};var ge=class extends he{[K]="";constructor(e){super(),this[K]=e==null?"":String(e)}setData(e){let n=kn,r=n?this[K]:null,o="";e!=null&&(o=typeof e=="string"?e:String(e)),this[K]=o,n&&r!==o&&te({type:"characterData",target:this,oldValue:r}),this[D].setText?.(this,o)}get data(){return this[K]}set data(e){this.setData(e)}};var Ge=class extends ge{nodeType=Ie;[v]="#text"};var He=class extends ge{nodeType=Me;[v]="#comment"};var Ue=class extends re{nodeType=fe;[v]="#document-fragment";[I]=typeof window<"u"?window.document:null;getElementById(e){return _t(this,e)}};var Ve=class extends H{get content(){let e=this[se];return e||(e=this.ownerDocument.createDocumentFragment(),e[me]=this,this[se]=e),e}set content(e){}set innerHTML(e){this.content.replaceChildren(Ut(String(e),this))}get innerHTML(){let e=this[se];return e?Vt(e):""}};var Bt=class extends H{};var zt=class extends H{};var jt=class extends H{};var ct=class extends re{nodeType=Te;[v]="#document";[U]=!0;constructor(e){super(),this.defaultView=e,this[I]=this,this.documentElement=qt(new jt,this,"html"),this.body=qt(new Bt,this,"body"),this.head=qt(new zt,this,"head"),this.appendChild(this.documentElement),this.documentElement.appendChild(this.head),this.documentElement.appendChild(this.body)}get textContent(){return null}set textContent(e){}getElementsByClassName(e){return Pt(this,e)}createElement(e){let n=String(e);return er(n),Cn(this,G(n))}createElementNS(e,n){let r=pt(e,n,"element");return Cn(this,r.qualifiedName,r.namespace,r.prefix,r.localName)}[ke](e,n,r,o){return Cn(this,e,n,r,o)}createTextNode(e){let n=Ft(new Ge(e),this);return this[D].createText?.(n,n.data),n}createComment(e){return Ft(new He(e),this)}createDocumentFragment(){return Ft(new Ue,this)}createEvent(){return new V("")}getElementById(e){return _t(this,e)}getElementsByTagName(e){return kt(this,e)}importNode(e,n){if(e.nodeType===Te)throw k("Cannot import a document node","NotSupportedError");return At(e,n,this)}adoptNode(e){if(e[I]===this)return e;let n=Rt(e);return B(()=>{let r=e.parentNode;return r?gr(r,e,n,this):ot(n.nodes,this),e})}};function Ft(t,e){return Object.defineProperty(t,I,{value:e,writable:!0,enumerable:!1}),t}function Cn(t,e,n=A,r=null,o=e){let s;if(n===Z)s=new Le;else if(n===A&&o==="template")s=new Ve;else if(n===A){let i=t.defaultView.customElements.get(o);s=i?new i:new H}else s=new H;return qt(s,t,e,n,r)}function qt(t,e,n,r=A,o=null){return Ft(t,e),Object.defineProperties(t,{[v]:{value:n},[S]:{value:r},[ue]:{value:o}}),e[D].createElement?.(t,r),t}var Yt=class extends V{constructor(e,n){super(e,n),this.detail=n?.detail??null}initCustomEvent(e,n,r,o){super.initEvent(e,n,r),this.detail=o??null}};var Wt=class extends V{constructor(e,n){super(e,n),this.message=n.message,this.filename=n.filename,this.lineno=n.lineno,this.colno=n.colno,this.error=n.error}};var Xt=class extends V{constructor(e,n){super(e,n),this.promise=n.promise,this.reason=n.reason}};var $t=class extends V{constructor(e,n){super(e,n),this.oldState=n.oldState,this.newState=n.newState}};var Kt=class extends V{constructor(e,n={}){super(e,n),this.relatedTarget=n.relatedTarget??null}};var Zt=class extends V{constructor(e,n={}){super(e,n),this.clipboardData=n.clipboardData??null}};var Qt=class extends H{};var wo=/^[a-z][^A-Z\\u0000\\t\\n\\f\\r />]*-[^A-Z\\u0000\\t\\n\\f\\r />]*$/u,xo=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);function vr(t){return wo.test(t)&&!xo.has(t)}function Sr(t){return k(`Invalid custom element name: "${t}"`,"SyntaxError")}var Jt=class{registry=new Map;listenersByName=new Map;define(e,n,r){if(!vr(e))throw Sr(e);if(this.registry.has(e))throw k(`A custom element named "${e}" has already been defined`,"NotSupportedError");if(this.getName(n)!=null)throw k("This constructor has already been registered in this custom element registry","NotSupportedError");this.registry.set(e,n);let o=this.listenersByName.get(e);if(o!=null){this.listenersByName.delete(e);for(let s of o)s(n)}}get(e){return this.registry.get(e)}getName(e){for(let[n,r]of this.registry)if(r===e)return n;return null}whenDefined(e){if(!vr(e))return Promise.reject(Sr(e));let n=this.registry.get(e);if(n!=null)return Promise.resolve(n);let r=this.listenersByName.get(e);return r==null&&(r=[],this.listenersByName.set(e,r)),new Promise(o=>{r.push(o)})}upgrade(e){}initialize(e){}};var vo=["onerror","onunhandledrejection"],Rr=Symbol.for("@remote-dom/polyfill/global-property");function Ar(t){return Object.getOwnPropertyDescriptors(t)}function _r(t){let e={};for(let[n,r]of Object.entries(Object.getOwnPropertyDescriptors(pe.prototype)))n!=="constructor"&&typeof r.value=="function"&&(r.value=In(r.value.bind(t)),e[n]=r);return e}function Pr(t){let e={};for(let n of vo)e[n]={configurable:!0,enumerable:!0,get:In(()=>t[n]),set:In(r=>{t[n]=r})};return e}function So(t){return Object.assign(Ar(t),_r(t),Pr(t))}function In(t){return Object.defineProperty(t,Rr,{value:!0}),t}function Or(t,e){for(let n of Reflect.ownKeys(e)){let r=Oo(t,n);(r==null||Ro(r))&&Object.defineProperty(t,n,e[n])}}function Oo(t,e){let n=t;for(;n;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function Ro(t){return[t.value,t.get,t.set].some(e=>typeof e=="function"&&e[Rr]===!0)}var Se=class extends pe{[D]={};[mt]=[];[Ne]=_o(this);name="";window=this;parent=this;self=this;top=this;document=new ct(this);customElements=new Jt;location=globalThis.location;navigator=globalThis.navigator;Event=V;ErrorEvent=Wt;PromiseRejectionEvent=Xt;ToggleEvent=$t;FocusEvent=Kt;ClipboardEvent=Zt;EventTarget=pe;CustomEvent=Yt;Node=J;ParentNode=re;ChildNode=he;DocumentFragment=Ue;Document=ct;CharacterData=ge;Comment=He;Text=Ge;Element=H;HTMLElement=Qt;SVGElement=Le;HTMLTemplateElement=Ve;MutationObserver=Dt;#t=null;#n=null;#e=null;static with(...e){let n=this;return class extends n{constructor(){super();for(let o of e)Ao(this,o)}}}get onerror(){return this.#n}set onerror(e){this.#t&&this.removeEventListener("error",this.#t),e&&typeof e=="function"?(this.#n=e,this.#t=n=>{e(n.message??"Error",n.filename,n.lineno,n.colno,n.error)},this.addEventListener("error",this.#t)):(this.#t=null,this.#n=null)}get onunhandledrejection(){return this.#e}set onunhandledrejection(e){this.#e&&this.removeEventListener("unhandledrejection",this.#e),e&&typeof e=="function"?(this.#e=e,this.addEventListener("unhandledrejection",this.#e)):this.#e=null}static setGlobal(e){let n=globalThis.self,r=globalThis.window,o=Ar(e),s=Object.assign(_r(e),Pr(e));delete o.self,Object.defineProperties(globalThis,o),Or(globalThis,s),typeof n>"u"||n===r&&n!==globalThis?Object.defineProperty(globalThis,"self",{value:e,configurable:!0,writable:!0,enumerable:!0}):n!==globalThis&&(Object.defineProperties(n,o),Or(n,s))}static setGlobalThis(e){for(let n in e)e[n]===e&&(e[n]=globalThis);Object.defineProperties(globalThis,So(e))}};function Ao(t,e){t[mt].push(e(t)??{})}function _o(t){return{createElement:le.bind(null,t,"createElement"),setAttribute:le.bind(null,t,"setAttribute"),removeAttribute:le.bind(null,t,"removeAttribute"),createText:le.bind(null,t,"createText"),setText:le.bind(null,t,"setText"),insertChild:le.bind(null,t,"insertChild"),removeChild:le.bind(null,t,"removeChild"),addEventListener:le.bind(null,t,"addEventListener"),removeEventListener:le.bind(null,t,"removeEventListener")}}function le(t,e,...n){for(let s of t[mt])s[e]?.apply(s,n);let r=t[D];r[e]?.apply(r,n)}var en=new Se;var Mn="~";var ye=new WeakMap;function Be(t){return ye.get(t)}var Hn=new WeakMap,ko=0;function $(t){let e=Hn.get(t);return e==null&&(e=String(ko++),tn(t,e)),e}function tn(t,e){Hn.set(t,e)}var Ln=new WeakMap;function Co(t){return Ln.get(t)}var Gn=new WeakMap;function Io(t){let e=Gn.get(t);if(e!=null)return e;if(!(!(t instanceof Element)||t.tagName.includes("-"))){e={};for(let{name:n,value:r}of t.attributes)e[n]=r;return e}}var Mo=new WeakMap;function Do(t){return Mo.get(t)}function Un(t,e,n){let r=Ln.get(t);if(r==null&&(r={},Ln.set(t,r)),r[e]===n)return;r[e]=n;let o=ye.get(t);o?.mutate([[3,$(t),e,n,1]])}function be(t,e,n){let r=Gn.get(t);if(r==null&&(r={},Gn.set(t,r)),r[e]===n)return;n==null?delete r[e]:r[e]=String(n);let o=ye.get(t);o?.mutate([[3,$(t),e,n,2]])}function ze(t,e){if(ye.get(t)!==e&&(ye.set(t,e),t.childNodes))for(let r=0;r<t.childNodes.length;r++)ze(t.childNodes[r],e)}function nn(t){if(ye.get(t)!=null&&(ye.delete(t),t.childNodes))for(let n=0;n<t.childNodes.length;n++)nn(t.childNodes[n])}function je(t){let{nodeType:e}=t;switch(e){case 1:return{id:$(t),type:e,element:t.localName,properties:Dn(Co(t)),attributes:Dn(Io(t)),eventListeners:Dn(Do(t)),children:Array.from(t.childNodes).map(je)};case 3:case 8:return{id:$(t),type:e,data:t.data};default:throw new Error(`Cannot serialize node of type ${t.nodeType} (${typeof t.nodeType})`)}}function Dn(t){return t?{...t}:void 0}function Vn(t,e,...n){let r=Hn.get(t),o=ye.get(t);if(r==null||o==null)throw new Error(`Cannot call method ${e} on an unconnected node`);return o.call(r,e,...n)}var Fe=en[D];Fe.insertChild=(t,e,n)=>{let r=Be(t);r!=null&&(ze(e,r),r.mutate([[0,$(t),je(e),n]]))};Fe.removeChild=(t,e,n)=>{let r=Be(t);r!=null&&(nn(e),r.mutate([[1,$(t),n]]))};Fe.setText=(t,e)=>{let n=Be(t);n?.mutate([[2,$(t),e]])};Fe.setAttribute=(t,e,n)=>{t.tagName.includes("-")||be(t,e,n)};Fe.removeAttribute=(t,e)=>{t.tagName.includes("-")||be(t,e)};Se.setGlobal(en);function rn(t){if(typeof t=="string")return{type:"navigate",to:t};let{place:e,record:n,where:r,section:o}=t??{},s={...r===void 0?{}:{where:r},...o===void 0?{}:{section:String(o)}};return typeof e=="string"?{type:"navigate",place:e,...s}:typeof n=="string"?{type:"navigate",to:n,...s}:void 0}var Cr=["wheel","drag","pinch"];function Ir(t){let e=t;return typeof t=="object"&&t!==null&&e.graview==="host-hello"&&typeof e.nonce=="string"}function Dr(t,e={}){let n,r="",o,s=0,i=new Set,a=new Map,c=[],u=E=>{n?n.postMessage({...E,nonce:r}):c.push(E)},m=E=>{let N=E.data;if(!(!N||typeof N!="object")){if(N.type==="props"){o=N.props;for(let C of i)C(N.props)}else N.type==="answer"?(a.get(N.id)?.(N),a.delete(N.id)):N.type==="event"&&typeof N.listener=="number"?e.onEvent?.(N):N.type==="heartbeat"&&typeof N.beat=="number"&&u({type:"heartbeat",beat:N.beat});e.onMessage?.(N)}},h=()=>{},g=E=>{if(n||!t.fromHost(E)||!Ir(E.data)||E.data.protocol!==1)return;let N=E.ports[0];if(N){n=N,r=E.data.nonce,n.onmessage=m,n.start?.(),h();for(let C of c.splice(0))u(C)}};h=t.listen(g),t.ready({graview:"guest-ready",protocol:1});let y,O={get props(){return o},subscribe(E){return i.add(E),()=>i.delete(E)},act(E,N={}){let C=s+=1;return new Promise(L=>{a.set(C,L),u({type:"act",id:C,name:E,args:N})})},navigate(E){let N=rn(E);N&&u(N)},size(E){u({type:"size",height:E})},autoSize(E){let N=E??globalThis.document?.documentElement,C=globalThis.ResizeObserver;if(!N||!C||typeof N.getBoundingClientRect!="function")return()=>{};y?.disconnect();let L=new C(()=>O.size(Math.ceil(N.getBoundingClientRect().height)));return L.observe(N),y=L,()=>L.disconnect()},close(){y?.disconnect(),h(),n?.close(),i.clear()}};return{guest:O,send:u}}var Gr=["globalThis","Infinity","NaN","undefined","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape","Object","Function","Array","Number","Boolean","String","Symbol","BigInt","Date","Promise","RegExp","Math","JSON","Reflect","Proxy","Intl","Error","AggregateError","EvalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError","SuppressedError","Map","Set","WeakMap","WeakSet","WeakRef","FinalizationRegistry","Iterator","AsyncIterator","DisposableStack","AsyncDisposableStack","ArrayBuffer","SharedArrayBuffer","DataView","Atomics","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float16Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"],Hr=["window","parent","top","document","customElements","Event","ErrorEvent","PromiseRejectionEvent","ToggleEvent","FocusEvent","ClipboardEvent","CustomEvent","EventTarget","Node","ParentNode","ChildNode","DocumentFragment","Document","CharacterData","Comment","Text","Element","HTMLElement","SVGElement","HTMLTemplateElement","MutationObserver"],Ur=["self","postMessage","setTimeout","clearTimeout","setInterval","clearInterval","queueMicrotask","structuredClone","crypto","console","DOMException"],Vr=["TEMPORARY","PERSISTENT"],fl=Object.freeze([...Gr,...Hr,...Ur,...Vr]),pl=Object.freeze(["constructor","__defineGetter__","__defineSetter__","hasOwnProperty","__lookupGetter__","__lookupSetter__","isPrototypeOf","propertyIsEnumerable","toString","valueOf","__proto__","toLocaleString"]),Lr=t=>typeof t=="symbol"?`[${t.description??"symbol"}]`:t;function Br(t=globalThis,e=[],n={}){let r=[],o=[],s=new Set([...Gr,...Hr,...Ur,...e,"constructor",Symbol.toStringTag]),i=(x,P)=>{let F=Reflect.getOwnPropertyDescriptor(x,P);return F===void 0||!("value"in F)||F.writable||F.configurable?!1:n.primitivesStay&&typeof P=="symbol"&&(typeof F.value!="object"||F.value===null)&&typeof F.value!="function"?!0:Vr.includes(P)&&typeof F.value=="number"},a=t,c=a.setTimeout,u=a.setInterval,m=a.crypto,h=(x,P)=>function(F,Ye,...dt){if(typeof F!="function")throw new TypeError(`${P} takes a function: a guest view cannot run code from text`);return x.call(t,F,Ye,...dt)},g=m?Object.freeze({getRandomValues:x=>m.getRandomValues(x)}):void 0,y=a.document?.defaultView;if(y&&y!==a)for(let x of Reflect.ownKeys(y))typeof x=="symbol"||s.has(x)||Reflect.deleteProperty(y,x)||o.push(`window.${x}`);let O=[];for(let x=t;x&&x!==Object.prototype;x=Object.getPrototypeOf(x))O.push(x);for(let x of O)for(let P of Reflect.ownKeys(x))s.has(P)||(Reflect.deleteProperty(x,P)?r.push(Lr(P)):i(x,P)||o.push(Lr(P)));let E=()=>function(){throw new EvalError("A guest view cannot make code from text.")},N=[Function.prototype,Object.getPrototypeOf(async function(){}),Object.getPrototypeOf(function*(){}),Object.getPrototypeOf(async function*(){})];for(let x of N){let P=E();Object.defineProperty(P,"prototype",{value:x,writable:!1,enumerable:!1,configurable:!1}),Reflect.defineProperty(x,"constructor",{value:P,writable:!1,enumerable:!1,configurable:!1})||o.push("Function.prototype.constructor"),x===Function.prototype&&Reflect.defineProperty(t,"Function",{value:P,writable:!0,enumerable:!1,configurable:!0})}let C=(x,P)=>{Reflect.defineProperty(t,x,{value:P,writable:!0,enumerable:!0,configurable:!0})||o.push(x)};C("setTimeout",h(c,"setTimeout")),C("setInterval",h(u,"setInterval")),g&&C("crypto",g);for(let x of O.slice(1))Object.freeze(x);for(let x of Reflect.ownKeys(t)){let P=Reflect.getOwnPropertyDescriptor(t,x);Reflect.defineProperty(t,x,"value"in P?{...P,writable:!1,configurable:!1}:{...P,configurable:!1})}let L;try{L=Reflect.preventExtensions(t)}catch{L=!1}return{removed:r,stuck:o,sealed:L}}var ut=class extends HTMLElement{constructor(){super(),tn(this,Mn)}connect(e){if(Be(this)===e||(ze(this,e),this.childNodes.length===0))return;let n=[];for(let r=0;r<this.childNodes.length;r++){let o=this.childNodes[r];n.push([0,Mn,je(o),r])}e.mutate(n)}updateRemoteProperty(e,n){Un(this,e,n)}callRemoteMethod(e,...n){return Vn(this,e,...n)}};var d={},on={empty:!0},Lo={id:"text",class:"text",title:"text",lang:"text",dir:{oneOf:["ltr","rtl","auto"]},hidden:"text",tabindex:{oneOf:["-1","0"]},role:"text",style:"style",translate:{oneOf:["yes","no"]},spellcheck:{oneOf:["true","false"]},draggable:{oneOf:["true","false"]},inert:"boolean"},Bn={div:d,section:d,article:d,aside:d,header:d,footer:d,nav:d,hgroup:d,search:d,address:d,figure:d,figcaption:d,blockquote:d,p:d,pre:d,hr:on,br:on,wbr:on,h1:d,h2:d,h3:d,h4:d,h5:d,h6:d,span:d,strong:d,em:d,b:d,i:d,u:d,s:d,small:d,mark:d,abbr:d,cite:d,q:d,code:d,kbd:d,samp:d,var:d,sub:d,sup:d,dfn:d,bdi:d,bdo:d,ruby:d,rt:d,rp:d,time:{attributes:{datetime:"text"}},data:{attributes:{value:"text"}},del:{attributes:{datetime:"text"}},ins:{attributes:{datetime:"text"}},a:{attributes:{href:"link"}},ul:d,menu:d,dl:d,dt:d,dd:d,ol:{attributes:{start:"number",reversed:"boolean",type:{oneOf:["1","a","A","i","I"]}}},li:{attributes:{value:"number"}},table:d,caption:d,thead:d,tbody:d,tfoot:d,tr:d,colgroup:{attributes:{span:"number"}},col:{attributes:{span:"number"},empty:!0},th:{attributes:{colspan:"number",rowspan:"number",headers:"text",scope:{oneOf:["row","col","rowgroup","colgroup"]},abbr:"text"}},td:{attributes:{colspan:"number",rowspan:"number",headers:"text"}},details:{attributes:{open:"boolean",name:"text"}},summary:d,button:{attributes:{type:{oneOf:["button"]},disabled:"boolean",name:"text",value:"text"}},input:{empty:!0,attributes:{type:{oneOf:["text","search","number","range","checkbox","radio","date","time","datetime-local","month","week","color","email","tel","url"]},name:"text",value:"text",placeholder:"text",min:"text",max:"text",step:"text",checked:"boolean",disabled:"boolean",readonly:"boolean",required:"boolean",maxlength:"number",minlength:"number",size:"number",pattern:"text",multiple:"boolean",inputmode:"text",enterkeyhint:"text"}},select:{attributes:{name:"text",disabled:"boolean",multiple:"boolean",required:"boolean",size:"number"}},option:{attributes:{value:"text",selected:"boolean",disabled:"boolean",label:"text"}},optgroup:{attributes:{label:"text",disabled:"boolean"}},textarea:{attributes:{name:"text",placeholder:"text",rows:"number",cols:"number",disabled:"boolean",readonly:"boolean",required:"boolean",maxlength:"number",minlength:"number",wrap:{oneOf:["soft","hard","off"]}}},label:{attributes:{for:"text"}},fieldset:{attributes:{disabled:"boolean",name:"text"}},legend:d,output:d,meter:{attributes:{value:"number",min:"number",max:"number",low:"number",high:"number",optimum:"number"}},progress:{attributes:{value:"number",max:"number"}},img:{empty:!0,attributes:{src:"image",alt:"text",width:"number",height:"number",decoding:{oneOf:["async","sync","auto"]}}},"graview-video":on},Go=["fill","fill-opacity","fill-rule","stroke","stroke-width","stroke-linecap","stroke-linejoin","stroke-dasharray","stroke-dashoffset","stroke-opacity","stroke-miterlimit","opacity","color","display","visibility","transform-origin","clip-path","clip-rule","marker-start","marker-mid","marker-end","font-family","font-size","font-weight","font-style","text-anchor","dominant-baseline","alignment-baseline","letter-spacing","text-decoration","paint-order","vector-effect","shape-rendering","pointer-events","stop-color","stop-opacity","overflow","mask"],Ho={id:"text",class:"text",style:"style",lang:"text",role:"text",tabindex:{oneOf:["-1","0"]},transform:"geometry",...Object.fromEntries(Go.map(t=>[t,"css"]))},qe={x:"geometry",y:"geometry",width:"geometry",height:"geometry"},sn={viewBox:"geometry",preserveAspectRatio:"geometry"},zr={gradientUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]},gradientTransform:"geometry",spreadMethod:{oneOf:["pad","reflect","repeat"]},href:"fragment"},jr={svg:{attributes:{...qe,...sn}},g:d,defs:d,symbol:{attributes:{...qe,...sn,refX:"geometry",refY:"geometry"}},use:{attributes:{...qe,href:"fragment"}},title:d,desc:d,path:{attributes:{d:"geometry",pathLength:"number"}},rect:{attributes:{...qe,rx:"geometry",ry:"geometry",pathLength:"number"}},circle:{attributes:{cx:"geometry",cy:"geometry",r:"geometry",pathLength:"number"}},ellipse:{attributes:{cx:"geometry",cy:"geometry",rx:"geometry",ry:"geometry",pathLength:"number"}},line:{attributes:{x1:"geometry",y1:"geometry",x2:"geometry",y2:"geometry",pathLength:"number"}},polyline:{attributes:{points:"geometry",pathLength:"number"}},polygon:{attributes:{points:"geometry",pathLength:"number"}},text:{attributes:{x:"geometry",y:"geometry",dx:"geometry",dy:"geometry",rotate:"geometry",textLength:"geometry",lengthAdjust:{oneOf:["spacing","spacingAndGlyphs"]}}},tspan:{attributes:{x:"geometry",y:"geometry",dx:"geometry",dy:"geometry",rotate:"geometry",textLength:"geometry"}},textPath:{attributes:{href:"fragment",startOffset:"geometry",method:{oneOf:["align","stretch"]},spacing:{oneOf:["auto","exact"]},side:{oneOf:["left","right"]}}},linearGradient:{attributes:{x1:"geometry",y1:"geometry",x2:"geometry",y2:"geometry",...zr}},radialGradient:{attributes:{cx:"geometry",cy:"geometry",r:"geometry",fx:"geometry",fy:"geometry",fr:"geometry",...zr}},stop:{attributes:{offset:"geometry"}},clipPath:{attributes:{clipPathUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]}}},mask:{attributes:{...qe,maskUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]},maskContentUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]}}},pattern:{attributes:{...qe,...sn,patternUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]},patternContentUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]},patternTransform:"geometry",href:"fragment"}},marker:{attributes:{...sn,markerWidth:"geometry",markerHeight:"geometry",refX:"geometry",refY:"geometry",orient:"geometry",markerUnits:{oneOf:["strokeWidth","userSpaceOnUse"]}}}};var Fr={section:["aria-label","aria-labelledby","title"]};function Uo(t){return/^aria-[a-z]+$/.test(t)}function Vo(t){return/^data-[a-z0-9][a-z0-9_.-]*$/.test(t)}var Bo=new Map(Object.keys(jr).map(t=>[t.toLowerCase(),t]));function qr(t){return Bo.get(t.toLowerCase())}function Yr(t,e,n){let r=n.toLowerCase(),o=t==="html"?[Bn[e]?.attributes,Lo]:[jr[e]?.attributes,Ho],s=t==="svg"&&r==="xlink:href"?"href":r;for(let i of o)if(i){for(let[a,c]of Object.entries(i))if(a.toLowerCase()===s)return{name:a,kind:c}}if(Uo(r)||Vo(r))return{name:r,kind:"text"}}var Wr="~",an=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),oe=(t,e=0)=>{if(t===null||typeof t=="string"||typeof t=="number"||typeof t=="boolean"||t===void 0)return t;if(!(e>64||typeof t!="object"))return Array.isArray(t)?t.map(n=>oe(n,e+1)):Object.fromEntries(Object.entries(t).map(([n,r])=>[n,oe(r,e+1)]))};function Xr(){let t=new Map,e=new Map,n=new Map([[Wr,{children:[],listeners:new Map}]]),r=0,o=u=>{let m=e.get(u);return m===void 0&&(m=r+=1,e.set(u,m),t.set(m,{listener:u,count:0})),t.get(m).count+=1,m},s=u=>{let m=t.get(u);m&&(m.count-=1,!(m.count>0)&&(t.delete(u),e.delete(m.listener)))},i=u=>{let m=n.get(u);if(m){n.delete(u);for(let h of m.listeners.values())s(h);for(let h of m.children)i(h)}},a=(u,m,h=0)=>{if(!an(u)||h>64)return oe(u);let g=typeof u.id=="string"?u.id:void 0,y=m&&g!==void 0&&g!==Wr;y&&i(g);let O={children:[],listeners:new Map};y&&n.set(g,O);let E={};for(let[N,C]of Object.entries(u))N==="children"&&Array.isArray(C)?E[N]=C.map(L=>{let x=a(L,y,h+1);return y&&an(L)&&typeof L.id=="string"&&O.children.push(L.id),x}):N==="eventListeners"&&an(C)?E[N]=Object.fromEntries(Object.entries(C).map(([L,x])=>{if(typeof x!="function"||!y)return[L,void 0];let P=o(x);return O.listeners.set(L,P),[L,{listener:P}]})):E[N]=oe(C,h+1);return E},c=u=>{if(!Array.isArray(u))return oe(u);let[m,h]=u,g=typeof h=="string"?n.get(h):void 0;if(m===0){let y=a(u[2],g!==void 0),O=an(u[2])?u[2].id:void 0;if(g&&typeof O=="string"&&n.has(O)){let E=Number(u[3]);g.children.splice(Number.isInteger(E)&&E>=0&&E<=g.children.length?E:g.children.length,0,O)}return[m,oe(h),y,oe(u[3])]}if(m===1){let y=Number(u[2]);return g&&Number.isInteger(y)&&y>=0&&y<g.children.length&&i(g.children.splice(y,1)[0]),oe(u)}if(m===3&&u[4]===3){let y=String(u[2]),O=u[3],E=g&&typeof O=="function"?o(O):void 0,N=g?.listeners.get(y);return N!==void 0&&s(N),E===void 0?g?.listeners.delete(y):g.listeners.set(y,E),[m,oe(h),y,E===void 0?void 0:{listener:E},3]}return oe(u)};return{encode:u=>u.map(c),listener:u=>t.get(u)?.listener,get listening(){return t.size},get nodes(){return n.size-1}}}var ln="graview-view-root",zo=["value","checked","key","pressed","files","refused","x","y","width","height","deltaX","deltaY","deltaMode","ctrlKey","metaKey","phase","pointerId","button","pressure","dx","dy","scale","rotation"],jo=t=>t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/\'/g,"'"),Fo=t=>Object.freeze({html:t,toString:()=>t}),$r=t=>typeof t=="object"&&t!==null&&typeof t.html=="string"&&Object.isFrozen(t),Kr=t=>t==null||t===!1?"":Array.isArray(t)?t.map(Kr).join(""):$r(t)?t.html:jo(String(t));function Zr(t){customElements.get(ln)||customElements.define(ln,ut);let e=Event,n=Xr(),r=new Set,o=new Set,s,i=[],a=new Set;for(let l of["closest","matches","dataset"]){let f=()=>{throw new TypeError(`A view\'s element has no ${l}: graview.on hands event.element, the element its selector matched; read event.element.getAttribute("data-\\u2026").`)};l in Element.prototype||Object.defineProperty(Element.prototype,l,l==="dataset"?{get:f}:{value:f})}let c=document.createElement(ln),u=l=>{let f=b=>{for(let w of Array.from(b.childNodes)){if(w.nodeType!==1)continue;if($(w)===l)return w;let T=f(w);if(T)return T}};return f(c)},m=l=>{let f=u(l.target);if(!f)return;let b=new e(l.event,{bubbles:!0}),w={};for(let T of zo)l[T]!==void 0&&(w[T]=l[T]);for(let T of Object.keys(w))Object.defineProperty(b,T,{value:w[T],enumerable:!0});f.dispatchEvent(b);for(let T of o){if(T.type!==l.event)continue;let _;try{_=new Set(Array.from(c.querySelectorAll(T.selector)))}catch{continue}for(let z=f;z&&z!==c;z=z.parentNode)if(_.has(z)){T.listener(Object.freeze({type:l.event,target:f,element:z,...w}));break}}},h=l=>{if(l.type==="dom-event"&&typeof l.target=="string")return m(l);if(l.type==="notice")return t.warn(l.text);if(l.type!=="props")return;s=l.props;let f=t.now();for(let T of r)try{T(l.props)}catch(_){t.threw(_)}let b=t.now()-f,w=l.push;typeof w=="number"&&t.microtask(()=>t.microtask(()=>t.send({type:"pushed",push:w,ms:b})))},g;c.connect({mutate(l){g||(g=[],t.microtask(()=>{let f=g??[];g=void 0,t.send({type:"render",records:n.encode(f)})})),g.push(...l)},call:()=>{}});let y=l=>l.nodeType===1?l.getAttribute("data-key")??l.getAttribute("id"):null,O=(l,f)=>l.nodeType===f.nodeType&&(l.nodeType!==1||l.localName===f.localName&&l.namespaceURI===f.namespaceURI&&y(l)===y(f));function E(l,f){let b=Array.from(f.childNodes),w=0;for(let T of b){let _=l.childNodes[w]??null;if(_&&O(_,T)){N(_,T),w+=1;continue}if(y(T)!==null){let ce=Array.from(l.childNodes).slice(w+1).find(We=>O(We,T));if(ce){l.insertBefore(ce,_),N(ce,T),w+=1;continue}}l.insertBefore(T,_),w+=1}for(;l.childNodes.length>w;)l.removeChild(l.lastChild)}function N(l,f){if(l.nodeType!==1){l.data!==f.data&&(l.data=f.data);return}let b=l,w=f,T=C(b);for(let _ of b.getAttributeNames())w.hasAttribute(_)||(b.removeAttribute(_),T&&be(b,_,void 0));for(let _ of w.getAttributeNames()){let z=w.getAttribute(_);b.getAttribute(_)!==z&&b.setAttribute(_,z),T&&be(b,_,z)}E(b,w)}let C=l=>l.localName.includes("-");function L(l){for(let f of Array.from(l.childNodes)){if(f.nodeType!==1)continue;let b=f;if(C(b))for(let w of b.getAttributeNames())be(b,w,b.getAttribute(w)??void 0);L(b)}}function x(l,f,b){for(let w of Array.from(l.childNodes)){if(w.nodeType!==1)continue;let T=w,_=T.localName,z=f||_.toLowerCase()==="svg",ce=z?qr(_):Object.prototype.hasOwnProperty.call(Bn,_.toLowerCase())?_.toLowerCase():void 0;if(!ce){b.add(`<${_}>`);continue}for(let We of T.getAttributeNames())(!Yr(z?"svg":"html",ce,We)||!z&&Fr[ce]?.includes(We.toLowerCase()))&&b.add(`${ce} ${We}`);x(T,z,b)}}function P(l){let f=document.createElement("div"),b=Array.isArray(l)?l:[l];for(let T of b)if(T!=null)if(typeof T=="string"||$r(T)){let _=document.createElement("div");_.innerHTML=typeof T=="string"?T:T.html,f.append(...Array.from(_.childNodes))}else f.append(T);let w=new Set;x(f,!1,w),i=[...w],i.length>0&&t.warn(`The host will not draw: ${i.join(", ")}`),L(f),E(c,f)}let F=[],Ye=new Set(Cr),dt="[]",cn=!1,qn=()=>{cn||(cn=!0,t.microtask(()=>{cn=!1;let l=[...new Map([...o].filter(b=>Ye.has(b.type)).map(b=>[`${b.type} ${b.selector}`,{event:b.type,selector:b.selector}])).entries()].sort(([b],[w])=>b<w?-1:b>w?1:0).map(([,b])=>b),f=JSON.stringify(l);f!==dt&&(dt=f,t.send({type:"gestures",bound:l}))}))},Yn="[]",un=!1,Wn=()=>{un||(un=!0,t.microtask(()=>{un=!1;let l=[...new Set([...o].filter(b=>b.type==="click"&&typeof b.selector=="string").map(b=>b.selector))].sort().slice(0,200),f=JSON.stringify(l);f!==Yn&&(Yn=f,t.send({type:"clicks",selectors:l}))}))};return{view:Object.freeze({get props(){return s},onProps(l){return r.add(l),s&&l(s),()=>void r.delete(l)},render:P,style(l){typeof l!="string"||F.includes(l)||(F.push(l),t.send({type:"style",sheets:[...F]}))},on(l,f,b){let w={type:l,selector:f,listener:b};return o.add(w),typeof l=="string"&&!a.has(l)&&(a.add(l),t.send({type:"hears",events:[l]})),Ye.has(l)&&qn(),l==="click"&&Wn(),()=>{o.delete(w),Ye.has(l)&&qn(),l==="click"&&Wn()}},act:(l,f={})=>t.act(l,f),navigate(l){if(typeof l=="string")return t.navigate(l);let f=rn(l);f&&t.send(f)},html(l,...f){return Fo(l.reduce((b,w,T)=>b+w+(T<f.length?Kr(f[T]):""),""))},get refused(){return i},get hardening(){return t.hardening()}}),hear:h,find:l=>{try{let f=c.querySelectorAll(l)[0];return f?$(f):void 0}catch{return}},listened:l=>{let f=new Set;for(let b of o)if(b.type===l)try{for(let w of Array.from(c.querySelectorAll(b.selector))){let T=$(w);T&&f.add(T)}}catch{}return[...f]}}}var Fn={removed:[],stuck:[],sealed:!1,worker:!1},zn=Dr({listen(t){return Re.listen(t),()=>Re.unlisten(t)},fromHost:()=>!0,ready:t=>Re.post(t)},{onMessage:t=>Qr.hear(t)}),Qr=Zr({send:t=>zn.send(t),act:(t,e)=>zn.guest.act(t,e),navigate:t=>zn.guest.navigate(t),microtask:Re.microtask,now:Re.now,threw:t=>console.error(t),warn:t=>console.warn(t),hardening:()=>Fn}),qo=Qr.view;Object.defineProperty(globalThis,"graview",{value:qo,enumerable:!0,configurable:!0,writable:!1});var jn="WorkerGlobalScope"in globalThis?Br(globalThis,["graview"]):Fn;Fn=jn;if(jn.stuck.length>0)throw new Error(`The view\'s worker could not be hardened: ${jn.stuck.join(", ")} would not go.`);})();\n';export{e as VIEW_RUNTIME};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as ee,b as H,c as ne}from"./chunk.HSGUXMAO.js";import{A as _,C as U,E as J,I as Q,K as X,N as Y,a as O,i as K,l as G,p as q,s as z,t as W,x as j,y as Z}from"./chunk.AI2HBKVP.js";import{G as ae,Ga as D,Pa as $,T as M,aa as T,ca as N,ta as I}from"./chunk.Q5IAXTF5.js";import{Bc as C}from"./chunk.VOHRQXCF.js";import{b as k}from"./chunk.AJZBJBMO.js";var o=k(ae(),1);var y=k(M(),1),fe=e=>typeof e=="object"?e:{};function he({rootRef:e,firstLook:r,app:n}){let t=(0,o.useCallback)(()=>e.current,[e]);return r?(0,y.jsx)(Y,{firstLook:r,root:t,app:n}):null}function ge(e,r,n){let{app:t}=e,a=(0,o.useMemo)(()=>{let i=Q(r(t.schema,t.viewSpecs),t),d=n?ie(i,n):i,s=e.views?e.views(t.schema,d):i,c=s===d?i:I(i,s);return X(c,t.schema,U(e.brand??t.brand,t.schema)),n?n.register(c):c},[e.views,t.schema,t.viewSpecs,t.lenses,t.pages,t.home,n]);return D(a,e.keptViews)}function ie(e,r){let n={...e,register(t,a,i,d){return d?.name!==r.name&&e.register(t,a,i,d),n},...e.home?{home:t=>(r.home||e.home(t),n)}:{}};return n}var F=e=>e?e.getBoundingClientRect().height:0;function be(e,r,n){let t=(0,o.useRef)(n);t.current=n;let a=n!==void 0;(0,o.useLayoutEffect)(()=>{let i=e.current;if(!i||!a)return;let d=()=>{let m=[...i.children],h=m.find(b=>b.hasAttribute("data-graview-app-bar")),p=m.find(b=>b.hasAttribute("data-embed-content")),g=p?.querySelector("[data-embed-measure]")??null,l=m.find(b=>b.hasAttribute("data-graview-place-line"));return{strip:h,line:l,content:p,measure:g}},s=-1,c=()=>{let{strip:m,line:h,content:p,measure:g}=d(),l=Math.ceil(F(m)+F(h)+F(g||p));l!==s&&(s=l,t.current?.(l))};if(c(),typeof ResizeObserver>"u")return;let u=new ResizeObserver(c),E=()=>{u.disconnect();let{strip:m,line:h,content:p,measure:g}=d();for(let l of[i,m,h,p,g])l&&u.observe(l)};E();let w=new MutationObserver(()=>{E(),c()});return w.observe(i,{childList:!0}),()=>{u.disconnect(),w.disconnect()}},[e,r,a])}var we=480,se=0;function Se(e){let{app:r,seed:n,scheme:t="auto",brand:a=r.brand,fonts:i=!0,height:d="100%",label:s}=e,c=(0,o.useRef)(null);$(c);let u=d==="viewport"?"100dvh":d,E=G(typeof u=="string"&&/vh\b/.test(u)),w=(0,o.useMemo)(()=>`graview-embed-${++se}`,[]),m=(0,o.useMemo)(()=>e.store??e.remote?.store??H(r,n),[e.store,e.remote,r,n]),h=e.presence??e.remote?.presence,p=e.hostContext?.theme,g=ne(t==="auto"&&p===void 0,a?.scheme),l=t==="auto"?p??g:t,b=(0,o.useMemo)(()=>O(l,a,{scope:`.${w}`}),[l,a,w]);K(e.favicon?C(a):void 0),(0,o.useEffect)(()=>{if(!i||typeof document>"u")return;let v=ee(a);if(!v||document.querySelector(`link[href="${v}"]`))return;let f=document.createElement("link");f.rel="stylesheet",f.href=v,document.head.appendChild(f)},[a,i]);let A=(0,o.useRef)(void 0);(0,o.useLayoutEffect)(()=>{let v=c.current,f=A.current;if(A.current=s,!v||!s)return;let oe=S=>{let R=S.getAttribute("aria-label")??"",x=f&&f!==s?R.startsWith(`${f} \xB7 `)?R.slice(f.length+3):R===f?"":R:R;x===s&&(S.getAttribute("role")==="region"||S.tagName==="SECTION"&&!S.hasAttribute("role"))&&S.setAttribute("role","group");let V=x.startsWith(`${s} \xB7 `)||x===s?x:x?`${s} \xB7 ${x}`:s;V!==R&&S.setAttribute("aria-label",V)},B=()=>v.querySelectorAll("aside, nav, main, header, footer, section[aria-label]:not([role]), [role=region], [role=complementary], [role=navigation], [role=search]").forEach(S=>{S.hasAttribute("data-graview-named-by-lens")||oe(S)});B();let P=new MutationObserver(B);return P.observe(v,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["aria-label"]}),()=>P.disconnect()},[s]);let re=E?`${u}`.replace(/([\d.]+)[sdl]?vh\b/g,(v,f)=>`${+f*E/100}px`):u;return{rootRef:c,scope:w,css:b,scheme:l,store:m,presence:h,brand:a,auto:d==="auto",height:re}}function ve({rootRef:e,board:r}){let n=(0,o.useCallback)(()=>e.current?.querySelector("[data-embed-content]")??e.current,[e]);return(0,y.jsx)(q,{board:r,anchor:n})}function Ee(e,r,n){return{brand:n,locale:e.locale,timeZone:e.timeZone,principal:e.principal,seats:e.seats,presence:r,typing:e.remote?.typing,people:e.people,memory:e.memory,presenceTtlMs:e.presenceTtlMs,onKeepLens:e.onKeepLens,ai:e.ai,files:e.files,resolveApp:e.resolveApp,history:e.history,linkedRecords:e.linkedRecords,subscriptions:e.subscriptions,dismissals:e.dismissals,whileAway:e.whileAway,keptViews:e.keptViews,onExport:e.onExport,signIn:e.signIn,menuSections:e.menuSections,app:e.app}}function Re({name:e,heading:r,faces:n,at:t,without:a,home:i,reach:d,standing:s,hostActions:c,keeping:u,onFind:E,switch:w,named:m=!0}){let{brand:h,store:p,principal:g,views:l}=T();N();let b=a?.has("places")?[]:z({store:p,principal:g,views:l}),A=_();return(0,y.jsx)(j,{brand:h,name:e,named:m,description:h?.subtitle,heading:r,faces:n,home:i,places:b,current:t===null?null:W(b,t),reach:d,onFind:E,...w?{switch:w}:{},...n||t===null?{scenePlaces:A}:{},tools:(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(J,{clean:s}),(0,y.jsx)(Z,{...c?{hostActions:c}:{},...u?{keeping:u}:{}})]})})}var xe=e=>e===!1?2:Math.min(e+1,6);function Ae(e){let[r,n]=(0,o.useState)(e),t=(0,o.useRef)(void 0),a=(0,o.useRef)(void 0),i=(0,o.useMemo)(()=>({go:t,at:n,pending:a}),[]),d=(0,o.useCallback)(s=>{if(t.current){t.current(s);return}a.current=s,n(s)},[]);return{at:r,setAt:n,steering:i,steer:d}}function de(e){let r=typeof e=="object"&&e!==null?e.name:void 0;return{name:typeof r=="string"&&r.length>0?r:typeof e=="object"?"Error":typeof e}}var L=()=>typeof performance<"u"?performance.now():Date.now();function Fe(e,r){let n=(0,o.useRef)({onError:e,face:r});return n.current={onError:e,face:r},(0,o.useCallback)((t,a)=>n.current.onError?.(de(t),{module:a.module,face:n.current.face}),[])}function ke(e,r){let n=(0,o.useRef)(null);n.current===null&&(n.current=L());let t=(0,o.useRef)({onReady:e,face:r});t.current={onReady:e,face:r};let a=(0,o.useRef)(!1);return(0,o.useCallback)(i=>{a.current||(a.current=!0,t.current.onReady?.({ms:Math.max(0,L()-(n.current??L())),face:i}))},[])}var te=class extends o.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(r,n){console.error(`[graview] ${this.props.module} threw while rendering`,r,n.componentStack),this.props.report(r,{module:this.props.module})}render(){return this.state.failed?(0,y.jsxs)("div",{role:"alert","data-graview-face-error":this.props.module,...this.props.content?{"data-embed-content":""}:{},style:this.props.content?{flex:"1 1 auto",display:"grid",alignContent:"center",justifyItems:"center",gap:8,padding:24,background:"var(--graview-ground)",color:"var(--graview-ink)",fontSize:"0.9375rem"}:{display:"inline-flex",alignItems:"center",gap:6,fontSize:"0.8125rem",color:"var(--graview-ink-muted)"},children:[(0,y.jsx)("span",{children:this.props.content?"This part of the app could not draw.":"Could not draw."}),(0,y.jsx)("button",{type:"button",onClick:()=>this.setState({failed:!1}),style:{padding:"3px 11px",fontSize:"0.8125rem"},children:"Try again"})]}):this.props.children}};export{fe as a,he as b,ge as c,be as d,we as e,Se as f,ve as g,Ee as h,Re as i,xe as j,Ae as k,Fe as l,ke as m,te as n};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as R,b as W}from"./chunk.25VJPUDH.js";import{e as E,f as C,g as z}from"./chunk.Y37DXEHG.js";import{b as N}from"./chunk.DXZ5VYCQ.js";import"./chunk.J2R55TM7.js";import{d as I}from"./chunk.DIS7JS7X.js";import"./chunk.JV7FLVUV.js";import{a as D}from"./chunk.7354O67H.js";import"./chunk.TI4OSTQV.js";import"./chunk.CV4QA4ZF.js";import"./chunk.OYRZ2DEI.js";import"./chunk.7EA7THSM.js";import{m as f}from"./chunk.AI2HBKVP.js";import{G as M,Qa as H,T as k,Ua as A,aa as b,ca as x}from"./chunk.Q5IAXTF5.js";import"./chunk.SDO3U72B.js";import{Ya as S}from"./chunk.VOHRQXCF.js";import"./chunk.SLBWPVIY.js";import{b as w}from"./chunk.AJZBJBMO.js";var n=w(M(),1);var e=w(k(),1);function O(t,o){let r=[t>0?`${t===1?"one suggestion":`${t} suggestions`} waiting`:"",o>0?`tidied ${o===1?"one thing":`${o} things`} while you were away`:""].filter(Boolean);return r.length>0?r.join(" \xB7 ").replace(/^./,s=>s.toUpperCase()):void 0}function F(){let{store:t,principal:o,dismissals:r,whileAway:s,app:u}=b(),h=x(),l=(0,n.useMemo)(()=>W(r,u?.name??"app",o),[r,u?.name,o]),[m,y]=(0,n.useReducer)(g=>g+1,0);(0,n.useEffect)(()=>l.onChange?.(y),[l]);let a=(0,n.useMemo)(()=>E(t,o,{dismissed:l.list()}),[t,o,h,l,m]),[v,p]=(0,n.useState)(""),i=A("suggested"),d=s?.tidied??0,c=s?O(a.length,d):void 0;if(a.length===0&&d===0)return null;let L=g=>{if(p(g),a.length>1){requestAnimationFrame(()=>document.querySelector('[data-testid="suggested"] [data-testid="suggestion-accept"]')?.focus());return}i.setOpen(!1),(document.querySelector('[data-testid="activity-button"]')??document.querySelector('[data-graview-app-bar] button:not([data-testid="suggested-button"])'))?.focus()};return(0,e.jsxs)("div",{style:{position:"relative"},children:[(0,e.jsxs)("button",{type:"button","data-testid":"suggested-button",...i.trigger,onClick:i.toggle,title:c??"What tidying suggests, waiting for you",...c?{"aria-label":`Suggested: ${c}`}:{},style:{display:"inline-flex",alignItems:"center",gap:6,minHeight:30,padding:"0 8px",borderRadius:8,border:"1px solid transparent",background:"transparent",boxShadow:"none",fontSize:"0.875rem",whiteSpace:"nowrap",color:"var(--graview-ink-muted)"},children:[a.length>0?a.length:`Tidied ${d}`,(0,e.jsxs)("svg",{className:"graview-activity-mark",width:"15",height:"15",viewBox:"0 0 16 16","aria-hidden":"true",focusable:"false",style:{display:"var(--graview-activity-mark, none)"},children:[(0,e.jsx)("path",{d:"M3 4.5 H13 M3 8 H10 M3 11.5 H8",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"}),(0,e.jsx)("circle",{cx:"12.25",cy:"11.5",r:"1.6",fill:"none",stroke:"currentColor",strokeWidth:"1.3"})]}),a.length>0?(0,e.jsx)("span",{className:"graview-activity-word",children:" Suggested"}):null]}),i.open?(0,e.jsxs)("section",{...i.pane,"aria-label":"Suggested","data-testid":"suggested","data-graview-offstage":"",style:{...H,width:320,maxHeight:"min(52cqh, 460px)",overflow:"auto",display:"flex",flexDirection:"column",gap:9,padding:12,borderRadius:10,border:"1px solid var(--graview-edge)",background:"var(--graview-float)",boxShadow:"var(--graview-lift-high)"},children:[(0,e.jsx)("h2",{style:{...f,margin:0},children:"Suggested"}),c?(0,e.jsxs)("p",{"data-testid":"while-away",style:{margin:0,fontSize:"0.8125rem",lineHeight:1.45,color:"var(--graview-ink-muted)"},children:[c,"."]}):null,(0,e.jsx)("p",{style:{margin:0,fontSize:"0.75rem",lineHeight:1.45,color:"var(--graview-ink-faint)"},children:a.length>0?"Not made yet: each waits for you.":"What it did is in Activity."}),(0,e.jsx)("ol",{"data-testid":"suggestions",style:{margin:0,padding:0,listStyle:"none",display:"grid",gap:10,fontSize:"0.8125rem"},children:a.map(g=>(0,e.jsx)($,{suggestion:g,notNow:l,settled:L},g.id))}),(0,e.jsx)("span",{role:"status","data-testid":"suggestion-heard",style:f,children:v})]}):null]})}var T={accept:"Accepted.",decline:"Declined: it will not be suggested again.",later:"Hidden from you until tomorrow."};function $({suggestion:t,notNow:o,settled:r}){let{store:s,principal:u,seats:h,people:l}=b(),[m,y]=(0,n.useState)(null),a=(0,n.useId)(),v=S(t.author,{graph:s.graph,schema:s.schema,seats:h,people:l}),p=async i=>{y(null);try{i==="accept"?C(s,t.id,{author:u}):i==="decline"?z(s,t.id,{author:u}):await o.dismiss({suggestion:t.id,at:new Date().toISOString(),until:R()}),r(T[i])}catch(d){y(d instanceof Error?d.message:String(d))}};return(0,e.jsxs)("li",{"data-testid":"suggestion","data-suggestion":t.id,style:{display:"grid",gap:5,lineHeight:1.45},children:[(0,e.jsxs)("span",{children:[(0,e.jsx)("strong",{style:{fontWeight:600},children:v})," ",(0,e.jsx)("span",{style:{color:"var(--graview-ink-muted)"},children:"suggests"})," ",t.intent]}),t.lineage?(0,e.jsx)("span",{"data-graview-lineage":"",style:{color:"var(--graview-ink-faint)"},children:D(t.lineage)}):null,t.about.length>0?(0,e.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:t.about.slice(0,4).map(i=>(0,e.jsx)(I,{label:N(s,i),pickId:i},i))}):null,(0,e.jsxs)("div",{style:{display:"flex",gap:6},children:[(0,e.jsx)("button",{type:"button","data-testid":"suggestion-accept",onClick:()=>void p("accept"),style:{minHeight:24,padding:"1px 10px",fontSize:"0.75rem"},children:"Accept"}),(0,e.jsx)("button",{type:"button","data-testid":"suggestion-decline",onClick:()=>void p("decline"),style:{minHeight:24,padding:"1px 10px",fontSize:"0.75rem"},children:"Decline"}),(0,e.jsx)("button",{type:"button","data-testid":"suggestion-not-now",onClick:()=>void p("later"),title:"Hide it from you until tomorrow. It still waits for everyone else.","aria-describedby":a,style:{minHeight:24,padding:"1px 10px",fontSize:"0.75rem",marginInlineStart:"auto",border:"1px solid transparent",background:"transparent",boxShadow:"none",color:"var(--graview-ink-muted)"},children:"Not now"}),(0,e.jsx)("span",{id:a,style:f,children:"Hides it from you until tomorrow; it still waits for everyone else."})]}),m?(0,e.jsx)("span",{"data-testid":"suggestion-refused",role:"alert",style:{fontSize:"0.75rem",color:"var(--graview-warn)"},children:m}):null]})}export{F as SuggestedTray,O as awayWords};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{a as D,b as L,c as C,d as M,e as _,f as N,h as T}from"./chunk.BRDAO2OF.js";import"./chunk.AJZBJBMO.js";var W=0,K=1,z=2,X=3,I=1,Y=2,j=3,J=1,q=3,Q=8,P="~",A=r=>typeof r=="object"&&r!==null&&!Array.isArray(r),F=new Set(["input","select","textarea","option"]),Z=new Set(["value","checked","selected"]);function H(r,t){let l=r.ownerDocument??r,h=t.maxNodes??5e3,y=[],g=new Map,E=new WeakMap,x={dom:r,name:"div",namespace:"html",children:[],id:P};g.set(P,x);let R=0,S=!1,O=new Map,u=e=>{y.push(e),y.length>200&&y.shift(),t.onRefused?.(e)},s=()=>({dom:l.createComment(""),children:[],refused:!0}),o=(e,a)=>{if(e.namespace==="html"&&e.name&&F.has(e.name))return e.dom;if(a?.namespace==="html"&&a.name==="textarea")return a.dom},m=(e,a,f)=>{let i=e.dom;if(f!=null&&typeof f!="string")return u({reason:"value",element:e.name,name:a});let n=T(e.namespace,e.name,a,f??null,t);if("refused"in n){let v=T(e.namespace,e.name,a,null,t);return"refused"in v||i.removeAttribute(v.name),u(n.refused)}for(let v of n.dropped??[])u(v);let d=e.namespace==="html"&&Z.has(n.name)&&F.has(e.name),c=i,p=d?n.name==="value"?c.value:n.name==="checked"?c.checked:c.selected:void 0;n.value===null?i.removeAttribute(n.name):i.setAttribute(n.name,n.value),t.onAttribute?.(i,n.name),d&&(n.name==="value"&&"value"in c?(c.value=n.value??"",p!==c.value&&t.onFieldSet?.(i)):n.name==="checked"&&"checked"in c?(c.checked=n.value!==null,p!==c.checked&&t.onFieldSet?.(i)):n.name==="selected"&&"selected"in c&&(c.selected=n.value!==null,p!==c.selected&&t.onFieldSet?.(i.parentElement?.closest("select")??i)))},w=e=>{if(!e.refused){R-=1,e.id!==void 0&&g.delete(e.id);for(let a of e.children)w(a)}},b=(e,a)=>{if(!A(e)||typeof e.id!="string"||g.has(e.id))return u({reason:"record"}),s();if(R>=h)return u({reason:"budget"}),S||(S=!0,t.onOverBudget?.()),s();let f=e.id;if(e.type===Q)return s();if(e.type===q){if(N(a.namespace,a.name))return u({reason:"child",element:a.name}),s();let p=l.createTextNode(String(e.data??"").slice(0,D)),v={dom:p,children:[],text:!0,id:f,parent:a};return g.set(f,v),E.set(p,f),R+=1,v}if(e.type!==J)return u({reason:"record"}),s();let i=String(e.element);if(N(a.namespace,a.name))return u({reason:"child",element:i}),s();let n=_(i,a.namespace);if("refused"in n)return u(n.refused),s();let d=l.createElementNS(n.namespace==="svg"?C:L,n.name);n.as&&d.setAttribute("data-graview-as",n.as),n.namespace==="html"&&n.name==="img"&&d.setAttribute("referrerpolicy","no-referrer"),n.namespace==="html"&&n.name==="a"&&(d.setAttribute("target","_blank"),d.setAttribute("rel","noopener noreferrer"),d.setAttribute("referrerpolicy","no-referrer"));let c={dom:d,name:n.name,namespace:n.namespace,children:[],id:f,parent:a};if(g.set(f,c),E.set(d,f),R+=1,A(e.attributes))for(let[p,v]of Object.entries(e.attributes))m(c,p,v);if(t.decorate?.(d,n.name,n.namespace),A(e.properties))for(let p of Object.keys(e.properties))u({reason:"attribute",element:n.name,name:p});if(A(e.eventListeners))for(let p of Object.keys(e.eventListeners))e.eventListeners[p]!=null&&u({reason:"attribute",element:n.name,name:`on${p}`});if(Array.isArray(e.children))for(let p of e.children){let v=b(p,c);c.children.push(v),d.appendChild(v.dom)}return c},k=e=>{if(!Array.isArray(e))return u({reason:"record"});let[a,f]=e,i=typeof f=="string"?g.get(f):void 0;if(!i)return u({reason:"record"});switch(a){case W:{if(i.text)return u({reason:"record"});let n=Number(e[3]),d=Number.isInteger(n)&&n>=0&&n<=i.children.length?n:i.children.length,c=e[2],p=A(c)&&typeof c.id=="string"?O.get(c.id):void 0,v;p&&p.parent?.namespace===i.namespace&&!N(i.namespace,i.name)?(O.delete(c.id),p.parent=i,v=p):v=b(c,i),i.dom.insertBefore(v.dom,i.children[d]?.dom??null),i.children.splice(d,0,v),i.namespace==="html"&&i.name==="textarea"&&t.onFieldSet?.(i.dom);return}case K:{let n=Number(e[2]),d=i.children[n];if(!d)return u({reason:"record"});i.children.splice(n,1),d.dom.parentNode?.removeChild(d.dom),d.id!==void 0&&!d.refused?O.set(d.id,d):w(d);return}case z:{if(!i.text)return u({reason:"record"});i.dom.data=String(e[2]??"").slice(0,D);let n=o(i,i.parent);n&&t.onFieldSet?.(n);return}case X:{if(i===x||i.text)return u({reason:"record"});let n=String(e[2]),d=e[4]??I;return d===Y?m(i,n,e[3]):u(d===I||d===j?{reason:"attribute",element:i.name,name:d===j?`on${n}`:n}:{reason:"record"})}default:return u({reason:"record"})}};return{apply(e,a){if(!Array.isArray(e))return u({reason:"record"}),!0;try{for(let f=0;f<e.length;f+=1){if(a&&f%32===0&&a())return!1;k(e[f])}return!0}finally{for(let f of O.values())w(f);O.clear()}},get refused(){return y},get size(){return R},idOf:e=>E.get(e),elementOf(e){let a=g.get(e);return a&&!a.text&&a!==x?a.dom:void 0},dispose(){for(let e of x.children)w(e);for(x.children.length=0;r.firstChild;)r.removeChild(r.firstChild)}}}var B=["https:","mailto:","tel:"];function U(r){if(!(typeof r!="string"||r.length>2e3||/[\s<>"]/.test(r.trim())||r.trim()!==r))try{let t=new URL(r);return!B.includes(t.protocol)||t.protocol==="https:"&&(t.hostname===""||t.username!==""||t.password!=="")?void 0:t.href}catch{return}}function ee(r){let t=new Set,l=h=>{if(typeof h!="string"||!/^(https|mailto|tel):/i.test(h))return;let y=U(h);y&&t.add(y)};for(let h of[...r?.node?[r.node]:[],...r?.nodes??[]])for(let[y,g]of Object.entries(h))y==="id"||y==="kind"||(Array.isArray(g)?g.forEach(l):l(g));return t}function G(r){return(r??[]).flatMap(t=>{try{let l=new URL(t);return l.protocol==="https:"&&l.hostname!==""&&l.username===""&&l.password===""?[l.origin]:[]}catch{return[]}})}function te(r,t){let l=U(r);if(l&&(t.handed.has(l)||l.startsWith("https:")&&G(t.origins).includes(new URL(l).origin)))return l}function ne(r,t){let l=r.length>120?`${r.slice(0,119)}\u2026`:r,h="";try{h=new URL(r).protocol}catch{h=""}if(!B.includes(h))return`The link "${l}" was not drawn: a view links only to an https:, mailto: or tel: address.`;let y=G(t);return`The link "${l}" was not drawn: it is no address this view was handed. A view links out only to an address a record it was shown holds (a url field), as the record holds it${y.length>0?`, or an https: address on ${y.join(", ")}`:""}; a record or a place of this app is <a data-record> or <a data-place>.`}var re=`
|
|
2
|
-
:host { display: block; position: relative; contain: layout paint style; isolation: isolate; overflow: clip; min-width: 0; }
|
|
3
|
-
:host(:focus-within) { overflow-clip-margin: var(--graview-ring-reach, 4px); }
|
|
4
|
-
[data-graview-view-root] { display: flow-root; color: var(--graview-ink, CanvasText); font-family: var(--graview-font-body, system-ui, sans-serif); line-height: 1.45; }
|
|
5
|
-
:where([data-graview-view-root]) :where(button) { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; text-align: inherit; appearance: none; cursor: pointer; }
|
|
6
|
-
:where([data-graview-view-root]) :where(a[data-graview-link]) { color: inherit; text-decoration: none; }
|
|
7
|
-
[data-graview-view-root] :is([data-graview-link], [data-graview-press]) { cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: rgb(128 128 128 / 0.16); }
|
|
8
|
-
[data-graview-view-root] :focus-visible { outline: max(2px, var(--graview-focus-width, 2px)) solid var(--graview-focus-color, var(--graview-accent, Highlight)) !important; outline-offset: var(--graview-focus-offset, 2px) !important; }
|
|
9
|
-
[data-graview-view-root] [data-graview-ring-inside]:focus-visible { outline-offset: calc(-1 * max(2px, var(--graview-focus-width, 2px))) !important; }
|
|
10
|
-
[data-graview-view-root] .graview-sr { position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0 !important; border: 0 !important; overflow: hidden !important; clip-path: inset(50%) !important; white-space: nowrap !important; }
|
|
11
|
-
[data-graview-view-root] a[href]:not([data-graview-link])::after { content: " \u2197" !important; content: " \u2197" / " (opens in a new tab)" !important; }
|
|
12
|
-
`,V=4,oe=16;function ie(r){let t=r.ownerDocument.defaultView?.getComputedStyle(r);if(!t)return V;let l=Number.parseFloat(t.outlineWidth)||0,h=Math.max(0,Number.parseFloat(t.outlineOffset)||0);return Math.min(oe,Math.max(V,Math.ceil(l+h)))}var se=new Set(["Enter"," ","Escape","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End"]),$=["click","input","change","keydown"];function me(r,t){let l=r.ownerDocument,h=l.createElement("style");h.setAttribute("data-graview-region",""),h.textContent=re;let y=l.createElement("style");y.setAttribute("data-graview-view-style","");let g=l.createElement("div");g.setAttribute("data-graview-view-root",""),r.append(h,y,g);let E=H(g,{origin:t.origin,...t.asset?{asset:t.asset}:{},...t.imageOrigins?{imageOrigins:t.imageOrigins}:{},...t.picture?{picture:t.picture}:{},...t.link?{link:t.link}:{},...t.onRefused?{onRefused:t.onRefused}:{},...t.maxNodes!==void 0?{maxNodes:t.maxNodes}:{},...t.onOverBudget?{onOverBudget:t.onOverBudget}:{},decorate:(s,o,m)=>{m==="html"&&o==="button"&&s.setAttribute("type","button"),m==="html"&&(o==="input"||o==="textarea"||o==="select")&&s.setAttribute("autocomplete","off"),t.decorate?.(s,o,m)},...t.onFieldSet?{onFieldSet:t.onFieldSet}:{},...t.onAttribute?{onAttribute:t.onAttribute}:{}}),x=[],R="",S=s=>{for(let o=s.composedPath()[0];o&&o!==g&&o!==r;o=o.parentNode)if(o.nodeType===1&&E.idOf(o)!==void 0)return o},O=s=>{let o=S(s);if(!o||s.type==="keydown"&&!se.has(s.key))return;let m=t.before?.(s,o,g);if(m===!1)return;let w=o,b=o.namespaceURI==="http://www.w3.org/1999/xhtml"&&["input","select","textarea"].includes(o.localName);t.send({type:"dom-event",target:E.idOf(o),event:s.type,...b?{value:String(w.value??"")}:{},...b&&(w.type==="checkbox"||w.type==="radio")?{checked:w.checked}:{},...s.type==="keydown"?{key:s.key}:{},...m??{}});let k=s.type==="keydown"?s.key:void 0;(k==="Enter"||k===" ")&&o.hasAttribute("data-graview-press")&&s.composedPath()[0]===o&&(s.preventDefault(),t.send({type:"dom-event",target:E.idOf(o),event:"click"}))};for(let s of $)r.addEventListener(s,O);r.addEventListener("toggle",O,!0);let u=typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("overflow-clip-margin","4px");return r.addEventListener("focusin",s=>{let o=s.composedPath()[0],m=r.host;if(!o||o.nodeType!==1||!g.contains(o))return;let w=ie(o);if(u){m.style.setProperty("--graview-ring-reach",`${w}px`);return}let b=m.getBoundingClientRect(),k=o.getBoundingClientRect(),e=w*(m.offsetWidth>0?b.width/m.offsetWidth:1),a=k.left-b.left<e||b.right-k.right<e||k.top-b.top<e||b.bottom-k.bottom<e;o.toggleAttribute("data-graview-ring-inside",a)}),{apply(s,o){let m=r.activeElement,w=m?E.idOf(m):void 0,b=E.apply(s,o);if(w!==void 0&&r.activeElement!==m){let k=E.elementOf(w);k?.isConnected&&typeof k.focus=="function"&&k.focus({preventScroll:!0})}return b},style(s){let o=M(s);x.length=0;for(let m of o.refused)x.push({reason:"css",name:"stylesheet",css:m}),x.length>200&&x.shift();R=o.css,y.textContent=R},renderer:E,get refused(){return[...E.refused,...x]},get css(){return R},dispose(){for(let s of $)r.removeEventListener(s,O);r.removeEventListener("toggle",O,!0),E.dispose(),r.replaceChildren()}}}export{re as REGION_CSS,me as createOpenDrawing,ee as handedLinks,te as judgeLink,ne as linkRefusedWords,ie as ringReach};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as V,b as _,c as F,d as $}from"./chunk.R7ZZJOJW.js";import"./chunk.AI2HBKVP.js";import{G as ee,O as B,P as H,T as L,ba as K}from"./chunk.Q5IAXTF5.js";import"./chunk.SDO3U72B.js";import{Oc as T,R as z,Xa as N,Ya as I}from"./chunk.VOHRQXCF.js";import"./chunk.SLBWPVIY.js";import{b as A}from"./chunk.AJZBJBMO.js";function x(t,n){let r=N(t);return r==="agent"?"agent":r!=="human"&&r!=="visitor"?"app":t.onBehalfOf!==void 0?"person":t.id===void 0||n?.id===void 0||t.id===n.id?"you":"person"}var te=t=>t.ops.filter(n=>n.withheld!==!0);function U(t,n={}){let r=[];for(let e of t.batches()){let s=e.ops[0],d=e.ops.at(-1),c=te(e).length===0,h=c?void 0:_(e.ops),l=r.at(-1);if(h&&l?.typed&&l.author&&V(l.author,e.author)&&l.typed.node===h.node&&l.typed.field===h.field){let y=F(l.typed,h);r[r.length-1]={...l,seq:d.seq+1,at:d.at,batch:e.id,batches:[...l.batches??[],e.id],typed:y,said:$(y,t.schema,t.graph,!1)};continue}r.push({seq:d.seq+1,from:s.seq,at:d.at,batch:e.id,maker:c?"person":x(e.author,n.me),author:c?void 0:e.author,said:h?$(h,t.schema,t.graph,!1):e.intent,declaration:!1,withheld:c,...h?{batches:[e.id],typed:h}:{}})}let i=[...t.log.epochs().filter(e=>e.change!==void 0).map(e=>({seq:e.seq,sentence:e.change,...e.at?{at:e.at}:{}})),...n.declarations??[]];for(let e of i){if(e.seq<t.log.horizon||e.seq>t.log.length)continue;let s=r.findIndex(d=>d.seq===e.seq);if(s>=0&&!r[s].withheld){r[s]={...r[s],declaration:!0,said:e.sentence};continue}r.push({seq:e.seq,from:e.seq,at:e.at,batch:void 0,maker:e.author?x(e.author,n.me):"app",author:e.author,said:e.sentence,declaration:!0,withheld:!1})}return r.sort((e,s)=>e.seq-s.seq||+(e.batch!==void 0)-+(s.batch!==void 0))}function Y(t,n){let r=t.log.all(),i=new Map(r.map(e=>[e.id,e.seq]));return t.batches().filter(e=>!e.undone&&e.ops[0].seq>=n).filter(e=>!e.ops.every(s=>s.undoes!==void 0&&(i.get(s.undoes)??-1)>=n)).map(e=>e.id)}function G(t,n){return t.withheld?"Someone":t.maker==="you"?"you":t.author?I(t.author,n):"the app"}var p=A(ee(),1);var o=A(L(),1),ne={kind:"human"},ae=[1,2,4,8],re=900,R={you:"You",person:"A person",agent:"An agent",app:"The app"},X={you:"var(--graview-accent)",person:"var(--graview-ink-muted)",agent:"var(--graview-activity, var(--graview-good))",app:"var(--graview-edge-bright)"};function oe(t,n,r){let i=r?Array.from({length:n},(e,s)=>s):[];return[...new Set([...i,n,...t.map(e=>e.seq)])].sort((e,s)=>e-s)}function se(t,n){let r=t.withheld===!0;return{seq:t.seq+1,from:t.seq,at:t.at,batch:t.batch,maker:r?"person":x(t.author,n),author:r?void 0:t.author,said:t.batchIntent??t.intent,declaration:!1,withheld:r}}function ie(t,n){let r=0;for(let i=0;i<t.length;i++)t[i]<=n&&(r=i);return r}function de(t,n,r){let i=Y(t,n);if(i.length===0)return null;let e=t.canUndo(i);if(!e.ok)return null;let s=new Set(t.permittedMutations(r).map(d=>d.name));return e.ops.every(d=>d.mutation!==null&&s.has(d.mutation.name))?i:null}function be({face:t}){let n=B(),r=K(),i=r?.principal??ne,e=H(n.live,i),s=e.log.length,d=(0,p.useMemo)(()=>U(e,{me:i,...n.host?.declarations?{declarations:n.host.declarations}:{}}),[e,i,n.host,s]),c=e.log.horizon,h=c>0&&n.host?.archived!==void 0,l=(0,p.useMemo)(()=>oe(d,c,h),[d,c,h]),y=n.archive,m=y?.seq??n.past?.seq??s,v=ie(l,m),f=l.length-1,M=m<c&&n.past?.seq===m?n.past.store.log.all().at(-1):void 0,k=M?se(M,i):m<c?void 0:[...d].reverse().find(a=>a.seq<=m&&a.seq>(l[v-1]??-1))??[...d].reverse().find(a=>a.seq<=m),[w,q]=(0,p.useState)(!1),[P,J]=(0,p.useState)(1),[D,E]=(0,p.useState)(null);(0,p.useEffect)(()=>{if(!w)return;if(v>=f){q(!1);return}let a=setTimeout(()=>n.show(l[v+1]),re/P);return()=>clearTimeout(a)},[w,v,f,P,l,n]);let j=(0,p.useMemo)(()=>n.past&&!y&&m>=c?de(e,m,i):null,[n.past,y,e,m,c,i,s]),C=a=>G(a,{graph:e.graph,schema:e.schema,...r?.seats?{seats:r.seats}:{},...r?.people?{people:r.people}:{}}),g=n.past?n.past.at?z(n.past.at,r?.locale):"the start":null,O=y?y.refused?"The archive could not be read":"Reading the older changes from the archive\u2026":k?`${C(k)==="you"?"You":C(k)}: ${k.said}`:"Nothing had happened yet",W=(0,p.useRef)(null);(0,p.useLayoutEffect)(()=>{let a=W.current,b=a?.parentElement;if(t!=="scene"||!a||!b)return;let u=()=>b.style.setProperty("--graview-sheet",`${Math.ceil(a.getBoundingClientRect().height)+24}px`);u();let S=typeof ResizeObserver>"u"?null:new ResizeObserver(u);return S?.observe(a),()=>{S?.disconnect(),b.style.removeProperty("--graview-sheet")}},[t]);let Q=t==="scene"?{position:"absolute",left:"50%",bottom:12,transform:"translateX(-50%)",width:"min(720px, calc(100% - 32px))",zIndex:T("rail")}:{position:"sticky",top:0,zIndex:T("rail"),margin:"0 auto 12px",maxWidth:960,width:"100%"};return(0,o.jsxs)("section",{ref:W,"aria-label":"Timeline","data-testid":"timeline","data-graview-past":n.past?String(n.past.seq):"now","data-graview-offstage":"",style:{...Q,boxSizing:"border-box",display:"grid",gap:8,padding:"10px 12px",borderRadius:10,border:"1px solid var(--graview-edge)",background:"var(--graview-float)",boxShadow:"var(--graview-lift-high)",color:"var(--graview-ink)",fontSize:"0.8125rem"},children:[(0,o.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"baseline",gap:"4px 12px"},children:[(0,o.jsx)("strong",{"data-testid":"as-of",role:"status",style:{fontWeight:600},children:y?"Archived changes":g?`As of ${g}`:"Now"}),(0,o.jsx)("span",{"data-testid":"timeline-caption",style:{color:"var(--graview-ink-muted)",minWidth:0,overflowWrap:"anywhere"},children:O}),g?(0,o.jsx)("span",{style:{color:"var(--graview-ink-faint)"},"data-testid":"past-read-only",children:"Nothing changes while you look back."}):null]}),(0,o.jsxs)("div",{style:{position:"relative",height:22},"aria-hidden":"true",children:[h?(0,o.jsx)("span",{"data-testid":"timeline-archived",title:"Changes read from the archive as you scrub back",style:{position:"absolute",left:0,bottom:0,height:6,width:`${f===0?0:l.indexOf(c)/f*100}%`,borderRadius:2,background:"var(--graview-edge)"}}):null,l.slice(1).map((a,b)=>{let u=[...d].reverse().find(Z=>Z.seq===a);if(!u)return null;let S=f===0?0:(b+1)/f*100;return(0,o.jsx)("span",{"data-graview-tick":a,"data-maker":u.maker,...u.declaration?{"data-declaration":""}:{},title:`${R[u.maker]}: ${u.said}`,style:{position:"absolute",left:`calc(${S}% - 1px)`,bottom:0,width:u.declaration?4:2,height:u.declaration?22:12,borderRadius:2,background:u.declaration?"var(--graview-ink)":X[u.maker],opacity:a<=m?1:.45}},`${a}:${u.batch??"declaration"}`)})]}),(0,o.jsx)("input",{type:"range","data-testid":"scrubber","aria-label":"Moment",min:0,max:f,step:1,value:v,"aria-valuetext":g?`As of ${g}. ${O}`:`Now. ${O}`,onChange:a=>{q(!1),n.show(l[Number(a.currentTarget.value)]??s)},style:{width:"100%",margin:0,accentColor:"var(--graview-accent)"}}),(0,o.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:8},children:[(0,o.jsx)("button",{type:"button","data-testid":"play","aria-pressed":w,onClick:()=>{!w&&v>=f&&n.show(l[0]),q(!w)},style:{minHeight:28,minWidth:64},children:w?"Pause":"Play"}),(0,o.jsxs)("label",{style:{display:"inline-flex",alignItems:"center",gap:6,color:"var(--graview-ink-muted)"},children:["Speed",(0,o.jsx)("select",{"data-testid":"speed",value:P,onChange:a=>J(Number(a.currentTarget.value)),style:{minHeight:28},children:ae.map(a=>(0,o.jsxs)("option",{value:a,children:[a,"\xD7"]},a))})]}),(0,o.jsx)("span",{"aria-hidden":"true",style:{display:"inline-flex",gap:10,color:"var(--graview-ink-faint)",flexWrap:"wrap"},children:Object.keys(R).filter(a=>d.some(b=>b.maker===a)).map(a=>(0,o.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:4},children:[(0,o.jsx)("span",{style:{width:8,height:8,borderRadius:2,background:X[a]}}),R[a]]},a))}),(0,o.jsxs)("span",{style:{marginLeft:"auto",display:"inline-flex",gap:8},children:[j?(0,o.jsx)("button",{type:"button","data-testid":"restore-here",title:"Take back every change since, as one change you can undo",onClick:()=>{E(null);try{e.undo([...j],{author:i,intent:g?`Restore to ${g}`:"Restore"}),n.show(null)}catch(a){E(a instanceof Error?a.message:String(a))}},style:{minHeight:28},children:"Restore to here"}):null,(0,o.jsx)("button",{type:"button","data-testid":"back-to-now",onClick:()=>n.show(null),style:{minHeight:28},children:"Back to now"})]})]}),D?(0,o.jsx)("span",{role:"alert","data-testid":"restore-refused",style:{color:"var(--graview-warn)"},children:D}):null,y?.refused?(0,o.jsx)("span",{role:"alert","data-testid":"archive-refused",style:{color:"var(--graview-warn)"},children:y.refused}):null,c>0&&!h?(0,o.jsx)("span",{"data-testid":"timeline-horizon",style:{color:"var(--graview-ink-faint)"},children:"The changes before the timeline's start were archived."}):null]})}export{be as Timeline};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o}from"./chunk.4LI73QOY.js";import"./chunk.G4JJXA63.js";import"./chunk.VGTEEANA.js";import"./chunk.SZCZD2GM.js";import"./chunk.XLM4ONUB.js";import"./chunk.XOZU4OFA.js";import"./chunk.C7EEYSAM.js";import"./chunk.Q5WEOX3Q.js";import"./chunk.CHMUL36A.js";import"./chunk.U6PCKJ26.js";import"./chunk.FEBCIEI3.js";import"./chunk.WVUJXDXZ.js";import"./chunk.QRCTTDDQ.js";import"./chunk.3TME4BG3.js";import"./chunk.I43ONAEL.js";import"./chunk.73EKJ4JN.js";import"./chunk.INL4OZI7.js";import"./chunk.5WU2UTP7.js";import"./chunk.CV4QA4ZF.js";import"./chunk.OYRZ2DEI.js";import"./chunk.7EA7THSM.js";import"./chunk.VOHRQXCF.js";import"./chunk.SLBWPVIY.js";import"./chunk.AJZBJBMO.js";export{i as draftAnswer,h as draftFromLens,b as draftSight,l as draftView,a as isDraftFailure,c as judgeLens,d as lensEditOf,f as lensFromSpec,j as recipeDraft,g as recipeOfLens,m as refineDraft,o as runDraftTool,e as takeBackEditOf,k as templateDraft,n as withReaderLenses};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as c,b as d,c as e,d as f,e as g,f as h,g as i,h as j,i as k,j as l,k as m,l as n,m as o,n as p}from"./chunk.63SRVTG2.js";import{a,b}from"./chunk.C4EPMV7O.js";import"./chunk.G7XKQNOL.js";import"./chunk.7KZ44FEU.js";import"./chunk.CV4QA4ZF.js";import"./chunk.OYRZ2DEI.js";import"./chunk.7EA7THSM.js";import"./chunk.AI2HBKVP.js";import"./chunk.Q5IAXTF5.js";import"./chunk.SDO3U72B.js";import"./chunk.VOHRQXCF.js";import"./chunk.SLBWPVIY.js";import"./chunk.AJZBJBMO.js";export{j as ARRANGE_NARROW,o as ArrangeBar,e as CHIP_FIELDS,d as MANY_AT_THE_FAR_END,c as TYPED_FROM,p as arrangementCaption,a as arrangementOf,i as chipOffers,m as directionWords,g as farCount,f as farCounts,l as inSentence,h as offeredFilters,n as preloadArrangeLists,k as sayCondition,b as withArrangement};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as I,c as x}from"./chunk.7UXDIEPK.js";import"./chunk.AI2HBKVP.js";import{b,c as A,j as v,q as w,s as O,v as G}from"./chunk.Q5IAXTF5.js";import"./chunk.SDO3U72B.js";import{Fd as E,Md as S,Nd as W,pd as k}from"./chunk.VOHRQXCF.js";import"./chunk.SLBWPVIY.js";import"./chunk.AJZBJBMO.js";var F=(e,i)=>k(e,i).slice(1);function j(e,i){let l=e.split("/").filter(Boolean);return l.length===i.length&&l.every((s,h)=>s.startsWith(":")||s==="*"||s===i[h])}var $=["problems","search","map","places"];function R(e,i,l,s,h=[]){let{schema:r}=i,o=r.kinds,f=t=>{if(t.startsWith(w))return(t.slice(w.length).split("|")[0]??"").split("+").every(V=>o.includes(V));let y=O(t);return y!==null?o.includes(y):t.startsWith("edge:")||l.graph.getNode(t)!==void 0},[p="/",u]=e.path.split("?"),n=p.split("/").filter(Boolean),m=u?`?${u}`:"",d=n.length>0&&!$.includes(n[0])?o.find(t=>F(r,t)===n[0]):void 0,c=e.path;if(n[0]==="places"&&n.length===2)`/places/${n[1]}`!==E&&!s.some(t=>t.as===decodeURIComponent(n[1]))&&(c="/");else if(d){let t=n[1]===void 0?void 0:decodeURIComponent(n[1]);c=`/${F(r,d)}${t!==void 0&&l.graph.getNode(t)?.kind===d?`/${n[1]}`:""}${m}`}else n.length>0&&n.length<=2&&!$.includes(n[0])&&!h.some(t=>j(t.path,n))&&(c="/");let g=A(e.stop),P=g.within?.view,U=P!==void 0&&!s.some(t=>t.as===P),a=g;if(U){let{view:t,...y}=g.within??{};a={...a,within:y}}if(g.focusId&&!f(g.focusId)){let t=e.kind&&o.includes(e.kind)?G(e.kind):null;a={...v(a,t),zoom:!1}}return a={...a,relation:a.relation&&(o.includes(a.relation)||r.edgeKinds.includes(a.relation))?a.relation:null,expanded:a.expanded.filter(f),pins:Object.fromEntries(Object.entries(a.pins).filter(([t])=>f(t))),...a.selection?{selection:a.selection.filter(f)}:{}},{face:e.face,path:c,stop:b(a),...e.kind?{kind:e.kind}:{}}}function B(e,i,l){let s=e.at,h=e.pages?.routes()??[];if(e.routing!=="address"||typeof window>"u")return R(s,e.app,i,l,h);let{pathname:r,search:o,hash:f}=window.location,p=W(r,e.basePath),u=I({routing:"address",...e.basePath===void 0?{}:{basePath:e.basePath},face:s.face}),n=u==="pages",m={...s,face:u,...p===null?{}:n?{path:p+o}:{stop:x(e.basePath)??s.stop}},d=R(m,e.app,i,l,h),c=n?d.path===m.path?null:S(d.path,e.basePath===void 0?{}:{basePath:e.basePath}):d.stop===b(A(m.stop))?null:r+o+d.stop;return p!==null&&c!==null&&c!==r+o+f&&window.history.replaceState(window.history.state,"",c),d}export{R as settle,B as settleAt};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk.KHRS2SKB.js";import"./chunk.25VJPUDH.js";import"./chunk.NB6WN4DO.js";import"./chunk.MBNZ2HK7.js";import"./chunk.NHIPVAGR.js";import{a as L,b as R,c as N}from"./chunk.R6FHEEJ7.js";import{b as T}from"./chunk.LESRQN3Y.js";import"./chunk.7UJZP3YK.js";import"./chunk.R77TACXU.js";import"./chunk.JOWJNIWH.js";import"./chunk.6JERQFZI.js";import"./chunk.7XJ3XQZD.js";import"./chunk.52J42KR5.js";import"./chunk.T2Q3AAQI.js";import"./chunk.63SRVTG2.js";import"./chunk.C4EPMV7O.js";import"./chunk.G7XKQNOL.js";import"./chunk.7KZ44FEU.js";import"./chunk.HJCQ6I3S.js";import"./chunk.JQBP6QWQ.js";import"./chunk.I2W7HSBU.js";import"./chunk.BJL6EL6B.js";import"./chunk.Y37DXEHG.js";import"./chunk.DXZ5VYCQ.js";import"./chunk.J2R55TM7.js";import"./chunk.KPUX27ZT.js";import"./chunk.DIS7JS7X.js";import"./chunk.D2T563AA.js";import"./chunk.JV7FLVUV.js";import"./chunk.GL3YVGAP.js";import"./chunk.VGTEEANA.js";import"./chunk.SZCZD2GM.js";import"./chunk.7FZY5E2U.js";import"./chunk.7354O67H.js";import"./chunk.XLM4ONUB.js";import"./chunk.XOZU4OFA.js";import"./chunk.C7EEYSAM.js";import"./chunk.ZJXUWOG3.js";import"./chunk.TI4OSTQV.js";import"./chunk.FEBCIEI3.js";import"./chunk.WVUJXDXZ.js";import"./chunk.QRCTTDDQ.js";import"./chunk.3TME4BG3.js";import"./chunk.I43ONAEL.js";import"./chunk.73EKJ4JN.js";import"./chunk.INL4OZI7.js";import"./chunk.5WU2UTP7.js";import"./chunk.GZHZLJBF.js";import{r as C}from"./chunk.YKACMLLU.js";import"./chunk.OJGHDWI6.js";import"./chunk.337JMOTL.js";import"./chunk.CV4QA4ZF.js";import"./chunk.OYRZ2DEI.js";import"./chunk.7EA7THSM.js";import"./chunk.AI2HBKVP.js";import{G as S,I as $,T as p,aa as x,ca as A}from"./chunk.Q5IAXTF5.js";import"./chunk.SDO3U72B.js";import{Oc as k,ca as h}from"./chunk.VOHRQXCF.js";import"./chunk.SLBWPVIY.js";import{b as i}from"./chunk.AJZBJBMO.js";var r=i(S(),1);var l=i(S(),1);var g=i(p(),1);var m={font:"inherit",fontSize:"0.875rem",minHeight:24,padding:0,border:0,borderRadius:2,background:"transparent",boxShadow:"none",color:"var(--graview-accent)",textDecoration:"underline",textUnderlineOffset:3,textAlign:"start",cursor:"pointer"};var e=i(p(),1);function Y({page:n=!1,go:E,onPick:y,onDiscard:D}){let{store:d,seatTalk:c}=x(),u=$(c),M=N(),b=E??M,{keep:P}=L(b),[H,f]=(0,r.useState)(!1);A();let t=u.draft;(0,r.useEffect)(()=>f(!1),[t]),(0,r.useEffect)(()=>{n||R(!1)},[n]);let v=(0,r.useRef)(null),w=t!==null&&!n;if((0,r.useLayoutEffect)(()=>{let s=v.current;if(!w||!s?.parentElement)return;let o=[];for(let a=s.previousElementSibling;a;a=a.previousElementSibling)a instanceof HTMLElement&&!a.inert&&a.tagName!=="STYLE"&&(a.inert=!0,o.push(a));return()=>{for(let a of o)a.inert=!1}},[w]),!t)return null;let G=T(t.drawn),F=d.schema.tryDefinition(t.kind),q=d.graph.nodesOfKind(t.kind).filter(s=>h(F,s)),z=()=>{c.setDraft(null),D?.()};return(0,e.jsxs)("section",{ref:v,"data-testid":"draft-frame","data-graview-draft-frame":n?"page":"scene","aria-label":`Draft: ${t.title}`,style:n?{display:"grid",gap:12,minWidth:0}:{position:"absolute",inset:12,zIndex:k("rail"),display:"grid",gridTemplateRows:"auto auto minmax(0, 1fr)",background:"var(--graview-panel)",border:"1px solid var(--graview-edge)",borderRadius:12,boxShadow:"var(--graview-lift-high)",overflow:"hidden",minHeight:0},children:[(0,e.jsxs)("p",{"data-testid":"draft-line",style:{...K,...n?{}:{padding:"10px 16px"}},children:[n?(0,e.jsx)("span",{children:"Draft"}):(0,e.jsxs)("span",{children:["Draft \u2014 ",(0,e.jsx)("span",{"data-testid":"draft-title",style:{color:"var(--graview-ink)",fontWeight:600},children:t.title})]}),(0,e.jsx)("span",{"aria-hidden":"true",children:"\xB7"}),(0,e.jsx)("button",{type:"button","data-testid":"draft-keep",disabled:H,title:`Keep \u201C${t.title}\u201D as a lens: a place of its own`,onClick:()=>{f(!0),P(t).finally(()=>f(!1))},style:m,children:"Keep as a lens"}),(0,e.jsx)("span",{"aria-hidden":"true",children:"\xB7"}),(0,e.jsx)("button",{type:"button","data-testid":"draft-discard",onClick:z,style:m,children:"Discard"})]}),u.draftNote?(0,e.jsx)("p",{"data-testid":"draft-note",role:"status",style:{margin:0,padding:n?0:"0 16px 8px",fontSize:"0.8125rem",color:"var(--graview-warn)"},children:u.draftNote}):(0,e.jsx)("span",{}),(0,e.jsx)("div",{"data-testid":"draft-lens","data-graview-draft":t.lens.name,role:"group","aria-label":t.title,tabIndex:0,style:n?{height:"min(72vh, 760px)",display:"grid",gridTemplateRows:"minmax(0, 1fr)",overflow:"auto",scrollbarGutter:"stable",border:"1px solid var(--graview-edge)",borderRadius:12,background:"var(--graview-panel)"}:{minHeight:0,overflow:"auto",scrollbarGutter:"stable",display:"grid",gridTemplateRows:"minmax(0, 1fr)"},onClick:s=>{let o=s.target?.closest("[data-graview-pick]")?.getAttribute("data-graview-pick");if(!o||!d.graph.getNode(o))return;s.preventDefault();let a=d.graph.getNode(o);y?(c.setDraft(null),y(o)):b({to:"record",id:o,kind:a.kind,label:o,address:"",said:""})},children:(0,e.jsx)(C,{kind:t.kind,view:t.title,children:(0,e.jsx)(G,{nodes:q,label:t.title,fidelity:"full",cardinality:"many",mode:"fullscreen",selected:!1})})})]})}var K={margin:0,display:"flex",flexWrap:"wrap",alignItems:"baseline",gap:"4px 8px",fontSize:"0.875rem",color:"var(--graview-ink-muted)",borderBottom:"1px solid var(--graview-edge)",paddingBottom:8};export{Y as DraftFrame};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{a as y}from"./chunk.DGWNVDZB.js";import{D as v,G as I,T as h,aa as w}from"./chunk.Q5IAXTF5.js";import{Ya as g}from"./chunk.VOHRQXCF.js";import{b as d}from"./chunk.AJZBJBMO.js";var k=d(I(),1);var t=d(h(),1),r={display:"inline-flex",alignItems:"center",minHeight:24,minWidth:24,padding:"1px 8px",fontSize:"0.75rem"};function E({shows:e,onShows:i,mine:a,onMine:l}){let o={all:"All",changes:"Changes",ai:"AI"};return(0,t.jsxs)("div",{"data-testid":"activity-filter",role:"group","aria-label":"Show",style:{display:"flex",flexWrap:"wrap",gap:4,alignItems:"center"},children:[["all","changes","ai"].map(s=>(0,t.jsx)("button",{type:"button","data-shows":s,"aria-pressed":e===s,onClick:()=>i(s),style:{...r,...e===s?{borderColor:"var(--graview-accent)",color:"var(--graview-ink)"}:{}},children:o[s]},s)),(0,t.jsx)("button",{type:"button","data-testid":"activity-mine","aria-pressed":a,onClick:()=>l(!a),style:{...r,marginLeft:"auto",...a?{borderColor:"var(--graview-accent)",color:"var(--graview-ink)"}:{}},children:"Just mine"})]})}var x=e=>e.ask.kind==="suggest"?"suggest":e.ask.kind==="fill"?"fill in":e.ask.kind==="record"?"add one":e.ask.kind==="panel"?"draw a panel":`answer \u201C${e.ask.said}\u201D`;function $(e){let i=e.offered.filter(a=>e.accepted?.includes(a.id)).map(a=>a.label);switch(e.outcome){case"accepted":return i.length>0?`Took ${i.join(", ")}`:"Taken";case"partly":return`Took ${i.length} of ${e.offered.length}: ${i.join(", ")}`;case"dismissed":return"Dismissed";case"drawn":return e.panel?`Drew \u201C${e.panel.title}\u201D`:"Drew a panel";case"failed":return e.failed??"Failed";default:return"Offered, not yet taken"}}function C(e){let i=[...new Set((e.usage??[]).map(o=>o.model))];if(i.length===0)return null;let a=(e.usage??[]).flatMap(o=>o.costUsd===void 0?[]:[o.costUsd]),l=a.length>0?a.reduce((o,s)=>o+s,0):void 0;return`${i.join(", ")}${l!==void 0?` \xB7 $${l<.01?l.toPrecision(2):l.toFixed(2)}`:""}`}function F({entry:e,undo:i}){let{store:a,principal:l,seats:o,people:s,ai:b}=w(),c=y(),[p,u]=(0,k.useState)(!1),A=e.by.kind==="human"&&e.by.onBehalfOf===void 0&&(e.by.id===void 0||l.id===void 0||e.by.id===l.id)?"you":g(e.by,{graph:a.graph,schema:a.schema,seats:o,people:s}),f=C(e),S=v(b),m=n=>{u(!0),(__graviewPreload(import.meta.url,["./chunk.7IOC6U3C.js","./chunk.7FZY5E2U.js","./chunk.7354O67H.js","./chunk.XLM4ONUB.js","./chunk.XOZU4OFA.js","./chunk.C7EEYSAM.js","./chunk.DGWNVDZB.js","./chunk.TI4OSTQV.js","./chunk.3TME4BG3.js","./chunk.CV4QA4ZF.js","./chunk.OYRZ2DEI.js","./chunk.7EA7THSM.js","./chunk.AI2HBKVP.js","./chunk.Q5IAXTF5.js","./chunk.SDO3U72B.js","./chunk.VOHRQXCF.js","./chunk.SLBWPVIY.js","./chunk.AJZBJBMO.js"]),import("./chunk.2EB7COX5.js")).then(n).finally(()=>u(!1))};return(0,t.jsxs)("li",{"data-testid":"activity-interaction","data-interaction":e.id,"data-outcome":e.outcome,style:{display:"grid",gap:3,lineHeight:1.45},children:[(0,t.jsx)("div",{style:{display:"flex",alignItems:"baseline",gap:6},children:(0,t.jsxs)("span",{style:{minWidth:0},children:[(0,t.jsx)("strong",{style:{fontWeight:600},children:A})," ",(0,t.jsxs)("span",{style:{color:"var(--graview-ink-muted)"},children:["asked AI to ",x(e)]}),(0,t.jsxs)("span",{style:{color:"var(--graview-ink-faint)"},children:[" \xB7 ",e.targetLabel]})]})}),e.offered.length>0&&e.outcome!=="accepted"&&e.outcome!=="partly"?(0,t.jsxs)("div",{"data-testid":"interaction-offered",style:{color:"var(--graview-ink-muted)"},children:["Offered ",e.offered.map(n=>n.label).join(", ")]}):null,(0,t.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:6,flexWrap:"wrap"},children:[(0,t.jsx)("span",{"data-testid":"interaction-outcome",style:{color:e.outcome==="failed"?"var(--graview-warn)":"var(--graview-ink)"},children:$(e)}),(e.batches??[]).map(n=>(0,t.jsx)("span",{"data-interaction-batch":n,style:{marginLeft:"auto"},children:i(n)},n))]}),f?(0,t.jsx)("div",{"data-testid":"interaction-model",style:{fontSize:"0.75rem",color:"var(--graview-ink-faint)"},children:f}):null,S?(0,t.jsxs)("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:[e.panel?(0,t.jsx)("button",{type:"button","data-testid":"interaction-reopen",disabled:p,onClick:()=>m(n=>n.drawPanel(c,e.panel)),style:r,children:"Show the panel"}):null,(0,t.jsx)("button",{type:"button","data-testid":"interaction-again",disabled:p,onClick:()=>m(n=>n.askAgain(c,e)),style:r,children:"Ask again"})]}):null]})}export{E as a,F as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as U,b as X,c as L}from"./chunk.KVEDMKUN.js";import{a as O,b as R}from"./chunk.J263VQF5.js";import{a as _,e as Q}from"./chunk.RWCWRJJC.js";import{e as q,f as z,g as J}from"./chunk.NVNQSZ43.js";import"./chunk.FJEXINFF.js";import{G as K,Ha as I,Ia as M,M as T,O as G,T as D,ba as x,ia as v,la as V,ma as H,oa as C,qa as j}from"./chunk.Q5IAXTF5.js";import"./chunk.SDO3U72B.js";import"./chunk.VOHRQXCF.js";import"./chunk.SLBWPVIY.js";import{b}from"./chunk.AJZBJBMO.js";var a=b(K(),1);var s=b(D(),1),Y=e=>({...e.node?{node:{id:e.node.id}}:{},...e.nodes?{nodes:e.nodes.map(t=>({id:t.id}))}:{},...e.label!==void 0?{label:e.label}:{},fidelity:e.fidelity,cardinality:e.cardinality,mode:e.mode,selected:e.selected,...e.implicated?{implicated:e.implicated}:{},...e.flagged?{flagged:e.flagged}:{}});function B(e){let t=G(),r=t?.past?.seq,i=t?.host?.viewAt,n=(0,a.useMemo)(()=>r===void 0||!i||e.draft?void 0:i(e.manifest.name,r),[i,r,e]);return(0,a.useMemo)(()=>n===null?null:n===void 0?e:{...e,worker:n},[n,e])}function E({definition:e,store:t,principal:r,input:i,goTo:n,places:o,scheme:c,brand:l,onFailure:u,drawsItsOwn:m,tick:f}){let p=(0,a.useRef)(null),w=(0,a.useRef)(null),y=T(),k=(0,a.useContext)(M),d=(0,a.useRef)({input:i,goTo:n,places:o,onFailure:u,brand:l,hostFiles:y,told:k});d.current={input:i,goTo:n,places:o,onFailure:u,brand:l,hostFiles:y,told:k},(0,a.useEffect)(()=>{let P=p.current;if(!P)return;let A=e.file??(d.current.hostFiles?.src?g=>d.current.hostFiles?.src?.(g)??g:void 0);typeof e.worker=="function"&&L(e.worker).catch(()=>{});let N=R(O,({mountWorkerView:g})=>{w.current=g(P,{manifest:e.manifest,worker:e.worker,store:t,principal:r,input:()=>d.current.input?.()??{},goTo:()=>d.current.goTo,places:()=>d.current.places?.()??[],brand:()=>d.current.brand,onFailure:(W,$)=>d.current.onFailure(W,$),...m?{fallback:!1}:{},...e.limits?{limits:e.limits}:{},...e.author?{author:e.author}:{},...e.onProblem?{onProblem:e.onProblem}:{},...e.asset?{asset:e.asset}:{},...A?{file:A}:{},...e.images?{images:e.images}:{},...e.links?{links:e.links}:{},files:()=>d.current.hostFiles,onContentHeight:W=>d.current.told?.(W)})});return()=>{N(),w.current?.dispose(),w.current=null}},[e,t,r]),(0,a.useEffect)(()=>w.current?.update(),[c,l,f]);let h=(0,s.jsx)("div",{ref:p,"data-worker-view-place":e.manifest.name});if(!e.draft)return h;let F=e.manifest.title??e.manifest.name;return(0,s.jsxs)("div",{role:"group","aria-label":`Draft: ${F}`,"data-graview-draft-view":e.manifest.name,style:{display:"grid",gap:8,alignContent:"start",minWidth:0},children:[(0,s.jsxs)("p",{"data-testid":"draft-view-line",style:Z,children:[(0,s.jsxs)("span",{children:["Draft \u2014 ",(0,s.jsx)("span",{style:{color:"var(--graview-ink)",fontWeight:600},children:F})]}),(0,s.jsx)("span",{"aria-hidden":"true",children:"\xB7"}),(0,s.jsx)("span",{children:"Not kept"})]}),h]})}var Z={margin:0,display:"flex",flexWrap:"wrap",alignItems:"baseline",gap:"4px 8px",fontSize:"0.875rem",color:"var(--graview-ink-muted)",borderBottom:"1px solid var(--graview-edge)",paddingBottom:8};function S(e,t={}){let r=t.fallback,i=e.manifest.replaces==="page";function n(o){let c=x(),l=v(),u=(0,a.useContext)(I),[m,f]=(0,a.useState)(null),p=(0,a.useRef)(o);p.current=o;let w=B(e);if(!c)return null;if(w===null)return r&&!(u&&V(r)&&!i)?(0,s.jsx)(r,{...o}):null;if(m&&r)return u&&V(r)&&!i?null:(0,s.jsx)(r,{...o});let y=t.beside&&!(u&&V(t.beside))?t.beside:void 0,k=(0,s.jsx)(E,{definition:w,store:c.store,principal:c.principal,input:()=>Y(p.current),goTo:l,places:()=>c.views.places(),scheme:c.scheme,brand:c.brand,tick:o,drawsItsOwn:r!==void 0,onFailure:(d,h)=>{f(d),e.onFailure?.(d,h)}});return y?(0,s.jsxs)("div",{"data-worker-view-beside":e.manifest.name,style:{display:"grid",gap:12,minWidth:0},children:[k,(0,s.jsx)(y,{...o})]}):k}return n.displayName=`WorkerView(${e.manifest.name})`,n}function ee(e,t){let{manifest:r}=t;if(r.attach==="home"){if(!e.home)throw new Error(`The worker view "${r.name}" is the home's body: draw it with workerHome, on the home.`);let m=t.draft?void 0:e.homeView?.(),f=S(t,m?{fallback:m}:{});return e.home(r.bleed===!0?C(f):f),e}let i={cardinality:r.cardinality,fidelity:"full"},n=e.lookup(r.attach,i)??e.resolve(r.attach,i)?.view,o=r.cardinality==="one",c=t.draft===!0,l=S(t,{...n&&!c?{fallback:n}:{},...o&&r.replaces!=="page"&&n?{beside:n}:{}});o&&r.replaces==="page"&&H(l);let u=n?.says;return o&&r.replaces!=="page"&&typeof u=="function"&&(l.says=u),r.bleed===!0&&C(l),l.flows=r.flows!==!1,j(l,r.scene?.maxHeight!==void 0?{maxHeight:r.scene.maxHeight}:{}),e.register(r.attach,i,l,r.title?{title:r.title,...c?{}:{name:r.name},lens:"view",...r.reads?.kinds?.length?{reads:r.reads.kinds}:{}}:void 0),e}function re(e,t={}){let r=t.fallback;function i({context:n}){let o=x(),c=v(),[l,u]=(0,a.useState)(null),m=B(e);return(l||m===null)&&r?(0,s.jsx)(r,{context:n}):m===null?null:(0,s.jsx)(E,{definition:m,store:n.store,principal:n.principal??o?.principal??{kind:"human"},goTo:c,...o?{places:()=>o.views.places(),scheme:o.scheme,brand:o.brand}:{},drawsItsOwn:r!==void 0,onFailure:(f,p)=>{u(f),e.onFailure?.(f,p)}})}return i.displayName=`WorkerHome(${e.manifest.name})`,i}export{z as checkManifest,U as checkViewSource,Q as judgeCodeAct,q as manifestActs,ee as registerWorkerView,_ as sightIsTotal,X as viewScript,re as workerHome,S as workerView,J as workerViewProps};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as b,b as c,c as d,d as e,e as f}from"./chunk.CHMUL36A.js";import"./chunk.U6PCKJ26.js";import"./chunk.I43ONAEL.js";import"./chunk.INL4OZI7.js";import"./chunk.5WU2UTP7.js";import{Ab as a}from"./chunk.VOHRQXCF.js";import"./chunk.SLBWPVIY.js";import"./chunk.AJZBJBMO.js";export{a as ActRefusal,e as compileDocumentWithoutCheck,d as effectsOf,f as inDocumentWords,c as kindShapes,b as readDocument};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as U}from"./chunk.GL3YVGAP.js";import"./chunk.AI2HBKVP.js";import{G as ne,T as z,aa as R,da as $}from"./chunk.Q5IAXTF5.js";import"./chunk.SDO3U72B.js";import{Pd as K,ob as W}from"./chunk.VOHRQXCF.js";import"./chunk.SLBWPVIY.js";import{b as L}from"./chunk.AJZBJBMO.js";var p=L(ne(),1);function b(e,t,a=!1){if(e<t.at||e===t.at&&a)return e;let o=t.at+t.removed.length;return e>=o?e+t.inserted.length-t.removed.length:a?t.at:t.at+t.inserted.length}var F=e=>e>=55296&&e<=56319,_=e=>e>=56320&&e<=57343;function X(e,t,a){let o=Math.min(e.length,t.length),n=0,l=Math.max(0,Math.min(o,t.length-a));for(;n<l&&e.charCodeAt(e.length-1-n)===t.charCodeAt(t.length-1-n);)n++;let r=0;for(;r<o-n&&e.charCodeAt(r)===t.charCodeAt(r);)r++;return r>0&&F(e.charCodeAt(r-1))&&r--,n>0&&_(e.charCodeAt(e.length-n))&&n--,{at:r,removed:e.slice(r,e.length-n),inserted:t.slice(r,t.length-n)}}function A(e,t){let a=Math.min(e.length,t.length),o=0;for(;o<a&&e.charCodeAt(o)===t.charCodeAt(o);)o++;o>0&&F(e.charCodeAt(o-1))&&o--;let n=0;for(;n<a-o&&e.charCodeAt(e.length-1-n)===t.charCodeAt(t.length-1-n);)n++;return n>0&&_(e.charCodeAt(e.length-n))&&n--,{at:o,removed:e.slice(o,e.length-n),inserted:t.slice(o,t.length-n)}}function Y(e,t){let a=s=>s.at+s.removed.length;if(a(e)<t.at)return e;if(e.at>a(t))return{...e,at:e.at+t.inserted.length-t.removed.length};let o=Math.min(e.at,t.at),n=a(e)-a(t),l=e.removed.slice(0,t.at-o)+t.inserted+(n>0?e.removed.slice(e.removed.length-n):""),r=t.at<=e.at?t.inserted+e.inserted:e.inserted+t.inserted,d=A(l,r);return{...d,at:o+d.at}}function V(e,t){let a=b(e.start,t,!0),o=e.end===e.start?a:b(e.end,t);return{start:a,end:Math.max(a,o)}}function re(e,t){let{kind:a,id:o,session:n}=e.author,l=`${a}:${o??""}:`;return t.startsWith(l)&&(!n||t.slice(l.length)===n)}function q(e,t,a,o){let n=e.anchor,l=e.head;for(let d of a)if(!(d.seq<e.rev||re(d,t)))for(let s of d.primitives)s.op!=="splice-text"||s.id!==e.node||s.field!==e.field||(n=b(n,s),l=b(l,s));let r=d=>Math.max(0,Math.min(o,d));return{start:r(n),end:r(l)}}var M=(e,t,a)=>e.ops.length>0&&e.ops.every(o=>{let n=o.mutation?.args;return o.mutation?.name===W&&n?.node===t&&n.field===a}),oe=(e,t,a,o)=>t.ops.length>0&&t.ops.every(n=>n.undoes!==void 0)&&e.batches().some(n=>t.ops.some(l=>l.undoes===n.id||l.undoes===n.ops[0]?.id)&&M(n,a,o)),G=(e,t)=>e.author.kind==="human"&&(t?.id===void 0||e.author.id===void 0||e.author.id===t.id);function I(e,t,a,o){let n=e.batches();for(let l=n.length-1;l>=0;l--){let r=n[l];if(!(!G(r,t)||r.undone||!M(r,a,o))&&e.canUndo(r.id).ok)return r.id}}function Z(e,t,a,o){let n=e.batches();for(let l=n.length-1;l>=0;l--){let r=n[l];if(G(r,t)){if(M(r,a,o))return;if(oe(e,r,a,o))return r.undone?void 0:r.id}}}var u=L(z(),1);function ie(e){let{store:t}=R(),{live:a,nodeId:o,field:n}=e,[l,r]=(0,p.useState)(null);return(0,p.useEffect)(()=>{let d=!0;return a.typing(o,n).then(s=>d&&r(s)),()=>{d=!1}},[o,n]),l&&!t.collaborative(o,n)?(0,u.jsx)(u.Fragment,{children:e.writtenWhole}):(0,u.jsx)(ae,{...e,typing:l})}function ae({nodeId:e,field:t,label:a,markdown:o,live:n,onDone:l,typing:r}){let{store:d,principal:s}=R(),f=$(e),h=J(f?.[t]),[v,ee]=(0,p.useState)(!1),y=(0,p.useRef)(null),E=(0,p.useRef)(h),w=(0,p.useRef)(!1),P=(0,p.useRef)(n);P.current=n;let B=()=>J(d.graph.getNode(e)?.[t]);(0,p.useEffect)(()=>y.current?.focus(),[v,r]);let x=(0,p.useRef)(void 0),T=()=>{x.current===void 0&&(x.current=setTimeout(()=>{x.current=void 0;let i=y.current;if(!i||i.ownerDocument.activeElement!==i)return;let c=i.selectionDirection==="backward";P.current.sayCaret({node:e,field:t,anchor:c?i.selectionEnd:i.selectionStart,head:c?i.selectionStart:i.selectionEnd,rev:d.log.length})},le))};(0,p.useEffect)(()=>()=>{clearTimeout(x.current),P.current.sayCaret(null)},[]);let D=i=>{let c=y.current;if(c){if(c.value!==i){let g=V({start:c.selectionStart,end:c.selectionEnd},A(c.value,i)),m=c.selectionDirection??"none";c.value=i,c.setSelectionRange(g.start,g.end,m)}E.current=i}},H=()=>{let i=y.current;if(!i||!r||w.current)return;let c=E.current,g=B(),m=X(c,i.value,i.selectionEnd);if(m.removed===""&&m.inserted==="")return D(g);let S=c===g?m:Y(m,A(c,g));try{r.splice(S.at,S.removed.length,S.inserted)}catch{}let k=B();if(i.value!==k){i.value=k;let N=Math.min(k.length,S.at+S.inserted.length);i.setSelectionRange(N,N)}E.current=k,T()};(0,p.useLayoutEffect)(()=>{w.current||D(h)},[h]);let te=async i=>{if(!r)return;r.flush();for(let g=0;r.waiting()>0&&g<100;g++)await new Promise(m=>setTimeout(m,30));let c=i?Z(d,s,e,t):I(d,s,e,t);if(c)try{i?d.redo(c,{author:s}):d.undo(c,{author:s})}catch{}},C=i=>{r?.flush(),n.sayCaret(null),l(i)},O=[...n.who.values()].filter(i=>i.caret?.node===e&&i.caret.field===t);return(0,u.jsxs)("div",{style:{display:"grid",gap:8,minWidth:0},"data-graview-live":t,children:[v?(0,u.jsx)("div",{"data-graview-preview":t,"aria-label":`${a}, as it will read`,role:"region",style:de,children:(0,u.jsx)(U,{text:h,markdown:!0})}):(0,u.jsxs)("div",{style:{position:"relative",minWidth:0},children:[(0,u.jsx)("textarea",{ref:y,"aria-label":a,"data-graview-field":t,defaultValue:h,readOnly:!r,rows:3,onInput:H,onCompositionStart:()=>{w.current=!0},onCompositionEnd:()=>{w.current=!1,H()},onSelect:T,onFocus:T,onPointerDown:()=>r?.flush(),onKeyDown:i=>{let c=i.key;c==="Escape"?(i.preventDefault(),C(!1)):(i.metaKey||i.ctrlKey)&&!i.altKey&&c.toLowerCase()==="z"?(i.preventDefault(),te(i.shiftKey)):(i.metaKey||i.ctrlKey)&&c==="Enter"?(i.preventDefault(),C(!1)):(c==="Enter"||ce.has(c))&&r?.flush()},onKeyUp:T,onBlur:i=>{r?.flush(),n.sayCaret(null);let c=i.relatedTarget;c instanceof Node&&i.currentTarget.closest("[data-graview-live]")?.contains(c)||C(!0)},style:ue}),O.length>0?(0,u.jsx)(se,{text:h,others:O,area:y,log:d.log.all()}):null]}),(0,u.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:8},children:[(0,u.jsx)("button",{type:"button",onClick:()=>C(!1),style:Q,children:"Done"}),o?(0,u.jsx)("button",{type:"button","aria-pressed":v,onClick:()=>ee(!v),style:Q,children:v?"Write":"Preview"}):null,(0,u.jsx)("span",{style:{fontSize:"0.75rem",color:"var(--graview-ink-faint)"},children:"Saved as you type \xB7 Ctrl or \u2318 Z takes back your typing"})]})]})}function se({text:e,others:t,area:a,log:o}){let n=(0,p.useRef)(null);(0,p.useLayoutEffect)(()=>{let s=a.current,f=n.current;if(!s||!f)return;let h=()=>{f.scrollTop=s.scrollTop};return h(),s.addEventListener("scroll",h),()=>s.removeEventListener("scroll",h)});let l=t.map(s=>({one:s,at:q(s.caret,s.participant,o,e.length).end})).sort((s,f)=>s.at-f.at),r=[],d=0;for(let{one:s,at:f}of l){r.push(e.slice(d,f)),d=f;let h=K(s)||"Somebody";r.push((0,u.jsx)("span",{"data-graview-caret":s.participant,title:`${h} is typing here`,style:{borderLeft:`2px solid hsl(${Math.round(s.hue)} 55% 52%)`,marginLeft:-1,marginRight:-1,pointerEvents:"auto"}},s.participant))}return r.push(`${e.slice(d)}\u200B`),(0,u.jsx)("div",{ref:n,"aria-hidden":"true",style:pe,children:r})}var le=120,J=e=>typeof e=="string"?e:"",ce=new Set(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End","PageUp","PageDown"]),de={minHeight:"7.5em",padding:"8px 10px",border:"1px dashed var(--graview-edge-bright)",borderRadius:6,lineHeight:1.6,minWidth:0},Q={font:"inherit",fontSize:"0.8125rem",minHeight:28,padding:"2px 12px"},j={font:"inherit",lineHeight:1.5,width:"100%",boxSizing:"border-box",minHeight:"7.5em",padding:"8px 10px",borderRadius:6},ue={...j,resize:"vertical",fieldSizing:"content",color:"var(--graview-ink)",background:"var(--graview-panel, transparent)",border:"1px solid var(--graview-edge-bright)"},pe={...j,position:"absolute",inset:0,height:"100%",border:"1px solid transparent",color:"transparent",whiteSpace:"pre-wrap",overflowWrap:"break-word",overflow:"hidden",pointerEvents:"none"};export{ie as default};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{a as $e}from"./chunk.SDO3U72B.js";import{Ga as Xn,J as Zn,Ka as kt,Kd as so,Ma as Jn,Oc as to,Od as lo,Qd as ze,Rd as Rt,Ya as Qn,Yc as no,_c as oo,bd as ro,ed as io,rc as eo,ud as ao}from"./chunk.VOHRQXCF.js";import{a as qe,b as L}from"./chunk.AJZBJBMO.js";var To=qe(w=>{"use strict";var _t=Symbol.for("react.transitional.element"),ti=Symbol.for("react.portal"),ni=Symbol.for("react.fragment"),oi=Symbol.for("react.strict_mode"),ri=Symbol.for("react.profiler"),ii=Symbol.for("react.consumer"),ai=Symbol.for("react.context"),si=Symbol.for("react.forward_ref"),li=Symbol.for("react.suspense"),di=Symbol.for("react.memo"),xo=Symbol.for("react.lazy"),ui=Symbol.for("react.activity"),So=Symbol.iterator;function ci(e){return e===null||typeof e!="object"?null:(e=So&&e[So]||e["@@iterator"],typeof e=="function"?e:null)}var Eo={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Po=Object.assign,Ao={};function ge(e,t,n){this.props=e,this.context=t,this.refs=Ao,this.updater=n||Eo}ge.prototype.isReactComponent={};ge.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")};ge.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function ko(){}ko.prototype=ge.prototype;function Ht(e,t,n){this.props=e,this.context=t,this.refs=Ao,this.updater=n||Eo}var Dt=Ht.prototype=new ko;Dt.constructor=Ht;Po(Dt,ge.prototype);Dt.isPureReactComponent=!0;var wo=Array.isArray;function Lt(){}var O={H:null,A:null,T:null,S:null},Ro=Object.prototype.hasOwnProperty;function Nt(e,t,n){var o=n.ref;return{$$typeof:_t,type:e,key:t,ref:o!==void 0?o:null,props:n}}function pi(e,t){return Nt(e.type,t,e.props)}function jt(e){return typeof e=="object"&&e!==null&&e.$$typeof===_t}function fi(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var vo=/\/+/g;function It(e,t){return typeof e=="object"&&e!==null&&e.key!=null?fi(""+e.key):t.toString(36)}function yi(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Lt,Lt):(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 me(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 _t:case ti:a=!0;break;case xo:return a=e._init,me(a(e._payload),t,n,o,r)}}if(a)return r=r(e),a=o===""?"."+It(e,0):o,wo(r)?(n="",a!=null&&(n=a.replace(vo,"$&/")+"/"),me(r,t,n,"",function(c){return c})):r!=null&&(jt(r)&&(r=pi(r,n+(r.key==null||e&&e.key===r.key?"":(""+r.key).replace(vo,"$&/")+"/")+a)),t.push(r)),1;a=0;var s=o===""?".":o+":";if(wo(e))for(var l=0;l<e.length;l++)o=e[l],i=s+It(o,l),a+=me(o,t,n,i,r);else if(l=ci(e),typeof l=="function")for(e=l.call(e),l=0;!(o=e.next()).done;)o=o.value,i=s+It(o,l++),a+=me(o,t,n,i,r);else if(i==="object"){if(typeof e.then=="function")return me(yi(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 tt(e,t,n){if(e==null)return e;var o=[],r=0;return me(e,o,"","",function(i){return t.call(n,i,r++)}),o}function mi(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 bo=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)},gi={map:tt,forEach:function(e,t,n){tt(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return tt(e,function(){t++}),t},toArray:function(e){return tt(e,function(t){return t})||[]},only:function(e){if(!jt(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};w.Activity=ui;w.Children=gi;w.Component=ge;w.Fragment=ni;w.Profiler=ri;w.PureComponent=Ht;w.StrictMode=oi;w.Suspense=li;w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=O;w.__COMPILER_RUNTIME={__proto__:null,c:function(e){return O.H.useMemoCache(e)}};w.cache=function(e){return function(){return e.apply(null,arguments)}};w.cacheSignal=function(){return null};w.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var o=Po({},e.props),r=e.key;if(t!=null)for(i in t.key!==void 0&&(r=""+t.key),t)!Ro.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 Nt(e.type,r,o)};w.createContext=function(e){return e={$$typeof:ai,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:ii,_context:e},e};w.createElement=function(e,t,n){var o,r={},i=null;if(t!=null)for(o in t.key!==void 0&&(i=""+t.key),t)Ro.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 Nt(e,i,r)};w.createRef=function(){return{current:null}};w.forwardRef=function(e){return{$$typeof:si,render:e}};w.isValidElement=jt;w.lazy=function(e){return{$$typeof:xo,_payload:{_status:-1,_result:e},_init:mi}};w.memo=function(e,t){return{$$typeof:di,type:e,compare:t===void 0?null:t}};w.startTransition=function(e){var t=O.T,n={};O.T=n;try{var o=e(),r=O.S;r!==null&&r(n,o),typeof o=="object"&&o!==null&&typeof o.then=="function"&&o.then(Lt,bo)}catch(i){bo(i)}finally{t!==null&&n.types!==null&&(t.types=n.types),O.T=t}};w.unstable_useCacheRefresh=function(){return O.H.useCacheRefresh()};w.use=function(e){return O.H.use(e)};w.useActionState=function(e,t,n){return O.H.useActionState(e,t,n)};w.useCallback=function(e,t){return O.H.useCallback(e,t)};w.useContext=function(e){return O.H.useContext(e)};w.useDebugValue=function(){};w.useDeferredValue=function(e,t){return O.H.useDeferredValue(e,t)};w.useEffect=function(e,t){return O.H.useEffect(e,t)};w.useEffectEvent=function(e){return O.H.useEffectEvent(e)};w.useId=function(){return O.H.useId()};w.useImperativeHandle=function(e,t,n){return O.H.useImperativeHandle(e,t,n)};w.useInsertionEffect=function(e,t){return O.H.useInsertionEffect(e,t)};w.useLayoutEffect=function(e,t){return O.H.useLayoutEffect(e,t)};w.useMemo=function(e,t){return O.H.useMemo(e,t)};w.useOptimistic=function(e,t){return O.H.useOptimistic(e,t)};w.useReducer=function(e,t,n){return O.H.useReducer(e,t,n)};w.useRef=function(e){return O.H.useRef(e)};w.useState=function(e){return O.H.useState(e)};w.useSyncExternalStore=function(e,t,n){return O.H.useSyncExternalStore(e,t,n)};w.useTransition=function(){return O.H.useTransition()};w.version="19.2.8"});var N=qe((es,Mo)=>{"use strict";Mo.exports=To()});var Wo=qe(rt=>{"use strict";var ki=Symbol.for("react.transitional.element"),Ri=Symbol.for("react.fragment");function jo(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:ki,type:e,key:o,ref:t!==void 0?t:null,props:n}}rt.Fragment=Ri;rt.jsx=jo;rt.jsxs=jo});var _e=qe((us,Go)=>{"use strict";Go.exports=Wo()});var pe={focusId:null,relation:null,expanded:[],pins:{}},Ue=e=>{let t=Number(e);return Number.isFinite(t)?t:null};function J(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}`,`${Ye(r.x)},${Ye(r.y)}`)}e.pan&&(e.pan.x!==0||e.pan.y!==0)&&t.set("pan",`${Ye(e.pan.x)},${Ye(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 Yr(e){return e&&e.startsWith("agg:")?`aggregate:${e.slice(4)}`:e}function Ze(e){let t=e.includes("#")?e.slice(e.indexOf("#")+1):e,n=new URLSearchParams(t),o=Object.create(null);for(let[m,f]of n){if(!m.startsWith("pin."))continue;let[g,x]=f.split(","),k=g===void 0?null:Ue(g),y=x===void 0?null:Ue(x);k===null||y===null||(o[m.slice(4)]={x:k,y})}let r=Object.create(null);for(let[m,f]of n)!m.startsWith("in.")||f.length===0||(r[m.slice(3)]=f);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:Ue(a[0]),l=a[1]===void 0?null:Ue(a[1]),c=(n.get("sel")??"").split(",").filter(m=>m.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:Yr(n.get("focus")),relation:n.get("relation"),expanded:(n.get("expand")??"").split(",").filter(m=>m.length>0&&(u||!m.startsWith("kind:"))).sort(),pins:o}}function Da(e){let t=Ze(e);return J(t)==="#"?{...t,overview:!0}:t}function Na(e){let t=J(e);return t==="#overview=1"?"":t}function Ye(e){return Math.round(e*100)/100}function co(e,t){return J(e)===J(t)}var uo="edge:";function po(e){if(!e.startsWith(uo))return null;let t=e.slice(uo.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 Tt(e){let{pan:t,...n}=e;return{...n,pins:{}}}function z(e,t){if(t===e.focusId)return{...e,focusId:t};let n=Tt(e);return{...n.within?.q!==void 0?ae(n,"q",null):n,focusId:t}}function fo(e,t){return{...e,relation:t}}function ae(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 fe(e,t){if(t!==e.overview&&(e=Tt(e)),!t){let n=e.expanded.filter(o=>!o.startsWith("kind:"));return{...e,overview:!1,expanded:n}}return{...e,overview:t}}function Xe(e,t){if(t.length===0){let{selection:n,...o}=e;return o}return{...e,selection:[...t]}}function Ie(e,t){if(t!==(e.zoom===!0)&&(e=Tt(e)),!t){let{zoom:n,...o}=e;return o}return{...e,zoom:!0}}function Je(e,t){let n=new Set(e.expanded);return n.has(t)?n.delete(t):n.add(t),{...e,expanded:[...n].sort()}}var et="aggregate:",Qe="kind:";function Mt(e){return`${Qe}${e}`}function ye(e){return e.startsWith(Qe)?e.slice(Qe.length):null}var Ga="kinds:beyond";function Zr(e){let t=ye(e);return t?[t]:se(e)}function Q(...e){return`${et}${[...e].sort().join("+")}`}function yo(e){return e.startsWith(et)}function se(e){return!yo(e)||e.includes("|")?[]:e.slice(et.length).split("+").filter(Boolean)}function mo(e,t,n={}){let o=ye(t);if(o!==null&&e.overview&&n.ownPicture!==!0)return Je(e,t);let r=o!==null?Q(o):t;if(e.zoom&&e.focusId===r&&!(o!==null&&n.carry))return Ie(e,!1);if(o!==null&&n.carry){let i=fe({...z(e,r),relation:null},!1);return ae(Ie(i,!0),"q",n.carry)}return Ie({...z(e,r),relation:null},!0)}function Xr(e,t,n){return ae(fe(z(e,Q(t)),!1),"view",n)}function Fa(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var go="aggregate:";function Ct(e){return e.startsWith(go)&&e.includes("|")}var Ot=e=>e?.off===!0,Jr=e=>e!==void 0&&!Ot(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),ho=e=>e!==void 0&&!Ot(e)&&(e.fast!==void 0||e.decide!==void 0),Qr=e=>e?.suggestOnOpen!==!1&&ho(e),ei=e=>e?.hoverChips===!0&&ho(e);var Vt={};var Co=L(N(),1),hi={turns:[],outcomes:new Map,busy:!1,pending:null,draft:null,draftNote:null},Oo=e=>`graview:seat:${e}`;function Si(e){if(!e)return{};try{let t=sessionStorage.getItem(e);if(!t)return{};let n=JSON.parse(t);return{...Array.isArray(n.turns)?{turns:n.turns}:{},...Array.isArray(n.outcomes)?{outcomes:new Map(n.outcomes)}:{},...n.draft?.drawn?{draft:n.draft}:{}}}catch{return{}}}function wi(e,t){if(e)try{sessionStorage.setItem(e,JSON.stringify({turns:t.turns.slice(-40),outcomes:[...t.outcomes],draft:t.draft}))}catch{}}function Wt(e){let t=e===null?null:Oo(e),n={...hi,...Si(t)},o=new Set,r=(i,a=!0)=>{n=i,a&&wi(t,n);for(let s of[...o])s()};return{get:()=>n,subscribe(i){return o.add(i),()=>void o.delete(i)},setTurns:i=>r({...n,turns:i(n.turns)}),settle:(i,a)=>r({...n,outcomes:new Map(n.outcomes).set(i,a)}),setBusy:i=>r({...n,busy:i},!1),ask:i=>r({...n,pending:i.trim()||null}),takePending(){let i=n.pending;return i!==null&&r({...n,pending:null},!1),i},setDraft:(i,a=null)=>r({...n,draft:i,draftNote:a})}}function vi(e){return(0,Co.useSyncExternalStore)(e.subscribe,e.get,e.get)}var Io=L(N(),1),bi={entries:[],ghost:null,loaded:!1};function Vo(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 Gt(e){let t=bi,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:Vo(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:Vo(t.entries,i)})).catch(i=>{console.warn("The host's AI interactions could not be read:",i)})}}}function xi(e){return(0,Io.useSyncExternalStore)(e.subscribe,e.get,e.get)}function Lo(e){return e?.closest?.("[data-graview-pick]")?.getAttribute("data-graview-pick")??null}var nt=L(N(),1),ot=(0,nt.createContext)(void 0),Ei=()=>(0,nt.useContext)(ot);var P=L(N(),1),Le=(0,P.createContext)(null);function Ho(){return(0,P.useContext)(Le)}function Pi(e,t){let n=Ho(),o=(0,P.useMemo)(()=>n?n.live.seenBy(t):e,[n,e,t]),r=(0,P.useRef)(0),i=(0,P.useCallback)(a=>o.subscribe(()=>{r.current+=1,a()}),[o]);return(0,P.useSyncExternalStore)(i,()=>r.current,()=>0),o}var Do=$e(()=>(__graviewPreload(import.meta.url,["./chunk.ZJXUWOG3.js","./chunk.TI4OSTQV.js","./chunk.SLBWPVIY.js","./chunk.AJZBJBMO.js"]),import("./chunk.PFXGWY3P.js")));function Ft(e){let[,t]=(0,P.useReducer)(o=>o+1,0),n=e.publishing?.mode==="on-publish"&&!no();return(0,P.useEffect)(()=>{n&&Do().then(t,()=>{})},[n]),!n}var _o,Ai=400;function Kt(e,t,n){let o=(0,P.useContext)(Le),r=o!==null&&o.owns(e,t),[i,a]=(0,P.useState)(null),[s,l]=(0,P.useState)(_o);(0,P.useEffect)(()=>{if(s||r||i===null)return;let b=!0;return Do().then(V=>{_o=V,b&&l(V)},()=>{}),()=>{b=!1}},[s,r,i]);let[c,u]=(0,P.useState)(0),m=(0,P.useMemo)(()=>r||i===null||i>=e.log.length||!s?void 0:s.askArchived(e,i,n)??s.askDeclaration(n,i),[r,e,i,n,s,c]),f=m&&"waiting"in m?m.waiting:void 0,g=m&&"seq"in m?m:null,[x,k]=(0,P.useState)(void 0);(0,P.useEffect)(()=>{if(!f)return;let b=!0,V=setTimeout(()=>b&&k(f),Ai);return f.then(()=>b&&u(I=>I+1)),()=>{b=!1,clearTimeout(V)}},[f]);let y=f!==void 0&&x!==f||g!==null,v=(0,P.useMemo)(()=>{if(r||i===null||i>=e.log.length||!s||y)return null;try{let b=s.pastAt(e,i,n);return{seq:i,at:b.past?.at,store:b}}catch{return null}},[r,e,i,n,s,y,c]),S=(0,P.useRef)(null),E=y?S.current:v;(0,P.useEffect)(()=>{S.current=E},[E]);let A=(0,P.useCallback)(b=>a(b===null?null:b>=e.log.length?Number.POSITIVE_INFINITY:b),[e]),F=(0,P.useCallback)((b,V)=>[e,E?.store].some(I=>I!==void 0&&(I===b||I.seenBy(V)===b)),[e,E]),H=i!==null,j=(0,P.useMemo)(()=>({past:E,open:H,show:A,live:e,host:n,owns:F,archive:g}),[E,H,A,e,n,F,g]);return r?o:j}var No=L(N(),1),Bt=(0,No.createContext)(null);var Fo=e=>`graview:setting:${e}`;function Ko(){return localStorage}function Bo(e,t){try{let n=(t??Ko()).getItem(Fo(e.name));if(n!==null&&e.options.some(o=>o.value===n))return n}catch{}return e.initial}function qo(e,t,n){try{(n??Ko()).setItem(Fo(e.name),t)}catch{}}function zo(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 _=L(N(),1);function qt(e){return ze(e)}var Ti=12,Mi=4;function Ci(e,t,n){let o=qt(t);return e.get(o)??{participant:o,who:t.id??t.kind,at:null,mode:"docked",since:n,trail:[]}}var it=(e,t)=>t===null||e[e.length-1]===t?e:[...e,t].slice(-Ti);function $o(e,t){let n=e.filter(r=>r.length>0);if(n.length===0)return null;if(n.length<=Mi)return n[0];let o=new Set(n.map(r=>t(r)).filter(r=>r!==void 0));return o.size===1?Mt([...o][0]):n[0]}function zt(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=Ci(e,t.author,t.at),i=a=>o.set(r.participant,{...r,...a,since:t.at});switch(t.type){case"read":{let a=$o(t.ids,n);return i({at:a,mode:"reading",trail:it(r.trail,a)}),o}case"about-to-write":case"write":{let a=$o(t.ids,n);return i({at:a,mode:"writing",trail:it(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:it(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:it(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 Uo="graview:session";function Yo(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(Uo);if(o)return o;let r=t();return n.setItem(Uo,r),r}catch{return t()}}var $t={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"},Ut={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"},Zo=[$t,Ut],Oi=800;function Xo(e){let{channel:t,store:n,view:o,principal:r,session:i,robots:a,seatWho:s,settingValues:l,setView:c,ttlMs:u=lo,people:m,seats:f}=e,[g,x]=(0,_.useState)(()=>new Map),[k,y]=(0,_.useState)(null),[v,S]=(0,_.useState)(null),[E,A]=(0,_.useState)(null),F=typeof r.id=="string"&&r.id.length>0,H=F&&(l[$t.name]??$t.initial)==="shared",j=H&&(l[Ut.name]??Ut.initial)==="shared",b=qt({kind:r.kind,...r.id?{id:r.id}:{},session:i}),V=F?Qn(r,{graph:n.graph,schema:n.schema,...f?{seats:f}:{},...m?{people:m}:{}}):"",I=s?a.get(`agent:${s}:${i}`):void 0,W=(0,_.useMemo)(()=>!t||!H?null:{participant:b,kind:r.kind,name:V,...r.onBehalfOf?.id?{onBehalfOf:r.onBehalfOf.id,...r.onBehalfOf.name?{onBehalfOfName:r.onBehalfOf.name}:{}}:{},hue:eo(r.id??"nobody"),stop:E??J(o),...j?{over:k}:{},...I?{robot:{at:I.at,mode:I.mode}}:{},at:new Date().toISOString()},[t,H,j,b,V,r.id,r.kind,r.onBehalfOf?.id,r.onBehalfOf?.name,o,E,k,I?.at,I?.mode]),Ne=(0,_.useRef)(null),Ee=R=>R&&t?.here({...R,caret:Ne.current??void 0,at:new Date().toISOString()}),Pe=(0,_.useCallback)(R=>{Ne.current=R,Ee(W)},[t,W]);(0,_.useEffect)(()=>{if(!W)return;Ee(W);let R=setInterval(()=>Ee(W),Oi);return()=>clearInterval(R)},[t,W]),(0,_.useEffect)(()=>t?t.onWho(K=>x(Rt(new Map,K,Date.now(),u))):void 0,[t,u]);let Ae=g.size>0;(0,_.useEffect)(()=>{if(!Ae)return;let R=setInterval(()=>{x(K=>{let oe=Rt(K,[],Date.now(),u);return oe.size===K.size?K:oe})},Math.max(250,Math.min(1e3,u/4)));return()=>clearInterval(R)},[Ae,u]),(0,_.useEffect)(()=>{if(!t||typeof window>"u")return;let R=()=>t.leave();return window.addEventListener("pagehide",R),()=>window.removeEventListener("pagehide",R)},[t]),(0,_.useEffect)(()=>{if(!j||typeof document>"u")return;let R=null,K=oe=>{let de=Lo(oe.target);de!==R&&(R=de,y(de))};return document.addEventListener("pointermove",K,{passive:!0}),()=>document.removeEventListener("pointermove",K)},[j]);let le=(0,_.useRef)(null),B=v?g.get(v)??null:null,ne=(0,_.useCallback)(R=>{le.current=null,S(R)},[]);return(0,_.useEffect)(()=>{if(v){if(!B){S(null);return}B.stop!==le.current?.stop&&(le.current={stop:B.stop,at:Date.now()},c(Ze(B.stop)))}},[v,B,c]),(0,_.useEffect)(()=>{let R=le.current;!v||R===null||Date.now()-R.at<400||co(o,Ze(R.stop))||S(null)},[o,v]),(0,_.useEffect)(()=>{if(!v||typeof document>"u")return;let R=K=>{K.key==="Escape"&&S(null)};return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[v]),(0,_.useMemo)(()=>({who:g,sharing:W?{participant:b,name:V}:null,following:B,follow:ne,sayWhere:A,sayCaret:Pe}),[g,W,b,V,B,ne,Pe])}var U=L(N(),1);function Jo(e){return ze(e.author)}function Vi(e,t){return e.length>1?"co-edited":t==="rule"?"rule":t==="agent"?"autonomous":"directed"}function Qo(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 m=i.get(l),f=m?.participants.includes(Jo(c))?m.participants:[...m?.participants??[],Jo(c)];i.set(l,{at:o,manner:Vi(f,c.author.kind),intent:c.intent,wrote:(m?.wrote??!1)||(u.wrote??!1),read:(m?.read??!1)||(u.read??!1),broke:(m?.broke??!1)||a.has(l),participants:f})};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 Ii=2600;function er(e,t=Ii){let[n,o]=(0,U.useState)(()=>new Map),r=(0,U.useRef)(n);r.current=n;let i=(0,U.useRef)(null),a=(0,U.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,U.useEffect)(()=>{let l=e.violations(),c=e.subscribe((u,m)=>{let f=e.violations(),g=io(e.allInvariants(),l,f).introduces;l=f,a(Qo(r.current,m,g.map(x=>({nodeIds:x.nodeIds,message:x.message})),Date.now(),t))});return()=>{c(),i.current&&clearTimeout(i.current)}},[e,t,a]);let s=(0,U.useCallback)(l=>{l.reads.length!==0&&a(Qo(r.current,[Li(l)],[],Date.now(),t))},[t,a]);return{activity:n,noteAttention:s}}function Li(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=L(N(),1);function tr(){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 at=L(N(),1),_i=e=>e.definitions.some(t=>Xn(t).size>0);function nr(e,t,n){let[o,r]=(0,at.useState)(void 0),i=(n.roles??[]).join("\0");return(0,at.useEffect)(()=>{if(!t||!_i(e.schema)){r(void 0);return}let a=!0,s=!1,l=e.graph,c=()=>{s||(s=!0,queueMicrotask(()=>{s=!1,a&&e.reread()}))},u=Jn(t,{kind:n.kind,...n.id===void 0?{}:{id:n.id},...n.roles?{roles:n.roles}:{}},c);return kt(l,u.read),r(u),e.reread(),()=>{a=!1,kt(l,void 0)}},[e,t,n.kind,n.id,i]),o}function or(){let e=!1,t=new Set;return{moving:()=>e,set(n){if(n!==e){e=n;for(let o of t)o()}},subscribe(n){return t.add(n),()=>t.delete(n)}}}var ee=L(_e(),1),Hi="graview:place-menu",He=(0,d.createContext)(null),sr=(0,d.createContext)("scene");function Di({mode:e,children:t}){return(0,ee.jsx)(sr.Provider,{value:e,children:t})}function Ni(){return(0,d.useContext)(sr)}var lr={kind:"human"},ji=[],Wi=[],Gi=[],Yt=[];function dr(e,t){let n=(0,d.useId)();(0,d.useEffect)(()=>{if(!globalThis.__graviewWatch)return;let o=t??lr,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 Fi=()=>{try{return typeof location<"u"&&new URLSearchParams(location.search).get("as")==="published"?"published":void 0}catch{return}},Ki={off:!0};function Bi({store:e,views:t,initialView:n,scheme:o="dark",initialSelection:r,principal:i,as:a,seats:s=ji,onSeat:l,people:c=Wi,memory:u,presenceTtlMs:m,app:f,settings:g=f?.settings??Gi,presence:x,typing:k,brand:y,locale:v,timeZone:S,onKeepLens:E,providers:A,ai:F,files:H,resolveApp:j,history:b,linkedRecords:V,menuSections:I,keptViews:W,onExport:Ne,subscriptions:Ee,dismissals:Pe,whileAway:Ae,signIn:le,view:B,onViewChange:ne,children:R}){let K=(0,d.useContext)(He),oe=I??K?.menuSections,de=le??K?.signIn,ht=W??K?.keptViews,St=Ne??K?.onExport,[_r,Hr]=(0,d.useState)(null),ue=_r??i??s[0]?.principal??lr,je=Kt(e,ue,b),fn=je.past&&je.live===e?je.past.store:e,wt=a??Fi(),vt=!Ft(e),D=(0,d.useMemo)(()=>vt?e:fn.seenBy(ue,wt?{as:wt}:void 0),[vt,e,fn,ue,wt]);dr(e,ue);let[re]=(0,d.useState)(()=>Yo(u)),[yn,Dr]=(0,d.useState)(!1),mn=(0,d.useCallback)(()=>Dr(!0),[]),ie=(0,d.useMemo)(()=>x?[...g,...Zo]:g,[g,x]),[bt]=(0,d.useState)(()=>n??Qt(t,e.schema)),[Nr,gn]=(0,d.useState)(()=>Xe(bt??pe,r??bt?.selection??[])),ke=(0,d.useRef)(bt??pe).current,[hn,jr]=(0,d.useState)(null),[Sn,Wr]=(0,d.useState)(null),Z=(0,d.useContext)(He),[wn]=(0,d.useState)(()=>Z?.seatTalk??Wt(y?.name??e.schema.kinds.join(","))),xt=F??Z?.ai??Vt,We=(0,d.useMemo)(()=>xt.off?Ki:xt,[xt]),vn=(0,d.useRef)(We.interactions);vn.current=We.interactions;let[bn]=(0,d.useState)(()=>Z?.aiDesk??Gt(()=>vn.current)),[Gr]=(0,d.useState)(()=>Z?.subscriptions??oo()),xn=Ee??Z?.subscriptions??Gr,Et=E??Z?.onKeepLens,Ge=f??Z?.app,Fe=v??Z?.locale,Fr=y?.locale??Ge?.brand?.locale,Ke=S??Z?.timeZone;Zn({reader:Fe,app:Fr,readerTimeZone:Ke,appTimeZone:y?.timeZone??Ge?.brand?.timeZone});let En=(0,d.useRef)(null),Pn=(0,d.useCallback)(p=>{En.current=p},[]),An=(0,d.useCallback)(p=>En.current?.whereIs(p)??null,[]),[kn]=(0,d.useState)(()=>tr()),[Rn]=(0,d.useState)(()=>or()),[Pt,Kr]=(0,d.useState)(null),[Re,Tn]=(0,d.useState)(()=>new Map),Te=(0,d.useRef)(Re);Te.current=Re;let Me=(0,d.useRef)(null),At=(0,d.useCallback)(p=>D.graph.getNode(p)?.kind,[D]),X=(0,d.useCallback)(p=>{let h=zt(Te.current,p,At);Te.current=h,Tn(h),Me.current&&clearTimeout(Me.current),[...h.values()].some(C=>C.mode!=="docked"&&C.mode!=="asking")&&(Me.current=setTimeout(()=>{let C=zt(Te.current,{type:"rest",at:Date.now(),holdMs:Jt},At);Te.current=C,Tn(C)},Jt+20))},[At]),Mn=(0,d.useCallback)(p=>X({...p,at:p.at??Date.now()}),[X]),Cn=(0,d.useCallback)(p=>{Kr(p),p&&X({type:"home",author:{kind:"agent",id:p,session:re},at:Date.now()})},[X,re]);(0,d.useEffect)(()=>D.subscribe((p,h)=>{for(let T of h)T.author.kind==="agent"&&X({type:"write",author:T.author,ids:T.writes,at:Date.now()})}),[D,X]),(0,d.useEffect)(()=>()=>{Me.current&&clearTimeout(Me.current)},[]);let $=(0,d.useMemo)(()=>({...ue,session:re}),[ue,re]),On=nr(D,V,$),Vn=(0,d.useCallback)(p=>{Hr(p),l?.(p)},[l]),[Ce,Br]=(0,d.useState)(()=>Object.fromEntries(ie.map(p=>[p.name,Bo(p,u)])));(0,d.useEffect)(()=>{for(let p of ie)zo(p,Ce[p.name]??p.initial)},[ie,Ce]);let In=(0,d.useCallback)((p,h)=>{let T=ie.find(C=>C.name===p);!T||!T.options.some(C=>C.value===h)||(qo(T,h,u),Br(C=>({...C,[p]:h})))},[ie,u]),[Ln,qr]=(0,d.useState)(null),{activity:_n,noteAttention:Hn}=er(D),Dn=(0,d.useCallback)(p=>{Hn(p),X({type:"read",author:p.author,ids:p.reads,at:Date.now()})},[Hn,X]),ce=(0,d.useCallback)(p=>{if(ye(p)!==null||se(p).length>0||Ct(p))return!0;let h=po(p);return h?D.graph.allEdges().some(T=>T.kind===h.kind&&T.from===h.from&&T.to===h.to):D.graph.getNode(p)!==void 0},[D]),Nn=(0,d.useCallback)(p=>{let h=p.selection??Yt,T=h.filter(ce),C=T.length===h.length?p:Xe(p,T);return C.focusId!==null&&!ce(C.focusId)&&(C=z(C,null)),C},[ce]),Oe=(0,d.useCallback)(p=>{let h=Nn(p),T=ar(D,$,h.shown);if(h.focusId!==null&&T.size>0){let C=se(h.focusId),Yn=D.graph.getNode(h.focusId);(C.length>0?C.every(Ur=>T.has(Ur)):Yn?T.has(Yn.kind):!1)&&(h={...h,focusId:null})}if(!h.overview&&h.focusId===null){let C=ke.focusId!==null&&!ce(ke.focusId)?Qt(t,e.schema)??{...pe,overview:!0}:ke;C.focusId!==null&&ce(C.focusId)?h={...h,focusId:C.focusId}:C.overview===!0&&(h={...h,overview:!0})}return h},[Nn,ce,D,ke,$,t,e.schema]),q=Oe(B??Nr),jn=(0,d.useMemo)(()=>ar(D,$,q.shown),[D,$,q.shown]),Wn=(0,d.useMemo)(()=>[...D.modules.administered.entries()].map(([p,h])=>{let T=D.mayAdminister(p,$);return{name:p,...h.description?{description:h.description}:{},kinds:h.kinds??[],canShow:T,shown:T&&(q.shown??[]).includes(p)}}),[D,$,q.shown]),Ve=(0,d.useCallback)(p=>{let h=T=>Oe(typeof p=="function"?p(T):p);if(B!==void 0){ne?.(h(B));return}ne&&ne(h(q)),gn(T=>h(T))},[q,ne,B,Oe]);(0,d.useEffect)(()=>{B===void 0&&gn(p=>{let h=Oe(p);return h===p?p:h})},[q,B,Oe]);let Gn=q.selection??Yt,Fn=(0,d.useCallback)(p=>{Ve(h=>Xe(h,typeof p=="function"?p(h.selection??Yt):p))},[Ve]),{who:Be,following:Kn,follow:Bn,sayWhere:zr,sayCaret:qn,sharing:zn}=Xo({channel:x,store:D,view:q,principal:$,session:re,robots:Re,seatWho:Pt,settingValues:Ce,setView:Ve,seats:s,people:c,...m!==void 0?{ttlMs:m}:{}}),$r=(0,d.useMemo)(()=>({store:D,scheme:o,views:t,view:q,setView:Ve,homeView:ke,selection:Gn,setSelection:Fn,menuAt:hn,setMenuAt:jr,whereIs:An,pointer:kn,motion:Rn,registerScene:Pn,robots:Re,noteSeat:Mn,seatWho:Pt,registerSeatWho:Cn,actsDoor:Sn,registerActsDoor:Wr,seatTalk:wn,aiDesk:bn,...u?{memory:u}:{},who:Be,following:Kn,follow:Bn,sayWhere:zr,sharing:zn,session:re,ai:We,resolveApp:j,linkedRecords:V,menuSections:oe,...ht?{keptViews:ht}:{},...St?{onExport:St}:{},subscriptions:xn,dismissals:Pe,whileAway:Ae,signIn:de,linkedReads:On,movedByHand:yn,noteMoved:mn,emphasis:Ln,setEmphasis:qr,activity:_n,noteAttention:Dn,principal:$,seats:s,people:c,takeSeat:Vn,settings:ie,settingValues:Ce,chooseSetting:In,hiddenKinds:jn,administered:Wn,...A?{providers:A}:{},...y?{brand:y}:{},...Et?{onKeepLens:Et}:{},app:Ge,...Fe?{locale:Fe}:{},...Ke?{timeZone:Ke}:{}}),[D,o,t,q,Ve,Gn,Fn,hn,An,kn,Rn,Pn,Re,Mn,Pt,Cn,Sn,wn,bn,u,Be,Kn,Bn,zn,re,We,j,V,oe,ht,St,xn,Pe,Ae,de,On,yn,mn,Ln,_n,Dn,$,s,c,Vn,ie,Ce,In,jn,Wn,A,y,Et,Ge,Fe,Ke]),$n=(0,d.useMemo)(()=>k?{typing:k,sayCaret:qn,who:Be}:null,[k,qn,Be]),Un=H?(0,ee.jsx)(ot.Provider,{value:H,children:R}):R;return(0,ee.jsx)(He.Provider,{value:$r,children:(0,ee.jsx)(Le.Provider,{value:je,children:(0,ee.jsx)(Yi,{children:vt?null:$n?(0,ee.jsx)(Bt.Provider,{value:$n,children:Un}):Un})})})}var ur=(0,d.createContext)(null),Zt,Xt=new Set,qi=e=>(Xt.add(e),()=>void Xt.delete(e)),rr=()=>Zt;function zi(e){if(!Zt){Zt=e;for(let t of[...Xt])t()}}var $i=300;function Ui(e){let t=0;return async(n,o)=>{let r=++t;return await new Promise(i=>setTimeout(i,$i)),r===t?e(n,o):[]}}function Yi({children:e}){let{store:t,view:n,views:o,principal:r,hiddenKinds:i,selection:a,ai:s}=te(),l=st(),c=n.q,u=n.focusId,m=!!(c&&c.trim().length>0),f=(0,d.useSyncExternalStore)(qi,rr,rr),g=(0,d.useMemo)(()=>m&&f?{flagged:new Set(t.violations().flatMap(E=>E.nodeIds)),touched:f.touchWeights(t.log.all())}:null,[t,l,m,f]),x=u?t.graph.getNode(u)?.kind??ye(u)??(se(u).length===1?se(u)[0]:void 0):void 0,k=(0,d.useMemo)(()=>s.near&&Ui(s.near),[s.near]),y=(0,d.useMemo)(()=>!c||!g||!f?null:f.search(t,c,{...x?{inKind:x}:{},principal:r,places:o.places(),kinds:t.schema.kinds.filter(E=>!i.has(E)),from:[...a,...u&&t.graph.has(u)?[u]:[]],flagged:g.flagged,touched:g.touched,limit:200,rank:k}),[t,c,r,o,i,a,u,x,g,k]),[v,S]=(0,d.useState)();return(0,d.useEffect)(()=>void y?.later?.then(E=>S([y,E])),[y]),(0,ee.jsx)(ur.Provider,{value:v?.[0]===y?v[1]:y,children:e})}var ir=new WeakMap;function Gs(e){let t=ir.get(e);return t||ir.set(e,t=new Set(e.matched)),t}function Zi(){return(0,d.useContext)(ur)}function te(){let e=(0,d.useContext)(He);if(!e)throw new Error("useGraview must be used inside a <GraviewProvider>.");return e}function en(){return(0,d.useContext)(He)??null}function st(){let{store:e}=te(),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 Xi(e){let{store:t}=te(),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 ar(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 Jt=2600;var cr=new WeakSet,Ji=e=>cr.has(e),Qi=e=>void cr.add(e);function Qt(e,t){let n=so(e.arrangement?.()?.first,t,e.places());if(!(!n||n.to==="home"))return n.to==="place"?{...pe,focusId:Q(n.place.kind),within:{view:n.place.as}}:{...pe,focusId:Q(n.kind)}}var pr=L(N(),1),ea=(0,pr.createContext)(!1);var lt=Symbol.for("graview.default-view");function fr(e){return Object.defineProperty(e,lt,{value:!0,enumerable:!1}),e}function yr(e){return typeof e=="function"&&e[lt]===!0}var dt=Symbol.for("graview.replaces-page");function mr(e){return Object.defineProperty(e,dt,{value:!0,enumerable:!1}),e}function gr(e){return typeof e=="function"&&e[dt]===!0}var ut=Symbol.for("graview.bleeds");function hr(e){return Object.defineProperty(e,ut,{value:!0,enumerable:!1}),e}function Sr(e){return typeof e=="function"&&e[ut]===!0}var ct=Symbol.for("graview.previews");function wr(e,t={}){return Object.defineProperty(e,ct,{value:t,enumerable:!1}),e}function vr(e){return typeof e=="function"?e[ct]:void 0}function ta(e){return ao(e)}function na(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.homeView?.();return o&&e.home?.(o),e}var M=L(N(),1),Y=L(_e(),1),tn=new Set,pt=0;function nn(e){return()=>{pt+=1;let t=e();return t.then(()=>void(pt-=1),()=>void(pt-=1)),t}}var oa=()=>pt,yt=(0,M.createContext)(null);function ra(){return{waiting:new Map,at:0}}function ia(e){for(let[t,n]of e.waiting)n<e.at&&e.waiting.delete(t);e.at+=1}var aa=e=>e?.waiting.size??0;function Er(e,t){e?.waiting.set(t,e.at)}function Pr(e){let t=(0,M.useContext)(yt);(0,M.useLayoutEffect)(()=>{t?.waiting.delete(e)},[t,e])}function sa(e){let t={},n=!1,o=new Set,r=(0,M.lazy)(nn(()=>e().then(a=>{n=!0;let s=a.default;function l(c){return Pr(t),(0,M.createElement)(s,c)}return{default:l}},a=>{for(let s of o)s.waiting.delete(t);throw a})));function i(a){let s=(0,M.useContext)(yt);return!n&&s&&(o.add(s),Er(s,t)),(0,M.createElement)(r,a)}return i}var Ar=!1,kr=!1,ft=new Set;function la(){Ar=!0}function da(){kr=!0;for(let e of[...ft])e();ft.clear()}var Rr=()=>kr||!Ar;function ua(e){return Rr()?(e(),()=>{}):(ft.add(e),()=>void ft.delete(e))}var br=!1;function on(){for(let e of[...tn])e()}function ca(){br||typeof window>"u"||(br=!0,window.addEventListener("online",on))}function rn(e){let t,n=!1,o=!1,r,i=0,a=new Set,s=()=>{i+=1;for(let f of[...a])f()},l=f=>(a.add(f),()=>void a.delete(f)),c=()=>i,u=()=>void m().catch(()=>{});function m(){if(n)return Promise.resolve(t);if(r)return r;let f=e().then(g=>(t=g,n=!0,o=!1,r=void 0,tn.delete(u),s(),g),g=>{throw r=void 0,o=!0,tn.add(u),ca(),s(),g});return f.catch(()=>{}),r=f,f}return{load:m,prefetch:u,get current(){return t},get failed(){return o},part(f,g={}){let x=g.what??"This part",k={};function y(E){(0,M.useSyncExternalStore)(l,c,c),Pr(k);let A=(0,M.useRef)(null),F=(0,M.useRef)(null),H=(0,M.useRef)(!1);return(0,M.useEffect)(()=>{o&&r===void 0&&u()},[]),n&&typeof document<"u"&&A.current!==null&&document.activeElement===A.current&&(H.current=!0),(0,M.useLayoutEffect)(()=>{if(!(!n||!H.current)){H.current=!1;for(let j=F.current?.nextElementSibling??null;j!==null;j=j.nextElementSibling){let b=j.matches(xr)?j:j.querySelector(xr);if(b instanceof HTMLElement){b.focus();return}}}}),n?(0,Y.jsxs)(Y.Fragment,{children:[H.current?(0,Y.jsx)("span",{ref:F,hidden:!0}):null,f(t,E)]}):g.quiet?null:(0,Y.jsx)(pa,{what:x,button:A,...g.as?{as:g.as}:{}})}let v=(0,M.lazy)(nn(()=>m().then(()=>({default:y}),()=>({default:y}))));function S(E){let A=(0,M.useContext)(yt),[F]=(0,M.useState)(()=>n||o);return!n&&!o&&Er(A,k),(0,M.createElement)(F?y:v,E)}return S}}}var xr="button,a[href],input,select,textarea,[tabindex]:not([tabindex='-1'])";function pa({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,Y.jsxs)(n,{"data-testid":"lazy-part-missing",style:{margin:0,fontSize:"0.875rem",color:"var(--graview-ink-muted)"},children:[(0,Y.jsx)("span",{role:"status",children:r})," ",(0,Y.jsx)("button",{ref:t,type:"button","data-testid":"lazy-part-retry",onClick:on,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 Se=L(N(),1);function fa(){let{selection:e,setSelection:t}=te();return(0,Se.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 ya(){let{store:e}=te(),t=st();return(0,Se.useMemo)(()=>ma(e),[e,t])}var Tr=new WeakMap;function ma(e){let t=Tr.get(e);if(!t){let n={violations:null};e.subscribe(()=>{n.violations=null}),Tr.set(e,n),t=n}return t.violations??=e.violations(),t.violations}function ga(){let{view:e,setView:t}=te();return(0,Se.useMemo)(()=>({view:e,url:J(e),focus:n=>t(o=>z(o,n)),show:n=>t(o=>fo(o,n)),toggle:n=>t(o=>Je(o,n)),go:n=>t(n)}),[e,t])}var he={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;he.at=typeof t?.graview=="number"?t.graview:0,he.at>he.depth&&(he.depth=he.at),he.tell()});var G=L(N(),1),sn={profile:{trigger:"profile-button",pane:"profile",opens:"press",focus:"into",drawn:["shell","embed"]},problems:{trigger:"standing",pane:"problems",opens:"press",focus:"into",drawn:["shell","embed"]},places:{trigger:"app-places-open",pane:"app-places",opens:"press",focus:"into",drawn:["embed"]},here:{trigger:"here-open",pane:"here-list",opens:"press",focus:"into",drawn:["shell","embed","pages"]},suggested:{trigger:"suggested-button",pane:"suggested",opens:"press",focus:"into",drawn:["shell","embed","pages"]},activity:{trigger:"activity-button",pane:"activity",opens:"press",focus:"into",drawn:["shell","embed","pages"]},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"]}},ha={position:"fixed",inset:"auto",margin:0,zIndex:to("popover"),boxSizing:"border-box"},mt=6,we=8,Sa=e=>typeof e.showPopover=="function";function gt(e){try{return e.matches(":popover-open")}catch{return!1}}function wa(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 ln(e,t,n={}){let o=wa(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-mt-we,l=o.top-mt-we,c=a.height<=s||s>=l,u=Math.max(96,Math.floor(c?s:l)),m=Math.min(a.height,u);a.height>u&&(e.style.maxHeight=i?`min(${i}, ${u}px)`:`${u}px`);let f=a.width,g=n.align==="start"?o.left:o.right-f,x=typeof t=="function"?null:t.current?.closest("[data-graview-embed]")?.getBoundingClientRect();x&&f<=x.right-x.left&&(g<x.left?g=o.left+f<=x.right?o.left:x.left:g+f>x.right&&(g=o.right-f>=x.left?o.right-f:x.right-f));let k=f>=r.width-2*we?Math.max(0,(r.width-f)/2):Math.max(we,Math.min(g,r.width-we-f)),y=c?o.bottom+mt:Math.max(we,o.top-mt-m);e.style.left=`${Math.round(k)}px`,e.style.top=`${Math.round(y)}px`}function Mr(e,t,n,o={}){let r=o.align??"end";(0,G.useLayoutEffect)(()=>{let i=e.current;if(!t||!i)return;if(Sa(i)&&!gt(i))try{i.showPopover(),ba()}catch{}let a=0,s=c=>{c?.target instanceof Node&&i.contains(c.target)||(cancelAnimationFrame(a),a=requestAnimationFrame(()=>ln(i,n,{align:r})))};ln(i,n,{align:r}),addEventListener("resize",s),addEventListener("scroll",s,!0);let l=typeof ResizeObserver>"u"?null:new ResizeObserver(()=>s());return l?.observe(i),()=>{if(cancelAnimationFrame(a),removeEventListener("resize",s),removeEventListener("scroll",s,!0),l?.disconnect(),i.isConnected&>(i))try{i.hidePopover()}catch{}}},[t,e,r])}var dn=new Set;function va(e){return dn.add(e),()=>dn.delete(e)}function ba(){for(let e of dn)if(!(!e.isConnected||!gt(e)))try{e.hidePopover(),e.showPopover()}catch{}}var ve=null,xa='button:not([disabled]), [href], input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), summary, [tabindex]:not([tabindex="-1"])';function Ea(e){for(let t of e.querySelectorAll(xa))if(t.closest("[hidden]")===null&&getComputedStyle(t).visibility!=="hidden")return t;return e}var an=()=>{let e=document.activeElement;return e===null||e===document.body};function Pa(e,t={}){let{at:n,returnTo:o,onOpenChange:r}=t,i=t.popover!==!1,[a,s]=(0,G.useState)(!1),l=t.open??a,c=(0,G.useRef)(null),u=(0,G.useRef)(null),m=(0,G.useCallback)(S=>{c.current=S},[]),f=(0,G.useCallback)(S=>{u.current=S},[]),g=`graview-popover-${(0,G.useId)().replace(/:/g,"")}`,x=(0,G.useRef)({onOpenChange:r,returnTo:o,controlled:t.open!==void 0});x.current={onOpenChange:r,returnTo:o,controlled:t.open!==void 0};let k=(0,G.useCallback)(S=>{x.current.controlled||s(S),x.current.onOpenChange?.(S)},[]),y=(0,G.useCallback)(()=>{(document.querySelector(`[aria-controls="${g}"]`)??c.current??x.current.returnTo?.()??null)?.focus({preventScroll:!0})},[g]),v=(0,G.useCallback)(S=>{let E=u.current,A=typeof document>"u"?null:document.activeElement,F=A===null||A===document.body||E!==null&&E.contains(A);k(!1),!(!S||!F)&&(y(),requestAnimationFrame(()=>{an()&&y()}))},[k,y]);return Mr(u,i&&l,n??c,t.align?{align:t.align}:{}),(0,G.useEffect)(()=>{if(!i||!l)return;let S={name:e,close:()=>v(!1)};if(ve&&ve.close!==S.close&&ve.close(),ve=S,sn[e].focus==="into"){let b=u.current;b&&!b.contains(document.activeElement)&&Ea(b).focus({preventScroll:!0})}let E=b=>{b.key==="Escape"&&v(!0)},A=b=>{let V=b.target;if(!(V instanceof Node))return;let I=u.current;if(I?.contains(V)||c.current?.contains(V))return;let W=V instanceof Element?V.closest('[role="dialog"], [role="alertdialog"]'):null;W&&!(I&&W.contains(I))||(v(!1),sn[e].focus==="into"&&requestAnimationFrame(()=>{(an()||I!==null&&I.contains(document.activeElement))&&y()}))},F=null,H=null,j=b=>{let V=b.target;if(!(V instanceof Element))return;let I=u.current,W=V.closest('[role="dialog"], [role="alertdialog"]');!W||I&&(I.contains(W)||W.contains(I))||(F=W,v(!1))};return document.addEventListener("keydown",E),document.addEventListener("pointerdown",A,!0),document.addEventListener("focusin",j),()=>{document.removeEventListener("keydown",E),document.removeEventListener("pointerdown",A,!0),document.removeEventListener("focusin",j);let b=F;b&&typeof MutationObserver<"u"&&(H?.disconnect(),H=new MutationObserver(()=>{b.isConnected||(H?.disconnect(),requestAnimationFrame(()=>{(an()||document.activeElement.closest("[hidden]")!==null)&&y()}))}),H.observe(document.body,{childList:!0,subtree:!0}),setTimeout(()=>H?.disconnect(),10*6e4)),ve?.close===S.close&&(ve=null)}},[i,l,e,v,y]),{open:l,setOpen:S=>S?k(!0):v(!0),toggle:()=>l?v(!0):k(!0),trigger:{ref:m,"aria-expanded":l,"aria-controls":g,"data-graview-popover-trigger":e},pane:{ref:f,id:g,popover:"manual",tabIndex:-1,"data-graview-popover":e,"data-graview-overlay":""}}}var be=L(N(),1);var Cr=(0,be.createContext)(null);function Aa(){let e=(0,be.useContext)(Cr),t=en(),n=(o,r,i)=>t?.setView(a=>ae(ae(fe(z(a,Q(o)),!1),"view",r),"filter",i?.filter??null));return(0,be.useMemo)(()=>e??{record:o=>{t&&(t.setView(r=>z(fe(r,!1),o)),t.setSelection([o]))},place:(o,r)=>{let i=t?.views.places().find(a=>a.as===o);i&&n(i.kind,i.as,r)},list:(o,r)=>n(o,null,r)},[e,t])}var xe=L(N(),1);var ka=rn($e(()=>(__graviewPreload(import.meta.url,["./chunk.Q5IAXTF5.js","./chunk.SDO3U72B.js","./chunk.VOHRQXCF.js","./chunk.SLBWPVIY.js","./chunk.AJZBJBMO.js"]),import("./chunk.HST7BYFW.js"))));function Ra(e,t,n){let o,r=!1,i=()=>{let{hidden:s,removed:l}=t.current();o||r||s.length+l.length===0||(o=()=>{},ka.load().then(c=>{r||(o=c.watchTidied(e,t,n))},String))};i();let a=t.onChange?.(i);return()=>{r=!0,a?.(),o?.()}}function Ta(e,t){let[n,o]=(0,xe.useState)();return(0,xe.useEffect)(()=>t?Ra(e,t,r=>o([e,r])):void 0,[e,t]),n?.[0]===e?n[1]:e}var Or=L(N(),1),Ma=(0,Or.createContext)(!1);var un=L(N(),1),Ca=(0,un.createContext)(null),Oa=(0,un.createContext)(null);var Vr=L(N(),1),Va=(0,Vr.createContext)(null);var Ir=L(N(),1),cn='button:not([disabled]), a[href], input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), summary, [tabindex]:not([tabindex="-1"])',pn=e=>e instanceof HTMLElement&&(e.matches(cn)||e.hasAttribute("tabindex")),De=e=>typeof e.checkVisibility=="function"?e.checkVisibility():e.getClientRects().length>0;function Ia(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&&pn(s)&&De(s)?s:null}var La=e=>e.isConnected&&pn(e)&&!e.matches(":disabled")&&e instanceof HTMLElement&&De(e);function Lr(e,t){let n=t?Ia(e,t):null;if(n)return n;let o=e.querySelector("[data-graview-view][tabindex]");if(o&&De(o))return o;for(let r of e.querySelectorAll(cn))if(De(r))return r;return pn(e)&&De(e)?e:null}function _a(e){(0,Ir.useEffect)(()=>{let t=e.current;if(!t||typeof MutationObserver>"u")return;let n=[],o=y=>{let v=y.target;if(v instanceof Element){n=[];for(let S=v;S&&S!==t.parentElement;S=S.parentElement)n.push(S)}},r=!1,i=!1,a=t.ownerDocument,s=()=>!i&&a.defaultView!==null,l=(y,v)=>void setTimeout(()=>s()&&v(),y),c=y=>void requestAnimationFrame(()=>s()&&y()),u=y=>{if(r=!1,i)return;let v=a.activeElement;if(!(!(v===null||v===a.body||v===a.documentElement)||n.length===0)){if(La(n[0])){y&&n[0]instanceof HTMLElement&&n[0].focus({preventScroll:!0});return}for(let E of n.slice(1)){if(!E.isConnected)continue;let A=Lr(E,n[0]);if(A){A.focus({preventScroll:!0}),n=[];return}}}},m=(y,v=Date.now()+2500)=>{l(100,()=>{u(y);let S=a.activeElement;(S===null||S===a.body||S===a.documentElement)&&n.length>0&&Date.now()<v&&m(y,v)})},f=()=>{r||n.length===0||(r=!0,l(60,()=>c(()=>{u(!1),m(!1)})))},g=y=>{if(!(y instanceof KeyboardEvent&&!["Enter"," ","Escape"].includes(y.key))){if(!(y instanceof KeyboardEvent)){let v=y.target instanceof Element?y.target.closest(cn):null,S=a.activeElement,E=S===null||S===a.body||S===a.documentElement;if(v&&E&&t.contains(v)){n=[];for(let A=v;A&&A!==t.parentElement;A=A.parentElement)n.push(A);l(150,()=>c(()=>{u(!1),m(!1)}));return}}!(y instanceof KeyboardEvent)&&!(y.target instanceof Node&&n[0]?.contains(y.target))||l(150,()=>c(()=>{u(!0),m(!0)}))}},x=new MutationObserver(()=>{n.length>0&&!n[0].isConnected&&f()}),k=y=>{y.relatedTarget===null&&f()};return t.addEventListener("focusin",o),t.addEventListener("focusout",k),t.addEventListener("click",g),t.addEventListener("keydown",g),x.observe(t,{childList:!0,subtree:!0}),()=>{i=!0,t.removeEventListener("focusin",o),t.removeEventListener("focusout",k),t.removeEventListener("click",g),t.removeEventListener("keydown",g),x.disconnect()}},[e])}export{pe as a,J as b,Ze as c,Da as d,Na as e,co as f,uo as g,po as h,Tt as i,z as j,fo as k,ae as l,fe as m,Xe as n,Ie as o,Je as p,et as q,Mt as r,ye as s,Ga as t,Zr as u,Q as v,yo as w,se as x,mo as y,Xr as z,Fa as A,go as B,Ct as C,Jr as D,Qr as E,ei as F,N as G,Wt as H,vi as I,xi as J,Lo as K,ot as L,Ei as M,Le as N,Ho as O,Pi as P,Ft as Q,Kt as R,Bt as S,_e as T,Hi as U,Di as V,Ni as W,dr as X,Bi as Y,zi as Z,Gs as _,Zi as $,te as aa,en as ba,st as ca,Xi as da,Ji as ea,Qi as fa,Qt as ga,Cr as ha,Aa as ia,ea as ja,fr as ka,yr as la,mr as ma,gr as na,hr as oa,Sr as pa,wr as qa,vr as ra,ta as sa,na as ta,nn as ua,oa as va,yt as wa,ra as xa,ia as ya,aa as za,sa as Aa,la as Ba,da as Ca,Rr as Da,ua as Ea,rn as Fa,Ta as Ga,Ma as Ha,Ca as Ia,Oa as Ja,Va as Ka,fa as La,ya as Ma,ga as Na,he as Oa,_a as Pa,ha as Qa,gt as Ra,Mr as Sa,va as Ta,Pa as Ua};
|
|
2
|
-
/*! Bundled license information:
|
|
3
|
-
|
|
4
|
-
react/cjs/react.production.js:
|
|
5
|
-
(**
|
|
6
|
-
* @license React
|
|
7
|
-
* react.production.js
|
|
8
|
-
*
|
|
9
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
10
|
-
*
|
|
11
|
-
* This source code is licensed under the MIT license found in the
|
|
12
|
-
* LICENSE file in the root directory of this source tree.
|
|
13
|
-
*)
|
|
14
|
-
|
|
15
|
-
react/cjs/react-jsx-runtime.production.js:
|
|
16
|
-
(**
|
|
17
|
-
* @license React
|
|
18
|
-
* react-jsx-runtime.production.js
|
|
19
|
-
*
|
|
20
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
21
|
-
*
|
|
22
|
-
* This source code is licensed under the MIT license found in the
|
|
23
|
-
* LICENSE file in the root directory of this source tree.
|
|
24
|
-
*)
|
|
25
|
-
*/
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b}from"./chunk.LESRQN3Y.js";import"./chunk.7UJZP3YK.js";import"./chunk.R77TACXU.js";import"./chunk.JOWJNIWH.js";import"./chunk.6JERQFZI.js";import"./chunk.7XJ3XQZD.js";import"./chunk.52J42KR5.js";import"./chunk.T2Q3AAQI.js";import"./chunk.63SRVTG2.js";import"./chunk.C4EPMV7O.js";import"./chunk.G7XKQNOL.js";import"./chunk.7KZ44FEU.js";import"./chunk.HJCQ6I3S.js";import"./chunk.JQBP6QWQ.js";import"./chunk.I2W7HSBU.js";import"./chunk.BJL6EL6B.js";import"./chunk.KPUX27ZT.js";import"./chunk.DIS7JS7X.js";import"./chunk.D2T563AA.js";import"./chunk.JV7FLVUV.js";import"./chunk.GL3YVGAP.js";import"./chunk.VGTEEANA.js";import"./chunk.SZCZD2GM.js";import"./chunk.7FZY5E2U.js";import"./chunk.7354O67H.js";import"./chunk.C7EEYSAM.js";import"./chunk.FEBCIEI3.js";import"./chunk.WVUJXDXZ.js";import"./chunk.QRCTTDDQ.js";import"./chunk.3TME4BG3.js";import"./chunk.I43ONAEL.js";import"./chunk.73EKJ4JN.js";import"./chunk.INL4OZI7.js";import"./chunk.5WU2UTP7.js";import"./chunk.GZHZLJBF.js";import"./chunk.YKACMLLU.js";import"./chunk.OJGHDWI6.js";import"./chunk.337JMOTL.js";import"./chunk.CV4QA4ZF.js";import"./chunk.OYRZ2DEI.js";import"./chunk.7EA7THSM.js";import"./chunk.AI2HBKVP.js";import"./chunk.Q5IAXTF5.js";import"./chunk.SDO3U72B.js";import"./chunk.VOHRQXCF.js";import"./chunk.SLBWPVIY.js";import"./chunk.AJZBJBMO.js";export{b as declaredLensView,a as formatFor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as O,b}from"./chunk.XZLKTOJE.js";import"./chunk.R7ZZJOJW.js";import"./chunk.73EKJ4JN.js";import"./chunk.INL4OZI7.js";import"./chunk.5WU2UTP7.js";import"./chunk.AI2HBKVP.js";import{G as z,T as M,aa as S}from"./chunk.Q5IAXTF5.js";import"./chunk.SDO3U72B.js";import{Zc as A}from"./chunk.VOHRQXCF.js";import"./chunk.SLBWPVIY.js";import{b as v}from"./chunk.AJZBJBMO.js";var o=v(z(),1);var t=v(M(),1);function G(i){for(let d of i)for(let[r,s]of Object.entries(d))if(s===!1)return`${r} == true`;return""}var w={margin:0,fontSize:"0.8125rem",color:"var(--graview-ink-muted)"};function j({ask:i,close:d}){let{store:r,principal:s,subscriptions:h,app:f}=S(),c=(0,o.useRef)(null),p=(0,o.useId)(),[n,u]=(0,o.useState)(0),[l,y]=(0,o.useState)(!0),[m,P]=(0,o.useState)(()=>{let e=i.choices.find(g=>g.on==="reaches");if(!e)return"";let a=e.record!==void 0?r.graph.getNode(e.record):void 0;return G(a?[a]:r.graph.nodesOfKind(e.kind).slice(0,5))}),[C,x]=(0,o.useState)(null),[W,k]=(0,o.useState)(!1);(0,o.useEffect)(()=>{let e=c.current;e&&!e.open&&e.showModal()},[]);let T=()=>{let e=i.returnTo;d(),requestAnimationFrame(()=>{e?.isConnected?e.focus():document.querySelector("[data-graview-page-title], main h1, [data-testid='activity-button']")?.focus()})},N=e=>e.on==="reaches"?{...e,condition:m}:e,E=e=>b(r,{when:N(e),alsoMine:!l}),L=async()=>{let e=N(i.choices[n]),a=O(r,e);if(a){x(a);return}k(!0);try{await h.add({who:A(s),app:f?.name??"app",when:e,...l?{}:{alsoMine:!0}}),T()}catch(g){k(!1),x(g instanceof Error?g.message:String(g))}};return(0,t.jsx)("dialog",{ref:c,"aria-labelledby":p,"data-testid":"notify-sheet",onClose:T,onClick:e=>{e.target===e.currentTarget&&e.currentTarget.close()},style:{width:"min(92vw, 420px)",padding:0,border:"1px solid var(--graview-edge)",borderRadius:"var(--graview-radius, 12px)",background:"var(--graview-panel)",color:"var(--graview-ink)",boxShadow:"var(--graview-lift-high)"},children:(0,t.jsxs)("form",{method:"dialog",onSubmit:e=>{e.preventDefault(),L()},style:{display:"grid",gap:12,padding:18},children:[(0,t.jsx)("h2",{id:p,style:{margin:0,fontSize:"1.0625rem"},children:"Notify me"}),(0,t.jsxs)("fieldset",{style:{margin:0,padding:0,border:0,display:"grid",gap:6},children:[(0,t.jsx)("legend",{style:{...w,marginBottom:6},children:"Tell me"}),i.choices.map((e,a)=>(0,t.jsxs)("label",{style:{display:"flex",gap:8,alignItems:"baseline",cursor:"pointer"},children:[(0,t.jsx)("input",{type:"radio",name:`${p}-when`,checked:n===a,onChange:()=>u(a),"data-notify-choice":e.on}),(0,t.jsx)("span",{children:e.on==="reaches"?`When ${e.record!==void 0?"it":"one"} reaches a condition`:E(e)})]},a))]}),i.choices[n]?.on==="reaches"?(0,t.jsxs)("label",{style:{display:"grid",gap:4},children:[(0,t.jsx)("span",{style:w,children:"The condition, in the app's own words (done == true, amount > 100)"}),(0,t.jsx)("input",{value:m,onChange:e=>P(e.target.value),"data-testid":"notify-condition",autoComplete:"off",spellCheck:!1})]}):null,(0,t.jsxs)("label",{style:{display:"flex",gap:8,alignItems:"center"},children:[(0,t.jsx)("input",{type:"checkbox",checked:l,onChange:e=>y(e.target.checked),"data-testid":"notify-others-only"}),"Only when someone else does it"]}),(0,t.jsxs)("p",{style:w,"data-testid":"notify-said",children:[E(i.choices[n]),"."]}),C?(0,t.jsx)("p",{role:"alert",style:{margin:0,color:"var(--graview-danger, var(--graview-ink))"},children:C}):null,(0,t.jsxs)("div",{style:{display:"flex",gap:8,justifyContent:"flex-end"},children:[(0,t.jsx)("button",{type:"button",onClick:()=>c.current?.close(),children:"Cancel"}),(0,t.jsx)("button",{type:"submit",autoFocus:!0,disabled:W,"data-testid":"notify-keep",style:{borderColor:"var(--graview-accent)",color:"var(--graview-accent)"},children:"Notify me"})]})]})})}function B({style:i}){let{store:d,principal:r,subscriptions:s,app:h}=S(),f=(r.onBehalfOf??r).id,[c,p]=(0,o.useState)([]);return(0,o.useEffect)(()=>{if(f===void 0)return;let n=!0,u=()=>void Promise.resolve(s.list(f)).then(y=>n&&p(y.filter(m=>m.app===(h?.name??"app"))),()=>n&&p([]));u();let l=s.onChange?.(u);return()=>{n=!1,l?.()}},[s,f,h]),c.length===0?null:(0,t.jsxs)("section",{"aria-label":"What you are told of","data-testid":"notified",style:{display:"grid",gap:6,...i},children:[(0,t.jsx)("span",{style:{fontSize:"0.75rem",letterSpacing:"0.14em",textTransform:"uppercase",color:"var(--graview-ink-faint)"},children:"You are told"}),(0,t.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none",display:"grid",gap:4},children:c.map(n=>(0,t.jsxs)("li",{style:{display:"flex",gap:8,alignItems:"baseline",justifyContent:"space-between"},"data-subscription":n.id,children:[(0,t.jsx)("span",{style:{fontSize:"0.8125rem"},children:b(d,n)}),(0,t.jsx)("button",{type:"button","data-testid":"notify-stop","aria-label":`Stop: ${b(d,n)}`,onClick:u=>{let l=u.currentTarget.closest("li"),y=(l?.nextElementSibling??l?.previousElementSibling)?.querySelector("button");Promise.resolve(s.remove(n.id)).then(()=>(y??document.querySelector("[data-testid='activity-button']"))?.focus())},style:{padding:"1px 8px",fontSize:"0.8125rem"},children:"Stop"})]},n.id))})]})}export{B as NotifiedList,j as NotifySheet};
|