graview 0.1.53 → 0.1.55
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/index.d.ts +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/preview/{chunk.Z4YSCHZT.js → chunk.27ZSRO3O.js} +1 -1
- package/dist/preview/{chunk.PEA4D66Y.js → chunk.2HANQ737.js} +1 -1
- package/dist/preview/{chunk.VRJ4TULC.js → chunk.2KH2LWZL.js} +1 -1
- package/dist/preview/{chunk.YI7WHBAD.js → chunk.2ORJGMRT.js} +2 -2
- package/dist/preview/{chunk.AQJD23AN.js → chunk.2SWQI4HF.js} +1 -1
- package/dist/preview/{chunk.5XFRWXYQ.js → chunk.354A4QCG.js} +1 -1
- package/dist/preview/chunk.35O5H5L7.js +2 -0
- package/dist/preview/chunk.3IZOXNJH.js +1 -0
- package/dist/preview/{chunk.HDXDYS4C.js → chunk.4BFJWNVM.js} +1 -1
- package/dist/preview/{chunk.GANAZIRD.js → chunk.4OMSQFIY.js} +1 -1
- package/dist/preview/{chunk.4SVAHPJA.js → chunk.4TLWZVVG.js} +1 -1
- package/dist/preview/chunk.5D6SIBOK.js +1 -0
- package/dist/preview/{chunk.ICYJ7QJG.js → chunk.5DPFAVCZ.js} +1 -1
- package/dist/preview/{chunk.5K5D4IMM.js → chunk.5EOSEVZB.js} +1 -1
- package/dist/preview/{chunk.MT45H2T5.js → chunk.5EZDXWOE.js} +1 -1
- package/dist/preview/{chunk.OPKXCL5R.js → chunk.5L4J2XAI.js} +1 -1
- package/dist/preview/{chunk.U4T4Y2MT.js → chunk.5MCXTY2P.js} +1 -1
- package/dist/preview/{chunk.K7WME4P4.js → chunk.5MSNKSTE.js} +1 -1
- package/dist/preview/{chunk.3FRVG6JW.js → chunk.5SANELJT.js} +2 -2
- package/dist/preview/chunk.5XUVCM7X.js +1 -0
- package/dist/preview/{chunk.CIUQWCU4.js → chunk.62LPYPP3.js} +1 -1
- package/dist/preview/{chunk.S6TN3MLY.js → chunk.644FUGSX.js} +1 -1
- package/dist/preview/{chunk.UYCPQ6IW.js → chunk.6JYNNPAI.js} +1 -1
- package/dist/preview/chunk.6NGSR2ZQ.js +1 -0
- package/dist/preview/{chunk.6ESAZJBN.js → chunk.6NQQUIBX.js} +1 -1
- package/dist/preview/{chunk.CSA6SWTI.js → chunk.6UAUME5U.js} +1 -1
- package/dist/preview/{chunk.G226CUJQ.js → chunk.6ZJE5M2A.js} +1 -1
- package/dist/preview/chunk.7ECBGIUK.js +1 -0
- package/dist/preview/chunk.7KERB5CH.js +1 -0
- package/dist/preview/chunk.7WEQHJ3N.js +6 -0
- package/dist/preview/{chunk.OCWZJNZF.js → chunk.7Y6NK5CT.js} +1 -1
- package/dist/preview/{chunk.I6W3IQ4W.js → chunk.AFEEXRN3.js} +1 -1
- package/dist/preview/{chunk.YA7ZMGOL.js → chunk.AFK5HHLL.js} +1 -1
- package/dist/preview/{chunk.MSPRCR3Q.js → chunk.ATXSLBE3.js} +1 -1
- package/dist/preview/chunk.AVNOLMCV.js +1 -0
- package/dist/preview/chunk.AVVNQKA7.js +1 -0
- package/dist/preview/chunk.AZ6Q3WT2.js +1 -0
- package/dist/preview/chunk.BJUUSIQY.js +1 -0
- package/dist/preview/{chunk.4DCPB67O.js → chunk.BRCKXL7B.js} +1 -1
- package/dist/preview/{chunk.LAOZEYYQ.js → chunk.CM2ETM2A.js} +2 -2
- package/dist/preview/{chunk.Y4VOCJ7R.js → chunk.CPNE6HPQ.js} +1 -1
- package/dist/preview/{chunk.UVMLX4US.js → chunk.DB3HOKZD.js} +1 -1
- package/dist/preview/{chunk.W54NXXC5.js → chunk.DBCVZGCC.js} +1 -1
- package/dist/preview/{chunk.USAGE5C6.js → chunk.DH4AC7TC.js} +1 -1
- package/dist/preview/{chunk.CANTHIRO.js → chunk.DKJK2MMV.js} +1 -1
- package/dist/preview/{chunk.XBNASVTY.js → chunk.DNJM6WQO.js} +1 -1
- package/dist/preview/{chunk.NAEEPUWJ.js → chunk.DU75P3Y7.js} +1 -1
- package/dist/preview/chunk.DVG47BK3.js +1 -0
- package/dist/preview/{chunk.FGJM4LJO.js → chunk.DXJFAAOI.js} +1 -1
- package/dist/preview/{chunk.NCTTPW7A.js → chunk.EGSE6NNE.js} +1 -1
- package/dist/preview/{chunk.MKWVNW4Q.js → chunk.EJXUOL2C.js} +3 -3
- package/dist/preview/{chunk.3FUFVVR4.js → chunk.EKP3HQAX.js} +1 -1
- package/dist/preview/{chunk.SLBWPVIY.js → chunk.FQLNBIQ5.js} +1 -1
- package/dist/preview/chunk.FTW3K3G6.js +5 -0
- package/dist/preview/{chunk.BB5XKTVC.js → chunk.FUS2FJS3.js} +1 -1
- package/dist/preview/{chunk.LCG3VLCB.js → chunk.FUZWXKTN.js} +1 -1
- package/dist/preview/chunk.FVOFTM5J.js +1 -0
- package/dist/preview/{chunk.WDEMPWS4.js → chunk.G2XDQPE4.js} +1 -1
- package/dist/preview/{chunk.N6A3DIOY.js → chunk.G5XTASMO.js} +1 -1
- package/dist/preview/chunk.H536YUAZ.js +3 -0
- package/dist/preview/chunk.HNJFBI7J.js +1 -0
- package/dist/preview/{chunk.VTCPA4V4.js → chunk.HUABTCQE.js} +1 -1
- package/dist/preview/{chunk.HIFLBWQJ.js → chunk.HXHFWZ2U.js} +2 -2
- package/dist/preview/{chunk.GZBODS7Z.js → chunk.HXR7EEXR.js} +1 -1
- package/dist/preview/chunk.INBHY3SA.js +1 -0
- package/dist/preview/{chunk.OZYZBRWO.js → chunk.IXHLP2CL.js} +1 -1
- package/dist/preview/{chunk.RIS3OKAI.js → chunk.JRRVLGEK.js} +1 -1
- package/dist/preview/{chunk.GPYZR6HE.js → chunk.K5WPS4RR.js} +1 -1
- package/dist/preview/{chunk.KAKJYAHM.js → chunk.KHJ2MCMS.js} +1 -1
- package/dist/preview/{chunk.56UFDIX5.js → chunk.KIMIPHAI.js} +1 -1
- package/dist/preview/{chunk.MDIAWTNK.js → chunk.KVQZ5FR6.js} +1 -1
- package/dist/preview/chunk.KXNWZ33P.js +1 -0
- package/dist/preview/{chunk.6S3B4XC4.js → chunk.LEPKPNPA.js} +1 -1
- package/dist/preview/chunk.LLXEWLIP.js +1 -0
- package/dist/preview/{chunk.G6DISMVT.js → chunk.LMXNHBGH.js} +2 -2
- package/dist/preview/{chunk.QATG5HNV.js → chunk.LQCH2NFE.js} +1 -1
- package/dist/preview/{chunk.KCM2VOC7.js → chunk.LWLI5PI4.js} +1 -1
- package/dist/preview/{chunk.FCAKLO5U.js → chunk.LYVRXRIH.js} +1 -1
- package/dist/preview/{chunk.5E4UGVAD.js → chunk.MFCBAQS3.js} +1 -1
- package/dist/preview/{chunk.TXEWSZGO.js → chunk.MFOSEOF4.js} +1 -1
- package/dist/preview/{chunk.S2ATSY6P.js → chunk.MIQMPOWF.js} +1 -1
- package/dist/preview/{chunk.7BXOQEUP.js → chunk.MNSKBGRM.js} +1 -1
- package/dist/preview/chunk.MSM6E6JK.js +1 -0
- package/dist/preview/{chunk.ULTYDYTS.js → chunk.NDLQXQV2.js} +2 -2
- package/dist/preview/chunk.NS6KWKF5.js +1 -0
- package/dist/preview/{chunk.JKCLYLT4.js → chunk.NXM73RZA.js} +1 -1
- package/dist/preview/{chunk.A2RQFAZ6.js → chunk.O752PM42.js} +1 -1
- package/dist/preview/{chunk.6CVW53WA.js → chunk.O7RMVGAB.js} +1 -1
- package/dist/preview/{chunk.65F3DF5Q.js → chunk.OIMYSR2J.js} +1 -1
- package/dist/preview/{chunk.TTFYXKLI.js → chunk.OL2N5NUV.js} +1 -1
- package/dist/preview/chunk.OS5EALHY.js +1 -0
- package/dist/preview/{chunk.XDEKL6TJ.js → chunk.OT6EWYK2.js} +1 -1
- package/dist/preview/chunk.P4ZZSFOQ.js +1 -0
- package/dist/preview/{chunk.BPPDBPTL.js → chunk.PCKX2FHR.js} +1 -1
- package/dist/preview/{chunk.VOHDRH3P.js → chunk.PHLMQO7V.js} +2 -2
- package/dist/preview/{chunk.FJN4OGAS.js → chunk.PIHCXN5U.js} +2 -2
- package/dist/preview/{chunk.FBRARPGR.js → chunk.PIQ52FCI.js} +2 -2
- package/dist/preview/{chunk.XFIZLWYA.js → chunk.PM64C5PX.js} +1 -1
- package/dist/preview/chunk.PSLCI3GO.js +2 -0
- package/dist/preview/chunk.QBMIET7P.js +1 -0
- package/dist/preview/{chunk.R3DWF35R.js → chunk.QIAH7HHO.js} +1 -1
- package/dist/preview/chunk.QJ42D5GM.js +1 -0
- package/dist/preview/{chunk.IYVBJDR7.js → chunk.QQ3YWKWU.js} +1 -1
- package/dist/preview/{chunk.36XV4ZMC.js → chunk.QWICAV2C.js} +2 -2
- package/dist/preview/chunk.R3ZS4QO6.js +18 -0
- package/dist/preview/{chunk.LDLWYAHK.js → chunk.RNYLNBIB.js} +1 -1
- package/dist/preview/{chunk.H6EMDQP5.js → chunk.RPVJ5IXD.js} +1 -1
- package/dist/preview/{chunk.CWPRQSED.js → chunk.RZQKCLTW.js} +1 -1
- package/dist/preview/chunk.SDLUWRGI.js +1 -0
- package/dist/preview/chunk.SG67ID6C.js +1 -0
- package/dist/preview/{chunk.UQENE3VE.js → chunk.SIABGHF2.js} +1 -1
- package/dist/preview/{chunk.UQ4CASST.js → chunk.SUGOENC4.js} +1 -1
- package/dist/preview/chunk.SYX7AEHU.js +1 -0
- package/dist/preview/{chunk.72Q4R7N6.js → chunk.T66UK7PQ.js} +1 -1
- package/dist/preview/{chunk.3377DLPA.js → chunk.TAQB64FZ.js} +1 -1
- package/dist/preview/{chunk.ASCTAUFD.js → chunk.TDV7JGIQ.js} +1 -1
- package/dist/preview/chunk.TEE23CVQ.js +1 -0
- package/dist/preview/{chunk.HAIHXBVX.js → chunk.TT6GKRBE.js} +1 -1
- package/dist/preview/{chunk.DQPEVPKQ.js → chunk.TUBAFVV4.js} +2 -2
- package/dist/preview/chunk.TZTRGNAA.js +1 -0
- package/dist/preview/{chunk.DUZS52WX.js → chunk.U5AX4DD5.js} +1 -1
- package/dist/preview/chunk.UADL2LHO.js +1 -0
- package/dist/preview/{chunk.TLQTDKOL.js → chunk.UE5GAP67.js} +2 -2
- package/dist/preview/{chunk.HBVURYWY.js → chunk.URDCHVH3.js} +2 -2
- package/dist/preview/{chunk.GBIVIHGD.js → chunk.USJ4J3GL.js} +2 -2
- package/dist/preview/{chunk.E647LWH5.js → chunk.V5PAFSWP.js} +2 -2
- package/dist/preview/chunk.WR63RQGU.js +5 -0
- package/dist/preview/chunk.WSMYFEGU.js +25 -0
- package/dist/preview/{chunk.2LQ37DC2.js → chunk.WUFCRE7O.js} +1 -1
- package/dist/preview/{chunk.7NFCI4LH.js → chunk.WVKXELAF.js} +2 -2
- package/dist/preview/{chunk.UXNZPPWR.js → chunk.XEHLSKHP.js} +1 -1
- package/dist/preview/{chunk.CYP5KXIQ.js → chunk.XSMXSNDR.js} +1 -1
- package/dist/preview/chunk.XTP5DGPJ.js +88 -0
- package/dist/preview/{chunk.BG2SC77J.js → chunk.XUHY4XO2.js} +1 -1
- package/dist/preview/{chunk.EZXGVTT2.js → chunk.Y3BEKXYB.js} +1 -1
- package/dist/preview/chunk.YG2WZO53.js +1 -0
- package/dist/preview/{chunk.KWMBRB6O.js → chunk.YGZGMRDC.js} +1 -1
- package/dist/preview/{chunk.P7FN3SFB.js → chunk.YOBRVKJT.js} +1 -1
- package/dist/preview/{chunk.E52UTLQ2.js → chunk.YRFN4VDD.js} +1 -1
- package/dist/preview/{chunk.T56SOSIR.js → chunk.YYWANGIC.js} +1 -1
- package/dist/preview/{chunk.JCJ7NTW4.js → chunk.ZAHVKXYQ.js} +1 -1
- package/dist/preview/{chunk.RUTZEEBR.js → chunk.ZOW7AC7U.js} +1 -1
- package/dist/preview/{chunk.J6OT74RM.js → chunk.ZPXAKRKG.js} +1 -1
- package/dist/preview/{chunk.JQTO52Q7.js → chunk.ZXOD5GM3.js} +1 -1
- package/dist/preview/index.html +52 -52
- package/dist/preview/page.js +2 -2
- package/package.json +6 -6
- package/dist/preview/chunk.2IKVO743.js +0 -1
- package/dist/preview/chunk.34Q7OKK3.js +0 -1
- package/dist/preview/chunk.3Y7BDRP3.js +0 -1
- package/dist/preview/chunk.4DFO43VM.js +0 -1
- package/dist/preview/chunk.4QVZXCV5.js +0 -1
- package/dist/preview/chunk.52Y37IAD.js +0 -1
- package/dist/preview/chunk.5H3VCAPN.js +0 -1
- package/dist/preview/chunk.6W2DUW5S.js +0 -5
- package/dist/preview/chunk.7R6GXJS4.js +0 -6
- package/dist/preview/chunk.B3T4N2XM.js +0 -25
- package/dist/preview/chunk.BQHRZJ5Z.js +0 -1
- package/dist/preview/chunk.D3A24PQ6.js +0 -1
- package/dist/preview/chunk.EG2N5F6L.js +0 -1
- package/dist/preview/chunk.FXNUR5JI.js +0 -88
- package/dist/preview/chunk.GGHZEAAT.js +0 -1
- package/dist/preview/chunk.GYO57LKD.js +0 -1
- package/dist/preview/chunk.GZWC72HS.js +0 -1
- package/dist/preview/chunk.H2B3SEI7.js +0 -1
- package/dist/preview/chunk.HE545Z6I.js +0 -1
- package/dist/preview/chunk.HIDLE6BN.js +0 -18
- package/dist/preview/chunk.I62MCBQM.js +0 -1
- package/dist/preview/chunk.I6SUHXJF.js +0 -1
- package/dist/preview/chunk.JRU5BT7K.js +0 -5
- package/dist/preview/chunk.LEKML4S4.js +0 -1
- package/dist/preview/chunk.MXTDQXVW.js +0 -1
- package/dist/preview/chunk.OP3ZUI4W.js +0 -1
- package/dist/preview/chunk.OXLYDXQV.js +0 -1
- package/dist/preview/chunk.P2W727C7.js +0 -1
- package/dist/preview/chunk.PFXGWY3P.js +0 -1
- package/dist/preview/chunk.Q5JVKSEN.js +0 -1
- package/dist/preview/chunk.Q5WEOX3Q.js +0 -1
- package/dist/preview/chunk.SHNYYBNW.js +0 -1
- package/dist/preview/chunk.THL67D77.js +0 -1
- package/dist/preview/chunk.TI4OSTQV.js +0 -1
- package/dist/preview/chunk.TRPPN2GD.js +0 -2
- package/dist/preview/chunk.VTRI2MT2.js +0 -2
- package/dist/preview/chunk.XXCT6DLX.js +0 -1
- package/dist/preview/chunk.ZJXUWOG3.js +0 -1
- package/dist/preview/chunk.ZQWKS6K5.js +0 -1
- package/dist/preview/chunk.ZYYM52N5.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{d as be,f as ke}from"./chunk.ASCTAUFD.js";import{e as ht}from"./chunk.EZXGVTT2.js";import{a as ft,b as wt}from"./chunk.2LQ37DC2.js";import{h as mt}from"./chunk.UXNZPPWR.js";import{a as ie,b as nt}from"./chunk.R3DWF35R.js";import{b as we,c as J,d as Y,e as rt,f as ot}from"./chunk.XBNASVTY.js";import{a as vt,d as St,f as bt}from"./chunk.6S3B4XC4.js";import{a as Se,b as pt}from"./chunk.52Y37IAD.js";import{a as Ce,b as yt}from"./chunk.TLQTDKOL.js";import{d as st,e as re,f as j,g as lt,h as ye,i as dt,k as ct,l as oe}from"./chunk.VTCPA4V4.js";import{j as gt,o as ve}from"./chunk.TTFYXKLI.js";import{c as ut}from"./chunk.ICYJ7QJG.js";import{c as it,d as Pe}from"./chunk.S2ATSY6P.js";import{c as at}from"./chunk.72Q4R7N6.js";import{G as U,Ga as fe,Ia as tt,Ma as Ne,Na as X,Oa as Re,T as I,W as Ze,aa as Qe,ba as V,da as pe,j as je,ka as et,l as qe,la as _,m as Ue,ma as me,r as ae,ta as he,v as Xe,y as Je,z as Ye}from"./chunk.B3T4N2XM.js";import{a as ue}from"./chunk.SDO3U72B.js";import{U as ee,da as $,fa as te,lb as _e,ma as H,rc as ne}from"./chunk.6W2DUW5S.js";import{b as L}from"./chunk.AJZBJBMO.js";var f=L(U(),1);var kt=L(U(),1);function xt(e){(0,kt.useLayoutEffect)(()=>{let n=e.current,t=n?.parentElement;if(!n||!t)return;let a=n.style.bottom,o=()=>{let d=t.querySelector(Ft);if(!d){n.style.bottom=a;return}let u=t.getBoundingClientRect(),m=d.getBoundingClientRect(),g=u.height>0?t.offsetHeight/u.height:1;n.style.bottom=`${Math.max(0,Math.round((u.bottom-m.top)*g))}px`};if(o(),typeof ResizeObserver>"u")return;let s=new ResizeObserver(o);return s.observe(t),()=>s.disconnect()},[e])}var Ft=".graview-spec-listing";var $e=L(U(),1);var P=L(U(),1);var Nt=L(U(),1);var B=L(I(),1);function Rt({id:e,max:n=8,empty:t,hide:a}){let{store:o}=V();pe();let s=_t(o,e,X()),[d,u]=(0,Nt.useState)(()=>new Set),m=a?s.flatMap(g=>{let w=g.ids.filter(r=>!a.has(r));return w.length>0?[{...g,ids:w}]:[]}):s;return m.length===0?t&&s.length===0?(0,B.jsx)("p",{style:{margin:0,fontSize:"0.875rem",color:"var(--graview-ink-faint)"},children:t}):null:(0,B.jsx)("div",{"data-graview-primitive":"connections",style:{display:"flex",flexDirection:"column",gap:12},children:m.map(g=>{let w=d.has(g.key),r=g.ids.length>n,c=w?g.ids:g.ids.slice(0,n),y=g.ids.length-Math.min(n,g.ids.length),k=`graview-more-${e}-${g.key}`.replace(/[^A-Za-z0-9_-]/g,"-");return(0,B.jsxs)("section",{style:{display:"flex",flexDirection:"column",gap:6},children:[(0,B.jsx)("h2",{...g.said?{"aria-label":g.said}:{},style:{margin:0,fontSize:"0.75rem",fontWeight:600,letterSpacing:"0.09em",textTransform:"uppercase",color:"var(--graview-ink-faint)"},children:g.label}),(0,B.jsxs)("div",{id:k,style:{display:"flex",flexWrap:"wrap",gap:6},children:[c.map(h=>{let S=o.graph.getNode(h);return S?(0,B.jsx)(Y,{pickId:h,hue:ne(S.kind),title:`Go to the ${H(o.schema.tryDefinition(S.kind),S.kind)}`,label:$(o.schema.tryDefinition(S.kind),S)},h):null}),r?(0,B.jsx)("button",{type:"button","data-graview-more":g.key,"aria-expanded":w,"aria-controls":k,...w?{}:{"aria-label":`${y} more: ${g.said??g.label}`},onClick:h=>{h.stopPropagation(),u(S=>{let b=new Set(S);return b.has(g.key)?b.delete(g.key):b.add(g.key),b})},style:Kt,children:w?"Show fewer":`+${y} more`}):null]})]},g.key)})})}var Kt={display:"inline-flex",alignItems:"center",alignSelf:"flex-start",minHeight:24,boxSizing:"border-box",padding:"3px 9px",borderRadius:6,border:"1px solid var(--graview-edge)",background:"var(--graview-panel-muted)",color:"var(--graview-accent)",font:"inherit",fontSize:"0.8125rem",lineHeight:1.5,whiteSpace:"nowrap",cursor:"pointer"};function _t(e,n,t=[]){let a=e.graph.getNode(n);if(!a)return[];let o=new Map,s=[];for(let d of t)if(d.subjectId===n)for(let u of d.nodeIds)u!==n&&!s.includes(u)&&e.graph.has(u)&&s.push(u);s.length>0&&o.set("judges",{key:"judges",label:"what it finds wrong",ids:s});for(let d of e.graph.allEdges()){let u=d.from===n?d.to:d.to===n?d.from:null;if(u===null||u===n)continue;let m=e.graph.getNode(u);if(!m)continue;let g=d.from===n?"out":"in",w=g==="out"?a.kind:m.kind,r=jt(e.schema,w,d.kind,g),c=`${d.kind}:${g}:${r.label}`,y=o.get(c)??{key:c,...r,ids:[]};y.ids.includes(u)||y.ids.push(u),o.set(c,y)}for(let d of o.values())d.ids.sort();return[...o.values()].sort((d,u)=>d.key<u.key?-1:d.key>u.key?1:0)}function jt(e,n,t,a){let o=at(e,n,t,a),s=te(t).toLowerCase();return o.trim().toLowerCase()!==s?{label:o}:a==="out"?{label:`\u2192 ${s}`,said:s}:{label:`\u2190 ${s}`,said:`${s}, pointing here`}}var Pt=L(U(),1),se=(0,Pt.createContext)(null);var l=L(I(),1),qt=fe(ue(()=>(__graviewPreload(import.meta.url,["./chunk.ULTYDYTS.js","./chunk.2LQ37DC2.js","./chunk.UXNZPPWR.js","./chunk.GYO57LKD.js","./chunk.MT45H2T5.js","./chunk.S2ATSY6P.js","./chunk.72Q4R7N6.js","./chunk.G6DISMVT.js","./chunk.W54NXXC5.js","./chunk.B3T4N2XM.js","./chunk.SDO3U72B.js","./chunk.6W2DUW5S.js","./chunk.SLBWPVIY.js","./chunk.AJZBJBMO.js"]),import("./chunk.BQHRZJ5Z.js")))).part((e,n)=>(0,l.jsx)(e.ArrangeBar,{...n}),{what:"Arranging this list"}),Ut=fe(ue(()=>(__graviewPreload(import.meta.url,["./chunk.H6EMDQP5.js","./chunk.3FRVG6JW.js","./chunk.7NFCI4LH.js","./chunk.RUTZEEBR.js","./chunk.FBRARPGR.js","./chunk.GZWC72HS.js","./chunk.ASCTAUFD.js","./chunk.CWPRQSED.js","./chunk.EZXGVTT2.js","./chunk.ULTYDYTS.js","./chunk.2LQ37DC2.js","./chunk.UXNZPPWR.js","./chunk.GYO57LKD.js","./chunk.HJCQ6I3S.js","./chunk.LCG3VLCB.js","./chunk.P7FN3SFB.js","./chunk.CANTHIRO.js","./chunk.NAEEPUWJ.js","./chunk.AQJD23AN.js","./chunk.R3DWF35R.js","./chunk.XBNASVTY.js","./chunk.6S3B4XC4.js","./chunk.52Y37IAD.js","./chunk.TLQTDKOL.js","./chunk.7R6GXJS4.js","./chunk.G4JJXA63.js","./chunk.MSPRCR3Q.js","./chunk.CSA6SWTI.js","./chunk.4DCPB67O.js","./chunk.Y4VOCJ7R.js","./chunk.3FUFVVR4.js","./chunk.XOZU4OFA.js","./chunk.IYVBJDR7.js","./chunk.Q5WEOX3Q.js","./chunk.P2W727C7.js","./chunk.XXCT6DLX.js","./chunk.TXEWSZGO.js","./chunk.WVUJXDXZ.js","./chunk.VTCPA4V4.js","./chunk.FGJM4LJO.js","./chunk.K7WME4P4.js","./chunk.MDIAWTNK.js","./chunk.PEA4D66Y.js","./chunk.TRPPN2GD.js","./chunk.GZHZLJBF.js","./chunk.TTFYXKLI.js","./chunk.OJGHDWI6.js","./chunk.ICYJ7QJG.js","./chunk.MT45H2T5.js","./chunk.S2ATSY6P.js","./chunk.72Q4R7N6.js","./chunk.G6DISMVT.js","./chunk.W54NXXC5.js","./chunk.B3T4N2XM.js","./chunk.SDO3U72B.js","./chunk.6W2DUW5S.js","./chunk.SLBWPVIY.js","./chunk.AJZBJBMO.js"]),import("./chunk.FXNUR5JI.js")))).part((e,n)=>(0,l.jsx)(e.KindStop,{...n}),{what:"This list"});function Ae(e){let{brand:n}=V();return ne(e,n?.accents)}function Xt(e,n){if(!n.endsWith("\u2026")&&!n.endsWith("..."))return;let t=n.replace(/[…]|\.\.\.$/g,"").trim();if(!(t.length<12)){for(let a of Object.values(e))if(typeof a=="string"&&a.length>t.length&&a.startsWith(t))return a}}function Jt(e,n){let a=Math.max(0,...e.slice(0,n*2).map(s=>s.length))*7.5+28<=212/2?2:1,o=n*a;return{columns:a,shown:Math.min(e.length,o)}}var Yt=8,Ct=500,Zt=12;function $t(e){return{x:e.clientX,y:e.clientY,pointerType:e.pointerType??""}}function Qt(e,n,t){let a=performance.now()+Ct,o=["pointerdown","pointerup","mousedown","mouseup","dblclick"],s=r=>{if(performance.now()>a||!(r instanceof MouseEvent))return!1;let c=$t(r);return n.pointerType&&c.pointerType&&n.pointerType!==c.pointerType?!1:Math.hypot(c.x-n.x,c.y-n.y)<=Zt},d=r=>{if(!s(r))return g();r.stopPropagation()},u=r=>{if(!s(r))return g();r.stopPropagation(),r.preventDefault(),e.removeEventListener("click",u,!0),setTimeout(g,50),t()},m=!1,g=()=>{if(!m){m=!0,clearTimeout(w),e.removeEventListener("click",u,!0);for(let r of o)e.removeEventListener(r,d,!0)}};for(let r of o)e.addEventListener(r,d,!0);e.addEventListener("click",u,!0);let w=setTimeout(g,Ct)}function en({View:e,members:n,mode:t,flagged:a}){let{isSelected:o}=Ne(),s=n.slice(0,Yt);return(0,l.jsxs)("div",{"data-graview-rows":"",style:{display:"grid",gap:4,minWidth:0},children:[s.map(d=>(0,l.jsx)("div",{"data-graview-pick":d.id,style:{minWidth:0,cursor:"pointer"},children:(0,l.jsx)(e,{node:d,cardinality:"one",fidelity:"glyph",mode:t,selected:o(d.id),...a?.includes(d.id)?{flagged:[d.id]}:{}})},d.id)),n.length>s.length?(0,l.jsx)(Y,{label:`+${n.length-s.length} more`}):null]})}var tn=11/15,nn=fe(ue(()=>(__graviewPreload(import.meta.url,["./chunk.MT45H2T5.js","./chunk.S2ATSY6P.js","./chunk.72Q4R7N6.js","./chunk.G6DISMVT.js","./chunk.W54NXXC5.js","./chunk.B3T4N2XM.js","./chunk.SDO3U72B.js","./chunk.6W2DUW5S.js","./chunk.SLBWPVIY.js","./chunk.AJZBJBMO.js"]),import("./chunk.HAIHXBVX.js")))).part((e,n)=>(0,l.jsx)(e.StatesBar,{...n}),{quiet:!0});function an({text:e,accent:n}){let t=(0,P.useRef)(null),a=(0,P.useRef)(null),[o,s]=(0,P.useState)(1),[d,u]=(0,P.useState)(!1),m=o<1?`${o}em`:void 0;return(0,P.useLayoutEffect)(()=>{let g=t.current,w=a.current;if(!g||!w)return;let r=()=>{let y=g.clientWidth,k=w.offsetWidth;if(y<=0||k<=0)return;let h=parseFloat(getComputedStyle(w).fontSize)/parseFloat(getComputedStyle(g).fontSize)||1,S=k/h,b=Math.max(tn,Math.min(1,Math.floor(y/S*100)/100));s(N=>Math.abs(N-b)<.01?N:b),u(S*b>y+.5)};if(r(),typeof ResizeObserver>"u")return;let c=new ResizeObserver(r);return c.observe(g),()=>c.disconnect()},[e]),(0,l.jsx)("span",{ref:t,"data-graview-district-name":"",...o<1?{"data-graview-fitted":""}:{},...d?{title:e}:{},style:{display:"block",minWidth:0,fontSize:"0.9375rem",lineHeight:1.25,letterSpacing:"0.05em",textTransform:"uppercase",color:n?"var(--graview-accent)":"var(--graview-ink-muted)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:(0,l.jsx)("span",{ref:a,style:{fontSize:m},children:e})})}function At(e,n){return!!e?.display?.page?.groups?.length||Pe(n,e).some(t=>t.long)}function Vt(e,n=he(e)){for(let t of e.kinds){let a=e.tryDefinition(t),o=a?.plural??`${String(t)}s`,s=r=>{let c=r.node,y=X(),k=(0,P.useContext)(se);if(!c)return null;let h=k?.nodeId===c.id?k:null,S=$(a,c),b=r.mode==="fullscreen"?Xt(c,S)??S:S,N=_e(y,[c.id]);return(0,l.jsxs)(J,{title:(0,l.jsx)(bt,{nodeId:c.id,children:h?.title??b}),...h?{}:{subtitle:a?.describe?it(a,c):a?.description??String(t)},selected:r.selected,...r.flagged?.includes(c.id)?{tone:"warning"}:{},fit:!0,children:[h?(0,l.jsx)(se.Provider,{value:null,children:h.body}):null,(0,l.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:"22px 34px",alignItems:"flex-start"},children:[(0,l.jsx)("div",{style:{flex:At(a,c)?"1 1 100%":"1 1 0",minWidth:"min(200px, 100%)"},children:(0,l.jsx)(St,{id:c.id,shown:[b,S,a?.description,h?.title],...h?{hide:[...h.fields]}:{}})}),(0,l.jsx)("div",{style:{flex:At(a,c)?"1 1 100%":"1.4 1 0",minWidth:"min(220px, 100%)"},children:(0,l.jsx)(Rt,{id:c.id,empty:`Nothing is connected to this ${H(a,String(t))} yet.`,...h?{hide:h.records}:{}})})]}),N.length>0?(0,l.jsx)("p",{"data-graview-broken":"",style:{margin:"14px 0 0",paddingTop:12,borderTop:"1px solid var(--graview-edge)",fontSize:"0.875rem",color:"var(--graview-warn)"},children:N.map(v=>v.message).join(" \xB7 ")}):null]})},d=r=>{let c=r.node;if(!c)return null;let{store:y}=V(),k=a?.computed?ct(y.schema,y.graph,c):c,h=Pe(k,a,{limit:3,said:[$(a,c)],glance:!0}),S=Ae(t),b=h.filter(x=>!x.long&&!x.markdown),N=h.find(x=>x.long||x.markdown),v=st(c,a);return(0,l.jsxs)(J,{title:$(a,c),selected:r.selected,tone:r.flagged?.includes(c.id)?"warning":"muted",fit:!0,children:[v?(0,l.jsx)(Se,{as:"thumb",file:v,size:64,style:{marginBottom:6}}):null,(0,l.jsx)(rt,{items:b.map(x=>({id:x.key,label:x.alone,hue:S})),max:3}),N?(0,l.jsx)("p",{"data-graview-excerpt":N.key,title:N.value,style:{margin:b.length>0?"6px 0 0":0,fontSize:"0.8125rem",lineHeight:1.35,color:"var(--graview-ink-muted)",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:N.value}):null]})},u=r=>{let c=r.node,y=Ae(t),k=ve().marks.flag;if(!c)return null;let h=r.flagged?.includes(c.id)??!1;return(0,l.jsx)(Y,{label:h?`${$(a,c)} ${k}`:$(a,c),hue:y,selected:r.selected,title:h?`${te(H(a,String(t)))} \u2014 implicated in a problem`:te(H(a,String(t)))})},m=r=>r.fidelity==="full"?(0,l.jsx)(P.Suspense,{fallback:(0,l.jsx)(g,{...r}),children:(0,l.jsx)(Ut,{kind:String(t),members:r.nodes??[],...r.flagged?{flagged:r.flagged}:{},...r.label?{label:r.label}:{},...r.retired?{retired:r.retired}:{}})}):(0,l.jsx)(g,{...r}),g=r=>{let{brand:c,store:y,views:k}=V(),{view:h,go:S}=Re(),b=r.nodes??[],N=k.lookup(String(t),{cardinality:"one",fidelity:"glyph"}),v=N!==void 0&&!me(N)?N:void 0,x=ft(h),C=mt(b,x,{schema:e,graph:y.graph,flagged:new Set(r.flagged??[])}),M=R=>({id:R.id,label:$(e.tryDefinition(R.kind),R),hue:ne(R.kind,c?.accents)}),W=r.fidelity==="full"&&b.length>1?(0,l.jsx)(P.Suspense,{fallback:null,children:(0,l.jsx)(qt,{schema:e,graph:y.graph,kind:String(t),arrangement:x,onChange:R=>S(wt(h,R)),kept:{shown:C.nodes.length,of:b.length},style:{marginBottom:8}})}):null,le=R=>R.some(A=>r.flagged?.includes(A.id)),de=X(),Z=ve().marks.flag,z=(R,A,ce)=>v?(0,l.jsx)(J,{title:R,meta:(0,l.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:6},children:[(0,l.jsx)(ke,{kind:String(t),plural:o,problems:be(de,A),flag:Z}),(0,l.jsx)("span",{title:`${ee(A.length)} ${A.length===1?H(a,String(t)):o.toLowerCase()}`,children:ee(A.length)})]}),tone:le(A)?"warning":"muted",children:(0,l.jsx)(en,{View:v,members:A,mode:r.mode,...r.flagged?{flagged:r.flagged}:{}})},ce):(0,l.jsx)(ot,{label:R,count:A.length,flagged:le(A),items:A.map(M),problems:(0,l.jsx)(ke,{kind:String(t),plural:o,problems:be(de,A),flag:Z})},ce);return C.grouped?(0,l.jsxs)("div",{style:{display:"grid",gap:8},"data-graview-grouped":x.group?.by,children:[W,C.groups.map(R=>z(`${r.label??o} \xB7 ${R.label}`,R.nodes,R.key||"-"))]}):(0,l.jsxs)("div",{style:{display:"grid",gap:4},children:[W,z(r.label??o,C.nodes)]})},w=r=>{let c=r.nodes??[],y=Jt(c.map(p=>$(a,p)),r.openedRows??gt(c.length)),k=Ae(t),{brand:h}=V(),S=nt(String(t),e,h),b=ve().marks.flag,{selection:N,set:v,clear:x}=Ne(),{toggle:C,view:M,go:W}=Re(),{views:le,hiddenKinds:de}=V(),Z=(0,P.useContext)(et),z=M.overview&&!de.has(String(t))?le.places().filter(p=>p.kind===String(t)):[],R=r.focused?M.within?.view??z[0]?.as:void 0,A=c.filter(p=>r.flagged?.includes(p.id)).length,ce=A>0,Ht=X(),It=be(Ht,c),F=(M.overview??!1)&&r.nestedUnder===void 0,G=r.focused||r.raised,Ie=r.rank==="secondary"&&!G,E=r.nestedUnder!==void 0,We=new Set(N),K=Z?N.length===1&&N[0]===ae(String(t)):r.opened??!1,Wt=ut(),O=G||F?0:c.filter(p=>Wt.includes(p.id)&&!We.has(p.id)).length,xe=O>0&&!ce,ge=Qe(),q=ge&&!E?ge.byKind[String(t)]??0:0,ze=(0,P.useRef)(null),Fe=(0,P.useRef)(null);(0,P.useLayoutEffect)(()=>{let p=Fe.current,T=ze.current;if(!p||!T||!F)return;let D=()=>T.style.setProperty("--graview-plate-h",`${p.offsetHeight}px`);if(D(),typeof ResizeObserver>"u")return;let Q=new ResizeObserver(D);return Q.observe(p,{box:"border-box"}),()=>Q.disconnect()},[F]);let zt=E?8:Math.min(46,10+Math.round(Math.sqrt(c.length)*8)),Ke=E?(0,l.jsx)("span",{style:{fontSize:"0.75rem",lineHeight:1.25,letterSpacing:"0.05em",textTransform:"uppercase",color:G?"var(--graview-accent)":"var(--graview-ink-muted)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:r.label??o}):(0,l.jsx)(an,{text:r.label??o,accent:!!G});return(0,l.jsxs)("div",{ref:ze,className:"graview-kind-card","data-graview-rank":r.rank,"data-graview-landmark":S||void 0,"data-graview-nested":E||void 0,"data-graview-tied":O||void 0,"data-graview-hits":ge&&!E?q:void 0,"data-graview-emphasis":ge&&!E?q>0?"lit":"dimmed":void 0,...a?.description||E?{title:E?[r.label??o,a?.description].filter(Boolean).join(" \u2014 "):a.description}:{},style:{position:"relative",height:"100%","--graview-hue":Math.round(k)},children:[S?(0,l.jsx)("span",{className:"graview-kind-block graview-kind-landmark","data-graview-opened":r.opened||void 0,"aria-hidden":"true",style:{"--graview-rise":zt},children:(0,l.jsx)(ie,{kind:String(t),schema:e,...h?{brand:h}:{},size:96})}):null,(0,l.jsxs)("div",{ref:Fe,className:"graview-kind-face","data-graview-opened":r.opened||void 0,"data-graview-nameplate":F?r.nameplate??"full":void 0,style:{display:"flex",flexDirection:"column",gap:E?1:3,padding:E?"5px 7px":"7px 10px",borderRadius:"var(--graview-radius-sm, 9px)",justifyContent:"center",position:"relative",height:"100%",overflow:"hidden",boxSizing:"border-box",border:G?"1px solid var(--graview-accent)":O>0?"1px solid var(--graview-accent-dim)":`1px solid hsl(${Math.round(k)} 55% var(--graview-tint-lightness) / 0.34)`,backgroundColor:"var(--graview-panel)",backgroundImage:`linear-gradient(hsl(${Math.round(k)} 55% var(--graview-tint-lightness) / calc(var(--graview-tint-alpha) * ${G?1.1:Ie?.28:.5})), hsl(${Math.round(k)} 55% var(--graview-tint-lightness) / calc(var(--graview-tint-alpha) * ${G?1.1:Ie?.28:.5})))`,boxShadow:G?"0 0 0 1px var(--graview-accent-dim)":void 0},children:[!E&&!F&&c.length>0?(0,l.jsx)("div",{"data-graview-tally":c.length,"data-graview-broken":A||void 0,"aria-hidden":"true",style:{position:"absolute",left:0,right:0,top:0,display:"flex",height:3,background:`hsl(${Math.round(k)} 55% var(--graview-tint-lightness) / 0.4)`},children:A>0?(0,l.jsx)("span",{style:{width:`${Math.max(6,Math.round(A/c.length*100))}%`,background:"var(--graview-warn)"}}):null}):null,S?(0,l.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:E?4:6},children:[(0,l.jsx)(ie,{kind:String(t),schema:e,...h?{brand:h}:{},size:E?14:18}),Ke]}):Ke,(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:5,fontSize:"0.875rem"},children:[(0,l.jsx)("span",{title:c.length>0?`${ee(c.length)} ${c.length===1?H(a,String(t)):o.toLowerCase()}`:void 0,style:{fontVariantNumeric:"tabular-nums",color:xe?"var(--graview-accent)":"var(--graview-ink-faint)"},children:c.length===0?"none yet":xe?O===c.length?`${O} tied`:`${O} of ${c.length} tied`:ee(c.length)}),(0,l.jsx)(ke,{kind:String(t),plural:o,problems:It,flag:b,listed:K}),(r.retired??0)>0?(0,l.jsxs)("button",{type:"button",className:"graview-kind-past","data-graview-retired":r.retired,title:`${r.retired} retired ${o.toLowerCase()} \u2014 press to widen the view to the past`,onClick:p=>{p.stopPropagation(),W(ht(M,!0))},onDoubleClick:p=>p.stopPropagation(),onPointerDown:p=>p.stopPropagation(),children:["+",r.retired," past"]}):null,q>0?(0,l.jsxs)("button",{type:"button",className:"graview-kind-hits","data-testid":`hits-${String(t)}`,title:`${q} ${q===1?"match":"matches"} for \u201C${M.q??""}\u201D \u2014 press to go in, narrowed`,onClick:p=>{p.stopPropagation(),W(Je(M,ae(String(t)),{ownPicture:!0,...M.q?{carry:M.q}:{}}))},onDoubleClick:p=>p.stopPropagation(),onPointerDown:p=>p.stopPropagation(),children:[q," match"]}):null,O>0&&!xe?(0,l.jsxs)("span",{style:{fontSize:"0.8125rem",color:"var(--graview-accent)"},children:[O," tied"]}):null,r.hasOwnView&&!F?(0,l.jsx)("span",{title:`${o} has a view of its own`,"aria-label":"has its own view",style:{fontSize:"0.6875rem",color:"var(--graview-accent)"},children:"\u25C6"}):null,!E&&c.length>0&&!r.focused?(0,l.jsxs)("button",{type:"button",className:"graview-kind-open","data-testid":`open-${String(t)}`,"aria-expanded":K,"aria-label":K?`Close up the ${o}`:`See the ${o} in here`,title:K?"Close it up":`See the ${o} in here`,onClick:p=>{p.stopPropagation(),Z?K?x():v([ae(String(t))]):C(ae(String(t)))},onDoubleClick:p=>p.stopPropagation(),onPointerDown:p=>p.stopPropagation(),children:[(0,l.jsx)("span",{className:"graview-kind-open-word",children:K?"close":"open"})," ",(0,l.jsx)("span",{"aria-hidden":"true",children:K?"\u25B4":"\u25BE"})]}):null]}),F&&r.states?(0,l.jsx)(P.Suspense,{fallback:null,children:(0,l.jsx)(nn,{states:r.states,definition:a})}):null,r.opened?(0,l.jsxs)("div",{className:"graview-kind-members","data-graview-buildings":r.plot?.side??1,style:{display:"grid",gridTemplateColumns:`repeat(${y.columns}, minmax(0, 1fr))`,gap:3},children:[c.slice(0,y.shown).map(p=>{let T=r.flagged?.includes(p.id)??!1,D=$(a,p);return(0,l.jsx)(Y,{pickId:p.id,label:T?`${D} ${b}`:D,title:T?`${D} \u2014 implicated in a problem`:void 0,hue:k,selected:We.has(p.id)},p.id)}),c.length>y.shown?(0,l.jsxs)("span",{style:{fontSize:"0.75rem",color:"var(--graview-ink-faint)",padding:"2px 4px",gridColumn:"1 / -1"},children:["+",c.length-y.shown," more \u2014 double-click to go in"]}):null]}):null]}),!E&&z.length>0?(0,l.jsx)("div",{className:"graview-drive-in","data-testid":`drive-in-${String(t)}`,"data-graview-showing":R,onPointerDown:p=>p.stopPropagation(),onDoubleClick:p=>p.stopPropagation(),children:(0,l.jsx)("div",{className:"graview-drive-in-marquee",role:"group","aria-label":`${o}: pictures`,"data-graview-thumbs":z.length===1?"one":"two",children:z.map(p=>{let T=R===p.as;return(0,l.jsxs)("div",{className:"graview-drive-in-thumb","data-graview-pressed":T||void 0,children:[(0,l.jsx)("span",{className:"graview-drive-in-thumb-title","aria-hidden":"true",children:p.title}),(0,l.jsx)("button",{type:"button",className:"graview-drive-in-thumb-press","data-testid":`showing-${p.as}`,"aria-label":`${o}: ${p.title}`,"aria-pressed":T,title:T?`${p.title} is showing \u2014 press again to open it`:`Show ${p.title} on the billboard \u2014 double-click to open it`,onClick:D=>{D.stopPropagation();let Q=()=>W(Ye(M,String(t),p.as));if(D.detail>=2||T&&r.focused){Q();return}W(qe(je(Ue(M,!0),Xe(String(t))),"view",p.as)),D.detail===1&&Qt(D.currentTarget.ownerDocument,$t(D.nativeEvent),Q)}})]},p.as)})})}):null]})};m.generic=!0,w.generic=!0,n.register(t,{cardinality:"one",fidelity:"full"},_(s)).register(t,{cardinality:"one",fidelity:"summary"},_(d)).register(t,{cardinality:"one",fidelity:"glyph"},_(u)).register(t,{cardinality:"many",fidelity:"full"},_(m)).register(t,{cardinality:"many",fidelity:"summary"},_(m)).register(t,{cardinality:"many",fidelity:"glyph"},_(w))}return n}var Ee=L(I(),1),Et=new WeakMap;function rn(e){let n=Et.get(e);return n||Et.set(e,n=Vt(e,he(e))),n}var Ve=tt;function Lt(){return(0,$e.useContext)(Ve)}function qn({children:e}){return(0,Ee.jsx)(Ve.Provider,{value:!0,children:e})}function Mt(e){let n=(0,$e.useContext)(Ve),{store:t}=V();if(n)return null;let a=e.kind??e.node?.kind??e.nodes?.[0]?.kind;if(!a)return null;let o=rn(t.schema).lookup(a,{cardinality:e.cardinality,fidelity:e.fidelity});return o?(0,Ee.jsx)(o,{...e}):null}var i=L(I(),1),on=90,Tt=(0,f.createContext)(null),Le=(e,n)=>e.trim().toLowerCase().replace(/[_-]+/g," ")===n.trim().toLowerCase().replace(/[_-]+/g," "),sn=(0,f.createContext)(null),Ge=(0,f.createContext)(null);function Dt({block:e}){let n=(0,f.useContext)(Ge),t=n?.slots?.[e.key],a=(0,i.jsx)(ln,{block:e});return t?(0,i.jsx)(f.Suspense,{fallback:a,children:(0,i.jsx)(t,{block:e,node:n.node,drawn:a})}):a}function ln({block:e}){let n=(0,f.useContext)(Tt),t=(0,f.useContext)(cn),a=(0,f.useContext)(Te),o=(0,f.useContext)(we);if(n&&e.t==="badge"&&n.values.some(s=>Le(s,e.text))||n&&e.t==="field"&&n.field!==void 0&&e.field===n.field||e.t==="badge"&&/^0(?:\s+\p{L}+)?$/u.test(e.text.trim()))return null;switch(e.t){case"title":return(0,i.jsx)("strong",{className:"graview-spec-title",...o!==null&&Le(o,e.text)?{"aria-hidden":!0}:{},children:e.text});case"text":return e.markdown||Ce(e.text)?(0,i.jsx)("div",{className:"graview-spec-text",...e.tone?{"data-graview-tone":e.tone}:{},children:(0,i.jsx)(yt,{text:e.text,markdown:e.markdown})}):e.runs?(0,i.jsx)("p",{className:"graview-spec-text graview-spec-meta",...e.tone?{"data-graview-tone":e.tone}:{},children:e.runs.map((s,d)=>(0,i.jsxs)(f.Fragment,{children:[d>0?" ":null,s.field!==void 0?(0,i.jsx)("span",{className:"graview-spec-chip","data-graview-field":s.field,children:s.text}):(0,i.jsx)("span",{className:"graview-spec-meta-words",children:d>0&&e.runs[d-1].field===void 0?`\xB7 ${s.text}`:s.text})]},d))}):(0,i.jsx)("p",{className:"graview-spec-text",...e.tone?{"data-graview-tone":e.tone}:{},children:e.text});case"badge":return(0,i.jsx)("span",{className:"graview-spec-badge","data-graview-tone":e.tone,children:e.text});case"field":return(0,i.jsxs)("span",{className:"graview-spec-field","data-graview-field":e.field,children:[(0,i.jsx)("span",{className:"graview-spec-label",children:e.label}),(0,i.jsx)("span",{className:"graview-spec-value",...Ce(e.text)?{style:{whiteSpace:"pre-line"}}:{},children:e.linked?(0,i.jsx)(pt,{relation:e.linked.relation,refs:e.linked.refs,as:"chip"}):e.app?(0,i.jsx)(vt,{address:e.app}):e.href?(0,i.jsx)("a",{className:"graview-spec-link",href:e.href,...e.href.startsWith("tel:")?{}:{rel:"noopener noreferrer",target:"_blank"},children:e.text}):e.text})]});case"image":return(0,i.jsx)(Se,{as:"block",field:e.field,files:e.files,label:e.label,view:e.as});case"progress":return e.value===void 0||e.max===void 0?(0,i.jsxs)("span",{className:"graview-spec-progress",children:[(0,i.jsx)("span",{className:"graview-spec-label",children:e.label}),(0,i.jsx)("span",{className:"graview-spec-value",children:e.text})]}):(0,i.jsxs)("span",{className:"graview-spec-progress",children:[(0,i.jsx)("span",{className:"graview-spec-label",children:e.label}),(0,i.jsx)("span",{className:"graview-spec-track",role:"progressbar","aria-label":e.label,"aria-valuemin":0,"aria-valuemax":e.max,"aria-valuenow":Math.max(0,Math.min(e.value,e.max)),"aria-valuetext":e.text,children:(0,i.jsx)("span",{className:"graview-spec-fill",style:{width:`${Math.round(Math.max(0,Math.min(e.value,e.max))/e.max*100)}%`}})}),(0,i.jsx)("span",{className:"graview-spec-value",children:e.text})]});case"group":return(0,i.jsx)("span",{className:"graview-spec-group","data-direction":e.direction,children:(0,i.jsx)(Me,{blocks:e.blocks})});case"when":return e.shown?(0,i.jsx)(Me,{blocks:e.blocks}):null;case"divider":return(0,i.jsx)("hr",{className:"graview-spec-divider"});case"figure":return(0,i.jsx)(dn,{});case"headline":{let s=`h${Math.min(6,e.level+t)}`,d=(0,i.jsx)(s,{className:"graview-spec-headline","data-level":e.level,"data-long":e.text.length>on?"":void 0,children:e.text});return a!==null&&e.level===1?(0,i.jsxs)(i.Fragment,{children:[d,a]}):d}case"number":return(0,i.jsxs)("span",{className:"graview-spec-number",...e.emphasis?{"data-emphasis":e.emphasis}:{},children:[(0,i.jsx)("span",{className:"graview-spec-number-value",children:e.text}),e.label?(0,i.jsx)("span",{className:"graview-spec-label",children:e.label}):null]});case"list":return(0,i.jsx)(pn,{list:e})}}function dn(){let e=(0,f.useContext)(Ge)?.figure;return e?(0,i.jsx)("span",{className:"graview-spec-figure","aria-hidden":"true",children:e()}):null}function Me({blocks:e}){let n=[];for(let t=0;t<e.length;t++){let a=t;for(;e[a]?.t==="badge"&&e[a+1]?.t==="badge";)a++;if(a===t){n.push((0,i.jsx)(Dt,{block:e[t]},t));continue}n.push((0,i.jsx)("span",{className:"graview-spec-badges",children:e.slice(t,a+1).map((o,s)=>(0,i.jsx)(Dt,{block:o},s))},t)),t=a}return n}function Oe({blocks:e,ctx:n,view:t}){let a=(0,f.useContext)(sn)?.[t];return(0,i.jsx)(Ge.Provider,{value:{figure:n.figure,slots:a,node:n.node},children:(0,i.jsx)(Me,{blocks:e})})}function Bt({blocks:e,ctx:n,view:t}){return(0,i.jsx)(Oe,{blocks:j(e,n),ctx:n,view:t})}var De=3,Gt=(0,f.createContext)(0),Ot=(0,f.createContext)(null),cn=(0,f.createContext)(0),Te=(0,f.createContext)(null),gn=(0,f.createContext)(null);function un({node:e,as:n,depth:t,said:a=null}){let{store:o,views:s}=V(),d=$(o.schema.tryDefinition(e.kind),e),u=s.lookup(e.kind,{cardinality:"one",fidelity:n==="card"?"summary":"glyph"});return n==="row"&&t<=De&&(!u||me(u))?(0,i.jsxs)("li",{className:"graview-spec-item","data-graview-listed":e.id,"data-as":n,children:[(0,i.jsx)(Be,{node:e,label:d}),(0,i.jsx)("div",{className:"graview-spec graview-spec-row","data-graview-spec":"row","data-graview-kind":e.kind,"aria-hidden":"true",children:(0,i.jsx)("strong",{className:"graview-spec-title",children:d})})]}):(0,i.jsxs)("li",{className:"graview-spec-item","data-graview-listed":e.id,"data-as":n,children:[(0,i.jsx)(Be,{node:e,label:d}),t<=De&&u?(0,i.jsx)(Ze,{mode:"scene",children:(0,i.jsx)(Gt.Provider,{value:t,children:(0,i.jsx)(Tt.Provider,{value:a,children:(0,i.jsx)(we.Provider,{value:d,children:(0,i.jsx)(u,{node:e,cardinality:"one",fidelity:n==="card"?"summary":"glyph",mode:"scene",selected:!1})})})})}):(0,i.jsx)("span",{className:"graview-spec-item-name","aria-hidden":"true",children:d})]})}function Be({node:e,label:n,describedBy:t}){let a=(0,f.useContext)(Ot),o=(0,f.useRef)(null);return xt(o),a?(0,i.jsx)("a",{ref:o,className:"graview-spec-item-link",href:a.href(e),"aria-label":n,...t?{"aria-describedby":t}:{},onClick:s=>{s.metaKey||s.ctrlKey||s.shiftKey||s.button!==0||(s.preventDefault(),s.stopPropagation(),a.go(e))}}):(0,i.jsx)("button",{ref:o,type:"button",className:"graview-spec-item-link","data-graview-pick":e.id,"aria-label":n,...t?{"aria-describedby":t}:{}})}function pn({list:e}){let n=(0,f.useContext)(Gt)+1,{store:t}=V(),a=(0,f.useContext)(Ot),[o,s]=(0,f.useState)(e.members.length);if(e.failed)return(0,i.jsx)("p",{className:"graview-spec-text",children:"\u2014"});if(e.members.length===0)return e.empty?(0,i.jsx)("p",{className:"graview-spec-text graview-spec-empty",children:e.empty}):null;let d=(v,x=null)=>n>De?(0,i.jsx)("ul",{className:"graview-spec-list","data-as":"names",children:v.map(C=>(0,i.jsxs)("li",{className:"graview-spec-item","data-graview-listed":C.id,"data-as":"name",children:[(0,i.jsx)(Be,{node:C,label:$(t.schema.tryDefinition(C.kind),C)}),(0,i.jsx)("span",{className:"graview-spec-item-name","aria-hidden":"true",children:$(t.schema.tryDefinition(C.kind),C)})]},C.id))}):(0,i.jsx)("ul",{className:"graview-spec-list","data-as":e.as,children:v.map(C=>(0,i.jsx)(un,{node:C,as:e.as,depth:n,said:x},C.id))}),u=e.rest??[],m=Math.min(o,e.members.length+u.length),g=m>e.members.length?[...e.members,...u].slice(0,m):e.members,w=e.members.length+u.length-m,r=Math.max(1,e.members.length),c=w>0?(0,i.jsx)("p",{className:"graview-spec-text graview-spec-more",children:(0,i.jsx)("button",{type:"button",className:"graview-spec-show-more","data-graview-show-more":w,onClick:()=>s(m+r),children:`Show ${Math.min(r,w)} more`})}):null,y=e.total??e.members.length+e.more,k=e.more-u.length,h=c??(a?.more&&y>g.length?a.more({members:g,total:y}):k>0?(0,i.jsx)("p",{className:"graview-spec-text graview-spec-more",children:`and ${k} more`}):null);if(!e.groups)return(0,i.jsxs)("div",{className:"graview-spec-listing",children:[d(g),h]});let S=`h${e.headingLevel}`,b=m,N=m>e.members.length&&e.everyGroup?e.everyGroup.flatMap(v=>{if(b<=0)return[];let x=v.members.slice(0,b);return b-=x.length,[{...v,members:x}]}):e.groups;return(0,i.jsxs)("div",{className:"graview-spec-listing",children:[N.map(v=>(0,i.jsxs)("section",{className:"graview-spec-list-group","data-graview-group":v.value??"",children:[v.heading?(0,i.jsxs)(S,{className:"graview-spec-list-heading",children:[v.heading," ",(0,i.jsx)("span",{className:"graview-spec-list-count",children:(e.everyGroup?.find(x=>x.value===v.value)??v).members.length})]}):null,d(v.members,v.value!==null?{values:[v.value,...v.heading?[v.heading]:[]]}:null)]},v.value??"")),h]})}function da({blocks:e,heading:n=2,firstHeading:t,slot:a,view:o=a}){let{store:s,brand:d}=V();pe();let u=oe(s,null,null,{heading:n,firstHeading:t,money:d}),m=(0,f.useContext)(Te),w=(0,f.useContext)(gn)?.lede===!0&&a==="place"&&e[0]?.t==="headline"?e.slice(1):e,r=w.some(c=>c.t==="headline");return(0,i.jsxs)("div",{className:`graview-spec graview-spec-${a}`,"data-graview-spec":a,children:[m!==null&&!r?m:null,(0,i.jsx)(Te.Provider,{value:r?m:null,children:(0,i.jsx)(Bt,{blocks:w,ctx:u,view:o})})]})}function He(e,n="card"){let{store:t,brand:a}=V(),o=t.schema;return{...oe(t,null,e,{slot:n,money:a}),figure:()=>(0,i.jsx)(ie,{kind:e.kind,schema:o,...a?{brand:a}:{},size:22})}}function mn({blocks:e,node:n,selected:t,flagged:a}){let o=He(n),[s,...d]=e,u=s?.t==="title";return(0,i.jsx)(J,{...u?{title:j([s],o)[0].text}:{},selected:t,tone:a?"warning":"muted",fit:!0,children:(0,i.jsx)("div",{className:"graview-spec graview-spec-card","data-graview-spec":"card","data-graview-kind":n.kind,children:(0,i.jsx)(Bt,{blocks:u?d:e,ctx:o,view:`${n.kind}.card`})})})}function hn({blocks:e,props:n}){let t=n.node,a=He(t,"page"),o=Lt(),s=j(e,a),d=ye(e,s),u=d.title!==void 0&&(!o||d.title===$(a.schema?.tryDefinition(t.kind),t)),m=(0,i.jsx)("div",{className:"graview-spec graview-spec-page","data-graview-spec":"page","data-graview-kind":t.kind,children:(0,i.jsx)(Oe,{blocks:u?s.slice(1):s,ctx:a,view:`${t.kind}.page`})});return o?m:(0,i.jsx)(se.Provider,{value:{nodeId:t.id,...d.title!==void 0?{title:d.title}:{},body:m,fields:d.fields,records:d.records},children:(0,i.jsx)(Mt,{...n})})}function ca(e,n,t){return typeof e=="function"?e.says?.(n,t):void 0}function fn({blocks:e,node:n,selected:t}){let{store:a}=V(),o=$(a.schema.tryDefinition(n.kind),n),s=He(n,"row"),d=j(e,s),u=(0,f.useContext)(we);return(0,i.jsx)("div",{title:o,style:{minWidth:0,maxWidth:"100%"},children:(0,i.jsxs)("div",{className:"graview-spec graview-spec-row","data-graview-spec":"row","data-graview-kind":n.kind,...e.some(dt)?{"data-graview-tall":""}:{},...t?{"data-selected":""}:{},children:[lt(d,o)?null:(0,i.jsx)("strong",{className:"graview-spec-title","data-graview-row-name":"",...u!==null&&Le(u,o)?{"aria-hidden":!0}:{},children:o}),(0,i.jsx)(Oe,{blocks:d,ctx:s,view:`${n.kind}.row`})]})})}function ga(e,n,t){if(!t)return e;let a=new Set(n.kinds);for(let[o,s]of Object.entries(t)){if(!a.has(o)||!s)continue;let d=o;if(s.card){let u=re(s.card),m=g=>g.node?(0,i.jsx)(mn,{blocks:u,node:g.node,selected:g.selected,flagged:g.flagged?.includes(g.node.id)??!1}):null;e.register(d,{cardinality:"one",fidelity:"summary"},m)}if(s.row){let u=re(s.row),m=g=>g.node?(0,i.jsx)(fn,{blocks:u,node:g.node,selected:g.selected}):null;m.says=(g,w)=>ye(u,j(u,oe({graph:w,schema:n},null,g,{slot:"row"}))),e.register(d,{cardinality:"one",fidelity:"glyph"},m)}if(s.page){let u=re(s.page),m=g=>g.node?(0,i.jsx)(hn,{blocks:u,props:g}):null;m.says=(g,w)=>ye(u,j(u,oe({graph:w,schema:n},null,g))),e.register(d,{cardinality:"one",fidelity:"full"},m)}}return e}export{xt as a,qn as b,Tt as c,Ot as d,cn as e,Te as f,gn as g,Be as h,da as i,ca as j,ga as k,Vt as l};
|
|
@@ -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{L as M,N as H,zb as N}from"./chunk.6W2DUW5S.js";var z=()=>(__graviewPreload(import.meta.url,["./chunk.QATG5HNV.js","./chunk.PXQVXBNG.js","./chunk.B3WVCSW5.js","./chunk.6W2DUW5S.js","./chunk.SLBWPVIY.js","./chunk.AJZBJBMO.js"]),import("./chunk.OPKXCL5R.js"));function F(n,l,y){let d=new Map;for(let u of y?.kinds??[])for(let a of n.nodesOfKind(u))l.has(a.id)||d.set(a.id,a);let o=new Set([...l,...d.keys()]),p=new Set(y?.edges??[]),k=new Set;if(p.size>0&&l.size>0){for(let u of l)for(let a of n.outEdges(u))p.has(a.kind)&&d.has(a.to)&&k.add(a.to);for(let u of d.keys())n.outEdges(u).some(a=>p.has(a.kind)&&l.has(a.to))&&k.add(u)}let b=new Map([...[...d].filter(([u])=>k.has(u)),...[...d].filter(([u])=>!k.has(u))]),h=[];if(p.size>0)for(let u of o)for(let a of n.outEdges(u))p.has(a.kind)&&o.has(a.to)&&h.push({kind:a.kind,from:a.from,to:a.to});return{nodes:[...b.values()],edges:h}}function L(n,l,y){let d=[];return()=>{let o=y();for(;d.length>0&&d[0]<=o-l;)d.shift();return d.length>=n?!1:(d.push(o),!0)}}function D(n={},l=Date.now){return{act:L(n.acts??30,n.actWindowMs??6e4,l),message:L(n.messages??120,n.messageWindowMs??1e3,l)}}var S=n=>typeof n=="object"&&n!==null&&!Array.isArray(n);function C(n,l){let y=structuredClone(l),d=n.schema.tryDefinition(y.kind),o=y.label;return{...y,label:d?.label?d.label(y):typeof o=="string"&&o.length>0?o:y.id}}function W(n){let l=n.limiter??D(n.limits,n.now),y=n.limits?.maxHeight??4e3,d=`view:${n.view}`,o={applied:0,refused:0,dropped:0},p=()=>n.store.seenBy(n.principal),k=e=>C(n.store,e),b=()=>{if(n.props)return n.props();let e=p(),s=e.graph,r=n.input?.()??{},f=r.node?s.getNode(r.node.id):void 0,i=r.nodes?.flatMap(t=>{let m=s.getNode(t.id);return m?[m]:[]}),g=new Set([...f?[f.id]:[],...(i??[]).map(t=>t.id)]),c=[];for(let t of g)for(let m of s.outEdges(t))g.has(m.to)&&c.push({kind:m.kind,from:m.from,to:m.to});let w=F(s,g,n.reads),R=new Set(c.map(t=>`${t.kind} ${t.from} ${t.to}`));for(let t of w.edges)R.has(`${t.kind} ${t.from} ${t.to}`)||c.push(t);let P=w.nodes.length>0?[...i??[],...w.nodes]:i,x=t=>t?.filter(m=>s.has(m)),T=e.permittedMutations(n.principal).map(t=>({name:t.name,title:t.title??t.name,...t.description!==void 0?{description:t.description}:{},...t.subject?{subject:{kinds:t.subject.kinds,arg:t.subject.arg}}:{}}));return{view:n.view,...f?{node:k(f)}:{},...P?{nodes:P.map(k)}:{},edges:c,...r.label!==void 0?{label:r.label}:{},...r.fidelity!==void 0?{fidelity:r.fidelity}:{},...r.cardinality!==void 0?{cardinality:r.cardinality}:{},...r.mode!==void 0?{mode:r.mode}:{},...r.selected!==void 0?{selected:r.selected}:{},...r.implicated?{implicated:x(r.implicated)}:{},...r.flagged?{flagged:x(r.flagged)}:{},acts:T,...n.theme?{theme:n.theme()}:{},locale:M(),timeZone:H(),...n.placesShown?{places:n.placesShown().map(({as:t,title:m,kind:$})=>({as:t,title:m,kind:$}))}:{}}},h=!1,u=0,a=()=>{if(h)return;u+=1;let e=b();n.send({type:"props",props:n.hand?n.hand(e):e,push:u})},v=!1,E=n.store.subscribe(()=>{v||(v=!0,queueMicrotask(()=>{v=!1,a()}))}),G=(e,s)=>(o.refused+=1,{ok:!1,reason:e,message:s}),j=(e,s,r)=>A([{name:e,args:s}],r),A=(e,s,r)=>{if(!l.act())return G("rate-limited","Too many acts asked for at once; this one was not applied.");let f=[];for(let{name:i,args:g}of e){if(s){let c=s(i,g);if(!c.ok)return G(c.reason,c.message);i=c.name,g=c.args}if(!n.store.allMutations().some(c=>c.name===i))return G("unknown-act","There is no act by that name here.");f.push({name:i,args:g})}try{let i=n.store.applyAll(f,{author:n.principal,via:d,...r?{intent:r}:{}});return o.applied+=1,{ok:!0,intent:i.intent}}catch(i){return i instanceof N?G("refused",i.refusal.message):G("failed","The act could not be applied.")}},O=(e,s,r)=>{let f=Array.isArray(r);if(typeof s!="string"||(f?r.length===0||r.length>100||!r.every(S):!S(r)))return o.refused+=1,n.send({type:"answer",id:e,ok:!1,reason:"malformed",message:"An act is asked for by name, with its arguments as an object, or a list of 1 to 100 of them for several as one change."});let i=A((f?r:[r]).map(g=>({name:s,args:g})),n.judgeAct);n.send(i.ok?{type:"answer",id:e,ok:!0,intent:i.intent}:{type:"answer",id:e,ok:!1,reason:i.reason,message:i.message})};return{receive(e){if(!h){if(!l.message()){o.dropped+=1,n.onFlood?.();return}if(!S(e)||e.nonce!==n.nonce){o.dropped+=1;return}if(e.type==="act"&&(typeof e.id=="string"||typeof e.id=="number"))return O(e.id,e.name,e.args);if(e.type==="navigate"&&n.onArrive&&(typeof e.place=="string"||typeof e.to=="string")){let s={...e.where!==void 0?{where:e.where}:{},...e.section!==void 0?{section:e.section}:{}},r=typeof e.place=="string"?{place:e.place,...s}:{record:e.to,...s},f=n.onArrive;z().then(({judgeDestination:i,listsOf:g})=>{if(h)return;let c=new Set([...n.store.kindsKeptFrom(n.principal),...n.store.modules.disabledKinds]),w=i(r,{sees:R=>p().graph.has(R),places:n.placesShown?.()??[],lists:g(n.store.schema,c),schema:n.store.schema});w.ok?f(w.arrival):(o.dropped+=1,n.onLost?.(w.says))});return}if(e.type==="navigate"&&typeof e.place=="string"){n.places?.().includes(e.place)?n.onNavigatePlace?.(e.place):o.dropped+=1;return}if(e.type==="navigate"&&typeof e.to=="string"){p().graph.has(e.to)?n.onNavigate?.(e.to):o.dropped+=1;return}if(e.type==="render"&&Array.isArray(e.records)&&n.onRender){n.onRender(e.records);return}if(e.type==="style"&&Array.isArray(e.sheets)&&e.sheets.every(s=>typeof s=="string")&&n.onStyle){n.onStyle(e.sheets);return}if(e.type==="hears"&&Array.isArray(e.events)&&n.onHears){n.onHears(e.events.filter(s=>typeof s=="string").slice(0,20));return}if(e.type==="clicks"&&Array.isArray(e.selectors)){n.onClicks?.(e.selectors.filter(s=>typeof s=="string"&&s.length<=500).slice(0,200));return}if(e.type==="gestures"&&Array.isArray(e.bound)&&n.onGestures){n.onGestures(e.bound.slice(0,32));return}if(e.type==="pushed"&&typeof e.push=="number"&&typeof e.ms=="number"&&n.onPushed){n.onPushed(e.push,e.ms);return}if(e.type==="size"&&typeof e.height=="number"&&Number.isFinite(e.height)){n.onSize?.(Math.max(0,Math.min(y,Math.round(e.height))));return}o.dropped+=1}},push:a,pressed(e){return h?{ok:!1,reason:"refused",message:"The view has gone."}:e.ok?j(e.name,e.args):(o.refused+=1,e)},change(e,s){return h?{ok:!1,reason:"refused",message:"The view has gone."}:A(e,void 0,s)},get stats(){return o},dispose(){h=!0,E()}}}export{F as a,D as b,C as c,W as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k}from"./chunk.CANTHIRO.js";import"./chunk.CSA6SWTI.js";import"./chunk.IYVBJDR7.js";import"./chunk.VTCPA4V4.js";import"./chunk.FGJM4LJO.js";import"./chunk.K7WME4P4.js";import"./chunk.MDIAWTNK.js";import"./chunk.PEA4D66Y.js";import"./chunk.TRPPN2GD.js";import"./chunk.S2ATSY6P.js";import"./chunk.72Q4R7N6.js";import"./chunk.6W2DUW5S.js";import"./chunk.SLBWPVIY.js";import"./chunk.AJZBJBMO.js";export{g as columnActs,d as columnChoices,c as columnMoves,b as columnOf,e as columnReach,f as columnSteps,j as describePlace,k as placeText,h as resolveFor,i as shadowedPageSlots,a as statusColumns};
|
|
@@ -1,18 +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 Fe}from"./chunk.YI7WHBAD.js";import{A as Zt,B as Ce,C as oo,D as Je,E as me,F as Kn,G as Ge,H as Ve,I as io,J as Bn,K as Re,L as so,M as lo,N as H,O as ut,P as St,Q as co,R as vt,S as Xt,T as po,U as oe,V as gt,W as le,X as qn,a as j,b as Se,c as Y,d as Yt,e as In,f as Fn,g as pt,h as ae,i as he,j as se,k as A,l as re,m as V,n as Ue,o as we,p as Qt,q as ve,r as ue,s as no,t as wt,u as ao,v as Dn,w as Wn,x as Q,y as De,z as ro}from"./chunk.T56SOSIR.js";import{b as Hn,c as eo,d as to,e as Xe,f as Gn,h as ee}from"./chunk.JRU5BT7K.js";import{a as Zr,d as Xr,e as Jr}from"./chunk.UGFDSE37.js";import{a as Vr,c as jr,f as _r,g as zr,i as Yr,j as Qr}from"./chunk.EG2N5F6L.js";import{a as _t,b as zt}from"./chunk.PXQVXBNG.js";import{a as Hr,b as Ir,c as Fr,d as $n}from"./chunk.7NFCI4LH.js";import{b as $r}from"./chunk.RUTZEEBR.js";import{a as Dr,b as Wr,d as Vt,e as Gr,f as Kr,g as Br,j as jt}from"./chunk.GZWC72HS.js";import{m as Or}from"./chunk.ULTYDYTS.js";import{a as Sr,b as vr,c as br,e as Er,f as On,h as Bt}from"./chunk.UXNZPPWR.js";import{d as Pr,e as Ar,f as Cr,g as Rr,n as Gt,o as Lr,q as Tr,s as Kt}from"./chunk.GYO57LKD.js";import{a as It,b as Za,c as Xa,d as Ft,e as Ja}from"./chunk.KWMBRB6O.js";import{b as or,c as yr,e as hr,f as En}from"./chunk.G226CUJQ.js";import{a as Tn,b as fr}from"./chunk.AQJD23AN.js";import{a as qt,b as Ut,c as Mr,e as Nr}from"./chunk.6S3B4XC4.js";import{a as ct,b as gr,e as mr}from"./chunk.52Y37IAD.js";import{a as Mn}from"./chunk.4DCPB67O.js";import{a as Rn,b as ar,c as rr}from"./chunk.Y4VOCJ7R.js";import{a as wr}from"./chunk.IYVBJDR7.js";import{c as sr,d as lr,e as dr,f as cr,k as Ze,l as pr}from"./chunk.VTCPA4V4.js";import{a as ir}from"./chunk.FGJM4LJO.js";import{r as Ln,s as ur}from"./chunk.TTFYXKLI.js";import{b as er,c as tr,d as Dt,e as nr,l as Wt}from"./chunk.S2ATSY6P.js";import{H as qr,K as Ur,c as Ya,d as Qa,r as kr,s as xr,z as Nn}from"./chunk.G6DISMVT.js";import{c as ni}from"./chunk.W54NXXC5.js";import{Ba as Ht,G as Ne,L as Da,N as Wa,Qa as za,R as Ga,T as U,U as Cn,Y as Ka,Z as Ba,ba as qa,ca as ie,fa as Ua,ga as Va,ia as ja,ma as lt,oa as _a,qa as dt,r as Fa,v as Ie}from"./chunk.B3T4N2XM.js";import{a as Ia}from"./chunk.SDO3U72B.js";import{$a as Ra,Ed as An,Fd as $a,J as ba,Kd as Ha,Nc as Na,U as ht,Za as Ca,ca as st,da as pe,fa as Ye,ga as Mt,hc as Ta,ia as qe,ka,la as xa,lb as xn,ma as Qe,mb as La,md as Pn,oc as Ea,qc as Ma,sd as Ot,td as Oa,vd as $t,wb as Nt,xa as Pa,ya as Aa}from"./chunk.6W2DUW5S.js";import{b as I}from"./chunk.AJZBJBMO.js";function uo(e,t,n={}){let a=e.graph.getNode(t);if(!a)return;let r=e.schema.tryDefinition(a.kind),o=i=>pe(e.schema.tryDefinition(i.kind),i),l=new Map;for(let i of e.graph.allEdges()){let s=i.from===t?"out":i.to===t?"in":null;if(!s)continue;let c=s==="out"?i.to:i.from,g=e.graph.getNode(c);if(!g)continue;let u=(s==="out"?r:e.schema.tryDefinition(g.kind))?.edges?.[i.kind],p=s==="in"?u?.inverse??u?.description:u?.description,x=`${i.kind}|${s}|${p??""}`;(l.get(x)??(()=>{let W={edgeKind:i.kind,direction:s,...p?{description:p}:{},targets:[]};return l.set(x,W),W})()).targets.push({id:g.id,kind:g.kind,label:o(g)})}return{id:t,kind:a.kind,label:o(a),fields:Dt(Ze(e.schema,e.graph,a),r),violations:xn(e.violations(n.context),[t]),actions:Mn(e,[t],{focus:t,...n.principal?{principal:n.principal}:{},...n.context?{context:n.context}:{}}),links:[...l.values()].map(i=>{let s=er(i.targets.flatMap(c=>{let g=e.graph.getNode(c.id);return g?[g]:[]}),c=>e.schema.tryDefinition(c));return{...i,targets:[...i.targets].map(c=>s.has(c.id)?{...c,apart:s.get(c.id)}:c).sort((c,g)=>c.label.localeCompare(g.label))}})}}function et(e,t,n={}){return{kind:t,members:e.graph.nodesOfKind(t),actions:Mn(e,[],{kindSelection:[t],...n.principal?{principal:n.principal}:{},...n.context?{context:n.context}:{}})}}function go(e,t){let n=(o,l)=>`${o}|${JSON.stringify(l)}`,a=new Map;for(let o of[...e.affordances,...e.withheld]){if(o.provider!=="invariant")continue;let l=n(o.mutation,o.args);a.has(l)||a.set(l,o.rank??Number.MAX_SAFE_INTEGER)}let r=Number.MAX_SAFE_INTEGER;return[...t].map((o,l)=>({repair:o,declared:l})).sort((o,l)=>(a.get(n(o.repair.mutation,o.repair.args??{}))??r)-(a.get(n(l.repair.mutation,l.repair.args??{}))??r)||o.declared-l.declared).map(o=>o.repair)}function tt(e){let t=e.schema.kinds.map(r=>({kind:r,plural:qe(e.schema,r),count:e.graph.nodesOfKind(r).length})),n=new Map;for(let r of e.graph.allEdges()){let o=e.graph.getNode(r.from),l=e.graph.getNode(r.to);if(!o||!l)continue;let i=`${r.kind}|${o.kind}|${l.kind}`;n.set(i,(n.get(i)??0)+1)}let a=[];for(let{kind:r}of t){let o=e.schema.tryDefinition(r)?.edges??{};for(let[l,i]of Object.entries(o)){let s=i.to==="*"||i.to===void 0?(()=>{let c=[...n.keys()].filter(g=>g.startsWith(`${l}|${r}|`)).map(g=>g.split("|")[2]);return c.length>0?c:["*"]})():i.to;for(let c of s)a.push({edgeKind:l,from:r,to:c,...i.description?{description:i.description}:{},...i.inverse?{inverse:i.inverse}:{},count:n.get(`${l}|${r}|${c}`)??0})}}return{kinds:t,relations:a}}var Ke=I(Ne(),1);var bt=I(Ne(),1);var Le=I(U(),1),ri={problems:"Problems",search:"Search",map:"Connections",places:"Pictures","~draft":"A view drawn"},oi=e=>{try{return decodeURIComponent(e)}catch{return e}};function ii(e,t,n={}){let{store:a}=e,r=a.schema,o=(n.base??"").replace(/\/$/,""),[l="/",i=""]=t.split("#")[0].split("?"),s=(P,E,b)=>({label:P,href:`${o}${E}`,path:E,...b?{current:b}:{}}),c=P=>{let E=n.registry?.sectionOf(P);return E?[E.path===void 0?{label:E.label}:s(E.label,E.path)]:[]},g=P=>n.registry?.sectionOf(P)?.label,k=P=>{let E=g(P);return E===void 0?{}:{section:E}},[u,p,...x]=l.split("/").filter(Boolean).map(oi);if(u===void 0)return{as:"home",label:"Home",trail:[s("Home","/",!0)]};if(u==="places"&&p!==void 0&&x.length===0){let P=new URLSearchParams(i).get("of"),E=new Set(De(a,e.principal)),b=e.views?.places()??[],G=b.find(L=>E.has(L.kind)&&L.as===p&&(!P||j(r,L.kind)===P));if(G){let L=Yt(G.as,Ot(G,b)?j(r,G.kind):void 0);return{as:"place",kind:G.kind,label:G.title,...k(G.kind),trail:[...c(G.kind),s(G.title,L,!0)]}}}let O=x.length===0?Se(r,u):void 0;if(O!==void 0){let P=s(qe(r,O),`/${j(r,O)}`);if(p===void 0)return{as:"list",kind:O,label:P.label,...k(O),trail:[...c(O),{...P,current:!0}]};let E=a.graph.getNode(p),b=E&&E.kind===O?pe(r.tryDefinition(O),E):"Nothing lives here";return{as:"record",kind:O,id:p,label:b,...k(O),trail:[...c(O),P,s(b,Y(r,O,p),!0)]}}let W=ri[u]??si((x.at(-1)??p??u).replace(/[-_]+/g," "));return{as:"page",label:W,trail:[s(W,l,!0)]}}var si=e=>e.charAt(0).toUpperCase()+e.slice(1),Un=(0,bt.createContext)(null);function li(e){let t=me(),n=Je("/");return ee(e.context.store),ii(e.context,`${t.pathname}${t.search}`,{registry:e.registry,base:n})}var di={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},mo={display:"flex",alignItems:"center",gap:6,minWidth:0},fo={display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0,lineHeight:"24px"};function mt({context:e,style:t}){let n=(0,bt.useContext)(Un),a=(0,bt.useContext)(St);return vt(a??pi,"trail")||n?.registry?.without().has("trail")?null:(0,Le.jsx)(ci,{root:n??{context:e,registry:void 0},context:e,...t?{style:t}:{}})}function ci({root:e,context:t,style:n}){let a=li(e);return a.trail.length<2?null:(0,Le.jsx)(ui,{here:a,mark:a.as==="record"?{kind:a.kind,context:t}:void 0,...n?{style:n}:{},"data-testid":"page-trail"})}var pi={count:()=>0,place:()=>()=>{},subscribe:()=>()=>{}};function ui({here:e,mark:t,style:n,...a}){let r=e.as==="record"?e.trail.length-2:-1;return(0,Le.jsx)("nav",{"aria-label":"You are here","data-graview-trail":"",style:{minWidth:0,...n},...a,children:(0,Le.jsx)("ol",{style:{...he,listStyle:"none",padding:0,display:"flex",alignItems:"center",gap:6,minWidth:0,overflow:"hidden"},children:e.trail.map((o,l)=>(0,Le.jsxs)("li",{style:o.current?di:{...mo,flexShrink:l===e.trail.length-2?0:1,maxWidth:"100%"},...o.current?{"aria-current":"page"}:{},children:[l>0&&!o.current?(0,Le.jsx)("span",{"aria-hidden":"true",children:"\u203A"}):null,o.current?o.label:o.path!==void 0?(0,Le.jsxs)(H,{to:o.path,style:{...we,...mo},...l===r?{"data-testid":"trail-list"}:{},children:[l===r&&t?(0,Le.jsx)(ue,{kind:t.kind,brand:t.context.brand,schema:t.context.store.schema,size:8}):null,(0,Le.jsx)("span",{style:fo,children:o.label})]}):(0,Le.jsx)("span",{style:fo,children:o.label})]},`${l}:${o.label}`))})})}var C=I(U(),1);function Oe(e){let t=e.views;if(!t)return[];let n=new Set(De(e.store,e.principal));return t.places().filter(a=>n.has(a.kind))}function Jt(e,t){if(!t.over)return[t.kind];let n=new Set(De(e.store,e.principal));return t.over.filter(a=>a===t.kind||n.has(a))}var nt=e=>`place:${e.kind}:${e.as}`;function fe(e,t){return Yt(t.as,Ot(t,e.views?.places()??[])?j(e.store.schema,t.kind):void 0)}function kt(e,t){let n=e.schema.tryDefinition(t);return e.graph.nodesOfKind(t).filter(a=>st(n,a))}function Vn(e,t,n){let a=(o,l)=>Mt(e.schema,l,o),r=(typeof t=="string"?[t]:t).map(o=>a(kt(e,o).length,o)).join(" and ");return n?`${r} across ${a(kt(e,n).length,n)}`:r}function jn({context:e,place:t,chosen:n,filter:a}){let{store:r,views:o,invariantContext:l}=e,s=o?.resolve(t.kind,{cardinality:"many",fidelity:"full"},t.as)?.view,c=[...new Set(r.violations(l).flatMap(u=>u.nodeIds))],g=Jt(e,t).flatMap(u=>kt(r,u));if(!s)return null;let k=gi(r,g,a,c);return(0,C.jsx)(Ln,{kind:t.kind,view:t.title,children:(0,C.jsx)(gt,{when:dt(s),children:(0,C.jsx)(s,{nodes:k,label:t.title,fidelity:"full",cardinality:"many",mode:"fullscreen",selected:!1,...n&&n.length>0?{implicated:n}:{},...c.length>0?{flagged:c}:{}})})})}function gi(e,t,n,a){let r=n?$t({filter:n}).filter??[]:[];return r.length===0?t:Bt(t,{filter:r},{schema:e.schema,graph:e.graph,flagged:new Set(a)}).nodes}function mi({store:e,views:t,as:n,invariantContext:a}){ee(e);let r={store:e,views:t,...a?{invariantContext:a}:{}},o=t.places().find(l=>l.as===n);return o?(0,C.jsx)(jn,{context:r,place:o}):null}function fi({context:e,kind:t}){let{store:n,views:a,invariantContext:r}=e,o=kt(n,t),l=n.schema.tryDefinition(t),i=Q(n,t),c=a?.resolve(t,{cardinality:"many",fidelity:"full"})?.view,g=[...new Set(n.violations(r).flatMap(x=>x.nodeIds))];if(c&&!lt(c))return(0,C.jsx)(Ln,{kind:t,children:(0,C.jsx)(c,{nodes:o,label:i,fidelity:"full",cardinality:"many",mode:"fullscreen",selected:!1,...g.length>0?{flagged:g}:{}})});let k=a?.resolve(t,{cardinality:"one",fidelity:"summary"})?.view,u=8,p=o.slice(0,u);return(0,C.jsxs)("div",{"data-testid":"kind-sheet",style:k?{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(200px, 1fr))",gridAutoRows:"max-content",alignContent:"center",gap:12,padding:24}:{display:"flex",flexWrap:"wrap",alignContent:"center",justifyContent:"center",gap:10,padding:24},children:[p.map(x=>k?(0,C.jsx)(k,{node:x,fidelity:"summary",cardinality:"one",mode:"fullscreen",selected:!1,...g.includes(x.id)?{flagged:[x.id]}:{}},x.id):(0,C.jsx)("span",{style:{padding:"8px 14px",borderRadius:8,border:"1px solid var(--graview-edge-bright)",background:"var(--graview-ground)",color:"var(--graview-ink)"},children:pe(l,x)},x.id)),o.length>u?(0,C.jsxs)("span",{style:{...A,alignSelf:"center",padding:"0 6px"},children:["+",o.length-u," more ",i.toLowerCase()]}):null]})}function _n(e){let{store:t}=e,n=ro(e),a=Oe(e),r=e.views?.arrangement?.()?.order??[],o=s=>{let c=s.name===void 0?-1:r.indexOf(`view:${s.name}`);return c>=0?c-r.length:n.indexOf(s.kind)},l=Pn([...a].sort((s,c)=>o(s)-o(c))).filter(s=>!s.hidden),i=new Set(l.flatMap(s=>s.over??[s.kind]));return[...l.map(s=>({key:nt(s),kind:s.kind,title:Oa(s,a,t.schema),to:fe(e,s),place:s})),...Zt(e).filter(s=>!i.has(s)).map(s=>({key:`kind:${s}`,kind:s,title:Q(t,s),to:`/${j(t.schema,s)}`}))]}var yo=.72,yi=540,ho=16/10;function hi(e){let t=(0,Ke.useRef)(null),[n,a]=(0,Ke.useState)(e);return(0,Ke.useLayoutEffect)(()=>{let r=t.current;if(!r||typeof ResizeObserver>"u")return;let o=()=>{let i=r.getBoundingClientRect().width;i>0&&a(s=>Math.abs(s-i)<.5?s:i)};o();let l=new ResizeObserver(o);return l.observe(r),()=>l.disconnect()},[]),{ref:t,width:n}}function wi(e){for(let t=e.parentElement;t;t=t.parentElement)if(/(auto|scroll)/.test(getComputedStyle(t).overflowY))return t;return null}function Si(e){let[t,n]=(0,Ke.useState)(()=>typeof IntersectionObserver>"u");return(0,Ke.useLayoutEffect)(()=>{let a=e.current;if(t||!a)return;let r=new IntersectionObserver(o=>{o.some(l=>l.isIntersecting)&&(r.disconnect(),n(!0))},{root:wi(a),rootMargin:"50% 0px"});return r.observe(a),()=>r.disconnect()},[t,e]),t}function zn({context:e,entry:t}){let{store:n,brand:a,principal:r}=e,{ref:o,width:l}=hi(yi),i=Si(o),s=l/yo,c=kt(n,t.kind),g=n.schema.tryDefinition(t.kind),k=c.length===0?et(n,t.kind,{...r?{principal:r}:{},...e.invariantContext?{context:e.invariantContext}:{}}).actions.affordances[0]:void 0,u=t.place!==void 0;return(0,C.jsxs)(H,{to:t.to,"data-testid":u?"place-card":"kind-card",className:"graview-gallery-card",style:{...we,display:"grid",gap:10,alignContent:"start",minWidth:0},children:[(0,C.jsxs)("span",{ref:o,"data-testid":u?"place-picture":"kind-picture","aria-hidden":"true",inert:!0,style:{display:"block",position:"relative",width:"100%",aspectRatio:`${ho}`,overflow:"hidden",borderRadius:12,border:"1px solid var(--graview-edge)",background:"var(--graview-panel)",pointerEvents:"none"},children:[(0,C.jsx)("span",{style:{position:"absolute",left:0,top:0,width:s,height:s/ho,display:"grid",gridTemplateRows:"minmax(0, 1fr)",transform:`scale(${yo})`,transformOrigin:"0 0"},children:i?(0,C.jsx)(Vt.Provider,{value:null,children:t.place?(0,C.jsx)(jn,{context:e,place:t.place}):(0,C.jsx)(fi,{context:e,kind:t.kind})}):null}),c.length===0?(0,C.jsx)("span",{"data-testid":"picture-empty",style:{position:"absolute",inset:0,display:"grid",placeContent:"center",justifyItems:"center",gap:2,padding:20,textAlign:"center"},children:(0,C.jsxs)("span",{style:{display:"grid",gap:2,padding:"10px 16px",borderRadius:10,border:"1px solid var(--graview-edge)",background:"var(--graview-ground)",color:"var(--graview-ink)"},children:[(0,C.jsxs)("span",{style:{fontFamily:Fn,fontWeight:"var(--graview-weight-display)"},children:["No ",Q(n,t.kind).toLowerCase()," yet"]}),k?(0,C.jsxs)("span",{style:A,children:["Begin with \u201C",k.label,"\u201D"]}):null]})}):null]}),(0,C.jsxs)("span",{style:{display:"grid",gap:2,minWidth:0},children:[(0,C.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:8,minWidth:0},children:[u?null:(0,C.jsx)(ue,{kind:t.kind,brand:a,schema:n.schema,size:8}),(0,C.jsx)("span",{style:{fontFamily:Fn,fontSize:"var(--graview-text-heading)",fontWeight:"var(--graview-weight-display)",lineHeight:1.3,overflowWrap:"anywhere",textWrap:"balance"},children:t.title})]}),(0,C.jsxs)("span",{style:A,children:[t.place?Vn(n,Jt(e,t.place),t.place.across):Vn(n,t.kind),!u&&g?.description?` \xB7 ${g.description}`:null]})]})]})}var wo={display:"grid",gap:"32px 28px",gridTemplateColumns:"repeat(auto-fill, minmax(min(420px, 100%), 1fr))"},vi=`
|
|
2
|
-
.graview-gallery-card > span:first-child { transition: border-color 160ms ease, box-shadow 160ms ease; }
|
|
3
|
-
.graview-gallery-card:hover > span:first-child,
|
|
4
|
-
.graview-gallery-card:focus-visible > span:first-child { border-color: var(--graview-edge-bright); box-shadow: 0 1px 0 var(--graview-edge), 0 10px 30px -18px var(--graview-ink); }
|
|
5
|
-
`;function Yn({context:e}){ee(e.store);let t=_n(e);return t.length===0?null:(0,C.jsxs)("section",{style:wo,"data-testid":"gallery",children:[(0,C.jsx)("style",{children:vi}),t.map(n=>(0,C.jsx)(zn,{context:e,entry:n},n.key))]})}function Qn({context:e}){let{store:t}=e;ee(t);let n=Pn(Oe(e)).filter(r=>!r.hidden),a=_n(e);return(0,C.jsxs)(oe,{context:e,style:pt,children:[(0,C.jsxs)("header",{style:{display:"grid",gap:12},children:[(0,C.jsx)("p",{style:he,children:n.length===0?"None of its own yet":`${n.length} ${n.length===1?"picture":"pictures"}`}),(0,C.jsx)(le,{context:e,children:"Pictures"}),(0,C.jsx)("p",{style:se,children:n.length===0?"Nothing here has a picture of its own yet, so each kind is drawn as the scene draws it. Title a group view and it appears here by name.":"The ways this installation looks at what it holds \u2014 each one the same picture the scene shows, here as a page."})]}),a.length>0?(0,C.jsx)("div",{style:wo,"data-testid":"places",children:a.map(r=>(0,C.jsx)(zn,{context:e,entry:r},r.key))}):null]})}var bi={lede:!0},ki={lede:!1},xi={...se,textWrap:"pretty"};function Pi(e,t){if(t===void 0)return;let[n]=cr(dr([t]),pr(e.store,null,null,e.brand?{money:e.brand}:{}));return n?.t==="headline"&&!n.problem&&n.text.trim()!==""?n.text:void 0}function Zn({context:e}){let{store:t,principal:n}=e;ee(t);let a=Ve(),r=Ge(),[o]=ut(),l=decodeURIComponent(a.as??""),[i,s]=(0,Ke.useState)(null),c=o.get("of"),g=o.get("filter"),u=Oe(e).find(L=>L.as===l&&(!c||j(t.schema,L.kind)===c));if(!u)return(0,C.jsxs)(oe,{context:e,children:[(0,C.jsx)(le,{context:e,children:"No picture is called that."}),(0,C.jsx)("p",{style:se,children:(0,C.jsx)(H,{to:"/places",style:Ue,children:(0,C.jsx)(Xe,{children:"The pictures there are"})})})]});let p=Q(t,u.kind),x=e.views?.resolve(u.kind,{cardinality:"many",fidelity:"full"},u.as)?.view,O=x?.flows===!0,W=x?.ownHeading===!0,P=x?.creates!==!1,E=Pi(e,x?.lede),b=et(t,u.kind,{...n?{principal:n}:{},...e.invariantContext?{context:e.invariantContext}:{}}),G=P?b.actions.affordances.map(L=>({affordance:L,mutation:t.allMutations().find(T=>T.name===L.mutation)})).filter(L=>L.mutation!==void 0):[];return(0,C.jsxs)(oe,{context:e,style:{...pt,gap:"var(--graview-space-6, 32px)"},children:[(0,C.jsxs)("header",{style:{display:"grid",gap:"var(--graview-space-2, 8px)"},children:[(0,C.jsx)(mt,{context:e}),(0,C.jsx)(le,{context:e,unseen:W,children:u.title}),W?null:(0,C.jsx)("p",{style:xi,"data-testid":"place-lede",...E!==void 0?{"data-graview-lede":"headline"}:{},children:E??`${Vn(t,Jt(e,u),u.across)}.`}),g&&!O?(0,C.jsxs)("p",{style:{...A,margin:0},"data-testid":"place-narrowed",children:[`Only those where ${g.split(",").map(L=>L.replace(":"," is ")).join(" and ")}. `,(0,C.jsx)(H,{to:`?${(()=>{let L=new URLSearchParams(o);return L.delete("filter"),L.toString()})()}`,style:{...V,...A},children:"Show all"})]}):null,(0,C.jsx)("p",{style:{...A,margin:0,display:"flex",flexWrap:"wrap",gap:"4px 16px"},children:Jt(e,u).map((L,T)=>(0,C.jsx)(H,{to:`/${j(t.schema,L)}`,style:{...Ue,...A},...T===0?{"data-testid":"place-as-list"}:{},children:(0,C.jsxs)(Xe,{children:["All ",(L===u.kind?p:Q(t,L)).toLowerCase()," as a list"]})},L))})]}),(0,C.jsx)("div",{"data-testid":"place-lens","data-flows":O?"":void 0,...O?{}:{role:"group","aria-label":u.title,tabIndex:0},style:O?{display:"grid",gridTemplateColumns:"minmax(0, 1fr)",maxWidth:"100%"}:{height:"min(72vh, 760px)",display:"grid",gridTemplateRows:"minmax(0, 1fr)",overflow:"auto",maxWidth:"100%",borderRadius:12,border:"1px solid var(--graview-edge)",background:"var(--graview-panel)"},onClick:L=>{let T=L.target?.closest("[data-graview-pick]"),ne=T?.getAttribute("data-graview-pick"),J=T?.getAttribute("data-graview-joins");if(J)try{let xe=JSON.parse(J);if(Array.isArray(xe)&&xe.every($e=>typeof $e=="string")){L.preventDefault(),s({at:nt(u),ids:xe});return}}catch{}if(!ne)return;let z=t.graph.getNode(ne);z&&(L.preventDefault(),r(Y(t.schema,z.kind,ne)))},children:(0,C.jsx)(Br.Provider,{value:E!==void 0?bi:ki,children:(0,C.jsx)(jn,{context:e,place:u,filter:g,...i?.at===nt(u)?{chosen:i.ids}:{}})})}),G.length>0?(0,C.jsx)("div",{style:{maxWidth:760,display:"grid",gap:40},"data-testid":"place-creators",children:G.map(({affordance:L,mutation:T})=>(0,C.jsxs)("section",{style:{...re,display:"grid",gap:14},children:[(0,C.jsx)("h2",{style:ae,children:T.title??T.name}),T.description?(0,C.jsx)("p",{style:{...A,margin:0,maxWidth:"58ch"},children:T.description}):null,(0,C.jsx)(Fe,{store:t,mutation:T,prefilled:L.args,open:L.open,label:L.label,...n?{principal:n}:{}})]},L.id))}):null]})}function Ai(e,t=document){let n=_t(e);if(!n)return null;let a=[t,...[...t.querySelectorAll("[data-worker-view]")].flatMap(r=>r.shadowRoot?[r.shadowRoot]:[])];for(let r of a)for(let o of r.querySelectorAll("[id], [data-section]")){let l=o.getAttribute("data-section")??o.id;if(l===e||_t(l)===n)return o}for(let r of a)for(let o of r.querySelectorAll("h1, h2, h3, h4, h5, h6, [role=heading]"))if(_t(o.textContent??"")===n)return o;return null}function So(e,t={}){if(typeof document>"u"||typeof requestAnimationFrame>"u")return()=>{};let n=t.frames??120,a=0,r=()=>{let o=Ai(e,t.root??document);if(o){o.hasAttribute("tabindex")||o.setAttribute("tabindex","-1"),o.scrollIntoView?.({block:"start"}),o.focus({preventScroll:!0});return}n-=1,n>0&&(a=requestAnimationFrame(r))};return a=requestAnimationFrame(()=>{a=requestAnimationFrame(r)}),()=>cancelAnimationFrame(a)}var q=I(Ne(),1);var en=I(Ne(),1);var at=I(U(),1);function vo({context:e}){return ie()?(0,at.jsxs)(at.Fragment,{children:[(0,at.jsx)(Ci,{context:e}),(0,at.jsx)(jr,{face:"pages",on:e.quickAsk??!0})]}):null}function Ci({context:e}){let{store:t}=e,n=ie(),{pathname:a}=me(),r=(0,en.useRef)(n?.setSelection);return r.current=n?.setSelection,(0,en.useEffect)(()=>{let o=r.current;if(!o)return;let[,l,i]=a.split("/"),s=(()=>{if(l==="places"){let g=e.views?.places().find(k=>k.as===decodeURIComponent(i??""));return g?[Ie(g.kind)]:[]}let c=l?Se(t.schema,l):void 0;return c&&i?[decodeURIComponent(i)]:c?[Fa(c)]:[]})();o(c=>c.length===s.length&&c.every((g,k)=>g===s[k])?c:s)},[a]),null}var be=I(Ne(),1);var ko=I(ni(),1);var ge=I(U(),1);var Ri=Ht(Ia(()=>(__graviewPreload(import.meta.url,["./chunk.JRU5BT7K.js","./chunk.UGFDSE37.js","./chunk.EG2N5F6L.js","./chunk.7NFCI4LH.js","./chunk.RUTZEEBR.js","./chunk.GZWC72HS.js","./chunk.ASCTAUFD.js","./chunk.CWPRQSED.js","./chunk.EZXGVTT2.js","./chunk.ULTYDYTS.js","./chunk.2LQ37DC2.js","./chunk.UXNZPPWR.js","./chunk.GYO57LKD.js","./chunk.KWMBRB6O.js","./chunk.G226CUJQ.js","./chunk.AQJD23AN.js","./chunk.R3DWF35R.js","./chunk.XBNASVTY.js","./chunk.6S3B4XC4.js","./chunk.52Y37IAD.js","./chunk.TLQTDKOL.js","./chunk.MB7LKKUD.js","./chunk.WVUJXDXZ.js","./chunk.VTCPA4V4.js","./chunk.FGJM4LJO.js","./chunk.K7WME4P4.js","./chunk.MDIAWTNK.js","./chunk.PEA4D66Y.js","./chunk.TRPPN2GD.js","./chunk.GZHZLJBF.js","./chunk.TTFYXKLI.js","./chunk.OJGHDWI6.js","./chunk.ICYJ7QJG.js","./chunk.MT45H2T5.js","./chunk.S2ATSY6P.js","./chunk.72Q4R7N6.js","./chunk.G6DISMVT.js","./chunk.W54NXXC5.js","./chunk.B3T4N2XM.js","./chunk.SDO3U72B.js","./chunk.6W2DUW5S.js","./chunk.SLBWPVIY.js","./chunk.AJZBJBMO.js"]),import("./chunk.VRJ4TULC.js")).then(e=>({default:e.TakeBack}))));function Li({context:e,docked:t,at:n,...a}){let{store:r}=e,o=ee(r),[l]=(0,be.useState)(()=>r.batches().length),i=(0,be.useRef)(!1);return i.current||=o>0||!t&&l>0,i.current?(0,ge.jsx)(be.Suspense,{fallback:null,children:(0,ge.jsx)(Ri,{context:e,docked:t,at:n,since:l,...a})}):null}function Ti(e,t,n){let{store:a,principal:r,embedded:o}=e;(0,be.useEffect)(()=>{if(!n)return;let l=i=>{if(!Jr(i))return;let s=i.target,c=s instanceof Node&&t.current?.contains(s),g=s===document.body||s===document.documentElement||s===document;if(!(!c&&!(g&&!o))&&Zr(a,r)){i.preventDefault();try{Xr(a,r)}catch{}}};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[a,r,o,t,n])}function xo({context:e,registry:t,root:n,children:a}){let r=(0,be.useMemo)(co,[]),o=t?.without()??new Set;return Ti(e,n,!o.has("undo")),(0,ge.jsxs)(St.Provider,{value:r,children:[(0,ge.jsx)(Ei,{context:e,placed:r,without:o}),a]})}function Ei({context:e,placed:t,without:n}){let[a,r]=(0,be.useState)(!1);(0,be.useLayoutEffect)(()=>r(!0),[]);let o=vt(t,"find"),l=vt(t,"undo"),i=me(),s=xr();if(!a)return null;let c=i.pathname.split("/").filter(Boolean),k=(c.length===1?Se(e.store.schema,c[0]):void 0)!==void 0;return(0,ge.jsxs)(ge.Fragment,{children:[!o&&!n.has("find")&&s?(0,ko.createPortal)((0,ge.jsx)(bo,{context:e,narrowsLists:k}),s.slot):null,!o&&!n.has("find")&&!s?(0,ge.jsx)("div",{"data-testid":"face-find-bar",style:{display:"flex",alignItems:"center",padding:"8px 16px",borderBottom:"1px solid var(--graview-edge)",background:"var(--graview-bar)",minWidth:0},children:(0,ge.jsx)(bo,{context:e,narrowsLists:k})}):null,!l&&!n.has("undo")?(0,ge.jsx)(Li,{context:e,docked:!0,at:i.pathname+i.search}):null,s?.own&&!n.has("undo")?(0,ge.jsx)(oo,{context:e,own:s.own}):null]})}function bo({context:e,narrowsLists:t}){return(0,ge.jsx)(St.Provider,{value:null,children:(0,ge.jsx)(qn,{context:e,narrowsLists:t})})}var te=I(Ne(),1);var ke=I(U(),1),Mi=500,Ni=10;function tn(e){return e instanceof HTMLElement?e.isContentEditable||e.tagName==="TEXTAREA"||e.tagName==="SELECT"?!0:e.tagName==="INPUT"&&!["button","submit","reset","checkbox","radio","image","file","color","range"].includes(e.type):!1}function Oi(e){let t=typeof getSelection=="function"?getSelection():null;return t!==null&&!t.isCollapsed&&t.containsNode(e,!0)}function Po(e){let t=e.closest('a[href], button, input, select, textarea, summary, [tabindex]:not([tabindex="-1"])');if(t)return t;let n=document.activeElement;return n instanceof HTMLElement&&n!==document.body?n:null}function Ao({context:e,root:t,children:n}){return ie()===null?(0,ke.jsx)(ke.Fragment,{children:n}):(0,ke.jsx)($i,{context:e,root:t,children:n})}function $i({context:e,root:t,children:n}){let{setMenuAt:a}=qa(),{store:r}=e,o=r.schema,l=Ge(),{pathname:i,search:s}=me(),c=Je("/").replace(/\/$/,""),g=(0,te.useCallback)((w,h)=>e.views?.places().find(R=>R.as===w&&(h===null||R.kind===h)),[e.views]),k=(0,te.useCallback)((w,h)=>{let[R="",$,Z]=w.split("/").filter(Boolean).map(m=>{try{return decodeURIComponent(m)}catch{return m}});if(Z!==void 0)return null;if(R==="places"&&$!==void 0){let m=g($,new URLSearchParams(h).get("of"));return m?{face:"pages",place:m.as,about:[Ie(m.kind)],title:m.title}:null}let X=Se(o,R);return X?$===void 0?{face:"pages",about:[Ie(X)],title:qe(o,X)}:r.graph.getNode($)?{face:"pages",on:$,about:[$]}:null:null},[o,r,g]),u=(0,te.useCallback)(w=>{let h=w.href;try{let R=new URL(h,location.href);if(R.origin===location.origin&&(c===""||R.pathname===c||R.pathname.startsWith(`${c}/`))){let $=k(R.pathname.slice(c.length),R.search);if($)return{...$,href:h}}}catch{}return{face:"pages",about:[],href:h}},[c,k]),p=(0,te.useCallback)(()=>k(i,s)??{face:"pages",about:[]},[k,i,s]),x=(0,te.useCallback)(w=>{let h=p(),R=w.closest("[data-graview-field]")?.getAttribute("data-graview-field");if(R&&h.on!==void 0&&w.closest("[data-graview-pick], a[href]")===null)return{...h,field:R};let $=w.closest("[data-graview-act]")?.getAttribute("data-graview-act");if($)return{...h,act:$};let Z=w.closest("a[href]"),X=w.closest("[data-graview-listed]"),m=[w.closest("[data-graview-pick]")?.getAttribute("data-graview-pick"),X&&(!Z||X.contains(Z)&&Z.classList.contains("graview-spec-item-link"))?X.getAttribute("data-graview-listed"):null].map(_=>_?r.graph.getNode(_):void 0).find(Boolean);if(m)return{face:"pages",on:m.id,about:[m.id],href:`${c}${Y(o,m.kind,m.id)}`};if(Z)return u(Z);let M=w.closest("[data-graview-record]")?.getAttribute("data-graview-record");return M&&r.graph.getNode(M)?{face:"pages",on:M,about:[M]}:h},[p,u,r,o,c]),O=(0,te.useCallback)(w=>{let h=t.current;if(h===null||!h.contains(w)||tn(w)||w.closest("[data-graview-popover]"))return null;let R=x(w);return{face:"pages",on:R.on,about:R.about??[],field:R.field,place:R.place,href:R.href,act:R.act,element:Po(w)}},[x,t]),W=(0,te.useCallback)((w,h,R)=>{let $=x(w);a({...$,x:Math.round(h),y:Math.round(R),returnTo:Po(w)})},[x,a]),P=(0,te.useCallback)(w=>{let h=w.getBoundingClientRect();W(w,h.left+Math.min(16,h.width/2),Math.min(h.bottom,h.top+36))},[W]),E=(0,te.useRef)(0),b=(0,te.useRef)(null),G=(0,te.useRef)(!1),L=()=>{b.current&&clearTimeout(b.current.timer),b.current=null};(0,te.useEffect)(()=>L,[]),(0,te.useEffect)(()=>{let w=h=>{if(h.defaultPrevented||!(h.key==="ContextMenu"||h.key==="F10"&&h.shiftKey))return;let R=t.current,$=h.target instanceof Element?h.target:null,Z=$===null||$===document.body||$===document.documentElement,X=R!==null&&$!==null&&R.contains($);if(!X&&!(Z&&document.querySelector("[data-graview-face='pages']")===R)||tn($)||$?.closest("[data-graview-popover]"))return;h.preventDefault(),E.current=Date.now();let m=X&&$ instanceof HTMLElement?$:R?.querySelector("[data-graview-page-title], main h1, main")??null;m&&P(m)};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[t,P]),(0,te.useEffect)(()=>{let w=t.current;if(!w)return;let h=R=>{let $=R.detail;$&&a({...$,face:"pages"})};return w.addEventListener(Cn,h),()=>w.removeEventListener(Cn,h)},[t,a]);let T=(0,te.useMemo)(()=>w=>{if(w.face!=="pages")return null;let h=[],R=w.on===void 0?void 0:r.graph.getNode(w.on),$=w.place===void 0?void 0:e.views?.places().find(de=>de.as===w.place),Z=R?void 0:w.about.length===1&&w.about[0].startsWith("aggregate:")&&!$?Hi(w.about[0]):void 0,X=R?Y(o,R.kind,R.id):$?fe(e,$):Z?`/${j(o,Z)}`:void 0,m=X!==void 0&&i===X.split("?")[0];X!==void 0&&!m&&h.push({id:"open",label:"Open",run:()=>l(X)});let M=X!==void 0?`${c}${X}`:w.href;M!==void 0&&h.push({id:"open-in-a-new-tab",label:"Open in a new tab",run:()=>void window.open(M,"_blank","noopener")});let _=R?`#focus=${encodeURIComponent(R.id)}`:$?`#focus=${encodeURIComponent(Ie($.kind))}&view=${encodeURIComponent($.as)}`:Z?`#focus=${encodeURIComponent(Ie(Z))}`:void 0;if(_!==void 0&&(e.overview||!e.embedded)){let de=e.overview;h.push({id:"in-the-scene",label:"Show in the scene",run:()=>de?de(_):location.assign(`${e.sceneHref??"/"}${_}`)})}return R===void 0&&w.href===void 0&&h.push({id:"find",label:"Find\u2026",run:()=>{let de=t.current?.querySelector('[data-testid="nav-find"]')??document.querySelector('[data-testid="nav-find"]');de&&de.offsetParent!==null?de.focus():l("/search")}}),h.length>0?{id:"pages",items:h}:null},[r,o,e,i,c,l,t]),ne=(0,te.useMemo)(()=>w=>{if(w.face!=="pages"||w.field===void 0||w.on===void 0)return null;let h=r.graph.getNode(w.on),R=w.element?.closest("[data-graview-field]")??t.current?.querySelector(`[data-graview-field="${CSS.escape(w.field)}"]`);return!h||!(R instanceof HTMLElement)||!R.hasAttribute("data-graview-editable")?null:{id:"field",at:"start",items:[{id:"change-field",label:`Change \u201C${ka(o.tryDefinition(h.kind),w.field)}\u201D`,run:()=>R.click()}]}},[r,o,t]),J=zr(),z=yr(),xe=$r(),$e=(0,te.useCallback)((w,h)=>{i===fe(e,w).split("?")[0]&&l(h?fe(e,h):"/")},[i,e,l]),Pe=Qr($e),Ae=(0,te.useMemo)(()=>[ne,xe,T,...Pe?[Pe]:[],...z?[z]:[],...J?[J]:[]],[ne,xe,T,Pe,z,J]);return(0,ke.jsxs)(ur,{sections:Ae,children:[(0,ke.jsx)("div",{"data-graview-menu-ground":"",style:{display:"contents"},onContextMenu:w=>{let h=w.target;w.shiftKey||tn(h)||Oi(h)||(w.preventDefault(),!h.closest("[data-graview-popover]")&&(Date.now()-E.current<700||(w.clientX===0&&w.clientY===0&&h instanceof HTMLElement?P(h):W(h,w.clientX,w.clientY))))},onPointerDown:w=>{if(G.current=!1,w.pointerType==="mouse"||!w.isPrimary)return;let h=w.target;if(tn(h)||h.closest("[data-graview-choose], [data-graview-popover]"))return;L();let{clientX:R,clientY:$}=w;b.current={x:R,y:$,timer:setTimeout(()=>{b.current=null,G.current=!0,E.current=Date.now(),W(h,R,$)},Mi)}},onPointerMove:w=>{let h=b.current;h&&Math.hypot(w.clientX-h.x,w.clientY-h.y)>Ni&&L()},onPointerUp:L,onPointerCancel:L,onClickCapture:w=>{G.current&&(G.current=!1,w.preventDefault(),w.stopPropagation())},children:n}),(0,ke.jsx)(Ii,{openAt:P,readyAt:O}),(0,ke.jsx)(Yr,{placement:"page"}),(0,ke.jsx)(hr,{})]})}function Hi(e){let t=e.slice(10).split("+");return t.length===1&&t[0]?t[0]:void 0}function Ii({openAt:e,readyAt:t}){return(0,ke.jsx)("span",{"data-graview-menu-home":"",tabIndex:-1,onFocus:n=>{if(n.target!==n.currentTarget)return;let a=n.currentTarget.closest("[data-graview-face]"),r=a?.querySelector("[data-graview-page-title]")??a?.querySelector("main h1, main")??null;r&&(r.hasAttribute("tabindex")||r.setAttribute("tabindex","-1"),r.focus({preventScroll:!0}))},style:{position:"absolute",width:0,height:0,overflow:"hidden"},children:(0,ke.jsx)(Vr,{placement:"menu",openActs:e,aimAt:t})})}var K=I(U(),1);function Co(e,t){return t==="*"?{label:"anything",path:null}:{label:Q(e,t),path:`/${j(e.schema,t)}`}}function Fi({context:e,relation:t}){let{store:n}=e,a=Co(n,t.from),r=Co(n,t.to),o=l=>l.path?(0,K.jsx)(H,{to:l.path,style:{...we,fontWeight:550},children:l.label}):(0,K.jsx)("span",{children:l.label});return(0,K.jsxs)("li",{"data-testid":"relation","data-relation":t.edgeKind,style:{display:"grid",gridTemplateColumns:"30px minmax(0, 1fr) auto",gap:12,alignItems:"baseline"},children:[(0,K.jsx)(_r,{edgeKind:t.edgeKind,...e.brand?.kit?{kit:e.brand.kit}:{}}),(0,K.jsxs)("span",{style:{display:"grid",gap:1},children:[(0,K.jsxs)("span",{children:[o(a)," ",(0,K.jsxs)("span",{style:A,"data-graview-speaks-ids":"",children:[Ye(t.edgeKind)," \u2192"]})," ",o(r)]}),t.description||t.inverse?(0,K.jsxs)("span",{style:A,children:[t.description?Ce(t.description):null,t.description&&t.inverse?" \xB7 ":null,t.inverse?`from the other end, ${t.inverse}`:null]}):null]}),r.path?(0,K.jsx)(H,{to:`${r.path}?with=${encodeURIComponent(t.edgeKind)}`,style:{...V,...A,fontVariantNumeric:"tabular-nums",display:"inline-block",minWidth:24,minHeight:24,textAlign:"center"},title:`The ${r.label.toLowerCase()} that have this`,children:t.count}):(0,K.jsx)("span",{style:{...A,fontVariantNumeric:"tabular-nums"},children:t.count})]})}function Ro({context:e,heading:t=!0}){let{store:n}=e,a=new Set(De(n,e.principal)),r=tt(n).relations.filter(o=>a.has(o.from)&&(o.to==="*"||a.has(o.to)));return r.length===0?null:(0,K.jsxs)("section",{style:{...re,display:"grid",gap:12},"data-testid":"kind-map",children:[t?(0,K.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:10,flexWrap:"wrap"},children:[(0,K.jsx)("h2",{style:ae,children:(0,K.jsx)(H,{to:"/map",style:we,children:"Connections"})}),(0,K.jsx)("span",{style:A,children:r.length===1?"1 relation":`${r.length} relations`})]}):null,(0,K.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none",display:"grid",gap:10},children:r.map(o=>(0,K.jsx)(Fi,{context:e,relation:o},`${o.edgeKind}|${o.from}|${o.to}`))})]})}function Xn({context:e}){let{store:t}=e;ee(t);let n=new Set(De(t,e.principal)),a=tt(t),r=a.relations.filter(o=>n.has(o.from));return(0,K.jsxs)(oe,{context:e,children:[(0,K.jsxs)("header",{style:{display:"grid",gap:12},children:[(0,K.jsx)("p",{style:he,children:r.length===0?"No relations":`${r.length} ${r.length===1?"relation":"relations"}`}),(0,K.jsx)(le,{context:e,children:"Connections"}),(0,K.jsx)("p",{style:se,children:r.length===0?"Nothing here is declared to relate to anything else yet.":"The kinds this installation holds, and the relations declared between them \u2014 each in the declaration's own words, with how many of it there are."})]}),(0,K.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none",display:"flex",flexWrap:"wrap",gap:"6px 18px"},"data-testid":"map-kinds",children:a.kinds.filter(o=>n.has(o.kind)).map(o=>(0,K.jsxs)("li",{style:{display:"inline-flex",alignItems:"center",gap:8},children:[(0,K.jsx)(ue,{kind:o.kind,brand:e.brand,schema:t.schema,size:7}),(0,K.jsx)(H,{to:`/${j(t.schema,o.kind)}`,style:V,children:o.plural}),(0,K.jsx)("span",{style:A,children:o.count})]},o.kind))}),(0,K.jsx)(Ro,{context:e,heading:!1})]})}function Lo({context:e}){let n=[...ie()?.robots.values()??[]].filter(r=>r.mode==="asking"&&r.say);if(n.length===0)return null;let{store:a}=e;return(0,K.jsxs)("section",{style:{...re,display:"grid",gap:10},"data-testid":"seat-questions",children:[(0,K.jsx)("h2",{style:ae,children:n.length===1?"The seat asked something":`The seat asked ${n.length} things`}),(0,K.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none",display:"grid",gap:8},children:n.map(r=>{let o=r.at?a.graph.getNode(r.at):void 0;return(0,K.jsxs)("li",{style:{display:"grid",gap:2},children:[(0,K.jsx)("span",{children:r.say}),o?(0,K.jsxs)(H,{to:Y(a.schema,o.kind,o.id),style:{...V,...A},children:[pe(a.schema.tryDefinition(o.kind),o)," \u2192"]}):null]},r.participant)})})]})}var B=I(U(),1);function Jn({context:e}){let{principal:t}=e,{store:n,brand:a,invariantContext:r}=e;ee(n);let o=n.violations(r),l=`${o.length===1?"A rule is broken":"Rules are broken"} \u2014 see what, and what would fix it`,i=[...n.log.all()].slice(-5).reverse(),c=Zt(e).map(P=>({kind:P,members:n.graph.nodesOfKind(P).filter(E=>st(n.schema.tryDefinition(P),E))})),g=c.filter(P=>P.members.length>0),k=c.map(P=>({entry:P,creator:n.allMutations().find(E=>(E.creates??[]).includes(P.kind)&&n.permits({name:E.name,args:{}},e.principal).ok)})).find(P=>P.creator!==void 0),u=g.length===0?"Nothing here yet.":`${g.map(P=>Mt(n.schema,P.kind,P.members.length)).join(", ").replace(/, ([^,]*)$/," and $1")}.`,p=e.views?.homeView?.(),x=n.schema.kinds.some(P=>n.graph.nodesOfKind(P).length>0);if(p&&x){let P=a?.subtitle&&a.subtitleDrawn!==!1?(0,B.jsx)("p",{style:{...A,margin:0},"data-testid":"app-subtitle",children:a.subtitle}):null,E=p[Symbol.for("graview.home-blocks")]===!0;return(0,B.jsx)(oe,{context:e,style:pt,children:(0,B.jsxs)("div",{style:{display:"grid",gap:12},"data-testid":"home-view",children:[E?null:P,o.length>0?(0,B.jsx)(H,{to:"/problems",style:{...V,color:"var(--graview-warn)"},children:l}):null,(0,B.jsx)(Kr.Provider,{value:E?P:null,children:(0,B.jsx)(gt,{when:dt(p),children:(0,B.jsx)(p,{cardinality:"many",fidelity:"full",mode:"fullscreen",selected:!1})})})]})})}let O=new Set(De(n,e.principal)),W=tt(n).relations.filter(P=>O.has(P.from)&&(P.to==="*"||O.has(P.to)));return(0,B.jsxs)(oe,{context:e,style:pt,children:[(0,B.jsxs)("header",{style:{display:"grid",gap:12},children:[a?.subtitle&&a.subtitleDrawn!==!1?(0,B.jsx)("p",{style:{...A,margin:0},"data-testid":"app-subtitle",children:a.subtitle}):null,(0,B.jsx)(le,{context:e,"data-testid":"standing",children:u}),(0,B.jsxs)("p",{style:{...se,display:"grid",gap:4},"data-testid":"standing-card",children:[g.length===0&&k?(0,B.jsxs)("span",{children:["Begin with \u201C",k.creator?.title??k.creator?.name,"\u201D, under"," ",(0,B.jsx)(H,{to:`/${j(n.schema,k.entry.kind)}`,style:V,children:Q(n,k.entry.kind)}),"."]}):null,o.length===0?(0,B.jsx)("span",{children:"All rules hold."}):(0,B.jsx)(H,{to:"/problems",style:{...V,color:"var(--graview-warn)"},children:l})]})]}),(0,B.jsx)(Yn,{context:e}),(0,B.jsxs)("section",{style:{...re,display:"grid",gap:14},"data-testid":"kinds",children:[(0,B.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:10,flexWrap:"wrap"},children:[(0,B.jsx)("h2",{style:ae,children:"What is here"}),W.length>0?(0,B.jsx)(H,{to:"/map",style:{...Ue,...A,marginLeft:"auto"},"data-testid":"map-link",children:(0,B.jsxs)(Xe,{children:["Connections \xB7 ",W.length===1?"1 relation":`${W.length} relations`]})}):null]}),(0,B.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none",display:"flex",flexWrap:"wrap",gap:"8px 10px"},children:c.map(({kind:P,members:E})=>(0,B.jsx)("li",{style:{maxWidth:"100%"},children:(0,B.jsxs)(H,{to:`/${j(n.schema,P)}`,style:{...we,flexWrap:"wrap",gap:8,padding:"6px 14px 6px 10px",borderRadius:8,border:"1px solid var(--graview-edge-bright)",background:"var(--graview-panel)"},children:[(0,B.jsx)(ue,{kind:P,brand:a,schema:n.schema,size:7}),(0,B.jsx)("span",{style:{fontWeight:550,overflowWrap:"anywhere"},children:Q(n,P)}),(0,B.jsx)("span",{style:{...A,fontVariantNumeric:"tabular-nums"},children:E.length===0?"none yet":ht(E.length)})]})},P))})]}),i.length>0?(0,B.jsxs)("section",{style:{...re,display:"grid",gap:10},children:[(0,B.jsx)("h2",{style:ae,children:"Recently"}),(0,B.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none",display:"grid",gap:6},children:i.map(P=>(0,B.jsxs)("li",{style:A,children:[(0,B.jsx)("span",{style:{color:"var(--graview-ink)"},children:P.intent})," \u2014 ",wt(P,t,{graph:n.graph,schema:n.schema,...e.seats?{seats:e.seats}:{},...e.people?{people:e.people}:{}})]},P.id))})]}):null]})}var To=I(Ne(),1);function Eo(e,t){(0,To.useEffect)(()=>{let n=globalThis[Symbol.for("graview.shown-lists")]??=new Map;return n.set(e,()=>t),()=>void n.delete(e)})}var ea=e=>(__graviewPreload(import.meta.url,["./chunk.AJZBJBMO.js"]),import("./chunk.6YGRRXJB.js")).then(t=>t.saveShownList(e.read()));function Mo(e,t,n){let a={off:e,about:t,read:n,menu:(r,o,l)=>[...e?[]:[{id:"export-csv",label:"Export CSV",run:()=>void ea(a)}],...r&&o?[{id:e?"export-on":"export-off",label:e?"Turn on export":"Turn off export",run:()=>void (__graviewPreload(import.meta.url,["./chunk.AJZBJBMO.js"]),import("./chunk.6YGRRXJB.js")).then(i=>i.switchExport(a,o,e,l))}]:[]]};return a}function ta(e){let{schema:t,graph:n,kind:a,nodes:r,arrangement:o,offers:l,declaredGroup:i}=e,s=t.tryDefinition(a),c=Gt(o.query??""),g=[...o.filter??[],...c.conditions],k=g.some(T=>T.key==="is"&&(T.value==="past"||T.value==="any"))||Pr(s,g),u=k||!s?.lifecycle?o:{...o,filter:[...o.filter??[],{key:"is",value:"current"}]},p=new Map,x=Bt(r,u,{schema:t,graph:n,...e.flagged?{flagged:e.flagged}:{},...e.today!==void 0?{today:e.today}:{},read:(T,ne)=>{let J=p.get(T.id);return J||p.set(T.id,J=Ze(t,n,T)),J[ne]}}),O=x.grouped&&!!o.group?.by,W=i&&o.group?.by===i.by&&!o.group.bucket?l.groups.find(T=>T.key===i.by):void 0,P=i&&W&&(W.type==="choice"||W.type==="boolean")?br(x.groups,i,{type:W.type,...W.options?{options:W.options}:{}}):x.groups.map(T=>({...T,closed:!1})),E=!!o.query||(o.filter??[]).some(T=>T.key===i?.by),b=T=>W?.type==="boolean"?T==="1"?"true":"false":T,G=e.opened??new Set,L=P.map(T=>{let ne=b(T.key);return{...T,value:ne,shut:T.closed&&!E&&!G.has(ne)}});return{arrangement:u,showingPast:k,arranged:x,grouped:O,groups:L,nodes:O?L.flatMap(T=>T.shut?[]:T.nodes):x.nodes}}var Te=I(Ne(),1);var rt=I(U(),1);function nn({context:e,withheld:t,style:n,testId:a}){let r=ie(),o=Ma(t,e.signIn??r?.signIn);return o?(0,rt.jsx)("p",{style:{...n,margin:0},children:(0,rt.jsx)("button",{type:"button","data-testid":"sign-in",onClick:()=>o.run(),style:ve,children:o.label})}):t.length===0?null:(0,rt.jsx)("ul",{style:{...n,margin:0,padding:0,listStyle:"none",display:"grid",gap:4},...a?{"data-testid":a}:{},children:t.map(l=>(0,rt.jsxs)("li",{style:A,children:[(0,rt.jsx)("s",{children:l.label})," \u2014 ",l.refusal.message]},l.id))})}var N=I(U(),1);function na({context:e}){let{store:t,brand:n,principal:a,invariantContext:r}=e;ee(t);let[o]=ut(),l=o.get("q")??"",i=typeof r?.today=="string"?r.today:void 0,s=Tr(t,l,{...a?{principal:a}:{},places:Oe(e),flagged:new Set(t.violations(r).flatMap(p=>p.nodeIds)),...i?{today:i}:{},limit:200}),c=s.hits.filter(p=>p.about==="node"),g=s.hits.filter(p=>p.about==="kind"||p.about==="place"||p.about==="rule"),k=[...new Set(c.map(p=>p.kind))],u=l.trim();return(0,N.jsxs)(oe,{context:e,children:[(0,N.jsx)("style",{children:Qt}),(0,N.jsxs)("header",{style:{display:"grid",gap:12},children:[(0,N.jsx)("p",{style:he,children:"Search"}),(0,N.jsx)(le,{context:e,"data-testid":"search-heading",children:u.length===0?"Find anything by its name":s.hits.length===0?(0,N.jsxs)(N.Fragment,{children:["Nothing here is called \u201C",u,"\u201D."]}):(0,N.jsxs)(N.Fragment,{children:[Di(t,s.byKind)," for \u201C",u,"\u201D"]})}),u.length>0?(0,N.jsxs)("p",{style:{...A,margin:0},"data-testid":"search-searched",children:[Kt(t.schema,s.searched),s.conditions.filter(p=>p.key!=="is"&&p.admittedBy.length<s.searched.kinds.length).map(p=>(0,N.jsxs)("span",{children:[" ",p.key,":",p.value," narrows"," ",p.admittedBy.length===0?"nothing here":p.admittedBy.map(x=>Q(t,x).toLowerCase()).join(" and "),"."]},`${p.key}:${p.value}`))]}):(0,N.jsxs)("p",{style:se,children:["Type in the box above. Words find the start of words in names and in what each record says;"," ",(0,N.jsx)("code",{children:"done:false"})," and the like narrow as a list does, and ",(0,N.jsx)("code",{children:"is:any"})," includes what is past."]})]}),g.length>0?(0,N.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none",display:"grid",gap:6},"data-testid":"search-named",children:g.map(p=>(0,N.jsx)("li",{"data-testid":"search-hit","data-about":p.about,children:p.about==="kind"?(0,N.jsxs)(H,{to:`/${j(t.schema,p.kind)}`,style:V,children:[p.label,p.count>0?(0,N.jsxs)("span",{style:A,children:[" \xB7 ",p.count," match"]}):null]}):p.about==="place"?(0,N.jsxs)(H,{to:fe(e,p),style:V,children:["Go to ",p.title]}):p.about==="rule"?(0,N.jsxs)(H,{to:"/problems",style:V,children:["The rule \u201C",p.label,"\u201D"]}):null},`${p.about}:${p.about==="rule"?p.name:p.about==="place"?p.as:p.kind}`))}):null,k.map(p=>(0,N.jsxs)("section",{className:"graview-list",style:{display:"grid",gridTemplateColumns:"minmax(0, 1fr)",minWidth:0},"data-testid":"search-group","data-kind":p,children:[(0,N.jsxs)("h2",{className:"graview-group-head",style:{alignItems:"center"},children:[(0,N.jsx)(ue,{kind:p,brand:n,schema:t.schema,size:8}),(0,N.jsx)(H,{to:`/${j(t.schema,p)}?${new URLSearchParams({q:u}).toString()}`,style:V,"data-testid":"search-kind-link",children:Q(t,p)}),(0,N.jsx)("span",{children:s.byKind[p]})]}),(0,N.jsx)("ul",{className:"graview-rows",children:c.filter(x=>x.kind===p).map(x=>(0,N.jsxs)("li",{"data-testid":"search-hit","data-about":"node",className:"graview-row",children:[(0,N.jsxs)(H,{to:Y(t.schema,p,x.id),className:"graview-row-title",...x.label.length>60?{title:x.label}:{},children:[x.flagged?(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)("span",{role:"img","aria-label":"Breaks a rule:",style:{color:"var(--graview-warn)"},children:"\u26A0"})," "]}):null,x.label]}),x.apart||!x.current?(0,N.jsx)("span",{className:"graview-row-glance",children:[x.apart,x.current?"":"past"].filter(Boolean).join(" \xB7 ")}):null,(0,N.jsx)(an,{why:x.why})]},x.id))})]},p)),u.length>0?(0,N.jsx)(Wi,{asked:u}):null,u.length>0&&s.hits.length===0?(0,N.jsx)(Oo,{store:t,kinds:s.searched.kinds,words:s.words,...a?{principal:a}:{},...r?{invariantContext:r}:{}}):null]})}function an({why:e}){return e.strength==="near"?(0,N.jsxs)("span",{style:A,"data-testid":"search-why","data-near":"",children:["Near \u201C",e.asked,"\u201D",e.field==="label"?"":` \u2014 ${e.reading}: ${e.fragment}`]}):e.field==="label"?null:(0,N.jsxs)("span",{style:A,"data-testid":"search-why",children:[e.reading,": ",e.fragment]})}function Di(e,t){let n=Object.entries(t).map(([a,r])=>`${r} ${r===1?Qe(e.schema.tryDefinition(a),a):Q(e,a).toLowerCase()}`);return n.length===0?"Found":n.length===1?Ce(n[0]):Ce(`${n.slice(0,-1).join(", ")} and ${n[n.length-1]}`)}function No(e,t,n={}){let a=[];for(let r of t){let o=et(e,r,{...n.principal?{principal:n.principal}:{},...n.invariantContext?{context:n.invariantContext}:{}});for(let l of rn(e,r,o.actions.affordances))a.some(i=>i.mutation.name===l.mutation.name)||a.push(l)}return a}function rn(e,t,n){let a=e.schema.tryDefinition(t)?.fieldRoles?.label,r=[];for(let o of n){let l=e.allMutations().find(c=>c.name===o.mutation);if(!l||!l.creates?.includes(t)||r.some(c=>c.mutation.name===l.name))continue;let i=wr(l.input).map(c=>c.name),s=i.includes("label")?"label":a&&i.includes(a)?a:void 0;!s||o.args[s]!==void 0||r.push({kind:t,affordance:o,mutation:l,arg:s})}return r}function Oo({store:e,kinds:t,words:n,principal:a,invariantContext:r}){let o=No(e,t,{...a?{principal:a}:{},...r?{invariantContext:r}:{}});return o.length===0||n.trim().length===0?null:(0,N.jsx)("div",{style:{display:"grid",gap:24},"data-testid":"search-to-create",children:o.map(({kind:l,affordance:i,mutation:s,arg:c})=>(0,N.jsxs)("section",{style:{...re,display:"grid",gap:14},children:[(0,N.jsxs)("h2",{style:ae,children:[Ce(xa(Qe(e.schema.tryDefinition(l),l)))," called \u201C",n,"\u201D"]}),(0,N.jsx)(Fe,{store:e,mutation:s,prefilled:i.args,open:i.open,initial:{[c]:n},...a?{principal:a}:{}})]},`${i.id}|${n}`))})}function Wi({asked:e}){let t=ie();return t?(0,N.jsx)(Gi,{asked:e,desk:t.aiDesk}):null}function Gi({asked:e,desk:t}){return Qa(t)?(0,N.jsx)("p",{style:{margin:0},children:(0,N.jsxs)("button",{type:"button","data-testid":"search-ask",onClick:a=>Ya(t,{pointed:{about:[]},asked:e,returnTo:a.currentTarget}),style:{...V,font:"inherit",padding:0,border:0,background:"transparent",cursor:"pointer",textAlign:"start"},children:["Ask: \u2018",e,"\u2019"]})}):null}var f=I(U(),1),Ho=8,Io=40;function Ki(e,t){let n=t?.fields?.shape??{},a=Object.keys(n).find(r=>Aa(n[r])&&Pa(e[r]));return a===void 0?void 0:e[a]}function aa({context:e}){let t=Ve(),n=Se(e.store.schema,t.slug??"");return n?(0,f.jsx)(Fo,{context:e,kind:n}):(0,f.jsx)(oe,{context:e,children:(0,f.jsx)(le,{context:e,children:"No such kind of thing here."})})}function Fo({context:e,kind:t,opening:n,row:a,layout:r="list",description:o,bare:l}){let{store:i,brand:s,invariantContext:c}=e;ee(i);let[g,k]=ut(),u=`list-${(0,Te.useId)().replace(/:/g,"")}`,p=i.schema.tryDefinition(t),x=Ra(g.get("archived")),O=i.graph.nodesOfKind(t,{archived:x}),W=tt(i).relations.filter(d=>d.from===t||d.to===t),P=new Set(i.violations(c).flatMap(d=>d.nodeIds)),E=Rr(i.schema,Cr(i.schema,Ar(i.schema,t))),b=W.map(d=>d.edgeKind),G=_i(g,E,b),L=["sort","filter","group","q","by","with","past","archived",...b].some(d=>g.has(d)),T=O.length>=Io,ne=p?.fieldRoles?.when,J=e.views?.arrangement?.()?.lists?.[t],z=vr(J),xe=Sr(J?.group),$e=ji(T,ne),Pe=n??(z?{...$e,...z}:$e),Ae=L?G.arrangement:On(Pe,E).arrangement,w=z?.sort,h=Ae.sort&&w?.then&&Ae.sort.by===w.by&&Ae.sort.direction===w.direction?{...Ae,sort:w}:Ae,R=Gt(h.query??""),$=new Set((g.get("open")??"").split(",").filter(Boolean)),Z=ta({schema:i.schema,graph:i.graph,kind:t,nodes:O,arrangement:h,offers:E,declaredGroup:xe,flagged:P,...typeof c?.today=="string"?{today:c.today}:{},opened:$}),{showingPast:X,arranged:m}=Z,M=Z.groups,_=ie(),de=Mo(J?.export===!1,{kind:t},()=>({title:Q(i,t),schema:i.schema,graph:i.graph,kind:t,groups:Z.groups,grouped:Z.grouped,onExport:e.onExport??_?.onExport,words:{labelOf:pe,readableFields:Dt,withComputed:Ze}}));Eo(`list:${t}`,de);let Uo=d=>d.shut,Vo=d=>{let y=new URLSearchParams(g),F=new Set($);F.has(d)?F.delete(d):F.add(d),F.size>0?y.set("open",[...F].join(",")):y.delete("open"),k(y,{replace:!0})},Ee=m.nodes,_e=p?.lifecycle&&!X?O.filter(d=>st(p,d)):O,sa=O.length-_e.length,la=h.group?.by??null,jo=d=>{let y=new URLSearchParams(g);for(let ce of["sort","filter","group","q","by","with","past","archived",...W.map(Tt=>Tt.edgeKind)])y.delete(ce);let F=Er(d);for(let ce of["sort","filter","group","q","archived"])F[ce]&&y.set(ce,F[ce]);![...y.keys()].some(ce=>["sort","filter","group","q"].includes(ce))&&(n||z||T||ne)&&y.set("sort",""),k(y)},{principal:ot}=e,dn=et(i,t,{...ot?{principal:ot}:{},...e.invariantContext?{context:e.invariantContext}:{}}),We=dn.actions.affordances.map(d=>({affordance:d,mutation:i.allMutations().find(y=>y.name===d.mutation)})).filter(d=>d.mutation!==void 0),_o=dn.actions.withheld,cn=()=>new Set(Ee.length===0?We.map(({mutation:d})=>d.name):[]),[pn,da]=(0,Te.useState)(()=>({kind:t,open:cn()}));pn.kind!==t&&da({kind:t,open:cn()});let ca=d=>(pn.kind===t?pn.open:cn()).has(d),pa=(d,y)=>da(F=>{let ce=new Set(F.open);return y?ce.add(d):ce.delete(d),{kind:F.kind,open:ce}}),ua=`begin-${(0,Te.useId)().replace(/:/g,"")}`,ga=R.words&&Ee.length===0?Object.fromEntries(rn(i,t,dn.actions.affordances).map(d=>[d.mutation.name,d.arg])):{},ze=Q(i,t),Pt=e.views?.lookup(t,{cardinality:"one",fidelity:"glyph"}),un=Pt!==void 0&&!lt(Pt)?Pt:void 0,gn=(h.group?.bucket??"day")==="day"?h.group?.by:void 0,mn=(h.filter??[]).map(d=>d.key),zo=mn.filter(d=>mn.indexOf(d)===mn.lastIndexOf(d)&&/choice|boolean/.test(E.filters.find(y=>y.key===d)?.type??"")),fn=d=>{let y={...p?.computed?Ze(i.schema,i.graph,d):d};gn&&!String(y[gn]).includes("T")&&delete y[gn];for(let F of zo)delete y[F];return y},ma=d=>ir(p?.fields?.shape?.[d])?.type==="enum",At=d=>{let y=pe(p,d);if(a)return(0,f.jsxs)("li",{"data-testid":"record-row","data-graview-record":d.id,style:{minWidth:0},...bn(d.id),children:[vn(d,y),a(d,{label:y,href:Y(i.schema,t,d.id),flagged:P.has(d.id),glance:ao(fn(d),p,y)})]},d.id);if(un){let kn=jt(Pt,d,i.graph),ei=Object.fromEntries(Object.entries(fn(d)).filter(([ti])=>!kn?.fields.has(ti))),va=kn?Dn(ei,p,kn.title??y,ma):[];return(0,f.jsxs)("li",{"data-testid":"record-row","data-graview-record":d.id,style:{position:"relative",display:"flex",flexWrap:"wrap",alignItems:"baseline",columnGap:16,rowGap:2,paddingBlock:10,borderTop:"1px solid var(--graview-edge)"},...bn(d.id),children:[vn(d,y),(0,f.jsx)("div",{style:{flex:"1 1 14rem",minWidth:0},children:(0,f.jsx)(un,{node:d,cardinality:"one",fidelity:"glyph",mode:"fullscreen",selected:!1,...P.has(d.id)?{flagged:[d.id]}:{}})}),va.length>0?(0,f.jsx)("span",{style:{...A,flex:"0 1 auto",minWidth:0,overflowWrap:"anywhere"},"data-testid":"record-glance",children:(0,f.jsx)(Wn,{runs:va})}):null,(0,f.jsx)(Qi,{to:Y(i.schema,t,d.id),label:P.has(d.id)?`${y} \u2014 implicated in a problem`:y})]},d.id)}let F=Dn(fn(d),p,y,ma),ce=F.length>0,Tt=R.words?Lr(p,d,R.words):void 0,wa=T?void 0:lr(d,p),Et=Ki(d,p),Sa=(0,f.jsxs)(H,{to:Y(i.schema,t,d.id),className:"graview-row-title",...y.length>60?{title:y}:{},children:[P.has(d.id)?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("span",{role:"img","aria-label":"Breaks a rule:",style:{color:"var(--graview-warn)"},children:"\u26A0"})," "]}):null,y]});return(0,f.jsxs)("li",{className:"graview-row","data-graview-record":d.id,...bn(d.id),children:[vn(d,y),wa?(0,f.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:14,minWidth:0},children:[(0,f.jsx)(ct,{as:"thumb",file:wa}),Sa]}):Sa,ce||Et?(0,f.jsxs)("span",{className:"graview-row-glance",children:[(0,f.jsx)(Wn,{runs:F}),ce&&Et?" \xB7 ":null,Et?(0,f.jsx)(qt,{address:Et}):null]}):null,Tt?(0,f.jsx)(an,{why:Tt}):null]},d.id)},yn=Oe(e).filter(d=>d.kind===t&&!d.hidden),fa=J?.filters,Yo=(h.filter??[]).some(d=>d.key!=="is"||d.value!=="any"),Qo=!!(h.sort||h.group||h.query||Yo),Zo=_e.length>=Ho||L&&Qo,He=h.sort?E.sorts.find(d=>d.key===h.sort.by):void 0,hn=He?.type==="date"||He!==void 0&&He.key===ne,ya=T&&!m.grouped&&He&&(He.about==="label"||He.type==="text"||hn)?d=>{let y=He.about==="label"?pe(p,d):d[He.key];if(typeof y!="string"||y.length===0)return hn?"No date":"#";if(hn)return y.slice(0,4);let F=y.trim().charAt(0).toLocaleUpperCase();return/\p{L}/u.test(F)?F:"#"}:void 0,Ct=ya?Ee.reduce((d,y)=>{let F=ya(y);return d.at(-1)?.key===F?d.at(-1).nodes.push(y):d.push({key:F,nodes:[y]}),d},[]):void 0,ha=Z.nodes,wn=(0,Te.useMemo)(()=>ha.map(d=>d.id),[ha.map(d=>d.id).join(`
|
|
6
|
-
`)]),Me=Hr(wn),Sn=(0,Te.useId)(),ft=(ot?i.permittedMutations(ot):i.permittedMutations()).some(d=>{let y=d.subject?.kinds;return y!==void 0&&(y==="*"||y.includes(t))}),vn=(d,y)=>ft?(0,f.jsx)("span",{className:"graview-choose-at",children:(0,f.jsx)("input",{...Me.boxProps(d.id,y),onPointerEnter:$n,onFocus:$n})}):null,bn=d=>ft?{"data-graview-choose":d}:{},Xo=(0,Te.useCallback)(d=>{Me.choose(d),requestAnimationFrame(()=>{let y=Me.list.current;((d[0]===void 0?null:y?.querySelector(`[data-graview-choose-box="${CSS.escape(d[0])}"]`))??y)?.focus({preventScroll:!0})})},[Me]),it=r==="grid"?{margin:0,padding:0,listStyle:"none",display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(min(100%, 15rem), 1fr))",alignItems:"start",gap:12}:a||un?{margin:0,padding:0,listStyle:"none",display:"grid",gap:a&&r==="list"?6:0}:void 0,Rt=it?void 0:"graview-rows",yt=d=>`list-at-${d.replace(/[^\p{L}\p{N}]/gu,"_")}`,Lt=W.map(d=>{let y=d.from===t?d.to:d.from,F=d.from===t?d.description:d.inverse??d.description;return{relation:d,far:y,words:F}}),Jo=new Set(Lt.map(d=>(d.words??"").toLowerCase()).filter((d,y,F)=>d&&F.indexOf(d)!==y));return(0,f.jsxs)(l?Vi:oe,{context:e,children:[(0,f.jsxs)("div",{style:{display:"grid",gap:12},children:[(0,f.jsxs)("header",{style:{display:"grid",gap:4},children:[l?null:(0,f.jsx)(mt,{context:e}),(0,f.jsxs)("div",{style:{display:"flex",alignItems:"center",flexWrap:"wrap",columnGap:10,rowGap:4,minWidth:0},children:[(0,f.jsx)(ue,{kind:t,brand:s,schema:i.schema,size:8}),(0,f.jsx)(le,{context:e,children:ze}),We.length>0?(0,f.jsx)("span",{style:{marginLeft:"auto",display:"flex",flexWrap:"wrap",columnGap:14,rowGap:8},"data-testid":"beginnings-open",children:We.map(({affordance:d,mutation:y})=>(0,f.jsx)(zi,{name:y.name,title:y.title??y.name,panel:`${ua}-${y.name}`,open:ca(y.name),onOpen:F=>pa(y.name,F)},d.id))}):null,!de.off&&_e.length>0?(0,f.jsxs)("button",{type:"button","data-testid":"list-export","aria-label":"Export CSV",title:"Export CSV",onClick:()=>void ea(de),style:{...we,minHeight:28,margin:"-4px 0",...We.length>0?{}:{marginLeft:"auto"},padding:"0 2px",border:0,background:"none",font:"inherit",color:"var(--graview-ink-muted)",cursor:"pointer"},children:[(0,f.jsx)("span",{"aria-hidden":"true",style:{marginRight:4},children:"\u2193"}),"CSV"]}):null]}),Ee.length>0?(0,f.jsx)(eo,{place:"here",to:[{label:`Skip to the ${Ee.length===1?Qe(p,t):`${Ee.length} ${ze.toLowerCase()}`}`,testid:"records",go:()=>{let d=document.querySelector(`[data-graview-skip-target="${CSS.escape(Sn)}"]`);Hn(d?.querySelector('[data-graview-choose-box][tabindex="0"]')??d)}},..._e.length>0?[{label:"Skip to arranging them",testid:"arranging",go:()=>{let d=document.querySelector(`[data-graview-skip-target="${CSS.escape(Sn)}"]`)?.parentElement?.querySelector('[role="group"][aria-label="Arrange"]');Hn(d?.querySelector('button[data-testid$="-add"], button[data-testid$="-all"]')??d)}}]:[]]}):null,o??p?.description?(0,f.jsx)("p",{style:se,children:o??p?.description}):null,Lt.length>0||yn.length>0?(0,f.jsxs)("p",{style:{...A,margin:0,display:"flex",flexWrap:"wrap",columnGap:18,rowGap:2},"data-testid":"kind-related",children:[Lt.length>0?(0,f.jsxs)("span",{"data-testid":"kind-relations",children:["Related:"," ",Lt.map(({relation:d,far:y,words:F},ce)=>(0,f.jsxs)("span",{"data-relation":d.edgeKind,children:[ce>0?(0,f.jsx)("span",{"aria-hidden":"true",children:" \xB7 "}):null,y==="*"?Ce(F??Ye(d.edgeKind)):(0,f.jsx)(H,{to:`/${j(i.schema,y)}`,style:V,title:Q(i,y),children:F&&Jo.has(F.toLowerCase())?`${Ce(F)}: ${Q(i,y).toLowerCase()}`:Ce(F??Q(i,y))})]},`${d.edgeKind}|${d.from}|${d.to}`))]}):null,yn.length>0?(0,f.jsxs)("span",{"data-testid":"kind-pictures",children:["Also as:"," ",yn.map((d,y)=>(0,f.jsxs)("span",{children:[y>0?(0,f.jsx)("span",{"aria-hidden":"true",children:" \xB7 "}):null,(0,f.jsx)(H,{to:fe(e,d),style:V,children:d.title})]},nt(d)))]}):null]}):null]}),We.length>0?(0,f.jsx)("div",{style:{display:"contents"},"data-testid":"beginnings",children:We.map(({affordance:d,mutation:y})=>{let F=!!(ga[y.name]&&Ee.length===0);return(0,f.jsx)(Yi,{name:y.name,id:`${ua}-${y.name}`,description:y.description,open:ca(y.name),onClose:()=>pa(y.name,!1),children:(0,f.jsx)(Fe,{store:i,mutation:y,prefilled:d.args,open:d.open,...F?{initial:{[ga[y.name]]:R.words}}:{},...e.principal?{principal:e.principal}:{}},F?`${y.name}|${R.words}`:y.name)},d.id)})}):null,G.dropped.length>0?(0,f.jsxs)("p",{style:{...A,margin:0},"data-testid":"list-dropped",children:["This link asked for ",G.dropped.join(", "),", which ",ze.toLowerCase()," cannot be arranged by; the rest is shown."]}):null,_e.length>0?(0,f.jsx)(Or,{schema:i.schema,graph:i.graph,kind:t,arrangement:h,onChange:jo,kept:{shown:Ee.length,of:_e.length},noun:{one:Qe(p,t),many:ze.toLowerCase()},...Zo?{}:{allow:!1},...fa?{filters:fa}:{},offers:E,chips:{nodes:_e,flagged:P,...typeof c?.today=="string"?{today:c.today}:{}},query:e.framed===!0&&e.barAbove!==!0}):null,(0,f.jsx)("style",{children:Qt}),ft?(0,f.jsx)("style",{children:Ir+Ui}):null,(0,f.jsx)("div",{className:"graview-list","data-graview-skip-target":Sn,...ft?{...Me.listProps,ref:Me.list,tabIndex:-1,"data-graview-choosable":"","aria-label":Me.chosen.length>0?`${ze}, ${Me.chosen.length} chosen`:ze,role:"group"}:{},children:Ee.length===0&&R.words?(0,f.jsxs)("p",{style:se,"data-testid":"none-yet",children:["Nothing here is called \u201C",R.words,"\u201D."," ",(0,f.jsx)("span",{style:A,"data-testid":"list-searched",children:Kt(i.schema,{kinds:[t],past:X})})," ",(0,f.jsx)(H,{to:"?",style:V,children:"Show every one"})]}):Ee.length===0?(0,f.jsxs)("p",{style:se,"data-testid":"none-yet",children:[h.filter?.length||h.query?"None of them.":"None yet",!h.filter?.length&&!h.query&&We.length>0?` \u2014 the first one starts above, with \u201C${We[0]?.mutation.title??We[0]?.mutation.name}\u201D.`:!h.filter?.length&&!h.query?".":"",h.filter?.length||h.query?(0,f.jsxs)(f.Fragment,{children:[" ",(0,f.jsx)(H,{to:"?",style:V,children:"Show every one"})]}):null]}):m.grouped&&la?(0,f.jsx)("div",{style:{display:"grid",gap:"1rem"},"data-testid":"records","data-grouped":la,children:M.map(d=>{if(!d.closed)return(0,f.jsxs)("section",{style:{display:"grid",gap:0},"data-testid":"list-group",children:[(0,f.jsxs)("h2",{className:"graview-group-head",children:[d.label," ",(0,f.jsx)("span",{children:d.nodes.length})]}),(0,f.jsx)("ul",{style:it,className:Rt,"data-graview-rows":"",children:d.nodes.map(At)})]},d.key||"-");let y=Uo(d),F=`${u}-${yt(d.key||"none")}`;return(0,f.jsxs)("section",{style:{display:"grid",gap:0},"data-testid":"list-group","data-closed":y?"shut":"open",children:[(0,f.jsx)("h2",{className:"graview-group-head",children:(0,f.jsxs)("button",{type:"button",className:"graview-group-toggle","aria-expanded":!y,"aria-controls":F,"data-testid":"list-group-toggle",onClick:()=>Vo(d.value),children:[(0,f.jsx)("span",{"aria-hidden":"true",children:y?"\u25B8":"\u25BE"}),d.label," ",(0,f.jsxs)("span",{children:["\xB7 ",d.nodes.length]}),(0,f.jsxs)("span",{style:Bi,children:[" ",d.nodes.length===1?Qe(p,t):ze.toLowerCase()]})]})}),(0,f.jsx)("ul",{id:F,style:y?{...it,display:"none"}:it,className:Rt,"data-graview-rows":"",hidden:y,children:y?null:d.nodes.map(At)})]},d.key||"-")})}):Ct&&Ct.length>1?(0,f.jsxs)("div",{style:{display:"grid",gap:14},"data-testid":"records","data-sectioned":He?.type==="date"?"year":"letter",children:[(0,f.jsx)("nav",{"aria-label":"Jump to","data-testid":"list-index",style:{...A,display:"flex",flexWrap:"wrap",gap:He?.type==="date"?"0 10px":"0 4px",lineHeight:1.3},children:Ct.map(d=>(0,f.jsx)("a",{href:`#${yt(d.key)}`,onClick:y=>{y.preventDefault(),document.getElementById(yt(d.key))?.scrollIntoView({block:"start"})},style:{...we,minWidth:24,justifyContent:"center"},children:d.key},d.key))}),Ct.map(d=>(0,f.jsxs)("section",{"data-testid":"list-section","aria-labelledby":yt(d.key),style:{display:"grid",gap:0},children:[(0,f.jsx)("h2",{id:yt(d.key),className:"graview-group-head",children:d.key}),(0,f.jsx)("ul",{style:it,className:Rt,"data-graview-rows":"",children:d.nodes.map(At)})]},d.key))]}):(0,f.jsx)("ul",{style:it,className:Rt,"data-testid":"records","data-graview-rows":"",children:Ee.map(At)})}),ft?(0,f.jsx)(Fr,{store:i,chosen:Me.chosen,...ot?{principal:ot}:{},...c?{context:c}:{},anchor:qi,of:wn.length,onChooseAll:()=>Me.choose(wn),onClear:Me.clear,onActed:Xo}):null,sa>0?(0,f.jsxs)(H,{to:$o(g,"filter","is:any"),style:{...V,...A,justifySelf:"start"},"data-testid":"past-link",children:["+",sa," past"]}):null,x===!1&&i.graph.count(t,{archived:!0})>0?(0,f.jsxs)(H,{to:$o(g,"archived","true"),style:{...V,...A,justifySelf:"start"},"data-testid":"archived-link",children:["+",i.graph.count(t,{archived:!0})," archived"]}):null]}),(0,f.jsx)(nn,{context:e,withheld:_o,style:re,testId:"withheld"})]})}var Bi={position:"absolute",width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0 0 0 0)",whiteSpace:"nowrap",border:0},qi=()=>document.querySelector("[data-graview-choosable]")?.closest("[data-embed-content]")??null,Ui=`
|
|
7
|
-
.graview-list[data-graview-choosable]{outline:none}
|
|
8
|
-
.graview-list [data-graview-choose]{position:relative;padding-left:34px}
|
|
9
|
-
.graview-choose-at{position:absolute;left:2px;top:0;bottom:0;z-index:${Na.raised};display:flex;align-items:center}
|
|
10
|
-
@media (min-width: 900px) and (pointer: fine){
|
|
11
|
-
.graview-list [data-graview-choose]{padding-left:0}
|
|
12
|
-
.graview-choose-at{left:-34px}
|
|
13
|
-
}
|
|
14
|
-
@media (pointer: coarse){
|
|
15
|
-
.graview-list:not([data-graview-choosing]) [data-graview-choose]{padding-left:0}
|
|
16
|
-
.graview-list:not([data-graview-choosing]) .graview-choose-at{display:none}
|
|
17
|
-
}
|
|
18
|
-
`;function Vi({children:e}){return(0,f.jsx)("div",{style:{display:"grid",gridTemplateColumns:"minmax(0, 1fr)",gap:40,minWidth:0},children:e})}var ji=(e,t)=>t?{sort:{by:t,direction:"desc"}}:e?{sort:{by:"label",direction:"asc"}}:{};function _i(e,t,n){let a=$t({...e.get("sort")?{sort:e.get("sort")}:{},...e.get("filter")?{filter:e.get("filter")}:{},...e.get("group")?{group:e.get("group")}:{},...e.get("q")?{q:e.get("q")}:{},...e.get("archived")?{archived:e.get("archived")}:{}}),r=[...a.filter??[]],o=e.get("by"),l=a.group??(o?{by:o}:void 0);for(let s of n){let c=e.get(s);c&&r.push({key:s,value:c})}let i=e.get("with");return i&&r.push({key:i,value:"*"}),e.get("past")==="1"&&!r.some(s=>s.key==="is")&&r.push({key:"is",value:"any"}),On({...a.sort?{sort:a.sort}:{},...a.query?{query:a.query}:{},...r.length>0?{filter:r}:{},...l?{group:l}:{},...a.archived!==void 0?{archived:a.archived}:{}},t)}function $o(e,t,n){let a=new URLSearchParams(e);return a.set(t,n),a.delete("past"),`?${a.toString()}`}function zi({name:e,title:t,panel:n,open:a,onOpen:r}){return(0,f.jsxs)("button",{type:"button","data-testid":`act-open-${e}`,"data-graview-act":e,"aria-expanded":a,"aria-controls":n,onClick:()=>{r(!a),a||requestAnimationFrame(()=>document.getElementById(n)?.querySelector("input, select, textarea, button")?.focus())},style:{...we,minHeight:28,margin:"-4px 0",padding:"0 2px",border:0,background:"none",font:"inherit",fontWeight:600,color:"var(--graview-ink)",cursor:"pointer"},children:[(0,f.jsx)("span",{"aria-hidden":"true",style:{marginRight:6},children:a?"\u2212":"+"}),t]})}function Yi({name:e,id:t,description:n,open:a,onClose:r,children:o}){return(0,f.jsxs)("div",{"data-testid":`act-${e}`,id:t,hidden:!a,onKeyDown:l=>{l.key==="Escape"&&(l.preventDefault(),r(),document.querySelector(`[aria-controls="${t}"]`)?.focus())},style:a?{display:"grid",gap:12,padding:"4px 0 12px"}:void 0,children:[n?(0,f.jsx)("p",{style:{...A,margin:0,maxWidth:"58ch"},children:n}):null,o]})}function Qi({to:e,label:t}){let n=(0,Te.useRef)(null);return Dr(n),(0,f.jsx)(H,{ref:n,to:e,"aria-label":t,style:{position:"absolute",inset:0,borderRadius:6}})}var Be=I(Ne(),1);var xt=I(Ne(),1);var D=I(U(),1);function ra({context:e}){let{store:t,brand:n,invariantContext:a,principal:r}=e;ee(t);let o=t.violations(a),l=t.allInvariants(),i=It(t,o),s=Za(t.schema,l);return(0,D.jsxs)(oe,{context:e,children:[(0,D.jsxs)("header",{style:{display:"grid",gap:12},children:[(0,D.jsx)(le,{context:e,children:o.length===0?"All rules hold":"What is broken"}),(0,D.jsx)("p",{style:se,"data-testid":"problems-count",children:o.length===0?"Every declared rule is satisfied by what is here.":La(o)})]}),(0,D.jsx)(Lo,{context:e}),i.map((c,g)=>{let k=c.nodeIds[0],u=k?t.graph.getNode(k):void 0;return(0,D.jsxs)("section",{style:{display:"grid",gap:10,padding:"16px 18px",borderLeft:"3px solid var(--graview-warn)",background:"var(--graview-panel-warning)",borderRadius:"0 var(--graview-radius, 12px) var(--graview-radius, 12px) 0"},children:[c.line?null:(0,D.jsx)(on,{violation:c,schema:t.schema,...n?{brand:n}:{}}),u?(0,D.jsxs)("p",{style:{margin:0,display:"inline-flex",alignItems:"center",gap:8},children:[(0,D.jsx)(ue,{kind:u.kind,brand:n,schema:t.schema,size:7}),(0,D.jsx)(H,{to:Y(t.schema,u.kind,u.id),style:V,children:pe(t.schema.tryDefinition(u.kind),u)})]}):null,c.line?(0,D.jsx)(on,{violation:c,schema:t.schema,...n?{brand:n}:{}}):null,(0,D.jsx)(sn,{store:t,repairs:c.repairs,...r?{principal:r}:{}})]},g)}),l.length>0?(0,D.jsxs)("section",{style:{...re,display:"grid",gap:12},"data-testid":"rules",children:[(0,D.jsx)("h2",{style:ae,children:"The rules"}),(0,D.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none",display:"grid",gap:10},children:l.map(c=>{let g=o.filter(p=>p.invariant===c.name).length,k=s.get(c.name),u=c.label??c.name;return(0,D.jsxs)("li",{"data-graview-rule":c.name,style:{display:"grid",gap:2},children:[(0,D.jsxs)("span",{style:{display:"flex",flexWrap:"wrap",alignItems:"baseline",columnGap:12,rowGap:2},children:[k?(0,D.jsx)(Ft,{line:k,schema:t.schema,...n?{brand:n}:{},style:{flex:"1 1 18rem"}}):(0,D.jsx)("span",{style:{flex:"1 1 18rem",fontWeight:550},children:u}),(0,D.jsx)("span",{style:{...A,color:g>0?"var(--graview-warn)":"var(--graview-ink-faint)"},children:g===0?"holds":`broken in ${g} ${g===1?"place":"places"}`})]}),k&&u.trim().length>0?(0,D.jsx)("span",{style:A,children:u}):null]},c.name)})})]}):null]})}function on({violation:e,schema:t,brand:n}){if(!e.line)return(0,D.jsx)("p",{style:{margin:0,color:"var(--graview-warn)",fontWeight:550},children:e.message});let a=Ja(e),r=Xa(e);return r?(0,D.jsxs)("div",{style:{display:"grid",gap:4},"data-testid":"problem-line",children:[(0,D.jsx)("p",{style:{margin:0,color:"var(--graview-warn)",fontWeight:550},"data-testid":"problem-says",children:r}),a?(0,D.jsx)("span",{style:A,children:a}):null,(0,D.jsxs)("details",{"data-testid":"problem-judged",style:A,children:[(0,D.jsx)("summary",{style:{cursor:"pointer",width:"fit-content",minHeight:24},children:"How it is judged"}),(0,D.jsx)(Ft,{line:e.line,schema:t,...n?{brand:n}:{},lead:"none"})]})]}):(0,D.jsxs)("div",{style:{display:"grid",gap:2},"data-testid":"problem-line",children:[(0,D.jsx)(Ft,{line:e.line,schema:t,...n?{brand:n}:{},lead:"none",style:{color:"var(--graview-warn)"}}),a?(0,D.jsx)("span",{style:A,children:a}):null]})}function sn({store:e,repairs:t,principal:n}){let[a,r]=(0,xt.useState)(null),[o,l]=(0,xt.useState)(null),i=(0,xt.useRef)([]);if(t.length===0)return null;let s=a===null?null:t[a],c=s&&(s.missing??[]).length>0?e.allMutations().find(g=>g.name===s.mutation):void 0;return(0,D.jsxs)("div",{style:{display:"grid",gap:10},"data-testid":"repairs",children:[(0,D.jsx)("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:t.map((g,k)=>{let u=(g.missing??[]).length>0,p=e.permits({name:g.mutation,args:{...g.args}},n);return p.ok?(0,D.jsx)("button",{ref:x=>{i.current[k]=x},type:"button","data-graview-repair":g.mutation,"data-graview-asks":u||void 0,"aria-expanded":u?a===k:void 0,onClick:()=>{if(l(null),u){r(a===k?null:k);return}r(null);try{e.apply({name:g.mutation,args:{...g.args}},n?{author:n}:{})}catch(x){l(Wt(e.schema,e.allMutations(),x))}},style:ve,children:u?`${g.label} \u2026`:g.label},k):(0,D.jsxs)("p",{"data-testid":"withheld","data-withheld":p.refusal.wouldNeed.join(",")||"nobody",style:{...A,margin:0},children:[(0,D.jsx)("s",{children:g.label})," \u2014 ",p.refusal.message]},k)})}),c&&s?(0,D.jsx)(Fe,{store:e,mutation:c,prefilled:{...s.args},only:s.missing??[],label:s.label,autoFocus:!0,onDone:()=>{let g=a;r(null),requestAnimationFrame(()=>{let k=g===null?null:i.current[g];if(k?.isConnected){k.focus();return}let u=document.querySelector("[data-graview-page-title]")??document.querySelector("main h1, main h2");u&&(u.hasAttribute("tabindex")||(u.tabIndex=-1),u.focus())})},...n?{principal:n}:{}}):null,s&&!c&&(s.missing??[]).length>0?(0,D.jsxs)("p",{"data-testid":"refused",role:"alert",style:{margin:0,color:"var(--graview-warn)",fontSize:In},children:["\u201C",s.label,"\u201D names ",s.mutation,", which this app does not declare."]}):null,o?(0,D.jsx)("p",{"data-testid":"refused",role:"alert",style:{margin:0,color:"var(--graview-warn)",fontSize:In},children:o}):null]})}var oa=I(Ne(),1);var je=I(U(),1);function Do({store:e,link:t,principal:n}){let[a,r]=(0,oa.useState)(!1),[o,l]=(0,oa.useState)(null),i=ar(t);return(0,je.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:6,flexWrap:"wrap"},children:[(0,je.jsx)("button",{type:"button","data-graview-provisional":"",title:i,"aria-label":`Unsure link: ${i}`,"aria-expanded":a,onClick:()=>r(!a),style:{border:"1px dashed var(--graview-ink-muted)",borderRadius:999,background:"transparent",color:"var(--graview-ink-muted)",font:"inherit",fontSize:"0.75rem",lineHeight:1,padding:"2px 6px",cursor:"pointer"},children:"unsure"}),a?(0,je.jsxs)("span",{style:{...A,display:"inline-flex",alignItems:"center",gap:8,flexWrap:"wrap"},children:[(0,je.jsx)("span",{children:i}),(0,je.jsx)("button",{type:"button",style:{...ve,padding:"4px 10px"},onClick:()=>{try{e.apply({name:Ta,args:{kind:t.edge.kind,from:t.edge.from,to:t.edge.to}},n?{author:n}:{}),r(!1)}catch(s){l(Wt(e.schema,e.allMutations(),s))}},children:"Keep this link"}),o?(0,je.jsx)("span",{role:"alert",children:o}):null]}):null]})}var ye=I(U(),1);function Wo({nodeId:e,node:t,field:n,inPlace:a,labelStyle:r=he}){return n.files?(0,ye.jsx)(ct,{as:"field",read:!a,nodeId:e,field:n.key,label:n.label,files:n.files,labelStyle:r,style:{gap:4}}):n.long?(0,ye.jsx)(Nr,{nodeId:e,field:n.key,label:n.label,value:n.value,markdown:n.markdown,style:{gridColumn:"1 / -1",gap:4},labelStyle:r,valueStyle:{lineHeight:1.6}}):(0,ye.jsxs)("div",{style:{display:"grid",gap:2,minWidth:0,alignContent:"start"},children:[(0,ye.jsx)("dt",{style:r,children:n.label}),(0,ye.jsx)("dd",{style:{margin:0,overflowWrap:"anywhere",minWidth:0},children:n.linked?(0,ye.jsx)(gr,{relation:n.linked.relation,refs:n.linked.refs,...a?{nodeId:e,field:n.key}:{}}):n.app?(0,ye.jsx)(qt,{address:n.app,as:"record",...a?{nodeId:e,field:n.key}:{}}):n.href?(0,ye.jsx)(Mr,{href:n.href,field:n.key,value:n.value,stored:n.stored,...a?{nodeId:e}:{}}):a?(0,ye.jsxs)(ye.Fragment,{children:[(0,ye.jsx)(Ut,{nodeId:e,field:n.key,value:n.value,stored:n.stored}),n.repeats?(0,ye.jsx)(mr,{nodeId:e,field:n.key,start:t?.[n.key],value:t?.[`${n.key}Repeat`],label:`${n.label} repeats`}):null]}):n.value})]})}var S=I(U(),1),Zi=[];function ia({context:e}){let{store:t,brand:n,principal:a,invariantContext:r}=e;ee(t);let o=ie()!==null,l=Ve(),i=decodeURIComponent(l.id??""),s=uo(t,i,{...a?{principal:a}:{},...r?{context:r}:{}}),c=It(t,s?.violations??Zi),[g,k]=(0,Be.useState)(null),[u,p]=(0,Be.useState)(!1),[x,O]=(0,Be.useState)(null),W=(0,Be.useRef)(null),P=(0,Be.useRef)(null),E=fr({flow:"both",letters:!0}),b=m=>{(W.current?.parentElement?.querySelector(`[data-affordance="${m.replace(/["\\]/g,"\\$&")}"]`)??W.current)?.focus()};if(!s)return(0,S.jsx)(oe,{context:e,children:(0,S.jsx)(le,{context:e,children:"Nothing lives at this address."})});let G=t.graph.getNode(i),L=t.schema.tryDefinition(s.kind),T=L?.describe&&G?tr(L,G):null,ne=[...t.log.all()].filter(m=>!Nt(m)&&(m.writes.includes(i)||m.reads.includes(i))).slice(-8).reverse(),J=t.log.all().find(m=>!Nt(m)&&m.undoes===void 0&&m.primitives.some(M=>M.op==="add-node"&&M.node.id===i)),z=s.actions.affordances.filter(m=>m.provider!=="invariant"),xe=z.filter(m=>m.destructive||m.setsAside),$e=u||xe.length<2?z:z.filter(m=>!xe.includes(m)),Pe=e.views?.lookup(s.kind,{cardinality:"one",fidelity:"full"}),Ae=Pe!==void 0&&!lt(Pe)?Pe:void 0,w=Ae&&G?jt(Pe,G,t.graph):void 0,h=w?s.fields.filter(m=>!w.fields.has(m.key)):s.fields,R=w?s.links.flatMap(m=>{let M=m.targets.filter(_=>!w.records.has(_.id));return M.length>0?[{...m,targets:M}]:[]}):s.links,$=Ae!==void 0&&_a(Pe),Z=o&&sr(L).length>0,X=Oe(e).filter(m=>!m.hidden&&(m.kind===s.kind||m.across===s.kind));return(0,S.jsxs)(oe,{context:e,children:[(0,S.jsxs)("header",{style:{display:"grid",gap:12},children:[(0,S.jsx)(mt,{context:e}),(0,S.jsx)(le,{context:e,children:o&&G?.label===s.label?(0,S.jsx)(Ut,{nodeId:i,field:"label",value:s.label,said:s.label}):s.label}),T&&T!==s.label?(0,S.jsx)("p",{style:se,children:T}):null,J?.lineage?(0,S.jsxs)("p",{style:{...A,margin:0},"data-testid":"record-lineage",children:["Made by ",wt(J,a,{graph:t.graph,schema:t.schema,...e.seats?{seats:e.seats}:{},...e.people?{people:e.people}:{}}),", ",Rn(J.lineage)]}):null,(0,S.jsx)(Gn,{context:e,stop:`#focus=${encodeURIComponent(i)}`,style:{...Ue,...A},"data-testid":"spatial-link"}),o&&G?(0,S.jsx)(En,{choices:[{on:"changed",record:i},{on:"act",record:i},{on:"reaches",kind:s.kind,condition:"",record:i}],label:"Notify me when this changes",testId:"record-notify",style:{...ve,...A,justifySelf:"start"}}):null,X.length>0?(0,S.jsx)(Xi,{context:e,places:X}):null]}),G&&Ca(G)?(0,S.jsx)(ts,{context:e,id:i,kind:s.kind}):null,G&&Ea(t,i)?(0,S.jsx)(es,{context:e,id:i,kind:s.kind}):null,Ae&&G?(0,S.jsx)("section",{"data-testid":"record-view",style:{display:"grid",minWidth:0},children:(0,S.jsx)(Wr,{children:(0,S.jsx)(gt,{when:dt(Pe),children:(0,S.jsx)(Ae,{node:G,cardinality:"one",fidelity:"full",mode:"fullscreen",selected:!1,...s.violations.length>0?{flagged:[i]}:{}})})})}):null,s.violations.length>0?(0,S.jsx)("section",{"data-testid":"record-violations",style:{display:"grid",gap:12,padding:"16px 18px",borderLeft:"3px solid var(--graview-warn)",background:"var(--graview-panel-warning)",borderRadius:"0 var(--graview-radius, 12px) var(--graview-radius, 12px) 0"},children:c.map((m,M)=>(0,S.jsxs)("div",{style:{display:"grid",gap:8},children:[(0,S.jsx)(on,{violation:m,schema:t.schema,...n?{brand:n}:{}}),(0,S.jsx)(sn,{store:t,repairs:go(s.actions,m.repairs),...a?{principal:a}:{}})]},M))}):null,!$&&(h.length>0||Z)?(0,S.jsxs)("section",{style:{...re,display:"grid",gap:14},"data-testid":"record-fields",children:[(0,S.jsx)("h2",{style:ae,children:"The facts"}),nr(L,h).map((m,M)=>{let _=(0,S.jsx)("dl",{style:{margin:0,display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(200px, 1fr))",gap:"14px 24px"},children:m.fields.map(de=>(0,S.jsx)(Wo,{nodeId:i,node:G,field:de,inPlace:o},de.key))});return m.title?(0,S.jsxs)("section",{style:{display:"grid",gap:10,minWidth:0},children:[(0,S.jsx)("h3",{"data-graview-field-group":m.title,style:{...ae,fontSize:"inherit"},children:m.title}),_]},M):(0,S.jsx)("div",{children:_},M)}),Z?(0,S.jsx)(ct,{as:"unfilled",nodeId:i,skip:[...w?.fields??[]],labelStyle:he,style:{gap:4}}):null]}):null,($?[]:R).map(m=>(0,S.jsxs)("section",{style:{...re,display:"grid",gap:10},children:[(0,S.jsx)("p",{style:he,children:no(t,m)}),m.description?(0,S.jsx)("h2",{style:ae,children:Ce(m.description)}):(0,S.jsxs)("h2",{style:ae,"aria-label":Ye(m.edgeKind),children:[m.direction==="in"?"\u2190 ":"\u2192 ",Ye(m.edgeKind)]}),(0,S.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none",display:"flex",flexWrap:"wrap",gap:"6px 18px"},children:m.targets.map(M=>{let _=rr(t,m.direction==="in"?{kind:m.edgeKind,from:M.id,to:i}:{kind:m.edgeKind,from:i,to:M.id});return(0,S.jsxs)("li",{style:{display:"inline-flex",alignItems:"center",gap:8,flexWrap:"wrap"},children:[(0,S.jsx)(ue,{kind:M.kind,brand:n,schema:t.schema,size:7}),(0,S.jsxs)(H,{to:Y(t.schema,M.kind,M.id),style:V,children:[M.label,M.apart?(0,S.jsxs)("span",{style:A,children:[" \xB7 ",M.apart]}):null]}),_?.provisional?(0,S.jsx)(Do,{store:t,link:_,...a?{principal:a}:{}}):null]},M.id)})}),(m.direction==="out"&&t.schema.edge(m.edgeKind)?.cardinality==="one"?[]:[...new Set(m.targets.map(M=>M.kind))]).map(M=>(0,S.jsx)(H,{to:`/${j(t.schema,M)}?${encodeURIComponent(m.edgeKind)}=${encodeURIComponent(i)}`,style:{...Ue,...A},"data-testid":"related-all",children:(0,S.jsxs)(Xe,{children:["Sort and filter ",m.description??`these ${Q(t,M).toLowerCase()}`,m.targets.some(_=>_.kind!==M)?` (${Q(t,M).toLowerCase()})`:""]})},M))]},`${m.edgeKind}|${m.direction}|${m.description??""}`)),!$&&(z.length>0||s.actions.withheld.length>0)?(0,S.jsxs)("section",{style:{...re,display:"grid",gap:14},"data-testid":"record-actions",children:[(0,S.jsx)("h2",{style:ae,ref:W,tabIndex:-1,children:"What can be done"}),(0,S.jsxs)("div",{role:"toolbar","aria-label":"What can be done",...E,style:{display:"flex",flexWrap:"wrap",gap:8},children:[$e.map(m=>{let M=g===m.id;return(0,S.jsx)("button",{type:"button","data-affordance":m.id,"data-rank":m.rank,"data-graview-act":m.mutation,[Tn]:"",autoFocus:u&&m===xe[0],"aria-expanded":M,onClick:()=>k(M?null:m.id),style:{...ve,...M?{borderColor:"var(--graview-accent)",color:"var(--graview-accent)"}:{}},children:m.label},m.id)}),$e.length<z.length?(0,S.jsxs)("button",{type:"button","aria-expanded":!1,onClick:()=>p(!0),style:{...ve,...A},"data-testid":"record-actions-more",[Tn]:"",children:["Show ",z.length-$e.length," more"]}):null]}),z.map(m=>{if(g!==m.id)return null;let M=t.allMutations().find(_=>_.name===m.mutation);return M?(0,S.jsxs)("div",{ref:P,onKeyDown:_=>{if(_.key!=="Escape"||_.defaultPrevented)return;_.preventDefault(),k(null);let de=m.id;requestAnimationFrame(()=>b(de))},style:{display:"grid",gap:10,padding:18,border:"1px solid var(--graview-edge)",borderRadius:"var(--graview-radius, 12px)",background:"var(--graview-panel)"},children:[(0,S.jsx)("h3",{style:ae,children:m.label}),M.description?(0,S.jsx)("p",{style:{...A,margin:0},children:M.description}):null,(0,S.jsx)(Fe,{store:t,mutation:M,prefilled:m.args,open:m.open,label:m.label,autoFocus:!0,onDone:()=>{k(null),O(m.mutation);let _=m.id;requestAnimationFrame(()=>b(_))},...a?{principal:a}:{}})]},m.id):null}),o&&x!==null&&g===null?(0,S.jsx)(En,{choices:[{on:"act",act:x,record:i},{on:"act",act:x}],label:"Notify me when someone else does this",testId:"notify-after-act",style:{...ve,...A,justifySelf:"start"}}):null,(0,S.jsx)(nn,{context:e,withheld:s.actions.withheld})]}):null,o?(0,S.jsx)(to,{id:i,style:re,headingStyle:ae}):null,ne.length>0?(0,S.jsxs)("section",{style:{...re,display:"grid",gap:10},"data-testid":"record-history",children:[(0,S.jsx)("h2",{style:ae,children:"What has happened"}),(0,S.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none",display:"grid",gap:6},children:ne.map(m=>(0,S.jsxs)("li",{style:A,children:[(0,S.jsx)("span",{style:{color:"var(--graview-ink)"},children:m.intent}),m.lineage?(0,S.jsxs)("span",{"data-graview-lineage":"",children:[" \xB7 ",Rn(m.lineage)]}):null," \u2014 ",wt(m,a,{graph:t.graph,schema:t.schema,...e.seats?{seats:e.seats}:{},...e.people?{people:e.people}:{}})]},m.id))})]}):null]})}function Xi({context:e,places:t}){let[n,a]=(0,Be.useState)(!1),r=(0,Be.useRef)(null),o=n||t.length<=ln+1?0:t.length-ln;return(0,S.jsxs)("p",{ref:r,style:{...A,margin:0},"data-testid":"seen-in",...n?{"data-open":""}:{},children:["Seen in:"," ",t.map((l,i)=>(0,S.jsxs)("span",{...o>0&&i>=ln?{"data-graview-later":""}:{},children:[i>0?(0,S.jsx)("span",{"aria-hidden":"true",children:" \xB7 "}):null,(0,S.jsx)(H,{to:fe(e,l),style:V,children:l.title})]},nt(l))),o>0?(0,S.jsxs)(S.Fragment,{children:[" ",(0,S.jsxs)("button",{type:"button","data-graview-seen-more":"","aria-expanded":"false",style:{...V,...A,font:"inherit",background:"none",border:0,padding:0,cursor:"pointer"},onClick:()=>{a(!0),requestAnimationFrame(()=>r.current?.querySelectorAll("a")[ln]?.focus())},children:[o," more"]}),(0,S.jsx)("style",{children:Ji})]}):null]})}var ln=3,Ji="[data-graview-seen-more]{display:none!important}@media (max-width:680px){[data-graview-seen-more]{display:inline!important}[data-testid=seen-in] [data-graview-later]{display:none}}";function es({context:e,id:t,kind:n}){let{store:a,principal:r}=e,o={name:`allow-tidying-${n}`,args:{id:t}},l=a.allMutations().some(i=>i.name===o.name)&&a.permits(o,r).ok;return(0,S.jsxs)("section",{"data-testid":"record-left-alone",style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:12,padding:"12px 16px",border:"1px solid var(--graview-edge)",borderRadius:"var(--graview-radius, 12px)",background:"var(--graview-panel)"},children:[(0,S.jsxs)("p",{style:{margin:0,flex:"1 1 16rem"},children:[(0,S.jsx)("strong",{children:"Left alone."})," Nothing automated changes it; tidying passes it by."]}),l?(0,S.jsx)("button",{type:"button",style:ve,"data-testid":"allow-tidying",onClick:()=>a.apply(o,r?{author:r}:{}),children:"Allow tidying again"}):null]})}function ts({context:e,id:t,kind:n}){let{store:a,principal:r}=e,o={name:`unarchive-${n}`,args:{id:t}},l=a.allMutations().some(c=>c.name===o.name)&&a.permits(o,r).ok,i=[...a.log.all()].reverse().find(c=>!Nt(c)&&c.mergedInto!==void 0&&c.writes.includes(t)),s=i?.mergedInto!==void 0?a.graph.getNode(i.mergedInto):void 0;return(0,S.jsxs)("section",{"data-testid":"record-archived",style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:12,padding:"12px 16px",border:"1px solid var(--graview-edge)",borderRadius:"var(--graview-radius, 12px)",background:"var(--graview-panel)"},children:[(0,S.jsxs)("p",{style:{margin:0,flex:"1 1 16rem"},children:[(0,S.jsx)("strong",{children:"Archived."})," Kept with its ties and history, and out of lists, counts and rules.",s?(0,S.jsxs)(S.Fragment,{children:[" ","Merged into ",(0,S.jsx)(H,{to:Y(a.schema,s.kind,s.id),style:V,children:pe(a.schema.tryDefinition(s.kind),s)}),"."]}):null]}),l?(0,S.jsx)("button",{type:"button",style:ve,"data-testid":"bring-it-back",onClick:()=>a.apply(o,r?{author:r}:{}),children:"Bring it back"}):null]})}var v=I(U(),1),ns=Ht(()=>(__graviewPreload(import.meta.url,["./chunk.T56SOSIR.js","./chunk.JRU5BT7K.js","./chunk.UGFDSE37.js","./chunk.EG2N5F6L.js","./chunk.7NFCI4LH.js","./chunk.RUTZEEBR.js","./chunk.GZWC72HS.js","./chunk.ASCTAUFD.js","./chunk.CWPRQSED.js","./chunk.EZXGVTT2.js","./chunk.ULTYDYTS.js","./chunk.2LQ37DC2.js","./chunk.UXNZPPWR.js","./chunk.GYO57LKD.js","./chunk.KWMBRB6O.js","./chunk.G226CUJQ.js","./chunk.AQJD23AN.js","./chunk.R3DWF35R.js","./chunk.XBNASVTY.js","./chunk.6S3B4XC4.js","./chunk.52Y37IAD.js","./chunk.TLQTDKOL.js","./chunk.MB7LKKUD.js","./chunk.WVUJXDXZ.js","./chunk.VTCPA4V4.js","./chunk.FGJM4LJO.js","./chunk.K7WME4P4.js","./chunk.MDIAWTNK.js","./chunk.PEA4D66Y.js","./chunk.TRPPN2GD.js","./chunk.GZHZLJBF.js","./chunk.TTFYXKLI.js","./chunk.OJGHDWI6.js","./chunk.ICYJ7QJG.js","./chunk.MT45H2T5.js","./chunk.S2ATSY6P.js","./chunk.72Q4R7N6.js","./chunk.G6DISMVT.js","./chunk.W54NXXC5.js","./chunk.B3T4N2XM.js","./chunk.SDO3U72B.js","./chunk.6W2DUW5S.js","./chunk.SLBWPVIY.js","./chunk.AJZBJBMO.js"]),import("./chunk.LEKML4S4.js")).then(e=>({default:e.DraftPage}))),as={kind:"human"};function rs({list:e,store:t}){let n=new Set(e.members.map(l=>l.kind)),a=e.total-e.members.length,r=n.size===1?[...n][0]:void 0;if(!r)return(0,v.jsx)("p",{className:"graview-spec-text graview-spec-more",children:`and ${a} more`});let o=qe(t.schema,r).toLowerCase();return(0,v.jsx)("p",{className:"graview-spec-text graview-spec-more",children:(0,v.jsx)(H,{to:`/${j(t.schema,r)}`,className:"graview-spec-link graview-spec-see-all","data-testid":"see-all",children:e.total===t.graph.nodesOfKind(r).length?`See all ${ht(e.total)} ${o}`:`${ht(a)} more \xB7 all ${o}`})})}function os({context:e,children:t}){let n=Ge(),a=e.store.schema,r=Je("/").replace(/\/$/,""),o=(0,q.useMemo)(()=>({href:l=>`${r}${Y(a,l.kind,l.id)}`,go:l=>n(Y(a,l.kind,l.id)),more:l=>(0,v.jsx)(rs,{list:l,store:e.store})}),[r,a,n,e.store]);return(0,v.jsx)(Vt.Provider,{value:o,children:(0,v.jsx)(Gr.Provider,{value:(e.titleLevel??(e.framed&&!e.barAbove?1:2))-1,children:t})})}var Ko=(0,q.createContext)(void 0);function is({steering:e}){let t=me(),n=Ge(),a=`${t.pathname}${t.search}`;return(0,q.useLayoutEffect)(()=>e.at(a),[a,e]),(0,q.useLayoutEffect)(()=>{let r=l=>{l!==a&&n(l)};e.go.current=r;let o=e.pending?.current;return o!==void 0&&(e.pending.current=void 0,r(o)),()=>{e.go.current===r&&(e.go.current=void 0)}},[a,n,e]),null}function ss({context:e,to:t}){let{pathname:n}=me(),a=ie(),r=(t??a)?.sayWhere,o=ls(e,n);return(0,q.useEffect)(()=>(r?.(o),()=>r?.(null)),[r,o]),null}function ls(e,t){let[n="",a,r]=t.split("/").filter(Boolean).map(l=>{try{return decodeURIComponent(l)}catch{return l}});if(r!==void 0)return"#";if(n==="places"&&a!==void 0){if(a===An)return"#overview=1";let l=e.views?.places().find(i=>i.as===a);return l?`#focus=${encodeURIComponent(Ie(l.kind))}&view=${encodeURIComponent(l.as)}`:"#"}let o=Se(e.store.schema,n);return o?`#focus=${encodeURIComponent(a??Ie(o))}`:"#"}function ds({onNavigate:e,path:t}){let n=me(),a=Kn(),r=Ge(),o=n.hash&&!n.hash.includes("=")?n.hash:"",l=`${n.pathname}${n.search}${o}`,i=(0,q.useRef)(e);i.current=e;let s=(0,q.useRef)(null);(0,q.useEffect)(()=>{let g=s.current;s.current=l,g!==null&&(l===g&&a!=="PUSH"||i.current?.(l,a==="POP"?"pop":a==="REPLACE"?"replace":"push"))},[n.key]);let c=(0,q.useRef)(t);return(0,q.useEffect)(()=>{t===void 0||t===c.current||(c.current=t,t!==l&&r(t))},[t]),null}function Go({context:e,registry:t,page:n}){let a=Ve(),r=Se(e.store.schema,a.slug??""),o=n==="list"?aa:ia,i=(r?t?.lookup(r,n):void 0)??o;return(0,v.jsx)(i,{context:e})}function cs({context:e,registry:t,children:n}){let a=(0,q.useRef)(null);return za(a),(0,v.jsx)("div",{ref:a,"data-graview-face":"pages",style:{display:"contents"},children:(0,v.jsx)(xo,{context:e,registry:t,root:a,children:(0,v.jsx)(Ao,{context:e,root:a,children:n})})})}function ps(e){return e instanceof HTMLElement?e.isContentEditable||e.tagName==="TEXTAREA"||e.tagName==="SELECT"?!0:e.tagName==="INPUT"&&!["button","submit","reset","checkbox","radio","image","file","color","range"].includes(e.type):!1}function us(){let{pathname:e}=me(),t=Kn(),n=(0,q.useRef)(null);(0,q.useLayoutEffect)(()=>{if(t!=="POP"){for(let o=n.current?.parentElement;o;o=o.parentElement){let{overflowY:l}=getComputedStyle(o);if((l==="auto"||l==="scroll")&&o.scrollHeight>o.clientHeight){o.scrollTop=0;return}}window.scrollTo(0,0)}},[e]);let a=(0,q.useRef)(e),r=(0,q.useRef)(!1);return(0,q.useEffect)(()=>{if(!r.current&&e===a.current)return;r.current=!0;let o=document.activeElement;if(ps(o))return;let l=n.current?.closest("main")??document.querySelector("main"),s=n.current?.closest("[data-graview-face]")?.querySelector("[data-graview-page-title]")??l?.querySelector("h1, h2")??null??l??null;s&&(s.hasAttribute("tabindex")||s.setAttribute("tabindex","-1"),s.focus({preventScroll:!0}))},[e]),(0,v.jsx)("span",{ref:n,hidden:!0,"data-graview-scroll-reset":""})}function Bo({context:e,children:t}){let n=Ge(),a=Je("/").replace(/\/$/,""),r=(0,q.useContext)(Ko),o=(0,q.useMemo)(()=>{let l=(s,c)=>{if("record"in s){let g=e.store.graph.getNode(s.record);return g?zt(Y(e.store.schema,g.kind,s.record),{section:c?.section}):void 0}if("place"in s){let g=e.views?.places().find(k=>k.as===s.place);return g?zt(fe(e,g),c):void 0}return e.store.schema.tryDefinition(s.list)?zt(`/${j(e.store.schema,s.list)}`,c):void 0},i=s=>{s!==void 0&&n(s)};return{record:(s,c)=>i(l({record:s},c)),place:(s,c)=>i(l({place:s},c)),list:(s,c)=>i(l({list:s},c)),draft:()=>n("/~draft"),href:(s,c)=>{let g=r===!1?void 0:l(s,c);if(g!==void 0)return r?r(g):`${a}${g}`}}},[e,n,a,r]);return(0,v.jsx)(ja.Provider,{value:o,children:t})}function gs(){let{pathname:e,search:t,hash:n}=me();return(0,q.useEffect)(()=>{let a=decodeURIComponent(n.replace(/^#/,""));if(!(!a||a.includes("=")))return So(a)},[e,t,n]),null}function ms({context:e,Home:t}){let n=me(),a=e.views,r=n.key==="default"&&!(a&&Ua(a));(0,q.useEffect)(()=>{a&&Va(a)},[a]);let o=r?Ha(e.views?.arrangement?.()?.first,e.store.schema,e.views?.places()??[]):void 0,l=o?.to==="place"?fe(e,o.place):o?.to==="kind"?`/${j(e.store.schema,o.kind)}`:void 0;return l?(0,v.jsx)(Bn,{to:l,replace:!0}):(0,v.jsx)(t,{context:e})}function qo({context:e,registry:t}){let n=t?.lookupSurface("shell"),a=n!==void 0,r=a&&(t?.without().has("bar")??!1),o=a&&!r&&!e.embedded?{...e,barAbove:!0}:e,l=O=>n===void 0?(0,v.jsx)(Xt,{context:e,children:O}):r?(0,v.jsx)(n,{context:e,children:O}):(0,v.jsx)(Xt,{context:e,children:(0,v.jsx)(n,{context:o,children:O})}),i=t?.lookupSurface("home")??Jn,s=t?.lookupSurface("problems")??ra,c=a?{...o,framed:!0}:e,[g,k]=(0,q.useState)(null),u=(0,q.useMemo)(()=>({context:c,registry:t}),[c,t]),p=(0,q.useMemo)(()=>({onFind:k,find:!(t?.without().has("find")??!1),places:!(t?.without().has("places")??!1)}),[t]),x=(0,v.jsx)(Un.Provider,{value:u,children:(0,v.jsx)(Bo,{context:e,children:(0,v.jsx)(cs,{context:e,registry:t,children:l((0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(or,{face:"pages"}),(0,v.jsxs)(os,{context:c,children:[(0,v.jsx)(us,{}),(0,v.jsx)(gs,{}),(0,v.jsxs)(so,{children:[(t?.routes()??[]).map(({path:O,component:W})=>(0,v.jsx)(Re,{path:O,element:(0,v.jsx)(W,{context:c})},O)),(0,v.jsx)(Re,{path:"/",element:(0,v.jsx)(ms,{context:c,Home:i})}),(0,v.jsx)(Re,{path:"/problems",element:(0,v.jsx)(s,{context:c})}),(0,v.jsx)(Re,{path:"/~draft",element:(0,v.jsx)(q.Suspense,{fallback:null,children:(0,v.jsx)(ns,{context:c})})}),(0,v.jsx)(Re,{path:"/search",element:(0,v.jsx)(na,{context:c})}),(0,v.jsx)(Re,{path:"/map",element:(0,v.jsx)(Xn,{context:c})}),(0,v.jsx)(Re,{path:"/places",element:(0,v.jsx)(Qn,{context:c})}),Oe(c).some(O=>O.as===An)?null:(0,v.jsx)(Re,{path:$a,element:(0,v.jsx)(Bn,{to:"/",replace:!0})}),(0,v.jsx)(Re,{path:"/places/:as",element:(0,v.jsx)(Zn,{context:c})}),(0,v.jsx)(Re,{path:"/:slug",element:(0,v.jsx)(Go,{context:c,registry:t,page:"list"})}),(0,v.jsx)(Re,{path:"/:slug/:id",element:(0,v.jsx)(Go,{context:c,registry:t,page:"record"})})]})]})]}))})})});return e.embedded||!a||r?x:(0,v.jsx)(po.Provider,{value:p,children:(0,v.jsx)(kr.Provider,{value:g,children:x})})}var fs=()=>typeof document>"u"?null:document.body;function ys({context:e,registry:t,basename:n,initialPath:a,onNavigate:r,path:o,steering:l,firstLook:i,hrefOf:s,typing:c}){let[g,k]=(0,q.useState)(void 0),u=g!==void 0&&g.from===e.principal?{...e,principal:g.seat}:e;(0,q.useState)(()=>u.views?qr(u.views,u.store.schema,Nn(u.brand,u.store.schema)):void 0);let p=ie(),x=c??u.typing;ba({reader:u.locale??p?.locale,app:u.brand?.locale??u.app?.brand?.locale,readerTimeZone:u.timeZone??p?.timeZone,appTimeZone:u.brand?.timeZone??u.app?.brand?.timeZone});let O=u.principal??as,W=Ga(u.store,O,u.history),E=(W.past&&W.live===u.store?W.past.store:u.store).seenBy(O),b=E===u.store?u:{...u,store:E};Ka(u.store,u.principal);let G=(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(ds,{onNavigate:r,path:o}),l?(0,v.jsx)(is,{steering:l}):null,b.presence||p?(0,v.jsx)(ss,{context:b,to:p}):null,(0,v.jsx)(qo,{context:b,...t?{registry:t}:{}}),i?(0,v.jsx)(Ur,{firstLook:i,root:fs,app:Nn(u.brand,u.store.schema)}):null]}),L=b.views?(0,v.jsxs)(Ba,{store:b.store,views:b.views,...b.principal?{principal:b.principal}:{},...b.brand?{brand:b.brand}:{},...b.locale?{locale:b.locale}:{},...b.timeZone?{timeZone:b.timeZone}:{},...b.settings?{settings:b.settings}:{},...b.presence&&!p?{presence:b.presence}:{},...x?{typing:x}:{},...b.people?{people:b.people}:{},...b.seats?{seats:b.seats}:{},onSeat:z=>p?p.takeSeat(z):k({from:e.principal,seat:z}),...b.onKeepLens?{onKeepLens:b.onKeepLens}:{},...b.onExport?{onExport:b.onExport}:{},...b.ai?{ai:b.ai}:{},...b.subscriptions?{subscriptions:b.subscriptions}:{},dismissals:b.dismissals,whileAway:b.whileAway,...b.signIn?{signIn:b.signIn}:{},resolveApp:b.resolveApp??p?.resolveApp,linkedRecords:b.linkedRecords??p?.linkedRecords,...b.app?{app:b.app}:{},...b.menuSections?{menuSections:b.menuSections}:{},children:[G,(0,v.jsx)(Bo,{context:b,children:(0,v.jsx)(vo,{context:b})})]}):G,T=(0,v.jsx)(Wa.Provider,{value:W,children:L}),ne=b.files?(0,v.jsx)(Da.Provider,{value:b.files,children:T}):T,J=s===void 0?ne:(0,v.jsx)(Ko.Provider,{value:s,children:ne});if(a!==void 0){let z=n===void 0?a:`${n.replace(/\/$/,"")}${a}`;return(0,v.jsx)(io,{initialEntries:[z],...n===void 0?{}:{basename:n},children:J})}return(0,v.jsx)(lo,{...n===void 0?{}:{basename:n},children:J})}export{mi as a,ys as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{k as a,l as b,m as c,n as d,o as e,p as f,q as g,r as h,s as i}from"./chunk.ZYYM52N5.js";import"./chunk.4DCPB67O.js";import"./chunk.Y4VOCJ7R.js";import"./chunk.3FUFVVR4.js";import"./chunk.XOZU4OFA.js";import"./chunk.IYVBJDR7.js";import"./chunk.OZYZBRWO.js";import"./chunk.TI4OSTQV.js";import"./chunk.FGJM4LJO.js";import"./chunk.MT45H2T5.js";import"./chunk.S2ATSY6P.js";import"./chunk.72Q4R7N6.js";import"./chunk.G6DISMVT.js";import"./chunk.W54NXXC5.js";import"./chunk.B3T4N2XM.js";import"./chunk.SDO3U72B.js";import"./chunk.6W2DUW5S.js";import"./chunk.SLBWPVIY.js";import"./chunk.AJZBJBMO.js";export{i as GhostTray,h as InlineAiMenu,g as askAgain,c as askInline,a as askOf,b as drawPanel,d as heldSuggestion,e as suggestOnce,f as takeOffer};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as V,b as _,c as F,d as $}from"./chunk.DUZS52WX.js";import"./chunk.G6DISMVT.js";import"./chunk.W54NXXC5.js";import{G as ee,O as B,P as H,T as L,ca as K}from"./chunk.B3T4N2XM.js";import"./chunk.SDO3U72B.js";import{Oc as T,R as z,Xa as N,Ya as I}from"./chunk.6W2DUW5S.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,5 +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{o as T}from"./chunk.G6DISMVT.js";import{G as P,Ga as C,J as R,T as a,ba as L}from"./chunk.B3T4N2XM.js";import{a as A}from"./chunk.SDO3U72B.js";import{Gd as b,Oc as v}from"./chunk.6W2DUW5S.js";import{b as i}from"./chunk.AJZBJBMO.js";var B=i(a(),1),D=T.part(e=>(0,B.jsx)(e.ActivityRail,{calls:[]}),{quiet:!0});var x=i(a(),1),I=e=>e.tabIndex>=0&&!e.disabled&&e.getClientRects().length>0;function H(e){if(!e)return!1;if(I(e))return e.focus({preventScroll:!1}),!0;let r=[...e.querySelectorAll("a[href], button, input, select, textarea, [tabindex]")].find(I);return r?(r.focus(),!0):(e.hasAttribute("tabindex")||e.setAttribute("tabindex","-1"),e.focus(),!0)}var F=`.graview-skips{display:contents}
|
|
2
|
-
.graview-skip{position:absolute;width:0;height:0;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
|
|
3
|
-
.graview-skip:focus{width:auto;height:auto;overflow:visible;clip-path:none;padding:6px 12px;border-radius:8px;border:1px solid var(--graview-accent);background:var(--graview-float,var(--graview-panel));color:var(--graview-ink);font:inherit;font-size:.875rem;font-weight:600;box-shadow:var(--graview-lift-high);outline:2px solid var(--graview-accent);outline-offset:1px}
|
|
4
|
-
.graview-skips[data-place=bar] .graview-skip:focus{position:fixed;left:8px;top:6px;z-index:${v("toast")}}
|
|
5
|
-
.graview-skips[data-place=here] .graview-skip:focus{position:static;justify-self:start}`;function E({to:e,place:r="bar"}){return e.length===0?null:(0,x.jsxs)("span",{className:"graview-skips","data-place":r,children:[(0,x.jsx)("style",{children:F}),e.map(o=>(0,x.jsx)("button",{type:"button",className:"graview-skip","data-graview-skip":o.testid,"data-testid":`skip-${o.testid}`,...o.opens?{"data-graview-skip-opens":""}:{},onClick:o.go,children:o.label},o.testid))]})}var d=i(P(),1),h=i(a(),1),M=C(A(()=>(__graviewPreload(import.meta.url,["./chunk.KCM2VOC7.js","./chunk.G226CUJQ.js","./chunk.BG2SC77J.js","./chunk.NAEEPUWJ.js","./chunk.AQJD23AN.js","./chunk.XBNASVTY.js","./chunk.52Y37IAD.js","./chunk.Y4VOCJ7R.js","./chunk.6ESAZJBN.js","./chunk.OZYZBRWO.js","./chunk.TI4OSTQV.js","./chunk.GZHZLJBF.js","./chunk.TTFYXKLI.js","./chunk.OJGHDWI6.js","./chunk.ICYJ7QJG.js","./chunk.MT45H2T5.js","./chunk.S2ATSY6P.js","./chunk.72Q4R7N6.js","./chunk.G6DISMVT.js","./chunk.W54NXXC5.js","./chunk.B3T4N2XM.js","./chunk.SDO3U72B.js","./chunk.6W2DUW5S.js","./chunk.SLBWPVIY.js","./chunk.AJZBJBMO.js"]),import("./chunk.2IKVO743.js")))),N=M.part((e,r)=>{let o=e.RecordInteractions;return(0,h.jsx)(o,{...r})},{quiet:!0});function j(e,r,o){let t=e.target;return(t.on==="record"||t.on==="field"?t.id===r:t.on==="selection"?t.ids.includes(r):t.on==="act"?t.id===r:!1)||e.offered.some(n=>n.id===`record:${r}`||n.id.startsWith(`fill:${r}:`))||(e.batches??[]).some(n=>o(n).includes(r))}function V({id:e,style:r,headingStyle:o,className:t}){let{ai:f,aiDesk:n,store:y}=L(),{entries:u}=R(n),l=f.off===!0;(0,d.useEffect)(()=>{l||n.load()},[n,l]);let S=y.log.length,m=(0,d.useMemo)(()=>{let k=g=>y.log.all().flatMap(w=>w.batch===g?w.writes:[]);return u.filter(g=>j(g,e,k))},[u,e,y,S]);return l||m.length===0?null:(0,h.jsx)(d.Suspense,{fallback:null,children:(0,h.jsx)(N,{entries:m,...r?{style:r}:{},...o?{headingStyle:o}:{},...t?{className:t}:{}})})}var c=i(P(),1);var p=i(a(),1),_={textDecorationLine:"underline",textDecorationColor:"color-mix(in srgb, currentColor 50%, transparent)",textDecorationThickness:1,textUnderlineOffset:"0.2em"};function O({children:e,mark:r="\u2192"}){return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("span",{style:_,children:e}),(0,p.jsx)("span",{"aria-hidden":"true",children:r})]})}var s=i(a(),1);function Ro({context:e,stop:r,title:o,label:t,style:f,className:n,children:y,...u}){let l=b(e.views?.arrangement?.()),S=y??(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)(O,{mark:"\u2197",children:["In ",l==="Scene"?"the scene":l.replace(/^The /,"the ")]})}),m=t?{"aria-label":t}:{};if(e.overview){let k=e.overview;return(0,s.jsx)("a",{href:r,...u,...m,...o?{title:o}:{},style:f,...n?{className:n}:{},onClick:g=>{g.preventDefault(),k(r)},children:S})}return e.embedded?null:(0,s.jsx)("a",{href:`${e.sceneHref??"/"}${r}`,...u,...m,...o?{title:o}:{},style:f,...n?{className:n}:{},children:S})}function Lo(){return(0,s.jsx)("a",{href:"#fresh","data-testid":"start-fresh",title:"Forget every edit made in this browser and return to the example",onClick:e=>{e.preventDefault();let r=new URL(window.location.href);r.searchParams.set("fresh","1"),window.location.assign(r.toString())},style:{color:"inherit",display:"inline-flex",alignItems:"center",minHeight:24,minWidth:24},children:"Start fresh"})}function Co(e){let r=(0,c.useRef)(0),o=(0,c.useCallback)(t=>e.subscribe(()=>{r.current+=1,t()}),[e]);return(0,c.useSyncExternalStore)(o,()=>r.current,()=>0)}function Bo(e){return e===void 0?{}:e==="sm"||e==="md"?{"data-size":e}:{style:{"--graview-control-height":typeof e=="number"?`${e}px`:e}}}var Io=(e,r)=>r?`${e} ${r}`:e;export{D as a,H as b,E as c,V as d,O as e,Ro as f,Lo as g,Co as h,Bo as i,Io as j};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{G as l,N as p,U as k,W as y,c}from"./chunk.T56SOSIR.js";import"./chunk.JRU5BT7K.js";import"./chunk.UGFDSE37.js";import{b as m}from"./chunk.EG2N5F6L.js";import"./chunk.7NFCI4LH.js";import"./chunk.RUTZEEBR.js";import"./chunk.GZWC72HS.js";import"./chunk.ASCTAUFD.js";import"./chunk.CWPRQSED.js";import"./chunk.EZXGVTT2.js";import"./chunk.ULTYDYTS.js";import"./chunk.2LQ37DC2.js";import"./chunk.UXNZPPWR.js";import"./chunk.GYO57LKD.js";import"./chunk.KWMBRB6O.js";import"./chunk.G226CUJQ.js";import"./chunk.AQJD23AN.js";import"./chunk.R3DWF35R.js";import"./chunk.XBNASVTY.js";import"./chunk.6S3B4XC4.js";import"./chunk.52Y37IAD.js";import"./chunk.TLQTDKOL.js";import"./chunk.MB7LKKUD.js";import"./chunk.WVUJXDXZ.js";import"./chunk.VTCPA4V4.js";import"./chunk.FGJM4LJO.js";import"./chunk.K7WME4P4.js";import"./chunk.MDIAWTNK.js";import"./chunk.PEA4D66Y.js";import"./chunk.TRPPN2GD.js";import"./chunk.GZHZLJBF.js";import"./chunk.TTFYXKLI.js";import"./chunk.OJGHDWI6.js";import"./chunk.ICYJ7QJG.js";import"./chunk.MT45H2T5.js";import"./chunk.S2ATSY6P.js";import"./chunk.72Q4R7N6.js";import"./chunk.G6DISMVT.js";import"./chunk.W54NXXC5.js";import{G as S,H as s,I as d,T as f,ca as g}from"./chunk.B3T4N2XM.js";import"./chunk.SDO3U72B.js";import"./chunk.6W2DUW5S.js";import"./chunk.SLBWPVIY.js";import{b as n}from"./chunk.AJZBJBMO.js";var u=n(S(),1);var t=n(f(),1);function D({context:a}){let r=l(),h=g(),[w]=(0,u.useState)(()=>s(null)),o=d(h?.seatTalk??w),P=()=>{(window.history.state?.idx??0)>0?r(-1):r("/")};return(0,t.jsxs)(k,{context:a,"data-testid":"draft-page",children:[(0,t.jsx)(y,{context:a,...o.draft?{"data-testid":"draft-title"}:{},children:o.draft?o.draft.title:"Nothing drawn"}),o.draft?(0,t.jsx)(m,{page:!0,go:e=>r(e.address),onPick:e=>{let i=a.store.graph.getNode(e);i&&r(c(a.store.schema,i.kind,e))},onDiscard:P}):(0,t.jsxs)("p",{style:{margin:0,color:"var(--graview-ink-muted)"},children:["Ask for a way of seeing \u2014 \u201Ca board of tasks by status\u201D \u2014 and it is drawn here."," ",(0,t.jsx)(p,{to:"/",style:{color:"var(--graview-accent)"},children:"Home \u2192"})]})]})}export{D as DraftPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b}from"./chunk.GZBODS7Z.js";import"./chunk.CANTHIRO.js";import"./chunk.CSA6SWTI.js";import"./chunk.4DCPB67O.js";import"./chunk.Y4VOCJ7R.js";import"./chunk.IYVBJDR7.js";import"./chunk.VTCPA4V4.js";import"./chunk.FGJM4LJO.js";import"./chunk.K7WME4P4.js";import"./chunk.MDIAWTNK.js";import"./chunk.PEA4D66Y.js";import"./chunk.TRPPN2GD.js";import"./chunk.MT45H2T5.js";import"./chunk.S2ATSY6P.js";import"./chunk.72Q4R7N6.js";import"./chunk.6W2DUW5S.js";import"./chunk.SLBWPVIY.js";import"./chunk.AJZBJBMO.js";export{b as actOnSeveral,a as actsForSeveral};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as f}from"./chunk.HIDLE6BN.js";import"./chunk.YI7WHBAD.js";import"./chunk.T56SOSIR.js";import"./chunk.JRU5BT7K.js";import"./chunk.UGFDSE37.js";import{l as g}from"./chunk.EG2N5F6L.js";import"./chunk.PXQVXBNG.js";import"./chunk.7NFCI4LH.js";import"./chunk.RUTZEEBR.js";import"./chunk.GZWC72HS.js";import"./chunk.ASCTAUFD.js";import"./chunk.CWPRQSED.js";import"./chunk.EZXGVTT2.js";import"./chunk.ULTYDYTS.js";import"./chunk.2LQ37DC2.js";import"./chunk.UXNZPPWR.js";import"./chunk.GYO57LKD.js";import"./chunk.KWMBRB6O.js";import"./chunk.G226CUJQ.js";import"./chunk.AQJD23AN.js";import"./chunk.R3DWF35R.js";import"./chunk.XBNASVTY.js";import"./chunk.6S3B4XC4.js";import"./chunk.52Y37IAD.js";import"./chunk.TLQTDKOL.js";import"./chunk.4DCPB67O.js";import"./chunk.Y4VOCJ7R.js";import"./chunk.XOZU4OFA.js";import"./chunk.IYVBJDR7.js";import"./chunk.MB7LKKUD.js";import"./chunk.WVUJXDXZ.js";import"./chunk.VTCPA4V4.js";import"./chunk.FGJM4LJO.js";import"./chunk.K7WME4P4.js";import"./chunk.MDIAWTNK.js";import"./chunk.PEA4D66Y.js";import"./chunk.TRPPN2GD.js";import"./chunk.GZHZLJBF.js";import"./chunk.TTFYXKLI.js";import"./chunk.OJGHDWI6.js";import"./chunk.ICYJ7QJG.js";import"./chunk.MT45H2T5.js";import"./chunk.S2ATSY6P.js";import"./chunk.72Q4R7N6.js";import"./chunk.G6DISMVT.js";import"./chunk.W54NXXC5.js";import{G as b,T as h}from"./chunk.B3T4N2XM.js";import"./chunk.SDO3U72B.js";import{Ld as n}from"./chunk.6W2DUW5S.js";import"./chunk.SLBWPVIY.js";import{b as t}from"./chunk.AJZBJBMO.js";var m=t(b(),1),a=t(h(),1);function P({store:c,auto:y,brand:i,views:u,presence:s,steering:r,overview:o,scope:d,titleLevel:w=2,quickAsk:l,props:e}){let v=(0,m.useMemo)(()=>g({scope:`.${d}`}),[d]);return(0,a.jsxs)("div",{"data-embed-content":"",style:y?{flex:"0 0 auto",background:"var(--graview-ground)"}:{flex:"1 1 auto",minHeight:0,overflow:"auto",background:"var(--graview-ground)"},children:[(0,a.jsx)("style",{children:v}),(0,a.jsx)("div",{"data-embed-measure":"",style:{display:"flow-root"},children:(0,a.jsx)(f,{context:{store:c,embedded:!0,...e.bar!==!1?{barAbove:!0}:{},...o?{overview:o}:{},titleLevel:w,views:u,settings:e.app.settings??[],...s?{presence:s}:{},...i?{brand:i}:{},...e.locale?{locale:e.locale}:{},...e.timeZone?{timeZone:e.timeZone}:{},...e.principal?{principal:e.principal}:{},...e.seats?{seats:e.seats}:{},...e.people?{people:e.people}:{},...e.subscriptions?{subscriptions:e.subscriptions}:{},dismissals:e.dismissals,whileAway:e.whileAway,...e.signIn?{signIn:e.signIn}:{},...l!==void 0?{quickAsk:l}:{}},...e.pages?{registry:e.pages}:{},...r?{steering:r}:{},...e.routing==="address"?n(e.basePath)===""?{}:{basename:n(e.basePath)}:{initialPath:e.path??"/"},...e.path!==void 0?{path:e.path}:{},...e.hrefOf?{hrefOf:e.hrefOf}:e.routing==="address"?{}:{hrefOf:!1},...e.onNavigate?{onNavigate:e.onNavigate}:{}})})]})}export{P as PagesContent};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b}from"./chunk.3FRVG6JW.js";import"./chunk.7NFCI4LH.js";import"./chunk.RUTZEEBR.js";import"./chunk.FBRARPGR.js";import"./chunk.GZWC72HS.js";import"./chunk.ASCTAUFD.js";import"./chunk.CWPRQSED.js";import"./chunk.EZXGVTT2.js";import"./chunk.ULTYDYTS.js";import"./chunk.2LQ37DC2.js";import"./chunk.UXNZPPWR.js";import"./chunk.GYO57LKD.js";import"./chunk.HJCQ6I3S.js";import"./chunk.LCG3VLCB.js";import"./chunk.P7FN3SFB.js";import"./chunk.CANTHIRO.js";import"./chunk.R3DWF35R.js";import"./chunk.XBNASVTY.js";import"./chunk.6S3B4XC4.js";import"./chunk.52Y37IAD.js";import"./chunk.TLQTDKOL.js";import"./chunk.MSPRCR3Q.js";import"./chunk.CSA6SWTI.js";import"./chunk.4DCPB67O.js";import"./chunk.Y4VOCJ7R.js";import"./chunk.IYVBJDR7.js";import"./chunk.TXEWSZGO.js";import"./chunk.WVUJXDXZ.js";import"./chunk.VTCPA4V4.js";import"./chunk.FGJM4LJO.js";import"./chunk.K7WME4P4.js";import"./chunk.MDIAWTNK.js";import"./chunk.PEA4D66Y.js";import"./chunk.TRPPN2GD.js";import"./chunk.GZHZLJBF.js";import"./chunk.TTFYXKLI.js";import"./chunk.OJGHDWI6.js";import"./chunk.ICYJ7QJG.js";import"./chunk.MT45H2T5.js";import"./chunk.S2ATSY6P.js";import"./chunk.72Q4R7N6.js";import"./chunk.G6DISMVT.js";import"./chunk.W54NXXC5.js";import"./chunk.B3T4N2XM.js";import"./chunk.SDO3U72B.js";import"./chunk.6W2DUW5S.js";import"./chunk.SLBWPVIY.js";import"./chunk.AJZBJBMO.js";export{b as declaredLensView,a as formatFor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as ve,b as qe,c as Ie,d as pe,e as R,f as fe,h as Ve}from"./chunk.XXCT6DLX.js";import{h as Le,i as Ue,j as We}from"./chunk.K7WME4P4.js";import{a as se,b as ie,c as H,d as Be,e as J,g as ne,h as Ze}from"./chunk.PEA4D66Y.js";import{c as _e,h as y,i as Ne,j as le}from"./chunk.TRPPN2GD.js";import{A as Re,Aa as Fe,Ha as De,Ia as ee,Ja as ce,Rb as Ke,Sb as de,Tb as Me,Ub as Pe,Vb as Te,b as W,c as L,e as xe,f as Ee,g as q,h as O,k as _,kc as Ge,l as X,lc as Ce,m as C,n as Ae,o as U,p as K,r as $,s as Q,t as x,u as E,v as I,w as P,x as n,y as M,z as Z}from"./chunk.6W2DUW5S.js";var ue=e=>Object.entries(e).map(([s,r])=>[s,Object.keys(ee(r?.edges))]),me=(e,s)=>Me(e,ue(s));function Ye(e){return[...Object.keys(e.acts??{}),...Object.keys(e.kinds).flatMap(s=>Ke(s)),...Pe(ue(e.kinds))]}var V=e=>typeof e=="object"&&e!==null&&!Array.isArray(e);function He(e){if(!V(e)||!V(e.kinds))return e;let s;try{let f=Object.fromEntries(Object.entries(e.kinds).map(([z,i])=>[z,V(i)&&V(i.edges)?{edges:i.edges}:{}]));s=Ye({acts:V(e.acts)?e.acts:{},kinds:f})}catch{return e}let r=new Set(s),t=!1,a=f=>{if(typeof f!="string"||r.has(f))return f;let z=Ge(f,s);return z===void 0?f:(t=!0,z)},d=V(e.policy)&&Array.isArray(e.policy.grants)?{...e.policy,grants:e.policy.grants.map(f=>V(f)&&Array.isArray(f.mutations)?{...f,mutations:f.mutations.map(a)}:f)}:void 0,u=V(e.rules)?Object.fromEntries(Object.entries(e.rules).map(([f,z])=>[f,V(z)&&Array.isArray(z.repairs)?{...z,repairs:z.repairs.map(i=>V(i)?{...i,act:a(i.act)}:i)}:z])):void 0;return t?{...e,...d?{policy:d}:{},...u?{rules:u}:{}}:e}function ge(e,s){let r=Ce(e,Ye(s));return r&&r!==e?`did you mean "${r}"?`:void 0}var he="graview-document",be=1,ke=256*1024,te=64*1024,ze=/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/,ye=/^[a-z][A-Za-z0-9]*$/,zn=new Set(["id","kind"]),yn=/^(?:[a-z][a-z0-9]*(?:-[a-z0-9]+)*|[a-z][A-Za-z0-9]*)$/,hn=["string","text","number","integer","boolean","date","datetime","enum","list","url","email","image","video","file","app-link","phone","place","duration"];function bn(){let e=k=>k in Object.prototype,s=Z(k=>!e(k),"every object already has this name \u2014 choose another"),r=(k,N)=>[...k===void 0?[]:[Ee(k)],...N===void 0?[]:[xe(N)]],t=(k,N)=>O().check(...r(k,N)),a=(k,N,gn)=>K(k).check(...r(N,gn)),d=k=>O().check(q(ze,`${k} names are kebab-case, lower-case words joined by hyphens like "tool-note" (field and relation names are camelCase, like "supersededBy")`)),u=O().check(q(yn,'relation names are one camelCase word, like "supersededBy" (kind names are kebab-case, like "tool-note")'),s),f=O().check(q(ye,'field names are one word or camelCase, like "dueDate", so rules say them bare (kind names are kebab-case, like "tool-note")'),Z(k=>!zn.has(k),'a field cannot be called "id" or "kind" \u2014 the framework keeps those; try "type" or "category"'),s),z=t(1,500),i=t(1,2e3),o=t(1,300),p=$({type:I(hn),required:n(C()),description:n(z),label:n(t(1,60)),options:n(a(t(1,80),1,100)),of:n(I(["string","number","date","image","video","file"])),default:n(U()),unit:n(t(void 0,12)),format:n(I(["money","percent","duration","markdown"])),min:n(_()),max:n(_()),step:n(_()),renamedFrom:n(O().check(q(ye))),repeats:n(C()),collaborative:n(C())}).check(Re((k,N)=>{k.type==="enum"&&!k.options&&N.addIssue({code:"custom",message:'an enum field lists its "options"',path:["options"]}),k.type!=="enum"&&k.options&&N.addIssue({code:"custom",message:'"options" belongs only on an enum field',path:["options"]}),k.type!=="list"&&k.of&&N.addIssue({code:"custom",message:'"of" belongs only on a list field',path:["of"]}),k.repeats&&k.type!=="date"&&k.type!=="datetime"&&N.addIssue({code:"custom",message:'"repeats" belongs only on a date or datetime field',path:["repeats"]})})),w=O().check(q(new RegExp(`${ze.source}|${Fe.source}`),'a relation goes to a kind of this document, like "house", or of another app, like "@nick/house/house"')),m=$({to:x([a(w,1),P("*")]),cardinality:n(I(["one","many"])),description:n(z),inverse:n(t(1,80)),appendOnly:n(C()),renamedFrom:n(O()),tidying:n(P("never"))}),l=x([i,$({expr:i,label:n(t(1,60)),description:n(z)})]),c=$({noun:n(t(1,40)),plural:n(t(1,40)),description:n(z),fields:E(f,p).check(Z(k=>Object.keys(k).length>0,"a kind has at least one field")),label:n(o),describe:n(o),lifecycle:n($({field:f,retired:a(x([O(),_(),C()]),1)})),figure:n(t(void 0,2e4)),glance:n(a(f,1,20)),page:n($({fields:n(a(f,1,40)),groups:n(a($({title:t(1,60),fields:a(f,1,40)}),1,12))})),edges:n(E(u,m)),computed:n(E(O(),l).check(Z(k=>Object.keys(k).length<=20,"a kind works out at most 20 computed fields"))),fieldRoles:n(E(O(),O())),renamedFrom:n(O().check(q(ze))),people:n(C()),archives:n(P(!1)),tidying:n(I(["never","no-links"]))}),j=x([O(),_(),C(),Ae(),K(U()),$({expr:i})]),h=O().check(q(/^\$[A-Za-z][A-Za-z0-9]*$/,'a reference is "$" and a name, like "$subject" or "$new"')),S=x([$({create:d("kind"),as:n(O().check(q(ye))),set:n(E(f,j))}),$({set:E(f,j),target:n(h)}),$({connect:u,from:h,to:h}),$({sever:u,from:h,to:h}),$({remove:h})]),A=$({title:n(t(1,80)),description:n(z),fromTheOtherEnd:n(t(1,80)),on:n(x([d("kind"),a(d("kind"),1)])),creates:n(d("kind")),sets:n(E(f,j)),writes:n(a(f,1)),connects:n(u),severs:n(u),setsOther:n(E(f,j)),replaces:n(x([P(!0),a(u,1,10)])),removes:n(P(!0)),args:n(E(f,p)),effects:n(a(S,1,20)),allowedWhen:n(i),refusal:n(o),destructive:n(C())}),b=$({act:d("act"),label:n(t(1,80)),args:n(E(O(),j))}),G=$({title:n(t(1,120)),description:n(z),over:x([P("graph"),d("kind")]),when:n(i),require:i,says:n(o),repairs:n(a(b,void 0,10))}),F=$({roles:x([a(d("role"),1),P("*")]),mutations:x([a(d("act"),1),P("*")]),kinds:n(x([K(d("kind")),P("*")])),describe:n(z),self:n(C()),ownEnd:n(C())}),g=n(a(d("field"),1)),v=$({roles:x([a(d("role"),1),P("*")]),kinds:a(d("kind"),1),own:n(C()),via:n(u),fields:g,hide:g}),D=$({grants:K(F),sees:n(K(v))}),oe=$({accent:n(O().check(q(/^#[0-9a-fA-F]{6}$/,'an accent is a color like "#c2577a"'))),name:n(t(1,60)),currency:n(O().check(q(/^[A-Z]{3}$/,'a currency is its three-letter code, like "USD" or "EUR"'))),locale:n(t(2,35)),timeZone:n(t(1,64)),logo:n(x([t(1,te),$({src:t(1,te),alt:n(t(1,120))}),$({light:t(1,te),dark:n(t(1,te)),alt:n(t(1,120)),darkFallback:n(P("invert"))})])),favicon:n(x([t(1,te),$({emoji:O()})])),typography:n($({display:n(t(1,200)),body:n(t(1,200)),mono:n(t(1,200))})),shape:n($({radius:n(_().check(L(0),W(32))),density:n(_().check(L(.75),W(1.5)))})),accents:n(E(O(),_().check(L(0),W(360)))),scheme:n(I(["light","dark","auto"])),subtitle:n(P(!1))}),B=E(O(),U()),Y=x([t(1,120),$({by:t(1,120),direction:n(I(["asc","desc"]))})]),je=_().check(X(),L(1),W(9999)),dn=Q({create:n(C()),options:n(Q({sort:n(Y),columnSort:n(Y),search:n(a(t(1,120),void 0,40)),filters:n(a(t(1,120),void 0,40)),horizon:n(x([_().check(X(),L(1),W(200)),Q({years:_().check(X(),L(1),W(200)),title:t(1,80),from:n(je),to:n(je)})]))}))}),ln=$({card:n(K(U())),row:n(K(U())),page:n(K(U()))}),pn=()=>{let k=n(I(["asc","desc"]));return x([t(1,120),$({by:t(1,120),direction:k,then:n(x([t(1,120),$({by:t(1,120),direction:k})]))})])},fn=()=>x([t(1,120),$({by:t(1,120),order:n(a(t(1,80),void 0,40)),closed:n(a(t(1,80),void 0,40))})]),Oe=Q({order:n(K(O())),hide:n(K(O())),first:n(O()),primary:n(a(t(1,80),void 0,40)),scene:n(t(1,40)),pages:n(t(1,40)),lists:n(E(O(),$({filters:n(a(t(1,120),void 0,40)),sort:n(pn()),group:n(fn()),export:n(C())})))}),un=$({act:d("act"),title:n(t(1,80)),intro:n(z),fields:n(a(f,1,40)),say:n(z),submit:n(t(1,80)),role:n(d("role"))}),mn=$({$schema:n(O()),format:P(he),formatVersion:P(be),name:t(1,80),description:n(z),version:n(_().check(X(),L(1))),kinds:E(d("kind"),c).check(Z(k=>Object.keys(k).length>0,"a document declares at least one kind"),Z(k=>Object.keys(k).length<=40,"a document declares at most 40 kinds")),computed:n(E(O(),l)),acts:n(E(d("act"),A)),rules:n(E(d("rule"),G)),roles:n(K(d("role"))),policy:n(D),modules:n(B),lenses:n(K(dn)),pages:n(Oe),views:n(E(O(),x([ln,K(U())]))),brand:n(oe),settings:n(K(B)),migrations:n(K(B)),connections:n(E(d("connection"),B)),forms:n(E(d("form"),un)),publishing:n($({mode:I(["live","on-publish"]),working:a(d("role"),void 0,40),publishers:n(a(d("role"),1,40))}))});return{FieldSpec:p,EdgeSpec:m,ComputedSpec:l,KindSpec:c,ValueSpec:j,EffectSpec:S,ActSpec:A,RepairSpec:b,RuleSpec:G,GrantSpec:F,SightSpec:v,PolicySpec:D,BrandSpec:oe,PagesSpec:Oe,DocumentSpec:mn}}var kn,T=()=>kn??=bn(),_n=M(()=>T().FieldSpec),Nn=M(()=>T().EdgeSpec),qn=M(()=>T().ComputedSpec),In=M(()=>T().KindSpec),Vn=M(()=>T().ValueSpec),Bn=M(()=>T().EffectSpec),Ln=M(()=>T().ActSpec),Un=M(()=>T().RepairSpec),Wn=M(()=>T().RuleSpec),Zn=M(()=>T().GrantSpec),Yn=M(()=>T().SightSpec),Hn=M(()=>T().PolicySpec),Jn=M(()=>T().BrandSpec),Xn=M(()=>T().PagesSpec),Je=M(()=>T().DocumentSpec);var $n={};function Xe(e,s=$n,r=be){let{document:t,respelled:a}=ve(e),d=a.length>0?{respelled:a}:{};if(!t||typeof t!="object"||Array.isArray(t))return{document:t};let u=t;if(u.format!==he||typeof u.formatVersion!="number"||u.formatVersion>=r)return{document:t,...d};let f=u.formatVersion,z=structuredClone(u);for(let i=f;i<r;i++){let o=s[i];if(!o)throw new Error(`there is no upgrade from format ${i} to ${i+1}`);z={...o(z),formatVersion:i+1}}return{document:z,from:f,...d}}function Qe(e,s,r){let t=Object.keys(e).filter(f=>e[f].edges?.[s]!==void 0);if(t.length===0)return;let a=t.map(f=>e[f].edges[s].to),d=a.some(f=>f==="*")?"*":[...new Set(a.flatMap(f=>f))];if(r.length===0||r.some(f=>t.includes(f)))return{reversed:!1,kinds:d};let u=t.filter(f=>{let z=e[f].edges[s].to;return z==="*"||r.every(i=>z.includes(i))});return u.length>0?{reversed:!0,kinds:u}:{reversed:!1,kinds:d}}var tn=(e,s)=>{let r=e?.fields[s];return r!==void 0&&(r.type==="duration"||(r.type==="number"||r.type==="integer")&&r.format==="duration")};function en(e,s,r,t){if(t==="out"){let a=e[s]?.edges?.[r]?.to;return a===void 0?[]:a==="*"?Object.keys(e):a}return Object.entries(e).filter(([,a])=>{let d=a.edges?.[r]?.to;return d!==void 0&&(d==="*"||d.includes(s))}).map(([a])=>a)}function $e(e,s,r){if(r.t==="ident")return e[s]?.edges?.[r.name]?en(e,s,r.name,"out"):void 0;if(r.t==="where")return $e(e,s,r.set);if(r.t==="call"&&(r.fn==="out"||r.fn==="in")&&r.args[0]?.t==="lit"&&typeof r.args[0].value=="string")return en(e,s,r.args[0].value,r.fn)}var nn=(e,s,r)=>{let t=s.filter(a=>e[a]?.fields[r]!==void 0);return t.length>0&&t.every(a=>tn(e[a],r))};function on(e,s,r){let t=e.kinds,a=t[s],d=new Map(r),u=new Map,f=(i,o)=>{if(o>8)return!1;switch(i.t){case"ident":return tn(a,i.name)||z(i.name,o+1);case"member":{let p=$e(t,s,i.object);return p!==void 0&&nn(t,p,i.name)}case"call":{if(i.fn!=="sum"&&i.fn!=="min"&&i.fn!=="max")return!1;let[p,w]=i.args,m=p&&$e(t,s,p);return m!==void 0&&w?.t==="ident"&&nn(t,m,w.name)}case"binary":return(i.op==="+"||i.op==="-")&&f(i.left,o)&&f(i.right,o);case"unary":return i.op==="-"&&f(i.operand,o);default:return!1}},z=(i,o)=>{if(a?.computed?.[i]===void 0)return!1;if(u.has(i))return u.get(i);u.set(i,!1);let p=d.get(i),w=p!==void 0&&f(p,o);return u.set(i,w),w};return r.map(([i])=>i).filter(i=>z(i,0))}function sn(e,s,r=`kinds.${e}.page`){let t=s.page;if(!t)return[];let a=[],d=[...Object.keys(s.fields),...Object.keys(s.computed??{})],u=new Set,f=(i,o)=>{d.includes(i)?u.has(i)&&a.push(y("page-field-twice",o,`"${i}" is on ${e}'s page twice; name each field once`)):a.push(y("page-field",o,`${e}'s page is to show "${i}", and ${e} has no field or computed field called that`,`use one of: ${d.join(", ")}`)),u.add(i)};(t.fields??[]).forEach((i,o)=>f(i,`${r}.fields.${o}`));let z=new Set;return(t.groups??[]).forEach((i,o)=>{let p=i.title.trim().toLowerCase();z.has(p)&&a.push(y("page-group-twice",`${r}.groups.${o}.title`,`${e}'s page has two groups called "${i.title}"; give each its own title`)),z.add(p),i.fields.forEach((w,m)=>f(w,`${r}.groups.${o}.fields.${m}`))}),a}function rn(e,s=[]){return Te({declared:Object.keys(e.fields),paged:[...e.page?.fields??[],...(e.page?.groups??[]).flatMap(r=>r.fields)],must:r=>!!e.fields[r].required&&e.fields[r].default===void 0,naming:s})}var wn=new Set(["subject","now","today","me"]);function Sn(e){if((typeof e=="string"?e:JSON.stringify(e??null)).length>ke)return{findings:[y("too-large","",`a document may be at most ${ke/1024} KB`)]};if(typeof e=="string")try{e=JSON.parse(e)}catch(t){return{findings:[y("not-json","",`this is not JSON: ${t.message}`)]}}try{e=Xe(e).document}catch(t){return{findings:[y("format","formatVersion",t.message)]}}e=He(e);let s=Je.safeParse(e);if(!s.success)return{findings:s.error.issues.map(t=>{let a=t.path.map(String).join(".");if(t.code==="unrecognized_keys")return y("unknown-key",a,`${t.keys.map(d=>`"${d}"`).join(", ")} ${t.keys.length===1?"is":"are"} not part of a Graview document here`,"check the spelling against docs/declaration-document.md");if(t.code==="invalid_union"&&/\.effects\.\d+$/.test(a))return y("effect-shape",a,"this effect is not one Graview knows",'an effect is one of {"create": kind, "as"?: name, "set"?: {field: value}}, {"set": {field: value, \u2026}, "target"?: "$ref"}, {"connect"|"sever": relation, "from": "$ref", "to": "$ref"}, {"remove": "$ref"}');if(t.code==="invalid_key"){let d=t.issues?.[0]?.message;return y("shape",a,`the name "${String(t.path.at(-1))}" is not allowed here${d?`: ${d}`:""}`)}return y("shape",a,t.message)})};let r=s.data;return{document:r,findings:jn(r)}}var ae=e=>[e??[]].flat();function an(e){let s=new Map;for(let[r,t]of Object.entries(e.kinds))for(let[a,d]of Object.entries(ee(t.edges))){let u=s.get(a);s.set(a,{name:a,from:[...u?.from??[],r],to:d.to==="*"||u?.to==="*"?"*":[...new Set([...u?.to??[],...d.to])],cardinality:d.cardinality??"many"})}return s}function Et(e){let s=new Map;for(let[t,a]of Object.entries(e.kinds)){let d=ne(a),u=ce(a.edges);s.set(t,{fields:new Set([...Object.keys(a.fields),...u.keys()]),edges:new Map(Object.entries(ee(a.edges)).map(([f,z])=>[f,z.cardinality??"many"])),...d?{computed:d}:{},...u.size>0?{linked:u}:{}})}let r=ne(e);return r&&s.set(_e,{computed:r}),s}function cn(e,s){let r=[],t=ae(e.on),a=(d,u)=>{let f=Qe(s.kinds,d,t)?.reversed===!0,[z,i]=f?["$to","$subject"]:["$subject","$to"];return u==="connect"?{connect:d,from:z,to:i}:{sever:d,from:z,to:i}};if(e.creates){let d=s.kinds[e.creates],u={};for(let f of Object.keys(d?.fields??{}))u[f]=`$${f}`;for(let f of e.effects??[])"set"in f&&!("create"in f)&&R(f.target)==="new"&&Object.assign(u,f.set);r.push({create:e.creates,as:"new",set:u})}return e.sets&&r.push({set:e.sets}),e.writes&&!(e.creates&&e.on===void 0)&&r.push({set:Object.fromEntries(e.writes.map(d=>[d,`$${d}`]))}),e.connects&&(e.replaces&&r.push({replace:e.replaces===!0?[e.connects]:[...e.replaces],keep:e.connects}),r.push(a(e.connects,"connect"))),e.severs&&r.push(a(e.severs,"sever")),e.setsOther&&(e.connects||e.severs)&&r.push({set:e.setsOther,target:"$to"}),e.removes&&r.push({remove:"$subject"}),e.effects&&r.push(...e.effects.filter(d=>!(e.creates&&"set"in d&&!("create"in d)&&R(d.target)==="new"))),r}function we(e,s,r){try{let t=H(e),a=se(t);for(let d of a.unknownFunctions)r.push(y("unknown-function",s,`"${d}" is not a function the rule language knows`,"see docs/declaration-document.md#expression-language"));return t}catch(t){if(t instanceof ie){r.push(y("expression",s,t.sentence+` (at character ${t.at+1})`));return}throw t}}function Se(e,s,r){try{return J(e)}catch(t){if(t instanceof Be||t instanceof ie){r.push(y("template",s,(t instanceof ie,t.sentence)));return}throw t}}function jn(e){let s=[],r=new Set(Object.keys(e.kinds)),t=an(e),a=e.acts??{},d=new Set(e.roles??[]),u=(i,o)=>ce(e.kinds[i]?.edges).has(o),f=i=>Object.keys(e.kinds).some(o=>u(o,i));for(let[i,o]of Object.entries(e.kinds)){let p=`kinds.${i}`;for(let[m,l]of Object.entries(o.edges??{})){if(!De(l)&&l.to!=="*")for(let c of l.to)r.has(c)||s.push(y("edge-target",`${p}.edges.${m}.to`,`"${c}" is not a kind this document declares`));o.fields[m]&&s.push(y("edge-field-clash",`${p}.edges.${m}`,`"${m}" is both a field and a relation of ${i}`,"rename one of them"))}o.lifecycle&&!o.fields[o.lifecycle.field]&&s.push(y("lifecycle-field",`${p}.lifecycle.field`,`${i} has no field "${o.lifecycle.field}"`));let w=m=>o.computed!==void 0&&Object.hasOwn(o.computed,m);for(let m of o.glance??[])!o.fields[m]&&!w(m)&&s.push(y("glance-field",`${p}.glance`,`a glance at ${i} is to say "${m}", and ${i} has no field or computed field called that`,`use one of: ${[...Object.keys(o.fields),...Object.keys(o.computed??{})].join(", ")}`));s.push(...sn(i,o));for(let m of["label","describe"]){let l=o[m];if(!l)continue;let c=Se(l,`${p}.${m}`,s);for(let j of c??[])if(j.expr){for(let h of se(j.expr).names)if(!o.fields[h]){if(w(h)){Ze(o,h)||s.push(y("template-field",`${p}.${m}`,`${i}'s ${h} is worked out from beyond the record, and a ${m} is said with no graph to read`,`show it in a view instead, or name a computed field worked out from ${i}'s own fields`));continue}s.push(y("template-field",`${p}.${m}`,`${i} has no field "${h}" for its ${m} to show`,m==="label"?"a label can only show the record's own fields and what they work out":void 0))}}}for(let[m,l]of Object.entries(o.fields)){l.default!==void 0&&l.type==="enum"&&!l.options?.includes(String(l.default))&&s.push(y("default-option",`${p}.fields.${m}.default`,`"${String(l.default)}" is not one of ${m}'s options`));let c=`${m}Repeat`;l.repeats&&(o.fields[c]||o.edges?.[c]||o.computed?.[c])&&s.push(y("repeat-clash",`${p}.fields.${m}.repeats`,`${i} already has "${c}", where how ${m} repeats is kept`))}}for(let[i,o]of Object.entries(a)){let p=`acts.${i}`;for(let c of ae(o.on))r.has(c)||s.push(y("act-kind",`${p}.on`,`"${c}" is not a kind this document declares`));let w=ae(o.on),m=cn(o,e);if(o.creates&&o.on===void 0&&o.writes&&r.has(o.creates)){for(let c of o.writes)if(!e.kinds[o.creates].fields[c])if(e.kinds[o.creates].computed?.[c]!==void 0)s.push(y("computed-written",`${p}.writes`,`${o.creates}'s ${c} is worked out, not written: no act can set it`,"write the stored fields it is worked out from"));else{if(u(o.creates,c))continue;s.push(y("act-field",`${p}.writes`,`${o.creates} has no field "${c}"`))}}m.length===0&&s.push(y("act-empty",p,`"${i}" does nothing`,"give it effects or a shorthand such as sets or creates"));let l=new Map;m.forEach((c,j)=>{let h=m.length-(o.effects?.length??0),S=o.effects&&j>=h?`${p}.effects.${j-h}`:p;if("create"in c){if(!r.has(c.create))s.push(y("act-kind",`${S}.create`,`"${c.create}" is not a kind this document declares`));else for(let b of Object.keys(c.set??{}))e.kinds[c.create].fields[b]||(e.kinds[c.create].computed?.[b]!==void 0?s.push(y("computed-written",`${S}.set.${b}`,`${c.create}'s ${b} is worked out, not written: no act can set it`,"set the stored fields it is worked out from")):s.push(y("act-field",`${S}.set.${b}`,`${c.create} has no field "${b}"`)));c.as&&l.set(c.as,c.create)}else if("connect"in c||"sever"in c){let b="connect"in c?c.connect:c.sever;!t.has(b)&&!f(b)&&s.push(y("act-edge",`${S}.${"connect"in c?"connect":"sever"}`,`"${b}" is not a relation any kind declares`)),R(c.from)==="subject"&&w.length===0&&s.push(y("act-subject",`${p}.on`,`"${i}" acts on "$subject" but does not say which kinds it is "on"`))}else if("set"in c){let b=R(c.target??"$subject"),G=b==="subject"?w:l.has(b??"")?[l.get(b)]:[];b==="subject"&&w.length===0&&s.push(y("act-subject",`${p}.on`,`"${i}" changes "$subject" but does not say which kinds it is "on"`));for(let F of Object.keys(c.set))for(let g of G)if(!(!r.has(g)||e.kinds[g].fields[F]))if(e.kinds[g].computed?.[F]!==void 0)s.push(y("computed-written",`${S}.set.${F}`,`${g}'s ${F} is worked out, not written: no act can set it`,"set the stored fields it is worked out from"));else{if(u(g,F))continue;s.push(y("act-field",`${S}.set.${F}`,`${g} has no field "${F}"`))}}else"remove"in c&&R(c.remove)==="subject"&&w.length===0&&s.push(y("act-subject",`${p}.on`,`"${i}" removes "$subject" but does not say which kinds it is "on"`));("set"in c&&c.set?Object.values(c.set):[]).forEach(b=>{b&&typeof b=="object"&&!Array.isArray(b)&&"expr"in b&&we(b.expr,`${S}.set`,s)})}),o.allowedWhen&&we(o.allowedWhen,`${p}.allowedWhen`,s),o.refusal&&Se(o.refusal,`${p}.refusal`,s)}for(let[i,o]of Object.entries(e.rules??{})){let p=`rules.${i}`;o.over!=="graph"&&!r.has(o.over)&&s.push(y("rule-kind",`${p}.over`,`"${o.over}" is not a kind this document declares`));let w=o.over==="graph"?void 0:e.kinds[o.over];for(let m of["when","require"]){let l=o[m];if(!l)continue;let c=we(l,`${p}.${m}`,s);if(!c)continue;let j=se(c);for(let h of j.names)if(o.over==="graph")s.push(y("rule-name",`${p}.${m}`,`"${h}" means nothing in a rule over the whole graph`,`name a kind in "over", or use all('kind')`));else if(w&&!w.fields[h]&&!w.edges?.[h]&&w.computed?.[h]===void 0){let S=Object.keys(w.edges??{}).find(A=>A.includes("-")&&A.split("-").includes(h));s.push(y("rule-name",`${p}.${m}`,`${o.over} has no field or relation called "${h}"`,S?`"${S}" reads as a subtraction in a rule; rename the relation to one camelCase word, like "${S.replace(/-([a-z0-9])/g,(A,b)=>b.toUpperCase())}"`:void 0))}for(let h of j.edges)!t.has(h)&&!f(h)&&s.push(y("rule-edge",`${p}.${m}`,`"${h}" is not a relation any kind declares`));for(let h of j.sweeps)r.has(h)?o.over!=="graph"&&s.push(Ne("rule-cost",`${p}.${m}`,`this rule looks at every ${h} for every ${o.over}, which grows slowly as the app grows`,"walk a relation with out()/in() instead of all() where you can")):s.push(y("rule-kind",`${p}.${m}`,`"${h}" is not a kind this document declares`))}o.says&&Se(o.says,`${p}.says`,s),(o.repairs??[]).forEach((m,l)=>{!a[m.act]&&!de(m.act)&&!me(m.act,e.kinds)&&s.push(y("repair-act",`${p}.repairs.${l}.act`,`"${m.act}" is not an act this document declares`,ge(m.act,e)))})}let z=e.policy;return z&&(z.grants.forEach((i,o)=>{if(i.roles!=="*"&&d.size>0)for(let p of i.roles)d.has(p)||s.push(y("grant-role",`policy.grants.${o}.roles`,`"${p}" is not one of the document's roles`));if(i.mutations!=="*")for(let p of i.mutations)!a[p]&&!de(p)&&!me(p,e.kinds)&&s.push(y("grant-act",`policy.grants.${o}.mutations`,`"${p}" is not an act this document declares`,ge(p,e)))}),(z.sees??[]).forEach((i,o)=>{for(let p of i.kinds)r.has(p)||s.push(y("sight-kind",`policy.sees.${o}.kinds`,`"${p}" is not a kind this document declares`));if(i.roles!=="*"&&d.size>0)for(let p of i.roles)d.has(p)||s.push(y("sight-role",`policy.sees.${o}.roles`,`"${p}" is not one of the document's roles`))})),s.push(...We(e)),s}function On(e){return e.label?[...e.label.matchAll(/\{\s*([A-Za-z_][A-Za-z0-9_]*)/g)].map(s=>s[1]):[fe(e)??[]].flat()}function vn(e,s,r,t){let a=new Map,d=ae(e.on),u=new Map,f=new Map;(d.length>0||s.some(l=>"remove"in l&&R(l.remove)==="subject"||"from"in l&&(R(l.from)==="subject"||R(l.to)==="subject")||"set"in l&&!("create"in l)&&R(l.target??"$subject")==="subject"))&&a.set(pe,{ref:d.length>0?d:"*",required:!0});let i=e.args??{},o=e.writes?.length===1,p=(l,c)=>c&&l.type===c.type&&l.min===void 0&&l.max===void 0&&l.step===void 0?{...l,...c.min===void 0?{}:{min:c.min},...c.max===void 0?{}:{max:c.max},...c.step===void 0?{}:{step:c.step}}:l,w=(l,c)=>c&&l.type===c.type&&l.format===void 0&&l.unit===void 0?{...p(l,c),...c.format?{format:c.format}:{},...c.unit?{unit:c.unit}:{}}:p(l,c),m=(l,c,j)=>{if(l===pe||wn.has(l)||u.has(l)||a.has(l))return;let h=i[l]?w(i[l],j):void 0;a.set(l,h?{field:h,optional:!h.required,required:!!h.required}:c())};for(let l of s)if("create"in l){let c=r.kinds[l.create],j=c?rn(c,On(c)):[],h=S=>j.includes(S)?j.indexOf(S):j.length;for(let[S,A]of Object.entries(l.set??{}).sort(([b],[G])=>h(b)-h(G))){let b=R(A),G=c?.fields[S];if(b&&G){let F=!!G.required&&G.default===void 0;m(b,()=>({field:G,optional:!F,required:F}),G)}}l.as&&u.set(l.as,l.create)}else if("connect"in l||"sever"in l){let c=t.get("connect"in l?l.connect:l.sever);for(let[j,h]of[["from",l.from],["to",l.to]]){let S=R(h);if(!S)continue;let A=j==="to"?c?.to??"*":c?.from??"*";A!=="*"&&!f.has(S)&&f.set(S,A),m(S,()=>({ref:A,required:!0}))}}else if("set"in l){let c=R(l.target??"$subject"),j=c==="subject"?d[0]:u.get(c??"")??f.get(c??"")?.[0];c&&c!=="subject"&&!u.has(c)&&m(c,()=>({ref:"*",required:!0}));for(let[h,S]of Object.entries(l.set)){let A=R(S);if(!A)continue;let b=j?r.kinds[j]?.fields[h]:void 0;m(A,()=>b?{field:b,optional:!o,required:o}:{any:!0,required:!1},b)}}else if("remove"in l){let c=R(l.remove);c&&m(c,()=>({ref:"*",required:!0}))}for(let[l,c]of Object.entries(i))a.has(l)||a.set(l,{field:c,optional:!c.required,required:!!c.required});return a}function At(e,s={}){let r=Sn(e);if(!r.document||le(r.findings))return{ok:!1,findings:r.findings};let t=r.document,a=[...r.findings];s.previous&&a.push(...En(t,s.previous));let d=xn(t,a);return le(d.findings)?{ok:!1,findings:d.findings}:Ve(d,s)}function re(e,s){return e.map(r=>{let t=!r.format&&r.expr?.t==="ident"?s?.[r.expr.name]?.format:void 0;return t==="money"||t==="percent"?{...r,format:t}:r})}function xn(e,s){let r=an(e),t={};for(let[i,o]of Object.entries(e.kinds)){let p=fe(o),w=o.label??(p?`{${p}}`:void 0),m=ne(o),l=m?on(e,i,[...m]):[];t[i]={...w?{label:re(J(w),o.fields)}:{},...o.describe?{describe:re(J(o.describe),o.fields)}:{},...m?{computed:[...m]}:{},...l.length>0?{durations:l}:{}}}let a={};for(let[i,o]of Object.entries(e.acts??{})){let p=cn(o,e),w=vn(o,p,e,r),m=o.destructive??p.some(g=>"remove"in g||"sever"in g||"replace"in g),l=[...new Set(p.flatMap(g=>"create"in g?[g.create]:[]))],c=[...new Set(p.flatMap(g=>"connect"in g?[g.connect]:[]))],j=[...new Set(p.flatMap(g=>"sever"in g?[g.sever]:"replace"in g?g.replace:[]))],h=[...new Set(p.flatMap(g=>"set"in g&&!("create"in g)&&R(g.target??"$subject")==="subject"?Object.keys(g.set):[]))],S=new Map;for(let g of p){if(!("connect"in g)&&!("sever"in g))continue;let v=r.get("connect"in g?g.connect:g.sever);for(let[D,oe]of[["from",g.from],["to",g.to]]){let B=R(oe),Y=D==="to"?v?.to:v?.from;B&&B!=="subject"&&Y&&Y!=="*"&&S.set(B,[...new Set([...S.get(B)??[],...Y])])}}let A={};for(let g of p){if(!("set"in g)||"create"in g)continue;let v=R(g.target??"$subject");for(let D of v&&v!=="subject"&&S.get(v)||[])A[D]=[...new Set([...A[D]??[],...Object.keys(g.set)])]}let b={};for(let g of p)if(!(!("set"in g)||"create"in g||R(g.target??"$subject")!=="subject"))for(let[v,D]of Object.entries(g.set??{}))typeof D=="string"&&R(D)===void 0||typeof D=="number"||typeof D=="boolean"?b[v]=typeof D=="string"&&D.startsWith("$$")?D.slice(1):D:delete b[v];let G=l.length===0&&p.every(g=>!("set"in g)||!g.set||Object.values(g.set).every(v=>!(v&&typeof v=="object"&&!Array.isArray(v)&&"expr"in v))),F=new Map;for(let g of p)if(!(!("set"in g)||!g.set))for(let v of Object.values(g.set))v&&typeof v=="object"&&!Array.isArray(v)&&"expr"in v&&F.set(v.expr,H(v.expr));a[i]={title:o.title??i.replace(/-/g," "),effects:p,args:[...w],...o.allowedWhen?{guard:H(o.allowedWhen)}:{},...o.refusal?{refusal:re(J(o.refusal),e.kinds[[o.on??[]].flat()[0]??""]?.fields)}:{},exprs:[...F],destructive:m,idempotent:G,creates:l,connects:c,severs:j,writes:h,writesOther:A,sets:b}}let d={};for(let[i,o]of Object.entries(e.rules??{}))d[i]={title:o.title??i.replace(/-/g," "),require:H(o.require),...o.when?{when:H(o.when)}:{},...o.says?{says:re(J(o.says),e.kinds[o.over]?.fields)}:{}};let u=qe(e,s),f=Le(e),z=Ue(e);return{format:Ie,document:e,findings:s,kinds:t,...e.computed?{facts:[...ne(e)??[]]}:{},edges:[...r].map(([i,{from:o,to:p,cardinality:w}])=>[i,{from:o,to:p,cardinality:w}]),acts:a,rules:d,brand:u,...Object.keys(f).length>0?{viewSpecs:f}:{},...z?{home:z}:{}}}function Rt(e,s,r){let t=/^defineNode\("([^"]+)"\)/.exec(s)?.[1],a=t?r.kinds[t]:void 0;if(!t||!a)return e;let d=Object.keys(a.fields).filter(u=>u!=="label").slice(0,3);return{...e,path:`kinds.${t}.glance`,fix:`Say which: "glance": [${d.map(u=>`"${u}"`).join(", ")}] on kinds.${t} \u2014 the facts a person compares one by, at a glance.`}}function En(e,s){let r=[],t=new Set(Object.values(s.kinds).flatMap(a=>Object.keys(a.edges??{})));for(let[a,d]of Object.entries(e.kinds)){let u=d.renamedFrom;u&&!s.kinds[u]&&r.push(y("renamed-from-nothing",`kinds.${a}.renamedFrom`,`${a} says it was ${u}, and the previous version has no kind called ${u}`,"name the kind it was, or drop renamedFrom"));let f=s.kinds[u??a];for(let[z,i]of Object.entries(d.fields)){let o=i.renamedFrom;o&&!f?.fields[o]&&r.push(y("renamed-from-nothing",`kinds.${a}.fields.${z}.renamedFrom`,`${z} says it was ${o}, and the previous ${u??a} has no field called ${o}`,"name the field it was, or drop renamedFrom"))}for(let[z,i]of Object.entries(d.edges??{})){let o=i.renamedFrom;o&&!t.has(o)&&r.push(y("renamed-from-nothing",`kinds.${a}.edges.${z}.renamedFrom`,`${z} says it was ${o}, and the previous version has no relation called ${o}`,"name the relation it was, or drop renamedFrom"))}}return r}export{Sn as a,Et as b,cn as c,At as d,Rt as e};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b,c,d,e,f}from"./chunk.ZJXUWOG3.js";import"./chunk.TI4OSTQV.js";import"./chunk.SLBWPVIY.js";import"./chunk.AJZBJBMO.js";export{e as askArchived,b as askDeclaration,a as declarationAt,f as pastAt,d as pastOf,c as seqAt};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{k as a,l as o}from"./chunk.GZWC72HS.js";import"./chunk.ASCTAUFD.js";import"./chunk.CWPRQSED.js";import"./chunk.EZXGVTT2.js";import"./chunk.2LQ37DC2.js";import"./chunk.UXNZPPWR.js";import"./chunk.GYO57LKD.js";import"./chunk.R3DWF35R.js";import"./chunk.XBNASVTY.js";import"./chunk.6S3B4XC4.js";import"./chunk.52Y37IAD.js";import"./chunk.TLQTDKOL.js";import"./chunk.WVUJXDXZ.js";import"./chunk.VTCPA4V4.js";import"./chunk.FGJM4LJO.js";import"./chunk.K7WME4P4.js";import"./chunk.MDIAWTNK.js";import"./chunk.PEA4D66Y.js";import"./chunk.TRPPN2GD.js";import"./chunk.GZHZLJBF.js";import"./chunk.TTFYXKLI.js";import"./chunk.OJGHDWI6.js";import"./chunk.ICYJ7QJG.js";import"./chunk.MT45H2T5.js";import"./chunk.S2ATSY6P.js";import"./chunk.72Q4R7N6.js";import"./chunk.G6DISMVT.js";import"./chunk.W54NXXC5.js";import{ta as n}from"./chunk.B3T4N2XM.js";import"./chunk.SDO3U72B.js";import"./chunk.6W2DUW5S.js";import"./chunk.SLBWPVIY.js";import"./chunk.AJZBJBMO.js";var w=new WeakMap;function s(e,i){let t=w.get(e);t||w.set(e,t=new Map);let r=t.get(i);return r||t.set(i,r=a(o(e,n(e)),e,i)),r}export{s as frameworkViews};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function t(n){if(Array.isArray(n))return n.map(t);if(n&&typeof n=="object"){let r={};for(let o of Object.keys(n).sort()){let e=n[o];e!==void 0&&(r[o]=t(e))}return r}return n}function i(n){return JSON.stringify(t(n))??"undefined"}export{i as a};
|