graview 0.1.41 → 0.1.43

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.
Files changed (216) hide show
  1. package/dist/preview/chunk.22E4GKYU.js +1 -0
  2. package/dist/preview/chunk.25VAWLKJ.js +1 -0
  3. package/dist/preview/chunk.26SI4K3P.js +35 -0
  4. package/dist/preview/chunk.27QYTMXP.js +1 -0
  5. package/dist/preview/chunk.2AZTW66C.js +1 -0
  6. package/dist/preview/chunk.2JMJTREH.js +1 -0
  7. package/dist/preview/chunk.3B47UX2J.js +2 -0
  8. package/dist/preview/{chunk.JDRLSVOI.js → chunk.3GQL4K3Q.js} +1 -1
  9. package/dist/preview/chunk.3HLNRVFY.js +1 -0
  10. package/dist/preview/chunk.3JATXDSP.js +1 -0
  11. package/dist/preview/chunk.4C65DXZB.js +1 -0
  12. package/dist/preview/chunk.4HAGPMY6.js +117 -0
  13. package/dist/preview/chunk.4IDXQVSW.js +1 -0
  14. package/dist/preview/{chunk.ZRLXVYPG.js → chunk.4P3LS2OE.js} +1 -1
  15. package/dist/preview/{chunk.RQGTHRRJ.js → chunk.4YLBGGWT.js} +1 -1
  16. package/dist/preview/chunk.4ZHUGSJL.js +1 -0
  17. package/dist/preview/{chunk.D25XEVKO.js → chunk.4ZSHTUNK.js} +1 -1
  18. package/dist/preview/chunk.5BJW4IPW.js +1 -0
  19. package/dist/preview/{chunk.BFNVG5JE.js → chunk.5J2HETUO.js} +1 -1
  20. package/dist/preview/{chunk.V3V47QRE.js → chunk.5TBK44MK.js} +1 -1
  21. package/dist/preview/chunk.63DI7XNE.js +21 -0
  22. package/dist/preview/{chunk.VJXXCUKS.js → chunk.64MP7636.js} +1 -1
  23. package/dist/preview/chunk.6AYTF53S.js +1 -0
  24. package/dist/preview/chunk.6BU3GCHK.js +1 -0
  25. package/dist/preview/{chunk.C7JKMOFC.js → chunk.6IEDQHKI.js} +1 -1
  26. package/dist/preview/chunk.6K4JBLOP.js +1 -0
  27. package/dist/preview/{chunk.OF34OZ4V.js → chunk.6PF5LWRK.js} +1 -1
  28. package/dist/preview/{chunk.YWNHCZQ5.js → chunk.6ROYIMQ2.js} +1 -1
  29. package/dist/preview/{chunk.AIZQBPGU.js → chunk.6XEATXZC.js} +1 -1
  30. package/dist/preview/chunk.7IXLH7PR.js +1 -0
  31. package/dist/preview/chunk.7L6LYXCV.js +25 -0
  32. package/dist/preview/chunk.7MQ7UWVW.js +5 -0
  33. package/dist/preview/{chunk.Z7LDT55A.js → chunk.7MXQRSNR.js} +1 -1
  34. package/dist/preview/{chunk.DMF35E7D.js → chunk.7ROWZZN5.js} +1 -1
  35. package/dist/preview/chunk.7TU2PDYW.js +1 -0
  36. package/dist/preview/{chunk.WVDKYUF3.js → chunk.7XCBIID7.js} +1 -1
  37. package/dist/preview/{chunk.VNUHESMZ.js → chunk.A3WOUDOG.js} +1 -1
  38. package/dist/preview/{chunk.MUKDKVVC.js → chunk.AXJJUCWT.js} +1 -1
  39. package/dist/preview/chunk.B2KDYES6.js +1 -0
  40. package/dist/preview/chunk.BBLIT7S7.js +1 -0
  41. package/dist/preview/{chunk.NGDXH66B.js → chunk.BT6FUNQI.js} +1 -1
  42. package/dist/preview/chunk.BYVE2NQY.js +1 -0
  43. package/dist/preview/chunk.BYVLGDVJ.js +1 -0
  44. package/dist/preview/chunk.C3DX4LWD.js +49 -0
  45. package/dist/preview/chunk.C3X3R7LP.js +9 -0
  46. package/dist/preview/{chunk.C2PECN4C.js → chunk.C5NOO4CC.js} +1 -1
  47. package/dist/preview/{chunk.C4TSM4W5.js → chunk.CO2ZPX3D.js} +2 -2
  48. package/dist/preview/{chunk.5RABSIF7.js → chunk.CTSPNTDX.js} +1 -1
  49. package/dist/preview/{chunk.LPNIEPYI.js → chunk.CW6IPHRR.js} +2 -2
  50. package/dist/preview/chunk.CXJXVBGF.js +1 -0
  51. package/dist/preview/{chunk.4QPVS2ZM.js → chunk.DJ3BD7AZ.js} +1 -1
  52. package/dist/preview/{chunk.HB7ELBVK.js → chunk.DQR45N7V.js} +1 -1
  53. package/dist/preview/{chunk.2RVUDRRY.js → chunk.DYW4D74X.js} +1 -1
  54. package/dist/preview/chunk.DZN26GKS.js +1 -0
  55. package/dist/preview/chunk.E2AJ7U5Z.js +1 -0
  56. package/dist/preview/chunk.E5PHLNXR.js +1 -0
  57. package/dist/preview/{chunk.42XSBKPO.js → chunk.EBTYR5CZ.js} +1 -1
  58. package/dist/preview/chunk.EPPAFWP7.js +5 -0
  59. package/dist/preview/{chunk.UWW6ZEPY.js → chunk.F6CPM7SL.js} +1 -1
  60. package/dist/preview/chunk.FCPH4YZN.js +1 -0
  61. package/dist/preview/{chunk.BXT6FDT4.js → chunk.FKLEIR4Y.js} +1 -1
  62. package/dist/preview/chunk.FLMNHV6A.js +19 -0
  63. package/dist/preview/chunk.FTF67QE2.js +1 -0
  64. package/dist/preview/chunk.GNPYSMHA.js +1 -0
  65. package/dist/preview/chunk.GSZYT6GF.js +1 -0
  66. package/dist/preview/chunk.GZA5ZNLJ.js +1 -0
  67. package/dist/preview/chunk.HMABYAZR.js +1 -0
  68. package/dist/preview/chunk.I4HUBO22.js +1 -0
  69. package/dist/preview/chunk.IJ2AF3AW.js +1 -0
  70. package/dist/preview/{chunk.EAH47SCN.js → chunk.IJU322EP.js} +1 -1
  71. package/dist/preview/chunk.IQ3LUSD6.js +6 -0
  72. package/dist/preview/chunk.IWUSCCZN.js +1 -0
  73. package/dist/preview/{chunk.W3FTEJH5.js → chunk.JNCSGUO3.js} +1 -1
  74. package/dist/preview/{chunk.33KXSD6F.js → chunk.K6SPN4D6.js} +1 -1
  75. package/dist/preview/chunk.KBMVUIWR.js +6 -0
  76. package/dist/preview/{chunk.ISXFH3CK.js → chunk.KG5R4GTK.js} +1 -1
  77. package/dist/preview/chunk.KR3J27IA.js +88 -0
  78. package/dist/preview/chunk.KWQ67UK2.js +1 -0
  79. package/dist/preview/chunk.LBIDNJ6G.js +1 -0
  80. package/dist/preview/{chunk.HKCK3JI4.js → chunk.LDU25CCL.js} +1 -1
  81. package/dist/preview/{chunk.67WWRC6Y.js → chunk.MBOOUJOE.js} +1 -1
  82. package/dist/preview/{chunk.ZHLQWMV5.js → chunk.MI2HL3LQ.js} +1 -1
  83. package/dist/preview/chunk.MXU3VQSQ.js +1 -0
  84. package/dist/preview/{chunk.PMGXASFI.js → chunk.N3FONYEP.js} +2 -2
  85. package/dist/preview/chunk.NH6D6TWY.js +1 -0
  86. package/dist/preview/chunk.NQTCOBOQ.js +1 -0
  87. package/dist/preview/chunk.O4X5WJIC.js +1 -0
  88. package/dist/preview/chunk.OH2N3SX7.js +1 -0
  89. package/dist/preview/chunk.OIJP6PQV.js +1 -0
  90. package/dist/preview/{chunk.TN5PYGU7.js → chunk.ONSG3OIL.js} +1 -1
  91. package/dist/preview/chunk.ORKXXLWD.js +1 -0
  92. package/dist/preview/chunk.OUN2H3TR.js +1 -0
  93. package/dist/preview/{chunk.6FNMDAX5.js → chunk.OWL5GZ6U.js} +1 -1
  94. package/dist/preview/chunk.PEXPTDX7.js +1 -0
  95. package/dist/preview/chunk.PWYMZWAN.js +1 -0
  96. package/dist/preview/{chunk.QIV65FWE.js → chunk.Q5XICUDZ.js} +1 -1
  97. package/dist/preview/chunk.QJUFVEAU.js +1 -0
  98. package/dist/preview/{chunk.N6MVK3KD.js → chunk.QWY54AVN.js} +1 -1
  99. package/dist/preview/{chunk.XEKLEHC3.js → chunk.QXTLZSBL.js} +1 -1
  100. package/dist/preview/{chunk.UHI3D7JC.js → chunk.R2B2ZAWI.js} +1 -1
  101. package/dist/preview/{chunk.UUBYFBPN.js → chunk.R7F6UJVG.js} +1 -1
  102. package/dist/preview/chunk.RDXDEFOC.js +1 -0
  103. package/dist/preview/{chunk.JACGQ2PR.js → chunk.RPDTWQKA.js} +3 -3
  104. package/dist/preview/{chunk.BELCPW66.js → chunk.RQBX7M7Q.js} +2 -2
  105. package/dist/preview/chunk.RRCPEHM4.js +1 -0
  106. package/dist/preview/{chunk.2FLPDPEL.js → chunk.RSYFIL2Z.js} +1 -1
  107. package/dist/preview/{chunk.Z5AB2DBF.js → chunk.RY4E4JRI.js} +1 -1
  108. package/dist/preview/{chunk.RCM7NOPF.js → chunk.S2MP53RO.js} +1 -1
  109. package/dist/preview/chunk.S6BZXNMV.js +1 -0
  110. package/dist/preview/{chunk.HPAGOEZG.js → chunk.SGRKCQ2X.js} +1 -1
  111. package/dist/preview/chunk.SKB4XSDG.js +1 -0
  112. package/dist/preview/chunk.T4M4MLOS.js +1 -0
  113. package/dist/preview/{chunk.I7XSDXQ3.js → chunk.T4Q6OLZU.js} +1 -1
  114. package/dist/preview/{chunk.L4STJLUV.js → chunk.T4QT5SZY.js} +1 -1
  115. package/dist/preview/chunk.TMBFLZNH.js +2 -0
  116. package/dist/preview/chunk.TX65ZO27.js +1 -0
  117. package/dist/preview/chunk.U3ETEQDO.js +1 -0
  118. package/dist/preview/chunk.VCOIFBUE.js +1 -0
  119. package/dist/preview/chunk.VP35BUUZ.js +349 -0
  120. package/dist/preview/{chunk.N2K25KH3.js → chunk.WH2RYGXR.js} +1 -1
  121. package/dist/preview/{chunk.LOCSF3BR.js → chunk.WWR7Y2KE.js} +1 -1
  122. package/dist/preview/chunk.X5WB4GJ4.js +1 -0
  123. package/dist/preview/chunk.XAXZCOZK.js +1 -0
  124. package/dist/preview/chunk.XBV4WO7D.js +1 -0
  125. package/dist/preview/chunk.XFQUVMRI.js +1 -0
  126. package/dist/preview/{chunk.AKQXF7GW.js → chunk.XGRMQUFB.js} +1 -1
  127. package/dist/preview/chunk.XVWJD2DG.js +2 -0
  128. package/dist/preview/{chunk.ZRYSVOLA.js → chunk.YKN2VWWQ.js} +2 -2
  129. package/dist/preview/chunk.YPEZZLOY.js +1 -0
  130. package/dist/preview/chunk.YQDIVHCH.js +1 -0
  131. package/dist/preview/{chunk.TGVUIFKD.js → chunk.Z56L6V6Z.js} +1 -1
  132. package/dist/preview/{chunk.HI7X6PLZ.js → chunk.ZE4U4JBF.js} +2 -2
  133. package/dist/preview/chunk.ZE6LJVVN.js +1 -0
  134. package/dist/preview/{chunk.H5ADMSE7.js → chunk.ZEC64CK6.js} +1 -1
  135. package/dist/preview/chunk.ZHRW2UF4.js +1 -0
  136. package/dist/preview/{chunk.VIYECFKZ.js → chunk.ZRICIE6T.js} +1 -1
  137. package/dist/preview/chunk.ZUJZVK2X.js +1 -0
  138. package/dist/preview/index.html +46 -45
  139. package/dist/preview/page.js +6 -6
  140. package/package.json +6 -6
  141. package/dist/preview/chunk.242EUAPE.js +0 -1
  142. package/dist/preview/chunk.2FGYWAID.js +0 -1
  143. package/dist/preview/chunk.2GQPLTV3.js +0 -1
  144. package/dist/preview/chunk.2NB7U4EW.js +0 -88
  145. package/dist/preview/chunk.3Q75TIGL.js +0 -1
  146. package/dist/preview/chunk.3ZILIZZ6.js +0 -1
  147. package/dist/preview/chunk.4EEWBCT2.js +0 -1
  148. package/dist/preview/chunk.4Q7XJJZY.js +0 -1
  149. package/dist/preview/chunk.53CDFJNM.js +0 -1
  150. package/dist/preview/chunk.57R2GXXN.js +0 -1
  151. package/dist/preview/chunk.5P556A7W.js +0 -1
  152. package/dist/preview/chunk.5QXWMC6C.js +0 -1
  153. package/dist/preview/chunk.6CRRPXKP.js +0 -1
  154. package/dist/preview/chunk.6RID3OWK.js +0 -1
  155. package/dist/preview/chunk.6YPLZNVT.js +0 -19
  156. package/dist/preview/chunk.7LIKEE5Z.js +0 -1
  157. package/dist/preview/chunk.7YIFF6BF.js +0 -1
  158. package/dist/preview/chunk.A4UIM35E.js +0 -1
  159. package/dist/preview/chunk.B5724ULM.js +0 -1
  160. package/dist/preview/chunk.BK6RWVRE.js +0 -1
  161. package/dist/preview/chunk.BQRAIU5R.js +0 -1
  162. package/dist/preview/chunk.DGCMEDQA.js +0 -1
  163. package/dist/preview/chunk.DL26BKT7.js +0 -1
  164. package/dist/preview/chunk.EQ4UAWRB.js +0 -1
  165. package/dist/preview/chunk.F2MQJH6Y.js +0 -1
  166. package/dist/preview/chunk.FFZBOP65.js +0 -1
  167. package/dist/preview/chunk.FOQZADMA.js +0 -25
  168. package/dist/preview/chunk.GT2BITLW.js +0 -1
  169. package/dist/preview/chunk.H5HWN7A2.js +0 -1
  170. package/dist/preview/chunk.H7POIT3V.js +0 -1
  171. package/dist/preview/chunk.HEVC6HHP.js +0 -1
  172. package/dist/preview/chunk.HFYUAK5Z.js +0 -6
  173. package/dist/preview/chunk.HPUN5DKZ.js +0 -117
  174. package/dist/preview/chunk.I4JBWTZM.js +0 -2
  175. package/dist/preview/chunk.J2CR4RRH.js +0 -1
  176. package/dist/preview/chunk.J4IULZFD.js +0 -1
  177. package/dist/preview/chunk.JHEVGLKB.js +0 -345
  178. package/dist/preview/chunk.JLBGJSCZ.js +0 -1
  179. package/dist/preview/chunk.JYJ4LZJJ.js +0 -5
  180. package/dist/preview/chunk.L3A6YLMT.js +0 -21
  181. package/dist/preview/chunk.LOSMUESM.js +0 -1
  182. package/dist/preview/chunk.LOZJQ5ZX.js +0 -1
  183. package/dist/preview/chunk.LPYVOBWB.js +0 -1
  184. package/dist/preview/chunk.M4T377LG.js +0 -1
  185. package/dist/preview/chunk.MSP73H5Z.js +0 -1
  186. package/dist/preview/chunk.MUPO5S2A.js +0 -47
  187. package/dist/preview/chunk.O6F3K6CU.js +0 -1
  188. package/dist/preview/chunk.O75JKQPF.js +0 -1
  189. package/dist/preview/chunk.OVTCW3AI.js +0 -1
  190. package/dist/preview/chunk.OW7NSJ4H.js +0 -1
  191. package/dist/preview/chunk.PMDNFN7Z.js +0 -35
  192. package/dist/preview/chunk.Q4TZHWQX.js +0 -1
  193. package/dist/preview/chunk.QHYXXZRD.js +0 -1
  194. package/dist/preview/chunk.S2U5CEP4.js +0 -1
  195. package/dist/preview/chunk.SADG5RMV.js +0 -1
  196. package/dist/preview/chunk.SCYQSXW4.js +0 -1
  197. package/dist/preview/chunk.SIGC3G7S.js +0 -1
  198. package/dist/preview/chunk.T3BWINOF.js +0 -1
  199. package/dist/preview/chunk.TIH2PDFH.js +0 -1
  200. package/dist/preview/chunk.TNESS3LQ.js +0 -2
  201. package/dist/preview/chunk.UEXIKCLF.js +0 -1
  202. package/dist/preview/chunk.USZPOOLZ.js +0 -1
  203. package/dist/preview/chunk.UTWPZULC.js +0 -1
  204. package/dist/preview/chunk.V4KLBSC4.js +0 -1
  205. package/dist/preview/chunk.V5MYKNL7.js +0 -5
  206. package/dist/preview/chunk.VCX3HEIE.js +0 -1
  207. package/dist/preview/chunk.VDAMCTNL.js +0 -1
  208. package/dist/preview/chunk.W4HBRXMY.js +0 -1
  209. package/dist/preview/chunk.WUKHYLQT.js +0 -9
  210. package/dist/preview/chunk.XFZKP4IF.js +0 -2
  211. package/dist/preview/chunk.XOYJ26YB.js +0 -1
  212. package/dist/preview/chunk.XQTMO5PW.js +0 -1
  213. package/dist/preview/chunk.YYFLTMNN.js +0 -1
  214. package/dist/preview/chunk.Z7BCIYDW.js +0 -1
  215. package/dist/preview/chunk.ZOR6FKNI.js +0 -1
  216. package/dist/preview/chunk.ZTMEESII.js +0 -1
