@chrisjowen/wheelhouse 0.1.1 → 0.2.1

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 (968) hide show
  1. package/README.md +36 -31
  2. package/build/client/_app/immutable/assets/0.CF4I5T-G.css +1 -0
  3. package/build/client/_app/immutable/assets/0.CF4I5T-G.css.br +0 -0
  4. package/build/client/_app/immutable/assets/0.CF4I5T-G.css.gz +0 -0
  5. package/build/client/_app/immutable/assets/DocSheet.CaO2v_qh.css +1 -0
  6. package/build/client/_app/immutable/assets/DocSheet.CaO2v_qh.css.br +0 -0
  7. package/build/client/_app/immutable/assets/DocSheet.CaO2v_qh.css.gz +0 -0
  8. package/build/client/_app/immutable/chunks/-F7frqRp.js +1 -0
  9. package/build/client/_app/immutable/chunks/-F7frqRp.js.br +0 -0
  10. package/build/client/_app/immutable/chunks/-F7frqRp.js.gz +0 -0
  11. package/build/client/_app/immutable/chunks/127nenIp.js +1 -0
  12. package/build/client/_app/immutable/chunks/127nenIp.js.br +0 -0
  13. package/build/client/_app/immutable/chunks/127nenIp.js.gz +0 -0
  14. package/build/client/_app/immutable/chunks/2Frsddx8.js +1 -0
  15. package/build/client/_app/immutable/chunks/2Frsddx8.js.br +2 -0
  16. package/build/client/_app/immutable/chunks/2Frsddx8.js.gz +0 -0
  17. package/build/client/_app/immutable/chunks/4nLjU3dc.js +1 -0
  18. package/build/client/_app/immutable/chunks/4nLjU3dc.js.br +0 -0
  19. package/build/client/_app/immutable/chunks/4nLjU3dc.js.gz +0 -0
  20. package/build/client/_app/immutable/chunks/6IjAKxKZ.js +1 -0
  21. package/build/client/_app/immutable/chunks/6IjAKxKZ.js.br +0 -0
  22. package/build/client/_app/immutable/chunks/6IjAKxKZ.js.gz +0 -0
  23. package/build/client/_app/immutable/chunks/6JIb870c.js +1 -0
  24. package/build/client/_app/immutable/chunks/6JIb870c.js.br +0 -0
  25. package/build/client/_app/immutable/chunks/6JIb870c.js.gz +0 -0
  26. package/build/client/_app/immutable/chunks/B8szyIrI.js +1 -0
  27. package/build/client/_app/immutable/chunks/B8szyIrI.js.br +0 -0
  28. package/build/client/_app/immutable/chunks/B8szyIrI.js.gz +0 -0
  29. package/build/client/_app/immutable/chunks/BDL2L18I.js +1 -0
  30. package/build/client/_app/immutable/chunks/BDL2L18I.js.br +0 -0
  31. package/build/client/_app/immutable/chunks/BDL2L18I.js.gz +0 -0
  32. package/build/client/_app/immutable/chunks/BJ_boZ6o.js +1 -0
  33. package/build/client/_app/immutable/chunks/BJ_boZ6o.js.br +0 -0
  34. package/build/client/_app/immutable/chunks/BJ_boZ6o.js.gz +0 -0
  35. package/build/client/_app/immutable/chunks/BMOWf_e5.js +1 -0
  36. package/build/client/_app/immutable/chunks/BMOWf_e5.js.br +0 -0
  37. package/build/client/_app/immutable/chunks/BMOWf_e5.js.gz +0 -0
  38. package/build/client/_app/immutable/chunks/BOOJ9_kJ.js +6 -0
  39. package/build/client/_app/immutable/chunks/BOOJ9_kJ.js.br +0 -0
  40. package/build/client/_app/immutable/chunks/BOOJ9_kJ.js.gz +0 -0
  41. package/build/client/_app/immutable/chunks/BPEcp4vD.js +1 -0
  42. package/build/client/_app/immutable/chunks/BPEcp4vD.js.br +0 -0
  43. package/build/client/_app/immutable/chunks/BPEcp4vD.js.gz +0 -0
  44. package/build/client/_app/immutable/chunks/BTcSoYfa.js +1 -0
  45. package/build/client/_app/immutable/chunks/BTcSoYfa.js.br +2 -0
  46. package/build/client/_app/immutable/chunks/BTcSoYfa.js.gz +0 -0
  47. package/build/client/_app/immutable/chunks/BVXUMEgB.js +1 -0
  48. package/build/client/_app/immutable/chunks/BVXUMEgB.js.br +0 -0
  49. package/build/client/_app/immutable/chunks/BVXUMEgB.js.gz +0 -0
  50. package/build/client/_app/immutable/chunks/BV_Ro843.js +1 -0
  51. package/build/client/_app/immutable/chunks/BV_Ro843.js.br +0 -0
  52. package/build/client/_app/immutable/chunks/BV_Ro843.js.gz +0 -0
  53. package/build/client/_app/immutable/chunks/BboI5NX2.js +1 -0
  54. package/build/client/_app/immutable/chunks/BboI5NX2.js.br +0 -0
  55. package/build/client/_app/immutable/chunks/BboI5NX2.js.gz +0 -0
  56. package/build/client/_app/immutable/chunks/BkLV0FAz.js +1 -0
  57. package/build/client/_app/immutable/chunks/BkLV0FAz.js.br +0 -0
  58. package/build/client/_app/immutable/chunks/BkLV0FAz.js.gz +0 -0
  59. package/build/client/_app/immutable/chunks/BnqQNG8I.js +1 -0
  60. package/build/client/_app/immutable/chunks/BnqQNG8I.js.br +0 -0
  61. package/build/client/_app/immutable/chunks/BnqQNG8I.js.gz +0 -0
  62. package/build/client/_app/immutable/chunks/Bo3sLJjL.js +3 -0
  63. package/build/client/_app/immutable/chunks/Bo3sLJjL.js.br +0 -0
  64. package/build/client/_app/immutable/chunks/Bo3sLJjL.js.gz +0 -0
  65. package/build/client/_app/immutable/chunks/Bpgn0RyM.js +1 -0
  66. package/build/client/_app/immutable/chunks/Bpgn0RyM.js.br +0 -0
  67. package/build/client/_app/immutable/chunks/Bpgn0RyM.js.gz +0 -0
  68. package/build/client/_app/immutable/chunks/BrGclueo.js +1 -0
  69. package/build/client/_app/immutable/chunks/BrGclueo.js.br +0 -0
  70. package/build/client/_app/immutable/chunks/BrGclueo.js.gz +0 -0
  71. package/build/client/_app/immutable/chunks/C-Ka3szt.js +1 -0
  72. package/build/client/_app/immutable/chunks/C-Ka3szt.js.br +0 -0
  73. package/build/client/_app/immutable/chunks/C-Ka3szt.js.gz +0 -0
  74. package/build/client/_app/immutable/chunks/C-YySHlv.js +1 -0
  75. package/build/client/_app/immutable/chunks/C-YySHlv.js.br +0 -0
  76. package/build/client/_app/immutable/chunks/C-YySHlv.js.gz +0 -0
  77. package/build/client/_app/immutable/chunks/C27rbWKB.js +1 -0
  78. package/build/client/_app/immutable/chunks/C27rbWKB.js.br +0 -0
  79. package/build/client/_app/immutable/chunks/C27rbWKB.js.gz +0 -0
  80. package/build/client/_app/immutable/chunks/CA1hL-S6.js +1 -0
  81. package/build/client/_app/immutable/chunks/CA1hL-S6.js.br +0 -0
  82. package/build/client/_app/immutable/chunks/CA1hL-S6.js.gz +0 -0
  83. package/build/client/_app/immutable/chunks/CFdPbSqS.js +1 -0
  84. package/build/client/_app/immutable/chunks/CFdPbSqS.js.br +1 -0
  85. package/build/client/_app/immutable/chunks/CFdPbSqS.js.gz +0 -0
  86. package/build/client/_app/immutable/chunks/CJGygju8.js +1 -0
  87. package/build/client/_app/immutable/chunks/CJGygju8.js.br +0 -0
  88. package/build/client/_app/immutable/chunks/CJGygju8.js.gz +0 -0
  89. package/build/client/_app/immutable/chunks/CLdaRjQZ.js +1 -0
  90. package/build/client/_app/immutable/chunks/CLdaRjQZ.js.br +0 -0
  91. package/build/client/_app/immutable/chunks/CLdaRjQZ.js.gz +0 -0
  92. package/build/client/_app/immutable/chunks/CS3TvEHF.js +1 -0
  93. package/build/client/_app/immutable/chunks/CS3TvEHF.js.br +0 -0
  94. package/build/client/_app/immutable/chunks/CS3TvEHF.js.gz +0 -0
  95. package/build/client/_app/immutable/chunks/CSfYMiqF.js +8 -0
  96. package/build/client/_app/immutable/chunks/CSfYMiqF.js.br +0 -0
  97. package/build/client/_app/immutable/chunks/CSfYMiqF.js.gz +0 -0
  98. package/build/client/_app/immutable/chunks/CW_pu1E1.js +1 -0
  99. package/build/client/_app/immutable/chunks/CW_pu1E1.js.br +0 -0
  100. package/build/client/_app/immutable/chunks/CW_pu1E1.js.gz +0 -0
  101. package/build/client/_app/immutable/chunks/CZPeboo-.js +1 -0
  102. package/build/client/_app/immutable/chunks/CZPeboo-.js.br +0 -0
  103. package/build/client/_app/immutable/chunks/CZPeboo-.js.gz +0 -0
  104. package/build/client/_app/immutable/chunks/CZYAayp0.js +2 -0
  105. package/build/client/_app/immutable/chunks/CZYAayp0.js.br +0 -0
  106. package/build/client/_app/immutable/chunks/CZYAayp0.js.gz +0 -0
  107. package/build/client/_app/immutable/chunks/Cap_NU8Z.js +1 -0
  108. package/build/client/_app/immutable/chunks/Cap_NU8Z.js.br +0 -0
  109. package/build/client/_app/immutable/chunks/Cap_NU8Z.js.gz +0 -0
  110. package/build/client/_app/immutable/chunks/Cf6ZwSDE.js +1 -0
  111. package/build/client/_app/immutable/chunks/Cf6ZwSDE.js.br +0 -0
  112. package/build/client/_app/immutable/chunks/Cf6ZwSDE.js.gz +0 -0
  113. package/build/client/_app/immutable/chunks/Ch8_zhFw.js +1 -0
  114. package/build/client/_app/immutable/chunks/Ch8_zhFw.js.br +0 -0
  115. package/build/client/_app/immutable/chunks/Ch8_zhFw.js.gz +0 -0
  116. package/build/client/_app/immutable/chunks/Cjji8YKo.js +1 -0
  117. package/build/client/_app/immutable/chunks/Cjji8YKo.js.br +0 -0
  118. package/build/client/_app/immutable/chunks/Cjji8YKo.js.gz +0 -0
  119. package/build/client/_app/immutable/chunks/Ckfspn2s.js +1 -0
  120. package/build/client/_app/immutable/chunks/Ckfspn2s.js.br +0 -0
  121. package/build/client/_app/immutable/chunks/Ckfspn2s.js.gz +0 -0
  122. package/build/client/_app/immutable/chunks/Cl72MTSX.js +1 -0
  123. package/build/client/_app/immutable/chunks/Cl72MTSX.js.br +0 -0
  124. package/build/client/_app/immutable/chunks/Cl72MTSX.js.gz +0 -0
  125. package/build/client/_app/immutable/chunks/CpkLqQ7l.js +1 -0
  126. package/build/client/_app/immutable/chunks/CpkLqQ7l.js.br +0 -0
  127. package/build/client/_app/immutable/chunks/CpkLqQ7l.js.gz +0 -0
  128. package/build/client/_app/immutable/chunks/Crzhp-x5.js +5 -0
  129. package/build/client/_app/immutable/chunks/Crzhp-x5.js.br +0 -0
  130. package/build/client/_app/immutable/chunks/Crzhp-x5.js.gz +0 -0
  131. package/build/client/_app/immutable/chunks/Cwah_dMw.js +1 -0
  132. package/build/client/_app/immutable/chunks/Cwah_dMw.js.br +0 -0
  133. package/build/client/_app/immutable/chunks/Cwah_dMw.js.gz +0 -0
  134. package/build/client/_app/immutable/chunks/CzsfD4hc.js +1 -0
  135. package/build/client/_app/immutable/chunks/CzsfD4hc.js.br +2 -0
  136. package/build/client/_app/immutable/chunks/CzsfD4hc.js.gz +0 -0
  137. package/build/client/_app/immutable/chunks/D32oVJ_N.js +1 -0
  138. package/build/client/_app/immutable/chunks/D32oVJ_N.js.br +1 -0
  139. package/build/client/_app/immutable/chunks/D32oVJ_N.js.gz +0 -0
  140. package/build/client/_app/immutable/chunks/D4sWXBG7.js +1 -0
  141. package/build/client/_app/immutable/chunks/D4sWXBG7.js.br +0 -0
  142. package/build/client/_app/immutable/chunks/D4sWXBG7.js.gz +0 -0
  143. package/build/client/_app/immutable/chunks/DBs-gHlm.js +2 -0
  144. package/build/client/_app/immutable/chunks/DBs-gHlm.js.br +0 -0
  145. package/build/client/_app/immutable/chunks/DBs-gHlm.js.gz +0 -0
  146. package/build/client/_app/immutable/chunks/DEFXAgPm.js +1 -0
  147. package/build/client/_app/immutable/chunks/DEFXAgPm.js.br +0 -0
  148. package/build/client/_app/immutable/chunks/DEFXAgPm.js.gz +0 -0
  149. package/build/client/_app/immutable/chunks/DHbme8uq.js +1 -0
  150. package/build/client/_app/immutable/chunks/DHbme8uq.js.br +0 -0
  151. package/build/client/_app/immutable/chunks/DHbme8uq.js.gz +0 -0
  152. package/build/client/_app/immutable/chunks/DMkU8x7K.js +1 -0
  153. package/build/client/_app/immutable/chunks/DMkU8x7K.js.br +0 -0
  154. package/build/client/_app/immutable/chunks/DMkU8x7K.js.gz +0 -0
  155. package/build/client/_app/immutable/chunks/DRIYWZlo.js +1 -0
  156. package/build/client/_app/immutable/chunks/DRIYWZlo.js.br +1 -0
  157. package/build/client/_app/immutable/chunks/DRIYWZlo.js.gz +0 -0
  158. package/build/client/_app/immutable/chunks/DUCO61Nb.js +1 -0
  159. package/build/client/_app/immutable/chunks/DUCO61Nb.js.br +0 -0
  160. package/build/client/_app/immutable/chunks/DUCO61Nb.js.gz +0 -0
  161. package/build/client/_app/immutable/chunks/DXz8WA1c.js +1 -0
  162. package/build/client/_app/immutable/chunks/DXz8WA1c.js.br +0 -0
  163. package/build/client/_app/immutable/chunks/DXz8WA1c.js.gz +0 -0
  164. package/build/client/_app/immutable/chunks/D_4WLGwX.js +1 -0
  165. package/build/client/_app/immutable/chunks/D_4WLGwX.js.br +0 -0
  166. package/build/client/_app/immutable/chunks/D_4WLGwX.js.gz +0 -0
  167. package/build/client/_app/immutable/chunks/D_5WjoQx.js +1 -0
  168. package/build/client/_app/immutable/chunks/D_5WjoQx.js.br +0 -0
  169. package/build/client/_app/immutable/chunks/D_5WjoQx.js.gz +0 -0
  170. package/build/client/_app/immutable/chunks/D_C2ZtkZ.js +1 -0
  171. package/build/client/_app/immutable/chunks/D_C2ZtkZ.js.br +0 -0
  172. package/build/client/_app/immutable/chunks/D_C2ZtkZ.js.gz +0 -0
  173. package/build/client/_app/immutable/chunks/De5PDvrQ.js +1 -0
  174. package/build/client/_app/immutable/chunks/De5PDvrQ.js.br +0 -0
  175. package/build/client/_app/immutable/chunks/De5PDvrQ.js.gz +0 -0
  176. package/build/client/_app/immutable/chunks/DhWdMQ8J.js +1 -0
  177. package/build/client/_app/immutable/chunks/DhWdMQ8J.js.br +0 -0
  178. package/build/client/_app/immutable/chunks/DhWdMQ8J.js.gz +0 -0
  179. package/build/client/_app/immutable/chunks/DiCw6gM6.js +1 -0
  180. package/build/client/_app/immutable/chunks/DiCw6gM6.js.br +0 -0
  181. package/build/client/_app/immutable/chunks/DiCw6gM6.js.gz +0 -0
  182. package/build/client/_app/immutable/chunks/DugIbHkD.js +1 -0
  183. package/build/client/_app/immutable/chunks/DugIbHkD.js.br +0 -0
  184. package/build/client/_app/immutable/chunks/DugIbHkD.js.gz +0 -0
  185. package/build/client/_app/immutable/chunks/JhgT3vN-.js +1 -0
  186. package/build/client/_app/immutable/chunks/JhgT3vN-.js.br +0 -0
  187. package/build/client/_app/immutable/chunks/JhgT3vN-.js.gz +0 -0
  188. package/build/client/_app/immutable/chunks/KA4C2mxd.js +1 -0
  189. package/build/client/_app/immutable/chunks/KA4C2mxd.js.br +0 -0
  190. package/build/client/_app/immutable/chunks/KA4C2mxd.js.gz +0 -0
  191. package/build/client/_app/immutable/chunks/MoZXz26A.js +2 -0
  192. package/build/client/_app/immutable/chunks/MoZXz26A.js.br +0 -0
  193. package/build/client/_app/immutable/chunks/MoZXz26A.js.gz +0 -0
  194. package/build/client/_app/immutable/chunks/PMi1c_Z5.js +2 -0
  195. package/build/client/_app/immutable/chunks/PMi1c_Z5.js.br +0 -0
  196. package/build/client/_app/immutable/chunks/PMi1c_Z5.js.gz +0 -0
  197. package/build/client/_app/immutable/chunks/Pd3Oo-LF.js +1 -0
  198. package/build/client/_app/immutable/chunks/Pd3Oo-LF.js.br +0 -0
  199. package/build/client/_app/immutable/chunks/Pd3Oo-LF.js.gz +0 -0
  200. package/build/client/_app/immutable/chunks/RXXzt1fg.js +1 -0
  201. package/build/client/_app/immutable/chunks/RXXzt1fg.js.br +0 -0
  202. package/build/client/_app/immutable/chunks/RXXzt1fg.js.gz +0 -0
  203. package/build/client/_app/immutable/chunks/WfixpLtG.js +1 -0
  204. package/build/client/_app/immutable/chunks/WfixpLtG.js.br +2 -0
  205. package/build/client/_app/immutable/chunks/WfixpLtG.js.gz +0 -0
  206. package/build/client/_app/immutable/chunks/YB3ysJRI.js +1 -0
  207. package/build/client/_app/immutable/chunks/YB3ysJRI.js.br +0 -0
  208. package/build/client/_app/immutable/chunks/YB3ysJRI.js.gz +0 -0
  209. package/build/client/_app/immutable/chunks/YUajk67G.js +1 -0
  210. package/build/client/_app/immutable/chunks/YUajk67G.js.br +0 -0
  211. package/build/client/_app/immutable/chunks/YUajk67G.js.gz +0 -0
  212. package/build/client/_app/immutable/chunks/a2ZeDrXd.js +1 -0
  213. package/build/client/_app/immutable/chunks/a2ZeDrXd.js.br +0 -0
  214. package/build/client/_app/immutable/chunks/a2ZeDrXd.js.gz +0 -0
  215. package/build/client/_app/immutable/chunks/cZnJ0mAm.js +7 -0
  216. package/build/client/_app/immutable/chunks/cZnJ0mAm.js.br +0 -0
  217. package/build/client/_app/immutable/chunks/cZnJ0mAm.js.gz +0 -0
  218. package/build/client/_app/immutable/chunks/is3b6W5i.js +1 -0
  219. package/build/client/_app/immutable/chunks/is3b6W5i.js.br +0 -0
  220. package/build/client/_app/immutable/chunks/is3b6W5i.js.gz +0 -0
  221. package/build/client/_app/immutable/chunks/kM8ObZQs.js +62 -0
  222. package/build/client/_app/immutable/chunks/kM8ObZQs.js.br +0 -0
  223. package/build/client/_app/immutable/chunks/kM8ObZQs.js.gz +0 -0
  224. package/build/client/_app/immutable/chunks/qep4C0YL.js +2 -0
  225. package/build/client/_app/immutable/chunks/qep4C0YL.js.br +0 -0
  226. package/build/client/_app/immutable/chunks/qep4C0YL.js.gz +0 -0
  227. package/build/client/_app/immutable/chunks/sSJbwAI9.js +1 -0
  228. package/build/client/_app/immutable/chunks/sSJbwAI9.js.br +0 -0
  229. package/build/client/_app/immutable/chunks/sSJbwAI9.js.gz +0 -0
  230. package/build/client/_app/immutable/chunks/vAxbu4w9.js +1 -0
  231. package/build/client/_app/immutable/chunks/vAxbu4w9.js.br +0 -0
  232. package/build/client/_app/immutable/chunks/vAxbu4w9.js.gz +0 -0
  233. package/build/client/_app/immutable/chunks/zfjlAER1.js +1 -0
  234. package/build/client/_app/immutable/chunks/zfjlAER1.js.br +0 -0
  235. package/build/client/_app/immutable/chunks/zfjlAER1.js.gz +0 -0
  236. package/build/client/_app/immutable/chunks/zrknQfzW.js +1 -0
  237. package/build/client/_app/immutable/chunks/zrknQfzW.js.br +0 -0
  238. package/build/client/_app/immutable/chunks/zrknQfzW.js.gz +0 -0
  239. package/build/client/_app/immutable/entry/app.BVW8a1Lc.js +2 -0
  240. package/build/client/_app/immutable/entry/app.BVW8a1Lc.js.br +0 -0
  241. package/build/client/_app/immutable/entry/app.BVW8a1Lc.js.gz +0 -0
  242. package/build/client/_app/immutable/entry/start.DfAhzzBh.js +1 -0
  243. package/build/client/_app/immutable/entry/start.DfAhzzBh.js.br +0 -0
  244. package/build/client/_app/immutable/entry/start.DfAhzzBh.js.gz +0 -0
  245. package/build/client/_app/immutable/nodes/0.CByWY48H.js +8 -0
  246. package/build/client/_app/immutable/nodes/0.CByWY48H.js.br +0 -0
  247. package/build/client/_app/immutable/nodes/0.CByWY48H.js.gz +0 -0
  248. package/build/client/_app/immutable/nodes/1.BQxkVmZR.js +1 -0
  249. package/build/client/_app/immutable/nodes/1.BQxkVmZR.js.br +0 -0
  250. package/build/client/_app/immutable/nodes/1.BQxkVmZR.js.gz +0 -0
  251. package/build/client/_app/immutable/nodes/10.DF_JvWer.js +3 -0
  252. package/build/client/_app/immutable/nodes/10.DF_JvWer.js.br +0 -0
  253. package/build/client/_app/immutable/nodes/10.DF_JvWer.js.gz +0 -0
  254. package/build/client/_app/immutable/nodes/11.Da20qmQ1.js +1 -0
  255. package/build/client/_app/immutable/nodes/11.Da20qmQ1.js.br +0 -0
  256. package/build/client/_app/immutable/nodes/11.Da20qmQ1.js.gz +0 -0
  257. package/build/client/_app/immutable/nodes/12.DeNfg3Jn.js +14 -0
  258. package/build/client/_app/immutable/nodes/12.DeNfg3Jn.js.br +0 -0
  259. package/build/client/_app/immutable/nodes/12.DeNfg3Jn.js.gz +0 -0
  260. package/build/client/_app/immutable/nodes/13.Vg3b6KJ-.js +150 -0
  261. package/build/client/_app/immutable/nodes/13.Vg3b6KJ-.js.br +0 -0
  262. package/build/client/_app/immutable/nodes/13.Vg3b6KJ-.js.gz +0 -0
  263. package/build/client/_app/immutable/nodes/15.DNQBbVNt.js +11 -0
  264. package/build/client/_app/immutable/nodes/15.DNQBbVNt.js.br +0 -0
  265. package/build/client/_app/immutable/nodes/15.DNQBbVNt.js.gz +0 -0
  266. package/build/client/_app/immutable/nodes/16.PXR5gryE.js +9 -0
  267. package/build/client/_app/immutable/nodes/16.PXR5gryE.js.br +0 -0
  268. package/build/client/_app/immutable/nodes/16.PXR5gryE.js.gz +0 -0
  269. package/build/client/_app/immutable/nodes/17.D6wwTzw0.js +2 -0
  270. package/build/client/_app/immutable/nodes/17.D6wwTzw0.js.br +0 -0
  271. package/build/client/_app/immutable/nodes/17.D6wwTzw0.js.gz +0 -0
  272. package/build/client/_app/immutable/nodes/18.BYPKt-Zj.js +6 -0
  273. package/build/client/_app/immutable/nodes/18.BYPKt-Zj.js.br +0 -0
  274. package/build/client/_app/immutable/nodes/18.BYPKt-Zj.js.gz +0 -0
  275. package/build/client/_app/immutable/nodes/19.eOj7WL-z.js +1 -0
  276. package/build/client/_app/immutable/nodes/19.eOj7WL-z.js.br +0 -0
  277. package/build/client/_app/immutable/nodes/19.eOj7WL-z.js.gz +0 -0
  278. package/build/client/_app/immutable/nodes/2.iGkQWI53.js +14 -0
  279. package/build/client/_app/immutable/nodes/2.iGkQWI53.js.br +0 -0
  280. package/build/client/_app/immutable/nodes/2.iGkQWI53.js.gz +0 -0
  281. package/build/client/_app/immutable/nodes/20.COEvYhSn.js +6 -0
  282. package/build/client/_app/immutable/nodes/20.COEvYhSn.js.br +0 -0
  283. package/build/client/_app/immutable/nodes/20.COEvYhSn.js.gz +0 -0
  284. package/build/client/_app/immutable/nodes/3.DgV1VyBd.js +5 -0
  285. package/build/client/_app/immutable/nodes/3.DgV1VyBd.js.br +0 -0
  286. package/build/client/_app/immutable/nodes/3.DgV1VyBd.js.gz +0 -0
  287. package/build/client/_app/immutable/nodes/4.BFV94RXa.js +1 -0
  288. package/build/client/_app/immutable/nodes/4.BFV94RXa.js.br +0 -0
  289. package/build/client/_app/immutable/nodes/4.BFV94RXa.js.gz +0 -0
  290. package/build/client/_app/immutable/nodes/5.DXQSdCv2.js +1 -0
  291. package/build/client/_app/immutable/nodes/5.DXQSdCv2.js.br +0 -0
  292. package/build/client/_app/immutable/nodes/5.DXQSdCv2.js.gz +0 -0
  293. package/build/client/_app/immutable/nodes/6.BVvx9mug.js +7 -0
  294. package/build/client/_app/immutable/nodes/6.BVvx9mug.js.br +0 -0
  295. package/build/client/_app/immutable/nodes/6.BVvx9mug.js.gz +0 -0
  296. package/build/client/_app/immutable/nodes/7.bgzyRDkn.js +4 -0
  297. package/build/client/_app/immutable/nodes/7.bgzyRDkn.js.br +0 -0
  298. package/build/client/_app/immutable/nodes/7.bgzyRDkn.js.gz +0 -0
  299. package/build/client/_app/immutable/nodes/9.BjRlvbf0.js +1 -0
  300. package/build/client/_app/immutable/nodes/9.BjRlvbf0.js.br +0 -0
  301. package/build/client/_app/immutable/nodes/9.BjRlvbf0.js.gz +0 -0
  302. package/build/client/_app/version.json +1 -1
  303. package/build/client/_app/version.json.br +0 -0
  304. package/build/client/_app/version.json.gz +0 -0
  305. package/build/handler.js +7 -7
  306. package/build/index.js +7 -7
  307. package/build/server/chunks/chunks/AllowanceMeter.js-DBpmESX6.js +42 -0
  308. package/build/server/chunks/chunks/DecisionCard.js-CvR7ULLC.js +461 -0
  309. package/build/server/chunks/chunks/DocSheet.js-BPPDMi3P.js +50 -0
  310. package/build/server/chunks/chunks/EtaLine.js-CtcOSLzV.js +79 -0
  311. package/build/server/chunks/chunks/EveryProjectSwitch.js-DWet6DU1.js +200 -0
  312. package/build/server/chunks/chunks/Icon.js-CVZZ-yuB.js +129 -0
  313. package/build/server/chunks/chunks/InsightsNav.js-Cmn5y1to.js +18 -0
  314. package/build/server/chunks/chunks/InstallPlugin.js-B46b-IrK.js +45 -0
  315. package/build/server/chunks/chunks/LinkedText.js-COjHV297.js +43 -0
  316. package/build/server/chunks/chunks/ProjectBanner.js-19PQF0LD.js +111 -0
  317. package/build/server/chunks/chunks/ProjectStateMark.js-BkRD8cX4.js +61 -0
  318. package/build/server/chunks/chunks/QuestionList.js-CppuauNj.js +187 -0
  319. package/build/server/chunks/chunks/ResizableRail.js-BmMh1aVL.js +801 -0
  320. package/build/server/chunks/chunks/SettingsNav.js-BtJIv5cc.js +22 -0
  321. package/build/server/chunks/chunks/SlotContent.js-B4p1QLQN.js +748 -0
  322. package/build/server/chunks/chunks/StageTrack.js-DHvZX7Bl.js +111 -0
  323. package/build/server/chunks/chunks/TimeBar.js-CUFKEJW9.js +32 -0
  324. package/build/server/chunks/chunks/TimeLegend.js-B3Wl61jM.js +29 -0
  325. package/build/server/chunks/chunks/aliases.svelte.js-C_vCoKdk.js +138 -0
  326. package/build/server/chunks/chunks/arrow-down.js-Bt3fQooI.js +18 -0
  327. package/build/server/chunks/chunks/arrow-left.js-BKiSMzvI.js +18 -0
  328. package/build/server/chunks/chunks/arrow-right.js-CNYqcx0M.js +18 -0
  329. package/build/server/chunks/chunks/arrow-up.js-DHbXk79z.js +18 -0
  330. package/build/server/chunks/chunks/attachments.js-BAnnqpd-.js +48 -0
  331. package/build/server/chunks/chunks/bell.js-CXJp-3UZ.js +150 -0
  332. package/build/server/chunks/chunks/berths.js-CuAE9lHW.js +268 -0
  333. package/build/server/chunks/chunks/book-open.js-C2rohN3N.js +23 -0
  334. package/build/server/chunks/chunks/button.js-BF2PsvWw.js +7311 -0
  335. package/build/server/chunks/chunks/chat.svelte.js-b0uQXOge.js +545 -0
  336. package/build/server/chunks/chunks/check.js-32sYHVxG.js +15 -0
  337. package/build/server/chunks/chunks/checks.js-DR3fVVpO.js +242 -0
  338. package/build/server/chunks/chunks/chevron-down.js-CH53s_me.js +15 -0
  339. package/build/server/chunks/chunks/chevron-left.js-D5RHY-kD.js +15 -0
  340. package/build/server/chunks/chunks/chevron-right.js-DCBAqAae.js +15 -0
  341. package/build/server/chunks/chunks/circle-alert.js-XTuAj7ZH.js +23 -0
  342. package/build/server/chunks/chunks/circle-dashed.js-fXv_bIo-.js +24 -0
  343. package/build/server/chunks/chunks/circle-dot.js-C950Kosw.js +18 -0
  344. package/build/server/chunks/chunks/client.js-B_5mNqUe.js +24 -0
  345. package/build/server/chunks/chunks/clock.js-CHhHTWK_.js +18 -0
  346. package/build/server/chunks/chunks/detail.js-9VHqIqfd.js +121 -0
  347. package/build/server/chunks/chunks/docpath.js-D27w_pf9.js +47 -0
  348. package/build/server/chunks/chunks/external-link.js-BQs1euhR.js +24 -0
  349. package/build/server/chunks/chunks/file-text.js-CnuVvHlB.js +26 -0
  350. package/build/server/chunks/chunks/gauge.js-Cbb1aqE7.js +35 -0
  351. package/build/server/chunks/chunks/hand.js-BA9yKAan.js +25 -0
  352. package/build/server/chunks/chunks/harbour.js-PHLHOFea.js +117 -0
  353. package/build/server/chunks/chunks/html.js-FW6Ia4bL.js +8 -0
  354. package/build/server/chunks/chunks/http.js-CBM8xgUM.js +25 -0
  355. package/build/server/chunks/chunks/inbox.js-Dv8a1ecX.js +184 -0
  356. package/build/server/chunks/chunks/inbox.svelte.js-n7K3YnGB.js +171 -0
  357. package/build/server/chunks/chunks/index-server.js-DsObimPA.js +9 -0
  358. package/build/server/chunks/chunks/index-server2.js-Fb2GE8KQ.js +17 -0
  359. package/build/server/chunks/chunks/index.js-B0NFhRTN.js +1524 -0
  360. package/build/server/chunks/chunks/index2.js-Bxt1T6_K.js +46 -0
  361. package/build/server/chunks/chunks/internal.js-CxWYnS4m.js +146 -0
  362. package/build/server/chunks/chunks/keys.js-iHygUPeb.js +20 -0
  363. package/build/server/chunks/chunks/live.svelte.js-DavJCZVs.js +238 -0
  364. package/build/server/chunks/chunks/loader-circle.js-rQHvIWN7.js +16 -0
  365. package/build/server/chunks/chunks/markdown.js-CApgGpeX.js +2634 -0
  366. package/build/server/chunks/chunks/message-circle-question-mark.js-DbmaS9k_.js +25 -0
  367. package/build/server/chunks/chunks/message-square.js-XK15WVZq.js +22 -0
  368. package/build/server/chunks/chunks/messages-square.js-BXH8BHfd.js +28 -0
  369. package/build/server/chunks/chunks/minus.js-DKvkj8VD.js +15 -0
  370. package/build/server/chunks/chunks/nav.js-DwnXJgxd.js +29 -0
  371. package/build/server/chunks/chunks/plus.js-caVrjGZc.js +15 -0
  372. package/build/server/chunks/chunks/preview.js-hrimfbCG.js +69 -0
  373. package/build/server/chunks/chunks/pullrequests.js-CWGxTy8C.js +68 -0
  374. package/build/server/chunks/chunks/pullrequests2.js-CCzk2sqm.js +12 -0
  375. package/build/server/chunks/chunks/repo.js-DU-pK5Nw.js +33 -0
  376. package/build/server/chunks/chunks/requests.js-DiL4Poa9.js +42 -0
  377. package/build/server/chunks/chunks/restart.js-Dv1_ODgZ.js +12 -0
  378. package/build/server/chunks/chunks/root.js-60iebdW4.js +3105 -0
  379. package/build/server/chunks/chunks/rotate-cw.js-M4SHOpYI.js +21 -0
  380. package/build/server/chunks/chunks/runtime.js-4msnOWzY.js +15335 -0
  381. package/build/server/chunks/chunks/scale.js-S5g8YUqL.js +21 -0
  382. package/build/server/chunks/chunks/scroll-lock.js-Ci_ylINL.js +2811 -0
  383. package/build/server/chunks/chunks/service.js-DZR6CoEI.js +914 -0
  384. package/build/server/chunks/chunks/settings.js-C_6kvzhM.js +862 -0
  385. package/build/server/chunks/chunks/slots.svelte.js-CLIV5nwM.js +34 -0
  386. package/build/server/chunks/chunks/square-terminal.js-D9D9_9_V.js +30 -0
  387. package/build/server/chunks/chunks/store.js-ByNV-OHV.js +323 -0
  388. package/build/server/chunks/chunks/tone.js-Dxsl-adt.js +31 -0
  389. package/build/server/chunks/chunks/triangle-alert.js-ClLszsZE.js +25 -0
  390. package/build/server/chunks/chunks/uploads.js-4OZ09onz.js +107 -0
  391. package/build/server/chunks/chunks/urls.js-BrlC6XZ8.js +8 -0
  392. package/build/server/chunks/chunks/utils.js-BJgm9WbO.js +2985 -0
  393. package/build/server/chunks/chunks/vault.js-CTaWe09z.js +162 -0
  394. package/build/server/chunks/chunks/view.js-BPycofxX.js +76 -0
  395. package/build/server/chunks/chunks/views.js-DyGxvskG.js +124 -0
  396. package/build/server/chunks/chunks/words.js-Cte4wOB4.js +48 -0
  397. package/build/server/chunks/chunks/x.js-YxaUOlq9.js +18 -0
  398. package/build/server/chunks/entries/endpoints/api/apps/_op_/_server.ts.js-DqDt7aNN.js +90 -0
  399. package/build/server/chunks/entries/endpoints/api/events/_server.ts.js-D-mwPJ4E.js +100 -0
  400. package/build/server/chunks/entries/endpoints/api/files/_server.ts.js-DTl4eBah.js +49 -0
  401. package/build/server/chunks/entries/endpoints/api/firstmate/chat/_server.ts.js-HFyCRRIx.js +83 -0
  402. package/build/server/chunks/entries/endpoints/api/firstmate/commands/_server.ts.js-CO7kITUs.js +119 -0
  403. package/build/server/chunks/entries/endpoints/api/firstmate/dismiss/_server.ts.js-CTdaQTFX.js +45 -0
  404. package/build/server/chunks/entries/endpoints/api/firstmate/input/_server.ts.js-DKxlZSX3.js +51 -0
  405. package/build/server/chunks/entries/endpoints/api/firstmate/interrupt/_server.ts.js-Bp4CsZQ9.js +44 -0
  406. package/build/server/chunks/entries/endpoints/api/firstmate/messages/_server.ts.js--Ti6GfKf.js +66 -0
  407. package/build/server/chunks/entries/endpoints/api/firstmate/pick/_server.ts.js-DudckFen.js +54 -0
  408. package/build/server/chunks/entries/endpoints/api/firstmate/start/_server.ts.js-H09D-uaY.js +44 -0
  409. package/build/server/chunks/entries/endpoints/api/firstmate/uploads/_day_/_id_/_name_/_server.ts.js-B1jFlBJC.js +31 -0
  410. package/build/server/chunks/entries/endpoints/api/firstmate/uploads/_server.ts.js-B2h2nWSK.js +39 -0
  411. package/build/server/chunks/entries/endpoints/api/fleet/_server.ts.js-BMcNM7_1.js +36 -0
  412. package/build/server/chunks/entries/endpoints/api/gateway/_server.ts.js-CVc8gLps.js +100 -0
  413. package/build/server/chunks/entries/endpoints/api/health/_server.ts.js-BcVLJq4f.js +36 -0
  414. package/build/server/chunks/entries/endpoints/api/inbox/_server.ts.js-DKqY2sWJ.js +60 -0
  415. package/build/server/chunks/entries/endpoints/api/inbox/report/_server.ts.js-a4l41m0P.js +51 -0
  416. package/build/server/chunks/entries/endpoints/api/insights/_server.ts.js-Cr_YrS6N.js +36 -0
  417. package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/config/_server.ts.js-CZUfk-OY.js +71 -0
  418. package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/load/_server.ts.js-CPBW7xEV.js +23 -0
  419. package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/ui/_...path_/_server.ts.js-Dg2Sbcgq.js +59 -0
  420. package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/update/_server.ts.js-C9LXRfKc.js +35 -0
  421. package/build/server/chunks/entries/endpoints/api/plugins/_server.ts.js-C7RCx22P.js +36 -0
  422. package/build/server/chunks/entries/endpoints/api/plugins/inspect/_server.ts.js-CSPS_3gF.js +35 -0
  423. package/build/server/chunks/entries/endpoints/api/plugins/install/_server.ts.js-DWxejv3K.js +38 -0
  424. package/build/server/chunks/entries/endpoints/api/plugins/updates/_server.ts.js-BYYXspMy.js +23 -0
  425. package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/_server.ts.js-BAPnLV-3.js +41 -0
  426. package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/commands/_server.ts.js-OYV-kJGk.js +50 -0
  427. package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/consent/_server.ts.js-DovNLcSw.js +62 -0
  428. package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/draft/_server.ts.js-CYU1VGUf.js +49 -0
  429. package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/file/_server.ts.js-CgCzXBIB.js +72 -0
  430. package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/test/_server.ts.js-BZ2S7d9x.js +55 -0
  431. package/build/server/chunks/entries/endpoints/api/services/_server.ts.js-CMVRpWqZ.js +55 -0
  432. package/build/server/chunks/entries/endpoints/api/slots/_server.ts.js-BhhLjW17.js +44 -0
  433. package/build/server/chunks/entries/endpoints/api/tasks/_id_/_server.ts.js-Bukv4dSq.js +41 -0
  434. package/build/server/chunks/entries/endpoints/api/tasks/_id_/artifacts/_...name_/_server.ts.js-BsHRnnS7.js +60 -0
  435. package/build/server/chunks/entries/endpoints/api/tasks/_id_/diff/_server.ts.js-B9eygpXJ.js +48 -0
  436. package/build/server/chunks/entries/endpoints/api/tasks/_id_/output/_server.ts.js-o7w8BRpJ.js +93 -0
  437. package/build/server/chunks/entries/endpoints/api/tasks/_id_/preview/_server.ts.js-BaXho4qD.js +110 -0
  438. package/build/server/chunks/entries/endpoints/api/vault/_server.ts.js-CagOXKfp.js +54 -0
  439. package/build/server/chunks/entries/endpoints/api/wheelhouse/update/_server.ts.js-CAcsCtS9.js +23 -0
  440. package/build/server/chunks/entries/endpoints/api/wheelhouse/upgrade/_server.ts.js-CSlKdXcw.js +23 -0
  441. package/build/server/chunks/entries/endpoints/projects/_server.ts.js-uMp6dcat.js +7 -0
  442. package/build/server/chunks/entries/endpoints/tasks/_id_/review/_server.ts.js-OEWlGF9d.js +40 -0
  443. package/build/server/chunks/entries/fallbacks/error.svelte.js-DnpcUjRk.js +15 -0
  444. package/build/server/chunks/entries/hooks.server.js-BeVVnKyB.js +54 -0
  445. package/build/server/chunks/entries/pages/_layout.server.ts.js-CFzh0bb7.js +24 -0
  446. package/build/server/chunks/entries/pages/_layout.svelte.js-BQyvY_vc.js +8746 -0
  447. package/build/server/chunks/entries/pages/_page.server.ts.js-DqT-OIkV.js +16 -0
  448. package/build/server/chunks/entries/pages/_page.svelte.js-DMDSI7Tw.js +2220 -0
  449. package/build/server/chunks/entries/pages/decisions/_page.server.ts.js-CGjy1S4B.js +11 -0
  450. package/build/server/chunks/entries/pages/decisions/_page.svelte.js-C3NsHXP-.js +184 -0
  451. package/build/server/chunks/entries/pages/files/_page.server.ts.js-D6VF_7EK.js +17 -0
  452. package/build/server/chunks/entries/pages/files/_page.svelte.js-Bj-5ZaJn.js +61 -0
  453. package/build/server/chunks/entries/pages/harbour/_page.server.ts.js-Cbei7bFp.js +46 -0
  454. package/build/server/chunks/entries/pages/harbour/_page.svelte.js-D8RsASWB.js +580 -0
  455. package/build/server/chunks/entries/pages/headroom/_page.server.ts.js-DtFxpkIR.js +11 -0
  456. package/build/server/chunks/entries/pages/headroom/_page.svelte.js-BLFQjLz8.js +149 -0
  457. package/build/server/chunks/entries/pages/inbox/_page.svelte.js-Bn5pWt__.js +185 -0
  458. package/build/server/chunks/entries/pages/plugins/_page.server.ts.js-D_nxVVQ0.js +11 -0
  459. package/build/server/chunks/entries/pages/plugins/_plugin_/_page_/_page.server.ts.js-CybSuVD4.js +16 -0
  460. package/build/server/chunks/entries/pages/plugins/_plugin_/_page_/_page.svelte.js-DMPiRdLN.js +52 -0
  461. package/build/server/chunks/entries/pages/projects/_id_/_page.server.ts.js-CroKCV4u.js +23 -0
  462. package/build/server/chunks/entries/pages/projects/_id_/_page.svelte.js-_DNqdqJc.js +976 -0
  463. package/build/server/chunks/entries/pages/projects/_id_/_plugin_/_tab_/_page.server.ts.js-Vb8907y2.js +21 -0
  464. package/build/server/chunks/entries/pages/projects/_id_/_plugin_/_tab_/_page.svelte.js-BLTTCa_O.js +74 -0
  465. package/build/server/chunks/entries/pages/projects/_id_/passage/_page.server.ts.js-Cor2JYpv.js +27 -0
  466. package/build/server/chunks/entries/pages/projects/_id_/passage/_page.svelte.js-BTgNmS_4.js +433 -0
  467. package/build/server/chunks/entries/pages/projects/_id_/passage/edit/_page.server.ts.js-Dtvwihv0.js +15 -0
  468. package/build/server/chunks/entries/pages/projects/_id_/passage/edit/_page.svelte.js-DuitNXlV.js +1880 -0
  469. package/build/server/chunks/entries/pages/settings/_page.server.ts.js-DnBg1UuM.js +11 -0
  470. package/build/server/chunks/entries/pages/settings/gateway/_page.server.ts.js-BqNGCjSG.js +11 -0
  471. package/build/server/chunks/entries/pages/settings/gateway/_page.svelte.js-BmbSSxk6.js +208 -0
  472. package/build/server/chunks/entries/pages/settings/plugins/_page.server.ts.js-CQ9DVI4s.js +19 -0
  473. package/build/server/chunks/entries/pages/settings/plugins/_page.svelte.js-U1GPMY59.js +1847 -0
  474. package/build/server/chunks/entries/pages/settings/plugins/_plugin_/_page.server.ts.js-C_YGnjmx.js +17 -0
  475. package/build/server/chunks/entries/pages/settings/plugins/_plugin_/_page.svelte.js-C_gSykyo.js +220 -0
  476. package/build/server/chunks/entries/pages/tasks/_id_/_page.server.ts.js-C-lePqYN.js +25 -0
  477. package/build/server/chunks/entries/pages/tasks/_id_/_page.svelte.js-Ds1ivkgU.js +2142 -0
  478. package/build/server/chunks/entries/pages/tasks/_id_/doc/_page.server.ts.js-DH7nAB6U.js +24 -0
  479. package/build/server/chunks/entries/pages/tasks/_id_/doc/_page.svelte.js-BOMmvf6G.js +80 -0
  480. package/build/server/chunks/entries/pages/time/_page.server.ts.js-Bfe-SSUC.js +11 -0
  481. package/build/server/chunks/entries/pages/time/_page.svelte.js-Ckn0YUW_.js +108 -0
  482. package/build/server/chunks/handler-CViJcHBG.js +1474 -0
  483. package/build/server/chunks/index.js-DO8YdJ_5.js +4296 -0
  484. package/build/server/chunks/manifest.js-DJYckUS-.js +501 -0
  485. package/build/server/chunks/nodes/0.js-DZ4kFPNe.js +41 -0
  486. package/build/server/chunks/nodes/1.js-CLGjQTlS.js +9 -0
  487. package/build/server/chunks/nodes/10.js-BN4Clcbg.js +43 -0
  488. package/build/server/chunks/nodes/11.js-DWB1yiJ6.js +42 -0
  489. package/build/server/chunks/nodes/12.js-CA99401F.js +43 -0
  490. package/build/server/chunks/nodes/13.js-YsHE2JFx.js +42 -0
  491. package/build/server/chunks/nodes/14.js-Cl3VZ6XR.js +12 -0
  492. package/build/server/chunks/nodes/15.js-CLdnAt4r.js +41 -0
  493. package/build/server/chunks/nodes/16.js-B-2Iq3Ye.js +41 -0
  494. package/build/server/chunks/nodes/17.js-BTM2TsmR.js +44 -0
  495. package/build/server/chunks/nodes/18.js-D3m0ATU2.js +42 -0
  496. package/build/server/chunks/nodes/19.js-C3dO33LH.js +42 -0
  497. package/build/server/chunks/nodes/2.js-51wjL-91.js +41 -0
  498. package/build/server/chunks/nodes/20.js-e41qDeY7.js +41 -0
  499. package/build/server/chunks/nodes/3.js-3JUV-tiI.js +41 -0
  500. package/build/server/chunks/nodes/4.js-CI6WGOXE.js +41 -0
  501. package/build/server/chunks/nodes/5.js-tZ-lWwlu.js +45 -0
  502. package/build/server/chunks/nodes/6.js-BgQesykU.js +41 -0
  503. package/build/server/chunks/nodes/7.js-CFXzqkNQ.js +9 -0
  504. package/build/server/chunks/nodes/8.js-D32pPbKa.js +12 -0
  505. package/build/server/chunks/nodes/9.js-CUQI6T4W.js +41 -0
  506. package/dist/cli.js +2156 -72
  507. package/dist/wh-vault.js +1007 -0
  508. package/package.json +5 -3
  509. package/plugins/github-issues/.wheelhouse-plugin/plugin.json +44 -0
  510. package/plugins/github-issues/README.md +16 -0
  511. package/plugins/github-issues/wheelhouse/server/index.js +463 -0
  512. package/plugins/project-links/.wheelhouse-plugin/plugin.json +25 -0
  513. package/plugins/project-links/README.md +17 -0
  514. package/plugins/project-links/wheelhouse/server/index.js +278 -0
  515. package/plugins/project-links/wheelhouse/ui/index.js +87 -0
  516. package/plugins/vault/.wheelhouse-plugin/plugin.json +22 -0
  517. package/plugins/vault/README.md +18 -0
  518. package/plugins/vault/wheelhouse/server/index.js +297 -0
  519. package/build/client/_app/immutable/assets/0.DaQhCSel.css +0 -1
  520. package/build/client/_app/immutable/assets/0.DaQhCSel.css.br +0 -0
  521. package/build/client/_app/immutable/assets/0.DaQhCSel.css.gz +0 -0
  522. package/build/client/_app/immutable/assets/12.DT1C9nmd.css +0 -1
  523. package/build/client/_app/immutable/assets/12.DT1C9nmd.css.br +0 -0
  524. package/build/client/_app/immutable/assets/12.DT1C9nmd.css.gz +0 -0
  525. package/build/client/_app/immutable/assets/14.CjNfSPQ6.css +0 -1
  526. package/build/client/_app/immutable/assets/14.CjNfSPQ6.css.br +0 -0
  527. package/build/client/_app/immutable/assets/14.CjNfSPQ6.css.gz +0 -0
  528. package/build/client/_app/immutable/assets/15.KLSHp5Yu.css +0 -1
  529. package/build/client/_app/immutable/assets/15.KLSHp5Yu.css.br +0 -0
  530. package/build/client/_app/immutable/assets/15.KLSHp5Yu.css.gz +0 -0
  531. package/build/client/_app/immutable/chunks/36FDwM1G.js +0 -1
  532. package/build/client/_app/immutable/chunks/36FDwM1G.js.br +0 -0
  533. package/build/client/_app/immutable/chunks/36FDwM1G.js.gz +0 -0
  534. package/build/client/_app/immutable/chunks/B1XxiJam.js +0 -1
  535. package/build/client/_app/immutable/chunks/B1XxiJam.js.br +0 -0
  536. package/build/client/_app/immutable/chunks/B1XxiJam.js.gz +0 -0
  537. package/build/client/_app/immutable/chunks/B1bNvkZf.js +0 -1
  538. package/build/client/_app/immutable/chunks/B1bNvkZf.js.br +0 -0
  539. package/build/client/_app/immutable/chunks/B1bNvkZf.js.gz +0 -0
  540. package/build/client/_app/immutable/chunks/B2wEHue2.js +0 -1
  541. package/build/client/_app/immutable/chunks/B2wEHue2.js.br +0 -0
  542. package/build/client/_app/immutable/chunks/B2wEHue2.js.gz +0 -0
  543. package/build/client/_app/immutable/chunks/BEAYWcbT.js +0 -1
  544. package/build/client/_app/immutable/chunks/BEAYWcbT.js.br +0 -0
  545. package/build/client/_app/immutable/chunks/BEAYWcbT.js.gz +0 -0
  546. package/build/client/_app/immutable/chunks/BGINfGsV.js +0 -1
  547. package/build/client/_app/immutable/chunks/BGINfGsV.js.br +0 -4
  548. package/build/client/_app/immutable/chunks/BGINfGsV.js.gz +0 -0
  549. package/build/client/_app/immutable/chunks/BHsdHLbF.js +0 -1
  550. package/build/client/_app/immutable/chunks/BHsdHLbF.js.br +0 -0
  551. package/build/client/_app/immutable/chunks/BHsdHLbF.js.gz +0 -0
  552. package/build/client/_app/immutable/chunks/BORDV711.js +0 -1
  553. package/build/client/_app/immutable/chunks/BORDV711.js.br +0 -0
  554. package/build/client/_app/immutable/chunks/BORDV711.js.gz +0 -0
  555. package/build/client/_app/immutable/chunks/BR5v76-T.js +0 -1
  556. package/build/client/_app/immutable/chunks/BR5v76-T.js.br +0 -0
  557. package/build/client/_app/immutable/chunks/BR5v76-T.js.gz +0 -0
  558. package/build/client/_app/immutable/chunks/BUo4hMcM.js +0 -1
  559. package/build/client/_app/immutable/chunks/BUo4hMcM.js.br +0 -0
  560. package/build/client/_app/immutable/chunks/BUo4hMcM.js.gz +0 -0
  561. package/build/client/_app/immutable/chunks/BVVO3JPx.js +0 -1
  562. package/build/client/_app/immutable/chunks/BVVO3JPx.js.br +0 -0
  563. package/build/client/_app/immutable/chunks/BVVO3JPx.js.gz +0 -0
  564. package/build/client/_app/immutable/chunks/BWJa0dU7.js +0 -1
  565. package/build/client/_app/immutable/chunks/BWJa0dU7.js.br +0 -0
  566. package/build/client/_app/immutable/chunks/BWJa0dU7.js.gz +0 -0
  567. package/build/client/_app/immutable/chunks/Bfi4vm-w.js +0 -1
  568. package/build/client/_app/immutable/chunks/Bfi4vm-w.js.br +0 -0
  569. package/build/client/_app/immutable/chunks/Bfi4vm-w.js.gz +0 -0
  570. package/build/client/_app/immutable/chunks/BiTivU7x.js +0 -1
  571. package/build/client/_app/immutable/chunks/BiTivU7x.js.br +0 -0
  572. package/build/client/_app/immutable/chunks/BiTivU7x.js.gz +0 -0
  573. package/build/client/_app/immutable/chunks/BiuLIp4b.js +0 -1
  574. package/build/client/_app/immutable/chunks/BiuLIp4b.js.br +0 -0
  575. package/build/client/_app/immutable/chunks/BiuLIp4b.js.gz +0 -0
  576. package/build/client/_app/immutable/chunks/Bns_F-QV.js +0 -1
  577. package/build/client/_app/immutable/chunks/Bns_F-QV.js.br +0 -0
  578. package/build/client/_app/immutable/chunks/Bns_F-QV.js.gz +0 -0
  579. package/build/client/_app/immutable/chunks/Brlpgp90.js +0 -1
  580. package/build/client/_app/immutable/chunks/Brlpgp90.js.br +0 -0
  581. package/build/client/_app/immutable/chunks/Brlpgp90.js.gz +0 -0
  582. package/build/client/_app/immutable/chunks/BunkbzFG.js +0 -1
  583. package/build/client/_app/immutable/chunks/BunkbzFG.js.br +0 -0
  584. package/build/client/_app/immutable/chunks/BunkbzFG.js.gz +0 -0
  585. package/build/client/_app/immutable/chunks/BwOfqJw9.js +0 -1
  586. package/build/client/_app/immutable/chunks/BwOfqJw9.js.br +0 -0
  587. package/build/client/_app/immutable/chunks/BwOfqJw9.js.gz +0 -0
  588. package/build/client/_app/immutable/chunks/C-xrRA1Y.js +0 -1
  589. package/build/client/_app/immutable/chunks/C-xrRA1Y.js.br +0 -0
  590. package/build/client/_app/immutable/chunks/C-xrRA1Y.js.gz +0 -0
  591. package/build/client/_app/immutable/chunks/C2_XZrIO.js +0 -7
  592. package/build/client/_app/immutable/chunks/C2_XZrIO.js.br +0 -0
  593. package/build/client/_app/immutable/chunks/C2_XZrIO.js.gz +0 -0
  594. package/build/client/_app/immutable/chunks/C2d4bDYU.js +0 -1
  595. package/build/client/_app/immutable/chunks/C2d4bDYU.js.br +0 -0
  596. package/build/client/_app/immutable/chunks/C2d4bDYU.js.gz +0 -0
  597. package/build/client/_app/immutable/chunks/C6BQPSOs.js +0 -62
  598. package/build/client/_app/immutable/chunks/C6BQPSOs.js.br +0 -0
  599. package/build/client/_app/immutable/chunks/C6BQPSOs.js.gz +0 -0
  600. package/build/client/_app/immutable/chunks/CDphfOBv.js +0 -1
  601. package/build/client/_app/immutable/chunks/CDphfOBv.js.br +0 -0
  602. package/build/client/_app/immutable/chunks/CDphfOBv.js.gz +0 -0
  603. package/build/client/_app/immutable/chunks/CIE0U5Ih.js +0 -1
  604. package/build/client/_app/immutable/chunks/CIE0U5Ih.js.br +0 -0
  605. package/build/client/_app/immutable/chunks/CIE0U5Ih.js.gz +0 -0
  606. package/build/client/_app/immutable/chunks/CIfcjhKg.js +0 -14
  607. package/build/client/_app/immutable/chunks/CIfcjhKg.js.br +0 -0
  608. package/build/client/_app/immutable/chunks/CIfcjhKg.js.gz +0 -0
  609. package/build/client/_app/immutable/chunks/CKhg4Tm6.js +0 -1
  610. package/build/client/_app/immutable/chunks/CKhg4Tm6.js.br +0 -0
  611. package/build/client/_app/immutable/chunks/CKhg4Tm6.js.gz +0 -0
  612. package/build/client/_app/immutable/chunks/CLs9Rkbg.js +0 -1
  613. package/build/client/_app/immutable/chunks/CLs9Rkbg.js.br +0 -0
  614. package/build/client/_app/immutable/chunks/CLs9Rkbg.js.gz +0 -0
  615. package/build/client/_app/immutable/chunks/COQ3aAYj.js +0 -1
  616. package/build/client/_app/immutable/chunks/COQ3aAYj.js.br +0 -0
  617. package/build/client/_app/immutable/chunks/COQ3aAYj.js.gz +0 -0
  618. package/build/client/_app/immutable/chunks/COiIt96y.js +0 -1
  619. package/build/client/_app/immutable/chunks/COiIt96y.js.br +0 -0
  620. package/build/client/_app/immutable/chunks/COiIt96y.js.gz +0 -0
  621. package/build/client/_app/immutable/chunks/CQ7gIAH8.js +0 -1
  622. package/build/client/_app/immutable/chunks/CQ7gIAH8.js.br +0 -2
  623. package/build/client/_app/immutable/chunks/CQ7gIAH8.js.gz +0 -0
  624. package/build/client/_app/immutable/chunks/CQlHU-Rx.js +0 -1
  625. package/build/client/_app/immutable/chunks/CQlHU-Rx.js.br +0 -0
  626. package/build/client/_app/immutable/chunks/CQlHU-Rx.js.gz +0 -0
  627. package/build/client/_app/immutable/chunks/CXfdgbLv.js +0 -1
  628. package/build/client/_app/immutable/chunks/CXfdgbLv.js.br +0 -0
  629. package/build/client/_app/immutable/chunks/CXfdgbLv.js.gz +0 -0
  630. package/build/client/_app/immutable/chunks/CdOazBBu.js +0 -1
  631. package/build/client/_app/immutable/chunks/CdOazBBu.js.br +0 -0
  632. package/build/client/_app/immutable/chunks/CdOazBBu.js.gz +0 -0
  633. package/build/client/_app/immutable/chunks/CeYIQAXD.js +0 -1
  634. package/build/client/_app/immutable/chunks/CeYIQAXD.js.br +0 -0
  635. package/build/client/_app/immutable/chunks/CeYIQAXD.js.gz +0 -0
  636. package/build/client/_app/immutable/chunks/CfdzAfq2.js +0 -1
  637. package/build/client/_app/immutable/chunks/CfdzAfq2.js.br +0 -0
  638. package/build/client/_app/immutable/chunks/CfdzAfq2.js.gz +0 -0
  639. package/build/client/_app/immutable/chunks/CkFDaaNz.js +0 -1
  640. package/build/client/_app/immutable/chunks/CkFDaaNz.js.br +0 -0
  641. package/build/client/_app/immutable/chunks/CkFDaaNz.js.gz +0 -0
  642. package/build/client/_app/immutable/chunks/CkLriSVx.js +0 -1
  643. package/build/client/_app/immutable/chunks/CkLriSVx.js.br +0 -0
  644. package/build/client/_app/immutable/chunks/CkLriSVx.js.gz +0 -0
  645. package/build/client/_app/immutable/chunks/Clzs_eXS.js +0 -5
  646. package/build/client/_app/immutable/chunks/Clzs_eXS.js.br +0 -0
  647. package/build/client/_app/immutable/chunks/Clzs_eXS.js.gz +0 -0
  648. package/build/client/_app/immutable/chunks/CrCQ2NNA.js +0 -1
  649. package/build/client/_app/immutable/chunks/CrCQ2NNA.js.br +0 -0
  650. package/build/client/_app/immutable/chunks/CrCQ2NNA.js.gz +0 -0
  651. package/build/client/_app/immutable/chunks/CrgqcyB_.js +0 -1
  652. package/build/client/_app/immutable/chunks/CrgqcyB_.js.br +0 -0
  653. package/build/client/_app/immutable/chunks/CrgqcyB_.js.gz +0 -0
  654. package/build/client/_app/immutable/chunks/CtlVBKf-.js +0 -1
  655. package/build/client/_app/immutable/chunks/CtlVBKf-.js.br +0 -0
  656. package/build/client/_app/immutable/chunks/CtlVBKf-.js.gz +0 -0
  657. package/build/client/_app/immutable/chunks/D4aeBIhU.js +0 -1
  658. package/build/client/_app/immutable/chunks/D4aeBIhU.js.br +0 -0
  659. package/build/client/_app/immutable/chunks/D4aeBIhU.js.gz +0 -0
  660. package/build/client/_app/immutable/chunks/DC8T2WRZ.js +0 -1
  661. package/build/client/_app/immutable/chunks/DC8T2WRZ.js.br +0 -0
  662. package/build/client/_app/immutable/chunks/DC8T2WRZ.js.gz +0 -0
  663. package/build/client/_app/immutable/chunks/DGy76IbW.js +0 -2
  664. package/build/client/_app/immutable/chunks/DGy76IbW.js.br +0 -0
  665. package/build/client/_app/immutable/chunks/DGy76IbW.js.gz +0 -0
  666. package/build/client/_app/immutable/chunks/DIABVMrA.js +0 -1
  667. package/build/client/_app/immutable/chunks/DIABVMrA.js.br +0 -0
  668. package/build/client/_app/immutable/chunks/DIABVMrA.js.gz +0 -0
  669. package/build/client/_app/immutable/chunks/DLith9Yi.js +0 -1
  670. package/build/client/_app/immutable/chunks/DLith9Yi.js.br +0 -0
  671. package/build/client/_app/immutable/chunks/DLith9Yi.js.gz +0 -0
  672. package/build/client/_app/immutable/chunks/Da92_52d.js +0 -1
  673. package/build/client/_app/immutable/chunks/Da92_52d.js.br +0 -0
  674. package/build/client/_app/immutable/chunks/Da92_52d.js.gz +0 -0
  675. package/build/client/_app/immutable/chunks/Db0WMrvR.js +0 -1
  676. package/build/client/_app/immutable/chunks/Db0WMrvR.js.br +0 -0
  677. package/build/client/_app/immutable/chunks/Db0WMrvR.js.gz +0 -0
  678. package/build/client/_app/immutable/chunks/Dlb_KqyS.js +0 -2
  679. package/build/client/_app/immutable/chunks/Dlb_KqyS.js.br +0 -0
  680. package/build/client/_app/immutable/chunks/Dlb_KqyS.js.gz +0 -0
  681. package/build/client/_app/immutable/chunks/Dq9kJk5R.js +0 -1
  682. package/build/client/_app/immutable/chunks/Dq9kJk5R.js.br +0 -0
  683. package/build/client/_app/immutable/chunks/Dq9kJk5R.js.gz +0 -0
  684. package/build/client/_app/immutable/chunks/DxGQT-Hz.js +0 -1
  685. package/build/client/_app/immutable/chunks/DxGQT-Hz.js.br +0 -0
  686. package/build/client/_app/immutable/chunks/DxGQT-Hz.js.gz +0 -0
  687. package/build/client/_app/immutable/chunks/ET-O1REu.js +0 -1
  688. package/build/client/_app/immutable/chunks/ET-O1REu.js.br +0 -0
  689. package/build/client/_app/immutable/chunks/ET-O1REu.js.gz +0 -0
  690. package/build/client/_app/immutable/chunks/FQ69txbU.js +0 -1
  691. package/build/client/_app/immutable/chunks/FQ69txbU.js.br +0 -0
  692. package/build/client/_app/immutable/chunks/FQ69txbU.js.gz +0 -0
  693. package/build/client/_app/immutable/chunks/L-6wuY5f.js +0 -2
  694. package/build/client/_app/immutable/chunks/L-6wuY5f.js.br +0 -0
  695. package/build/client/_app/immutable/chunks/L-6wuY5f.js.gz +0 -0
  696. package/build/client/_app/immutable/chunks/M201SoVK.js +0 -1
  697. package/build/client/_app/immutable/chunks/M201SoVK.js.br +0 -1
  698. package/build/client/_app/immutable/chunks/M201SoVK.js.gz +0 -0
  699. package/build/client/_app/immutable/chunks/OeqXO44y.js +0 -1
  700. package/build/client/_app/immutable/chunks/OeqXO44y.js.br +0 -0
  701. package/build/client/_app/immutable/chunks/OeqXO44y.js.gz +0 -0
  702. package/build/client/_app/immutable/chunks/PPVm8Dsz.js +0 -1
  703. package/build/client/_app/immutable/chunks/PPVm8Dsz.js.br +0 -0
  704. package/build/client/_app/immutable/chunks/PPVm8Dsz.js.gz +0 -0
  705. package/build/client/_app/immutable/chunks/QAFSHLn2.js +0 -1
  706. package/build/client/_app/immutable/chunks/QAFSHLn2.js.br +0 -0
  707. package/build/client/_app/immutable/chunks/QAFSHLn2.js.gz +0 -0
  708. package/build/client/_app/immutable/chunks/Tm9AblHs.js +0 -1
  709. package/build/client/_app/immutable/chunks/Tm9AblHs.js.br +0 -0
  710. package/build/client/_app/immutable/chunks/Tm9AblHs.js.gz +0 -0
  711. package/build/client/_app/immutable/chunks/_7N5fmOy.js +0 -2
  712. package/build/client/_app/immutable/chunks/_7N5fmOy.js.br +0 -0
  713. package/build/client/_app/immutable/chunks/_7N5fmOy.js.gz +0 -0
  714. package/build/client/_app/immutable/chunks/eMSiEzFi.js +0 -1
  715. package/build/client/_app/immutable/chunks/eMSiEzFi.js.br +0 -0
  716. package/build/client/_app/immutable/chunks/eMSiEzFi.js.gz +0 -0
  717. package/build/client/_app/immutable/chunks/euRlC7pA.js +0 -1
  718. package/build/client/_app/immutable/chunks/euRlC7pA.js.br +0 -1
  719. package/build/client/_app/immutable/chunks/euRlC7pA.js.gz +0 -0
  720. package/build/client/_app/immutable/chunks/hBAvbyDe.js +0 -4
  721. package/build/client/_app/immutable/chunks/hBAvbyDe.js.br +0 -0
  722. package/build/client/_app/immutable/chunks/hBAvbyDe.js.gz +0 -0
  723. package/build/client/_app/immutable/chunks/iVpzjqp1.js +0 -1
  724. package/build/client/_app/immutable/chunks/iVpzjqp1.js.br +0 -0
  725. package/build/client/_app/immutable/chunks/iVpzjqp1.js.gz +0 -0
  726. package/build/client/_app/immutable/chunks/m3YfhLk1.js +0 -1
  727. package/build/client/_app/immutable/chunks/m3YfhLk1.js.br +0 -0
  728. package/build/client/_app/immutable/chunks/m3YfhLk1.js.gz +0 -0
  729. package/build/client/_app/immutable/chunks/p7x6PRF0.js +0 -1
  730. package/build/client/_app/immutable/chunks/p7x6PRF0.js.br +0 -0
  731. package/build/client/_app/immutable/chunks/p7x6PRF0.js.gz +0 -0
  732. package/build/client/_app/immutable/chunks/t4rxsdjl.js +0 -74
  733. package/build/client/_app/immutable/chunks/t4rxsdjl.js.br +0 -0
  734. package/build/client/_app/immutable/chunks/t4rxsdjl.js.gz +0 -0
  735. package/build/client/_app/immutable/chunks/uD7-7yV9.js +0 -1
  736. package/build/client/_app/immutable/chunks/uD7-7yV9.js.br +0 -4
  737. package/build/client/_app/immutable/chunks/uD7-7yV9.js.gz +0 -0
  738. package/build/client/_app/immutable/entry/app.Dzyng0dn.js +0 -2
  739. package/build/client/_app/immutable/entry/app.Dzyng0dn.js.br +0 -0
  740. package/build/client/_app/immutable/entry/app.Dzyng0dn.js.gz +0 -0
  741. package/build/client/_app/immutable/entry/start.9fa7Jj4n.js +0 -1
  742. package/build/client/_app/immutable/entry/start.9fa7Jj4n.js.br +0 -0
  743. package/build/client/_app/immutable/entry/start.9fa7Jj4n.js.gz +0 -0
  744. package/build/client/_app/immutable/nodes/0.CaNaBMzB.js +0 -5
  745. package/build/client/_app/immutable/nodes/0.CaNaBMzB.js.br +0 -0
  746. package/build/client/_app/immutable/nodes/0.CaNaBMzB.js.gz +0 -0
  747. package/build/client/_app/immutable/nodes/1.BCMmEnhe.js +0 -1
  748. package/build/client/_app/immutable/nodes/1.BCMmEnhe.js.br +0 -0
  749. package/build/client/_app/immutable/nodes/1.BCMmEnhe.js.gz +0 -0
  750. package/build/client/_app/immutable/nodes/10.BO2VoEpn.js +0 -14
  751. package/build/client/_app/immutable/nodes/10.BO2VoEpn.js.br +0 -0
  752. package/build/client/_app/immutable/nodes/10.BO2VoEpn.js.gz +0 -0
  753. package/build/client/_app/immutable/nodes/11.BOR5Lt2T.js +0 -77
  754. package/build/client/_app/immutable/nodes/11.BOR5Lt2T.js.br +0 -0
  755. package/build/client/_app/immutable/nodes/11.BOR5Lt2T.js.gz +0 -0
  756. package/build/client/_app/immutable/nodes/12.BGnaA6g1.js +0 -32
  757. package/build/client/_app/immutable/nodes/12.BGnaA6g1.js.br +0 -0
  758. package/build/client/_app/immutable/nodes/12.BGnaA6g1.js.gz +0 -0
  759. package/build/client/_app/immutable/nodes/13.BMHoWbLt.js +0 -5
  760. package/build/client/_app/immutable/nodes/13.BMHoWbLt.js.br +0 -0
  761. package/build/client/_app/immutable/nodes/13.BMHoWbLt.js.gz +0 -0
  762. package/build/client/_app/immutable/nodes/14.BMIOGjF-.js +0 -1
  763. package/build/client/_app/immutable/nodes/14.BMIOGjF-.js.br +0 -0
  764. package/build/client/_app/immutable/nodes/14.BMIOGjF-.js.gz +0 -0
  765. package/build/client/_app/immutable/nodes/15.BDQ6GGok.js +0 -10
  766. package/build/client/_app/immutable/nodes/15.BDQ6GGok.js.br +0 -0
  767. package/build/client/_app/immutable/nodes/15.BDQ6GGok.js.gz +0 -0
  768. package/build/client/_app/immutable/nodes/16.BYZHF6Y1.js +0 -6
  769. package/build/client/_app/immutable/nodes/16.BYZHF6Y1.js.br +0 -0
  770. package/build/client/_app/immutable/nodes/16.BYZHF6Y1.js.gz +0 -0
  771. package/build/client/_app/immutable/nodes/2.DmiGTHZF.js +0 -4
  772. package/build/client/_app/immutable/nodes/2.DmiGTHZF.js.br +0 -0
  773. package/build/client/_app/immutable/nodes/2.DmiGTHZF.js.gz +0 -0
  774. package/build/client/_app/immutable/nodes/3.qyqfVtUJ.js +0 -5
  775. package/build/client/_app/immutable/nodes/3.qyqfVtUJ.js.br +0 -0
  776. package/build/client/_app/immutable/nodes/3.qyqfVtUJ.js.gz +0 -0
  777. package/build/client/_app/immutable/nodes/4.DMxs5dS-.js +0 -3
  778. package/build/client/_app/immutable/nodes/4.DMxs5dS-.js.br +0 -0
  779. package/build/client/_app/immutable/nodes/4.DMxs5dS-.js.gz +0 -0
  780. package/build/client/_app/immutable/nodes/5.pFV6qgYd.js +0 -7
  781. package/build/client/_app/immutable/nodes/5.pFV6qgYd.js.br +0 -0
  782. package/build/client/_app/immutable/nodes/5.pFV6qgYd.js.gz +0 -0
  783. package/build/client/_app/immutable/nodes/6.DKZQPZQe.js +0 -4
  784. package/build/client/_app/immutable/nodes/6.DKZQPZQe.js.br +0 -0
  785. package/build/client/_app/immutable/nodes/6.DKZQPZQe.js.gz +0 -0
  786. package/build/client/_app/immutable/nodes/7.DmCbsQpY.js +0 -1
  787. package/build/client/_app/immutable/nodes/7.DmCbsQpY.js.br +0 -0
  788. package/build/client/_app/immutable/nodes/7.DmCbsQpY.js.gz +0 -0
  789. package/build/client/_app/immutable/nodes/8.C5_-lQ12.js +0 -1
  790. package/build/client/_app/immutable/nodes/8.C5_-lQ12.js.br +0 -0
  791. package/build/client/_app/immutable/nodes/8.C5_-lQ12.js.gz +0 -0
  792. package/build/client/_app/immutable/nodes/9.DdS_3rh5.js +0 -1
  793. package/build/client/_app/immutable/nodes/9.DdS_3rh5.js.br +0 -0
  794. package/build/client/_app/immutable/nodes/9.DdS_3rh5.js.gz +0 -0
  795. package/build/server/chunks/chunks/AllowanceMeter.js-C9jRsAGU.js +0 -42
  796. package/build/server/chunks/chunks/DecisionCard.js-u1VQ9s_v.js +0 -350
  797. package/build/server/chunks/chunks/DictateTextarea.js-BlEnOzcN.js +0 -85
  798. package/build/server/chunks/chunks/EtaLine.js-Pa4_VV6V.js +0 -79
  799. package/build/server/chunks/chunks/Icon.js-D7CY3joB.js +0 -129
  800. package/build/server/chunks/chunks/InsightsNav.js-BlxFBJfj.js +0 -22
  801. package/build/server/chunks/chunks/MicButton.js-BZSQAyuM.js +0 -336
  802. package/build/server/chunks/chunks/QuestionList.js-DglKezUe.js +0 -259
  803. package/build/server/chunks/chunks/SlotContent.js-YqZXXtRz.js +0 -1977
  804. package/build/server/chunks/chunks/StageTrack.js-BaorW-yk.js +0 -59
  805. package/build/server/chunks/chunks/TimeBar.js-k38rc7ZI.js +0 -32
  806. package/build/server/chunks/chunks/TimeLegend.js-BQVvgsvs.js +0 -29
  807. package/build/server/chunks/chunks/access.js-XFAczbHS.js +0 -816
  808. package/build/server/chunks/chunks/anchor.js-ByXDBfbi.js +0 -20
  809. package/build/server/chunks/chunks/arrow-down.js-DXDJc9EE.js +0 -18
  810. package/build/server/chunks/chunks/arrow-left.js-6Yey35CE.js +0 -18
  811. package/build/server/chunks/chunks/arrow-right.js-CfbPWRqu.js +0 -18
  812. package/build/server/chunks/chunks/arrow-up.js-AhghNbhW.js +0 -18
  813. package/build/server/chunks/chunks/bell.js-CAlv92RY.js +0 -143
  814. package/build/server/chunks/chunks/blocks.js-BL9jLCe-.js +0 -710
  815. package/build/server/chunks/chunks/bus.svelte.js-DRTptEhF.js +0 -9
  816. package/build/server/chunks/chunks/button.js-HeBqLheH.js +0 -7311
  817. package/build/server/chunks/chunks/chat.svelte.js-Cgdbtjbw.js +0 -537
  818. package/build/server/chunks/chunks/check.js-bmUhmMEz.js +0 -15
  819. package/build/server/chunks/chunks/checks.js-BnIxIaus.js +0 -175
  820. package/build/server/chunks/chunks/chevron-down.js-D75hVSIe.js +0 -15
  821. package/build/server/chunks/chunks/chevron-right.js-yhLg_GaH.js +0 -15
  822. package/build/server/chunks/chunks/circle-dashed.js-Bm3gZCXK.js +0 -24
  823. package/build/server/chunks/chunks/client.js-BUNengrw.js +0 -24
  824. package/build/server/chunks/chunks/clock.js-D7JTvRbC.js +0 -18
  825. package/build/server/chunks/chunks/compass.js-Tq6uiG8I.js +0 -23
  826. package/build/server/chunks/chunks/detail.js-COMRu1TY.js +0 -133
  827. package/build/server/chunks/chunks/external-link.js-WxVF0xXO.js +0 -24
  828. package/build/server/chunks/chunks/file-text.js-CAo3vdqd.js +0 -26
  829. package/build/server/chunks/chunks/gauge.js-Dw9bgE72.js +0 -35
  830. package/build/server/chunks/chunks/git-pull-request.js-Cx1w8BQr.js +0 -20
  831. package/build/server/chunks/chunks/hammer.js-fp_Kidfj.js +0 -24
  832. package/build/server/chunks/chunks/hand.js-xkYPYJZj.js +0 -37
  833. package/build/server/chunks/chunks/harbour.js-xu7EfIHk.js +0 -113
  834. package/build/server/chunks/chunks/http.js-TzZuOtxn.js +0 -25
  835. package/build/server/chunks/chunks/http2.js-BO84xGO4.js +0 -26
  836. package/build/server/chunks/chunks/inbox.js-CW2sFmx9.js +0 -114
  837. package/build/server/chunks/chunks/inbox.svelte.js-OoKhjjWM.js +0 -134
  838. package/build/server/chunks/chunks/index-server.js-CtyUzIGY.js +0 -17
  839. package/build/server/chunks/chunks/index-server2.js-DMc-UvjC.js +0 -19
  840. package/build/server/chunks/chunks/index.js-Bn6j9diM.js +0 -1524
  841. package/build/server/chunks/chunks/index2.js-CXaRTuov.js +0 -46
  842. package/build/server/chunks/chunks/internal.js-C_uDXIpd.js +0 -146
  843. package/build/server/chunks/chunks/keys.js-CdtCzv-v.js +0 -20
  844. package/build/server/chunks/chunks/live.svelte.js-BRUTNc9D.js +0 -196
  845. package/build/server/chunks/chunks/loader-circle.js-IYRaUYWq.js +0 -16
  846. package/build/server/chunks/chunks/message-circle-question-mark.js-DwrMi0ty.js +0 -25
  847. package/build/server/chunks/chunks/message-square-text.js-N5uEmy8L.js +0 -25
  848. package/build/server/chunks/chunks/message-square.js-Hp-6BHgG.js +0 -22
  849. package/build/server/chunks/chunks/minus.js-bsfnwE-h.js +0 -15
  850. package/build/server/chunks/chunks/monitor-play.js-B7qbbPH6.js +0 -28
  851. package/build/server/chunks/chunks/preview.js-CVD-Kwks.js +0 -68
  852. package/build/server/chunks/chunks/prreview.js-C5XxDIu2.js +0 -85
  853. package/build/server/chunks/chunks/root.js-CQzYN4Pu.js +0 -3105
  854. package/build/server/chunks/chunks/runtime.js-fVZqJsqU.js +0 -13280
  855. package/build/server/chunks/chunks/scale.js-vP4G0lZM.js +0 -21
  856. package/build/server/chunks/chunks/shield-check.js-PJLnCKD9.js +0 -23
  857. package/build/server/chunks/chunks/slots.svelte.js-0Ejhe-hS.js +0 -34
  858. package/build/server/chunks/chunks/spec.js-B0yI1XqG.js +0 -307
  859. package/build/server/chunks/chunks/split.js-BsCU24rQ.js +0 -20
  860. package/build/server/chunks/chunks/square-terminal.js-D5Z4Sl2-.js +0 -47
  861. package/build/server/chunks/chunks/tone.js-r2qFVrZC.js +0 -30
  862. package/build/server/chunks/chunks/trash.js-DYFbRevY.js +0 -46
  863. package/build/server/chunks/chunks/triangle-alert.js-DuE40HSU.js +0 -38
  864. package/build/server/chunks/chunks/utils.js-DTSGDHlH.js +0 -2956
  865. package/build/server/chunks/chunks/view.js-tvgxW0fE.js +0 -76
  866. package/build/server/chunks/chunks/view2.js-BdUXqNlY.js +0 -87
  867. package/build/server/chunks/chunks/views.js-B0wP-tuB.js +0 -137
  868. package/build/server/chunks/chunks/waypoints.js-D3HN7bje.js +0 -67
  869. package/build/server/chunks/chunks/x.js-tlds9Ooz.js +0 -18
  870. package/build/server/chunks/entries/endpoints/api/events/_server.ts.js-gil57_h5.js +0 -93
  871. package/build/server/chunks/entries/endpoints/api/firstmate/chat/_server.ts.js-CWFdWS2r.js +0 -74
  872. package/build/server/chunks/entries/endpoints/api/firstmate/commands/_server.ts.js-0h1duDYU.js +0 -110
  873. package/build/server/chunks/entries/endpoints/api/firstmate/input/_server.ts.js-DUtAFI8B.js +0 -42
  874. package/build/server/chunks/entries/endpoints/api/firstmate/interrupt/_server.ts.js-BVjvk1Kr.js +0 -35
  875. package/build/server/chunks/entries/endpoints/api/firstmate/messages/_server.ts.js-CZKuOhTq.js +0 -57
  876. package/build/server/chunks/entries/endpoints/api/firstmate/pick/_server.ts.js-DbYNDgMY.js +0 -45
  877. package/build/server/chunks/entries/endpoints/api/firstmate/start/_server.ts.js-Dez_V83F.js +0 -35
  878. package/build/server/chunks/entries/endpoints/api/fleet/_server.ts.js-XScFl7NC.js +0 -27
  879. package/build/server/chunks/entries/endpoints/api/health/_server.ts.js-BOvoz2OJ.js +0 -27
  880. package/build/server/chunks/entries/endpoints/api/inbox/_server.ts.js-DuUHrmV4.js +0 -51
  881. package/build/server/chunks/entries/endpoints/api/insights/_server.ts.js-P-j2jdcu.js +0 -27
  882. package/build/server/chunks/entries/endpoints/api/plugins/_server.ts.js-BuaL2gbp.js +0 -27
  883. package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/_server.ts.js-Dwoaon5p.js +0 -32
  884. package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/commands/_server.ts.js-CpRObQnb.js +0 -41
  885. package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/consent/_server.ts.js-Dml05WPU.js +0 -53
  886. package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/draft/_server.ts.js-rp9RtX4F.js +0 -40
  887. package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/file/_server.ts.js-DLdJWcj-.js +0 -63
  888. package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/test/_server.ts.js-Co_h1q_m.js +0 -46
  889. package/build/server/chunks/entries/endpoints/api/services/_server.ts.js-SRzfx-2h.js +0 -46
  890. package/build/server/chunks/entries/endpoints/api/slots/_server.ts.js-lFuRL8QC.js +0 -35
  891. package/build/server/chunks/entries/endpoints/api/specs/_id_/_server.ts.js-D-QFRPpb.js +0 -59
  892. package/build/server/chunks/entries/endpoints/api/specs/_id_/build-request/_server.ts.js-CEZLC3cJ.js +0 -47
  893. package/build/server/chunks/entries/endpoints/api/specs/_id_/comments/_comment_/_server.ts.js-BHNzMZ7H.js +0 -36
  894. package/build/server/chunks/entries/endpoints/api/specs/_id_/comments/_server.ts.js-DHMiene7.js +0 -57
  895. package/build/server/chunks/entries/endpoints/api/specs/_id_/images/_name_/_server.ts.js-BxmqxnuG.js +0 -49
  896. package/build/server/chunks/entries/endpoints/api/specs/_id_/images/_server.ts.js-CvRTk1JX.js +0 -55
  897. package/build/server/chunks/entries/endpoints/api/specs/_id_/sent/_server.ts.js-VHXvHVC9.js +0 -36
  898. package/build/server/chunks/entries/endpoints/api/specs/_id_/turn/_server.ts.js-BjbvOskQ.js +0 -82
  899. package/build/server/chunks/entries/endpoints/api/specs/_server.ts.js-CUNgX4FQ.js +0 -40
  900. package/build/server/chunks/entries/endpoints/api/tasks/_id_/_server.ts.js-CTJxYuKH.js +0 -32
  901. package/build/server/chunks/entries/endpoints/api/tasks/_id_/artifacts/_...name_/_server.ts.js-BsDmTo5q.js +0 -51
  902. package/build/server/chunks/entries/endpoints/api/tasks/_id_/diff/_server.ts.js-DmDd31bm.js +0 -39
  903. package/build/server/chunks/entries/endpoints/api/tasks/_id_/output/_server.ts.js-xNagO0jC.js +0 -84
  904. package/build/server/chunks/entries/endpoints/api/tasks/_id_/preview/_server.ts.js-fNh7CbDX.js +0 -102
  905. package/build/server/chunks/entries/endpoints/api/tasks/_id_/review/_server.ts.js-DL1M1PqI.js +0 -34
  906. package/build/server/chunks/entries/endpoints/api/tasks/_id_/review/ask/_server.ts.js-G8t4mipV.js +0 -40
  907. package/build/server/chunks/entries/endpoints/api/tasks/_id_/review/check/_server.ts.js-B0ymV1Pa.js +0 -39
  908. package/build/server/chunks/entries/endpoints/api/tasks/_id_/review/guide/_server.ts.js-Bi08FNu1.js +0 -39
  909. package/build/server/chunks/entries/endpoints/api/tasks/_id_/review/runs/_run_/stop/_server.ts.js-C_TftzeG.js +0 -32
  910. package/build/server/chunks/entries/fallbacks/error.svelte.js-DlN_tCrh.js +0 -15
  911. package/build/server/chunks/entries/hooks.server.js-IwCMs7or.js +0 -40
  912. package/build/server/chunks/entries/pages/_layout.server.ts.js-DQI-pH0T.js +0 -20
  913. package/build/server/chunks/entries/pages/_layout.svelte.js-BJuZaosz.js +0 -10454
  914. package/build/server/chunks/entries/pages/_page.server.ts.js-PgqrVobO.js +0 -16
  915. package/build/server/chunks/entries/pages/_page.svelte.js-BI4c5H0n.js +0 -3699
  916. package/build/server/chunks/entries/pages/decisions/_page.server.ts.js-SL6FScVj.js +0 -11
  917. package/build/server/chunks/entries/pages/decisions/_page.svelte.js-ClTz3O_K.js +0 -167
  918. package/build/server/chunks/entries/pages/harbour/_page.server.ts.js-DIvSuIkZ.js +0 -20
  919. package/build/server/chunks/entries/pages/harbour/_page.svelte.js-43FRNSVK.js +0 -1346
  920. package/build/server/chunks/entries/pages/headroom/_page.server.ts.js-CGLa7Yrr.js +0 -11
  921. package/build/server/chunks/entries/pages/headroom/_page.svelte.js-zmKQdAwy.js +0 -135
  922. package/build/server/chunks/entries/pages/inbox/_page.svelte.js-wTvAFPNM.js +0 -175
  923. package/build/server/chunks/entries/pages/plugins/_plugin_/_page_/_page.server.ts.js-BoG4CT_l.js +0 -15
  924. package/build/server/chunks/entries/pages/plugins/_plugin_/_page_/_page.svelte.js-DfAqJJ3i.js +0 -55
  925. package/build/server/chunks/entries/pages/projects/_id_/_plugin_/_tab_/_page.server.ts.js-BVTs44zi.js +0 -15
  926. package/build/server/chunks/entries/pages/projects/_id_/_plugin_/_tab_/_page.svelte.js-B472Pugu.js +0 -66
  927. package/build/server/chunks/entries/pages/projects/_id_/passage/_page.server.ts.js-CER4deq2.js +0 -14
  928. package/build/server/chunks/entries/pages/projects/_id_/passage/_page.svelte.js-CWjEArXY.js +0 -394
  929. package/build/server/chunks/entries/pages/projects/_id_/passage/edit/_page.server.ts.js-DiCdDip4.js +0 -15
  930. package/build/server/chunks/entries/pages/projects/_id_/passage/edit/_page.svelte.js-iHacn81K.js +0 -1859
  931. package/build/server/chunks/entries/pages/projects/_page.server.ts.js-BH_VcZlY.js +0 -37
  932. package/build/server/chunks/entries/pages/projects/_page.svelte.js-B_NQ-Wg3.js +0 -270
  933. package/build/server/chunks/entries/pages/spec/_page.server.ts.js-CTzZ3jGx.js +0 -31
  934. package/build/server/chunks/entries/pages/spec/_page.svelte.js-BJjweG9u.js +0 -1561
  935. package/build/server/chunks/entries/pages/tasks/_id_/_page.server.ts.js-YgQ9nhRn.js +0 -25
  936. package/build/server/chunks/entries/pages/tasks/_id_/_page.svelte.js-Dr2wwDJG.js +0 -2063
  937. package/build/server/chunks/entries/pages/tasks/_id_/doc/_page.server.ts.js-DdBsWj8_.js +0 -24
  938. package/build/server/chunks/entries/pages/tasks/_id_/doc/_page.svelte.js-DOyZ1QzI.js +0 -145
  939. package/build/server/chunks/entries/pages/tasks/_id_/review/_page.server.ts.js-DY0lh_8-.js +0 -15
  940. package/build/server/chunks/entries/pages/tasks/_id_/review/_page.svelte.js-BDaRELgE.js +0 -692
  941. package/build/server/chunks/entries/pages/time/_page.server.ts.js-kriWArLo.js +0 -11
  942. package/build/server/chunks/entries/pages/time/_page.svelte.js-CSXGxvVs.js +0 -107
  943. package/build/server/chunks/handler-BZ-YqSXJ.js +0 -1474
  944. package/build/server/chunks/index.js-CmcXVwBU.js +0 -4296
  945. package/build/server/chunks/manifest.js-DqwS7AJB.js +0 -434
  946. package/build/server/chunks/nodes/0.js-DS2IDkUW.js +0 -32
  947. package/build/server/chunks/nodes/1.js-_0OBbjVP.js +0 -9
  948. package/build/server/chunks/nodes/10.js-CMSpRrcc.js +0 -33
  949. package/build/server/chunks/nodes/11.js-D1M01GlQ.js +0 -33
  950. package/build/server/chunks/nodes/12.js-DaC2vk2U.js +0 -37
  951. package/build/server/chunks/nodes/13.js-BSWYX8Ak.js +0 -33
  952. package/build/server/chunks/nodes/14.js-CY9oBxXM.js +0 -33
  953. package/build/server/chunks/nodes/15.js-Bg9hD2dR.js +0 -33
  954. package/build/server/chunks/nodes/16.js-qlcIEvV6.js +0 -32
  955. package/build/server/chunks/nodes/2.js-CW_-me_g.js +0 -32
  956. package/build/server/chunks/nodes/3.js-CUCcQUgI.js +0 -32
  957. package/build/server/chunks/nodes/4.js-CSYxmBts.js +0 -34
  958. package/build/server/chunks/nodes/5.js-CHwpTnZj.js +0 -32
  959. package/build/server/chunks/nodes/6.js-XHZwJGEg.js +0 -9
  960. package/build/server/chunks/nodes/7.js-DK_vuZQs.js +0 -32
  961. package/build/server/chunks/nodes/8.js-Crd93Nlx.js +0 -34
  962. package/build/server/chunks/nodes/9.js-CWqhWBb9.js +0 -32
  963. /package/build/client/_app/immutable/assets/{4.5dJKCkOT.css → 5.5dJKCkOT.css} +0 -0
  964. /package/build/client/_app/immutable/assets/{4.5dJKCkOT.css.br → 5.5dJKCkOT.css.br} +0 -0
  965. /package/build/client/_app/immutable/assets/{4.5dJKCkOT.css.gz → 5.5dJKCkOT.css.gz} +0 -0
  966. /package/build/client/_app/immutable/assets/{MicButton.Dga9zAug.css → checks.Dga9zAug.css} +0 -0
  967. /package/build/client/_app/immutable/assets/{MicButton.Dga9zAug.css.br → checks.Dga9zAug.css.br} +0 -0
  968. /package/build/client/_app/immutable/assets/{MicButton.Dga9zAug.css.gz → checks.Dga9zAug.css.gz} +0 -0
