graview 0.1.43 → 0.1.45

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 (184) hide show
  1. package/dist/preview/{chunk.6AYTF53S.js → chunk.2EFH63WS.js} +1 -1
  2. package/dist/preview/{chunk.YPEZZLOY.js → chunk.2JJYGYT2.js} +1 -1
  3. package/dist/preview/chunk.2LKMNEWZ.js +1 -0
  4. package/dist/preview/{chunk.X5WB4GJ4.js → chunk.2YABX3SC.js} +1 -1
  5. package/dist/preview/{chunk.OIJP6PQV.js → chunk.3HSPWSAI.js} +1 -1
  6. package/dist/preview/chunk.3NMINX5Z.js +1 -0
  7. package/dist/preview/{chunk.SKB4XSDG.js → chunk.4HYJHGI4.js} +1 -1
  8. package/dist/preview/{chunk.F6CPM7SL.js → chunk.4KNEBLB7.js} +1 -1
  9. package/dist/preview/{chunk.3GQL4K3Q.js → chunk.4RJZVTW7.js} +1 -1
  10. package/dist/preview/{chunk.N3FONYEP.js → chunk.4XOWRYRU.js} +2 -2
  11. package/dist/preview/{chunk.4P3LS2OE.js → chunk.55D33E5A.js} +1 -1
  12. package/dist/preview/{chunk.FTF67QE2.js → chunk.5B2LH2SR.js} +1 -1
  13. package/dist/preview/chunk.5EDA3JHU.js +1 -0
  14. package/dist/preview/{chunk.TX65ZO27.js → chunk.5O5IJVLN.js} +1 -1
  15. package/dist/preview/chunk.5R2R364Q.js +1 -0
  16. package/dist/preview/{chunk.6BU3GCHK.js → chunk.63JLXGYX.js} +1 -1
  17. package/dist/preview/{chunk.XGRMQUFB.js → chunk.64WM4IBI.js} +1 -1
  18. package/dist/preview/chunk.66JF3UMG.js +1 -0
  19. package/dist/preview/chunk.6BJBPDF3.js +349 -0
  20. package/dist/preview/{chunk.T4M4MLOS.js → chunk.6KWFTSK4.js} +1 -1
  21. package/dist/preview/{chunk.EBTYR5CZ.js → chunk.6MADC6DM.js} +1 -1
  22. package/dist/preview/{chunk.WH2RYGXR.js → chunk.6RY6OSE6.js} +1 -1
  23. package/dist/preview/{chunk.4YLBGGWT.js → chunk.6SJA4FSW.js} +1 -1
  24. package/dist/preview/chunk.6SWW6KEV.js +1 -0
  25. package/dist/preview/chunk.6UIW664O.js +6 -0
  26. package/dist/preview/chunk.6USUVORO.js +1 -0
  27. package/dist/preview/{chunk.B2KDYES6.js → chunk.6X3G3PWL.js} +1 -1
  28. package/dist/preview/chunk.7KVWV577.js +1 -0
  29. package/dist/preview/{chunk.DZN26GKS.js → chunk.7ZRFXI73.js} +1 -1
  30. package/dist/preview/chunk.AS4CQBOQ.js +5 -0
  31. package/dist/preview/{chunk.C3DX4LWD.js → chunk.B6KT6BTG.js} +4 -4
  32. package/dist/preview/{chunk.RDXDEFOC.js → chunk.BGYY55VO.js} +1 -1
  33. package/dist/preview/{chunk.A3WOUDOG.js → chunk.BNPQUI3F.js} +1 -1
  34. package/dist/preview/chunk.BRDAO2OF.js +4 -0
  35. package/dist/preview/{chunk.C3X3R7LP.js → chunk.BS2SJC2P.js} +2 -2
  36. package/dist/preview/{chunk.RQBX7M7Q.js → chunk.C2UFMFJ3.js} +2 -2
  37. package/dist/preview/{chunk.S2MP53RO.js → chunk.CBUSFM3E.js} +1 -1
  38. package/dist/preview/chunk.CSDERNQV.js +1 -0
  39. package/dist/preview/chunk.DLFWBG33.js +1 -0
  40. package/dist/preview/{chunk.5TBK44MK.js → chunk.DQHPEKWK.js} +1 -1
  41. package/dist/preview/{chunk.5J2HETUO.js → chunk.DQOCBKC3.js} +1 -1
  42. package/dist/preview/{chunk.R7F6UJVG.js → chunk.DX357TZ3.js} +1 -1
  43. package/dist/preview/{chunk.T4QT5SZY.js → chunk.E37V2EJM.js} +1 -1
  44. package/dist/preview/{chunk.XAXZCOZK.js → chunk.E4G6DXSB.js} +1 -1
  45. package/dist/preview/chunk.EAUVEVVO.js +1 -0
  46. package/dist/preview/chunk.EVW5YY3W.js +1 -0
  47. package/dist/preview/chunk.F6HMZL65.js +1 -0
  48. package/dist/preview/{chunk.IJ2AF3AW.js → chunk.FCAYURB4.js} +1 -1
  49. package/dist/preview/{chunk.LDU25CCL.js → chunk.FF6DBQMB.js} +1 -1
  50. package/dist/preview/chunk.FHZBXMXR.js +33 -0
  51. package/dist/preview/{chunk.26SI4K3P.js → chunk.FOFLD64U.js} +1 -1
  52. package/dist/preview/{chunk.BYVE2NQY.js → chunk.FPASZ4RD.js} +1 -1
  53. package/dist/preview/{chunk.KR3J27IA.js → chunk.FTM64IDI.js} +1 -1
  54. package/dist/preview/chunk.GEPNIMXW.js +1 -0
  55. package/dist/preview/{chunk.25VAWLKJ.js → chunk.GER2XRD4.js} +1 -1
  56. package/dist/preview/chunk.GFLAGZSB.js +1 -0
  57. package/dist/preview/{chunk.JNCSGUO3.js → chunk.GIYFEGAP.js} +1 -1
  58. package/dist/preview/chunk.GVY5UQTJ.js +1 -0
  59. package/dist/preview/{chunk.DYW4D74X.js → chunk.H7KCWCB4.js} +1 -1
  60. package/dist/preview/{chunk.RSYFIL2Z.js → chunk.HDRD33II.js} +1 -1
  61. package/dist/preview/{chunk.3B47UX2J.js → chunk.HGTPTRMM.js} +1 -1
  62. package/dist/preview/chunk.HWCHFQ7O.js +6 -0
  63. package/dist/preview/{chunk.4ZHUGSJL.js → chunk.HZGVEHEN.js} +1 -1
  64. package/dist/preview/{chunk.I4HUBO22.js → chunk.ICCIZDTQ.js} +1 -1
  65. package/dist/preview/{chunk.YKN2VWWQ.js → chunk.ICGNIK3Z.js} +2 -2
  66. package/dist/preview/chunk.II7VTGNC.js +1 -0
  67. package/dist/preview/{chunk.R2B2ZAWI.js → chunk.IKX4VDTW.js} +1 -1
  68. package/dist/preview/chunk.IW7YFPGG.js +1 -0
  69. package/dist/preview/chunk.J7G3AATY.js +14 -0
  70. package/dist/preview/{chunk.DJ3BD7AZ.js → chunk.JBW3DI7E.js} +1 -1
  71. package/dist/preview/{chunk.6IEDQHKI.js → chunk.JDMXZFSG.js} +1 -1
  72. package/dist/preview/{chunk.4IDXQVSW.js → chunk.JHIUG25Q.js} +1 -1
  73. package/dist/preview/{chunk.OWL5GZ6U.js → chunk.JLEC3USG.js} +1 -1
  74. package/dist/preview/{chunk.ZRICIE6T.js → chunk.JLYNMAME.js} +1 -1
  75. package/dist/preview/{chunk.C5NOO4CC.js → chunk.JR7RDOEP.js} +1 -1
  76. package/dist/preview/{chunk.KWQ67UK2.js → chunk.JSSFA3FC.js} +1 -1
  77. package/dist/preview/chunk.K46YRA65.js +1 -0
  78. package/dist/preview/chunk.K6KMLD2B.js +21 -0
  79. package/dist/preview/{chunk.ONSG3OIL.js → chunk.KBHU54NM.js} +1 -1
  80. package/dist/preview/{chunk.6ROYIMQ2.js → chunk.KRGM25HF.js} +1 -1
  81. package/dist/preview/chunk.KUUDW7VR.js +1 -0
  82. package/dist/preview/{chunk.TMBFLZNH.js → chunk.KWQ7QOHD.js} +1 -1
  83. package/dist/preview/chunk.L24FCXZ7.js +1 -0
  84. package/dist/preview/{chunk.7TU2PDYW.js → chunk.L2PI7V4R.js} +1 -1
  85. package/dist/preview/{chunk.NH6D6TWY.js → chunk.L3FOLN3K.js} +1 -1
  86. package/dist/preview/{chunk.PWYMZWAN.js → chunk.L3FQZCWI.js} +1 -1
  87. package/dist/preview/{chunk.IJU322EP.js → chunk.LEO2KWLZ.js} +1 -1
  88. package/dist/preview/{chunk.3HLNRVFY.js → chunk.LNG3CQNI.js} +1 -1
  89. package/dist/preview/{chunk.27QYTMXP.js → chunk.LSLLKICK.js} +1 -1
  90. package/dist/preview/{chunk.QXTLZSBL.js → chunk.M5GJHVWZ.js} +1 -1
  91. package/dist/preview/{chunk.GZA5ZNLJ.js → chunk.MGWMGLWE.js} +1 -1
  92. package/dist/preview/{chunk.7MXQRSNR.js → chunk.NIVTK2W5.js} +1 -1
  93. package/dist/preview/chunk.NMIXBH37.js +1 -0
  94. package/dist/preview/{chunk.6PF5LWRK.js → chunk.OF34OZ4V.js} +1 -1
  95. package/dist/preview/chunk.OMZ3LDDN.js +1 -0
  96. package/dist/preview/{chunk.QWY54AVN.js → chunk.OYHQSXNC.js} +1 -1
  97. package/dist/preview/{chunk.BT6FUNQI.js → chunk.PKUDIWIF.js} +1 -1
  98. package/dist/preview/chunk.PRD3UNJX.js +7 -0
  99. package/dist/preview/{chunk.FKLEIR4Y.js → chunk.Q7RQC3F7.js} +1 -1
  100. package/dist/preview/{chunk.BYVLGDVJ.js → chunk.QGVLJTZS.js} +1 -1
  101. package/dist/preview/chunk.QPCSS322.js +1 -0
  102. package/dist/preview/{chunk.ZEC64CK6.js → chunk.R2AG4NHQ.js} +1 -1
  103. package/dist/preview/{chunk.7XCBIID7.js → chunk.RNEJYIQ7.js} +1 -1
  104. package/dist/preview/chunk.RPX35VYU.js +1 -0
  105. package/dist/preview/{chunk.CO2ZPX3D.js → chunk.RYRTKIKB.js} +2 -2
  106. package/dist/preview/chunk.S5MQVPLF.js +1 -0
  107. package/dist/preview/{chunk.Z56L6V6Z.js → chunk.S6WHA4CW.js} +1 -1
  108. package/dist/preview/{chunk.XBV4WO7D.js → chunk.SDU76JU6.js} +1 -1
  109. package/dist/preview/{chunk.GSZYT6GF.js → chunk.SGKPGVBB.js} +1 -1
  110. package/dist/preview/chunk.SZ34UAQ3.js +2 -0
  111. package/dist/preview/chunk.T7XH7FVJ.js +1 -0
  112. package/dist/preview/{chunk.MI2HL3LQ.js → chunk.TBQOSI4J.js} +1 -1
  113. package/dist/preview/{chunk.WWR7Y2KE.js → chunk.TBSNNOQU.js} +1 -1
  114. package/dist/preview/{chunk.CW6IPHRR.js → chunk.TOXWNEOQ.js} +2 -2
  115. package/dist/preview/{chunk.T4Q6OLZU.js → chunk.UHX4WTM7.js} +1 -1
  116. package/dist/preview/chunk.UJKT2G6M.js +5 -0
  117. package/dist/preview/{chunk.Q5XICUDZ.js → chunk.UKAPFIPJ.js} +1 -1
  118. package/dist/preview/{chunk.7ROWZZN5.js → chunk.UM7GWXEW.js} +1 -1
  119. package/dist/preview/{chunk.OH2N3SX7.js → chunk.UNCS63AM.js} +1 -1
  120. package/dist/preview/{chunk.PEXPTDX7.js → chunk.URXSZQSF.js} +1 -1
  121. package/dist/preview/{chunk.7IXLH7PR.js → chunk.UY7IOVR6.js} +1 -1
  122. package/dist/preview/{chunk.6XEATXZC.js → chunk.V5FIZIX2.js} +1 -1
  123. package/dist/preview/chunk.VC3BX2ZF.js +1 -0
  124. package/dist/preview/{chunk.FCPH4YZN.js → chunk.VSAPJAT3.js} +1 -1
  125. package/dist/preview/{chunk.MBOOUJOE.js → chunk.VW2VCPJX.js} +1 -1
  126. package/dist/preview/chunk.W2RCWPLK.js +1 -0
  127. package/dist/preview/{chunk.ZE4U4JBF.js → chunk.W44VRHKS.js} +2 -2
  128. package/dist/preview/{chunk.SGRKCQ2X.js → chunk.WAB7UDHU.js} +1 -1
  129. package/dist/preview/chunk.WBHM5I3I.js +1 -0
  130. package/dist/preview/chunk.WM2LWHTJ.js +1 -0
  131. package/dist/preview/{chunk.ZE6LJVVN.js → chunk.WPOTEXJZ.js} +1 -1
  132. package/dist/preview/{chunk.RPDTWQKA.js → chunk.WSTBCWW7.js} +3 -3
  133. package/dist/preview/{chunk.XFQUVMRI.js → chunk.XMCFZD3A.js} +1 -1
  134. package/dist/preview/chunk.XWAMQPUM.js +25 -0
  135. package/dist/preview/{chunk.IQ3LUSD6.js → chunk.XXEYRHRG.js} +1 -1
  136. package/dist/preview/{chunk.CTSPNTDX.js → chunk.Y5ARSVH4.js} +1 -1
  137. package/dist/preview/{chunk.DQR45N7V.js → chunk.Z6TMIAAB.js} +1 -1
  138. package/dist/preview/chunk.ZBR2QY67.js +104 -0
  139. package/dist/preview/chunk.ZEAH57AZ.js +1 -0
  140. package/dist/preview/{chunk.FLMNHV6A.js → chunk.ZJ2VS4M4.js} +1 -1
  141. package/dist/preview/chunk.ZTIF23VF.js +1 -0
  142. package/dist/preview/index.html +49 -45
  143. package/dist/preview/page.js +2 -34
  144. package/package.json +6 -6
  145. package/dist/preview/chunk.22E4GKYU.js +0 -1
  146. package/dist/preview/chunk.2JMJTREH.js +0 -1
  147. package/dist/preview/chunk.3JATXDSP.js +0 -1
  148. package/dist/preview/chunk.4C65DXZB.js +0 -1
  149. package/dist/preview/chunk.4HAGPMY6.js +0 -117
  150. package/dist/preview/chunk.4ZSHTUNK.js +0 -1
  151. package/dist/preview/chunk.5BJW4IPW.js +0 -1
  152. package/dist/preview/chunk.63DI7XNE.js +0 -21
  153. package/dist/preview/chunk.64MP7636.js +0 -1
  154. package/dist/preview/chunk.6K4JBLOP.js +0 -1
  155. package/dist/preview/chunk.7L6LYXCV.js +0 -25
  156. package/dist/preview/chunk.7MQ7UWVW.js +0 -5
  157. package/dist/preview/chunk.AXJJUCWT.js +0 -1
  158. package/dist/preview/chunk.CXJXVBGF.js +0 -1
  159. package/dist/preview/chunk.E5PHLNXR.js +0 -1
  160. package/dist/preview/chunk.EPPAFWP7.js +0 -5
  161. package/dist/preview/chunk.GAFYE37S.js +0 -3
  162. package/dist/preview/chunk.GNPYSMHA.js +0 -1
  163. package/dist/preview/chunk.HMABYAZR.js +0 -1
  164. package/dist/preview/chunk.IWUSCCZN.js +0 -1
  165. package/dist/preview/chunk.K6SPN4D6.js +0 -7
  166. package/dist/preview/chunk.KBMVUIWR.js +0 -6
  167. package/dist/preview/chunk.KG5R4GTK.js +0 -1
  168. package/dist/preview/chunk.LBIDNJ6G.js +0 -1
  169. package/dist/preview/chunk.MXU3VQSQ.js +0 -1
  170. package/dist/preview/chunk.NQTCOBOQ.js +0 -1
  171. package/dist/preview/chunk.O4X5WJIC.js +0 -1
  172. package/dist/preview/chunk.ORKXXLWD.js +0 -1
  173. package/dist/preview/chunk.OUN2H3TR.js +0 -1
  174. package/dist/preview/chunk.QJUFVEAU.js +0 -1
  175. package/dist/preview/chunk.RY4E4JRI.js +0 -1
  176. package/dist/preview/chunk.S6BZXNMV.js +0 -1
  177. package/dist/preview/chunk.U3ETEQDO.js +0 -1
  178. package/dist/preview/chunk.VCOIFBUE.js +0 -1
  179. package/dist/preview/chunk.VP35BUUZ.js +0 -349
  180. package/dist/preview/chunk.XVWJD2DG.js +0 -2
  181. package/dist/preview/chunk.YQDIVHCH.js +0 -1
  182. package/dist/preview/chunk.YWVOACSX.js +0 -5
  183. package/dist/preview/chunk.ZHRW2UF4.js +0 -1
  184. package/dist/preview/chunk.ZUJZVK2X.js +0 -1
