graview 0.1.58 → 0.1.60
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/README.md +4 -2
- package/dist/preview/chunk.2K4TT2BV.js +1 -0
- package/dist/preview/{chunk.OHQ3JH65.js → chunk.2USDHXB4.js} +1 -1
- package/dist/preview/{chunk.F7SF6EP2.js → chunk.37TVS7CA.js} +1 -1
- package/dist/preview/chunk.3IZ3ABII.js +1 -0
- package/dist/preview/{chunk.NKC3JILT.js → chunk.3MOJF7BA.js} +1 -1
- package/dist/preview/{chunk.IDJPBWL2.js → chunk.3UOKUF5Z.js} +1 -1
- package/dist/preview/{chunk.2VYNNWW5.js → chunk.3V4WP7RY.js} +3 -3
- package/dist/preview/{chunk.WNSC3RWD.js → chunk.3XGA65Y3.js} +1 -1
- package/dist/preview/{chunk.D5KTGX7F.js → chunk.3ZT5WQYL.js} +1 -1
- package/dist/preview/{chunk.IULQRCEE.js → chunk.4LR64TPU.js} +1 -1
- package/dist/preview/chunk.4MP72LPR.js +25 -0
- package/dist/preview/{chunk.GQBJVCSM.js → chunk.4TCKEG6I.js} +1 -1
- package/dist/preview/chunk.5DD62IOW.js +21 -0
- package/dist/preview/{chunk.KJ264E6K.js → chunk.5YOLUDVO.js} +1 -1
- package/dist/preview/{chunk.EB4NVTJL.js → chunk.67U6M7OV.js} +1 -1
- package/dist/preview/{chunk.XU34T2H4.js → chunk.6C2MHWSX.js} +1 -1
- package/dist/preview/{chunk.ILRCNTGT.js → chunk.6HF6POIX.js} +1 -1
- package/dist/preview/{chunk.U6O3MMQR.js → chunk.6WHAWOO7.js} +1 -1
- package/dist/preview/{chunk.GKSUTAIX.js → chunk.6ZQAR5ZA.js} +1 -1
- package/dist/preview/{chunk.EPPXZZPK.js → chunk.7MHCGVGM.js} +1 -1
- package/dist/preview/{chunk.MQ5HBUBL.js → chunk.7N32AVIJ.js} +1 -1
- package/dist/preview/{chunk.7V23SXGJ.js → chunk.7OPM55I2.js} +1 -1
- package/dist/preview/chunk.7TFLRR7D.js +1 -0
- package/dist/preview/{chunk.LDAYDCUO.js → chunk.7VKSXGTX.js} +1 -1
- package/dist/preview/{chunk.KJHPDL4N.js → chunk.A3ZXDG6V.js} +1 -1
- package/dist/preview/{chunk.27CW6SCT.js → chunk.A5PDXNY6.js} +1 -1
- package/dist/preview/chunk.AVBTPSQF.js +1 -0
- package/dist/preview/{chunk.YZZONE4M.js → chunk.BF6S5UE4.js} +1 -1
- package/dist/preview/chunk.BLPYNNR4.js +1 -0
- package/dist/preview/{chunk.LRUNFSHP.js → chunk.BQIHNT7C.js} +1 -1
- package/dist/preview/{chunk.O4CVKTPJ.js → chunk.BRT27WON.js} +1 -1
- package/dist/preview/{chunk.HMFJT4KO.js → chunk.BXDM3UMN.js} +1 -1
- package/dist/preview/chunk.BYKD5RLA.js +1 -0
- package/dist/preview/chunk.C7OLSEWK.js +1 -0
- package/dist/preview/{chunk.3OYGXYQY.js → chunk.CC5BJH5A.js} +1 -1
- package/dist/preview/{chunk.GCBZ3WE2.js → chunk.CFKZXLXS.js} +1 -1
- package/dist/preview/chunk.CMN6BBAD.js +1 -0
- package/dist/preview/{chunk.YP2F5UGY.js → chunk.CQT3W2SF.js} +1 -1
- package/dist/preview/chunk.D7YSL3NK.js +2 -0
- package/dist/preview/chunk.DCHQHKSA.js +1 -0
- package/dist/preview/{chunk.H3BFHI3G.js → chunk.EL5ICOOM.js} +1 -1
- package/dist/preview/{chunk.PZG3B7F4.js → chunk.ENL2JJ47.js} +1 -1
- package/dist/preview/chunk.EQXB7LKI.js +1 -0
- package/dist/preview/{chunk.ELAMMS2V.js → chunk.ERFT54HT.js} +1 -1
- package/dist/preview/{chunk.XN2RVXOI.js → chunk.F6V7RWDK.js} +1 -1
- package/dist/preview/{chunk.64R3K2OE.js → chunk.FBJARKDT.js} +1 -1
- package/dist/preview/{chunk.SDLUWRGI.js → chunk.FC6AF6CC.js} +1 -1
- package/dist/preview/{chunk.GZB6A6KF.js → chunk.FFTYMBBT.js} +1 -1
- package/dist/preview/chunk.FLUK3UXF.js +1 -0
- package/dist/preview/{chunk.KFQSYCY3.js → chunk.FRYBMS3W.js} +1 -1
- package/dist/preview/chunk.G3R4BTI7.js +1 -0
- package/dist/preview/chunk.G4YJPKRG.js +5 -0
- package/dist/preview/{chunk.BB33TI4S.js → chunk.GLWSVSQL.js} +1 -1
- package/dist/preview/{chunk.SDVPJYVF.js → chunk.GNBIVVL3.js} +1 -1
- package/dist/preview/{chunk.ZN5HTWSI.js → chunk.GTKJJYQH.js} +1 -1
- package/dist/preview/{chunk.TUUVVO5U.js → chunk.H45Q3O4F.js} +1 -1
- package/dist/preview/{chunk.M34CS7DI.js → chunk.HDP3PS7N.js} +1 -1
- package/dist/preview/{chunk.CCWPF5PK.js → chunk.HDUO2USQ.js} +1 -1
- package/dist/preview/{chunk.PBCNOFQH.js → chunk.HUJ6YTWE.js} +1 -1
- package/dist/preview/{chunk.JB7TTJXQ.js → chunk.I4XQBQRC.js} +1 -1
- package/dist/preview/chunk.IBOKXVWN.js +1 -0
- package/dist/preview/{chunk.4HSH2UIK.js → chunk.IGJZ4UH3.js} +2 -2
- package/dist/preview/{chunk.WNQFHMNR.js → chunk.IGVASEZU.js} +1 -1
- package/dist/preview/{chunk.7SQAKSJD.js → chunk.IHBUBZQT.js} +1 -1
- package/dist/preview/chunk.IOK4GVJC.js +1 -0
- package/dist/preview/{chunk.I3WWCPQ2.js → chunk.JEYQBH33.js} +1 -1
- package/dist/preview/{chunk.S2H7B6RG.js → chunk.JJGCTGWA.js} +1 -1
- package/dist/preview/{chunk.E5MSFXL6.js → chunk.JPONLMU7.js} +1 -1
- package/dist/preview/{chunk.QPXXY2DL.js → chunk.KBVTLNS5.js} +3 -3
- package/dist/preview/{chunk.HS3GHAUR.js → chunk.KDRLUBVF.js} +1 -1
- package/dist/preview/{chunk.YIA2EDVF.js → chunk.KGW75Z5L.js} +1 -1
- package/dist/preview/{chunk.KWJWAIQJ.js → chunk.KI37ZEV3.js} +1 -1
- package/dist/preview/chunk.L6AWE76F.js +1 -0
- package/dist/preview/{chunk.LY3YOWKV.js → chunk.LGEA5257.js} +1 -1
- package/dist/preview/{chunk.TF5I4VHX.js → chunk.LLYRFVIN.js} +1 -1
- package/dist/preview/{chunk.WQOI6BLM.js → chunk.LQVAABPS.js} +1 -1
- package/dist/preview/{chunk.POBMGM3X.js → chunk.LSY256J4.js} +1 -1
- package/dist/preview/{chunk.HEWVPXRE.js → chunk.LZIBQ3VX.js} +1 -1
- package/dist/preview/{chunk.7MSFDD7J.js → chunk.M4UD4ARP.js} +1 -1
- package/dist/preview/chunk.MDJWK5W2.js +1 -0
- package/dist/preview/{chunk.4AFFPYOK.js → chunk.MJVYWLQQ.js} +1 -1
- package/dist/preview/{chunk.3YZHZGTM.js → chunk.MSWWWLEA.js} +1 -1
- package/dist/preview/{chunk.BTVBZ6KE.js → chunk.MVWC3VR3.js} +2 -2
- package/dist/preview/{chunk.B2GVJD6H.js → chunk.NC7FXY2H.js} +1 -1
- package/dist/preview/{chunk.LCPGZK7G.js → chunk.NGTRL5U4.js} +1 -1
- package/dist/preview/{chunk.NOFWGDOT.js → chunk.NHUQ2N6J.js} +1 -1
- package/dist/preview/{chunk.LL2MLSPH.js → chunk.OLFJH4RK.js} +1 -1
- package/dist/preview/{chunk.WXIEQZLY.js → chunk.P6RORYOT.js} +1 -1
- package/dist/preview/{chunk.SPXRLO5K.js → chunk.PFSYXD6Q.js} +1 -1
- package/dist/preview/chunk.PHJ6WPWH.js +1 -0
- package/dist/preview/{chunk.QGV7H7RQ.js → chunk.PI44XMY2.js} +1 -1
- package/dist/preview/{chunk.ZOHMWSHD.js → chunk.PNW5K7BW.js} +1 -1
- package/dist/preview/chunk.Q355UPFG.js +1 -0
- package/dist/preview/{chunk.GEB2DFBU.js → chunk.QBLKTFF4.js} +1 -1
- package/dist/preview/{chunk.HXRV3WVJ.js → chunk.QDSEVPF3.js} +1 -1
- package/dist/preview/chunk.QFUMFQJU.js +1 -0
- package/dist/preview/{chunk.B3WZHPM3.js → chunk.QHDCTAD7.js} +1 -1
- package/dist/preview/{chunk.UAP5M3CD.js → chunk.QI4SLPQ4.js} +2 -2
- package/dist/preview/{chunk.HZB5F476.js → chunk.RQOX5YDW.js} +1 -1
- package/dist/preview/{chunk.TBW7CU4G.js → chunk.RXYNW5QB.js} +1 -1
- package/dist/preview/{chunk.RE7DELSR.js → chunk.SB2PZKN5.js} +1 -1
- package/dist/preview/{chunk.INZQ6WZM.js → chunk.SRVQJZRT.js} +1 -1
- package/dist/preview/{chunk.TJ647W6J.js → chunk.T7LQD67N.js} +2 -2
- package/dist/preview/chunk.TAT2IQUR.js +1 -0
- package/dist/preview/chunk.TFWIG6LL.js +6 -0
- package/dist/preview/{chunk.GP7F3PEF.js → chunk.TKVLNBRD.js} +1 -1
- package/dist/preview/{chunk.YHTE34RN.js → chunk.TLJOZSDD.js} +1 -1
- package/dist/preview/{chunk.6W7O5YLL.js → chunk.TLWT67ON.js} +1 -1
- package/dist/preview/{chunk.KKNDX4JT.js → chunk.TY4GQJKC.js} +1 -1
- package/dist/preview/{chunk.EQTSV7BK.js → chunk.UITT6JWW.js} +1 -1
- package/dist/preview/{chunk.LO3U3P55.js → chunk.UJTE7UAP.js} +1 -1
- package/dist/preview/{chunk.DBZHRYBK.js → chunk.ULL6ZIJJ.js} +1 -1
- package/dist/preview/{chunk.VUPLFUUS.js → chunk.UQWTZJBV.js} +1 -1
- package/dist/preview/{chunk.NFX24NUI.js → chunk.URWAFZHF.js} +1 -1
- package/dist/preview/{chunk.A6C4AGJJ.js → chunk.VADQ7ZGA.js} +1 -1
- package/dist/preview/chunk.VDMDPZ6U.js +1 -0
- package/dist/preview/{chunk.2EDC63RI.js → chunk.VFOON3Z3.js} +1 -1
- package/dist/preview/{chunk.4444RPWW.js → chunk.VMV464JK.js} +1 -1
- package/dist/preview/{chunk.4KC35UNR.js → chunk.VNDKKTED.js} +4 -2
- package/dist/preview/chunk.VSCIXAHN.js +5 -0
- package/dist/preview/{chunk.34TW32TB.js → chunk.VUBNBTJP.js} +2 -2
- package/dist/preview/{chunk.JUNMJYH5.js → chunk.VWJGQDCE.js} +1 -1
- package/dist/preview/{chunk.KXPRILAO.js → chunk.VZJWJ5XM.js} +1 -1
- package/dist/preview/{chunk.5ICIMQE6.js → chunk.W3W54DSX.js} +1 -1
- package/dist/preview/{chunk.YD3TKV6P.js → chunk.WC3DENU4.js} +2 -2
- package/dist/preview/chunk.WQ6RCEUQ.js +1 -0
- package/dist/preview/{chunk.YS6GVLIP.js → chunk.WXUFATY5.js} +1 -1
- package/dist/preview/chunk.X6A4VSSD.js +1 -0
- package/dist/preview/{chunk.VHSWBFXB.js → chunk.XGASJAV2.js} +1 -1
- package/dist/preview/{chunk.RRKYJYZJ.js → chunk.XR6YR6RV.js} +1 -1
- package/dist/preview/chunk.XZPKBHJT.js +1 -0
- package/dist/preview/{chunk.GDOTG7YA.js → chunk.Y5C4RXG7.js} +1 -1
- package/dist/preview/{chunk.JES77WXG.js → chunk.Y7G3OGDE.js} +1 -1
- package/dist/preview/{chunk.E34OQVSR.js → chunk.YEBGI6ED.js} +1 -1
- package/dist/preview/{chunk.TWKXSLYY.js → chunk.YFSBVZTG.js} +1 -1
- package/dist/preview/chunk.YFVJUHAK.js +1 -0
- package/dist/preview/chunk.YH63KQ2G.js +1 -0
- package/dist/preview/{chunk.LMN4TSAP.js → chunk.YZ7FUKAL.js} +1 -1
- package/dist/preview/{chunk.JGKA5QBX.js → chunk.Z2ERZ4S6.js} +1 -1
- package/dist/preview/{chunk.VG7OWV2H.js → chunk.ZP5RT2EK.js} +1 -1
- package/dist/preview/{chunk.ETBFD76E.js → chunk.ZXOT3IXJ.js} +1 -1
- package/dist/preview/{chunk.TJOXNEFU.js → chunk.ZYM2SSGW.js} +1 -1
- package/dist/preview/index.html +51 -51
- package/dist/preview/page.js +2 -2
- package/package.json +6 -6
- package/dist/preview/chunk.32FMOHZK.js +0 -1
- package/dist/preview/chunk.3FCOFEGW.js +0 -1
- package/dist/preview/chunk.43OKZU73.js +0 -1
- package/dist/preview/chunk.47JQPYXL.js +0 -2
- package/dist/preview/chunk.4GGPPCMM.js +0 -1
- package/dist/preview/chunk.4Y2JTY6Q.js +0 -1
- package/dist/preview/chunk.6K7EN2YI.js +0 -1
- package/dist/preview/chunk.6VC6AGYV.js +0 -5
- package/dist/preview/chunk.7BBGRTXM.js +0 -5
- package/dist/preview/chunk.7ECBGIUK.js +0 -1
- package/dist/preview/chunk.ACYDJQRC.js +0 -1
- package/dist/preview/chunk.ARWBIBSI.js +0 -6
- package/dist/preview/chunk.BKVBX2YB.js +0 -1
- package/dist/preview/chunk.DM767F2Q.js +0 -21
- package/dist/preview/chunk.ELERUERU.js +0 -1
- package/dist/preview/chunk.GUEHKCWN.js +0 -1
- package/dist/preview/chunk.HT2BEOEV.js +0 -25
- package/dist/preview/chunk.JOAN54PN.js +0 -1
- package/dist/preview/chunk.L7V24JPO.js +0 -1
- package/dist/preview/chunk.LA4CPZ2N.js +0 -1
- package/dist/preview/chunk.MV3AJ7JH.js +0 -1
- package/dist/preview/chunk.MYNQWWCL.js +0 -1
- package/dist/preview/chunk.OASYYMG5.js +0 -1
- package/dist/preview/chunk.PM3SYXKB.js +0 -1
- package/dist/preview/chunk.QB25SMP6.js +0 -1
- package/dist/preview/chunk.R7LFO7KI.js +0 -1
- package/dist/preview/chunk.S5MGE2U5.js +0 -1
- package/dist/preview/chunk.TXGNPW76.js +0 -1
- package/dist/preview/chunk.UGFDSE37.js +0 -1
- package/dist/preview/chunk.UKMVJV6Q.js +0 -1
- package/dist/preview/chunk.UUG3BYVN.js +0 -1
- package/dist/preview/chunk.WJFQIE3Y.js +0 -1
|
@@ -1,3 +1,3 @@
|
|
|
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{Ba as u,G as f,T as m}from"./chunk.
|
|
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{Ba as u,G as f,T as m}from"./chunk.4MP72LPR.js";import{b as d}from"./chunk.AJZBJBMO.js";var g=d(f(),1),n=d(m(),1),c=/^\s*(\d{1,6})[.)]\s+(.*)$/s,S=/^\s*[-*•]\s+(.*)$/s;function h(o){let s=[];for(let p of o.replace(/\r\n?/g,`
|
|
2
2
|
`).split(/\n[ \t]*\n+/)){let t=null,a=()=>{t&&(t.t==="p"?t.lines.length>0:t.items.length>0)&&s.push(t),t=null};for(let e of p.split(`
|
|
3
|
-
`)){let i=c.exec(e),l=i?null:S.exec(e);if(i)t?.t!=="ol"&&(a(),t={t:"ol",start:Number(i[1]),items:[]}),t.items.push(i[2]);else if(l)t?.t!=="ul"&&(a(),t={t:"ul",items:[]}),t.items.push(l[1]);else if(t&&t.t!=="p"&&/^\s+\S/.test(e)){let r=t.items;r[r.length-1]=`${r[r.length-1]} ${e.trim()}`}else e.trim().length>0&&(t?.t!=="p"&&(a(),t={t:"p",lines:[]}),t.lines.push(e.trim()))}a()}return s}function P(o){return/[\r\n]/.test(o)}var k={display:"grid",gap:"0.7em",minWidth:0,overflowWrap:"anywhere"},x={margin:0},y={margin:0,paddingInlineStart:"1.6em",display:"grid",gap:"0.3em"},B=u(()=>(__graviewPreload(import.meta.url,["./chunk.
|
|
3
|
+
`)){let i=c.exec(e),l=i?null:S.exec(e);if(i)t?.t!=="ol"&&(a(),t={t:"ol",start:Number(i[1]),items:[]}),t.items.push(i[2]);else if(l)t?.t!=="ul"&&(a(),t={t:"ul",items:[]}),t.items.push(l[1]);else if(t&&t.t!=="p"&&/^\s+\S/.test(e)){let r=t.items;r[r.length-1]=`${r[r.length-1]} ${e.trim()}`}else e.trim().length>0&&(t?.t!=="p"&&(a(),t={t:"p",lines:[]}),t.lines.push(e.trim()))}a()}return s}function P(o){return/[\r\n]/.test(o)}var k={display:"grid",gap:"0.7em",minWidth:0,overflowWrap:"anywhere"},x={margin:0},y={margin:0,paddingInlineStart:"1.6em",display:"grid",gap:"0.3em"},B=u(()=>(__graviewPreload(import.meta.url,["./chunk.WC3DENU4.js","./chunk.VNDKKTED.js","./chunk.4MP72LPR.js","./chunk.SDO3U72B.js","./chunk.VSCIXAHN.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.GTKJJYQH.js")));function b({text:o,className:s,style:p,markdown:t,headingsFrom:a}){return t?(0,n.jsx)(g.Suspense,{fallback:(0,n.jsx)(b,{text:o,...s?{className:s}:{},...p?{style:p}:{}}),children:(0,n.jsx)(B,{text:o,...s?{className:s}:{},...p?{style:p}:{},...a?{headingsFrom:a}:{}})}):(0,n.jsx)("div",{"data-graview-text-body":"",...s?{className:s}:{},style:{...k,...p},children:h(o).map((e,i)=>e.t==="p"?(0,n.jsx)("p",{style:x,children:e.lines.map((l,r)=>(0,n.jsxs)("span",{children:[r>0?(0,n.jsx)("br",{}):null,l]},r))},i):e.t==="ol"?(0,n.jsx)("ol",{start:e.start,style:y,children:e.items.map((l,r)=>(0,n.jsx)("li",{children:l},r))},i):(0,n.jsx)("ul",{style:y,children:e.items.map((l,r)=>(0,n.jsx)("li",{children:l},r))},i))})}export{P as a,b};
|
|
@@ -1 +1 @@
|
|
|
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{F as g,G as T,Ga as C,T as v,ca as S}from"./chunk.
|
|
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{F as g,G as T,Ga as C,T as v,ca as S}from"./chunk.4MP72LPR.js";import{a as m}from"./chunk.SDO3U72B.js";import"./chunk.VSCIXAHN.js";import"./chunk.FQLNBIQ5.js";import{b as c}from"./chunk.AJZBJBMO.js";var n=c(T(),1),r=c(v(),1),s=null,u=null,f=new Set,a=()=>{for(let e of f)e()},y=e=>(f.add(e),()=>void f.delete(e)),E=300,d=()=>{u!==null&&clearTimeout(u),u=null};function q(e,t){d(),x.prefetch(),!(s?.element===t&&s.target.on===e.on)&&(s={target:e,element:t},a())}function M(e=!1){if(d(),s!==null){if(e){s=null,a();return}u=setTimeout(()=>{u=null,s=null,a()},E)}}var R=()=>d(),P=()=>s,b="graview:hover-chips",h;function A(e){if(h!==void 0)return h;try{return(e??localStorage).getItem(b)!=="off"}catch{return!0}}function I(e,t){h=e;try{(t??localStorage).setItem(b,e?"on":"off")}catch{}e||(s=null),a()}function w(){let e=S(),t=g(e?.ai),o=e?.memory,l=(0,n.useSyncExternalStore)(y,()=>A(o),()=>!1),i=(0,n.useCallback)(H=>I(H,o),[o]);return{offered:t,on:t&&l,set:i}}function z({legend:e,style:t,choice:o}){let l=w();return l.offered?(0,r.jsxs)("fieldset",{"data-testid":"setting-hover-chips",style:{border:0,margin:0,padding:0,display:"grid",gap:5,...t},children:[(0,r.jsx)("legend",{style:{...e,padding:0},children:"AI suggestions on hover"}),(0,r.jsx)("span",{style:{fontSize:"0.8125rem",color:"var(--graview-ink-muted)"},children:"A quiet suggestion beside a record the pointer rests on, when the AI is sure of one."}),(0,r.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:[!0,!1].map(i=>(0,r.jsx)("button",{type:"button","aria-pressed":l.on===i,"data-testid":`setting-hover-chips-${i?"on":"off"}`,onClick:()=>l.set(i),style:o(l.on===i),children:i?"On":"Off"},String(i)))})]}):null}var x=C(m(()=>(__graviewPreload(import.meta.url,["./chunk.D7YSL3NK.js","./chunk.BJUUSIQY.js","./chunk.ZP5RT2EK.js","./chunk.VZJWJ5XM.js","./chunk.6C2MHWSX.js","./chunk.XOZU4OFA.js","./chunk.GLWSVSQL.js","./chunk.HDUO2USQ.js","./chunk.TY4GQJKC.js","./chunk.MSWWWLEA.js","./chunk.UITT6JWW.js","./chunk.A5PDXNY6.js","./chunk.WC3DENU4.js","./chunk.VNDKKTED.js","./chunk.4MP72LPR.js","./chunk.SDO3U72B.js","./chunk.VSCIXAHN.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.M4UD4ARP.js")))),k=x.part((e,t)=>{let o=e.HoverChip;return(0,r.jsx)(o,{...t})},{quiet:!0}),p=null,O=()=>p;function L(){let{on:e}=w(),t=(0,n.useSyncExternalStore)(y,P,()=>null),[o]=(0,n.useState)(()=>Symbol("hover-chip")),l=(0,n.useSyncExternalStore)(y,O,()=>null);return(0,n.useEffect)(()=>{if(e)return p===null&&(p=o,a()),()=>{p===o&&(p=null,s=null,d(),a())}},[e,o,l]),!e||t===null||l!==o||!t.element.isConnected?null:(0,r.jsx)(n.Suspense,{fallback:null,children:(0,r.jsx)(k,{rest:t,hold:R,leave:M})})}export{L as HoverChipDoor,z as HoverChipsSwitch,R as holdRest,A as hoverChipsWanted,M as leaveRest,q as restOn,I as setHoverChipsWanted,w as useHoverChipsSetting};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Za as g}from"./chunk.
|
|
1
|
+
import{Za as g}from"./chunk.VSCIXAHN.js";function y(e){return[`based on \u201C${e.basis}\u201D`,...e.confidence!==void 0?[`${Math.round(e.confidence*100)}% sure`]:[],...e.model?[e.model]:[]].join(" \xB7 ")}var u=e=>`Not yet kept by a person. ${e.by.name??e.by.id??"Something"} made it${e.lineage?`, ${y(e.lineage)}`:""}.`,p=e=>`${e.kind}\0${e.from}\0${e.to}`;function k(e,o){let r=new Map;for(let n of e){if(n.undoes!==void 0||o.has(n.id)||n.withheld)continue;let l=g(n.author),s=l==="human"||l==="visitor",c=new Map;for(let t of n.primitives){if(t.op!=="add-edge"&&t.op!=="remove-edge")continue;let i=p(t.edge),a=r.get(i)??c.get(i);if(r.delete(i),t.op==="remove-edge")a&&c.set(i,a);else if(a&&(s||!n.lineage))r.set(i,s?{...a,provisional:!1,keptBy:n.id}:a);else{let d=n.lineage;r.set(i,{edge:t.edge,made:n.id,by:n.author,...d?{lineage:d}:{},provisional:!s&&(d?.confidence??1)<1})}}}return r}var f=new WeakMap;function v({log:e}){let o=e.all(),r=`${e.horizon}:${o.length}:${o.at(-1)?.id}`,n=f.get(e);return n?.at!==r&&f.set(e,n={at:r,links:k(o,e.undoneIds())}),n.links}var L=(e,o)=>v(e).get(p(o));var m=e=>[...v(e).values()].filter(o=>o.provisional);export{y as a,u as b,L as c,m as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as a}from"./chunk.
|
|
1
|
+
import{g as a}from"./chunk.PI44XMY2.js";import{c as p}from"./chunk.KGW75Z5L.js";import{Ia as d}from"./chunk.VSCIXAHN.js";function k(n){let r=new Map;for(let i of n.kinds){let e=n.tryDefinition(i),o=a(e),s=d(e);r.set(i,{fields:new Set(Object.keys(e?.fields?.shape??{})),edges:new Map(Object.entries(e?.edges??{}).map(([l,h])=>[l,h.cardinality??"many"])),...o?{computed:o}:{},...s.size>0?{linked:s}:{}})}let t=a(n);return t&&r.set(p,{computed:t}),r}export{k as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{c as sr}from"./chunk.
|
|
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{c as sr}from"./chunk.VNDKKTED.js";import{G as R,Ga as O,Ma as hn,Na as vn,Oa as bn,Ra as U,T as S,Va as Q,a as Pe,ba as ce,ca as Y,e as Le,l as un,la as yn,m as fn,s as gn,ta as wn,v as re,z as mn}from"./chunk.4MP72LPR.js";import{a as C}from"./chunk.SDO3U72B.js";import{Ac as Ze,Ad as ne,Bd as rn,Dd as xe,Fd as tn,Gd as an,Hc as z,Hd as j,Ic as Je,Jc as Xe,Lc as en,Mc as nn,Od as on,Pd as sn,Qd as ln,Rd as dn,Sd as cn,Td as Se,Xd as pn,_a as Ue,ga as ze,ka as je,la as Ye,pb as Qe,zd as de}from"./chunk.VSCIXAHN.js";import{b as v}from"./chunk.AJZBJBMO.js";var Ee=v(R(),1),kn=new WeakMap,pe=e=>{let n=kn.get(e);return n||kn.set(e,n={open:null,drawn:0,listeners:new Set}),n},lr=e=>{for(let n of[...e.listeners])n()},dr=0;function kt(e,n){let t=pe(e);t.open=n?{...n,at:++dr}:null,lr(t)}var xn=e=>n=>{let t=pe(e);return t.listeners.add(n),()=>void t.listeners.delete(n)};function Sn(e){let n=()=>e?pe(e).drawn>0:!1;return(0,Ee.useSyncExternalStore)(e?xn(e):cr,n,n)}var cr=()=>()=>{};function xt(e){let n=()=>pe(e).open;return(0,Ee.useSyncExternalStore)(xn(e),n,n)}var V=v(R(),1),Pn=v(sr(),1);function pr(e){let[n,t]=(0,V.useState)(null),[r,o]=(0,V.useState)(null);return(0,V.useLayoutEffect)(()=>{e.current!==r&&o(e.current)}),(0,V.useLayoutEffect)(()=>{if(!r||typeof ResizeObserver>"u")return;let a=()=>Math.round(r.getBoundingClientRect().width),i=a();t(i);let p=new ResizeObserver(()=>{let c=a();c!==i&&(i=c,(0,Pn.flushSync)(()=>t(c)))});return p.observe(r),()=>p.disconnect()},[r]),n}function ur(e=!0){let[n,t]=(0,V.useState)();return(0,V.useEffect)(()=>{if(!e)return t(void 0);let r=0,o=()=>t(innerHeight),a=()=>{o(),clearTimeout(r),r=window.setTimeout(o,300)},i=p=>{for(let[c,d]of[[window,"resize"],[window,"orientationchange"],[window.visualViewport,"resize"]])c?.[p](d,a)};return i("addEventListener"),o(),()=>{clearTimeout(r),i("removeEventListener")}},[e]),n}var ue={position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",whiteSpace:"nowrap"};var L=v(R(),1);var T=v(S(),1),Ln=6e3;function fr(){let e=[],n=0,t=new Set,r=new Map,o,a=()=>{for(let d of[...t])d()},i=d=>{if(clearTimeout(r.get(d.id)),r.delete(d.id),d.kind!=="toast")return;let u=(d.actions?.length??0)+(d.action?1:0),l=d.timeout??(u>0?!1:Ln);l!==!1&&r.set(d.id,setTimeout(()=>o?.()?i(d):p(d.id),l))},p=d=>{clearTimeout(r.get(d)),r.delete(d),e.some(u=>u.id===d)&&(e=e.filter(u=>u.id!==d),a())},c=d=>{e=e.some(u=>u.id===d.id)?e.map(u=>u.id===d.id?d:u):[...e,d],i(d),a()};return{notify(d){let u=d.id??`notice-${++n}`;return c({...d,id:u,said:++n}),{id:u,dismiss:()=>p(u),update:l=>{let g=e.find(w=>w.id===u);g&&c({...g,...l,id:u,kind:g.kind,said:l.sentence!==void 0&&l.sentence!==g.sentence?++n:g.said})}}},dismiss:p,hold(d){o=d},list:()=>e,subscribe(d){return t.add(d),()=>t.delete(d)}}}function gr({notices:e}){let n=e.reduce((p,c)=>!p||c.said>p.said?c:p,void 0),[t,r]=(0,L.useState)(""),[o,a]=(0,L.useState)(""),i=(0,L.useRef)(0);return(0,L.useEffect)(()=>{if(!n||n.said===i.current)return;i.current=n.said;let p=n.tone==="bad";(p?a:r)("");let c=setTimeout(()=>(p?a:r)(n.sentence),50);return()=>clearTimeout(c)},[n]),(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)("div",{role:"status","aria-live":"polite","data-testid":"notices-said",style:ue,children:t}),(0,T.jsx)("div",{role:"alert","data-testid":"notices-alarm",style:ue,children:o})]})}var mr=(0,L.createContext)(null);function yr({board:e,anchor:n}){let t=(0,L.useSyncExternalStore)(e.subscribe,e.list,e.list);return(0,L.useEffect)(()=>vr(Ae.prefetch),[]),(0,T.jsxs)(T.Fragment,{children:[t.length>0?(0,T.jsx)(L.Suspense,{fallback:null,children:(0,T.jsx)(hr,{notices:t,anchor:n,board:e})}):null,(0,T.jsx)(gr,{notices:t})]})}var Ae=O(C(()=>(__graviewPreload(import.meta.url,["./chunk.MB7LKKUD.js","./chunk.WC3DENU4.js","./chunk.VNDKKTED.js","./chunk.4MP72LPR.js","./chunk.SDO3U72B.js","./chunk.VSCIXAHN.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.KI37ZEV3.js")))),wr=()=>Ae.load().then(()=>{},()=>{}),hr=Ae.part((e,n)=>(0,T.jsx)(e.NoticeStacks,{...n}),{quiet:!0});function vr(e){let n=()=>{(typeof navigator>"u"||navigator.onLine!==!1)&&e()},t=globalThis;if(t.requestIdleCallback){let o=t.requestIdleCallback(n,{timeout:5e3});return()=>t.cancelIdleCallback?.(o)}let r=setTimeout(n,2500);return()=>clearTimeout(r)}var M=O(C(()=>(__graviewPreload(import.meta.url,["./chunk.X6A4VSSD.js","./chunk.YZ7FUKAL.js","./chunk.KDRLUBVF.js","./chunk.PNW5K7BW.js","./chunk.ENL2JJ47.js","./chunk.BQIHNT7C.js","./chunk.TAT2IQUR.js","./chunk.3XGA65Y3.js","./chunk.2K4TT2BV.js","./chunk.VZJWJ5XM.js","./chunk.GZHZLJBF.js","./chunk.IOK4GVJC.js","./chunk.OJGHDWI6.js","./chunk.TLJOZSDD.js","./chunk.MSWWWLEA.js","./chunk.UITT6JWW.js","./chunk.A5PDXNY6.js","./chunk.WC3DENU4.js","./chunk.VNDKKTED.js","./chunk.4MP72LPR.js","./chunk.SDO3U72B.js","./chunk.VSCIXAHN.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.IGJZ4UH3.js"))));var y=v(R(),1);var Tn=v(R(),1);var En=v(R(),1);function Te(e){return(0,En.useMemo)(()=>e===void 0||e===""?void 0:{__html:e},[e])}var $=v(S(),1);function He({brand:e,size:n=22}){let t=en(e),r=An(t?.light),o=r?An(t?.dark):void 0,a=Te(r!==void 0&&z(r)?r:void 0),i=Te(o!==void 0&&z(o)?o:void 0),p={display:"inline-flex",flex:"0 0 auto",height:n,color:"var(--graview-accent)"},c=nn(e);if(c)return(0,$.jsx)("span",{className:"graview-logo graview-emoji-mark","data-testid":"app-mark","aria-hidden":!0,style:{...p,alignItems:"center",fontSize:`${n*.86/16}rem`,lineHeight:1},children:c});if(!r)return null;let d=e?.logoAlt??e?.name??"",u=d!==""&&d!==e?.name,l=u?{role:"img","aria-label":d}:{"aria-hidden":!0};if(o){let w=(h,x,b)=>z(h)?(0,$.jsx)("span",{className:"graview-logo-face","data-graview-scheme-only":b,dangerouslySetInnerHTML:x}):(0,$.jsx)("img",{className:"graview-logo-face","data-graview-scheme-only":b,src:h,alt:""});return(0,$.jsxs)("span",{className:"graview-logo","data-testid":"app-mark",style:p,...l,children:[w(r,a,"light"),w(o,i,"dark")]})}let g=t?.darkFallback==="invert"?{"data-graview-logo-fallback":"invert"}:{};return z(r)?(0,$.jsx)("span",{className:"graview-logo","data-testid":"app-mark",style:p,...g,...l,dangerouslySetInnerHTML:a}):(0,$.jsx)("img",{className:"graview-logo","data-testid":"app-mark",src:r,alt:u?d:"",...g,style:{...p,width:"auto"}})}function An(e){if(!(!e||!Xe(e)))return z(e)&&Je(e)!==null?void 0:e}function br(e){(0,Tn.useEffect)(()=>{if(!e||typeof document>"u")return;let n=[...document.querySelectorAll('link[rel~="icon"]')],t=n.map(o=>o.getAttribute("href")),r;n.length===0&&(r=document.createElement("link"),r.rel="icon",r.setAttribute("data-graview-favicon",""),document.head.appendChild(r),n.push(r));for(let o of n)o.href=e;return()=>{r&&r.remove(),n.forEach((o,a)=>{o!==r&&t[a]!==null&&t[a]!==void 0&&o.setAttribute("href",t[a])})}},[e])}var s=v(S(),1),kr=M.part((e,n)=>(0,s.jsx)(e.TidyFoot,{...n}),{quiet:!0}),xr=M.part((e,n)=>(0,s.jsx)(e.Here,{...n}),{quiet:!0});function Sr(){let e=Y(),[n,t]=(0,y.useState)("");return(0,y.useEffect)(()=>e?.store.subscribe((r,o)=>{o.some(a=>a.author.id!==e.principal.id)&&M.load().then(a=>a.sayTheirChange(o,e,t),String)}),[e]),(0,s.jsx)("span",{role:"status",className:"graview-bar-said",children:n})}var Hn="home",Bn="/",q="scene:whole";function Pr(e){let{store:n,principal:t,views:r}=e,o=n.kindsKeptFrom(t),a=n.schema.kinds.filter(f=>!n.modules.disabledKinds.has(f)&&!o.has(f)),i=r?.arrangement?.(),p=r?.places()??[],c=dn(i,n.schema,p),d=ln(n.schema,i,[...n.modules.administered.values()].flatMap(f=>f.kinds??[])),u=(f,P)=>(!n.graph.size.nodes||n.graph.count(f)>0)&&(c?P?c.places.has(`${f}|${P}`):c.kinds.has(f):!d.has(f)),l=[{key:Hn,label:"Home",path:Bn,group:"home",primary:!0}],g=p.filter(f=>a.includes(f.kind)&&f.as!==cn),w=g.filter(f=>!f.hidden),h=new Set(ne(w).map(f=>j(f,p,n.schema).toLowerCase())),x=f=>tn(f.as,an(f,p)?xe(n.schema,f.kind).slice(1):void 0),b=new Set(i?.hide??[]),H=pn(a,i?.order,w);for(let{kind:f,view:P}of H){if(P){l.push({key:`place:${P.kind}:${P.as}`,label:j(P,p,n.schema),path:x(P),group:"lists",kind:f,primary:c?c.places.has(`${f}|${P.as}`):!0});continue}let W=je(n.schema,f),B=h.has(W.toLowerCase());l.push({key:`kind:${f}`,label:B?Ye(n.schema,f):W,path:xe(n.schema,f),group:"lists",kind:f,primary:B||b.has(f)?!1:u(f),...b.has(f)?{hidden:!0}:{}})}for(let f of ne(g)){if(H.some(B=>B.view&&de(B.view,f)))continue;let P=x(f),W=[f.kind,...f.over??[]].some(B=>a.includes(B)&&u(B,f.as));l.some(B=>B.path===P)||l.push({key:`place:${f.kind}:${f.as}`,label:j(f,p,n.schema),path:P,group:"pictures",kind:f.kind,primary:W,hidden:f.hidden})}return a.some(f=>Object.keys(n.schema.tryDefinition(f)?.edges??{}).length>0)&&l.push({key:"connections",label:"Connections",path:"/map",group:"pictures",primary:!1}),l}function Lr(e,n){let[t="/",r=""]=n.split("?"),o=e.find(i=>i.path===(r?`${t}?${r}`:t))??e.find(i=>i.path===t);if(o)return o.key;let a=`/${t.split("/").filter(Boolean)[0]??""}`;return e.find(i=>i.group==="lists"&&i.path===a)?.key??null}var Nn=(0,y.createContext)(null),Er=()=>(0,y.useContext)(Nn),Z=30,Mn=48,te=640,Me=4,Be=2;function Cn(e){let{widths:n,current:t,room:r,more:o,gap:a=Me,primary:i,most:p=sn}=e;if(n.length===0||!(r>0)||!(o>0)||n.some(l=>!(l>0)))return null;let c=(l,g)=>l.reduce((w,h)=>w+n[h],0)+a*Math.max(0,l.length-1)+(g?a+o:0),d=(l,g)=>t<0||!l.includes(t)||l.slice(0,g).includes(t)?l.slice(0,g):[...l.filter(w=>w!==t).slice(0,g-1),t].sort((w,h)=>w-h),u=d(n.map((l,g)=>g).filter(l=>i?.[l]!==!1||l===t),p);if(c(u,u.length<n.length)<=r)return u.length>=Be?u:null;for(let l=u.length-1;l>=Be;l--){let g=d(u,l);if(c(g,!0)<=r)return g}return null}var Ar=`
|
|
2
2
|
.graview-bar{display:block;margin:0;padding:0;container:graview-bar/inline-size;flex:0 0 auto;position:relative;background:var(--graview-bar);border-bottom:1px solid var(--graview-edge);color:var(--graview-ink);font-family:var(--graview-font-body,system-ui)}
|
|
3
3
|
.graview-bar-row{display:flex;flex-wrap:nowrap;align-items:center;gap:16px;height:${Mn-1}px;margin:0;padding:0 16px}
|
|
4
4
|
.graview-bar-home,.graview-bar-face,.graview-bar-place,.graview-bar-item,.graview-bar-at{display:inline-flex;align-items:center;box-sizing:border-box;min-width:0;margin:0;border:0;background:none;box-shadow:none;font:inherit;letter-spacing:normal;text-transform:none;text-decoration:none;color:var(--graview-ink);cursor:pointer;text-align:left}
|
|
@@ -64,4 +64,4 @@ var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=gl
|
|
|
64
64
|
@container graview-bar (max-width: 300px){
|
|
65
65
|
.graview-bar-row{gap:4px;padding:0 10px}
|
|
66
66
|
}`,J={display:"inline-flex",alignItems:"center",justifyContent:"center",gap:6,minWidth:Z,height:Z,padding:0,borderRadius:8,border:"1px solid transparent",background:"none",boxShadow:"none",color:"var(--graview-ink-muted)",font:"inherit",fontSize:"0.875rem",cursor:"pointer",flex:"0 0 auto"};function Tr({brand:e,name:n,heading:t=1,home:r,faces:o,places:a,current:i,reach:p,tools:c,find:d=!0,description:u,findBox:l,onFind:g,switch:w="words",scenePlaces:h,skips:x,named:b=!0}){let H=(0,y.useRef)(null),De=Y()?.who.size,[f,P]=(0,y.useState)(null),[W,B]=(0,y.useState)(null),[A,Un]=(0,y.useState)(!1),[Qn,Ie]=(0,y.useState)(!1),[Zn,Jn]=(0,y.useState)(!0),[$e,Xn]=(0,y.useState)(null),oe=o?o.pages.current:!h,ee=oe?{places:a,current:i,reach:p}:h,he=ee&&{...ee,places:rn(ee.places),here:ee.places.find(m=>m.key===ee.current)?.label},k=he&&he.places.length>0?he:null,ve=k?k.places.findIndex(m=>m.key===k.current):-1,_e=!!o&&w==="words",Ke=k?k.places.map(m=>m.primary===!1?"0":"1").join(""):"",I=(0,y.useCallback)(()=>{let m=H.current;if(!m)return;let N=$r(m,ve,_e,Ke);N!==void 0&&Xn(N);let G=N?!0:Br(m);G!==null&&Jn(G)},[ve,_e,Ke]);(0,y.useLayoutEffect)(()=>{let m=H.current;if(!m)return;let N=()=>{let le=m.getBoundingClientRect().width;Un(le<te),m.style.setProperty("--graview-bar-width",`${Math.round(le)}px`),I()};N();let G=typeof document>"u"?void 0:document.fonts;if(G?.ready.then(I),G?.addEventListener?.("loadingdone",I),typeof ResizeObserver>"u")return()=>G?.removeEventListener?.("loadingdone",I);let ke=new ResizeObserver(N);ke.observe(m);for(let le of m.querySelectorAll(".graview-bar-tools > *"))ke.observe(le);return()=>{ke.disconnect(),G?.removeEventListener?.("loadingdone",I)}},[I]);let be=(0,y.useRef)(g);be.current=g,(0,y.useLayoutEffect)(()=>{be.current?.(d&&f?{slot:f,compact:A,own:W}:null)},[d,f,A,W]),(0,y.useLayoutEffect)(()=>()=>be.current?.(null),[]);let er=(0,y.useCallback)(()=>{Ie(!0),requestAnimationFrame(()=>f?.querySelector("input")?.focus())},[f]),We=(0,y.useRef)(null),ie=(0,y.useRef)(!1),Ge=(0,y.useCallback)(()=>{Ie(!1),ie.current&&(ie.current=!1,requestAnimationFrame(()=>We.current?.focus()))},[]),nr=t===!1?"span":`h${t}`,rr=r.href!==void 0?"a":"button",tr=m=>N=>{!m||!On(N)||(N.preventDefault(),m())},ar=!oe,qe=k&&!A&&$e!==null&&!(ve<0&&k.here)?$e.split(",").map(Number).filter(m=>m<k.places.length):null,se=k?(0,s.jsx)(Dr,{places:k.places,current:k.current,here:k.here,reach:k.reach,scene:ar,stands:qe}):null,or=k?k.places.map(m=>m.label).join(`
|
|
67
|
-
`):"";(0,y.useLayoutEffect)(I,[I,n,e,or,k?.current,oe,A,w,d]);let ir=w==="icons"||!Zn||A?"icons":"words";return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("header",{ref:H,className:"graview-bar","data-testid":"app-bar","data-graview-app-bar":"",...Qn&&A?{"data-finding":""}:{},children:[(0,s.jsx)("style",{children:Ar}),x,(0,s.jsxs)("div",{className:"graview-bar-row",children:[b?(0,s.jsx)("div",{className:"graview-bar-app",children:(0,s.jsx)(nr,{className:"graview-bar-name",children:(0,s.jsxs)(rr,{...r.href!==void 0?{href:r.href,onClick:tr(r.go)}:{type:"button",onClick:r.go},"data-testid":"app-home",...r.current?{"aria-current":"page"}:{},title:u?`${n} \u2014 ${u}`:`${n} \u2014 home`,className:"graview-bar-home",children:[(0,s.jsx)(He,{brand:e,size:20}),(0,s.jsx)("span",{className:"graview-bar-app-name","data-testid":"app-name",children:n})]})})}):null,o?(0,s.jsx)(Hr,{faces:o,form:w,drawn:ir}):null,(0,s.jsx)("div",{className:"graview-bar-mid",...qe?{"data-places":"standing"}:!A&&se?{"data-place":""}:{},children:A?null:se}),!A&&k&&k.places.length>1?(0,s.jsxs)("span",{className:"graview-bar-ruler","aria-hidden":"true","data-graview-bar-ruler":"",children:[k.places.map(m=>(0,s.jsx)("span",{className:"graview-bar-at",children:m.label},m.key)),(0,s.jsxs)("span",{className:"graview-bar-at",children:[Ne,(0,s.jsx)(Vn,{})]})]}):null,b?(0,s.jsx)("span",{className:"graview-bar-ruler","aria-hidden":"true",children:(0,s.jsx)("span",{className:"graview-bar-name",children:n})}):null,(0,s.jsxs)("div",{className:"graview-bar-tools",children:[d?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("button",{type:"button",className:"graview-bar-find-open",ref:We,"data-testid":"app-find-open","aria-label":"Find",title:"Find",onClick:er,style:{...J,display:void 0},children:(0,s.jsx)(Rr,{})}),(0,s.jsxs)("div",{className:"graview-bar-find","data-testid":"app-find",onBlur:m=>{let N=m.relatedTarget;N instanceof Node&&m.currentTarget.contains(N)||m.currentTarget.querySelector("input")?.value||Ge()},onKeyDownCapture:m=>{m.key==="Escape"&&A&&(ie.current=!0)},onKeyDown:m=>{m.key!=="Escape"||!A||(!m.defaultPrevented||!m.currentTarget.querySelector("input")?.value?Ge():ie.current=!1)},children:[(0,s.jsx)("div",{ref:P,className:"graview-bar-find-slot",children:l}),(0,s.jsx)(Mr,{})]})]}):null,(0,s.jsx)("div",{ref:B,className:"graview-bar-own","data-graview-bar-own":""}),De?(0,s.jsx)(y.Suspense,{fallback:null,children:(0,s.jsx)(xr,{scene:!oe,compact:A})}):null,(0,s.jsx)(Sr,{}),c]})]})]}),A&&se?(0,s.jsx)("div",{className:"graview-bar-line","data-graview-place-line":"","data-testid":"app-place-line",children:se}):null]})}function Hr({faces:e,form:n,drawn:t}){let r=o=>{let a=e[o];return(0,s.jsxs)("button",{type:"button",className:"graview-bar-face","data-testid":`app-face-${o}`,"aria-pressed":a.current,title:a.label,...a.reach&&!a.current?{onPointerEnter:a.reach,onPointerDown:a.reach,onFocus:a.reach}:{},onClick:()=>{a.current||a.go()},children:[o==="scene"?(0,s.jsx)(Fn,{}):(0,s.jsx)(Cr,{}),(0,s.jsx)("span",{children:a.label})]})};return(0,s.jsxs)("div",{className:"graview-bar-faces",role:"group","aria-label":`${e.scene.label} or ${e.pages.label}`,"data-testid":"app-faces","data-switch":n,"data-switch-drawn":t,children:[r("scene"),r("pages")]})}function Br(e){let n=e.querySelector(".graview-bar-faces"),t=e.querySelector(".graview-bar-mid"),r=e.querySelector(".graview-bar-find");if(!n||!t||r?.matches(":focus-within")||e.getBoundingClientRect().width<te)return null;let a=In(n),i=t.querySelector(".graview-bar-place-words"),p=i?parseFloat(getComputedStyle(i).fontSize)||14:0,c=i?Math.min(i.scrollWidth+34,14*p):0,d=Rn(e);if(d===null)return!1;let u=t.getBoundingClientRect().width-c-d;if(r&&r.getBoundingClientRect().width>0){let l=parseFloat(getComputedStyle(r).flexBasis);isFinite(l)&&(u-=Math.max(0,l-r.getBoundingClientRect().width))}return n.getAttribute("data-switch-drawn")==="icons"?u>=a+2:u>=-1}function Rn(e){let n=e.querySelector(".graview-bar-app"),t=e.querySelector(".graview-bar-ruler>.graview-bar-name");if(!n||!t)return 0;let r=i=>i?.getBoundingClientRect().width??0,o=r(n.firstElementChild)-r(e.querySelector(".graview-bar-app-name"))+r(t)+2,a=parseFloat(getComputedStyle(n).maxWidth)/100*(n.parentElement.clientWidth-2*n.offsetLeft)||1/0;return o>a+.5?null:Math.max(0,o-r(n))}var On=e=>e.button===0&&!(e.metaKey||e.ctrlKey||e.shiftKey||e.altKey);function Nr(){let e=globalThis.navigator?.platform??"";return/Mac|iPhone|iPad|iPod/.test(e)?"\u2318K":"Ctrl K"}function Mr(){let e=Sn(Y()?.aiDesk);return(0,s.jsx)("span",{className:"graview-bar-find-keys","data-testid":"app-find-keys","aria-hidden":"true",children:e?"/":Nr()})}function ae({size:e,box:n=e,children:t}){return(0,s.jsx)("svg",{width:e,height:e,viewBox:`0 0 ${n} ${n}`,"aria-hidden":"true",focusable:"false",style:{flex:"0 0 auto"},children:t})}function Fn(){return(0,s.jsxs)(ae,{size:14,children:[(0,s.jsx)("path",{d:"M7 1.5 L12.5 4.5 L7 7.5 L1.5 4.5 Z",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinejoin:"round"}),(0,s.jsx)("path",{d:"M1.5 7.5 L7 10.5 L12.5 7.5",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinejoin:"round",strokeLinecap:"round"})]})}function Cr(){return(0,s.jsxs)(ae,{size:14,children:[(0,s.jsx)("rect",{x:"2.25",y:"1.75",width:"9.5",height:"10.5",rx:"1.5",fill:"none",stroke:"currentColor",strokeWidth:"1.3"}),(0,s.jsx)("path",{d:"M4.5 5 H9.5 M4.5 7.25 H9.5 M4.5 9.5 H7.5",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]})}function Vn(){return(0,s.jsx)(ae,{size:10,children:(0,s.jsx)("path",{d:"M2 3.5 L5 6.5 L8 3.5",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})}function Rr(){return(0,s.jsxs)(ae,{size:16,children:[(0,s.jsx)("circle",{cx:"7",cy:"7",r:"4.75",fill:"none",stroke:"currentColor",strokeWidth:"1.5"}),(0,s.jsx)("path",{d:"M10.5 10.5 L14 14",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}function Or({place:e}){if(e.key===q)return(0,s.jsx)(Fn,{});if(e.group==="home")return(0,s.jsx)(ae,{size:13,box:14,children:(0,s.jsx)("path",{d:"M2 6.5 L7 2 L12 6.5 V12 H2 Z",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinejoin:"round"})});let n=e.kind?`hsl(${Math.round(Ze(e.kind))} 55% 52%`:"rgb(128 128 128";return(0,s.jsx)("span",{"aria-hidden":"true",style:{display:"inline-block",width:12,height:8,clipPath:"polygon(50% 0, 100% 50%, 50% 100%, 0 50%)",background:e.group==="lists"?`${n})`:`linear-gradient(${n}), ${n})) center / 6px 4px no-repeat, ${n} / 0.35)`}})}var Fr=[{group:"home"},{group:"lists",heading:"Lists"},{group:"pictures",heading:"Pictures"}],Ne="More";function Dn({place:e,current:n,reach:t,standing:r,done:o}){let a=e.key===n,i=t.href?.(e.path);return(0,s.jsxs)(i!==void 0?"a":"button",{className:r?"graview-bar-at":"graview-bar-item","data-testid":`app-place-${e.key}`,"data-place-path":e.path,...a?{"aria-current":"page"}:{},...i!==void 0?{href:i}:{type:"button"},onClick:c=>{o(),t.go&&(i!==void 0&&!On(c)||(c.preventDefault(),t.go(e)))},children:[r?null:(0,s.jsx)("span",{className:"graview-bar-mark",children:(0,s.jsx)(Or,{place:e})}),r&&a?(0,s.jsx)("span",{"data-testid":"app-place-current",children:e.label}):(0,s.jsx)("span",{children:e.label})]})}function Vr({places:e,current:n,reach:t,id:r,done:o}){return(0,s.jsx)(s.Fragment,{children:Fr.map(({group:a,heading:i})=>{let p=e.filter(d=>d.group===a);if(p.length===0)return null;let c=`${r}-${a}`;return(0,s.jsxs)("div",{role:"group",...i?{"aria-labelledby":c}:{"aria-label":p[0].label},"data-place-group":a,children:[i?(0,s.jsx)("p",{id:c,children:i}):null,(0,s.jsx)("ul",{children:p.map(d=>(0,s.jsx)("li",{children:(0,s.jsx)(Dn,{place:d,current:n,reach:t,standing:!1,done:o})},d.key))})]},a)})})}function Dr({places:e,current:n,here:t,reach:r,scene:o,stands:a}){let i=Q("places"),p=(0,y.useRef)(a);i.open||(p.current=a);let c=p.current,u=e.find(b=>b.key===n)?.label??t??"Places",l=c?e.filter((b,H)=>!c.includes(H)):e,g=Ir(e,n,o),w=Y(),h=w?.keptViews?.current(),x=!!(h&&(h.removed.length>0||w.views.places().some(b=>b.hidden)||h.may.lenses&&(w.views.arrangement?.()?.hide?.length??0)>0));return(0,s.jsxs)("nav",{className:c?"graview-bar-places":"graview-bar-place-at","aria-label":o?"What the scene shows":"The app\u2019s places",...c?{"data-testid":"app-places-standing"}:{},...g,children:[c?.map(b=>(0,s.jsx)(Dn,{place:e[b],current:n,reach:r,standing:!0,done:()=>{}},e[b].key)),l.length>0||x?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("button",{type:"button",className:c?"graview-bar-at":"graview-bar-place","data-testid":"app-places-open",...i.trigger,onClick:i.toggle,"aria-label":c?`${Ne} \u2014 ${l.length} more ${o?"pictures":"places"}`:`${u} \u2014 ${o?"everything the scene shows":"every place"}`,title:c?l.map(b=>b.label).join(", "):u,children:[c?Ne:(0,s.jsx)("span",{className:"graview-bar-place-words","data-testid":"app-place-current",children:u}),(0,s.jsx)(Vn,{})]}),(0,s.jsxs)("div",{...i.pane,"data-testid":"app-places",hidden:!i.open,className:"graview-bar-list",style:U,children:[(0,s.jsx)(Vr,{places:l,current:n,reach:r,id:i.pane.id,done:()=>i.setOpen(!1)}),x&&i.open?(0,s.jsx)(y.Suspense,{fallback:null,children:(0,s.jsx)(kr,{id:i.pane.id,scene:o,reach:r,done:()=>i.setOpen(!1)})}):null]})]}):null]})}function Ir(e,n,t){let r=Y()?.setMenuAt,o=a=>{let i=a.target.closest?.("[data-place-path],[data-testid=app-places-open]");if(!i||!r)return;let p={at:0};a.type==="pointerdown"?document.addEventListener("pointerup",()=>p.at||=Date.now(),{once:!0}):a.preventDefault();let c=a.nativeEvent;M.load().then(d=>d.placeGesture(c,i,e,n,t,r,p),String)};return{onContextMenu:a=>a.shiftKey||o(a),onKeyDown:a=>(a.key==="ContextMenu"||a.key==="F10"&&a.shiftKey)&&o(a),onPointerDown:a=>a.pointerType!=="mouse"&&a.isPrimary&&o(a)}}function $r(e,n,t,r){let o=e.querySelector("[data-graview-bar-ruler]"),a=e.querySelector(".graview-bar-mid");if(!o||!a)return null;let i=e.querySelector(".graview-bar-find");if(i?.matches(":focus-within"))return;if(e.getBoundingClientRect().width<te)return null;let p=Rn(e);if(p===null)return null;let c=[...o.children].map(H=>H.getBoundingClientRect().width),d=c.pop()??0,u=e.querySelector(".graview-bar-faces"),l=u&&t?In(u):0,g=u?.getAttribute("data-switch-drawn")==="words"?l:0,w=a.getBoundingClientRect().left+p,h=i?.getBoundingClientRect(),x=h&&h.width>0?h.right-w-(parseFloat(getComputedStyle(i).minWidth)||0)-16:a.getBoundingClientRect().width-p,b=[...r].map(H=>H!=="0");return Cn({widths:c,current:n,room:Math.floor(x+g-l),more:d,primary:b})?.join(",")??null}function In(e){return[...e.querySelectorAll(".graview-bar-face span")].reduce((n,t)=>n+t.scrollWidth+10,0)}var _r=e=>`graview:lenses:${e}`,Kr=(e,n)=>e?.name??n.kinds.join(",");function Ce(e){try{let n=JSON.parse(localStorage.getItem(_r(e))??"[]");return Array.isArray(n)?n.filter(t=>typeof t?.title=="string"&&typeof t.lens=="string"):[]}catch{return[]}}var _=v(R(),1);var E=v(S(),1);function Wr({scheme:e,onScheme:n,profileHref:t,keeping:r,hostActions:o=Gr,signature:a=!1}){let{store:i,principal:p,seats:c,people:d}=ce(),u=Q("profile"),l=u.open,[g,w]=(0,_.useState)(!1);(0,_.useEffect)(()=>jr(fe),[]),l&&!g&&w(!0),(0,_.useEffect)(()=>{l&&fe()},[l]);let h=p.id===void 0?void 0:i.graph.getNode(p.id),x=h===void 0?p.id===void 0?"Nobody in particular":Ue(p,{graph:i.graph,schema:i.schema,seats:c,people:d}):ze(i.schema.tryDefinition(h.kind),h);return(0,E.jsxs)("div",{style:{position:"relative"},children:[(0,E.jsx)("button",{type:"button","data-testid":"profile-button",...u.trigger,onClick:u.toggle,onPointerEnter:fe,onFocus:fe,"aria-label":`${x} \u2014 you, your seat and your settings`,title:`${x} \u2014 you, your seat and your settings`,style:{...J,borderRadius:999},children:(0,E.jsx)("span",{"aria-hidden":"true","data-testid":"profile-mark",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:Z-4,height:Z-4,borderRadius:999,fontSize:"0.8125rem",fontWeight:600,background:"var(--graview-panel-muted)",color:"var(--graview-ink)",border:"1px solid var(--graview-edge)"},children:Yr(x)})}),(0,E.jsxs)("section",{...u.pane,"aria-label":"Profile","data-testid":"profile","data-graview-offstage":"",hidden:!l,style:{...U,width:280,maxWidth:"calc(100vw - 32px)",maxHeight:"min(62cqh, 520px)",overflowY:"auto",overflowX:"hidden",display:l?"grid":"none",gap:12,padding:12,borderRadius:10,border:"1px solid var(--graview-edge)",background:"var(--graview-float)",boxShadow:"var(--graview-lift-high)"},children:[g?(0,E.jsx)(_.Suspense,{fallback:null,children:(0,E.jsx)(qr,{part:"top",name:x,me:h,profileHref:t,hostActions:o,close:()=>u.setOpen(!1)})}):null,(0,E.jsxs)("div",{className:"graview-profile-keeping","data-testid":"profile-keeping",style:Qr,children:[(0,E.jsx)("span",{style:Ur,children:"Keeping this app"}),r]}),g?(0,E.jsx)(_.Suspense,{fallback:null,children:(0,E.jsx)(zr,{part:"rest",name:x,me:h,scheme:e,onScheme:n,hostActions:o,signature:a,close:()=>u.setOpen(!1)})}):null]})]})}var Gr=[],fe=()=>M.prefetch(),qr=M.part((e,n)=>(0,E.jsx)(e.ProfilePane,{...n}),{what:"The rest of your menu"}),zr=M.part((e,n)=>(0,E.jsx)(e.ProfilePane,{...n}),{quiet:!0});function jr(e){let n=()=>{(typeof navigator>"u"||navigator.onLine!==!1)&&e()},t=globalThis;if(t.requestIdleCallback){let o=t.requestIdleCallback(n,{timeout:5e3});return()=>t.cancelIdleCallback?.(o)}let r=setTimeout(n,2500);return()=>clearTimeout(r)}function Yr(e){return(e.trim()[0]??"?").toUpperCase()}var Ur={fontSize:"0.75rem",letterSpacing:"0.14em",textTransform:"uppercase",color:"var(--graview-ink-faint)"},Qr={paddingTop:10,borderTop:"1px solid var(--graview-edge)"};function Zr(e){return!(e==="hidden"||e===!1)}var Re=v(R(),1);var $n="The whole thing",ge=e=>`scene:${e.kind}:${e.as}`;function _n(e){let{view:n}=e,t=e.places.filter(l=>!e.hidden.has(l.kind)),r=ne(t),o=(l,g)=>{if(l===q)return un(fn(g,!0),"view",null);let w=r.find(h=>ge(h)===l);return w?mn(g,w.over?.find(h=>g.focusId===re(h))??w.kind,w.as):null},a=n.within?.view,i=l=>n.focusId===re(l.kind)&&(a===void 0?t.filter(g=>g.kind===l.kind).at(-1)===l:a===l.as),p=t.find(l=>i(l)&&(a!==void 0||!n.overview)),c=p?r.find(l=>de(l,p)):void 0,d=r.filter(l=>!l.hidden||l===c);return{places:[{key:q,label:$n,path:`${Se}${Le(o(q,Pe))}`,group:"home"},...d.map(l=>({key:ge(l),label:j(l,t,e.schema),path:`${Se}${Le(o(ge(l),Pe))}`,group:"pictures",kind:l.kind,hidden:l.hidden}))],current:c?ge(c):q,to:o}}function Jr(){let{store:e,views:n,hiddenKinds:t}=ce(),{view:r,go:o}=bn(),a=n.places(),i=(0,Re.useMemo)(()=>_n({places:a,hidden:t,view:r,schema:e.schema}),[a,t,r,e.schema]),p=(0,Re.useMemo)(()=>({go:c=>{let d=i.to(c.key,r);d&&o(d)}}),[i,r,o]);return{places:i.places,current:i.current,reach:p}}var X=v(R(),1);var F=v(S(),1),Xr=M.part((e,n)=>(0,F.jsx)(e.ProblemRows,{...n}),{what:"The problems",as:"li"}),Oe=()=>M.prefetch();function et({clean:e="All rules hold"}){let n=vn(),{set:t}=hn(),r=n.length,[o,a]=(0,X.useState)(!1),i=Q("problems",{open:o&&r>0,onOpenChange:a}),p=i.open,c=Wn(n,e);return(0,X.useEffect)(()=>{if(r===0)return;let d=setTimeout(Oe,1500);return()=>clearTimeout(d)},[r>0]),(0,F.jsxs)("div",{style:{position:"relative",display:"inline-flex"},children:[(0,F.jsxs)("button",{type:"button","data-testid":"standing",...i.trigger,"aria-disabled":r===0?!0:void 0,"aria-label":c,onClick:r===0?void 0:i.toggle,onPointerEnter:r===0?void 0:Oe,onFocus:r===0?void 0:Oe,title:c,style:{...J,padding:r===0?0:"0 8px",cursor:r===0?"default":"pointer",color:r===0?"var(--graview-ink-muted)":Kn(n),fontVariantNumeric:"tabular-nums",fontWeight:600},children:[(0,F.jsx)(Gn,{tone:r===0?"var(--graview-good)":Kn(n)}),r>0?(0,F.jsx)("span",{"aria-hidden":"true",children:r}):null]}),p?(0,F.jsx)("ol",{...i.pane,"data-testid":"problems",style:{...U,width:300,maxHeight:"min(48cqh, 420px)",overflow:"auto",margin:0,padding:4,listStyle:"none",display:"grid",borderRadius:10,border:"1px solid var(--graview-edge)",background:"var(--graview-float)",boxShadow:"var(--graview-lift-high)"},children:(0,F.jsx)(X.Suspense,{fallback:null,children:(0,F.jsx)(Xr,{violations:n,pick:d=>{t(d.nodeIds),i.setOpen(!1)}})})}):null]})}function Wn(e,n){return e.length===0?n:`${Qe(e)} \u2014 open what is broken, and what would fix it`}var Kn=e=>e.some(n=>n.status==="could-not-judge"||n.status==="over-budget")?"var(--graview-bad)":"var(--graview-warn)";function Gn({tone:e}){return(0,F.jsx)("span",{"aria-hidden":"true",style:{width:8,height:8,borderRadius:999,flex:"0 0 auto",background:e}})}function nt(e,n,t=[]){if(e.focusId)return e.focusId;let o=(e.selection??[]).map(gn).find(a=>a!==null)??t.find(a=>n.includes(a))??n[0]??null;return o===null?null:re(o)}var ye=v(S(),1),me=O(C(()=>(__graviewPreload(import.meta.url,["./chunk.GCBZ3WE2.js","./chunk.GDOTG7YA.js","./chunk.EPPXZZPK.js","./chunk.KFQSYCY3.js","./chunk.LCPGZK7G.js","./chunk.NKC3JILT.js","./chunk.HEWVPXRE.js","./chunk.43OKZU73.js","./chunk.WNSC3RWD.js","./chunk.ACYDJQRC.js","./chunk.S5MGE2U5.js","./chunk.34TW32TB.js","./chunk.WVUJXDXZ.js","./chunk.LDAYDCUO.js","./chunk.KKNDX4JT.js","./chunk.GKSUTAIX.js","./chunk.5ICIMQE6.js","./chunk.QGV7H7RQ.js","./chunk.YIA2EDVF.js","./chunk.GZHZLJBF.js","./chunk.ELERUERU.js","./chunk.OJGHDWI6.js","./chunk.YHTE34RN.js","./chunk.3YZHZGTM.js","./chunk.EQTSV7BK.js","./chunk.27CW6SCT.js","./chunk.YD3TKV6P.js","./chunk.4KC35UNR.js","./chunk.HT2BEOEV.js","./chunk.SDO3U72B.js","./chunk.7BBGRTXM.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.6K7EN2YI.js"))));function rt(){return me.load().then(()=>{})}var tt=[{cardinality:"one",fidelity:"full",slot:"page"},{cardinality:"one",fidelity:"summary",slot:"card"},{cardinality:"one",fidelity:"glyph",slot:"row"},{cardinality:"many",fidelity:"full"},{cardinality:"many",fidelity:"summary"},{cardinality:"many",fidelity:"glyph"}];function at({schema:e,specs:n,kind:t,view:r}){let o=me.current.frameworkViews(e,n).lookup(t,{cardinality:r.cardinality,fidelity:r.fidelity});return o?(0,ye.jsx)(o,{...r}):null}var ot=me.part((e,n)=>(0,ye.jsx)(at,{...n}),{what:"This view"});function qn(e,n,t){for(let r of n.kinds){let o=t?.[r];for(let a of tt){let i=c=>(0,ye.jsx)(ot,{schema:n,specs:t,kind:r,view:c}),p=a.slot!==void 0&&o?.[a.slot]!==void 0;p&&(i.says=(c,d)=>me.current?.frameworkViews(n,t).lookup(r,{cardinality:a.cardinality,fidelity:a.fidelity})?.says?.(c,d)),e.register(r,{cardinality:a.cardinality,fidelity:a.fidelity},p?i:yn(i))}}return e}function it(e,n){return qn(wn(e),e,n)}var Fe=v(R(),1);var D=v(S(),1),zn=O(C(()=>(__graviewPreload(import.meta.url,["./chunk.I3WWCPQ2.js","./chunk.BTVBZ6KE.js","./chunk.3OYGXYQY.js","./chunk.UAP5M3CD.js","./chunk.GCBZ3WE2.js","./chunk.GDOTG7YA.js","./chunk.EPPXZZPK.js","./chunk.KFQSYCY3.js","./chunk.WQOI6BLM.js","./chunk.LCPGZK7G.js","./chunk.NKC3JILT.js","./chunk.HEWVPXRE.js","./chunk.HJCQ6I3S.js","./chunk.HXRV3WVJ.js","./chunk.MQ5HBUBL.js","./chunk.7SQAKSJD.js","./chunk.43OKZU73.js","./chunk.WNSC3RWD.js","./chunk.ACYDJQRC.js","./chunk.S5MGE2U5.js","./chunk.34TW32TB.js","./chunk.LL2MLSPH.js","./chunk.EB4NVTJL.js","./chunk.VG7OWV2H.js","./chunk.KXPRILAO.js","./chunk.BB33TI4S.js","./chunk.2EDC63RI.js","./chunk.WVUJXDXZ.js","./chunk.LDAYDCUO.js","./chunk.KKNDX4JT.js","./chunk.GKSUTAIX.js","./chunk.5ICIMQE6.js","./chunk.QGV7H7RQ.js","./chunk.YIA2EDVF.js","./chunk.GZHZLJBF.js","./chunk.ELERUERU.js","./chunk.OJGHDWI6.js","./chunk.YHTE34RN.js","./chunk.3YZHZGTM.js","./chunk.EQTSV7BK.js","./chunk.27CW6SCT.js","./chunk.YD3TKV6P.js","./chunk.4KC35UNR.js","./chunk.HT2BEOEV.js","./chunk.SDO3U72B.js","./chunk.7BBGRTXM.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.QB25SMP6.js"))));function st({lens:e,view:n}){let t=zn.current.declaredLensView(e);return(0,D.jsx)(t,{...n})}var lt=zn.part((e,n)=>(0,D.jsx)(st,{...n}),{what:"This picture"});function dt(e){let n=r=>(0,D.jsx)(Fe.Suspense,{fallback:null,children:(0,D.jsx)(lt,{lens:e,view:r})});e.lens==="blocks"&&(n.flows=!0);let t=e.lens==="blocks"?e.options.blocks?.[0]:void 0;return typeof t?.headline=="string"&&(n.lede=t),e.create===!1&&(n.creates=!1),n}var jn=O(C(()=>(__graviewPreload(import.meta.url,["./chunk.GCBZ3WE2.js","./chunk.GDOTG7YA.js","./chunk.EPPXZZPK.js","./chunk.KFQSYCY3.js","./chunk.LCPGZK7G.js","./chunk.NKC3JILT.js","./chunk.HEWVPXRE.js","./chunk.43OKZU73.js","./chunk.WNSC3RWD.js","./chunk.ACYDJQRC.js","./chunk.S5MGE2U5.js","./chunk.34TW32TB.js","./chunk.WVUJXDXZ.js","./chunk.LDAYDCUO.js","./chunk.KKNDX4JT.js","./chunk.GKSUTAIX.js","./chunk.5ICIMQE6.js","./chunk.QGV7H7RQ.js","./chunk.YIA2EDVF.js","./chunk.GZHZLJBF.js","./chunk.ELERUERU.js","./chunk.OJGHDWI6.js","./chunk.YHTE34RN.js","./chunk.3YZHZGTM.js","./chunk.EQTSV7BK.js","./chunk.27CW6SCT.js","./chunk.YD3TKV6P.js","./chunk.4KC35UNR.js","./chunk.HT2BEOEV.js","./chunk.SDO3U72B.js","./chunk.7BBGRTXM.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.LA4CPZ2N.js"))));function ct({blocks:e,view:n}){let t=jn.current.homeView(e);return(0,D.jsx)(t,{...n})}var pt=jn.part((e,n)=>(0,D.jsx)(ct,{...n}),{what:"The home"});function ut(e){let n=t=>(0,D.jsx)(Fe.Suspense,{fallback:null,children:(0,D.jsx)(pt,{blocks:e,view:t})});return Object.defineProperty(n,Symbol.for("graview.home-blocks"),{value:!0}),n}function ft(e,n){return n.home&&n.home.length>0&&e.home?.(ut(n.home)),Yn(e,n),e.arrange?.(n.pages),e}function Yn(e,n,t){for(let r of on(n).drawn){if(t&&e.places().some(i=>i.title===r.title))continue;let o=dt(r),a={title:r.title,lens:r.lens,...r.across?{across:r.across}:{},...t?{beside:t}:{},...r.hidden?{hidden:!0}:{},over:r.kinds,...t?{}:{declared:!0}};for(let i of r.kinds)e.register(i,{cardinality:"many",fidelity:"full"},o,a),e.register(i,{cardinality:"many",fidelity:"summary"},o,a)}}function gt(e,n,t){t.length>0&&Yn(e,{schema:n,lenses:t.map(({lens:r,...o})=>({...o,name:r}))},!0)}function mt(e,n,t){gt(e,n,Ce(t))}var K=v(R(),1),we=v(S(),1);var Ve=e=>`graview:first-look:${e}`;function yt(e,n){if(e.seen!==void 0)try{return typeof e.seen=="function"?e.seen():e.seen}catch{return!0}try{return window.localStorage.getItem(Ve(n))!==null}catch{return!1}}function wt(e,n){if(e.seen===void 0)try{window.localStorage.setItem(Ve(n),"seen")}catch{}}var ht=O(C(()=>(__graviewPreload(import.meta.url,["./chunk.HT2BEOEV.js","./chunk.SDO3U72B.js","./chunk.7BBGRTXM.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.A6C4AGJJ.js")))),vt=ht.part((e,n)=>{let t=e.FirstLookHints;return(0,we.jsx)(t,{...n})},{quiet:!0});function bt({firstLook:e,root:n,app:t}){let r=(0,K.useRef)(null);r.current=e===!0?{}:e||null;let[o,a]=(0,K.useState)(()=>r.current!==null&&typeof window<"u"&&!yt(r.current,t)),i=(0,K.useCallback)(p=>{if(a(!1),p===null)return;let c=r.current??{};wt(c,t),c.onDone?.(p)},[t]);return!o||r.current===null?null:(0,we.jsx)(K.Suspense,{fallback:null,children:(0,we.jsx)(vt,{root:n,steps:r.current.steps??[],onEnd:i})})}export{pe as a,lr as b,kt as c,Sn as d,xt as e,Te as f,br as g,pr as h,ur as i,ue as j,fr as k,mr as l,yr as m,wr as n,M as o,Pr as p,Lr as q,Nn as r,Er as s,J as t,Tr as u,Wr as v,Zr as w,Jr as x,_r as y,Kr as z,Ce as A,et as B,Wn as C,Gn as D,nt as E,ft as F,gt as G,mt as H,rt as I,it as J,bt as K};
|
|
67
|
+
`):"";(0,y.useLayoutEffect)(I,[I,n,e,or,k?.current,oe,A,w,d]);let ir=w==="icons"||!Zn||A?"icons":"words";return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("header",{ref:H,className:"graview-bar","data-testid":"app-bar","data-graview-app-bar":"",...Qn&&A?{"data-finding":""}:{},children:[(0,s.jsx)("style",{children:Ar}),x,(0,s.jsxs)("div",{className:"graview-bar-row",children:[b?(0,s.jsx)("div",{className:"graview-bar-app",children:(0,s.jsx)(nr,{className:"graview-bar-name",children:(0,s.jsxs)(rr,{...r.href!==void 0?{href:r.href,onClick:tr(r.go)}:{type:"button",onClick:r.go},"data-testid":"app-home",...r.current?{"aria-current":"page"}:{},title:u?`${n} \u2014 ${u}`:`${n} \u2014 home`,className:"graview-bar-home",children:[(0,s.jsx)(He,{brand:e,size:20}),(0,s.jsx)("span",{className:"graview-bar-app-name","data-testid":"app-name",children:n})]})})}):null,o?(0,s.jsx)(Hr,{faces:o,form:w,drawn:ir}):null,(0,s.jsx)("div",{className:"graview-bar-mid",...qe?{"data-places":"standing"}:!A&&se?{"data-place":""}:{},children:A?null:se}),!A&&k&&k.places.length>1?(0,s.jsxs)("span",{className:"graview-bar-ruler","aria-hidden":"true","data-graview-bar-ruler":"",children:[k.places.map(m=>(0,s.jsx)("span",{className:"graview-bar-at",children:m.label},m.key)),(0,s.jsxs)("span",{className:"graview-bar-at",children:[Ne,(0,s.jsx)(Vn,{})]})]}):null,b?(0,s.jsx)("span",{className:"graview-bar-ruler","aria-hidden":"true",children:(0,s.jsx)("span",{className:"graview-bar-name",children:n})}):null,(0,s.jsxs)("div",{className:"graview-bar-tools",children:[d?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("button",{type:"button",className:"graview-bar-find-open",ref:We,"data-testid":"app-find-open","aria-label":"Find",title:"Find",onClick:er,style:{...J,display:void 0},children:(0,s.jsx)(Rr,{})}),(0,s.jsxs)("div",{className:"graview-bar-find","data-testid":"app-find",onBlur:m=>{let N=m.relatedTarget;N instanceof Node&&m.currentTarget.contains(N)||m.currentTarget.querySelector("input")?.value||Ge()},onKeyDownCapture:m=>{m.key==="Escape"&&A&&(ie.current=!0)},onKeyDown:m=>{m.key!=="Escape"||!A||(!m.defaultPrevented||!m.currentTarget.querySelector("input")?.value?Ge():ie.current=!1)},children:[(0,s.jsx)("div",{ref:P,className:"graview-bar-find-slot",children:l}),(0,s.jsx)(Mr,{})]})]}):null,(0,s.jsx)("div",{ref:B,className:"graview-bar-own","data-graview-bar-own":""}),De?(0,s.jsx)(y.Suspense,{fallback:null,children:(0,s.jsx)(xr,{scene:!oe,compact:A})}):null,(0,s.jsx)(Sr,{}),c]})]})]}),A&&se?(0,s.jsx)("div",{className:"graview-bar-line","data-graview-place-line":"","data-testid":"app-place-line",children:se}):null]})}function Hr({faces:e,form:n,drawn:t}){let r=o=>{let a=e[o];return(0,s.jsxs)("button",{type:"button",className:"graview-bar-face","data-testid":`app-face-${o}`,"aria-pressed":a.current,title:a.label,...a.reach&&!a.current?{onPointerEnter:a.reach,onPointerDown:a.reach,onFocus:a.reach}:{},onClick:()=>{a.current||a.go()},children:[o==="scene"?(0,s.jsx)(Fn,{}):(0,s.jsx)(Cr,{}),(0,s.jsx)("span",{children:a.label})]})};return(0,s.jsxs)("div",{className:"graview-bar-faces",role:"group","aria-label":`${e.scene.label} or ${e.pages.label}`,"data-testid":"app-faces","data-switch":n,"data-switch-drawn":t,children:[r("scene"),r("pages")]})}function Br(e){let n=e.querySelector(".graview-bar-faces"),t=e.querySelector(".graview-bar-mid"),r=e.querySelector(".graview-bar-find");if(!n||!t||r?.matches(":focus-within")||e.getBoundingClientRect().width<te)return null;let a=In(n),i=t.querySelector(".graview-bar-place-words"),p=i?parseFloat(getComputedStyle(i).fontSize)||14:0,c=i?Math.min(i.scrollWidth+34,14*p):0,d=Rn(e);if(d===null)return!1;let u=t.getBoundingClientRect().width-c-d;if(r&&r.getBoundingClientRect().width>0){let l=parseFloat(getComputedStyle(r).flexBasis);isFinite(l)&&(u-=Math.max(0,l-r.getBoundingClientRect().width))}return n.getAttribute("data-switch-drawn")==="icons"?u>=a+2:u>=-1}function Rn(e){let n=e.querySelector(".graview-bar-app"),t=e.querySelector(".graview-bar-ruler>.graview-bar-name");if(!n||!t)return 0;let r=i=>i?.getBoundingClientRect().width??0,o=r(n.firstElementChild)-r(e.querySelector(".graview-bar-app-name"))+r(t)+2,a=parseFloat(getComputedStyle(n).maxWidth)/100*(n.parentElement.clientWidth-2*n.offsetLeft)||1/0;return o>a+.5?null:Math.max(0,o-r(n))}var On=e=>e.button===0&&!(e.metaKey||e.ctrlKey||e.shiftKey||e.altKey);function Nr(){let e=globalThis.navigator?.platform??"";return/Mac|iPhone|iPad|iPod/.test(e)?"\u2318K":"Ctrl K"}function Mr(){let e=Sn(Y()?.aiDesk);return(0,s.jsx)("span",{className:"graview-bar-find-keys","data-testid":"app-find-keys","aria-hidden":"true",children:e?"/":Nr()})}function ae({size:e,box:n=e,children:t}){return(0,s.jsx)("svg",{width:e,height:e,viewBox:`0 0 ${n} ${n}`,"aria-hidden":"true",focusable:"false",style:{flex:"0 0 auto"},children:t})}function Fn(){return(0,s.jsxs)(ae,{size:14,children:[(0,s.jsx)("path",{d:"M7 1.5 L12.5 4.5 L7 7.5 L1.5 4.5 Z",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinejoin:"round"}),(0,s.jsx)("path",{d:"M1.5 7.5 L7 10.5 L12.5 7.5",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinejoin:"round",strokeLinecap:"round"})]})}function Cr(){return(0,s.jsxs)(ae,{size:14,children:[(0,s.jsx)("rect",{x:"2.25",y:"1.75",width:"9.5",height:"10.5",rx:"1.5",fill:"none",stroke:"currentColor",strokeWidth:"1.3"}),(0,s.jsx)("path",{d:"M4.5 5 H9.5 M4.5 7.25 H9.5 M4.5 9.5 H7.5",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]})}function Vn(){return(0,s.jsx)(ae,{size:10,children:(0,s.jsx)("path",{d:"M2 3.5 L5 6.5 L8 3.5",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})}function Rr(){return(0,s.jsxs)(ae,{size:16,children:[(0,s.jsx)("circle",{cx:"7",cy:"7",r:"4.75",fill:"none",stroke:"currentColor",strokeWidth:"1.5"}),(0,s.jsx)("path",{d:"M10.5 10.5 L14 14",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}function Or({place:e}){if(e.key===q)return(0,s.jsx)(Fn,{});if(e.group==="home")return(0,s.jsx)(ae,{size:13,box:14,children:(0,s.jsx)("path",{d:"M2 6.5 L7 2 L12 6.5 V12 H2 Z",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinejoin:"round"})});let n=e.kind?`hsl(${Math.round(Ze(e.kind))} 55% 52%`:"rgb(128 128 128";return(0,s.jsx)("span",{"aria-hidden":"true",style:{display:"inline-block",width:12,height:8,clipPath:"polygon(50% 0, 100% 50%, 50% 100%, 0 50%)",background:e.group==="lists"?`${n})`:`linear-gradient(${n}), ${n})) center / 6px 4px no-repeat, ${n} / 0.35)`}})}var Fr=[{group:"home"},{group:"lists",heading:"Lists"},{group:"pictures",heading:"Pictures"}],Ne="More";function Dn({place:e,current:n,reach:t,standing:r,done:o}){let a=e.key===n,i=t.href?.(e.path);return(0,s.jsxs)(i!==void 0?"a":"button",{className:r?"graview-bar-at":"graview-bar-item","data-testid":`app-place-${e.key}`,"data-place-path":e.path,...a?{"aria-current":"page"}:{},...i!==void 0?{href:i}:{type:"button"},onClick:c=>{o(),t.go&&(i!==void 0&&!On(c)||(c.preventDefault(),t.go(e)))},children:[r?null:(0,s.jsx)("span",{className:"graview-bar-mark",children:(0,s.jsx)(Or,{place:e})}),r&&a?(0,s.jsx)("span",{"data-testid":"app-place-current",children:e.label}):(0,s.jsx)("span",{children:e.label})]})}function Vr({places:e,current:n,reach:t,id:r,done:o}){return(0,s.jsx)(s.Fragment,{children:Fr.map(({group:a,heading:i})=>{let p=e.filter(d=>d.group===a);if(p.length===0)return null;let c=`${r}-${a}`;return(0,s.jsxs)("div",{role:"group",...i?{"aria-labelledby":c}:{"aria-label":p[0].label},"data-place-group":a,children:[i?(0,s.jsx)("p",{id:c,children:i}):null,(0,s.jsx)("ul",{children:p.map(d=>(0,s.jsx)("li",{children:(0,s.jsx)(Dn,{place:d,current:n,reach:t,standing:!1,done:o})},d.key))})]},a)})})}function Dr({places:e,current:n,here:t,reach:r,scene:o,stands:a}){let i=Q("places"),p=(0,y.useRef)(a);i.open||(p.current=a);let c=p.current,u=e.find(b=>b.key===n)?.label??t??"Places",l=c?e.filter((b,H)=>!c.includes(H)):e,g=Ir(e,n,o),w=Y(),h=w?.keptViews?.current(),x=!!(h&&(h.removed.length>0||w.views.places().some(b=>b.hidden)||h.may.lenses&&(w.views.arrangement?.()?.hide?.length??0)>0));return(0,s.jsxs)("nav",{className:c?"graview-bar-places":"graview-bar-place-at","aria-label":o?"What the scene shows":"The app\u2019s places",...c?{"data-testid":"app-places-standing"}:{},...g,children:[c?.map(b=>(0,s.jsx)(Dn,{place:e[b],current:n,reach:r,standing:!0,done:()=>{}},e[b].key)),l.length>0||x?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("button",{type:"button",className:c?"graview-bar-at":"graview-bar-place","data-testid":"app-places-open",...i.trigger,onClick:i.toggle,"aria-label":c?`${Ne} \u2014 ${l.length} more ${o?"pictures":"places"}`:`${u} \u2014 ${o?"everything the scene shows":"every place"}`,title:c?l.map(b=>b.label).join(", "):u,children:[c?Ne:(0,s.jsx)("span",{className:"graview-bar-place-words","data-testid":"app-place-current",children:u}),(0,s.jsx)(Vn,{})]}),(0,s.jsxs)("div",{...i.pane,"data-testid":"app-places",hidden:!i.open,className:"graview-bar-list",style:U,children:[(0,s.jsx)(Vr,{places:l,current:n,reach:r,id:i.pane.id,done:()=>i.setOpen(!1)}),x&&i.open?(0,s.jsx)(y.Suspense,{fallback:null,children:(0,s.jsx)(kr,{id:i.pane.id,scene:o,reach:r,done:()=>i.setOpen(!1)})}):null]})]}):null]})}function Ir(e,n,t){let r=Y()?.setMenuAt,o=a=>{let i=a.target.closest?.("[data-place-path],[data-testid=app-places-open]");if(!i||!r)return;let p={at:0};a.type==="pointerdown"?document.addEventListener("pointerup",()=>p.at||=Date.now(),{once:!0}):a.preventDefault();let c=a.nativeEvent;M.load().then(d=>d.placeGesture(c,i,e,n,t,r,p),String)};return{onContextMenu:a=>a.shiftKey||o(a),onKeyDown:a=>(a.key==="ContextMenu"||a.key==="F10"&&a.shiftKey)&&o(a),onPointerDown:a=>a.pointerType!=="mouse"&&a.isPrimary&&o(a)}}function $r(e,n,t,r){let o=e.querySelector("[data-graview-bar-ruler]"),a=e.querySelector(".graview-bar-mid");if(!o||!a)return null;let i=e.querySelector(".graview-bar-find");if(i?.matches(":focus-within"))return;if(e.getBoundingClientRect().width<te)return null;let p=Rn(e);if(p===null)return null;let c=[...o.children].map(H=>H.getBoundingClientRect().width),d=c.pop()??0,u=e.querySelector(".graview-bar-faces"),l=u&&t?In(u):0,g=u?.getAttribute("data-switch-drawn")==="words"?l:0,w=a.getBoundingClientRect().left+p,h=i?.getBoundingClientRect(),x=h&&h.width>0?h.right-w-(parseFloat(getComputedStyle(i).minWidth)||0)-16:a.getBoundingClientRect().width-p,b=[...r].map(H=>H!=="0");return Cn({widths:c,current:n,room:Math.floor(x+g-l),more:d,primary:b})?.join(",")??null}function In(e){return[...e.querySelectorAll(".graview-bar-face span")].reduce((n,t)=>n+t.scrollWidth+10,0)}var _r=e=>`graview:lenses:${e}`,Kr=(e,n)=>e?.name??n.kinds.join(",");function Ce(e){try{let n=JSON.parse(localStorage.getItem(_r(e))??"[]");return Array.isArray(n)?n.filter(t=>typeof t?.title=="string"&&typeof t.lens=="string"):[]}catch{return[]}}var _=v(R(),1);var E=v(S(),1);function Wr({scheme:e,onScheme:n,profileHref:t,keeping:r,hostActions:o=Gr,signature:a=!1}){let{store:i,principal:p,seats:c,people:d}=ce(),u=Q("profile"),l=u.open,[g,w]=(0,_.useState)(!1);(0,_.useEffect)(()=>jr(fe),[]),l&&!g&&w(!0),(0,_.useEffect)(()=>{l&&fe()},[l]);let h=p.id===void 0?void 0:i.graph.getNode(p.id),x=h===void 0?p.id===void 0?"Nobody in particular":Ue(p,{graph:i.graph,schema:i.schema,seats:c,people:d}):ze(i.schema.tryDefinition(h.kind),h);return(0,E.jsxs)("div",{style:{position:"relative"},children:[(0,E.jsx)("button",{type:"button","data-testid":"profile-button",...u.trigger,onClick:u.toggle,onPointerEnter:fe,onFocus:fe,"aria-label":`${x} \u2014 you, your seat and your settings`,title:`${x} \u2014 you, your seat and your settings`,style:{...J,borderRadius:999},children:(0,E.jsx)("span",{"aria-hidden":"true","data-testid":"profile-mark",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:Z-4,height:Z-4,borderRadius:999,fontSize:"0.8125rem",fontWeight:600,background:"var(--graview-panel-muted)",color:"var(--graview-ink)",border:"1px solid var(--graview-edge)"},children:Yr(x)})}),(0,E.jsxs)("section",{...u.pane,"aria-label":"Profile","data-testid":"profile","data-graview-offstage":"",hidden:!l,style:{...U,width:280,maxWidth:"calc(100vw - 32px)",maxHeight:"min(62cqh, 520px)",overflowY:"auto",overflowX:"hidden",display:l?"grid":"none",gap:12,padding:12,borderRadius:10,border:"1px solid var(--graview-edge)",background:"var(--graview-float)",boxShadow:"var(--graview-lift-high)"},children:[g?(0,E.jsx)(_.Suspense,{fallback:null,children:(0,E.jsx)(qr,{part:"top",name:x,me:h,profileHref:t,hostActions:o,close:()=>u.setOpen(!1)})}):null,(0,E.jsxs)("div",{className:"graview-profile-keeping","data-testid":"profile-keeping",style:Qr,children:[(0,E.jsx)("span",{style:Ur,children:"Keeping this app"}),r]}),g?(0,E.jsx)(_.Suspense,{fallback:null,children:(0,E.jsx)(zr,{part:"rest",name:x,me:h,scheme:e,onScheme:n,hostActions:o,signature:a,close:()=>u.setOpen(!1)})}):null]})]})}var Gr=[],fe=()=>M.prefetch(),qr=M.part((e,n)=>(0,E.jsx)(e.ProfilePane,{...n}),{what:"The rest of your menu"}),zr=M.part((e,n)=>(0,E.jsx)(e.ProfilePane,{...n}),{quiet:!0});function jr(e){let n=()=>{(typeof navigator>"u"||navigator.onLine!==!1)&&e()},t=globalThis;if(t.requestIdleCallback){let o=t.requestIdleCallback(n,{timeout:5e3});return()=>t.cancelIdleCallback?.(o)}let r=setTimeout(n,2500);return()=>clearTimeout(r)}function Yr(e){return(e.trim()[0]??"?").toUpperCase()}var Ur={fontSize:"0.75rem",letterSpacing:"0.14em",textTransform:"uppercase",color:"var(--graview-ink-faint)"},Qr={paddingTop:10,borderTop:"1px solid var(--graview-edge)"};function Zr(e){return!(e==="hidden"||e===!1)}var Re=v(R(),1);var $n="The whole thing",ge=e=>`scene:${e.kind}:${e.as}`;function _n(e){let{view:n}=e,t=e.places.filter(l=>!e.hidden.has(l.kind)),r=ne(t),o=(l,g)=>{if(l===q)return un(fn(g,!0),"view",null);let w=r.find(h=>ge(h)===l);return w?mn(g,w.over?.find(h=>g.focusId===re(h))??w.kind,w.as):null},a=n.within?.view,i=l=>n.focusId===re(l.kind)&&(a===void 0?t.filter(g=>g.kind===l.kind).at(-1)===l:a===l.as),p=t.find(l=>i(l)&&(a!==void 0||!n.overview)),c=p?r.find(l=>de(l,p)):void 0,d=r.filter(l=>!l.hidden||l===c);return{places:[{key:q,label:$n,path:`${Se}${Le(o(q,Pe))}`,group:"home"},...d.map(l=>({key:ge(l),label:j(l,t,e.schema),path:`${Se}${Le(o(ge(l),Pe))}`,group:"pictures",kind:l.kind,hidden:l.hidden}))],current:c?ge(c):q,to:o}}function Jr(){let{store:e,views:n,hiddenKinds:t}=ce(),{view:r,go:o}=bn(),a=n.places(),i=(0,Re.useMemo)(()=>_n({places:a,hidden:t,view:r,schema:e.schema}),[a,t,r,e.schema]),p=(0,Re.useMemo)(()=>({go:c=>{let d=i.to(c.key,r);d&&o(d)}}),[i,r,o]);return{places:i.places,current:i.current,reach:p}}var X=v(R(),1);var F=v(S(),1),Xr=M.part((e,n)=>(0,F.jsx)(e.ProblemRows,{...n}),{what:"The problems",as:"li"}),Oe=()=>M.prefetch();function et({clean:e="All rules hold"}){let n=vn(),{set:t}=hn(),r=n.length,[o,a]=(0,X.useState)(!1),i=Q("problems",{open:o&&r>0,onOpenChange:a}),p=i.open,c=Wn(n,e);return(0,X.useEffect)(()=>{if(r===0)return;let d=setTimeout(Oe,1500);return()=>clearTimeout(d)},[r>0]),(0,F.jsxs)("div",{style:{position:"relative",display:"inline-flex"},children:[(0,F.jsxs)("button",{type:"button","data-testid":"standing",...i.trigger,"aria-disabled":r===0?!0:void 0,"aria-label":c,onClick:r===0?void 0:i.toggle,onPointerEnter:r===0?void 0:Oe,onFocus:r===0?void 0:Oe,title:c,style:{...J,padding:r===0?0:"0 8px",cursor:r===0?"default":"pointer",color:r===0?"var(--graview-ink-muted)":Kn(n),fontVariantNumeric:"tabular-nums",fontWeight:600},children:[(0,F.jsx)(Gn,{tone:r===0?"var(--graview-good)":Kn(n)}),r>0?(0,F.jsx)("span",{"aria-hidden":"true",children:r}):null]}),p?(0,F.jsx)("ol",{...i.pane,"data-testid":"problems",style:{...U,width:300,maxHeight:"min(48cqh, 420px)",overflow:"auto",margin:0,padding:4,listStyle:"none",display:"grid",borderRadius:10,border:"1px solid var(--graview-edge)",background:"var(--graview-float)",boxShadow:"var(--graview-lift-high)"},children:(0,F.jsx)(X.Suspense,{fallback:null,children:(0,F.jsx)(Xr,{violations:n,pick:d=>{t(d.nodeIds),i.setOpen(!1)}})})}):null]})}function Wn(e,n){return e.length===0?n:`${Qe(e)} \u2014 open what is broken, and what would fix it`}var Kn=e=>e.some(n=>n.status==="could-not-judge"||n.status==="over-budget")?"var(--graview-bad)":"var(--graview-warn)";function Gn({tone:e}){return(0,F.jsx)("span",{"aria-hidden":"true",style:{width:8,height:8,borderRadius:999,flex:"0 0 auto",background:e}})}function nt(e,n,t=[]){if(e.focusId)return e.focusId;let o=(e.selection??[]).map(gn).find(a=>a!==null)??t.find(a=>n.includes(a))??n[0]??null;return o===null?null:re(o)}var ye=v(S(),1),me=O(C(()=>(__graviewPreload(import.meta.url,["./chunk.CFKZXLXS.js","./chunk.Y5C4RXG7.js","./chunk.7MHCGVGM.js","./chunk.FRYBMS3W.js","./chunk.NGTRL5U4.js","./chunk.3MOJF7BA.js","./chunk.LZIBQ3VX.js","./chunk.TAT2IQUR.js","./chunk.3XGA65Y3.js","./chunk.BYKD5RLA.js","./chunk.2K4TT2BV.js","./chunk.VUBNBTJP.js","./chunk.WVUJXDXZ.js","./chunk.7VKSXGTX.js","./chunk.TY4GQJKC.js","./chunk.6ZQAR5ZA.js","./chunk.W3W54DSX.js","./chunk.PI44XMY2.js","./chunk.KGW75Z5L.js","./chunk.GZHZLJBF.js","./chunk.IOK4GVJC.js","./chunk.OJGHDWI6.js","./chunk.TLJOZSDD.js","./chunk.MSWWWLEA.js","./chunk.UITT6JWW.js","./chunk.A5PDXNY6.js","./chunk.WC3DENU4.js","./chunk.VNDKKTED.js","./chunk.4MP72LPR.js","./chunk.SDO3U72B.js","./chunk.VSCIXAHN.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.3IZ3ABII.js"))));function rt(){return me.load().then(()=>{})}var tt=[{cardinality:"one",fidelity:"full",slot:"page"},{cardinality:"one",fidelity:"summary",slot:"card"},{cardinality:"one",fidelity:"glyph",slot:"row"},{cardinality:"many",fidelity:"full"},{cardinality:"many",fidelity:"summary"},{cardinality:"many",fidelity:"glyph"}];function at({schema:e,specs:n,kind:t,view:r}){let o=me.current.frameworkViews(e,n).lookup(t,{cardinality:r.cardinality,fidelity:r.fidelity});return o?(0,ye.jsx)(o,{...r}):null}var ot=me.part((e,n)=>(0,ye.jsx)(at,{...n}),{what:"This view"});function qn(e,n,t){for(let r of n.kinds){let o=t?.[r];for(let a of tt){let i=c=>(0,ye.jsx)(ot,{schema:n,specs:t,kind:r,view:c}),p=a.slot!==void 0&&o?.[a.slot]!==void 0;p&&(i.says=(c,d)=>me.current?.frameworkViews(n,t).lookup(r,{cardinality:a.cardinality,fidelity:a.fidelity})?.says?.(c,d)),e.register(r,{cardinality:a.cardinality,fidelity:a.fidelity},p?i:yn(i))}}return e}function it(e,n){return qn(wn(e),e,n)}var Fe=v(R(),1);var D=v(S(),1),zn=O(C(()=>(__graviewPreload(import.meta.url,["./chunk.JEYQBH33.js","./chunk.MVWC3VR3.js","./chunk.CC5BJH5A.js","./chunk.QI4SLPQ4.js","./chunk.CFKZXLXS.js","./chunk.Y5C4RXG7.js","./chunk.7MHCGVGM.js","./chunk.FRYBMS3W.js","./chunk.LQVAABPS.js","./chunk.NGTRL5U4.js","./chunk.3MOJF7BA.js","./chunk.LZIBQ3VX.js","./chunk.HJCQ6I3S.js","./chunk.QDSEVPF3.js","./chunk.7N32AVIJ.js","./chunk.IHBUBZQT.js","./chunk.TAT2IQUR.js","./chunk.3XGA65Y3.js","./chunk.BYKD5RLA.js","./chunk.2K4TT2BV.js","./chunk.VUBNBTJP.js","./chunk.OLFJH4RK.js","./chunk.67U6M7OV.js","./chunk.ZP5RT2EK.js","./chunk.VZJWJ5XM.js","./chunk.GLWSVSQL.js","./chunk.VFOON3Z3.js","./chunk.WVUJXDXZ.js","./chunk.7VKSXGTX.js","./chunk.TY4GQJKC.js","./chunk.6ZQAR5ZA.js","./chunk.W3W54DSX.js","./chunk.PI44XMY2.js","./chunk.KGW75Z5L.js","./chunk.GZHZLJBF.js","./chunk.IOK4GVJC.js","./chunk.OJGHDWI6.js","./chunk.TLJOZSDD.js","./chunk.MSWWWLEA.js","./chunk.UITT6JWW.js","./chunk.A5PDXNY6.js","./chunk.WC3DENU4.js","./chunk.VNDKKTED.js","./chunk.4MP72LPR.js","./chunk.SDO3U72B.js","./chunk.VSCIXAHN.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.WQ6RCEUQ.js"))));function st({lens:e,view:n}){let t=zn.current.declaredLensView(e);return(0,D.jsx)(t,{...n})}var lt=zn.part((e,n)=>(0,D.jsx)(st,{...n}),{what:"This picture"});function dt(e){let n=r=>(0,D.jsx)(Fe.Suspense,{fallback:null,children:(0,D.jsx)(lt,{lens:e,view:r})});e.lens==="blocks"&&(n.flows=!0);let t=e.lens==="blocks"?e.options.blocks?.[0]:void 0;return typeof t?.headline=="string"&&(n.lede=t),e.create===!1&&(n.creates=!1),n}var jn=O(C(()=>(__graviewPreload(import.meta.url,["./chunk.CFKZXLXS.js","./chunk.Y5C4RXG7.js","./chunk.7MHCGVGM.js","./chunk.FRYBMS3W.js","./chunk.NGTRL5U4.js","./chunk.3MOJF7BA.js","./chunk.LZIBQ3VX.js","./chunk.TAT2IQUR.js","./chunk.3XGA65Y3.js","./chunk.BYKD5RLA.js","./chunk.2K4TT2BV.js","./chunk.VUBNBTJP.js","./chunk.WVUJXDXZ.js","./chunk.7VKSXGTX.js","./chunk.TY4GQJKC.js","./chunk.6ZQAR5ZA.js","./chunk.W3W54DSX.js","./chunk.PI44XMY2.js","./chunk.KGW75Z5L.js","./chunk.GZHZLJBF.js","./chunk.IOK4GVJC.js","./chunk.OJGHDWI6.js","./chunk.TLJOZSDD.js","./chunk.MSWWWLEA.js","./chunk.UITT6JWW.js","./chunk.A5PDXNY6.js","./chunk.WC3DENU4.js","./chunk.VNDKKTED.js","./chunk.4MP72LPR.js","./chunk.SDO3U72B.js","./chunk.VSCIXAHN.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.BLPYNNR4.js"))));function ct({blocks:e,view:n}){let t=jn.current.homeView(e);return(0,D.jsx)(t,{...n})}var pt=jn.part((e,n)=>(0,D.jsx)(ct,{...n}),{what:"The home"});function ut(e){let n=t=>(0,D.jsx)(Fe.Suspense,{fallback:null,children:(0,D.jsx)(pt,{blocks:e,view:t})});return Object.defineProperty(n,Symbol.for("graview.home-blocks"),{value:!0}),n}function ft(e,n){return n.home&&n.home.length>0&&e.home?.(ut(n.home)),Yn(e,n),e.arrange?.(n.pages),e}function Yn(e,n,t){for(let r of on(n).drawn){if(t&&e.places().some(i=>i.title===r.title))continue;let o=dt(r),a={title:r.title,lens:r.lens,...r.across?{across:r.across}:{},...t?{beside:t}:{},...r.hidden?{hidden:!0}:{},over:r.kinds,...t?{}:{declared:!0}};for(let i of r.kinds)e.register(i,{cardinality:"many",fidelity:"full"},o,a),e.register(i,{cardinality:"many",fidelity:"summary"},o,a)}}function gt(e,n,t){t.length>0&&Yn(e,{schema:n,lenses:t.map(({lens:r,...o})=>({...o,name:r}))},!0)}function mt(e,n,t){gt(e,n,Ce(t))}var K=v(R(),1),we=v(S(),1);var Ve=e=>`graview:first-look:${e}`;function yt(e,n){if(e.seen!==void 0)try{return typeof e.seen=="function"?e.seen():e.seen}catch{return!0}try{return window.localStorage.getItem(Ve(n))!==null}catch{return!1}}function wt(e,n){if(e.seen===void 0)try{window.localStorage.setItem(Ve(n),"seen")}catch{}}var ht=O(C(()=>(__graviewPreload(import.meta.url,["./chunk.4MP72LPR.js","./chunk.SDO3U72B.js","./chunk.VSCIXAHN.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.VADQ7ZGA.js")))),vt=ht.part((e,n)=>{let t=e.FirstLookHints;return(0,we.jsx)(t,{...n})},{quiet:!0});function bt({firstLook:e,root:n,app:t}){let r=(0,K.useRef)(null);r.current=e===!0?{}:e||null;let[o,a]=(0,K.useState)(()=>r.current!==null&&typeof window<"u"&&!yt(r.current,t)),i=(0,K.useCallback)(p=>{if(a(!1),p===null)return;let c=r.current??{};wt(c,t),c.onDone?.(p)},[t]);return!o||r.current===null?null:(0,we.jsx)(K.Suspense,{fallback:null,children:(0,we.jsx)(vt,{root:n,steps:r.current.steps??[],onEnd:i})})}export{pe as a,lr as b,kt as c,Sn as d,xt as e,Te as f,br as g,pr as h,ur as i,ue as j,fr as k,mr as l,yr as m,wr as n,M as o,Pr as p,Lr as q,Nn as r,Er as s,J as t,Tr as u,Wr as v,Zr as w,Jr as x,_r as y,Kr as z,Ce as A,et as B,Wn as C,Gn as D,nt as E,ft as F,gt as G,mt as H,rt as I,it as J,bt as K};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b}from"./chunk.JEYQBH33.js";import"./chunk.MVWC3VR3.js";import"./chunk.CC5BJH5A.js";import"./chunk.QI4SLPQ4.js";import"./chunk.CFKZXLXS.js";import"./chunk.Y5C4RXG7.js";import"./chunk.7MHCGVGM.js";import"./chunk.FRYBMS3W.js";import"./chunk.LQVAABPS.js";import"./chunk.NGTRL5U4.js";import"./chunk.3MOJF7BA.js";import"./chunk.LZIBQ3VX.js";import"./chunk.HJCQ6I3S.js";import"./chunk.QDSEVPF3.js";import"./chunk.7N32AVIJ.js";import"./chunk.IHBUBZQT.js";import"./chunk.TAT2IQUR.js";import"./chunk.3XGA65Y3.js";import"./chunk.BYKD5RLA.js";import"./chunk.2K4TT2BV.js";import"./chunk.VUBNBTJP.js";import"./chunk.OLFJH4RK.js";import"./chunk.67U6M7OV.js";import"./chunk.ZP5RT2EK.js";import"./chunk.VZJWJ5XM.js";import"./chunk.GLWSVSQL.js";import"./chunk.VFOON3Z3.js";import"./chunk.WVUJXDXZ.js";import"./chunk.7VKSXGTX.js";import"./chunk.TY4GQJKC.js";import"./chunk.6ZQAR5ZA.js";import"./chunk.W3W54DSX.js";import"./chunk.PI44XMY2.js";import"./chunk.KGW75Z5L.js";import"./chunk.GZHZLJBF.js";import"./chunk.IOK4GVJC.js";import"./chunk.OJGHDWI6.js";import"./chunk.TLJOZSDD.js";import"./chunk.MSWWWLEA.js";import"./chunk.UITT6JWW.js";import"./chunk.A5PDXNY6.js";import"./chunk.WC3DENU4.js";import"./chunk.VNDKKTED.js";import"./chunk.4MP72LPR.js";import"./chunk.SDO3U72B.js";import"./chunk.VSCIXAHN.js";import"./chunk.FQLNBIQ5.js";import"./chunk.AJZBJBMO.js";export{b as declaredLensView,a as formatFor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as y,b as h}from"./chunk.
|
|
1
|
+
import{a as y,b as h}from"./chunk.F6V7RWDK.js";import"./chunk.RQOX5YDW.js";import"./chunk.W3W54DSX.js";import"./chunk.PI44XMY2.js";import"./chunk.KGW75Z5L.js";import{id as b}from"./chunk.VSCIXAHN.js";import"./chunk.FQLNBIQ5.js";import"./chunk.AJZBJBMO.js";var k=(d,i)=>({id:i.id,said:h(d,i),when:i.when,...i.alsoMine?{alsoMine:!0}:{}});async function A(d,i,t){let a=b(t.principal);if(a.id===void 0)return{ok:!1,error:"This seat acts for nobody the app knows by id, so there is nobody to tell. Nothing was kept."};let r=t.store.seenBy(a),p=async()=>(await t.subscriptions.list(a.id)).filter(n=>n.app===t.app);if(d==="list_subscriptions")return{ok:!0,data:{subscriptions:(await p()).map(n=>k(r,n))}};if(d==="unsubscribe"){let n=String(i.id??"");return(await p()).some(g=>g.id===n)?(await t.subscriptions.remove(n),{ok:!0,data:{removed:n}}):{ok:!1,error:`No subscription "${n}" of yours. list_subscriptions says which there are.`}}let o=String(i.on??""),c=n=>typeof i[n]=="string"&&i[n].trim()!==""?i[n].trim():void 0,e=c("record");if(e!==void 0&&!r.graph.getNode(e)){let n=t.store.resolveRef({name:"record",kinds:["*"]},e,a);if(!n.ok)return{ok:!1,error:`${n.message} Nothing was kept.`};e=n.id}let s=c("kind")??(e!==void 0&&o!=="act"?r.graph.getNode(e)?.kind:void 0),f=c("act"),m=c("condition"),u=o==="act"?{on:o,...f!==void 0?{act:f}:{},...e!==void 0?{record:e}:{}}:o==="created"&&s!==void 0?{on:o,kind:s}:o==="changed"?{on:o,...s!==void 0&&e===void 0?{kind:s}:{},...e!==void 0?{record:e}:{}}:o==="reaches"&&s!==void 0?{on:o,kind:s,condition:m??"",...e!==void 0?{record:e}:{}}:void 0;if(!u)return{ok:!1,error:'Say what to be told of: on is "act", "created", "changed" or "reaches", with a kind (or a record) for all but act. Nothing was kept.'};let l=y({schema:r.schema,allMutations:()=>t.store.allMutations(),graph:r.graph},u);if(l)return{ok:!1,error:`${l} Nothing was kept.`};let S=await t.subscriptions.add({who:a,app:t.app,when:u,...i.alsoMine===!0?{alsoMine:!0}:{}});return{ok:!0,data:{subscription:k(r,S)}}}export{A as runSubscriptionTool};
|
|
@@ -0,0 +1 @@
|
|
|
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 D,g as ae,h as re}from"./chunk.KDRLUBVF.js";import{a as te,b as ne,c as ie}from"./chunk.PNW5K7BW.js";import{b}from"./chunk.ENL2JJ47.js";import{d as j}from"./chunk.3XGA65Y3.js";import{a as ee}from"./chunk.VZJWJ5XM.js";import{a as A}from"./chunk.MSWWWLEA.js";import{j as Z}from"./chunk.WC3DENU4.js";import{G as V,Ga as K,J as Y,O as T,P as M,Ra as Q,T as _,Va as X,ba as w,ja as J}from"./chunk.4MP72LPR.js";import{a as G}from"./chunk.SDO3U72B.js";import{$a as B,_a as q,da as F,fe as U,ga as P,zb as x}from"./chunk.VSCIXAHN.js";import{b as O}from"./chunk.AJZBJBMO.js";var c=O(V(),1);var oe=O(V(),1);function se(){let{ai:n,aiDesk:i}=w(),{entries:a}=Y(i),r=n.off===!0;return(0,oe.useEffect)(()=>{r||i.load()},[i,r]),r?[]:a}var e=O(_(),1),le=K(G(()=>(__graviewPreload(import.meta.url,["./chunk.YEBGI6ED.js","./chunk.HDUO2USQ.js","./chunk.WC3DENU4.js","./chunk.VNDKKTED.js","./chunk.4MP72LPR.js","./chunk.SDO3U72B.js","./chunk.VSCIXAHN.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.CMN6BBAD.js")))),ce=le.part((n,i)=>(0,e.jsx)(n.InteractionRow,{...i}),{quiet:!0,as:"li"}),ye=le.part((n,i)=>(0,e.jsx)(n.ActivityFilter,{...i}),{quiet:!0,as:"div"}),fe=n=>n.undoes===void 0&&n.primitives.some(i=>i.op==="remove-node"||i.op==="patch-node"&&i.after[B]===!0&&i.before[B]!==!0);function me(n){let i=[...new Set(n.ops.filter(a=>!x(a)&&fe(a)).map(a=>a.intent))].filter(a=>a!==n.intent);return i.length===0?n.intent:`${n.intent} \u2014 ${i.join("; ")}`}var de=(n,i,a=pe(n,[i]))=>({intent:me(i),author:i.author.kind,...i.author.id?{authorId:i.author.id}:{},by:i.author,...i.ops[0]?.via?{via:i.ops[0].via}:{},...i.lineage?{basis:ee(i.lineage)}:{},touched:[...new Set(i.ops.filter(r=>!x(r)).flatMap(r=>r.writes))],...we(i.ops.filter(r=>!x(r)).flatMap(r=>r.writes),a),batch:i.id,at:i.at,...i.lineage?.interaction?{interaction:i.lineage.interaction}:{},seq:i.ops.at(-1).seq+1,...i.ops.every(x)?{withheld:!0}:{}});function ve(n=4){let{store:i,principal:a}=w(),r=M(i,a),s=r.log.length;return(0,c.useMemo)(()=>{let d=r.batches(),l=pe(r,d);return ne(d,o=>r.log.get(o)).reverse().slice(0,n).map(o=>{if("batch"in o){let p=de(r,o.batch,l);return o.typed?{...p,intent:te(o.typed,r.schema,r.graph),batches:o.typed.batches.filter(k=>!k.undone).map(k=>k.id)}:p}let u=[...o.digest.batches].reverse().map(p=>de(r,p,l));return{intent:ie(o.digest),author:o.digest.author.kind,...o.digest.author.id?{authorId:o.digest.author.id}:{},by:o.digest.author,touched:[...new Set(u.flatMap(p=>p.touched))],batch:"",...u[0]?.at?{at:u[0].at}:{},seq:u[0]?.seq??0,digest:u}})},[r,s,n])}function pe(n,i){let a=new Map;for(let r of i)for(let s of r.ops)if(!x(s))for(let d of s.primitives)(d.op==="add-node"||d.op==="remove-node")&&d.node&&a.set(d.node.id,P(n.schema.tryDefinition(d.node.kind),d.node));return a}function we(n,i){let a={};for(let r of n){let s=i.get(r);s!==void 0&&(a[r]=s)}return Object.keys(a).length>0?{named:a}:{}}function ke({change:n}){let{store:i,principal:a,seats:r,people:s}=w();return(0,e.jsxs)("strong",{style:{fontWeight:600},children:[n.author==="human"&&n.by?.onBehalfOf===void 0&&(n.authorId===void 0||a.id===void 0||n.authorId===a.id)?"you":q(n.by??{kind:n.author,id:n.authorId},{graph:i.graph,schema:i.schema,seats:r,people:s}),A(n.via)?(0,e.jsxs)("span",{style:{fontWeight:400,color:"var(--graview-ink-muted)"},children:[", ",A(n.via)]}):null]})}function be({change:n,goes:i}){let{store:a}=w(),[r,s]=(0,c.useState)(!1),d=n.digest??[];return(0,e.jsxs)("li",{"data-testid":"activity-digest",style:{display:"grid",gap:5,lineHeight:1.45},children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:6},children:[(0,e.jsxs)("span",{style:{minWidth:0},children:[(0,e.jsx)(ke,{change:n})," ",(0,e.jsx)("span",{style:{color:"var(--graview-ink-muted)"},children:n.intent})]}),(0,e.jsx)("button",{type:"button","data-testid":"digest-toggle","aria-expanded":r,onClick:()=>s(l=>!l),style:{marginLeft:"auto",flex:"0 0 auto",display:"inline-flex",alignItems:"center",minHeight:24,minWidth:24,padding:"1px 8px",fontSize:"0.75rem"},children:r?"Hide":"Show each"})]}),r?(0,e.jsx)("ol",{"data-testid":"digest-changes",style:{margin:0,padding:"0 0 0 10px",listStyle:"none",display:"grid",gap:6,borderLeft:"1px solid var(--graview-edge)"},children:d.map(l=>(0,e.jsxs)("li",{"data-testid":"digest-change",style:{display:"grid",gap:3},children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:6},children:[(0,e.jsxs)("span",{style:{minWidth:0},children:[(0,e.jsx)("span",{style:{color:"var(--graview-ink-muted)"},children:l.intent}),l.basis?(0,e.jsxs)("span",{"data-graview-lineage":"",style:{color:"var(--graview-ink-faint)"},children:[" \xB7 ",l.basis]}):null]}),l.withheld?null:(0,e.jsx)(N,{batch:l.batch})]}),l.touched.length>0?(0,e.jsx)("div",{"data-touched":l.touched.join(" "),style:{display:"flex",flexWrap:"wrap",gap:4},children:l.touched.slice(0,4).map(o=>(0,e.jsx)(H,{id:o,label:a.graph.has(o)?b(a,o):l.named?.[o]??b(a,o),go:i(o)},o))}):null]},l.batch))}):null]})}function N({batch:n}){let{store:i,principal:a,noteSeat:r}=w(),s=M(i,a),d=T()?.open??!1,l=s.log.length,[o,u]=(0,c.useState)(null),p=(0,c.useMemo)(()=>s.canUndo(n),[s,n,l]),k=(0,c.useMemo)(()=>p.ok?s.mayUndo(n,a):{ok:!0},[s,n,l,a,p]);if(d||!p.ok&&p.ops.length===0||!k.ok)return null;let f=!p.ok,I=f?p.includeBatches:[];return(0,e.jsxs)("span",{style:{marginLeft:"auto",flex:"0 0 auto",display:"grid",justifyItems:"end",gap:2},children:[(0,e.jsx)("button",{type:"button","data-testid":"undo-turn",title:f?`${p.message} \u2014 undo those too`:"Take this back, keeping everything since",onClick:()=>{u(null);try{let m=typeof n=="string"?[n]:n,C=s.log.all().find(W=>m.includes(W.batch)&&W.author.kind==="agent");s.undo(f?[...m,...I]:typeof n=="string"?n:[...n],{author:a}),C&&r({type:"home",author:C.author})}catch(m){u(m instanceof Error?m.message:String(m))}},style:{display:"inline-flex",alignItems:"center",minHeight:24,minWidth:24,padding:"1px 8px",fontSize:"0.75rem",...f?{borderColor:"var(--graview-warn)",color:"var(--graview-warn)"}:{}},children:f?`undo +${I.length}`:"undo"}),o?(0,e.jsx)("span",{"data-testid":"undo-refused",role:"alert",style:{fontSize:"0.75rem",lineHeight:1.4,color:"var(--graview-warn)",maxWidth:260,textAlign:"right"},children:o}):null]})}function xe({seq:n,intent:i}){let a=T();if(!a)return null;let r=a.past?.seq===n;return(0,e.jsx)("button",{type:"button","data-testid":"show-past","aria-label":`Show the app as it was after \u201C${i}\u201D`,title:"Show the app as it was here","aria-pressed":r,onPointerEnter:D,onFocus:D,onClick:()=>a.show(n),style:{display:"inline-flex",alignItems:"center",justifyContent:"center",minHeight:24,minWidth:24,padding:"1px 6px",fontSize:"0.75rem",flex:"0 0 auto"},children:(0,e.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 16 16","aria-hidden":"true",focusable:"false",children:[(0,e.jsx)("path",{d:"M2.5 8 a5.5 5.5 0 1 0 1.6-3.9",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),(0,e.jsx)("path",{d:"M2 2.5 V5.5 H5",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,e.jsx)("path",{d:"M8 5 V8 L10 9.25",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})})}function Se(){let n=()=>U(window.location.href);return(0,e.jsx)("a",{href:"#fresh","data-testid":"start-fresh",title:"Forget every edit made in this browser and return to the example",onClick:i=>{i.preventDefault(),window.location.assign(n())},style:{display:"inline-flex",alignItems:"center",minHeight:24,minWidth:24,fontSize:"0.8125rem",color:"var(--graview-ink-muted)",textDecoration:"underline",textDecorationColor:"var(--graview-edge-bright)",textUnderlineOffset:3},children:"Start fresh"})}function H({id:n,label:i,go:a}){return a?(0,e.jsx)("button",{type:"button","data-testid":"activity-record","data-record":n,title:`Go to ${i}`,onClick:()=>a(n),style:{all:"unset",display:"inline-flex",cursor:"pointer",borderRadius:7},className:"graview-activity-record",children:(0,e.jsx)(j,{label:i})}):(0,e.jsx)(j,{label:i})}function De({calls:n,seat:i,remembers:a=!1}){let r=ve(),{store:s,principal:d,seats:l,people:o}=w(),u=se(),[p,k]=(0,c.useState)("all"),[f,I]=(0,c.useState)(!1),m=t=>t!==void 0&&(t.id===d.id||t.onBehalfOf?.id===d.id)&&d.id!==void 0,C=new Set(u.map(t=>t.id)),W=r.filter(t=>!(t.interaction!==void 0&&C.has(t.interaction))&&(!f||m(t.by))),ge=u.filter(t=>!f||m(t.by)).slice(0,4),R=[...p==="ai"?[]:W.map(t=>({at:t.at??"",change:t})),...p==="changes"?[]:ge.map(t=>({at:t.at,entry:t}))].sort((t,y)=>t.at<y.at?1:t.at>y.at?-1:0),v=M(s,d),z=n.some(t=>t.phase==="running"),ue=ae(),S=X("activity"),$=S.open,he=J(),E=T(),L=t=>v.graph.has(t)?y=>{S.setOpen(!1),E?.past&&E.show(null),he.record(y)}:null;return i===void 0&&n.length===0&&r.length===0&&u.length===0&&!a&&ue===0?null:(0,e.jsxs)("div",{style:{position:"relative"},children:[(0,e.jsxs)("button",{type:"button","data-testid":"activity-button",...S.trigger,onClick:S.toggle,title:z?"An agent is working":"What has happened",style:{display:"inline-flex",alignItems:"center",gap:6,minHeight:30,padding:"0 8px",borderRadius:8,border:"1px solid transparent",background:"transparent",boxShadow:"none",fontSize:"0.875rem",whiteSpace:"nowrap",color:z?"var(--graview-accent)":"var(--graview-ink-muted)"},children:[z?(0,e.jsx)("span",{"aria-hidden":"true",style:{width:6,height:6,borderRadius:999,background:"var(--graview-accent)"}}):null,r.length>0?r.length:"",(0,e.jsxs)("svg",{className:"graview-activity-mark",width:"15",height:"15",viewBox:"0 0 16 16","aria-hidden":"true",focusable:"false",style:{display:"var(--graview-activity-mark, none)"},children:[(0,e.jsx)("circle",{cx:"8",cy:"8",r:"5.75",fill:"none",stroke:"currentColor",strokeWidth:"1.4"}),(0,e.jsx)("path",{d:"M8 4.75 V8 L10.25 9.5",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})]}),(0,e.jsx)("span",{className:"graview-activity-word",children:" Activity"})]}),!$&&i!==void 0?(0,e.jsx)("div",{hidden:!0,"data-testid":"agent-seat-seated",children:i}):null,$?(0,e.jsxs)("section",{...S.pane,"aria-label":"Activity","data-testid":"activity","data-graview-offstage":"",style:{...Q,width:300,maxHeight:"min(52cqh, 460px)",overflow:"auto",display:"flex",flexDirection:"column",gap:9,padding:12,borderRadius:10,border:"1px solid var(--graview-edge)",background:"var(--graview-float)",boxShadow:"var(--graview-lift-high)"},children:[(0,e.jsx)("h2",{style:{...Z,margin:0},children:"Activity"}),i!==void 0?(0,e.jsxs)("div",{"data-testid":"agent-seat-row",style:{display:"grid",gap:5,paddingBottom:n.length>0||R.length>0?9:0,...n.length>0||R.length>0?{borderBottom:"1px solid var(--graview-edge)"}:{}},children:[(0,e.jsx)("span",{style:{fontSize:"0.75rem",letterSpacing:"0.14em",textTransform:"uppercase",color:"var(--graview-ink-faint)"},children:"The agent's seat"}),i]}):null,n.length>0?(0,e.jsx)("ol",{style:{margin:0,padding:0,listStyle:"none",display:"grid",gap:7},children:n.slice(0,6).map((t,y)=>(0,e.jsxs)("li",{style:{display:"grid",gap:2,fontSize:"0.8125rem",lineHeight:1.45},children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:6},children:[(0,e.jsx)("span",{"aria-hidden":"true",style:{width:6,height:6,borderRadius:999,flex:"0 0 auto",background:t.phase==="running"?"var(--graview-accent)":t.phase==="failed"?"var(--graview-warn)":"var(--graview-edge-bright)"}}),(0,e.jsxs)("span",{style:{color:"var(--graview-ink)"},children:[t.mutating?"changed":"read"," \xB7"," ",v.allMutations().find(g=>g.name===t.name)?.title??F(t.name)]})]}),!t.mutating&&t.reads&&t.reads.length>0?(0,e.jsxs)("div",{"data-testid":"activity-reads",style:{display:"flex",flexWrap:"wrap",gap:4,paddingLeft:12},children:[[...new Set(t.reads)].slice(0,3).map(g=>(0,e.jsx)(H,{id:g,label:b(v,g),go:L(g)},g)),new Set(t.reads).size>3?(0,e.jsxs)("span",{style:{color:"var(--graview-ink-muted)"},children:["+",new Set(t.reads).size-3]}):null]}):Object.values(t.args).some(g=>typeof g=="string")?(0,e.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:4,paddingLeft:12},children:Object.entries(t.args).filter(g=>typeof g[1]=="string").slice(0,3).map(([g,h])=>(0,e.jsx)(H,{id:h,label:b(v,h),go:L(h)},g))}):null,t.error?(0,e.jsx)("div",{style:{paddingLeft:12,color:"var(--graview-warn)"},children:t.error}):null]},`${t.at}:${y}`))}):null,u.length>0?(0,e.jsx)(c.Suspense,{fallback:null,children:(0,e.jsx)(ye,{shows:p,onShows:k,mine:f,onMine:I})}):null,R.length>0?(0,e.jsx)("ol",{"data-testid":"diff-log",style:{margin:0,padding:0,listStyle:"none",display:"grid",gap:6,fontSize:"0.8125rem"},children:R.map(({change:t,entry:y},g)=>y!==void 0?(0,e.jsx)(c.Suspense,{fallback:null,children:(0,e.jsx)(ce,{entry:y,undo:h=>(0,e.jsx)(N,{batch:h})})},`ai:${y.id}`):t.digest?(0,e.jsx)(be,{change:t,goes:L},`digest:${t.digest[0]?.batch??g}`):t.withheld?(0,e.jsx)("li",{"data-testid":"withheld-change",style:{display:"grid",gap:3,lineHeight:1.45},children:(0,e.jsx)("span",{"data-touched":"",style:{color:"var(--graview-ink-muted)",fontStyle:"italic"},children:t.intent})},`change:${g}`):(0,e.jsxs)("li",{"data-batch":t.batch,style:{display:"grid",gap:3,lineHeight:1.45},children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:6},children:[(0,e.jsxs)("span",{style:{minWidth:0},children:[(0,e.jsxs)("strong",{style:{fontWeight:600},children:[t.author==="human"&&t.by?.onBehalfOf===void 0&&(t.authorId===void 0||d.id===void 0||t.authorId===d.id)?"you":q(t.by??{kind:t.author,id:t.authorId},{graph:v.graph,schema:v.schema,seats:l,people:o}),A(t.via)?(0,e.jsxs)("span",{style:{fontWeight:400,color:"var(--graview-ink-muted)"},children:[", ",A(t.via)]}):null]})," ",(0,e.jsx)("span",{style:{color:"var(--graview-ink-muted)"},children:t.intent}),t.basis?(0,e.jsxs)("span",{"data-graview-lineage":"",style:{color:"var(--graview-ink-faint)"},children:[" \xB7 ",t.basis]}):null]}),t.batch?(0,e.jsx)(xe,{seq:t.seq,intent:t.intent}):null,t.batch?(0,e.jsx)(N,{batch:t.batches&&t.batches.length>0?t.batches.length===1?t.batches[0]:t.batches:t.batch}):null]}),(0,e.jsx)("div",{"data-touched":t.touched.join(" "),style:{display:"flex",flexWrap:"wrap",gap:4},children:t.touched.slice(0,4).map(h=>(0,e.jsx)(H,{id:h,label:v.graph.has(h)?b(v,h):t.named?.[h]??b(v,h),go:L(h)},h))})]},`change:${g}`))}):null,(0,e.jsx)(re,{style:{paddingTop:8,borderTop:"1px solid var(--graview-edge)"}}),a?(0,e.jsxs)("div",{"data-testid":"remembered",style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:10,paddingTop:8,borderTop:"1px solid var(--graview-edge)",fontSize:"0.8125rem",color:"var(--graview-ink-faint)"},children:[(0,e.jsx)("span",{children:"Remembered in this browser"}),(0,e.jsx)(Se,{})]}):null]}):null]})}export{N as a,De as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{l as K}from"./chunk.
|
|
1
|
+
import{l as K}from"./chunk.WC3DENU4.js";import"./chunk.VNDKKTED.js";import{G as R,T as x,ba as N,ca as $}from"./chunk.4MP72LPR.js";import"./chunk.SDO3U72B.js";import{Dd as h,Fd as k,ka as w,vd as g,wd as b,xd as f}from"./chunk.VSCIXAHN.js";import"./chunk.FQLNBIQ5.js";import{b as v}from"./chunk.AJZBJBMO.js";var u=v(R(),1);var o=v(x(),1),E=()=>()=>{};function C(e){let n=(0,u.useMemo)(()=>e?.onChange?i=>e.onChange(i):E,[e]),t=()=>e?.current()??b;return(0,u.useSyncExternalStore)(n,t,t)}var D=(e,n)=>e.lens?n.may.lenses:n.may.views;async function p(e,n,t){try{return await n(),!0}catch(i){return e?.notify({kind:"toast",tone:"bad",sentence:i instanceof Error&&i.message?i.message:t}),!1}}function H(e,n,t,i,r){let s=e.name;return p(r,()=>n==="view"&&s!==void 0?i?t.hide(s):t.show(s):t.lens?.({op:"set-lens-hidden",title:e.title,on:e.kind,hidden:i}),i?`\u201C${e.title}\u201D could not be hidden.`:`\u201C${e.title}\u201D could not be shown.`)}function L(e,n,t,i,r){return p(r,()=>t.lens?.({op:"set-lens-hidden",title:e,hidden:i}),i?`\u201C${n}\u201D could not be hidden.`:`\u201C${n}\u201D could not be shown.`)}function V(e,n,t){return p(t,()=>n.restore(e.name),`\u201C${e.title}\u201D could not be restored.`)}async function A(e,n,t,i){let r=n==="view"&&e.name!==void 0?e.name:g(e.title),s=await p(i,()=>n==="view"&&e.name!==void 0?t.remove(e.name,{title:e.title,kind:e.kind}):t.lens?.({op:"remove-lens",title:e.title,on:e.kind}),`\u201C${e.title}\u201D could not be deleted.`);return s&&i?.notify({kind:"toast",id:`deleted-view-${r}`,sentence:`Deleted \u201C${e.title}\u201D. It is under Recently deleted in the places for ${30} days.`,action:{label:"Restore",onSelect:()=>void V({name:r,title:e.title},t,i)}}),s}function G(){let e=$(),n=e?.keptViews,t=C(n),i=e?.views;return(0,u.useMemo)(()=>{if(!n||!i)return null;let r=d=>f(d,t,n),s=new Set,m=i.places().filter(d=>{if(!d.hidden||r(d)===null)return!1;let c=`${d.name??""}|${d.title}`;return s.has(c)?!1:(s.add(c),!0)}),l=e?.store.schema,y=t.may.lenses&&n.lens&&l?(i.arrangement?.()?.hide??[]).filter(d=>l.tryDefinition(d)!==void 0).map(d=>({kind:d,title:w(l,d),path:h(l,d)})):[];return{keeper:n,hidden:m,lists:y,removed:t.removed.filter(d=>D(d,t)),how:r}},[n,t,i,e?.store.schema])}function T(e,n){let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleDateString(n??"en-US",{month:"short",day:"numeric"})}var I=`.graview-bar-list li.graview-bar-tidied{display:flex;align-items:flex-start;gap:8px;padding:0 0 0 2px}
|
|
2
2
|
.graview-bar-tidied>.graview-bar-item,.graview-bar-gone{flex:1 1 auto;min-width:0}
|
|
3
3
|
.graview-bar-gone{display:grid;gap:1px;padding:7px 8px;font-size:.875rem;line-height:1.3;overflow-wrap:anywhere;color:var(--graview-ink-muted)}
|
|
4
4
|
.graview-bar-gone small{font-size:.75rem}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{G as h}from"./chunk.
|
|
1
|
+
import{G as h}from"./chunk.4MP72LPR.js";import{Bc as a,Nc as m,ud as u}from"./chunk.VSCIXAHN.js";import{b as l}from"./chunk.AJZBJBMO.js";function f(e){let t=[e?.typography?.body,e?.typography?.display,e?.typography?.mono],o=[];for(let i of t){let n=i?.split(",")[0]?.trim().replace(/^["']|["']$/g,"");!n||m(n)||n.toLowerCase()!==a.toLowerCase()&&(o.includes(n)||o.push(n))}return o}function g(e){let t=f(e);return t.length===0?null:`https://fonts.googleapis.com/css2?${t.map(i=>`family=${encodeURIComponent(i).replace(/%20/g,"+")}:wght@400;500;600;700`).join("&")}&display=swap`}var r=l(h(),1);function k(e,t){return new u({schema:e.schema,mutations:e.mutations??[],invariants:e.invariants??[],...t?{snapshot:t}:{},...e.policy?{policy:e.policy}:{},...e.publishing?{publishing:e.publishing}:{},...e.intelligence?{intelligence:e.intelligence}:{},...e.brand?.timeZone?{timeZone:e.brand.timeZone}:{}})}function d(e){if(typeof document>"u")return e==="dark"?"dark":"light";let t=document.documentElement.dataset.theme;return t==="dark"||t==="light"?t:e==="dark"||e==="light"?e:typeof matchMedia=="function"&&matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function v(e,t){let[o,i]=(0,r.useState)(()=>d(t));return(0,r.useEffect)(()=>{if(!e||typeof document>"u")return;let n=()=>i(d(t));n();let s=new MutationObserver(n);s.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]});let c=typeof matchMedia=="function"?matchMedia("(prefers-color-scheme: dark)"):null;return c?.addEventListener?.("change",n),()=>{s.disconnect(),c?.removeEventListener?.("change",n)}},[e,t]),o}export{g as a,k as b,v as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk.X6A4VSSD.js";import"./chunk.KDRLUBVF.js";import"./chunk.PNW5K7BW.js";import"./chunk.ENL2JJ47.js";import"./chunk.BQIHNT7C.js";import"./chunk.3XGA65Y3.js";import"./chunk.2K4TT2BV.js";import"./chunk.VZJWJ5XM.js";import{b as n}from"./chunk.YEBGI6ED.js";import"./chunk.HDUO2USQ.js";import"./chunk.GZHZLJBF.js";import"./chunk.IOK4GVJC.js";import"./chunk.OJGHDWI6.js";import"./chunk.TLJOZSDD.js";import"./chunk.MSWWWLEA.js";import"./chunk.UITT6JWW.js";import"./chunk.A5PDXNY6.js";import"./chunk.WC3DENU4.js";import"./chunk.VNDKKTED.js";import{T as i}from"./chunk.4MP72LPR.js";import"./chunk.SDO3U72B.js";import"./chunk.VSCIXAHN.js";import"./chunk.FQLNBIQ5.js";import{b as o}from"./chunk.AJZBJBMO.js";var e=o(i(),1);function m({entries:d,style:l,headingStyle:p,className:r}){return(0,e.jsxs)("section",{...r?{className:r}:{},"data-testid":"record-ai","aria-label":"What AI did here",style:{display:"grid",gap:10,...l},children:[(0,e.jsx)("h2",{style:p??{margin:0,fontSize:"1rem"},children:"What AI did here"}),(0,e.jsx)("ol",{style:{margin:0,padding:0,listStyle:"none",display:"grid",gap:8,fontSize:"0.875rem"},children:d.slice(0,8).map(t=>(0,e.jsx)(n,{entry:t,undo:s=>(0,e.jsx)(a,{batch:s})},t.id))})]})}export{m as RecordInteractions};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{$c as e}from"./chunk.VSCIXAHN.js";var i=`
|
|
2
2
|
.graview-spec{display:flex;flex-direction:column;gap:6px;min-width:0;color:var(--graview-ink)}
|
|
3
3
|
|
|
4
4
|
.graview-spec-row{flex-direction:row;flex-wrap:wrap;align-items:center;gap:4px 10px;box-sizing:border-box;max-width:100%;padding:5px 10px;border:1px solid var(--graview-edge);border-radius:var(--graview-radius-sm,8px);background:var(--graview-panel);font-size:.875rem}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{a as G,b as J}from"./chunk.
|
|
1
|
+
var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{a as G,b as J}from"./chunk.IGVASEZU.js";import"./chunk.IHBUBZQT.js";import{a as K}from"./chunk.ENL2JJ47.js";import"./chunk.BQIHNT7C.js";import"./chunk.2K4TT2BV.js";import"./chunk.67U6M7OV.js";import"./chunk.ZP5RT2EK.js";import"./chunk.VZJWJ5XM.js";import"./chunk.GLWSVSQL.js";import{a as S,b as W}from"./chunk.MB7LKKUD.js";import"./chunk.7VKSXGTX.js";import"./chunk.TY4GQJKC.js";import"./chunk.6ZQAR5ZA.js";import"./chunk.W3W54DSX.js";import"./chunk.PI44XMY2.js";import"./chunk.KGW75Z5L.js";import"./chunk.MSWWWLEA.js";import"./chunk.UITT6JWW.js";import"./chunk.A5PDXNY6.js";import"./chunk.WC3DENU4.js";import"./chunk.VNDKKTED.js";import{D as H,E as V,G as ee,Ga as _,Sa as x,T as D,ca as F}from"./chunk.4MP72LPR.js";import{a as j}from"./chunk.SDO3U72B.js";import{ad as B,ia as q}from"./chunk.VSCIXAHN.js";import"./chunk.FQLNBIQ5.js";import{b}from"./chunk.AJZBJBMO.js";var t=b(ee(),1);var a=b(D(),1);function ae(n){let r=[];return n.applied.length>0&&n.intent&&r.push(`${n.intent}.`),n.unchanged.length>0&&r.push(`${n.unchanged.length} already so.`),n.allOrNothing&&r.push("None of it was kept."),r.join(" ")}var re=_(j(()=>(__graviewPreload(import.meta.url,["./chunk.D7YSL3NK.js","./chunk.BJUUSIQY.js","./chunk.ZP5RT2EK.js","./chunk.VZJWJ5XM.js","./chunk.6C2MHWSX.js","./chunk.XOZU4OFA.js","./chunk.GLWSVSQL.js","./chunk.HDUO2USQ.js","./chunk.TY4GQJKC.js","./chunk.MSWWWLEA.js","./chunk.UITT6JWW.js","./chunk.A5PDXNY6.js","./chunk.WC3DENU4.js","./chunk.VNDKKTED.js","./chunk.4MP72LPR.js","./chunk.SDO3U72B.js","./chunk.VSCIXAHN.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.ZYM2SSGW.js")))),te=re.part((n,r)=>(0,a.jsx)(n.SeveralAi,{...r}),{quiet:!0});function ne(n){let r=F()?.ai;return!H(r)||!V(r)?null:(0,a.jsx)(t.Suspense,{fallback:null,children:(0,a.jsx)(te,{...n})})}function ge({store:n,chosen:r,principal:d,context:v,via:k,anchor:A,of:g,onChooseAll:E,onClear:m,onActed:Q}){let[U,X]=(0,t.useState)(0);(0,t.useEffect)(()=>n.subscribe(()=>X(e=>e+1)),[n]);let f=r.join(`
|
|
2
2
|
`),{acts:c,withheld:N}=(0,t.useMemo)(()=>G(n,r,{...d?{principal:d}:{},...v?{context:v}:{}}),[n,f,d,v,U]),[O,p]=(0,t.useState)(!1),[l,u]=(0,t.useState)(null),[s,P]=(0,t.useState)(null),h=(0,t.useRef)(null),L=(0,t.useId)(),w=(0,t.useMemo)(()=>[...new Set(r.map(e=>n.graph.getNode(e)?.kind))],[n,f]),Y=w.length===1&&w[0]?`${q(n.schema,w[0],r.length)} chosen`:`${r.length} chosen`,M=typeof matchMedia=="function"&&matchMedia("(pointer: coarse), (max-width: 599px)").matches?2:3,C=c.filter(e=>!e.more),Z=C.slice(0,M),R=[...C.slice(M),...c.filter(e=>e.more)];(0,t.useEffect)(()=>{u(null),p(!1)},[f]),(0,t.useLayoutEffect)(()=>{let e=h.current;if(!e)return;if(typeof e.showPopover=="function"&&!x(e))try{e.showPopover()}catch{}let i=()=>{W(e,A?.()??null),dispatchEvent(new Event(S))};i(),addEventListener("resize",i),addEventListener("scroll",i,!0);let o=typeof ResizeObserver=="function"?new ResizeObserver(i):null;return o?.observe(e),()=>{if(o?.disconnect(),removeEventListener("resize",i),removeEventListener("scroll",i,!0),e.isConnected&&x(e))try{e.hidePopover()}catch{}dispatchEvent(new Event(S))}},[A]);let y=(0,t.useRef)({asking:l,onClear:m});y.current={asking:l,onClear:m},(0,t.useEffect)(()=>{let e=i=>{if(i.key!=="Escape"||i.defaultPrevented)return;let o=document.activeElement;if(!(!(h.current?.contains(o)??!1)&&(o instanceof HTMLTextAreaElement||o instanceof HTMLInputElement&&o.type!=="checkbox"||o instanceof HTMLSelectElement))){if(i.preventDefault(),i.stopPropagation(),y.current.asking){u(null);return}y.current.onClear()}};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[]);let T=(e,i={})=>{let o=J(n,{mutation:e.mutation,subject:e.subject,args:{...e.args,...i},label:e.label},r,{...d?{author:d}:{},...k?{via:k}:{},...v?{context:v}:{}});u(null),p(!1),P(o.refused.length>0||o.applied.length===0?o:null),Q(o.refused.map(I=>I.id))},$=e=>{P(null),p(!1),e.open.length>0?u(e):T(e)},z=e=>(0,a.jsxs)("button",{type:"button",className:"graview-several-act","data-testid":"several-act","data-act":e.id,"data-mutation":e.mutation,...e.destructive?{"data-tone":"warn"}:{},"aria-pressed":l?.id===e.id?!0:void 0,onClick:()=>$(e),children:[e.label,e.open.length>0?"\u2026":""]},e.id);return(0,a.jsxs)("div",{ref:h,popover:"manual",role:"region","aria-label":"The chosen records",className:"graview-several-bar","data-testid":"several-bar","data-graview-foot":"","data-graview-overlay":"","data-graview-popover":"","data-graview-offstage":"",style:ie,children:[(0,a.jsx)("style",{children:oe}),(0,a.jsxs)("div",{className:"graview-several-line",children:[(0,a.jsx)("span",{role:"status","aria-live":"polite",className:"graview-several-count","data-testid":"several-count",children:Y}),(0,a.jsxs)("div",{role:"group","aria-label":`What to do with the ${r.length} chosen`,className:"graview-several-acts",children:[Z.map(z),R.length>0?(0,a.jsx)("button",{type:"button",className:"graview-several-act","data-testid":"several-more","aria-expanded":O,"aria-controls":L,onClick:()=>p(e=>!e),children:"More"}):null,E&&g!==void 0&&g>r.length?(0,a.jsxs)("button",{type:"button",className:"graview-several-quiet","data-testid":"several-all",onClick:E,children:["Choose all ",g]}):null,(0,a.jsx)("button",{type:"button",className:"graview-several-quiet","data-testid":"several-clear","aria-keyshortcuts":"Escape",title:"Put the choice down \u2014 Escape",onClick:m,children:"Clear"})]})]}),c.length>0&&r.length>1?(0,a.jsx)(ne,{chosen:r,acts:c,onAct:$}):null,O?(0,a.jsx)("div",{id:L,role:"group","aria-label":"More",className:"graview-several-acts","data-testid":"several-more-acts",children:R.map(z)}):null,c.length===0?(0,a.jsx)("p",{className:"graview-several-said","data-testid":"several-none",children:N.length>0?`Nothing here can be done to all of them by you: ${N[0].message}`:"Nothing can be done to all of these at once."}):null,l?(0,a.jsx)("div",{className:"graview-several-ask",role:"group","aria-label":`${l.label}, for all ${r.length}`,"data-testid":"several-ask",children:(0,a.jsx)(K,{store:n,affordance:l.affordance,onApply:e=>T(l,e),onCancel:()=>u(null)})}):null,s?(0,a.jsxs)("div",{role:"alert",className:"graview-several-said","data-testid":"several-outcome",children:[ae(s),s.refused.length>0?(0,a.jsxs)(a.Fragment,{children:[" ",s.refused.length===1?"One was not changed, and is still chosen:":`${s.refused.length} were not changed, and are still chosen:`,(0,a.jsx)("ul",{"data-testid":"several-refused",children:s.refused.map(e=>(0,a.jsxs)("li",{"data-record":e.id,children:["\u201C",e.label,"\u201D \u2014 ",e.message]},e.id))})]}):null]}):null]})}var ie={position:"fixed",inset:"auto",margin:0,zIndex:B("toast"),boxSizing:"border-box",width:"max-content",height:"auto",bottom:"calc(16px + env(safe-area-inset-bottom, 0px))",left:16,overflow:"visible"},oe=`
|
|
3
3
|
.graview-several-bar{display:grid;gap:8px;padding:8px 10px;border:1px solid var(--graview-edge);border-radius:var(--graview-radius,12px);background:var(--graview-float);color:var(--graview-ink);box-shadow:var(--graview-lift-high);font-size:.875rem;line-height:1.4;max-height:70vh;overflow:auto}
|
|
4
4
|
.graview-several-line{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;min-width:0}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{a as y}from"./chunk.
|
|
1
|
+
var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{a as y}from"./chunk.HDUO2USQ.js";import{D as v,G as I,T as h,ba as w}from"./chunk.4MP72LPR.js";import{_a as g}from"./chunk.VSCIXAHN.js";import{b as d}from"./chunk.AJZBJBMO.js";var k=d(I(),1);var t=d(h(),1),r={display:"inline-flex",alignItems:"center",minHeight:24,minWidth:24,padding:"1px 8px",fontSize:"0.75rem"};function D({shows:e,onShows:i,mine:a,onMine:l}){let o={all:"All",changes:"Changes",ai:"AI"};return(0,t.jsxs)("div",{"data-testid":"activity-filter",role:"group","aria-label":"Show",style:{display:"flex",flexWrap:"wrap",gap:4,alignItems:"center"},children:[["all","changes","ai"].map(s=>(0,t.jsx)("button",{type:"button","data-shows":s,"aria-pressed":e===s,onClick:()=>i(s),style:{...r,...e===s?{borderColor:"var(--graview-accent)",color:"var(--graview-ink)"}:{}},children:o[s]},s)),(0,t.jsx)("button",{type:"button","data-testid":"activity-mine","aria-pressed":a,onClick:()=>l(!a),style:{...r,marginLeft:"auto",...a?{borderColor:"var(--graview-accent)",color:"var(--graview-ink)"}:{}},children:"Just mine"})]})}var x=e=>e.ask.kind==="suggest"?"suggest":e.ask.kind==="fill"?"fill in":e.ask.kind==="record"?"add one":e.ask.kind==="panel"?"draw a panel":`answer \u201C${e.ask.said}\u201D`;function $(e){let i=e.offered.filter(a=>e.accepted?.includes(a.id)).map(a=>a.label);switch(e.outcome){case"accepted":return i.length>0?`Took ${i.join(", ")}`:"Taken";case"partly":return`Took ${i.length} of ${e.offered.length}: ${i.join(", ")}`;case"dismissed":return"Dismissed";case"drawn":return e.panel?`Drew \u201C${e.panel.title}\u201D`:"Drew a panel";case"failed":return e.failed??"Failed";default:return"Offered, not yet taken"}}function C(e){let i=[...new Set((e.usage??[]).map(o=>o.model))];if(i.length===0)return null;let a=(e.usage??[]).flatMap(o=>o.costUsd===void 0?[]:[o.costUsd]),l=a.length>0?a.reduce((o,s)=>o+s,0):void 0;return`${i.join(", ")}${l!==void 0?` \xB7 $${l<.01?l.toPrecision(2):l.toFixed(2)}`:""}`}function E({entry:e,undo:i}){let{store:a,principal:l,seats:o,people:s,ai:b}=w(),c=y(),[p,u]=(0,k.useState)(!1),A=e.by.kind==="human"&&e.by.onBehalfOf===void 0&&(e.by.id===void 0||l.id===void 0||e.by.id===l.id)?"you":g(e.by,{graph:a.graph,schema:a.schema,seats:o,people:s}),f=C(e),S=v(b),m=n=>{u(!0),(__graviewPreload(import.meta.url,["./chunk.D7YSL3NK.js","./chunk.BJUUSIQY.js","./chunk.ZP5RT2EK.js","./chunk.VZJWJ5XM.js","./chunk.6C2MHWSX.js","./chunk.XOZU4OFA.js","./chunk.GLWSVSQL.js","./chunk.HDUO2USQ.js","./chunk.TY4GQJKC.js","./chunk.MSWWWLEA.js","./chunk.UITT6JWW.js","./chunk.A5PDXNY6.js","./chunk.WC3DENU4.js","./chunk.VNDKKTED.js","./chunk.4MP72LPR.js","./chunk.SDO3U72B.js","./chunk.VSCIXAHN.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.IBOKXVWN.js")).then(n).finally(()=>u(!1))};return(0,t.jsxs)("li",{"data-testid":"activity-interaction","data-interaction":e.id,"data-outcome":e.outcome,style:{display:"grid",gap:3,lineHeight:1.45},children:[(0,t.jsx)("div",{style:{display:"flex",alignItems:"baseline",gap:6},children:(0,t.jsxs)("span",{style:{minWidth:0},children:[(0,t.jsx)("strong",{style:{fontWeight:600},children:A})," ",(0,t.jsxs)("span",{style:{color:"var(--graview-ink-muted)"},children:["asked AI to ",x(e)]}),(0,t.jsxs)("span",{style:{color:"var(--graview-ink-faint)"},children:[" \xB7 ",e.targetLabel]})]})}),e.offered.length>0&&e.outcome!=="accepted"&&e.outcome!=="partly"?(0,t.jsxs)("div",{"data-testid":"interaction-offered",style:{color:"var(--graview-ink-muted)"},children:["Offered ",e.offered.map(n=>n.label).join(", ")]}):null,(0,t.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:6,flexWrap:"wrap"},children:[(0,t.jsx)("span",{"data-testid":"interaction-outcome",style:{color:e.outcome==="failed"?"var(--graview-warn)":"var(--graview-ink)"},children:$(e)}),(e.batches??[]).map(n=>(0,t.jsx)("span",{"data-interaction-batch":n,style:{marginLeft:"auto"},children:i(n)},n))]}),f?(0,t.jsx)("div",{"data-testid":"interaction-model",style:{fontSize:"0.75rem",color:"var(--graview-ink-faint)"},children:f}):null,S?(0,t.jsxs)("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:[e.panel?(0,t.jsx)("button",{type:"button","data-testid":"interaction-reopen",disabled:p,onClick:()=>m(n=>n.drawPanel(c,e.panel)),style:r,children:"Show the panel"}):null,(0,t.jsx)("button",{type:"button","data-testid":"interaction-again",disabled:p,onClick:()=>m(n=>n.askAgain(c,e)),style:r,children:"Ask again"})]}):null]})}export{D as a,E as b};
|