graview 0.1.61 → 0.1.63

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 (232) hide show
  1. package/dist/index.d.ts +1 -1
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +11 -7
  4. package/dist/index.js.map +1 -1
  5. package/dist/preview/{chunk.JEQO24GS.js → chunk.24HNOLUS.js} +1 -1
  6. package/dist/preview/chunk.25CQCCLN.js +1 -0
  7. package/dist/preview/{chunk.C634A6ZC.js → chunk.26H33GJC.js} +1 -1
  8. package/dist/preview/chunk.2F4AZZQR.js +1 -0
  9. package/dist/preview/chunk.2KIWGQXC.js +2 -0
  10. package/dist/preview/{chunk.IA5ZBMRD.js → chunk.2PJ6STKA.js} +1 -1
  11. package/dist/preview/{chunk.7LZ6JDJA.js → chunk.2RASWDMQ.js} +2 -2
  12. package/dist/preview/chunk.33XNYHI6.js +1 -0
  13. package/dist/preview/{chunk.SJALH7IX.js → chunk.34DRUCH2.js} +1 -1
  14. package/dist/preview/{chunk.SKQO467Y.js → chunk.36OE6RKG.js} +1 -1
  15. package/dist/preview/{chunk.3SMNWZ3M.js → chunk.37FLKAVZ.js} +1 -1
  16. package/dist/preview/chunk.3JCHJLH6.js +1 -0
  17. package/dist/preview/chunk.3L37FY3G.js +4 -0
  18. package/dist/preview/chunk.3OQ6S6H4.js +1 -0
  19. package/dist/preview/chunk.47QEWSSE.js +1 -0
  20. package/dist/preview/{chunk.W5TVQYAI.js → chunk.4DAKQXDG.js} +1 -1
  21. package/dist/preview/{chunk.BI6DS3PZ.js → chunk.4EXC26LI.js} +1 -1
  22. package/dist/preview/{chunk.ZKAZA6UJ.js → chunk.4MEQUUG4.js} +1 -1
  23. package/dist/preview/{chunk.LA2DMHZC.js → chunk.4TH3CGAZ.js} +1 -1
  24. package/dist/preview/{chunk.5POG3G2C.js → chunk.57YDGGJK.js} +1 -1
  25. package/dist/preview/chunk.5GC4VAHU.js +1 -0
  26. package/dist/preview/{chunk.XZWXDQ3N.js → chunk.5QXQ7PBI.js} +1 -1
  27. package/dist/preview/chunk.6CSHRMJC.js +1 -0
  28. package/dist/preview/chunk.6HKWAHPT.js +1 -0
  29. package/dist/preview/{chunk.ULHB3RYK.js → chunk.6XHPBJ5F.js} +1 -1
  30. package/dist/preview/chunk.6YK5E7ZQ.js +4 -0
  31. package/dist/preview/{chunk.UACSX64H.js → chunk.6Z2GHQQH.js} +3 -3
  32. package/dist/preview/chunk.72YXFJKC.js +2 -0
  33. package/dist/preview/{chunk.XFSGB6EU.js → chunk.735AFUP5.js} +1 -1
  34. package/dist/preview/chunk.75GENXGP.js +1 -0
  35. package/dist/preview/{chunk.SBLYBRDU.js → chunk.A2R53GWF.js} +1 -1
  36. package/dist/preview/{chunk.7R727IKU.js → chunk.AHPYNDVA.js} +2 -2
  37. package/dist/preview/chunk.ATDIDPKZ.js +1 -0
  38. package/dist/preview/{chunk.HQNE4I4M.js → chunk.AW26EETU.js} +1 -1
  39. package/dist/preview/chunk.AWUO3M5D.js +1 -0
  40. package/dist/preview/chunk.B46UZHGW.js +1 -0
  41. package/dist/preview/{chunk.WS7LAT4Z.js → chunk.B5PJCYBU.js} +1 -1
  42. package/dist/preview/chunk.BF3EZCG3.js +1 -0
  43. package/dist/preview/chunk.BIDL7GQD.js +0 -0
  44. package/dist/preview/chunk.BKQICGFW.js +1 -0
  45. package/dist/preview/{chunk.6HZY5NRX.js → chunk.BN7C5ZYX.js} +1 -1
  46. package/dist/preview/chunk.BQM3YAMR.js +35 -0
  47. package/dist/preview/chunk.C65EHQ7V.js +1 -0
  48. package/dist/preview/{chunk.3FUUYYR5.js → chunk.CAXILB7K.js} +1 -1
  49. package/dist/preview/{chunk.NUEPFPRA.js → chunk.CCQMDZHO.js} +1 -1
  50. package/dist/preview/{chunk.HOQMD6WQ.js → chunk.CGK2PY76.js} +14 -14
  51. package/dist/preview/chunk.CI4RZL4Z.js +1 -0
  52. package/dist/preview/chunk.CXDGE5ZS.js +1 -0
  53. package/dist/preview/chunk.CYTTZOYL.js +25 -0
  54. package/dist/preview/chunk.D5LOTCBU.js +3 -0
  55. package/dist/preview/chunk.DBFJVVWF.js +1 -0
  56. package/dist/preview/{chunk.A2ZQASQV.js → chunk.DDFRFSVN.js} +1 -1
  57. package/dist/preview/{chunk.UXOBUK3C.js → chunk.DIFIHNR3.js} +1 -1
  58. package/dist/preview/chunk.DVSTLVIH.js +15 -0
  59. package/dist/preview/chunk.DWK3GXRR.js +1 -0
  60. package/dist/preview/{chunk.2QFKNTAZ.js → chunk.DZSZUX34.js} +1 -1
  61. package/dist/preview/chunk.E3XJMO7Q.js +1 -0
  62. package/dist/preview/chunk.EJ2WE764.js +18 -0
  63. package/dist/preview/{chunk.SAYAFOF6.js → chunk.EJ4MSVX2.js} +1 -1
  64. package/dist/preview/chunk.ERPILTRY.js +1 -0
  65. package/dist/preview/chunk.FFXBDOKA.js +1 -0
  66. package/dist/preview/chunk.FGDGTES4.js +20 -0
  67. package/dist/preview/chunk.FNVGNISQ.js +3 -0
  68. package/dist/preview/chunk.FXCQJPN4.js +6 -0
  69. package/dist/preview/chunk.G2JAYG2Z.js +1 -0
  70. package/dist/preview/chunk.GHN62OMG.js +32 -0
  71. package/dist/preview/{chunk.F4VHCQNP.js → chunk.H5SN46VK.js} +1 -1
  72. package/dist/preview/{chunk.2XSIJH5J.js → chunk.H7AH3IW4.js} +1 -1
  73. package/dist/preview/{chunk.GI6XQF5X.js → chunk.HMMK7LCL.js} +1 -1
  74. package/dist/preview/{chunk.WICFQROI.js → chunk.HOFATBGD.js} +1 -1
  75. package/dist/preview/{chunk.PJ5AO7CK.js → chunk.HRNNRA2I.js} +1 -1
  76. package/dist/preview/{chunk.E7UDVC4V.js → chunk.HSMJHCR3.js} +1 -1
  77. package/dist/preview/{chunk.6SO64TUI.js → chunk.IEDCFSN5.js} +1 -1
  78. package/dist/preview/{chunk.VYFMUCBT.js → chunk.JIEDJEHK.js} +1 -1
  79. package/dist/preview/chunk.JNIDS66Z.js +1 -0
  80. package/dist/preview/{chunk.DHY7KOBV.js → chunk.JO3BBRSR.js} +1 -1
  81. package/dist/preview/chunk.JVDPRQ7J.js +1 -0
  82. package/dist/preview/chunk.K2HDEL7I.js +1 -0
  83. package/dist/preview/chunk.K7TK3KRB.js +7 -0
  84. package/dist/preview/{chunk.U2ISOUM2.js → chunk.KB5BCW23.js} +1 -1
  85. package/dist/preview/{chunk.EN2ABVIP.js → chunk.KL5H7KEV.js} +1 -1
  86. package/dist/preview/{chunk.ZC3FRCJQ.js → chunk.KPQLM4TM.js} +1 -1
  87. package/dist/preview/{chunk.R3N73BJO.js → chunk.KQPKYWDM.js} +1 -1
  88. package/dist/preview/{chunk.6DOOLVT4.js → chunk.KXFNRJ46.js} +1 -1
  89. package/dist/preview/chunk.KZUMXT5J.js +74 -0
  90. package/dist/preview/chunk.MAHNJO6U.js +1 -0
  91. package/dist/preview/{chunk.VN7I7XIO.js → chunk.MBB5A6BT.js} +1 -1
  92. package/dist/preview/chunk.MENLUNM5.js +1 -0
  93. package/dist/preview/{chunk.747OH3EE.js → chunk.MIE3ODQ2.js} +1 -1
  94. package/dist/preview/chunk.MT5DXJKN.js +1 -0
  95. package/dist/preview/chunk.MY5HJW2Z.js +1 -0
  96. package/dist/preview/{chunk.4LG34OC2.js → chunk.N3T2O6EW.js} +2 -2
  97. package/dist/preview/{chunk.E6RNMWFN.js → chunk.NEPQBMFT.js} +1 -1
  98. package/dist/preview/{chunk.ISRQQVS4.js → chunk.NIAM7OTV.js} +1 -1
  99. package/dist/preview/{chunk.5IEFTFKQ.js → chunk.NJSK3UO2.js} +1 -1
  100. package/dist/preview/chunk.NTC2H5ZX.js +1 -0
  101. package/dist/preview/chunk.NWWJNNEK.js +2 -0
  102. package/dist/preview/{chunk.6VLCMBRE.js → chunk.O3YIWIVQ.js} +1 -1
  103. package/dist/preview/chunk.O67JXUVG.js +1 -0
  104. package/dist/preview/{chunk.CRCJ3TAG.js → chunk.OIMGD7FR.js} +1 -1
  105. package/dist/preview/{chunk.ZJCM62GH.js → chunk.OM2NIQWA.js} +1 -1
  106. package/dist/preview/chunk.OMRQTLI5.js +1 -0
  107. package/dist/preview/{chunk.BDTT4ENI.js → chunk.OTSBF367.js} +2 -2
  108. package/dist/preview/{chunk.MU3XII7I.js → chunk.OXWOUE3W.js} +1 -1
  109. package/dist/preview/chunk.PDMX3GTL.js +1 -0
  110. package/dist/preview/{chunk.SIYBHZDD.js → chunk.PDS4HT46.js} +1 -1
  111. package/dist/preview/chunk.PWAP2GJS.js +1 -0
  112. package/dist/preview/chunk.Q2EGESEZ.js +1 -0
  113. package/dist/preview/{chunk.DHJI7LIW.js → chunk.Q4GJIJAU.js} +1 -1
  114. package/dist/preview/chunk.Q4MI53KK.js +5 -0
  115. package/dist/preview/chunk.Q5WEOX3Q.js +1 -0
  116. package/dist/preview/{chunk.2LNSENPV.js → chunk.QAMW5QDT.js} +1 -1
  117. package/dist/preview/{chunk.WD4VPMEE.js → chunk.QS32TO4N.js} +1 -1
  118. package/dist/preview/chunk.QSPLKCTX.js +1 -0
  119. package/dist/preview/chunk.R4HDKNT3.js +88 -0
  120. package/dist/preview/chunk.REUMBCSV.js +1 -0
  121. package/dist/preview/{chunk.CUTLO6DA.js → chunk.RUFYORIJ.js} +1 -1
  122. package/dist/preview/{chunk.PYVWGTQS.js → chunk.SGPXYDSG.js} +1 -1
  123. package/dist/preview/chunk.SJUXFPTI.js +1 -0
  124. package/dist/preview/{chunk.MBPOYZ3J.js → chunk.SME4HD5I.js} +1 -1
  125. package/dist/preview/{chunk.XZUHFXME.js → chunk.SMHP2CQH.js} +1 -1
  126. package/dist/preview/chunk.SSAETRHR.js +5 -0
  127. package/dist/preview/{chunk.PZXTSWDH.js → chunk.STDJ6XG5.js} +1 -1
  128. package/dist/preview/{chunk.66IKLMYX.js → chunk.T3JIZNE7.js} +2 -2
  129. package/dist/preview/chunk.T535ZLRM.js +1 -0
  130. package/dist/preview/chunk.T6PU3NKP.js +1 -0
  131. package/dist/preview/{chunk.U3JK2DNC.js → chunk.UAVK54Z6.js} +1 -1
  132. package/dist/preview/{chunk.EVEHSENK.js → chunk.V4HVFLFQ.js} +1 -1
  133. package/dist/preview/chunk.V6IL7CIZ.js +1 -0
  134. package/dist/preview/{chunk.ZVG3DR5G.js → chunk.VCTAFSZ5.js} +1 -1
  135. package/dist/preview/{chunk.GIW657OR.js → chunk.VZDHRY3U.js} +2 -1
  136. package/dist/preview/chunk.WBS7ND2C.js +1 -0
  137. package/dist/preview/chunk.WNS5LEO5.js +1 -0
  138. package/dist/preview/chunk.WUVXIUA7.js +1 -0
  139. package/dist/preview/{chunk.JHAFQNGC.js → chunk.WYPCLZL7.js} +1 -1
  140. package/dist/preview/{chunk.DLDP6OWD.js → chunk.XBYJCGPU.js} +1 -1
  141. package/dist/preview/{chunk.65KFZV3A.js → chunk.XCEZCOX4.js} +1 -1
  142. package/dist/preview/{chunk.KRFRREEW.js → chunk.XCWZFLIB.js} +1 -1
  143. package/dist/preview/chunk.XIW4SZHD.js +1 -0
  144. package/dist/preview/{chunk.MK72IRIY.js → chunk.XUO67YMT.js} +1 -1
  145. package/dist/preview/{chunk.FWUG7Y6C.js → chunk.XUXZW7DU.js} +1 -1
  146. package/dist/preview/chunk.XYGNS637.js +1 -0
  147. package/dist/preview/{chunk.FJIXSGYU.js → chunk.Y4ZM75WL.js} +1 -1
  148. package/dist/preview/{chunk.D5Q64GA4.js → chunk.YOUB3J3Y.js} +1 -1
  149. package/dist/preview/{chunk.3HFUO3DC.js → chunk.YXAKHXYB.js} +1 -1
  150. package/dist/preview/chunk.YZBJUAS6.js +1 -0
  151. package/dist/preview/chunk.Z2ZQJ3DD.js +1 -0
  152. package/dist/preview/chunk.ZELWW7UA.js +21 -0
  153. package/dist/preview/{chunk.YGIJDHAV.js → chunk.ZLTHWCKL.js} +2 -2
  154. package/dist/preview/chunk.ZP7JEVVU.js +1 -0
  155. package/dist/preview/chunk.ZRH5X3MR.js +1 -0
  156. package/dist/preview/{chunk.R5547CJ7.js → chunk.ZSGDVNVN.js} +1 -1
  157. package/dist/preview/chunk.ZVG4FXJK.js +1 -0
  158. package/dist/preview/chunk.ZY7US4Y7.js +6 -0
  159. package/dist/preview/{chunk.GQNSNJTJ.js → chunk.ZZAI57VI.js} +1 -1
  160. package/dist/preview/index.html +54 -51
  161. package/dist/preview/page.js +2 -2
  162. package/dist/preview/splash.js +58 -0
  163. package/package.json +6 -6
  164. package/dist/preview/chunk.2AWVQ5SW.js +0 -1
  165. package/dist/preview/chunk.2WZAFKJ2.js +0 -2
  166. package/dist/preview/chunk.3ICWPRRJ.js +0 -1
  167. package/dist/preview/chunk.3RW677X6.js +0 -1
  168. package/dist/preview/chunk.4G32374Q.js +0 -1
  169. package/dist/preview/chunk.4OEWFPH3.js +0 -1
  170. package/dist/preview/chunk.4STDIZVI.js +0 -2
  171. package/dist/preview/chunk.5S7IGASX.js +0 -28
  172. package/dist/preview/chunk.5T53SF2K.js +0 -1
  173. package/dist/preview/chunk.5X22RKB3.js +0 -1
  174. package/dist/preview/chunk.644FUGSX.js +0 -1
  175. package/dist/preview/chunk.7CETF4A6.js +0 -1
  176. package/dist/preview/chunk.AVFOTYZR.js +0 -74
  177. package/dist/preview/chunk.BFDJTWGX.js +0 -88
  178. package/dist/preview/chunk.BJI2C3IZ.js +0 -1
  179. package/dist/preview/chunk.D4TA5XDC.js +0 -4
  180. package/dist/preview/chunk.DKXVEVDG.js +0 -1
  181. package/dist/preview/chunk.DP5DUV6F.js +0 -6
  182. package/dist/preview/chunk.DXWTM4SH.js +0 -1
  183. package/dist/preview/chunk.F7IQ4B6A.js +0 -1
  184. package/dist/preview/chunk.F7PIW2EM.js +0 -5
  185. package/dist/preview/chunk.G4VMRYS4.js +0 -1
  186. package/dist/preview/chunk.GPWYWALF.js +0 -1
  187. package/dist/preview/chunk.HGVBGSRS.js +0 -6
  188. package/dist/preview/chunk.HZHNM2KI.js +0 -3
  189. package/dist/preview/chunk.ISXNAFRC.js +0 -20
  190. package/dist/preview/chunk.JU3BCCQM.js +0 -1
  191. package/dist/preview/chunk.K2AC536Q.js +0 -21
  192. package/dist/preview/chunk.K3UOXAZS.js +0 -1
  193. package/dist/preview/chunk.KNYLY7MH.js +0 -1
  194. package/dist/preview/chunk.LQAT7FA6.js +0 -3
  195. package/dist/preview/chunk.LTI5PKTS.js +0 -1
  196. package/dist/preview/chunk.MBP7VDYM.js +0 -1
  197. package/dist/preview/chunk.MBU7UH6J.js +0 -1
  198. package/dist/preview/chunk.MH6CCHEX.js +0 -1
  199. package/dist/preview/chunk.MNRTA2CB.js +0 -1
  200. package/dist/preview/chunk.MYVED5LU.js +0 -1
  201. package/dist/preview/chunk.N5WDQAIM.js +0 -5
  202. package/dist/preview/chunk.N7T7VB77.js +0 -25
  203. package/dist/preview/chunk.ODVRO2BJ.js +0 -1
  204. package/dist/preview/chunk.OVPFROL3.js +0 -1
  205. package/dist/preview/chunk.PGA5TUSN.js +0 -1
  206. package/dist/preview/chunk.PHC2MI4C.js +0 -1
  207. package/dist/preview/chunk.PXQVXBNG.js +0 -1
  208. package/dist/preview/chunk.Q5I5M3FR.js +0 -1
  209. package/dist/preview/chunk.QATUGE34.js +0 -1
  210. package/dist/preview/chunk.QL77K3D4.js +0 -1
  211. package/dist/preview/chunk.QUJS63OJ.js +0 -13
  212. package/dist/preview/chunk.REH6RXNH.js +0 -1
  213. package/dist/preview/chunk.RZ5PPQBV.js +0 -1
  214. package/dist/preview/chunk.SCGF4ZPP.js +0 -1
  215. package/dist/preview/chunk.SLAZFFCQ.js +0 -1
  216. package/dist/preview/chunk.SLPJWOKC.js +0 -1
  217. package/dist/preview/chunk.TKLYUVMR.js +0 -32
  218. package/dist/preview/chunk.TKUNRFDE.js +0 -1
  219. package/dist/preview/chunk.TMAZNDA6.js +0 -1
  220. package/dist/preview/chunk.UDCDK7XJ.js +0 -4
  221. package/dist/preview/chunk.UO544PZH.js +0 -1
  222. package/dist/preview/chunk.VKHAAH32.js +0 -1
  223. package/dist/preview/chunk.VOOOIECX.js +0 -1
  224. package/dist/preview/chunk.VS6NT5C4.js +0 -1
  225. package/dist/preview/chunk.VUAOCYG2.js +0 -1
  226. package/dist/preview/chunk.VX65S2FA.js +0 -1
  227. package/dist/preview/chunk.X2I3XH2E.js +0 -2
  228. package/dist/preview/chunk.XWWSW3ZV.js +0 -7
  229. package/dist/preview/chunk.Y7H5O2SL.js +0 -1
  230. package/dist/preview/chunk.YOT7ESDG.js +0 -18
  231. package/dist/preview/chunk.ZQHCNFJK.js +0 -1
  232. package/dist/preview/chunk.ZYNUMVEC.js +0 -1