@@ -1 +1 @@
1
- import{A as J,C as Q,E as X,I as Y,K as ee,N as ne,a as I,i as q,l as Z,p as z,s as W,t as j,x as _,y as U}from"./chunk.JHEVGLKB.js";import{Ca as D,G as se,R as N,_ as T,aa as $,na as G,va as K}from"./chunk.FOQZADMA.js";import{$b as V,Nc as O,ic as M,kc as P}from"./chunk.V5MYKNL7.js";import{b as F}from"./chunk.AJZBJBMO.js";var a=F(se(),1);function ce(e){let n=[e?.typography?.body,e?.typography?.display,e?.typography?.mono],t=[];for(let r of n){let o=r?.split(",")[0]?.trim().replace(/^["']|["']$/g,"");!o||P(o)||o.toLowerCase()!==V.toLowerCase()&&(t.includes(o)||t.push(o))}return t}function te(e){let n=ce(e);return n.length===0?null:`https://fonts.googleapis.com/css2?${n.map(r=>`family=${encodeURIComponent(r).replace(/%20/g,"+")}:wght@400;500;600;700`).join("&")}&display=swap`}var u=F(N(),1),ve=e=>typeof e=="object"?e:{};function we({rootRef:e,firstLook:n,app:t}){let r=(0,a.useCallback)(()=>e.current,[e]);return n?(0,u.jsx)(ne,{firstLook:n,root:r,app:t}):null}function Ee(e,n,t){let{app:r}=e,o=(0,a.useMemo)(()=>{let i=Y(n(r.schema,r.viewSpecs),r),c=t?de(i,t):i,s=e.views?e.views(r.schema,c):i,d=s===c?i:G(i,s);return ee(d,r.schema,Q(e.brand??r.brand,r.schema)),t?t.register(d):d},[e.views,r.schema,r.viewSpecs,r.lenses,r.pages,r.home,t]);return K(o,e.keptViews)}function de(e,n){let t={...e,register(r,o,i,c){return c?.name!==n.name&&e.register(r,o,i,c),t},...e.home?{home:r=>(n.home||e.home(r),t)}:{}};return t}function le(e,n){return new O({schema:e.schema,mutations:e.mutations??[],invariants:e.invariants??[],...n?{snapshot:n}:{},...e.policy?{policy:e.policy}:{},...e.intelligence?{intelligence:e.intelligence}:{},...e.brand?.timeZone?{timeZone:e.brand.timeZone}:{}})}function re(e){if(typeof document>"u")return e==="dark"?"dark":"light";let n=document.documentElement.dataset.theme;return n==="dark"||n==="light"?n:e==="dark"||e==="light"?e:typeof matchMedia=="function"&&matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function ue(e,n){let[t,r]=(0,a.useState)(()=>re(n));return(0,a.useEffect)(()=>{if(!e||typeof document>"u")return;let o=()=>r(re(n));o();let i=new MutationObserver(o);i.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]});let c=typeof matchMedia=="function"?matchMedia("(prefers-color-scheme: dark)"):null;return c?.addEventListener?.("change",o),()=>{i.disconnect(),c?.removeEventListener?.("change",o)}},[e,n]),t}var A=e=>e?e.getBoundingClientRect().height:0;function Re(e,n,t){let r=(0,a.useRef)(t);r.current=t;let o=t!==void 0;(0,a.useLayoutEffect)(()=>{let i=e.current;if(!i||!o)return;let c=()=>{let y=[...i.children],h=y.find(b=>b.hasAttribute("data-graview-app-bar")),p=y.find(b=>b.hasAttribute("data-embed-content")),g=p?.querySelector("[data-embed-measure]")??null,l=y.find(b=>b.hasAttribute("data-graview-place-line"));return{strip:h,line:l,content:p,measure:g}},s=-1,d=()=>{let{strip:y,line:h,content:p,measure:g}=c(),l=Math.ceil(A(y)+A(h)+A(g||p));l!==s&&(s=l,r.current?.(l))};if(d(),typeof ResizeObserver>"u")return;let m=new ResizeObserver(d),E=()=>{m.disconnect();let{strip:y,line:h,content:p,measure:g}=c();for(let l of[i,y,h,p,g])l&&m.observe(l)};E();let S=new MutationObserver(()=>{E(),d()});return S.observe(i,{childList:!0}),()=>{m.disconnect(),S.disconnect()}},[e,n,o])}var xe=480,me=0;function ke(e){let{app:n,seed:t,scheme:r="auto",brand:o=n.brand,fonts:i=!0,height:c="100%",label:s}=e,d=(0,a.useRef)(null);D(d);let m=c==="viewport"?"100dvh":c,E=Z(typeof m=="string"&&/vh\b/.test(m)),S=(0,a.useMemo)(()=>`graview-embed-${++me}`,[]),y=(0,a.useMemo)(()=>e.store??e.remote?.store??le(n,t),[e.store,e.remote,n,t]),h=e.presence??e.remote?.presence,p=e.hostContext?.theme,g=ue(r==="auto"&&p===void 0,o?.scheme),l=r==="auto"?p??g:r,b=(0,a.useMemo)(()=>I(l,o,{scope:`.${S}`}),[l,o,S]);q(e.favicon?M(o):void 0),(0,a.useEffect)(()=>{if(!i||typeof document>"u")return;let w=te(o);if(!w||document.querySelector(`link[href="${w}"]`))return;let f=document.createElement("link");f.rel="stylesheet",f.href=w,document.head.appendChild(f)},[o,i]);let k=(0,a.useRef)(void 0);(0,a.useLayoutEffect)(()=>{let w=d.current,f=k.current;if(k.current=s,!w||!s)return;let ie=v=>{let R=v.getAttribute("aria-label")??"",x=f&&f!==s?R.startsWith(`${f} \xB7 `)?R.slice(f.length+3):R===f?"":R:R;x===s&&(v.getAttribute("role")==="region"||v.tagName==="SECTION"&&!v.hasAttribute("role"))&&v.setAttribute("role","group");let C=x.startsWith(`${s} \xB7 `)||x===s?x:x?`${s} \xB7 ${x}`:s;C!==R&&v.setAttribute("aria-label",C)},B=()=>w.querySelectorAll("aside, nav, main, header, footer, section[aria-label]:not([role]), [role=region], [role=complementary], [role=navigation], [role=search]").forEach(v=>{v.hasAttribute("data-graview-named-by-lens")||ie(v)});B();let H=new MutationObserver(B);return H.observe(w,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["aria-label"]}),()=>H.disconnect()},[s]);let ae=E?`${m}`.replace(/([\d.]+)[sdl]?vh\b/g,(w,f)=>`${+f*E/100}px`):m;return{rootRef:d,scope:S,css:b,scheme:l,store:y,presence:h,brand:o,auto:c==="auto",height:ae}}function Ae({rootRef:e,board:n}){let t=(0,a.useCallback)(()=>e.current?.querySelector("[data-embed-content]")??e.current,[e]);return(0,u.jsx)(z,{board:n,anchor:t})}function Fe(e,n,t){return{brand:t,locale:e.locale,timeZone:e.timeZone,principal:e.principal,seats:e.seats,presence:n,people:e.people,memory:e.memory,presenceTtlMs:e.presenceTtlMs,onKeepLens:e.onKeepLens,ai:e.ai,files:e.files,resolveApp:e.resolveApp,history:e.history,linkedRecords:e.linkedRecords,subscriptions:e.subscriptions,keptViews:e.keptViews,signIn:e.signIn,menuSections:e.menuSections,app:e.app}}function Le({name:e,heading:n,faces:t,at:r,without:o,home:i,reach:c,standing:s,hostActions:d,keeping:m,onFind:E,switch:S,named:y=!0}){let{brand:h,store:p,principal:g,views:l}=T();$();let b=o?.has("places")?[]:W({store:p,principal:g,views:l}),k=J();return(0,u.jsx)(_,{brand:h,name:e,named:y,description:h?.subtitle,heading:n,faces:t,home:i,places:b,current:r===null?null:j(b,r),reach:c,onFind:E,...S?{switch:S}:{},...t||r===null?{scenePlaces:k}:{},tools:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(X,{clean:s}),(0,u.jsx)(U,{...d?{hostActions:d}:{},...m?{keeping:m}:{}})]})})}var Be=e=>e===!1?2:Math.min(e+1,6);function He(e){let[n,t]=(0,a.useState)(e),r=(0,a.useRef)(void 0),o=(0,a.useRef)(void 0),i=(0,a.useMemo)(()=>({go:r,at:t,pending:o}),[]),c=(0,a.useCallback)(s=>{if(r.current){r.current(s);return}o.current=s,t(s)},[]);return{at:n,setAt:t,steering:i,steer:c}}function ye(e){let n=typeof e=="object"&&e!==null?e.name:void 0;return{name:typeof n=="string"&&n.length>0?n:typeof e=="object"?"Error":typeof e}}var L=()=>typeof performance<"u"?performance.now():Date.now();function Ce(e,n){let t=(0,a.useRef)({onError:e,face:n});return t.current={onError:e,face:n},(0,a.useCallback)((r,o)=>t.current.onError?.(ye(r),{module:o.module,face:t.current.face}),[])}function Ve(e,n){let t=(0,a.useRef)(null);t.current===null&&(t.current=L());let r=(0,a.useRef)({onReady:e,face:n});r.current={onReady:e,face:n};let o=(0,a.useRef)(!1);return(0,a.useCallback)(i=>{o.current||(o.current=!0,r.current.onReady?.({ms:Math.max(0,L()-(t.current??L())),face:i}))},[])}var oe=class extends a.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(n,t){console.error(`[graview] ${this.props.module} threw while rendering`,n,t.componentStack),this.props.report(n,{module:this.props.module})}render(){return this.state.failed?(0,u.jsxs)("div",{role:"alert","data-graview-face-error":this.props.module,...this.props.content?{"data-embed-content":""}:{},style:this.props.content?{flex:"1 1 auto",display:"grid",alignContent:"center",justifyItems:"center",gap:8,padding:24,background:"var(--graview-ground)",color:"var(--graview-ink)",fontSize:"0.9375rem"}:{display:"inline-flex",alignItems:"center",gap:6,fontSize:"0.8125rem",color:"var(--graview-ink-muted)"},children:[(0,u.jsx)("span",{children:this.props.content?"This part of the app could not draw.":"Could not draw."}),(0,u.jsx)("button",{type:"button",onClick:()=>this.setState({failed:!1}),style:{padding:"3px 11px",fontSize:"0.8125rem"},children:"Try again"})]}):this.props.children}};export{ve as a,we as b,Ee as c,le as d,Re as e,xe as f,ke as g,Ae as h,Fe as i,Le as j,Be as k,He as l,Ce as m,Ve as n,oe as o};
1
+ import{A as J,C as Q,E as X,I as Y,K as ee,N as ne,a as I,i as q,l as Z,p as z,s as W,t as j,x as _,y as U}from"./chunk.VP35BUUZ.js";import{Ca as D,G as se,R as N,_ as T,aa as $,na as G,va as K}from"./chunk.7L6LYXCV.js";import{Pc as O,ac as V,jc as M,mc as P}from"./chunk.7MQ7UWVW.js";import{b as F}from"./chunk.AJZBJBMO.js";var a=F(se(),1);function ce(e){let n=[e?.typography?.body,e?.typography?.display,e?.typography?.mono],t=[];for(let r of n){let o=r?.split(",")[0]?.trim().replace(/^["']|["']$/g,"");!o||P(o)||o.toLowerCase()!==V.toLowerCase()&&(t.includes(o)||t.push(o))}return t}function te(e){let n=ce(e);return n.length===0?null:`https://fonts.googleapis.com/css2?${n.map(r=>`family=${encodeURIComponent(r).replace(/%20/g,"+")}:wght@400;500;600;700`).join("&")}&display=swap`}var u=F(N(),1),ve=e=>typeof e=="object"?e:{};function we({rootRef:e,firstLook:n,app:t}){let r=(0,a.useCallback)(()=>e.current,[e]);return n?(0,u.jsx)(ne,{firstLook:n,root:r,app:t}):null}function Ee(e,n,t){let{app:r}=e,o=(0,a.useMemo)(()=>{let i=Y(n(r.schema,r.viewSpecs),r),c=t?de(i,t):i,s=e.views?e.views(r.schema,c):i,d=s===c?i:G(i,s);return ee(d,r.schema,Q(e.brand??r.brand,r.schema)),t?t.register(d):d},[e.views,r.schema,r.viewSpecs,r.lenses,r.pages,r.home,t]);return K(o,e.keptViews)}function de(e,n){let t={...e,register(r,o,i,c){return c?.name!==n.name&&e.register(r,o,i,c),t},...e.home?{home:r=>(n.home||e.home(r),t)}:{}};return t}function le(e,n){return new O({schema:e.schema,mutations:e.mutations??[],invariants:e.invariants??[],...n?{snapshot:n}:{},...e.policy?{policy:e.policy}:{},...e.intelligence?{intelligence:e.intelligence}:{},...e.brand?.timeZone?{timeZone:e.brand.timeZone}:{}})}function re(e){if(typeof document>"u")return e==="dark"?"dark":"light";let n=document.documentElement.dataset.theme;return n==="dark"||n==="light"?n:e==="dark"||e==="light"?e:typeof matchMedia=="function"&&matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function ue(e,n){let[t,r]=(0,a.useState)(()=>re(n));return(0,a.useEffect)(()=>{if(!e||typeof document>"u")return;let o=()=>r(re(n));o();let i=new MutationObserver(o);i.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]});let c=typeof matchMedia=="function"?matchMedia("(prefers-color-scheme: dark)"):null;return c?.addEventListener?.("change",o),()=>{i.disconnect(),c?.removeEventListener?.("change",o)}},[e,n]),t}var A=e=>e?e.getBoundingClientRect().height:0;function Re(e,n,t){let r=(0,a.useRef)(t);r.current=t;let o=t!==void 0;(0,a.useLayoutEffect)(()=>{let i=e.current;if(!i||!o)return;let c=()=>{let y=[...i.children],h=y.find(b=>b.hasAttribute("data-graview-app-bar")),p=y.find(b=>b.hasAttribute("data-embed-content")),g=p?.querySelector("[data-embed-measure]")??null,l=y.find(b=>b.hasAttribute("data-graview-place-line"));return{strip:h,line:l,content:p,measure:g}},s=-1,d=()=>{let{strip:y,line:h,content:p,measure:g}=c(),l=Math.ceil(A(y)+A(h)+A(g||p));l!==s&&(s=l,r.current?.(l))};if(d(),typeof ResizeObserver>"u")return;let m=new ResizeObserver(d),E=()=>{m.disconnect();let{strip:y,line:h,content:p,measure:g}=c();for(let l of[i,y,h,p,g])l&&m.observe(l)};E();let S=new MutationObserver(()=>{E(),d()});return S.observe(i,{childList:!0}),()=>{m.disconnect(),S.disconnect()}},[e,n,o])}var xe=480,me=0;function ke(e){let{app:n,seed:t,scheme:r="auto",brand:o=n.brand,fonts:i=!0,height:c="100%",label:s}=e,d=(0,a.useRef)(null);D(d);let m=c==="viewport"?"100dvh":c,E=Z(typeof m=="string"&&/vh\b/.test(m)),S=(0,a.useMemo)(()=>`graview-embed-${++me}`,[]),y=(0,a.useMemo)(()=>e.store??e.remote?.store??le(n,t),[e.store,e.remote,n,t]),h=e.presence??e.remote?.presence,p=e.hostContext?.theme,g=ue(r==="auto"&&p===void 0,o?.scheme),l=r==="auto"?p??g:r,b=(0,a.useMemo)(()=>I(l,o,{scope:`.${S}`}),[l,o,S]);q(e.favicon?M(o):void 0),(0,a.useEffect)(()=>{if(!i||typeof document>"u")return;let w=te(o);if(!w||document.querySelector(`link[href="${w}"]`))return;let f=document.createElement("link");f.rel="stylesheet",f.href=w,document.head.appendChild(f)},[o,i]);let k=(0,a.useRef)(void 0);(0,a.useLayoutEffect)(()=>{let w=d.current,f=k.current;if(k.current=s,!w||!s)return;let ie=v=>{let R=v.getAttribute("aria-label")??"",x=f&&f!==s?R.startsWith(`${f} \xB7 `)?R.slice(f.length+3):R===f?"":R:R;x===s&&(v.getAttribute("role")==="region"||v.tagName==="SECTION"&&!v.hasAttribute("role"))&&v.setAttribute("role","group");let C=x.startsWith(`${s} \xB7 `)||x===s?x:x?`${s} \xB7 ${x}`:s;C!==R&&v.setAttribute("aria-label",C)},B=()=>w.querySelectorAll("aside, nav, main, header, footer, section[aria-label]:not([role]), [role=region], [role=complementary], [role=navigation], [role=search]").forEach(v=>{v.hasAttribute("data-graview-named-by-lens")||ie(v)});B();let H=new MutationObserver(B);return H.observe(w,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["aria-label"]}),()=>H.disconnect()},[s]);let ae=E?`${m}`.replace(/([\d.]+)[sdl]?vh\b/g,(w,f)=>`${+f*E/100}px`):m;return{rootRef:d,scope:S,css:b,scheme:l,store:y,presence:h,brand:o,auto:c==="auto",height:ae}}function Ae({rootRef:e,board:n}){let t=(0,a.useCallback)(()=>e.current?.querySelector("[data-embed-content]")??e.current,[e]);return(0,u.jsx)(z,{board:n,anchor:t})}function Fe(e,n,t){return{brand:t,locale:e.locale,timeZone:e.timeZone,principal:e.principal,seats:e.seats,presence:n,people:e.people,memory:e.memory,presenceTtlMs:e.presenceTtlMs,onKeepLens:e.onKeepLens,ai:e.ai,files:e.files,resolveApp:e.resolveApp,history:e.history,linkedRecords:e.linkedRecords,subscriptions:e.subscriptions,keptViews:e.keptViews,signIn:e.signIn,menuSections:e.menuSections,app:e.app}}function Le({name:e,heading:n,faces:t,at:r,without:o,home:i,reach:c,standing:s,hostActions:d,keeping:m,onFind:E,switch:S,named:y=!0}){let{brand:h,store:p,principal:g,views:l}=T();$();let b=o?.has("places")?[]:W({store:p,principal:g,views:l}),k=J();return(0,u.jsx)(_,{brand:h,name:e,named:y,description:h?.subtitle,heading:n,faces:t,home:i,places:b,current:r===null?null:j(b,r),reach:c,onFind:E,...S?{switch:S}:{},...t||r===null?{scenePlaces:k}:{},tools:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(X,{clean:s}),(0,u.jsx)(U,{...d?{hostActions:d}:{},...m?{keeping:m}:{}})]})})}var Be=e=>e===!1?2:Math.min(e+1,6);function He(e){let[n,t]=(0,a.useState)(e),r=(0,a.useRef)(void 0),o=(0,a.useRef)(void 0),i=(0,a.useMemo)(()=>({go:r,at:t,pending:o}),[]),c=(0,a.useCallback)(s=>{if(r.current){r.current(s);return}o.current=s,t(s)},[]);return{at:n,setAt:t,steering:i,steer:c}}function ye(e){let n=typeof e=="object"&&e!==null?e.name:void 0;return{name:typeof n=="string"&&n.length>0?n:typeof e=="object"?"Error":typeof e}}var L=()=>typeof performance<"u"?performance.now():Date.now();function Ce(e,n){let t=(0,a.useRef)({onError:e,face:n});return t.current={onError:e,face:n},(0,a.useCallback)((r,o)=>t.current.onError?.(ye(r),{module:o.module,face:t.current.face}),[])}function Ve(e,n){let t=(0,a.useRef)(null);t.current===null&&(t.current=L());let r=(0,a.useRef)({onReady:e,face:n});r.current={onReady:e,face:n};let o=(0,a.useRef)(!1);return(0,a.useCallback)(i=>{o.current||(o.current=!0,r.current.onReady?.({ms:Math.max(0,L()-(t.current??L())),face:i}))},[])}var oe=class extends a.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(n,t){console.error(`[graview] ${this.props.module} threw while rendering`,n,t.componentStack),this.props.report(n,{module:this.props.module})}render(){return this.state.failed?(0,u.jsxs)("div",{role:"alert","data-graview-face-error":this.props.module,...this.props.content?{"data-embed-content":""}:{},style:this.props.content?{flex:"1 1 auto",display:"grid",alignContent:"center",justifyItems:"center",gap:8,padding:24,background:"var(--graview-ground)",color:"var(--graview-ink)",fontSize:"0.9375rem"}:{display:"inline-flex",alignItems:"center",gap:6,fontSize:"0.8125rem",color:"var(--graview-ink-muted)"},children:[(0,u.jsx)("span",{children:this.props.content?"This part of the app could not draw.":"Could not draw."}),(0,u.jsx)("button",{type:"button",onClick:()=>this.setState({failed:!1}),style:{padding:"3px 11px",fontSize:"0.8125rem"},children:"Try again"})]}):this.props.children}};export{ve as a,we as b,Ee as c,le as d,Re as e,xe as f,ke as g,Ae as h,Fe as i,Le as j,Be as k,He as l,Ce as m,Ve as n,oe as o};
@@ -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{b as z}from"./chunk.ZHRW2UF4.js";import{a as U,b as V,c as b,d as B,e as C,f as W}from"./chunk.4IDXQVSW.js";import{a as J,b as h,d as A}from"./chunk.ZUJZVK2X.js";import{a as p,b as T,c as S,e as _}from"./chunk.BBLIT7S7.js";import{a as R}from"./chunk.SDO3U72B.js";import"./chunk.7MQ7UWVW.js";import"./chunk.2AZTW66C.js";import"./chunk.AJZBJBMO.js";var Q=R(()=>(__graviewPreload(import.meta.url,["./chunk.AJZBJBMO.js"]),import("./chunk.SHNYYBNW.js")));function te(d,e){let f=d.ownerDocument,u=f.defaultView,t=f.createElement("iframe");t.setAttribute("sandbox",T),t.setAttribute("referrerpolicy","no-referrer"),t.setAttribute("allow",""),t.setAttribute("title",e.title??e.view),t.setAttribute("data-guest-view",e.view),t.setAttribute("aria-busy","true"),t.style.border="0",t.style.width="100%",t.style.display="block",t.src=e.url;let a={applied:0,refused:0,dropped:0},P=h(e.limits),i,y,o={applied:0,refused:0,dropped:0},v=()=>{if(!i)return;let r=i.stats;a.applied+=r.applied-o.applied,a.refused+=r.refused-o.refused,a.dropped+=r.dropped-o.dropped,o={...r}},O=W(u,()=>l(),"data"),g=()=>C(()=>e.theme?.()??b(d),e.brand,O),L="",l=()=>{i&&(L=JSON.stringify(g()),i.push())},k=B(f,()=>{i&&JSON.stringify(g())!==L&&l()}),n,w=!1,D=e.pictures?z(Q,({createGuestPictures:r})=>{n=r(u,{as:"data",view:`"${e.title??e.view}"`,pictures:e.pictures,...e.limits?{limits:e.limits}:{},...e.file?{file:e.file}:{},moved:()=>{i?.push(),G&&E()}}),w&&x()}):()=>{},G=!1,c,N=()=>{!G||n?.waiting()||(clearTimeout(c),t.removeAttribute("data-guest-view-failed"),t.removeAttribute("aria-busy"),t.setAttribute("data-guest-view-drawn",""))},E=()=>{clearTimeout(c),c=setTimeout(N,250)},F=setTimeout(()=>{i||(t.removeAttribute("aria-busy"),t.setAttribute("data-guest-view-failed","silent"))},e.limits?.readyMs??8e3),H=()=>{v(),i?.dispose(),y?.close(),i=void 0,y=void 0,o={applied:0,refused:0,dropped:0}},M=r=>{if(!(r.source===null||r.source!==t.contentWindow)){if(r.origin!==S||!P.message()){a.dropped+=1;return}if(!_(r.data)||r.data.protocol!==1){a.dropped+=1;return}if(e.pictures&&!n){w=!0;return}x()}},x=()=>{w=!1,H();let r=U(),m=new MessageChannel;y=m.port1;let I=A({store:e.store,principal:e.principal,view:e.view,nonce:r,send:s=>m.port1.postMessage(s),...e.input?{input:e.input}:{},...e.reads?{reads:e.reads}:{},...n?{hand:n.hand}:{},theme:g,...e.places?{places:()=>[...new Set(e.places().map(s=>s.as))],placesShown:e.places}:{},...e.onNavigatePlace?{onNavigatePlace:e.onNavigatePlace}:{},...e.onNavigate?{onNavigate:e.onNavigate}:{},...e.onArrive?{onArrive:e.onArrive}:e.goTo?{onArrive:s=>V(e.goTo(),s)}:{},...e.onLost?{onLost:e.onLost}:{},onSize:s=>{e.onSize?e.onSize(s):t.style.height=`${s}px`,N()},...e.limits?{limits:e.limits}:{},limiter:P});i=I,m.port1.onmessage=s=>{I.receive(s.data),v()};let j={graview:"host-hello",protocol:1,nonce:r,view:e.view};t.contentWindow.postMessage(j,"*",[m.port2]),l(),G=!0,E()};return u.addEventListener("message",M),d.appendChild(t),d.removeAttribute("aria-busy"),{iframe:t,update:l,get stats(){return v(),a},dispose(){H(),clearTimeout(F),clearTimeout(c),k(),O.dispose(),D(),n?.dispose(),u.removeEventListener("message",M),t.remove()}}}export{p as GUEST_PROTOCOL,T as GUEST_SANDBOX,S as OPAQUE_ORIGIN,A as createGuestHost,h as createGuestLimiter,te as mountGuestView,J as readAcross,b as readTheme};
@@ -0,0 +1 @@
1
+ var n=1,r="allow-scripts",o="null";var t=["wheel","drag","pinch"];function a(e){return typeof e=="object"&&e!==null&&e.graview==="guest-ready"}export{n as a,r as b,o as c,t as d,a as e};
@@ -1 +1 @@
1
- import{a as I,b as H,c as T,e as D,h as V,i as R,j as A,k,l as x,n as Y,o as Z}from"./chunk.67WWRC6Y.js";import{b as U}from"./chunk.UUBYFBPN.js";import{H as C,N as G,Ua as F,W as M,Xa as B,ba as W,da as j}from"./chunk.V5MYKNL7.js";function re(e,r){return e===void 0||e===!0?!0:e===!1?!1:e[r]!==!1}function te(e){let r={};return e.query&&e.query.trim().length>0&&(r.q=e.query),e.archived!==void 0&&e.archived!==!1&&(r.archived=String(e.archived)),e.sort&&(r.sort=e.sort.direction==="desc"?`${e.sort.by}:desc`:e.sort.by),e.filter?.length&&(r.filter=e.filter.map(n=>`${n.key}:${n.value}`).join(",")),e.group&&(r.group=e.group.bucket?`${e.group.by}:${e.group.bucket}`:e.group.by),r}function ne(e,r){let n=[],s={};if(e.query&&(s.query=e.query),e.archived!==void 0&&e.archived!==!1&&(s.archived=e.archived),e.sort&&(r.sorts.some(u=>u.key===e.sort.by)?s.sort=e.sort:n.push(`sort ${e.sort.by}`)),e.filter){let u=e.filter.filter(c=>r.filters.find(f=>f.key===c.key)?!0:(n.push(`filter ${c.key}`),!1));u.length>0&&(s.filter=u)}return e.group&&(r.groups.some(u=>u.key===e.group.by)?s.group=e.group:n.push(`group ${e.group.by}`)),{arrangement:s,dropped:n}}function S(e,r){return W(e.schema.tryDefinition(r.kind),A(r))}var oe=(e,r)=>e==null?r==null?0:1:r==null?-1:typeof e=="number"&&typeof r=="number"?e-r:typeof e=="boolean"&&typeof r=="boolean"?e===r?0:e?1:-1:String(e).localeCompare(String(r),void 0,{numeric:!0,sensitivity:"base"});function ie(e,r,n){if(n==="label")return S(e,r);let s=e.schema.tryDefinition(r.kind);return s&&n in(s.fields.shape??{})?F(R(r),n,e.today??C()):s?.computed?.[n]!==void 0?e.read?.(r,n):k(e.graph,r.id,n).map(c=>S(e,c)).sort()[0]}var se=/^(\d{4})-(\d{2})-(\d{2})/;function _(e,r){let n=se.exec(e);if(!n)return;let[,s,u,c]=n;if(r==="day")return`${s}-${u}-${c}`;if(r==="month")return`${s}-${u}-01`;if(r==="year")return`${s}-01-01`;if(r==="decade")return`${String(Number(s)-Number(s)%10).padStart(4,"0")}-01-01`;let a=new Date(Date.UTC(Number(s),Number(u)-1,Number(c))),f=(a.getUTCDay()+6)%7;return a.setUTCDate(a.getUTCDate()-f),a.toISOString().slice(0,10)}function de(e,r){return r==="month"?M(e):r==="week"?`Week of ${G(e)}`:r==="year"?e.slice(0,4):r==="decade"?`The ${e.slice(0,4)}s`:G(e)}function ue(e,r,n){return z(e,n)(r)}function z(e,r){let{words:n,conditions:s}=Y(r);if(n.length===0&&s.length===0)return()=>!0;let u=new Map,c=a=>{let f=u.get(a);return f||(f=new Set(D(e.schema,a).filters.map(d=>d.key)),u.set(a,f)),f};return a=>{let f=c(a.kind),d=s.filter(i=>f.has(i.key));return d.every(i=>x(e,a,i))?n.length>0?Z(e.schema.tryDefinition(a.kind),A(a),n,e.searchIn)!==void 0:d.length>0:!1}}function ae(e,r,n){let s=r.query?.trim(),u=r.archived===void 0?e:e.filter(t=>B(t,r.archived)),c=s?u.filter(z(n,s)):u,a=r.filter?.length?c.filter(t=>r.filter.every(l=>x(n,t,l))):[...c],f=[];for(let t=r.sort;t&&f.length<4;t=t.then)f.push(t);let d=f.length>0?a.map((t,l)=>({node:t,index:l,values:f.map(o=>ie(n,t,o.by))})).sort((t,l)=>{for(let[o,p]of f.entries()){let[h,K]=[t.values[o],l.values[o]],v=oe(h,K),E=p.direction==="desc"&&v!==0&&h!==void 0&&K!==void 0?-v:v;if(E!==0)return E}return t.index-l.index}).map(t=>t.node):a,i=r.group;if(!i)return{nodes:d,groups:[{key:"",label:"",nodes:d}],grouped:!1};let y=new Map,g=(t,l,o)=>{let p=y.get(t)??{label:l,nodes:[]};p.nodes.push(o),y.set(t,p)},N=d[0],m=N?n.schema.tryDefinition(N.kind):void 0,O=m?.fields.shape??{},J=m?I(m,i.by):j(i.by),$=i.by in O,b=$?H(O[i.by]):void 0,X=T(n.schema,N?.kind??"").find(t=>t.key===i.by)?.label,L=$?`No ${J.toLowerCase()}`:`Without ${(X??j(i.by)).toLowerCase()}`,q=$?new Map:U([...new Map(d.flatMap(t=>k(n.graph,t.id,i.by)).map(t=>[t.id,t])).values()].map(A),t=>n.schema.tryDefinition(t));for(let t of d){if($){let o=F(R(t),i.by,n.today??C());if(o==null||o==="")g("",L,t);else if(b==="date"){let p=i.bucket??"day",h=_(String(o),p);h?g(h,de(h,p),t):g("",L,t)}else if(b==="boolean")g(o?"1":"0",o?"Yes":"No",t);else{let p=m?.display?.format?.[i.by];g(String(o),p?p(o):String(o),t)}continue}let l=k(n.graph,t.id,i.by).map(o=>({id:o.id,label:q.has(o.id)?`${S(n,o)} \xB7 ${q.get(o.id)}`:S(n,o)})).sort((o,p)=>o.label.localeCompare(p.label));l.length===0?g("",L,t):g(l.map(o=>o.id).join(","),l.map(o=>o.label).join(", "),t)}let w=b==="choice"?V(O[i.by]):void 0,ee=[...y.entries()].sort(([t,l],[o,p])=>t===""?1:o===""?-1:w?w.indexOf(t)-w.indexOf(o):b==="boolean"?o.localeCompare(t):b==="date"?t.localeCompare(o):l.label.localeCompare(p.label)).map(([t,l])=>({key:t,label:l.label,nodes:l.nodes}));return{nodes:d,groups:ee,grouped:!0}}function P(e){if(e===void 0)return;if(typeof e=="string")return{by:e,direction:"asc"};let r=e.then===void 0?void 0:typeof e.then=="string"?{by:e.then,direction:"asc"}:{by:e.then.by,direction:e.then.direction??"asc"};return{by:e.by,direction:e.direction??"asc",...r?{then:r}:{}}}function Q(e){if(e!==void 0)return typeof e=="string"?{by:e}:e}function fe(e){let r=P(e?.sort),n=Q(e?.group);if(!(!r&&!n))return{...r?{sort:r}:{},...n?{group:{by:n.by}}:{}}}var le=(e,r)=>r?e==="1"?"true":"false":e;function ce(e,r,n){let s=n.type==="boolean",u=s?["true","false"]:n.options??[],c=[...new Set([...(r.order??[]).filter(d=>u.includes(d)),...u])],a=r.closed??[],f=d=>{if(d.key==="")return[1,0];let i=le(d.key,s);if(a.includes(i))return[2,a.indexOf(i)];let y=c.indexOf(i);return[0,y<0?c.length:y]};return e.map((d,i)=>({group:d,at:i,rank:f(d)})).sort((d,i)=>d.rank[0]-i.rank[0]||d.rank[1]-i.rank[1]||d.at-i.at).map(({group:d,rank:i})=>({...d,closed:i[0]===2}))}export{Q as a,fe as b,ce as c,re as d,te as e,ne as f,ue as g,ae as h};
1
+ import{a as I,b as H,c as T,e as D,h as V,i as R,j as A,k,l as x,n as Y,o as Z}from"./chunk.MBOOUJOE.js";import{b as U}from"./chunk.R7F6UJVG.js";import{I as C,O as G,Va as F,X as M,Ya as B,ca as W,ea as j}from"./chunk.7MQ7UWVW.js";function re(e,r){return e===void 0||e===!0?!0:e===!1?!1:e[r]!==!1}function te(e){let r={};return e.query&&e.query.trim().length>0&&(r.q=e.query),e.archived!==void 0&&e.archived!==!1&&(r.archived=String(e.archived)),e.sort&&(r.sort=e.sort.direction==="desc"?`${e.sort.by}:desc`:e.sort.by),e.filter?.length&&(r.filter=e.filter.map(n=>`${n.key}:${n.value}`).join(",")),e.group&&(r.group=e.group.bucket?`${e.group.by}:${e.group.bucket}`:e.group.by),r}function ne(e,r){let n=[],s={};if(e.query&&(s.query=e.query),e.archived!==void 0&&e.archived!==!1&&(s.archived=e.archived),e.sort&&(r.sorts.some(u=>u.key===e.sort.by)?s.sort=e.sort:n.push(`sort ${e.sort.by}`)),e.filter){let u=e.filter.filter(c=>r.filters.find(f=>f.key===c.key)?!0:(n.push(`filter ${c.key}`),!1));u.length>0&&(s.filter=u)}return e.group&&(r.groups.some(u=>u.key===e.group.by)?s.group=e.group:n.push(`group ${e.group.by}`)),{arrangement:s,dropped:n}}function S(e,r){return W(e.schema.tryDefinition(r.kind),A(r))}var oe=(e,r)=>e==null?r==null?0:1:r==null?-1:typeof e=="number"&&typeof r=="number"?e-r:typeof e=="boolean"&&typeof r=="boolean"?e===r?0:e?1:-1:String(e).localeCompare(String(r),void 0,{numeric:!0,sensitivity:"base"});function ie(e,r,n){if(n==="label")return S(e,r);let s=e.schema.tryDefinition(r.kind);return s&&n in(s.fields.shape??{})?F(R(r),n,e.today??C()):s?.computed?.[n]!==void 0?e.read?.(r,n):k(e.graph,r.id,n).map(c=>S(e,c)).sort()[0]}var se=/^(\d{4})-(\d{2})-(\d{2})/;function _(e,r){let n=se.exec(e);if(!n)return;let[,s,u,c]=n;if(r==="day")return`${s}-${u}-${c}`;if(r==="month")return`${s}-${u}-01`;if(r==="year")return`${s}-01-01`;if(r==="decade")return`${String(Number(s)-Number(s)%10).padStart(4,"0")}-01-01`;let a=new Date(Date.UTC(Number(s),Number(u)-1,Number(c))),f=(a.getUTCDay()+6)%7;return a.setUTCDate(a.getUTCDate()-f),a.toISOString().slice(0,10)}function de(e,r){return r==="month"?M(e):r==="week"?`Week of ${G(e)}`:r==="year"?e.slice(0,4):r==="decade"?`The ${e.slice(0,4)}s`:G(e)}function ue(e,r,n){return z(e,n)(r)}function z(e,r){let{words:n,conditions:s}=Y(r);if(n.length===0&&s.length===0)return()=>!0;let u=new Map,c=a=>{let f=u.get(a);return f||(f=new Set(D(e.schema,a).filters.map(d=>d.key)),u.set(a,f)),f};return a=>{let f=c(a.kind),d=s.filter(i=>f.has(i.key));return d.every(i=>x(e,a,i))?n.length>0?Z(e.schema.tryDefinition(a.kind),A(a),n,e.searchIn)!==void 0:d.length>0:!1}}function ae(e,r,n){let s=r.query?.trim(),u=r.archived===void 0?e:e.filter(t=>B(t,r.archived)),c=s?u.filter(z(n,s)):u,a=r.filter?.length?c.filter(t=>r.filter.every(l=>x(n,t,l))):[...c],f=[];for(let t=r.sort;t&&f.length<4;t=t.then)f.push(t);let d=f.length>0?a.map((t,l)=>({node:t,index:l,values:f.map(o=>ie(n,t,o.by))})).sort((t,l)=>{for(let[o,p]of f.entries()){let[h,K]=[t.values[o],l.values[o]],v=oe(h,K),E=p.direction==="desc"&&v!==0&&h!==void 0&&K!==void 0?-v:v;if(E!==0)return E}return t.index-l.index}).map(t=>t.node):a,i=r.group;if(!i)return{nodes:d,groups:[{key:"",label:"",nodes:d}],grouped:!1};let y=new Map,g=(t,l,o)=>{let p=y.get(t)??{label:l,nodes:[]};p.nodes.push(o),y.set(t,p)},N=d[0],m=N?n.schema.tryDefinition(N.kind):void 0,O=m?.fields.shape??{},J=m?I(m,i.by):j(i.by),$=i.by in O,b=$?H(O[i.by]):void 0,X=T(n.schema,N?.kind??"").find(t=>t.key===i.by)?.label,L=$?`No ${J.toLowerCase()}`:`Without ${(X??j(i.by)).toLowerCase()}`,q=$?new Map:U([...new Map(d.flatMap(t=>k(n.graph,t.id,i.by)).map(t=>[t.id,t])).values()].map(A),t=>n.schema.tryDefinition(t));for(let t of d){if($){let o=F(R(t),i.by,n.today??C());if(o==null||o==="")g("",L,t);else if(b==="date"){let p=i.bucket??"day",h=_(String(o),p);h?g(h,de(h,p),t):g("",L,t)}else if(b==="boolean")g(o?"1":"0",o?"Yes":"No",t);else{let p=m?.display?.format?.[i.by];g(String(o),p?p(o):String(o),t)}continue}let l=k(n.graph,t.id,i.by).map(o=>({id:o.id,label:q.has(o.id)?`${S(n,o)} \xB7 ${q.get(o.id)}`:S(n,o)})).sort((o,p)=>o.label.localeCompare(p.label));l.length===0?g("",L,t):g(l.map(o=>o.id).join(","),l.map(o=>o.label).join(", "),t)}let w=b==="choice"?V(O[i.by]):void 0,ee=[...y.entries()].sort(([t,l],[o,p])=>t===""?1:o===""?-1:w?w.indexOf(t)-w.indexOf(o):b==="boolean"?o.localeCompare(t):b==="date"?t.localeCompare(o):l.label.localeCompare(p.label)).map(([t,l])=>({key:t,label:l.label,nodes:l.nodes}));return{nodes:d,groups:ee,grouped:!0}}function P(e){if(e===void 0)return;if(typeof e=="string")return{by:e,direction:"asc"};let r=e.then===void 0?void 0:typeof e.then=="string"?{by:e.then,direction:"asc"}:{by:e.then.by,direction:e.then.direction??"asc"};return{by:e.by,direction:e.direction??"asc",...r?{then:r}:{}}}function Q(e){if(e!==void 0)return typeof e=="string"?{by:e}:e}function fe(e){let r=P(e?.sort),n=Q(e?.group);if(!(!r&&!n))return{...r?{sort:r}:{},...n?{group:{by:n.by}}:{}}}var le=(e,r)=>r?e==="1"?"true":"false":e;function ce(e,r,n){let s=n.type==="boolean",u=s?["true","false"]:n.options??[],c=[...new Set([...(r.order??[]).filter(d=>u.includes(d)),...u])],a=r.closed??[],f=d=>{if(d.key==="")return[1,0];let i=le(d.key,s);if(a.includes(i))return[2,a.indexOf(i)];let y=c.indexOf(i);return[0,y<0?c.length:y]};return e.map((d,i)=>({group:d,at:i,rank:f(d)})).sort((d,i)=>d.rank[0]-i.rank[0]||d.rank[1]-i.rank[1]||d.at-i.at).map(({group:d,rank:i})=>({...d,closed:i[0]===2}))}export{Q as a,fe as b,ce as c,re as d,te as e,ne as f,ue as g,ae as h};
@@ -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 y}from"./chunk.6XEATXZC.js";import{m as g}from"./chunk.VP35BUUZ.js";import{G as R,R as c,ua as m}from"./chunk.7L6LYXCV.js";import{a as f}from"./chunk.SDO3U72B.js";import{la as p}from"./chunk.7MQ7UWVW.js";import{b as u}from"./chunk.AJZBJBMO.js";var o=u(R(),1);var r=u(c(),1),S,h=()=>S??=m(f(()=>(__graviewPreload(import.meta.url,["./chunk.FKLEIR4Y.js","./chunk.7XCBIID7.js","./chunk.MI2HL3LQ.js","./chunk.TMBFLZNH.js","./chunk.7MQ7UWVW.js","./chunk.2AZTW66C.js","./chunk.AJZBJBMO.js"]),import("./chunk.BYVLGDVJ.js"))));function L(e){let[n,t]=(0,o.useState)(()=>h().current);return(0,o.useEffect)(()=>{if(!e||n)return;let i=!0;return h().load().then(a=>i&&t(a),()=>{}),()=>{i=!1}},[e,n]),n}function D(e,n){let t=L(n.length>0);return(0,o.useMemo)(()=>t?t.withLines(e,n):n,[t,e,n])}function I(e,n){let t=L(n.some(i=>i.shape));return(0,o.useMemo)(()=>{let i=new Map;if(!t)return i;for(let a of n){let l=t.ruleLine(a,e);l&&i.set(a.name,l)}return i},[t,e,n])}function M(e){let n=e.line;if(!(!n||e.message.endsWith(` \u2014 ${n.text}`)||e.message===b(e)))return e.message}function b(e){let n=e.line;return n?n.record!==void 0?`${n.record} \u2014 ${n.text}`:n.text:e.message}var P={name:{},op:{color:"var(--graview-ink-muted)",fontWeight:500},value:{fontWeight:600,fontVariantNumeric:"tabular-nums"},word:{color:"var(--graview-ink-muted)"},open:{color:"var(--graview-ink-faint)"},close:{color:"var(--graview-ink-faint)"}};function w({parts:e}){return(0,r.jsx)(r.Fragment,{children:e.map((n,t)=>(0,r.jsxs)("span",{children:[n.space?" ":"",(0,r.jsx)("span",{"data-graview-rule-part":n.as,style:P[n.as],children:n.text})]},t))})}function x(e,n){let t=p(e?.tryDefinition(n),n);return t.charAt(0).toUpperCase()+t.slice(1)}function C({line:e,schema:n,brand:t,lead:i=e.record===void 0?"kind":"record",stacked:a=!1,style:l}){let d=e.kind,s=i==="kind"?d?x(n,d):void 0:i==="record"?e.record:void 0,k=i==="kind"&&s?`${s}: ${e.said}`:i==="record"&&s?`${s} \u2014 ${e.said}`:e.said;return(0,r.jsxs)("span",{"data-graview-rule-line":"",style:{overflowWrap:"anywhere",...l},children:[(0,r.jsx)("span",{style:g,children:k}),(0,r.jsxs)("span",{"aria-hidden":"true",children:[i!=="none"&&d?(0,r.jsx)("span",{style:{display:"inline-flex",verticalAlign:"-0.1em",marginRight:"0.4em"},children:(0,r.jsx)(y,{kind:d,...n?{schema:n}:{},...t?{brand:t}:{},size:13})}):null,s?(0,r.jsxs)("span",{"data-graview-rule-head":"",style:{fontWeight:600,marginRight:i==="record"||a?0:"0.6em"},children:[s,i==="record"&&!a?(0,r.jsx)("span",{style:{color:"var(--graview-ink-faint)",fontWeight:400},children:" \u2014 "}):null]}):null,a&&s?(0,r.jsx)("br",{}):null,(0,r.jsx)(w,{parts:e.parts}),e.when&&e.when.length>0?(0,r.jsxs)("span",{"data-graview-rule-when":"",style:{color:"var(--graview-ink-faint)"},children:[", when ",(0,r.jsx)(w,{parts:e.when})]}):null]})]})}function z(e){return e.line?e.label&&e.label.trim().length>0?e.label:void 0:e.label&&e.label!==e.message&&!e.message.startsWith(e.label)?e.label:void 0}export{D as a,I as b,M as c,C as d,z as e};
@@ -0,0 +1 @@
1
+ import{b as pt}from"./chunk.FKLEIR4Y.js";import{a as dt}from"./chunk.7XCBIID7.js";import{f as ct}from"./chunk.MI2HL3LQ.js";import{a as C,f as q}from"./chunk.TMBFLZNH.js";import{Eb as ut,F as Q,G as X,I as k,Nc as ft,O as G,R as tt,T as nt,U as et,ca as _,cb as it,ea as M,fb as lt,ga as rt,ja as ot,la as at}from"./chunk.7MQ7UWVW.js";import{d as st}from"./chunk.2AZTW66C.js";import"./chunk.AJZBJBMO.js";function J(t){let e=[],n=!0;for(let r of t){if(r.text.length===0)continue;let s=r.as==="close"||r.text===","||r.text===":"||r.text.startsWith("'")||n;e.push({part:r,space:!s}),n=r.as==="open"}return e}function D(t,e){return J(t).map(({part:n,space:r})=>`${r?" ":""}${e?n.said??n.text:n.text}`).join("")}function Ot(t){return D(t,!1)}function Et(t){return D(t,!0)}function mt(t,e=!1){let n=e?t.said:t.text;return t.record!==void 0?`${t.record} \u2014 ${n}`:n}function z(t){let e=u=>J(u).map(({part:o,space:a})=>({...o,space:a})),n=e(t.parts),r=t.when&&t.when.length>0?e(t.when):void 0,s=u=>`${D(n,u)}${r?`, when ${D(r,u)}`:""}`;return{...t,parts:n,...r?{when:r}:{},text:s(!1),said:s(!0)}}function Pt(t,e=!1){return t.line?mt(t.line,e):t.message}var yt=60,O=t=>({text:t,as:"name"}),c=(t,e)=>e===void 0?{text:t,as:"word"}:{text:t,as:"word",said:e},L=(t,e)=>e===void 0||e===t?{text:t,as:"value"}:{text:t,as:"value",said:e},R=(t,e)=>({text:t,as:"op",said:e}),v={text:"(",as:"open"},w={text:")",as:"close"},N={text:"\u2014",as:"value",said:"empty"},V={">=":["\u2265","at least"],"<=":["\u2264","at most"],"<":["<","less than"],">":[">","more than"],"==":["=","is"],"!=":["\u2260","is not"]},B={">=":"<","<=":">","<":">=",">":"<=","==":"!=","!=":"=="},Lt={"+":["+","plus"],"-":["\u2212","minus"],"*":["\xD7","times"],"/":["\xF7","divided by"],"%":["mod","modulo"]},ht=t=>t.t==="binary"&&t.op in V;function I(t){return t.length>1&&t[1]===t[1].toUpperCase()&&/[A-Z]/.test(t[1])?t:t.charAt(0).toLowerCase()+t.slice(1)}function bt(t){let{schema:e}=t,n=l=>l===null?void 0:e.tryDefinition(l),r=(l,m)=>{let g=n(l)?.edges;return g&&Object.hasOwn(g,m)?g[m]:void 0},s=(l,m)=>{let g=r(l,m)?.to;return Array.isArray(g)&&g.length===1?g[0]:null},u=(l,m)=>{let g=(e.edge(m)?.from??[]).filter(W=>{let K=r(W,m)?.to;return l===null||K==="*"||Array.isArray(K)&&K.includes(l)});return g.length===1?g[0]:null},o=(l,m)=>r(l,m)?M(m).toLowerCase():I(ot(n(l),m)),a=l=>I(rt(e,l)),d=l=>I(ct(e).get(l)?.label??M(l)),x=l=>I(at(n(l),l)),i=(l,m)=>{let g=l===null?void 0:t.formatOf?.(l,m);if(g?.format)return g;let W=t.said?.get(m);return W?{...g,format:W}:g},p=l=>_(e.tryDefinition(l.kind),l),h=t.money?.locale,y=(l,m)=>{if(l==null)return N;if(l instanceof C){if(l.nodes.length===0)return N;let A=l.nodes.slice(0,3).map(p),Y=l.nodes.length-A.length;return L(Y>0?`${A.join(", ")} and ${Y} more`:A.length>1?`${A.slice(0,-1).join(", ")} and ${A[A.length-1]}`:A[0])}if(Array.isArray(l))return L(`{${l.map(A=>y(A,m).text).join(", ")}}`,l.map(A=>y(A,m).text).join(" or "));if(typeof l=="object")return L(p(l));if(typeof l=="boolean")return L(l?"yes":"no");let g=m?.format??(m?i(m.kind,m.key):void 0);if(typeof l=="number")return L(g&&g.format!=="date"?ut(l,{...t.money,...g}):et(l,h));if(Q.test(l)||g?.format==="date")return L(G(nt(l,t.money?.timeZone)??l.slice(0,10),h));if(X.test(l))return L(tt(l,h,t.money?.timeZone));let W=m&&m.kind!==null?n(m.kind)?.display?.format?.[m.key]:void 0;if(W)return L(W(l));let K=l.length>yt?`${l.slice(0,yt-1).trimEnd()}\u2026`:l;return L(/^[a-z][a-z0-9]*([-_][a-z0-9]+)*$/.test(K)?K.replace(/[-_]+/g," "):K)};return{definition:n,relation:r,farOf:s,nearOf:u,fieldName:o,plural:a,noun:x,factName:d,formatOf:i,valueWords:y,locale:h}}function P(t,e,n){if(t.t==="ident")return{kind:e,key:t.name};if(t.t==="member")return{kind:E(t.object,e,n),key:t.name};if(t.t==="call"&&(t.fn==="sum"||t.fn==="min"||t.fn==="max")&&t.args.length===2){let r=E(t.args[0],e,n),s=t.args[1];if(s.t==="ident")return{kind:r,key:s.name};if(s.t==="lit"&&typeof s.value=="string")return{kind:r,key:s.value}}if(t.t==="binary"&&(t.op==="+"||t.op==="-"))return P(t.left,e,n)??P(t.right,e,n);if(t.t==="call"&&t.fn==="if"&&t.args.length===3)return P(t.args[1],e,n)??P(t.args[2],e,n)}function E(t,e,n){switch(t.t){case"ident":return n.relation(e,t.name)?n.farOf(e,t.name):null;case"member":return n.farOf(E(t.object,e,n),t.name);case"where":return E(t.set,e,n);case"binary":return t.op==="|"||t.op==="&"||t.op==="-"?E(t.left,e,n):null;case"call":{let r=s=>{let u=t.args[s];return u?.t==="lit"&&typeof u.value=="string"?u.value:void 0};return t.fn==="all"?r(0)??null:t.fn==="out"?t.args.length===2?n.farOf(E(t.args[0],e,n),r(1)??""):n.farOf(e,r(0)??""):t.fn==="in"?t.args.length===2?n.nearOf(E(t.args[0],e,n),r(1)??""):n.nearOf(e,r(0)??""):(t.fn==="first"||t.fn==="sort")&&t.args[0]?E(t.args[0],e,n):null}default:return null}}function j(t){return t.t==="binary"?t.op==="||"?U(t)?4:1:t.op==="&&"?2:t.op in V||t.op==="in"?4:t.op==="+"||t.op==="-"?5:t.op==="*"||t.op==="/"||t.op==="%"?6:4.5:t.t==="unary"&&t.op==="!"?3:t.t==="where"?3.5:9}var $=t=>t.t==="lit",b=(t,e)=>t.t==="call"&&t.fn===e;function F(t,e){return t.t==="binary"&&t.op===e?[...F(t.left,e),...F(t.right,e)]:[t]}function U(t){if(t.t!=="binary"||t.op!=="||")return;let e=[];e.push(...F(t,"||"));let n,r=[];for(let s of e){if(s.t!=="binary"||s.op!=="=="||!$(s.right)||typeof s.right.value!="string"||n&&JSON.stringify(gt(n))!==JSON.stringify(gt(s.left)))return;n=s.left,r.push(s.right)}return n?{subject:n,values:r}:void 0}var gt=t=>JSON.parse(JSON.stringify(t,(e,n)=>e==="at"?void 0:n));function f(t,e,n,r){let s=(u,o,a=e)=>j(u)<o?[v,...f(u,a,n),w]:f(u,a,n);switch(t.t){case"lit":return[n.valueWords(t.value,r)];case"list":return[n.valueWords(t.items.map(u=>u.t==="lit"?u.value:null),r)];case"ident":return[O(n.fieldName(e,t.name))];case"member":{let u=b(t.object,"first")&&t.object.args[0]&&b(t.object.args[0],"all"),o=E(t.object,e,n);if(u&&o)return e!==null&&n.fieldName(e,t.name)===n.fieldName(o,t.name)&&n.definition(e)?.fields?.shape&&Object.prototype.hasOwnProperty.call(n.definition(e).fields.shape,t.name)?[O(`${n.noun(o)}'s ${n.fieldName(o,t.name)}`)]:[O(n.fieldName(o,t.name))];let a=f(t.object,e,n),d=a[a.length-1];return a.length===1&&d?.as==="name"?[O(`${d.text}'s ${n.fieldName(o,t.name)}`)]:[...a,c("'s"),O(n.fieldName(o,t.name))]}case"unary":return t.op==="-"?[R("\u2212","minus"),...s(t.operand,7)]:T(t.operand,e,n);case"where":{let u=E(t.set,e,n),o=f(t.filter,u,n),a=o.every(d=>d.as==="name"||d.as==="word"&&d.text==="not");return[...s(t.set,4),...a?[]:[c("with")],...j(t.filter)<=2?[v,...o,w]:o]}case"binary":return xt(t,e,n);case"call":return At(t,e,n)}}function T(t,e,n){return ht(t)?xt({...t,op:B[t.op]},e,n):b(t,"present")||b(t,"exists")?[...f(t.args[0],e,n),R("=","is"),N]:t.t==="ident"?[c("not"),O(n.fieldName(e,t.name))]:[c("not"),v,...f(t,e,n),w]}function xt(t,e,n){let r=(o,a)=>j(o)<a?[v,...f(o,e,n),w]:f(o,e,n);if(t.op==="&&"||t.op==="||"){let o=U(t);if(o){let d=P(o.subject,e,n);return[...f(o.subject,e,n),R("\u2208","is one of"),n.valueWords(o.values.map(x=>x.value),d)]}let a=t.op==="&&"?2:1;return[...r(t.left,a),c(t.op==="&&"?"and":"or"),...r(t.right,a+.5)]}if(t.op in V){if($(t.right)&&typeof t.right.value=="boolean"&&(t.op==="=="||t.op==="!="))return t.op==="=="===t.right.value?f(t.left,e,n):T(t.left,e,n);let[o,a]=V[t.op],d=P(t.left,e,n),x=P(t.right,e,n);return[...S(t.left,e,n,x),R(o,a),...S(t.right,e,n,d)]}if(t.op==="in")return[...r(t.left,5),R("\u2208","is one of"),...S(t.right,e,n,P(t.left,e,n))];let s=Lt[t.op];if(s){let o=j(t);return[...r(t.left,o),R(s[0],s[1]),...r(t.right,o+.5)]}let u={"|":"or","&":"and also","-":"except"};return[...r(t.left,5),c(u[t.op]??t.op),...r(t.right,5)]}function S(t,e,n,r){return t.t==="lit"||t.t==="list"?f(t,e,n,r):j(t)<5?[v,...f(t,e,n),w]:f(t,e,n)}function At(t,e,n){let r=o=>t.args[o],s=o=>{let a=t.args[o];return a?.t==="lit"&&typeof a.value=="string"?a.value:void 0},u=o=>{let a=r(o);return j(a)<9&&a.t!=="where"?[v,...f(a,e,n),w]:f(a,e,n)};switch(t.fn){case"out":{let o=s(t.args.length-1)??"",a=O(M(o).toLowerCase());return t.args.length===2?[a,c("of"),...u(0)]:[a]}case"in":{let o=s(t.args.length-1)??"",a=t.args.length===2?n.nearOf(E(r(0),e,n),o):n.nearOf(e,o),d=O(a?n.plural(a):M(o).toLowerCase());return t.args.length===2?[d,c("of"),...u(0)]:[d]}case"all":{let o=s(0),a=t.args[1]?.t==="lit"?t.args[1].value:void 0,d=a===!0?[c("archived")]:a==="all"?[c("archived or not")]:[];return a===!0?[...d,O(o?n.plural(o):"everything")]:[O(o?n.plural(o):"everything"),...d]}case"fact":{let o=s(0);return[O(o?n.factName(o):"fact")]}case"count":return[c("number of"),...u(0)];case"exists":return[...u(0),R("\u2260","is not"),N];case"present":return[...f(r(0),e,n),R("\u2260","is not"),N];case"some":case"every":{let o=E(r(0),e,n),a=r(1);return[...t.fn==="some"?[c("some")]:[],...u(0),c(t.fn==="some"?"with":"all with"),...j(a)<=2?[v,...f(a,o,n),w]:f(a,o,n)]}case"sum":case"min":case"max":{let o=E(r(0),e,n),a=r(1),d=a.t==="lit"&&typeof a.value=="string"?[O(n.fieldName(o,a.value))]:j(a)<9?[v,...f(a,o,n),w]:f(a,o,n);return[c(t.fn==="sum"?"total":t.fn==="min"?"least":"most"),...d,c("of"),...u(0)]}case"first":{let o=r(0);if(b(o,"all")){let a=o.args[0]?.value;if(typeof a=="string")return[O(`the ${n.noun(a)}`)]}return[c("first of"),...u(0)]}case"sort":return[...u(0),c("by"),...f(r(1),E(r(0),e,n),n)];case"len":return[c("length of"),...f(r(0),e,n)];case"lower":return f(r(0),e,n);case"contains":case"startsWith":return[...f(r(0),e,n),c(t.fn==="contains"?"contains":"starts with"),...S(r(1),e,n,P(r(0),e,n))];case"today":return[L("today")];case"now":return[L("now")];case"date":return $(r(0))&&typeof r(0).value=="string"?[L(G(String(r(0).value),n.locale))]:f(r(0),e,n);case"days":case"hours":{let o=t.fn,[a,d]=[r(0),r(1)];return b(d,"today")||b(d,"now")?[c(`${o} since`),...f(a,e,n)]:b(a,"today")||b(a,"now")?[c(`${o} until`),...f(d,e,n)]:[c(`${o} from`),...f(a,e,n),c("to"),...f(d,e,n)]}case"if":return[v,...f(r(1),e,n),c("if"),...f(r(0),e,n),c(","),c("else"),...f(r(2),e,n),w];case"either":return t.args.flatMap((o,a)=>a===0?f(o,e,n):[c(","),c("else"),...f(o,e,n)]);default:return[c(t.fn),v,...t.args.flatMap((o,a)=>a===0?f(o,e,n):[c(","),...f(o,e,n)]),w]}}function Z(t,e){let n=bt(e),r=t.over==="graph"?null:t.over;return z({...r===null?{}:{kind:r},parts:f(t.require,r,n),...t.when?{when:f(t.when,r,n)}:{}})}function H(t,e,n){let r=bt(e),s=t.over==="graph"?null:t.over,u=n.subject,o=i=>{try{return q(i,{...n,budget:2e3})}catch{return}},a=(i,p)=>{let h=S(i,s,r,p);if(i.t==="lit"||i.t==="list"||b(i,"today")||b(i,"now")||b(i,"date"))return h;let y=o(i);if(y===void 0)return h;let l=P(i,s,r),m=r.valueWords(y,l?{...l,format:r.formatOf(l.kind,l.key)??(p?r.formatOf(p.kind,p.key):void 0)}:p);return y instanceof C?[...h,c(":"),m]:[...h,m]},d=i=>{if(i.t==="binary"&&i.op==="&&"){let p=[];p.push(...F(i,"&&"));let h=p.filter(y=>o(y)!==!0);return(h.length>0?h:p).flatMap((y,l)=>[...l>0?[c("and")]:[],...j(y)<=2?[v,...d(y),w]:d(y)])}if(i.t==="binary"&&i.op==="||"){let p=U(i);if(p){let y=P(p.subject,s,r);return[...a(p.subject),R("\u2209","is not one of"),r.valueWords(p.values.map(l=>l.value),y)]}let h=[];return h.push(...F(i,"||")),h.flatMap((y,l)=>[...l>0?[c("and")]:[],...j(y)<=2?[v,...d(y),w]:d(y)])}if(i.t==="binary"&&i.op in V){if($(i.right)&&typeof i.right.value=="boolean"&&(i.op==="=="||i.op==="!="))return i.op==="=="===i.right.value?T(i.left,s,r):f(i.left,s,r);let p=B[i.op],[h,y]=V[p],l=P(i.left,s,r),m=P(i.right,s,r);if($(i.right)&&i.right.value===null)return[...p==="=="?S(i.left,s,r,m):a(i.left,m),R(h,y),N];let g=p==="=="&&($(i.right)||$(i.left));return[...g?S(i.left,s,r,m):a(i.left,m),R(h,y),...g?S(i.right,s,r,l):a(i.right,l)]}if(i.t==="binary"&&i.op==="in")return[...a(i.left),R("\u2209","is not one of"),...S(i.right,s,r,P(i.left,s,r))];if(i.t==="unary"&&i.op==="!"){let p=i.operand;return ht(p)?d({...p,op:B[p.op]}):b(p,"present")||b(p,"exists")?[...a(p.args[0]),R("\u2260","is not"),N]:p.t==="ident"?f(p,s,r):[c("not"),v,...T(p,s,r),w]}if(b(i,"present")||b(i,"exists"))return[...f(i.args[0],s,r),R("=","is"),N];if(b(i,"some"))return[...f(i,s,r).slice(1),R("=","is"),N];if(b(i,"every")&&i.args.length===2){let p=o(i.args[0]);if(p instanceof C){let h=p.nodes.filter(y=>{try{return q(i.args[1],{...n,subject:y,budget:2e3})!==!0}catch{return!0}});return[...f(i,s,r),c(","),c("not"),r.valueWords(new C(h))]}}return i.t==="ident"?[c("not"),O(r.fieldName(s,i.name))]:[c("not"),v,...f(i,s,r),w]},x;try{x=d(t.require)}catch{x=[c("not"),v,...f(t.require,s,r),w]}return z({...s===null?{}:{kind:s},parts:x,...u?{record:_(e.schema.tryDefinition(u.kind),u)}:{}})}function Rt(t){let e=new Map;for(let n of t??[])n.expr?.t==="ident"&&n.format&&(n.format==="money"||n.format==="percent"||n.format==="date")&&e.set(n.expr.name,n.format);return e}function jt(t){return(e,n)=>{let r=t[e]?.fields?.[n],s=r?.format??(r?.type==="date"?"date":void 0);return s||r?.unit?{...s?{format:s}:{},...r?.unit?{unit:r.unit}:{}}:void 0}}function wt(t,e){return{schema:e,said:Rt(t.says),...t.declared?{formatOf:jt(t.declared)}:{},...t.money?{money:t.money}:{}}}function Ht(t,e){return t.shape?Z(t.shape,wt(t.shape,e)):void 0}var vt=new WeakMap;function St(t,e){let n=new Map(t.allInvariants().map(r=>[r.name,r]));return e.map(r=>{let s=Kt(r),u=n.get(s.invariant)?.shape;if(!u||s.status&&s.status!=="violated")return s;let o=s.subjectId?t.graph.getNode(s.subjectId):void 0;if(u.over!=="graph"&&!o)return s;let a=u.kinds;a||(a=vt.get(t.schema),a||vt.set(t.schema,a=dt(t.schema)));try{let d=t.today?.()??u.today?.()??k(),x=H(u,wt(u,t.schema),{graph:t.graph,subject:o??null,kinds:a,today:d});return{...s,line:x,...u.says?{}:{message:`${s.message} \u2014 ${x.text}`}}}catch{return s}})}function Nt(){lt((t,e,n,r)=>St({graph:t,schema:t.schema,allInvariants:()=>e,today:()=>r},n)),pt(Wt)}function Wt(t,e,n,r){let s=e.graph,u=it.from(t.schema,s.snapshot(),{validate:!1});for(let x of n?[...r].reverse().map(st):r)try{u.applyPrimitives([x],{restoring:!0})}catch{}let o=x=>t.violations(void 0,x),a=o(n?u:s),d=o(n?s:u);return{...ft(t.allInvariants(),a,d),violationsAfter:d}}function Kt(t){if(!t.line)return t;let{line:e,...n}=t,r=` \u2014 ${e.text}`;return n.message.endsWith(r)?{...n,message:n.message.slice(0,-r.length)}:n}Nt();export{H as brokenLineOf,Nt as judgeWithLines,Wt as judgedForASeat,Pt as problemWords,Ht as ruleLine,Z as ruleLineOf,mt as ruleLineWords,J as ruleSpacing,Et as ruleSpoken,Ot as ruleText,Kt as unlined,St as withLines};
@@ -0,0 +1,49 @@
1
+ import{a as Ct,b as Ce,c as Lt,f as Dt,g as ae,h as kt,i as Ft}from"./chunk.EPPAFWP7.js";import{m as Pt}from"./chunk.O4X5WJIC.js";import{g as gt}from"./chunk.X5WB4GJ4.js";import{a as mt}from"./chunk.6XEATXZC.js";import{d as yt}from"./chunk.R7F6UJVG.js";import{d as pt}from"./chunk.DYW4D74X.js";import{F as Et,G as xt,i as ht,j as Tr,s as vt,t as Rt,w as wt,x as St,y as bt}from"./chunk.VP35BUUZ.js";import{$ as ft,G as A,O as dt,R as Z}from"./chunk.7L6LYXCV.js";import{Wa as rt,Xc as ot,Yc as it,Zc as lt,ea as Pe,ha as ce,jc as at,md as st,nd as ut,od as ct,vc as nt}from"./chunk.7MQ7UWVW.js";import{b as D}from"./chunk.AJZBJBMO.js";function Nr(e,t){return ot(e,t).slice(1)}function de(e,t){return e.kinds.find(r=>Nr(e,r)===t)}function xn(e,t,r){return it(e,t,r)}function Pn(e,t){return lt(e,t)}var _=D(A(),1),g=D(A(),1),x=D(A(),1),Ye=D(A(),1),fr=D(A(),1),S=D(A(),1),en=D(A(),1),tn=D(A(),1),rn=D(A(),1),v=D(A(),1),xr=D(A(),1);var Oe=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Ht=/^[\\/]{2}/;function Mr(e,t){return t+e.replace(/\\/g,"/")}var Tt="popstate";function ye(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function Ut(e={}){let{initialEntries:t=["/"],initialIndex:r,v5Compat:a=!1}=e,n;n=t.map((h,y)=>c(h,typeof h=="string"?null:h.state,y===0?"default":void 0,typeof h=="string"?void 0:h.mask));let o=s(r??n.length-1),i="POP",l=null;function s(h){return Math.min(Math.max(h,0),n.length-1)}function u(){return n[o]}function c(h,y=null,p,f){let R=ge(n?u().pathname:"/",h,y,p,f);return M(R.pathname.charAt(0)==="/",`relative pathnames are not supported in memory history: ${JSON.stringify(h)}`),R}function d(h){return typeof h=="string"?h:B(h)}return{get index(){return o},get action(){return i},get location(){return u()},createHref:d,createURL(h){return new URL(d(h),"http://localhost")},encodeLocation(h){let y=typeof h=="string"?Y(h):h;return{pathname:y.pathname||"",search:y.search||"",hash:y.hash||""}},push(h,y){i="PUSH";let p=ye(h)?h:c(h,y);o+=1,n.splice(o,n.length,p),a&&l&&l({action:i,location:p,delta:1})},replace(h,y){i="REPLACE";let p=ye(h)?h:c(h,y);n[o]=p,a&&l&&l({action:i,location:p,delta:0})},go(h){i="POP";let y=s(o+h),p=n[y];o=y,l&&l({action:i,location:p,delta:h})},listen(h){return l=h,()=>{l=null}}}}function jt(e={}){function t(a,n){let o=n.state?.masked,{pathname:i,search:l,hash:s}=o||a.location;return ge("",{pathname:i,search:l,hash:s},n.state&&n.state.usr||null,n.state&&n.state.key||"default",o?{pathname:a.location.pathname,search:a.location.search,hash:a.location.hash}:void 0)}function r(a,n){return typeof n=="string"?n:B(n)}return Ar(t,r,null,e)}function L(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function M(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Or(){return Math.random().toString(36).substring(2,10)}function Nt(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function ge(e,t,r=null,a,n){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Y(t):t,state:r,key:t&&t.key||a||Or(),mask:n}}function B({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Y(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function Ar(e,t,r,a={}){let{window:n=document.defaultView,v5Compat:o=!1}=a,i=n.history,l="POP",s=null,u=c();u==null&&(u=0,i.replaceState({...i.state,idx:u},""));function c(){return(i.state||{idx:null}).idx}function d(){l="POP";let f=c(),R=f==null?null:f-u;u=f,s&&s({action:l,location:p.location,delta:R})}function m(f,R){l="PUSH";let w=ye(f)?f:ge(p.location,f,R);r&&r(w,f),u=c()+1;let b=Nt(w,u),P=p.createHref(w.mask||w);try{i.pushState(b,"",P)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;n.location.assign(P)}o&&s&&s({action:l,location:p.location,delta:1})}function h(f,R){l="REPLACE";let w=ye(f)?f:ge(p.location,f,R);r&&r(w,f),u=c();let b=Nt(w,u),P=p.createHref(w.mask||w);i.replaceState(b,"",P),o&&s&&s({action:l,location:p.location,delta:0})}function y(f){return _r(n,f)}let p={get action(){return l},get location(){return e(n,i)},listen(f){if(s)throw new Error("A history only accepts one active listener");return n.addEventListener(Tt,d),s=f,()=>{n.removeEventListener(Tt,d),s=null}},createHref(f){return t(n,f)},createURL:y,encodeLocation(f){let R=y(f);return{pathname:R.pathname,search:R.search,hash:R.hash}},push:m,replace:h,go(f){return i.go(f)}};return p}function _r(e,t,r=!1){let a="http://localhost";e&&(a=e.location.origin!=="null"?e.location.origin:e.location.href),L(a,"No window.location.(origin|href) available to create URL");let n=typeof t=="string"?t:B(t);return n=n.replace(/ $/,"%20"),!r&&Ht.test(n)&&(n=a+n),new URL(n,a)}var $r;$r=new WeakMap;function Ae(e,t,r="/"){return Ir(e,t,r,!1)}function Ir(e,t,r,a,n){let o=typeof t=="string"?Y(t):t,i=U(o.pathname||"/",r);if(i==null)return null;let l=n??Ur(e),s=null,u=Qr(i);for(let c=0;s==null&&c<l.length;++c)s=Xr(l[c],u,a);return s}function Hr(e,t){let{route:r,pathname:a,params:n}=e;return{id:r.id,pathname:a,params:n,data:t[r.id],loaderData:t[r.id],handle:r.handle}}function Ur(e){let t=zt(e);return jr(t),t}function zt(e,t=[],r=[],a="",n=!1){let o=(i,l,s=n,u)=>{let c={relativePath:u===void 0?i.path||"":u,caseSensitive:i.caseSensitive===!0,childrenIndex:l,route:i};if(c.relativePath.startsWith("/")){if(!c.relativePath.startsWith(a)&&s)return;L(c.relativePath.startsWith(a),`Absolute route path "${c.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(a.length)}let d=H([a,c.relativePath]),m=r.concat(c);i.children&&i.children.length>0&&(L(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),zt(i.children,t,m,d,s)),!(i.path==null&&!i.index)&&t.push({path:d,score:Kr(d,i.index),routesMeta:m.map((h,y)=>{let[p,f]=Yt(h.relativePath,h.caseSensitive,y===m.length-1);return{...h,matcher:p,compiledParams:f}})})};return e.forEach((i,l)=>{if(i.path===""||!i.path?.includes("?"))o(i,l);else for(let s of Bt(i.path))o(i,l,!0,s)}),t}function Bt(e){let t=e.split("/");if(t.length===0)return[];let[r,...a]=t,n=r.endsWith("?"),o=r.replace(/\?$/,"");if(a.length===0)return n?[o,""]:[o];let i=Bt(a.join("/")),l=[];return l.push(...i.map(s=>s===""?o:[o,s].join("/"))),n&&l.push(...i),l.map(s=>e.startsWith("/")&&s===""?"/":s)}function jr(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Gr(t.routesMeta.map(a=>a.childrenIndex),r.routesMeta.map(a=>a.childrenIndex)))}var zr=/^:[\w-]+$/,Br=3,Wr=2,Yr=1,Vr=10,Jr=-2,Mt=e=>e==="*";function Kr(e,t){let r=e.split("/"),a=r.length;return r.some(Mt)&&(a+=Jr),t&&(a+=Wr),r.filter(n=>!Mt(n)).reduce((n,o)=>n+(zr.test(o)?Br:o===""?Yr:Vr),a)}function Gr(e,t){return e.length===t.length&&e.slice(0,-1).every((a,n)=>a===t[n])?e[e.length-1]-t[t.length-1]:0}function Xr(e,t,r=!1){let{routesMeta:a}=e,n={},o="/",i=[];for(let l=0;l<a.length;++l){let s=a[l],u=l===a.length-1,c=o==="/"?t:t.slice(o.length)||"/",d={path:s.relativePath,caseSensitive:s.caseSensitive,end:u},m=s.matcher&&s.compiledParams?Wt(d,c,s.matcher,s.compiledParams):oe(d,c),h=s.route;if(!m&&u&&r&&!a[a.length-1].route.index&&(m=oe({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},c)),!m)return null;Object.assign(n,m.params),i.push({params:n,pathname:H([o,m.pathname]),pathnameBase:Zr(H([o,m.pathnameBase])),route:h}),m.pathnameBase!=="/"&&(o=H([o,m.pathnameBase]))}return i}function oe(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,a]=Yt(e.path,e.caseSensitive,e.end);return Wt(e,t,r,a)}function Wt(e,t,r,a){let n=t.match(r);if(!n)return null;let o=n[0],i=ee(o,1),l=n.slice(1);return{params:a.reduce((u,{paramName:c,isOptional:d},m)=>{if(c==="*"){let y=l[m]||"";i=ee(o.slice(0,o.length-y.length),1)}let h=l[m];return d&&!h?u[c]=void 0:u[c]=(h||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:i,pattern:e}}function Yt(e,t=!1,r=!0){M(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let a=[],n="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,l,s,u,c)=>{if(a.push({paramName:l,isOptional:s!=null}),s){let d=c.charAt(u+i.length);return d&&d!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),n+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?n+="\\/*$":e!==""&&e!=="/"&&(n+="(?:(?=\\/|$))"),[new RegExp(n,t?void 0:"i"),a]}function Qr(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return M(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function U(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,a=e.charAt(r);return a&&a!=="/"?null:e.slice(r)||"/"}function Vt(e,t="/"){let{pathname:r,search:a="",hash:n=""}=typeof e=="string"?Y(e):e,o;return r?(r=Jt(r),r.startsWith("/")||r.startsWith("\\")?o=Ot(r.substring(1),"/"):o=Ot(r,t)):o=t,{pathname:o,search:ea(a),hash:ta(n)}}function Ot(e,t){let r=ee(t).split("/");return e.split("/").forEach(n=>{n===".."?r.length>1&&r.pop():n!=="."&&r.push(n)}),r.length>1?r.join("/"):"/"}function Le(e,t,r,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function qr(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function _e(e){let t=qr(e);return t.map((r,a)=>a===t.length-1?r.pathname:r.pathnameBase)}function we(e,t,r,a=!1){let n;typeof e=="string"?n=Y(e):(n={...e},L(!n.pathname||!n.pathname.includes("?"),Le("?","pathname","search",n)),L(!n.pathname||!n.pathname.includes("#"),Le("#","pathname","hash",n)),L(!n.search||!n.search.includes("#"),Le("#","search","hash",n)));let o=e===""||n.pathname==="",i=o?"/":n.pathname,l;if(i==null)l=r;else{let d=t.length-1;if(!a&&i.startsWith("..")){let m=i.split("/");for(;m[0]==="..";)m.shift(),d-=1;n.pathname=m.join("/")}l=d>=0?t[d]:"/"}let s=Vt(n,l),u=i&&i!=="/"&&i.endsWith("/"),c=(o||i===".")&&r.endsWith("/");return!s.pathname.endsWith("/")&&(u||c)&&(s.pathname+="/"),s}var Jt=e=>e.replace(/[\\/]{2,}/g,"/"),H=e=>Jt(e.join("/"));function ee(e,t=0){let r=e.length;for(;r>t&&e.charCodeAt(r-1)===47;)r--;return r===e.length?e:e.slice(0,r)}var Zr=e=>ee(e).replace(/^\/*/,"/"),ea=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,ta=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;var Kt=class{constructor(e,t,r,a=!1){this.status=e,this.statusText=t||"",this.internal=a,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function Gt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function ra(e){let t=e.map(r=>r.route.path).filter(Boolean);return H(t)||"/"}var Xt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Qt(e,t){let r=e;if(typeof r!="string"||!Oe.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let a=r,n=!1;if(Xt)try{let o=new URL(window.location.href),i=Ht.test(r)?new URL(Mr(r,o.protocol)):new URL(r),l=U(i.pathname,t);i.origin===o.origin&&l!=null?r=l+i.search+i.hash:n=!0}catch{M(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:n,to:r}}var Ln=Symbol("Uninstrumented");var Dn=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var At=new URL("http://localhost");function $e(e){if(e.createURL)return e.createURL("/");try{return new URL(e.createHref("/"),At)}catch{return At}}function De(e,t){return e.origin===t.origin&&(e.origin!=="null"||e.protocol===t.protocol&&e.host===t.host)}function aa(e,t){if(e.startsWith("//"))return!0;let r=t.protocol.toLowerCase();return e.toLowerCase().startsWith(r)?t.host===""||e.slice(r.length).startsWith("//"):!1}function Ie(e,t,r,a){let n=null;try{n=e==null?null:new URL(e,r)}catch{}let o=new URL(t,r),i=n!=null&&!De(n,r),l=!De(o,r);if(a==="reject"){if(i||l)throw new Error("External navigation is not allowed")}else if(l&&(n==null||!aa(e,n)||!De(n,o)))throw new Error("External navigation is not allowed")}var qt=["POST","PUT","PATCH","DELETE"],kn=new Set(qt),na=["GET",...qt],Fn=new Set(na);var Tn=Symbol("ResetLoaderData"),oa,ia,la,sa;oa=new WeakMap;ia=new WeakMap;la=new WeakMap;sa=new WeakMap;var ua=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function ca(e){try{return ua.includes(new URL(e).protocol)}catch{return!1}}var K=_.createContext(null);K.displayName="DataRouter";var te=_.createContext(null);te.displayName="DataRouterState";var Zt=_.createContext(!1);function da(){return _.useContext(Zt)}var He=_.createContext({isTransitioning:!1});He.displayName="ViewTransition";var er=_.createContext(new Map);er.displayName="Fetchers";var fa=_.createContext(null);fa.displayName="Await";var N=_.createContext(null);N.displayName="Navigation";var G=_.createContext(null);G.displayName="Location";var I=_.createContext({outlet:null,matches:[],isDataRoute:!1});I.displayName="Route";var Ue=_.createContext(null);Ue.displayName="RouteError";var Te=!0,tr="REACT_ROUTER_ERROR",ha="REDIRECT",ma="ROUTE_ERROR_RESPONSE";function pa(e){if(e.startsWith(`${tr}:${ha}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function ya(e){if(e.startsWith(`${tr}:${ma}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new Kt(t.status,t.statusText,t.data)}catch{}}function Se(e,{relative:t}={}){L(X(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:a}=g.useContext(N),{hash:n,pathname:o,search:i}=re(e,{relative:t}),l=o;return r!=="/"&&(l=o==="/"?r:H([r,o])),a.createHref({pathname:l,search:i,hash:n})}function X(){return g.useContext(G)!=null}function T(){return L(X(),"useLocation() may be used only in the context of a <Router> component."),g.useContext(G).location}function ga(){return g.useContext(G).navigationType}var rr="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ar(e){g.useContext(N).static||g.useLayoutEffect(e)}function Q(){let{isDataRoute:e}=g.useContext(I);return e?Da():va()}function va(){L(X(),"useNavigate() may be used only in the context of a <Router> component.");let e=g.useContext(K),{basename:t,navigator:r}=g.useContext(N),{matches:a}=g.useContext(I),{pathname:n}=T(),o=JSON.stringify(_e(a)),i=g.useRef(!1);return ar(()=>{i.current=!0}),g.useCallback((s,u={})=>{if(M(i.current,rr),!i.current)return;if(typeof s=="number"){r.go(s);return}let c=we(s,JSON.parse(o),n,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:H([t,c.pathname])),Ie(typeof s=="string"?s:B(s),r.createHref(c),$e(r),"reject"),(u.replace?r.replace:r.push)(c,u.state,u)},[t,r,o,n,e])}var Nn=g.createContext(null);function Ra(){let{matches:e}=g.useContext(I);return e[e.length-1]?.params??{}}function re(e,{relative:t}={}){let{matches:r}=g.useContext(I),{pathname:a}=T(),n=JSON.stringify(_e(r));return g.useMemo(()=>we(e,JSON.parse(n),a,t==="path"),[e,n,a,t])}function nr(e,t){return or(e,t)}function or(e,t,r){L(X(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=g.useContext(N),{matches:n}=g.useContext(I),o=n[n.length-1],i=o?o.params:{},l=o?o.pathname:"/",s=o?o.pathnameBase:"/",u=o&&o.route;if(Te){let f=u&&u.path||"";ur(l,!u||f.endsWith("*")||f.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${f}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
2
+
3
+ Please change the parent <Route path="${f}"> to <Route path="${f==="/"?"*":`${f}/*`}">.`)}let c=T(),d;if(t){let f=typeof t=="string"?Y(t):t;L(s==="/"||f.pathname?.startsWith(s),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${s}" but pathname "${f.pathname}" was given in the \`location\` prop.`),d=f}else d=c;let m=d.pathname||"/",h=m;if(s!=="/"){let f=s.replace(/^\//,"").split("/");h="/"+m.replace(/^\//,"").split("/").slice(f.length).join("/")}let y=r&&r.state.matches.length?r.state.matches.map(f=>Object.assign(f,{route:r.manifest[f.route.id]||f.route})):Ae(e,{pathname:h});Te&&(M(u||y!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),M(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`));let p=xa(y&&y.map(f=>Object.assign({},f,{params:Object.assign({},i,f.params),pathname:H([s,a.encodeLocation?a.encodeLocation(f.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:f.pathname]),pathnameBase:f.pathnameBase==="/"?s:H([s,a.encodeLocation?a.encodeLocation(f.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:f.pathnameBase])})),n,r);return t&&p?g.createElement(G.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...d},navigationType:"POP"}},p):p}function wa(){let e=sr(),t=Gt(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",n={padding:"0.5rem",backgroundColor:a},o={padding:"2px 4px",backgroundColor:a},i=null;return Te&&(console.error("Error handled by React Router default ErrorBoundary:",e),i=g.createElement(g.Fragment,null,g.createElement("p",null,"\u{1F4BF} Hey developer \u{1F44B}"),g.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",g.createElement("code",{style:o},"ErrorBoundary")," or"," ",g.createElement("code",{style:o},"errorElement")," prop on your route."))),g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),r?g.createElement("pre",{style:n},r):null,i)}var Sa=g.createElement(wa,null),ir=class extends g.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let r=ya(e.digest);r&&(e=r)}let t=e!==void 0?g.createElement(I.Provider,{value:this.props.routeContext},g.createElement(Ue.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?g.createElement(ba,{error:e},t):t}};ir.contextType=Zt;var ke=new WeakMap;function ba({children:e,error:t}){let{basename:r,navigator:a}=g.useContext(N);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let n=pa(t.digest);if(n){let o=ke.get(t);if(o)throw o;let i=Qt(n.location,r),l=i.absoluteURL||i.to;if(Ie(n.location,l,$e(a),"allow-explicit"),ca(l))throw new Error("Invalid redirect location");if(Xt&&!ke.get(t))if(i.isExternal||n.reloadDocument)window.location.href=l;else{let s=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:n.replace}));throw ke.set(t,s),s}return g.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l}`})}}return e}function Ea({routeContext:e,match:t,children:r}){let a=g.useContext(K);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),g.createElement(I.Provider,{value:e},r)}function xa(e,t=[],r){let a=r?.state;if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(t.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let n=e,o=a?.errors;if(o!=null){let c=n.findIndex(d=>d.route.id&&o?.[d.route.id]!==void 0);L(c>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),n=n.slice(0,Math.min(n.length,c+1))}let i=!1,l=-1;if(r&&a){i=a.renderFallback;for(let c=0;c<n.length;c++){let d=n[c];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(l=c),d.route.id){let{loaderData:m,errors:h}=a,y=d.route.loader&&!m.hasOwnProperty(d.route.id)&&(!h||h[d.route.id]===void 0);if(d.route.lazy||y){r.isStatic&&(i=!0),l>=0?n=n.slice(0,l+1):n=[n[0]];break}}}}let s=r?.onError,u=a&&s?(c,d)=>{s(c,{location:a.location,params:a.matches?.[0]?.params??{},pattern:ra(a.matches),errorInfo:d})}:void 0;return n.reduceRight((c,d,m)=>{let h,y=!1,p=null,f=null;a&&(h=o&&d.route.id?o[d.route.id]:void 0,p=d.route.errorElement||Sa,i&&(l<0&&m===0?(ur("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),y=!0,f=null):l===m&&(y=!0,f=d.route.hydrateFallbackElement||null)));let R=t.concat(n.slice(0,m+1)),w=()=>{let b;return h?b=p:y?b=f:d.route.Component?b=g.createElement(d.route.Component,null):d.route.element?b=d.route.element:b=c,g.createElement(Ea,{match:d,routeContext:{outlet:c,matches:R,isDataRoute:a!=null},children:b})};return a&&(d.route.ErrorBoundary||d.route.errorElement||m===0)?g.createElement(ir,{location:a.location,revalidation:a.revalidation,component:p,error:h,children:w(),routeContext:{outlet:null,matches:R,isDataRoute:!0},onError:u}):w()},null)}function je(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Pa(e){let t=g.useContext(K);return L(t,je(e)),t}function ze(e){let t=g.useContext(te);return L(t,je(e)),t}function Ca(e){let t=g.useContext(I);return L(t,je(e)),t}function Be(e){let t=Ca(e),r=t.matches[t.matches.length-1];return L(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function La(){return Be("useRouteId")}function lr(){let e=ze("useNavigation");return g.useMemo(()=>{let{matches:t,historyAction:r,...a}=e.navigation;return a},[e.navigation])}function We(){let{matches:e,loaderData:t}=ze("useMatches");return g.useMemo(()=>e.map(r=>Hr(r,t)),[e,t])}function sr(){let e=g.useContext(Ue),t=ze("useRouteError"),r=Be("useRouteError");return e!==void 0?e:t.errors?.[r]}function Da(){let{router:e}=Pa("useNavigate"),t=Be("useNavigate"),r=g.useRef(!1);return ar(()=>{r.current=!0}),g.useCallback(async(n,o={})=>{M(r.current,rr),r.current&&(typeof n=="number"?await e.navigate(n):await e.navigate(n,{fromRouteId:t,...o}))},[e,t])}var _t={};function ur(e,t,r){!t&&!_t[e]&&(_t[e]=!0,M(!1,r))}var ka="useOptimistic",Mn=x[ka];var On=x.memo(Fa);function Fa({routes:e,manifest:t,future:r,state:a,isStatic:n,onError:o}){return or(e,void 0,{manifest:t,state:a,isStatic:n,onError:o,future:r})}function Ta({basename:e,children:t,initialEntries:r,initialIndex:a,useTransitions:n}){let o=x.useRef();o.current==null&&(o.current=Ut({initialEntries:r,initialIndex:a,v5Compat:!0}));let i=o.current,[l,s]=x.useState({action:i.action,location:i.location}),u=x.useCallback(c=>{n===!1?s(c):x.startTransition(()=>s(c))},[n]);return x.useLayoutEffect(()=>i.listen(u),[i,u]),x.createElement(be,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:i,useTransitions:n})}function Na({to:e,replace:t,state:r,relative:a}){L(X(),"<Navigate> may be used only in the context of a <Router> component.");let{static:n,navigator:o}=x.useContext(N);M(!n,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:i}=x.useContext(I),{pathname:l}=T(),s=Q(),u=we(e,_e(i),l,a==="path");Ie(typeof e=="string"?e:B(e),o.createHref(u),$e(o),"reject");let c=JSON.stringify(u);return x.useEffect(()=>{s(JSON.parse(c),{replace:t,state:r,relative:a})},[s,c,a,t,r]),null}function cr(e){L(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function be({basename:e="/",children:t=null,location:r,navigationType:a="POP",navigator:n,static:o=!1,useTransitions:i}){L(!X(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),s=x.useMemo(()=>({basename:l,navigator:n,static:o,useTransitions:i,future:{}}),[l,n,o,i]);typeof r=="string"&&(r=Y(r));let{pathname:u="/",search:c="",hash:d="",state:m=null,key:h="default",mask:y}=r,p=x.useMemo(()=>{let f=U(u,l);return f==null?null:{location:{pathname:f,search:c,hash:d,state:m,key:h,mask:y},navigationType:a}},[l,u,c,d,m,h,a,y]);return M(p!=null,`<Router basename="${l}"> is not able to match the URL "${u}${c}${d}" because it does not start with the basename, so the <Router> won't render anything.`),p==null?null:x.createElement(N.Provider,{value:s},x.createElement(G.Provider,{children:t,value:p}))}function Ma({children:e,location:t}){return nr(ve(e),t)}function ve(e,t=[]){let r=[];return x.Children.forEach(e,(a,n)=>{if(!x.isValidElement(a))return;let o=[...t,n];if(a.type===x.Fragment){r.push.apply(r,ve(a.props.children,o));return}L(a.type===cr,`[${typeof a.type=="string"?a.type:a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),L(!a.props.index||!a.props.children,"An index route cannot have child routes.");let i={id:a.props.id||o.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,middleware:a.props.middleware,loader:a.props.loader,action:a.props.action,hydrateFallbackElement:a.props.hydrateFallbackElement,HydrateFallback:a.props.HydrateFallback,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.hasErrorBoundary===!0||a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(i.children=ve(a.props.children,o)),r.push(i)}),r}var me="get",pe="application/x-www-form-urlencoded";function Ee(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function Oa(e){return Ee(e)&&e.tagName.toLowerCase()==="button"}function Aa(e){return Ee(e)&&e.tagName.toLowerCase()==="form"}function _a(e){return Ee(e)&&e.tagName.toLowerCase()==="input"}function $a(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Ia(e,t){return e.button===0&&(!t||t==="_self")&&!$a(e)}function Re(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let a=e[r];return t.concat(Array.isArray(a)?a.map(n=>[r,n]):[[r,a]])},[]))}function Ha(e,t){let r=Re(e);return t&&t.forEach((a,n)=>{r.has(n)||t.getAll(n).forEach(o=>{r.append(n,o)})}),r}var fe=null;function Ua(){if(fe===null)try{new FormData(document.createElement("form"),0),fe=!1}catch{fe=!0}return fe}var ja=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Fe(e){return e!=null&&!ja.has(e)?(M(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${pe}"`),null):e}function za(e,t){let r,a,n,o,i;if(Aa(e)){let l=e.getAttribute("action");a=l?U(l,t):null,r=e.getAttribute("method")||me,n=Fe(e.getAttribute("enctype"))||pe,o=new FormData(e)}else if(Oa(e)||_a(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||l.getAttribute("action");if(a=s?U(s,t):null,r=e.getAttribute("formmethod")||l.getAttribute("method")||me,n=Fe(e.getAttribute("formenctype"))||Fe(l.getAttribute("enctype"))||pe,o=new FormData(l,e),!Ua()){let{name:u,type:c,value:d}=e;if(c==="image"){let m=u?`${u}.`:"";o.append(`${m}x`,"0"),o.append(`${m}y`,"0")}else u&&o.append(u,d)}}else{if(Ee(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=me,a=null,n=pe,i=e}return o&&n==="text/plain"&&(i=o,o=void 0),{action:a,method:r.toLowerCase(),encType:n,formData:o,body:i}}var An=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Ba={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},Wa=/[&><\u2028\u2029]/g;function $t(e){return e.replace(Wa,t=>Ba[t])}function Ve(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}var Ya=Symbol("SingleFetchRedirect");function dr(e,t,r,a){let n=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?n.pathname.endsWith("/")?n.pathname=`${n.pathname}_.${a}`:n.pathname=`${n.pathname}.${a}`:n.pathname==="/"?n.pathname=`_root.${a}`:t&&U(n.pathname,t)==="/"?n.pathname=`${ee(t)}/_root.${a}`:n.pathname=`${ee(n.pathname)}.${a}`,n}async function Va(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){if(console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode&&import.meta.hot)throw r;return window.location.reload(),new Promise(()=>{})}}function Ja(e){return e!=null&&typeof e.page=="string"}function Ka(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function Ga(e,t,r){let a=await Promise.all(e.map(async n=>{let o=t.routes[n.route.id];if(o){let i=await Va(o,r);return i.links?i.links():[]}return[]}));return Za(a.flat(1).filter(Ka).filter(n=>n.rel==="stylesheet"||n.rel==="preload").map(n=>n.rel==="stylesheet"?{...n,rel:"prefetch",as:"style"}:{...n,rel:"prefetch"}))}function It(e,t,r,a,n,o){let i=(s,u)=>r[u]?s.route.id!==r[u].route.id:!0,l=(s,u)=>r[u].pathname!==s.pathname||r[u].route.path?.endsWith("*")&&r[u].params["*"]!==s.params["*"];return o==="assets"?t.filter((s,u)=>i(s,u)||l(s,u)):o==="data"?t.filter((s,u)=>{let c=a.routes[s.route.id];if(!c||!c.hasLoader)return!1;if(i(s,u)||l(s,u))return!0;if(s.route.shouldRevalidate){let d=s.route.shouldRevalidate({currentUrl:new URL(n.pathname+n.search+n.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:s.params,defaultShouldRevalidate:!0});if(typeof d=="boolean")return d}return!0}):[]}function Xa(e,t,{includeHydrateFallback:r}={}){return Qa(e.map(a=>{let n=t.routes[a.route.id];if(!n)return[];let o=[n.module];return n.clientActionModule&&(o=o.concat(n.clientActionModule)),n.clientLoaderModule&&(o=o.concat(n.clientLoaderModule)),r&&n.hydrateFallbackModule&&(o=o.concat(n.hydrateFallbackModule)),n.imports&&(o=o.concat(n.imports)),o}).flat(1))}function Qa(e){return[...new Set(e)]}function qa(e){let t={},r=Object.keys(e).sort();for(let a of r)t[a]=e[a];return t}function Za(e,t){let r=new Set,a=new Set(t);return e.reduce((n,o)=>{if(t&&!Ja(o)&&o.as==="script"&&o.href&&a.has(o.href))return n;let l=JSON.stringify(qa(o));return r.has(l)||(r.add(l),n.push({key:l,link:o})),n},[])}function Je(){let e=S.useContext(K);return Ve(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function an(){let e=S.useContext(te);return Ve(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var ie=S.createContext(void 0);ie.displayName="FrameworkContext";function xe(){let e=S.useContext(ie);return Ve(e,"You must render this element inside a <HydratedRouter> element"),e}function nn(e,t){let r=S.useContext(ie),[a,n]=S.useState(!1),[o,i]=S.useState(!1),{onFocus:l,onBlur:s,onMouseEnter:u,onMouseLeave:c,onTouchStart:d}=t,m=S.useRef(null);S.useEffect(()=>{if(e==="render"&&i(!0),e==="viewport"){let p=R=>{R.forEach(w=>{i(w.isIntersecting)})},f=new IntersectionObserver(p,{threshold:.5});return m.current&&f.observe(m.current),()=>{f.disconnect()}}},[e]),S.useEffect(()=>{if(a){let p=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(p)}}},[a]);let h=()=>{n(!0)},y=()=>{n(!1),i(!1)};return r?e!=="intent"?[o,m,{}]:[o,m,{onFocus:ne(l,h),onBlur:ne(s,y),onMouseEnter:ne(u,h),onMouseLeave:ne(c,y),onTouchStart:ne(d,h)}]:[!1,m,{}]}function ne(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function hr({page:e,...t}){let r=da(),{nonce:a}=xe(),{router:n}=Je(),o=S.useMemo(()=>Ae(n.routes,e,n.basename),[n.routes,e,n.basename]);return o?(t.nonce==null&&a&&(t={...t,nonce:a}),r?S.createElement(ln,{page:e,matches:o,...t}):S.createElement(sn,{page:e,matches:o,...t})):null}function on(e){let{manifest:t,routeModules:r}=xe(),[a,n]=S.useState([]);return S.useEffect(()=>{let o=!1;return Ga(e,t,r).then(i=>{o||n(i)}),()=>{o=!0}},[e,t,r]),a}function ln({page:e,matches:t,...r}){let a=T(),{future:n}=xe(),{basename:o}=Je(),i=S.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let l=dr(e,o,n.v8_trailingSlashAwareDataRequests,"rsc"),s=!1,u=[];for(let c of t)typeof c.route.shouldRevalidate=="function"?s=!0:u.push(c.route.id);return s&&u.length>0&&l.searchParams.set("_routes",u.join(",")),[l.pathname+l.search]},[o,n.v8_trailingSlashAwareDataRequests,e,a,t]);return S.createElement(S.Fragment,null,i.map(l=>S.createElement("link",{key:l,rel:"prefetch",as:"fetch",href:l,...r})))}function sn({page:e,matches:t,...r}){let a=T(),{future:n,manifest:o,routeModules:i}=xe(),{basename:l}=Je(),{loaderData:s,matches:u}=an(),c=S.useMemo(()=>It(e,t,u,o,a,"data"),[e,t,u,o,a]),d=S.useMemo(()=>It(e,t,u,o,a,"assets"),[e,t,u,o,a]),m=S.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let p=new Set,f=!1;if(t.forEach(w=>{let b=o.routes[w.route.id];!b||!b.hasLoader||(!c.some(P=>P.route.id===w.route.id)&&w.route.id in s&&i[w.route.id]?.shouldRevalidate||b.hasClientLoader?f=!0:p.add(w.route.id))}),p.size===0)return[];let R=dr(e,l,n.v8_trailingSlashAwareDataRequests,"data");return f&&p.size>0&&R.searchParams.set("_routes",t.filter(w=>p.has(w.route.id)).map(w=>w.route.id).join(",")),[R.pathname+R.search]},[l,n.v8_trailingSlashAwareDataRequests,s,a,o,c,t,e,i]),h=S.useMemo(()=>Xa(d,o),[d,o]),y=on(d);return S.createElement(S.Fragment,null,m.map(p=>S.createElement("link",{key:p,rel:"prefetch",as:"fetch",href:p,...r})),h.map(p=>S.createElement("link",{key:p,rel:"modulepreload",href:p,...r})),y.map(({key:p,link:f})=>S.createElement("link",{key:p,nonce:r.nonce,...f,crossOrigin:f.crossOrigin??r.crossOrigin})))}function un(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var cn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{cn&&(window.__reactRouterVersion="7.18.3")}catch{}function dn({basename:e,children:t,useTransitions:r,window:a}){let n=v.useRef();n.current==null&&(n.current=jt({window:a,v5Compat:!0}));let o=n.current,[i,l]=v.useState({action:o.action,location:o.location}),s=v.useCallback(u=>{r===!1?l(u):v.startTransition(()=>l(u))},[r]);return v.useLayoutEffect(()=>o.listen(s),[o,s]),v.createElement(be,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:o,useTransitions:r})}function mr({basename:e,children:t,history:r,useTransitions:a}){let[n,o]=v.useState({action:r.action,location:r.location}),i=v.useCallback(l=>{a===!1?o(l):v.startTransition(()=>o(l))},[a]);return v.useLayoutEffect(()=>r.listen(i),[r,i]),v.createElement(be,{basename:e,children:t,location:n.location,navigationType:n.action,navigator:r,useTransitions:a})}mr.displayName="unstable_HistoryRouter";var le=v.forwardRef(function({onClick:t,discover:r="render",prefetch:a="none",relative:n,reloadDocument:o,replace:i,mask:l,state:s,target:u,to:c,preventScrollReset:d,viewTransition:m,defaultShouldRevalidate:h,...y},p){let{basename:f,navigator:R,useTransitions:w}=v.useContext(N),b=typeof c=="string"&&Oe.test(c),P=Qt(c,f);c=P.to;let E=Se(c,{relative:n}),F=T(),k=null;if(l){let W=we(l,[],F.mask?F.mask.pathname:"/",!0);f!=="/"&&(W.pathname=W.pathname==="/"?f:H([f,W.pathname])),k=R.createHref(W)}let[$,J,z]=nn(a,y),se=Rr(c,{replace:i,mask:l,state:s,target:u,preventScrollReset:d,relative:n,viewTransition:m,defaultShouldRevalidate:h,useTransitions:w});function q(W){t&&t(W),W.defaultPrevented||se(W)}let ue=!(P.isExternal||o),tt=v.createElement("a",{...y,...z,href:(ue?k:void 0)||P.absoluteURL||E,onClick:ue?q:t,ref:un(p,J),target:u,"data-discover":!b&&r==="render"?"true":void 0});return $&&!b?v.createElement(v.Fragment,null,tt,v.createElement(hr,{page:E})):tt});le.displayName="Link";var pr=v.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:a="",end:n=!1,style:o,to:i,viewTransition:l,children:s,...u},c){let d=re(i,{relative:u.relative}),m=T(),h=v.useContext(te),{navigator:y,basename:p}=v.useContext(N),f=h!=null&&Er(d)&&l===!0,R=y.encodeLocation?y.encodeLocation(d).pathname:d.pathname,w=m.pathname,b=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;r||(w=w.toLowerCase(),b=b?b.toLowerCase():null,R=R.toLowerCase()),b&&p&&(b=U(b,p)||b);let P=R!=="/"&&R.endsWith("/")?R.length-1:R.length,E=w===R||!n&&w.startsWith(R)&&w.charAt(P)==="/",F=b!=null&&(b===R||!n&&b.startsWith(R)&&b.charAt(R.length)==="/"),k={isActive:E,isPending:F,isTransitioning:f},$=E?t:void 0,J;typeof a=="function"?J=a(k):J=[a,E?"active":null,F?"pending":null,f?"transitioning":null].filter(Boolean).join(" ");let z=typeof o=="function"?o(k):o;return v.createElement(le,{...u,"aria-current":$,className:J,ref:c,style:z,to:i,viewTransition:l},typeof s=="function"?s(k):s)});pr.displayName="NavLink";var yr=v.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:a,replace:n,state:o,method:i=me,action:l,onSubmit:s,relative:u,preventScrollReset:c,viewTransition:d,defaultShouldRevalidate:m,...h},y)=>{let{useTransitions:p}=v.useContext(N),f=wr(),R=Sr(l,{relative:u}),w=i.toLowerCase()==="get"?"get":"post",b=typeof l=="string"&&Oe.test(l);return v.createElement("form",{ref:y,method:w,action:R,onSubmit:a?s:E=>{if(s&&s(E),E.defaultPrevented)return;E.preventDefault();let F=E.nativeEvent.submitter,k=F?.getAttribute("formmethod")||i,$=()=>f(F||E.currentTarget,{fetcherKey:t,method:k,navigate:r,replace:n,state:o,relative:u,preventScrollReset:c,viewTransition:d,defaultShouldRevalidate:m});p&&r!==!1?v.startTransition(()=>$()):$()},...h,"data-discover":!b&&e==="render"?"true":void 0})});yr.displayName="Form";function gr({getKey:e,storageKey:t,...r}){let a=v.useContext(ie),{basename:n}=v.useContext(N),o=T(),i=We();br({getKey:e,storageKey:t});let l=v.useMemo(()=>{if(!a||!e)return null;let u=Me(o,i,n,e);return u!==o.key?u:null},[]);if(!a||a.isSpaMode)return null;let s=((u,c)=>{if(!window.history.state||!window.history.state.key){let d=Math.random().toString(32).slice(2);window.history.replaceState({key:d},"")}try{let m=JSON.parse(sessionStorage.getItem(u)||"{}")[c||window.history.state.key];typeof m=="number"&&window.scrollTo(0,m)}catch(d){console.error(d),sessionStorage.removeItem(u)}}).toString();return r.nonce==null&&a?.nonce&&(r.nonce=a.nonce),v.createElement("script",{...r,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${s})(${$t(JSON.stringify(t||Ne))}, ${$t(JSON.stringify(l))})`}})}gr.displayName="ScrollRestoration";function vr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ke(e){let t=v.useContext(K);return L(t,vr(e)),t}function fn(e){let t=v.useContext(te);return L(t,vr(e)),t}function Rr(e,{target:t,replace:r,mask:a,state:n,preventScrollReset:o,relative:i,viewTransition:l,defaultShouldRevalidate:s,useTransitions:u}={}){let c=Q(),d=T(),m=re(e,{relative:i});return v.useCallback(h=>{if(Ia(h,t)){h.preventDefault();let y=r!==void 0?r:B(d)===B(m),p=()=>c(e,{replace:y,mask:a,state:n,preventScrollReset:o,relative:i,viewTransition:l,defaultShouldRevalidate:s});u?v.startTransition(()=>p()):p()}},[d,c,m,r,a,n,t,e,o,i,l,s,u])}function Ge(e){M(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=v.useRef(Re(e)),r=v.useRef(!1),a=T(),n=v.useMemo(()=>Ha(a.search,r.current?null:t.current),[a.search]),o=Q(),i=v.useCallback((l,s)=>{let u=Re(typeof l=="function"?l(new URLSearchParams(n)):l);r.current=!0,o("?"+u,s)},[o,n]);return[n,i]}var hn=0,mn=()=>`__${String(++hn)}__`;function wr(){let{router:e}=Ke("useSubmit"),{basename:t}=v.useContext(N),r=La(),a=e.fetch,n=e.navigate;return v.useCallback(async(o,i={})=>{let{action:l,method:s,encType:u,formData:c,body:d}=za(o,t);if(i.navigate===!1){let m=i.fetcherKey||mn();await a(m,r,i.action||l,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:c,body:d,formMethod:i.method||s,formEncType:i.encType||u,flushSync:i.flushSync})}else await n(i.action||l,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:c,body:d,formMethod:i.method||s,formEncType:i.encType||u,replace:i.replace,state:i.state,fromRouteId:r,flushSync:i.flushSync,viewTransition:i.viewTransition})},[a,n,t,r])}function Sr(e,{relative:t}={}){let{basename:r}=v.useContext(N),a=v.useContext(I);L(a,"useFormAction must be used inside a RouteContext");let[n]=a.matches.slice(-1),o={...re(e||".",{relative:t})},i=T();if(e==null){o.search=i.search;let l=new URLSearchParams(o.search),s=l.getAll("index");if(s.some(c=>c==="")){l.delete("index"),s.filter(d=>d).forEach(d=>l.append("index",d));let c=l.toString();o.search=c?`?${c}`:""}}return(!e||e===".")&&n.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:H([r,o.pathname])),B(o)}var Ne="react-router-scroll-positions",he={};function Me(e,t,r,a){let n=null;return a&&(r!=="/"?n=a({...e,pathname:U(e.pathname,r)||e.pathname},t):n=a(e,t)),n==null&&(n=e.key),n}function br({getKey:e,storageKey:t}={}){let{router:r}=Ke("useScrollRestoration"),{restoreScrollPosition:a,preventScrollReset:n}=fn("useScrollRestoration"),{basename:o}=v.useContext(N),i=T(),l=We(),s=lr();v.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),pn(v.useCallback(()=>{if(s.state==="idle"){let u=Me(i,l,o,e);he[u]=window.scrollY}try{sessionStorage.setItem(t||Ne,JSON.stringify(he))}catch(u){M(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${u}).`)}window.history.scrollRestoration="auto"},[s.state,e,o,i,l,t])),typeof document<"u"&&(v.useLayoutEffect(()=>{try{let u=sessionStorage.getItem(t||Ne);u&&(he=JSON.parse(u))}catch{}},[t]),v.useLayoutEffect(()=>{let u=r?.enableScrollRestoration(he,()=>window.scrollY,e?(c,d)=>Me(c,d,o,e):void 0);return()=>u&&u()},[r,o,e]),v.useLayoutEffect(()=>{if(a!==!1){if(typeof a=="number"){window.scrollTo(0,a);return}try{if(i.hash){let u=document.getElementById(decodeURIComponent(i.hash.slice(1)));if(u){u.scrollIntoView();return}}}catch{M(!1,`"${i.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}n!==!0&&window.scrollTo(0,0)}},[i,a,n]))}function pn(e,t){let{capture:r}=t||{};v.useEffect(()=>{let a=r!=null?{capture:r}:void 0;return window.addEventListener("pagehide",e,a),()=>{window.removeEventListener("pagehide",e,a)}},[e,r])}function Er(e,{relative:t}={}){let r=v.useContext(He);L(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=Ke("useViewTransitionState"),n=re(e,{relative:t});if(!r.isTransitioning)return!1;let o=U(r.currentLocation.pathname,a)||r.currentLocation.pathname,i=U(r.nextLocation.pathname,a)||r.nextLocation.pathname;return oe(n.pathname,i)!=null||oe(n.pathname,o)!=null}var Xe=D(A(),1),Pr=D(Tr(),1);var j=D(Z(),1);function Cr({context:e,own:t}){ae(e.store);let r=ft(),a=dt()?.live??e.store;ae(a);let n=gt();if(!r||a.batches().length===0&&n===0)return null;let o=(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(Xe.Suspense,{fallback:null,children:(0,j.jsx)(Pt,{})}),(0,j.jsx)(Xe.Suspense,{fallback:null,children:(0,j.jsx)(Ct,{})})]});return t?(0,Pr.createPortal)(o,t):(0,j.jsx)("div",{className:"graview-bar-own",children:o})}var O=D(A(),1);var V=D(A(),1),yn=(0,V.createContext)(null);function ei(){let e=new Map,t=new Set,r=()=>{for(let a of t)a()};return{count:a=>e.get(a)??0,place(a){return e.set(a,(e.get(a)??0)+1),r(),()=>{e.set(a,(e.get(a)??1)-1),r()}},subscribe(a){return t.add(a),()=>t.delete(a)}}}function Lr(e){let t=(0,V.useContext)(yn);(0,V.useLayoutEffect)(()=>t?.place(e),[t,e])}function ti(e,t){return(0,V.useSyncExternalStore)(e.subscribe,()=>e.count(t)>0,()=>!1)}var Fr=D(Z(),1),Qe="var(--graview-text-small)",qe="var(--graview-text-body)",li="var(--graview-font-display, var(--graview-font-body, system-ui))",Ze={maxWidth:760,margin:"0 auto",padding:"40px 20px max(96px, calc(var(--graview-foot-room, 0px) + env(safe-area-inset-bottom, 0px)))",display:"grid",gridTemplateColumns:"minmax(0, 1fr)",gap:40},et=1160,si={...Ze,maxWidth:et},Dr={margin:0,fontSize:"var(--graview-text-title)",lineHeight:1.2,letterSpacing:"-0.012em",overflowWrap:"anywhere",textWrap:"balance"},ui={margin:0,fontSize:"var(--graview-text-heading)",lineHeight:1.3,textWrap:"balance"},ci={margin:0,fontSize:Qe,letterSpacing:"0.08em",textTransform:"uppercase",color:"var(--graview-ink-muted)"},di={margin:0,fontSize:qe,color:"var(--graview-ink-muted)",maxWidth:"60ch"},kr={color:"var(--graview-ink-muted)",fontSize:Qe},fi={borderTop:"1px solid var(--graview-edge)",paddingTop:24},hi={color:"var(--graview-accent)",textDecorationColor:"color-mix(in srgb, currentColor 50%, transparent)",textDecorationThickness:1,textUnderlineOffset:"0.2em",display:"inline-flex",alignItems:"center",minHeight:24},mi={color:"inherit",textDecoration:"none",display:"inline-flex",alignItems:"center",minHeight:24},pi=`.graview-list{container-type:inline-size}
4
+ .graview-rows{display:grid;grid-template-columns:minmax(0,1fr);column-gap:1.5rem;margin:0;padding:0;list-style:none;border-top:1px solid var(--graview-edge)}
5
+ .graview-row{grid-column:1/-1;display:grid;grid-template-columns:subgrid;align-items:baseline;align-content:center;position:relative;box-sizing:border-box;min-height:2.75rem;padding:.5rem 0;border-bottom:1px solid var(--graview-edge);overflow-wrap:anywhere}
6
+ .graview-row-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;min-height:24px;color:inherit;text-decoration:none;font-size:var(--graview-text-body);font-weight:500;line-height:1.3;text-wrap:pretty;hyphens:manual}
7
+ .graview-row-title::after{content:"";position:absolute;inset:0}
8
+ .graview-row-title:focus-visible{outline:0}
9
+ .graview-row-title:focus-visible::after{outline:2px solid var(--graview-accent);outline-offset:-2px;border-radius:var(--graview-radius-sm)}
10
+ .graview-row:hover .graview-row-title{text-decoration:underline 1px color-mix(in srgb,currentColor 50%,transparent);text-underline-offset:.2em}
11
+ .graview-row:active .graview-row-title{color:var(--graview-accent)}
12
+ .graview-row :is(a,button):not(.graview-row-title){position:relative}
13
+ .graview-row-glance,.graview-row>[data-testid=search-why]{font-size:var(--graview-text-small);line-height:1.5;color:var(--graview-ink-muted)}
14
+ .graview-row>[data-testid=search-why]{grid-column:1/-1}
15
+ .graview-row-glance{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
16
+ .graview-group-head{display:flex;gap:.5em;align-items:baseline;margin:0;padding:.375rem 0;font-family:var(--graview-font-body);font-size:var(--graview-text-small);font-weight:var(--graview-weight-label);line-height:1.3;letter-spacing:.02em;scroll-margin-top:4rem}
17
+ .graview-group-head>span{color:var(--graview-ink-muted);font-weight:var(--graview-weight-body)}
18
+ .graview-group-toggle{display:inline-flex;gap:.5em;align-items:center;min-height:2.75rem;margin:-.375rem 0;padding:0 .5rem 0 0;border:0;background:none;color:inherit;font:inherit;letter-spacing:inherit;text-align:start;cursor:pointer;border-radius:var(--graview-radius-sm)}
19
+ .graview-group-toggle:focus-visible{outline:2px solid var(--graview-accent);outline-offset:2px}
20
+ .graview-group-toggle>span{color:var(--graview-ink-muted);font-weight:var(--graview-weight-body)}
21
+ @container (min-width:36rem){.graview-rows{grid-template-columns:minmax(0,1fr) fit-content(40%)}.graview-group-head:has(+.graview-rows){position:sticky;top:0;z-index:${nt.raised};background:var(--graview-ground)}}`,yi={font:"inherit",fontSize:Qe,padding:"8px 14px",borderRadius:"var(--graview-radius-sm, 8px)",border:"1px solid var(--graview-edge-bright)",background:"var(--graview-panel)",color:"var(--graview-ink)",cursor:"pointer"};function gi({kind:e,brand:t,size:r=10,schema:a}){return(0,Fr.jsx)(mt,{kind:e,...a?{schema:a}:{},...t?{brand:t}:{},size:Math.round(r*1.6)})}function vi(e,t){let a=[...new Set(t.targets.map(n=>n.kind))].map(n=>e.schema.tryDefinition(n)?.plural??Pe(n));return a.length>0?a.join(" and "):Pe(t.edgeKind)}function Ri(e,t,r){return e.author.kind==="human"&&(e.author.id===void 0||t?.id===void 0||e.author.id===t.id)?"you":r?rt(e.author,r):e.author.kind==="agent"?e.author.id??"an agent":e.author.id??e.author.kind}function wi(e,t,r){return yt(e,t,{limit:3,said:[r],glance:!0}).map(a=>a.long?pt(a.stored,{markdown:a.markdown,most:100}):a.alone).join(" \xB7 ")}var Si=(e,t)=>ce(e.schema,t),gn=(e,t)=>{let r=e.kindsKeptFrom(t);return e.schema.kinds.filter(a=>!e.modules.disabledKinds.has(a)&&!r.has(a))},vn=e=>ct(gn(e.store,e.principal),e.views?.arrangement?.()?.order),bi=e=>{let t=new Set(e.views?.arrangement?.()?.hide??[]);return vn(e).filter(r=>!t.has(r))},Ei=e=>e.charAt(0).toUpperCase()+e.slice(1);var C=D(Z(),1);function Oi({context:e,children:t}){let{store:r,brand:a}=e;return ae(r),ht(e.embedded?void 0:at(a)),(0,C.jsxs)("div",{style:{...e.embedded?{}:{minHeight:"100vh"},display:"flex",flexDirection:"column",background:"var(--graview-ground)",color:"var(--graview-ink)",fontFamily:"var(--graview-font-body, system-ui)",fontSize:qe,lineHeight:1.5},children:[e.embedded?null:(0,C.jsx)(wn,{context:e}),(0,C.jsx)("div",{style:{flex:1},children:t}),e.remembers?(0,C.jsx)("footer",{style:{borderTop:"1px solid var(--graview-edge)",padding:"14px 20px max(20px, calc(var(--graview-foot-room, 0px) + env(safe-area-inset-bottom, 0px)))",...kr},children:(0,C.jsx)("div",{style:{maxWidth:et,margin:"0 auto",display:"flex",gap:14,flexWrap:"wrap",alignItems:"center",justifyContent:"flex-end"},children:(0,C.jsxs)("span",{"data-testid":"remembered",children:["Remembered in this browser \xB7 ",(0,C.jsx)(Dt,{})]})})}):null]})}var Rn=(0,O.createContext)(null);function wn({context:e}){let{store:t,brand:r,sceneHref:a="/",invariantContext:n}=e,o=T(),i=Q(),l=Se("/").replace(/\/$/,""),s=(0,O.useContext)(Rn),u=s?.places===!1?[]:vt({store:t,principal:e.principal,views:e.views}),c=e.views?.arrangement?.(),d=`${o.pathname}${o.search}`,m=t.violations(n),h=m.length,y=Et(m,"All rules hold"),p=o.pathname.split("/").filter(Boolean),f=p.length===2&&de(t.schema,p[0])!==void 0&&t.graph.getNode(decodeURIComponent(p[1]))!==void 0;return(0,C.jsx)(C.Fragment,{children:(0,C.jsx)(St,{brand:r,name:r?.name??"Graview",description:r?.subtitle,home:{href:`${l}/`,go:()=>i("/"),current:o.pathname==="/"},faces:{scene:{label:st(c),current:!1,go:()=>window.location.assign(a)},pages:{label:ut(c),current:!0,go:()=>{}}},places:u,current:Rt(u,d),reach:{href:R=>`${l}${R}`,go:R=>i(R.path)},...s?{onFind:s.onFind,find:s.find}:{findBox:(0,C.jsx)(Sn,{context:e})},skips:(0,C.jsx)(Lt,{to:[{label:"Skip to the content",testid:"content",go:()=>{let R=document.querySelector("[data-graview-skip-target]");Ce(R?.querySelector('[data-graview-choose-box][tabindex="0"]')??R??document.querySelector("main"))}},...f?[{label:"Skip to what can be done",testid:"acts",go:()=>void Ce(document.querySelector("main [data-affordance]:not([disabled])")??document.querySelector("main"))}]:[]]}),tools:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(le,{to:"/problems","data-testid":"standing-link","aria-label":y,title:y,style:{...wt,padding:h===0?0:"0 8px",textDecoration:"none",fontWeight:600,fontVariantNumeric:"tabular-nums",color:h===0?"var(--graview-ink-muted)":"var(--graview-warn)"},children:[(0,C.jsx)(xt,{tone:h===0?"var(--graview-good)":"var(--graview-warn)"}),h>0?(0,C.jsx)("span",{"aria-hidden":"true",children:h}):null]}),s?null:(0,C.jsx)(Cr,{context:e}),e.views?(0,C.jsx)(bt,{...e.signature?{signature:!0}:{}}):null]})})})}function Ai({context:e,style:t,children:r,...a}){let n=e.embedded||e.framed?"section":"main";return(0,C.jsx)(n,{style:{...Ze,...t},...a,children:r})}function _i({context:e,children:t,...r}){let a=`h${e.titleLevel??(e.framed&&!e.barAbove?1:2)}`;return(0,C.jsx)(a,{style:Dr,"data-graview-page-title":"",...r,children:t})}function Sn({context:e,narrowsLists:t=!0,className:r,size:a}){Lr("find");let n=T(),o=Q(),[i,l]=Ge(),s=n.pathname.split("/").filter(Boolean),u=t&&s.length===1&&de(e.store.schema,s[0])!==void 0,c=n.pathname==="/search",d=u||c?i.get("q")??"":"",m=u?`Narrow ${ce(e.store.schema,de(e.store.schema,s[0])).toLowerCase()}\u2026`:"",[h,y]=(0,O.useState)(!0);(0,O.useLayoutEffect)(()=>{let P=R.current;if(!P||!m||typeof ResizeObserver>"u")return;let E=()=>{let k=getComputedStyle(P),$=document.createElement("canvas").getContext("2d");$&&($.font=`${k.fontWeight} ${k.fontSize} ${k.fontFamily}`,y($.measureText(m).width<=P.clientWidth-parseFloat(k.paddingLeft)-parseFloat(k.paddingRight)))};E();let F=new ResizeObserver(E);return F.observe(P),()=>F.disconnect()},[m]);let[p,f]=(0,O.useState)(d),R=(0,O.useRef)(null);(0,O.useEffect)(()=>{let P=E=>{if(E.defaultPrevented||E.altKey)return;let F=!E.shiftKey&&(E.metaKey||E.ctrlKey)&&E.key.toLowerCase()==="k",k=document.activeElement,$=k instanceof HTMLInputElement||k instanceof HTMLTextAreaElement||k instanceof HTMLSelectElement||k instanceof HTMLElement&&k.isContentEditable,J=E.key==="/"&&!E.metaKey&&!E.ctrlKey&&!$;if(!F&&!J)return;let z=R.current,se=z?.closest("[data-graview-embed]"),q=E.target,ue=q===document.body||q===document.documentElement;!z||!(ue||!se||q instanceof Node&&se.contains(q))||(E.preventDefault(),z.closest("[data-graview-app-bar]")?.querySelector('[data-testid="app-find-open"]')?.click(),requestAnimationFrame(()=>{z.focus(),z.select()}))};return document.addEventListener("keydown",P),()=>document.removeEventListener("keydown",P)},[]);let w=(0,O.useRef)(new Set([d]));(0,O.useEffect)(()=>{w.current.has(d)||(w.current=new Set([d]),f(d))},[d]);let b=P=>{if(f(P),w.current.add(P),u){let F=new URLSearchParams(i);P.trim()?F.set("q",P):F.delete("q"),l(F,{replace:!0});return}let E=P.trim()?`/search?${new URLSearchParams({q:P}).toString()}`:"/search";o(E,{replace:c})};return(0,C.jsxs)("form",{role:"search","aria-label":u?"Narrow this list":"Find anything",className:Ft("graview-find",r),...kt(a),onSubmit:P=>{P.preventDefault(),u&&p.trim()&&o(`/search?${new URLSearchParams({q:p}).toString()}`)},children:[(0,C.jsx)("input",{ref:R,type:"search","data-testid":"nav-find",value:p,onChange:P=>b(P.target.value),placeholder:u?h?m:"Narrow\u2026":"Find\u2026","aria-keyshortcuts":"/ Meta+K Control+K","aria-label":u?"Narrow this list":"Find anything",className:"graview-find-box"}),(0,C.jsx)("style",{children:bn})]})}var bn=`:where(.graview-find){display:flex;min-width:0;flex:1 1 auto}
22
+ :where(.graview-find[data-size=md]){--graview-control-height:36px}
23
+ :where(.graview-find-box){box-sizing:border-box;width:100%;min-width:0;height:var(--graview-control-height,30px);padding:0 var(--graview-bar-find-end,10px) 0 10px;font:inherit;font-size:.875rem;color:var(--graview-ink);background:var(--graview-ground);border:1px solid var(--graview-edge);border-radius:8px}`;export{Nr as a,de as b,xn as c,Pn as d,Qe as e,li as f,si as g,ui as h,ci as i,di as j,kr as k,fi as l,hi as m,mi as n,pi as o,yi as p,gi as q,vi as r,Ri as s,wi as t,Si as u,gn as v,vn as w,bi as x,Ei as y,Cr as z,Se as A,T as B,ga as C,Q as D,Ra as E,Ta as F,Na as G,cr as H,Ma as I,dn as J,le as K,Ge as L,yn as M,ei as N,ti as O,Oi as P,Rn as Q,Ai as R,_i as S,Sn as T};
24
+ /*! Bundled license information:
25
+
26
+ react-router/dist/development/chunk-BV7QT456.mjs:
27
+ (**
28
+ * react-router v7.18.3
29
+ *
30
+ * Copyright (c) Remix Software Inc.
31
+ *
32
+ * This source code is licensed under the MIT license found in the
33
+ * LICENSE.md file in the root directory of this source tree.
34
+ *
35
+ * @license MIT
36
+ *)
37
+
38
+ react-router/dist/development/index.mjs:
39
+ (**
40
+ * react-router v7.18.3
41
+ *
42
+ * Copyright (c) Remix Software Inc.
43
+ *
44
+ * This source code is licensed under the MIT license found in the
45
+ * LICENSE.md file in the root directory of this source tree.
46
+ *
47
+ * @license MIT
48
+ *)
49
+ */
@@ -0,0 +1,9 @@
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{b as ae}from"./chunk.7IXLH7PR.js";import{a as Y,c as H,d as X,e as J}from"./chunk.BYVE2NQY.js";import"./chunk.X5WB4GJ4.js";import"./chunk.XGRMQUFB.js";import"./chunk.6IEDQHKI.js";import"./chunk.5J2HETUO.js";import"./chunk.6XEATXZC.js";import"./chunk.5TBK44MK.js";import"./chunk.VCOIFBUE.js";import"./chunk.UT6642FC.js";import"./chunk.TI4OSTQV.js";import"./chunk.GZHZLJBF.js";import"./chunk.EBTYR5CZ.js";import"./chunk.OJGHDWI6.js";import"./chunk.OWL5GZ6U.js";import"./chunk.RSYFIL2Z.js";import"./chunk.R7F6UJVG.js";import"./chunk.DYW4D74X.js";import"./chunk.VP35BUUZ.js";import{Da as K,F as V,G as q,Ha as U,R as x,S as F,_ as b,c as W,ua as z,x as j}from"./chunk.7L6LYXCV.js";import{a as N}from"./chunk.SDO3U72B.js";import{Wa as _,ca as I,ea as G,ha as B,qb as D}from"./chunk.7MQ7UWVW.js";import"./chunk.2AZTW66C.js";import{b as w}from"./chunk.AJZBJBMO.js";var re=w(q(),1);function P(e){return{minHeight:24,padding:"3px 10px",borderRadius:6,fontSize:"0.875rem",borderWidth:1,borderStyle:"solid",borderColor:e?"transparent":"var(--graview-edge)",color:e?"var(--graview-ink)":"var(--graview-ink-muted)",fontWeight:e?600:400,background:e?"color-mix(in srgb, var(--graview-accent) 16%, transparent)":"transparent"}}var M=w(x(),1);function Q(){let{seats:e,principal:t,takeSeat:i}=b();return e.length<2?null:(0,M.jsxs)("div",{role:"group","aria-label":"Seat","data-testid":"seats",style:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:6,rowGap:4},children:[(0,M.jsx)("span",{style:{fontSize:"0.75rem",letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--graview-ink-faint)"},children:"As"}),e.map(a=>{let l=ie(t,a.principal);return(0,M.jsx)("button",{type:"button","aria-pressed":l,"data-testid":`seat-${a.principal.id??a.label}`,title:`Sit down as ${a.label}: the acts, the kinds and the pages narrow to what this seat may do`,onClick:()=>i(a.principal),style:{...P(l),whiteSpace:"nowrap"},children:a.label},a.principal.id??a.label)})]})}function ie(e,t){return e.kind===t.kind&&e.id===t.id}var L=w(q(),1),c=w(x(),1),oe=`
2
+ .graview-here{display:flex;flex:none}
3
+ .graview-here>button{display:inline-flex;align-items:center;gap:4px;height:30px;margin:0;padding:0 4px;border:1px solid transparent;border-radius:8px;background:none;box-shadow:none;font:inherit;font-size:.75rem;color:var(--graview-ink-muted);cursor:pointer}
4
+ .graview-here-mark{display:inline-flex;align-items:center;justify-content:center;flex:none;box-sizing:border-box;width:24px;height:24px;border-radius:50%;border:1.5px solid hsl(var(--graview-hue) 50% 48%);background:var(--graview-panel-muted);color:var(--graview-ink);font-size:.75rem;font-weight:600;box-shadow:0 0 0 2px var(--graview-bar)}
5
+ .graview-here-mark+.graview-here-mark{margin-left:-10px}
6
+ .graview-here-mark[data-agent]{border-radius:5px}
7
+ .graview-here-mark[data-counted]{--graview-hue:0;border-color:var(--graview-edge)}
8
+ .graview-here small{display:block;font-size:.75rem;color:var(--graview-ink-muted)}
9
+ .graview-bar[data-finding] .graview-here{display:none}`,se={position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)"};function le(e,t){let i=t.id===void 0?null:`${t.kind}:${t.id}`,a=new Map;for(let l of e.values()){let d=l.participant.slice(0,l.participant.lastIndexOf(":"));if(d===i)continue;let s=d.endsWith(":")?l.participant:d,o=a.get(s);(!o||o.at<l.at)&&a.set(s,l)}return[...a.values()]}var Z=e=>e.name&&e.onBehalfOfName?`${e.name}, for ${e.onBehalfOfName}`:e.name??"",ee=e=>e===1?"1 viewer":`${e} viewers`;function de(e){let t=e.map(Z).filter(Boolean),i=t.length<e.length?[...t,ee(e.length-t.length)]:t,a=i.pop();return`${i.length>0?`${i.join(", ")} and ${a}`:a} ${e.length===1?"is":"are"} here`}function pe(e,t){let{store:i,hidden:a,pictures:l}=t,d=W(e),s=i.kindsKeptFrom(t.principal),o=u=>!a.has(u)&&!s.has(u)&&!i.modules.disabledKinds.has(u),g=l.find(u=>u.as===d.within?.view&&o(u.kind));if(g)return g.title;if(!d.focusId)return d.overview?"the whole thing":null;let p=j(d.focusId);if(p.length>0)return p.every(o)?p.map(u=>B(i.schema,u)).join(" and "):null;let h=i.graph.getNode(d.focusId);return h&&o(h.kind)?I(i.schema.tryDefinition(h.kind),h):null}function ce(e,t){let i=o=>o.id!==void 0&&(o.id===t.principal.id||o.onBehalfOf?.id===t.principal.id),a=e.filter(o=>!D(o)&&o.author.kind!=="system"&&!i(o.author)),l=a[0];if(!l)return null;let d=_(l.author,{graph:t.store.graph,schema:t.store.schema,...t.seats?{seats:t.seats}:{},...t.people?{people:t.people}:{}}),s=[...new Set(a.map(o=>o.intent))].join("; ");return`${d}: ${s}`}function ue(e,t,i){let a=ce(e,t);a&&(i(""),setTimeout(()=>i(a),50))}function ge({scene:e,compact:t}){let{who:i,principal:a,store:l,views:d,hiddenKinds:s,follow:o}=b(),g=U("here"),p=le(i,a),h=p.length===0?"":de(p),[u,S]=(0,L.useState)("");if((0,L.useEffect)(()=>S(h),[h]),p.length===0)return null;let f=p.filter(r=>r.name),y=f.slice(0,t?2:3),m=p.length-y.length,k=p.length-f.length,T=d.places();return(0,c.jsxs)("div",{className:"graview-here","data-testid":"here",children:[(0,c.jsx)("style",{children:oe}),(0,c.jsx)("span",{role:"status","aria-live":"polite",style:se,children:u}),(0,c.jsxs)("button",{type:"button","data-testid":"here-open",...g.trigger,onClick:g.toggle,"aria-label":`${h} \u2014 who and where`,title:h,children:[y.length>0?(0,c.jsx)("span",{style:{display:"flex"},children:y.map(r=>(0,c.jsx)(E,{one:r},r.participant))}):(0,c.jsx)(E,{count:m}),y.length>0&&m>0?(0,c.jsxs)("span",{"aria-hidden":"true",children:["+",m]}):null]}),(0,c.jsxs)("ul",{...g.pane,"aria-label":"Who is here","data-testid":"here-list",hidden:!g.open,className:"graview-bar-list",style:K,children:[f.map(r=>{let v=pe(r.stop,{store:l,principal:a,hidden:s,pictures:T}),A=Z(r);return(0,c.jsx)("li",{children:(0,c.jsxs)(e?"button":"span",{className:"graview-bar-item","data-testid":"here-one",...e?{type:"button",title:`Go where ${A} is`,onClick:()=>{g.setOpen(!1),o(r.participant)}}:{style:{cursor:"default"}},children:[(0,c.jsx)(E,{one:r}),(0,c.jsxs)("span",{children:[A,v?(0,c.jsxs)("small",{children:["On ",v]}):null]})]})},r.participant)}),k>0?(0,c.jsx)("li",{children:(0,c.jsxs)("span",{className:"graview-bar-item","data-testid":"here-viewers",style:{cursor:"default"},children:[(0,c.jsx)(E,{count:k}),(0,c.jsxs)("span",{children:[ee(k),(0,c.jsx)("small",{children:"Not signed in"})]})]})}):null]})]})}function E({one:e,count:t}){return(0,c.jsx)("span",{className:"graview-here-mark","aria-hidden":"true",...e?{style:{"--graview-hue":Math.round(e.hue)}}:{"data-counted":""},...e?.kind==="agent"?{"data-agent":""}:{},children:e?(e.name??"").trim().charAt(0).toUpperCase():t})}function he(e){let t=/^(?:place|scene):([^:]+):(.+)$/.exec(e.key);return t?{place:t[2],about:[`aggregate:${t[1]}`],title:e.label}:{about:e.group==="lists"&&e.kind?[`aggregate:${e.kind}`]:[],title:e.label}}function O(e,t,i,a,l,d){let s=he(t),o=e.getBoundingClientRect(),g={...s,face:i?"scene":"pages",x:Math.round(l??o.left+Math.min(16,o.width/2)),y:Math.round(d??Math.min(o.bottom,o.top+36)),returnTo:e},p=i?null:e.closest("[data-graview-embed], [data-graview-shell]")?.querySelector("[data-graview-face='pages']")??document.querySelector("[data-graview-face='pages']");p?p.dispatchEvent(new CustomEvent(F,{detail:g})):a(g)}var R={on:null,at:0},te=500,me=10;function ye(e,t,i,a,l,d,s){let o=t.getAttribute("data-testid")??"",g=o==="app-places-open"?a:o.slice(10),p=i.find(m=>m.key===g);if(!p)return;if(e.type==="keydown")return R={on:t,at:Date.now()},O(t,p,l,d);let{clientX:h,clientY:u}=e;if(e.type==="contextmenu")return R.on===t&&Date.now()-R.at<700?void 0:h===0&&u===0?O(t,p,l,d):O(t,p,l,d,h,u);let S=Date.now()-Math.max(0,performance.now()-e.timeStamp),f=!1,y=m=>{Math.hypot(m.clientX-h,m.clientY-u)>me&&(f=!0)};document.addEventListener("pointermove",y),setTimeout(()=>{document.removeEventListener("pointermove",y),!(f||s.at!==0&&s.at-S<te)&&(R={on:t,at:Date.now()},t.addEventListener("click",m=>{m.preventDefault(),m.stopPropagation()},{capture:!0,once:!0}),O(t,p,l,d,h,u))},Math.max(0,te-(Date.now()-S)))}var n=w(x(),1),Ie=z(N(()=>(__graviewPreload(import.meta.url,["./chunk.VP35BUUZ.js","./chunk.7L6LYXCV.js","./chunk.SDO3U72B.js","./chunk.7MQ7UWVW.js","./chunk.2AZTW66C.js","./chunk.AJZBJBMO.js"]),import("./chunk.K6SPN4D6.js")))).part((e,t)=>(0,n.jsx)(e.TidyGroups,{...t}),{quiet:!0}),fe=z(N(()=>(__graviewPreload(import.meta.url,["./chunk.7L6LYXCV.js","./chunk.SDO3U72B.js","./chunk.7MQ7UWVW.js","./chunk.2AZTW66C.js","./chunk.AJZBJBMO.js"]),import("./chunk.OIJP6PQV.js")))).part((e,t)=>(0,n.jsx)(e.HoverChipsSwitch,{...t}),{quiet:!0});function Be({violations:e,pick:t}){let{store:i,brand:a,setMenuAt:l}=b(),d=Y(i,e);return(0,n.jsx)(n.Fragment,{children:d.map((s,o)=>{let g=J(s),p=s.repairs.length>0?`${s.repairs.length} ${s.repairs.length===1?"way":"ways"} to fix`:"";return(0,n.jsx)("li",{style:{borderTop:o===0?"none":"1px solid var(--graview-edge)"},children:(0,n.jsxs)("button",{type:"button",onClick:h=>{let u=h.currentTarget.closest("ol").getBoundingClientRect();t(s),l({x:u.left,y:u.top,on:s.subjectId})},...H(s)!==void 0?{title:H(s)}:{},style:{width:"100%",textAlign:"left",fontSize:"0.8125rem",lineHeight:1.4,padding:"7px 8px",border:"1px solid transparent",background:"none",boxShadow:"none",borderRadius:7},children:[s.line?(0,n.jsx)(X,{line:s.line,schema:i.schema,...a?{brand:a}:{},stacked:!0,style:{display:"block",color:"var(--graview-ink)"}}):(0,n.jsx)("span",{style:{display:"block",color:"var(--graview-ink)"},children:s.message}),g||p?(0,n.jsx)("span",{style:{color:"var(--graview-ink-faint)",fontSize:"0.75rem"},children:[g,p].filter(Boolean).join(" \xB7 ")}):null]})},`${s.invariant}:${o}`)})})}function _e({name:e,me:t,scheme:i,onScheme:a,profileHref:l,hostActions:d,close:s,part:o,signature:g=!1}){let{principal:p,seats:h,settings:u,settingValues:S,chooseSetting:f,sharing:y,ai:m}=b(),k=p.roles??[],T={setOpen:r=>s()};return(0,n.jsx)(n.Fragment,{children:o==="top"?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{style:{display:"grid",gap:3},children:[(0,n.jsx)("span",{style:$,children:"Signed in as"}),(0,n.jsx)("strong",{style:{fontSize:"1rem",fontWeight:550},children:e}),(0,n.jsx)("span",{style:{fontSize:"0.8125rem",color:"var(--graview-ink-muted)"},children:k.length>0?k.map(r=>G(r)).join(", "):t===void 0?"This app has no sign-in; everything here is yours.":"No role in particular"}),t!==void 0&&l!==void 0?(0,n.jsx)("a",{href:l(t.id),"data-testid":"profile-record",style:{display:"inline-flex",alignItems:"center",minHeight:24,justifySelf:"start",fontSize:"0.875rem",color:"var(--graview-accent)"},children:"Your record \u2197"}):null,y?(0,n.jsxs)("span",{"data-testid":"profile-seen-as",style:{fontSize:"0.8125rem",color:"var(--graview-ink-muted)"},children:["Seen by others as ",y.name]}):null]}),d.length>0?(0,n.jsx)("ul",{role:"list","aria-label":"From the host","data-testid":"host-actions",style:{...C,margin:0,paddingLeft:0,listStyle:"none",display:"grid",gap:2},children:d.map(r=>(0,n.jsx)("li",{children:r.href!==void 0?(0,n.jsx)("a",{href:r.href,"data-testid":"host-action",className:"graview-host-action",...r.target?{target:r.target,rel:"noopener"}:{},onClick:()=>{r.onSelect?.(),T.setOpen(!1)},style:ne,children:r.label}):(0,n.jsx)("button",{type:"button","data-testid":"host-action",className:"graview-host-action",onClick:()=>{T.setOpen(!1),r.onSelect?.()},style:{...ne,width:"100%",textAlign:"left",border:"none",background:"none",boxShadow:"none",font:"inherit",cursor:"pointer"},children:r.label})},r.label))}):null]}):(0,n.jsxs)(n.Fragment,{children:[h.length>1?(0,n.jsxs)("div",{style:{display:"grid",gap:6,...C},children:[(0,n.jsx)("span",{style:$,children:"Sit as somebody else"}),(0,n.jsx)(Q,{})]}):null,u.length>0?(0,n.jsx)("div",{style:{display:"grid",gap:10,...C},children:u.map(r=>(0,n.jsxs)("fieldset",{"data-testid":`setting-${r.name}`,style:{border:0,margin:0,padding:0,display:"grid",gap:5},children:[(0,n.jsx)("legend",{style:{...$,padding:0},children:r.title}),r.description?(0,n.jsx)("span",{style:{fontSize:"0.8125rem",color:"var(--graview-ink-muted)"},children:r.description}):null,(0,n.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:r.options.map(v=>{let A=(S[r.name]??r.initial)===v.value;return(0,n.jsx)("button",{type:"button","aria-pressed":A,"data-testid":`setting-${r.name}-${v.value}`,onClick:()=>f(r.name,v.value),style:P(A),children:v.label},v.value)})})]},r.name))}):null,V(m)?(0,n.jsx)(re.Suspense,{fallback:null,children:(0,n.jsx)(fe,{legend:$,style:C,choice:P})}):null,i!==void 0&&a!==void 0?(0,n.jsxs)("div",{style:{display:"grid",gap:5,...C},children:[(0,n.jsx)("span",{style:$,children:"Scheme"}),(0,n.jsx)("div",{style:{display:"flex",gap:4},children:["light","dark"].map(r=>(0,n.jsx)("button",{type:"button","aria-pressed":i===r,"data-testid":`profile-scheme-${r}`,onClick:()=>a(r),style:P(i===r),children:r==="light"?"\u2600 Light":"\u263E Dark"},r))})]}):null,g?(0,n.jsxs)("p",{"data-testid":"graview-signature",style:{...C,margin:0,display:"flex",alignItems:"center",gap:6,fontSize:"0.75rem",color:"var(--graview-ink-faint)"},children:["Built with",(0,n.jsxs)("a",{href:"https://graview.dev",target:"_blank",rel:"noopener",style:{display:"inline-flex",alignItems:"center",gap:4,minHeight:24,color:"var(--graview-ink-muted)",fontWeight:600,textDecoration:"none"},children:[(0,n.jsx)("span",{"data-testid":"graview-mark",style:{display:"inline-flex",lineHeight:0},dangerouslySetInnerHTML:{__html:ve}}),"Graview"]})]}):null]})})}var ve='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="14" height="14" aria-hidden="true" focusable="false"><g fill="none" stroke="currentColor" stroke-width="2.4" stroke-linejoin="round"><path d="M13 11 L3 8 L14 3 H29 L21 9"/><path d="M10 18 L3 23 L16.5 28 L29 21 L22 19"/><path d="M16.5 18.5 V23.5" stroke-linecap="round"/></g><circle cx="16.5" cy="13.5" r="2" fill="var(--graview-mark-point, currentColor)"/></svg>',ne={display:"flex",alignItems:"center",minHeight:28,padding:"2px 8px",borderRadius:7,fontSize:"0.875rem",color:"var(--graview-ink)",textDecoration:"none"},$={fontSize:"0.75rem",letterSpacing:"0.14em",textTransform:"uppercase",color:"var(--graview-ink-faint)"},C={paddingTop:10,borderTop:"1px solid var(--graview-edge)"};export{ae as ActivityRail,ge as Here,Be as ProblemRows,_e as ProfilePane,Ie as TidyFoot,ye as placeGesture,ue as sayTheirChange};
@@ -1 +1 @@
1
- import{e as $}from"./chunk.XFZKP4IF.js";import{a as C}from"./chunk.QIV65FWE.js";import{g as M}from"./chunk.2FLPDPEL.js";import{ba as k,ca as v,ea as j,ub as x}from"./chunk.V5MYKNL7.js";function N(a,s){let c=a.tryDefinition(s),r=Object.keys(c?.fields?.shape??{}),m=[c?.lifecycle?.field,...r.filter(l=>/^(status|stage|state|phase)$/i.test(l))].filter(l=>l!==void 0&&r.includes(l));return[...new Set(m)].slice(0,1)}function P(a,s){return a.tryDefinition(s)?.fieldRoles?.title??"label"}function V(a,s,c={}){let r=s.map(e=>a.graph.getNode(e)).filter(e=>e!==void 0);if(r.length===0)return{acts:[],withheld:[]};let u=c.principal??{kind:"human"},m=C(a,r.map(e=>e.id),{...c.derive,principal:u,...c.context?{context:c.context}:{}}),l=new Map(a.allMutations().map(e=>[e.name,e])),g=[...new Set(r.map(e=>e.kind))],p=new Set(g.map(e=>P(a.schema,e))),h=new Set(m.affordances.filter(e=>e.provider==="schema").map(e=>e.mutation)),o=e=>{let n=l.get(e.mutation);if(!n?.subject)return;let t=r.length===1&&e.provider==="invariant"&&!h.has(e.mutation)&&e.args[n.subject.arg]===r[0].id;if(!(e.provider!=="schema"&&!t)&&!(r.length>1&&e.batch?.length!==r.length)&&n.derived?.act!=="edit"&&!e.open.some(i=>p.has(i.name)))return n},y=[],b=new Set;for(let e of m.affordances){let n=o(e);if(!n||b.has(n.name))continue;b.add(n.name);let{[n.subject.arg]:t,...i}=e.args;y.push({id:e.id,label:v(n),mutation:n.name,subject:n.subject.arg,args:i,open:e.open,...e.destructive||e.setsAside?{more:!0}:{},...e.destructive?{destructive:!0}:{},affordance:{...e,label:v(n)}})}if(g.length===1){let e=g[0];for(let n of N(a.schema,e))for(let t of $(a.schema,[...l.values()],e,n)){if(t.by==="none"||r.every(d=>d[n]===t.value))continue;let i=r.find(d=>d[n]!==t.value),f=t.acts.find(d=>{let D=t.by==="step"?{[d.subject.arg]:i.id}:{[d.subject.arg]:i.id,[n]:t.value};return a.permits({name:d.name,args:D},u).ok});if(!f)continue;let w=t.by==="step"?{}:{[n]:t.value};if(t.by==="step"&&y.some(d=>d.mutation===f.name))continue;let R=t.by==="step"?v(f):`Move to ${t.label}`,O=`set:${n}:${t.value}`;y.push({id:O,label:R,mutation:f.name,subject:f.subject.arg,args:w,open:[],affordance:{id:O,label:R,provider:"schema",mutation:f.name,args:{[f.subject.arg]:i.id,...w},open:[],score:0,why:`every one is ${e}`,nodeIds:r.map(d=>d.id)}})}}let S=[...y.filter(e=>!e.more),...y.filter(e=>e.more)],A=m.withheld.filter(e=>{let n=l.get(e.mutation);return n?.subject!==void 0&&n.derived?.act!=="edit"&&(r.length===1||e.batch?.length===r.length)}).map(e=>({label:v(l.get(e.mutation)),message:e.refusal.message}));return{acts:S,withheld:A}}function _(a,s,c,r={}){let u=r.author,m=a.allMutations().find(e=>e.name===s.mutation),l=e=>M(a.schema,a.allMutations(),e),g=e=>{let n=a.graph.getNode(e);return n?k(a.schema.tryDefinition(n.kind),n):e},p=[],h=[],o=[];for(let e of[...new Set(c)]){let n={name:s.mutation,args:{...s.args,[s.subject]:e}};if(!m){p.push({id:e,label:g(e),message:`There is no act \u201C${s.mutation}\u201D.`,reason:"invalid"});continue}let t=a.permits(n,u);if(!t.ok){p.push({id:e,label:g(e),message:t.refusal.message,reason:"forbidden"});continue}if(!a.wouldChange(n,u)){h.push(e);continue}o.push({id:e,call:n})}let y=e=>a.previewAll(e,{...u?{author:u}:{},...r.context?{context:r.context}:{}});for(let e=0;o.length>0;e+=1)try{y(o.map(n=>n.call));break}catch(n){let t=[];for(let i of o)try{y([i.call]),t.push(i)}catch(f){p.push({id:i.id,label:g(i.id),message:l(f),reason:x(f).reason})}if(t.length===o.length||e>o.length){for(let i of t)p.push({id:i.id,label:g(i.id),message:l(n),reason:x(n).reason});o=[];break}o=t}if(o.length===0)return{applied:[],unchanged:h,refused:p};let b=s.label??(m?v(m):s.mutation),S=[...new Set(o.map(e=>a.graph.getNode(e.id)?.kind))],A=`${b} \u2014 ${S.length===1&&S[0]?j(a.schema,S[0],o.length):`${o.length} records`}`;try{let e=a.applyAll(o.map(n=>n.call),{intent:A,...u?{author:u}:{},...r.via?{via:r.via}:{}});return{batch:e.batch,intent:A,applied:o.map(n=>n.id),unchanged:h,refused:p,result:e}}catch(e){let n=l(e),t=x(e).reason;return{applied:[],unchanged:h,refused:[...p,...o.map(i=>({id:i.id,label:g(i.id),message:n,reason:t}))],allOrNothing:!0}}}export{V as a,_ as b};
1
+ import{e as $}from"./chunk.XVWJD2DG.js";import{a as C}from"./chunk.Q5XICUDZ.js";import{g as M}from"./chunk.RSYFIL2Z.js";import{ca as k,da as v,fa as j,vb as x}from"./chunk.7MQ7UWVW.js";function N(a,s){let c=a.tryDefinition(s),r=Object.keys(c?.fields?.shape??{}),m=[c?.lifecycle?.field,...r.filter(l=>/^(status|stage|state|phase)$/i.test(l))].filter(l=>l!==void 0&&r.includes(l));return[...new Set(m)].slice(0,1)}function P(a,s){return a.tryDefinition(s)?.fieldRoles?.title??"label"}function V(a,s,c={}){let r=s.map(e=>a.graph.getNode(e)).filter(e=>e!==void 0);if(r.length===0)return{acts:[],withheld:[]};let u=c.principal??{kind:"human"},m=C(a,r.map(e=>e.id),{...c.derive,principal:u,...c.context?{context:c.context}:{}}),l=new Map(a.allMutations().map(e=>[e.name,e])),g=[...new Set(r.map(e=>e.kind))],p=new Set(g.map(e=>P(a.schema,e))),h=new Set(m.affordances.filter(e=>e.provider==="schema").map(e=>e.mutation)),o=e=>{let n=l.get(e.mutation);if(!n?.subject)return;let t=r.length===1&&e.provider==="invariant"&&!h.has(e.mutation)&&e.args[n.subject.arg]===r[0].id;if(!(e.provider!=="schema"&&!t)&&!(r.length>1&&e.batch?.length!==r.length)&&n.derived?.act!=="edit"&&!e.open.some(i=>p.has(i.name)))return n},y=[],b=new Set;for(let e of m.affordances){let n=o(e);if(!n||b.has(n.name))continue;b.add(n.name);let{[n.subject.arg]:t,...i}=e.args;y.push({id:e.id,label:v(n),mutation:n.name,subject:n.subject.arg,args:i,open:e.open,...e.destructive||e.setsAside?{more:!0}:{},...e.destructive?{destructive:!0}:{},affordance:{...e,label:v(n)}})}if(g.length===1){let e=g[0];for(let n of N(a.schema,e))for(let t of $(a.schema,[...l.values()],e,n)){if(t.by==="none"||r.every(d=>d[n]===t.value))continue;let i=r.find(d=>d[n]!==t.value),f=t.acts.find(d=>{let D=t.by==="step"?{[d.subject.arg]:i.id}:{[d.subject.arg]:i.id,[n]:t.value};return a.permits({name:d.name,args:D},u).ok});if(!f)continue;let w=t.by==="step"?{}:{[n]:t.value};if(t.by==="step"&&y.some(d=>d.mutation===f.name))continue;let R=t.by==="step"?v(f):`Move to ${t.label}`,O=`set:${n}:${t.value}`;y.push({id:O,label:R,mutation:f.name,subject:f.subject.arg,args:w,open:[],affordance:{id:O,label:R,provider:"schema",mutation:f.name,args:{[f.subject.arg]:i.id,...w},open:[],score:0,why:`every one is ${e}`,nodeIds:r.map(d=>d.id)}})}}let S=[...y.filter(e=>!e.more),...y.filter(e=>e.more)],A=m.withheld.filter(e=>{let n=l.get(e.mutation);return n?.subject!==void 0&&n.derived?.act!=="edit"&&(r.length===1||e.batch?.length===r.length)}).map(e=>({label:v(l.get(e.mutation)),message:e.refusal.message}));return{acts:S,withheld:A}}function _(a,s,c,r={}){let u=r.author,m=a.allMutations().find(e=>e.name===s.mutation),l=e=>M(a.schema,a.allMutations(),e),g=e=>{let n=a.graph.getNode(e);return n?k(a.schema.tryDefinition(n.kind),n):e},p=[],h=[],o=[];for(let e of[...new Set(c)]){let n={name:s.mutation,args:{...s.args,[s.subject]:e}};if(!m){p.push({id:e,label:g(e),message:`There is no act \u201C${s.mutation}\u201D.`,reason:"invalid"});continue}let t=a.permits(n,u);if(!t.ok){p.push({id:e,label:g(e),message:t.refusal.message,reason:"forbidden"});continue}if(!a.wouldChange(n,u)){h.push(e);continue}o.push({id:e,call:n})}let y=e=>a.previewAll(e,{...u?{author:u}:{},...r.context?{context:r.context}:{}});for(let e=0;o.length>0;e+=1)try{y(o.map(n=>n.call));break}catch(n){let t=[];for(let i of o)try{y([i.call]),t.push(i)}catch(f){p.push({id:i.id,label:g(i.id),message:l(f),reason:x(f).reason})}if(t.length===o.length||e>o.length){for(let i of t)p.push({id:i.id,label:g(i.id),message:l(n),reason:x(n).reason});o=[];break}o=t}if(o.length===0)return{applied:[],unchanged:h,refused:p};let b=s.label??(m?v(m):s.mutation),S=[...new Set(o.map(e=>a.graph.getNode(e.id)?.kind))],A=`${b} \u2014 ${S.length===1&&S[0]?j(a.schema,S[0],o.length):`${o.length} records`}`;try{let e=a.applyAll(o.map(n=>n.call),{intent:A,...u?{author:u}:{},...r.via?{via:r.via}:{}});return{batch:e.batch,intent:A,applied:o.map(n=>n.id),unchanged:h,refused:p,result:e}}catch(e){let n=l(e),t=x(e).reason;return{applied:[],unchanged:h,refused:[...p,...o.map(i=>({id:i.id,label:g(i.id),message:n,reason:t}))],allOrNothing:!0}}}export{V as a,_ as b};
@@ -1,6 +1,6 @@
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{G as C,R as k,ua as K}from"./chunk.FOQZADMA.js";import{a as H}from"./chunk.SDO3U72B.js";import{b}from"./chunk.AJZBJBMO.js";var n=b(C(),1),N=450,_=10,O=t=>t instanceof HTMLInputElement?t.dataset.graviewChooseBox??void 0:void 0,q={ArrowDown:1,ArrowRight:1,ArrowUp:-1,ArrowLeft:-1,Home:-1/0,End:1/0},S=t=>t instanceof Element?t.closest("[data-graview-choose]"):null,G=t=>t instanceof HTMLElement&&(t.isContentEditable||t instanceof HTMLInputElement&&t.type!=="checkbox"||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement);function Y(t){let[i,d]=(0,n.useState)(()=>new Set),l=(0,n.useRef)(null),x=(0,n.useRef)(null),[E,P]=(0,n.useState)(null),R=E!==null&&t.includes(E)?E:t[0],L=(0,n.useMemo)(()=>t.filter(e=>i.has(e)),[t,i]),M=(0,n.useMemo)(()=>new Set(t),[t]);(0,n.useEffect)(()=>{[...i].some(e=>!M.has(e))&&d(e=>new Set([...e].filter(o=>M.has(o))))},[M,i]);let u=(0,n.useCallback)((e,o=!1)=>{let a=l.current;d(s=>{let r=new Set(s),f=a===null?-1:t.indexOf(a),y=t.indexOf(e);if(o&&f>=0&&y>=0){let T=s.has(a);for(let p of t.slice(Math.min(f,y),Math.max(f,y)+1))T?r.add(p):r.delete(p)}else r.has(e)?r.delete(e):r.add(e);return r}),l.current=e},[t]),v=(0,n.useCallback)(e=>d(new Set(e)),[]),A=(0,n.useCallback)(()=>{l.current=null,d(new Set)},[]),c=(0,n.useRef)(null),g=(0,n.useRef)(!1),m=L.length>0,h=()=>{c.current&&clearTimeout(c.current.timer),c.current=null};(0,n.useEffect)(()=>h,[]);let B={ref:x,onKeyDown:e=>{if(G(e.target))return;let o=O(e.target);if(e.key==="Tab"&&!e.shiftKey&&!e.metaKey&&!e.ctrlKey&&!e.altKey&&o!==void 0&&m){let s=document.querySelector('[data-testid="several-bar"]'),r=s?.querySelector("[data-mutation]:not([disabled])")??s?.querySelector("button:not([disabled])");if(r){e.preventDefault(),e.stopPropagation(),r.focus();return}}let a=q[e.key];if(o!==void 0&&a!==void 0&&!e.metaKey&&!e.ctrlKey&&!e.altKey){let s=t.indexOf(o),r=t[Math.max(0,Math.min(t.length-1,s+(Number.isFinite(a)?a:a>0?t.length:-t.length)))];if(e.preventDefault(),e.stopPropagation(),r===void 0||r===o)return;if(e.shiftKey){let f=l.current!==null&&t.includes(l.current)?l.current:o,[y,T]=[t.indexOf(f),t.indexOf(r)].sort((p,F)=>p-F);d(p=>new Set([...p,...t.slice(y,T+1)])),l.current=f}P(r),x.current?.querySelector(`[data-graview-choose-box="${CSS.escape(r)}"]`)?.focus();return}if((e.metaKey||e.ctrlKey)&&!e.altKey&&e.key.toLowerCase()==="a"){e.preventDefault(),e.stopPropagation(),v(t);return}if(e.key===" "&&!e.metaKey&&!e.ctrlKey){let s=S(e.target),r=e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement&&e.target.type==="checkbox";if(!s||r)return;e.preventDefault(),u(s.dataset.graviewChoose,e.shiftKey)}},onFocus:e=>{let o=O(e.target);o!==void 0&&P(o)},onPointerDown:e=>{if(g.current=!1,e.pointerType==="mouse"||e.button>0)return;let o=S(e.target);if(!o||e.target instanceof HTMLInputElement&&e.target.type==="checkbox")return;let a=o.dataset.graviewChoose;h(),c.current={id:a,x:e.clientX,y:e.clientY,timer:setTimeout(()=>{c.current=null,g.current=!0,u(a)},N)}},onPointerMove:e=>{let o=c.current;o&&Math.hypot(e.clientX-o.x,e.clientY-o.y)>_&&h()},onPointerUp:h,onPointerCancel:h,onClickCapture:e=>{let o=S(e.target);if(!o||e.target instanceof HTMLInputElement&&e.target.type==="checkbox"&&e.target.hasAttribute("data-graview-choose-box"))return;if(g.current){g.current=!1,e.preventDefault(),e.stopPropagation();return}let s=o.dataset.graviewChoose;if(e.shiftKey&&(m||l.current!==null)){e.preventDefault(),e.stopPropagation(),u(s,!0);return}m&&matchMedia?.("(pointer: coarse)").matches&&(e.preventDefault(),e.stopPropagation(),u(s))},onContextMenu:e=>{(g.current||c.current)&&(e.preventDefault(),e.stopPropagation())},...m?{"data-graview-choosing":""}:{}},j=(0,n.useCallback)(e=>i.has(e),[i]);return{chosen:L,has:j,toggle:u,choose:v,clear:A,listProps:B,boxProps:(e,o)=>({type:"checkbox",className:"graview-choose-box","data-graview-choose-box":e,"aria-label":`Choose ${o}`,tabIndex:e===R?0:-1,checked:i.has(e),onChange:()=>{},onClick:a=>{a.stopPropagation(),u(e,a.shiftKey)}}),list:x}}var $=`
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{G as C,R as k,ua as K}from"./chunk.7L6LYXCV.js";import{a as H}from"./chunk.SDO3U72B.js";import{b}from"./chunk.AJZBJBMO.js";var n=b(C(),1),N=450,_=10,O=t=>t instanceof HTMLInputElement?t.dataset.graviewChooseBox??void 0:void 0,q={ArrowDown:1,ArrowRight:1,ArrowUp:-1,ArrowLeft:-1,Home:-1/0,End:1/0},S=t=>t instanceof Element?t.closest("[data-graview-choose]"):null,G=t=>t instanceof HTMLElement&&(t.isContentEditable||t instanceof HTMLInputElement&&t.type!=="checkbox"||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement);function Y(t){let[i,d]=(0,n.useState)(()=>new Set),l=(0,n.useRef)(null),x=(0,n.useRef)(null),[E,P]=(0,n.useState)(null),R=E!==null&&t.includes(E)?E:t[0],L=(0,n.useMemo)(()=>t.filter(e=>i.has(e)),[t,i]),M=(0,n.useMemo)(()=>new Set(t),[t]);(0,n.useEffect)(()=>{[...i].some(e=>!M.has(e))&&d(e=>new Set([...e].filter(o=>M.has(o))))},[M,i]);let u=(0,n.useCallback)((e,o=!1)=>{let a=l.current;d(s=>{let r=new Set(s),f=a===null?-1:t.indexOf(a),y=t.indexOf(e);if(o&&f>=0&&y>=0){let T=s.has(a);for(let p of t.slice(Math.min(f,y),Math.max(f,y)+1))T?r.add(p):r.delete(p)}else r.has(e)?r.delete(e):r.add(e);return r}),l.current=e},[t]),v=(0,n.useCallback)(e=>d(new Set(e)),[]),A=(0,n.useCallback)(()=>{l.current=null,d(new Set)},[]),c=(0,n.useRef)(null),g=(0,n.useRef)(!1),m=L.length>0,h=()=>{c.current&&clearTimeout(c.current.timer),c.current=null};(0,n.useEffect)(()=>h,[]);let B={ref:x,onKeyDown:e=>{if(G(e.target))return;let o=O(e.target);if(e.key==="Tab"&&!e.shiftKey&&!e.metaKey&&!e.ctrlKey&&!e.altKey&&o!==void 0&&m){let s=document.querySelector('[data-testid="several-bar"]'),r=s?.querySelector("[data-mutation]:not([disabled])")??s?.querySelector("button:not([disabled])");if(r){e.preventDefault(),e.stopPropagation(),r.focus();return}}let a=q[e.key];if(o!==void 0&&a!==void 0&&!e.metaKey&&!e.ctrlKey&&!e.altKey){let s=t.indexOf(o),r=t[Math.max(0,Math.min(t.length-1,s+(Number.isFinite(a)?a:a>0?t.length:-t.length)))];if(e.preventDefault(),e.stopPropagation(),r===void 0||r===o)return;if(e.shiftKey){let f=l.current!==null&&t.includes(l.current)?l.current:o,[y,T]=[t.indexOf(f),t.indexOf(r)].sort((p,F)=>p-F);d(p=>new Set([...p,...t.slice(y,T+1)])),l.current=f}P(r),x.current?.querySelector(`[data-graview-choose-box="${CSS.escape(r)}"]`)?.focus();return}if((e.metaKey||e.ctrlKey)&&!e.altKey&&e.key.toLowerCase()==="a"){e.preventDefault(),e.stopPropagation(),v(t);return}if(e.key===" "&&!e.metaKey&&!e.ctrlKey){let s=S(e.target),r=e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement&&e.target.type==="checkbox";if(!s||r)return;e.preventDefault(),u(s.dataset.graviewChoose,e.shiftKey)}},onFocus:e=>{let o=O(e.target);o!==void 0&&P(o)},onPointerDown:e=>{if(g.current=!1,e.pointerType==="mouse"||e.button>0)return;let o=S(e.target);if(!o||e.target instanceof HTMLInputElement&&e.target.type==="checkbox")return;let a=o.dataset.graviewChoose;h(),c.current={id:a,x:e.clientX,y:e.clientY,timer:setTimeout(()=>{c.current=null,g.current=!0,u(a)},N)}},onPointerMove:e=>{let o=c.current;o&&Math.hypot(e.clientX-o.x,e.clientY-o.y)>_&&h()},onPointerUp:h,onPointerCancel:h,onClickCapture:e=>{let o=S(e.target);if(!o||e.target instanceof HTMLInputElement&&e.target.type==="checkbox"&&e.target.hasAttribute("data-graview-choose-box"))return;if(g.current){g.current=!1,e.preventDefault(),e.stopPropagation();return}let s=o.dataset.graviewChoose;if(e.shiftKey&&(m||l.current!==null)){e.preventDefault(),e.stopPropagation(),u(s,!0);return}m&&matchMedia?.("(pointer: coarse)").matches&&(e.preventDefault(),e.stopPropagation(),u(s))},onContextMenu:e=>{(g.current||c.current)&&(e.preventDefault(),e.stopPropagation())},...m?{"data-graview-choosing":""}:{}},j=(0,n.useCallback)(e=>i.has(e),[i]);return{chosen:L,has:j,toggle:u,choose:v,clear:A,listProps:B,boxProps:(e,o)=>({type:"checkbox",className:"graview-choose-box","data-graview-choose-box":e,"aria-label":`Choose ${o}`,tabIndex:e===R?0:-1,checked:i.has(e),onChange:()=>{},onClick:a=>{a.stopPropagation(),u(e,a.shiftKey)}}),list:x}}var $=`
2
2
  .graview-choose-box{width:24px;height:24px;margin:0;accent-color:var(--graview-accent);cursor:pointer;opacity:0}
3
3
  [data-graview-choose]:hover .graview-choose-box,[data-graview-choose]:focus-within .graview-choose-box,.graview-choose-box:focus-visible,.graview-choose-box:checked,[data-graview-choosing] .graview-choose-box{opacity:1}
4
4
  [data-graview-choose]{-webkit-touch-callout:none}
5
5
  [data-graview-choosing] [data-graview-choose]{-webkit-user-select:none;user-select:none}
6
- `;var D=b(C(),1),w=b(k(),1),I=K(H(()=>(__graviewPreload(import.meta.url,["./chunk.C2PECN4C.js","./chunk.XFZKP4IF.js","./chunk.C7JKMOFC.js","./chunk.BFNVG5JE.js","./chunk.QHYXXZRD.js","./chunk.Z5AB2DBF.js","./chunk.QIV65FWE.js","./chunk.UT6642FC.js","./chunk.MB7LKKUD.js","./chunk.N6MVK3KD.js","./chunk.I7XSDXQ3.js","./chunk.UHI3D7JC.js","./chunk.WVDKYUF3.js","./chunk.ZHLQWMV5.js","./chunk.TNESS3LQ.js","./chunk.2FLPDPEL.js","./chunk.UUBYFBPN.js","./chunk.2RVUDRRY.js","./chunk.JHEVGLKB.js","./chunk.FOQZADMA.js","./chunk.SDO3U72B.js","./chunk.V5MYKNL7.js","./chunk.AJZBJBMO.js"]),import("./chunk.EAH47SCN.js")))),U=I.part((t,i)=>(0,w.jsx)(t.SeveralBar,{...i}),{what:"The selection bar"});function Q(t){return t.chosen.length===0?null:(0,w.jsx)(D.Suspense,{fallback:null,children:(0,w.jsx)(U,{...t})})}var W=()=>I.prefetch();export{Y as a,$ as b,Q as c,W as d};
6
+ `;var D=b(C(),1),w=b(k(),1),I=K(H(()=>(__graviewPreload(import.meta.url,["./chunk.C5NOO4CC.js","./chunk.XVWJD2DG.js","./chunk.6IEDQHKI.js","./chunk.5J2HETUO.js","./chunk.VCOIFBUE.js","./chunk.RY4E4JRI.js","./chunk.Q5XICUDZ.js","./chunk.UT6642FC.js","./chunk.MB7LKKUD.js","./chunk.QWY54AVN.js","./chunk.T4Q6OLZU.js","./chunk.R2B2ZAWI.js","./chunk.7XCBIID7.js","./chunk.MI2HL3LQ.js","./chunk.TMBFLZNH.js","./chunk.RSYFIL2Z.js","./chunk.R7F6UJVG.js","./chunk.DYW4D74X.js","./chunk.VP35BUUZ.js","./chunk.7L6LYXCV.js","./chunk.SDO3U72B.js","./chunk.7MQ7UWVW.js","./chunk.2AZTW66C.js","./chunk.AJZBJBMO.js"]),import("./chunk.IJU322EP.js")))),U=I.part((t,i)=>(0,w.jsx)(t.SeveralBar,{...i}),{what:"The selection bar"});function Q(t){return t.chosen.length===0?null:(0,w.jsx)(D.Suspense,{fallback:null,children:(0,w.jsx)(U,{...t})})}var W=()=>I.prefetch();export{Y as a,$ as b,Q as c,W as d};
@@ -1 +1 @@
1
- import{e as a}from"./chunk.NGDXH66B.js";import{l as i}from"./chunk.FOQZADMA.js";import{$c as o}from"./chunk.V5MYKNL7.js";function p(t){let r=t.within??{};return o({...r.sort?{sort:r.sort}:{},...r.filter?{filter:r.filter}:{},...r.group?{group:r.group}:{},...r.q?{q:r.q}:{},...r.archived?{archived:r.archived}:{}})}function c(t,r){let m=a(r),e=t;for(let n of["sort","filter","group","q","archived"])e=i(e,n,m[n]??null);return e}export{p as a,c as b};
1
+ import{e as a}from"./chunk.BT6FUNQI.js";import{l as i}from"./chunk.7L6LYXCV.js";import{bd as o}from"./chunk.7MQ7UWVW.js";function p(t){let r=t.within??{};return o({...r.sort?{sort:r.sort}:{},...r.filter?{filter:r.filter}:{},...r.group?{group:r.group}:{},...r.q?{q:r.q}:{},...r.archived?{archived:r.archived}:{}})}function c(t,r){let m=a(r),e=t;for(let n of["sort","filter","group","q","archived"])e=i(e,n,m[n]??null);return e}export{p as a,c as b};