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,25 +0,0 @@
1
- var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{a as Ye}from"./chunk.SDO3U72B.js";import{Ac as eo,Ia as Xn,Id as ao,L as Zn,Ma as kt,Oa as Jn,Yd as so,_a as Qn,ad as to,ae as lo,ce as Ue,de as Rt,hd as no,jd as oo,pd as ro,sd as io}from"./chunk.F7PIW2EM.js";import{a as $e,b as H}from"./chunk.AJZBJBMO.js";var To=$e(w=>{"use strict";var _t=Symbol.for("react.transitional.element"),ti=Symbol.for("react.portal"),ni=Symbol.for("react.fragment"),oi=Symbol.for("react.strict_mode"),ri=Symbol.for("react.profiler"),ii=Symbol.for("react.consumer"),ai=Symbol.for("react.context"),si=Symbol.for("react.forward_ref"),li=Symbol.for("react.suspense"),di=Symbol.for("react.memo"),xo=Symbol.for("react.lazy"),ui=Symbol.for("react.activity"),So=Symbol.iterator;function ci(e){return e===null||typeof e!="object"?null:(e=So&&e[So]||e["@@iterator"],typeof e=="function"?e:null)}var Eo={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Po=Object.assign,Ao={};function he(e,t,n){this.props=e,this.context=t,this.refs=Ao,this.updater=n||Eo}he.prototype.isReactComponent={};he.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")};he.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function ko(){}ko.prototype=he.prototype;function Ht(e,t,n){this.props=e,this.context=t,this.refs=Ao,this.updater=n||Eo}var Dt=Ht.prototype=new ko;Dt.constructor=Ht;Po(Dt,he.prototype);Dt.isPureReactComponent=!0;var wo=Array.isArray;function Lt(){}var C={H:null,A:null,T:null,S:null},Ro=Object.prototype.hasOwnProperty;function Nt(e,t,n){var o=n.ref;return{$$typeof:_t,type:e,key:t,ref:o!==void 0?o:null,props:n}}function fi(e,t){return Nt(e.type,t,e.props)}function jt(e){return typeof e=="object"&&e!==null&&e.$$typeof===_t}function pi(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var vo=/\/+/g;function It(e,t){return typeof e=="object"&&e!==null&&e.key!=null?pi(""+e.key):t.toString(36)}function yi(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Lt,Lt):(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 ge(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 _t:case ti:a=!0;break;case xo:return a=e._init,ge(a(e._payload),t,n,o,r)}}if(a)return r=r(e),a=o===""?"."+It(e,0):o,wo(r)?(n="",a!=null&&(n=a.replace(vo,"$&/")+"/"),ge(r,t,n,"",function(u){return u})):r!=null&&(jt(r)&&(r=fi(r,n+(r.key==null||e&&e.key===r.key?"":(""+r.key).replace(vo,"$&/")+"/")+a)),t.push(r)),1;a=0;var s=o===""?".":o+":";if(wo(e))for(var l=0;l<e.length;l++)o=e[l],i=s+It(o,l),a+=ge(o,t,n,i,r);else if(l=ci(e),typeof l=="function")for(e=l.call(e),l=0;!(o=e.next()).done;)o=o.value,i=s+It(o,l++),a+=ge(o,t,n,i,r);else if(i==="object"){if(typeof e.then=="function")return ge(yi(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 ge(e,o,"","",function(i){return t.call(n,i,r++)}),o}function mi(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 bo=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)},gi={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(!jt(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};w.Activity=ui;w.Children=gi;w.Component=he;w.Fragment=ni;w.Profiler=ri;w.PureComponent=Ht;w.StrictMode=oi;w.Suspense=li;w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=C;w.__COMPILER_RUNTIME={__proto__:null,c:function(e){return C.H.useMemoCache(e)}};w.cache=function(e){return function(){return e.apply(null,arguments)}};w.cacheSignal=function(){return null};w.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var o=Po({},e.props),r=e.key;if(t!=null)for(i in t.key!==void 0&&(r=""+t.key),t)!Ro.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 Nt(e.type,r,o)};w.createContext=function(e){return e={$$typeof:ai,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:ii,_context:e},e};w.createElement=function(e,t,n){var o,r={},i=null;if(t!=null)for(o in t.key!==void 0&&(i=""+t.key),t)Ro.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 Nt(e,i,r)};w.createRef=function(){return{current:null}};w.forwardRef=function(e){return{$$typeof:si,render:e}};w.isValidElement=jt;w.lazy=function(e){return{$$typeof:xo,_payload:{_status:-1,_result:e},_init:mi}};w.memo=function(e,t){return{$$typeof:di,type:e,compare:t===void 0?null:t}};w.startTransition=function(e){var t=C.T,n={};C.T=n;try{var o=e(),r=C.S;r!==null&&r(n,o),typeof o=="object"&&o!==null&&typeof o.then=="function"&&o.then(Lt,bo)}catch(i){bo(i)}finally{t!==null&&n.types!==null&&(t.types=n.types),C.T=t}};w.unstable_useCacheRefresh=function(){return C.H.useCacheRefresh()};w.use=function(e){return C.H.use(e)};w.useActionState=function(e,t,n){return C.H.useActionState(e,t,n)};w.useCallback=function(e,t){return C.H.useCallback(e,t)};w.useContext=function(e){return C.H.useContext(e)};w.useDebugValue=function(){};w.useDeferredValue=function(e,t){return C.H.useDeferredValue(e,t)};w.useEffect=function(e,t){return C.H.useEffect(e,t)};w.useEffectEvent=function(e){return C.H.useEffectEvent(e)};w.useId=function(){return C.H.useId()};w.useImperativeHandle=function(e,t,n){return C.H.useImperativeHandle(e,t,n)};w.useInsertionEffect=function(e,t){return C.H.useInsertionEffect(e,t)};w.useLayoutEffect=function(e,t){return C.H.useLayoutEffect(e,t)};w.useMemo=function(e,t){return C.H.useMemo(e,t)};w.useOptimistic=function(e,t){return C.H.useOptimistic(e,t)};w.useReducer=function(e,t,n){return C.H.useReducer(e,t,n)};w.useRef=function(e){return C.H.useRef(e)};w.useState=function(e){return C.H.useState(e)};w.useSyncExternalStore=function(e,t,n){return C.H.useSyncExternalStore(e,t,n)};w.useTransition=function(){return C.H.useTransition()};w.version="19.2.8"});var W=$e((es,Mo)=>{"use strict";Mo.exports=To()});var Wo=$e(at=>{"use strict";var ki=Symbol.for("react.transitional.element"),Ri=Symbol.for("react.fragment");function jo(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:ki,type:e,key:o,ref:t!==void 0?t:null,props:n}}at.Fragment=Ri;at.jsx=jo;at.jsxs=jo});var De=$e((us,Go)=>{"use strict";Go.exports=Wo()});var pe={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 Yr(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(","),k=g===void 0?null:Ze(g),p=b===void 0?null:Ze(b);k===null||p===null||(o[m.slice(4)]={x:k,y:p})}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:Yr(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 Da(e){let t=Je(e);return Q(t)==="#"?{...t,overview:!0}:t}function Na(e){let t=Q(e);return t==="#overview=1"?"":t}function Xe(e){return Math.round(e*100)/100}function co(e,t){return Q(e)===Q(t)}var uo="edge:";function fo(e){if(!e.startsWith(uo))return null;let t=e.slice(uo.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 Tt(e){let{pan:t,...n}=e;return{...n,pins:{}}}function z(e,t){if(t===e.focusId)return{...e,focusId:t};let n=Tt(e);return{...n.within?.q!==void 0?le(n,"q",null):n,focusId:t}}function po(e,t){return{...e,relation:t}}function le(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 ye(e,t){if(t!==e.overview&&(e=Tt(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 _e(e,t){if(t!==(e.zoom===!0)&&(e=Tt(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 Mt(e){return`${tt}${e}`}function me(e){return e.startsWith(tt)?e.slice(tt.length):null}var Ga="kinds:beyond";function Zr(e){let t=me(e);return t?[t]:de(e)}function ee(...e){return`${nt}${[...e].sort().join("+")}`}function yo(e){return e.startsWith(nt)}function de(e){return!yo(e)||e.includes("|")?[]:e.slice(nt.length).split("+").filter(Boolean)}function mo(e,t,n={}){let o=me(t);if(o!==null&&e.overview&&n.ownPicture!==!0)return et(e,t);let r=o!==null?ee(o):t;if(e.zoom&&e.focusId===r&&!(o!==null&&n.carry))return _e(e,!1);if(o!==null&&n.carry){let i=ye({...z(e,r),relation:null},!1);return le(_e(i,!0),"q",n.carry)}return _e({...z(e,r),relation:null},!0)}function Xr(e,t,n){return le(ye(z(e,ee(t)),!1),"view",n)}function Fa(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var go="aggregate:";function Ot(e){return e.startsWith(go)&&e.includes("|")}var Ct=e=>e?.off===!0,Jr=e=>e!==void 0&&!Ct(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),ho=e=>e!==void 0&&!Ct(e)&&(e.fast!==void 0||e.decide!==void 0),Qr=e=>e?.suggestOnOpen!==!1&&ho(e),ei=e=>e?.hoverChips===!0&&ho(e);var Vt={};var Oo=H(W(),1),hi={turns:[],outcomes:new Map,busy:!1,pending:null,draft:null,draftNote:null},Co=e=>`graview:seat:${e}`;function Si(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 wi(e,t){if(e)try{sessionStorage.setItem(e,JSON.stringify({turns:t.turns.slice(-40),outcomes:[...t.outcomes],draft:t.draft}))}catch{}}function Wt(e){let t=e===null?null:Co(e),n={...hi,...Si(t)},o=new Set,r=(i,a=!0)=>{n=i,a&&wi(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 vi(e){return(0,Oo.useSyncExternalStore)(e.subscribe,e.get,e.get)}var Io=H(W(),1),bi={entries:[],ghost:null,loaded:!1};function Vo(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 Gt(e){let t=bi,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:Vo(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:Vo(t.entries,i)})).catch(i=>{console.warn("The host's AI interactions could not be read:",i)})}}}function xi(e){return(0,Io.useSyncExternalStore)(e.subscribe,e.get,e.get)}function Lo(e){return e?.closest?.("[data-graview-pick]")?.getAttribute("data-graview-pick")??null}var rt=H(W(),1),it=(0,rt.createContext)(void 0),Ei=()=>(0,rt.useContext)(it);var P=H(W(),1),He=(0,P.createContext)(null);function Ho(){return(0,P.useContext)(He)}function Pi(e,t){let n=Ho(),o=(0,P.useMemo)(()=>n?n.live.seenBy(t):e,[n,e,t]),r=(0,P.useRef)(0),i=(0,P.useCallback)(a=>o.subscribe(()=>{r.current+=1,a()}),[o]);return(0,P.useSyncExternalStore)(i,()=>r.current,()=>0),o}var Do=Ye(()=>(__graviewPreload(import.meta.url,["./chunk.YFVJUHAK.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.FC6AF6CC.js")));function Ft(e){let[,t]=(0,P.useReducer)(o=>o+1,0),n=e.publishing?.mode==="on-publish"&&!no();return(0,P.useEffect)(()=>{n&&Do().then(t,()=>{})},[n]),!n}var _o,Ai=400;function Kt(e,t,n){let o=(0,P.useContext)(He),r=o!==null&&o.owns(e,t),[i,a]=(0,P.useState)(null),[s,l]=(0,P.useState)(_o);(0,P.useEffect)(()=>{if(s||r||i===null)return;let E=!0;return Do().then(I=>{_o=I,E&&l(I)},()=>{}),()=>{E=!1}},[s,r,i]);let[u,c]=(0,P.useState)(0),[m,y]=(0,P.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,[k,p]=(0,P.useState)(void 0);(0,P.useEffect)(()=>{if(!g)return;let E=!0,I=setTimeout(()=>E&&p(g),Ai);return g.then(()=>E&&c(_=>_+1)),()=>{E=!1,clearTimeout(I)}},[g]);let S=g!==void 0&&k!==g||b!==null,v=(0,P.useMemo)(()=>{if(r||i===null||i>=e.log.length||!s||S)return null;try{let E=s.pastAt(e,i,n);return{seq:i,at:E.past?.at,store:E}}catch{return null}},[r,e,i,n,s,S,u]),A=(0,P.useRef)(null),x=S?A.current:v;(0,P.useEffect)(()=>{A.current=x},[x]);let F=(0,P.useCallback)(E=>a(E===null?null:E>=e.log.length?Number.POSITIVE_INFINITY:E),[e]),D=(0,P.useCallback)((E,I)=>[e,x?.store].some(_=>_!==void 0&&(_===E||_.seenBy(I)===E)),[e,x]),N=i!==null,V=(0,P.useMemo)(()=>({past:x,open:N,show:F,live:e,host:n,owns:D,archive:b,kept:y}),[x,N,F,e,n,D,b,y]);return r?o:V}var No=H(W(),1),Bt=(0,No.createContext)(null);var Fo=e=>`graview:setting:${e}`;function Ko(){return localStorage}function Bo(e,t){try{let n=(t??Ko()).getItem(Fo(e.name));if(n!==null&&e.options.some(o=>o.value===n))return n}catch{}return e.initial}function qo(e,t,n){try{(n??Ko()).setItem(Fo(e.name),t)}catch{}}function zo(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 qt(e){return Ue(e)}var Ti=12,Mi=4;function Oi(e,t,n){let o=qt(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(-Ti);function $o(e,t){let n=e.filter(r=>r.length>0);if(n.length===0)return null;if(n.length<=Mi)return n[0];let o=new Set(n.map(r=>t(r)).filter(r=>r!==void 0));return o.size===1?Mt([...o][0]):n[0]}function zt(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=Oi(e,t.author,t.at),i=a=>o.set(r.participant,{...r,...a,since:t.at});switch(t.type){case"read":{let a=$o(t.ids,n);return i({at:a,mode:"reading",trail:st(r.trail,a)}),o}case"about-to-write":case"write":{let a=$o(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 Uo="graview:session";function Yo(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(Uo);if(o)return o;let r=t();return n.setItem(Uo,r),r}catch{return t()}}var $t={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"},Ut={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"},Zo=[$t,Ut],Ci=800;function Xo(e){let{channel:t,store:n,view:o,principal:r,session:i,robots:a,seatWho:s,settingValues:l,setView:u,ttlMs:c=lo,people:m,seats:y}=e,[g,b]=(0,L.useState)(()=>new Map),[k,p]=(0,L.useState)(null),[S,v]=(0,L.useState)(null),[A,x]=(0,L.useState)(null),F=typeof r.id=="string"&&r.id.length>0,D=F&&(l[$t.name]??$t.initial)==="shared",N=D&&(l[Ut.name]??Ut.initial)==="shared",V=qt({kind:r.kind,...r.id?{id:r.id}:{},session:i}),E=F?Qn(r,{graph:n.graph,schema:n.schema,...y?{seats:y}:{},...m?{people:m}:{}}):"",I=s?a.get(`agent:${s}:${i}`):void 0,_=(0,L.useMemo)(()=>!t||!D?null:{participant:V,kind:r.kind,name:E,...r.onBehalfOf?.id?{onBehalfOf:r.onBehalfOf.id,...r.onBehalfOf.name?{onBehalfOfName:r.onBehalfOf.name}:{}}:{},hue:eo(r.id??"nobody"),stop:A??Q(o),...N?{over:k}:{},...I?{robot:{at:I.at,mode:I.mode}}:{},at:new Date().toISOString()},[t,D,N,V,E,r.id,r.kind,r.onBehalfOf?.id,r.onBehalfOf?.name,o,A,k,I?.at,I?.mode]),We=(0,L.useRef)(null),Pe=R=>R&&t?.here({...R,caret:We.current??void 0,at:new Date().toISOString()}),Ae=(0,L.useCallback)(R=>{We.current=R,Pe(_)},[t,_]);(0,L.useEffect)(()=>{if(!_)return;Pe(_);let R=setInterval(()=>Pe(_),Ci);return()=>clearInterval(R)},[t,_]),(0,L.useEffect)(()=>t?t.onWho(B=>b(Rt(new Map,B,Date.now(),c))):void 0,[t,c]);let ke=g.size>0;(0,L.useEffect)(()=>{if(!ke)return;let R=setInterval(()=>{b(B=>{let X=Rt(B,[],Date.now(),c);return X.size===B.size?B:X})},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(!N||typeof document>"u")return;let R=null,B=X=>{let ie=Lo(X.target);ie!==R&&(R=ie,p(ie))};return document.addEventListener("pointermove",B,{passive:!0}),()=>document.removeEventListener("pointermove",B)},[N]);let ue=(0,L.useRef)(null),K=S?g.get(S)??null:null,oe=(0,L.useCallback)(R=>{ue.current=null,v(R)},[]);(0,L.useEffect)(()=>{if(S){if(!K){v(null);return}K.stop!==ue.current?.stop&&(ue.current={stop:K.stop,at:Date.now()},u(Je(K.stop)))}},[S,K,u]),(0,L.useEffect)(()=>{let R=ue.current;!S||R===null||Date.now()-R.at<400||co(o,Je(R.stop))||v(null)},[o,S]),(0,L.useEffect)(()=>{if(!S||typeof document>"u")return;let R=B=>{B.key==="Escape"&&v(null)};return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[S]);let Re=_!==null,re=(0,L.useMemo)(()=>Re?{participant:V,name:E}:null,[Re,V,E]);return(0,L.useMemo)(()=>({who:g,sharing:re,following:K,follow:oe,sayWhere:x,sayCaret:Ae}),[g,re,K,oe,Ae])}var U=H(W(),1);function Jo(e){return Ue(e.author)}function Vi(e,t){return e.length>1?"co-edited":t==="rule"?"rule":t==="agent"?"autonomous":"directed"}function Qo(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(Jo(u))?m.participants:[...m?.participants??[],Jo(u)];i.set(l,{at:o,manner:Vi(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 Ii=2600;function er(e,t=Ii){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=io(e.allInvariants(),l,y).introduces;l=y,a(Qo(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(Qo(r.current,[Li(l)],[],Date.now(),t))},[t,a]);return{activity:n,noteAttention:s}}function Li(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 tr(){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),_i=e=>e.definitions.some(t=>Xn(t).size>0);function nr(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||!_i(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=Jn(t,{kind:n.kind,...n.id===void 0?{}:{id:n.id},...n.roles?{roles:n.roles}:{},...n.onBehalfOf?{onBehalfOf:n.onBehalfOf}:{}},c);return kt(u,m.read),r(m),e.reread(),()=>{s=!1,kt(u,void 0)}},[e,t,n.kind,n.id,i,a]),o}function or(){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 te=H(De(),1),Hi="graview:place-menu",Ne=(0,d.createContext)(null),sr=(0,d.createContext)("scene");function Di({mode:e,children:t}){return(0,te.jsx)(sr.Provider,{value:e,children:t})}function Ni(){return(0,d.useContext)(sr)}var lr={kind:"human"},ji=[],Wi=[],Gi=[],Yt=[];function dr(e,t){let n=(0,d.useId)();(0,d.useEffect)(()=>{if(!globalThis.__graviewWatch)return;let o=t??lr,r=()=>ro(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 Fi=()=>{try{return typeof location<"u"&&new URLSearchParams(location.search).get("as")==="published"?"published":void 0}catch{return}},Ki={off:!0};function Bi({store:e,views:t,initialView:n,scheme:o="dark",initialSelection:r,principal:i,as:a,seats:s=ji,onSeat:l,people:u=Wi,memory:c,presenceTtlMs:m,app:y,settings:g=y?.settings??Gi,presence:b,typing:k,brand:p,locale:S,timeZone:v,onKeepLens:A,providers:x,ai:F,files:D,resolveApp:N,history:V,linkedRecords:E,menuSections:I,keptViews:_,onExport:We,subscriptions:Pe,dismissals:Ae,whileAway:ke,signIn:ue,view:K,onViewChange:oe,children:Re}){let re=(0,d.useContext)(Ne),R=I??re?.menuSections,B=ue??re?.signIn,X=_??re?.keptViews,ie=We??re?.onExport,[_r,Hr]=(0,d.useState)(null),ce=_r??i??s[0]?.principal??lr,Ge=Kt(e,ce,V),pn=Ge.past&&Ge.live===e?Ge.past.store:e,wt=a??Fi(),vt=!Ft(e),j=(0,d.useMemo)(()=>vt?e:pn.seenBy(ce,wt?{as:wt}:void 0),[vt,e,pn,ce,wt]);dr(e,ce);let[ae]=(0,d.useState)(()=>Yo(c)),[yn,Dr]=(0,d.useState)(!1),mn=(0,d.useCallback)(()=>Dr(!0),[]),se=(0,d.useMemo)(()=>b?[...g,...Zo]:g,[g,b]),[bt]=(0,d.useState)(()=>n??Qt(t,e.schema)),[Nr,gn]=(0,d.useState)(()=>Qe(bt??pe,r??bt?.selection??[])),Te=(0,d.useRef)(bt??pe).current,[hn,jr]=(0,d.useState)(null),[Sn,Wr]=(0,d.useState)(null),Z=(0,d.useContext)(Ne),[wn]=(0,d.useState)(()=>Z?.seatTalk??Wt(p?.name??e.schema.kinds.join(","))),xt=F??Z?.ai??Vt,Fe=(0,d.useMemo)(()=>xt.off?Ki:xt,[xt]),vn=(0,d.useRef)(Fe.interactions);vn.current=Fe.interactions;let[bn]=(0,d.useState)(()=>Z?.aiDesk??Gt(()=>vn.current)),[Gr]=(0,d.useState)(()=>Z?.subscriptions??oo()),xn=Pe??Z?.subscriptions??Gr,Et=A??Z?.onKeepLens,Ke=y??Z?.app,Be=S??Z?.locale,Fr=p?.locale??Ke?.brand?.locale,qe=v??Z?.timeZone;Zn({reader:Be,app:Fr,readerTimeZone:qe,appTimeZone:p?.timeZone??Ke?.brand?.timeZone});let En=(0,d.useRef)(null),Pn=(0,d.useCallback)(f=>{En.current=f},[]),An=(0,d.useCallback)(f=>En.current?.whereIs(f)??null,[]),[kn]=(0,d.useState)(()=>tr()),[Rn]=(0,d.useState)(()=>or()),[Pt,Kr]=(0,d.useState)(null),[Me,Tn]=(0,d.useState)(()=>new Map),Oe=(0,d.useRef)(Me);Oe.current=Me;let Ce=(0,d.useRef)(null),At=(0,d.useCallback)(f=>j.graph.getNode(f)?.kind,[j]),J=(0,d.useCallback)(f=>{let h=zt(Oe.current,f,At);Oe.current=h,Tn(h),Ce.current&&clearTimeout(Ce.current),[...h.values()].some(O=>O.mode!=="docked"&&O.mode!=="asking")&&(Ce.current=setTimeout(()=>{let O=zt(Oe.current,{type:"rest",at:Date.now(),holdMs:Jt},At);Oe.current=O,Tn(O)},Jt+20))},[At]),Mn=(0,d.useCallback)(f=>J({...f,at:f.at??Date.now()}),[J]),On=(0,d.useCallback)(f=>{Kr(f),f&&J({type:"home",author:{kind:"agent",id:f,session:ae},at:Date.now()})},[J,ae]);(0,d.useEffect)(()=>j.subscribe((f,h)=>{for(let T of h)T.author.kind==="agent"&&J({type:"write",author:T.author,ids:T.writes,at:Date.now()})}),[j,J]),(0,d.useEffect)(()=>()=>{Ce.current&&clearTimeout(Ce.current)},[]);let $=(0,d.useMemo)(()=>({...ce,session:ae}),[ce,ae]),Cn=nr(j,E,$),Vn=(0,d.useCallback)(f=>{Hr(f),l?.(f)},[l]),[Ve,Br]=(0,d.useState)(()=>Object.fromEntries(se.map(f=>[f.name,Bo(f,c)])));(0,d.useEffect)(()=>{for(let f of se)zo(f,Ve[f.name]??f.initial)},[se,Ve]);let In=(0,d.useCallback)((f,h)=>{let T=se.find(O=>O.name===f);!T||!T.options.some(O=>O.value===h)||(qo(T,h,c),Br(O=>({...O,[f]:h})))},[se,c]),[Ln,qr]=(0,d.useState)(null),{activity:_n,noteAttention:Hn}=er(j),Dn=(0,d.useCallback)(f=>{Hn(f),J({type:"read",author:f.author,ids:f.reads,at:Date.now()})},[Hn,J]),fe=(0,d.useCallback)(f=>{if(me(f)!==null||de(f).length>0||Ot(f))return!0;let h=fo(f);return h?j.graph.allEdges().some(T=>T.kind===h.kind&&T.from===h.from&&T.to===h.to):j.graph.getNode(f)!==void 0},[j]),Nn=(0,d.useCallback)(f=>{let h=f.selection??Yt,T=h.filter(fe),O=T.length===h.length?f:Qe(f,T);return O.focusId!==null&&!fe(O.focusId)&&(O=z(O,null)),O},[fe]),Ie=(0,d.useCallback)(f=>{let h=Nn(f),T=ar(j,$,h.shown);if(h.focusId!==null&&T.size>0){let O=de(h.focusId),Yn=j.graph.getNode(h.focusId);(O.length>0?O.every(Ur=>T.has(Ur)):Yn?T.has(Yn.kind):!1)&&(h={...h,focusId:null})}if(!h.overview&&h.focusId===null){let O=Te.focusId!==null&&!fe(Te.focusId)?Qt(t,e.schema)??{...pe,overview:!0}:Te;O.focusId!==null&&fe(O.focusId)?h={...h,focusId:O.focusId}:O.overview===!0&&(h={...h,overview:!0})}return h},[Nn,fe,j,Te,$,t,e.schema]),q=Ie(K??Nr),jn=(0,d.useMemo)(()=>ar(j,$,q.shown),[j,$,q.shown]),Wn=(0,d.useMemo)(()=>[...j.modules.administered.entries()].map(([f,h])=>{let T=j.mayAdminister(f,$);return{name:f,...h.description?{description:h.description}:{},kinds:h.kinds??[],canShow:T,shown:T&&(q.shown??[]).includes(f)}}),[j,$,q.shown]),Le=(0,d.useCallback)(f=>{let h=T=>Ie(typeof f=="function"?f(T):f);if(K!==void 0){oe?.(h(K));return}oe&&oe(h(q)),gn(T=>h(T))},[q,oe,K,Ie]);(0,d.useEffect)(()=>{K===void 0&&gn(f=>{let h=Ie(f);return h===f?f:h})},[q,K,Ie]);let Gn=q.selection??Yt,Fn=(0,d.useCallback)(f=>{Le(h=>Qe(h,typeof f=="function"?f(h.selection??Yt):f))},[Le]),{who:ze,following:Kn,follow:Bn,sayWhere:zr,sayCaret:qn,sharing:zn}=Xo({channel:b,store:j,view:q,principal:$,session:ae,robots:Me,seatWho:Pt,settingValues:Ve,setView:Le,seats:s,people:u,...m!==void 0?{ttlMs:m}:{}}),$r=(0,d.useMemo)(()=>({store:j,scheme:o,views:t,view:q,setView:Le,homeView:Te,selection:Gn,setSelection:Fn,menuAt:hn,setMenuAt:jr,whereIs:An,pointer:kn,motion:Rn,registerScene:Pn,robots:Me,noteSeat:Mn,seatWho:Pt,registerSeatWho:On,actsDoor:Sn,registerActsDoor:Wr,seatTalk:wn,aiDesk:bn,...c?{memory:c}:{},who:ze,following:Kn,follow:Bn,sayWhere:zr,sharing:zn,session:ae,ai:Fe,resolveApp:N,linkedRecords:E,menuSections:R,...X?{keptViews:X}:{},...ie?{onExport:ie}:{},subscriptions:xn,dismissals:Ae,whileAway:ke,signIn:B,linkedReads:Cn,movedByHand:yn,noteMoved:mn,emphasis:Ln,setEmphasis:qr,activity:_n,noteAttention:Dn,principal:$,seats:s,people:u,takeSeat:Vn,settings:se,settingValues:Ve,chooseSetting:In,hiddenKinds:jn,administered:Wn,...x?{providers:x}:{},...p?{brand:p}:{},...Et?{onKeepLens:Et}:{},app:Ke,...Be?{locale:Be}:{},...qe?{timeZone:qe}:{}}),[j,o,t,q,Le,Gn,Fn,hn,An,kn,Rn,Pn,Me,Mn,Pt,On,Sn,wn,bn,c,ze,Kn,Bn,zn,ae,Fe,N,E,R,X,ie,xn,Ae,ke,B,Cn,yn,mn,Ln,_n,Dn,$,s,u,Vn,se,Ve,In,jn,Wn,x,p,Et,Ke,Be,qe]),$n=(0,d.useMemo)(()=>k?{typing:k,sayCaret:qn,who:ze}:null,[k,qn,ze]),Un=D?(0,te.jsx)(it.Provider,{value:D,children:Re}):Re;return(0,te.jsx)(Ne.Provider,{value:$r,children:(0,te.jsx)(He.Provider,{value:Ge,children:(0,te.jsx)(Yi,{children:vt?null:$n?(0,te.jsx)(Bt.Provider,{value:$n,children:Un}):Un})})})}var ur=(0,d.createContext)(null),Zt,Xt=new Set,qi=e=>(Xt.add(e),()=>void Xt.delete(e)),rr=()=>Zt;function zi(e){if(!Zt){Zt=e;for(let t of[...Xt])t()}}var $i=300;function Ui(e){let t=0;return async(n,o)=>{let r=++t;return await new Promise(i=>setTimeout(i,$i)),r===t?e(n,o):[]}}function Yi({children:e}){let{store:t,view:n,views:o,principal:r,hiddenKinds:i,selection:a,ai:s}=ne(),l=dt(),u=n.q,c=n.focusId,m=!!(u&&u.trim().length>0),y=(0,d.useSyncExternalStore)(qi,rr,rr),g=(0,d.useMemo)(()=>m&&y?{flagged:new Set(t.violations().flatMap(A=>A.nodeIds)),touched:y.touchWeights(t.log.all())}:null,[t,l,m,y]),b=c?t.graph.getNode(c)?.kind??me(c)??(de(c).length===1?de(c)[0]:void 0):void 0,k=(0,d.useMemo)(()=>s.near&&Ui(s.near),[s.near]),p=(0,d.useMemo)(()=>!u||!g||!y?null:y.search(t,u,{...b?{inKind:b}:{},principal:r,places:o.places(),kinds:t.schema.kinds.filter(A=>!i.has(A)),from:[...a,...c&&t.graph.has(c)?[c]:[]],flagged:g.flagged,touched:g.touched,limit:200,rank:k}),[t,u,r,o,i,a,c,b,g,k]),[S,v]=(0,d.useState)();return(0,d.useEffect)(()=>void p?.later?.then(A=>v([p,A])),[p]),(0,te.jsx)(ur.Provider,{value:S?.[0]===p?S[1]:p,children:e})}var ir=new WeakMap;function Gs(e){let t=ir.get(e);return t||ir.set(e,t=new Set(e.matched)),t}function Zi(){return(0,d.useContext)(ur)}function ne(){let e=(0,d.useContext)(Ne);if(!e)throw new Error("useGraview must be used inside a <GraviewProvider>.");return e}function en(){return(0,d.useContext)(Ne)??null}function dt(){let{store:e}=ne(),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 Xi(e){let{store:t}=ne(),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 ar(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 Jt=2600;var cr=new WeakSet,Ji=e=>cr.has(e),Qi=e=>void cr.add(e);function Qt(e,t){let n=so(e.arrangement?.()?.first,t,e.places());if(!(!n||n.to==="home"))return n.to==="place"?{...pe,focusId:ee(n.place.kind),within:{view:n.place.as}}:{...pe,focusId:ee(n.kind)}}var Se=H(W(),1);var fr=(0,Se.createContext)(null);function ea(){let e=(0,Se.useContext)(fr),t=en(),n=(o,r,i)=>t?.setView(a=>le(le(ye(z(a,ee(o)),!1),"view",r),"filter",i?.filter??null));return(0,Se.useMemo)(()=>e??{record:o=>{t&&(t.setView(r=>z(ye(r,!1),o)),t.setSelection([o]))},place:(o,r)=>{let i=t?.views.places().find(a=>a.as===o);i&&n(i.kind,i.as,r)},list:(o,r)=>n(o,null,r)},[e,t])}var pr=H(W(),1),ta=(0,pr.createContext)(!1);var ut=Symbol.for("graview.default-view");function yr(e){return Object.defineProperty(e,ut,{value:!0,enumerable:!1}),e}function mr(e){return typeof e=="function"&&e[ut]===!0}var ct=Symbol.for("graview.replaces-page");function gr(e){return Object.defineProperty(e,ct,{value:!0,enumerable:!1}),e}function hr(e){return typeof e=="function"&&e[ct]===!0}var ft=Symbol.for("graview.bleeds");function Sr(e){return Object.defineProperty(e,ft,{value:!0,enumerable:!1}),e}function wr(e){return typeof e=="function"&&e[ft]===!0}var pt=Symbol.for("graview.previews");function vr(e,t={}){return Object.defineProperty(e,pt,{value:t,enumerable:!1}),e}function br(e){return typeof e=="function"?e[pt]:void 0}function na(e){return ao(e)}function oa(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 M=H(W(),1),Y=H(De(),1),tn=new Set,yt=0;function nn(e){return()=>{yt+=1;let t=e();return t.then(()=>void(yt-=1),()=>void(yt-=1)),t}}var ra=()=>yt,gt=(0,M.createContext)(null);function ia(){return{waiting:new Map,at:0}}function aa(e){for(let[t,n]of e.waiting)n<e.at&&e.waiting.delete(t);e.at+=1}var sa=e=>e?.waiting.size??0;function Pr(e,t){e?.waiting.set(t,e.at)}function Ar(e){let t=(0,M.useContext)(gt);(0,M.useLayoutEffect)(()=>{t?.waiting.delete(e)},[t,e])}function la(e){let t={},n=!1,o=new Set,r=(0,M.lazy)(nn(()=>e().then(a=>{n=!0;let s=a.default;function l(u){return Ar(t),(0,M.createElement)(s,u)}return{default:l}},a=>{for(let s of o)s.waiting.delete(t);throw a})));function i(a){let s=(0,M.useContext)(gt);return!n&&s&&(o.add(s),Pr(s,t)),(0,M.createElement)(r,a)}return i}var kr=!1,Rr=!1,mt=new Set;function da(){kr=!0}function ua(){Rr=!0;for(let e of[...mt])e();mt.clear()}var Tr=()=>Rr||!kr;function ca(e){return Tr()?(e(),()=>{}):(mt.add(e),()=>void mt.delete(e))}var xr=!1;function on(){for(let e of[...tn])e()}function fa(){xr||typeof window>"u"||(xr=!0,window.addEventListener("online",on))}function rn(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,tn.delete(c),s(),g),g=>{throw r=void 0,o=!0,tn.add(c),fa(),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",k={};function p(A){(0,M.useSyncExternalStore)(l,u,u),Ar(k);let x=(0,M.useRef)(null),F=(0,M.useRef)(null),D=(0,M.useRef)(!1);return(0,M.useEffect)(()=>{o&&r===void 0&&c()},[]),n&&typeof document<"u"&&x.current!==null&&document.activeElement===x.current&&(D.current=!0),(0,M.useLayoutEffect)(()=>{if(!(!n||!D.current)){D.current=!1;for(let N=F.current?.nextElementSibling??null;N!==null;N=N.nextElementSibling){let V=N.matches(Er)?N:N.querySelector(Er);if(V instanceof HTMLElement){V.focus();return}}}}),n?(0,Y.jsxs)(Y.Fragment,{children:[D.current?(0,Y.jsx)("span",{ref:F,hidden:!0}):null,y(t,A)]}):g.quiet?null:(0,Y.jsx)(pa,{what:b,button:x,...g.as?{as:g.as}:{}})}let S=(0,M.lazy)(nn(()=>m().then(()=>({default:p}),()=>({default:p}))));function v(A){let x=(0,M.useContext)(gt),[F]=(0,M.useState)(()=>n||o);return!n&&!o&&Pr(x,k),(0,M.createElement)(F?p:S,A)}return v}}}var Er="button,a[href],input,select,textarea,[tabindex]:not([tabindex='-1'])";function pa({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:on,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 ya(){let{selection:e,setSelection:t}=ne();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 ma(){let{store:e}=ne(),t=dt();return(0,ve.useMemo)(()=>ga(e),[e,t])}var Mr=new WeakMap;function ga(e){let t=Mr.get(e);if(!t){let n={violations:null};e.subscribe(()=>{n.violations=null}),Mr.set(e,n),t=n}return t.violations??=e.violations(),t.violations}function ha(){let{view:e,setView:t}=ne();return(0,ve.useMemo)(()=>({view:e,url:Q(e),focus:n=>t(o=>z(o,n)),show:n=>t(o=>po(o,n)),toggle:n=>t(o=>et(o,n)),go:n=>t(n)}),[e,t])}var we={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;we.at=typeof t?.graview=="number"?t.graview:0,we.at>we.depth&&(we.depth=we.at),we.tell()});var G=H(W(),1),sn={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"]}},Sa={position:"fixed",inset:"auto",margin:0,zIndex:to("popover"),boxSizing:"border-box"},ht=6,be=8,wa=e=>typeof e.showPopover=="function";function St(e){try{return e.matches(":popover-open")}catch{return!1}}function va(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 ln(e,t,n={}){let o=va(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 k=y>=r.width-2*be?Math.max(0,(r.width-y)/2):Math.max(be,Math.min(g,r.width-be-y)),p=u?o.bottom+ht:Math.max(be,o.top-ht-m);e.style.left=`${Math.round(k)}px`,e.style.top=`${Math.round(p)}px`}function Or(e,t,n,o={}){let r=o.align??"end";(0,G.useLayoutEffect)(()=>{let i=e.current;if(!t||!i)return;if(wa(i)&&!St(i))try{i.showPopover(),xa()}catch{}let a=0,s=u=>{u?.target instanceof Node&&i.contains(u.target)||(cancelAnimationFrame(a),a=requestAnimationFrame(()=>ln(i,n,{align:r})))};ln(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&&St(i))try{i.hidePopover()}catch{}}},[t,e,r])}var dn=new Set;function ba(e){return dn.add(e),()=>dn.delete(e)}function xa(){for(let e of dn)if(!(!e.isConnected||!St(e)))try{e.hidePopover(),e.showPopover()}catch{}}var xe=null,Ea='button:not([disabled]), [href], input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), summary, [tabindex]:not([tabindex="-1"])';function Pa(e){for(let t of e.querySelectorAll(Ea))if(t.closest("[hidden]")===null&&getComputedStyle(t).visibility!=="hidden")return t;return e}var an=()=>{let e=document.activeElement;return e===null||e===document.body};function Aa(e,t={}){let{at:n,returnTo:o,onOpenChange:r}=t,i=t.popover!==!1,[a,s]=(0,G.useState)(!1),l=t.open??a,u=(0,G.useRef)(null),c=(0,G.useRef)(null),m=(0,G.useCallback)(v=>{u.current=v},[]),y=(0,G.useCallback)(v=>{c.current=v},[]),g=`graview-popover-${(0,G.useId)().replace(/:/g,"")}`,b=(0,G.useRef)({onOpenChange:r,returnTo:o,controlled:t.open!==void 0});b.current={onOpenChange:r,returnTo:o,controlled:t.open!==void 0};let k=(0,G.useCallback)(v=>{b.current.controlled||s(v),b.current.onOpenChange?.(v)},[]),p=(0,G.useCallback)(()=>{(document.querySelector(`[aria-controls="${g}"]`)??u.current??b.current.returnTo?.()??null)?.focus({preventScroll:!0})},[g]),S=(0,G.useCallback)(v=>{let A=c.current,x=typeof document>"u"?null:document.activeElement,F=x===null||x===document.body||A!==null&&A.contains(x);k(!1),!(!v||!F)&&(p(),requestAnimationFrame(()=>{an()&&p()}))},[k,p]);return Or(c,i&&l,n??u,t.align?{align:t.align}:{}),(0,G.useEffect)(()=>{if(!i||!l)return;let v={name:e,close:()=>S(!1)};if(xe&&xe.close!==v.close&&xe.close(),xe=v,sn[e].focus==="into"){let V=c.current;V&&!V.contains(document.activeElement)&&Pa(V).focus({preventScroll:!0})}let A=V=>{V.key==="Escape"&&S(!0)},x=V=>{let E=V.target;if(!(E instanceof Node))return;let I=c.current;if(I?.contains(E)||u.current?.contains(E))return;let _=E instanceof Element?E.closest('[role="dialog"], [role="alertdialog"]'):null;_&&!(I&&_.contains(I))||(S(!1),sn[e].focus==="into"&&requestAnimationFrame(()=>{(an()||I!==null&&I.contains(document.activeElement))&&p()}))},F=null,D=null,N=V=>{let E=V.target;if(!(E instanceof Element))return;let I=c.current,_=E.closest('[role="dialog"], [role="alertdialog"]');!_||I&&(I.contains(_)||_.contains(I))||(F=_,S(!1))};return document.addEventListener("keydown",A),document.addEventListener("pointerdown",x,!0),document.addEventListener("focusin",N),()=>{document.removeEventListener("keydown",A),document.removeEventListener("pointerdown",x,!0),document.removeEventListener("focusin",N);let V=F;V&&typeof MutationObserver<"u"&&(D?.disconnect(),D=new MutationObserver(()=>{V.isConnected||(D?.disconnect(),requestAnimationFrame(()=>{(an()||document.activeElement.closest("[hidden]")!==null)&&p()}))}),D.observe(document.body,{childList:!0,subtree:!0}),setTimeout(()=>D?.disconnect(),10*6e4)),xe?.close===v.close&&(xe=null)}},[i,l,e,S,p]),{open:l,setOpen:v=>v?k(!0):S(!0),toggle:()=>l?S(!0):k(!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 Ee=H(W(),1);var ka=rn(Ye(()=>(__graviewPreload(import.meta.url,["./chunk.N7T7VB77.js","./chunk.SDO3U72B.js","./chunk.F7PIW2EM.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.PJ5AO7CK.js"))));function Ra(e,t,n){let o,r=!1,i=()=>{let{hidden:s,removed:l}=t.current();o||r||s.length+l.length===0||(o=()=>{},ka.load().then(u=>{r||(o=u.watchTidied(e,t,n))},String))};i();let a=t.onChange?.(i);return()=>{r=!0,a?.(),o?.()}}function Ta(e,t){let[n,o]=(0,Ee.useState)();return(0,Ee.useEffect)(()=>t?Ra(e,t,r=>o([e,r])):void 0,[e,t]),n?.[0]===e?n[1]:e}var Cr=H(W(),1),Ma=(0,Cr.createContext)(!1);var un=H(W(),1),Oa=(0,un.createContext)(null),Ca=(0,un.createContext)(null);var Vr=H(W(),1),Va=(0,Vr.createContext)(null);var Ir=H(W(),1),cn='button:not([disabled]), a[href], input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), summary, [tabindex]:not([tabindex="-1"])',fn=e=>e instanceof HTMLElement&&(e.matches(cn)||e.hasAttribute("tabindex")),je=e=>typeof e.checkVisibility=="function"?e.checkVisibility():e.getClientRects().length>0;function Ia(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&&fn(s)&&je(s)?s:null}var La=e=>e.isConnected&&fn(e)&&!e.matches(":disabled")&&e instanceof HTMLElement&&je(e);function Lr(e,t){let n=t?Ia(e,t):null;if(n)return n;let o=e.querySelector("[data-graview-view][tabindex]");if(o&&je(o))return o;for(let r of e.querySelectorAll(cn))if(je(r))return r;return fn(e)&&je(e)?e:null}function _a(e){(0,Ir.useEffect)(()=>{let t=e.current;if(!t||typeof MutationObserver>"u")return;let n=[],o=p=>{let S=p.target;if(S instanceof Element){n=[];for(let v=S;v&&v!==t.parentElement;v=v.parentElement)n.push(v)}},r=!1,i=!1,a=t.ownerDocument,s=()=>!i&&a.defaultView!==null,l=(p,S)=>void setTimeout(()=>s()&&S(),p),u=p=>void requestAnimationFrame(()=>s()&&p()),c=p=>{if(r=!1,i)return;let S=a.activeElement;if(!(!(S===null||S===a.body||S===a.documentElement)||n.length===0)){if(La(n[0])){p&&n[0]instanceof HTMLElement&&n[0].focus({preventScroll:!0});return}for(let A of n.slice(1)){if(!A.isConnected)continue;let x=Lr(A,n[0]);if(x){x.focus({preventScroll:!0}),n=[];return}}}},m=(p,S=Date.now()+2500)=>{l(100,()=>{c(p);let v=a.activeElement;(v===null||v===a.body||v===a.documentElement)&&n.length>0&&Date.now()<S&&m(p,S)})},y=()=>{r||n.length===0||(r=!0,l(60,()=>u(()=>{c(!1),m(!1)})))},g=p=>{if(!(p instanceof KeyboardEvent&&!["Enter"," ","Escape"].includes(p.key))){if(!(p instanceof KeyboardEvent)){let S=p.target instanceof Element?p.target.closest(cn):null,v=a.activeElement,A=v===null||v===a.body||v===a.documentElement;if(S&&A&&t.contains(S)){n=[];for(let x=S;x&&x!==t.parentElement;x=x.parentElement)n.push(x);l(150,()=>u(()=>{c(!1),m(!1)}));return}}!(p instanceof KeyboardEvent)&&!(p.target instanceof Node&&n[0]?.contains(p.target))||l(150,()=>u(()=>{c(!0),m(!0)}))}},b=new MutationObserver(()=>{n.length>0&&!n[0].isConnected&&y()}),k=p=>{p.relatedTarget===null&&y()};return t.addEventListener("focusin",o),t.addEventListener("focusout",k),t.addEventListener("click",g),t.addEventListener("keydown",g),b.observe(t,{childList:!0,subtree:!0}),()=>{i=!0,t.removeEventListener("focusin",o),t.removeEventListener("focusout",k),t.removeEventListener("click",g),t.removeEventListener("keydown",g),b.disconnect()}},[e])}export{pe as a,Q as b,Je as c,Da as d,Na as e,co as f,uo as g,fo as h,Tt as i,z as j,po as k,le as l,ye as m,Qe as n,_e as o,et as p,nt as q,Mt as r,me as s,Ga as t,Zr as u,ee as v,yo as w,de as x,mo as y,Xr as z,Fa as A,go as B,Ot as C,Jr as D,Qr as E,ei as F,W as G,Wt as H,vi as I,xi as J,Lo as K,it as L,Ei as M,He as N,Ho as O,Pi as P,Ft as Q,Kt as R,Bt as S,De as T,Hi as U,Ne as V,Di as W,Ni as X,dr as Y,Bi as Z,zi as _,Gs as $,Zi as aa,ne as ba,en as ca,dt as da,Xi as ea,Ji as fa,Qi as ga,Qt as ha,fr as ia,ea as ja,ta as ka,yr as la,mr as ma,gr as na,hr as oa,Sr as pa,wr as qa,vr as ra,br as sa,na as ta,oa as ua,nn as va,ra as wa,gt as xa,ia as ya,aa as za,sa as Aa,la as Ba,da as Ca,ua as Da,Tr as Ea,ca as Fa,rn as Ga,Ta as Ha,Ma as Ia,Oa as Ja,Ca as Ka,Va as La,ya as Ma,ma as Na,ha as Oa,we as Pa,_a as Qa,Sa as Ra,St as Sa,Or as Ta,ba as Ua,Aa 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
- */
@@ -1 +0,0 @@
1
- import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o}from"./chunk.HGVBGSRS.js";import"./chunk.G4JJXA63.js";import"./chunk.WD4VPMEE.js";import"./chunk.VUAOCYG2.js";import"./chunk.ZVG3DR5G.js";import"./chunk.XOZU4OFA.js";import"./chunk.LA2DMHZC.js";import"./chunk.ISRQQVS4.js";import"./chunk.WVUJXDXZ.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.F7PIW2EM.js";import"./chunk.FQLNBIQ5.js";import"./chunk.AJZBJBMO.js";export{i as draftAnswer,h as draftFromLens,b as draftSight,l as draftView,a as isDraftFailure,c as judgeLens,d as lensEditOf,f as lensFromSpec,j as recipeDraft,g as recipeOfLens,m as refineDraft,o as runDraftTool,e as takeBackEditOf,k as templateDraft,n as withReaderLenses};
@@ -1 +0,0 @@
1
- import"./chunk.WVUJXDXZ.js";import{b as C}from"./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.HZHNM2KI.js";import{ra as $,ta as E,ua as b,va as k}from"./chunk.F7PIW2EM.js";import"./chunk.FQLNBIQ5.js";import"./chunk.AJZBJBMO.js";function M(r,l,t){let p=r.getAttribute("data-record")??"",g=r.getAttribute("data-field")??"",e=Number(r.getAttribute("data-index")??"0"),c=[...l?.node?[l.node]:[],...l?.nodes??[]].find(a=>a.id===p);if(!p||!c)return{why:p?`names a record it was not shown ("${p.slice(0,80)}")`:"names no record (data-record)"};let s=g&&Object.hasOwn(c,g)?c[g]:void 0,o=(Array.isArray(s)?s:[s]).filter($),u=Number.isInteger(e)&&e>=0?o[e]:void 0,n=c.label?`"${c.label}"`:"a record";return g?u?(t==="video"?!b(u):!b(u)&&!E(u))?{why:`names "${u.name}" on ${n}, which is not ${t==="video"?"a video":"a picture or a video"}`}:{file:u,on:c}:{why:o.length===0?`names "${g}" on ${n}, which holds no file it was shown`:`names file ${r.getAttribute("data-index")} of "${g}" on ${n}, which holds ${o.length}`}:{why:`names no field of ${n} (data-field)`}}var A=r=>`${r.caption?.trim()||r.name}, ${k(r)}`;function T(r,l,t,p,g){let e=r.createElement("video");e.setAttribute("data-graview-video",""),e.setAttribute("controls",""),e.setAttribute("preload","metadata"),e.setAttribute("playsinline",""),e.setAttribute("aria-label",A(t));let c=t.poster?p(t.poster):void 0;c&&e.setAttribute("poster",c),t.width&&t.height?(e.setAttribute("width",String(t.width)),e.setAttribute("height",String(t.height)),e.style.aspectRatio=`${t.width} / ${t.height}`):e.style.aspectRatio="16 / 9",e.style.cssText+=";display:block;width:100%;height:auto;max-height:80vh;background:#000;border-radius:var(--graview-radius, 8px)";let s=t.captions?p(t.captions):void 0;if(s){let o=r.createElement("track");o.setAttribute("kind","captions"),o.setAttribute("src",s),o.setAttribute("srclang","en"),o.setAttribute("label","Captions"),o.setAttribute("default",""),e.appendChild(o)}return t.duration===void 0&&e.addEventListener("loadedmetadata",()=>Number.isFinite(e.duration)&&e.duration>0&&e.setAttribute("aria-label",A({...t,duration:e.duration}))),e.setAttribute("src",g),l.appendChild(e),e}function N(r,l){let t=r.document,p=new Set,g=n=>{p.has(n)||(p.add(n),l.onProblem?.(n))},e=n=>{let a=l.file?l.file(n):n;if(a!==void 0)try{let h=new r.URL(a,t.baseURI);return h.origin===r.location.origin&&/^https?:$/.test(h.protocol)?a:void 0}catch{return}},c=new WeakMap,s,o=n=>{if(typeof n.close=="function")return n.close();n.removeAttribute("open"),n.dispatchEvent(new r.Event("close"))},u=(n,a)=>g(`The ${n} in the view ${l.view} was not drawn: it ${a}.`);return{refresh(n){let a=l.shown();for(let h of Array.from(n.querySelectorAll("graview-video"))){let d=h.shadowRoot??h.attachShadow({mode:"open"});if(!l.pictures){c.delete(h),d.replaceChildren(),u("video",`asks for no pictures: a view places a record's video where its manifest says "pictures": true`);continue}let f=M(h,a,"video"),i="file"in f?JSON.stringify(f.file):"";if(c.get(h)===i&&d.childNodes.length>0)continue;if(c.set(h,i),d.replaceChildren(),"why"in f){u("video",f.why);continue}let m=e(f.file.href);if(!m){u("video",`names "${f.file.name}", which this host does not say it serves on this page`);continue}let w=t.createElement("style");w.textContent=":host { display: block; min-width: 0; }",d.appendChild(w),T(t,d,f.file,e,m)}},open(n){if(!l.pictures)return u("full-screen viewer",`asks for no pictures: a view opens a record's picture or video full screen where its manifest says "pictures": true`),!1;let a=M(n,l.shown(),"any");if("why"in a)return u("full-screen viewer",a.why),!1;let h=e(a.file.href);if(!h)return u("full-screen viewer",`names "${a.file.name}", which this host does not say it serves on this page`),!1;s&&o(s);let d=a.file,f=d.caption?.trim()||d.name,i=t.createElement("dialog");i.setAttribute("data-graview-lightbox",""),i.setAttribute("aria-label",b(d)?A(d):f),i.style.cssText="padding:0;border:0;border-radius:var(--graview-radius, 8px);max-width:min(96vw, 1600px);max-height:94vh;background:var(--graview-panel, Canvas);color:var(--graview-ink, CanvasText)";let m=t.createElement("figure");if(m.style.cssText="margin:0;display:grid;gap:8px;padding:10px",b(d))T(t,m,d,e,h);else{let v=t.createElement("img");v.setAttribute("src",h),v.setAttribute("alt",f),v.style.cssText="max-width:100%;max-height:80vh;object-fit:contain;display:block;margin:0 auto",m.appendChild(v)}let w=t.createElement("figcaption");w.style.cssText="display:flex;gap:12px;align-items:center;justify-content:space-between";let x=t.createElement("span");x.textContent=b(d)&&d.duration!==void 0?`${f} \xB7 ${C(d.duration)}`:f;let y=t.createElement("button");return y.type="button",y.textContent="Close",y.addEventListener("click",()=>o(i)),w.append(x,y),m.appendChild(w),i.appendChild(m),i.addEventListener("click",v=>v.target===i&&o(i)),i.addEventListener("close",()=>{i.remove(),s===i&&(s=void 0),n.focus?.()}),t.body.appendChild(i),s=i,typeof i.showModal=="function"?i.showModal():i.setAttribute("open",""),y.focus(),!0},dispose(){s&&o(s),s?.remove(),s=void 0}}}export{N as createGuestMedia,M as namedFile};
@@ -1 +0,0 @@
1
- import{g as a}from"./chunk.7R727IKU.js";import{c as p}from"./chunk.LQAT7FA6.js";import{Ia as d}from"./chunk.F7PIW2EM.js";function k(n){let r=new Map;for(let i of n.kinds){let e=n.tryDefinition(i),o=a(e),s=d(e);r.set(i,{fields:new Set(Object.keys(e?.fields?.shape??{})),edges:new Map(Object.entries(e?.edges??{}).map(([l,h])=>[l,h.cardinality??"many"])),...o?{computed:o}:{},...s.size>0?{linked:s}:{}})}let t=a(n);return t&&r.set(p,{computed:t}),r}export{k as a};
@@ -1 +0,0 @@
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,io=globalThis.queueMicrotask,mn=globalThis.performance,so=mn?mn.now.bind(mn):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=>io.call(globalThis,t),now:()=>so()};var v=Symbol("name"),me=Symbol("prefix"),fe=Symbol("value"),S=Symbol("ns"),q=Symbol("owner"),I=Symbol("owner_document"),re=Symbol("attributes"),M=Symbol("prev"),p=Symbol("next"),R=Symbol("child"),Y=Symbol("parent"),pe=Symbol("host"),K=Symbol("data"),Te=Symbol("listeners"),fn=Symbol("isTrusted"),ke=Symbol("path"),Pe=Symbol("stop_immediate_propagation"),Ce=Symbol("dispatching"),se=Symbol("content"),D=Symbol("hooks"),ft=Symbol("extensions"),we=Symbol("hooks_dispatch"),U=Symbol("is_connected"),Ie=Symbol("create_element"),$n=0,X=1,Me=2,De=3,Le=8,xe=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 P(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)||hn(t)}function pn(t){(t===""||er.test(t))&&hn(t)}function ht(t,e,n){let r=ae(t),o=String(e),i=o.indexOf(":"),s=i<0?null:o.slice(0,i),a=i<0?o:o.slice(i+1);if((s!=null&&(s===""||ao.test(s))||(n==="element"?!Jn.test(a):a===""||er.test(a)))&&hn(o),s!=null&&r==null)throw P(`A namespace is required for the prefix in "${o}"`,"NamespaceError");if(s==="xml"&&r!==Zn)throw P("The xml prefix requires the XML namespace","NamespaceError");if((o==="xmlns"||s==="xmlns")&&r!==$e)throw P("The xmlns name requires the XMLNS namespace","NamespaceError");if(r===$e&&o!=="xmlns"&&s!=="xmlns")throw P("The XMLNS namespace requires the xmlns name or prefix","NamespaceError");return{namespace:r,qualifiedName:o,prefix:s,localName:a}}function hn(t){throw P(`Invalid name: "${t}"`,"InvalidCharacterError")}var gt=0,yt=1,nr=2,gn=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=gn;timeStamp=lo();target=null;currentTarget=null;srcElement=null;bubbles=!1;cancelable=!1;composed=!1;defaultPrevented=!1;cancelBubble=!1;eventPhase=gt;[ke]=[];[Pe]=!1;[Ce]=!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[ke]]}stopPropagation(){this.cancelBubble=!0}stopImmediatePropagation(){this[Pe]=!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 yn(t,e,n){if(t.cancelBubble)return;let o=e[Te]?.get(t.type)?.[n===yt?"capture":"bubble"];if(o)for(let i of[...o]){if(!o.has(i)||i.signal?.aborted)continue;t.eventPhase=t.target===e?nr:n,t.currentTarget=e;let s=i.normalizedListener;try{typeof s=="object"?s.handleEvent(t):s.call(e,t)}catch(a){setTimeout(co,0,a)}if(t[Pe])break}}function co(t){throw t}var Ke=[],bt=new WeakMap;function Et(t,e){let n=bt.get(t);n?n.push(e):bt.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=bt.get(r);if(o){for(;o.length>0;){let i=o.shift();try{i()}catch(s){n||(e=s,n=!0)}}bt.delete(r)}}if(n)throw e}var Nt=[],Ze=[],bn=!1;function ve(t){for(let e of t)Nt.push(e),e[1]&&Ze.push(e[1]);if(!bn){bn=!0;try{let e,n=!1;for(let r=0;r<Nt.length;r++){let[o,i]=Nt[r];i&&Ze.splice(Ze.indexOf(i),1);try{o()}catch(s){n||(e=s,n=!0)}}if(n)throw e}finally{Nt.length=0,Ze.length=0,bn=!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,i=typeof r=="object"&&r.once===!0,s=typeof r=="object"?r.signal:void 0;if(s?.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 m=u[a];if(m||(m=new Map,u[a]=m),m.has(n))return;let h=this,g={type:e,listener:n,capture:o,once:i,normalizedListener:n,signal:s};(i||s)&&(g.normalizedListener=function(...C){if(g.signal?.aborted){Tt(h,g);return}return g.once&&Tt(h,g),typeof g.listener=="object"?g.listener.handleEvent(...C):g.listener.call(this,...C)});let y=this[Te];y||(y=new Map,this[Te]=y);let O=y.get(e);O||(O={},y.set(e,O));let E=O[a];if(E||(E=new Set,O[a]=E),m.set(n,g),E.add(g),s){let N=()=>{Tt(h,g)};g.abortListener=N,s.addEventListener("abort",N,{once:!0})}this[I]?.defaultView[we].addEventListener?.(this,e,n,r)}removeEventListener(e,n,r){return uo.call(this,e,n,r)}dispatchEvent(e){if(e[Ce])throw P("Failed to execute \'dispatchEvent\' on \'EventTarget\': The event is already being dispatched.","InvalidStateError");e[Ce]=!0;try{let n=[],r=this;for(;r!=null;)n.push(r),r=r.parentNode;e.target=this,e.srcElement=this,e[ke]=n;for(let i=n.length;i--;)if(yn(e,n[i],yt),e.cancelBubble)return!e.defaultPrevented;let o=e.bubbles?n:n.slice(0,1);for(let i=0;i<o.length;i++)if(yn(e,o[i],gn),e.cancelBubble)return!e.defaultPrevented;return!e.defaultPrevented}finally{e[Ce]=!1,e.cancelBubble=!1,e[Pe]=!1,e.eventPhase=gt,e.currentTarget=null,e[ke]=[]}}};function uo(t,e,n){if(e==null)return;let r=n===!0||n&&n.capture===!0,o=En(!!r),i=this[Je]?.get(t)?.[o]?.get(e);i&&Tt(this,i)}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 i=o[n];if(!i||i.get(e.listener)!==e)return;i.delete(e.listener),i.size===0&&delete o[n],!o.bubble&&!o.capture&&r?.delete(e.type),e.signal&&e.abortListener&&e.signal.removeEventListener("abort",e.abortListener);let s=t[Te],a=s?.get(e.type);if(!a)return;let c=a[n];c?.delete(e)&&(c.size===0&&delete a[n],!a.bubble&&!a.capture&&s?.delete(e.type),t[I]?.defaultView[we].removeEventListener?.(t,e.type,e.listener,e.capture))}var Q=class extends Array{item(e){return this[e]??null}};var tt=0,or=1,wn=2,xn=3,nt=4,ir=0,sr=1,vt=2,St=3,ar=4,Tn=5,lr=6,cr=7,wt=/^(?:--|-?[A-Za-z_\\u0080-\\u{10FFFF}])[A-Za-z0-9_\\u0080-\\u{10FFFF}-]*$/u;function mo(t,e){let n=1,r=null;for(let o=e;o<t.length;o++){let i=t[o];if(r){i==="\\\\"?o++:i===r&&(r=null);continue}if(i===\'"\'||i==="\'")r=i;else if(i==="(")n++;else if(i===")"&&--n===0)return[t.slice(e,o),o+1]}return[t.slice(e),t.length]}function W(t){throw P(`Invalid or unsupported selector: "${t}"`,"SyntaxError")}function Ot(t,e){let n=typeof e=="string"?rt(e):[{combinator:nt,matchers:e}],r=null,o=t[R];return o&&n[0].matchers.length&&vn(o,n,i=>(r=i,!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&&vn(o,n,i=>{r.push(i)}),r}function rt(t,e=!1,n=!1){let r={combinator:nt,matchers:[]},o=[r],i=/[\\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,s=t.replace(/^[\\t\\n\\f\\r ]+|[\\t\\n\\f\\r ]+$/g,"");s===""&&W(t);let a=0,c;for(;c=i.exec(s);){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=xn:c[1]==="~"?r.combinator=wn: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]){wt.test(u)||W(t);let y=c[5],O=y?.[0];if(c[3]==null&&(O===\'"\'||O==="\'")){let E=c[0].lastIndexOf(y);g=s.slice(c.index+E+1),i.lastIndex=s.length}else y!=null&&!wt.test(y)&&W(t);h=ar}else c[6]?(wt.test(u)||W(t),h=c[6]==="#"?vt:St):c[8]?h=c[9]==null?Tn:lr:c[7]==="*"?h=ir:c[7]&&wt.test(c[7])?h=sr:W(t);c[9]?([g,i.lastIndex]=mo(s,i.lastIndex),u!=="has"&&u!=="not"&&W(t),u==="has"&&e&&W(t),rt(g,e||u==="has",u==="has")):h===Tn&&W(t),r.matchers.push({type:h,name:u,value:g}),a=i.lastIndex}return(a!==s.length||r.matchers.length===0)&&W(t),o}function fo(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,i={type:cr,name:":scope"};if(r.matchers.length===0?(o=r.combinator,r.matchers.push(i)):n.unshift({combinator:tt,matchers:[i]}),n.some(({matchers:c})=>c.length===0))return!1;let s=o===xn||o===wn?t[p]:t[R];if(!s)return!1;let a=!1;return vn(s,n,()=>(a=!0,!1),t),a}function vn(t,e,n,r){let o=[],i=t;for(;i;){if(F(i)){if(et(i,e,r)&&n(i)===!1)return!1;let s=i[R];if(s){let a=i[p];a&&o.push(a),i=s;continue}}i=i[p]??o.pop()??null}return!0}function et(t,e,n){let{combinator:r,matchers:o}=e[e.length-1];if(r===nt){if(!xt(t,o,n))return!1;let a=e.slice(0,-1);return a.length===0||et(t,a,n)}let i=r===or||r===tt?Y:M,s=t[i];if(!s)return!1;if(r===tt||r===wn){for(;s;){if(F(s)&&xt(s,o,n)){let a=e.slice(0,-1);if(a.length===0||et(s,a,n))return!0}s=s[i]}return!1}else{if(r===xn&&!F(s)){for(;s&&!F(s);)s=s[i];if(!s)return!1}if(!F(s)||!xt(s,o,n))return!1;let a=e.slice(0,-1);return a.length===0||et(s,a,n)}}function Nn(t,e){return t.getAttributeNS(null,t.namespaceURI===A?G(e):e)}function xt(t,e,n){if(!t)return!1;if(Array.isArray(e)){for(let s of e)if(xt(t,s,n)===!1)return!1;return!0}let{type:r,name:o,value:i}=e;switch(r){case ir:return o==="*";case sr:return t.namespaceURI===A?t.localName===G(o):t.localName===o;case vt:return Nn(t,"id")===o;case St:let s=Nn(t,"class");return s?pt(s).includes(o):!1;case ar:let a=Nn(t,o);return i==null?a!=null:a===i;case cr:return t===n;case Tn:W(`:${o}`);case lr:switch(o){case"has":return po(t,i||"");case"not":return!fo(t,i||"");default:W(`:${o}(${i})`)}}return!1}function ho(t){return t.nodeType===Me}function ot(t){return K in t}function On(t){return t.nodeType===De}function go(t){return t.nodeType===Le}function F(t){return t.nodeType===X}function Sn(t){return t.nodeType===he}function fr(t){return"appendChild"in t}function At(t){let e=[],n=[t],r=new Set(n),o=new Set,i;for(;n.length>0;){let s=n.pop();if(r.delete(s),o.has(s))continue;let a=[];for(let c of st(s)){if(o.has(c)||(o.add(c),e.push(c),a.push(c),!F(c)))continue;let u=c[re];if(u)for(let h of u)o.has(h)||(o.add(h),e.push(h));let m=c[se];m&&!o.has(m)&&!r.has(m)&&(r.add(m),n.push(m))}i??=a}return{nodes:e,treeNodes:i}}function it(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(On(t))return e.createTextNode(t.data);if(go(t))return e.createComment(t.data);if(ho(t))return ur(t,e);if(F(t)){let n=e[Ie](t[v],t.namespaceURI,t[me],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(Sn(t))return e.createDocumentFragment();{let n=new t.constructor;return n[I]=e,n}}}function _t(t,e,n=t.ownerDocument){if(t.nodeType===xe)throw P("Cannot clone a document node","NotSupportedError");let r=dr(t,n);if(!e||!F(t)&&!Sn(t))return r;let o=new Set([t]),i=[{source:t,destination:r,childIndex:0,cloningContent:!1}];for(;i.length>0;){let s=i[i.length-1],a,c;if(s.cloningContent)if(s.contentSource&&s.contentDestination)a=s.contentSource.childNodes[s.childIndex++],c=s.contentDestination;else{i.pop(),s.appendTo&&s.appendTo.appendChild(s.destination);continue}else if(a=s.source.childNodes[s.childIndex++],c=s.destination,!a){if(s.cloningContent=!0,s.childIndex=0,F(s.source)&&s.source.namespaceURI===A&&s.source.localName==="template"){let m=s.source[se];m&&(o.has(m)&&mr(),o.add(m),s.contentSource=m,s.contentDestination=s.destination.content)}continue}if(!a){i.pop(),s.appendTo&&s.appendTo.appendChild(s.destination);continue}o.has(a)&&mr(),o.add(a);let u=dr(a,n);F(a)||Sn(a)?i.push({source:a,destination:u,appendTo:c,childIndex:0,cloningContent:!1}):c.appendChild(u)}return r}function mr(){throw new Error("Cannot clone a cyclic or repeated node graph")}function kt(t,e){let n=String(e);return n===""?null:Ot(t,[{type:vt,name:n}])}function Pt(t,e){let n=[...new Set(pt(String(e)))];return Rt(t,n.map(r=>({type:St,name:r})))}function Ct(t,e){let n=String(e),r=G(n),o=[];for(let i of It(t))F(i)&&(n==="*"||(i.namespaceURI===A?i[v]===r:i[v]===n))&&o.push(i);return o}function It(t){let e=[],n=[],r=t[R];for(;r;){e.push(r);let o=r[R],i=r[p];o?(i&&n.push(i),r=o):r=i??n.pop()??null}return e}function st(t){let e=It(t);return e.unshift(t),e}var J=class extends ge{nodeType=$n;[v]="";[Y]=null;[pe]=null;[R]=null;[M]=null;[p]=null;[U]=!1;get[D](){return this[I].defaultView[we]}get localName(){return this[v]}get nodeName(){return this[v]}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[M]}set previousSibling(e){}get nextSibling(){return this[p]}set nextSibling(e){}get previousElementSibling(){let e=this[M];for(;e&&e.nodeType!==1;)e=e[M];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))On(n)&&(e+=n.data);return e}set textContent(e){if(ot(this))this.data=e;else if(fr(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 xe:e=e.documentElement;break;case Kn:case he:return null;case Me:e=e.ownerElement;break;default:e=e.parentElement}return null}var ee=Symbol("insertNode"),_n=Symbol("preflightInsertions"),Mt=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 Rn(o=>{le(r,n);let i=this[p];for(;i&&n.includes(i);)i=i[p];let s=An(r,n,o);this.parentNode===r?r[Mt](s,this,o):r[ee](s,i,o)})}before(...e){let n=Se(e),r=this.parentNode;if(r)return Rn(o=>{le(r,n);let i=this[M];for(;i&&n.includes(i);)i=i[M];let s=An(r,n,o);r[ee](s,i?i[p]:r.firstChild,o)})}after(...e){let n=Se(e),r=this.parentNode;if(r)return Rn(o=>{le(r,n);let i=this[p];for(;i&&n.includes(i);)i=i[p];let s=An(r,n,o);r[ee](s,i,o)})}};function Rn(t){return V(()=>{let e=[];try{t(e)}catch(n){try{ve(e)}catch{}throw n}ve(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 P("Cannot insert a node into itself or one of its descendants","HierarchyRequestError");r=r[Y]??r[pe]}}}function An(t,e,n){let r=[];for(let i of e)r.push(at(t,i));if(r.length===1)return r[0];let o=t.ownerDocument.createDocumentFragment();o[_n](r);for(let i of r)o[ee](i,null,n);return o}var Dt,kn=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=bo(n),o=Dt??=new WeakMap,i=o.get(e);i==null&&(i=new Map,o.set(e,i));let s=i.get(this);s==null?kn++:Pn(s,-1),i.set(this,r),Pn(r,1),this.#e.add(e)}disconnect(){let e=Dt;if(e!=null){for(let n of this.#e){let r=e.get(n),o=r?.get(this);o!=null&&(r.delete(this),kn--,Pn(o,-1)),r?.size===0&&e.delete(n)}this.#e.clear(),this.#n.length=0,kn===0&&(Dt=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=Dt;if(e==null)return;let n=new Map,r=t.target;for(;r;){let o=e.get(r);if(o)for(let[i,s]of o){if(r!==t.target&&!s.subtree)continue;let a=!1;if(t.type==="attributes"){if(!s.attributes||s.attributeFilter&&!s.attributeFilter.has(t.attributeName??""))continue;a=s.attributeOldValue}else if(t.type==="characterData"){if(!s.characterData)continue;a=s.characterDataOldValue}else if(!s.childList)continue;n.set(i,n.get(i)===!0||a)}r=r.parentNode}for(let[o,i]of n)o.enqueue({addedNodes:t.addedNodes??new Q,attributeName:t.attributeName??null,attributeNamespace:t.attributeNamespace??null,nextSibling:t.nextSibling??null,oldValue:i?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 bo(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 P("The node is not a child of this node","NotFoundError");let n=this[U]?st(e):void 0,r=e[M],o=e[p],i=Ht(this,e);if(n)for(let s of n)s[U]=!1;this.queueRemovalMutationRecord(this,e,r,o),n&&this.enqueueTreeReactions(n,"disconnectedCallback"),ve(this.collectRemovalHookEffects(e,i))}replaceChild(e,n){return V(()=>this[Mt](e,n))}[Mt](e,n,r){if(le(this,[e]),n.parentNode!==this)throw P("The reference node is not a child of this parent","NotFoundError");let o=n[M],i=n[p],s=this.prepareInsertion(e),a=this[U]?st(n):void 0,c=new Set(s.map(({node:g})=>g)),u=i;for(;u&&c.has(u);)u=u[p];let m=Ht(this,n);if(a){for(let y of a)y[U]=!1;let g=new Set(a);for(let y of s)g.has(y.node)&&(y.shouldDisconnect=!1)}this.commitInsertion(s,u);let h=this[U];return this.queueRemovalMutationRecord(this,n,o,i),this.queueInsertionMutationRecords(s),a&&this.enqueueTreeReactions(a,"disconnectedCallback"),this.enqueueInsertionReactions(s,h),this.performOrCollectHookEffects([...this.collectRemovalHookEffects(n,m),...this.collectInsertionHookEffects(s)],r),n}querySelectorAll(e){return Rt(this,e)}querySelector(e){return Ot(this,e)}[ee](e,n,r){return this.validateInsertion(e,n),this.insertIntoValidated(e,n,r),e}[_n](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 P("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 i=this[U];this.queueInsertionMutationRecords(o),this.enqueueInsertionReactions(o,i),this.performOrCollectHookEffects(this.collectInsertionHookEffects(o),r)}performOrCollectHookEffects(e,n){n?n.push(...e):ve(e)}prepareInsertion(e){let n=[];if(e.nodeType===he){let s=e[R];for(;s;)n.push(s),s=s[p]}else n.push(e);let r=this[U],o=this[I],i=[];for(let s of n){let a=s[U],c=a||r,u,m;if(s[I]===o)c&&(u=st(s));else{let h=At(s);m=h.nodes,c&&(u=h.treeNodes)}i.push({node:s,nodes:u,adoption:m,shouldDisconnect:a})}return i}commitInsertion(e,n){for(let i of e){let s=i.node[Y];if(s){let a=i.node[M],c=i.node[p];i.source={parent:s,index:Ht(s,i.node),previousSibling:a,nextSibling:c}}}for(let i of e){let s=this.attachChild(i.node,n);i.insertIndex=s.index,i.previousSibling=s.previousSibling,i.nextSibling=s.nextSibling}let r=this[I];for(let{adoption:i}of e)i&&it(i,r);let o=this[U];for(let{nodes:i}of e)if(i)for(let s of i)s[U]=o}attachChild(e,n){if(n){let i=n[M];e[p]=n,e[M]=i,i?i[p]=e:this[R]=e,n[M]=e}else{e[p]=null;let i=this[R];if(i){let s;for(;s=i[p];)i=s;i[p]=e,e[M]=i}else this[R]=e,e[M]=null}let r=F(e);e[Y]=this;let o;if(n){if(o=this.childNodes.indexOf(n),this.childNodes.splice(o,0,e),r){let i=n;for(;i&&!F(i);)i=i[p];i?this.children.splice(this.children.indexOf(i),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[M],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[D].removeChild?.(this,e,n)]]}collectInsertionHookEffects(e){let n=[];for(let r of e){let{node:o,source:i}=r;i?.parent.nodeType===X&&!Qe(i.parent)&&n.push([()=>i.parent[D].removeChild?.(i.parent,o,i.index)]),this.nodeType===X&&!Qe(this)&&n.push([()=>this[D].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){br(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,i=e[M],s=e[p],a=Ht(t,e);if(o)for(let u of o)u[U]=!1;it(n.nodes,r),lt&&te({type:"childList",target:t,removedNodes:Gt(e),previousSibling:i,nextSibling:s}),o&&br(o,"disconnectedCallback");let c=[];t.nodeType===X&&!Qe(t)&&c.push([()=>t[D].removeChild?.(t,e,a)]),ve(c)}function Ht(t,e){let n=e[M],r=e[p];n?n[p]=r:t[R]=r,r&&(r[M]=n);let o=t.childNodes.indexOf(e);return t.childNodes.splice(o,1),F(e)&&t.children.splice(t.children.indexOf(e),1),e[Y]=null,e[p]=null,e[M]=null,o}function br(t,e){for(let n of t){let r=n[e];typeof r=="function"&&Et(n,()=>r.call(n))}}function ct(t,e,n,r,o){let{observedAttributes:i}=t.constructor,{attributeChangedCallback:s}=t;s==null||i==null||!i.includes(e)||Et(t,()=>s.call(t,e,n,r,o))}var Ut=class{[R]=null;constructor(e){this[q]=e}getNamedItem(e){let n=String(e),r=this[q][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),i=this[R];for(;i;){if(i.localName===o&&i[S]===r)return i;i=i[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[q][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(i=>i.localName===o&&i[S]===r))}removeNamedItemImmediately(e){let n=this[q],r=this[R],o=null;for(;r!=null;){if(e(r)){o&&(o[p]=r[p]),this[R]===r&&(this[R]=r[p]);let i=r.value;return r[p]=null,r[q]=null,Ge&&te({type:"attributes",target:n,attributeName:r.name,attributeNamespace:r[S],oldValue:i}),n[D].removeAttribute?.(n,r.name,r[S]),ct(n,r.localName,i,null,r[S]),r}o=r,r=r[p]}return null}setNamedItem(e){return V(()=>this.setNamedItemImmediately(e))}setNamedItemImmediately(e){let n=this[q],r=e[q];if(r!=null&&r!==n)throw P("The attribute is already in use by another element.","InUseAttributeError");let o=null,i=this[R],s=null;for(;i;){if(i.localName===e.localName&&i[S]===e[S]){if(i===e)return i;s?s[p]=e:this[R]=e,e[p]=i[p],i[p]=null,o=i;break}s=i,i=i[p]}o==null&&(s?s[p]=e:this[R]=e),e[q]=n,e[I]=n[I],o&&(o[q]=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[D].removeAttribute?.(n,o.name,o[S]),(a||c)&&n[D].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 Oe=class extends J{nodeType=Me;[S]=null;[p]=null;[q]=null;constructor(e,n,r){super(),this[v]=e,this[fe]=n,r&&(this[S]=r)}get nodeName(){return this[v]}set nodeName(e){}get name(){return this[v]}set name(e){}get localName(){if(this[S]==null)return this[v];let e=this[v].indexOf(":");return e<0?this[v]:this[v].slice(e+1)}get prefix(){if(this[S]==null)return null;let e=this[v].indexOf(":");return e<0?null:this[v].slice(0,e)}get value(){return this[fe]}set value(e){let n=String(e),r=this[q];if(!r){this[fe]=n;return}V(()=>{let o=this[fe];this[fe]=n,Ge&&o!==n&&te({type:"attributes",target:r,attributeName:this[v],attributeNamespace:this[S],oldValue:o}),this[D].setAttribute?.(r,this[v],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[q]}get namespaceURI(){return this[S]}get specified(){return!0}};var Eo={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,wo="|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|",xo=/^(?:color|face|size)$/i;function Er(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 Eo[n];let i=Number.parseInt(r??o,r?10:16);try{return String.fromCodePoint(i)}catch{return e}})}function wr(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 vo(t,e){if(wo.includes(`|${t}|`))return!0;if(t!=="font")return!1;for(let n of e.matchAll(Tr))if(xo.test(n[1]))return!0;return!1}function Bt(t,e){let n=e.ownerDocument,r=n.createDocumentFragment(),o=[],i=r;for(let s of t.matchAll(To)){let a=s[1];if(a){let c=s[2],u=G(a),m=o[o.length-1]?.element??e,h=m[S]===Z?Z:A;if(u==="svg")h=Z;else if(h===Z){if(Nr(m))h=A;else if(vo(u,c)){for(;o.length>0;){let O=o[o.length-1];if(O.element[S]!==Z||Nr(O.element))break;o.pop(),i=O.target}h=A}}let g=h===A?u:a,y=n[Ie](g,h,null,g);for(let O of c.matchAll(Tr))y.setAttribute(O[1],Er(O[3]||O[4]||""));if(i.append(y),wr(y)||h!==A&&s[4])continue;o.push({element:y,target:i}),i=h===A&&u==="template"?y.content:y}else if(s[5]){let c=G(s[5]);for(let u=o.length-1;u>=0;u--){let m=o[u],h=G(m.element[v]);if(h===c){i=m.target,o.length=u;break}if(m.element[S]===A&&h==="template")break}}else s[6]?i.append(n.createComment(s[6])):i.append(Er(s[7]))}return r}function Vt(t){return vr([{type:"content",child:t[R]}])}function xr(t){return vr([{type:"opening",node:t}])}function vr(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[v]}`);let i=o[re]?.[R];for(;i;){e.push(` ${i[v]}`);let a=i[fe];a!==""&&(a=String(a).replace(/&/g,"&amp;").replace(/"/g,"&quot;"),e.push(`="${a}"`)),i=i[p]}if(e.push(">"),wr(o))break;let s=o.namespaceURI===A&&o.localName==="template"?o[se]:o;t.push({type:"closing",name:o[v]}),t.push({type:"content",child:s?.[R]??null});break}case De:{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;[me]=null;get namespaceURI(){return this[S]}get prefix(){return this[me]}get localName(){let e=this[me];return e==null?this[v]:this[v].slice(e.length+1)}get nodeName(){return this[S]===A?Qn(this[v]):this[v]}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 Oe("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 Ct(this,e)}get firstElementChild(){return this.children[0]??null}getElementsByClassName(e){return Pt(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);pn(r);let i=this[S]===A?G(r):r,s=this.attributes.getNamedItemNS(null,i);s?s.value=o:this.attributes.setNamedItem(new Oe(i,o))}setAttributeNS(e,n,r){let o=ae(e),i=String(n),s=String(r),a=ht(o,i,"attribute"),c=this.attributes.getNamedItemNS(a.namespace,a.localName);c?c.value=s:this.attributes.setNamedItemNS(new Oe(a.qualifiedName,s,a.namespace))}toggleAttribute(e,n){let r=String(e);pn(r);let o=this[S]===A?G(r):r,i=this.attributes.getNamedItemNS(null,o),s=n===void 0?void 0:!!n;return i==null?s===!1?!1:(this.attributes.setNamedItem(new Oe(o,"")),!0):s===!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 xr(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 be=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[D].setText?.(this,o)}get data(){return this[K]}set data(e){this.setData(e)}};var Ue=class extends be{nodeType=De;[v]="#text"};var Be=class extends be{nodeType=Le;[v]="#comment"};var Ve=class extends oe{nodeType=he;[v]="#document-fragment";[I]=typeof window<"u"?window.document:null;getElementById(e){return kt(this,e)}};var ze=class extends H{get content(){let e=this[se];return e||(e=this.ownerDocument.createDocumentFragment(),e[pe]=this,this[se]=e),e}set content(e){}set innerHTML(e){this.content.replaceChildren(Bt(String(e),this))}get innerHTML(){let e=this[se];return e?Vt(e):""}};var zt=class extends H{};var Ft=class extends H{};var jt=class extends H{};var ut=class extends oe{nodeType=xe;[v]="#document";[U]=!0;constructor(e){super(),this.defaultView=e,this[I]=this,this.documentElement=Yt(new jt,this,"html"),this.body=Yt(new zt,this,"body"),this.head=Yt(new Ft,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 Pt(this,e)}createElement(e){let n=String(e);return tr(n),In(this,G(n))}createElementNS(e,n){let r=ht(e,n,"element");return In(this,r.qualifiedName,r.namespace,r.prefix,r.localName)}[Ie](e,n,r,o){return In(this,e,n,r,o)}createTextNode(e){let n=qt(new Ue(e),this);return this[D].createText?.(n,n.data),n}createComment(e){return qt(new Be(e),this)}createDocumentFragment(){return qt(new Ve,this)}createEvent(){return new B("")}getElementById(e){return kt(this,e)}getElementsByTagName(e){return Ct(this,e)}importNode(e,n){if(e.nodeType===xe)throw P("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):it(n.nodes,this),e})}};function qt(t,e){return Object.defineProperty(t,I,{value:e,writable:!0,enumerable:!1}),t}function In(t,e,n=A,r=null,o=e){let i;if(n===Z)i=new He;else if(n===A&&o==="template")i=new ze;else if(n===A){let s=t.defaultView.customElements.get(o);i=s?new s:new H}else i=new H;return Yt(i,t,e,n,r)}function Yt(t,e,n,r=A,o=null){return qt(t,e),Object.defineProperties(t,{[v]:{value:n},[S]:{value:r},[me]:{value:o}}),e[D].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,Oo=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)&&!Oo.has(t)}function Or(t){return P(`Invalid custom element name: "${t}"`,"SyntaxError")}var en=class{registry=new Map;listenersByName=new Map;define(e,n,r){if(!Sr(e))throw Or(e);if(this.registry.has(e))throw P(`A custom element named "${e}" has already been defined`,"NotSupportedError");if(this.getName(n)!=null)throw P("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 i of o)i(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(Or(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 kr(t){let e={};for(let[n,r]of Object.entries(Object.getOwnPropertyDescriptors(ge.prototype)))n!=="constructor"&&typeof r.value=="function"&&(r.value=Mn(r.value.bind(t)),e[n]=r);return e}function Pr(t){let e={};for(let n of Ro)e[n]={configurable:!0,enumerable:!0,get:Mn(()=>t[n]),set:Mn(r=>{t[n]=r})};return e}function Ao(t){return Object.assign(_r(t),kr(t),Pr(t))}function Mn(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||ko(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 ko(t){return[t.value,t.get,t.set].some(e=>typeof e=="function"&&e[Ar]===!0)}var Re=class extends ge{[D]={};[ft]=[];[we]=Co(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=be;Comment=Be;Text=Ue;Element=H;HTMLElement=Jt;SVGElement=He;HTMLTemplateElement=ze;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)Po(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),i=Object.assign(kr(e),Pr(e));delete o.self,Object.defineProperties(globalThis,o),Rr(globalThis,i),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,i))}static setGlobalThis(e){for(let n in e)e[n]===e&&(e[n]=globalThis);Object.defineProperties(globalThis,Ao(e))}};function Po(t,e){t[ft].push(e(t)??{})}function Co(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 i of t[ft])i[e]?.apply(i,n);let r=t[D];r[e]?.apply(r,n)}var tn=new Re;var Dn="~";var Ee=new WeakMap;function Fe(t){return Ee.get(t)}var Un=new WeakMap,Mo=0;function $(t){let e=Un.get(t);return e==null&&(e=String(Mo++),nn(t,e)),e}function nn(t,e){Un.set(t,e)}var Gn=new WeakMap;function Do(t){return Gn.get(t)}var Hn=new WeakMap;function Lo(t){let e=Hn.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 Bn(t,e,n){let r=Gn.get(t);if(r==null&&(r={},Gn.set(t,r)),r[e]===n)return;r[e]=n;let o=Ee.get(t);o?.mutate([[3,$(t),e,n,1]])}function Ne(t,e,n){let r=Hn.get(t);if(r==null&&(r={},Hn.set(t,r)),r[e]===n)return;n==null?delete r[e]:r[e]=String(n);let o=Ee.get(t);o?.mutate([[3,$(t),e,n,2]])}function je(t,e){if(Ee.get(t)!==e&&(Ee.set(t,e),t.childNodes))for(let r=0;r<t.childNodes.length;r++)je(t.childNodes[r],e)}function rn(t){if(Ee.get(t)!=null&&(Ee.delete(t),t.childNodes))for(let n=0;n<t.childNodes.length;n++)rn(t.childNodes[n])}function qe(t){let{nodeType:e}=t;switch(e){case 1:return{id:$(t),type:e,element:t.localName,properties:Ln(Do(t)),attributes:Ln(Lo(t)),eventListeners:Ln(Ho(t)),children:Array.from(t.childNodes).map(qe)};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 Ln(t){return t?{...t}:void 0}function Vn(t,e,...n){let r=Un.get(t),o=Ee.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[D];Ye.insertChild=(t,e,n)=>{let r=Fe(t);r!=null&&(je(e,r),r.mutate([[0,$(t),qe(e),n]]))};Ye.removeChild=(t,e,n)=>{let r=Fe(t);r!=null&&(rn(e),r.mutate([[1,$(t),n]]))};Ye.setText=(t,e)=>{let n=Fe(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??{},i={...r===void 0?{}:{where:r},...o===void 0?{}:{section:String(o)}};return typeof e=="string"?{type:"navigate",place:e,...i}:typeof n=="string"?{type:"navigate",to:n,...i}:void 0}var Ir=["wheel","drag","pinch"];function Mr(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,i=0,s=new Set,a=new Map,c=[],u=E=>{n?n.postMessage({...E,nonce:r}):c.push(E)},m=E=>{let N=E.data;if(!(!N||typeof N!="object")){if(N.type==="props"){o=N.props;for(let C of s)C(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=E=>{if(n||!t.fromHost(E)||!Mr(E.data)||E.data.protocol!==1)return;let N=E.ports[0];if(N){n=N,r=E.data.nonce,n.onmessage=m,n.start?.(),h();for(let C of c.splice(0))u(C)}};h=t.listen(g),t.ready({graview:"guest-ready",protocol:1});let y,O={get props(){return o},subscribe(E){return s.add(E),()=>s.delete(E)},act(E,N={}){let C=i+=1;return new Promise(L=>{a.set(C,L),u({type:"act",id:C,name:E,args:N})})},navigate(E){let N=on(E);N&&u(N)},size(E){u({type:"size",height:E})},autoSize(E){let N=E??globalThis.document?.documentElement,C=globalThis.ResizeObserver;if(!N||!C||typeof N.getBoundingClientRect!="function")return()=>{};y?.disconnect();let L=new C(()=>O.size(Math.ceil(N.getBoundingClientRect().height)));return L.observe(N),y=L,()=>L.disconnect()},close(){y?.disconnect(),h(),n?.close(),s.clear()}};return{guest:O,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 zr(t=globalThis,e=[],n={}){let r=[],o=[],i=new Set([...Hr,...Ur,...Br,...e,"constructor",Symbol.toStringTag]),s=(x,k)=>{let j=Reflect.getOwnPropertyDescriptor(x,k);return j===void 0||!("value"in j)||j.writable||j.configurable?!1:n.primitivesStay&&typeof k=="symbol"&&(typeof j.value!="object"||j.value===null)&&typeof j.value!="function"?!0:Vr.includes(k)&&typeof j.value=="number"},a=t,c=a.setTimeout,u=a.setInterval,m=a.crypto,h=(x,k)=>function(j,We,...mt){if(typeof j!="function")throw new TypeError(`${k} takes a function: a guest view cannot run code from text`);return x.call(t,j,We,...mt)},g=m?Object.freeze({getRandomValues:x=>m.getRandomValues(x)}):void 0,y=a.document?.defaultView;if(y&&y!==a)for(let x of Reflect.ownKeys(y))typeof x=="symbol"||i.has(x)||Reflect.deleteProperty(y,x)||o.push(`window.${x}`);let O=[];for(let x=t;x&&x!==Object.prototype;x=Object.getPrototypeOf(x))O.push(x);for(let x of O)for(let k of Reflect.ownKeys(x))i.has(k)||(Reflect.deleteProperty(x,k)?r.push(Gr(k)):s(x,k)||o.push(Gr(k)));let E=()=>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 x of N){let k=E();Object.defineProperty(k,"prototype",{value:x,writable:!1,enumerable:!1,configurable:!1}),Reflect.defineProperty(x,"constructor",{value:k,writable:!1,enumerable:!1,configurable:!1})||o.push("Function.prototype.constructor"),x===Function.prototype&&Reflect.defineProperty(t,"Function",{value:k,writable:!0,enumerable:!1,configurable:!0})}let C=(x,k)=>{Reflect.defineProperty(t,x,{value:k,writable:!0,enumerable:!0,configurable:!0})||o.push(x)};C("setTimeout",h(c,"setTimeout")),C("setInterval",h(u,"setInterval")),g&&C("crypto",g);for(let x of O.slice(1))Object.freeze(x);for(let x of Reflect.ownKeys(t)){let k=Reflect.getOwnPropertyDescriptor(t,x);Reflect.defineProperty(t,x,"value"in k?{...k,writable:!1,configurable:!1}:{...k,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(Fe(this)===e||(je(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,qe(o),r])}e.mutate(n)}updateRemoteProperty(e,n){Bn(this,e,n)}callRemoteMethod(e,...n){return Vn(this,e,...n)}};var d={},sn={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"},zn={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:sn,br:sn,wbr:sn,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":sn},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"},an={viewBox:"geometry",preserveAspectRatio:"geometry"},Fr={oneOf:["userSpaceOnUse","objectBoundingBox"]},jr={oneOf:["R","G","B","A"]},ne={...ue,in:"text",result:"text"},qr={gradientUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]},gradientTransform:"geometry",spreadMethod:{oneOf:["pad","reflect","repeat"]},href:"fragment"},Yr={svg:{attributes:{...ue,...an}},g:d,defs:d,symbol:{attributes:{...ue,...an,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",...qr}},radialGradient:{attributes:{cx:"geometry",cy:"geometry",r:"geometry",fx:"geometry",fy:"geometry",fr:"geometry",...qr}},stop:{attributes:{offset:"geometry"}},clipPath:{attributes:{clipPathUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]}}},mask:{attributes:{...ue,maskUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]},maskContentUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]}}},pattern:{attributes:{...ue,...an,patternUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]},patternContentUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]},patternTransform:"geometry",href:"fragment"}},marker:{attributes:{...an,markerWidth:"geometry",markerHeight:"geometry",refX:"geometry",refY:"geometry",orient:"geometry",markerUnits:{oneOf:["strokeWidth","userSpaceOnUse"]}}},a:d,filter:{attributes:{...ue,filterUnits:Fr,primitiveUnits:Fr}},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:jr,yChannelSelector:jr}},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 zo(t){return/^aria-[a-z]+$/.test(t)}function Fo(t){return/^data-[a-z0-9][a-z0-9_.-]*$/.test(t)}var jo=new Map(Object.keys(Yr).map(t=>[t.toLowerCase(),t]));function Xr(t){return jo.get(t.toLowerCase())}function $r(t,e,n){let r=n.toLowerCase(),o=t==="html"?[zn[e]?.attributes,Uo]:[Yr[e]?.attributes,Vo],i=t==="svg"&&r==="xlink:href"?"href":r;for(let s of o)if(s){for(let[a,c]of Object.entries(s))if(a.toLowerCase()===i)return{name:a,kind:c}}if(zo(r)||Fo(r))return{name:r,kind:"text"}}var Kr="~",ln=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),ie=(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=>ie(n,e+1)):Object.fromEntries(Object.entries(t).map(([n,r])=>[n,ie(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 m=e.get(u);return m===void 0&&(m=r+=1,e.set(u,m),t.set(m,{listener:u,count:0})),t.get(m).count+=1,m},i=u=>{let m=t.get(u);m&&(m.count-=1,!(m.count>0)&&(t.delete(u),e.delete(m.listener)))},s=u=>{let m=n.get(u);if(m){n.delete(u);for(let h of m.listeners.values())i(h);for(let h of m.children)s(h)}},a=(u,m,h=0)=>{if(!ln(u)||h>64)return ie(u);let g=typeof u.id=="string"?u.id:void 0,y=m&&g!==void 0&&g!==Kr;y&&s(g);let O={children:[],listeners:new Map};y&&n.set(g,O);let E={};for(let[N,C]of Object.entries(u))N==="children"&&Array.isArray(C)?E[N]=C.map(L=>{let x=a(L,y,h+1);return y&&ln(L)&&typeof L.id=="string"&&O.children.push(L.id),x}):N==="eventListeners"&&ln(C)?E[N]=Object.fromEntries(Object.entries(C).map(([L,x])=>{if(typeof x!="function"||!y)return[L,void 0];let k=o(x);return O.listeners.set(L,k),[L,{listener:k}]})):E[N]=ie(C,h+1);return E},c=u=>{if(!Array.isArray(u))return ie(u);let[m,h]=u,g=typeof h=="string"?n.get(h):void 0;if(m===0){let y=a(u[2],g!==void 0),O=ln(u[2])?u[2].id:void 0;if(g&&typeof O=="string"&&n.has(O)){let E=Number(u[3]);g.children.splice(Number.isInteger(E)&&E>=0&&E<=g.children.length?E:g.children.length,0,O)}return[m,ie(h),y,ie(u[3])]}if(m===1){let y=Number(u[2]);return g&&Number.isInteger(y)&&y>=0&&y<g.children.length&&s(g.children.splice(y,1)[0]),ie(u)}if(m===3&&u[4]===3){let y=String(u[2]),O=u[3],E=g&&typeof O=="function"?o(O):void 0,N=g?.listeners.get(y);return N!==void 0&&i(N),E===void 0?g?.listeners.delete(y):g.listeners.set(y,E),[m,ie(h),y,E===void 0?void 0:{listener:E},3]}return ie(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 cn="graview-view-root",qo=["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(cn)||customElements.define(cn,dt);let e=Event,n=Zr(),r=new Set,o=new Set,i,s=[],a=new Set;for(let l of["closest","matches","dataset"]){let f=()=>{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:f}:{value:f})}let c=document.createElement(cn),u=l=>{let f=b=>{for(let w of Array.from(b.childNodes)){if(w.nodeType!==1)continue;if($(w)===l)return w;let T=f(w);if(T)return T}};return f(c)},m=l=>{let f=u(l.target);if(!f)return;let b=new e(l.event,{bubbles:!0}),w={};for(let T of qo)l[T]!==void 0&&(w[T]=l[T]);for(let T of Object.keys(w))Object.defineProperty(b,T,{value:w[T],enumerable:!0});f.dispatchEvent(b);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 z=f;z&&z!==c;z=z.parentNode)if(_.has(z)){T.listener(Object.freeze({type:l.event,target:f,element:z,...w}));break}}},h=l=>{if(l.type==="dom-event"&&typeof l.target=="string")return m(l);if(l.type==="notice")return t.warn(l.text);if(l.type!=="props")return;i=l.props;let f=t.now();for(let T of r)try{T(l.props)}catch(_){t.threw(_)}let b=t.now()-f,w=l.push;typeof w=="number"&&t.microtask(()=>t.microtask(()=>t.send({type:"pushed",push:w,ms:b})))},g;c.connect({mutate(l){g||(g=[],t.microtask(()=>{let f=g??[];g=void 0,t.send({type:"render",records:n.encode(f)})})),g.push(...l)},call:()=>{}});let y=l=>l.nodeType===1?l.getAttribute("data-key")??l.getAttribute("id"):null,O=(l,f)=>l.nodeType===f.nodeType&&(l.nodeType!==1||l.localName===f.localName&&l.namespaceURI===f.namespaceURI&&y(l)===y(f));function E(l,f){let b=Array.from(f.childNodes),w=0;for(let T of b){let _=l.childNodes[w]??null;if(_&&O(_,T)){N(_,T),w+=1;continue}if(y(T)!==null){let de=Array.from(l.childNodes).slice(w+1).find(Xe=>O(Xe,T));if(de){l.insertBefore(de,_),N(de,T),w+=1;continue}}l.insertBefore(T,_),w+=1}for(;l.childNodes.length>w;)l.removeChild(l.lastChild)}function N(l,f){if(l.nodeType!==1){l.data!==f.data&&(l.data=f.data);return}let b=l,w=f,T=C(b);for(let _ of b.getAttributeNames())w.hasAttribute(_)||(b.removeAttribute(_),T&&Ne(b,_,void 0));for(let _ of w.getAttributeNames()){let z=w.getAttribute(_);b.getAttribute(_)!==z&&b.setAttribute(_,z),T&&Ne(b,_,z)}E(b,w)}let C=l=>l.localName.includes("-");function L(l){for(let f of Array.from(l.childNodes)){if(f.nodeType!==1)continue;let b=f;if(C(b))for(let w of b.getAttributeNames())Ne(b,w,b.getAttribute(w)??void 0);L(b)}}function x(l,f,b){for(let w of Array.from(l.childNodes)){if(w.nodeType!==1)continue;let T=w,_=T.localName,z=f||_.toLowerCase()==="svg",de=z?Xr(_):Object.prototype.hasOwnProperty.call(zn,_.toLowerCase())?_.toLowerCase():void 0;if(!de){b.add(`<${_}>`);continue}for(let Xe of T.getAttributeNames())(!$r(z?"svg":"html",de,Xe)||!z&&Wr[de]?.includes(Xe.toLowerCase()))&&b.add(`${de} ${Xe}`);x(T,z,b)}}function k(l){let f=document.createElement("div"),b=Array.isArray(l)?l:[l];for(let T of b)if(T!=null)if(typeof T=="string"||Qr(T)){let _=document.createElement("div");_.innerHTML=typeof T=="string"?T:T.html,f.append(...Array.from(_.childNodes))}else f.append(T);let w=new Set;x(f,!1,w),s=[...w],s.length>0&&t.warn(`The host will not draw: ${s.join(", ")}`),L(f),E(c,f)}let j=[],We=new Set(Ir),mt="[]",un=!1,Yn=()=>{un||(un=!0,t.microtask(()=>{un=!1;let l=[...new Map([...o].filter(b=>We.has(b.type)).map(b=>[`${b.type} ${b.selector}`,{event:b.type,selector:b.selector}])).entries()].sort(([b],[w])=>b<w?-1:b>w?1:0).map(([,b])=>b),f=JSON.stringify(l);f!==mt&&(mt=f,t.send({type:"gestures",bound:l}))}))},Wn="[]",dn=!1,Xn=()=>{dn||(dn=!0,t.microtask(()=>{dn=!1;let l=[...new Set([...o].filter(b=>b.type==="click"&&typeof b.selector=="string").map(b=>b.selector))].sort().slice(0,200),f=JSON.stringify(l);f!==Wn&&(Wn=f,t.send({type:"clicks",selectors:l}))}))};return{view:Object.freeze({get props(){return i},onProps(l){return r.add(l),i&&l(i),()=>void r.delete(l)},render:k,style(l){typeof l!="string"||j.includes(l)||(j.push(l),t.send({type:"style",sheets:[...j]}))},on(l,f,b){let w={type:l,selector:f,listener:b};return o.add(w),typeof l=="string"&&!a.has(l)&&(a.add(l),t.send({type:"hears",events:[l]})),We.has(l)&&Yn(),l==="click"&&Xn(),()=>{o.delete(w),We.has(l)&&Yn(),l==="click"&&Xn()}},act:(l,f={})=>t.act(l,f),navigate(l){if(typeof l=="string")return t.navigate(l);let f=on(l);f&&t.send(f)},html(l,...f){return Wo(l.reduce((b,w,T)=>b+w+(T<f.length?Jr(f[T]):""),""))},get refused(){return s},get hardening(){return t.hardening()}}),hear:h,find:l=>{try{let f=c.querySelectorAll(l)[0];return f?$(f):void 0}catch{return}},listened:l=>{let f=new Set;for(let b of o)if(b.type===l)try{for(let w of Array.from(c.querySelectorAll(b.selector))){let T=$(w);T&&f.add(T)}}catch{}return[...f]}}}var qn={removed:[],stuck:[],sealed:!1,worker:!1},Fn=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=>Fn.send(t),act:(t,e)=>Fn.guest.act(t,e),navigate:t=>Fn.guest.navigate(t),microtask:_e.microtask,now:_e.now,threw:t=>console.error(t),warn:t=>console.warn(t),hardening:()=>qn}),Xo=to.view;Object.defineProperty(globalThis,"graview",{value:Xo,enumerable:!0,configurable:!0,writable:!1});var jn="WorkerGlobalScope"in globalThis?zr(globalThis,["graview"]):qn;qn=jn;if(jn.stuck.length>0)throw new Error(`The view\'s worker could not be hardened: ${jn.stuck.join(", ")} would not go.`);})();\n';export{e as VIEW_RUNTIME};
@@ -1 +0,0 @@
1
- function o(e){return e.toLowerCase().replace(/[^\p{L}\p{N}]+/gu,"-").replace(/^-|-$/g,"")}function a(e,t={}){let[s="/",c=""]=e.split("#")[0].split("?"),n=new URLSearchParams(c);t.filter&&n.set("filter",t.filter);let r=n.toString(),i=t.section?o(t.section):"";return`${s}${r?`?${r}`:""}${i?`#${i}`:""}`}export{o as a,a as b};
@@ -1 +0,0 @@
1
- import{b as f}from"./chunk.YOT7ESDG.js";import"./chunk.66IKLMYX.js";import"./chunk.C634A6ZC.js";import"./chunk.N5WDQAIM.js";import{l as g}from"./chunk.ZQHCNFJK.js";import"./chunk.Q355UPFG.js";import"./chunk.PXQVXBNG.js";import"./chunk.7LZ6JDJA.js";import"./chunk.KRFRREEW.js";import"./chunk.VOOOIECX.js";import"./chunk.GIW657OR.js";import"./chunk.EVEHSENK.js";import"./chunk.SBLYBRDU.js";import"./chunk.2LNSENPV.js";import"./chunk.WS7LAT4Z.js";import"./chunk.5X22RKB3.js";import"./chunk.XZUHFXME.js";import"./chunk.GQNSNJTJ.js";import"./chunk.SJALH7IX.js";import"./chunk.E6RNMWFN.js";import"./chunk.IA5ZBMRD.js";import"./chunk.VN7I7XIO.js";import"./chunk.REH6RXNH.js";import"./chunk.MBP7VDYM.js";import"./chunk.BDTT4ENI.js";import"./chunk.BJUUSIQY.js";import"./chunk.5POG3G2C.js";import"./chunk.2XSIJH5J.js";import"./chunk.XOZU4OFA.js";import"./chunk.LA2DMHZC.js";import"./chunk.MB7LKKUD.js";import"./chunk.WVUJXDXZ.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.GZHZLJBF.js";import"./chunk.Y7H5O2SL.js";import"./chunk.OJGHDWI6.js";import"./chunk.6HZY5NRX.js";import"./chunk.UO544PZH.js";import"./chunk.4STDIZVI.js";import"./chunk.HZHNM2KI.js";import"./chunk.AVFOTYZR.js";import"./chunk.HOQMD6WQ.js";import{G as b,T as h}from"./chunk.N7T7VB77.js";import"./chunk.SDO3U72B.js";import{Zd as n}from"./chunk.F7PIW2EM.js";import"./chunk.FQLNBIQ5.js";import{b as t}from"./chunk.AJZBJBMO.js";var m=t(b(),1),a=t(h(),1);function P({store:c,auto:y,brand:i,views:u,presence:s,steering:r,overview:o,scope:d,titleLevel:w=2,quickAsk:l,props:e}){let v=(0,m.useMemo)(()=>g({scope:`.${d}`}),[d]);return(0,a.jsxs)("div",{"data-embed-content":"",style:y?{flex:"0 0 auto",background:"var(--graview-ground)"}:{flex:"1 1 auto",minHeight:0,overflow:"auto",background:"var(--graview-ground)"},children:[(0,a.jsx)("style",{children:v}),(0,a.jsx)("div",{"data-embed-measure":"",style:{display:"flow-root"},children:(0,a.jsx)(f,{context:{store:c,embedded:!0,...e.bar!==!1?{barAbove:!0}:{},...o?{overview:o}:{},titleLevel:w,views:u,settings:e.app.settings??[],app:e.app,...s?{presence:s}:{},...i?{brand:i}:{},...e.locale?{locale:e.locale}:{},...e.timeZone?{timeZone:e.timeZone}:{},...e.principal?{principal:e.principal}:{},...e.seats?{seats:e.seats}:{},...e.people?{people:e.people}:{},...e.subscriptions?{subscriptions:e.subscriptions}:{},dismissals:e.dismissals,whileAway:e.whileAway,...e.signIn?{signIn:e.signIn}:{},...l!==void 0?{quickAsk:l}:{}},...e.pages?{registry:e.pages}:{},...r?{steering:r}:{},...e.routing==="address"?n(e.basePath)===""?{}:{basename:n(e.basePath)}:{initialPath:e.path??"/"},...e.path!==void 0?{path:e.path}:{},...e.hrefOf?{hrefOf:e.hrefOf}:e.routing==="address"?{}:{hrefOf:!1},...e.onNavigate?{onNavigate:e.onNavigate}:{}})})]})}export{P as PagesContent};
@@ -1 +0,0 @@
1
- import{a as ne,b as H,c as te}from"./chunk.3RW677X6.js";import{B as Q,F as X,H as Y,K as ee,g as G,i as q,m as z,p as W,q as j,u as Z,v as _,x as U,z as J}from"./chunk.AVFOTYZR.js";import{a as M}from"./chunk.HOQMD6WQ.js";import{G as ae,Ha as $,Qa as K,T,ba as N,da as I,ua as D}from"./chunk.N7T7VB77.js";import{Kc as O}from"./chunk.F7PIW2EM.js";import{b as B}from"./chunk.AJZBJBMO.js";var o=B(ae(),1);var y=B(T(),1),fe=e=>typeof e=="object"?e:{};function he({rootRef:e,firstLook:r,app:n}){let t=(0,o.useCallback)(()=>e.current,[e]);return r?(0,y.jsx)(ee,{firstLook:r,root:t,app:n}):null}function ge(e,r,n){let{app:t}=e,a=(0,o.useMemo)(()=>{let i=X(r(t.schema,t.viewSpecs),t),d=n?ie(i,n):i,s=e.views?e.views(t.schema,d):i,c=s===d?i:D(i,s);return Y(c,t.schema,J(e.brand??t.brand,t.schema)),n?n.register(c):c},[e.views,t.schema,t.viewSpecs,t.lenses,t.pages,t.home,n]);return $(a,e.keptViews)}function ie(e,r){let n={...e,register(t,a,i,d){return d?.name!==r.name&&e.register(t,a,i,d),n},...e.home?{home:(t,a)=>(r.home||e.home(t,a),n)}:{}};return n}var F=e=>e?e.getBoundingClientRect().height:0;function be(e,r,n){let t=(0,o.useRef)(n);t.current=n;let a=n!==void 0;(0,o.useLayoutEffect)(()=>{let i=e.current;if(!i||!a)return;let d=()=>{let u=[...i.children],g=u.find(b=>b.hasAttribute("data-graview-app-bar")),m=u.find(b=>b.hasAttribute("data-embed-content")),h=m?.querySelector("[data-embed-measure]")??null,l=u.find(b=>b.hasAttribute("data-graview-place-line"));return{strip:g,line:l,content:m,measure:h}},s=-1,c=()=>{let{strip:u,line:g,content:m,measure:h}=d(),l=Math.ceil(F(u)+F(g)+F(h||m));l!==s&&(s=l,t.current?.(l))};if(c(),typeof ResizeObserver>"u")return;let p=new ResizeObserver(c),S=()=>{p.disconnect();let{strip:u,line:g,content:m,measure:h}=d();for(let l of[i,u,g,m,h])l&&p.observe(l)};S();let v=new MutationObserver(()=>{S(),c()});return v.observe(i,{childList:!0}),()=>{p.disconnect(),v.disconnect()}},[e,r,a])}var we=480,se=0;function Se(e){let{app:r,seed:n,scheme:t="auto",brand:a=r.brand,fonts:i=!0,height:d="100%",label:s}=e,c=(0,o.useRef)(null);K(c);let p=d==="viewport"?"100dvh":d,S=q(typeof p=="string"&&/vh\b/.test(p)),v=(0,o.useMemo)(()=>`graview-embed-${++se}`,[]),u=(0,o.useMemo)(()=>e.store??e.remote?.store??H(r,n),[e.store,e.remote,r,n]),g=e.presence??e.remote?.presence,m=e.hostContext?.theme,h=te(t==="auto"&&m===void 0,a?.scheme),l=t==="auto"?m??h:t,b=(0,o.useMemo)(()=>M(l,a,{scope:`.${v}`}),[l,a,v]);G(e.favicon?O(a):void 0),(0,o.useEffect)(()=>{if(!i||typeof document>"u")return;let E=ne(a);if(!E||document.querySelector(`link[href="${E}"]`))return;let f=document.createElement("link");f.rel="stylesheet",f.href=E,document.head.appendChild(f)},[a,i]);let x=(0,o.useRef)(void 0);(0,o.useLayoutEffect)(()=>{let E=c.current,f=x.current;if(x.current=s,!E||!s)return;let oe=w=>{let R=w.getAttribute("aria-label")??"",A=f&&f!==s?R.startsWith(`${f} \xB7 `)?R.slice(f.length+3):R===f?"":R:R;A===s&&(w.getAttribute("role")==="region"||w.tagName==="SECTION"&&!w.hasAttribute("role"))&&w.setAttribute("role","group");let C=A.startsWith(`${s} \xB7 `)||A===s?A:A?`${s} \xB7 ${A}`:s;C!==R&&w.setAttribute("aria-label",C)},P=()=>E.querySelectorAll("aside, nav, main, header, footer, section[aria-label]:not([role]), [role=region], [role=complementary], [role=navigation], [role=search]").forEach(w=>{w.hasAttribute("data-graview-named-by-lens")||oe(w)});P();let V=new MutationObserver(P);return V.observe(E,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["aria-label"]}),()=>V.disconnect()},[s]);let k=S?`${p}`.replace(/([\d.]+)[sdl]?vh\b/g,(E,f)=>`${+f*S/100}px`):p;return{rootRef:c,scope:v,css:b,scheme:l,store:u,presence:g,brand:a,auto:d==="auto",height:k}}function ve({rootRef:e,board:r}){let n=(0,o.useCallback)(()=>e.current?.querySelector("[data-embed-content]")??e.current,[e]);return(0,y.jsx)(z,{board:r,anchor:n})}function Ee(e,r,n){return{brand:n,locale:e.locale,timeZone:e.timeZone,principal:e.principal,seats:e.seats,presence:r,typing:e.remote?.typing,people:e.people,memory:e.memory,presenceTtlMs:e.presenceTtlMs,onKeepLens:e.onKeepLens,ai:e.ai,files:e.files,resolveApp:e.resolveApp,history:e.history,linkedRecords:e.linkedRecords,subscriptions:e.subscriptions,dismissals:e.dismissals,whileAway:e.whileAway,keptViews:e.keptViews,onExport:e.onExport,signIn:e.signIn,menuSections:e.menuSections,app:e.app}}function Re({name:e,heading:r,faces:n,at:t,without:a,home:i,reach:d,standing:s,hostActions:c,barActions:p,keeping:S,onFind:v,switch:u,named:g=!0}){let{brand:m,store:h,principal:l,views:b}=N();I();let x=a?.has("places")?[]:W({store:h,principal:l,views:b}),k=U();return(0,y.jsx)(Z,{brand:m,name:e,named:g,description:m?.subtitle,heading:r,faces:n,home:i,places:x,current:t===null?null:j(x,t),reach:d,onFind:v,...u?{switch:u}:{},...n||t===null?{scenePlaces:k}:{},...p?{actions:p}:{},tools:(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Q,{clean:s}),(0,y.jsx)(_,{...c?{hostActions:c}:{},...S?{keeping:S}:{}})]})})}var Ae=e=>e===!1?2:Math.min(e+1,6);function xe(e){let[r,n]=(0,o.useState)(e),t=(0,o.useRef)(void 0),a=(0,o.useRef)(void 0),i=(0,o.useMemo)(()=>({go:t,at:n,pending:a}),[]),d=(0,o.useCallback)(s=>{if(t.current){t.current(s);return}a.current=s,n(s)},[]);return{at:r,setAt:n,steering:i,steer:d}}function de(e){let r=typeof e=="object"&&e!==null?e.name:void 0;return{name:typeof r=="string"&&r.length>0?r:typeof e=="object"?"Error":typeof e}}var L=()=>typeof performance<"u"?performance.now():Date.now();function Fe(e,r){let n=(0,o.useRef)({onError:e,face:r});return n.current={onError:e,face:r},(0,o.useCallback)((t,a)=>n.current.onError?.(de(t),{module:a.module,face:n.current.face}),[])}function ke(e,r){let n=(0,o.useRef)(null);n.current===null&&(n.current=L());let t=(0,o.useRef)({onReady:e,face:r});t.current={onReady:e,face:r};let a=(0,o.useRef)(!1);return(0,o.useCallback)(i=>{a.current||(a.current=!0,t.current.onReady?.({ms:Math.max(0,L()-(n.current??L())),face:i}))},[])}var re=class extends o.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(r,n){console.error(`[graview] ${this.props.module} threw while rendering`,r,n.componentStack),this.props.report(r,{module:this.props.module})}render(){return this.state.failed?(0,y.jsxs)("div",{role:"alert","data-graview-face-error":this.props.module,...this.props.content?{"data-embed-content":""}:{},style:this.props.content?{flex:"1 1 auto",display:"grid",alignContent:"center",justifyItems:"center",gap:8,padding:24,background:"var(--graview-ground)",color:"var(--graview-ink)",fontSize:"0.9375rem"}:{display:"inline-flex",alignItems:"center",gap:6,fontSize:"0.8125rem",color:"var(--graview-ink-muted)"},children:[(0,y.jsx)("span",{children:this.props.content?"This part of the app could not draw.":"Could not draw."}),(0,y.jsx)("button",{type:"button",onClick:()=>this.setState({failed:!1}),style:{padding:"3px 11px",fontSize:"0.8125rem"},children:"Try again"})]}):this.props.children}};export{fe as a,he as b,ge as c,be as d,we as e,Se as f,ve as g,Ee as h,Re as i,Ae as j,xe as k,Fe as l,ke as m,re as n};
@@ -1 +0,0 @@
1
- var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{Cb as L,N as H,P as N,Wc as j}from"./chunk.F7PIW2EM.js";var D=()=>(__graviewPreload(import.meta.url,["./chunk.VS6NT5C4.js","./chunk.PXQVXBNG.js","./chunk.B3WVCSW5.js","./chunk.F7PIW2EM.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.MNRTA2CB.js"));function W(n,l,c){let i=new Map;for(let u of c?.kinds??[])for(let o of n.nodesOfKind(u))l.has(o.id)||i.set(o.id,o);let t=new Set([...l,...i.keys()]),p=new Set(c?.edges??[]),k=new Set;if(p.size>0&&l.size>0){for(let u of l)for(let o of n.outEdges(u))p.has(o.kind)&&i.has(o.to)&&k.add(o.to);for(let u of i.keys())n.outEdges(u).some(o=>p.has(o.kind)&&l.has(o.to))&&k.add(u)}let S=new Map([...[...i].filter(([u])=>k.has(u)),...[...i].filter(([u])=>!k.has(u))]),h=[];if(p.size>0)for(let u of t)for(let o of n.outEdges(u))p.has(o.kind)&&t.has(o.to)&&h.push({kind:o.kind,from:o.from,to:o.to});return{nodes:[...S.values()],edges:h}}function E(n,l,c){let i=[];return()=>{let t=c();for(;i.length>0&&i[0]<=t-l;)i.shift();return i.length>=n?!1:(i.push(t),!0)}}function C(n={},l=Date.now){return{act:E(n.acts??30,n.actWindowMs??6e4,l),message:E(n.messages??120,n.messageWindowMs??1e3,l)}}var A=n=>typeof n=="object"&&n!==null&&!Array.isArray(n);function K(n,l){let c=l.flatMap(t=>A(t)&&typeof t.kind=="string"?[t.kind]:[]),i=j(n,c);return Object.keys(i).length>0?{choices:i}:{}}function J(n,l){let c=structuredClone(l),i=n.schema.tryDefinition(c.kind),t=c.label;return{...c,label:i?.label?i.label(c):typeof t=="string"&&t.length>0?t:c.id}}function I(n){let l=n.limiter??C(n.limits,n.now),c=n.limits?.maxHeight??4e3,i=`view:${n.view}`,t={applied:0,refused:0,dropped:0},p=()=>n.store.seenBy(n.principal),k=e=>J(n.store,e),S=()=>{if(n.props)return n.props();let e=p(),d=e.graph,r=n.input?.()??{},y=r.node?d.getNode(r.node.id):void 0,a=r.nodes?.flatMap(s=>{let m=d.getNode(s.id);return m?[m]:[]}),g=new Set([...y?[y.id]:[],...(a??[]).map(s=>s.id)]),f=[];for(let s of g)for(let m of d.outEdges(s))g.has(m.to)&&f.push({kind:m.kind,from:m.from,to:m.to});let G=W(d,g,n.reads),b=new Set(f.map(s=>`${s.kind} ${s.from} ${s.to}`));for(let s of G.edges)b.has(`${s.kind} ${s.from} ${s.to}`)||f.push(s);let v=G.nodes.length>0?[...a??[],...G.nodes]:a,M=s=>s?.filter(m=>d.has(m)),$=e.permittedMutations(n.principal).map(s=>({name:s.name,title:s.title??s.name,...s.description!==void 0?{description:s.description}:{},...s.subject?{subject:{kinds:s.subject.kinds,arg:s.subject.arg}}:{}}));return{view:n.view,...y?{node:k(y)}:{},...v?{nodes:v.map(k)}:{},edges:f,...r.label!==void 0?{label:r.label}:{},...r.fidelity!==void 0?{fidelity:r.fidelity}:{},...r.cardinality!==void 0?{cardinality:r.cardinality}:{},...r.mode!==void 0?{mode:r.mode}:{},...r.selected!==void 0?{selected:r.selected}:{},...r.implicated?{implicated:M(r.implicated)}:{},...r.flagged?{flagged:M(r.flagged)}:{},acts:$,...n.theme?{theme:n.theme()}:{},locale:H(),timeZone:N(),...K(n.store.schema,[...y?[y]:[],...v??[]]),...n.placesShown?{places:n.placesShown().map(({as:s,title:m,kind:F})=>({as:s,title:m,kind:F}))}:{}}},h=!1,u=0,o=new Set,x=()=>{if(h)return;u+=1,o.add(u),o.size>100&&o.delete(o.values().next().value);let e=S();n.send({type:"props",props:n.hand?n.hand(e):e,push:u})},R=!1,O=n.store.subscribe(()=>{R||(R=!0,queueMicrotask(()=>{R=!1,x()}))}),w=(e,d)=>(t.refused+=1,{ok:!1,reason:e,message:d}),z=(e,d,r)=>P([{name:e,args:d}],r),P=(e,d,r)=>{if(!l.act())return w("rate-limited","Too many acts asked for at once; this one was not applied.");let y=[];for(let{name:a,args:g}of e){if(d){let f=d(a,g);if(!f.ok)return w(f.reason,f.message);a=f.name,g=f.args}if(!n.store.allMutations().some(f=>f.name===a))return w("unknown-act","There is no act by that name here.");y.push({name:a,args:g})}try{let a=n.store.applyAll(y,{author:n.principal,via:i,...r?{intent:r}:{}});return t.applied+=1,{ok:!0,intent:a.intent}}catch(a){return a instanceof L?w("refused",a.refusal.message):w("failed","The act could not be applied.")}},T=(e,d,r)=>{let y=Array.isArray(r);if(typeof d!="string"||(y?r.length===0||r.length>100||!r.every(A):!A(r)))return t.refused+=1,n.send({type:"answer",id:e,ok:!1,reason:"malformed",message:"An act is asked for by name, with its arguments as an object, or a list of 1 to 100 of them for several as one change."});let a=P((y?r:[r]).map(g=>({name:d,args:g})),n.judgeAct);n.send(a.ok?{type:"answer",id:e,ok:!0,intent:a.intent}:{type:"answer",id:e,ok:!1,reason:a.reason,message:a.message})};return{receive(e){if(h)return;if(!(A(e)&&e.nonce===n.nonce&&e.type==="pushed"&&typeof e.push=="number"&&o.delete(e.push))&&!l.message()){t.dropped+=1,n.onFlood?.();return}if(!A(e)||e.nonce!==n.nonce){t.dropped+=1;return}if(e.type==="act"&&(typeof e.id=="string"||typeof e.id=="number"))return T(e.id,e.name,e.args);if(e.type==="navigate"&&n.onArrive&&(typeof e.place=="string"||typeof e.to=="string")){let r={...e.where!==void 0?{where:e.where}:{},...e.section!==void 0?{section:e.section}:{}},y=typeof e.place=="string"?{place:e.place,...r}:{record:e.to,...r},a=n.onArrive;D().then(({judgeDestination:g,listsOf:f})=>{if(h)return;let G=new Set([...n.store.kindsKeptFrom(n.principal),...n.store.modules.disabledKinds]),b=g(y,{sees:v=>p().graph.has(v),places:n.placesShown?.()??[],lists:f(n.store.schema,G),schema:n.store.schema});b.ok?a(b.arrival):(t.dropped+=1,n.onLost?.(b.says))});return}if(e.type==="navigate"&&typeof e.place=="string"){n.places?.().includes(e.place)?n.onNavigatePlace?.(e.place):t.dropped+=1;return}if(e.type==="navigate"&&typeof e.to=="string"){p().graph.has(e.to)?n.onNavigate?.(e.to):t.dropped+=1;return}if(e.type==="render"&&Array.isArray(e.records)&&n.onRender){n.onRender(e.records);return}if(e.type==="style"&&Array.isArray(e.sheets)&&e.sheets.every(r=>typeof r=="string")&&n.onStyle){n.onStyle(e.sheets);return}if(e.type==="hears"&&Array.isArray(e.events)&&n.onHears){n.onHears(e.events.filter(r=>typeof r=="string").slice(0,20));return}if(e.type==="clicks"&&Array.isArray(e.selectors)){n.onClicks?.(e.selectors.filter(r=>typeof r=="string"&&r.length<=500).slice(0,200));return}if(e.type==="gestures"&&Array.isArray(e.bound)&&n.onGestures){n.onGestures(e.bound.slice(0,32));return}if(e.type==="pushed"&&typeof e.push=="number"&&typeof e.ms=="number"&&n.onPushed){n.onPushed(e.push,e.ms);return}if(e.type==="size"&&typeof e.height=="number"&&Number.isFinite(e.height)){n.onSize?.(Math.max(0,Math.min(c,Math.round(e.height))));return}t.dropped+=1},push:x,pressed(e){return h?{ok:!1,reason:"refused",message:"The view has gone."}:e.ok?z(e.name,e.args):(t.refused+=1,e)},change(e,d){return h?{ok:!1,reason:"refused",message:"The view has gone."}:P(e,void 0,d)},get stats(){return t},dispose(){h=!0,O()}}}export{W as a,C as b,K as c,J as d,I as e};
@@ -1,13 +0,0 @@
1
- import{a as I,b as j,c as C,d as F,e as P,f as H,g as B,h as L,j as M}from"./chunk.UDCDK7XJ.js";import"./chunk.AJZBJBMO.js";var Z=0,ee=1,te=2,ne=3,U=1,re=2,G=3,oe=1,ie=3,ae=8,V="~",D=i=>typeof i=="object"&&i!==null&&!Array.isArray(i),W=new Set(["input","select","textarea","option"]),se=new Set(["value","checked","selected"]),$=["aria-label","aria-labelledby","title"],de=i=>$.some(n=>(i.getAttribute(n)??"").trim()!=="");function z(i,n){let u=i.ownerDocument??i,h=n.maxNodes??5e3,y=[],g=new Map,E=new WeakMap,k={dom:i,name:"div",namespace:"html",children:[],id:V};g.set(V,k);let R=0,T=!1,O=new WeakMap,A=new Map,d=new Map,t=e=>{y.push(e),y.length>200&&y.shift(),n.onRefused?.(e)},f=()=>({dom:u.createComment(""),children:[],refused:!0}),x=(e,l)=>{if(e.namespace==="html"&&e.name&&W.has(e.name))return e.dom;if(l?.namespace==="html"&&l.name==="textarea")return l.dom},v=(e,l)=>{let s=e.dom,a=O.get(s)??s.getAttribute("role");if(a===null||!a.split(/\s+/).some(o=>I.includes(o.toLowerCase())))return void O.delete(s);if(de(s)){O.delete(s),s.getAttribute("role")!==a&&s.setAttribute("role",a);return}O.set(s,a),s.removeAttribute("role"),l&&t({reason:"value",element:e.name,name:"role"})},b=()=>{if(d.size===0)return;let e=new Set,l=s=>{for(let a of s.children){if(a.refused||a.text)continue;let o=a.dom.getAttribute("id");o&&e.add(o),l(a)}};l(k);for(let[s,a]of d){if(s.id===void 0||g.get(s.id)!==s){d.delete(s);continue}let o=s.dom;for(let[r,m]of a){let c=m.value.split(/\s+/).filter(w=>w!==""),p=c.filter(w=>!e.has(w));if(c.length>0&&p.length===0){if(m.drawn)continue;m.drawn=!0,o.setAttribute(r,m.value),v(s,!1)}else m.drawn&&(m.drawn=!1,o.removeAttribute(r),t({reason:"reference",element:s.name,name:r,ids:p.length>0?p:c}),v(s,!0))}}},S=(e,l,s,a=!0)=>{let o=e.dom;if(s!=null&&typeof s!="string")return t({reason:"value",element:e.name,name:l});let r=M(e.namespace,e.name,l,s??null,n);if("refused"in r){let w=M(e.namespace,e.name,l,null,n);return"refused"in w||o.removeAttribute(w.name),!("refused"in w)&&w.name==="role"&&O.delete(o),t(r.refused)}for(let w of r.dropped??[])t(w);let m=e.namespace==="html"&&se.has(r.name)&&W.has(e.name),c=o,p=m?r.name==="value"?c.value:r.name==="checked"?c.checked:c.selected:void 0;if(r.name==="role"&&O.delete(o),j.includes(r.name)){let w=d.get(e)??new Map;r.value===null?w.delete(r.name):w.set(r.name,{value:r.value,drawn:!0}),w.size>0?d.set(e,w):d.delete(e)}r.value===null?o.removeAttribute(r.name):o.setAttribute(r.name,r.value),a&&(r.name==="role"||$.includes(r.name))&&v(e,r.name==="role"),n.onAttribute?.(o,r.name),m&&(r.name==="value"&&"value"in c?(c.value=r.value??"",p!==c.value&&n.onFieldSet?.(o)):r.name==="checked"&&"checked"in c?(c.checked=r.value!==null,p!==c.checked&&n.onFieldSet?.(o)):r.name==="selected"&&"selected"in c&&(c.selected=r.value!==null,p!==c.selected&&n.onFieldSet?.(o.parentElement?.closest("select")??o)))},N=e=>{if(!e.refused){R-=1,e.id!==void 0&&g.delete(e.id);for(let l of e.children)N(l)}},_=(e,l)=>{if(!D(e)||typeof e.id!="string"||g.has(e.id))return t({reason:"record"}),f();if(R>=h)return t({reason:"budget"}),T||(T=!0,n.onOverBudget?.()),f();let s=e.id;if(e.type===ae)return f();if(e.type===ie){if(L(l.namespace,l.name))return t({reason:"child",element:l.name}),f();let c=u.createTextNode(String(e.data??"").slice(0,C)),p={dom:c,children:[],text:!0,id:s,parent:l};return g.set(s,p),E.set(c,s),R+=1,p}if(e.type!==oe)return t({reason:"record"}),f();let a=String(e.element);if(L(l.namespace,l.name))return t({reason:"child",element:a}),f();let o=B(a,l.namespace);if("refused"in o)return t(o.refused),f();let r=u.createElementNS(o.namespace==="svg"?P:F,o.name);o.as&&r.setAttribute("data-graview-as",o.as),o.namespace==="html"&&o.name==="img"&&r.setAttribute("referrerpolicy","no-referrer"),o.namespace==="html"&&o.name==="a"&&(r.setAttribute("target","_blank"),r.setAttribute("rel","noopener noreferrer"),r.setAttribute("referrerpolicy","no-referrer"));let m={dom:r,name:o.name,namespace:o.namespace,children:[],id:s,parent:l};if(g.set(s,m),E.set(r,s),R+=1,D(e.attributes)){for(let[c,p]of Object.entries(e.attributes))S(m,c,p,!1);v(m,!0)}if(n.decorate?.(r,o.name,o.namespace),D(e.properties))for(let c of Object.keys(e.properties))t({reason:"attribute",element:o.name,name:c});if(D(e.eventListeners))for(let c of Object.keys(e.eventListeners))e.eventListeners[c]!=null&&t({reason:"attribute",element:o.name,name:`on${c}`});if(Array.isArray(e.children))for(let c of e.children){let p=_(c,m);m.children.push(p),r.appendChild(p.dom)}return m},Q=e=>{if(!Array.isArray(e))return t({reason:"record"});let[l,s]=e,a=typeof s=="string"?g.get(s):void 0;if(!a)return t({reason:"record"});switch(l){case Z:{if(a.text)return t({reason:"record"});let o=Number(e[3]),r=Number.isInteger(o)&&o>=0&&o<=a.children.length?o:a.children.length,m=e[2],c=D(m)&&typeof m.id=="string"?A.get(m.id):void 0,p;c&&c.parent?.namespace===a.namespace&&!L(a.namespace,a.name)?(A.delete(m.id),c.parent=a,p=c):p=_(m,a),a.dom.insertBefore(p.dom,a.children[r]?.dom??null),a.children.splice(r,0,p),a.namespace==="html"&&a.name==="textarea"&&n.onFieldSet?.(a.dom);return}case ee:{let o=Number(e[2]),r=a.children[o];if(!r)return t({reason:"record"});a.children.splice(o,1),r.dom.parentNode?.removeChild(r.dom),r.id!==void 0&&!r.refused?A.set(r.id,r):N(r);return}case te:{if(!a.text)return t({reason:"record"});a.dom.data=String(e[2]??"").slice(0,C);let o=x(a,a.parent);o&&n.onFieldSet?.(o);return}case ne:{if(a===k||a.text)return t({reason:"record"});let o=String(e[2]),r=e[4]??U;return r===re?S(a,o,e[3]):t(r===U||r===G?{reason:"attribute",element:a.name,name:r===G?`on${o}`:o}:{reason:"record"})}default:return t({reason:"record"})}};return{apply(e,l){if(!Array.isArray(e))return t({reason:"record"}),!0;try{for(let s=0;s<e.length;s+=1){if(l&&s%32===0&&l())return!1;Q(e[s])}return!0}finally{for(let s of A.values())N(s);A.clear(),b()}},get refused(){return y},get size(){return R},idOf:e=>E.get(e),elementOf(e){let l=g.get(e);return l&&!l.text&&l!==k?l.dom:void 0},dispose(){for(let e of k.children)N(e);for(k.children.length=0;i.firstChild;)i.removeChild(i.firstChild)}}}var K=["https:","mailto:","tel:"];function X(i){if(!(typeof i!="string"||i.length>2e3||/[\s<>"]/.test(i.trim())||i.trim()!==i))try{let n=new URL(i);return!K.includes(n.protocol)||n.protocol==="https:"&&(n.hostname===""||n.username!==""||n.password!=="")?void 0:n.href}catch{return}}function le(i){let n=new Set,u=h=>{if(typeof h!="string"||!/^(https|mailto|tel):/i.test(h))return;let y=X(h);y&&n.add(y)};for(let h of[...i?.node?[i.node]:[],...i?.nodes??[]])for(let[y,g]of Object.entries(h))y==="id"||y==="kind"||(Array.isArray(g)?g.forEach(u):u(g));return n}function Y(i){return(i??[]).flatMap(n=>{try{let u=new URL(n);return u.protocol==="https:"&&u.hostname!==""&&u.username===""&&u.password===""?[u.origin]:[]}catch{return[]}})}function ce(i,n){let u=X(i);if(u&&(n.handed.has(u)||u.startsWith("https:")&&Y(n.origins).includes(new URL(u).origin)))return u}function ue(i,n){let u=i.length>120?`${i.slice(0,119)}\u2026`:i,h="";try{h=new URL(i).protocol}catch{h=""}if(!K.includes(h))return`The link "${u}" was not drawn: a view links only to an https:, mailto: or tel: address.`;let y=Y(n);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 fe=`
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
- @layer graview-motion { @media (prefers-reduced-motion: reduce) { [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; } } }
13
- `,J=4,me=16;function pe(i){let n=i.ownerDocument.defaultView?.getComputedStyle(i);if(!n)return J;let u=Number.parseFloat(n.outlineWidth)||0,h=Math.max(0,Number.parseFloat(n.outlineOffset)||0);return Math.min(me,Math.max(J,Math.ceil(u+h)))}var ge=new Set(["Enter"," ","Escape","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End"]),q=["click","input","change","keydown"];function ke(i,n){let u=i.ownerDocument,h=u.createElement("style");h.setAttribute("data-graview-region",""),h.textContent=fe;let y=u.createElement("style");y.setAttribute("data-graview-view-style","");let g=u.createElement("div");g.setAttribute("data-graview-view-root",""),i.append(h,y,g);let E=z(g,{origin:n.origin,...n.asset?{asset:n.asset}:{},...n.imageOrigins?{imageOrigins:n.imageOrigins}:{},...n.picture?{picture:n.picture}:{},...n.link?{link:n.link}:{},...n.onRefused?{onRefused:n.onRefused}:{},...n.maxNodes!==void 0?{maxNodes:n.maxNodes}:{},...n.onOverBudget?{onOverBudget:n.onOverBudget}:{},decorate:(d,t,f)=>{f==="html"&&t==="button"&&d.setAttribute("type","button"),f==="html"&&(t==="input"||t==="textarea"||t==="select")&&d.setAttribute("autocomplete","off"),n.decorate?.(d,t,f)},...n.onFieldSet?{onFieldSet:n.onFieldSet}:{},...n.onAttribute?{onAttribute:n.onAttribute}:{}}),k=[],R="",T=d=>{for(let t=d.composedPath()[0];t&&t!==g&&t!==i;t=t.parentNode)if(t.nodeType===1&&E.idOf(t)!==void 0)return t},O=d=>{let t=T(d);if(!t||d.type==="keydown"&&!ge.has(d.key))return;let f=n.before?.(d,t,g);if(f===!1)return;let x=t,v=t.namespaceURI==="http://www.w3.org/1999/xhtml"&&["input","select","textarea"].includes(t.localName);n.send({type:"dom-event",target:E.idOf(t),event:d.type,...v?{value:String(x.value??"")}:{},...v&&(x.type==="checkbox"||x.type==="radio")?{checked:x.checked}:{},...d.type==="keydown"?{key:d.key}:{},...f??{}});let b=d.type==="keydown"?d.key:void 0;(b==="Enter"||b===" ")&&t.hasAttribute("data-graview-press")&&d.composedPath()[0]===t&&(d.preventDefault(),n.send({type:"dom-event",target:E.idOf(t),event:"click"}))};for(let d of q)i.addEventListener(d,O);i.addEventListener("toggle",O,!0);let A=typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("overflow-clip-margin","4px");return i.addEventListener("focusin",d=>{let t=d.composedPath()[0],f=i.host;if(!t||t.nodeType!==1||!g.contains(t))return;let x=pe(t);if(A){f.style.setProperty("--graview-ring-reach",`${x}px`);return}let v=f.getBoundingClientRect(),b=t.getBoundingClientRect(),S=x*(f.offsetWidth>0?v.width/f.offsetWidth:1),N=b.left-v.left<S||v.right-b.right<S||b.top-v.top<S||v.bottom-b.bottom<S;t.toggleAttribute("data-graview-ring-inside",N)}),{apply(d,t){let f=i.activeElement,x=f?E.idOf(f):void 0,v=E.apply(d,t);if(x!==void 0&&i.activeElement!==f){let b=E.elementOf(x);b?.isConnected&&typeof b.focus=="function"&&b.focus({preventScroll:!0})}return v},style(d){let t=H(d);k.length=0;for(let f of t.refused)k.push({reason:"css",name:"stylesheet",css:f}),k.length>200&&k.shift();R=t.css,y.textContent=R},renderer:E,get refused(){return[...E.refused,...k]},get css(){return R},dispose(){for(let d of q)i.removeEventListener(d,O);i.removeEventListener("toggle",O,!0),E.dispose(),i.replaceChildren()}}}export{fe as REGION_CSS,ke as createOpenDrawing,le as handedLinks,ce as judgeLink,ue as linkRefusedWords,pe as ringReach};
@@ -1 +0,0 @@
1
- var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{a as j,b as ge,e as ye,f as fe,g as he}from"./chunk.MBP7VDYM.js";import{b as q}from"./chunk.BDTT4ENI.js";import{c as me}from"./chunk.MBU7UH6J.js";import{n as V}from"./chunk.Y7H5O2SL.js";import{b as R,c as de,d as pe,j as ue,k as ce}from"./chunk.UO544PZH.js";import{d as se,e as le}from"./chunk.4STDIZVI.js";import{b as G,f as oe}from"./chunk.HZHNM2KI.js";import{Fa as ae,G as we,Ga as ie,S as te,T as ne,ba as F,ca as re,ea as K}from"./chunk.N7T7VB77.js";import{a as ee}from"./chunk.SDO3U72B.js";import{da as $,ma as Q,vb as Z}from"./chunk.F7PIW2EM.js";import{b as _}from"./chunk.AJZBJBMO.js";var d=_(we(),1);var Se=ie(ee(()=>(__graviewPreload(import.meta.url,["./chunk.REH6RXNH.js","./chunk.MBP7VDYM.js","./chunk.BDTT4ENI.js","./chunk.WVUJXDXZ.js","./chunk.MBU7UH6J.js","./chunk.2QFKNTAZ.js","./chunk.BI6DS3PZ.js","./chunk.PGA5TUSN.js","./chunk.7R727IKU.js","./chunk.LQAT7FA6.js","./chunk.GZHZLJBF.js","./chunk.Y7H5O2SL.js","./chunk.OJGHDWI6.js","./chunk.6HZY5NRX.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.DHY7KOBV.js")))),be=Se.part((i,n)=>i.drawAppLink(n),{quiet:!0});var e=_(ne(),1);function X({nodeId:i,field:n,value:l,stored:s=l,said:g}){let{fields:c,commit:o}=V(i),t=c.find(a=>a.field===n),{store:y,principal:P}=F(),b=y.graph.getNode(i)?.kind,w=y.schema.definitions.find(a=>a.kind===b),f=Q(w,n),L=f.toLowerCase(),r=g??`${f.charAt(0).toUpperCase()}${f.slice(1)}: ${l}`,[S,B]=(0,d.useState)(!1),p=t?.shape.type==="number"?t.shape.amount:void 0,T=p&&s!==""&&Number.isFinite(Number(s))?de(Number(s),p):s,[k,W]=(0,d.useState)(T),x=(0,d.useRef)(null),h=(0,d.useRef)(null),z=(0,d.useRef)(!1),[Y,U]=(0,d.useState)(void 0),C=a=>{z.current=a,B(!1)};(0,d.useEffect)(()=>W(T),[T,S]);let J=t?.shape.type==="date";if((0,d.useEffect)(()=>{if(J)return ae(()=>void he())},[J]),(0,d.useEffect)(()=>{S?x.current?.focus():z.current&&(z.current=!1,h.current?.focus())},[S]),!t)return(0,e.jsx)("span",{"data-graview-field":n,"data-graview-readonly":"",title:`Read-only \u2014 nothing this app declares changes the ${L}`,style:{color:"var(--graview-ink)",cursor:"default",overflowWrap:"anywhere"},children:l});if(!S){let a=(0,e.jsx)("button",{ref:h,type:"button","data-graview-field":n,"data-graview-editable":t.mutation,...r===l?{}:{"aria-label":r},title:`${t.title} \u2014 changes the ${L}, and can be undone`,onClick:()=>{U(void 0),B(!0)},style:{all:"unset",cursor:"text",display:"inline-flex",alignItems:"flex-end",minHeight:24,minWidth:24,maxWidth:"100%",overflowWrap:"anywhere",paddingBottom:1,borderBottom:"1px dashed var(--graview-edge-bright)",color:"var(--graview-ink)"},children:l});return Y?(0,e.jsxs)(e.Fragment,{children:[a,(0,e.jsx)("span",{role:"status","data-graview-refused":n,style:{marginLeft:6,fontSize:"0.75rem",color:"var(--graview-ink-muted)"},children:Y})]}):a}let N=(a,{left:m=!1}={})=>{if(C(!m),a!==s){if(a===""||a===void 0||a===null){if(s==="")return;t.clearable?o(t,null):U(`${f.charAt(0).toUpperCase()}${f.slice(1)} can't be empty; it keeps ${l}.`);return}t.shape.type==="date"&&typeof a=="string"&&ve(a)||o(t,a)}},ve=a=>{if(t.shape.type!=="date")return!1;let m=c.filter(M=>M.shape.type==="date"&&M.takesValue),E=ce(m.map(M=>M.field),w?.fieldRoles??{}),I=E?.start===n?m.find(M=>M.field===E.end):void 0,v=y.graph.getNode(i)?.[E?.end??""];if(!I||typeof v!="string")return!1;let A=ue(s===""?void 0:s,a,v,{time:t.shape.time===!0,instant:t.shape.instant===!0});if(A===void 0||A===v)return!1;let H=t.call(a),O=I.call(A);return y.applyAll(H.name===O.name?[{name:H.name,args:{...H.args,...O.args}}]:[H,O],{author:P}),!0};if(!t.takesValue){let a=[t,...t.alternatives];return(0,e.jsx)("span",{role:"group","aria-label":`Change ${$(n).toLowerCase()}`,"data-graview-field":n,style:{display:"inline-flex",gap:6,alignItems:"center",flexWrap:"wrap"},onKeyDown:m=>{m.key==="Escape"&&C(!0)},children:a.map((m,E)=>(0,e.jsx)("button",{type:"button",ref:E===0?x:void 0,"data-graview-act":m.mutation,onClick:()=>{C(!0),o(m,void 0)},onBlur:I=>{let u=I.relatedTarget;(!u||!I.currentTarget.parentElement?.contains(u))&&C(!1)},style:{padding:"2px 9px",fontSize:"0.8125rem",borderRadius:999},children:m.title},m.mutation))})}if(t.shape.type==="several"&&t.shape.of.type==="choice"){let a=t.shape.of.options,m=y.graph.getNode(i),E=Array.isArray(m?.[n])?m[n].map(String):[],I=u=>{let v=a.filter(A=>u.includes(A));if(v.length>0)return o(t,v);t.clearable?o(t,null):U(`${f.charAt(0).toUpperCase()}${f.slice(1)} can't be empty; it keeps ${l}.`)};return(0,e.jsxs)("fieldset",{"data-graview-field":n,"data-graview-choices":n,style:{display:"inline-flex",flexWrap:"wrap",gap:"4px 12px",margin:0,padding:"2px 6px",border:"1px solid var(--graview-edge-bright)",borderRadius:6,maxWidth:"100%"},onKeyDown:u=>{u.key==="Escape"&&C(!0)},onBlur:u=>{let v=u.relatedTarget;(!v||!u.currentTarget.contains(v))&&C(!1)},children:[(0,e.jsx)("legend",{style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)"},children:$(n)}),a.map((u,v)=>(0,e.jsxs)("label",{style:{display:"inline-flex",alignItems:"center",gap:4,minHeight:24,cursor:"pointer"},children:[(0,e.jsx)("input",{ref:v===0?x:void 0,type:"checkbox",value:u,checked:E.includes(u),onChange:A=>I(A.target.checked?[...E,u]:E.filter(H=>H!==u))}),G(w,n,u)]},u))]})}return(0,e.jsxs)("form",{style:{display:"inline-flex",flexWrap:"wrap",gap:4,maxWidth:"100%"},onSubmit:a=>{a.preventDefault(),N(ke(t,k))},children:[t.shape.type==="choice"?(0,e.jsx)("select",{ref:x,"aria-label":$(n),"data-graview-field":n,value:k,onChange:a=>N(a.target.value),onBlur:()=>C(!1),style:{font:"inherit",fontSize:"inherit"},children:t.shape.options.map(a=>(0,e.jsx)("option",{value:a,children:G(w,n,a)},a))}):t.shape.type==="date"?(0,e.jsx)(fe,{inputRef:x,label:$(n),value:k===""?void 0:k,time:t.shape.time===!0,instant:t.shape.instant===!0,partial:t.shape.partial===!0,onChange:a=>W(a??""),onLeave:a=>N(a,{left:!0}),onCancel:()=>C(!0),autoSelect:!0,boxStyle:{fontSize:"inherit",minHeight:24,padding:"0 3px"}}):(0,e.jsxs)(e.Fragment,{children:[p&&R(p).prefix?(0,e.jsx)("span",{"aria-hidden":"true",children:R(p).prefix}):null,(0,e.jsx)("input",{ref:x,"aria-label":p?`${$(n)}, ${R(p).hint}`:$(n),"data-graview-field":n,...p?{inputMode:"decimal",placeholder:R(p).placeholder,"data-graview-amount":p.format??"unit"}:{},type:p?"text":t.shape.type==="number"&&!t.shape.duration?"number":"text",...t.shape.type==="number"&&t.shape.duration?{placeholder:"1h 30m"}:{},...t.shape.type==="text"&&t.shape.holds==="phone"?{inputMode:"tel",autoComplete:"tel"}:{},...t.shape.type==="number"&&t.shape.min!==void 0&&!p?{min:t.shape.min}:{},...t.shape.type==="number"&&t.shape.max!==void 0&&!p?{max:t.shape.max}:{},...t.shape.type==="number"&&t.shape.step!==void 0&&!p?{step:t.shape.step}:{},value:k,onChange:a=>W(a.target.value),onBlur:()=>N(ke(t,k),{left:!0}),onKeyDown:a=>{a.key==="Escape"&&C(!0)},style:{font:"inherit",fontSize:"inherit",width:`min(${Math.max(6,k.length+1)}ch, 100%)`,maxWidth:"100%",minWidth:0,boxSizing:"border-box",minHeight:24,display:"inline-flex",alignItems:"center",padding:"0 3px"}}),p&&R(p).suffix?(0,e.jsx)("span",{"aria-hidden":"true",children:R(p).suffix}):null]}),t.open.length>0?(0,e.jsxs)("span",{style:{fontSize:"0.75rem",color:"var(--graview-ink-faint)"},children:["also needs ",t.open.map(a=>a.name).join(", ")]}):null]})}function ke(i,n){return n.trim()===""?"":i.shape.type==="number"&&i.shape.amount?pe(n,i.shape.amount):i.shape.type==="number"?i.shape.duration?oe(n)??n:Number(n):i.shape.type==="text"&&i.shape.holds?n.trim():n}function xe({href:i,field:n,value:l,stored:s,nodeId:g}){let c=i.startsWith("tel:"),o=(t,y)=>(0,e.jsx)("a",{href:i,"data-graview-link":n,...y?{"aria-label":y}:{},...c?{}:{target:"_blank",rel:"noopener noreferrer"},style:{display:"inline-flex",alignItems:"center",minHeight:24,minWidth:24,maxWidth:"100%",overflowWrap:"anywhere",color:"var(--graview-accent)"},children:t});return g===void 0?o(l):(0,e.jsxs)("span",{style:{display:"inline-flex",flexWrap:"wrap",alignItems:"center",gap:"0 10px",maxWidth:"100%"},children:[(0,e.jsx)(X,{nodeId:g,field:n,value:l,...s===void 0?{}:{stored:s}}),o(c?"Call":"Map",c?`Call ${l}`:`Open ${l} in maps`)]})}function Ke({id:i,hide:n=[],limit:l=10,labels:s={},shown:g=[]}){let{store:c}=F(),o=K(i);if(!o)return null;let t=c.schema.tryDefinition(o.kind),y=se(o,t,{limit:l,said:g}).filter(b=>!n.includes(b.key)),P=me(t).length>0;return y.length===0&&!P?null:(0,e.jsxs)("div",{"data-graview-fields":o.id,style:{display:"grid",gap:14,alignContent:"start",minWidth:0,fontSize:"0.875rem"},children:[le(t,y).map((b,w)=>{let f=(0,e.jsx)("dl",{style:{margin:0,display:"grid",gridTemplateColumns:"auto 1fr",gap:"5px 16px",alignContent:"start",minWidth:0},children:b.fields.map(r=>r.files?(0,e.jsx)(j,{as:"field",nodeId:o.id,field:r.key,label:s[r.key]??r.label,files:r.files,labelStyle:D,style:{marginTop:6}},r.key):r.long?(0,e.jsx)(Ee,{nodeId:o.id,field:r.key,label:s[r.key]??r.label,value:r.value,markdown:r.markdown,labelStyle:D,style:{gridColumn:"1 / -1",marginTop:6}},r.key):(0,e.jsxs)("div",{style:{display:"contents"},children:[(0,e.jsx)("dt",{style:{...D,whiteSpace:"nowrap"},children:s[r.key]??r.label}),(0,e.jsxs)("dd",{style:{margin:0,minWidth:0},children:[r.linked?(0,e.jsx)(ge,{relation:r.linked.relation,refs:r.linked.refs,nodeId:o.id,field:r.key}):r.app?(0,e.jsx)(be,{address:r.app,as:"record",nodeId:o.id,field:r.key}):r.href?(0,e.jsx)(xe,{href:r.href,field:r.key,value:r.value,stored:r.stored,nodeId:o.id}):(0,e.jsx)(X,{nodeId:o.id,field:r.key,value:r.value,stored:r.stored}),r.repeats?(0,e.jsx)(ye,{nodeId:o.id,field:r.key,start:o[r.key],value:o[`${r.key}Repeat`],label:`${s[r.key]??r.label} repeats`}):null]})]},r.key))});if(!b.title)return(0,e.jsx)("div",{children:f},w);let L=`graview-field-group-${o.id}-${w}`;return(0,e.jsxs)("div",{role:"group","aria-labelledby":L,style:{display:"grid",gap:6,minWidth:0},children:[(0,e.jsx)("p",{id:L,"data-graview-field-group":b.title,style:Ce,children:b.title}),f]},w)}),P?(0,e.jsx)(j,{as:"unfilled",nodeId:o.id,skip:n,labels:s,labelStyle:D}):null]})}var D={color:"var(--graview-ink-faint)",fontSize:"0.8125rem"},Ce={margin:0,fontSize:"0.75rem",letterSpacing:"0.06em",textTransform:"uppercase",color:"var(--graview-ink-muted)",fontWeight:560};function Ee(i){return re()?(0,e.jsx)(Te,{...i}):(0,e.jsx)(Le,{...i})}function Le({field:i,label:n,value:l,labelStyle:s,valueStyle:g,style:c,markdown:o}){return(0,e.jsxs)("div",{"data-graview-long":i,style:{display:"grid",gap:6,minWidth:0,...c},children:[(0,e.jsx)("dt",{style:s,children:n}),(0,e.jsx)("dd",{style:{margin:0,minWidth:0,...g},children:(0,e.jsx)("div",{"data-graview-field":i,children:(0,e.jsx)(q,{text:l,markdown:o})})})]})}function Te({nodeId:i,field:n,label:l,value:s,labelStyle:g,valueStyle:c,style:o,markdown:t}){let{fields:y,commit:P}=V(i),{store:b,principal:w}=F(),f=(0,d.useContext)(te)!==null&&b.collaborative(i,n),L=y.find(h=>h.field===n&&h.takesValue),r=L&&(!f||b.permits({name:Z,args:{node:i,field:n,at:0,remove:0,insert:""}},w).ok)?L:void 0,[S,B]=(0,d.useState)(!1),p=(0,d.useRef)(null),T=(0,d.useRef)(!1);(0,d.useEffect)(()=>{!S&&T.current&&(T.current=!1,p.current?.focus())},[S]);let k=h=>{T.current=h,B(!1)},W=l.toLowerCase(),x=(0,e.jsx)(q,{text:s,markdown:t});return(0,e.jsxs)("div",{"data-graview-long":n,style:{display:"grid",gap:6,minWidth:0,...o},children:[(0,e.jsxs)("dt",{style:{display:"flex",alignItems:"baseline",gap:10,...g},children:[(0,e.jsx)("span",{children:l}),r&&!S?(0,e.jsx)("button",{ref:p,type:"button","data-graview-editable":r.mutation,"aria-label":`Edit the ${W}`,title:`${r.title} \u2014 changes the ${W}, and can be undone`,onClick:()=>B(!0),style:Ie,children:"Edit"}):null]}),(0,e.jsx)("dd",{style:{margin:0,minWidth:0,...c},children:S&&r?(0,e.jsx)(d.Suspense,{fallback:x,children:(0,e.jsx)(We,{nodeId:i,field:n,label:l,value:s,...t?{markdown:!0}:{},onCancel:()=>k(!0),onDone:h=>k(!h),onSave:(h,z)=>{k(!z),h!==s&&P(r,h)}})}):(0,e.jsx)("div",{"data-graview-field":n,...r?{}:{"data-graview-readonly":"",title:`Read-only \u2014 nothing this app declares changes the ${W}`},...r?{onClick:()=>B(!0)}:{},style:{cursor:r?"text":"default",minWidth:0},children:x})})]})}var We=(0,d.lazy)(()=>(__graviewPreload(import.meta.url,["./chunk.BDTT4ENI.js","./chunk.AVFOTYZR.js","./chunk.HOQMD6WQ.js","./chunk.N7T7VB77.js","./chunk.SDO3U72B.js","./chunk.F7PIW2EM.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.ZC3FRCJQ.js"))),Ie={all:"unset",cursor:"pointer",fontSize:"0.75rem",letterSpacing:"normal",textTransform:"none",color:"var(--graview-accent)",borderBottom:"1px dashed currentColor",minHeight:24,minWidth:24,display:"inline-flex",alignItems:"flex-end"};function Ge({nodeId:i,children:n}){let{fields:l}=V(i),s=K(i);if(!s)return(0,e.jsx)(e.Fragment,{children:n});let g=l.find(c=>{let o=s[c.field];return typeof o=="string"&&o===n});return g?(0,e.jsx)(X,{nodeId:i,field:g.field,value:n,said:n}):(0,e.jsx)(e.Fragment,{children:n})}export{be as a,X as b,xe as c,Ke as d,Ee as e,Ge as f};
@@ -1 +0,0 @@
1
- import"./chunk.GZHZLJBF.js";import{n as D}from"./chunk.Y7H5O2SL.js";import"./chunk.OJGHDWI6.js";import"./chunk.6HZY5NRX.js";import"./chunk.UO544PZH.js";import{a as $}from"./chunk.4STDIZVI.js";import"./chunk.HZHNM2KI.js";import"./chunk.AVFOTYZR.js";import"./chunk.HOQMD6WQ.js";import{G as P,T as C}from"./chunk.N7T7VB77.js";import"./chunk.SDO3U72B.js";import{Pa as w,Ra as R,Va as c,_ as S}from"./chunk.F7PIW2EM.js";import"./chunk.FQLNBIQ5.js";import{b as k}from"./chunk.AJZBJBMO.js";var m=k(P(),1);var e=k(C(),1),W=[["","Does not repeat"],["day","Daily"],["week","Weekly"],["month","Monthly"],["year","Yearly"]],E=r=>`${r}${r%100>=11&&r%100<=13?"th":["th","st","nd","rd"][r%10]??"th"}`,v={display:"flex",flexWrap:"wrap",gap:"6px 12px",alignItems:"center"};function N({value:r,onChange:d,start:p,label:s,name:l="repeat"}){let f=(0,m.useId)(),a=c(r)?r:void 0,i=typeof p=="string"&&/^\d{4}-\d{2}-\d{2}/.test(p)?p:void 0,u=i?w[new Date(`${i.slice(0,10)}T00:00:00Z`).getUTCDay()]:void 0,o=t=>{let n={...a??{every:"week"},...t};for(let b of Object.keys(n))n[b]===void 0&&delete n[b];d(n)},y=a?.every??"week",g=a?.on??(u?[u]:[]);return(0,e.jsxs)("fieldset",{"data-graview-part":"field","data-graview-field":"repeat","data-graview-repeat":l,style:{display:"grid",gap:8,border:"1px solid var(--graview-edge)",borderRadius:8,padding:"8px 12px",margin:0,minWidth:0},children:[(0,e.jsx)("legend",{"data-graview-part":"label",style:{padding:"0 4px"},children:s}),(0,e.jsxs)("div",{style:v,children:[(0,e.jsx)("label",{htmlFor:`${f}-every`,children:"Repeats"}),(0,e.jsx)("select",{id:`${f}-every`,name:`${l}.every`,value:a?.every??"",onChange:t=>{let n=t.target.value;d(n===""?void 0:{...a?.interval?{interval:a.interval}:{},...a?.until?{until:a.until}:{},every:n})},"data-graview-part":"control",children:W.map(([t,n])=>(0,e.jsx)("option",{value:t,children:n},t))}),a?(0,e.jsxs)("label",{style:v,children:["every",(0,e.jsx)("input",{type:"number",min:1,max:99,name:`${l}.interval`,"aria-label":`Every how many ${y}s`,value:a.interval??1,onChange:t=>o({interval:Number(t.target.value)>1?Math.min(99,Math.round(Number(t.target.value))):void 0}),style:{width:"4.5em"},"data-graview-part":"control"}),y,(a.interval??1)>1?"s":""]}):null]}),a?.every==="week"?(0,e.jsxs)("div",{role:"group","aria-label":"On",style:v,children:[(0,e.jsx)("span",{"aria-hidden":"true",children:"On"}),w.map((t,n)=>(0,e.jsxs)("label",{style:{display:"inline-flex",gap:4,alignItems:"center",minHeight:24},children:[(0,e.jsx)("input",{type:"checkbox",name:`${l}.on`,value:t,checked:g.includes(t),onChange:b=>{let h=w.filter(x=>x===t?b.target.checked:g.includes(x));o({on:h.length===0||h.length===1&&h[0]===u?void 0:h})}}),S(n,"short")]},t))]}):null,a?.every==="month"?(0,e.jsxs)("label",{style:v,children:["On",(0,e.jsxs)("select",{name:`${l}.on`,value:a.on?.[0]===-1?"last":"",onChange:t=>o({on:t.target.value==="last"?[-1]:void 0}),"data-graview-part":"control",children:[(0,e.jsx)("option",{value:"",children:i?`the ${E(Number(i.slice(8,10)))}`:"the same day"}),(0,e.jsx)("option",{value:"last",children:"the last day"})]})]}):null,a?(0,e.jsxs)("label",{style:v,children:["Until",(0,e.jsx)("input",{type:"date",name:`${l}.until`,value:a.until??"",onChange:t=>o({until:t.target.value||void 0}),"data-graview-part":"control"})]}):null,(0,e.jsx)("p",{"aria-live":"polite","data-graview-repeat-said":"",style:{margin:0,color:"var(--graview-ink-dim)",fontSize:"0.8125rem"},children:a?$(i??"",a):"Does not repeat"})]})}function K({nodeId:r,field:d,start:p,value:s,label:l}){let{fields:f,commit:a}=D(r),i=f.find(t=>t.field===R(d)&&t.takesValue&&t.open.length===0),[u,o]=(0,m.useState)(!1),[y,g]=(0,m.useState)(c(s)?s:void 0);return i?u?(0,e.jsxs)("form",{onSubmit:t=>{t.preventDefault(),o(!1),a(i,y??null)},style:{display:"grid",gap:6,marginTop:6},children:[(0,e.jsx)(N,{value:y,onChange:g,start:p,label:l,name:R(d)}),(0,e.jsxs)("div",{style:{display:"flex",gap:8},children:[(0,e.jsx)("button",{type:"submit","data-graview-repeat-keep":d,children:"Keep"}),(0,e.jsx)("button",{type:"button",onClick:()=>o(!1),children:"Cancel"})]})]}):(0,e.jsx)("button",{type:"button","data-graview-repeat-open":d,onClick:()=>(g(c(s)?s:void 0),o(!0)),style:{marginInlineStart:8,fontSize:"0.75rem",padding:"1px 8px",borderRadius:999,minHeight:24},children:c(s)?"Change how it repeats":"Repeat\u2026"}):null}export{K as RepeatEditor,N as RepeatPicker};