@@ -1,6 +1,6 @@
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.
1
+ import{b as Dt,c as ae,d as kt,e as Ft}from"./chunk.K46YRA65.js";import{a as Ct,b as Ce,c as Lt}from"./chunk.UJKT2G6M.js";import{m as Pt}from"./chunk.DLFWBG33.js";import{g as gt}from"./chunk.2YABX3SC.js";import{a as mt}from"./chunk.V5FIZIX2.js";import{d as yt}from"./chunk.DX357TZ3.js";import{d as pt}from"./chunk.H7KCWCB4.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.6BJBPDF3.js";import{$ as ft,G as A,O as dt,R as Z}from"./chunk.XWAMQPUM.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.AS4CQBOQ.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 Pn(e,t,r){return it(e,t,r)}function Cn(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 Dn=Symbol("Uninstrumented");var kn=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"],Fn=new Set(qt),na=["GET",...qt],Tn=new Set(na);var Nn=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 Mn=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
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}
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",On=x[ka];var An=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 _n=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 ti(){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 ri(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)",si="var(--graview-font-display, var(--graview-font-body, system-ui))",Ze={maxWidth:760,margin:"0 auto",padding:"40px var(--graview-page-gutter, 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,ui={...Ze,maxWidth:et},Dr={margin:0,fontSize:"var(--graview-text-title)",lineHeight:1.2,letterSpacing:"-0.012em",overflowWrap:"anywhere",textWrap:"balance"},ci={margin:0,fontSize:"var(--graview-text-heading)",lineHeight:1.3,textWrap:"balance"},di={margin:0,fontSize:Qe,letterSpacing:"0.08em",textTransform:"uppercase",color:"var(--graview-ink-muted)"},fi={margin:0,fontSize:qe,color:"var(--graview-ink-muted)",maxWidth:"60ch"},kr={color:"var(--graview-ink-muted)",fontSize:Qe},hi={borderTop:"1px solid var(--graview-edge)",paddingTop:24},mi={color:"var(--graview-accent)",textDecorationColor:"color-mix(in srgb, currentColor 50%, transparent)",textDecorationThickness:1,textUnderlineOffset:"0.2em",display:"inline-flex",alignItems:"center",minHeight:24},pi={color:"inherit",textDecoration:"none",display:"inline-flex",alignItems:"center",minHeight:24},yi=`.graview-list{container-type:inline-size}
4
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
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
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}
@@ -18,9 +18,9 @@ Please change the parent <Route path="${f}"> to <Route path="${f==="/"?"*":`${f}
18
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
19
  .graview-group-toggle:focus-visible{outline:2px solid var(--graview-accent);outline-offset:2px}