@@ -1,5 +1,5 @@
1
- import{G as P}from"./chunk.N7T7VB77.js";import{Cc as b,Dc as $,Ec as y,Fc as k,Gc as _,Xc as O,Zc as S,ad as T,bd as E}from"./chunk.F7PIW2EM.js";import{a as x}from"./chunk.AJZBJBMO.js";var D=x(l=>{"use strict";var U=P();function C(r){var e="https://react.dev/errors/"+r;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)e+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+r+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(){}var s={d:{f:d,r:function(){throw Error(C(522))},D:d,C:d,L:d,m:d,X:d,S:d,M:d},p:0,findDOMNode:null},V=Symbol.for("react.portal");function j(r,e,a){var t=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:V,key:t==null?null:""+t,children:r,containerInfo:e,implementation:a}}var u=U.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(r,e){if(r==="font")return"";if(typeof e=="string")return e==="use-credentials"?e:""}l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s;l.createPortal=function(r,e){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)throw Error(C(299));return j(r,e,null,a)};l.flushSync=function(r){var e=u.T,a=s.p;try{if(u.T=null,s.p=2,r)return r()}finally{u.T=e,s.p=a,s.d.f()}};l.preconnect=function(r,e){typeof r=="string"&&(e?(e=e.crossOrigin,e=typeof e=="string"?e==="use-credentials"?e:"":void 0):e=null,s.d.C(r,e))};l.prefetchDNS=function(r){typeof r=="string"&&s.d.D(r)};l.preinit=function(r,e){if(typeof r=="string"&&e&&typeof e.as=="string"){var a=e.as,t=h(a,e.crossOrigin),n=typeof e.integrity=="string"?e.integrity:void 0,i=typeof e.fetchPriority=="string"?e.fetchPriority:void 0;a==="style"?s.d.S(r,typeof e.precedence=="string"?e.precedence:void 0,{crossOrigin:t,integrity:n,fetchPriority:i}):a==="script"&&s.d.X(r,{crossOrigin:t,integrity:n,fetchPriority:i,nonce:typeof e.nonce=="string"?e.nonce:void 0})}};l.preinitModule=function(r,e){if(typeof r=="string")if(typeof e=="object"&&e!==null){if(e.as==null||e.as==="script"){var a=h(e.as,e.crossOrigin);s.d.M(r,{crossOrigin:a,integrity:typeof e.integrity=="string"?e.integrity:void 0,nonce:typeof e.nonce=="string"?e.nonce:void 0})}}else e==null&&s.d.M(r)};l.preload=function(r,e){if(typeof r=="string"&&typeof e=="object"&&e!==null&&typeof e.as=="string"){var a=e.as,t=h(a,e.crossOrigin);s.d.L(r,a,{crossOrigin:t,integrity:typeof e.integrity=="string"?e.integrity:void 0,nonce:typeof e.nonce=="string"?e.nonce:void 0,type:typeof e.type=="string"?e.type:void 0,fetchPriority:typeof e.fetchPriority=="string"?e.fetchPriority:void 0,referrerPolicy:typeof e.referrerPolicy=="string"?e.referrerPolicy:void 0,imageSrcSet:typeof e.imageSrcSet=="string"?e.imageSrcSet:void 0,imageSizes:typeof e.imageSizes=="string"?e.imageSizes:void 0,media:typeof e.media=="string"?e.media:void 0})}};l.preloadModule=function(r,e){if(typeof r=="string")if(e){var a=h(e.as,e.crossOrigin);s.d.m(r,{as:typeof e.as=="string"&&e.as!=="script"?e.as:void 0,crossOrigin:a,integrity:typeof e.integrity=="string"?e.integrity:void 0})}else s.d.m(r)};l.requestFormReset=function(r){s.d.r(r)};l.unstable_batchedUpdates=function(r,e){return r(e)};l.useFormState=function(r,e,a){return u.H.useFormState(r,e,a)};l.useFormStatus=function(){return u.H.useHostTransitionStatus()};l.version="19.2.8"});var W=x((X,L)=>{"use strict";function N(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(N)}catch(r){console.error(r)}}N(),L.exports=D()});var I={name:"Graview",typography:{body:y.body,mono:y.mono},schemes:$},R={ground:"--graview-ground",groundDeep:"--graview-ground-deep",wash:"--graview-wash",panel:"--graview-panel",panelMuted:"--graview-panel-muted",panelWarning:"--graview-panel-warning",edge:"--graview-edge",edgeBright:"--graview-edge-bright",ink:"--graview-ink",inkMuted:"--graview-ink-muted",inkFaint:"--graview-ink-faint",accent:"--graview-accent",accentDim:"--graview-accent-dim",accentInk:"--graview-accent-ink",warn:"--graview-warn",good:"--graview-good",bad:"--graview-bad",glow:"--graview-glow",bar:"--graview-bar",float:"--graview-float",liftLow:"--graview-lift-low",liftHigh:"--graview-lift-high",tintAlpha:"--graview-tint-alpha",tintLightness:"--graview-tint-lightness",gridAlpha:"--graview-grid-alpha"};function B(r){return Object.keys(R).map(e=>` ${R[e]}: ${r[e]};`).join(`
2
- `)}function A(r,e){let a=r===e?r:`${r} ${e}`;return` ${a} [data-graview-view] { transition: none; }
1
+ import{G as I}from"./chunk.CYTTZOYL.js";import{$c as x,Rc as $,Sc as k,Tc as y,Uc as _,Vc as O,ld as S,nd as T,qd as E,rd as R}from"./chunk.Q4MI53KK.js";import{a as b}from"./chunk.AJZBJBMO.js";var N=b(l=>{"use strict";var V=I();function D(r){var e="https://react.dev/errors/"+r;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)e+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+r+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(){}var s={d:{f:d,r:function(){throw Error(D(522))},D:d,C:d,L:d,m:d,X:d,S:d,M:d},p:0,findDOMNode:null},j=Symbol.for("react.portal");function W(r,e,a){var t=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:j,key:t==null?null:""+t,children:r,containerInfo:e,implementation:a}}var u=V.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(r,e){if(r==="font")return"";if(typeof e=="string")return e==="use-credentials"?e:""}l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s;l.createPortal=function(r,e){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)throw Error(D(299));return W(r,e,null,a)};l.flushSync=function(r){var e=u.T,a=s.p;try{if(u.T=null,s.p=2,r)return r()}finally{u.T=e,s.p=a,s.d.f()}};l.preconnect=function(r,e){typeof r=="string"&&(e?(e=e.crossOrigin,e=typeof e=="string"?e==="use-credentials"?e:"":void 0):e=null,s.d.C(r,e))};l.prefetchDNS=function(r){typeof r=="string"&&s.d.D(r)};l.preinit=function(r,e){if(typeof r=="string"&&e&&typeof e.as=="string"){var a=e.as,t=h(a,e.crossOrigin),n=typeof e.integrity=="string"?e.integrity:void 0,i=typeof e.fetchPriority=="string"?e.fetchPriority:void 0;a==="style"?s.d.S(r,typeof e.precedence=="string"?e.precedence:void 0,{crossOrigin:t,integrity:n,fetchPriority:i}):a==="script"&&s.d.X(r,{crossOrigin:t,integrity:n,fetchPriority:i,nonce:typeof e.nonce=="string"?e.nonce:void 0})}};l.preinitModule=function(r,e){if(typeof r=="string")if(typeof e=="object"&&e!==null){if(e.as==null||e.as==="script"){var a=h(e.as,e.crossOrigin);s.d.M(r,{crossOrigin:a,integrity:typeof e.integrity=="string"?e.integrity:void 0,nonce:typeof e.nonce=="string"?e.nonce:void 0})}}else e==null&&s.d.M(r)};l.preload=function(r,e){if(typeof r=="string"&&typeof e=="object"&&e!==null&&typeof e.as=="string"){var a=e.as,t=h(a,e.crossOrigin);s.d.L(r,a,{crossOrigin:t,integrity:typeof e.integrity=="string"?e.integrity:void 0,nonce:typeof e.nonce=="string"?e.nonce:void 0,type:typeof e.type=="string"?e.type:void 0,fetchPriority:typeof e.fetchPriority=="string"?e.fetchPriority:void 0,referrerPolicy:typeof e.referrerPolicy=="string"?e.referrerPolicy:void 0,imageSrcSet:typeof e.imageSrcSet=="string"?e.imageSrcSet:void 0,imageSizes:typeof e.imageSizes=="string"?e.imageSizes:void 0,media:typeof e.media=="string"?e.media:void 0})}};l.preloadModule=function(r,e){if(typeof r=="string")if(e){var a=h(e.as,e.crossOrigin);s.d.m(r,{as:typeof e.as=="string"&&e.as!=="script"?e.as:void 0,crossOrigin:a,integrity:typeof e.integrity=="string"?e.integrity:void 0})}else s.d.m(r)};l.requestFormReset=function(r){s.d.r(r)};l.unstable_batchedUpdates=function(r,e){return r(e)};l.useFormState=function(r,e,a){return u.H.useFormState(r,e,a)};l.useFormStatus=function(){return u.H.useHostTransitionStatus()};l.version="19.2.8"});var Y=b((J,P)=>{"use strict";function L(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(L)}catch(r){console.error(r)}}L(),P.exports=N()});var B={name:"Graview",typography:{body:y.body,mono:y.mono},schemes:k},A={ground:"--graview-ground",groundDeep:"--graview-ground-deep",wash:"--graview-wash",panel:"--graview-panel",panelMuted:"--graview-panel-muted",panelWarning:"--graview-panel-warning",edge:"--graview-edge",edgeBright:"--graview-edge-bright",ink:"--graview-ink",inkMuted:"--graview-ink-muted",inkFaint:"--graview-ink-faint",accent:"--graview-accent",accentDim:"--graview-accent-dim",accentInk:"--graview-accent-ink",warn:"--graview-warn",good:"--graview-good",bad:"--graview-bad",glow:"--graview-glow",bar:"--graview-bar",float:"--graview-float",liftLow:"--graview-lift-low",liftHigh:"--graview-lift-high",tintAlpha:"--graview-tint-alpha",tintLightness:"--graview-tint-lightness",gridAlpha:"--graview-grid-alpha"};function H(r){return Object.keys(A).map(e=>` ${A[e]}: ${r[e]};`).join(`
2
+ `)}function C(r,e){let a=r===e?r:`${r} ${e}`;return` ${a} [data-graview-view] { transition: none; }
3
3
  ${a} [data-graview-touched] > * { animation: none; }
4
4
  ${a} [data-graview-view][data-graview-wrote] > *,
5
5
  ${a} [data-graview-view][data-graview-read] > * {
@@ -7,13 +7,13 @@ import{G as P}from"./chunk.N7T7VB77.js";import{Cc as b,Dc as $,Ec as y,Fc as k,G
7
7
  box-shadow: 0 0 0 2px var(--graview-activity);
8
8
  }
9
9
  ${a} [data-graview-view][data-graview-read] > * { box-shadow: 0 0 0 1px var(--graview-activity); }
10
- ${a} [data-graview-connector][data-graview-activity] { animation: none; stroke-opacity: 1; }`}function q(r="dark",e=I,a={}){let t=G(r,e,a);return a.scope===void 0?t:H(t,a.scope)}function H(r,e){let a=`:where(${e}) `,t=o=>o===e||o.startsWith(`${e} `)||o.startsWith(`${e}:`)||o.startsWith(`${e}[`)||o.startsWith(":root")&&o.includes(` ${e} `),n=o=>{let c=o.match(/^\s*/)[0],v=z(o.trim()).map(g=>t(g)?g:`${a}${g}`);return`${c}${v.join(", ")} `},i=o=>{let c="",v=0;for(;v<o.length;){let g=o.indexOf("{",v);if(g===-1)return c+o.slice(v);let f=M(o,g),w=o.slice(v,g),m=o.slice(g+1,f),p=w.trim().startsWith("@")?w.trim().split(/[\s(]/)[0]:null;p===null?c+=`${n(w)}{${m}}`:p==="@media"||p==="@supports"||p==="@container"||p==="@layer"?c+=`${w}{${i(m)}}`:c+=`${w}{${m}}`,v=f+1}return c};return i(r)}function M(r,e){let a=0,t=null;for(let n=e;n<r.length;n++){let i=r[n];if(t)i==="\\"?n++:(i===t||i===`
11
- `||i==="\r"||i==="\f")&&(t=null);else if(i==='"'||i==="'")t=i;else if(i==="/"&&r[n+1]==="*")n=r.indexOf("*/",n+2)+1||r.length;else if(i==="{")a++;else if(i==="}"&&--a===0)return n}return r.length}function z(r){let e=[],a=0,t=null,n="";for(let i of r){if(t)(i===t||i===`
12
- `||i==="\r"||i==="\f")&&(t=null);else if(i==='"'||i==="'")t=i;else if(i==="("||i==="[")a++;else if(i===")"||i==="]")a--;else if(i===","&&a===0){e.push(n.trim()),n="";continue}n+=i}return n.trim()&&e.push(n.trim()),e}function G(r,e,a){let t=e.schemes[r],n=a.scope??":root",i=a.scope??"html, body",o=a.scope??"body",c=":root",v=k(e),g=_(e),f=O(e.kit);return`${n} {
13
- ${B(t)}
14
- ${S(f)}
10
+ ${a} [data-graview-connector][data-graview-activity] { animation: none; stroke-opacity: 1; }`}function K(r="dark",e=B,a={}){let t=U(r,e,a);return a.scope===void 0?t:M(t,a.scope)}function M(r,e){let a=`:where(${e}) `,t=o=>o===e||o.startsWith(`${e} `)||o.startsWith(`${e}:`)||o.startsWith(`${e}[`)||o.startsWith(":root")&&o.includes(` ${e} `),n=o=>{let c=o.match(/^\s*/)[0],v=G(o.trim()).map(g=>t(g)?g:`${a}${g}`);return`${c}${v.join(", ")} `},i=o=>{let c="",v=0;for(;v<o.length;){let g=o.indexOf("{",v);if(g===-1)return c+o.slice(v);let f=z(o,g),w=o.slice(v,g),m=o.slice(g+1,f),p=w.trim().startsWith("@")?w.trim().split(/[\s(]/)[0]:null;p===null?c+=`${n(w)}{${m}}`:p==="@media"||p==="@supports"||p==="@container"||p==="@layer"?c+=`${w}{${i(m)}}`:c+=`${w}{${m}}`,v=f+1}return c};return i(r)}function z(r,e){let a=0,t=null;for(let n=e;n<r.length;n++){let i=r[n];if(t)i==="\\"?n++:(i===t||i===`
11
+ `||i==="\r"||i==="\f")&&(t=null);else if(i==='"'||i==="'")t=i;else if(i==="/"&&r[n+1]==="*")n=r.indexOf("*/",n+2)+1||r.length;else if(i==="{")a++;else if(i==="}"&&--a===0)return n}return r.length}function G(r){let e=[],a=0,t=null,n="";for(let i of r){if(t)(i===t||i===`
12
+ `||i==="\r"||i==="\f")&&(t=null);else if(i==='"'||i==="'")t=i;else if(i==="("||i==="[")a++;else if(i===")"||i==="]")a--;else if(i===","&&a===0){e.push(n.trim()),n="";continue}n+=i}return n.trim()&&e.push(n.trim()),e}function U(r,e,a){let t=e.schemes[r],n=a.scope??":root",i=a.scope??"html, body",o=a.scope??"body",c=":root",v=_(e),g=O(e),f=S(e.kit);return`${n} {
13
+ ${H(t)}
14
+ ${T(f)}
15
15
 
16
- ${E()}
16
+ ${R()}
17
17
  --graview-font-body: ${g.body};
18
18
  --graview-font-display: ${g.display};
19
19
  --graview-font-mono: ${g.mono};
@@ -61,13 +61,13 @@ ${o} {
61
61
 
62
62
 
63
63
  h1, h2, h3, h4 { font-family: var(--graview-font-display); font-weight: var(--graview-weight-display); }
64
- h1, h2 { letter-spacing: ${b}; }
64
+ h1, h2 { letter-spacing: ${$}; }
65
65
 
66
66
  .graview-logo > svg, .graview-logo-face > svg { display: block; height: 100%; width: auto; }
67
67
  .graview-logo-face { display: inline-flex; height: 100%; width: auto; }
68
68
 
69
- ${n} [data-graview-scheme-only="${r==="dark"?"light":"dark"}"] { display: none; }
70
- ${r==="dark"?`${n} [data-graview-logo-fallback="invert"] { filter: invert(1) hue-rotate(180deg); mix-blend-mode: screen; }`:""}
69
+ ${n} [data-graview-scheme-only="${x(e,r)==="dark"?"light":"dark"}"] { display: none; }
70
+ ${x(e,r)==="dark"?`${n} [data-graview-logo-fallback="invert"] { filter: invert(1) hue-rotate(180deg); mix-blend-mode: screen; }`:""}
71
71
  code, kbd, samp { font-family: var(--graview-font-mono); }
72
72
 
73
73
 
@@ -90,7 +90,7 @@ code, kbd, samp { font-family: var(--graview-font-mono); }
90
90
  position: relative;
91
91
 
92
92
  isolation: isolate;
93
- z-index: ${T("scene")};
93
+ z-index: ${E("scene")};
94
94
  background: var(--graview-wash), var(--graview-ground);
95
95
  --graview-altitude: 0;
96
96
  transition: --graview-altitude 640ms cubic-bezier(0.33, 0, 0.2, 1);
@@ -277,9 +277,9 @@ code { color: var(--graview-ink-muted); font-size: 0.8125rem; letter-spacing: 0.
277
277
 
278
278
 
279
279
  @media (prefers-reduced-motion: reduce) {
280
- ${A(`${c}:not([data-graview-motion='full'])`,o)}
280
+ ${C(`${c}:not([data-graview-motion='full'])`,o)}
281
281
  }
282
- ${A(`${c}[data-graview-motion='reduce']`,o)}`}export{q as a,H as b,W as c};
282
+ ${C(`${c}[data-graview-motion='reduce']`,o)}`}export{K as a,M as b,Y as c};
283
283
  /*! Bundled license information:
284
284
 
285
285
  react-dom/cjs/react-dom.production.js:
@@ -0,0 +1 @@
1
+ var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{a as t}from"./chunk.SDO3U72B.js";var d=t(()=>(__graviewPreload(import.meta.url,["./chunk.HMMK7LCL.js","./chunk.BBLIT7S7.js","./chunk.NJSK3UO2.js","./chunk.WBS7ND2C.js","./chunk.NTC2H5ZX.js","./chunk.3L37FY3G.js","./chunk.XUO67YMT.js","./chunk.B3WVCSW5.js","./chunk.Q4GJIJAU.js","./chunk.MT5DXJKN.js","./chunk.JVDPRQ7J.js","./chunk.SDO3U72B.js","./chunk.Q4MI53KK.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.ZELWW7UA.js")));function v(i,r){let e=!1,n=()=>{window.removeEventListener("online",n),e||o()},o=()=>void i().then(m=>{e||r(m)},()=>{e||window.addEventListener("online",n)});return o(),()=>{e=!0,window.removeEventListener("online",n)}}export{d as a,v as b};
@@ -0,0 +1 @@
1
+ import"./chunk.AJZBJBMO.js";var e='"use strict";\n/*! @remote-dom/core and @remote-dom/polyfill \u2014 Copyright 2020-present, Shopify Inc. \u2014 MIT License.\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * @graview/guest\'s worker runtime \u2014 Elastic License 2.0. */\n"use strict";(()=>{var Ae=globalThis,no=Ae.addEventListener,ro=Ae.removeEventListener,oo=Ae.postMessage,so=globalThis.queueMicrotask,dn=globalThis.performance,io=dn?dn.now.bind(dn):Date.now,_e={listen:t=>no.call(Ae,"message",t),unlisten:t=>ro.call(Ae,"message",t),post:t=>oo.call(Ae,t),microtask:t=>so.call(globalThis,t),now:()=>io()};var x=Symbol("name"),fe=Symbol("prefix"),me=Symbol("value"),S=Symbol("ns"),z=Symbol("owner"),I=Symbol("owner_document"),re=Symbol("attributes"),D=Symbol("prev"),p=Symbol("next"),R=Symbol("child"),Y=Symbol("parent"),pe=Symbol("host"),K=Symbol("data"),Te=Symbol("listeners"),fn=Symbol("isTrusted"),Pe=Symbol("path"),Ce=Symbol("stop_immediate_propagation"),Me=Symbol("dispatching"),ie=Symbol("content"),k=Symbol("hooks"),mt=Symbol("extensions"),Oe=Symbol("hooks_dispatch"),U=Symbol("is_connected"),Ie=Symbol("create_element"),$n=0,X=1,De=2,ke=3,Le=8,we=9,Kn=10,he=11,A="http://www.w3.org/1999/xhtml",Z="http://www.w3.org/2000/svg",Zn="http://www.w3.org/XML/1998/namespace",$e="http://www.w3.org/2000/xmlns/";function pt(t){return t.split(/[\\t\\n\\f\\r ]+/).filter(Boolean)}function G(t){return t.replace(/[A-Z]/g,e=>String.fromCharCode(e.charCodeAt(0)+32))}function Qn(t){return t.replace(/[a-z]/g,e=>String.fromCharCode(e.charCodeAt(0)-32))}function C(t,e){let n=globalThis.DOMException;if(typeof n=="function")return new n(t,e);let r=new Error(t);return r.name=e,r}var Jn=/^(?:[A-Za-z][^\\0\\t\\n\\f\\r\\u0020/>]*|[:_\\u0080-\\u{10FFFF}][A-Za-z0-9-.:_\\u0080-\\u{10FFFF}]*)$/u,er=/[\\0\\t\\n\\f\\r />=]/u,ao=/[\\0\\t\\n\\f\\r />]/u;function ae(t){if(t==null)return null;let e=String(t);return e===""?null:e}function tr(t){Jn.test(t)||pn(t)}function mn(t){(t===""||er.test(t))&&pn(t)}function ht(t,e,n){let r=ae(t),o=String(e),s=o.indexOf(":"),i=s<0?null:o.slice(0,s),a=s<0?o:o.slice(s+1);if((i!=null&&(i===""||ao.test(i))||(n==="element"?!Jn.test(a):a===""||er.test(a)))&&pn(o),i!=null&&r==null)throw C(`A namespace is required for the prefix in "${o}"`,"NamespaceError");if(i==="xml"&&r!==Zn)throw C("The xml prefix requires the XML namespace","NamespaceError");if((o==="xmlns"||i==="xmlns")&&r!==$e)throw C("The xmlns name requires the XMLNS namespace","NamespaceError");if(r===$e&&o!=="xmlns"&&i!=="xmlns")throw C("The XMLNS namespace requires the xmlns name or prefix","NamespaceError");return{namespace:r,qualifiedName:o,prefix:i,localName:a}}function pn(t){throw C(`Invalid name: "${t}"`,"InvalidCharacterError")}var gt=0,yt=1,nr=2,hn=3,lo=typeof performance>"u"?Date.now:performance.now.bind(performance),B=class{static NONE=gt;static CAPTURING_PHASE=yt;static AT_TARGET=nr;static BUBBLING_PHASE=hn;timeStamp=lo();target=null;currentTarget=null;srcElement=null;bubbles=!1;cancelable=!1;composed=!1;defaultPrevented=!1;cancelBubble=!1;eventPhase=gt;[Pe]=[];[Ce]=!1;[Me]=!1;constructor(e,n){this.type=e,Object.defineProperty(this,fn,{writable:!0,value:!1}),n&&(n.bubbles&&(this.bubbles=n.bubbles),n.cancelable&&(this.cancelable=n.cancelable),n.composed&&(this.composed=n.composed))}get isTrusted(){return this[fn]}composedPath(){return[...this[Pe]]}stopPropagation(){this.cancelBubble=!0}stopImmediatePropagation(){this[Ce]=!0,this.cancelBubble=!0}preventDefault(){this.cancelable&&(this.defaultPrevented=!0)}set returnValue(e){e||this.preventDefault()}get returnValue(){return!this.defaultPrevented}initEvent(e,n,r){this.type=e,this.bubbles=!!n,this.cancelable=!!r}};function gn(t,e,n){if(t.cancelBubble)return;let o=e[Te]?.get(t.type)?.[n===yt?"capture":"bubble"];if(o)for(let s of[...o]){if(!o.has(s)||s.signal?.aborted)continue;t.eventPhase=t.target===e?nr:n,t.currentTarget=e;let i=s.normalizedListener;try{typeof i=="object"?i.handleEvent(t):i.call(e,t)}catch(a){setTimeout(co,0,a)}if(t[Ce])break}}function co(t){throw t}var Ke=[],Et=new WeakMap;function bt(t,e){let n=Et.get(t);n?n.push(e):Et.set(t,[e]),Ke[Ke.length-1].push(t)}function V(t){let e=[];Ke.push(e);let n;try{n=t()}catch(r){Ke.pop();try{rr(e)}catch{}throw r}return Ke.pop(),rr(e),n}function rr(t){let e,n=!1;for(let r of t){let o=Et.get(r);if(o){for(;o.length>0;){let s=o.shift();try{s()}catch(i){n||(e=i,n=!0)}}Et.delete(r)}}if(n)throw e}var Nt=[],Ze=[],yn=!1;function xe(t){for(let e of t)Nt.push(e),e[1]&&Ze.push(e[1]);if(!yn){yn=!0;try{let e,n=!1;for(let r=0;r<Nt.length;r++){let[o,s]=Nt[r];s&&Ze.splice(Ze.indexOf(s),1);try{o()}catch(i){n||(e=i,n=!0)}}if(n)throw e}finally{Nt.length=0,Ze.length=0,yn=!1}}}function Qe(t){let e=t;for(;e;){if(Ze.includes(e))return!0;e=e[Y]??e[pe]}return!1}var Je=Symbol("listenerRegistrations"),ge=class{[Te]=void 0;[Je]=void 0;[I]=void 0;addEventListener(e,n,r){if(n==null)return;let o=r===!0||typeof r=="object"&&r.capture===!0,s=typeof r=="object"&&r.once===!0,i=typeof r=="object"?r.signal:void 0;if(i?.aborted)return;let a=En(o),c=this[Je];c||(c=new Map,this[Je]=c);let u=c.get(e);u||(u={},c.set(e,u));let f=u[a];if(f||(f=new Map,u[a]=f),f.has(n))return;let h=this,g={type:e,listener:n,capture:o,once:s,normalizedListener:n,signal:i};(s||i)&&(g.normalizedListener=function(...M){if(g.signal?.aborted){Tt(h,g);return}return g.once&&Tt(h,g),typeof g.listener=="object"?g.listener.handleEvent(...M):g.listener.call(this,...M)});let y=this[Te];y||(y=new Map,this[Te]=y);let v=y.get(e);v||(v={},y.set(e,v));let b=v[a];if(b||(b=new Set,v[a]=b),f.set(n,g),b.add(g),i){let N=()=>{Tt(h,g)};g.abortListener=N,i.addEventListener("abort",N,{once:!0})}this[I]?.defaultView[Oe].addEventListener?.(this,e,n,r)}removeEventListener(e,n,r){return uo.call(this,e,n,r)}dispatchEvent(e){if(e[Me])throw C("Failed to execute \'dispatchEvent\' on \'EventTarget\': The event is already being dispatched.","InvalidStateError");e[Me]=!0;try{let n=[],r=this;for(;r!=null;)n.push(r),r=r.parentNode;e.target=this,e.srcElement=this,e[Pe]=n;for(let s=n.length;s--;)if(gn(e,n[s],yt),e.cancelBubble)return!e.defaultPrevented;let o=e.bubbles?n:n.slice(0,1);for(let s=0;s<o.length;s++)if(gn(e,o[s],hn),e.cancelBubble)return!e.defaultPrevented;return!e.defaultPrevented}finally{e[Me]=!1,e.cancelBubble=!1,e[Ce]=!1,e.eventPhase=gt,e.currentTarget=null,e[Pe]=[]}}};function uo(t,e,n){if(e==null)return;let r=n===!0||n&&n.capture===!0,o=En(!!r),s=this[Je]?.get(t)?.[o]?.get(e);s&&Tt(this,s)}function En(t){return t?"capture":"bubble"}function Tt(t,e){let n=En(e.capture),r=t[Je],o=r?.get(e.type);if(!o)return;let s=o[n];if(!s||s.get(e.listener)!==e)return;s.delete(e.listener),s.size===0&&delete o[n],!o.bubble&&!o.capture&&r?.delete(e.type),e.signal&&e.abortListener&&e.signal.removeEventListener("abort",e.abortListener);let i=t[Te],a=i?.get(e.type);if(!a)return;let c=a[n];c?.delete(e)&&(c.size===0&&delete a[n],!a.bubble&&!a.capture&&i?.delete(e.type),t[I]?.defaultView[Oe].removeEventListener?.(t,e.type,e.listener,e.capture))}var Q=class extends Array{item(e){return this[e]??null}};var tt=0,or=1,Tn=2,On=3,nt=4,sr=0,ir=1,xt=2,St=3,ar=4,Nn=5,lr=6,cr=7,Ot=/^(?:--|-?[A-Za-z_\\u0080-\\u{10FFFF}])[A-Za-z0-9_\\u0080-\\u{10FFFF}-]*$/u;function fo(t,e){let n=1,r=null;for(let o=e;o<t.length;o++){let s=t[o];if(r){s==="\\\\"?o++:s===r&&(r=null);continue}if(s===\'"\'||s==="\'")r=s;else if(s==="(")n++;else if(s===")"&&--n===0)return[t.slice(e,o),o+1]}return[t.slice(e),t.length]}function W(t){throw C(`Invalid or unsupported selector: "${t}"`,"SyntaxError")}function vt(t,e){let n=typeof e=="string"?rt(e):[{combinator:nt,matchers:e}],r=null,o=t[R];return o&&n[0].matchers.length&&wn(o,n,s=>(r=s,!1)),r}function Rt(t,e){let n=typeof e=="string"?rt(e):[{combinator:nt,matchers:e}],r=new Q,o=t[R];return o&&n[0].matchers.length&&wn(o,n,s=>{r.push(s)}),r}function rt(t,e=!1,n=!1){let r={combinator:nt,matchers:[]},o=[r],s=/[\\t\\n\\f\\r ]*?([>\\t\\n\\f\\r +~]?)[\\t\\n\\f\\r ]*?(?:(?:\\[[\\t\\n\\f\\r ]*([^\\]=\\t\\n\\f\\r ]+)[\\t\\n\\f\\r ]*(?:=[\\t\\n\\f\\r ]*(?:([\'"])(.*?)\\3|([^\\]\\t\\n\\f\\r ]+)))?[\\t\\n\\f\\r ]*(?:\\]|$))|([#.]?)([^\\t\\n\\f\\r #.[>:+~()]+)|:(\\w+)(\\()?)/gi,i=t.replace(/^[\\t\\n\\f\\r ]+|[\\t\\n\\f\\r ]+$/g,"");i===""&&W(t);let a=0,c;for(;c=s.exec(i);){c.index!==a&&W(t),c[1]&&(r.matchers.length===0&&!(n&&o.length===1)&&W(t),c[1]===">"?r.combinator=or:c[1]==="+"?r.combinator=On:c[1]==="~"?r.combinator=Tn:r.combinator=tt,r={combinator:nt,matchers:[]},o.push(r));let u=c[8]?G(c[8]):c[2]||c[7];c[7]!=null&&!c[6]&&r.matchers.length>0&&W(t);let h,g=c[4]??c[5]??c[7];if(c[2]){Ot.test(u)||W(t);let y=c[5],v=y?.[0];if(c[3]==null&&(v===\'"\'||v==="\'")){let b=c[0].lastIndexOf(y);g=i.slice(c.index+b+1),s.lastIndex=i.length}else y!=null&&!Ot.test(y)&&W(t);h=ar}else c[6]?(Ot.test(u)||W(t),h=c[6]==="#"?xt:St):c[8]?h=c[9]==null?Nn:lr:c[7]==="*"?h=sr:c[7]&&Ot.test(c[7])?h=ir:W(t);c[9]?([g,s.lastIndex]=fo(i,s.lastIndex),u!=="has"&&u!=="not"&&W(t),u==="has"&&e&&W(t),rt(g,e||u==="has",u==="has")):h===Nn&&W(t),r.matchers.push({type:h,name:u,value:g}),a=s.lastIndex}return(a!==i.length||r.matchers.length===0)&&W(t),o}function mo(t,e){let n=rt(e);return n[0]?.matchers.length?et(t,n):!1}function po(t,e){let n=rt(e,!0,!0),r=n[0];if(n.length===1&&r.matchers.length===0)return!1;let o=tt,s={type:cr,name:":scope"};if(r.matchers.length===0?(o=r.combinator,r.matchers.push(s)):n.unshift({combinator:tt,matchers:[s]}),n.some(({matchers:c})=>c.length===0))return!1;let i=o===On||o===Tn?t[p]:t[R];if(!i)return!1;let a=!1;return wn(i,n,()=>(a=!0,!1),t),a}function wn(t,e,n,r){let o=[],s=t;for(;s;){if(j(s)){if(et(s,e,r)&&n(s)===!1)return!1;let i=s[R];if(i){let a=s[p];a&&o.push(a),s=i;continue}}s=s[p]??o.pop()??null}return!0}function et(t,e,n){let{combinator:r,matchers:o}=e[e.length-1];if(r===nt){if(!wt(t,o,n))return!1;let a=e.slice(0,-1);return a.length===0||et(t,a,n)}let s=r===or||r===tt?Y:D,i=t[s];if(!i)return!1;if(r===tt||r===Tn){for(;i;){if(j(i)&&wt(i,o,n)){let a=e.slice(0,-1);if(a.length===0||et(i,a,n))return!0}i=i[s]}return!1}else{if(r===On&&!j(i)){for(;i&&!j(i);)i=i[s];if(!i)return!1}if(!j(i)||!wt(i,o,n))return!1;let a=e.slice(0,-1);return a.length===0||et(i,a,n)}}function bn(t,e){return t.getAttributeNS(null,t.namespaceURI===A?G(e):e)}function wt(t,e,n){if(!t)return!1;if(Array.isArray(e)){for(let i of e)if(wt(t,i,n)===!1)return!1;return!0}let{type:r,name:o,value:s}=e;switch(r){case sr:return o==="*";case ir:return t.namespaceURI===A?t.localName===G(o):t.localName===o;case xt:return bn(t,"id")===o;case St:let i=bn(t,"class");return i?pt(i).includes(o):!1;case ar:let a=bn(t,o);return s==null?a!=null:a===s;case cr:return t===n;case Nn:W(`:${o}`);case lr:switch(o){case"has":return po(t,s||"");case"not":return!mo(t,s||"");default:W(`:${o}(${s})`)}}return!1}function ho(t){return t.nodeType===De}function ot(t){return K in t}function Sn(t){return t.nodeType===ke}function go(t){return t.nodeType===Le}function j(t){return t.nodeType===X}function xn(t){return t.nodeType===he}function mr(t){return"appendChild"in t}function At(t){let e=[],n=[t],r=new Set(n),o=new Set,s;for(;n.length>0;){let i=n.pop();if(r.delete(i),o.has(i))continue;let a=[];for(let c of it(i)){if(o.has(c)||(o.add(c),e.push(c),a.push(c),!j(c)))continue;let u=c[re];if(u)for(let h of u)o.has(h)||(o.add(h),e.push(h));let f=c[ie];f&&!o.has(f)&&!r.has(f)&&(r.add(f),n.push(f))}s??=a}return{nodes:e,treeNodes:s}}function st(t,e){for(let n of t)n[I]=e}function ur(t,e){let n=t.constructor,r=new n(t.name,t.value,t.namespaceURI);return r[I]=e,r}function dr(t,e){if(Sn(t))return e.createTextNode(t.data);if(go(t))return e.createComment(t.data);if(ho(t))return ur(t,e);if(j(t)){let n=e[Ie](t[x],t.namespaceURI,t[fe],t.localName);if(t[re])for(let r=0;r<t[re].length;r++){let o=t[re].item(r);n.attributes.setNamedItem(ur(o,e))}return n}else{if(xn(t))return e.createDocumentFragment();{let n=new t.constructor;return n[I]=e,n}}}function _t(t,e,n=t.ownerDocument){if(t.nodeType===we)throw C("Cannot clone a document node","NotSupportedError");let r=dr(t,n);if(!e||!j(t)&&!xn(t))return r;let o=new Set([t]),s=[{source:t,destination:r,childIndex:0,cloningContent:!1}];for(;s.length>0;){let i=s[s.length-1],a,c;if(i.cloningContent)if(i.contentSource&&i.contentDestination)a=i.contentSource.childNodes[i.childIndex++],c=i.contentDestination;else{s.pop(),i.appendTo&&i.appendTo.appendChild(i.destination);continue}else if(a=i.source.childNodes[i.childIndex++],c=i.destination,!a){if(i.cloningContent=!0,i.childIndex=0,j(i.source)&&i.source.namespaceURI===A&&i.source.localName==="template"){let f=i.source[ie];f&&(o.has(f)&&fr(),o.add(f),i.contentSource=f,i.contentDestination=i.destination.content)}continue}if(!a){s.pop(),i.appendTo&&i.appendTo.appendChild(i.destination);continue}o.has(a)&&fr(),o.add(a);let u=dr(a,n);j(a)||xn(a)?s.push({source:a,destination:u,appendTo:c,childIndex:0,cloningContent:!1}):c.appendChild(u)}return r}function fr(){throw new Error("Cannot clone a cyclic or repeated node graph")}function Pt(t,e){let n=String(e);return n===""?null:vt(t,[{type:xt,name:n}])}function Ct(t,e){let n=[...new Set(pt(String(e)))];return Rt(t,n.map(r=>({type:St,name:r})))}function Mt(t,e){let n=String(e),r=G(n),o=[];for(let s of It(t))j(s)&&(n==="*"||(s.namespaceURI===A?s[x]===r:s[x]===n))&&o.push(s);return o}function It(t){let e=[],n=[],r=t[R];for(;r;){e.push(r);let o=r[R],s=r[p];o?(s&&n.push(s),r=o):r=s??n.pop()??null}return e}function it(t){let e=It(t);return e.unshift(t),e}var J=class extends ge{nodeType=$n;[x]="";[Y]=null;[pe]=null;[R]=null;[D]=null;[p]=null;[U]=!1;get[k](){return this[I].defaultView[Oe]}get localName(){return this[x]}get nodeName(){return this[x]}get ownerDocument(){return this[I]}get isConnected(){return this[U]}isDefaultNamespace(e){let n=ae(e);return yo(this)===n}get parentNode(){return this[Y]}set parentNode(e){}get parentElement(){let e=this[Y];return!e||e.nodeType!==1?null:e}set parentElement(e){}get previousSibling(){return this[D]}set previousSibling(e){}get nextSibling(){return this[p]}set nextSibling(e){}get previousElementSibling(){let e=this[D];for(;e&&e.nodeType!==1;)e=e[D];return e}set previousElementSibling(e){}get nextElementSibling(){let e=this[p];for(;e&&e.nodeType!==1;)e=e[p];return e}set nextElementSibling(e){}get firstChild(){return this[R]}set firstChild(e){}get lastChild(){let e=this[R];for(;e;){let n=e[p];if(n==null)break;e=n}return e}set lastChild(e){}get nodeValue(){return ot(this)?this.data:null}set nodeValue(e){ot(this)&&(this.data=e)}get textContent(){if(ot(this))return this.data;let e="";for(let n of It(this))Sn(n)&&(e+=n.data);return e}set textContent(e){if(ot(this))this.data=e;else if(mr(this)){let n=e==null?"":String(e);n===""?this.replaceChildren():this.replaceChildren(n)}}cloneNode(e){return _t(this,e)}contains(e){let n=e;for(;n!=null;){if(n===this)return!0;n=n.parentNode}return!1}};function yo(t){let e=t;for(;e;)switch(e.nodeType){case X:{let n=e;if(n.prefix==null&&n.namespaceURI!=null)return n.namespaceURI;let r=n.attributes.getNamedItemNS($e,"xmlns");if(r!=null&&r.prefix==null)return ae(r.value);e=n.parentElement;break}case we:e=e.documentElement;break;case Kn:case he:return null;case De:e=e.ownerElement;break;default:e=e.parentElement}return null}var ee=Symbol("insertNode"),An=Symbol("preflightInsertions"),Dt=Symbol("replaceNode"),ye=class extends J{remove(){let e=this.parentNode;e&&e.removeChild(this)}replaceWith(...e){let n=Se(e),r=this.parentNode;if(r)return vn(o=>{le(r,n);let s=this[p];for(;s&&n.includes(s);)s=s[p];let i=Rn(r,n,o);this.parentNode===r?r[Dt](i,this,o):r[ee](i,s,o)})}before(...e){let n=Se(e),r=this.parentNode;if(r)return vn(o=>{le(r,n);let s=this[D];for(;s&&n.includes(s);)s=s[D];let i=Rn(r,n,o);r[ee](i,s?s[p]:r.firstChild,o)})}after(...e){let n=Se(e),r=this.parentNode;if(r)return vn(o=>{le(r,n);let s=this[p];for(;s&&n.includes(s);)s=s[p];let i=Rn(r,n,o);r[ee](i,s,o)})}};function vn(t){return V(()=>{let e=[];try{t(e)}catch(n){try{xe(e)}catch{}throw n}xe(e)})}function Se(t){return t.map(e=>e instanceof J?e:String(e))}function at(t,e){return e instanceof J?e:t.ownerDocument.createTextNode(String(e))}function le(t,e){for(let n of e){if(!(n instanceof J))continue;let r=t;for(;r;){if(r===n)throw C("Cannot insert a node into itself or one of its descendants","HierarchyRequestError");r=r[Y]??r[pe]}}}function Rn(t,e,n){let r=[];for(let s of e)r.push(at(t,s));if(r.length===1)return r[0];let o=t.ownerDocument.createDocumentFragment();o[An](r);for(let s of r)o[ee](s,null,n);return o}var kt,_n=0,pr=0,hr=0,gr=0,Ge=!1,Cn=!1,lt=!1,Lt=class{#t;#n=[];#e=new Set;#r=!1;constructor(e){if(typeof e!="function")throw new TypeError("MutationObserver callback must be a function");this.#t=e}observe(e,n={}){let r=Eo(n),o=kt??=new WeakMap,s=o.get(e);s==null&&(s=new Map,o.set(e,s));let i=s.get(this);i==null?_n++:Pn(i,-1),s.set(this,r),Pn(r,1),this.#e.add(e)}disconnect(){let e=kt;if(e!=null){for(let n of this.#e){let r=e.get(n),o=r?.get(this);o!=null&&(r.delete(this),_n--,Pn(o,-1)),r?.size===0&&e.delete(n)}this.#e.clear(),this.#n.length=0,_n===0&&(kt=void 0)}}takeRecords(){return this.#n.splice(0)}enqueue(e){this.#n.push(e),!this.#r&&(this.#r=!0,queueMicrotask(()=>{this.#r=!1;let n=this.takeRecords();n.length>0&&this.#t.call(this,n,this)}))}};function te(t){let e=kt;if(e==null)return;let n=new Map,r=t.target;for(;r;){let o=e.get(r);if(o)for(let[s,i]of o){if(r!==t.target&&!i.subtree)continue;let a=!1;if(t.type==="attributes"){if(!i.attributes||i.attributeFilter&&!i.attributeFilter.has(t.attributeName??""))continue;a=i.attributeOldValue}else if(t.type==="characterData"){if(!i.characterData)continue;a=i.characterDataOldValue}else if(!i.childList)continue;n.set(s,n.get(s)===!0||a)}r=r.parentNode}for(let[o,s]of n)o.enqueue({addedNodes:t.addedNodes??new Q,attributeName:t.attributeName??null,attributeNamespace:t.attributeNamespace??null,nextSibling:t.nextSibling??null,oldValue:s?t.oldValue??null:null,previousSibling:t.previousSibling??null,removedNodes:t.removedNodes??new Q,target:t.target,type:t.type})}function Gt(...t){let e=new Q;return e.push(...t),e}function Eo(t){if(t.attributes===!1&&(t.attributeOldValue||t.attributeFilter!=null))throw new TypeError("attributeOldValue and attributeFilter require attributes to be enabled");if(t.characterData===!1&&t.characterDataOldValue)throw new TypeError("characterDataOldValue requires characterData to be enabled");let e=t.attributes??(t.attributeOldValue===!0||t.attributeFilter!=null),n=t.characterData??t.characterDataOldValue===!0,r=t.childList===!0;if(!e&&!n&&!r)throw new TypeError("MutationObserver options must enable childList, attributes, or characterData");return{attributes:e,attributeFilter:t.attributeFilter==null?void 0:new Set(t.attributeFilter.map(String)),attributeOldValue:t.attributeOldValue===!0,characterData:n,characterDataOldValue:t.characterDataOldValue===!0,childList:r,subtree:t.subtree===!0}}function Pn(t,e){t.attributes&&(pr+=e),t.characterData&&(hr+=e),t.childList&&(gr+=e),Ge=pr>0,Cn=hr>0,lt=gr>0}var oe=class extends ye{childNodes=new Q;children=new Q;appendChild(e){return V(()=>this[ee](e,null))}insertBefore(e,n){return V(()=>this[ee](e,n||null))}append(...e){return V(()=>{let n=Se(e.filter(r=>r!=null));n.length>1&&le(this,n);for(let r of n)this[ee](at(this,r),null)})}prepend(...e){return V(()=>{let n=Se(e.filter(o=>o!=null));n.length>1&&le(this,n);let r=this.firstChild;for(let o of n)this[ee](at(this,o),r)})}replaceChildren(...e){return V(()=>{let n=Se(e.filter(o=>o!=null));le(this,n);let r;for(;r=this.firstChild;)this.removeChildImmediately(r);for(let o of n)this[ee](at(this,o),null)})}removeChild(e){return V(()=>(this.removeChildImmediately(e),e))}removeChildImmediately(e){if(e.parentNode!==this)throw C("The node is not a child of this node","NotFoundError");let n=this[U]?it(e):void 0,r=e[D],o=e[p],s=Ht(this,e);if(n)for(let i of n)i[U]=!1;this.queueRemovalMutationRecord(this,e,r,o),n&&this.enqueueTreeReactions(n,"disconnectedCallback"),xe(this.collectRemovalHookEffects(e,s))}replaceChild(e,n){return V(()=>this[Dt](e,n))}[Dt](e,n,r){if(le(this,[e]),n.parentNode!==this)throw C("The reference node is not a child of this parent","NotFoundError");let o=n[D],s=n[p],i=this.prepareInsertion(e),a=this[U]?it(n):void 0,c=new Set(i.map(({node:g})=>g)),u=s;for(;u&&c.has(u);)u=u[p];let f=Ht(this,n);if(a){for(let y of a)y[U]=!1;let g=new Set(a);for(let y of i)g.has(y.node)&&(y.shouldDisconnect=!1)}this.commitInsertion(i,u);let h=this[U];return this.queueRemovalMutationRecord(this,n,o,s),this.queueInsertionMutationRecords(i),a&&this.enqueueTreeReactions(a,"disconnectedCallback"),this.enqueueInsertionReactions(i,h),this.performOrCollectHookEffects([...this.collectRemovalHookEffects(n,f),...this.collectInsertionHookEffects(i)],r),n}querySelectorAll(e){return Rt(this,e)}querySelector(e){return vt(this,e)}[ee](e,n,r){return this.validateInsertion(e,n),this.insertIntoValidated(e,n,r),e}[An](e){for(let n of e)this.validateInsertion(n,null),this.prepareInsertion(n)}validateInsertion(e,n){if(le(this,[e]),n&&n.parentNode!==this)throw C("The reference node is not a child of this parent","NotFoundError")}insertIntoValidated(e,n,r){e===n&&(n=e[p]);let o=this.prepareInsertion(e);this.commitInsertion(o,n);let s=this[U];this.queueInsertionMutationRecords(o),this.enqueueInsertionReactions(o,s),this.performOrCollectHookEffects(this.collectInsertionHookEffects(o),r)}performOrCollectHookEffects(e,n){n?n.push(...e):xe(e)}prepareInsertion(e){let n=[];if(e.nodeType===he){let i=e[R];for(;i;)n.push(i),i=i[p]}else n.push(e);let r=this[U],o=this[I],s=[];for(let i of n){let a=i[U],c=a||r,u,f;if(i[I]===o)c&&(u=it(i));else{let h=At(i);f=h.nodes,c&&(u=h.treeNodes)}s.push({node:i,nodes:u,adoption:f,shouldDisconnect:a})}return s}commitInsertion(e,n){for(let s of e){let i=s.node[Y];if(i){let a=s.node[D],c=s.node[p];s.source={parent:i,index:Ht(i,s.node),previousSibling:a,nextSibling:c}}}for(let s of e){let i=this.attachChild(s.node,n);s.insertIndex=i.index,s.previousSibling=i.previousSibling,s.nextSibling=i.nextSibling}let r=this[I];for(let{adoption:s}of e)s&&st(s,r);let o=this[U];for(let{nodes:s}of e)if(s)for(let i of s)i[U]=o}attachChild(e,n){if(n){let s=n[D];e[p]=n,e[D]=s,s?s[p]=e:this[R]=e,n[D]=e}else{e[p]=null;let s=this[R];if(s){let i;for(;i=s[p];)s=i;s[p]=e,e[D]=s}else this[R]=e,e[D]=null}let r=j(e);e[Y]=this;let o;if(n){if(o=this.childNodes.indexOf(n),this.childNodes.splice(o,0,e),r){let s=n;for(;s&&!j(s);)s=s[p];s?this.children.splice(this.children.indexOf(s),0,e):this.children.push(e)}}else o=this.childNodes.length,this.childNodes.push(e),r&&this.children.push(e);return{index:o,previousSibling:e[D],nextSibling:e[p]}}queueRemovalMutationRecord(e,n,r,o){lt&&te({type:"childList",target:e,removedNodes:Gt(n),previousSibling:r,nextSibling:o})}queueInsertionMutationRecords(e){if(lt)for(let n of e){let{node:r,source:o}=n;o&&this.queueRemovalMutationRecord(o.parent,r,o.previousSibling,o.nextSibling),te({type:"childList",target:this,addedNodes:Gt(r),previousSibling:n.previousSibling,nextSibling:n.nextSibling})}}collectRemovalHookEffects(e,n){return this.nodeType!==X||Qe(this)?[]:[[()=>this[k].removeChild?.(this,e,n)]]}collectInsertionHookEffects(e){let n=[];for(let r of e){let{node:o,source:s}=r;s?.parent.nodeType===X&&!Qe(s.parent)&&n.push([()=>s.parent[k].removeChild?.(s.parent,o,s.index)]),this.nodeType===X&&!Qe(this)&&n.push([()=>this[k].insertChild?.(this,o,r.insertIndex),o])}return n}enqueueInsertionReactions(e,n){for(let r of e){let{nodes:o}=r;o&&(r.shouldDisconnect&&this.enqueueTreeReactions(o,"disconnectedCallback"),n&&this.enqueueTreeReactions(o,"connectedCallback"))}}enqueueTreeReactions(e,n){Er(e,n)}};function yr(t,e,n,r){if(e.parentNode!==t)throw Error("not a child of this node");let o=t[U]?n.treeNodes:void 0,s=e[D],i=e[p],a=Ht(t,e);if(o)for(let u of o)u[U]=!1;st(n.nodes,r),lt&&te({type:"childList",target:t,removedNodes:Gt(e),previousSibling:s,nextSibling:i}),o&&Er(o,"disconnectedCallback");let c=[];t.nodeType===X&&!Qe(t)&&c.push([()=>t[k].removeChild?.(t,e,a)]),xe(c)}function Ht(t,e){let n=e[D],r=e[p];n?n[p]=r:t[R]=r,r&&(r[D]=n);let o=t.childNodes.indexOf(e);return t.childNodes.splice(o,1),j(e)&&t.children.splice(t.children.indexOf(e),1),e[Y]=null,e[p]=null,e[D]=null,o}function Er(t,e){for(let n of t){let r=n[e];typeof r=="function"&&bt(n,()=>r.call(n))}}function ct(t,e,n,r,o){let{observedAttributes:s}=t.constructor,{attributeChangedCallback:i}=t;i==null||s==null||!s.includes(e)||bt(t,()=>i.call(t,e,n,r,o))}var Ut=class{[R]=null;constructor(e){this[z]=e}getNamedItem(e){let n=String(e),r=this[z][S]===A?G(n):n,o=this[R];for(;o;){if(o.name===r)return o;o=o[p]}return null}getNamedItemNS(e,n){let r=ae(e),o=String(n),s=this[R];for(;s;){if(s.localName===o&&s[S]===r)return s;s=s[p]}return null}item(e){let n=this[R],r=0;for(;n;){if(r++===e)return n;n=n[p]}return null}get length(){let e=0,n=this[R];for(;n;)e++,n=n[p];return e}removeNamedItem(e){let n=String(e),r=this[z][S]===A?G(n):n;return V(()=>this.removeNamedItemImmediately(o=>o.name===r))}removeNamedItemNS(e,n){let r=ae(e),o=String(n);return V(()=>this.removeNamedItemImmediately(s=>s.localName===o&&s[S]===r))}removeNamedItemImmediately(e){let n=this[z],r=this[R],o=null;for(;r!=null;){if(e(r)){o&&(o[p]=r[p]),this[R]===r&&(this[R]=r[p]);let s=r.value;return r[p]=null,r[z]=null,Ge&&te({type:"attributes",target:n,attributeName:r.name,attributeNamespace:r[S],oldValue:s}),n[k].removeAttribute?.(n,r.name,r[S]),ct(n,r.localName,s,null,r[S]),r}o=r,r=r[p]}return null}setNamedItem(e){return V(()=>this.setNamedItemImmediately(e))}setNamedItemImmediately(e){let n=this[z],r=e[z];if(r!=null&&r!==n)throw C("The attribute is already in use by another element.","InUseAttributeError");let o=null,s=this[R],i=null;for(;s;){if(s.localName===e.localName&&s[S]===e[S]){if(s===e)return s;i?i[p]=e:this[R]=e,e[p]=s[p],s[p]=null,o=s;break}i=s,s=s[p]}o==null&&(i?i[p]=e:this[R]=e),e[z]=n,e[I]=n[I],o&&(o[z]=null);let a=o==null||o.value!==e.value,c=o!=null&&o.name!==e.name;return a&&Ge&&te({type:"attributes",target:n,attributeName:e.name,attributeNamespace:e[S],oldValue:o?.value??null}),c&&n[k].removeAttribute?.(n,o.name,o[S]),(a||c)&&n[k].setAttribute?.(n,e.name,e.value,e[S]),a&&ct(n,e.localName,o?.value??null,e.value,e[S]),o}setNamedItemNS(e){return this.setNamedItem(e)}*[Symbol.iterator](){let e=this[R];for(;e;)yield e,e=e[p]}};var ve=class extends J{nodeType=De;[S]=null;[p]=null;[z]=null;constructor(e,n,r){super(),this[x]=e,this[me]=n,r&&(this[S]=r)}get nodeName(){return this[x]}set nodeName(e){}get name(){return this[x]}set name(e){}get localName(){if(this[S]==null)return this[x];let e=this[x].indexOf(":");return e<0?this[x]:this[x].slice(e+1)}get prefix(){if(this[S]==null)return null;let e=this[x].indexOf(":");return e<0?null:this[x].slice(0,e)}get value(){return this[me]}set value(e){let n=String(e),r=this[z];if(!r){this[me]=n;return}V(()=>{let o=this[me];this[me]=n,Ge&&o!==n&&te({type:"attributes",target:r,attributeName:this[x],attributeNamespace:this[S],oldValue:o}),this[k].setAttribute?.(r,this[x],n,this[S]),ct(r,this.localName,o,n,this[S])})}get nodeValue(){return this.value}set nodeValue(e){this.value=e}get ownerElement(){return this[z]}get namespaceURI(){return this[S]}get specified(){return!0}};var bo={amp:"&",AMP:"&",apos:"\'",gt:">",GT:">",lt:"<",LT:"<",quot:\'"\',QUOT:\'"\'},No=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),To=/(?:<([a-z][a-z0-9-:]*)((?:[\\s]+[^<>\'"=/\\s]+(?:=([\'"])[^]*?\\3|=[^>\'"\\s]*|))*)[\\s]*(\\/?)\\s*>|<\\/([a-z][a-z0-9-:]*)>|<!--(.*?)-->|([^<>]+))/gi,Tr=/\\s([^<>\'"=/\\n\\s]+)(?:=(["\'])([\\s\\S]*?)\\2|=([^>\'"\\n\\s]*)|)/g,Oo="|b|big|blockquote|body|br|center|code|dd|div|dl|dt|em|embed|h1|h2|h3|h4|h5|h6|head|hr|i|img|li|listing|menu|meta|nobr|ol|p|pre|ruby|s|small|span|strong|strike|sub|sup|table|tt|u|ul|var|",wo=/^(?:color|face|size)$/i;function br(t){return t.replace(/&(?:(amp|AMP|apos|gt|GT|lt|LT|quot|QUOT)|#(\\d+)|#[xX]([\\da-fA-F]+));/g,(e,n,r,o)=>{if(n)return bo[n];let s=Number.parseInt(r??o,r?10:16);try{return String.fromCodePoint(s)}catch{return e}})}function Or(t){return t.namespaceURI===A&&No.has(t.localName)}function Nr(t){let e=t.localName;return t[S]===Z&&(e==="foreignObject"||e==="desc"||e==="title")}function xo(t,e){if(Oo.includes(`|${t}|`))return!0;if(t!=="font")return!1;for(let n of e.matchAll(Tr))if(wo.test(n[1]))return!0;return!1}function Bt(t,e){let n=e.ownerDocument,r=n.createDocumentFragment(),o=[],s=r;for(let i of t.matchAll(To)){let a=i[1];if(a){let c=i[2],u=G(a),f=o[o.length-1]?.element??e,h=f[S]===Z?Z:A;if(u==="svg")h=Z;else if(h===Z){if(Nr(f))h=A;else if(xo(u,c)){for(;o.length>0;){let v=o[o.length-1];if(v.element[S]!==Z||Nr(v.element))break;o.pop(),s=v.target}h=A}}let g=h===A?u:a,y=n[Ie](g,h,null,g);for(let v of c.matchAll(Tr))y.setAttribute(v[1],br(v[3]||v[4]||""));if(s.append(y),Or(y)||h!==A&&i[4])continue;o.push({element:y,target:s}),s=h===A&&u==="template"?y.content:y}else if(i[5]){let c=G(i[5]);for(let u=o.length-1;u>=0;u--){let f=o[u],h=G(f.element[x]);if(h===c){s=f.target,o.length=u;break}if(f.element[S]===A&&h==="template")break}}else i[6]?s.append(n.createComment(i[6])):s.append(br(i[7]))}return r}function Vt(t){return xr([{type:"content",child:t[R]}])}function wr(t){return xr([{type:"opening",node:t}])}function xr(t){let e=[],n;for(;n=t.pop();)switch(n.type){case"opening":{let r=n.node;switch(r.nodeType){case X:{let o=r;e.push(`<${o[x]}`);let s=o[re]?.[R];for(;s;){e.push(` ${s[x]}`);let a=s[me];a!==""&&(a=String(a).replace(/&/g,"&amp;").replace(/"/g,"&quot;"),e.push(`="${a}"`)),s=s[p]}if(e.push(">"),Or(o))break;let i=o.namespaceURI===A&&o.localName==="template"?o[ie]:o;t.push({type:"closing",name:o[x]}),t.push({type:"content",child:i?.[R]??null});break}case ke:{let o=r;e.push(o[K].replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;"));break}case Le:{let o=r;e.push(`<!--${o[K]}-->`);break}}break}case"content":{let r=n.child;r&&(t.push({type:"content",child:r[p]}),t.push({type:"opening",node:r}));break}case"closing":e.push(`</${n.name}>`);break}return e.join("")}var H=class extends oe{nodeType=X;[S]=A;[fe]=null;get namespaceURI(){return this[S]}get prefix(){return this[fe]}get localName(){let e=this[fe];return e==null?this[x]:this[x].slice(e.length+1)}get nodeName(){return this[S]===A?Qn(this[x]):this[x]}get tagName(){return this.nodeName}get id(){return this.getAttributeNS(null,"id")??""}set id(e){this.setAttribute("id",String(e))}get slot(){return this.getAttributeNS(null,"slot")??""}set slot(e){let n=String(e);this.getAttributeNS(null,"slot")!==n&&this.attributes.setNamedItem(new ve("slot",n))}get attributes(){let e=this[re];return e||(e=new Ut(this),this[re]=e),e}getAttributeNames(){return[...this.attributes].map(e=>e.name)}getElementsByTagName(e){return Mt(this,e)}get firstElementChild(){return this.children[0]??null}getElementsByClassName(e){return Ct(this,e)}get lastElementChild(){return this.children[this.children.length-1]??null}get nextElementSibling(){let e=this.nextSibling;for(;e&&e.nodeType!==1;)e=e.nextSibling;return e}get previousElementSibling(){let e=this.previousSibling;for(;e&&e.nodeType!==1;)e=e.previousSibling;return e}setAttribute(e,n){let r=String(e),o=String(n);mn(r);let s=this[S]===A?G(r):r,i=this.attributes.getNamedItemNS(null,s);i?i.value=o:this.attributes.setNamedItem(new ve(s,o))}setAttributeNS(e,n,r){let o=ae(e),s=String(n),i=String(r),a=ht(o,s,"attribute"),c=this.attributes.getNamedItemNS(a.namespace,a.localName);c?c.value=i:this.attributes.setNamedItemNS(new ve(a.qualifiedName,i,a.namespace))}toggleAttribute(e,n){let r=String(e);mn(r);let o=this[S]===A?G(r):r,s=this.attributes.getNamedItemNS(null,o),i=n===void 0?void 0:!!n;return s==null?i===!1?!1:(this.attributes.setNamedItem(new ve(o,"")),!0):i===!0?!0:(this.attributes.removeNamedItemNS(null,o),!1)}getAttribute(e){let n=this.attributes.getNamedItem(e);return n&&n.value}getAttributeNS(e,n){let r=this.attributes.getNamedItemNS(e,n);return r&&r.value}hasAttribute(e){return this.attributes.getNamedItem(e)!=null}hasAttributeNS(e,n){return this.attributes.getNamedItemNS(e,n)!=null}removeAttribute(e){let n=String(e),r=this[S]===A?G(n):n;this.attributes.removeNamedItemNS(null,r)}removeAttributeNS(e,n){this.attributes.removeNamedItemNS(e,n)}get outerHTML(){return wr(this)}get innerHTML(){return Vt(this)}set innerHTML(e){if(e==null||e==="")this.replaceChildren();else{let n=Bt(String(e),this);this.replaceChildren(n)}}};var He=class t extends H{[S]=Z;get ownerSVGElement(){let e=null,n=this.parentNode;for(;n instanceof t;)e=n,n=n.parentNode;return e}};var Ee=class extends ye{[K]="";constructor(e){super(),this[K]=e==null?"":String(e)}setData(e){let n=Cn,r=n?this[K]:null,o="";e!=null&&(o=typeof e=="string"?e:String(e)),this[K]=o,n&&r!==o&&te({type:"characterData",target:this,oldValue:r}),this[k].setText?.(this,o)}get data(){return this[K]}set data(e){this.setData(e)}};var Ue=class extends Ee{nodeType=ke;[x]="#text"};var Be=class extends Ee{nodeType=Le;[x]="#comment"};var Ve=class extends oe{nodeType=he;[x]="#document-fragment";[I]=typeof window<"u"?window.document:null;getElementById(e){return Pt(this,e)}};var Fe=class extends H{get content(){let e=this[ie];return e||(e=this.ownerDocument.createDocumentFragment(),e[pe]=this,this[ie]=e),e}set content(e){}set innerHTML(e){this.content.replaceChildren(Bt(String(e),this))}get innerHTML(){let e=this[ie];return e?Vt(e):""}};var Ft=class extends H{};var jt=class extends H{};var qt=class extends H{};var ut=class extends oe{nodeType=we;[x]="#document";[U]=!0;constructor(e){super(),this.defaultView=e,this[I]=this,this.documentElement=Yt(new qt,this,"html"),this.body=Yt(new Ft,this,"body"),this.head=Yt(new jt,this,"head"),this.appendChild(this.documentElement),this.documentElement.appendChild(this.head),this.documentElement.appendChild(this.body)}get textContent(){return null}set textContent(e){}getElementsByClassName(e){return Ct(this,e)}createElement(e){let n=String(e);return tr(n),Mn(this,G(n))}createElementNS(e,n){let r=ht(e,n,"element");return Mn(this,r.qualifiedName,r.namespace,r.prefix,r.localName)}[Ie](e,n,r,o){return Mn(this,e,n,r,o)}createTextNode(e){let n=zt(new Ue(e),this);return this[k].createText?.(n,n.data),n}createComment(e){return zt(new Be(e),this)}createDocumentFragment(){return zt(new Ve,this)}createEvent(){return new B("")}getElementById(e){return Pt(this,e)}getElementsByTagName(e){return Mt(this,e)}importNode(e,n){if(e.nodeType===we)throw C("Cannot import a document node","NotSupportedError");return _t(e,n,this)}adoptNode(e){if(e[I]===this)return e;let n=At(e);return V(()=>{let r=e.parentNode;return r?yr(r,e,n,this):st(n.nodes,this),e})}};function zt(t,e){return Object.defineProperty(t,I,{value:e,writable:!0,enumerable:!1}),t}function Mn(t,e,n=A,r=null,o=e){let s;if(n===Z)s=new He;else if(n===A&&o==="template")s=new Fe;else if(n===A){let i=t.defaultView.customElements.get(o);s=i?new i:new H}else s=new H;return Yt(s,t,e,n,r)}function Yt(t,e,n,r=A,o=null){return zt(t,e),Object.defineProperties(t,{[x]:{value:n},[S]:{value:r},[fe]:{value:o}}),e[k].createElement?.(t,r),t}var Wt=class extends B{constructor(e,n){super(e,n),this.detail=n?.detail??null}initCustomEvent(e,n,r,o){super.initEvent(e,n,r),this.detail=o??null}};var Xt=class extends B{constructor(e,n){super(e,n),this.message=n.message,this.filename=n.filename,this.lineno=n.lineno,this.colno=n.colno,this.error=n.error}};var $t=class extends B{constructor(e,n){super(e,n),this.promise=n.promise,this.reason=n.reason}};var Kt=class extends B{constructor(e,n){super(e,n),this.oldState=n.oldState,this.newState=n.newState}};var Zt=class extends B{constructor(e,n={}){super(e,n),this.relatedTarget=n.relatedTarget??null}};var Qt=class extends B{constructor(e,n={}){super(e,n),this.clipboardData=n.clipboardData??null}};var Jt=class extends H{};var So=/^[a-z][^A-Z\\u0000\\t\\n\\f\\r />]*-[^A-Z\\u0000\\t\\n\\f\\r />]*$/u,vo=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);function Sr(t){return So.test(t)&&!vo.has(t)}function vr(t){return C(`Invalid custom element name: "${t}"`,"SyntaxError")}var en=class{registry=new Map;listenersByName=new Map;define(e,n,r){if(!Sr(e))throw vr(e);if(this.registry.has(e))throw C(`A custom element named "${e}" has already been defined`,"NotSupportedError");if(this.getName(n)!=null)throw C("This constructor has already been registered in this custom element registry","NotSupportedError");this.registry.set(e,n);let o=this.listenersByName.get(e);if(o!=null){this.listenersByName.delete(e);for(let s of o)s(n)}}get(e){return this.registry.get(e)}getName(e){for(let[n,r]of this.registry)if(r===e)return n;return null}whenDefined(e){if(!Sr(e))return Promise.reject(vr(e));let n=this.registry.get(e);if(n!=null)return Promise.resolve(n);let r=this.listenersByName.get(e);return r==null&&(r=[],this.listenersByName.set(e,r)),new Promise(o=>{r.push(o)})}upgrade(e){}initialize(e){}};var Ro=["onerror","onunhandledrejection"],Ar=Symbol.for("@remote-dom/polyfill/global-property");function _r(t){return Object.getOwnPropertyDescriptors(t)}function Pr(t){let e={};for(let[n,r]of Object.entries(Object.getOwnPropertyDescriptors(ge.prototype)))n!=="constructor"&&typeof r.value=="function"&&(r.value=In(r.value.bind(t)),e[n]=r);return e}function Cr(t){let e={};for(let n of Ro)e[n]={configurable:!0,enumerable:!0,get:In(()=>t[n]),set:In(r=>{t[n]=r})};return e}function Ao(t){return Object.assign(_r(t),Pr(t),Cr(t))}function In(t){return Object.defineProperty(t,Ar,{value:!0}),t}function Rr(t,e){for(let n of Reflect.ownKeys(e)){let r=_o(t,n);(r==null||Po(r))&&Object.defineProperty(t,n,e[n])}}function _o(t,e){let n=t;for(;n;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function Po(t){return[t.value,t.get,t.set].some(e=>typeof e=="function"&&e[Ar]===!0)}var Re=class extends ge{[k]={};[mt]=[];[Oe]=Mo(this);name="";window=this;parent=this;self=this;top=this;document=new ut(this);customElements=new en;location=globalThis.location;navigator=globalThis.navigator;Event=B;ErrorEvent=Xt;PromiseRejectionEvent=$t;ToggleEvent=Kt;FocusEvent=Zt;ClipboardEvent=Qt;EventTarget=ge;CustomEvent=Wt;Node=J;ParentNode=oe;ChildNode=ye;DocumentFragment=Ve;Document=ut;CharacterData=Ee;Comment=Be;Text=Ue;Element=H;HTMLElement=Jt;SVGElement=He;HTMLTemplateElement=Fe;MutationObserver=Lt;#t=null;#n=null;#e=null;static with(...e){let n=this;return class extends n{constructor(){super();for(let o of e)Co(this,o)}}}get onerror(){return this.#n}set onerror(e){this.#t&&this.removeEventListener("error",this.#t),e&&typeof e=="function"?(this.#n=e,this.#t=n=>{e(n.message??"Error",n.filename,n.lineno,n.colno,n.error)},this.addEventListener("error",this.#t)):(this.#t=null,this.#n=null)}get onunhandledrejection(){return this.#e}set onunhandledrejection(e){this.#e&&this.removeEventListener("unhandledrejection",this.#e),e&&typeof e=="function"?(this.#e=e,this.addEventListener("unhandledrejection",this.#e)):this.#e=null}static setGlobal(e){let n=globalThis.self,r=globalThis.window,o=_r(e),s=Object.assign(Pr(e),Cr(e));delete o.self,Object.defineProperties(globalThis,o),Rr(globalThis,s),typeof n>"u"||n===r&&n!==globalThis?Object.defineProperty(globalThis,"self",{value:e,configurable:!0,writable:!0,enumerable:!0}):n!==globalThis&&(Object.defineProperties(n,o),Rr(n,s))}static setGlobalThis(e){for(let n in e)e[n]===e&&(e[n]=globalThis);Object.defineProperties(globalThis,Ao(e))}};function Co(t,e){t[mt].push(e(t)??{})}function Mo(t){return{createElement:ce.bind(null,t,"createElement"),setAttribute:ce.bind(null,t,"setAttribute"),removeAttribute:ce.bind(null,t,"removeAttribute"),createText:ce.bind(null,t,"createText"),setText:ce.bind(null,t,"setText"),insertChild:ce.bind(null,t,"insertChild"),removeChild:ce.bind(null,t,"removeChild"),addEventListener:ce.bind(null,t,"addEventListener"),removeEventListener:ce.bind(null,t,"removeEventListener")}}function ce(t,e,...n){for(let s of t[mt])s[e]?.apply(s,n);let r=t[k];r[e]?.apply(r,n)}var tn=new Re;var Dn="~";var be=new WeakMap;function je(t){return be.get(t)}var Hn=new WeakMap,Do=0;function $(t){let e=Hn.get(t);return e==null&&(e=String(Do++),nn(t,e)),e}function nn(t,e){Hn.set(t,e)}var Ln=new WeakMap;function ko(t){return Ln.get(t)}var Gn=new WeakMap;function Lo(t){let e=Gn.get(t);if(e!=null)return e;if(!(!(t instanceof Element)||t.tagName.includes("-"))){e={};for(let{name:n,value:r}of t.attributes)e[n]=r;return e}}var Go=new WeakMap;function Ho(t){return Go.get(t)}function Un(t,e,n){let r=Ln.get(t);if(r==null&&(r={},Ln.set(t,r)),r[e]===n)return;r[e]=n;let o=be.get(t);o?.mutate([[3,$(t),e,n,1]])}function Ne(t,e,n){let r=Gn.get(t);if(r==null&&(r={},Gn.set(t,r)),r[e]===n)return;n==null?delete r[e]:r[e]=String(n);let o=be.get(t);o?.mutate([[3,$(t),e,n,2]])}function qe(t,e){if(be.get(t)!==e&&(be.set(t,e),t.childNodes))for(let r=0;r<t.childNodes.length;r++)qe(t.childNodes[r],e)}function rn(t){if(be.get(t)!=null&&(be.delete(t),t.childNodes))for(let n=0;n<t.childNodes.length;n++)rn(t.childNodes[n])}function ze(t){let{nodeType:e}=t;switch(e){case 1:return{id:$(t),type:e,element:t.localName,properties:kn(ko(t)),attributes:kn(Lo(t)),eventListeners:kn(Ho(t)),children:Array.from(t.childNodes).map(ze)};case 3:case 8:return{id:$(t),type:e,data:t.data};default:throw new Error(`Cannot serialize node of type ${t.nodeType} (${typeof t.nodeType})`)}}function kn(t){return t?{...t}:void 0}function Bn(t,e,...n){let r=Hn.get(t),o=be.get(t);if(r==null||o==null)throw new Error(`Cannot call method ${e} on an unconnected node`);return o.call(r,e,...n)}var Ye=tn[k];Ye.insertChild=(t,e,n)=>{let r=je(t);r!=null&&(qe(e,r),r.mutate([[0,$(t),ze(e),n]]))};Ye.removeChild=(t,e,n)=>{let r=je(t);r!=null&&(rn(e),r.mutate([[1,$(t),n]]))};Ye.setText=(t,e)=>{let n=je(t);n?.mutate([[2,$(t),e]])};Ye.setAttribute=(t,e,n)=>{t.tagName.includes("-")||Ne(t,e,n)};Ye.removeAttribute=(t,e)=>{t.tagName.includes("-")||Ne(t,e)};Re.setGlobal(tn);function on(t){if(typeof t=="string")return{type:"navigate",to:t};let{place:e,record:n,where:r,section:o}=t??{},s={...r===void 0?{}:{where:r},...o===void 0?{}:{section:String(o)}};return typeof e=="string"?{type:"navigate",place:e,...s}:typeof n=="string"?{type:"navigate",to:n,...s}:void 0}var Ir=["wheel","drag","pinch"];function Dr(t){let e=t;return typeof t=="object"&&t!==null&&e.graview==="host-hello"&&typeof e.nonce=="string"}function Lr(t,e={}){let n,r="",o,s=0,i=new Set,a=new Map,c=[],u=b=>{n?n.postMessage({...b,nonce:r}):c.push(b)},f=b=>{let N=b.data;if(!(!N||typeof N!="object")){if(N.type==="props"){o=N.props;for(let M of i)M(N.props)}else N.type==="answer"?(a.get(N.id)?.(N),a.delete(N.id)):N.type==="event"&&typeof N.listener=="number"?e.onEvent?.(N):N.type==="heartbeat"&&typeof N.beat=="number"&&u({type:"heartbeat",beat:N.beat});e.onMessage?.(N)}},h=()=>{},g=b=>{if(n||!t.fromHost(b)||!Dr(b.data)||b.data.protocol!==1)return;let N=b.ports[0];if(N){n=N,r=b.data.nonce,n.onmessage=f,n.start?.(),h();for(let M of c.splice(0))u(M)}};h=t.listen(g),t.ready({graview:"guest-ready",protocol:1});let y,v={get props(){return o},subscribe(b){return i.add(b),()=>i.delete(b)},act(b,N={}){let M=s+=1;return new Promise(L=>{a.set(M,L),u({type:"act",id:M,name:b,args:N})})},navigate(b){let N=on(b);N&&u(N)},size(b){u({type:"size",height:b})},autoSize(b){let N=b??globalThis.document?.documentElement,M=globalThis.ResizeObserver;if(!N||!M||typeof N.getBoundingClientRect!="function")return()=>{};y?.disconnect();let L=new M(()=>v.size(Math.ceil(N.getBoundingClientRect().height)));return L.observe(N),y=L,()=>L.disconnect()},close(){y?.disconnect(),h(),n?.close(),i.clear()}};return{guest:v,send:u}}var Hr=["globalThis","Infinity","NaN","undefined","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape","Object","Function","Array","Number","Boolean","String","Symbol","BigInt","Date","Promise","RegExp","Math","JSON","Reflect","Proxy","Intl","Error","AggregateError","EvalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError","SuppressedError","Map","Set","WeakMap","WeakSet","WeakRef","FinalizationRegistry","Iterator","AsyncIterator","DisposableStack","AsyncDisposableStack","ArrayBuffer","SharedArrayBuffer","DataView","Atomics","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float16Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"],Ur=["window","parent","top","document","customElements","Event","ErrorEvent","PromiseRejectionEvent","ToggleEvent","FocusEvent","ClipboardEvent","CustomEvent","EventTarget","Node","ParentNode","ChildNode","DocumentFragment","Document","CharacterData","Comment","Text","Element","HTMLElement","SVGElement","HTMLTemplateElement","MutationObserver"],Br=["self","postMessage","setTimeout","clearTimeout","setInterval","clearInterval","queueMicrotask","structuredClone","crypto","console","DOMException"],Vr=["TEMPORARY","PERSISTENT"],gl=Object.freeze([...Hr,...Ur,...Br,...Vr]),yl=Object.freeze(["constructor","__defineGetter__","__defineSetter__","hasOwnProperty","__lookupGetter__","__lookupSetter__","isPrototypeOf","propertyIsEnumerable","toString","valueOf","__proto__","toLocaleString"]),Gr=t=>typeof t=="symbol"?`[${t.description??"symbol"}]`:t;function Fr(t=globalThis,e=[],n={}){let r=[],o=[],s=new Set([...Hr,...Ur,...Br,...e,"constructor",Symbol.toStringTag]),i=(w,P)=>{let q=Reflect.getOwnPropertyDescriptor(w,P);return q===void 0||!("value"in q)||q.writable||q.configurable?!1:n.primitivesStay&&typeof P=="symbol"&&(typeof q.value!="object"||q.value===null)&&typeof q.value!="function"?!0:Vr.includes(P)&&typeof q.value=="number"},a=t,c=a.setTimeout,u=a.setInterval,f=a.crypto,h=(w,P)=>function(q,We,...ft){if(typeof q!="function")throw new TypeError(`${P} takes a function: a guest view cannot run code from text`);return w.call(t,q,We,...ft)},g=f?Object.freeze({getRandomValues:w=>f.getRandomValues(w)}):void 0,y=a.document?.defaultView;if(y&&y!==a)for(let w of Reflect.ownKeys(y))typeof w=="symbol"||s.has(w)||Reflect.deleteProperty(y,w)||o.push(`window.${w}`);let v=[];for(let w=t;w&&w!==Object.prototype;w=Object.getPrototypeOf(w))v.push(w);for(let w of v)for(let P of Reflect.ownKeys(w))s.has(P)||(Reflect.deleteProperty(w,P)?r.push(Gr(P)):i(w,P)||o.push(Gr(P)));let b=()=>function(){throw new EvalError("A guest view cannot make code from text.")},N=[Function.prototype,Object.getPrototypeOf(async function(){}),Object.getPrototypeOf(function*(){}),Object.getPrototypeOf(async function*(){})];for(let w of N){let P=b();Object.defineProperty(P,"prototype",{value:w,writable:!1,enumerable:!1,configurable:!1}),Reflect.defineProperty(w,"constructor",{value:P,writable:!1,enumerable:!1,configurable:!1})||o.push("Function.prototype.constructor"),w===Function.prototype&&Reflect.defineProperty(t,"Function",{value:P,writable:!0,enumerable:!1,configurable:!0})}let M=(w,P)=>{Reflect.defineProperty(t,w,{value:P,writable:!0,enumerable:!0,configurable:!0})||o.push(w)};M("setTimeout",h(c,"setTimeout")),M("setInterval",h(u,"setInterval")),g&&M("crypto",g);for(let w of v.slice(1))Object.freeze(w);for(let w of Reflect.ownKeys(t)){let P=Reflect.getOwnPropertyDescriptor(t,w);Reflect.defineProperty(t,w,"value"in P?{...P,writable:!1,configurable:!1}:{...P,configurable:!1})}let L;try{L=Reflect.preventExtensions(t)}catch{L=!1}return{removed:r,stuck:o,sealed:L}}var dt=class extends HTMLElement{constructor(){super(),nn(this,Dn)}connect(e){if(je(this)===e||(qe(this,e),this.childNodes.length===0))return;let n=[];for(let r=0;r<this.childNodes.length;r++){let o=this.childNodes[r];n.push([0,Dn,ze(o),r])}e.mutate(n)}updateRemoteProperty(e,n){Un(this,e,n)}callRemoteMethod(e,...n){return Bn(this,e,...n)}};var d={},Vn={empty:!0},Uo={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"},Fn={div:d,section:d,article:d,aside:d,header:d,footer:d,nav:d,hgroup:d,search:d,address:d,figure:d,figcaption:d,blockquote:d,p:d,pre:d,hr:Vn,br:Vn,wbr:Vn,h1:d,h2:d,h3:d,h4:d,h5:d,h6:d,span:d,strong:d,em:d,b:d,i:d,u:d,s:d,small:d,mark:d,abbr:d,cite:d,q:d,code:d,kbd:d,samp:d,var:d,sub:d,sup:d,dfn:d,bdi:d,bdo:d,ruby:d,rt:d,rp:d,time:{attributes:{datetime:"text"}},data:{attributes:{value:"text"}},del:{attributes:{datetime:"text"}},ins:{attributes:{datetime:"text"}},a:{attributes:{href:"link"}},ul:d,menu:d,dl:d,dt:d,dd:d,ol:{attributes:{start:"number",reversed:"boolean",type:{oneOf:["1","a","A","i","I"]}}},li:{attributes:{value:"number"}},table:d,caption:d,thead:d,tbody:d,tfoot:d,tr:d,colgroup:{attributes:{span:"number"}},col:{attributes:{span:"number"},empty:!0},th:{attributes:{colspan:"number",rowspan:"number",headers:"text",scope:{oneOf:["row","col","rowgroup","colgroup"]},abbr:"text"}},td:{attributes:{colspan:"number",rowspan:"number",headers:"text"}},details:{attributes:{open:"boolean",name:"text"}},summary:d,button:{attributes:{type:{oneOf:["button"]},disabled:"boolean",name:"text",value:"text"}},input:{empty:!0,attributes:{type:{oneOf:["text","search","number","range","checkbox","radio","date","time","datetime-local","month","week","color","email","tel","url"]},name:"text",value:"text",placeholder:"text",min:"text",max:"text",step:"text",checked:"boolean",disabled:"boolean",readonly:"boolean",required:"boolean",maxlength:"number",minlength:"number",size:"number",pattern:"text",multiple:"boolean",inputmode:"text",enterkeyhint:"text"}},select:{attributes:{name:"text",disabled:"boolean",multiple:"boolean",required:"boolean",size:"number"}},option:{attributes:{value:"text",selected:"boolean",disabled:"boolean",label:"text"}},optgroup:{attributes:{label:"text",disabled:"boolean"}},textarea:{attributes:{name:"text",placeholder:"text",rows:"number",cols:"number",disabled:"boolean",readonly:"boolean",required:"boolean",maxlength:"number",minlength:"number",wrap:{oneOf:["soft","hard","off"]}}},label:{attributes:{for:"text"}},fieldset:{attributes:{disabled:"boolean",name:"text"}},legend:d,output:d,meter:{attributes:{value:"number",min:"number",max:"number",low:"number",high:"number",optimum:"number"}},progress:{attributes:{value:"number",max:"number"}},img:{empty:!0,attributes:{src:"image",alt:"text",width:"number",height:"number",decoding:{oneOf:["async","sync","auto"]}}},"graview-video":{empty:!0,attributes:{autoplay:"boolean",cover:"boolean"}}},Bo=["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","filter","flood-color","flood-opacity","lighting-color","color-interpolation-filters"],Vo={id:"text",class:"text",style:"style",lang:"text",role:"text",tabindex:{oneOf:["-1","0"]},transform:"geometry",...Object.fromEntries(Bo.map(t=>[t,"css"]))},ue={x:"geometry",y:"geometry",width:"geometry",height:"geometry"},sn={viewBox:"geometry",preserveAspectRatio:"geometry"},jr={oneOf:["userSpaceOnUse","objectBoundingBox"]},qr={oneOf:["R","G","B","A"]},ne={...ue,in:"text",result:"text"},zr={gradientUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]},gradientTransform:"geometry",spreadMethod:{oneOf:["pad","reflect","repeat"]},href:"fragment"},Yr={svg:{attributes:{...ue,...sn}},g:d,defs:d,symbol:{attributes:{...ue,...sn,refX:"geometry",refY:"geometry"}},use:{attributes:{...ue,href:"fragment"}},title:d,desc:d,path:{attributes:{d:"geometry",pathLength:"number"}},rect:{attributes:{...ue,rx:"geometry",ry:"geometry",pathLength:"number"}},circle:{attributes:{cx:"geometry",cy:"geometry",r:"geometry",pathLength:"number"}},ellipse:{attributes:{cx:"geometry",cy:"geometry",rx:"geometry",ry:"geometry",pathLength:"number"}},line:{attributes:{x1:"geometry",y1:"geometry",x2:"geometry",y2:"geometry",pathLength:"number"}},polyline:{attributes:{points:"geometry",pathLength:"number"}},polygon:{attributes:{points:"geometry",pathLength:"number"}},text:{attributes:{x:"geometry",y:"geometry",dx:"geometry",dy:"geometry",rotate:"geometry",textLength:"geometry",lengthAdjust:{oneOf:["spacing","spacingAndGlyphs"]}}},tspan:{attributes:{x:"geometry",y:"geometry",dx:"geometry",dy:"geometry",rotate:"geometry",textLength:"geometry"}},textPath:{attributes:{href:"fragment",startOffset:"geometry",method:{oneOf:["align","stretch"]},spacing:{oneOf:["auto","exact"]},side:{oneOf:["left","right"]}}},linearGradient:{attributes:{x1:"geometry",y1:"geometry",x2:"geometry",y2:"geometry",...zr}},radialGradient:{attributes:{cx:"geometry",cy:"geometry",r:"geometry",fx:"geometry",fy:"geometry",fr:"geometry",...zr}},stop:{attributes:{offset:"geometry"}},clipPath:{attributes:{clipPathUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]}}},mask:{attributes:{...ue,maskUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]},maskContentUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]}}},pattern:{attributes:{...ue,...sn,patternUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]},patternContentUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]},patternTransform:"geometry",href:"fragment"}},marker:{attributes:{...sn,markerWidth:"geometry",markerHeight:"geometry",refX:"geometry",refY:"geometry",orient:"geometry",markerUnits:{oneOf:["strokeWidth","userSpaceOnUse"]}}},a:d,filter:{attributes:{...ue,filterUnits:jr,primitiveUnits:jr}},feBlend:{attributes:{...ne,in2:"text",mode:"text"}},feColorMatrix:{attributes:{...ne,type:{oneOf:["matrix","saturate","hueRotate","luminanceToAlpha"]},values:"geometry"}},feComponentTransfer:{attributes:ne},...Object.fromEntries(["feFuncR","feFuncG","feFuncB","feFuncA"].map(t=>[t,{attributes:{type:{oneOf:["identity","table","discrete","linear","gamma"]},tableValues:"geometry",slope:"number",intercept:"number",amplitude:"number",exponent:"number",offset:"number"}}])),feComposite:{attributes:{...ne,in2:"text",operator:{oneOf:["over","in","out","atop","xor","lighter","arithmetic"]},k1:"number",k2:"number",k3:"number",k4:"number"}},feDisplacementMap:{attributes:{...ne,in2:"text",scale:"number",xChannelSelector:qr,yChannelSelector:qr}},feDropShadow:{attributes:{...ne,dx:"number",dy:"number",stdDeviation:"geometry"}},feFlood:{attributes:ne},feGaussianBlur:{attributes:{...ne,stdDeviation:"geometry",edgeMode:{oneOf:["duplicate","wrap","none"]}}},feMerge:{attributes:ne},feMergeNode:{attributes:{in:"text"}},feMorphology:{attributes:{...ne,operator:{oneOf:["erode","dilate"]},radius:"geometry"}},feOffset:{attributes:{...ne,dx:"number",dy:"number"}},feTurbulence:{attributes:{...ue,result:"text",type:{oneOf:["fractalNoise","turbulence"]},baseFrequency:"geometry",numOctaves:"number",seed:"number",stitchTiles:{oneOf:["stitch","noStitch"]}}}};var Wr={section:["aria-label","title"]};function Fo(t){return/^aria-[a-z]+$/.test(t)}function jo(t){return/^data-[a-z0-9][a-z0-9_.-]*$/.test(t)}var qo=new Map(Object.keys(Yr).map(t=>[t.toLowerCase(),t]));function Xr(t){return qo.get(t.toLowerCase())}function $r(t,e,n){let r=n.toLowerCase(),o=t==="html"?[Fn[e]?.attributes,Uo]:[Yr[e]?.attributes,Vo],s=t==="svg"&&r==="xlink:href"?"href":r;for(let i of o)if(i){for(let[a,c]of Object.entries(i))if(a.toLowerCase()===s)return{name:a,kind:c}}if(Fo(r)||jo(r))return{name:r,kind:"text"}}var Kr="~",an=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),se=(t,e=0)=>{if(t===null||typeof t=="string"||typeof t=="number"||typeof t=="boolean"||t===void 0)return t;if(!(e>64||typeof t!="object"))return Array.isArray(t)?t.map(n=>se(n,e+1)):Object.fromEntries(Object.entries(t).map(([n,r])=>[n,se(r,e+1)]))};function Zr(){let t=new Map,e=new Map,n=new Map([[Kr,{children:[],listeners:new Map}]]),r=0,o=u=>{let f=e.get(u);return f===void 0&&(f=r+=1,e.set(u,f),t.set(f,{listener:u,count:0})),t.get(f).count+=1,f},s=u=>{let f=t.get(u);f&&(f.count-=1,!(f.count>0)&&(t.delete(u),e.delete(f.listener)))},i=u=>{let f=n.get(u);if(f){n.delete(u);for(let h of f.listeners.values())s(h);for(let h of f.children)i(h)}},a=(u,f,h=0)=>{if(!an(u)||h>64)return se(u);let g=typeof u.id=="string"?u.id:void 0,y=f&&g!==void 0&&g!==Kr;y&&i(g);let v={children:[],listeners:new Map};y&&n.set(g,v);let b={};for(let[N,M]of Object.entries(u))N==="children"&&Array.isArray(M)?b[N]=M.map(L=>{let w=a(L,y,h+1);return y&&an(L)&&typeof L.id=="string"&&v.children.push(L.id),w}):N==="eventListeners"&&an(M)?b[N]=Object.fromEntries(Object.entries(M).map(([L,w])=>{if(typeof w!="function"||!y)return[L,void 0];let P=o(w);return v.listeners.set(L,P),[L,{listener:P}]})):b[N]=se(M,h+1);return b},c=u=>{if(!Array.isArray(u))return se(u);let[f,h]=u,g=typeof h=="string"?n.get(h):void 0;if(f===0){let y=a(u[2],g!==void 0),v=an(u[2])?u[2].id:void 0;if(g&&typeof v=="string"&&n.has(v)){let b=Number(u[3]);g.children.splice(Number.isInteger(b)&&b>=0&&b<=g.children.length?b:g.children.length,0,v)}return[f,se(h),y,se(u[3])]}if(f===1){let y=Number(u[2]);return g&&Number.isInteger(y)&&y>=0&&y<g.children.length&&i(g.children.splice(y,1)[0]),se(u)}if(f===3&&u[4]===3){let y=String(u[2]),v=u[3],b=g&&typeof v=="function"?o(v):void 0,N=g?.listeners.get(y);return N!==void 0&&s(N),b===void 0?g?.listeners.delete(y):g.listeners.set(y,b),[f,se(h),y,b===void 0?void 0:{listener:b},3]}return se(u)};return{encode:u=>u.map(c),listener:u=>t.get(u)?.listener,get listening(){return t.size},get nodes(){return n.size-1}}}var ln="graview-view-root",zo=["value","checked","key","pressed","files","refused","x","y","width","height","deltaX","deltaY","deltaMode","ctrlKey","metaKey","phase","pointerId","button","pressure","dx","dy","scale","rotation"],Yo=t=>t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/\'/g,"&#39;"),Wo=t=>Object.freeze({html:t,toString:()=>t}),Qr=t=>typeof t=="object"&&t!==null&&typeof t.html=="string"&&Object.isFrozen(t),Jr=t=>t==null||t===!1?"":Array.isArray(t)?t.map(Jr).join(""):Qr(t)?t.html:Yo(String(t));function eo(t){customElements.get(ln)||customElements.define(ln,dt);let e=Event,n=Zr(),r=new Set,o=new Set,s,i=[],a=new Set;for(let l of["closest","matches","dataset"]){let m=()=>{throw new TypeError(`A view\'s element has no ${l}: graview.on hands event.element, the element its selector matched; read event.element.getAttribute("data-\\u2026").`)};l in Element.prototype||Object.defineProperty(Element.prototype,l,l==="dataset"?{get:m}:{value:m})}let c=document.createElement(ln),u=l=>{let m=E=>{for(let O of Array.from(E.childNodes)){if(O.nodeType!==1)continue;if($(O)===l)return O;let T=m(O);if(T)return T}};return m(c)},f=l=>{let m=u(l.target);if(!m)return;let E=new e(l.event,{bubbles:!0}),O={};for(let T of zo)l[T]!==void 0&&(O[T]=l[T]);for(let T of Object.keys(O))Object.defineProperty(E,T,{value:O[T],enumerable:!0});m.dispatchEvent(E);for(let T of o){if(T.type!==l.event)continue;let _;try{_=new Set(Array.from(c.querySelectorAll(T.selector)))}catch{continue}for(let F=m;F&&F!==c;F=F.parentNode)if(_.has(F)){T.listener(Object.freeze({type:l.event,target:m,element:F,...O}));break}}},h=l=>{if(l.type==="dom-event"&&typeof l.target=="string")return f(l);if(l.type==="notice")return t.warn(l.text);if(l.type!=="props")return;s=l.props;let m=t.now();for(let T of r)try{T(l.props)}catch(_){t.threw(_)}let E=t.now()-m,O=l.push;typeof O=="number"&&t.microtask(()=>t.microtask(()=>t.send({type:"pushed",push:O,ms:E})))},g;c.connect({mutate(l){g||(g=[],t.microtask(()=>{let m=g??[];g=void 0,t.send({type:"render",records:n.encode(m)})})),g.push(...l)},call:()=>{}});let y=l=>l.nodeType===1?l.getAttribute("data-key")??l.getAttribute("id"):null,v=(l,m)=>l.nodeType===m.nodeType&&(l.nodeType!==1||l.localName===m.localName&&l.namespaceURI===m.namespaceURI&&y(l)===y(m));function b(l,m){let E=Array.from(m.childNodes),O=0;for(let T of E){let _=l.childNodes[O]??null;if(_&&v(_,T)){N(_,T),O+=1;continue}if(y(T)!==null){let de=Array.from(l.childNodes).slice(O+1).find(Xe=>v(Xe,T));if(de){l.insertBefore(de,_),N(de,T),O+=1;continue}}l.insertBefore(T,_),O+=1}for(;l.childNodes.length>O;)l.removeChild(l.lastChild)}function N(l,m){if(l.nodeType!==1){l.data!==m.data&&(l.data=m.data);return}let E=l,O=m,T=M(E);for(let _ of E.getAttributeNames())O.hasAttribute(_)||(E.removeAttribute(_),T&&Ne(E,_,void 0));for(let _ of O.getAttributeNames()){let F=O.getAttribute(_);E.getAttribute(_)!==F&&E.setAttribute(_,F),T&&Ne(E,_,F)}b(E,O)}let M=l=>l.localName.includes("-");function L(l){for(let m of Array.from(l.childNodes)){if(m.nodeType!==1)continue;let E=m;if(M(E))for(let O of E.getAttributeNames())Ne(E,O,E.getAttribute(O)??void 0);L(E)}}function w(l,m,E){for(let O of Array.from(l.childNodes)){if(O.nodeType!==1)continue;let T=O,_=T.localName,F=m||_.toLowerCase()==="svg",de=F?Xr(_):Object.prototype.hasOwnProperty.call(Fn,_.toLowerCase())?_.toLowerCase():void 0;if(!de){E.add(`<${_}>`);continue}for(let Xe of T.getAttributeNames())(!$r(F?"svg":"html",de,Xe)||!F&&Wr[de]?.includes(Xe.toLowerCase()))&&E.add(`${de} ${Xe}`);w(T,F,E)}}function P(l){let m=document.createElement("div"),E=Array.isArray(l)?l:[l];for(let T of E)if(T!=null)if(typeof T=="string"||Qr(T)){let _=document.createElement("div");_.innerHTML=typeof T=="string"?T:T.html,m.append(...Array.from(_.childNodes))}else m.append(T);let O=new Set;w(m,!1,O),i=[...O],i.length>0&&t.warn(`The host will not draw: ${i.join(", ")}`),L(m),b(c,m)}let q=[],We=new Set(Ir),ft="[]",cn=!1,Yn=()=>{cn||(cn=!0,t.microtask(()=>{cn=!1;let l=[...new Map([...o].filter(E=>We.has(E.type)).map(E=>[`${E.type} ${E.selector}`,{event:E.type,selector:E.selector}])).entries()].sort(([E],[O])=>E<O?-1:E>O?1:0).map(([,E])=>E),m=JSON.stringify(l);m!==ft&&(ft=m,t.send({type:"gestures",bound:l}))}))},Wn="[]",un=!1,Xn=()=>{un||(un=!0,t.microtask(()=>{un=!1;let l=[...new Set([...o].filter(E=>E.type==="click"&&typeof E.selector=="string").map(E=>E.selector))].sort().slice(0,200),m=JSON.stringify(l);m!==Wn&&(Wn=m,t.send({type:"clicks",selectors:l}))}))};return{view:Object.freeze({get props(){return s},onProps(l){return r.add(l),s&&l(s),()=>void r.delete(l)},render:P,style(l){typeof l!="string"||q.includes(l)||(q.push(l),t.send({type:"style",sheets:[...q]}))},on(l,m,E){let O={type:l,selector:m,listener:E};return o.add(O),typeof l=="string"&&!a.has(l)&&(a.add(l),t.send({type:"hears",events:[l]})),We.has(l)&&Yn(),l==="click"&&Xn(),()=>{o.delete(O),We.has(l)&&Yn(),l==="click"&&Xn()}},act:(l,m={})=>t.act(l,m),navigate(l){if(typeof l=="string")return t.navigate(l);let m=on(l);m&&t.send(m)},html(l,...m){return Wo(l.reduce((E,O,T)=>E+O+(T<m.length?Jr(m[T]):""),""))},get refused(){return i},get hardening(){return t.hardening()}}),hear:h,find:l=>{try{let m=c.querySelectorAll(l)[0];return m?$(m):void 0}catch{return}},listened:l=>{let m=new Set;for(let E of o)if(E.type===l)try{for(let O of Array.from(c.querySelectorAll(E.selector))){let T=$(O);T&&m.add(T)}}catch{}return[...m]}}}var zn={removed:[],stuck:[],sealed:!1,worker:!1},jn=Lr({listen(t){return _e.listen(t),()=>_e.unlisten(t)},fromHost:()=>!0,ready:t=>_e.post(t)},{onMessage:t=>to.hear(t)}),to=eo({send:t=>jn.send(t),act:(t,e)=>jn.guest.act(t,e),navigate:t=>jn.guest.navigate(t),microtask:_e.microtask,now:_e.now,threw:t=>console.error(t),warn:t=>console.warn(t),hardening:()=>zn}),Xo=to.view;Object.defineProperty(globalThis,"graview",{value:Xo,enumerable:!0,configurable:!0,writable:!1});var qn="WorkerGlobalScope"in globalThis?Fr(globalThis,["graview"]):zn;zn=qn;if(qn.stuck.length>0)throw new Error(`The view\'s worker could not be hardened: ${qn.stuck.join(", ")} would not go.`);})();\n';export{e as VIEW_RUNTIME};
@@ -0,0 +1,25 @@
1
+ var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{a as Ye}from"./chunk.SDO3U72B.js";import{Fd as uo,Id as co,N as to,Na as no,Pc as io,Ra as Mt,Ta as oo,Yd as po,db as ro,ge as fo,he as yo,ne as mo,qd as ao,re as go,te as Ue,ue as Ct,xd as so,zd as lo}from"./chunk.Q4MI53KK.js";import{a as $e,b as H}from"./chunk.AJZBJBMO.js";var _o=$e(S=>{"use strict";var Nt=Symbol.for("react.transitional.element"),li=Symbol.for("react.portal"),di=Symbol.for("react.fragment"),ui=Symbol.for("react.strict_mode"),ci=Symbol.for("react.profiler"),pi=Symbol.for("react.consumer"),fi=Symbol.for("react.context"),yi=Symbol.for("react.forward_ref"),mi=Symbol.for("react.suspense"),gi=Symbol.for("react.memo"),Mo=Symbol.for("react.lazy"),hi=Symbol.for("react.activity"),ko=Symbol.iterator;function wi(e){return e===null||typeof e!="object"?null:(e=ko&&e[ko]||e["@@iterator"],typeof e=="function"?e:null)}var Co={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Oo=Object.assign,Vo={};function we(e,t,n){this.props=e,this.context=t,this.refs=Vo,this.updater=n||Co}we.prototype.isReactComponent={};we.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};we.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Io(){}Io.prototype=we.prototype;function Wt(e,t,n){this.props=e,this.context=t,this.refs=Vo,this.updater=n||Co}var jt=Wt.prototype=new Io;jt.constructor=Wt;Oo(jt,we.prototype);jt.isPureReactComponent=!0;var Ao=Array.isArray;function Dt(){}var I={H:null,A:null,T:null,S:null},Lo=Object.prototype.hasOwnProperty;function Gt(e,t,n){var o=n.ref;return{$$typeof:Nt,type:e,key:t,ref:o!==void 0?o:null,props:n}}function Si(e,t){return Gt(e.type,t,e.props)}function Ft(e){return typeof e=="object"&&e!==null&&e.$$typeof===Nt}function vi(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Ro=/\/+/g;function Ht(e,t){return typeof e=="object"&&e!==null&&e.key!=null?vi(""+e.key):t.toString(36)}function bi(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Dt,Dt):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function he(e,t,n,o,r){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(i){case"bigint":case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Nt:case li:a=!0;break;case Mo:return a=e._init,he(a(e._payload),t,n,o,r)}}if(a)return r=r(e),a=o===""?"."+Ht(e,0):o,Ao(r)?(n="",a!=null&&(n=a.replace(Ro,"$&/")+"/"),he(r,t,n,"",function(u){return u})):r!=null&&(Ft(r)&&(r=Si(r,n+(r.key==null||e&&e.key===r.key?"":(""+r.key).replace(Ro,"$&/")+"/")+a)),t.push(r)),1;a=0;var s=o===""?".":o+":";if(Ao(e))for(var l=0;l<e.length;l++)o=e[l],i=s+Ht(o,l),a+=he(o,t,n,i,r);else if(l=wi(e),typeof l=="function")for(e=l.call(e),l=0;!(o=e.next()).done;)o=o.value,i=s+Ht(o,l++),a+=he(o,t,n,i,r);else if(i==="object"){if(typeof e.then=="function")return he(bi(e),t,n,o,r);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return a}function ot(e,t,n){if(e==null)return e;var o=[],r=0;return he(e,o,"","",function(i){return t.call(n,i,r++)}),o}function xi(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var To=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Pi={map:ot,forEach:function(e,t,n){ot(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ot(e,function(){t++}),t},toArray:function(e){return ot(e,function(t){return t})||[]},only:function(e){if(!Ft(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};S.Activity=hi;S.Children=Pi;S.Component=we;S.Fragment=di;S.Profiler=ci;S.PureComponent=Wt;S.StrictMode=ui;S.Suspense=mi;S.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I;S.__COMPILER_RUNTIME={__proto__:null,c:function(e){return I.H.useMemoCache(e)}};S.cache=function(e){return function(){return e.apply(null,arguments)}};S.cacheSignal=function(){return null};S.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var o=Oo({},e.props),r=e.key;if(t!=null)for(i in t.key!==void 0&&(r=""+t.key),t)!Lo.call(t,i)||i==="key"||i==="__self"||i==="__source"||i==="ref"&&t.ref===void 0||(o[i]=t[i]);var i=arguments.length-2;if(i===1)o.children=n;else if(1<i){for(var a=Array(i),s=0;s<i;s++)a[s]=arguments[s+2];o.children=a}return Gt(e.type,r,o)};S.createContext=function(e){return e={$$typeof:fi,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:pi,_context:e},e};S.createElement=function(e,t,n){var o,r={},i=null;if(t!=null)for(o in t.key!==void 0&&(i=""+t.key),t)Lo.call(t,o)&&o!=="key"&&o!=="__self"&&o!=="__source"&&(r[o]=t[o]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var s=Array(a),l=0;l<a;l++)s[l]=arguments[l+2];r.children=s}if(e&&e.defaultProps)for(o in a=e.defaultProps,a)r[o]===void 0&&(r[o]=a[o]);return Gt(e,i,r)};S.createRef=function(){return{current:null}};S.forwardRef=function(e){return{$$typeof:yi,render:e}};S.isValidElement=Ft;S.lazy=function(e){return{$$typeof:Mo,_payload:{_status:-1,_result:e},_init:xi}};S.memo=function(e,t){return{$$typeof:gi,type:e,compare:t===void 0?null:t}};S.startTransition=function(e){var t=I.T,n={};I.T=n;try{var o=e(),r=I.S;r!==null&&r(n,o),typeof o=="object"&&o!==null&&typeof o.then=="function"&&o.then(Dt,To)}catch(i){To(i)}finally{t!==null&&n.types!==null&&(t.types=n.types),I.T=t}};S.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()};S.use=function(e){return I.H.use(e)};S.useActionState=function(e,t,n){return I.H.useActionState(e,t,n)};S.useCallback=function(e,t){return I.H.useCallback(e,t)};S.useContext=function(e){return I.H.useContext(e)};S.useDebugValue=function(){};S.useDeferredValue=function(e,t){return I.H.useDeferredValue(e,t)};S.useEffect=function(e,t){return I.H.useEffect(e,t)};S.useEffectEvent=function(e){return I.H.useEffectEvent(e)};S.useId=function(){return I.H.useId()};S.useImperativeHandle=function(e,t,n){return I.H.useImperativeHandle(e,t,n)};S.useInsertionEffect=function(e,t){return I.H.useInsertionEffect(e,t)};S.useLayoutEffect=function(e,t){return I.H.useLayoutEffect(e,t)};S.useMemo=function(e,t){return I.H.useMemo(e,t)};S.useOptimistic=function(e,t){return I.H.useOptimistic(e,t)};S.useReducer=function(e,t,n){return I.H.useReducer(e,t,n)};S.useRef=function(e){return I.H.useRef(e)};S.useState=function(e){return I.H.useState(e)};S.useSyncExternalStore=function(e,t,n){return I.H.useSyncExternalStore(e,t,n)};S.useTransition=function(){return I.H.useTransition()};S.version="19.2.8"});var W=$e((as,Ho)=>{"use strict";Ho.exports=_o()});var $o=$e(at=>{"use strict";var Ii=Symbol.for("react.transitional.element"),Li=Symbol.for("react.fragment");function zo(e,t,n){var o=null;if(n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),"key"in t){n={};for(var r in t)r!=="key"&&(n[r]=t[r])}else n=t;return t=n.ref,{$$typeof:Ii,type:e,key:o,ref:t!==void 0?t:null,props:n}}at.Fragment=Li;at.jsx=zo;at.jsxs=zo});var _e=$e((gs,Uo)=>{"use strict";Uo.exports=$o()});var me={focusId:null,relation:null,expanded:[],pins:{}},Ze=e=>{let t=Number(e);return Number.isFinite(t)?t:null};function Q(e){let t=new URLSearchParams;e.focusId&&t.set("focus",e.focusId),e.relation&&t.set("relation",e.relation),e.overview&&t.set("overview","1"),e.zoom&&t.set("zoom","1"),e.past&&t.set("past","1"),e.shown&&e.shown.length>0&&t.set("show",[...e.shown].sort().join(",")),e.selection!==void 0&&e.selection.length>0&&t.set("sel",[...e.selection].sort().join(",")),e.expanded.length>0&&t.set("expand",[...e.expanded].sort().join(","));for(let o of Object.keys(e.pins).sort()){let r=e.pins[o];t.set(`pin.${o}`,`${Xe(r.x)},${Xe(r.y)}`)}e.pan&&(e.pan.x!==0||e.pan.y!==0)&&t.set("pan",`${Xe(e.pan.x)},${Xe(e.pan.y)}`);for(let o of Object.keys(e.within??{}).sort()){let r=e.within[o];r.length>0&&t.set(`in.${o}`,r)}e.q&&e.q.trim().length>0&&t.set("q",e.q);let n=t.toString();return n?`#${n}`:"#"}function ni(e){return e&&e.startsWith("agg:")?`aggregate:${e.slice(4)}`:e}function Je(e){let t=e.includes("#")?e.slice(e.indexOf("#")+1):e,n=new URLSearchParams(t),o=Object.create(null);for(let[m,y]of n){if(!m.startsWith("pin."))continue;let[g,b]=y.split(","),A=g===void 0?null:Ze(g),f=b===void 0?null:Ze(b);A===null||f===null||(o[m.slice(4)]={x:A,y:f})}let r=Object.create(null);for(let[m,y]of n)!m.startsWith("in.")||y.length===0||(r[m.slice(3)]=y);let i=n.get("view");i&&i.length>0&&r.view===void 0&&(r.view=i);let a=n.get("pan")?.split(",")??[],s=a[0]===void 0?null:Ze(a[0]),l=a[1]===void 0?null:Ze(a[1]),u=(n.get("sel")??"").split(",").filter(m=>m.length>0).sort(),c=n.get("overview")==="1";return{...u.length>0?{selection:u}:{},...c?{overview:!0}:{},...n.get("zoom")==="1"?{zoom:!0}:{},...n.get("past")==="1"?{past:!0}:{},...n.get("show")?{shown:[...new Set(n.get("show").split(",").filter(Boolean))].sort()}:{},...s!==null&&l!==null?{pan:{x:s,y:l}}:{},...Object.keys(r).length>0?{within:r}:{},...n.get("q")?.trim()?{q:n.get("q")}:{},focusId:ni(n.get("focus")),relation:n.get("relation"),expanded:(n.get("expand")??"").split(",").filter(m=>m.length>0&&(c||!m.startsWith("kind:"))).sort(),pins:o}}function Ka(e){let t=Je(e);return Q(t)==="#"?{...t,overview:!0}:t}function Ba(e){let t=Q(e);return t==="#overview=1"?"":t}function Xe(e){return Math.round(e*100)/100}function wo(e,t){return Q(e)===Q(t)}var ho="edge:";function So(e){if(!e.startsWith(ho))return null;let t=e.slice(ho.length).split(":");if(t.length!==3)return null;let[n,o,r]=t;if(!n||!o||!r)return null;try{return{kind:decodeURIComponent(n),from:decodeURIComponent(o),to:decodeURIComponent(r)}}catch{return null}}function Ot(e){let{pan:t,...n}=e;return{...n,pins:{}}}function q(e,t){if(t===e.focusId)return{...e,focusId:t};let n=Ot(e);return{...n.within?.q!==void 0?ee(n,"q",null):n,focusId:t}}function vo(e,t){return{...e,relation:t}}function ee(e,t,n){let o={...e.within??{}};if(n===null?delete o[t]:o[t]=n,Object.keys(o).length===0){let{within:r,...i}=e;return i}return{...e,within:o}}function de(e,t){if(t!==e.overview&&(e=Ot(e)),!t){let n=e.expanded.filter(o=>!o.startsWith("kind:"));return{...e,overview:!1,expanded:n}}return{...e,overview:t}}function Qe(e,t){if(t.length===0){let{selection:n,...o}=e;return o}return{...e,selection:[...t]}}function Ie(e,t){if(t!==(e.zoom===!0)&&(e=Ot(e)),!t){let{zoom:n,...o}=e;return o}return{...e,zoom:!0}}function et(e,t){let n=new Set(e.expanded);return n.has(t)?n.delete(t):n.add(t),{...e,expanded:[...n].sort()}}var nt="aggregate:",tt="kind:";function Vt(e){return`${tt}${e}`}function ge(e){return e.startsWith(tt)?e.slice(tt.length):null}var $a="kinds:beyond";function oi(e){let t=ge(e);return t?[t]:ue(e)}function te(...e){return`${nt}${[...e].sort().join("+")}`}function bo(e){return e.startsWith(nt)}function ue(e){return!bo(e)||e.includes("|")?[]:e.slice(nt.length).split("+").filter(Boolean)}function xo(e,t,n={}){let o=ge(t);if(o!==null&&e.overview&&n.ownPicture!==!0)return et(e,t);let r=o!==null?te(o):t;if(e.zoom&&e.focusId===r&&!(o!==null&&n.carry))return Ie(e,!1);if(o!==null&&n.carry){let i=de({...q(e,r),relation:null},!1);return ee(Ie(i,!0),"q",n.carry)}return Ie({...q(e,r),relation:null},!0)}function ri(e,t,n){return ee(de(q(e,te(t)),!1),"view",n)}function Ua(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var Po="aggregate:";function It(e){return e.startsWith(Po)&&e.includes("|")}var Lt=e=>e?.off===!0,ii=e=>e!==void 0&&!Lt(e)&&(e.fast!==void 0||e.thinking!==void 0||e.answer!==void 0||e.decide!==void 0||e.complete!==void 0||e.turn!==void 0),Eo=e=>e!==void 0&&!Lt(e)&&(e.fast!==void 0||e.decide!==void 0),ai=e=>e?.suggestOnOpen!==!1&&Eo(e),si=e=>e?.hoverChips===!0&&Eo(e);var _t={};var Do=H(W(),1),Ei={turns:[],outcomes:new Map,busy:!1,pending:null,draft:null,draftNote:null},No=e=>`graview:seat:${e}`;function ki(e){if(!e)return{};try{let t=sessionStorage.getItem(e);if(!t)return{};let n=JSON.parse(t);return{...Array.isArray(n.turns)?{turns:n.turns}:{},...Array.isArray(n.outcomes)?{outcomes:new Map(n.outcomes)}:{},...n.draft?.drawn?{draft:n.draft}:{}}}catch{return{}}}function Ai(e,t){if(e)try{sessionStorage.setItem(e,JSON.stringify({turns:t.turns.slice(-40),outcomes:[...t.outcomes],draft:t.draft}))}catch{}}function Kt(e){let t=e===null?null:No(e),n={...Ei,...ki(t)},o=new Set,r=(i,a=!0)=>{n=i,a&&Ai(t,n);for(let s of[...o])s()};return{get:()=>n,subscribe(i){return o.add(i),()=>void o.delete(i)},setTurns:i=>r({...n,turns:i(n.turns)}),settle:(i,a)=>r({...n,outcomes:new Map(n.outcomes).set(i,a)}),setBusy:i=>r({...n,busy:i},!1),ask:i=>r({...n,pending:i.trim()||null}),takePending(){let i=n.pending;return i!==null&&r({...n,pending:null},!1),i},setDraft:(i,a=null)=>r({...n,draft:i,draftNote:a})}}function Ri(e){return(0,Do.useSyncExternalStore)(e.subscribe,e.get,e.get)}var jo=H(W(),1),Ti={entries:[],ghost:null,loaded:!1};function Wo(e,t){let n=new Map(e.map(o=>[o.id,o]));for(let o of t)n.set(o.id,{...n.get(o.id),...o});return[...n.values()].sort((o,r)=>o.at<r.at?1:o.at>r.at?-1:0)}function Bt(e){let t=Ti,n=new Set,o=r=>{t=r;for(let i of[...n])i()};return{get:()=>t,subscribe:r=>(n.add(r),()=>n.delete(r)),record:r=>{o({...t,entries:Wo(t.entries,[r])}),Promise.resolve(e()?.keep?.(r)).catch(i=>{console.warn("The host did not keep an AI interaction:",i)})},setGhost:r=>o({...t,ghost:r}),load:()=>{if(t.loaded)return;o({...t,loaded:!0});let r=e()?.load;r&&Promise.resolve(r()).then(i=>o({...t,entries:Wo(t.entries,i)})).catch(i=>{console.warn("The host's AI interactions could not be read:",i)})}}}function Mi(e){return(0,jo.useSyncExternalStore)(e.subscribe,e.get,e.get)}function Go(e){return e?.closest?.("[data-graview-pick]")?.getAttribute("data-graview-pick")??null}var rt=H(W(),1),it=(0,rt.createContext)(void 0),Ci=()=>(0,rt.useContext)(it);var E=H(W(),1),Le=(0,E.createContext)(null);function Ko(){return(0,E.useContext)(Le)}function Oi(e,t){let n=Ko(),o=(0,E.useMemo)(()=>n?n.live.seenBy(t):e,[n,e,t]),r=(0,E.useRef)(0),i=(0,E.useCallback)(a=>o.subscribe(()=>{r.current+=1,a()}),[o]);return(0,E.useSyncExternalStore)(i,()=>r.current,()=>0),o}var Bo=Ye(()=>(__graviewPreload(import.meta.url,["./chunk.YFVJUHAK.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.FC6AF6CC.js")));function qt(e){let[,t]=(0,E.useReducer)(o=>o+1,0),n=e.publishing?.mode==="on-publish"&&!so();return(0,E.useEffect)(()=>{n&&Bo().then(t,()=>{})},[n]),!n}var Fo,Vi=400;function zt(e,t,n){let o=(0,E.useContext)(Le),r=o!==null&&o.owns(e,t),[i,a]=(0,E.useState)(null),[s,l]=(0,E.useState)(Fo);(0,E.useEffect)(()=>{if(s||r||i===null)return;let P=!0;return Bo().then(T=>{Fo=T,P&&l(T)},()=>{}),()=>{P=!1}},[s,r,i]);let[u,c]=(0,E.useState)(0),[m,y]=(0,E.useMemo)(()=>r||i===null||!s?[]:[i>=e.log.length?void 0:s.askArchived(e,i,n)??s.askDeclaration(n,i),s.keptOf(e,n)],[r,e,i,n,s,u]),g=m&&"waiting"in m?m.waiting:void 0,b=m&&"seq"in m?m:null,[A,f]=(0,E.useState)(void 0);(0,E.useEffect)(()=>{if(!g)return;let P=!0,T=setTimeout(()=>P&&f(g),Vi);return g.then(()=>P&&c(_=>_+1)),()=>{P=!1,clearTimeout(T)}},[g]);let w=g!==void 0&&A!==g||b!==null,v=(0,E.useMemo)(()=>{if(r||i===null||i>=e.log.length||!s||w)return null;try{let P=s.pastAt(e,i,n);return{seq:i,at:P.past?.at,store:P}}catch{return null}},[r,e,i,n,s,w,u]),k=(0,E.useRef)(null),x=w?k.current:v;(0,E.useEffect)(()=>{k.current=x},[x]);let j=(0,E.useCallback)(P=>a(P===null?null:P>=e.log.length?Number.POSITIVE_INFINITY:P),[e]),G=(0,E.useCallback)((P,T)=>[e,x?.store].some(_=>_!==void 0&&(_===P||_.seenBy(T)===P)),[e,x]),D=i!==null,O=(0,E.useMemo)(()=>({past:x,open:D,show:j,live:e,host:n,owns:G,archive:b,kept:y}),[x,D,j,e,n,G,b,y]);return r?o:O}var qo=H(W(),1),$t=(0,qo.createContext)(null);var Yo=e=>`graview:setting:${e}`;function Zo(){return localStorage}function Xo(e,t){try{let n=(t??Zo()).getItem(Yo(e.name));if(n!==null&&e.options.some(o=>o.value===n))return n}catch{}return e.initial}function Jo(e,t,n){try{(n??Zo()).setItem(Yo(e.name),t)}catch{}}function Qo(e,t){if(typeof document>"u")return;let n=document.documentElement;if(e.honored==="root-font-size"){n.style.fontSize=t===e.initial?"":t;return}let o=`graview${e.name.replace(/-([a-z0-9])/g,(r,i)=>i.toUpperCase()).replace(/^[a-z]/,r=>r.toUpperCase())}`;t===e.initial?delete n.dataset[o]:n.dataset[o]=t}var L=H(W(),1);function Ut(e){return Ue(e)}var _i=12,Hi=4;function Di(e,t,n){let o=Ut(t);return e.get(o)??{participant:o,who:t.id??t.kind,at:null,mode:"docked",since:n,trail:[]}}var st=(e,t)=>t===null||e[e.length-1]===t?e:[...e,t].slice(-_i);function er(e,t){let n=e.filter(r=>r.length>0);if(n.length===0)return null;if(n.length<=Hi)return n[0];let o=new Set(n.map(r=>t(r)).filter(r=>r!==void 0));return o.size===1?Vt([...o][0]):n[0]}function Yt(e,t,n){let o=new Map(e);if(t.type==="rest"){for(let[a,s]of e)s.mode!=="asking"&&s.mode!=="docked"&&t.at-s.since>=t.holdMs&&o.set(a,{...s,mode:"docked",at:null,trail:[],say:void 0,confidence:void 0});return o}if(t.author.kind!=="agent")return o;let r=Di(e,t.author,t.at),i=a=>o.set(r.participant,{...r,...a,since:t.at});switch(t.type){case"read":{let a=er(t.ids,n);return i({at:a,mode:"reading",trail:st(r.trail,a)}),o}case"about-to-write":case"write":{let a=er(t.ids,n);return i({at:a,mode:"writing",trail:st(r.trail,a),say:void 0,confidence:void 0}),o}case"refused":return i({at:t.where,mode:"refused",say:t.say,confidence:void 0,trail:st(r.trail,t.where)}),o;case"asking":return i({at:t.where??r.at,mode:"asking",say:t.say,...t.confidence!==void 0?{confidence:t.confidence}:{confidence:void 0},trail:st(r.trail,t.where)}),o;case"said":return i({say:t.say,...t.confidence!==void 0?{confidence:t.confidence}:{confidence:void 0},...t.caption?{caption:t.caption}:{}}),o;case"over":return i({over:t.over}),o;case"home":return i({at:null,mode:"docked",trail:[],say:void 0,confidence:void 0,over:null}),o;default:return o}}var tr="graview:session";function nr(e){let t=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID().slice(0,8):Math.random().toString(36).slice(2,10);try{let n=e??sessionStorage,o=n.getItem(tr);if(o)return o;let r=t();return n.setItem(tr,r),r}catch{return t()}}var Zt={name:"share-where",title:"Where you are",description:"Whether the others here see which stop you are on.",honored:"root-attribute",options:[{value:"shared",label:"Shown"},{value:"private",label:"Hidden"}],initial:"shared"},Xt={name:"share-over",title:"What you point at",description:"Whether the others see the thing under your pointer, outlined in your color.",honored:"root-attribute",options:[{value:"private",label:"Kept to yourself"},{value:"shared",label:"Outlined for others"}],initial:"private"},or=[Zt,Xt],Ni=800;function rr(e){let{channel:t,store:n,view:o,principal:r,session:i,robots:a,seatWho:s,settingValues:l,setView:u,ttlMs:c=go,people:m,seats:y}=e,[g,b]=(0,L.useState)(()=>new Map),[A,f]=(0,L.useState)(null),[w,v]=(0,L.useState)(null),[k,x]=(0,L.useState)(null),j=typeof r.id=="string"&&r.id.length>0,G=j&&(l[Zt.name]??Zt.initial)==="shared",D=G&&(l[Xt.name]??Xt.initial)==="shared",O=Ut({kind:r.kind,...r.id?{id:r.id}:{},session:i}),P=j?ro(r,{graph:n.graph,schema:n.schema,...y?{seats:y}:{},...m?{people:m}:{}}):"",T=s?a.get(`agent:${s}:${i}`):void 0,_=(0,L.useMemo)(()=>!t||!G?null:{participant:O,kind:r.kind,name:P,...r.onBehalfOf?.id?{onBehalfOf:r.onBehalfOf.id,...r.onBehalfOf.name?{onBehalfOfName:r.onBehalfOf.name}:{}}:{},hue:io(r.id??"nobody"),stop:k??Q(o),...D?{over:A}:{},...T?{robot:{at:T.at,mode:T.mode}}:{},at:new Date().toISOString()},[t,G,D,O,P,r.id,r.kind,r.onBehalfOf?.id,r.onBehalfOf?.name,o,k,A,T?.at,T?.mode]),Ne=(0,L.useRef)(null),Ee=R=>R&&t?.here({...R,caret:Ne.current??void 0,at:new Date().toISOString()}),We=(0,L.useCallback)(R=>{Ne.current=R,Ee(_)},[t,_]);(0,L.useEffect)(()=>{if(!_)return;Ee(_);let R=setInterval(()=>Ee(_),Ni);return()=>clearInterval(R)},[t,_]),(0,L.useEffect)(()=>t?t.onWho(K=>b(Ct(new Map,K,Date.now(),c))):void 0,[t,c]);let ke=g.size>0;(0,L.useEffect)(()=>{if(!ke)return;let R=setInterval(()=>{b(K=>{let ae=Ct(K,[],Date.now(),c);return ae.size===K.size?K:ae})},Math.max(250,Math.min(1e3,c/4)));return()=>clearInterval(R)},[ke,c]),(0,L.useEffect)(()=>{if(!t||typeof window>"u")return;let R=()=>t.leave();return window.addEventListener("pagehide",R),()=>window.removeEventListener("pagehide",R)},[t]),(0,L.useEffect)(()=>{if(!D||typeof document>"u")return;let R=null,K=ae=>{let pe=Go(ae.target);pe!==R&&(R=pe,f(pe))};return document.addEventListener("pointermove",K,{passive:!0}),()=>document.removeEventListener("pointermove",K)},[D]);let re=(0,L.useRef)(null),Z=w?g.get(w)??null:null,je=(0,L.useCallback)(R=>{re.current=null,v(R)},[]);(0,L.useEffect)(()=>{if(w){if(!Z){v(null);return}Z.stop!==re.current?.stop&&(re.current={stop:Z.stop,at:Date.now()},u(Je(Z.stop)))}},[w,Z,u]),(0,L.useEffect)(()=>{let R=re.current;!w||R===null||Date.now()-R.at<400||wo(o,Je(R.stop))||v(null)},[o,w]),(0,L.useEffect)(()=>{if(!w||typeof document>"u")return;let R=K=>{K.key==="Escape"&&v(null)};return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[w]);let X=_!==null,ie=(0,L.useMemo)(()=>X?{participant:O,name:P}:null,[X,O,P]);return(0,L.useMemo)(()=>({who:g,sharing:ie,following:Z,follow:je,sayWhere:x,sayCaret:We}),[g,ie,Z,je,We])}var U=H(W(),1);function ir(e){return Ue(e.author)}function Wi(e,t){return e.length>1?"co-edited":t==="rule"?"rule":t==="agent"?"autonomous":"directed"}function ar(e,t,n,o,r){let i=new Map;for(let[l,u]of e)o-u.at<r&&i.set(l,u);let a=new Set(n.flatMap(l=>l.nodeIds)),s=(l,u,c)=>{let m=i.get(l),y=m?.participants.includes(ir(u))?m.participants:[...m?.participants??[],ir(u)];i.set(l,{at:o,manner:Wi(y,u.author.kind),intent:u.intent,wrote:(m?.wrote??!1)||(c.wrote??!1),read:(m?.read??!1)||(c.read??!1),broke:(m?.broke??!1)||a.has(l),participants:y})};for(let l of t){for(let u of l.writes)s(u,l,{wrote:!0});for(let u of l.reads)l.writes.includes(u)||s(u,l,{read:!0})}for(let l of n)for(let u of l.nodeIds){let c=i.get(u);i.set(u,{at:o,manner:c?.manner??"rule",intent:c?.intent??l.message,wrote:c?.wrote??!1,read:c?.read??!1,broke:!0,participants:c?.participants??["rule::"]})}return i}var ji=2600;function sr(e,t=ji){let[n,o]=(0,U.useState)(()=>new Map),r=(0,U.useRef)(n);r.current=n;let i=(0,U.useRef)(null),a=(0,U.useCallback)(l=>{r.current=l,o(l),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{r.current=new Map,o(new Map)},t)},[t]);(0,U.useEffect)(()=>{let l=e.violations(),u=e.subscribe((c,m)=>{let y=e.violations(),g=co(e.allInvariants(),l,y).introduces;l=y,a(ar(r.current,m,g.map(b=>({nodeIds:b.nodeIds,message:b.message})),Date.now(),t))});return()=>{u(),i.current&&clearTimeout(i.current)}},[e,t,a]);let s=(0,U.useCallback)(l=>{l.reads.length!==0&&a(ar(r.current,[Gi(l)],[],Date.now(),t))},[t,a]);return{activity:n,noteAttention:s}}function Gi(e){return{id:`attention:${e.intent}`,seq:-1,batch:"attention",author:e.author,intent:e.intent,mutation:null,primitives:[],reads:e.reads,writes:[],at:new Date().toISOString()}}var d=H(W(),1);function lr(){let e=null,t=new Set,n=new Set,o=r=>{for(let i of n)i(r)};return{subscribe(r){return t.add(r),t.size===1&&o(!0),()=>{t.delete(r),t.size===0&&(e=null,o(!1))}},snapshot:()=>e,set(r){if(!(e===r||e&&r&&e.x===r.x&&e.y===r.y)){e=r;for(let i of t)i()}},get listeners(){return t.size},onActive(r){return n.add(r),()=>void n.delete(r)}}}var lt=H(W(),1),Fi=e=>e.definitions.some(t=>no(t).size>0);function dr(e,t,n){let[o,r]=(0,lt.useState)(void 0),i=(n.roles??[]).join("\0"),a=n.onBehalfOf?JSON.stringify(n.onBehalfOf):"";return(0,lt.useEffect)(()=>{if(!t||!Fi(e.schema)){r(void 0);return}let s=!0,l=!1,u=e.graph,c=()=>{l||(l=!0,queueMicrotask(()=>{l=!1,s&&e.reread()}))},m=oo(t,{kind:n.kind,...n.id===void 0?{}:{id:n.id},...n.roles?{roles:n.roles}:{},...n.onBehalfOf?{onBehalfOf:n.onBehalfOf}:{}},c);return Mt(u,m.read),r(m),e.reread(),()=>{s=!1,Mt(u,void 0)}},[e,t,n.kind,n.id,i,a]),o}function ur(){let e=!1,t=new Set;return{moving:()=>e,set(n){if(n!==e){e=n;for(let o of t)o()}},subscribe(n){return t.add(n),()=>t.delete(n)}}}var ne=H(_e(),1),Ki="graview:place-menu",He=(0,d.createContext)(null),yr=(0,d.createContext)("scene");function Bi({mode:e,children:t}){return(0,ne.jsx)(yr.Provider,{value:e,children:t})}function qi(){return(0,d.useContext)(yr)}var mr={kind:"human"},zi=[],$i=[],Ui=[],Jt=[];function gr(e,t){let n=(0,d.useId)();(0,d.useEffect)(()=>{if(!globalThis.__graviewWatch)return;let o=t??mr,r=()=>uo(e,o,n);r();let i,a=e.subscribe(()=>{clearTimeout(i),i=setTimeout(r,250)});return()=>{clearTimeout(i),a(),globalThis.__graviewWatch?.unseen?.({words:[],from:n,gone:!0})}},[e,t,n])}var Yi=()=>{try{return typeof location<"u"&&new URLSearchParams(location.search).get("as")==="published"?"published":void 0}catch{return}},Zi={off:!0};function Xi({store:e,views:t,initialView:n,scheme:o="dark",initialSelection:r,principal:i,as:a,seats:s=zi,onSeat:l,people:u=$i,memory:c,presenceTtlMs:m,app:y,settings:g=y?.settings??Ui,presence:b,typing:A,brand:f,locale:w,timeZone:v,onKeepLens:k,onProposeChange:x,providers:j,ai:G,files:D,resolveApp:O,history:P,linkedRecords:T,menuSections:_,keptViews:Ne,onExport:Ee,subscriptions:We,dismissals:ke,whileAway:re,workflowRuns:Z,signIn:je,view:X,onViewChange:ie,children:R}){let K=(0,d.useContext)(He),ae=_??K?.menuSections,pe=je??K?.signIn,St=Z??K?.workflowRuns,vt=Ne??K?.keptViews,bt=Ee??K?.onExport,[Fr,Kr]=(0,d.useState)(null),fe=Fr??i??s[0]?.principal??mr,Ge=zt(e,fe,P),hn=Ge.past&&Ge.live===e?Ge.past.store:e,xt=a??Yi(),Pt=!qt(e),N=(0,d.useMemo)(()=>Pt?e:hn.seenBy(fe,xt?{as:xt}:void 0),[Pt,e,hn,fe,xt]);gr(e,fe);let[se]=(0,d.useState)(()=>nr(c)),[wn,Br]=(0,d.useState)(!1),Sn=(0,d.useCallback)(()=>Br(!0),[]),le=(0,d.useMemo)(()=>b?[...g,...or]:g,[g,b]),[Et]=(0,d.useState)(()=>n??nn(t,e.schema)),[qr,vn]=(0,d.useState)(()=>Qe(Et??me,r??Et?.selection??[])),Ae=(0,d.useRef)(Et??me).current,[bn,zr]=(0,d.useState)(null),[xn,$r]=(0,d.useState)(null),z=(0,d.useContext)(He),[Pn]=(0,d.useState)(()=>z?.seatTalk??Kt(f?.name??e.schema.kinds.join(","))),kt=G??z?.ai??_t,Fe=(0,d.useMemo)(()=>kt.off?Zi:kt,[kt]),En=(0,d.useRef)(Fe.interactions);En.current=Fe.interactions;let[kn]=(0,d.useState)(()=>z?.aiDesk??Bt(()=>En.current)),[Ur]=(0,d.useState)(()=>z?.subscriptions??lo()),An=We??z?.subscriptions??Ur,At=k??z?.onKeepLens,Rn=x??z?.onProposeChange,Ke=y??z?.app,Be=w??z?.locale,Yr=f?.locale??Ke?.brand?.locale,qe=v??z?.timeZone;to({reader:Be,app:Yr,readerTimeZone:qe,appTimeZone:f?.timeZone??Ke?.brand?.timeZone});let Tn=(0,d.useRef)(null),Mn=(0,d.useCallback)(p=>{Tn.current=p},[]),Cn=(0,d.useCallback)(p=>Tn.current?.whereIs(p)??null,[]),[On]=(0,d.useState)(()=>lr()),[Vn]=(0,d.useState)(()=>ur()),[Rt,Zr]=(0,d.useState)(null),[Re,In]=(0,d.useState)(()=>new Map),Te=(0,d.useRef)(Re);Te.current=Re;let Me=(0,d.useRef)(null),Tt=(0,d.useCallback)(p=>N.graph.getNode(p)?.kind,[N]),J=(0,d.useCallback)(p=>{let h=Yt(Te.current,p,Tt);Te.current=h,In(h),Me.current&&clearTimeout(Me.current),[...h.values()].some(V=>V.mode!=="docked"&&V.mode!=="asking")&&(Me.current=setTimeout(()=>{let V=Yt(Te.current,{type:"rest",at:Date.now(),holdMs:tn},Tt);Te.current=V,In(V)},tn+20))},[Tt]),Ln=(0,d.useCallback)(p=>J({...p,at:p.at??Date.now()}),[J]),_n=(0,d.useCallback)(p=>{Zr(p),p&&J({type:"home",author:{kind:"agent",id:p,session:se},at:Date.now()})},[J,se]);(0,d.useEffect)(()=>N.subscribe((p,h)=>{for(let M of h)M.author.kind==="agent"&&J({type:"write",author:M.author,ids:M.writes,at:Date.now()})}),[N,J]),(0,d.useEffect)(()=>()=>{Me.current&&clearTimeout(Me.current)},[]);let $=(0,d.useMemo)(()=>({...fe,session:se}),[fe,se]),Hn=dr(N,T,$),Dn=(0,d.useCallback)(p=>{Kr(p),l?.(p)},[l]),[Ce,Xr]=(0,d.useState)(()=>Object.fromEntries(le.map(p=>[p.name,Xo(p,c)])));(0,d.useEffect)(()=>{for(let p of le)Qo(p,Ce[p.name]??p.initial)},[le,Ce]);let Nn=(0,d.useCallback)((p,h)=>{let M=le.find(V=>V.name===p);!M||!M.options.some(V=>V.value===h)||(Jo(M,h,c),Xr(V=>({...V,[p]:h})))},[le,c]),[Wn,Jr]=(0,d.useState)(null),{activity:jn,noteAttention:Gn}=sr(N),Fn=(0,d.useCallback)(p=>{Gn(p),J({type:"read",author:p.author,ids:p.reads,at:Date.now()})},[Gn,J]),ye=(0,d.useCallback)(p=>{if(ge(p)!==null||ue(p).length>0||It(p))return!0;let h=So(p);return h?N.graph.allEdges().some(M=>M.kind===h.kind&&M.from===h.from&&M.to===h.to):N.graph.getNode(p)!==void 0},[N]),Kn=(0,d.useCallback)(p=>{let h=p.selection??Jt,M=h.filter(ye),V=M.length===h.length?p:Qe(p,M);return V.focusId!==null&&!ye(V.focusId)&&(V=q(V,null)),V},[ye]),Oe=(0,d.useCallback)(p=>{let h=Kn(p),M=fr(N,$,h.shown);if(h.focusId!==null&&M.size>0){let V=ue(h.focusId),eo=N.graph.getNode(h.focusId);(V.length>0?V.every(ti=>M.has(ti)):eo?M.has(eo.kind):!1)&&(h={...h,focusId:null})}if(!h.overview&&h.focusId===null){let V=Ae.focusId!==null&&!ye(Ae.focusId)?nn(t,e.schema)??{...me,overview:!0}:Ae;V.focusId!==null&&ye(V.focusId)?h={...h,focusId:V.focusId}:V.overview===!0&&(h={...h,overview:!0})}return h},[Kn,ye,N,Ae,$,t,e.schema]),B=Oe(X??qr),Bn=(0,d.useMemo)(()=>fr(N,$,B.shown),[N,$,B.shown]),qn=(0,d.useMemo)(()=>[...N.modules.administered.entries()].map(([p,h])=>{let M=N.mayAdminister(p,$);return{name:p,...h.description?{description:h.description}:{},kinds:h.kinds??[],canShow:M,shown:M&&(B.shown??[]).includes(p)}}),[N,$,B.shown]),Ve=(0,d.useCallback)(p=>{let h=M=>Oe(typeof p=="function"?p(M):p);if(X!==void 0){ie?.(h(X));return}ie&&ie(h(B)),vn(M=>h(M))},[B,ie,X,Oe]);(0,d.useEffect)(()=>{X===void 0&&vn(p=>{let h=Oe(p);return h===p?p:h})},[B,X,Oe]);let zn=B.selection??Jt,$n=(0,d.useCallback)(p=>{Ve(h=>Qe(h,typeof p=="function"?p(h.selection??Jt):p))},[Ve]),{who:ze,following:Un,follow:Yn,sayWhere:Qr,sayCaret:Zn,sharing:Xn}=rr({channel:b,store:N,view:B,principal:$,session:se,robots:Re,seatWho:Rt,settingValues:Ce,setView:Ve,seats:s,people:u,...m!==void 0?{ttlMs:m}:{}}),ei=(0,d.useMemo)(()=>({store:N,scheme:o,views:t,view:B,setView:Ve,homeView:Ae,selection:zn,setSelection:$n,menuAt:bn,setMenuAt:zr,whereIs:Cn,pointer:On,motion:Vn,registerScene:Mn,robots:Re,noteSeat:Ln,seatWho:Rt,registerSeatWho:_n,actsDoor:xn,registerActsDoor:$r,seatTalk:Pn,aiDesk:kn,...c?{memory:c}:{},who:ze,following:Un,follow:Yn,sayWhere:Qr,sharing:Xn,session:se,ai:Fe,resolveApp:O,linkedRecords:T,menuSections:ae,...vt?{keptViews:vt}:{},...bt?{onExport:bt}:{},subscriptions:An,dismissals:ke,whileAway:re,...St?{workflowRuns:St}:{},signIn:pe,linkedReads:Hn,movedByHand:wn,noteMoved:Sn,emphasis:Wn,setEmphasis:Jr,activity:jn,noteAttention:Fn,principal:$,seats:s,people:u,takeSeat:Dn,settings:le,settingValues:Ce,chooseSetting:Nn,hiddenKinds:Bn,administered:qn,...j?{providers:j}:{},...f?{brand:f}:{},...At?{onKeepLens:At}:{},...Rn?{onProposeChange:Rn}:{},app:Ke,...Be?{locale:Be}:{},...qe?{timeZone:qe}:{}}),[N,o,t,B,Ve,zn,$n,bn,Cn,On,Vn,Mn,Re,Ln,Rt,_n,xn,Pn,kn,c,ze,Un,Yn,Xn,se,Fe,O,T,ae,vt,bt,An,ke,re,St,pe,Hn,wn,Sn,Wn,jn,Fn,$,s,u,Dn,le,Ce,Nn,Bn,qn,j,f,At,Ke,Be,qe]),Jn=(0,d.useMemo)(()=>A?{typing:A,sayCaret:Zn,who:ze}:null,[A,Zn,ze]),Qn=D?(0,ne.jsx)(it.Provider,{value:D,children:R}):R;return(0,ne.jsx)(He.Provider,{value:ei,children:(0,ne.jsx)(Le.Provider,{value:Ge,children:(0,ne.jsx)(na,{children:Pt?null:Jn?(0,ne.jsx)($t.Provider,{value:Jn,children:Qn}):Qn})})})}var hr=(0,d.createContext)(null),Qt,en=new Set,Ji=e=>(en.add(e),()=>void en.delete(e)),cr=()=>Qt;function Qi(e){if(!Qt){Qt=e;for(let t of[...en])t()}}var ea=300;function ta(e){let t=0;return async(n,o)=>{let r=++t;return await new Promise(i=>setTimeout(i,ea)),r===t?e(n,o):[]}}function na({children:e}){let{store:t,view:n,views:o,principal:r,hiddenKinds:i,selection:a,ai:s}=oe(),l=dt(),u=n.q,c=n.focusId,m=!!(u&&u.trim().length>0),y=(0,d.useSyncExternalStore)(Ji,cr,cr),g=(0,d.useMemo)(()=>m&&y?{flagged:new Set(t.violations().flatMap(k=>k.nodeIds)),touched:y.touchWeights(t.log.all())}:null,[t,l,m,y]),b=c?t.graph.getNode(c)?.kind??ge(c)??(ue(c).length===1?ue(c)[0]:void 0):void 0,A=(0,d.useMemo)(()=>s.near&&ta(s.near),[s.near]),f=(0,d.useMemo)(()=>!u||!g||!y?null:y.search(t,u,{...b?{inKind:b}:{},principal:r,places:o.places(),kinds:t.schema.kinds.filter(k=>!i.has(k)),from:[...a,...c&&t.graph.has(c)?[c]:[]],flagged:g.flagged,touched:g.touched,limit:200,rank:A}),[t,u,r,o,i,a,c,b,g,A]),[w,v]=(0,d.useState)();return(0,d.useEffect)(()=>void f?.later?.then(k=>v([f,k])),[f]),(0,ne.jsx)(hr.Provider,{value:w?.[0]===f?w[1]:f,children:e})}var pr=new WeakMap;function $s(e){let t=pr.get(e);return t||pr.set(e,t=new Set(e.matched)),t}function oa(){return(0,d.useContext)(hr)}function oe(){let e=(0,d.useContext)(He);if(!e)throw new Error("useGraview must be used inside a <GraviewProvider>.");return e}function on(){return(0,d.useContext)(He)??null}function dt(){let{store:e}=oe(),t=(0,d.useRef)(null),n=(0,d.useRef)(null),o=(0,d.useCallback)(()=>(n.current!==e&&(n.current=e,t.current=null),t.current??=e.graph.allNodes(),t.current),[e]),r=(0,d.useCallback)(i=>e.subscribe(()=>{t.current=null,i()}),[e]);return(0,d.useSyncExternalStore)(r,o,o)}function ra(e){let{store:t}=oe(),n=(0,d.useCallback)(r=>t.subscribe(r),[t]),o=(0,d.useCallback)(()=>e===null?void 0:t.graph.getNode(e),[t,e]);return(0,d.useSyncExternalStore)(n,o,o)}function fr(e,t,n){let o=new Set(e.modules.disabledKinds);for(let r of e.kindsKeptFrom(t))o.add(r);for(let[r,i]of e.modules.administered)if(!(e.mayAdminister(r,t)&&(n??[]).includes(r)))for(let a of i.kinds??[])o.add(a);return o}var tn=2600;var wr=new WeakSet,ia=e=>wr.has(e),aa=e=>void wr.add(e);function nn(e,t){let n=mo(e.arrangement?.()?.first,t,e.places());if(!(!n||n.to==="home"))return n.to==="place"?{...me,focusId:te(n.place.kind),within:{view:n.place.as}}:{...me,focusId:te(n.kind)}}var ce=H(W(),1);var rn=H(W(),1),sa=(0,rn.createContext)(null),an=(0,rn.createContext)(null);var Sr=(0,ce.createContext)(null);function la(){let e=(0,ce.useContext)(Sr),t=on(),n=(0,ce.useContext)(an),o=(i,a,s)=>t?.setView(l=>ee(ee(de(q(l,te(i)),!1),"view",a),"filter",s?.filter??null)),r=()=>t?.setView(i=>ee(de(i,!0),"view",null));return(0,ce.useMemo)(()=>e??{record:i=>{t&&(t.setView(a=>q(de(a,!1),i)),t.setSelection([i]))},place:(i,a)=>{if(i===yo)return r();if(i===fo)return n?n.open("/"):r();let s=t?.views.places().find(l=>l.as===i);s&&o(s.kind,s.as,a)},list:(i,a)=>o(i,null,a)},[e,t,n])}var vr=H(W(),1),da=(0,vr.createContext)(!1);var ut=Symbol.for("graview.default-view");function br(e){return Object.defineProperty(e,ut,{value:!0,enumerable:!1}),e}function xr(e){return typeof e=="function"&&e[ut]===!0}var ct=Symbol.for("graview.replaces-page");function Pr(e){return Object.defineProperty(e,ct,{value:!0,enumerable:!1}),e}function Er(e){return typeof e=="function"&&e[ct]===!0}var pt=Symbol.for("graview.bleeds");function kr(e){return Object.defineProperty(e,pt,{value:!0,enumerable:!1}),e}function Ar(e){return typeof e=="function"&&e[pt]===!0}var ft=Symbol.for("graview.previews");function Rr(e,t={}){return Object.defineProperty(e,ft,{value:t,enumerable:!1}),e}function Tr(e){return typeof e=="function"?e[ft]:void 0}function ua(e){return po(e)}function ca(e,t){if(t===e)return e;for(let r of t.registrations())e.register(r.kind,r,r.view,r);let n=t.arrangement?.();n&&e.arrange?.(n);let o=t.homes?.()??[];if(o.length>0)for(let r of o)e.home?.(r.view,r.name!==void 0?{name:r.name}:void 0);else{let r=t.homeView?.();r&&e.home?.(r)}return e}var C=H(W(),1),Y=H(_e(),1),sn=new Set,yt=0;function ln(e){return()=>{yt+=1;let t=e();return t.then(()=>void(yt-=1),()=>void(yt-=1)),t}}var pa=()=>yt,gt=(0,C.createContext)(null);function fa(){return{waiting:new Map,at:0}}function ya(e){for(let[t,n]of e.waiting)n<e.at&&e.waiting.delete(t);e.at+=1}var ma=e=>e?.waiting.size??0;function Or(e,t){e?.waiting.set(t,e.at)}function Vr(e){let t=(0,C.useContext)(gt);(0,C.useLayoutEffect)(()=>{t?.waiting.delete(e)},[t,e])}function ga(e){let t={},n=!1,o=new Set,r=(0,C.lazy)(ln(()=>e().then(a=>{n=!0;let s=a.default;function l(u){return Vr(t),(0,C.createElement)(s,u)}return{default:l}},a=>{for(let s of o)s.waiting.delete(t);throw a})));function i(a){let s=(0,C.useContext)(gt);return!n&&s&&(o.add(s),Or(s,t)),(0,C.createElement)(r,a)}return i}var Ir=!1,Lr=!1,mt=new Set;function ha(){Ir=!0}function wa(){Lr=!0;for(let e of[...mt])e();mt.clear()}var _r=()=>Lr||!Ir;function Sa(e){return _r()?(e(),()=>{}):(mt.add(e),()=>void mt.delete(e))}var Mr=!1;function dn(){for(let e of[...sn])e()}function va(){Mr||typeof window>"u"||(Mr=!0,window.addEventListener("online",dn))}function un(e){let t,n=!1,o=!1,r,i=0,a=new Set,s=()=>{i+=1;for(let y of[...a])y()},l=y=>(a.add(y),()=>void a.delete(y)),u=()=>i,c=()=>void m().catch(()=>{});function m(){if(n)return Promise.resolve(t);if(r)return r;let y=e().then(g=>(t=g,n=!0,o=!1,r=void 0,sn.delete(c),s(),g),g=>{throw r=void 0,o=!0,sn.add(c),va(),s(),g});return y.catch(()=>{}),r=y,y}return{load:m,prefetch:c,get current(){return t},get failed(){return o},part(y,g={}){let b=g.what??"This part",A={};function f(k){(0,C.useSyncExternalStore)(l,u,u),Vr(A);let x=(0,C.useRef)(null),j=(0,C.useRef)(null),G=(0,C.useRef)(!1);return(0,C.useEffect)(()=>{o&&r===void 0&&c()},[]),n&&typeof document<"u"&&x.current!==null&&document.activeElement===x.current&&(G.current=!0),(0,C.useLayoutEffect)(()=>{if(!(!n||!G.current)){G.current=!1;for(let D=j.current?.nextElementSibling??null;D!==null;D=D.nextElementSibling){let O=D.matches(Cr)?D:D.querySelector(Cr);if(O instanceof HTMLElement){O.focus();return}}}}),n?(0,Y.jsxs)(Y.Fragment,{children:[G.current?(0,Y.jsx)("span",{ref:j,hidden:!0}):null,y(t,k)]}):g.quiet?null:(0,Y.jsx)(ba,{what:b,button:x,...g.as?{as:g.as}:{}})}let w=(0,C.lazy)(ln(()=>m().then(()=>({default:f}),()=>({default:f}))));function v(k){let x=(0,C.useContext)(gt),[j]=(0,C.useState)(()=>n||o);return!n&&!o&&Or(x,A),(0,C.createElement)(j?f:w,k)}return v}}}var Cr="button,a[href],input,select,textarea,[tabindex]:not([tabindex='-1'])";function ba({what:e,button:t,as:n="p"}){let r=typeof navigator<"u"&&navigator.onLine===!1?`${e} will load when you're back online.`:`${e} didn't load.`;return(0,Y.jsxs)(n,{"data-testid":"lazy-part-missing",style:{margin:0,fontSize:"0.875rem",color:"var(--graview-ink-muted)"},children:[(0,Y.jsx)("span",{role:"status",children:r})," ",(0,Y.jsx)("button",{ref:t,type:"button","data-testid":"lazy-part-retry",onClick:dn,style:{font:"inherit",fontWeight:600,color:"var(--graview-ink)",background:"none",border:"1px solid var(--graview-edge)",borderRadius:6,padding:"2px 10px"},children:"Try again"})]})}var ve=H(W(),1);function xa(){let{selection:e,setSelection:t}=oe();return(0,ve.useMemo)(()=>({selection:e,set:n=>t(n),clear:()=>t([]),toggle:n=>t(o=>o.includes(n)?o.filter(r=>r!==n):[...o,n]),isSelected:n=>e.includes(n)}),[e,t])}function Pa(){let{store:e}=oe(),t=dt();return(0,ve.useMemo)(()=>Ea(e),[e,t])}var Hr=new WeakMap;function Ea(e){let t=Hr.get(e);if(!t){let n={violations:null};e.subscribe(()=>{n.violations=null}),Hr.set(e,n),t=n}return t.violations??=e.violations(),t.violations}function ka(){let{view:e,setView:t}=oe();return(0,ve.useMemo)(()=>({view:e,url:Q(e),focus:n=>t(o=>q(o,n)),show:n=>t(o=>vo(o,n)),toggle:n=>t(o=>et(o,n)),go:n=>t(n)}),[e,t])}var Se={at:0,depth:0,listeners:new Set,tell(){for(let e of this.listeners)e()}};typeof window<"u"&&window.addEventListener("popstate",e=>{let t=e.state;Se.at=typeof t?.graview=="number"?t.graview:0,Se.at>Se.depth&&(Se.depth=Se.at),Se.tell()});var F=H(W(),1),pn={profile:{trigger:"profile-button",pane:"profile",opens:"press",focus:"into",drawn:["shell","embed"]},problems:{trigger:"standing",pane:"problems",opens:"press",focus:"into",drawn:["shell","embed"]},places:{trigger:"app-places-open",pane:"app-places",opens:"press",focus:"into",drawn:["embed"]},here:{trigger:"here-open",pane:"here-list",opens:"press",focus:"into",drawn:["shell","embed","pages"]},suggested:{trigger:"suggested-button",pane:"suggested",opens:"press",focus:"into",drawn:["shell","embed","pages"]},"host-actions":{trigger:"host-bar-actions-open",pane:"host-bar-actions",opens:"press",focus:"into",drawn:["shell","embed"]},activity:{trigger:"activity-button",pane:"activity",opens:"press",focus:"into",drawn:["shell","embed","pages"]},find:{trigger:"find-box",pane:"find-strip",opens:"typing",focus:"stays",drawn:["shell"]},districts:{trigger:"beyond-more",pane:"beyond-list",opens:"press",focus:"into",drawn:["shell","embed"]},acts:{trigger:null,pane:"context-menu",opens:"context-menu",focus:"into",drawn:["shell","embed","pages"]},arrange:{trigger:"arrange-add",pane:"arrange-list",opens:"press",focus:"into",drawn:["pages"]},"studio-ask":{trigger:"studio-agent",pane:"studio-agent-panel",opens:"press",focus:"into",drawn:["studio"]}},Aa={position:"fixed",inset:"auto",margin:0,zIndex:ao("popover"),boxSizing:"border-box"},ht=6,be=8,Ra=e=>typeof e.showPopover=="function";function wt(e){try{return e.matches(":popover-open")}catch{return!1}}function Ta(e){if(typeof e=="function"){let o=e();return o?{left:o.x,right:o.x,top:o.y,bottom:o.y}:null}let t=e.current;if(!t||!t.isConnected)return null;let n=t.getBoundingClientRect();return{left:n.left,right:n.right,top:n.top,bottom:n.bottom}}function fn(e,t,n={}){let o=Ta(t);if(!o)return;let r={width:document.documentElement.clientWidth||innerWidth,height:innerHeight},i=e.dataset.graviewDesignedHeight??=e.style.maxHeight;e.style.maxHeight=i;let a=e.getBoundingClientRect(),s=r.height-o.bottom-ht-be,l=o.top-ht-be,u=a.height<=s||s>=l,c=Math.max(96,Math.floor(u?s:l)),m=Math.min(a.height,c);a.height>c&&(e.style.maxHeight=i?`min(${i}, ${c}px)`:`${c}px`);let y=a.width,g=n.align==="start"?o.left:o.right-y,b=typeof t=="function"?null:t.current?.closest("[data-graview-embed]")?.getBoundingClientRect();b&&y<=b.right-b.left&&(g<b.left?g=o.left+y<=b.right?o.left:b.left:g+y>b.right&&(g=o.right-y>=b.left?o.right-y:b.right-y));let A=y>=r.width-2*be?Math.max(0,(r.width-y)/2):Math.max(be,Math.min(g,r.width-be-y)),f=u?o.bottom+ht:Math.max(be,o.top-ht-m);e.style.left=`${Math.round(A)}px`,e.style.top=`${Math.round(f)}px`}function Dr(e,t,n,o={}){let r=o.align??"end";(0,F.useLayoutEffect)(()=>{let i=e.current;if(!t||!i)return;if(Ra(i)&&!wt(i))try{i.showPopover(),Ca()}catch{}let a=0,s=u=>{u?.target instanceof Node&&i.contains(u.target)||(cancelAnimationFrame(a),a=requestAnimationFrame(()=>fn(i,n,{align:r})))};fn(i,n,{align:r}),addEventListener("resize",s),addEventListener("scroll",s,!0);let l=typeof ResizeObserver>"u"?null:new ResizeObserver(()=>s());return l?.observe(i),()=>{if(cancelAnimationFrame(a),removeEventListener("resize",s),removeEventListener("scroll",s,!0),l?.disconnect(),i.isConnected&&wt(i))try{i.hidePopover()}catch{}}},[t,e,r])}var yn=new Set;function Ma(e){return yn.add(e),()=>yn.delete(e)}function Ca(){for(let e of yn)if(!(!e.isConnected||!wt(e)))try{e.hidePopover(),e.showPopover()}catch{}}var xe=null,Oa='button:not([disabled]), [href], input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), summary, [tabindex]:not([tabindex="-1"])';function Va(e){for(let t of e.querySelectorAll(Oa))if(t.closest("[hidden]")===null&&getComputedStyle(t).visibility!=="hidden")return t;return e}var cn=()=>{let e=document.activeElement;return e===null||e===document.body};function Ia(e,t={}){let{at:n,returnTo:o,onOpenChange:r}=t,i=t.popover!==!1,[a,s]=(0,F.useState)(!1),l=t.open??a,u=(0,F.useRef)(null),c=(0,F.useRef)(null),m=(0,F.useCallback)(v=>{u.current=v},[]),y=(0,F.useCallback)(v=>{c.current=v},[]),g=`graview-popover-${(0,F.useId)().replace(/:/g,"")}`,b=(0,F.useRef)({onOpenChange:r,returnTo:o,controlled:t.open!==void 0});b.current={onOpenChange:r,returnTo:o,controlled:t.open!==void 0};let A=(0,F.useCallback)(v=>{b.current.controlled||s(v),b.current.onOpenChange?.(v)},[]),f=(0,F.useCallback)(()=>{(document.querySelector(`[aria-controls="${g}"]`)??u.current??b.current.returnTo?.()??null)?.focus({preventScroll:!0})},[g]),w=(0,F.useCallback)(v=>{let k=c.current,x=typeof document>"u"?null:document.activeElement,j=x===null||x===document.body||k!==null&&k.contains(x);A(!1),!(!v||!j)&&(f(),requestAnimationFrame(()=>{cn()&&f()}))},[A,f]);return Dr(c,i&&l,n??u,t.align?{align:t.align}:{}),(0,F.useEffect)(()=>{if(!i||!l)return;let v={name:e,close:()=>w(!1)};if(xe&&xe.close!==v.close&&xe.close(),xe=v,pn[e].focus==="into"){let O=c.current;O&&!O.contains(document.activeElement)&&Va(O).focus({preventScroll:!0})}let k=O=>{O.key==="Escape"&&w(!0)},x=O=>{let P=O.target;if(!(P instanceof Node))return;let T=c.current;if(T?.contains(P)||u.current?.contains(P))return;let _=P instanceof Element?P.closest('[role="dialog"], [role="alertdialog"]'):null;_&&!(T&&_.contains(T))||(w(!1),pn[e].focus==="into"&&requestAnimationFrame(()=>{(cn()||T!==null&&T.contains(document.activeElement))&&f()}))},j=null,G=null,D=O=>{let P=O.target;if(!(P instanceof Element))return;let T=c.current,_=P.closest('[role="dialog"], [role="alertdialog"]');!_||T&&(T.contains(_)||_.contains(T))||(j=_,w(!1))};return document.addEventListener("keydown",k),document.addEventListener("pointerdown",x,!0),document.addEventListener("focusin",D),()=>{document.removeEventListener("keydown",k),document.removeEventListener("pointerdown",x,!0),document.removeEventListener("focusin",D);let O=j;O&&typeof MutationObserver<"u"&&(G?.disconnect(),G=new MutationObserver(()=>{O.isConnected||(G?.disconnect(),requestAnimationFrame(()=>{(cn()||document.activeElement.closest("[hidden]")!==null)&&f()}))}),G.observe(document.body,{childList:!0,subtree:!0}),setTimeout(()=>G?.disconnect(),10*6e4)),xe?.close===v.close&&(xe=null)}},[i,l,e,w,f]),{open:l,setOpen:v=>v?A(!0):w(!0),toggle:()=>l?w(!0):A(!0),trigger:{ref:m,"aria-expanded":l,"aria-controls":g,"data-graview-popover-trigger":e},pane:{ref:y,id:g,popover:"manual",tabIndex:-1,"data-graview-popover":e,"data-graview-overlay":""}}}var Pe=H(W(),1);var La=un(Ye(()=>(__graviewPreload(import.meta.url,["./chunk.CYTTZOYL.js","./chunk.SDO3U72B.js","./chunk.Q4MI53KK.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.HRNNRA2I.js"))));function _a(e,t,n){let o,r=!1,i=()=>{let{hidden:s,removed:l}=t.current();o||r||s.length+l.length===0||(o=()=>{},La.load().then(u=>{r||(o=u.watchTidied(e,t,n))},String))};i();let a=t.onChange?.(i);return()=>{r=!0,a?.(),o?.()}}function Ha(e,t){let[n,o]=(0,Pe.useState)();return(0,Pe.useEffect)(()=>t?_a(e,t,r=>o([e,r])):void 0,[e,t]),n?.[0]===e?n[1]:e}var Nr=H(W(),1),Da=(0,Nr.createContext)(!1);var Wr=H(W(),1),Na=(0,Wr.createContext)(null);var jr=H(W(),1),mn='button:not([disabled]), a[href], input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), summary, [tabindex]:not([tabindex="-1"])',gn=e=>e instanceof HTMLElement&&(e.matches(mn)||e.hasAttribute("tabindex")),De=e=>typeof e.checkVisibility=="function"?e.checkVisibility():e.getClientRects().length>0;function Wa(e,t){let n=l=>l.replace(/["\\]/g,"\\$&"),o=t.getAttribute("data-testid"),r=t.getAttribute("data-graview-pick"),i=t.getAttribute("aria-label"),a=o?`[data-testid="${n(o)}"]`:r?`[data-graview-pick="${n(r)}"]`:i?`${t.tagName.toLowerCase()}[aria-label="${n(i)}"]`:null;if(!a)return null;let s=e.querySelector(a);return s&&gn(s)&&De(s)?s:null}var ja=e=>e.isConnected&&gn(e)&&!e.matches(":disabled")&&e instanceof HTMLElement&&De(e);function Gr(e,t){let n=t?Wa(e,t):null;if(n)return n;let o=e.querySelector("[data-graview-view][tabindex]");if(o&&De(o))return o;for(let r of e.querySelectorAll(mn))if(De(r))return r;return gn(e)&&De(e)?e:null}function Ga(e){(0,jr.useEffect)(()=>{let t=e.current;if(!t||typeof MutationObserver>"u")return;let n=[],o=f=>{let w=f.target;if(w instanceof Element){n=[];for(let v=w;v&&v!==t.parentElement;v=v.parentElement)n.push(v)}},r=!1,i=!1,a=t.ownerDocument,s=()=>!i&&a.defaultView!==null,l=(f,w)=>void setTimeout(()=>s()&&w(),f),u=f=>void requestAnimationFrame(()=>s()&&f()),c=f=>{if(r=!1,i)return;let w=a.activeElement;if(!(!(w===null||w===a.body||w===a.documentElement)||n.length===0)){if(ja(n[0])){f&&n[0]instanceof HTMLElement&&n[0].focus({preventScroll:!0});return}for(let k of n.slice(1)){if(!k.isConnected)continue;let x=Gr(k,n[0]);if(x){x.focus({preventScroll:!0}),n=[];return}}}},m=(f,w=Date.now()+2500)=>{l(100,()=>{c(f);let v=a.activeElement;(v===null||v===a.body||v===a.documentElement)&&n.length>0&&Date.now()<w&&m(f,w)})},y=()=>{r||n.length===0||(r=!0,l(60,()=>u(()=>{c(!1),m(!1)})))},g=f=>{if(!(f instanceof KeyboardEvent&&!["Enter"," ","Escape"].includes(f.key))){if(!(f instanceof KeyboardEvent)){let w=f.target instanceof Element?f.target.closest(mn):null,v=a.activeElement,k=v===null||v===a.body||v===a.documentElement;if(w&&k&&t.contains(w)){n=[];for(let x=w;x&&x!==t.parentElement;x=x.parentElement)n.push(x);l(150,()=>u(()=>{c(!1),m(!1)}));return}}!(f instanceof KeyboardEvent)&&!(f.target instanceof Node&&n[0]?.contains(f.target))||l(150,()=>u(()=>{c(!0),m(!0)}))}},b=new MutationObserver(()=>{n.length>0&&!n[0].isConnected&&y()}),A=f=>{f.relatedTarget===null&&y()};return t.addEventListener("focusin",o),t.addEventListener("focusout",A),t.addEventListener("click",g),t.addEventListener("keydown",g),b.observe(t,{childList:!0,subtree:!0}),()=>{i=!0,t.removeEventListener("focusin",o),t.removeEventListener("focusout",A),t.removeEventListener("click",g),t.removeEventListener("keydown",g),b.disconnect()}},[e])}export{me as a,Q as b,Je as c,Ka as d,Ba as e,wo as f,ho as g,So as h,Ot as i,q as j,vo as k,ee as l,de as m,Qe as n,Ie as o,et as p,nt as q,Vt as r,ge as s,$a as t,oi as u,te as v,bo as w,ue as x,xo as y,ri as z,Ua as A,Po as B,It as C,ii as D,ai as E,si as F,W as G,Kt as H,Ri as I,Mi as J,Go as K,it as L,Ci as M,Le as N,Ko as O,Oi as P,qt as Q,zt as R,$t as S,_e as T,Ki as U,He as V,Bi as W,qi as X,gr as Y,Xi as Z,Qi as _,$s as $,oa as aa,oe as ba,on as ca,dt as da,ra as ea,ia as fa,aa as ga,nn as ha,sa as ia,an as ja,Sr as ka,la,da as ma,br as na,xr as oa,Pr as pa,Er as qa,kr as ra,Ar as sa,Rr as ta,Tr as ua,ua as va,ca as wa,ln as xa,pa as ya,gt as za,fa as Aa,ya as Ba,ma as Ca,ga as Da,ha as Ea,wa as Fa,_r as Ga,Sa as Ha,un as Ia,Ha as Ja,Da as Ka,Na as La,xa as Ma,Pa as Na,ka as Oa,Se as Pa,Ga as Qa,Aa as Ra,wt as Sa,Dr as Ta,Ma as Ua,Ia as Va};
2
+ /*! Bundled license information:
3
+
4
+ react/cjs/react.production.js:
5
+ (**
6
+ * @license React
7
+ * react.production.js
8
+ *
9
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
10
+ *
11
+ * This source code is licensed under the MIT license found in the
12
+ * LICENSE file in the root directory of this source tree.
13
+ *)
14
+
15
+ react/cjs/react-jsx-runtime.production.js:
16
+ (**
17
+ * @license React
18
+ * react-jsx-runtime.production.js
19
+ *
20
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
21
+ *
22
+ * This source code is licensed under the MIT license found in the
23
+ * LICENSE file in the root directory of this source tree.
24
+ *)
25
+ */
@@ -0,0 +1,3 @@
1
+ import{C as b,P as h,Z as g,bc as w,fc as x,ga as $,ha as k}from"./chunk.Q4MI53KK.js";function G(t,n,e){let r=t?.display?.format?.[n];return r?r(e):typeof e=="string"?k(e):String(e)}function Q(t,n,e,r){let s=t.tryDefinition(n)?.edges,i=s&&Object.hasOwn(s,e)?s[e]:void 0;return(r==="out"?i?.description:i?.inverse)??$(e).toLowerCase()}var S=Symbol.for("@graview/core:markdown");function F(t){let n=b(t);return!!n&&(n[S]===1||F(n.innerType))}var R=/^ {0,3}#{1,6}(?:[ \t]+|$)/,m=/^[ \t]*(?:[-*+•]|\d{1,9}[.)])[ \t]+(?:\[[ xX]\][ \t]+)?/,O=/^ {0,3}(?:(?:-[ \t]*){3,}|(?:\*[ \t]*){3,}|(?:_[ \t]*){3,})$/,N=/^ {0,3}(?:`{3,}|~{3,})/,M=/^ {0,3}(?:>[ \t]?)+/,W=/^\|?\s*:?-{2,}:?\s*(?:\|\s*:?-{2,}:?\s*)*\|?$/,_={amp:"&",lt:"<",gt:">",quot:'"',"#39":"'",nbsp:" "};function j(t){return t.replace(/!?\[([^\]\n]{0,500})\]\([^)\n]{0,500}\)/g,"$1").replace(/<((?:https?:|mailto:)[^>\s]*)>/gi,"$1").replace(/<\/?[A-Za-z][^<>\n]*>/g,"").replace(/`+([^`\n]*)`+/g,"$1").replace(/(\*\*|__|~~)(?=\S)([^\n]{0,500}?\S)\1/g,"$2").replace(/(^|[^\w*])\*(?=\S)([^*\n]{0,500}?\S)\*(?![\w*])/g,"$1$2").replace(/(^|\W)_(?=\S)([^_\n]{0,500}?\S)_(?!\w)/g,"$1$2").replace(/\\([\\`*_{}[\]()#+\-.!>|~])/g,"$1").replace(/&(amp|lt|gt|quot|#39|nbsp);/g,(n,e)=>_[e]??"")}function T(t,n,e){let r=t.replace(/\r\n?/g,`
2
+ `).split(`
3
+ `),s=[],i=[],u=0,d=!1,a=()=>{let o=i.join(" ").replace(/\s+/g," ").trim();o&&(s.push(o),u+=o.length),i=[]},c=0;for(;c<r.length&&u<=e;){let o=r[c++];if(n&&N.test(o)){d=!d,d||a();continue}if(!d&&(o.trim().length===0||n&&(O.test(o)||W.test(o.trim())))){a();continue}let f=!d&&n&&R.test(o),l=!d&&m.test(o);if((f||l)&&a(),n&&!d?(o=o.replace(M,""),f&&(o=o.replace(R,"").replace(/[ \t]+#+[ \t]*$/,"")),l&&(o=o.replace(m,"")),o.includes("|")&&(o=o.replace(/^[ \t]*\||\|[ \t]*$/g,"").split("|").map(p=>p.trim()).filter(Boolean).join(" \xB7 ")),o=j(Number.isFinite(e)?o.slice(0,e*2+200):o)):l&&(o=o.replace(m,"")),i.push(o),f&&a(),i.reduce((p,A)=>p+A.length,0)>e)break}return a(),{blocks:s,more:r.slice(c).some(o=>o.trim().length>0&&!(n&&(N.test(o)||O.test(o))))}}function E(t,n){return`${(t.slice(0,n+1).replace(/\s+\S*$/,"")||t.slice(0,n)).replace(/[\s,;:.—-]+$/,"")}\u2026`}function K(t,n={}){let e=n.most??160,{blocks:r,more:s}=T(t,n.markdown===!0,e),i=r[0]??"";if(i.length<=e)return(s||r.length>1)&&i.length>0&&!/[.!?…:]$/.test(i)?`${i}\u2026`:i;let u=x(i);return u&&u.length<=e?u:E(i,e)}var v=t=>T(t,!0,Number.POSITIVE_INFINITY).blocks.join(" ");var I={d:1440,h:60,m:1};function rn(t){if(typeof t=="number")return Number.isFinite(t)&&t>=0?Math.round(t):void 0;if(typeof t!="string")return;let n=t.trim().toLowerCase();if(/^\d+$/.test(n))return Number(n);let e=/^(\d+):([0-5]\d)(?::([0-5]\d))?$/.exec(n);if(e)return Number(e[1])*60+Number(e[2])+Math.round(Number(e[3]??0)/60);let r=0,s=!1,i=n.replace(/(\d*[.,]?\d+) *(days?|d|hours?|hrs?|hr|h|minutes?|mins?|min|m)(?![a-z])/g,(u,d,a)=>(s=!0,r+=Number(d.replace(",","."))*I[a[0]]," "));return s&&/^[\s,+]*(?:and[\s,+]*)*$/.test(i)?Math.round(r):void 0}function D(t,n){if(!Number.isFinite(t))return String(t);let e=Math.round(Math.abs(t)),r=Math.floor(e/60),s=e%60,i=[r?`${g(r,n)} h`:"",s||!r?`${g(s,n)} min`:""].filter(Boolean).join(" ");return t<0?`\u2212${i}`:i}var P=/^(\+?1[ .-]?)?\(?([2-9]\d\d)\)?[ .-]?(\d{3})[ .-]?(\d{4})(?: *(?:ext\.?|x|#) *(\d+))?$/i;function L(t,n){let e=t.trim(),r=/[-_](US|CA)\b/i.test(h(n))?P.exec(e):null;if(!r)return e;let[,s,i,u,d,a]=r;return`${s?.startsWith("+")?"+1 ":""}(${i}) ${u}-${d}${a?` ext. ${a}`:""}`}function q(t){let[,n="",e]=/^(.*?)(?: *(?:ext\.?|x|#) *(\d+))?$/i.exec(t.trim())??[],r=n.replace(/\D/g,"");return r.length<3?void 0:`tel:${n.startsWith("+")?"+":""}${r}${e?`;ext=${e}`:""}`}var C=()=>/Mac|iPhone|iPad|iPod/.test(globalThis.navigator?.userAgent??"");function H(t,n=C()){let e=encodeURIComponent(t.trim());return n?`https://maps.apple.com/?q=${e}`:`https://www.google.com/maps/search/?api=1&query=${e}`}var U=t=>t?.fields?.shape??{},z=(t,n)=>{let e=U(t);return Object.hasOwn(e,n)?w(e[n]):void 0},y=(t,n)=>{let e=t?.computed,r=e&&Object.hasOwn(e,n)?e[n]:void 0;return typeof r=="object"?r:void 0},B=(t,n)=>{let e=y(t,n);return e?.as??(e?.format==="duration"?"duration":void 0)};function on(t,n){let e=y(t,n);if(!e)return;if(e.amount)return e.amount;let r=e.format==="money"||e.format==="percent"?e.format:void 0;return r||!e.format&&e.unit?{...r?{format:r}:{},...e.unit?{unit:e.unit}:{}}:void 0}function sn(t,n){return y(t,n)?.hidden===!0}function dn(t,n){return z(t,n)??(t&&B(t,n)==="duration"?"duration":void 0)}function un(t,n,e){return t==="duration"?typeof n=="number"?D(n,e):void 0:t==="phone"?typeof n=="string"?L(n,e):void 0:t==="place"&&typeof n=="string"?n.trim():void 0}function an(t,n){if(!(typeof n!="string"||!n.trim()))return t==="phone"?q(n):t==="place"?H(n):void 0}export{F as a,G as b,Q as c,K as d,v as e,rn as f,on as g,sn as h,dn as i,un as j,an as k};
@@ -0,0 +1 @@
1
+ import{G as w,T as d}from"./chunk.CYTTZOYL.js";import{je as u,we as f}from"./chunk.Q4MI53KK.js";import{b as i}from"./chunk.AJZBJBMO.js";var a=i(w(),1);var o=i(d(),1),x={textDecorationLine:"underline",textDecorationColor:"color-mix(in srgb, currentColor 50%, transparent)",textDecorationThickness:1,textUnderlineOffset:"0.2em"};function m({children:e,mark:r="\u2192"}){return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("span",{style:x,children:e}),(0,o.jsx)("span",{"aria-hidden":"true",children:r})]})}var n=i(d(),1);function R({context:e,stop:r,title:t,label:s,style:y,className:l,children:h,...p}){let c=u(e.views?.arrangement?.()),S=h??(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(m,{mark:"\u2197",children:["In ",c==="Scene"?"the scene":c.replace(/^The /,"the ")]})}),g=s?{"aria-label":s}:{};if(e.overview){let v=e.overview;return(0,n.jsx)("a",{href:r,...p,...g,...t?{title:t}:{},style:y,...l?{className:l}:{},onClick:b=>{b.preventDefault(),v(r)},children:S})}return e.embedded?null:(0,n.jsx)("a",{href:`${e.sceneHref??"/"}${r}`,...p,...g,...t?{title:t}:{},style:y,...l?{className:l}:{},children:S})}function k(){return(0,n.jsx)("a",{href:"#fresh","data-testid":"start-fresh",title:"Forget every edit made in this browser and return to the example",onClick:e=>{e.preventDefault(),window.location.assign(f(window.location.href))},style:{color:"inherit",display:"inline-flex",alignItems:"center",minHeight:24,minWidth:24},children:"Start fresh"})}function H(e){let r=(0,a.useRef)(0),t=(0,a.useCallback)(s=>e.subscribe(()=>{r.current+=1,s()}),[e]);return(0,a.useSyncExternalStore)(t,()=>r.current,()=>0)}function L(e){return e===void 0?{}:e==="sm"||e==="md"?{"data-size":e}:{style:{"--graview-control-height":typeof e=="number"?`${e}px`:e}}}var T=(e,r)=>r?`${e} ${r}`:e;export{m as a,R as b,k as c,H as d,L as e,T as f};
@@ -1 +1 @@
1
- var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{a as y,b as k,c as b}from"./chunk.U5P23GO7.js";import{a as A}from"./chunk.D5Q64GA4.js";import{D as v,G as W,T as w,ba as h}from"./chunk.N7T7VB77.js";import{_a as g}from"./chunk.F7PIW2EM.js";import{b as d}from"./chunk.AJZBJBMO.js";var S=d(W(),1);var t=d(w(),1),l={display:"inline-flex",alignItems:"center",minHeight:24,minWidth:24,padding:"1px 8px",fontSize:"0.75rem"};function L({shows:e,onShows:i,mine:a,onMine:r}){let n={all:"All",changes:"Changes",ai:"AI"};return(0,t.jsxs)("div",{"data-testid":"activity-filter",role:"group","aria-label":"Show",style:{display:"flex",flexWrap:"wrap",gap:4,alignItems:"center"},children:[["all","changes","ai"].map(s=>(0,t.jsx)("button",{type:"button","data-shows":s,"aria-pressed":e===s,onClick:()=>i(s),style:{...l,...e===s?{borderColor:"var(--graview-accent)",color:"var(--graview-ink)"}:{}},children:n[s]},s)),(0,t.jsx)("button",{type:"button","data-testid":"activity-mine","aria-pressed":a,onClick:()=>r(!a),style:{...l,marginLeft:"auto",...a?{borderColor:"var(--graview-accent)",color:"var(--graview-ink)"}:{}},children:"Just mine"})]})}var $=e=>e.ask.kind==="suggest"?"suggest":e.ask.kind==="fill"?"fill in":e.ask.kind==="record"?"add one":e.ask.kind==="panel"?"draw a panel":`answer \u201C${e.ask.said}\u201D`;function T(e){let i=e.offered.filter(a=>e.accepted?.includes(a.id)).map(a=>a.label);switch(e.outcome){case"accepted":return i.length>0?`Took ${i.join(", ")}`:"Taken";case"partly":return`Took ${i.length} of ${e.offered.length}: ${i.join(", ")}`;case"dismissed":return"Dismissed";case"drawn":return e.panel?`Drew \u201C${e.panel.title}\u201D`:"Drew a panel";case"failed":return e.failed??"Failed";default:return"Offered, not yet taken"}}function O(e){let i=[...new Set((e.usage??[]).map(n=>n.model))];if(i.length===0)return null;let a=(e.usage??[]).flatMap(n=>n.costUsd===void 0?[]:[n.costUsd]),r=a.length>0?a.reduce((n,s)=>n+s,0):void 0;return`${i.join(", ")}${r!==void 0?` \xB7 $${r<.01?r.toPrecision(2):r.toFixed(2)}`:""}`}function V({entry:e,undo:i}){let{store:a,principal:r,seats:n,people:s,ai:I}=h(),c=A(),[p,u]=(0,S.useState)(!1),C=e.by.kind==="human"&&e.by.onBehalfOf===void 0&&(e.by.id===void 0||r.id===void 0||e.by.id===r.id)?"you":g(e.by,{graph:a.graph,schema:a.schema,seats:n,people:s}),f=O(e),x=v(I),m=o=>{u(!0),(__graviewPreload(import.meta.url,["./chunk.YGIJDHAV.js","./chunk.BJUUSIQY.js","./chunk.5POG3G2C.js","./chunk.2XSIJH5J.js","./chunk.ZVG3DR5G.js","./chunk.XOZU4OFA.js","./chunk.LA2DMHZC.js","./chunk.D5Q64GA4.js","./chunk.2QFKNTAZ.js","./chunk.UO544PZH.js","./chunk.4STDIZVI.js","./chunk.HZHNM2KI.js","./chunk.AVFOTYZR.js","./chunk.HOQMD6WQ.js","./chunk.N7T7VB77.js","./chunk.SDO3U72B.js","./chunk.F7PIW2EM.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.DKXVEVDG.js")).then(o).finally(()=>u(!1))};return(0,t.jsxs)("li",{"data-testid":"activity-interaction","data-interaction":e.id,"data-outcome":e.outcome,style:y,children:[(0,t.jsx)("div",{"data-graview-activity-head":"",style:k,children:(0,t.jsxs)("span",{"data-graview-activity-words":"",style:b,children:[(0,t.jsx)("strong",{style:{fontWeight:600},children:C})," ",(0,t.jsxs)("span",{style:{color:"var(--graview-ink-muted)"},children:["asked AI to ",$(e)]}),(0,t.jsxs)("span",{style:{color:"var(--graview-ink-faint)"},children:[" \xB7 ",e.targetLabel]})]})}),e.offered.length>0&&e.outcome!=="accepted"&&e.outcome!=="partly"?(0,t.jsxs)("div",{"data-testid":"interaction-offered",style:{color:"var(--graview-ink-muted)"},children:["Offered ",e.offered.map(o=>o.label).join(", ")]}):null,(0,t.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:6,flexWrap:"wrap"},children:[(0,t.jsx)("span",{"data-testid":"interaction-outcome",style:{color:e.outcome==="failed"?"var(--graview-warn)":"var(--graview-ink)"},children:T(e)}),(e.batches??[]).map(o=>(0,t.jsx)("span",{"data-interaction-batch":o,style:{marginLeft:"auto"},children:i(o)},o))]}),f?(0,t.jsx)("div",{"data-testid":"interaction-model",style:{fontSize:"0.75rem",color:"var(--graview-ink-faint)"},children:f}):null,x?(0,t.jsxs)("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:[e.panel?(0,t.jsx)("button",{type:"button","data-testid":"interaction-reopen",disabled:p,onClick:()=>m(o=>o.drawPanel(c,e.panel)),style:l,children:"Show the panel"}):null,(0,t.jsx)("button",{type:"button","data-testid":"interaction-again",disabled:p,onClick:()=>m(o=>o.askAgain(c,e)),style:l,children:"Ask again"})]}):null]})}export{L as a,V as b};
1
+ var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{a as y,b as k,c as b}from"./chunk.U5P23GO7.js";import{a as A}from"./chunk.YOUB3J3Y.js";import{D as v,G as W,T as w,ba as h}from"./chunk.CYTTZOYL.js";import{db as g}from"./chunk.Q4MI53KK.js";import{b as d}from"./chunk.AJZBJBMO.js";var S=d(W(),1);var t=d(w(),1),l={display:"inline-flex",alignItems:"center",minHeight:24,minWidth:24,padding:"1px 8px",fontSize:"0.75rem"};function L({shows:e,onShows:i,mine:a,onMine:r}){let n={all:"All",changes:"Changes",ai:"AI"};return(0,t.jsxs)("div",{"data-testid":"activity-filter",role:"group","aria-label":"Show",style:{display:"flex",flexWrap:"wrap",gap:4,alignItems:"center"},children:[["all","changes","ai"].map(s=>(0,t.jsx)("button",{type:"button","data-shows":s,"aria-pressed":e===s,onClick:()=>i(s),style:{...l,...e===s?{borderColor:"var(--graview-accent)",color:"var(--graview-ink)"}:{}},children:n[s]},s)),(0,t.jsx)("button",{type:"button","data-testid":"activity-mine","aria-pressed":a,onClick:()=>r(!a),style:{...l,marginLeft:"auto",...a?{borderColor:"var(--graview-accent)",color:"var(--graview-ink)"}:{}},children:"Just mine"})]})}var $=e=>e.ask.kind==="suggest"?"suggest":e.ask.kind==="fill"?"fill in":e.ask.kind==="record"?"add one":e.ask.kind==="panel"?"draw a panel":`answer \u201C${e.ask.said}\u201D`;function T(e){let i=e.offered.filter(a=>e.accepted?.includes(a.id)).map(a=>a.label);switch(e.outcome){case"accepted":return i.length>0?`Took ${i.join(", ")}`:"Taken";case"partly":return`Took ${i.length} of ${e.offered.length}: ${i.join(", ")}`;case"dismissed":return"Dismissed";case"drawn":return e.panel?`Drew \u201C${e.panel.title}\u201D`:"Drew a panel";case"failed":return e.failed??"Failed";default:return"Offered, not yet taken"}}function O(e){let i=[...new Set((e.usage??[]).map(n=>n.model))];if(i.length===0)return null;let a=(e.usage??[]).flatMap(n=>n.costUsd===void 0?[]:[n.costUsd]),r=a.length>0?a.reduce((n,s)=>n+s,0):void 0;return`${i.join(", ")}${r!==void 0?` \xB7 $${r<.01?r.toPrecision(2):r.toFixed(2)}`:""}`}function V({entry:e,undo:i}){let{store:a,principal:r,seats:n,people:s,ai:I}=h(),c=A(),[p,u]=(0,S.useState)(!1),C=e.by.kind==="human"&&e.by.onBehalfOf===void 0&&(e.by.id===void 0||r.id===void 0||e.by.id===r.id)?"you":g(e.by,{graph:a.graph,schema:a.schema,seats:n,people:s}),f=O(e),x=v(I),m=o=>{u(!0),(__graviewPreload(import.meta.url,["./chunk.ZLTHWCKL.js","./chunk.BJUUSIQY.js","./chunk.57YDGGJK.js","./chunk.H7AH3IW4.js","./chunk.VCTAFSZ5.js","./chunk.XOZU4OFA.js","./chunk.4TH3CGAZ.js","./chunk.YOUB3J3Y.js","./chunk.DZSZUX34.js","./chunk.REUMBCSV.js","./chunk.2KIWGQXC.js","./chunk.D5LOTCBU.js","./chunk.KZUMXT5J.js","./chunk.CGK2PY76.js","./chunk.CYTTZOYL.js","./chunk.SDO3U72B.js","./chunk.Q4MI53KK.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.O67JXUVG.js")).then(o).finally(()=>u(!1))};return(0,t.jsxs)("li",{"data-testid":"activity-interaction","data-interaction":e.id,"data-outcome":e.outcome,style:y,children:[(0,t.jsx)("div",{"data-graview-activity-head":"",style:k,children:(0,t.jsxs)("span",{"data-graview-activity-words":"",style:b,children:[(0,t.jsx)("strong",{style:{fontWeight:600},children:C})," ",(0,t.jsxs)("span",{style:{color:"var(--graview-ink-muted)"},children:["asked AI to ",$(e)]}),(0,t.jsxs)("span",{style:{color:"var(--graview-ink-faint)"},children:[" \xB7 ",e.targetLabel]})]})}),e.offered.length>0&&e.outcome!=="accepted"&&e.outcome!=="partly"?(0,t.jsxs)("div",{"data-testid":"interaction-offered",style:{color:"var(--graview-ink-muted)"},children:["Offered ",e.offered.map(o=>o.label).join(", ")]}):null,(0,t.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:6,flexWrap:"wrap"},children:[(0,t.jsx)("span",{"data-testid":"interaction-outcome",style:{color:e.outcome==="failed"?"var(--graview-warn)":"var(--graview-ink)"},children:T(e)}),(e.batches??[]).map(o=>(0,t.jsx)("span",{"data-interaction-batch":o,style:{marginLeft:"auto"},children:i(o)},o))]}),f?(0,t.jsx)("div",{"data-testid":"interaction-model",style:{fontSize:"0.75rem",color:"var(--graview-ink-faint)"},children:f}):null,x?(0,t.jsxs)("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:[e.panel?(0,t.jsx)("button",{type:"button","data-testid":"interaction-reopen",disabled:p,onClick:()=>m(o=>o.drawPanel(c,e.panel)),style:l,children:"Show the panel"}):null,(0,t.jsx)("button",{type:"button","data-testid":"interaction-again",disabled:p,onClick:()=>m(o=>o.askAgain(c,e)),style:l,children:"Ask again"})]}):null]})}export{L as a,V as b};
@@ -1,4 +1,4 @@
1
- var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{a as G,b as J}from"./chunk.U2ISOUM2.js";import"./chunk.X2I3XH2E.js";import{a as K}from"./chunk.747OH3EE.js";import"./chunk.E6RNMWFN.js";import"./chunk.MBP7VDYM.js";import"./chunk.VUAOCYG2.js";import"./chunk.5POG3G2C.js";import"./chunk.2XSIJH5J.js";import"./chunk.LA2DMHZC.js";import{a as S,b as W}from"./chunk.MB7LKKUD.js";import"./chunk.MBU7UH6J.js";import"./chunk.2QFKNTAZ.js";import"./chunk.BI6DS3PZ.js";import"./chunk.PGA5TUSN.js";import"./chunk.7R727IKU.js";import"./chunk.LQAT7FA6.js";import"./chunk.UO544PZH.js";import"./chunk.4STDIZVI.js";import"./chunk.HZHNM2KI.js";import"./chunk.AVFOTYZR.js";import"./chunk.HOQMD6WQ.js";import{D as H,E as V,G as ee,Ga as _,Sa as x,T as D,ca as F}from"./chunk.N7T7VB77.js";import{a as j}from"./chunk.SDO3U72B.js";import{ad as B,ia as q}from"./chunk.F7PIW2EM.js";import"./chunk.FQLNBIQ5.js";import{b}from"./chunk.AJZBJBMO.js";var t=b(ee(),1);var a=b(D(),1);function ae(n){let r=[];return n.applied.length>0&&n.intent&&r.push(`${n.intent}.`),n.unchanged.length>0&&r.push(`${n.unchanged.length} already so.`),n.allOrNothing&&r.push("None of it was kept."),r.join(" ")}var re=_(j(()=>(__graviewPreload(import.meta.url,["./chunk.YGIJDHAV.js","./chunk.BJUUSIQY.js","./chunk.5POG3G2C.js","./chunk.2XSIJH5J.js","./chunk.ZVG3DR5G.js","./chunk.XOZU4OFA.js","./chunk.LA2DMHZC.js","./chunk.D5Q64GA4.js","./chunk.2QFKNTAZ.js","./chunk.UO544PZH.js","./chunk.4STDIZVI.js","./chunk.HZHNM2KI.js","./chunk.AVFOTYZR.js","./chunk.HOQMD6WQ.js","./chunk.N7T7VB77.js","./chunk.SDO3U72B.js","./chunk.F7PIW2EM.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.CRCJ3TAG.js")))),te=re.part((n,r)=>(0,a.jsx)(n.SeveralAi,{...r}),{quiet:!0});function ne(n){let r=F()?.ai;return!H(r)||!V(r)?null:(0,a.jsx)(t.Suspense,{fallback:null,children:(0,a.jsx)(te,{...n})})}function ge({store:n,chosen:r,principal:d,context:v,via:k,anchor:A,of:g,onChooseAll:E,onClear:m,onActed:Q}){let[U,X]=(0,t.useState)(0);(0,t.useEffect)(()=>n.subscribe(()=>X(e=>e+1)),[n]);let f=r.join(`
1
+ var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{a as G,b as J}from"./chunk.KB5BCW23.js";import"./chunk.72YXFJKC.js";import{a as K}from"./chunk.MIE3ODQ2.js";import"./chunk.NEPQBMFT.js";import"./chunk.ERPILTRY.js";import"./chunk.JVDPRQ7J.js";import"./chunk.57YDGGJK.js";import"./chunk.H7AH3IW4.js";import"./chunk.4TH3CGAZ.js";import{a as S,b as W}from"./chunk.MB7LKKUD.js";import"./chunk.XYGNS637.js";import"./chunk.DZSZUX34.js";import"./chunk.4EXC26LI.js";import"./chunk.PWAP2GJS.js";import"./chunk.AHPYNDVA.js";import"./chunk.FNVGNISQ.js";import"./chunk.REUMBCSV.js";import"./chunk.2KIWGQXC.js";import"./chunk.D5LOTCBU.js";import"./chunk.KZUMXT5J.js";import"./chunk.CGK2PY76.js";import{D as H,E as V,G as ee,Ia as _,Sa as x,T as D,ca as F}from"./chunk.CYTTZOYL.js";import{a as j}from"./chunk.SDO3U72B.js";import{na as q,qd as B}from"./chunk.Q4MI53KK.js";import"./chunk.FQLNBIQ5.js";import{b}from"./chunk.AJZBJBMO.js";var t=b(ee(),1);var a=b(D(),1);function ae(n){let r=[];return n.applied.length>0&&n.intent&&r.push(`${n.intent}.`),n.unchanged.length>0&&r.push(`${n.unchanged.length} already so.`),n.allOrNothing&&r.push("None of it was kept."),r.join(" ")}var re=_(j(()=>(__graviewPreload(import.meta.url,["./chunk.ZLTHWCKL.js","./chunk.BJUUSIQY.js","./chunk.57YDGGJK.js","./chunk.H7AH3IW4.js","./chunk.VCTAFSZ5.js","./chunk.XOZU4OFA.js","./chunk.4TH3CGAZ.js","./chunk.YOUB3J3Y.js","./chunk.DZSZUX34.js","./chunk.REUMBCSV.js","./chunk.2KIWGQXC.js","./chunk.D5LOTCBU.js","./chunk.KZUMXT5J.js","./chunk.CGK2PY76.js","./chunk.CYTTZOYL.js","./chunk.SDO3U72B.js","./chunk.Q4MI53KK.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.OIMGD7FR.js")))),te=re.part((n,r)=>(0,a.jsx)(n.SeveralAi,{...r}),{quiet:!0});function ne(n){let r=F()?.ai;return!H(r)||!V(r)?null:(0,a.jsx)(t.Suspense,{fallback:null,children:(0,a.jsx)(te,{...n})})}function ge({store:n,chosen:r,principal:d,context:v,via:k,anchor:A,of:g,onChooseAll:E,onClear:m,onActed:Q}){let[U,X]=(0,t.useState)(0);(0,t.useEffect)(()=>n.subscribe(()=>X(e=>e+1)),[n]);let f=r.join(`
2
2
  `),{acts:c,withheld:N}=(0,t.useMemo)(()=>G(n,r,{...d?{principal:d}:{},...v?{context:v}:{}}),[n,f,d,v,U]),[O,p]=(0,t.useState)(!1),[l,u]=(0,t.useState)(null),[s,P]=(0,t.useState)(null),h=(0,t.useRef)(null),L=(0,t.useId)(),w=(0,t.useMemo)(()=>[...new Set(r.map(e=>n.graph.getNode(e)?.kind))],[n,f]),Y=w.length===1&&w[0]?`${q(n.schema,w[0],r.length)} chosen`:`${r.length} chosen`,M=typeof matchMedia=="function"&&matchMedia("(pointer: coarse), (max-width: 599px)").matches?2:3,C=c.filter(e=>!e.more),Z=C.slice(0,M),R=[...C.slice(M),...c.filter(e=>e.more)];(0,t.useEffect)(()=>{u(null),p(!1)},[f]),(0,t.useLayoutEffect)(()=>{let e=h.current;if(!e)return;if(typeof e.showPopover=="function"&&!x(e))try{e.showPopover()}catch{}let i=()=>{W(e,A?.()??null),dispatchEvent(new Event(S))};i(),addEventListener("resize",i),addEventListener("scroll",i,!0);let o=typeof ResizeObserver=="function"?new ResizeObserver(i):null;return o?.observe(e),()=>{if(o?.disconnect(),removeEventListener("resize",i),removeEventListener("scroll",i,!0),e.isConnected&&x(e))try{e.hidePopover()}catch{}dispatchEvent(new Event(S))}},[A]);let y=(0,t.useRef)({asking:l,onClear:m});y.current={asking:l,onClear:m},(0,t.useEffect)(()=>{let e=i=>{if(i.key!=="Escape"||i.defaultPrevented)return;let o=document.activeElement;if(!(!(h.current?.contains(o)??!1)&&(o instanceof HTMLTextAreaElement||o instanceof HTMLInputElement&&o.type!=="checkbox"||o instanceof HTMLSelectElement))){if(i.preventDefault(),i.stopPropagation(),y.current.asking){u(null);return}y.current.onClear()}};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[]);let T=(e,i={})=>{let o=J(n,{mutation:e.mutation,subject:e.subject,args:{...e.args,...i},label:e.label},r,{...d?{author:d}:{},...k?{via:k}:{},...v?{context:v}:{}});u(null),p(!1),P(o.refused.length>0||o.applied.length===0?o:null),Q(o.refused.map(I=>I.id))},$=e=>{P(null),p(!1),e.open.length>0?u(e):T(e)},z=e=>(0,a.jsxs)("button",{type:"button",className:"graview-several-act","data-testid":"several-act","data-act":e.id,"data-mutation":e.mutation,...e.destructive?{"data-tone":"warn"}:{},"aria-pressed":l?.id===e.id?!0:void 0,onClick:()=>$(e),children:[e.label,e.open.length>0?"\u2026":""]},e.id);return(0,a.jsxs)("div",{ref:h,popover:"manual",role:"region","aria-label":"The chosen records",className:"graview-several-bar","data-testid":"several-bar","data-graview-foot":"","data-graview-overlay":"","data-graview-popover":"","data-graview-offstage":"",style:ie,children:[(0,a.jsx)("style",{children:oe}),(0,a.jsxs)("div",{className:"graview-several-line",children:[(0,a.jsx)("span",{role:"status","aria-live":"polite",className:"graview-several-count","data-testid":"several-count",children:Y}),(0,a.jsxs)("div",{role:"group","aria-label":`What to do with the ${r.length} chosen`,className:"graview-several-acts",children:[Z.map(z),R.length>0?(0,a.jsx)("button",{type:"button",className:"graview-several-act","data-testid":"several-more","aria-expanded":O,"aria-controls":L,onClick:()=>p(e=>!e),children:"More"}):null,E&&g!==void 0&&g>r.length?(0,a.jsxs)("button",{type:"button",className:"graview-several-quiet","data-testid":"several-all",onClick:E,children:["Choose all ",g]}):null,(0,a.jsx)("button",{type:"button",className:"graview-several-quiet","data-testid":"several-clear","aria-keyshortcuts":"Escape",title:"Put the choice down \u2014 Escape",onClick:m,children:"Clear"})]})]}),c.length>0&&r.length>1?(0,a.jsx)(ne,{chosen:r,acts:c,onAct:$}):null,O?(0,a.jsx)("div",{id:L,role:"group","aria-label":"More",className:"graview-several-acts","data-testid":"several-more-acts",children:R.map(z)}):null,c.length===0?(0,a.jsx)("p",{className:"graview-several-said","data-testid":"several-none",children:N.length>0?`Nothing here can be done to all of them by you: ${N[0].message}`:"Nothing can be done to all of these at once."}):null,l?(0,a.jsx)("div",{className:"graview-several-ask",role:"group","aria-label":`${l.label}, for all ${r.length}`,"data-testid":"several-ask",children:(0,a.jsx)(K,{store:n,affordance:l.affordance,onApply:e=>T(l,e),onCancel:()=>u(null)})}):null,s?(0,a.jsxs)("div",{role:"alert",className:"graview-several-said","data-testid":"several-outcome",children:[ae(s),s.refused.length>0?(0,a.jsxs)(a.Fragment,{children:[" ",s.refused.length===1?"One was not changed, and is still chosen:":`${s.refused.length} were not changed, and are still chosen:`,(0,a.jsx)("ul",{"data-testid":"several-refused",children:s.refused.map(e=>(0,a.jsxs)("li",{"data-record":e.id,children:["\u201C",e.label,"\u201D \u2014 ",e.message]},e.id))})]}):null]}):null]})}var ie={position:"fixed",inset:"auto",margin:0,zIndex:B("toast"),boxSizing:"border-box",width:"max-content",height:"auto",bottom:"calc(16px + env(safe-area-inset-bottom, 0px))",left:16,overflow:"visible"},oe=`
3
3
  .graview-several-bar{display:grid;gap:8px;padding:8px 10px;border:1px solid var(--graview-edge);border-radius:var(--graview-radius,12px);background:var(--graview-float);color:var(--graview-ink);box-shadow:var(--graview-lift-high);font-size:.875rem;line-height:1.4;max-height:70vh;overflow:auto}
4
4
  .graview-several-line{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;min-width:0}
@@ -0,0 +1,15 @@
1
+ import{a as j,b as P,c as H,d as B,e as _,f as G,g as U,h as V,i as M,k as I}from"./chunk.3L37FY3G.js";import"./chunk.AJZBJBMO.js";var te=0,ne=1,re=2,ie=3,$=1,oe=2,W=3,ae=1,se=3,de=8,z="~",C=i=>typeof i=="object"&&i!==null&&!Array.isArray(i),K=new Set(["input","select","textarea","option"]),le=new Set(["value","checked","selected"]),X=["aria-label","aria-labelledby","title"],ce=i=>X.some(t=>(i.getAttribute(t)??"").trim()!=="");function Y(i,t){let u=i.ownerDocument??i,h=t.maxNodes??5e3,y=[],v=new Map,w=new WeakMap,N={dom:i,name:"div",namespace:"html",children:[],id:z};v.set(z,N);let R=0,x=!1,S=new WeakMap,E=new Map,A=new Map,f=e=>{y.push(e),y.length>200&&y.shift(),t.onRefused?.(e)},T=()=>({dom:u.createComment(""),children:[],refused:!0}),D=(e,d)=>{if(e.namespace==="html"&&e.name&&K.has(e.name))return e.dom;if(d?.namespace==="html"&&d.name==="textarea")return d.dom},L=(e,d)=>{let o=e.dom,a=S.get(o)??o.getAttribute("role");if(a===null||!a.split(/\s+/).some(r=>H.includes(r.toLowerCase())))return void S.delete(o);if(ce(o)){S.delete(o),o.getAttribute("role")!==a&&o.setAttribute("role",a);return}S.set(o,a),o.removeAttribute("role"),d&&f({reason:"value",element:e.name,name:"role"})},l=()=>{if(A.size===0)return;let e=new Set,d=o=>{for(let a of o.children){if(a.refused||a.text)continue;let r=a.dom.getAttribute("id");r&&e.add(r),d(a)}};d(N);for(let[o,a]of A){if(o.id===void 0||v.get(o.id)!==o){A.delete(o);continue}let r=o.dom;for(let[n,p]of a){let c=p.value.split(/\s+/).filter(b=>b!==""),g=c.filter(b=>!e.has(b));if(c.length>0&&g.length===0){if(p.drawn)continue;p.drawn=!0,r.setAttribute(n,p.value),L(o,!1)}else p.drawn&&(p.drawn=!1,r.removeAttribute(n),f({reason:"reference",element:o.name,name:n,ids:g.length>0?g:c}),L(o,!0))}}},s=(e,d,o,a=!0)=>{let r=e.dom;if(o!=null&&typeof o!="string")return f({reason:"value",element:e.name,name:d});let n=I(e.namespace,e.name,d,o??null,t);if("refused"in n){let b=I(e.namespace,e.name,d,null,t);return"refused"in b||r.removeAttribute(b.name),!("refused"in b)&&b.name==="role"&&S.delete(r),f(n.refused)}for(let b of n.dropped??[])f(b);let p=e.namespace==="html"&&le.has(n.name)&&K.has(e.name),c=r,g=p?n.name==="value"?c.value:n.name==="checked"?c.checked:c.selected:void 0;if(n.name==="role"&&S.delete(r),B.includes(n.name)){let b=A.get(e)??new Map;n.value===null?b.delete(n.name):b.set(n.name,{value:n.value,drawn:!0}),b.size>0?A.set(e,b):A.delete(e)}n.value===null?r.removeAttribute(n.name):r.setAttribute(n.name,n.value),a&&(n.name==="role"||X.includes(n.name))&&L(e,n.name==="role"),t.onAttribute?.(r,n.name),p&&(n.name==="value"&&"value"in c?(c.value=n.value??"",g!==c.value&&t.onFieldSet?.(r)):n.name==="checked"&&"checked"in c?(c.checked=n.value!==null,g!==c.checked&&t.onFieldSet?.(r)):n.name==="selected"&&"selected"in c&&(c.selected=n.value!==null,g!==c.selected&&t.onFieldSet?.(r.parentElement?.closest("select")??r)))},m=e=>{if(!e.refused){R-=1,e.id!==void 0&&v.delete(e.id);for(let d of e.children)m(d)}},k=(e,d)=>{if(!C(e)||typeof e.id!="string"||v.has(e.id))return f({reason:"record"}),T();if(R>=h)return f({reason:"budget"}),x||(x=!0,t.onOverBudget?.()),T();let o=e.id;if(e.type===de)return T();if(e.type===se){if(M(d.namespace,d.name))return f({reason:"child",element:d.name}),T();let c=u.createTextNode(String(e.data??"").slice(0,_)),g={dom:c,children:[],text:!0,id:o,parent:d};return v.set(o,g),w.set(c,o),R+=1,g}if(e.type!==ae)return f({reason:"record"}),T();let a=String(e.element);if(M(d.namespace,d.name))return f({reason:"child",element:a}),T();let r=V(a,d.namespace);if("refused"in r)return f(r.refused),T();let n=u.createElementNS(r.namespace==="svg"?U:G,r.name);r.as&&n.setAttribute("data-graview-as",r.as),r.namespace==="html"&&r.name==="img"&&n.setAttribute("referrerpolicy","no-referrer"),r.namespace==="html"&&r.name==="a"&&(n.setAttribute("target","_blank"),n.setAttribute("rel","noopener noreferrer"),n.setAttribute("referrerpolicy","no-referrer"));let p={dom:n,name:r.name,namespace:r.namespace,children:[],id:o,parent:d};if(v.set(o,p),w.set(n,o),R+=1,C(e.attributes)){for(let[c,g]of Object.entries(e.attributes))s(p,c,g,!1);L(p,!0)}if(t.decorate?.(n,r.name,r.namespace),C(e.properties))for(let c of Object.keys(e.properties))f({reason:"attribute",element:r.name,name:c});if(C(e.eventListeners))for(let c of Object.keys(e.eventListeners))e.eventListeners[c]!=null&&f({reason:"attribute",element:r.name,name:`on${c}`});if(Array.isArray(e.children))for(let c of e.children){let g=k(c,p);p.children.push(g),n.appendChild(g.dom)}return p},O=e=>{if(!Array.isArray(e))return f({reason:"record"});let[d,o]=e,a=typeof o=="string"?v.get(o):void 0;if(!a)return f({reason:"record"});switch(d){case te:{if(a.text)return f({reason:"record"});let r=Number(e[3]),n=Number.isInteger(r)&&r>=0&&r<=a.children.length?r:a.children.length,p=e[2],c=C(p)&&typeof p.id=="string"?E.get(p.id):void 0,g;c&&c.parent?.namespace===a.namespace&&!M(a.namespace,a.name)?(E.delete(p.id),c.parent=a,g=c):g=k(p,a),a.dom.insertBefore(g.dom,a.children[n]?.dom??null),a.children.splice(n,0,g),a.namespace==="html"&&a.name==="textarea"&&t.onFieldSet?.(a.dom);return}case ne:{let r=Number(e[2]),n=a.children[r];if(!n)return f({reason:"record"});a.children.splice(r,1),n.dom.parentNode?.removeChild(n.dom),n.id!==void 0&&!n.refused?E.set(n.id,n):m(n);return}case re:{if(!a.text)return f({reason:"record"});a.dom.data=String(e[2]??"").slice(0,_);let r=D(a,a.parent);r&&t.onFieldSet?.(r);return}case ie:{if(a===N||a.text)return f({reason:"record"});let r=String(e[2]),n=e[4]??$;return n===oe?s(a,r,e[3]):f(n===$||n===W?{reason:"attribute",element:a.name,name:n===W?`on${r}`:r}:{reason:"record"})}default:return f({reason:"record"})}};return{apply(e,d){if(!Array.isArray(e))return f({reason:"record"}),!0;try{for(let o=0;o<e.length;o+=1){if(d&&o%32===0&&d())return!1;O(e[o])}return!0}finally{for(let o of E.values())m(o);E.clear(),l()}},get refused(){return y},get size(){return R},idOf:e=>w.get(e),elementOf(e){let d=v.get(e);return d&&!d.text&&d!==N?d.dom:void 0},dispose(){for(let e of N.children)m(e);for(N.children.length=0;i.firstChild;)i.removeChild(i.firstChild)}}}var J=["https:","mailto:","tel:"];function q(i){if(!(typeof i!="string"||i.length>2e3||/[\s<>"]/.test(i.trim())||i.trim()!==i))try{let t=new URL(i);return!J.includes(t.protocol)||t.protocol==="https:"&&(t.hostname===""||t.username!==""||t.password!=="")?void 0:t.href}catch{return}}function ue(i){let t=new Set,u=h=>{if(typeof h!="string"||!/^(https|mailto|tel):/i.test(h))return;let y=q(h);y&&t.add(y)};for(let h of[...i?.node?[i.node]:[],...i?.nodes??[]])for(let[y,v]of Object.entries(h))y==="id"||y==="kind"||(Array.isArray(v)?v.forEach(u):u(v));return t}function Q(i){return(i??[]).flatMap(t=>{try{let u=new URL(t);return u.protocol==="https:"&&u.hostname!==""&&u.username===""&&u.password===""?[u.origin]:[]}catch{return[]}})}function fe(i,t){let u=q(i);if(u&&(t.handed.has(u)||u.startsWith("https:")&&Q(t.origins).includes(new URL(u).origin)))return u}function me(i,t){let u=i.length>120?`${i.slice(0,119)}\u2026`:i,h="";try{h=new URL(i).protocol}catch{h=""}if(!J.includes(h))return`The link "${u}" was not drawn: a view links only to an https:, mailto: or tel: address.`;let y=Q(t);return`The link "${u}" was not drawn: it is no address this view was handed. A view links out only to an address a record it was shown holds (a url field), as the record holds it${y.length>0?`, or an https: address on ${y.join(", ")}`:""}; a record or a place of this app is <a data-record> or <a data-place>.`}var F=180,pe=`
2
+ :host { display: block; position: relative; contain: layout paint style; isolation: isolate; overflow: clip; min-width: 0; }
3
+ :host(:focus-within) { overflow-clip-margin: var(--graview-ring-reach, 4px); }
4
+ [data-graview-view-root] { display: flow-root; color: var(--graview-ink, CanvasText); font-family: var(--graview-font-body, system-ui, sans-serif); line-height: 1.45; }
5
+ :where([data-graview-view-root]) :where(button) { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; text-align: inherit; appearance: none; cursor: pointer; }
6
+ :where([data-graview-view-root]) :where(a[data-graview-link]) { color: inherit; text-decoration: none; }
7
+ [data-graview-view-root] :is([data-graview-link], [data-graview-press]) { cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: rgb(128 128 128 / 0.16); }
8
+ [data-graview-view-root] :focus-visible { outline: max(2px, var(--graview-focus-width, 2px)) solid var(--graview-focus-color, var(--graview-accent, Highlight)) !important; outline-offset: var(--graview-focus-offset, 2px) !important; }
9
+ [data-graview-view-root] [data-graview-ring-inside]:focus-visible { outline-offset: calc(-1 * max(2px, var(--graview-focus-width, 2px))) !important; }
10
+ [data-graview-view-root] .graview-sr { position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0 !important; border: 0 !important; overflow: hidden !important; clip-path: inset(50%) !important; white-space: nowrap !important; }
11
+ [data-graview-view-root] a[href]:not([data-graview-link])::after { content: " \u2197" !important; content: " \u2197" / " (opens in a new tab)" !important; }
12
+ [data-graview-view-root][data-graview-motion="fade"] { transition: opacity ${F}ms ease; }
13
+ [data-graview-view-root][data-graview-fade] { opacity: 0; }
14
+ @layer graview-motion { @media (prefers-reduced-motion: reduce) { [data-graview-view-root], [data-graview-view-root] *, [data-graview-view-root] ::before, [data-graview-view-root] ::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; animation-timeline: auto !important; transition-duration: 1ms !important; scroll-behavior: auto !important; } } }
15
+ `,Z=4,ge=16;function he(i){let t=i.ownerDocument.defaultView?.getComputedStyle(i);if(!t)return Z;let u=Number.parseFloat(t.outlineWidth)||0,h=Math.max(0,Number.parseFloat(t.outlineOffset)||0);return Math.min(ge,Math.max(Z,Math.ceil(u+h)))}var ye=new Set(["Enter"," ","Escape","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End"]),ee=["click","input","change","keydown"];function Ae(i,t){let u=i.ownerDocument,h=u.createElement("style");h.setAttribute("data-graview-region",""),h.textContent=pe;let y=u.createElement("style");y.setAttribute("data-graview-view-theme","");let v=u.createElement("style");v.setAttribute("data-graview-view-style","");let w=u.createElement("div");w.setAttribute("data-graview-view-root",""),i.append(h,y,v,w);let N=u.defaultView,R,x,S=()=>{x!==void 0&&clearTimeout(x),x=void 0,R=void 0,w.removeAttribute("data-graview-fade")},E=Y(w,{origin:t.origin,...t.asset?{asset:t.asset}:{},...t.imageOrigins?{imageOrigins:t.imageOrigins}:{},...t.picture?{picture:t.picture}:{},...t.link?{link:t.link}:{},...t.onRefused?{onRefused:t.onRefused}:{},...t.maxNodes!==void 0?{maxNodes:t.maxNodes}:{},...t.onOverBudget?{onOverBudget:t.onOverBudget}:{},decorate:(l,s,m)=>{m==="html"&&s==="button"&&l.setAttribute("type","button"),m==="html"&&(s==="input"||s==="textarea"||s==="select")&&l.setAttribute("autocomplete","off"),t.decorate?.(l,s,m)},...t.onFieldSet?{onFieldSet:t.onFieldSet}:{},...t.onAttribute?{onAttribute:t.onAttribute}:{}}),A=[],f="",T=l=>{for(let s=l.composedPath()[0];s&&s!==w&&s!==i;s=s.parentNode)if(s.nodeType===1&&E.idOf(s)!==void 0)return s},D=l=>{let s=T(l);if(!s||l.type==="keydown"&&!ye.has(l.key))return;let m=t.before?.(l,s,w);if(m===!1)return;let k=s,O=s.namespaceURI==="http://www.w3.org/1999/xhtml"&&["input","select","textarea"].includes(s.localName);t.send({type:"dom-event",target:E.idOf(s),event:l.type,...O?{value:String(k.value??"")}:{},...O&&(k.type==="checkbox"||k.type==="radio")?{checked:k.checked}:{},...l.type==="keydown"?{key:l.key}:{},...m??{}});let e=l.type==="keydown"?l.key:void 0;(e==="Enter"||e===" ")&&s.hasAttribute("data-graview-press")&&l.composedPath()[0]===s&&(l.preventDefault(),t.send({type:"dom-event",target:E.idOf(s),event:"click"}))};for(let l of ee)i.addEventListener(l,D);i.addEventListener("toggle",D,!0);let L=typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("overflow-clip-margin","4px");return i.addEventListener("focusin",l=>{let s=l.composedPath()[0],m=i.host;if(!s||s.nodeType!==1||!w.contains(s))return;let k=he(s);if(L){m.style.setProperty("--graview-ring-reach",`${k}px`);return}let O=m.getBoundingClientRect(),e=s.getBoundingClientRect(),d=k*(m.offsetWidth>0?O.width/m.offsetWidth:1),o=e.left-O.left<d||O.right-e.right<d||e.top-O.top<d||O.bottom-e.bottom<d;s.toggleAttribute("data-graview-ring-inside",o)}),{apply(l,s){let m=i.activeElement,k=m?E.idOf(m):void 0,O=E.apply(l,s);if(k!==void 0&&i.activeElement!==m){let e=E.elementOf(k);e?.isConnected&&typeof e.focus=="function"&&e.focus({preventScroll:!0})}return R!==void 0&&(x!==void 0&&clearTimeout(x),x=setTimeout(S,Math.max(0,F-(Date.now()-R)))),O},theme(l){y.textContent=l?j(l).css:""},motion(l){l==="fade"?w.setAttribute("data-graview-motion","fade"):(w.removeAttribute("data-graview-motion"),S())},fade(){w.getAttribute("data-graview-motion")!=="fade"||w.childNodes.length===0||N?.matchMedia?.("(prefers-reduced-motion: reduce)").matches||(R===void 0&&w.setAttribute("data-graview-fade",""),R=Date.now(),x!==void 0&&clearTimeout(x),x=setTimeout(S,F*4))},style(l){let s=P(l);A.length=0;for(let m of s.refused)A.push({reason:"css",name:"stylesheet",css:m}),A.length>200&&A.shift();f=s.css,v.textContent=f},renderer:E,get refused(){return[...E.refused,...A]},get css(){return f},dispose(){for(let l of ee)i.removeEventListener(l,D);i.removeEventListener("toggle",D,!0),S(),E.dispose(),i.replaceChildren()}}}export{F as FADE_MS,pe as REGION_CSS,Ae as createOpenDrawing,ue as handedLinks,fe as judgeLink,me as linkRefusedWords,he as ringReach};
@@ -0,0 +1 @@
1
+ import{b as a,c as b,d as c,e as d,f as e,g as f,h as g,i as h}from"./chunk.WBS7ND2C.js";import"./chunk.NTC2H5ZX.js";import"./chunk.B3WVCSW5.js";import"./chunk.JVDPRQ7J.js";import"./chunk.Q4MI53KK.js";import"./chunk.FQLNBIQ5.js";import"./chunk.AJZBJBMO.js";export{h as createLinks,g as judgeDestination,e as listsOf,c as nowhere,f as placeVocabulary,a as placesSaid,b as quoted,d as whereOfWords};