@@ -0,0 +1,2985 @@
1
+ import { b as base64_decode } from './utils2.js-BQzn9ikS.js';
2
+
3
+ /** @import { StandardSchemaV1 } from '@standard-schema/spec' */
4
+
5
+ class HttpError {
6
+ /**
7
+ * @param {number} status
8
+ * @param {{message: string} extends App.Error ? (App.Error | string | undefined) : App.Error} body
9
+ */
10
+ constructor(status, body) {
11
+ this.status = status;
12
+ if (typeof body === 'string') {
13
+ this.body = { message: body };
14
+ } else if (body) {
15
+ this.body = body;
16
+ } else {
17
+ this.body = { message: `Error: ${status}` };
18
+ }
19
+ }
20
+
21
+ toString() {
22
+ return JSON.stringify(this.body);
23
+ }
24
+ }
25
+
26
+ class Redirect {
27
+ /**
28
+ * @param {300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308} status
29
+ * @param {string} location
30
+ */
31
+ constructor(status, location) {
32
+ try {
33
+ new Headers({ location });
34
+ } catch {
35
+ throw new Error(
36
+ `Invalid redirect location ${JSON.stringify(location)}: ` +
37
+ 'this string contains characters that cannot be used in HTTP headers'
38
+ );
39
+ }
40
+
41
+ this.status = status;
42
+ this.location = location;
43
+ }
44
+ }
45
+
46
+ /**
47
+ * An error that was thrown from within the SvelteKit runtime that is not fatal and doesn't result in a 500, such as a 404.
48
+ * `SvelteKitError` goes through `handleError`.
49
+ * @extends Error
50
+ */
51
+ class SvelteKitError extends Error {
52
+ /**
53
+ * @param {number} status
54
+ * @param {string} text
55
+ * @param {string} message
56
+ */
57
+ constructor(status, text, message) {
58
+ super(message);
59
+ this.status = status;
60
+ this.text = text;
61
+ }
62
+ }
63
+
64
+ /**
65
+ * @template [T=undefined]
66
+ */
67
+ class ActionFailure {
68
+ /**
69
+ * @param {number} status
70
+ * @param {T} data
71
+ */
72
+ constructor(status, data) {
73
+ this.status = status;
74
+ this.data = data;
75
+ }
76
+ }
77
+
78
+ var defaultParseOptions = {
79
+ decodeValues: true,
80
+ map: false,
81
+ silent: false,
82
+ split: "auto", // auto = split strings but not arrays
83
+ };
84
+
85
+ function isForbiddenKey(key) {
86
+ return typeof key !== "string" || key in {};
87
+ }
88
+
89
+ function createNullObj() {
90
+ return Object.create(null);
91
+ }
92
+
93
+ function isNonEmptyString(str) {
94
+ return typeof str === "string" && !!str.trim();
95
+ }
96
+
97
+ function parseString(setCookieValue, options) {
98
+ var parts = setCookieValue.split(";").filter(isNonEmptyString);
99
+
100
+ var nameValuePairStr = parts.shift();
101
+ if (!nameValuePairStr) {
102
+ return null;
103
+ }
104
+ var parsed = parseNameValuePair(nameValuePairStr);
105
+ var name = parsed.name;
106
+ var value = parsed.value;
107
+
108
+ options = options
109
+ ? Object.assign({}, defaultParseOptions, options)
110
+ : defaultParseOptions;
111
+
112
+ if (isForbiddenKey(name)) {
113
+ return null;
114
+ }
115
+
116
+ try {
117
+ value = options.decodeValues ? decodeURIComponent(value) : value; // decode cookie value
118
+ } catch (e) {
119
+ console.error(
120
+ "set-cookie-parser: failed to decode cookie value. Set options.decodeValues=false to disable decoding.",
121
+ e
122
+ );
123
+ }
124
+
125
+ var cookie = createNullObj();
126
+ cookie.name = name;
127
+ cookie.value = value;
128
+
129
+ parts.forEach(function (part) {
130
+ var sides = part.split("=");
131
+ var key = sides.shift().trim().toLowerCase();
132
+ if (isForbiddenKey(key)) {
133
+ return;
134
+ }
135
+ var value = sides.join("=").trim();
136
+ if (key === "expires") {
137
+ cookie.expires = new Date(value);
138
+ } else if (key === "max-age") {
139
+ var n = parseInt(value, 10);
140
+ if (!Number.isNaN(n)) cookie.maxAge = n;
141
+ } else if (key === "secure") {
142
+ cookie.secure = true;
143
+ } else if (key === "httponly") {
144
+ cookie.httpOnly = true;
145
+ } else if (key === "samesite") {
146
+ cookie.sameSite = value;
147
+ } else if (key === "partitioned") {
148
+ cookie.partitioned = true;
149
+ } else if (key) {
150
+ cookie[key] = value;
151
+ }
152
+ });
153
+
154
+ return cookie;
155
+ }
156
+
157
+ function parseNameValuePair(nameValuePairStr) {
158
+ // Parses name-value-pair according to rfc6265bis draft
159
+
160
+ var name = "";
161
+ var value = "";
162
+ var nameValueArr = nameValuePairStr.split("=");
163
+ if (nameValueArr.length > 1) {
164
+ name = nameValueArr.shift();
165
+ value = nameValueArr.join("="); // everything after the first =, joined by a "=" if there was more than one part
166
+ } else {
167
+ value = nameValuePairStr;
168
+ }
169
+
170
+ // rfc6265 5.2: remove any leading or trailing WSP characters from the name string and the value string
171
+ return { name: trimWsp(name), value: trimWsp(value) };
172
+ }
173
+
174
+ // Trims only WSP (SP / HTAB), per rfc6265. Unlike String.prototype.trim(), this leaves other
175
+ // whitespace (e.g. NBSP) alone, and it is linear-time.
176
+ function trimWsp(str) {
177
+ var start = 0;
178
+ var end = str.length;
179
+ while (start < end && isWsp(str.charCodeAt(start))) {
180
+ start += 1;
181
+ }
182
+ while (end > start && isWsp(str.charCodeAt(end - 1))) {
183
+ end -= 1;
184
+ }
185
+ return str.substring(start, end);
186
+ }
187
+
188
+ function isWsp(code) {
189
+ return code === 0x20 || code === 0x09;
190
+ }
191
+
192
+ function parseSetCookie(input, options) {
193
+ options = options
194
+ ? Object.assign({}, defaultParseOptions, options)
195
+ : defaultParseOptions;
196
+
197
+ if (!input) {
198
+ if (!options.map) {
199
+ return [];
200
+ } else {
201
+ return createNullObj();
202
+ }
203
+ }
204
+
205
+ if (input.headers) {
206
+ if (typeof input.headers.getSetCookie === "function") {
207
+ // for fetch responses - they combine headers of the same type in the headers array,
208
+ // but getSetCookie returns an uncombined array
209
+ input = input.headers.getSetCookie();
210
+ } else if (input.headers["set-cookie"]) {
211
+ // fast-path for node.js (which automatically normalizes header names to lower-case)
212
+ input = input.headers["set-cookie"];
213
+ } else {
214
+ // slow-path for other environments - see #25
215
+ var sch =
216
+ input.headers[
217
+ Object.keys(input.headers).find(function (key) {
218
+ return key.toLowerCase() === "set-cookie";
219
+ })
220
+ ];
221
+ // warn if called on a request-like object with a cookie header rather than a set-cookie header - see #34, 36
222
+ if (!sch && input.headers.cookie && !options.silent) {
223
+ console.warn(
224
+ "Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."
225
+ );
226
+ }
227
+ input = sch;
228
+ }
229
+ }
230
+
231
+ var split = options.split;
232
+ var isArray = Array.isArray(input);
233
+
234
+ if (split === "auto") {
235
+ split = !isArray;
236
+ }
237
+
238
+ if (!isArray) {
239
+ input = [input];
240
+ }
241
+
242
+ input = input.filter(isNonEmptyString);
243
+
244
+ if (split) {
245
+ input = input.map(splitCookiesString).flat();
246
+ }
247
+
248
+ if (!options.map) {
249
+ return input
250
+ .map(function (str) {
251
+ return parseString(str, options);
252
+ })
253
+ .filter(Boolean);
254
+ } else {
255
+ var cookies = createNullObj();
256
+ return input.reduce(function (cookies, str) {
257
+ var cookie = parseString(str, options);
258
+ if (cookie && !isForbiddenKey(cookie.name)) {
259
+ cookies[cookie.name] = cookie;
260
+ }
261
+ return cookies;
262
+ }, cookies);
263
+ }
264
+ }
265
+
266
+ /*
267
+ Set-Cookie header field-values are sometimes comma joined in one string. This splits them without choking on commas
268
+ that are within a single set-cookie field-value, such as in the Expires portion.
269
+
270
+ This is uncommon, but explicitly allowed - see https://tools.ietf.org/html/rfc2616#section-4.2
271
+ Node.js does this for every header *except* set-cookie - see https://github.com/nodejs/node/blob/d5e363b77ebaf1caf67cd7528224b651c86815c1/lib/_http_incoming.js#L128
272
+ React Native's fetch does this for *every* header, including set-cookie.
273
+
274
+ Based on: https://github.com/google/j2objc/commit/16820fdbc8f76ca0c33472810ce0cb03d20efe25
275
+ Credits to: https://github.com/tomball for original and https://github.com/chrusart for JavaScript implementation
276
+ */
277
+ function splitCookiesString(cookiesString) {
278
+ if (Array.isArray(cookiesString)) {
279
+ return cookiesString;
280
+ }
281
+ if (typeof cookiesString !== "string") {
282
+ return [];
283
+ }
284
+
285
+ var cookiesStrings = [];
286
+ var pos = 0;
287
+ var start;
288
+ var ch;
289
+ var lastComma;
290
+ var nextStart;
291
+ var cookiesSeparatorFound;
292
+
293
+ function skipWhitespace() {
294
+ while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) {
295
+ pos += 1;
296
+ }
297
+ return pos < cookiesString.length;
298
+ }
299
+
300
+ function notSpecialChar() {
301
+ ch = cookiesString.charAt(pos);
302
+
303
+ return ch !== "=" && ch !== ";" && ch !== ",";
304
+ }
305
+
306
+ while (pos < cookiesString.length) {
307
+ start = pos;
308
+ cookiesSeparatorFound = false;
309
+
310
+ while (skipWhitespace()) {
311
+ ch = cookiesString.charAt(pos);
312
+ if (ch === ",") {
313
+ // ',' is a cookie separator if we have later first '=', not ';' or ','
314
+ lastComma = pos;
315
+ pos += 1;
316
+
317
+ skipWhitespace();
318
+ nextStart = pos;
319
+
320
+ while (pos < cookiesString.length && notSpecialChar()) {
321
+ pos += 1;
322
+ }
323
+
324
+ // currently special character
325
+ if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") {
326
+ // we found cookies separator
327
+ cookiesSeparatorFound = true;
328
+ // pos is inside the next cookie, so back up and return it.
329
+ pos = nextStart;
330
+ cookiesStrings.push(cookiesString.substring(start, lastComma));
331
+ start = pos;
332
+ } else {
333
+ // in param ',' or param separator ';',
334
+ // we continue from that comma
335
+ pos = lastComma + 1;
336
+ }
337
+ } else {
338
+ pos += 1;
339
+ }
340
+ }
341
+
342
+ if (!cookiesSeparatorFound || pos >= cookiesString.length) {
343
+ cookiesStrings.push(cookiesString.substring(start, cookiesString.length));
344
+ }
345
+ }
346
+
347
+ return cookiesStrings;
348
+ }
349
+
350
+ // named export for CJS
351
+ parseSetCookie.parseSetCookie = parseSetCookie;
352
+ // for backwards compatibility
353
+ parseSetCookie.parse = parseSetCookie;
354
+ parseSetCookie.parseString = parseString;
355
+ parseSetCookie.splitCookiesString = splitCookiesString;
356
+
357
+ const UNDEFINED = -1;
358
+ const HOLE = -2;
359
+ const NAN = -3;
360
+ const POSITIVE_INFINITY = -4;
361
+ const NEGATIVE_INFINITY = -5;
362
+ const NEGATIVE_ZERO = -6;
363
+ const SPARSE = -7;
364
+
365
+ // The largest valid value for a JavaScript array's `length` property,
366
+ // and the largest valid array index (one less than the max length).
367
+ const MAX_ARRAY_LEN = 2 ** 32 - 1;
368
+ const MAX_ARRAY_INDEX = MAX_ARRAY_LEN - 1;
369
+
370
+ /** @type {Record<string, string>} */
371
+ const escaped = {
372
+ '<': '\\u003C',
373
+ '\\': '\\\\',
374
+ '\b': '\\b',
375
+ '\f': '\\f',
376
+ '\n': '\\n',
377
+ '\r': '\\r',
378
+ '\t': '\\t',
379
+ '\u2028': '\\u2028',
380
+ '\u2029': '\\u2029'
381
+ };
382
+
383
+ class DevalueError extends Error {
384
+ /**
385
+ * @param {string} message
386
+ * @param {string[]} keys
387
+ * @param {any} [value] - The value that failed to be serialized
388
+ * @param {any} [root] - The root value being serialized
389
+ */
390
+ constructor(message, keys, value, root) {
391
+ super(message);
392
+ this.name = 'DevalueError';
393
+ this.path = keys.join('');
394
+ this.value = value;
395
+ this.root = root;
396
+ }
397
+ }
398
+
399
+ /** @param {any} thing */
400
+ function is_primitive(thing) {
401
+ return thing === null || (typeof thing !== 'object' && typeof thing !== 'function');
402
+ }
403
+
404
+ const object_proto_names = /* @__PURE__ */ Object.getOwnPropertyNames(Object.prototype)
405
+ .sort()
406
+ .join('\0');
407
+
408
+ /** @param {any} thing */
409
+ function is_plain_object(thing) {
410
+ const proto = Object.getPrototypeOf(thing);
411
+
412
+ return (
413
+ proto === Object.prototype ||
414
+ proto === null ||
415
+ Object.getPrototypeOf(proto) === null ||
416
+ Object.getOwnPropertyNames(proto).sort().join('\0') === object_proto_names
417
+ );
418
+ }
419
+
420
+ /** @param {any} thing */
421
+ function get_type(thing) {
422
+ return Object.prototype.toString.call(thing).slice(8, -1);
423
+ }
424
+
425
+ /** @param {any} thing */
426
+ function is_buffer(thing) {
427
+ return typeof Buffer !== 'undefined' && Buffer.isBuffer(thing);
428
+ }
429
+
430
+ /** @param {string} char */
431
+ function get_escaped_char(char) {
432
+ switch (char) {
433
+ case '"':
434
+ return '\\"';
435
+ case '<':
436
+ return '\\u003C';
437
+ case '\\':
438
+ return '\\\\';
439
+ case '\n':
440
+ return '\\n';
441
+ case '\r':
442
+ return '\\r';
443
+ case '\t':
444
+ return '\\t';
445
+ case '\b':
446
+ return '\\b';
447
+ case '\f':
448
+ return '\\f';
449
+ case '\u2028':
450
+ return '\\u2028';
451
+ case '\u2029':
452
+ return '\\u2029';
453
+ default:
454
+ return char < ' ' ? `\\u${char.charCodeAt(0).toString(16).padStart(4, '0')}` : '';
455
+ }
456
+ }
457
+
458
+ /** @param {string} str */
459
+ function stringify_string(str) {
460
+ let result = '';
461
+ let last_pos = 0;
462
+ const len = str.length;
463
+
464
+ for (let i = 0; i < len; i += 1) {
465
+ const char = str[i];
466
+ const replacement = get_escaped_char(char);
467
+ if (replacement) {
468
+ result += str.slice(last_pos, i) + replacement;
469
+ last_pos = i + 1;
470
+ }
471
+ }
472
+
473
+ return `"${last_pos === 0 ? str : result + str.slice(last_pos)}"`;
474
+ }
475
+
476
+ /** @param {Record<string | symbol, any>} object */
477
+ function enumerable_symbols(object) {
478
+ return Object.getOwnPropertySymbols(object).filter(
479
+ (symbol) => Object.getOwnPropertyDescriptor(object, symbol).enumerable
480
+ );
481
+ }
482
+
483
+ const is_identifier = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
484
+
485
+ /** @param {string} key */
486
+ function stringify_key(key) {
487
+ return is_identifier.test(key) ? '.' + key : '[' + JSON.stringify(key) + ']';
488
+ }
489
+
490
+ /** @param {number} n */
491
+ function is_valid_array_index(n) {
492
+ if (!Number.isInteger(n)) return false;
493
+ if (n < 0) return false;
494
+ if (n > MAX_ARRAY_INDEX) return false;
495
+ return true;
496
+ }
497
+
498
+ /** @param {number} n */
499
+ function is_valid_array_len(n) {
500
+ if (!Number.isInteger(n)) return false;
501
+ if (n < 0) return false;
502
+ if (n > MAX_ARRAY_LEN) return false;
503
+ return true;
504
+ }
505
+
506
+ /** @param {string} s */
507
+ function is_valid_array_index_string(s) {
508
+ if (s.length === 0) return false;
509
+ if (s.length > 1 && s.charCodeAt(0) === 48) return false; // leading zero
510
+ for (let i = 0; i < s.length; i++) {
511
+ const c = s.charCodeAt(i);
512
+ if (c < 48 || c > 57) return false;
513
+ }
514
+ // by this point we know it's a string of digits, but it has to be within
515
+ // the range of valid array indices
516
+ return is_valid_array_index(+s);
517
+ }
518
+
519
+ /**
520
+ * Returns the length of the leading run of valid array indices in `keys`.
521
+ * @param {readonly string[]} keys
522
+ */
523
+ function array_index_cut(keys) {
524
+ for (var i = keys.length - 1; i >= 0; i--) {
525
+ if (is_valid_array_index_string(keys[i])) {
526
+ break;
527
+ }
528
+ }
529
+ return i + 1;
530
+ }
531
+
532
+ /**
533
+ * Finds the populated indices of an array.
534
+ * @param {unknown[]} array
535
+ */
536
+ function valid_array_indices(array) {
537
+ const keys = Object.keys(array);
538
+ keys.length = array_index_cut(keys);
539
+ return keys;
540
+ }
541
+
542
+ const chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$';
543
+ // Short strings have bounded escaping/output costs per reference, so they cannot
544
+ // cause quadratic expansion. Keep them on the original fast path rather than
545
+ // paying for deduplication on common values such as names, IDs and status fields.
546
+ const MIN_STRING_LENGTH = 128;
547
+ const unsafe_chars = /[<\b\f\n\r\t\0\u2028\u2029]/g;
548
+ const reserved =
549
+ /^(?:do|if|in|for|int|let|new|try|var|byte|case|char|else|enum|goto|long|this|void|with|await|break|catch|class|const|final|float|short|super|throw|while|yield|delete|double|export|import|native|return|switch|throws|typeof|boolean|default|extends|finally|package|private|abstract|continue|debugger|function|volatile|interface|protected|transient|implements|instanceof|synchronized)$/;
550
+
551
+ /**
552
+ * Turn a value into the JavaScript that creates an equivalent value
553
+ * @param {any} value
554
+ * @param {(value: any, uneval: (value: any) => string) => string | void} [replacer]
555
+ */
556
+ function uneval(value, replacer) {
557
+ const counts = new Map();
558
+
559
+ /** @type {string[]} */
560
+ const keys = [];
561
+
562
+ const custom = new Map();
563
+
564
+ // Only allocate a literal cache when we need to reuse an expensive primitive,
565
+ // including long Map keys rendered in error paths during the walk.
566
+ /** @type {Map<string | bigint, string> | undefined} */
567
+ let primitives;
568
+
569
+ /** @param {any} thing */
570
+ function stringify_cached_primitive(thing) {
571
+ if (
572
+ (typeof thing === 'string' && thing.length >= MIN_STRING_LENGTH) ||
573
+ typeof thing === 'bigint'
574
+ ) {
575
+ primitives ??= new Map();
576
+ let literal = primitives.get(thing);
577
+ if (literal === undefined) {
578
+ literal = stringify_primitive$1(thing);
579
+ primitives.set(thing, literal);
580
+ }
581
+ return literal;
582
+ }
583
+ return stringify_primitive$1(thing);
584
+ }
585
+
586
+ /** @param {any} thing */
587
+ function walk(thing) {
588
+ if (!is_primitive(thing)) {
589
+ if (counts.has(thing)) {
590
+ counts.set(thing, counts.get(thing) + 1);
591
+ return;
592
+ }
593
+
594
+ counts.set(thing, 1);
595
+
596
+ if (replacer) {
597
+ const str = replacer(thing, (value) => uneval(value, replacer));
598
+
599
+ if (typeof str === 'string') {
600
+ custom.set(thing, str);
601
+ return;
602
+ }
603
+ }
604
+
605
+ if (typeof thing === 'function') {
606
+ throw new DevalueError(`Cannot stringify a function`, keys, thing, value);
607
+ }
608
+
609
+ const type = get_type(thing);
610
+
611
+ switch (type) {
612
+ case 'BigInt':
613
+ case 'String':
614
+ walk(thing.valueOf());
615
+ return;
616
+
617
+ case 'Number':
618
+ case 'Boolean':
619
+ case 'Date':
620
+ case 'RegExp':
621
+ case 'URL':
622
+ case 'URLSearchParams':
623
+ return;
624
+
625
+ case 'Array':
626
+ // forEach scans the logical length of dictionary-backed sparse
627
+ // arrays. Visit own enumerable indices without doing work for
628
+ // every hole.
629
+ for (const i of valid_array_indices(thing)) {
630
+ keys.push(`[${i}]`);
631
+ walk(thing[i]);
632
+ keys.pop();
633
+ }
634
+ break;
635
+
636
+ case 'Set':
637
+ Array.from(thing).forEach(walk);
638
+ break;
639
+
640
+ case 'Map':
641
+ for (const [key, value] of thing) {
642
+ keys.push(`.get(${is_primitive(key) ? stringify_cached_primitive(key) : '...'})`);
643
+ walk(key);
644
+ walk(value);
645
+ keys.pop();
646
+ }
647
+ break;
648
+
649
+ case 'Int8Array':
650
+ case 'Uint8Array':
651
+ case 'Uint8ClampedArray':
652
+ case 'Int16Array':
653
+ case 'Uint16Array':
654
+ case 'Float16Array':
655
+ case 'Int32Array':
656
+ case 'Uint32Array':
657
+ case 'Float32Array':
658
+ case 'Float64Array':
659
+ case 'BigInt64Array':
660
+ case 'BigUint64Array':
661
+ case 'DataView':
662
+ // A Node Buffer's backing store may be a shared pool. It must
663
+ // never be visited or hoisted just because a Buffer uses it.
664
+ if (!is_buffer(thing)) walk(thing.buffer);
665
+ return;
666
+
667
+ case 'ArrayBuffer':
668
+ return;
669
+
670
+ case 'Temporal.Duration':
671
+ case 'Temporal.Instant':
672
+ case 'Temporal.PlainDate':
673
+ case 'Temporal.PlainTime':
674
+ case 'Temporal.PlainDateTime':
675
+ case 'Temporal.PlainMonthDay':
676
+ case 'Temporal.PlainYearMonth':
677
+ case 'Temporal.ZonedDateTime':
678
+ return;
679
+
680
+ default:
681
+ if (!is_plain_object(thing)) {
682
+ throw new DevalueError(`Cannot stringify arbitrary non-POJOs`, keys, thing, value);
683
+ }
684
+
685
+ if (enumerable_symbols(thing).length > 0) {
686
+ throw new DevalueError(`Cannot stringify POJOs with symbolic keys`, keys, thing, value);
687
+ }
688
+
689
+ for (const key of Object.keys(thing)) {
690
+ if (key === '__proto__') {
691
+ throw new DevalueError(
692
+ `Cannot stringify objects with __proto__ keys`,
693
+ keys,
694
+ thing,
695
+ value
696
+ );
697
+ }
698
+
699
+ keys.push(stringify_key(key));
700
+ walk(thing[key]);
701
+ keys.pop();
702
+ }
703
+ }
704
+ } else if (typeof thing === 'symbol') {
705
+ throw new DevalueError(`Cannot stringify a Symbol primitive`, keys, thing, value);
706
+ } else if (
707
+ (typeof thing === 'string' && thing.length >= MIN_STRING_LENGTH) ||
708
+ typeof thing === 'bigint'
709
+ ) {
710
+ counts.set(thing, (counts.get(thing) || 0) + 1);
711
+ }
712
+ }
713
+
714
+ walk(value);
715
+
716
+ const names = new Map();
717
+
718
+ /** @type {Array<[any, number]>} */
719
+ const repeated = [];
720
+ // Avoid allocating entries for all the values that will never be hoisted.
721
+ counts.forEach((count, thing) => {
722
+ if (count > 1) repeated.push([thing, count]);
723
+ });
724
+
725
+ repeated
726
+ .sort((a, b) => b[1] - a[1])
727
+ .forEach(([thing, count]) => {
728
+ const name = get_name(names.size);
729
+
730
+ if (is_primitive(thing)) {
731
+ const length = stringify_cached_primitive(thing).length;
732
+ // Hoisting costs one literal, a parameter and a reference per occurrence.
733
+ // Allow for the IIFE wrapper and separators even if one already exists,
734
+ // so inexpensive repetitions stay inline.
735
+ if (length * count <= length + (count + 1) * name.length + 25) return;
736
+ }
737
+
738
+ names.set(thing, name);
739
+ });
740
+
741
+ /**
742
+ * @param {any} thing
743
+ * @returns {string}
744
+ */
745
+ function stringify(thing) {
746
+ if (names.has(thing)) {
747
+ return names.get(thing);
748
+ }
749
+
750
+ if (is_primitive(thing)) {
751
+ return stringify_primitive$1(thing);
752
+ }
753
+
754
+ if (custom.has(thing)) {
755
+ return custom.get(thing);
756
+ }
757
+
758
+ const type = get_type(thing);
759
+
760
+ switch (type) {
761
+ case 'Number':
762
+ case 'String':
763
+ case 'Boolean':
764
+ case 'BigInt':
765
+ return `Object(${stringify(thing.valueOf())})`;
766
+
767
+ case 'RegExp':
768
+ const { source, flags } = thing;
769
+ return flags
770
+ ? `new RegExp(${stringify_string(source)},"${flags}")`
771
+ : `new RegExp(${stringify_string(source)})`;
772
+
773
+ case 'Date':
774
+ return `new Date(${thing.getTime()})`;
775
+
776
+ case 'URL':
777
+ return `new URL(${stringify_string(thing.toString())})`;
778
+
779
+ case 'URLSearchParams':
780
+ return `new URLSearchParams(${stringify_string(thing.toString())})`;
781
+
782
+ case 'Array': {
783
+ // For dense arrays (no holes), we iterate normally.
784
+ // When we encounter the first hole, we collect own indices
785
+ // to determine the sparseness, then decide between:
786
+ // - Array literal with holes: [,"a",,] (default)
787
+ // - Object.assign with a sparse-safe allocator (for very sparse arrays)
788
+ // Only the Object.assign path avoids iterating every slot, which
789
+ // is what protects against the DoS of e.g. `arr[1000000] = 1`.
790
+ let has_holes = false;
791
+
792
+ let result = '[';
793
+
794
+ for (let i = 0; i < thing.length; i += 1) {
795
+ if (i > 0) result += ',';
796
+
797
+ if (Object.hasOwn(thing, i)) {
798
+ result += stringify(thing[i]);
799
+ } else if (!has_holes) {
800
+ // Decide between array literal and Object.assign.
801
+ //
802
+ // Array literal: holes are consecutive commas.
803
+ // For example, [, "a", ,] is written as [,"a",,].
804
+ // Each hole costs 1 char (a comma).
805
+ //
806
+ // Object.assign: populated indices are listed explicitly.
807
+ // For example, [, "a", ,] would be written as
808
+ // Object.assign(sparse(3),{1:"a"}), where sparse(n) stands
809
+ // for the expression emitted by stringify_sparse_array(n).
810
+ // This avoids paying per-hole, but has a large fixed
811
+ // overhead for the allocator and Object.assign wrapper,
812
+ // and each element costs extra chars for its index and colon.
813
+ //
814
+ // The serialized values are the same size either way, so
815
+ // the choice comes down to the structural overhead:
816
+ //
817
+ // Array literal overhead:
818
+ // 1 char per element or hole (comma separators)
819
+ // + 2 chars for "[" and "]"
820
+ // = L + 2
821
+ //
822
+ // Object.assign overhead:
823
+ // "Object.assign(" — 14 chars
824
+ // + allocator expression — A chars
825
+ // + ",{" — 2 chars
826
+ // + for each populated element:
827
+ // index + ":" + "," — (d + 2) chars
828
+ // + "})" — 2 chars
829
+ // = (18 + A) + P * (d + 2)
830
+ //
831
+ // where L is the array length, P is the number of
832
+ // populated elements, A is the allocator expression's
833
+ // length, and d is the number of digits in L (an upper
834
+ // bound on the digits in any index).
835
+ //
836
+ // Object.assign is cheaper when:
837
+ // (18 + A) + P * (d + 2) < L + 2
838
+ const populated_keys = valid_array_indices(thing);
839
+ const population = populated_keys.length;
840
+ const d = String(thing.length).length;
841
+ const array = stringify_sparse_array(thing.length);
842
+
843
+ const hole_cost = thing.length + 2;
844
+ const sparse_cost = array.length + 18 + population * (d + 2);
845
+
846
+ if (hole_cost > sparse_cost) {
847
+ const entries = populated_keys.map((k) => `${k}:${stringify(thing[k])}`).join(',');
848
+ return `Object.assign(${array},{${entries}})`;
849
+ }
850
+
851
+ has_holes = true;
852
+ }
853
+ // else: already decided on array literal, hole is just an empty slot
854
+ // (the comma separator is all we need — no content for this position)
855
+ }
856
+
857
+ const tail = thing.length === 0 || Object.hasOwn(thing, thing.length - 1) ? '' : ',';
858
+ return result + tail + ']';
859
+ }
860
+
861
+ case 'Set':
862
+ case 'Map':
863
+ return `new ${type}([${Array.from(thing).map(stringify).join(',')}])`;
864
+
865
+ case 'Int8Array':
866
+ case 'Uint8Array':
867
+ case 'Uint8ClampedArray':
868
+ case 'Int16Array':
869
+ case 'Uint16Array':
870
+ case 'Float16Array':
871
+ case 'Int32Array':
872
+ case 'Uint32Array':
873
+ case 'Float32Array':
874
+ case 'Float64Array':
875
+ case 'BigInt64Array':
876
+ case 'BigUint64Array': {
877
+ if (is_buffer(thing)) thing = new Uint8Array(thing);
878
+
879
+ let str = `new ${type}`;
880
+
881
+ if (!names.has(thing.buffer)) {
882
+ str += `([${stringify_typed_array_elements(type, thing.buffer)}])`;
883
+ } else {
884
+ str += `(${stringify(thing.buffer)})`;
885
+ }
886
+
887
+ // handle subarrays
888
+ if (thing.byteLength !== thing.buffer.byteLength) {
889
+ const start = thing.byteOffset / thing.BYTES_PER_ELEMENT;
890
+ const end = start + thing.length;
891
+ str += `.subarray(${start},${end})`;
892
+ }
893
+
894
+ return str;
895
+ }
896
+
897
+ case 'DataView': {
898
+ let str = `new DataView`;
899
+
900
+ if (!names.has(thing.buffer)) {
901
+ str += `(new Uint8Array([${new Uint8Array(thing.buffer)}]).buffer`;
902
+ } else {
903
+ str += `(${stringify(thing.buffer)}`;
904
+ }
905
+
906
+ // handle subviews
907
+ if (thing.byteLength !== thing.buffer.byteLength) {
908
+ str += `,${thing.byteOffset},${thing.byteLength}`;
909
+ }
910
+
911
+ return str + ')';
912
+ }
913
+
914
+ case 'ArrayBuffer': {
915
+ const ui8 = new Uint8Array(thing);
916
+ return `new Uint8Array([${ui8.toString()}]).buffer`;
917
+ }
918
+
919
+ case 'Temporal.Duration':
920
+ case 'Temporal.Instant':
921
+ case 'Temporal.PlainDate':
922
+ case 'Temporal.PlainTime':
923
+ case 'Temporal.PlainDateTime':
924
+ case 'Temporal.PlainMonthDay':
925
+ case 'Temporal.PlainYearMonth':
926
+ case 'Temporal.ZonedDateTime':
927
+ return `${type}.from(${stringify_string(thing.toString())})`;
928
+
929
+ default:
930
+ const keys = Object.keys(thing);
931
+ const obj = keys.map((key) => `${safe_key(key)}:${stringify(thing[key])}`).join(',');
932
+ const proto = Object.getPrototypeOf(thing);
933
+ if (proto === null) {
934
+ return keys.length > 0 ? `{${obj},__proto__:null}` : `{__proto__:null}`;
935
+ }
936
+
937
+ return `{${obj}}`;
938
+ }
939
+ }
940
+
941
+ const str = stringify(value);
942
+
943
+ if (names.size) {
944
+ /** @type {string[]} */
945
+ const params = [];
946
+
947
+ /** @type {string[]} */
948
+ const statements = [];
949
+
950
+ /** @type {string[]} */
951
+ const values = [];
952
+
953
+ // Reconstructions (e.g. `b = new Uint8Array(...)`) reassign a placeholder
954
+ // parameter. They must run before the `statements` that reference them,
955
+ // otherwise those statements capture the placeholder. They only depend on
956
+ // IIFE arguments (never on each other), so emitting them first is safe.
957
+ /** @type {string[]} */
958
+ const reconstructions = [];
959
+
960
+ names.forEach((name, thing) => {
961
+ params.push(name);
962
+
963
+ if (custom.has(thing)) {
964
+ values.push(/** @type {string} */ (custom.get(thing)));
965
+ return;
966
+ }
967
+
968
+ if (is_primitive(thing)) {
969
+ values.push(stringify_cached_primitive(thing));
970
+ return;
971
+ }
972
+
973
+ const type = get_type(thing);
974
+
975
+ switch (type) {
976
+ case 'Number':
977
+ case 'String':
978
+ case 'Boolean':
979
+ case 'BigInt': {
980
+ const primitive = thing.valueOf();
981
+ if (names.has(primitive)) {
982
+ // A hoisted primitive is only in scope inside the IIFE, not in
983
+ // its arguments. Reconstruct the box before assigning references.
984
+ values.push('{}');
985
+ reconstructions.push(`${name}=Object(${stringify(primitive)})`);
986
+ } else {
987
+ values.push(`Object(${stringify(primitive)})`);
988
+ }
989
+ break;
990
+ }
991
+
992
+ case 'RegExp':
993
+ const { source, flags } = thing;
994
+ const regexp = flags
995
+ ? `new RegExp(${stringify_string(source)},"${flags}")`
996
+ : `new RegExp(${stringify_string(source)})`;
997
+ values.push(regexp);
998
+ break;
999
+
1000
+ case 'Date':
1001
+ values.push(`new Date(${thing.getTime()})`);
1002
+ break;
1003
+
1004
+ case 'URL':
1005
+ values.push(`new URL(${stringify_string(thing.toString())})`);
1006
+ break;
1007
+
1008
+ case 'URLSearchParams':
1009
+ values.push(`new URLSearchParams(${stringify_string(thing.toString())})`);
1010
+ break;
1011
+
1012
+ case 'Array': {
1013
+ const populated_keys = valid_array_indices(thing);
1014
+ // Only preallocate when the length is bounded by the number
1015
+ // of populated elements, plus a small constant for short arrays.
1016
+ values.push(
1017
+ thing.length > 32 + 2 * populated_keys.length
1018
+ ? stringify_sparse_array(thing.length)
1019
+ : `Array(${thing.length})`
1020
+ );
1021
+ for (const i of populated_keys) {
1022
+ statements.push(`${name}[${i}]=${stringify(thing[i])}`);
1023
+ }
1024
+ break;
1025
+ }
1026
+
1027
+ case 'Set': {
1028
+ values.push(`new Set`);
1029
+ const adds = Array.from(thing).map((v) => `.add(${stringify(v)})`);
1030
+ // An empty Set is fully built by `new Set`; a chained statement would
1031
+ // otherwise be a dangling `name.`.
1032
+ if (adds.length > 0) statements.push(name + adds.join(''));
1033
+ break;
1034
+ }
1035
+
1036
+ case 'Map': {
1037
+ values.push(`new Map`);
1038
+ const sets = Array.from(thing).map(
1039
+ ([k, v]) => `.set(${stringify(k)}, ${stringify(v)})`
1040
+ );
1041
+ if (sets.length > 0) statements.push(name + sets.join(''));
1042
+ break;
1043
+ }
1044
+
1045
+ case 'Int8Array':
1046
+ case 'Uint8Array':
1047
+ case 'Uint8ClampedArray':
1048
+ case 'Int16Array':
1049
+ case 'Uint16Array':
1050
+ case 'Float16Array':
1051
+ case 'Int32Array':
1052
+ case 'Uint32Array':
1053
+ case 'Float32Array':
1054
+ case 'Float64Array':
1055
+ case 'BigInt64Array':
1056
+ case 'BigUint64Array': {
1057
+ if (is_buffer(thing)) thing = new Uint8Array(thing);
1058
+
1059
+ let str = `new ${type}`;
1060
+
1061
+ if (!names.has(thing.buffer)) {
1062
+ str += `([${stringify_typed_array_elements(type, thing.buffer)}])`;
1063
+ } else {
1064
+ str += `(${stringify(thing.buffer)})`;
1065
+ }
1066
+
1067
+ // handle subarrays
1068
+ if (thing.byteLength !== thing.buffer.byteLength) {
1069
+ const start = thing.byteOffset / thing.BYTES_PER_ELEMENT;
1070
+ const end = start + thing.length;
1071
+ str += `.subarray(${start},${end})`;
1072
+ }
1073
+
1074
+ values.push(`{}`);
1075
+ reconstructions.push(`${name}=${str}`);
1076
+ break;
1077
+ }
1078
+
1079
+ case 'DataView': {
1080
+ let str = `new DataView`;
1081
+
1082
+ if (!names.has(thing.buffer)) {
1083
+ str += `(new Uint8Array([${new Uint8Array(thing.buffer)}]).buffer`;
1084
+ } else {
1085
+ str += `(${stringify(thing.buffer)}`;
1086
+ }
1087
+
1088
+ // handle subviews
1089
+ if (thing.byteLength !== thing.buffer.byteLength) {
1090
+ str += `,${thing.byteOffset},${thing.byteLength}`;
1091
+ }
1092
+
1093
+ str += ')';
1094
+
1095
+ values.push(`{}`);
1096
+ reconstructions.push(`${name}=${str}`);
1097
+ break;
1098
+ }
1099
+
1100
+ case 'ArrayBuffer':
1101
+ values.push(`new Uint8Array([${new Uint8Array(thing)}]).buffer`);
1102
+ break;
1103
+
1104
+ case 'Temporal.Duration':
1105
+ case 'Temporal.Instant':
1106
+ case 'Temporal.PlainDate':
1107
+ case 'Temporal.PlainTime':
1108
+ case 'Temporal.PlainDateTime':
1109
+ case 'Temporal.PlainMonthDay':
1110
+ case 'Temporal.PlainYearMonth':
1111
+ case 'Temporal.ZonedDateTime':
1112
+ values.push(`${type}.from(${stringify_string(thing.toString())})`);
1113
+ break;
1114
+
1115
+ default:
1116
+ values.push(Object.getPrototypeOf(thing) === null ? 'Object.create(null)' : '{}');
1117
+ Object.keys(thing).forEach((key) => {
1118
+ statements.push(`${name}${safe_prop(key)}=${stringify(thing[key])}`);
1119
+ });
1120
+ }
1121
+ });
1122
+
1123
+ statements.push(`return ${str}`);
1124
+
1125
+ const body = [...reconstructions, ...statements].join(';');
1126
+ // A function may have at most 65535 parameters (and a call at most that
1127
+ // many arguments). For very large graphs, pass the hoisted values as a
1128
+ // single array argument and destructure them into the placeholder names,
1129
+ // so the emitted code stays within the engine limit (#93).
1130
+ if (params.length > 65534) {
1131
+ return `(function(){var[${params.join(',')}]=arguments[0];${body}}([${values.join(',')}]))`;
1132
+ }
1133
+
1134
+ return `(function(${params.join(',')}){${body}}(${values.join(',')}))`;
1135
+ } else {
1136
+ return str;
1137
+ }
1138
+ }
1139
+
1140
+ /**
1141
+ * Emit an array whose storage is not proportional to its declared length.
1142
+ * As in the default parse operations, touching and deleting the largest valid
1143
+ * index forces V8 into dictionary-elements mode before setting the length.
1144
+ * Merely starting with [] and assigning .length still eagerly allocates.
1145
+ * @param {number} length
1146
+ */
1147
+ function stringify_sparse_array(length) {
1148
+ return `(function(a){a[${MAX_ARRAY_INDEX}]=0;delete a[${MAX_ARRAY_INDEX}];a.length=${length};return a}([]))`;
1149
+ }
1150
+
1151
+ /**
1152
+ * Serialize the elements of `buffer`, read as `type`, as a comma-separated list.
1153
+ * The view is created from `type` rather than from the serialized value's own
1154
+ * constructor, which may be a subclass like Node's `Buffer` whose `toString`
1155
+ * decodes the bytes instead of listing them.
1156
+ * `BigInt64Array`/`BigUint64Array` elements are bigints and must be written
1157
+ * with an `n` suffix, otherwise the emitted `new BigInt64Array([...])` throws.
1158
+ * @param {string} type
1159
+ * @param {ArrayBufferLike} buffer
1160
+ */
1161
+ function stringify_typed_array_elements(type, buffer) {
1162
+ const array = new (/** @type {any} */ (globalThis)[type])(buffer);
1163
+
1164
+ if (type === 'BigInt64Array' || type === 'BigUint64Array') {
1165
+ return Array.from(array, (element) => `${element}n`).join(',');
1166
+ }
1167
+
1168
+ // Float arrays can hold `-0`, which `toString()` collapses to `"0"`, silently
1169
+ // losing the sign on round-trip. Emit `-0` explicitly for those elements.
1170
+ if (
1171
+ array instanceof Float32Array ||
1172
+ array instanceof Float64Array ||
1173
+ (typeof Float16Array !== 'undefined' && array instanceof Float16Array)
1174
+ ) {
1175
+ return Array.from(array, (element) => (Object.is(element, -0) ? '-0' : `${element}`)).join(',');
1176
+ }
1177
+
1178
+ return array.toString();
1179
+ }
1180
+
1181
+ /** @param {number} num */
1182
+ function get_name(num) {
1183
+ let name = '';
1184
+
1185
+ do {
1186
+ name = chars[num % chars.length] + name;
1187
+ num = ~~(num / chars.length) - 1;
1188
+ } while (num >= 0);
1189
+
1190
+ return reserved.test(name) ? `${name}0` : name;
1191
+ }
1192
+
1193
+ /** @param {string} c */
1194
+ function escape_unsafe_char(c) {
1195
+ return escaped[c] || c;
1196
+ }
1197
+
1198
+ /** @param {string} str */
1199
+ function escape_unsafe_chars(str) {
1200
+ return str.replace(unsafe_chars, escape_unsafe_char);
1201
+ }
1202
+
1203
+ /** @param {string} key */
1204
+ function safe_key(key) {
1205
+ return /^[_$a-zA-Z][_$a-zA-Z0-9]*$/.test(key) ? key : escape_unsafe_chars(JSON.stringify(key));
1206
+ }
1207
+
1208
+ /** @param {string} key */
1209
+ function safe_prop(key) {
1210
+ return /^[_$a-zA-Z][_$a-zA-Z0-9]*$/.test(key)
1211
+ ? `.${key}`
1212
+ : `[${escape_unsafe_chars(JSON.stringify(key))}]`;
1213
+ }
1214
+
1215
+ /** @param {any} thing */
1216
+ function stringify_primitive$1(thing) {
1217
+ const type = typeof thing;
1218
+ if (type === 'string') return stringify_string(thing);
1219
+ if (thing === void 0) return 'void 0';
1220
+ if (thing === 0 && 1 / thing < 0) return '-0';
1221
+ const str = String(thing);
1222
+ if (type === 'number') return str.replace(/^(-)?0\./, '$1.');
1223
+ if (type === 'bigint') return thing + 'n';
1224
+ return str;
1225
+ }
1226
+
1227
+ /* Baseline 2025 runtimes */
1228
+
1229
+ /** @type {(array_buffer: ArrayBuffer) => string} */
1230
+ function encode_native(array_buffer) {
1231
+ return new Uint8Array(array_buffer).toBase64();
1232
+ }
1233
+
1234
+ /** @type {(base64: string) => ArrayBuffer} */
1235
+ function decode_native(base64) {
1236
+ return Uint8Array.fromBase64(base64).buffer;
1237
+ }
1238
+
1239
+ /* Node-compatible runtimes */
1240
+
1241
+ /** @type {(array_buffer: ArrayBuffer) => string} */
1242
+ function encode_buffer(array_buffer) {
1243
+ return Buffer.from(array_buffer).toString('base64');
1244
+ }
1245
+
1246
+ /** @type {(base64: string) => ArrayBuffer} */
1247
+ function decode_buffer(base64) {
1248
+ return Uint8Array.from(Buffer.from(base64, 'base64')).buffer;
1249
+ }
1250
+
1251
+ /* Legacy runtimes */
1252
+
1253
+ /** @type {(array_buffer: ArrayBuffer) => string} */
1254
+ function encode_legacy(array_buffer) {
1255
+ const array = new Uint8Array(array_buffer);
1256
+ let binary = '';
1257
+
1258
+ // the maximum number of arguments to String.fromCharCode.apply
1259
+ // should be around 0xFFFF in modern engines
1260
+ const chunk_size = 0x8000;
1261
+ for (let i = 0; i < array.length; i += chunk_size) {
1262
+ const chunk = array.subarray(i, i + chunk_size);
1263
+ binary += String.fromCharCode.apply(null, chunk);
1264
+ }
1265
+
1266
+ return btoa(binary);
1267
+ }
1268
+
1269
+ /** @type {(base64: string) => ArrayBuffer} */
1270
+ function decode_legacy(base64) {
1271
+ const binary_string = atob(base64);
1272
+ const len = binary_string.length;
1273
+ const array = new Uint8Array(len);
1274
+
1275
+ for (let i = 0; i < len; i++) {
1276
+ array[i] = binary_string.charCodeAt(i);
1277
+ }
1278
+
1279
+ return array.buffer;
1280
+ }
1281
+
1282
+ const native = typeof Uint8Array.fromBase64 === 'function';
1283
+ const buffer = typeof process === 'object' && process.versions?.node !== undefined;
1284
+
1285
+ const encode64 = native ? encode_native : buffer ? encode_buffer : encode_legacy;
1286
+ const decode64 = native ? decode_native : buffer ? decode_buffer : decode_legacy;
1287
+
1288
+ /**
1289
+ * Merges caller-provided operation overrides over the defaults. Iterating the
1290
+ * default keys (rather than the override's own keys) means nullish members
1291
+ * fall back to the default, and inherited members — e.g. from a class
1292
+ * instance — are picked up.
1293
+ *
1294
+ * @template {Record<string, any>} T
1295
+ * @param {T} defaults
1296
+ * @param {Partial<T> | undefined} overrides
1297
+ * @returns {T}
1298
+ */
1299
+ function merge_operations(defaults, overrides) {
1300
+ return defaults;
1301
+ }
1302
+
1303
+ /** @type {{ kind: 'not-plain' }} */
1304
+ const NOT_PLAIN = /* @__PURE__ */ Object.freeze({ kind: 'not-plain' });
1305
+
1306
+ /** @type {{ kind: 'symbol-keys' }} */
1307
+ const SYMBOL_KEYS = /* @__PURE__ */ Object.freeze({ kind: 'symbol-keys' });
1308
+
1309
+ /**
1310
+ * The default implementations of every introspection/extraction operation
1311
+ * `stringify` performs on the value being serialized. Each one uses native
1312
+ * JavaScript semantics (property access, iteration, prototype methods, etc).
1313
+ *
1314
+ * Pass overrides via the `operations` option of `stringify`/`stringifyAsync`
1315
+ * to customize how values are inspected — e.g. to serialize values without
1316
+ * triggering getters, proxy traps, or patched prototype methods, or to
1317
+ * serialize values that live in a different JavaScript runtime (a `node:vm`
1318
+ * context, a WASM-hosted engine, a remote process) through handle objects.
1319
+ *
1320
+ * The object is frozen — it is shared by every `stringify` call that does
1321
+ * not override a given operation.
1322
+ *
1323
+ */
1324
+ /** @type {import('./types.js').DefaultStringifyOperations} */
1325
+ const stringify_operations = {
1326
+ identify: (value) => value,
1327
+
1328
+ typeOf: (value) => (value === null ? 'null' : typeof value),
1329
+
1330
+ toPrimitive: (value) => value,
1331
+
1332
+ tagOf: (value) => get_type(value),
1333
+
1334
+ isThenable: (value) => typeof value.then === 'function',
1335
+
1336
+ toPromise: (thenable) => Promise.resolve(thenable),
1337
+
1338
+ unbox: (boxed) => boxed.valueOf(),
1339
+
1340
+ toISOString: (date) => (isNaN(date.getDate()) ? '' : date.toISOString()),
1341
+
1342
+ toStringValue: (value) => value.toString(),
1343
+
1344
+ regExpInfo: (regexp) => ({ source: regexp.source, flags: regexp.flags }),
1345
+
1346
+ valuesOf: (set) => set,
1347
+
1348
+ entriesOf: (map) => map,
1349
+
1350
+ viewInfo: (view) => {
1351
+ // Node Buffers may share a pool containing unrelated, sensitive data.
1352
+ // Copy only the visible bytes, without using Buffer's pooling or slice.
1353
+ if (is_buffer(view)) view = new Uint8Array(view);
1354
+
1355
+ return {
1356
+ buffer: view.buffer,
1357
+ byteOffset: view.byteOffset,
1358
+ byteLength: view.byteLength,
1359
+ length: view.length,
1360
+ bufferByteLength: view.buffer.byteLength
1361
+ };
1362
+ },
1363
+
1364
+ toArrayBuffer: (buffer) => buffer,
1365
+
1366
+ lengthOf: (array) => array.length,
1367
+
1368
+ hasOwn: (value, key) => Object.hasOwn(value, key),
1369
+
1370
+ indicesOf: (array) => valid_array_indices(array),
1371
+
1372
+ shapeOf: (value) => {
1373
+ if (!is_plain_object(value)) return NOT_PLAIN;
1374
+ if (enumerable_symbols(value).length > 0) return SYMBOL_KEYS;
1375
+
1376
+ return {
1377
+ kind: Object.getPrototypeOf(value) === null ? 'null-proto' : 'plain',
1378
+ keys: Object.keys(value)
1379
+ };
1380
+ },
1381
+
1382
+ get: (value, key) => value[key]
1383
+ };
1384
+
1385
+ const default_stringify_operations = /* @__PURE__ */ Object.freeze(stringify_operations);
1386
+
1387
+ const array_buffer_byte_length = Object.getOwnPropertyDescriptor(
1388
+ ArrayBuffer.prototype,
1389
+ 'byteLength'
1390
+ ).get;
1391
+
1392
+ const shared_array_buffer_byte_length =
1393
+ typeof SharedArrayBuffer === 'undefined'
1394
+ ? undefined
1395
+ : Object.getOwnPropertyDescriptor(SharedArrayBuffer.prototype, 'byteLength').get;
1396
+
1397
+ /**
1398
+ * The default implementations of every construction operation `parse` and
1399
+ * `unflatten` perform while reviving a value. Each one uses native
1400
+ * JavaScript semantics (built-in constructors, property assignment, etc).
1401
+ *
1402
+ * Pass overrides via the `operations` option of `parse`/`unflatten` to
1403
+ * customize how values are built — e.g. to construct them from the
1404
+ * intrinsics of a different realm (a `node:vm` context), or to build up
1405
+ * values inside another JavaScript runtime (a WASM-hosted engine, a remote
1406
+ * process) through handle objects.
1407
+ *
1408
+ * The object is frozen — it is shared by every `parse` call that does not
1409
+ * override a given operation.
1410
+ *
1411
+ */
1412
+ /** @type {import('./types.js').DefaultParseOperations} */
1413
+ const parse_operations = {
1414
+ fromPrimitive: (primitive) => primitive,
1415
+
1416
+ fromISOString: (iso) => new Date(iso),
1417
+
1418
+ fromStringValue: (tag, text) => {
1419
+ if (tag === 'URL') return new URL(text);
1420
+ if (tag === 'URLSearchParams') return new URLSearchParams(text);
1421
+ // 'Temporal.Instant', 'Temporal.PlainDate', ...
1422
+ // @ts-expect-error TS doesn't know about Temporal yet
1423
+ return Temporal[tag.slice(9)].from(text);
1424
+ },
1425
+
1426
+ fromArrayBuffer: (buffer) => buffer,
1427
+
1428
+ fromRegExpInfo: (source, flags) => new RegExp(source, flags),
1429
+
1430
+ fromViewInfo: (tag, buffer, byteOffset, length) => {
1431
+ // A reviver can replace an ArrayBuffer with a length or array-like value,
1432
+ // which a typed array constructor would use to allocate a new buffer.
1433
+ // The native getters check internal slots, so they work across realms
1434
+ // and cannot be fooled by a forged prototype or Symbol.toStringTag.
1435
+ try {
1436
+ array_buffer_byte_length.call(buffer);
1437
+ } catch (error) {
1438
+ if (!shared_array_buffer_byte_length) throw error;
1439
+ shared_array_buffer_byte_length.call(buffer);
1440
+ }
1441
+
1442
+ const Constructor = /** @type {any} */ (globalThis)[tag];
1443
+ return byteOffset !== undefined
1444
+ ? new Constructor(buffer, byteOffset, length)
1445
+ : new Constructor(buffer);
1446
+ },
1447
+
1448
+ box: (value) => Object(value),
1449
+
1450
+ createArray: (length) => new Array(length),
1451
+
1452
+ createSparseArray: (length) => {
1453
+ /** @type {any[]} */
1454
+ const array = [];
1455
+
1456
+ // Setting `array.length = length` (or equivalently calling
1457
+ // `new Array(length)`) on an untrusted length is a DoS vector: V8
1458
+ // eagerly allocates a contiguous backing store for array lengths below
1459
+ // ~10^8, so a small payload with a huge declared length can force
1460
+ // arbitrary memory allocation. Touching the largest-possible index
1461
+ // first forces V8 into dictionary-elements mode, where `length` is
1462
+ // just a number and no contiguous allocation occurs.
1463
+ array[MAX_ARRAY_INDEX] = undefined;
1464
+ delete array[MAX_ARRAY_INDEX];
1465
+ array.length = length;
1466
+
1467
+ return array;
1468
+ },
1469
+
1470
+ createObject: () => ({}),
1471
+
1472
+ createNullPrototypeObject: () => Object.create(null),
1473
+
1474
+ createSet: () => new Set(),
1475
+
1476
+ createMap: () => new Map(),
1477
+
1478
+ set: (target, key, value) => {
1479
+ target[key] = value;
1480
+ },
1481
+
1482
+ addValue: (set, value) => {
1483
+ set.add(value);
1484
+ },
1485
+
1486
+ addEntry: (map, key, value) => {
1487
+ map.set(key, value);
1488
+ }
1489
+ };
1490
+
1491
+ const default_parse_operations = /* @__PURE__ */ Object.freeze(parse_operations);
1492
+
1493
+ /**
1494
+ * Revive a value serialized with `devalue.stringify`
1495
+ * @param {string} serialized
1496
+ * @param {Record<string, (value: any) => any>} [revivers]
1497
+ * @param {import('./types.js').ParseOptions} [options]
1498
+ */
1499
+ function parse(serialized, revivers, options) {
1500
+ return unflatten(JSON.parse(serialized), revivers);
1501
+ }
1502
+
1503
+ /**
1504
+ * Revive a value flattened with `devalue.stringify`
1505
+ * @param {number | any[]} parsed
1506
+ * @param {Record<string, (value: any) => any>} [revivers]
1507
+ * @param {import('./types.js').ParseOptions} [options]
1508
+ */
1509
+ function unflatten(parsed, revivers, options) {
1510
+ /** @type {import('./types.js').ParseOperations} */
1511
+ const ops = merge_operations(default_parse_operations);
1512
+
1513
+ if (typeof parsed === 'number') return hydrate(parsed, true);
1514
+
1515
+ if (!Array.isArray(parsed) || parsed.length === 0) {
1516
+ throw new Error('Invalid input');
1517
+ }
1518
+
1519
+ const values = /** @type {any[]} */ (parsed);
1520
+
1521
+ const hydrated = Array(values.length);
1522
+
1523
+ /**
1524
+ * A set of values currently being hydrated with custom revivers,
1525
+ * used to detect invalid cyclical dependencies
1526
+ * @type {Set<number> | null}
1527
+ */
1528
+ let hydrating = null;
1529
+
1530
+ /**
1531
+ * @param {number} index
1532
+ * @returns {any}
1533
+ */
1534
+ function hydrate(index, standalone = false) {
1535
+ if (index === UNDEFINED) return ops.fromPrimitive(undefined);
1536
+ if (index === NAN) return ops.fromPrimitive(NaN);
1537
+ if (index === POSITIVE_INFINITY) return ops.fromPrimitive(Infinity);
1538
+ if (index === NEGATIVE_INFINITY) return ops.fromPrimitive(-Infinity);
1539
+ if (index === NEGATIVE_ZERO) return ops.fromPrimitive(-0);
1540
+
1541
+ if (standalone || typeof index !== 'number') {
1542
+ throw new Error(`Invalid input`);
1543
+ }
1544
+
1545
+ if (index in hydrated) return hydrated[index];
1546
+
1547
+ if (index >= values.length) {
1548
+ throw new Error(`Invalid input`);
1549
+ }
1550
+
1551
+ const value = values[index];
1552
+
1553
+ if (!value || typeof value !== 'object') {
1554
+ hydrated[index] = ops.fromPrimitive(value);
1555
+ } else if (Array.isArray(value)) {
1556
+ if (typeof value[0] === 'string') {
1557
+ const type = value[0];
1558
+
1559
+ const reviver = revivers && Object.hasOwn(revivers, type) ? revivers[type] : undefined;
1560
+
1561
+ if (reviver) {
1562
+ let i = value[1];
1563
+ if (typeof i !== 'number') {
1564
+ // if it's not a number, it was serialized by a builtin reviver
1565
+ // so we need to munge it into the format expected by a custom reviver
1566
+ i = values.push(value[1]) - 1;
1567
+ }
1568
+
1569
+ // If the payload is already hydrated, its recursion has already
1570
+ // terminated (e.g. a self-referential object cached itself before
1571
+ // following its own back-reference), so revive it directly. Falling
1572
+ // through to the `hydrating` guard here would wrongly reject a valid
1573
+ // cycle. An actually infinite payload (e.g. `[["Custom", 0]]`) is never
1574
+ // cached, so it still hits the guard below.
1575
+ if (Object.hasOwn(hydrated, i)) {
1576
+ return (hydrated[index] = reviver(hydrated[i]));
1577
+ }
1578
+
1579
+ hydrating ??= new Set();
1580
+
1581
+ if (hydrating.has(i)) {
1582
+ throw new Error('Invalid circular reference');
1583
+ }
1584
+
1585
+ hydrating.add(i);
1586
+ hydrated[index] = reviver(hydrate(i));
1587
+ hydrating.delete(i);
1588
+
1589
+ return hydrated[index];
1590
+ }
1591
+
1592
+ switch (type) {
1593
+ case 'Date':
1594
+ hydrated[index] = ops.fromISOString(value[1]);
1595
+ break;
1596
+
1597
+ case 'Set':
1598
+ const set = ops.createSet();
1599
+ hydrated[index] = set;
1600
+ for (let i = 1; i < value.length; i += 1) {
1601
+ ops.addValue(set, hydrate(value[i]));
1602
+ }
1603
+ break;
1604
+
1605
+ case 'Map':
1606
+ const map = ops.createMap();
1607
+ hydrated[index] = map;
1608
+ for (let i = 1; i < value.length; i += 2) {
1609
+ ops.addEntry(map, hydrate(value[i]), hydrate(value[i + 1]));
1610
+ }
1611
+ break;
1612
+
1613
+ case 'RegExp':
1614
+ hydrated[index] = ops.fromRegExpInfo(value[1], value[2]);
1615
+ break;
1616
+
1617
+ case 'Object': {
1618
+ const wrapped_index = value[1];
1619
+
1620
+ if (
1621
+ typeof values[wrapped_index] === 'object' &&
1622
+ values[wrapped_index][0] !== 'BigInt'
1623
+ ) {
1624
+ // avoid infinite recusion in case of malformed input
1625
+ throw new Error('Invalid input');
1626
+ }
1627
+
1628
+ hydrated[index] = ops.box(hydrate(wrapped_index));
1629
+ break;
1630
+ }
1631
+
1632
+ case 'BigInt':
1633
+ hydrated[index] = ops.fromPrimitive(BigInt(value[1]));
1634
+ break;
1635
+
1636
+ case 'null':
1637
+ const obj = ops.createNullPrototypeObject();
1638
+ hydrated[index] = obj;
1639
+ for (let i = 1; i < value.length; i += 2) {
1640
+ const key = value[i];
1641
+ if (typeof key !== 'string') {
1642
+ throw new Error('Cannot parse an object with a non-string key');
1643
+ }
1644
+
1645
+ if (key === '__proto__') {
1646
+ throw new Error('Cannot parse an object with a `__proto__` property');
1647
+ }
1648
+
1649
+ ops.set(obj, key, hydrate(value[i + 1]));
1650
+ }
1651
+ break;
1652
+
1653
+ case 'Int8Array':
1654
+ case 'Uint8Array':
1655
+ case 'Uint8ClampedArray':
1656
+ case 'Int16Array':
1657
+ case 'Uint16Array':
1658
+ case 'Float16Array':
1659
+ case 'Int32Array':
1660
+ case 'Uint32Array':
1661
+ case 'Float32Array':
1662
+ case 'Float64Array':
1663
+ case 'BigInt64Array':
1664
+ case 'BigUint64Array':
1665
+ case 'DataView': {
1666
+ if (values[value[1]][0] !== 'ArrayBuffer') {
1667
+ // without this, if we receive malformed input we could
1668
+ // end up trying to hydrate in a circle or allocate
1669
+ // huge amounts of memory when we call `new TypedArrayConstructor(buffer)`
1670
+ throw new Error('Invalid data');
1671
+ }
1672
+
1673
+ const buffer = hydrate(value[1]);
1674
+
1675
+ hydrated[index] = ops.fromViewInfo(type, buffer, value[2], value[3]);
1676
+
1677
+ break;
1678
+ }
1679
+
1680
+ case 'ArrayBuffer': {
1681
+ const base64 = value[1];
1682
+ if (typeof base64 !== 'string') {
1683
+ throw new Error('Invalid ArrayBuffer encoding');
1684
+ }
1685
+ hydrated[index] = ops.fromArrayBuffer(decode64(base64));
1686
+ break;
1687
+ }
1688
+
1689
+ case 'URL':
1690
+ case 'URLSearchParams':
1691
+ case 'Temporal.Duration':
1692
+ case 'Temporal.Instant':
1693
+ case 'Temporal.PlainDate':
1694
+ case 'Temporal.PlainTime':
1695
+ case 'Temporal.PlainDateTime':
1696
+ case 'Temporal.PlainMonthDay':
1697
+ case 'Temporal.PlainYearMonth':
1698
+ case 'Temporal.ZonedDateTime': {
1699
+ // the same tags `toStringValue` serializes on the stringify side
1700
+ hydrated[index] = ops.fromStringValue(type, value[1]);
1701
+ break;
1702
+ }
1703
+
1704
+ default:
1705
+ throw new Error(`Unknown type ${type}`);
1706
+ }
1707
+ } else if (value[0] === SPARSE) {
1708
+ // Sparse array encoding: [SPARSE, length, idx, val, idx, val, ...]
1709
+ const len = value[1];
1710
+
1711
+ if (!is_valid_array_len(len)) {
1712
+ throw new Error('Invalid input');
1713
+ }
1714
+
1715
+ // `len` comes from the input rather than being bounded by it, so
1716
+ // `createSparseArray` is responsible for not allocating storage
1717
+ // proportional to it.
1718
+ const array = ops.createSparseArray(len);
1719
+ hydrated[index] = array;
1720
+
1721
+ for (let i = 2; i < value.length; i += 2) {
1722
+ const idx = value[i];
1723
+
1724
+ if (!is_valid_array_index(idx) || idx >= len) {
1725
+ throw new Error('Invalid input');
1726
+ }
1727
+
1728
+ ops.set(array, idx, hydrate(value[i + 1]));
1729
+ }
1730
+ } else {
1731
+ const array = ops.createArray(value.length);
1732
+ hydrated[index] = array;
1733
+
1734
+ for (let i = 0; i < value.length; i += 1) {
1735
+ const n = value[i];
1736
+ if (n === HOLE) continue;
1737
+
1738
+ ops.set(array, i, hydrate(n));
1739
+ }
1740
+ }
1741
+ } else {
1742
+ const object = ops.createObject();
1743
+ hydrated[index] = object;
1744
+
1745
+ for (const key of Object.keys(value)) {
1746
+ if (key === '__proto__') {
1747
+ throw new Error('Cannot parse an object with a `__proto__` property');
1748
+ }
1749
+
1750
+ ops.set(object, key, hydrate(value[key]));
1751
+ }
1752
+ }
1753
+
1754
+ return hydrated[index];
1755
+ }
1756
+
1757
+ return hydrate(0);
1758
+ }
1759
+
1760
+ /**
1761
+ * Turn a value into a JSON string that can be parsed with `devalue.parse`
1762
+ * @param {any} value
1763
+ * @param {Record<string, (value: any) => any>} [reducers]
1764
+ * @param {import('./types.js').StringifyOptions} [options]
1765
+ */
1766
+ function stringify$1(value, reducers, options) {
1767
+ const stringified = run(false, value, reducers);
1768
+ return typeof stringified === 'string' ? stringified : `[${stringified.join(',')}]`;
1769
+ }
1770
+
1771
+ /**
1772
+ * @param {boolean} async
1773
+ * @param {any} value
1774
+ * @param {Record<string, (value: any) => any>} [reducers]
1775
+ * @param {import('./types.js').StringifyOptions} [options]
1776
+ */
1777
+ function run(async, value, reducers, options) {
1778
+ const ops = merge_operations(default_stringify_operations);
1779
+
1780
+ /** @type {any[]} */
1781
+ const stringified = [];
1782
+
1783
+ /** @type {Map<any, number>} */
1784
+ const indexes = new Map();
1785
+
1786
+ /** @type {Array<{ key: string, fn: (value: any) => any }>} */
1787
+ const custom = [];
1788
+ if (reducers) {
1789
+ for (const key of Object.getOwnPropertyNames(reducers)) {
1790
+ custom.push({ key, fn: reducers[key] });
1791
+ }
1792
+ }
1793
+
1794
+ /** @type {string[]} */
1795
+ const keys = [];
1796
+
1797
+ let p = 0;
1798
+
1799
+ /**
1800
+ * @param {any} thing
1801
+ * @param {number} [index]
1802
+ */
1803
+ function flatten(thing, index) {
1804
+ const type = ops.typeOf(thing);
1805
+
1806
+ if (type === 'undefined') return UNDEFINED;
1807
+
1808
+ /** @type {number | undefined} */
1809
+ let number;
1810
+
1811
+ // `ops.toPrimitive` is the boundary between the value being serialized and
1812
+ // plain host JavaScript: everything below operates on the extracted host
1813
+ // primitive, so native comparisons and arithmetic are correct there.
1814
+ if (type === 'number') {
1815
+ number = /** @type {number} */ (ops.toPrimitive(thing));
1816
+ if (Number.isNaN(number)) return NAN;
1817
+ if (number === Infinity) return POSITIVE_INFINITY;
1818
+ if (number === -Infinity) return NEGATIVE_INFINITY;
1819
+ if (number === 0 && 1 / number < 0) return NEGATIVE_ZERO;
1820
+ }
1821
+
1822
+ const id = ops.identify(thing);
1823
+
1824
+ if (indexes.has(id)) return /** @type {number} */ (indexes.get(id));
1825
+
1826
+ index ??= p++;
1827
+ indexes.set(id, index);
1828
+
1829
+ for (const { key, fn } of custom) {
1830
+ const value = fn(thing);
1831
+ if (value) {
1832
+ stringified[index] = `["${key}",${flatten(value)}]`;
1833
+ return index;
1834
+ }
1835
+ }
1836
+
1837
+ if (type === 'function') {
1838
+ throw new DevalueError(`Cannot stringify a function`, keys, thing, value);
1839
+ } else if (type === 'symbol') {
1840
+ throw new DevalueError(`Cannot stringify a Symbol primitive`, keys, thing, value);
1841
+ }
1842
+
1843
+ /** @type {string | Promise<any>} */
1844
+ let str = '';
1845
+
1846
+ if (type !== 'object') {
1847
+ str = stringify_primitive(type === 'number' ? number : ops.toPrimitive(thing));
1848
+ } else if (ops.isThenable(thing)) {
1849
+ {
1850
+ throw new DevalueError(
1851
+ `Cannot stringify a Promise or thenable — use stringifyAsync instead`,
1852
+ keys,
1853
+ thing,
1854
+ value
1855
+ );
1856
+ }
1857
+ } else {
1858
+ const tag = ops.tagOf(thing);
1859
+
1860
+ switch (tag) {
1861
+ case 'Number':
1862
+ case 'String':
1863
+ case 'Boolean':
1864
+ case 'BigInt':
1865
+ str = `["Object",${flatten(ops.unbox(thing))}]`;
1866
+ break;
1867
+
1868
+ case 'Date':
1869
+ str = `["Date","${ops.toISOString(thing)}"]`;
1870
+ break;
1871
+
1872
+ case 'URL':
1873
+ str = `["URL",${stringify_string(ops.toStringValue(thing))}]`;
1874
+ break;
1875
+
1876
+ case 'URLSearchParams':
1877
+ str = `["URLSearchParams",${stringify_string(ops.toStringValue(thing))}]`;
1878
+ break;
1879
+
1880
+ case 'RegExp':
1881
+ const { source, flags } = ops.regExpInfo(thing);
1882
+ str = flags
1883
+ ? `["RegExp",${stringify_string(source)},"${flags}"]`
1884
+ : `["RegExp",${stringify_string(source)}]`;
1885
+ break;
1886
+
1887
+ case 'Array': {
1888
+ // For dense arrays (no holes), we iterate normally.
1889
+ // When we encounter the first hole, we call Object.keys
1890
+ // to determine the sparseness, then decide between:
1891
+ // - HOLE encoding: [-2, val, -2, ...] (default)
1892
+ // - Sparse encoding: [-7, length, idx, val, ...] (for very sparse arrays)
1893
+ // Only the sparse path avoids iterating every slot, which
1894
+ // is what protects against the DoS of e.g. `arr[1000000] = 1`.
1895
+ let mostly_dense = false;
1896
+
1897
+ const length = ops.lengthOf(thing);
1898
+
1899
+ str = '[';
1900
+
1901
+ for (let i = 0; i < length; i += 1) {
1902
+ if (i > 0) str += ',';
1903
+
1904
+ if (ops.hasOwn(thing, i)) {
1905
+ keys.push(`[${i}]`);
1906
+ str += flatten(ops.get(thing, i));
1907
+ keys.pop();
1908
+ } else if (mostly_dense) {
1909
+ // Use dense encoding. The heuristic guarantees the
1910
+ // array is only mildly sparse, so iterating over every
1911
+ // slot is fine.
1912
+ str += HOLE;
1913
+ } else {
1914
+ // Decide between HOLE encoding and sparse encoding.
1915
+ //
1916
+ // HOLE encoding: each hole is serialized as the HOLE
1917
+ // sentinel (-2). For example, [, "a", ,] becomes
1918
+ // [-2, 0, -2]. Each hole costs 3 chars ("-2" + comma).
1919
+ //
1920
+ // Sparse encoding: lists only populated indices.
1921
+ // For example, [, "a", ,] becomes [-7, 3, 1, 0] — the
1922
+ // -7 sentinel, the array length (3), then index-value
1923
+ // pairs. This avoids paying per-hole, but each element
1924
+ // costs extra chars to write its index.
1925
+ //
1926
+ // The values are the same size either way, so the
1927
+ // choice comes down to structural overhead:
1928
+ //
1929
+ // HOLE overhead:
1930
+ // 3 chars per hole ("-2" + comma)
1931
+ // = (L - P) * 3
1932
+ //
1933
+ // Sparse overhead:
1934
+ // "-7," — 3 chars (sparse sentinel + comma)
1935
+ // + length + "," — (d + 1) chars (array length + comma)
1936
+ // + per element: index + "," — (d + 1) chars
1937
+ // = (4 + d) + P * (d + 1)
1938
+ //
1939
+ // where L is the array length, P is the number of
1940
+ // populated elements, and d is the number of digits
1941
+ // in L (an upper bound on the digits in any index).
1942
+ //
1943
+ // Sparse encoding is cheaper when:
1944
+ // (4 + d) + P * (d + 1) < (L - P) * 3
1945
+ const populated_keys = ops.indicesOf(thing);
1946
+ const population = populated_keys.length;
1947
+ const d = String(length).length;
1948
+
1949
+ const hole_cost = (length - population) * 3;
1950
+ const sparse_cost = 4 + d + population * (d + 1);
1951
+
1952
+ if (hole_cost > sparse_cost) {
1953
+ str = '[' + SPARSE + ',' + length;
1954
+ for (let j = 0; j < populated_keys.length; j++) {
1955
+ const key = populated_keys[j];
1956
+ keys.push(`[${key}]`);
1957
+ str += ',' + key + ',' + flatten(ops.get(thing, key));
1958
+ keys.pop();
1959
+ }
1960
+ break;
1961
+ } else {
1962
+ mostly_dense = true;
1963
+ str += HOLE;
1964
+ }
1965
+ }
1966
+ }
1967
+
1968
+ str += ']';
1969
+
1970
+ break;
1971
+ }
1972
+
1973
+ case 'Set':
1974
+ str = '["Set"';
1975
+
1976
+ for (const value of ops.valuesOf(thing)) {
1977
+ str += `,${flatten(value)}`;
1978
+ }
1979
+
1980
+ str += ']';
1981
+ break;
1982
+
1983
+ case 'Map':
1984
+ str = '["Map"';
1985
+
1986
+ for (const [key, value] of ops.entriesOf(thing)) {
1987
+ const key_type = ops.typeOf(key);
1988
+ const key_is_primitive =
1989
+ key_type !== 'object' && key_type !== 'function' && key_type !== 'symbol';
1990
+ keys.push(
1991
+ `.get(${key_is_primitive ? stringify_primitive(ops.toPrimitive(key)) : '...'})`
1992
+ );
1993
+ str += `,${flatten(key)},${flatten(value)}`;
1994
+ keys.pop();
1995
+ }
1996
+
1997
+ str += ']';
1998
+ break;
1999
+
2000
+ case 'Int8Array':
2001
+ case 'Uint8Array':
2002
+ case 'Uint8ClampedArray':
2003
+ case 'Int16Array':
2004
+ case 'Uint16Array':
2005
+ case 'Float16Array':
2006
+ case 'Int32Array':
2007
+ case 'Uint32Array':
2008
+ case 'Float32Array':
2009
+ case 'Float64Array':
2010
+ case 'BigInt64Array':
2011
+ case 'BigUint64Array': {
2012
+ const info = ops.viewInfo(thing);
2013
+ str = '["' + tag + '",' + flatten(info.buffer);
2014
+
2015
+ // handle subarrays
2016
+ if (info.byteLength !== info.bufferByteLength) {
2017
+ str += `,${info.byteOffset},${info.length}`;
2018
+ }
2019
+
2020
+ str += ']';
2021
+ break;
2022
+ }
2023
+
2024
+ case 'DataView': {
2025
+ const info = ops.viewInfo(thing);
2026
+ str = '["' + tag + '",' + flatten(info.buffer);
2027
+
2028
+ if (info.byteLength !== info.bufferByteLength) {
2029
+ str += `,${info.byteOffset},${info.byteLength}`;
2030
+ }
2031
+
2032
+ str += ']';
2033
+ break;
2034
+ }
2035
+
2036
+ case 'ArrayBuffer': {
2037
+ const base64 = encode64(ops.toArrayBuffer(thing));
2038
+
2039
+ str = `["ArrayBuffer","${base64}"]`;
2040
+ break;
2041
+ }
2042
+
2043
+ case 'Temporal.Duration':
2044
+ case 'Temporal.Instant':
2045
+ case 'Temporal.PlainDate':
2046
+ case 'Temporal.PlainTime':
2047
+ case 'Temporal.PlainDateTime':
2048
+ case 'Temporal.PlainMonthDay':
2049
+ case 'Temporal.PlainYearMonth':
2050
+ case 'Temporal.ZonedDateTime':
2051
+ str = `["${tag}",${stringify_string(ops.toStringValue(thing))}]`;
2052
+ break;
2053
+
2054
+ default: {
2055
+ const shape = ops.shapeOf(thing);
2056
+
2057
+ if (shape.kind === 'not-plain') {
2058
+ throw new DevalueError(`Cannot stringify arbitrary non-POJOs`, keys, thing, value);
2059
+ }
2060
+
2061
+ if (shape.kind === 'symbol-keys') {
2062
+ throw new DevalueError(`Cannot stringify POJOs with symbolic keys`, keys, thing, value);
2063
+ }
2064
+
2065
+ if (shape.kind === 'null-proto') {
2066
+ str = '["null"';
2067
+ for (const key of shape.keys) {
2068
+ if (key === '__proto__') {
2069
+ throw new DevalueError(
2070
+ `Cannot stringify objects with __proto__ keys`,
2071
+ keys,
2072
+ thing,
2073
+ value
2074
+ );
2075
+ }
2076
+
2077
+ keys.push(stringify_key(key));
2078
+ str += `,${stringify_string(key)},${flatten(ops.get(thing, key))}`;
2079
+ keys.pop();
2080
+ }
2081
+ str += ']';
2082
+ } else {
2083
+ str = '{';
2084
+ let started = false;
2085
+ for (const key of shape.keys) {
2086
+ if (key === '__proto__') {
2087
+ throw new DevalueError(
2088
+ `Cannot stringify objects with __proto__ keys`,
2089
+ keys,
2090
+ thing,
2091
+ value
2092
+ );
2093
+ }
2094
+
2095
+ if (started) str += ',';
2096
+ started = true;
2097
+ keys.push(stringify_key(key));
2098
+ str += `${stringify_string(key)}:${flatten(ops.get(thing, key))}`;
2099
+ keys.pop();
2100
+ }
2101
+ str += '}';
2102
+ }
2103
+ }
2104
+ }
2105
+ }
2106
+
2107
+ stringified[index] = str;
2108
+ return index;
2109
+ }
2110
+
2111
+ const index = flatten(value);
2112
+
2113
+ // special case — value is represented as a negative index
2114
+ if (index < 0) return `${index}`;
2115
+
2116
+ return stringified;
2117
+ }
2118
+
2119
+ /**
2120
+ * @param {any} thing
2121
+ * @returns {string}
2122
+ */
2123
+ function stringify_primitive(thing) {
2124
+ const type = typeof thing;
2125
+ if (type === 'string') return stringify_string(thing);
2126
+ if (thing === void 0) return UNDEFINED.toString();
2127
+ if (thing === 0 && 1 / thing < 0) return NEGATIVE_ZERO.toString();
2128
+ if (type === 'bigint') return `["BigInt","${thing}"]`;
2129
+ return String(thing);
2130
+ }
2131
+
2132
+ const text_encoder = new TextEncoder();
2133
+
2134
+ /** @import { StandardSchemaV1 } from '@standard-schema/spec' */
2135
+
2136
+
2137
+ // TODO 3.0: remove these types as they are not used anymore (we can't remove them yet because that would be a breaking change)
2138
+ /**
2139
+ * @template {number} TNumber
2140
+ * @template {any[]} [TArray=[]]
2141
+ * @typedef {TNumber extends TArray['length'] ? TArray[number] : LessThan<TNumber, [...TArray, TArray['length']]>} LessThan
2142
+ */
2143
+
2144
+ /**
2145
+ * @template {number} TStart
2146
+ * @template {number} TEnd
2147
+ * @typedef {Exclude<TEnd | LessThan<TEnd>, LessThan<TStart>>} NumericRange
2148
+ */
2149
+
2150
+ // Keep the status codes as `number` because restricting to certain numbers makes it unnecessarily hard to use compared to the benefits
2151
+ // (we have runtime errors already to check for invalid codes). Also see https://github.com/sveltejs/kit/issues/11780
2152
+
2153
+ // we have to repeat the JSDoc because the display for function overloads is broken
2154
+ // see https://github.com/microsoft/TypeScript/issues/55056
2155
+
2156
+ /**
2157
+ * Throws an error with a HTTP status code and an optional message.
2158
+ * When called during request handling, this will cause SvelteKit to
2159
+ * return an error response without invoking `handleError`.
2160
+ * Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it.
2161
+ * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.
2162
+ * @param {App.Error} body An object that conforms to the App.Error type. If a string is passed, it will be used as the message property.
2163
+ * @overload
2164
+ * @param {number} status
2165
+ * @param {App.Error} body
2166
+ * @return {never}
2167
+ * @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling.
2168
+ * @throws {Error} If the provided status is invalid (not between 400 and 599).
2169
+ */
2170
+ /**
2171
+ * Throws an error with a HTTP status code and an optional message.
2172
+ * When called during request handling, this will cause SvelteKit to
2173
+ * return an error response without invoking `handleError`.
2174
+ * Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it.
2175
+ * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.
2176
+ * @param {{ message: string } extends App.Error ? App.Error | string | undefined : never} [body] An object that conforms to the App.Error type. If a string is passed, it will be used as the message property.
2177
+ * @overload
2178
+ * @param {number} status
2179
+ * @param {{ message: string } extends App.Error ? App.Error | string | undefined : never} [body]
2180
+ * @return {never}
2181
+ * @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling.
2182
+ * @throws {Error} If the provided status is invalid (not between 400 and 599).
2183
+ */
2184
+ /**
2185
+ * Throws an error with a HTTP status code and an optional message.
2186
+ * When called during request handling, this will cause SvelteKit to
2187
+ * return an error response without invoking `handleError`.
2188
+ * Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it.
2189
+ * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.
2190
+ * @param {{ message: string } extends App.Error ? App.Error | string | undefined : never} body An object that conforms to the App.Error type. If a string is passed, it will be used as the message property.
2191
+ * @return {never}
2192
+ * @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling.
2193
+ * @throws {Error} If the provided status is invalid (not between 400 and 599).
2194
+ */
2195
+ function error(status, body) {
2196
+ if ((isNaN(status) || status < 400 || status > 599)) {
2197
+ throw new Error(`HTTP error status codes must be between 400 and 599 — ${status} is invalid`);
2198
+ }
2199
+
2200
+ throw new HttpError(status, body);
2201
+ }
2202
+
2203
+ /**
2204
+ * Redirect a request. When called during request handling, SvelteKit will return a redirect response.
2205
+ * Make sure you're not catching the thrown redirect, which would prevent SvelteKit from handling it.
2206
+ *
2207
+ * Most common status codes:
2208
+ * * `303 See Other`: redirect as a GET request (often used after a form POST request)
2209
+ * * `307 Temporary Redirect`: redirect will keep the request method
2210
+ * * `308 Permanent Redirect`: redirect will keep the request method, SEO will be transferred to the new page
2211
+ *
2212
+ * [See all redirect status codes](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#redirection_messages)
2213
+ *
2214
+ * @param {300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | ({} & number)} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#redirection_messages). Must be in the range 300-308.
2215
+ * @param {string | URL} location The location to redirect to.
2216
+ * @throws {Redirect} This error instructs SvelteKit to redirect to the specified location.
2217
+ * @throws {Error} If the provided status is invalid or the location cannot be used as a header value.
2218
+ * @return {never}
2219
+ */
2220
+ function redirect(status, location) {
2221
+ if ((isNaN(status) || status < 300 || status > 308)) {
2222
+ throw new Error('Invalid status code');
2223
+ }
2224
+
2225
+ throw new Redirect(
2226
+ // @ts-ignore
2227
+ status,
2228
+ location.toString()
2229
+ );
2230
+ }
2231
+
2232
+ /**
2233
+ * Checks whether this is a redirect thrown by {@link redirect}.
2234
+ * @param {unknown} e The object to check.
2235
+ * @return {e is Redirect}
2236
+ */
2237
+ function isRedirect(e) {
2238
+ return e instanceof Redirect;
2239
+ }
2240
+
2241
+ /**
2242
+ * Create a JSON `Response` object from the supplied data.
2243
+ * @param {any} data The value that will be serialized as JSON.
2244
+ * @param {ResponseInit} [init] Options such as `status` and `headers` that will be added to the response. `Content-Type: application/json` and `Content-Length` headers will be added automatically.
2245
+ */
2246
+ function json(data, init) {
2247
+ // TODO deprecate this in favour of `Response.json` when it's
2248
+ // more widely supported
2249
+ const body = JSON.stringify(data);
2250
+
2251
+ // we can't just do `text(JSON.stringify(data), init)` because
2252
+ // it will set a default `content-type` header. duplicated code
2253
+ // means less duplicated work
2254
+ const headers = new Headers(init?.headers);
2255
+ if (!headers.has('content-length')) {
2256
+ headers.set('content-length', text_encoder.encode(body).byteLength.toString());
2257
+ }
2258
+
2259
+ if (!headers.has('content-type')) {
2260
+ headers.set('content-type', 'application/json');
2261
+ }
2262
+
2263
+ return new Response(body, {
2264
+ ...init,
2265
+ headers
2266
+ });
2267
+ }
2268
+
2269
+ /**
2270
+ * Create a `Response` object from the supplied body.
2271
+ * @param {string} body The value that will be used as-is.
2272
+ * @param {ResponseInit} [init] Options such as `status` and `headers` that will be added to the response. A `Content-Length` header will be added automatically.
2273
+ */
2274
+ function text(body, init) {
2275
+ const headers = new Headers(init?.headers);
2276
+ if (!headers.has('content-length')) {
2277
+ const encoded = text_encoder.encode(body);
2278
+ headers.set('content-length', encoded.byteLength.toString());
2279
+ return new Response(encoded, {
2280
+ ...init,
2281
+ headers
2282
+ });
2283
+ }
2284
+
2285
+ return new Response(body, {
2286
+ ...init,
2287
+ headers
2288
+ });
2289
+ }
2290
+
2291
+ // eslint-disable-next-line n/prefer-global/process
2292
+ const IN_WEBCONTAINER = !!globalThis.process?.versions?.webcontainer;
2293
+
2294
+ /** @import { RequestEvent } from '@sveltejs/kit' */
2295
+ /** @import { RequestStore } from 'types' */
2296
+ /** @import { AsyncLocalStorage } from 'node:async_hooks' */
2297
+
2298
+
2299
+ /** @type {RequestStore | null} */
2300
+ let sync_store = null;
2301
+
2302
+ /** @type {AsyncLocalStorage<RequestStore | null> | null} */
2303
+ let als;
2304
+
2305
+ import('node:async_hooks')
2306
+ .then((hooks) => (als = new hooks.AsyncLocalStorage()))
2307
+ .catch(() => {
2308
+ // can't use AsyncLocalStorage, but can still call getRequestEvent synchronously.
2309
+ // this isn't behind `supports` because it's basically just StackBlitz (i.e.
2310
+ // in-browser usage) that doesn't support it AFAICT
2311
+ });
2312
+
2313
+ /**
2314
+ * @template T
2315
+ * @param {RequestStore | null} store
2316
+ * @param {() => T} fn
2317
+ */
2318
+ function with_request_store(store, fn) {
2319
+ try {
2320
+ sync_store = store;
2321
+ return als ? als.run(store, fn) : fn();
2322
+ } finally {
2323
+ // Since AsyncLocalStorage is not working in webcontainers, we don't reset `sync_store`
2324
+ // and handle only one request at a time in `src/runtime/server/index.js`.
2325
+ if (!IN_WEBCONTAINER) {
2326
+ sync_store = null;
2327
+ }
2328
+ }
2329
+ }
2330
+
2331
+ /**
2332
+ * @template {{ tracing: { enabled: boolean, root: import('@opentelemetry/api').Span, current: import('@opentelemetry/api').Span } }} T
2333
+ * @param {T} event_like
2334
+ * @param {import('@opentelemetry/api').Span} current
2335
+ * @returns {T}
2336
+ */
2337
+ function merge_tracing(event_like, current) {
2338
+ return {
2339
+ ...event_like,
2340
+ tracing: {
2341
+ ...event_like.tracing,
2342
+ current
2343
+ }
2344
+ };
2345
+ }
2346
+
2347
+ const SVELTE_KIT_ASSETS = "/_svelte_kit_assets";
2348
+ const ENDPOINT_METHODS = ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "HEAD"];
2349
+ const PAGE_METHODS = ["GET", "POST", "HEAD"];
2350
+ function noop() {
2351
+ }
2352
+ function once(fn) {
2353
+ let done = false;
2354
+ let result;
2355
+ return () => {
2356
+ if (done) return result;
2357
+ done = true;
2358
+ return result = fn();
2359
+ };
2360
+ }
2361
+ const decoder = new TextDecoder();
2362
+ function set_nested_value(object, path_string, value) {
2363
+ if (path_string.startsWith("n:")) {
2364
+ path_string = path_string.slice(2);
2365
+ value = value === "" ? void 0 : parseFloat(value);
2366
+ } else if (path_string.startsWith("b:")) {
2367
+ path_string = path_string.slice(2);
2368
+ value = value === "on";
2369
+ }
2370
+ deep_set(object, split_path(path_string), value);
2371
+ }
2372
+ const DELETE_KEY = {};
2373
+ function convert_formdata(data) {
2374
+ const result = {};
2375
+ for (let key of data.keys()) {
2376
+ const is_array = key.endsWith("[]");
2377
+ let values = data.getAll(key);
2378
+ if (is_array) key = key.slice(0, -2);
2379
+ values = values.filter(
2380
+ (entry) => typeof entry === "string" || entry.name !== "" || entry.size > 0
2381
+ );
2382
+ if (values.length === 0 && !is_array) continue;
2383
+ if (key.startsWith("n:")) {
2384
+ key = key.slice(2);
2385
+ values = values.map((v) => v === "" ? void 0 : parseFloat(
2386
+ /** @type {string} */
2387
+ v
2388
+ ));
2389
+ } else if (key.startsWith("b:")) {
2390
+ key = key.slice(2);
2391
+ values = values.map((v) => v === "on");
2392
+ }
2393
+ if (values.length > 1 && !is_array) {
2394
+ throw new Error(`Form cannot contain duplicated keys — "${key}" has ${values.length} values`);
2395
+ }
2396
+ set_nested_value(result, key, is_array ? values : values[0]);
2397
+ }
2398
+ return result;
2399
+ }
2400
+ const BINARY_FORM_CONTENT_TYPE = "application/x-sveltekit-formdata";
2401
+ const BINARY_FORM_VERSION = 0;
2402
+ const HEADER_BYTES = 1 + 4 + 2;
2403
+ async function deserialize_binary_form(request) {
2404
+ if (request.headers.get("content-type") !== BINARY_FORM_CONTENT_TYPE) {
2405
+ const form_data = await request.formData();
2406
+ return { data: convert_formdata(form_data), meta: {}, form_data };
2407
+ }
2408
+ if (!request.body) {
2409
+ throw deserialize_error("no body");
2410
+ }
2411
+ const reader = request.body.getReader();
2412
+ const chunks = [];
2413
+ function get_chunk(index) {
2414
+ if (index in chunks) return chunks[index];
2415
+ let i = chunks.length;
2416
+ while (i <= index) {
2417
+ chunks[i] = reader.read().then((chunk) => chunk.value);
2418
+ i++;
2419
+ }
2420
+ return chunks[index];
2421
+ }
2422
+ async function get_buffer(offset, length) {
2423
+ let start_chunk;
2424
+ let chunk_start = 0;
2425
+ let chunk_index;
2426
+ for (chunk_index = 0; ; chunk_index++) {
2427
+ const chunk = await get_chunk(chunk_index);
2428
+ if (!chunk) return null;
2429
+ const chunk_end = chunk_start + chunk.byteLength;
2430
+ if (offset >= chunk_start && offset < chunk_end) {
2431
+ start_chunk = chunk;
2432
+ break;
2433
+ }
2434
+ chunk_start = chunk_end;
2435
+ }
2436
+ if (offset + length <= chunk_start + start_chunk.byteLength) {
2437
+ return start_chunk.subarray(offset - chunk_start, offset + length - chunk_start);
2438
+ }
2439
+ const chunks2 = [start_chunk.subarray(offset - chunk_start)];
2440
+ let cursor = start_chunk.byteLength - offset + chunk_start;
2441
+ while (cursor < length) {
2442
+ chunk_index++;
2443
+ let chunk = await get_chunk(chunk_index);
2444
+ if (!chunk) return null;
2445
+ if (chunk.byteLength > length - cursor) {
2446
+ chunk = chunk.subarray(0, length - cursor);
2447
+ }
2448
+ chunks2.push(chunk);
2449
+ cursor += chunk.byteLength;
2450
+ }
2451
+ const buffer = new Uint8Array(length);
2452
+ cursor = 0;
2453
+ for (const chunk of chunks2) {
2454
+ buffer.set(chunk, cursor);
2455
+ cursor += chunk.byteLength;
2456
+ }
2457
+ return buffer;
2458
+ }
2459
+ const header = await get_buffer(0, HEADER_BYTES);
2460
+ if (!header) throw deserialize_error("too short");
2461
+ if (header[0] !== BINARY_FORM_VERSION) {
2462
+ throw deserialize_error(`got version ${header[0]}, expected version ${BINARY_FORM_VERSION}`);
2463
+ }
2464
+ const header_view = new DataView(header.buffer, header.byteOffset, header.byteLength);
2465
+ const data_length = header_view.getUint32(1, true);
2466
+ const file_offsets_length = header_view.getUint16(5, true);
2467
+ const data_buffer = await get_buffer(HEADER_BYTES, data_length);
2468
+ if (!data_buffer) throw deserialize_error("data too short");
2469
+ let file_offsets;
2470
+ let files_start_offset;
2471
+ if (file_offsets_length > 0) {
2472
+ const file_offsets_buffer = await get_buffer(HEADER_BYTES + data_length, file_offsets_length);
2473
+ if (!file_offsets_buffer) throw deserialize_error("file offset table too short");
2474
+ const parsed_offsets = JSON.parse(decoder.decode(file_offsets_buffer));
2475
+ if (!Array.isArray(parsed_offsets) || parsed_offsets.some((n) => typeof n !== "number" || !Number.isInteger(n) || n < 0)) {
2476
+ throw deserialize_error("invalid file offset table");
2477
+ }
2478
+ file_offsets = /** @type {Array<number>} */
2479
+ parsed_offsets;
2480
+ files_start_offset = HEADER_BYTES + data_length + file_offsets_length;
2481
+ }
2482
+ const file_spans = [];
2483
+ const [data, meta] = parse(decoder.decode(data_buffer), {
2484
+ File: ([name, type, size, last_modified, index]) => {
2485
+ if (typeof name !== "string" || typeof type !== "string" || typeof size !== "number" || typeof last_modified !== "number" || typeof index !== "number") {
2486
+ throw deserialize_error("invalid file metadata");
2487
+ }
2488
+ let offset = file_offsets[index];
2489
+ if (offset === void 0) {
2490
+ throw deserialize_error("duplicate file offset table index");
2491
+ }
2492
+ file_offsets[index] = void 0;
2493
+ offset += files_start_offset;
2494
+ file_spans.push({ offset, size });
2495
+ return new Proxy(new LazyFile(name, type, size, last_modified, get_chunk, offset), {
2496
+ getPrototypeOf() {
2497
+ return File.prototype;
2498
+ }
2499
+ });
2500
+ }
2501
+ });
2502
+ file_spans.sort((a, b) => a.offset - b.offset || a.size - b.size);
2503
+ for (let i = 1; i < file_spans.length; i++) {
2504
+ const previous = file_spans[i - 1];
2505
+ const current = file_spans[i];
2506
+ const previous_end = previous.offset + previous.size;
2507
+ if (previous_end < current.offset) {
2508
+ throw deserialize_error("gaps in file data");
2509
+ }
2510
+ if (previous_end > current.offset) {
2511
+ throw deserialize_error("overlapping file data");
2512
+ }
2513
+ }
2514
+ void (async () => {
2515
+ let has_more = true;
2516
+ while (has_more) {
2517
+ const chunk = await get_chunk(chunks.length);
2518
+ has_more = !!chunk;
2519
+ }
2520
+ })().catch(noop);
2521
+ return { data, meta, form_data: null };
2522
+ }
2523
+ function deserialize_error(message) {
2524
+ return new SvelteKitError(400, "Bad Request", `Could not deserialize binary form: ${message}`);
2525
+ }
2526
+ class LazyFile {
2527
+ /** @type {(index: number) => Promise<Uint8Array<ArrayBuffer> | undefined>} */
2528
+ #get_chunk;
2529
+ /** @type {number} */
2530
+ #offset;
2531
+ /**
2532
+ * @param {string} name
2533
+ * @param {string} type
2534
+ * @param {number} size
2535
+ * @param {number} last_modified
2536
+ * @param {(index: number) => Promise<Uint8Array<ArrayBuffer> | undefined>} get_chunk
2537
+ * @param {number} offset
2538
+ */
2539
+ constructor(name, type, size, last_modified, get_chunk, offset) {
2540
+ this.name = name;
2541
+ this.type = type;
2542
+ this.size = size;
2543
+ this.lastModified = last_modified;
2544
+ this.webkitRelativePath = "";
2545
+ this.#get_chunk = get_chunk;
2546
+ this.#offset = offset;
2547
+ this.arrayBuffer = this.arrayBuffer.bind(this);
2548
+ this.bytes = this.bytes.bind(this);
2549
+ this.slice = this.slice.bind(this);
2550
+ this.stream = this.stream.bind(this);
2551
+ this.text = this.text.bind(this);
2552
+ }
2553
+ /** @type {ArrayBuffer | undefined} */
2554
+ #buffer;
2555
+ async arrayBuffer() {
2556
+ this.#buffer ??= await new Response(this.stream()).arrayBuffer();
2557
+ return this.#buffer;
2558
+ }
2559
+ async bytes() {
2560
+ return new Uint8Array(await this.arrayBuffer());
2561
+ }
2562
+ /**
2563
+ * @param {number=} start
2564
+ * @param {number=} end
2565
+ * @param {string=} contentType
2566
+ */
2567
+ slice(start = 0, end = this.size, contentType = this.type) {
2568
+ if (start < 0) {
2569
+ start = Math.max(this.size + start, 0);
2570
+ } else {
2571
+ start = Math.min(start, this.size);
2572
+ }
2573
+ if (end < 0) {
2574
+ end = Math.max(this.size + end, 0);
2575
+ } else {
2576
+ end = Math.min(end, this.size);
2577
+ }
2578
+ const size = Math.max(end - start, 0);
2579
+ const file = new LazyFile(
2580
+ this.name,
2581
+ contentType,
2582
+ size,
2583
+ this.lastModified,
2584
+ this.#get_chunk,
2585
+ this.#offset + start
2586
+ );
2587
+ return file;
2588
+ }
2589
+ stream() {
2590
+ let cursor = 0;
2591
+ let chunk_index = 0;
2592
+ return new ReadableStream({
2593
+ start: async (controller) => {
2594
+ let chunk_start = 0;
2595
+ let start_chunk;
2596
+ for (chunk_index = 0; ; chunk_index++) {
2597
+ const chunk = await this.#get_chunk(chunk_index);
2598
+ if (!chunk) return null;
2599
+ const chunk_end = chunk_start + chunk.byteLength;
2600
+ if (this.#offset >= chunk_start && this.#offset < chunk_end) {
2601
+ start_chunk = chunk;
2602
+ break;
2603
+ }
2604
+ chunk_start = chunk_end;
2605
+ }
2606
+ if (this.#offset + this.size <= chunk_start + start_chunk.byteLength) {
2607
+ controller.enqueue(
2608
+ start_chunk.subarray(this.#offset - chunk_start, this.#offset + this.size - chunk_start)
2609
+ );
2610
+ controller.close();
2611
+ } else {
2612
+ controller.enqueue(start_chunk.subarray(this.#offset - chunk_start));
2613
+ cursor = start_chunk.byteLength - this.#offset + chunk_start;
2614
+ }
2615
+ },
2616
+ pull: async (controller) => {
2617
+ chunk_index++;
2618
+ let chunk = await this.#get_chunk(chunk_index);
2619
+ if (!chunk) {
2620
+ controller.error("incomplete file data");
2621
+ controller.close();
2622
+ return;
2623
+ }
2624
+ if (chunk.byteLength > this.size - cursor) {
2625
+ chunk = chunk.subarray(0, this.size - cursor);
2626
+ }
2627
+ controller.enqueue(chunk);
2628
+ cursor += chunk.byteLength;
2629
+ if (cursor >= this.size) {
2630
+ controller.close();
2631
+ }
2632
+ }
2633
+ });
2634
+ }
2635
+ async text() {
2636
+ return decoder.decode(await this.arrayBuffer());
2637
+ }
2638
+ }
2639
+ const path_regex = /^[a-zA-Z_$]\w*(\.[a-zA-Z_$]\w*|\[\d+\])*$/;
2640
+ function split_path(path) {
2641
+ if (!path_regex.test(path)) {
2642
+ throw new Error(`Invalid path ${path}`);
2643
+ }
2644
+ return path.split(/\.|\[|\]/).filter(Boolean);
2645
+ }
2646
+ function check_prototype_pollution(key) {
2647
+ if (key === "__proto__" || key === "constructor" || key === "prototype") {
2648
+ throw new Error(
2649
+ `Invalid key "${key}"`
2650
+ );
2651
+ }
2652
+ }
2653
+ function deep_set(object, keys, value) {
2654
+ let current = object;
2655
+ for (let i = 0; i < keys.length - 1; i += 1) {
2656
+ const key = keys[i];
2657
+ check_prototype_pollution(key);
2658
+ const is_array = /^\d+$/.test(keys[i + 1]);
2659
+ const inner = Object.hasOwn(current, key) ? current[key] : void 0;
2660
+ const exists = inner != null;
2661
+ if (exists && is_array !== Array.isArray(inner)) {
2662
+ throw new Error(`Invalid array key ${keys[i + 1]}`);
2663
+ }
2664
+ if (!exists) {
2665
+ if (value === DELETE_KEY) {
2666
+ return;
2667
+ }
2668
+ current[key] = is_array ? [] : {};
2669
+ }
2670
+ current = current[key];
2671
+ }
2672
+ const final_key = keys[keys.length - 1];
2673
+ check_prototype_pollution(final_key);
2674
+ if (value === DELETE_KEY) {
2675
+ delete current[final_key];
2676
+ } else {
2677
+ current[final_key] = value;
2678
+ }
2679
+ }
2680
+ const INVALIDATED_PARAM = "x-sveltekit-invalidated";
2681
+ const TRAILING_SLASH_PARAM = "x-sveltekit-trailing-slash";
2682
+ function stringify(data, transport) {
2683
+ const encoders = Object.fromEntries(Object.entries(transport).map(([k, v]) => [k, v.encode]));
2684
+ return stringify$1(data, encoders);
2685
+ }
2686
+ const remote_object = "__skrao";
2687
+ const remote_map = "__skram";
2688
+ const remote_set = "__skras";
2689
+ const remote_file = "__skraf";
2690
+ function create_remote_arg_revivers(transport) {
2691
+ const remote_fns_revivers = {
2692
+ /** @type {(value: unknown) => unknown} */
2693
+ [remote_object]: (value) => value,
2694
+ /** @type {(value: unknown) => Map<unknown, unknown>} */
2695
+ [remote_map]: (value) => {
2696
+ if (!Array.isArray(value)) {
2697
+ throw new Error("Invalid data for Map reviver");
2698
+ }
2699
+ const map = /* @__PURE__ */ new Map();
2700
+ for (const item of value) {
2701
+ if (!Array.isArray(item) || item.length !== 2 || typeof item[0] !== "string" || typeof item[1] !== "string") {
2702
+ throw new Error("Invalid data for Map reviver");
2703
+ }
2704
+ const [key, val] = item;
2705
+ map.set(parse$1(key), parse$1(val));
2706
+ }
2707
+ return map;
2708
+ },
2709
+ /** @type {(value: unknown) => Set<unknown>} */
2710
+ [remote_set]: (value) => {
2711
+ if (!Array.isArray(value)) {
2712
+ throw new Error("Invalid data for Set reviver");
2713
+ }
2714
+ const set = /* @__PURE__ */ new Set();
2715
+ for (const item of value) {
2716
+ if (typeof item !== "string") {
2717
+ throw new Error("Invalid data for Set reviver");
2718
+ }
2719
+ set.add(parse$1(item));
2720
+ }
2721
+ return set;
2722
+ },
2723
+ /** @type {(value: any) => File} */
2724
+ [remote_file]: (value) => {
2725
+ if (!value || typeof value !== "object" || typeof value.name !== "string" || typeof value.type !== "string" || typeof value.size !== "number" || typeof value.lastModified !== "number" || !(value.data instanceof ArrayBuffer)) {
2726
+ throw new Error("Invalid data for File reviver");
2727
+ }
2728
+ const { data, name, ...meta } = value;
2729
+ return new File([data], name, meta);
2730
+ }
2731
+ };
2732
+ const user_revivers = Object.fromEntries(
2733
+ Object.entries(transport).map(([k, v]) => [k, v.decode])
2734
+ );
2735
+ const all_revivers = { ...user_revivers, ...remote_fns_revivers };
2736
+ const parse$1 = (data) => parse(data, all_revivers);
2737
+ return all_revivers;
2738
+ }
2739
+ function parse_remote_arg(string, transport) {
2740
+ if (!string) return void 0;
2741
+ const json_string = new TextDecoder().decode(
2742
+ // no need to add back `=` characters, atob can handle it
2743
+ base64_decode(string.replaceAll("-", "+").replaceAll("_", "/"))
2744
+ );
2745
+ return parse(json_string, create_remote_arg_revivers(transport));
2746
+ }
2747
+ function create_remote_key(id, payload) {
2748
+ return id + "/" + payload;
2749
+ }
2750
+ function split_remote_key(key) {
2751
+ const i = key.lastIndexOf("/");
2752
+ if (i === -1) {
2753
+ throw new Error(`Invalid remote key: ${key}`);
2754
+ }
2755
+ return {
2756
+ id: key.slice(0, i),
2757
+ payload: key.slice(i + 1)
2758
+ };
2759
+ }
2760
+ function coalesce_to_error(err) {
2761
+ return err instanceof Error || err && /** @type {any} */
2762
+ err.name && /** @type {any} */
2763
+ err.message ? (
2764
+ /** @type {Error} */
2765
+ err
2766
+ ) : new Error(JSON.stringify(err));
2767
+ }
2768
+ function normalize_error(error) {
2769
+ return (
2770
+ /** @type {import('../exports/internal/index.js').Redirect | HttpError | SvelteKitError | Error} */
2771
+ error
2772
+ );
2773
+ }
2774
+ function get_status(error) {
2775
+ return error instanceof HttpError || error instanceof SvelteKitError ? error.status : 500;
2776
+ }
2777
+ function get_message(error) {
2778
+ return error instanceof SvelteKitError ? error.text : "Internal Error";
2779
+ }
2780
+ function negotiate(accept, types) {
2781
+ const parts = [];
2782
+ accept.split(",").forEach((str, i) => {
2783
+ const match = /^[ \t]*([^/ \t]+)\/([^; \t]+)[ \t]*(?:;[ \t]*q=([0-9.]+))?/.exec(str);
2784
+ if (match) {
2785
+ const [, type, subtype, q = "1"] = match;
2786
+ parts.push({ type, subtype, q: +q, i });
2787
+ }
2788
+ });
2789
+ parts.sort((a, b) => {
2790
+ if (a.q !== b.q) {
2791
+ return b.q - a.q;
2792
+ }
2793
+ if (a.subtype === "*" !== (b.subtype === "*")) {
2794
+ return a.subtype === "*" ? 1 : -1;
2795
+ }
2796
+ if (a.type === "*" !== (b.type === "*")) {
2797
+ return a.type === "*" ? 1 : -1;
2798
+ }
2799
+ return a.i - b.i;
2800
+ });
2801
+ let accepted;
2802
+ let min_priority = Infinity;
2803
+ for (const mimetype of types) {
2804
+ const [type, subtype] = mimetype.split("/");
2805
+ const priority = parts.findIndex(
2806
+ (part) => (part.type === type || part.type === "*") && (part.subtype === subtype || part.subtype === "*")
2807
+ );
2808
+ if (priority !== -1 && priority < min_priority) {
2809
+ accepted = mimetype;
2810
+ min_priority = priority;
2811
+ }
2812
+ }
2813
+ return accepted;
2814
+ }
2815
+ function get_set_cookies(headers) {
2816
+ if (typeof headers.getSetCookie === "function") {
2817
+ return headers.getSetCookie();
2818
+ }
2819
+ const set_cookie = headers.get("set-cookie");
2820
+ return set_cookie ? splitCookiesString(set_cookie) : [];
2821
+ }
2822
+ function is_content_type(request, ...types) {
2823
+ const type = request.headers.get("content-type")?.split(";", 1)[0].trim() ?? "";
2824
+ return types.includes(type.toLowerCase());
2825
+ }
2826
+ function is_form_content_type(request) {
2827
+ return is_content_type(
2828
+ request,
2829
+ "application/x-www-form-urlencoded",
2830
+ "multipart/form-data",
2831
+ "text/plain",
2832
+ BINARY_FORM_CONTENT_TYPE
2833
+ );
2834
+ }
2835
+ const escape_html_attr_dict = {
2836
+ "&": "&amp;",
2837
+ '"': "&quot;"
2838
+ // Svelte also escapes < because the escape function could be called inside a `noscript` there
2839
+ // https://github.com/sveltejs/svelte/security/advisories/GHSA-8266-84wp-wv5c
2840
+ // However, that doesn't apply in SvelteKit
2841
+ };
2842
+ const escape_html_dict = {
2843
+ "&": "&amp;",
2844
+ "<": "&lt;"
2845
+ };
2846
+ const surrogates = (
2847
+ // high surrogate without paired low surrogate
2848
+ "[\\ud800-\\udbff](?![\\udc00-\\udfff])|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\udc00-\\udfff]"
2849
+ );
2850
+ const escape_html_attr_regex = new RegExp(
2851
+ `[${Object.keys(escape_html_attr_dict).join("")}]|` + surrogates,
2852
+ "g"
2853
+ );
2854
+ const escape_html_regex = new RegExp(
2855
+ `[${Object.keys(escape_html_dict).join("")}]|` + surrogates,
2856
+ "g"
2857
+ );
2858
+ function escape_html(str, is_attr) {
2859
+ const dict = is_attr ? escape_html_attr_dict : escape_html_dict;
2860
+ const escaped_str = str.replace(is_attr ? escape_html_attr_regex : escape_html_regex, (match) => {
2861
+ if (match.length === 2) {
2862
+ return match;
2863
+ }
2864
+ return dict[match] ?? `&#${match.charCodeAt(0)};`;
2865
+ });
2866
+ return escaped_str;
2867
+ }
2868
+ function method_not_allowed(mod, method) {
2869
+ return text(`${method} method not allowed`, {
2870
+ status: 405,
2871
+ headers: {
2872
+ // https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/405
2873
+ // "The server must generate an Allow header field in a 405 status code response"
2874
+ allow: allowed_methods(mod).join(", ")
2875
+ }
2876
+ });
2877
+ }
2878
+ function allowed_methods(mod) {
2879
+ const allowed = ENDPOINT_METHODS.filter((method) => method in mod);
2880
+ if ("GET" in mod && !("HEAD" in mod)) {
2881
+ allowed.push("HEAD");
2882
+ }
2883
+ return allowed;
2884
+ }
2885
+ function get_global_name(options) {
2886
+ return `__sveltekit_${options.version_hash}`;
2887
+ }
2888
+ function static_error_page(options, status, message) {
2889
+ let page = options.templates.error({ status, message: escape_html(message) });
2890
+ return text(page, {
2891
+ headers: { "content-type": "text/html; charset=utf-8" },
2892
+ status
2893
+ });
2894
+ }
2895
+ async function handle_fatal_error(event, state, options, error) {
2896
+ error = error instanceof HttpError ? error : coalesce_to_error(error);
2897
+ const status = get_status(error);
2898
+ const body = await handle_error_and_jsonify(event, state, options, error);
2899
+ const type = negotiate(event.request.headers.get("accept") || "text/html", [
2900
+ "application/json",
2901
+ "text/html"
2902
+ ]);
2903
+ if (event.isDataRequest || type === "application/json") {
2904
+ return json(body, {
2905
+ status
2906
+ });
2907
+ }
2908
+ return static_error_page(options, status, body.message);
2909
+ }
2910
+ async function handle_error_and_jsonify(event, state, options, error) {
2911
+ if (error instanceof HttpError) {
2912
+ return { message: "Unknown Error", ...error.body };
2913
+ }
2914
+ const status = get_status(error);
2915
+ const message = get_message(error);
2916
+ return await with_request_store(
2917
+ { event, state },
2918
+ () => options.hooks.handleError({ error, event, status, message })
2919
+ ) ?? { message };
2920
+ }
2921
+ function redirect_response(status, location) {
2922
+ const response = new Response(void 0, {
2923
+ status,
2924
+ headers: { location }
2925
+ });
2926
+ return response;
2927
+ }
2928
+ function clarify_devalue_error(event, error) {
2929
+ if (error.path) {
2930
+ return `Data returned from \`load\` while rendering ${event.route.id} is not serializable: ${error.message} (${error.path}). If you need to serialize/deserialize custom types, use transport hooks: https://svelte.dev/docs/kit/hooks#transport.`;
2931
+ }
2932
+ if (error.path === "") {
2933
+ return `Data returned from \`load\` while rendering ${event.route.id} is not a plain object`;
2934
+ }
2935
+ return error.message;
2936
+ }
2937
+ function serialize_uses(node) {
2938
+ const uses = {};
2939
+ if (node.uses && node.uses.dependencies.size > 0) {
2940
+ uses.dependencies = Array.from(node.uses.dependencies);
2941
+ }
2942
+ if (node.uses && node.uses.search_params.size > 0) {
2943
+ uses.search_params = Array.from(node.uses.search_params);
2944
+ }
2945
+ if (node.uses && node.uses.params.size > 0) {
2946
+ uses.params = Array.from(node.uses.params);
2947
+ }
2948
+ if (node.uses?.parent) uses.parent = 1;
2949
+ if (node.uses?.route) uses.route = 1;
2950
+ if (node.uses?.url) uses.url = 1;
2951
+ return uses;
2952
+ }
2953
+ function has_prerendered_path(manifest, pathname) {
2954
+ return manifest._.prerendered_routes.has(pathname) || pathname.at(-1) === "/" && manifest._.prerendered_routes.has(pathname.slice(0, -1));
2955
+ }
2956
+ function format_server_error(status, error, event) {
2957
+ const formatted_text = `
2958
+ \x1B[1;31m[${status}] ${event.request.method} ${event.url.pathname}\x1B[0m`;
2959
+ if (status === 404) {
2960
+ return formatted_text;
2961
+ }
2962
+ return `${formatted_text}
2963
+ ${error.stack}`;
2964
+ }
2965
+ function get_node_type(node_id) {
2966
+ const parts = node_id?.split("/");
2967
+ const filename = parts?.at(-1);
2968
+ if (!filename) return "unknown";
2969
+ const dot_parts = filename.split(".");
2970
+ return dot_parts.slice(0, -1).join(".");
2971
+ }
2972
+ function create_replacer(transport) {
2973
+ const replacer = (thing) => {
2974
+ for (const key in transport) {
2975
+ const encoded = transport[key].encode(thing);
2976
+ if (encoded) {
2977
+ return `app.decode('${key}', ${uneval(encoded, replacer)})`;
2978
+ }
2979
+ }
2980
+ };
2981
+ return replacer;
2982
+ }
2983
+
2984
+ export { escape_html as A, create_remote_key as B, error as C, parse_remote_arg as D, ENDPOINT_METHODS as E, deserialize_binary_form as F, stringify as G, HttpError as H, INVALIDATED_PARAM as I, stringify$1 as J, ActionFailure as K, split_remote_key as L, SVELTE_KIT_ASSETS as M, redirect as N, splitCookiesString as O, PAGE_METHODS as P, Redirect as R, SvelteKitError as S, TRAILING_SLASH_PARAM as T, handle_fatal_error as a, negotiate as b, method_not_allowed as c, handle_error_and_jsonify as d, get_status as e, format_server_error as f, get_set_cookies as g, has_prerendered_path as h, is_form_content_type as i, json as j, get_global_name as k, create_replacer as l, merge_tracing as m, noop as n, serialize_uses as o, parseString as p, clarify_devalue_error as q, redirect_response as r, static_error_page as s, text as t, uneval as u, once as v, with_request_store as w, normalize_error as x, get_node_type as y, isRedirect as z };
2985
+ //# sourceMappingURL=utils.js-BJgm9WbO.js.map