20
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}
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)}}`,gi={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 vi({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 Ri(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 wi(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 Si(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 bi=(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),Ei=e=>{let t=new Set(e.views?.arrangement?.()?.hide??[]);return vn(e).filter(r=>!t.has(r))},xi=e=>e.charAt(0).toUpperCase()+e.slice(1);var C=D(Z(),1);function Ai({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)(bn,{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]):not([tabindex='-1'])")??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 _i({context:e,style:t,children:r,...a}){let n=e.embedded||e.framed?"section":"main";return(0,C.jsx)(n,{style:{...Ze,...t},"data-graview-page-main":"",...a,children:r})}function $i({when:e,children:t}){return e?(0,C.jsxs)("div",{"data-graview-bleed":"",style:{display:"grid",minWidth:0},children:[(0,C.jsx)("style",{children:Sn}),t]}):(0,C.jsx)(C.Fragment,{children:t})}var Sn="@media (max-width:680px){[data-graview-bleed]{margin-inline:min(0px,calc(env(safe-area-inset-left,0px) - var(--graview-page-gutter,20px))) min(0px,calc(env(safe-area-inset-right,0px) - var(--graview-page-gutter,20px)))}}";function Ii({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 bn({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:En})]})}var En=`:where(.graview-find){display:flex;min-width:0;flex:1 1 auto}
22
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};
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,Pn as c,Cn as d,Qe as e,si as f,ui as g,ci as h,di as i,fi as j,kr as k,hi as l,mi as m,pi as n,yi as o,gi as p,vi as q,Ri as r,wi as s,Si as t,bi as u,gn as v,vn as w,Ei as x,xi 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,ti as N,ri as O,Ai as P,Rn as Q,_i as R,$i as S,Ii as T,bn as U};
24
24
  /*! Bundled license information:
25
25
 
26
26
  react-router/dist/development/chunk-BV7QT456.mjs:
@@ -1 +1 @@
1
- import{a as ot}from"./chunk.6PF5LWRK.js";import"./chunk.BT6FUNQI.js";import{e as V,l as ue,m as G,q as st}from"./chunk.MBOOUJOE.js";import{a as ee}from"./chunk.G4JJXA63.js";import"./chunk.64MP7636.js";import{b as nt}from"./chunk.RY4E4JRI.js";import{d as tt}from"./chunk.SGRKCQ2X.js";import"./chunk.KG5R4GTK.js";import"./chunk.FKLEIR4Y.js";import"./chunk.RSYFIL2Z.js";import{d as et}from"./chunk.R7F6UJVG.js";import{c as Ze}from"./chunk.DYW4D74X.js";import{I as ze,V as Je,Xc as Ne,Yc as Xe,ca as Ye,ga as qe,gb as Ve,hb as Qe,ka as Ae,la as F}from"./chunk.7MQ7UWVW.js";import"./chunk.2AZTW66C.js";import"./chunk.AJZBJBMO.js";var At="Nothing by that name here.",$=o=>o.normalize("NFD").replace(/\p{M}+/gu,"").toLowerCase().replace(/[’']/g,"'").replace(/[^\p{L}\p{N}' ]+/gu," ").replace(/\s+/g," ").trim(),Nt=/^(?:(?:can you |could you |please )?(?:go|take me|bring me|head|jump|navigate|switch|get me)(?: back)? to|(?:please )?(?:open|show(?: me)?|bring up|let me see|view)) (.+)$/,St=/^(?:(?:can you |could you |please )?tell me (?:about|of)|what(?: is|'s| are) (?:in |on )?|describe|explain|who(?: is|'s)) (.+)$/,Ot=/^(?:what(?: is|'s| am i looking at| do i see)(?: (?:here|this|on (?:this|the) (?:page|screen)|in view|this place|this page))?|where am i|describe (?:this|here|this place|this page)|tell me about (?:this|here|this place|this page))$/,rt=new Set(["here","this","this place","this page","on this page","on the page","on this screen","in view"]),Ct=/^(?:date|day|when|on|at|the date|the day)$/,jt=/^(?:what(?: is|'s) (?:wrong|broken|the (?:problem|matter|trouble))|what needs (?:fixing|attention|doing)|any (?:problems|issues|trouble)|(?:show(?: me)? |go to |open )?(?:the )?(?:problems|issues|trouble|standing|what's wrong)|is (?:anything|something) (?:wrong|broken)|are there (?:any )?(?:problems|issues))(?: (?:with|about|on|in) (.+))?$/,z=o=>o.replace(/^(?:the|a|an|my|our) /,""),te=new Set(["the","a","an","my","our","all","any","of","that","which","who","are","is","be","what","whats","what's","with","me","show","list","every","there","do","i","have","we","due","for","please","were","was","by","from","in","on"]),ft=864e5,he=o=>Date.UTC(Number(o.slice(0,4)),Number(o.slice(5,7))-1,Number(o.slice(8,10))),xe=o=>new Date(o).toISOString().slice(0,10),C=(o,i)=>xe(he(o)+i*ft),xt=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],Mt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Wt="(monday|tuesday|tues|wednesday|thursday|thurs|friday|saturday|sunday)",it="(january|february|march|april|may|june|july|august|september|october|november|december|jan|feb|mar|apr|jun|jul|aug|sept|sep|oct|nov|dec)",at="(\\d{1,2})(?:st|nd|rd|th)?",Dt=o=>xt.findIndex(i=>i.startsWith(o.slice(0,3))),dt=o=>Mt.findIndex(i=>o.startsWith(i.toLowerCase()));function Rt(o,i){return Je(o,{year:o.slice(0,4)!==i.slice(0,4)})}function Se(o,i,y){if(o<0||i<1||i>31)return;let f=Number(y.slice(0,4)),c=k=>{let j=Date.UTC(k,o,i);return new Date(j).getUTCMonth()===o?xe(j):void 0},p=c(f);if(p)return he(p)<he(y)-183*ft?c(f+1):p}function Oe(o,i,y){let f=new Date(he(i)).getUTCDay(),c=u=>{let S=(f-y+7)%7,w=C(i,-S+u*7);return{from:w,to:C(w,6)}},p=()=>{let u=`${i.slice(0,8)}01`,S=new Date(Date.UTC(Number(i.slice(0,4)),Number(i.slice(5,7)),1));return{from:u,to:C(xe(S.getTime()),-1)}},k=u=>u?{from:u,to:u,day:Rt(u,i)}:void 0,j=(u,S)=>{let w=Dt(S);return k(u==="this"||u==="next"?C(c(u==="next"?1:0).from,(w-y+7)%7):u==="last"?C(i,-((f-w+6)%7+1)):C(i,(w-f+7)%7))},J=u=>{let S=C(i,f===0?-1:6-f);return{from:C(S,u*7),to:C(S,u*7+1)}},B="\\b(?:(?:due |for |on |by )(?:the )?)?",P=[[/\b(?:overdue|past due|late)\b/,()=>({overdue:!0,to:C(i,-1)})],[/\b(?:due |for |on )?today\b/,()=>({from:i,to:i})],[/\b(?:due |for |on )?tomorrow\b/,()=>k(C(i,1))],[/\b(?:due |for |on )?yesterday\b/,()=>k(C(i,-1))],[/\b(?:due |for |on )?this week\b/,()=>c(0)],[/\b(?:due |for |on )?next week\b/,()=>c(1)],[/\b(?:due |for |on )?(?:last|previous) week\b/,()=>c(-1)],[/\b(?:due |for |on )?next weekend\b/,()=>J(1)],[/\b(?:due |for |on )?(?:this |the )?weekend\b/,()=>J(0)],[/\b(?:due |for |on )?this month\b/,()=>p()],[new RegExp(`${B}(\\d{4}) (\\d{2}) (\\d{2})\\b`),u=>k(Se(Number(u[2])-1,Number(u[3]),`${u[1]}-01-01`))],[new RegExp(`${B}${at} (?:of )?${it}\\b`),u=>k(Se(dt(u[2]),Number(u[1]),i))],[new RegExp(`${B}${it} (?:the )?${at}\\b`),u=>k(Se(dt(u[1]),Number(u[2]),i))],[new RegExp(`${B}(?:(this|next|last|coming) )?${Wt}\\b`),u=>j(u[1],u[2])]];for(let[u,S]of P){let w=o.match(u);if(!w)continue;let N=S(w);if(N)return{ask:{words:w[0],...N},rest:o.replace(w[0]," ").replace(/\s+/g," ").trim()}}}function ht(o,i,y={}){let f=y.principal??{kind:"human"},c=o.seenBy(f),p=c.schema,k=y.today??o.today?.()??ze(),j=y.weekStartsOn??1,J=o.kindsKeptFrom(f),B=o.modules.disabledKinds,P=p.kinds.filter(e=>!J.has(e)&&!B.has(e)),u=new Set(P),S=(y.places??[]).filter(e=>e.kind===null||u.has(e.kind)),w=c.graph,N=$(i).replace(/[?.!]+$/,"").trim();if(N.length===0)return{unresolved:!0};let M=e=>p.tryDefinition(e),H=e=>Ye(M(e.kind),e),I=e=>qe(p,e),se=e=>S.find(t=>t.kind===e&&t.address===Ne(p,e))?.address??Ne(p,e),ge=e=>Xe(p,e.kind,e.id),Me=e=>({to:"record",id:e.id,kind:e.kind,label:H(e),address:ge(e),said:`Went to ${H(e)}.`}),We=e=>{let t=`Went to ${e.title}.`;return e.kind===null?{to:"place",slug:e.slug,title:e.title,address:e.address,...e.slug==="overview"?{face:"scene"}:{},said:t}:e.lens||e.address.startsWith("/places/")?{to:"picture",kind:e.kind,as:e.slug,title:e.title,address:e.address,said:t}:{to:"kind",kind:e.kind,title:e.title,address:e.address,said:t}},De=()=>({unresolved:!0,say:At}),oe=e=>{let t=M(e.kind),s=et(e,t,{limit:3,excerpt:!0}).map(r=>r.alone.startsWith(r.label)?r.alone:`${r.label.toLowerCase()} ${r.alone}`).join(", "),n=c.violations().filter(r=>r.nodeIds.includes(e.id));return[`${H(e)} \u2014 ${Ae(F(t,e.kind))}${s?` (${s})`:""}.`,n.length>0?`Trouble: ${n.map(r=>r.message).join("; ")}.`:""].filter(Boolean).join(" ")},re=e=>{let t=new Set([G(e),G(z(e))]);for(let n of[" page"," view"," lens"," place"," picture"," list"])e.endsWith(n)&&(t.add(G(e.slice(0,-n.length))),t.add(G(z(e.slice(0,-n.length)))));t.delete("");let s=n=>t.has(G(n.title))||t.has(G(z($(n.title))))||t.has(G(n.slug));return S.find(n=>n.kind!==null&&n.address.startsWith("/places/")&&s(n))??S.find(s)},pe=e=>{let t=st(o,e,{principal:f,today:k,limit:6,near:!1,...y.selection?{from:y.selection}:{}}),s=t.hits.filter(r=>r.about==="node"&&u.has(r.kind)&&w.getNode(r.id)!==void 0),n=s.filter(r=>r.why.field==="label"&&r.why.strength==="exact");return n.length===1?{one:w.getNode(n[0].id),picks:s}:n.length>1?{picks:n}:s.length===1&&t.total===1?{one:w.getNode(s[0].id),picks:s}:{picks:s}},Re=e=>{let t=e.map(s=>`${s.label} (${F(M(s.kind),s.kind)})`);return`${e.length===1?"One thing matches":`${e.length} things match`}: ${t.join("; ")}.`},Ee=(e,t)=>{if(rt.has(e))return Le();let s=t?pe(z(e)||e):void 0,n=s?.one&&$(H(s.one))===$(z(e)||e)?void 0:re(e);if(n){let l=We(n);return{about:"place",say:t?`${l.said} ${me(n)}`:l.said,moves:[l],subject:n.slug}}let r=pe(z(e)||e);if(r.one){let l=Me(r.one);return{about:t?"describe":"record",say:t?`${l.said} ${oe(r.one)}`:l.said,moves:[l],subject:r.one.id}}if(r.picks.length>0)return{about:"picks",say:Re(r.picks),moves:[],picks:r.picks};let h=ae(e);if(h)return h;let d=Pe(e);if(d){if(d.rest.split(" ").every(l=>l===""||te.has(l))){let l=I(d.kind),v={to:"kind",kind:d.kind,title:l,address:se(d.kind),said:`Went to the ${l.toLowerCase()}.`};return{about:"kind",say:v.said,moves:[v]}}return{unresolved:!0}}return De()},me=e=>{if(e.kind===null){let h=P.map(l=>({kind:l,count:w.nodesOfKind(l).length})).filter(l=>l.count>0).map(l=>`${l.count} ${(l.count===1?F(M(l.kind),l.kind):I(l.kind)).toLowerCase()}`),d=c.violations().length;return[h.length>0?`It holds ${fe(h)}.`:"It holds nothing yet.",d>0?`${d===1?"One problem":`${d} problems`} to see to.`:""].filter(Boolean).join(" ")}let t=w.nodesOfKind(e.kind).length,s=I(e.kind).toLowerCase(),n=new Set(c.violations().flatMap(h=>h.nodeIds)),r=w.nodesOfKind(e.kind).filter(h=>n.has(h.id)).length;return[e.lens?`It draws the ${s} as ${Ae(e.lens)}${t>0?` \u2014 ${t} of them`:""}.`:`${t===0?"No":t} ${t===1?F(M(e.kind),e.kind):s} ${t===1?"is":"are"} here.`,r>0?`${r} ${r===1?"has":"have"} a problem.`:""].filter(Boolean).join(" ")},Le=()=>{let e=(y.selection??[]).map(s=>w.getNode(s)).find(s=>s!==void 0);if(e)return{about:"here",say:oe(e),moves:[],subject:e.id};let t=S.find(s=>s.slug===y.place)??S.find(s=>s.slug==="home");return t?{about:"here",say:`${t.title}. ${me(t)}`,moves:[],subject:t.slug}:{about:"here",say:me({slug:"home",title:"Home",kind:null,cardinality:"many",address:"/",stop:"#"}),moves:[]}},Pe=e=>{let t=P.flatMap(s=>[I(s),F(M(s),s),s].map(n=>({kind:s,name:$(n)}))).filter(s=>s.name.length>0).sort((s,n)=>n.name.length-s.name.length);for(let{kind:s,name:n}of t)if(!(` ${e} `.indexOf(` ${n} `)<0))return{kind:s,rest:` ${e} `.replace(` ${n} `," ").replace(/\s+/g," ").trim()}},ie=(e,t)=>{let s=V(p,e).filters.filter(d=>d.about==="field"&&d.type==="date");if(s.length===0)return;let n=s.find(d=>t.some(l=>$(d.key)===l||$(d.label)===l));if(n)return n;let r=M(e)?.fieldRoles??{};for(let d of["due","deadline","date","when","start","end"]){let l=r[d],v=l?s.find(x=>x.key===l):void 0;if(v)return v}return s.find(d=>["due","deadline","date","when","on","at"].includes(d.key.toLowerCase()))??(s.length===1?s[0]:void 0)},He=e=>{let t=M(e),s=V(p,e).filters;if(t?.lifecycle)return{conditions:[{key:"is",value:"current"}],holds:d=>ue(be,d,{key:"is",value:"current"})};let r=s.find(d=>d.about==="field"&&d.type==="boolean"&&ne.has($(d.key)));if(r)return{conditions:[{key:r.key,value:"false"}],holds:d=>d[r.key]!==!0};let h=s.find(d=>d.about==="field"&&d.type==="choice"&&(d.options??[]).some(l=>ne.has($(l))));if(h){let d=new Set((h.options??[]).filter(v=>ne.has($(v)))),l=(h.options??[]).filter(v=>!d.has(v));return l.length===1?{conditions:[{key:h.key,value:l[0]}],holds:v=>v[h.key]===l[0]}:"unsayable"}return{conditions:[],holds:()=>!0}},Ie=(e,t)=>{let s=e.words.startsWith("due")||$(t.key)==="due",n=Ct.test($(t.label));if(e.day)return s?`due ${e.day}`:n?`on ${e.day}`:`${t.label.toLowerCase()} on ${e.day}`;let r=e.words.replace(/^(?:due|for|on|by) (?:the )?/,"");return s?`due ${r}`:n?r:`${t.label.toLowerCase()} ${r}`},ye=new Set(c.violations().flatMap(e=>e.nodeIds)),be={schema:p,graph:c.graph,flagged:ye,today:k},ae=e=>{let t=Oe(e,k,j),s=Pe(t?.rest??e),n=s?.kind,r=(s?.rest??t?.rest??e).split(" ").filter(Boolean);if(!n&&t){let g=e.split(" "),m=P.filter(L=>ie(L,g)!==void 0),E=m.filter(L=>{let b=ie(L,g);return g.some(O=>$(b.key)===O||$(b.label)===O)}),U=m.length===1?m:E;if(U.length!==1)return;n=U[0]}if(!n)return;let h=V(p,n).filters,d=[],l=[],v=[],x=[],q=!1,de=[];for(let g=0;g<r.length;g++){let m=r[g],E=g>0&&(r[g-1]==="not"||r[g-1]==="un"),U=h.find(b=>b.about==="field"&&b.type==="choice"&&(b.options??[]).some(O=>$(O)===m));if(U&&!E){let b=(U.options??[]).find(O=>$(O)===m);d.push({key:U.key,value:b}),l.push(b);continue}let L=h.find(b=>b.about==="field"&&b.type==="boolean"&&[$(b.key),$(b.label)].some(O=>O===m||O===m.replace(/^un/,"")));if(L){let b=!E&&!(m.startsWith("un")&&!$(L.key).startsWith("un"));d.push({key:L.key,value:String(b)}),l.push(b?m:`not ${m.replace(/^un/,"")}`);continue}if(Pt.has(m)&&!E){let b=He(n);b==="unsayable"?(q=!0,x.push(O=>!ut(p,O))):(d.push(...b.conditions),x.push(b.holds)),l.push(m);continue}m==="not"||m==="un"||t&&h.some(b=>b.type==="date"&&($(b.key)===m||$(b.label)===m))||de.push(m)}if(r=de,r.some(g=>!te.has(g))||!t&&d.length===0&&x.length===0)return;let T=I(n).toLowerCase(),Q=I(n);if(t){let g=ie(n,e.split(" "));if(!g){let m={to:"kind",kind:n,title:Q,address:se(n),said:`Went to the ${T}.`};return{about:"kind",say:`${ee(Q)} carry no date, so I can't tell which are ${/^(?:due|for|on|overdue|past due|late)\b/.test(t.ask.words)?t.ask.words:`due ${t.ask.words}`}. ${m.said}`,moves:[m]}}if(t.ask.from&&d.push({key:g.key,value:`after:${C(t.ask.from,-1)}`}),t.ask.to&&d.push({key:g.key,value:`before:${C(t.ask.to,1)}`}),t.ask.overdue){let m=He(n);m==="unsayable"?(q=!0,x.push(E=>!ut(p,E))):(d.push(...m.conditions),x.push(m.holds))}t.ask.overdue?l.push("overdue"):v.push(Ie(t.ask,g))}let R=w.nodesOfKind(n).filter(g=>d.every(m=>ue(be,g,m))&&x.every(m=>m(g))),K=[...l,...v].join(" and "),Y=[...l,T,...v].join(" "),W=R.slice(0,6).map(g=>({about:"node",id:g.id,kind:n,label:H(g),why:{field:d[0]?.key??"label",reading:d[0]?.key??"Name",fragment:K,strength:"field"},current:!0,flagged:ye.has(g.id),address:ge(g)})),X=R.length===0?`No ${T} are ${K}.`:`${R.length===1?`One ${F(M(n),n)} is`:`${R.length} ${T} are`} ${K}: ${fe(R.slice(0,6).map(H))}${R.length>6?`, and ${R.length-6} more`:""}.`;if(q)return{about:"kind",say:X,moves:[],picks:W,offer:{draft:Y,label:"Show as a view"}};let Z=d.map(g=>`${g.key}:${g.value}`).join(","),we=`${se(n)}?${new URLSearchParams({filter:Z}).toString()}`,_={to:"kind",kind:n,title:ee(Y),filter:Z,address:we,said:`Went to the ${Y}.`};return{about:"kind",say:`${_.said} ${X}`,moves:[_],picks:W}},Te=e=>M(e)?.figure==="person"?!0:[e,F(M(e),e),I(e)].some(s=>$(s).split(" ").some(n=>Et.has(n))),pt=e=>{let t=[],s=n=>M(n)?.edges??{};for(let[n,r]of Object.entries(s(e)))for(let h of r.to??[])u.has(h)&&t.push({key:n,direction:"out",far:h,words:ct(`${r.description??""} ${n}`)});for(let n of P)for(let[r,h]of Object.entries(s(n)))(h.to??[]).includes(e)&&t.push({key:r,direction:"in",far:n,words:ct(`${h.inverse??""} ${r}`)});return t},mt=e=>{let t=e.match(/^(who|which|what)\b/)?.[1];if(!t)return;let s=Oe(e,k,j);if(!s||s.ask.overdue)return;let n=s.rest.split(" ").filter(Boolean),r=P.flatMap(a=>[I(a),F(M(a),a),a].map(A=>({kind:a,name:$(A)}))).filter(a=>a.name.length>0).sort((a,A)=>A.name.length-a.name.length),h=` ${n.join(" ")} `,d=[];for(let{kind:a,name:A}of r)h.includes(` ${A} `)&&(h=h.replace(` ${A} `," "),d.includes(a)||d.push(a));let l=h.match(/\b(?:is|are|was|were)\b|'s\b/)?.[0],v=h.replace(/'s\b/g," ").split(" ").filter(a=>a.length>0&&!te.has(a)&&!Ce.has(a)),x=t==="who"?d.find(Te):d[0];if(!x&&t!=="who")return;let q=d.find(a=>a!==x),de=v.flatMap(a=>[je(a),...lt.has(je(a))?[...lt]:[]]),T=P.filter(a=>q?a===q:a!==x).flatMap(a=>{let A=ie(a,e.split(" "))??V(p,a).filters.find(D=>D.about==="field"&&D.type==="date");return A?pt(a).filter(D=>(x?D.far===x:Te(D.far))&&D.far!==a).map(D=>({kind:a,field:A,relation:D,said:v.length===0||de.some(ve=>D.words.some(vt=>Lt(vt,ve)))})):[]}).filter(a=>a.said);if(T.length===0)return;let Q=T.filter(a=>n.some(A=>$(a.field.key)===A||$(a.field.label)===A)),R=T.length===1?T[0]:Q.length===1?Q[0]:void 0;if(!R)return;let{kind:K,field:Y,relation:W}=R,X=[...s.ask.from?[{key:Y.key,value:`after:${C(s.ask.from,-1)}`}]:[],...s.ask.to?[{key:Y.key,value:`before:${C(s.ask.to,1)}`}]:[]],Z=w.nodesOfKind(K).filter(a=>X.every(A=>ue(be,a,A))),we=a=>(W.direction==="out"?c.graph.out(a.id,W.key):c.graph.in(a.id,W.key)).filter(A=>A.kind===W.far&&u.has(W.far)),_=[],g=[];for(let a of Z){let A=we(a);A.length===0&&g.push(a);for(let D of A)_.some(ve=>ve.id===D.id)||_.push(D)}let m=Ie(s.ask,Y),E=s.ask.day?`On ${s.ask.day}`:ee(s.ask.words.replace(/^(?:due|for|on|by) (?:the )?/,"")),U=I(K).toLowerCase(),L=X.map(a=>`${a.key}:${a.value}`).join(","),b=`${U} ${m}`,O={to:"kind",kind:K,title:ee(b),filter:L,address:`${se(K)}?${new URLSearchParams({filter:L}).toString()}`,said:`Went to the ${b}.`};if(Z.length===0)return{about:"related",say:`No ${b}. ${O.said}`,moves:[O]};let le=v.join(" "),yt=l==="was"||l==="were",Ge=a=>yt?a===1?"was":"were":a===1?"is":"are",ce=_.map(H),bt=ce.length>8?[...ce.slice(0,8),`${ce.length-8} more`]:ce,kt=_.length===0?`${E}: nobody ${Ge(1)}${le?` ${le}`:""}.`:`${E}: ${fe(bt)}${le?` ${Ge(_.length)} ${le}`:""}.`,$t=t==="who"&&g.length>0?`${fe(g.slice(0,4).map(H))}${g.length>4?` and ${g.length-4} more`:""} ${g.length===1?"has":"have"} nobody.`:"",wt=_.slice(0,8).map(a=>({about:"node",id:a.id,kind:a.kind,label:H(a),why:{field:W.key,reading:Ze(p,W.direction==="out"?K:W.far,W.key,W.direction==="out"?"out":"in"),fragment:m,strength:"field"},current:!0,flagged:ye.has(a.id),address:ge(a)}));return{about:"related",say:[kt,$t,O.said].filter(Boolean).join(" "),moves:[O],picks:wt}},Ke=N.match(jt);if(Ke){let e=Ke[1];if(e&&!rt.has(e)&&!/^(?:it|this|that)$/.test(e)){let n=re(e),r=n?void 0:pe(z(e)||e);if(r?.one){let h=Me(r.one);return{about:"describe",say:`${h.said} ${oe(r.one)}`,moves:[h],subject:r.one.id}}if(!n)return r&&r.picks.length>0?{about:"picks",say:Re(r.picks),moves:[],picks:r.picks}:De()}if(e&&/^(?:it|this|that)$|^(?:here|this place|this page)$/.test(e)){let n=(y.selection??[]).map(r=>w.getNode(r)).find(r=>r!==void 0);if(n)return{about:"describe",say:oe(n),moves:[],subject:n.id}}let t=c.violations();if(t.length===0)return{about:"problems",say:"Nothing is wrong \u2014 every rule holds.",moves:[]};let s={to:"problems",address:"/problems",said:"Went to the problems."};return{about:"problems",say:`${s.said} ${Qe(t)}: ${t.slice(0,4).map(n=>n.message).join("; ")}${t.length>4?"\u2026":"."}`,moves:[s]}}if(Ot.test(N))return Le();let _e=mt(N);if(_e)return _e;let ke=Oe(N,k,j);if(ke&&!re(z(ke.ask.words))&&ke.rest.replace(/'s\b/g,"").split(" ").every(e=>e===""||te.has(e)||Ce.has(e))){let e=ae(N);if(e)return e}if(/^open /.test(N)){let e=ae(N);if(e)return e}let Fe=N.match(Nt)??N.match(/^(?:go|take me|head|get me)(?: back)? (home)$/);if(Fe)return Ee(Fe[1].trim(),!1);let Be=N.match(St);if(Be){let e=Ee(Be[1].trim(),!0);return"unresolved"in e&&e.unresolved&&!/^tell me|^describe/.test(N)?{unresolved:!0}:e}let $e=re(N);if($e){let e=We($e);return{about:"place",say:e.said,moves:[e],subject:$e.slug}}let Ue=ae(N);return Ue||{unresolved:!0}}var Ce=new Set(["who","whom","whose","which","what","whats","what's","who's"]),Et=new Set(["person","people","user","users","member","members","volunteer","volunteers","gardener","gardeners","player","players","staff","worker","workers","employee","employees","owner","owners","assignee","assignees","helper","helpers","student","students","teacher","teachers","customer","customers","client","clients","contact","contacts","author","authors"]),lt=new Set(["work","cover","staff","assign","do","run","schedul","roster","book","duty","serv","help"]);function je(o){let i=o.toLowerCase().replace(/'s$/,"");for(let y of["ing","ed","es","s"])if(i.length>y.length+2&&i.endsWith(y)){let f=i.slice(0,-y.length);return f.length>3&&f[f.length-1]===f[f.length-2]?f.slice(0,-1):f}return i}function ct(o){return o.toLowerCase().split(/[^a-z']+/).filter(i=>i.length>1&&!te.has(i)&&!Ce.has(i)&&!["it","they","them","their","its","this","here","to","at"].includes(i)).map(je)}var Lt=(o,i)=>o===i||o.length>=4&&i.length>=4&&(o.startsWith(i)||i.startsWith(o)),ne=new Set(["done","finished","complete","completed","closed","resolved","agreed","canceled","archived","shipped","delivered"]),Pt=new Set(["open","unfinished","outstanding","pending","remaining","undone","incomplete"]);function ut(o,i){return V(o,i.kind).filters.some(f=>f.about==="field"&&(f.type==="boolean"&&ne.has(f.key.toLowerCase())&&i[f.key]===!0||f.type==="choice"&&typeof i[f.key]=="string"&&ne.has(String(i[f.key]).toLowerCase())))}function fe(o){return o.length<=1?o[0]??"":`${o.slice(0,-1).join(", ")} and ${o[o.length-1]}`}function zt(o,i,y={}){let f=y.scene!==void 0?{...y.pages,scene:y.scene}:y.pages;return[...nt(o,i,f?{pages:f}:{})].map(({first:c,hidden:p,lens:k,...j})=>j)}function gt(o,i){return{...o.principal?{principal:o.principal}:{},...o.places?{places:o.places}:{},...o.selection?{selection:o.selection}:{},...o.place?{place:o.place}:{},...i??o.today?{today:i??o.today}:{},...o.weekStartsOn!==void 0?{weekStartsOn:o.weekStartsOn}:{}}}function Jt(o,i,y,f){let c=ht(o,i,gt(y,f));if(c.unresolved)return c.say?{reply:{say:c.say,proposals:[],grounded:!0}}:{};if(c.about==="picks")return{};let p=c.moves.length>0?{moves:c.moves}:{},k=c.subject?o.graph.getNode(c.subject):void 0;if(c.about==="problems")return{...p,problems:!0};if(k&&(c.about==="describe"||c.about==="here"))return{...p,told:k.id};let j=k?tt(o,ot(Ve(o.violations(),[k.id])).slice(0,3)):[];return{reply:{say:c.say,proposals:j,grounded:!0,...p,...c.picks&&c.picks.length>0?{picks:c.picks}:{},...c.offer?{offer:c.offer}:{}}}}function Yt(o,i,y={}){let f=gt(y),c=[];for(let p of i){let k=typeof p=="string"?p:typeof p=="object"&&p!==null&&typeof p.to=="string"?p.to:void 0;if(!k||k.trim().length===0)continue;let j=ht(o,/^(?:go|take me|open|show)\b/i.test(k.trim())?k:`go to ${k}`,f);if("moves"in j)for(let J of j.moves)c.some(B=>B.address===J.address)||c.push(J)}return c}export{At as NOTHING_BY_THAT_NAME,gt as askContextOf,Jt as goingFrom,Yt as movesFromNames,zt as placesFromViews,ht as resolveAsk};
1
+ import{a as ot}from"./chunk.OF34OZ4V.js";import"./chunk.PKUDIWIF.js";import{e as V,l as ue,m as G,q as st}from"./chunk.VW2VCPJX.js";import{a as ee}from"./chunk.G4JJXA63.js";import"./chunk.WBHM5I3I.js";import{b as nt}from"./chunk.VC3BX2ZF.js";import{d as tt}from"./chunk.WAB7UDHU.js";import"./chunk.IW7YFPGG.js";import"./chunk.Q7RQC3F7.js";import"./chunk.HDRD33II.js";import{d as et}from"./chunk.DX357TZ3.js";import{c as Ze}from"./chunk.H7KCWCB4.js";import{I as ze,V as Je,Xc as Ne,Yc as Xe,ca as Ye,ga as qe,gb as Ve,hb as Qe,ka as Ae,la as F}from"./chunk.AS4CQBOQ.js";import"./chunk.2AZTW66C.js";import"./chunk.AJZBJBMO.js";var At="Nothing by that name here.",$=o=>o.normalize("NFD").replace(/\p{M}+/gu,"").toLowerCase().replace(/[’']/g,"'").replace(/[^\p{L}\p{N}' ]+/gu," ").replace(/\s+/g," ").trim(),Nt=/^(?:(?:can you |could you |please )?(?:go|take me|bring me|head|jump|navigate|switch|get me)(?: back)? to|(?:please )?(?:open|show(?: me)?|bring up|let me see|view)) (.+)$/,St=/^(?:(?:can you |could you |please )?tell me (?:about|of)|what(?: is|'s| are) (?:in |on )?|describe|explain|who(?: is|'s)) (.+)$/,Ot=/^(?:what(?: is|'s| am i looking at| do i see)(?: (?:here|this|on (?:this|the) (?:page|screen)|in view|this place|this page))?|where am i|describe (?:this|here|this place|this page)|tell me about (?:this|here|this place|this page))$/,rt=new Set(["here","this","this place","this page","on this page","on the page","on this screen","in view"]),Ct=/^(?:date|day|when|on|at|the date|the day)$/,jt=/^(?:what(?: is|'s) (?:wrong|broken|the (?:problem|matter|trouble))|what needs (?:fixing|attention|doing)|any (?:problems|issues|trouble)|(?:show(?: me)? |go to |open )?(?:the )?(?:problems|issues|trouble|standing|what's wrong)|is (?:anything|something) (?:wrong|broken)|are there (?:any )?(?:problems|issues))(?: (?:with|about|on|in) (.+))?$/,z=o=>o.replace(/^(?:the|a|an|my|our) /,""),te=new Set(["the","a","an","my","our","all","any","of","that","which","who","are","is","be","what","whats","what's","with","me","show","list","every","there","do","i","have","we","due","for","please","were","was","by","from","in","on"]),ft=864e5,he=o=>Date.UTC(Number(o.slice(0,4)),Number(o.slice(5,7))-1,Number(o.slice(8,10))),xe=o=>new Date(o).toISOString().slice(0,10),C=(o,i)=>xe(he(o)+i*ft),xt=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],Mt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Wt="(monday|tuesday|tues|wednesday|thursday|thurs|friday|saturday|sunday)",it="(january|february|march|april|may|june|july|august|september|october|november|december|jan|feb|mar|apr|jun|jul|aug|sept|sep|oct|nov|dec)",at="(\\d{1,2})(?:st|nd|rd|th)?",Dt=o=>xt.findIndex(i=>i.startsWith(o.slice(0,3))),dt=o=>Mt.findIndex(i=>o.startsWith(i.toLowerCase()));function Rt(o,i){return Je(o,{year:o.slice(0,4)!==i.slice(0,4)})}function Se(o,i,y){if(o<0||i<1||i>31)return;let f=Number(y.slice(0,4)),c=k=>{let j=Date.UTC(k,o,i);return new Date(j).getUTCMonth()===o?xe(j):void 0},p=c(f);if(p)return he(p)<he(y)-183*ft?c(f+1):p}function Oe(o,i,y){let f=new Date(he(i)).getUTCDay(),c=u=>{let S=(f-y+7)%7,w=C(i,-S+u*7);return{from:w,to:C(w,6)}},p=()=>{let u=`${i.slice(0,8)}01`,S=new Date(Date.UTC(Number(i.slice(0,4)),Number(i.slice(5,7)),1));return{from:u,to:C(xe(S.getTime()),-1)}},k=u=>u?{from:u,to:u,day:Rt(u,i)}:void 0,j=(u,S)=>{let w=Dt(S);return k(u==="this"||u==="next"?C(c(u==="next"?1:0).from,(w-y+7)%7):u==="last"?C(i,-((f-w+6)%7+1)):C(i,(w-f+7)%7))},J=u=>{let S=C(i,f===0?-1:6-f);return{from:C(S,u*7),to:C(S,u*7+1)}},B="\\b(?:(?:due |for |on |by )(?:the )?)?",P=[[/\b(?:overdue|past due|late)\b/,()=>({overdue:!0,to:C(i,-1)})],[/\b(?:due |for |on )?today\b/,()=>({from:i,to:i})],[/\b(?:due |for |on )?tomorrow\b/,()=>k(C(i,1))],[/\b(?:due |for |on )?yesterday\b/,()=>k(C(i,-1))],[/\b(?:due |for |on )?this week\b/,()=>c(0)],[/\b(?:due |for |on )?next week\b/,()=>c(1)],[/\b(?:due |for |on )?(?:last|previous) week\b/,()=>c(-1)],[/\b(?:due |for |on )?next weekend\b/,()=>J(1)],[/\b(?:due |for |on )?(?:this |the )?weekend\b/,()=>J(0)],[/\b(?:due |for |on )?this month\b/,()=>p()],[new RegExp(`${B}(\\d{4}) (\\d{2}) (\\d{2})\\b`),u=>k(Se(Number(u[2])-1,Number(u[3]),`${u[1]}-01-01`))],[new RegExp(`${B}${at} (?:of )?${it}\\b`),u=>k(Se(dt(u[2]),Number(u[1]),i))],[new RegExp(`${B}${it} (?:the )?${at}\\b`),u=>k(Se(dt(u[1]),Number(u[2]),i))],[new RegExp(`${B}(?:(this|next|last|coming) )?${Wt}\\b`),u=>j(u[1],u[2])]];for(let[u,S]of P){let w=o.match(u);if(!w)continue;let N=S(w);if(N)return{ask:{words:w[0],...N},rest:o.replace(w[0]," ").replace(/\s+/g," ").trim()}}}function ht(o,i,y={}){let f=y.principal??{kind:"human"},c=o.seenBy(f),p=c.schema,k=y.today??o.today?.()??ze(),j=y.weekStartsOn??1,J=o.kindsKeptFrom(f),B=o.modules.disabledKinds,P=p.kinds.filter(e=>!J.has(e)&&!B.has(e)),u=new Set(P),S=(y.places??[]).filter(e=>e.kind===null||u.has(e.kind)),w=c.graph,N=$(i).replace(/[?.!]+$/,"").trim();if(N.length===0)return{unresolved:!0};let M=e=>p.tryDefinition(e),H=e=>Ye(M(e.kind),e),I=e=>qe(p,e),se=e=>S.find(t=>t.kind===e&&t.address===Ne(p,e))?.address??Ne(p,e),ge=e=>Xe(p,e.kind,e.id),Me=e=>({to:"record",id:e.id,kind:e.kind,label:H(e),address:ge(e),said:`Went to ${H(e)}.`}),We=e=>{let t=`Went to ${e.title}.`;return e.kind===null?{to:"place",slug:e.slug,title:e.title,address:e.address,...e.slug==="overview"?{face:"scene"}:{},said:t}:e.lens||e.address.startsWith("/places/")?{to:"picture",kind:e.kind,as:e.slug,title:e.title,address:e.address,said:t}:{to:"kind",kind:e.kind,title:e.title,address:e.address,said:t}},De=()=>({unresolved:!0,say:At}),oe=e=>{let t=M(e.kind),s=et(e,t,{limit:3,excerpt:!0}).map(r=>r.alone.startsWith(r.label)?r.alone:`${r.label.toLowerCase()} ${r.alone}`).join(", "),n=c.violations().filter(r=>r.nodeIds.includes(e.id));return[`${H(e)} \u2014 ${Ae(F(t,e.kind))}${s?` (${s})`:""}.`,n.length>0?`Trouble: ${n.map(r=>r.message).join("; ")}.`:""].filter(Boolean).join(" ")},re=e=>{let t=new Set([G(e),G(z(e))]);for(let n of[" page"," view"," lens"," place"," picture"," list"])e.endsWith(n)&&(t.add(G(e.slice(0,-n.length))),t.add(G(z(e.slice(0,-n.length)))));t.delete("");let s=n=>t.has(G(n.title))||t.has(G(z($(n.title))))||t.has(G(n.slug));return S.find(n=>n.kind!==null&&n.address.startsWith("/places/")&&s(n))??S.find(s)},pe=e=>{let t=st(o,e,{principal:f,today:k,limit:6,near:!1,...y.selection?{from:y.selection}:{}}),s=t.hits.filter(r=>r.about==="node"&&u.has(r.kind)&&w.getNode(r.id)!==void 0),n=s.filter(r=>r.why.field==="label"&&r.why.strength==="exact");return n.length===1?{one:w.getNode(n[0].id),picks:s}:n.length>1?{picks:n}:s.length===1&&t.total===1?{one:w.getNode(s[0].id),picks:s}:{picks:s}},Re=e=>{let t=e.map(s=>`${s.label} (${F(M(s.kind),s.kind)})`);return`${e.length===1?"One thing matches":`${e.length} things match`}: ${t.join("; ")}.`},Ee=(e,t)=>{if(rt.has(e))return Le();let s=t?pe(z(e)||e):void 0,n=s?.one&&$(H(s.one))===$(z(e)||e)?void 0:re(e);if(n){let l=We(n);return{about:"place",say:t?`${l.said} ${me(n)}`:l.said,moves:[l],subject:n.slug}}let r=pe(z(e)||e);if(r.one){let l=Me(r.one);return{about:t?"describe":"record",say:t?`${l.said} ${oe(r.one)}`:l.said,moves:[l],subject:r.one.id}}if(r.picks.length>0)return{about:"picks",say:Re(r.picks),moves:[],picks:r.picks};let h=ae(e);if(h)return h;let d=Pe(e);if(d){if(d.rest.split(" ").every(l=>l===""||te.has(l))){let l=I(d.kind),v={to:"kind",kind:d.kind,title:l,address:se(d.kind),said:`Went to the ${l.toLowerCase()}.`};return{about:"kind",say:v.said,moves:[v]}}return{unresolved:!0}}return De()},me=e=>{if(e.kind===null){let h=P.map(l=>({kind:l,count:w.nodesOfKind(l).length})).filter(l=>l.count>0).map(l=>`${l.count} ${(l.count===1?F(M(l.kind),l.kind):I(l.kind)).toLowerCase()}`),d=c.violations().length;return[h.length>0?`It holds ${fe(h)}.`:"It holds nothing yet.",d>0?`${d===1?"One problem":`${d} problems`} to see to.`:""].filter(Boolean).join(" ")}let t=w.nodesOfKind(e.kind).length,s=I(e.kind).toLowerCase(),n=new Set(c.violations().flatMap(h=>h.nodeIds)),r=w.nodesOfKind(e.kind).filter(h=>n.has(h.id)).length;return[e.lens?`It draws the ${s} as ${Ae(e.lens)}${t>0?` \u2014 ${t} of them`:""}.`:`${t===0?"No":t} ${t===1?F(M(e.kind),e.kind):s} ${t===1?"is":"are"} here.`,r>0?`${r} ${r===1?"has":"have"} a problem.`:""].filter(Boolean).join(" ")},Le=()=>{let e=(y.selection??[]).map(s=>w.getNode(s)).find(s=>s!==void 0);if(e)return{about:"here",say:oe(e),moves:[],subject:e.id};let t=S.find(s=>s.slug===y.place)??S.find(s=>s.slug==="home");return t?{about:"here",say:`${t.title}. ${me(t)}`,moves:[],subject:t.slug}:{about:"here",say:me({slug:"home",title:"Home",kind:null,cardinality:"many",address:"/",stop:"#"}),moves:[]}},Pe=e=>{let t=P.flatMap(s=>[I(s),F(M(s),s),s].map(n=>({kind:s,name:$(n)}))).filter(s=>s.name.length>0).sort((s,n)=>n.name.length-s.name.length);for(let{kind:s,name:n}of t)if(!(` ${e} `.indexOf(` ${n} `)<0))return{kind:s,rest:` ${e} `.replace(` ${n} `," ").replace(/\s+/g," ").trim()}},ie=(e,t)=>{let s=V(p,e).filters.filter(d=>d.about==="field"&&d.type==="date");if(s.length===0)return;let n=s.find(d=>t.some(l=>$(d.key)===l||$(d.label)===l));if(n)return n;let r=M(e)?.fieldRoles??{};for(let d of["due","deadline","date","when","start","end"]){let l=r[d],v=l?s.find(x=>x.key===l):void 0;if(v)return v}return s.find(d=>["due","deadline","date","when","on","at"].includes(d.key.toLowerCase()))??(s.length===1?s[0]:void 0)},He=e=>{let t=M(e),s=V(p,e).filters;if(t?.lifecycle)return{conditions:[{key:"is",value:"current"}],holds:d=>ue(be,d,{key:"is",value:"current"})};let r=s.find(d=>d.about==="field"&&d.type==="boolean"&&ne.has($(d.key)));if(r)return{conditions:[{key:r.key,value:"false"}],holds:d=>d[r.key]!==!0};let h=s.find(d=>d.about==="field"&&d.type==="choice"&&(d.options??[]).some(l=>ne.has($(l))));if(h){let d=new Set((h.options??[]).filter(v=>ne.has($(v)))),l=(h.options??[]).filter(v=>!d.has(v));return l.length===1?{conditions:[{key:h.key,value:l[0]}],holds:v=>v[h.key]===l[0]}:"unsayable"}return{conditions:[],holds:()=>!0}},Ie=(e,t)=>{let s=e.words.startsWith("due")||$(t.key)==="due",n=Ct.test($(t.label));if(e.day)return s?`due ${e.day}`:n?`on ${e.day}`:`${t.label.toLowerCase()} on ${e.day}`;let r=e.words.replace(/^(?:due|for|on|by) (?:the )?/,"");return s?`due ${r}`:n?r:`${t.label.toLowerCase()} ${r}`},ye=new Set(c.violations().flatMap(e=>e.nodeIds)),be={schema:p,graph:c.graph,flagged:ye,today:k},ae=e=>{let t=Oe(e,k,j),s=Pe(t?.rest??e),n=s?.kind,r=(s?.rest??t?.rest??e).split(" ").filter(Boolean);if(!n&&t){let g=e.split(" "),m=P.filter(L=>ie(L,g)!==void 0),E=m.filter(L=>{let b=ie(L,g);return g.some(O=>$(b.key)===O||$(b.label)===O)}),U=m.length===1?m:E;if(U.length!==1)return;n=U[0]}if(!n)return;let h=V(p,n).filters,d=[],l=[],v=[],x=[],q=!1,de=[];for(let g=0;g<r.length;g++){let m=r[g],E=g>0&&(r[g-1]==="not"||r[g-1]==="un"),U=h.find(b=>b.about==="field"&&b.type==="choice"&&(b.options??[]).some(O=>$(O)===m));if(U&&!E){let b=(U.options??[]).find(O=>$(O)===m);d.push({key:U.key,value:b}),l.push(b);continue}let L=h.find(b=>b.about==="field"&&b.type==="boolean"&&[$(b.key),$(b.label)].some(O=>O===m||O===m.replace(/^un/,"")));if(L){let b=!E&&!(m.startsWith("un")&&!$(L.key).startsWith("un"));d.push({key:L.key,value:String(b)}),l.push(b?m:`not ${m.replace(/^un/,"")}`);continue}if(Pt.has(m)&&!E){let b=He(n);b==="unsayable"?(q=!0,x.push(O=>!ut(p,O))):(d.push(...b.conditions),x.push(b.holds)),l.push(m);continue}m==="not"||m==="un"||t&&h.some(b=>b.type==="date"&&($(b.key)===m||$(b.label)===m))||de.push(m)}if(r=de,r.some(g=>!te.has(g))||!t&&d.length===0&&x.length===0)return;let T=I(n).toLowerCase(),Q=I(n);if(t){let g=ie(n,e.split(" "));if(!g){let m={to:"kind",kind:n,title:Q,address:se(n),said:`Went to the ${T}.`};return{about:"kind",say:`${ee(Q)} carry no date, so I can't tell which are ${/^(?:due|for|on|overdue|past due|late)\b/.test(t.ask.words)?t.ask.words:`due ${t.ask.words}`}. ${m.said}`,moves:[m]}}if(t.ask.from&&d.push({key:g.key,value:`after:${C(t.ask.from,-1)}`}),t.ask.to&&d.push({key:g.key,value:`before:${C(t.ask.to,1)}`}),t.ask.overdue){let m=He(n);m==="unsayable"?(q=!0,x.push(E=>!ut(p,E))):(d.push(...m.conditions),x.push(m.holds))}t.ask.overdue?l.push("overdue"):v.push(Ie(t.ask,g))}let R=w.nodesOfKind(n).filter(g=>d.every(m=>ue(be,g,m))&&x.every(m=>m(g))),K=[...l,...v].join(" and "),Y=[...l,T,...v].join(" "),W=R.slice(0,6).map(g=>({about:"node",id:g.id,kind:n,label:H(g),why:{field:d[0]?.key??"label",reading:d[0]?.key??"Name",fragment:K,strength:"field"},current:!0,flagged:ye.has(g.id),address:ge(g)})),X=R.length===0?`No ${T} are ${K}.`:`${R.length===1?`One ${F(M(n),n)} is`:`${R.length} ${T} are`} ${K}: ${fe(R.slice(0,6).map(H))}${R.length>6?`, and ${R.length-6} more`:""}.`;if(q)return{about:"kind",say:X,moves:[],picks:W,offer:{draft:Y,label:"Show as a view"}};let Z=d.map(g=>`${g.key}:${g.value}`).join(","),we=`${se(n)}?${new URLSearchParams({filter:Z}).toString()}`,_={to:"kind",kind:n,title:ee(Y),filter:Z,address:we,said:`Went to the ${Y}.`};return{about:"kind",say:`${_.said} ${X}`,moves:[_],picks:W}},Te=e=>M(e)?.figure==="person"?!0:[e,F(M(e),e),I(e)].some(s=>$(s).split(" ").some(n=>Et.has(n))),pt=e=>{let t=[],s=n=>M(n)?.edges??{};for(let[n,r]of Object.entries(s(e)))for(let h of r.to??[])u.has(h)&&t.push({key:n,direction:"out",far:h,words:ct(`${r.description??""} ${n}`)});for(let n of P)for(let[r,h]of Object.entries(s(n)))(h.to??[]).includes(e)&&t.push({key:r,direction:"in",far:n,words:ct(`${h.inverse??""} ${r}`)});return t},mt=e=>{let t=e.match(/^(who|which|what)\b/)?.[1];if(!t)return;let s=Oe(e,k,j);if(!s||s.ask.overdue)return;let n=s.rest.split(" ").filter(Boolean),r=P.flatMap(a=>[I(a),F(M(a),a),a].map(A=>({kind:a,name:$(A)}))).filter(a=>a.name.length>0).sort((a,A)=>A.name.length-a.name.length),h=` ${n.join(" ")} `,d=[];for(let{kind:a,name:A}of r)h.includes(` ${A} `)&&(h=h.replace(` ${A} `," "),d.includes(a)||d.push(a));let l=h.match(/\b(?:is|are|was|were)\b|'s\b/)?.[0],v=h.replace(/'s\b/g," ").split(" ").filter(a=>a.length>0&&!te.has(a)&&!Ce.has(a)),x=t==="who"?d.find(Te):d[0];if(!x&&t!=="who")return;let q=d.find(a=>a!==x),de=v.flatMap(a=>[je(a),...lt.has(je(a))?[...lt]:[]]),T=P.filter(a=>q?a===q:a!==x).flatMap(a=>{let A=ie(a,e.split(" "))??V(p,a).filters.find(D=>D.about==="field"&&D.type==="date");return A?pt(a).filter(D=>(x?D.far===x:Te(D.far))&&D.far!==a).map(D=>({kind:a,field:A,relation:D,said:v.length===0||de.some(ve=>D.words.some(vt=>Lt(vt,ve)))})):[]}).filter(a=>a.said);if(T.length===0)return;let Q=T.filter(a=>n.some(A=>$(a.field.key)===A||$(a.field.label)===A)),R=T.length===1?T[0]:Q.length===1?Q[0]:void 0;if(!R)return;let{kind:K,field:Y,relation:W}=R,X=[...s.ask.from?[{key:Y.key,value:`after:${C(s.ask.from,-1)}`}]:[],...s.ask.to?[{key:Y.key,value:`before:${C(s.ask.to,1)}`}]:[]],Z=w.nodesOfKind(K).filter(a=>X.every(A=>ue(be,a,A))),we=a=>(W.direction==="out"?c.graph.out(a.id,W.key):c.graph.in(a.id,W.key)).filter(A=>A.kind===W.far&&u.has(W.far)),_=[],g=[];for(let a of Z){let A=we(a);A.length===0&&g.push(a);for(let D of A)_.some(ve=>ve.id===D.id)||_.push(D)}let m=Ie(s.ask,Y),E=s.ask.day?`On ${s.ask.day}`:ee(s.ask.words.replace(/^(?:due|for|on|by) (?:the )?/,"")),U=I(K).toLowerCase(),L=X.map(a=>`${a.key}:${a.value}`).join(","),b=`${U} ${m}`,O={to:"kind",kind:K,title:ee(b),filter:L,address:`${se(K)}?${new URLSearchParams({filter:L}).toString()}`,said:`Went to the ${b}.`};if(Z.length===0)return{about:"related",say:`No ${b}. ${O.said}`,moves:[O]};let le=v.join(" "),yt=l==="was"||l==="were",Ge=a=>yt?a===1?"was":"were":a===1?"is":"are",ce=_.map(H),bt=ce.length>8?[...ce.slice(0,8),`${ce.length-8} more`]:ce,kt=_.length===0?`${E}: nobody ${Ge(1)}${le?` ${le}`:""}.`:`${E}: ${fe(bt)}${le?` ${Ge(_.length)} ${le}`:""}.`,$t=t==="who"&&g.length>0?`${fe(g.slice(0,4).map(H))}${g.length>4?` and ${g.length-4} more`:""} ${g.length===1?"has":"have"} nobody.`:"",wt=_.slice(0,8).map(a=>({about:"node",id:a.id,kind:a.kind,label:H(a),why:{field:W.key,reading:Ze(p,W.direction==="out"?K:W.far,W.key,W.direction==="out"?"out":"in"),fragment:m,strength:"field"},current:!0,flagged:ye.has(a.id),address:ge(a)}));return{about:"related",say:[kt,$t,O.said].filter(Boolean).join(" "),moves:[O],picks:wt}},Ke=N.match(jt);if(Ke){let e=Ke[1];if(e&&!rt.has(e)&&!/^(?:it|this|that)$/.test(e)){let n=re(e),r=n?void 0:pe(z(e)||e);if(r?.one){let h=Me(r.one);return{about:"describe",say:`${h.said} ${oe(r.one)}`,moves:[h],subject:r.one.id}}if(!n)return r&&r.picks.length>0?{about:"picks",say:Re(r.picks),moves:[],picks:r.picks}:De()}if(e&&/^(?:it|this|that)$|^(?:here|this place|this page)$/.test(e)){let n=(y.selection??[]).map(r=>w.getNode(r)).find(r=>r!==void 0);if(n)return{about:"describe",say:oe(n),moves:[],subject:n.id}}let t=c.violations();if(t.length===0)return{about:"problems",say:"Nothing is wrong \u2014 every rule holds.",moves:[]};let s={to:"problems",address:"/problems",said:"Went to the problems."};return{about:"problems",say:`${s.said} ${Qe(t)}: ${t.slice(0,4).map(n=>n.message).join("; ")}${t.length>4?"\u2026":"."}`,moves:[s]}}if(Ot.test(N))return Le();let _e=mt(N);if(_e)return _e;let ke=Oe(N,k,j);if(ke&&!re(z(ke.ask.words))&&ke.rest.replace(/'s\b/g,"").split(" ").every(e=>e===""||te.has(e)||Ce.has(e))){let e=ae(N);if(e)return e}if(/^open /.test(N)){let e=ae(N);if(e)return e}let Fe=N.match(Nt)??N.match(/^(?:go|take me|head|get me)(?: back)? (home)$/);if(Fe)return Ee(Fe[1].trim(),!1);let Be=N.match(St);if(Be){let e=Ee(Be[1].trim(),!0);return"unresolved"in e&&e.unresolved&&!/^tell me|^describe/.test(N)?{unresolved:!0}:e}let $e=re(N);if($e){let e=We($e);return{about:"place",say:e.said,moves:[e],subject:$e.slug}}let Ue=ae(N);return Ue||{unresolved:!0}}var Ce=new Set(["who","whom","whose","which","what","whats","what's","who's"]),Et=new Set(["person","people","user","users","member","members","volunteer","volunteers","gardener","gardeners","player","players","staff","worker","workers","employee","employees","owner","owners","assignee","assignees","helper","helpers","student","students","teacher","teachers","customer","customers","client","clients","contact","contacts","author","authors"]),lt=new Set(["work","cover","staff","assign","do","run","schedul","roster","book","duty","serv","help"]);function je(o){let i=o.toLowerCase().replace(/'s$/,"");for(let y of["ing","ed","es","s"])if(i.length>y.length+2&&i.endsWith(y)){let f=i.slice(0,-y.length);return f.length>3&&f[f.length-1]===f[f.length-2]?f.slice(0,-1):f}return i}function ct(o){return o.toLowerCase().split(/[^a-z']+/).filter(i=>i.length>1&&!te.has(i)&&!Ce.has(i)&&!["it","they","them","their","its","this","here","to","at"].includes(i)).map(je)}var Lt=(o,i)=>o===i||o.length>=4&&i.length>=4&&(o.startsWith(i)||i.startsWith(o)),ne=new Set(["done","finished","complete","completed","closed","resolved","agreed","canceled","archived","shipped","delivered"]),Pt=new Set(["open","unfinished","outstanding","pending","remaining","undone","incomplete"]);function ut(o,i){return V(o,i.kind).filters.some(f=>f.about==="field"&&(f.type==="boolean"&&ne.has(f.key.toLowerCase())&&i[f.key]===!0||f.type==="choice"&&typeof i[f.key]=="string"&&ne.has(String(i[f.key]).toLowerCase())))}function fe(o){return o.length<=1?o[0]??"":`${o.slice(0,-1).join(", ")} and ${o[o.length-1]}`}function zt(o,i,y={}){let f=y.scene!==void 0?{...y.pages,scene:y.scene}:y.pages;return[...nt(o,i,f?{pages:f}:{})].map(({first:c,hidden:p,lens:k,...j})=>j)}function gt(o,i){return{...o.principal?{principal:o.principal}:{},...o.places?{places:o.places}:{},...o.selection?{selection:o.selection}:{},...o.place?{place:o.place}:{},...i??o.today?{today:i??o.today}:{},...o.weekStartsOn!==void 0?{weekStartsOn:o.weekStartsOn}:{}}}function Jt(o,i,y,f){let c=ht(o,i,gt(y,f));if(c.unresolved)return c.say?{reply:{say:c.say,proposals:[],grounded:!0}}:{};if(c.about==="picks")return{};let p=c.moves.length>0?{moves:c.moves}:{},k=c.subject?o.graph.getNode(c.subject):void 0;if(c.about==="problems")return{...p,problems:!0};if(k&&(c.about==="describe"||c.about==="here"))return{...p,told:k.id};let j=k?tt(o,ot(Ve(o.violations(),[k.id])).slice(0,3)):[];return{reply:{say:c.say,proposals:j,grounded:!0,...p,...c.picks&&c.picks.length>0?{picks:c.picks}:{},...c.offer?{offer:c.offer}:{}}}}function Yt(o,i,y={}){let f=gt(y),c=[];for(let p of i){let k=typeof p=="string"?p:typeof p=="object"&&p!==null&&typeof p.to=="string"?p.to:void 0;if(!k||k.trim().length===0)continue;let j=ht(o,/^(?:go|take me|open|show)\b/i.test(k.trim())?k:`go to ${k}`,f);if("moves"in j)for(let J of j.moves)c.some(B=>B.address===J.address)||c.push(J)}return c}export{At as NOTHING_BY_THAT_NAME,gt as askContextOf,Jt as goingFrom,Yt as movesFromNames,zt as placesFromViews,ht as resolveAsk};
@@ -1 +1 @@
1
- import{c as u}from"./chunk.DYW4D74X.js";import{fa as l}from"./chunk.7MQ7UWVW.js";function a(e,n){let s=new Map;for(let o of e){let t=n(o.from),i=n(o.to);if(t===void 0||i===void 0)continue;let d=`${o.kind}|${t}|${i}`,r=s.get(d);r||s.set(d,r={edge:o.kind,from:t,to:i,links:0,froms:new Set,tos:new Set}),r.links+=1,r.froms.add(o.from),r.tos.add(o.to)}return[...s.entries()].sort(([o],[t])=>o<t?-1:o>t?1:0).map(([o,t])=>({key:o,edge:t.edge,from:t.from,to:t.to,links:t.links,fromCount:t.froms.size,toCount:t.tos.size}))}function m(e,n,s){let o=[],t=[];for(let d of e){let r=f(d);if(r!==null){o.includes(r)||o.push(r);continue}s(d)!==void 0&&t.push(d)}let i=n.overview&&n.focusId!==null?f(n.focusId):null;return n.beside&&n.overview&&i===null&&n.focusId!==null&&t.length===0&&o.length===0&&s(n.focusId)!==void 0&&t.push(n.focusId),{districts:o,records:t,lens:i}}function f(e){return e.startsWith("kind:")?e.slice(5)||null:e.startsWith("aggregate:")&&!e.includes("|")&&e.slice(10)||null}function y(e,n){let s=u(e,n.from,n.edge,"out"),o=n.from===n.to?" of their own":"";return`${l(e,n.from,n.fromCount)} \u2192 ${l(e,n.to,n.toCount)}${o}, ${s}`}export{a,m as b,f as c,y as d};
1
+ import{c as u}from"./chunk.H7KCWCB4.js";import{fa as l}from"./chunk.AS4CQBOQ.js";function a(e,n){let s=new Map;for(let o of e){let t=n(o.from),i=n(o.to);if(t===void 0||i===void 0)continue;let d=`${o.kind}|${t}|${i}`,r=s.get(d);r||s.set(d,r={edge:o.kind,from:t,to:i,links:0,froms:new Set,tos:new Set}),r.links+=1,r.froms.add(o.from),r.tos.add(o.to)}return[...s.entries()].sort(([o],[t])=>o<t?-1:o>t?1:0).map(([o,t])=>({key:o,edge:t.edge,from:t.from,to:t.to,links:t.links,fromCount:t.froms.size,toCount:t.tos.size}))}function m(e,n,s){let o=[],t=[];for(let d of e){let r=f(d);if(r!==null){o.includes(r)||o.push(r);continue}s(d)!==void 0&&t.push(d)}let i=n.overview&&n.focusId!==null?f(n.focusId):null;return n.beside&&n.overview&&i===null&&n.focusId!==null&&t.length===0&&o.length===0&&s(n.focusId)!==void 0&&t.push(n.focusId),{districts:o,records:t,lens:i}}function f(e){return e.startsWith("kind:")?e.slice(5)||null:e.startsWith("aggregate:")&&!e.includes("|")&&e.slice(10)||null}function y(e,n){let s=u(e,n.from,n.edge,"out"),o=n.from===n.to?" of their own":"";return`${l(e,n.from,n.fromCount)} \u2192 ${l(e,n.to,n.toCount)}${o}, ${s}`}export{a,m as b,f as c,y as d};
@@ -0,0 +1,4 @@
1
+ var l={},O={empty:!0},Se={id:"text",class:"text",title:"text",lang:"text",dir:{oneOf:["ltr","rtl","auto"]},hidden:"text",tabindex:{oneOf:["-1","0"]},role:"text",style:"style",translate:{oneOf:["yes","no"]},spellcheck:{oneOf:["true","false"]},draggable:{oneOf:["true","false"]},inert:"boolean"},A={div:l,section:l,article:l,aside:l,header:l,footer:l,nav:l,hgroup:l,search:l,address:l,figure:l,figcaption:l,blockquote:l,p:l,pre:l,hr:O,br:O,wbr:O,h1:l,h2:l,h3:l,h4:l,h5:l,h6:l,span:l,strong:l,em:l,b:l,i:l,u:l,s:l,small:l,mark:l,abbr:l,cite:l,q:l,code:l,kbd:l,samp:l,var:l,sub:l,sup:l,dfn:l,bdi:l,bdo:l,ruby:l,rt:l,rp:l,time:{attributes:{datetime:"text"}},data:{attributes:{value:"text"}},del:{attributes:{datetime:"text"}},ins:{attributes:{datetime:"text"}},a:{attributes:{href:"link"}},ul:l,menu:l,dl:l,dt:l,dd:l,ol:{attributes:{start:"number",reversed:"boolean",type:{oneOf:["1","a","A","i","I"]}}},li:{attributes:{value:"number"}},table:l,caption:l,thead:l,tbody:l,tfoot:l,tr:l,colgroup:{attributes:{span:"number"}},col:{attributes:{span:"number"},empty:!0},th:{attributes:{colspan:"number",rowspan:"number",headers:"text",scope:{oneOf:["row","col","rowgroup","colgroup"]},abbr:"text"}},td:{attributes:{colspan:"number",rowspan:"number",headers:"text"}},details:{attributes:{open:"boolean",name:"text"}},summary:l,button:{attributes:{type:{oneOf:["button"]},disabled:"boolean",name:"text",value:"text"}},input:{empty:!0,attributes:{type:{oneOf:["text","search","number","range","checkbox","radio","date","time","datetime-local","month","week","color","email","tel","url"]},name:"text",value:"text",placeholder:"text",min:"text",max:"text",step:"text",checked:"boolean",disabled:"boolean",readonly:"boolean",required:"boolean",maxlength:"number",minlength:"number",size:"number",pattern:"text",multiple:"boolean",inputmode:"text",enterkeyhint:"text"}},select:{attributes:{name:"text",disabled:"boolean",multiple:"boolean",required:"boolean",size:"number"}},option:{attributes:{value:"text",selected:"boolean",disabled:"boolean",label:"text"}},optgroup:{attributes:{label:"text",disabled:"boolean"}},textarea:{attributes:{name:"text",placeholder:"text",rows:"number",cols:"number",disabled:"boolean",readonly:"boolean",required:"boolean",maxlength:"number",minlength:"number",wrap:{oneOf:["soft","hard","off"]}}},label:{attributes:{for:"text"}},fieldset:{attributes:{disabled:"boolean",name:"text"}},legend:l,output:l,meter:{attributes:{value:"number",min:"number",max:"number",low:"number",high:"number",optimum:"number"}},progress:{attributes:{value:"number",max:"number"}},img:{empty:!0,attributes:{src:"image",alt:"text",width:"number",height:"number",decoding:{oneOf:["async","sync","auto"]}}},"graview-video":O},Ee=["fill","fill-opacity","fill-rule","stroke","stroke-width","stroke-linecap","stroke-linejoin","stroke-dasharray","stroke-dashoffset","stroke-opacity","stroke-miterlimit","opacity","color","display","visibility","transform-origin","clip-path","clip-rule","marker-start","marker-mid","marker-end","font-family","font-size","font-weight","font-style","text-anchor","dominant-baseline","alignment-baseline","letter-spacing","text-decoration","paint-order","vector-effect","shape-rendering","pointer-events","stop-color","stop-opacity","overflow","mask"],Oe={id:"text",class:"text",style:"style",lang:"text",role:"text",tabindex:{oneOf:["-1","0"]},transform:"geometry",...Object.fromEntries(Ee.map(e=>[e,"css"]))},w={x:"geometry",y:"geometry",width:"geometry",height:"geometry"},R={viewBox:"geometry",preserveAspectRatio:"geometry"},X={gradientUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]},gradientTransform:"geometry",spreadMethod:{oneOf:["pad","reflect","repeat"]},href:"fragment"},_={svg:{attributes:{...w,...R}},g:l,defs:l,symbol:{attributes:{...w,...R,refX:"geometry",refY:"geometry"}},use:{attributes:{...w,href:"fragment"}},title:l,desc:l,path:{attributes:{d:"geometry",pathLength:"number"}},rect:{attributes:{...w,rx:"geometry",ry:"geometry",pathLength:"number"}},circle:{attributes:{cx:"geometry",cy:"geometry",r:"geometry",pathLength:"number"}},ellipse:{attributes:{cx:"geometry",cy:"geometry",rx:"geometry",ry:"geometry",pathLength:"number"}},line:{attributes:{x1:"geometry",y1:"geometry",x2:"geometry",y2:"geometry",pathLength:"number"}},polyline:{attributes:{points:"geometry",pathLength:"number"}},polygon:{attributes:{points:"geometry",pathLength:"number"}},text:{attributes:{x:"geometry",y:"geometry",dx:"geometry",dy:"geometry",rotate:"geometry",textLength:"geometry",lengthAdjust:{oneOf:["spacing","spacingAndGlyphs"]}}},tspan:{attributes:{x:"geometry",y:"geometry",dx:"geometry",dy:"geometry",rotate:"geometry",textLength:"geometry"}},textPath:{attributes:{href:"fragment",startOffset:"geometry",method:{oneOf:["align","stretch"]},spacing:{oneOf:["auto","exact"]},side:{oneOf:["left","right"]}}},linearGradient:{attributes:{x1:"geometry",y1:"geometry",x2:"geometry",y2:"geometry",...X}},radialGradient:{attributes:{cx:"geometry",cy:"geometry",r:"geometry",fx:"geometry",fy:"geometry",fr:"geometry",...X}},stop:{attributes:{offset:"geometry"}},clipPath:{attributes:{clipPathUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]}}},mask:{attributes:{...w,maskUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]},maskContentUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]}}},pattern:{attributes:{...w,...R,patternUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]},patternContentUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]},patternTransform:"geometry",href:"fragment"}},marker:{attributes:{...R,markerWidth:"geometry",markerHeight:"geometry",refX:"geometry",refY:"geometry",orient:"geometry",markerUnits:{oneOf:["strokeWidth","userSpaceOnUse"]}}}};var q=["alert","alertdialog","dialog","banner","main","navigation","contentinfo","complementary","search","form","region","application","status","log","marquee","timer"],v={nav:"div",header:"div",footer:"div",aside:"div",search:"div",output:"span"},Y={section:["aria-label","aria-labelledby","title"]};function Re(e){return/^aria-[a-z]+$/.test(e)}function Ae(e){return/^data-[a-z0-9][a-z0-9_.-]*$/.test(e)}var K=["all","display","position","top","right","bottom","left","inset","inset-block","inset-inline","inset-block-start","inset-block-end","inset-inline-start","inset-inline-end","width","height","min-width","min-height","max-width","max-height","inline-size","block-size","min-inline-size","min-block-size","max-inline-size","max-block-size","margin","margin-top","margin-right","margin-bottom","margin-left","margin-block","margin-inline","margin-block-start","margin-block-end","margin-inline-start","margin-inline-end","padding","padding-top","padding-right","padding-bottom","padding-left","padding-block","padding-inline","padding-block-start","padding-block-end","padding-inline-start","padding-inline-end","box-sizing","overflow","overflow-x","overflow-y","overflow-wrap","float","clear","z-index","aspect-ratio","object-fit","object-position","vertical-align","isolation","contain","container","container-type","container-name","content-visibility","flex","flex-direction","flex-wrap","flex-flow","flex-grow","flex-shrink","flex-basis","order","grid","grid-template","grid-template-columns","grid-template-rows","grid-template-areas","grid-auto-columns","grid-auto-rows","grid-auto-flow","grid-area","grid-column","grid-row","grid-column-start","grid-column-end","grid-row-start","grid-row-end","gap","row-gap","column-gap","align-items","align-content","align-self","justify-items","justify-content","justify-self","place-items","place-content","place-self","columns","column-count","column-width","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-fill","color","background","background-color","background-image","background-position","background-position-x","background-position-y","background-size","background-repeat","background-origin","background-clip","background-attachment","background-blend-mode","border","border-top","border-right","border-bottom","border-left","border-block","border-inline","border-block-start","border-block-end","border-inline-start","border-inline-end","border-width","border-style","border-color","border-top-width","border-right-width","border-bottom-width","border-left-width","border-top-style","border-right-style","border-bottom-style","border-left-style","border-top-color","border-right-color","border-bottom-color","border-left-color","border-radius","border-top-left-radius","border-top-right-radius","border-bottom-right-radius","border-bottom-left-radius","border-start-start-radius","border-start-end-radius","border-end-start-radius","border-end-end-radius","border-collapse","border-spacing","outline","outline-width","outline-style","outline-color","outline-offset","box-shadow","opacity","visibility","mix-blend-mode","filter","backdrop-filter","clip-path","accent-color","caret-color","color-scheme","appearance","-webkit-appearance","font","font-family","font-size","font-weight","font-style","font-stretch","font-variant","font-variant-numeric","font-variant-caps","font-variant-ligatures","font-feature-settings","font-variation-settings","font-kerning","font-optical-sizing","font-size-adjust","font-synthesis","line-height","letter-spacing","word-spacing","text-align","text-align-last","text-indent","text-transform","text-decoration","text-decoration-line","text-decoration-color","text-decoration-style","text-decoration-thickness","text-underline-offset","text-underline-position","text-shadow","text-overflow","text-wrap","text-wrap-mode","text-wrap-style","white-space","white-space-collapse","word-break","line-break","hyphens","tab-size","direction","unicode-bidi","writing-mode","text-orientation","text-rendering","-webkit-font-smoothing","-webkit-line-clamp","-webkit-box-orient","line-clamp","-webkit-text-fill-color","-webkit-background-clip","list-style","list-style-type","list-style-position","content","quotes","counter-reset","counter-increment","counter-set","table-layout","caption-side","empty-cells","transform","transform-origin","transform-box","transform-style","translate","rotate","scale","perspective","perspective-origin","backface-visibility","transition","transition-property","transition-duration","transition-timing-function","transition-delay","transition-behavior","animation","animation-name","animation-duration","animation-timing-function","animation-delay","animation-iteration-count","animation-direction","animation-fill-mode","animation-play-state","animation-composition","will-change","cursor","pointer-events","user-select","-webkit-user-select","touch-action","resize","scroll-behavior","overscroll-behavior","overscroll-behavior-x","overscroll-behavior-y","scroll-snap-type","scroll-snap-align","scroll-snap-stop","scroll-margin","scroll-padding","scrollbar-width","scrollbar-color","scrollbar-gutter","fill","fill-opacity","fill-rule","stroke","stroke-width","stroke-linecap","stroke-linejoin","stroke-dasharray","stroke-dashoffset","stroke-opacity","stroke-miterlimit","stop-color","stop-opacity","clip-rule","marker","marker-start","marker-mid","marker-end","paint-order","vector-effect","shape-rendering","text-anchor","dominant-baseline","alignment-baseline","r","cx","cy","rx","ry","x","y","d","mask"],Z=["var","env","calc","min","max","clamp","round","mod","rem","abs","sign","sin","cos","tan","asin","acos","atan","atan2","pow","sqrt","hypot","log","exp","rgb","rgba","hsl","hsla","hwb","lab","lch","oklab","oklch","color","color-mix","light-dark","linear-gradient","radial-gradient","conic-gradient","repeating-linear-gradient","repeating-radial-gradient","repeating-conic-gradient","translate","translatex","translatey","translatez","translate3d","rotate","rotatex","rotatey","rotatez","rotate3d","scale","scalex","scaley","scalez","scale3d","skew","skewx","skewy","matrix","matrix3d","perspective","cubic-bezier","steps","linear","repeat","minmax","fit-content","blur","brightness","contrast","drop-shadow","grayscale","hue-rotate","invert","saturate","sepia","opacity","circle","ellipse","inset","polygon","path","xywh","rect","counter","counters"],J=["fill","stroke","clip-path","mask","marker","marker-start","marker-mid","marker-end"],Q=["media","supports","container","keyframes"],ee={position:["static","relative","absolute","sticky"],all:[],appearance:["auto","none","menulist-button","textfield"],"-webkit-appearance":["auto","none","menulist-button","textfield"]},te=["host","host-context","slotted","part","backdrop","picker","view-transition","view-transition-group","view-transition-image-pair","view-transition-old","view-transition-new"],T=64e3,M=4e3,ne=1e5,S=512e3,Ze=1e4,Je="http://www.w3.org/1999/xhtml",Qe="http://www.w3.org/2000/svg",_e=new Map(Object.keys(_).map(e=>[e.toLowerCase(),e]));function re(e){return _e.get(e.toLowerCase())}function oe(e,r,n){let t=n.toLowerCase(),i=e==="html"?[A[r]?.attributes,Se]:[_[r]?.attributes,Oe],o=e==="svg"&&t==="xlink:href"?"href":t;for(let a of i)if(a){for(let[u,c]of Object.entries(a))if(u.toLowerCase()===o)return{name:u,kind:c}}if(Re(t)||Ae(t))return{name:t,kind:"text"}}var f=e=>e>=48&&e<=57,ie=e=>f(e)||e>=65&&e<=70||e>=97&&e<=102,B=e=>e>=65&&e<=90||e>=97&&e<=122,F=e=>e>=128,P=e=>B(e)||F(e)||e===95,ae=e=>P(e)||f(e)||e===45,se=e=>e===10,h=e=>e===10||e===9||e===32,Te=e=>e>=0&&e<=8||e===11||e>=14&&e<=31||e===127,y=-1;function Pe(e){let r=[];for(let n=0;n<e.length;n+=1){let t=e.codePointAt(n);t>65535&&(n+=1),t===13?(e.charCodeAt(n+1)===10&&(n+=1),t=10):t===12?t=10:(t===0||t>=55296&&t<=57343)&&(t=65533),r.push(t)}return r}function $e(e){let r=Pe(e),n=0,t=(s=0)=>n+s<r.length?r[n+s]:y,i=[],o=(s,d)=>s===92&&d!==10&&d!==y,a=(s,d,m)=>s===45?P(d)||d===45||o(d,m):P(s)?!0:o(s,d),u=(s,d,m)=>s===43||s===45?f(d)||d===46&&f(m):f(s===46?d:s),c=()=>{let s=t();if(n+=1,s===y)return 65533;if(ie(s)){let d=String.fromCodePoint(s);for(;d.length<6&&ie(t());)d+=String.fromCodePoint(t()),n+=1;h(t())&&(n+=1);let m=parseInt(d,16);return m===0||m>=55296&&m<=57343||m>1114111?65533:m}return s},p=()=>{let s="";for(;;){let d=t();if(ae(d))s+=String.fromCodePoint(d),n+=1;else if(o(d,t(1)))n+=1,s+=String.fromCodePoint(c());else return s}},g=()=>{let s="";for((t()===43||t()===45)&&(s+=String.fromCodePoint(r[n++]));f(t());)s+=String.fromCodePoint(r[n++]);if(t()===46&&f(t(1)))for(s+=String.fromCodePoint(r[n++],r[n++]);f(t());)s+=String.fromCodePoint(r[n++]);if((t()===69||t()===101)&&(f(t(1))||(t(1)===43||t(1)===45)&&f(t(2))))for(s+=String.fromCodePoint(r[n++]),f(t())||(s+=String.fromCodePoint(r[n++]));f(t());)s+=String.fromCodePoint(r[n++]);return s},E=()=>{let s=g();return a(t(),t(1),t(2))?{type:"dimension",repr:s,unit:p()}:t()===37?(n+=1,{type:"percentage",repr:s}):{type:"number",repr:s}},b=()=>{for(;;){let s=t();if(n+=1,s===41||s===y)return;o(s,t())&&c()}},Ce=()=>{let s="";for(;h(t());)n+=1;for(;;){let d=t();if(n+=1,d===41)return{type:"url",value:s};if(d===y)return{type:"url",value:s};if(h(d)){for(;h(t());)n+=1;return t()===41||t()===y?(t()===41&&(n+=1),{type:"url",value:s}):(b(),{type:"bad-url"})}if(d===34||d===39||d===40||Te(d))return b(),{type:"bad-url"};if(d===92){if(o(d,t()))s+=String.fromCodePoint(c());else return b(),{type:"bad-url"};continue}s+=String.fromCodePoint(d)}},j=()=>{let s=p();if(s.toLowerCase()==="url"&&t()===40){for(n+=1;h(t())&&h(t(1));)n+=1;let d=h(t())?t(1):t();return d===34||d===39?{type:"function",value:s}:Ce()}return t()===40?(n+=1,{type:"function",value:s}):{type:"ident",value:s}},ve=s=>{let d="";for(;;){let m=t();if(n+=1,m===s||m===y)return{type:"string",value:d};if(se(m))return n-=1,{type:"bad-string"};if(m===92){if(t()===y)continue;if(se(t())){n+=1;continue}d+=String.fromCodePoint(c());continue}d+=String.fromCodePoint(m)}};for(;;){for(;t()===47&&t(1)===42;){for(n+=2;t()!==y&&!(t()===42&&t(1)===47);)n+=1;t()!==y&&(n+=2)}let s=t();if(s===y)return i;if(h(s)){for(;h(t());)n+=1;i.push({type:"whitespace"});continue}switch(n+=1,s){case 34:case 39:i.push(ve(s));continue;case 35:if(ae(t())||o(t(),t(1))){let d=a(t(),t(1),t(2));i.push({type:"hash",value:p(),id:d})}else i.push({type:"delim",value:"#"});continue;case 40:i.push({type:"("});continue;case 41:i.push({type:")"});continue;case 43:case 46:u(s,t(),t(1))?(n-=1,i.push(E())):i.push({type:"delim",value:String.fromCodePoint(s)});continue;case 44:i.push({type:","});continue;case 45:u(s,t(),t(1))?(n-=1,i.push(E())):t()===45&&t(1)===62?(n+=2,i.push({type:"CDC"})):a(s,t(),t(1))?(n-=1,i.push(j())):i.push({type:"delim",value:"-"});continue;case 58:i.push({type:":"});continue;case 59:i.push({type:";"});continue;case 60:t()===33&&t(1)===45&&t(2)===45?(n+=3,i.push({type:"CDO"})):i.push({type:"delim",value:"<"});continue;case 64:a(t(),t(1),t(2))?i.push({type:"at-keyword",value:p()}):i.push({type:"delim",value:"@"});continue;case 91:i.push({type:"["});continue;case 92:o(s,t())?(n-=1,i.push(j())):i.push({type:"delim",value:"\\"});continue;case 93:i.push({type:"]"});continue;case 123:i.push({type:"{"});continue;case 125:i.push({type:"}"});continue;default:f(s)?(n-=1,i.push(E())):P(s)?(n-=1,i.push(j())):i.push({type:"delim",value:String.fromCodePoint(s)})}}}var pe={"{":"}","[":"]","(":")"},fe=32,D=class{constructor(r){this.tokens=r}i=0;peek(){return this.tokens[this.i]}next(){return this.tokens[this.i++]}};function me(e,r){let n=e.next();return n.type==="{"||n.type==="["||n.type==="("?{type:"block",open:n.type,value:le(e,pe[n.type],r+1)}:n.type==="function"?{type:"func",name:n.value,value:le(e,")",r+1)}:n}function le(e,r,n){let t=[];for(;;){let i=e.peek();if(!i)return t;if(i.type===r)return e.next(),t;if(n>fe){e.next(),t.push({type:"bad-string"});continue}t.push(me(e,n))}}function k(e,r){let n=[],t=0;for(;t<e.length;){let i=e[t];if(i.type==="whitespace"||r&&(i.type==="CDO"||i.type==="CDC")){t+=1;continue}if(i.type==="at-keyword"){let u=[];t+=1;let c;for(;t<e.length;){let p=e[t];if(t+=1,p.type===";")break;if(p.type==="block"&&p.open==="{"){c=p.value;break}u.push(p)}n.push({type:"at-rule",name:i.value,prelude:u,...c?{block:c}:{}});continue}let o=[],a;for(;t<e.length;){let u=e[t];if(t+=1,u.type==="block"&&u.open==="{"){a=u.value;break}o.push(u)}a&&n.push({type:"qualified",prelude:o,block:a})}return n}function H(e){let r=[],n=0;for(;n<e.length;){let t=e[n];if(t.type==="whitespace"||t.type===";"){n+=1;continue}if(t.type==="at-keyword"){let o=(()=>{for(let a=n+1;a<e.length;a+=1){let u=e[a];if(u.type===";"||u.type==="block"&&u.open==="{")return a+1}return e.length})();r.push(...k(e.slice(n,o),!1)),n=o;continue}if(t.type==="ident"){let o=n+1;for(;e[o]?.type==="whitespace";)o+=1;if(e[o]?.type===":"){let a=o+1;for(;a<e.length&&e[a].type!==";";)a+=1;let u=ge(t.value,e.slice(o+1,a));if(u.value.some(c=>c.type==="block"&&c.open==="{")){let c=e.findIndex((p,g)=>g>n&&p.type==="block"&&p.open==="{");r.push(...k(e.slice(n,c+1),!1)),n=c+1;continue}r.push(u),n=a+1;continue}}let i=n;for(;i<e.length&&!(e[i].type==="block"&&e[i].open==="{")&&e[i].type!==";";)i+=1;i<e.length&&e[i].type==="block"&&r.push(...k(e.slice(n,i+1),!1)),n=i+1}return r}function ge(e,r){let n=[...r];for(;n[0]?.type==="whitespace";)n.shift();for(;n.at(-1)?.type==="whitespace";)n.pop();let t=!1,o=n.length-1;if(n[o]?.type==="ident"&&n[o].value.toLowerCase()==="important"){for(o-=1;n[o]?.type==="whitespace";)o-=1;let a=n[o];if(a?.type==="delim"&&a.value==="!")for(t=!0,n.length=o;n.at(-1)?.type==="whitespace";)n.pop()}return{type:"declaration",name:e,value:n,important:t}}function W(e){let r=new D($e(e)),n=[];for(;r.peek();)n.push(me(r,0));return n}function $(e){let r="",n=[...e].map(t=>t.codePointAt(0));return n.forEach((t,i)=>{t===0?r+="\uFFFD":t>=1&&t<=31||t===127||i===0&&f(t)||i===1&&f(t)&&n[0]===45?r+=`\\${t.toString(16)} `:i===0&&t===45&&n.length===1?r+="\\-":F(t)||t===45||t===95||f(t)||B(t)?r+=String.fromCodePoint(t):r+=`\\${String.fromCodePoint(t)}`}),r}function N(e){let r="";for(let n of e){let t=n.codePointAt(0);F(t)||t===45||t===95||f(t)||B(t)?r+=n:t>=1&&t<=31||t===127?r+=`\\${t.toString(16)} `:r+=`\\${n}`}return r}function U(e){let r='"';for(let n of e){let t=n.codePointAt(0);t===0?r+="\uFFFD":t>=1&&t<=31||t===127||t===60||t===62?r+=`\\${t.toString(16)} `:t===34||t===92?r+=`\\${n}`:r+=n}return`${r}"`}function Ne(e){let r=N(e);return/^[eE]([0-9]|[+-][0-9])/.test(e)?`\\${e.codePointAt(0).toString(16)} ${N(e.slice(1))}`:r}var ue=e=>{switch(e.type){case"ident":case"url":case"bad-url":case"number":case"percentage":case"dimension":case"CDC":case"hash":case"at-keyword":return e.type;case"func":case"function":return"function";case"block":return e.open==="("?"(":"other";case"(":return"(";case"delim":return`delim${e.value}`;default:return"other"}};function Le(e,r){let n=["ident","function","url","bad-url","delim-","number","percentage","dimension","CDC"];return e==="ident"?[...n,"("].includes(r):e==="at-keyword"||e==="hash"||e==="dimension"||e==="delim#"||e==="delim-"?n.includes(r):e==="number"?["ident","function","url","bad-url","number","percentage","dimension","delim%"].includes(r):e==="delim@"?["ident","function","url","bad-url","delim-","CDC"].includes(r):e==="delim."||e==="delim+"?["number","percentage","dimension"].includes(r):e==="delim/"?r==="delim*":!1}function ze(e){switch(e.type){case"whitespace":return" ";case"ident":return $(e.value);case"at-keyword":return`@${$(e.value)}`;case"hash":return`#${N(e.value)}`;case"string":return U(e.value);case"url":return`url(${U(e.value)})`;case"delim":return e.value==="\\"?`\\
2
+ `:e.value;case"CDO":return"<!--";case"CDC":return"-->";case"number":return e.repr;case"percentage":return`${e.repr}%`;case"dimension":return`${e.repr}${Ne(e.unit)}`;case"func":return`${$(e.name)}(${C(e.value)})`;case"block":return`${e.open}${C(e.value)}${pe[e.open]}`;case":":case";":case",":case"[":case"]":case"(":case")":case"{":case"}":return e.type;default:return""}}function C(e){let r="",n;for(let t of e)t.type==="whitespace"&&n?.type==="whitespace"||(n&&Le(ue(n),ue(t))&&(r+="/**/"),r+=ze(t),n=t);return r}var je=new Set(K),ye=new Set(Z),de=new Set(J),Me=new Set(Q),Ve=new Set(te),ce=/^#[A-Za-z_][A-Za-z0-9_.:-]*$/,x=e=>e.replace(/[A-Z]/g,r=>r.toLowerCase()),De=e=>x(e);function I(e,r,n){let t=[];for(let i of r){if(i.type==="bad-url"||i.type==="bad-string"){n({reason:"unreadable",...e?{name:e}:{}});return}if(i.type==="url"){if(e&&de.has(e)&&ce.test(i.value)){t.push({type:"func",name:"url",value:[{type:"string",value:i.value}]});continue}n({reason:"url",...e?{name:e}:{}});return}if(i.type==="func"){let o=x(i.name);if(o==="url"||o==="src"){let u=i.value.filter(p=>p.type!=="whitespace"),c=u[0];if(o==="url"&&u.length===1&&c?.type==="string"&&e&&de.has(e)&&ce.test(c.value)){t.push({type:"func",name:"url",value:[{type:"string",value:c.value}]});continue}n({reason:"url",...e?{name:e}:{}});return}if(!ye.has(o)){n({reason:"function",name:o});return}let a=I(e,i.value,n);if(!a)return;o==="var"?t.push({type:"whitespace"},{type:"func",name:o,value:a},{type:"whitespace"}):t.push({type:"func",name:o,value:a});continue}if(i.type==="block"){if(i.open==="{"||i.open==="("&&t.at(-1)?.type==="ident"){n({reason:"unreadable",...e?{name:e}:{}});return}let o=I(e,i.value,n);if(!o)return;t.push({type:"block",open:i.open,value:o});continue}if(i.type==="at-keyword"||i.type==="CDO"||i.type==="CDC"||i.type==="{"||i.type==="}"||i.type===";"||i.type==="delim"&&i.value==="\\"){n({reason:"unreadable",...e?{name:e}:{}});return}t.push(i)}return t}function z(e,r){let n=e.name.startsWith("--"),t=n?e.name:De(e.name);if(!n&&!je.has(t)){r({reason:"property",name:t});return}let i=ee[t];if(i){let u=e.value.filter(g=>g.type!=="whitespace"),c=u[0],p=u.length===1&&c?.type==="ident"?x(c.value):void 0;if(!p||![...i,"inherit","initial","unset","revert"].includes(p)){r({reason:"value",name:t});return}return`${t}: ${p}${e.important?" !important":""}`}let o=I(n?void 0:t,e.value,r);if(!o)return;let a=C(o).trim();return`${n?`--${N(e.name.slice(2))}`:t}: ${a}${e.important?" !important":""}`}function be(e,r){let n=t=>{for(let i=0;i<t.length;i+=1){let o=t[i];if(i>0&&t[i-1].type===":"&&(o.type==="ident"||o.type==="func")){let u=x(o.type==="ident"?o.value:o.name);if(Ve.has(u)||u.startsWith("-webkit-")||u.startsWith("-moz-"))return r({reason:"selector",name:u}),!1}if(o.type==="url"||o.type==="bad-url"||o.type==="bad-string"||o.type==="at-keyword"||o.type==="CDO"||o.type==="CDC"||o.type==="block"&&o.open==="{")return r({reason:"unreadable",name:"selector"}),!1;if(o.type==="func"&&!n(o.value)||o.type==="block"&&!n(o.value))return!1}return!0};return n(e)}function V(e,r,n){let t=[];for(let i of H(e))if(i.type==="declaration"){let o=z(i,r);o&&t.push(`${o};`)}else{let o=L(i,r,n+1,"style");o&&t.push(o)}return t.join(" ")}function Ue(e,r,n){let t=i=>i.every(o=>{if(o.type==="url"||o.type==="bad-url"||o.type==="bad-string"||o.type==="block"&&o.open==="{")return n({reason:o.type==="url"?"url":"unreadable",name:`@${r}`}),!1;if(o.type==="func"){let a=x(o.name);return r==="supports"&&a==="selector"?be(o.value,n):ye.has(a)?t(o.value):(n({reason:"function",name:a}),!1)}if(o.type==="block"){if(r==="supports"){let a=H(o.value);if(a.length===1&&a[0].type==="declaration")return z(a[0],n)!==void 0}return t(o.value)}return!0});return t(e)?C(e).trim():void 0}function G(e){return e.map((r,n)=>{let t=e[n-1],i=t?.type===":"||t?.type==="delim"&&(t.value==="."||t.value==="|");return r.type==="ident"&&!i&&Object.prototype.hasOwnProperty.call(v,x(r.value))?{type:"block",open:"[",value:[{type:"ident",value:"data-graview-as"},{type:"delim",value:"="},{type:"string",value:x(r.value)}]}:r.type==="func"?{type:"func",name:r.name,value:G(r.value)}:r.type==="block"&&r.open==="("?{type:"block",open:"(",value:G(r.value)}:r})}function L(e,r,n,t){if(n>fe){r({reason:"unreadable",name:"nesting"});return}if(e.type==="qualified"){if(t==="keyframes"){if(!e.prelude.every(g=>g.type==="whitespace"||g.type===","||g.type==="percentage"||g.type==="ident"&&["from","to"].includes(x(g.value)))){r({reason:"unreadable",name:"keyframe"});return}return`${C(e.prelude).trim()} { ${V(e.block,r,n)} }`}if(!be(e.prelude,r))return;let c=C(G(e.prelude)).trim();if(c===""){r({reason:"unreadable",name:"selector"});return}return`${c} { ${V(e.block,r,n)} }`}let i=x(e.name),o=i==="-webkit-keyframes"?"keyframes":i;if(!Me.has(o)||t==="keyframes"){r({reason:"at-rule",name:`@${i}`});return}if(!e.block){r({reason:"unreadable",name:`@${i}`});return}if(o==="keyframes"){if(t!=="sheet"){r({reason:"at-rule",name:"@keyframes"});return}let c=e.prelude.filter(b=>b.type!=="whitespace"),p=c[0];if(c.length!==1||!p||p.type!=="ident"&&p.type!=="string"){r({reason:"unreadable",name:"@keyframes"});return}let g=k(e.block,!1).map(b=>L(b,r,n+1,"keyframes")).filter(b=>b!==void 0);return`@keyframes ${p.type==="ident"?$(p.value):U(p.value)} { ${g.join(" ")} }`}let a=Ue(e.prelude,o,r);if(a===void 0)return;let u=t==="style"?V(e.block,r,n):k(e.block,!1).map(c=>L(c,r,n+1,"sheet")).filter(c=>c!==void 0).join(" ");return`@${o} ${a} { ${u} }`}function Ie(e,r=T){let n=[];if(e.length>r)return{css:"",refused:[{reason:"size"}]};let t=o=>void n.push(o);return{css:k(W(e),!0).map(o=>L(o,t,0,"sheet")).filter(o=>o!==void 0).join(`
3
+ `),refused:n}}function nt(e,r=T){let n=[],t=[],i=0;for(let o of e){if(i+o.length>r){t.push({reason:"size"});continue}i+=o.length;let a=Ie(o,r);a.css&&n.push(a.css),t.push(...a.refused)}return{css:n.join(`
4
+ `),refused:t}}function he(e,r=T){let n=[];if(e.length>r)return{css:"",refused:[{reason:"size"}]};let t=o=>void n.push(o),i=[];for(let o of H(W(e))){if(o.type!=="declaration"){t({reason:"unreadable",name:"a rule in a style attribute"});continue}let a=z(o,t);a&&i.push(a)}return{css:i.join("; "),refused:n}}function xe(e,r){let n,t=z(ge(e,W(r)),i=>n??=i);return t===void 0||n?{refused:n??{reason:"unreadable",name:e}}:{value:t.slice(t.indexOf(":")+1).trim()}}function at(e,r){if(r==="svg"){let t=re(e);return t?{namespace:"svg",name:t}:{refused:{reason:"element",element:e}}}let n=e.toLowerCase();return n==="svg"?{namespace:"svg",name:"svg"}:Object.prototype.hasOwnProperty.call(A,n)?Object.prototype.hasOwnProperty.call(v,n)?{namespace:"html",name:v[n],as:n}:{namespace:"html",name:n}:{refused:{reason:"element",element:e}}}function st(e,r){return(e==="html"?A[r]:_[r])?.empty===!0}var Ge=/^[+-]?(\d+\.?\d*|\.\d+)([eE][+-]?\d+)?$/,Be=/^[0-9A-Za-z\s.,+\-%()]*$/,Fe=/^#[A-Za-z_][A-Za-z0-9_.:-]*$/,He=/^data:image\/(png|gif|jpeg|webp|avif|bmp|svg\+xml)(;[A-Za-z0-9=._+-]+)*,/i,We=/^\/graview\/assets\/[0-9a-f]{64}\.(png|gif|jpe?g|webp|avif|svg|ico)$/,we=/\/graview\/assets\/[0-9a-f]{64}\.(png|gif|jpe?g|webp|avif|svg|ico)$/,Xe=/^\/(?!\/)(?!(?:.*\/)?\.\.?(?:\/|$))(?!.*%(?:2e|2f|5c))[^\\\s?#"'<>]*$/i;function qe(e,r){if(We.test(e))return e;let n=e;if(/^https?:\/\//i.test(e))try{let t=new URL(e);if(r==="null"||t.origin!==r||t.username!==""||t.password!==""||t.search!==""||t.hash!=="")return;n=e.slice(t.origin.length)}catch{return}if(Xe.test(n))return we.exec(n)?.[0]}function lt(e,r={},n){let t=e.length>120?`${e.slice(0,119)}\u2026`:e,i=ke(r.origins),o=we.exec(e.split(/[?#]/)[0])?.[0],a=n!==void 0&&n>S?` It is a data: image of ${n.toLocaleString("en-US")} characters, more than the ${S.toLocaleString("en-US")} a view's own data: image may be. A picture on a record is drawn at any size by the src the host hands the view (pictures in its manifest), used as it was handed.`:o?r.assets?` It is the app's own image only by its path, or under the app's base on this page's origin: write it as its path, ${o}.`:" This host has not said where the app's own images live (asset, on the view's definition), so a view here cannot draw one by its path.":/^https:\/\//i.test(e)?i.length>0?` Its origin is not one the host lists for images (${i.join(", ")}).`:" The host lists no origin a view's images may come from (images.origins, on the view's definition).":"",u=["a data: image",...r.assets?["the app's own image by the path add_image answered (/graview/assets/<sha256>.<ext>)"]:[],"a picture on a record (pictures in its manifest)",...i.length>0?[`an https: image from ${i.join(", ")}`]:[]];return`The image "${t}" was not drawn.${a} A view here shows ${u.slice(0,-1).join(", ")} or ${u[u.length-1]}.`}function ke(e){return(e??[]).flatMap(r=>{try{let n=new URL(r);return n.protocol==="https:"&&n.hostname!==""&&n.username===""&&n.password===""?[n.origin]:[]}catch{return[]}})}function Ye(e,r){if(!(!r||r.length===0||!/^https:\/\//i.test(e)))try{let n=new URL(e);return n.protocol!=="https:"||n.username!==""||n.password!==""?void 0:ke(r).includes(n.origin)?n.href:void 0}catch{return}}function ut(e,r,n,t,i){let o=oe(e,r,n);if(!o)return{refused:{reason:"attribute",element:r,name:n}};if(e==="html"&&Y[r]?.includes(o.name))return{refused:{reason:"attribute",element:r,name:n}};if(t===null)return{name:o.name,value:null};let a=Ke(o.name,o.kind,t,i);return"refused"in a?{refused:{...a.refused,element:r,...o.kind==="image"&&a.refused.reason==="url"?{address:t.slice(0,200),...t.length>S?{length:t.length}:{}}:{},...o.kind==="link"?{address:t.slice(0,200)}:{}}}:o.name==="role"&&a.value.split(/\s+/).some(u=>q.includes(u.toLowerCase()))?{refused:{reason:"value",element:r,name:n}}:o.name==="aria-live"&&!["polite","off"].includes(a.value.toLowerCase())?{refused:{reason:"value",element:r,name:n}}:{name:o.name,value:a.value,...a.dropped?{dropped:a.dropped.map(u=>({reason:u.reason==="url"?"url":"css",element:r,name:o.name,css:u}))}:{}}}function Ke(e,r,n,t){let i=(o,a)=>({refused:{reason:o,name:e,...a?{css:a}:{}}});if(r==="geometry")return n.length>ne||!Be.test(n)||/url/i.test(n)?i("value"):{value:n};if(r==="image"){let o=t.picture?.(n);if(o!==void 0)return{value:o};if(n.length>S)return i("url");if(He.test(n))return{value:n};if(n.startsWith(`blob:${t.origin}/`)&&/^blob:[^\s"'<>]+$/.test(n))return{value:n};let a=t.asset?qe(n,t.origin):void 0;if(a!==void 0){let c=t.asset(a);if(c)return{value:c}}let u=Ye(n,t.imageOrigins);return u?{value:u}:i("url")}if(r==="link"){let o=t.link?.(n);return o===void 0?i("url"):{value:o}}if(n.length>M)return i("value");if(typeof r=="object"){let o=r.oneOf.find(a=>a.toLowerCase()===n.toLowerCase());return o===void 0?i("value"):{value:o}}switch(r){case"text":return{value:n};case"number":return Ge.test(n.trim())&&Number.isFinite(Number(n))?{value:n.trim()}:i("value");case"boolean":return{value:""};case"fragment":return Fe.test(n)?{value:n}:i("url");case"style":{let o=he(n,M);return o.refused.length>0&&o.css===""?i(o.refused[0].reason==="url"?"url":"css",o.refused[0]):{value:o.css,...o.refused.length>0?{dropped:o.refused}:{}}}case"css":{let o=xe(e,n);return"refused"in o?i(o.refused.reason==="url"?"url":"css",o.refused):{value:o.value}}}}export{Ze as a,Je as b,Qe as c,nt as d,at as e,st as f,lt as g,ut as h};