@phosart/devtool 0.2.55 → 0.2.57

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 (244) hide show
  1. package/build/client/editor/_app/immutable/assets/0.CE-HU6_R.css +1 -0
  2. package/build/client/editor/_app/immutable/assets/0.CE-HU6_R.css.br +0 -0
  3. package/build/client/editor/_app/immutable/assets/0.CE-HU6_R.css.gz +0 -0
  4. package/build/client/editor/_app/immutable/chunks/{DYdV_MTZ.js → BQBnnK1A.js} +1 -1
  5. package/build/client/editor/_app/immutable/chunks/BQBnnK1A.js.br +0 -0
  6. package/build/client/editor/_app/immutable/chunks/BQBnnK1A.js.gz +0 -0
  7. package/build/client/editor/_app/immutable/chunks/BRLWNwkm.js +2 -0
  8. package/build/client/editor/_app/immutable/chunks/BRLWNwkm.js.br +0 -0
  9. package/build/client/editor/_app/immutable/chunks/BRLWNwkm.js.gz +0 -0
  10. package/build/client/editor/_app/immutable/chunks/{B2HnU_F2.js → BuYmkH3n.js} +1 -1
  11. package/build/client/editor/_app/immutable/chunks/BuYmkH3n.js.br +0 -0
  12. package/build/client/editor/_app/immutable/chunks/BuYmkH3n.js.gz +0 -0
  13. package/build/client/editor/_app/immutable/chunks/CJbFI_Gz.js +1 -0
  14. package/build/client/editor/_app/immutable/chunks/CJbFI_Gz.js.br +0 -0
  15. package/build/client/editor/_app/immutable/chunks/CJbFI_Gz.js.gz +0 -0
  16. package/build/client/editor/_app/immutable/chunks/{DuR8u9-d.js → CMXRgKV0.js} +1 -1
  17. package/build/client/editor/_app/immutable/chunks/CMXRgKV0.js.br +0 -0
  18. package/build/client/editor/_app/immutable/chunks/CMXRgKV0.js.gz +0 -0
  19. package/build/client/editor/_app/immutable/chunks/{BpNosAwA.js → CTla0eqV.js} +1 -1
  20. package/build/client/editor/_app/immutable/chunks/CTla0eqV.js.br +0 -0
  21. package/build/client/editor/_app/immutable/chunks/CTla0eqV.js.gz +0 -0
  22. package/build/client/editor/_app/immutable/chunks/{WhzuguR0.js → CbmodELI.js} +1 -1
  23. package/build/client/editor/_app/immutable/chunks/CbmodELI.js.br +0 -0
  24. package/build/client/editor/_app/immutable/chunks/CbmodELI.js.gz +0 -0
  25. package/build/client/editor/_app/immutable/chunks/{BhmV8iRG.js → D1fjcSbV.js} +1 -1
  26. package/build/client/editor/_app/immutable/chunks/D1fjcSbV.js.br +5 -0
  27. package/build/client/editor/_app/immutable/chunks/D1fjcSbV.js.gz +0 -0
  28. package/build/client/editor/_app/immutable/chunks/{0KCptHmh.js → DGkRmM82.js} +1 -1
  29. package/build/client/editor/_app/immutable/chunks/DGkRmM82.js.br +0 -0
  30. package/build/client/editor/_app/immutable/chunks/DGkRmM82.js.gz +0 -0
  31. package/build/client/editor/_app/immutable/chunks/{B_EcgHYV.js → DHHhyD08.js} +1 -1
  32. package/build/client/editor/_app/immutable/chunks/DHHhyD08.js.br +0 -0
  33. package/build/client/editor/_app/immutable/chunks/DHHhyD08.js.gz +0 -0
  34. package/build/client/editor/_app/immutable/chunks/{C4FIJGw8.js → DI4PmIam.js} +1 -1
  35. package/build/client/editor/_app/immutable/chunks/DI4PmIam.js.br +0 -0
  36. package/build/client/editor/_app/immutable/chunks/DI4PmIam.js.gz +0 -0
  37. package/build/client/editor/_app/immutable/chunks/DS2LKpDk.js +3 -0
  38. package/build/client/editor/_app/immutable/chunks/DS2LKpDk.js.br +0 -0
  39. package/build/client/editor/_app/immutable/chunks/DS2LKpDk.js.gz +0 -0
  40. package/build/client/editor/_app/immutable/chunks/{Cbto24e2.js → D_CKeXBn.js} +1 -1
  41. package/build/client/editor/_app/immutable/chunks/D_CKeXBn.js.br +0 -0
  42. package/build/client/editor/_app/immutable/chunks/D_CKeXBn.js.gz +0 -0
  43. package/build/client/editor/_app/immutable/chunks/{BT801B2w.js → DavvYvf_.js} +1 -1
  44. package/build/client/editor/_app/immutable/chunks/DavvYvf_.js.br +0 -0
  45. package/build/client/editor/_app/immutable/chunks/DavvYvf_.js.gz +0 -0
  46. package/build/client/editor/_app/immutable/chunks/{BZViGcSm.js → JbW8BSs9.js} +3 -3
  47. package/build/client/editor/_app/immutable/chunks/JbW8BSs9.js.br +0 -0
  48. package/build/client/editor/_app/immutable/chunks/JbW8BSs9.js.gz +0 -0
  49. package/build/client/editor/_app/immutable/chunks/{BrxmDnNG.js → h4NBNrL0.js} +1 -1
  50. package/build/client/editor/_app/immutable/chunks/h4NBNrL0.js.br +0 -0
  51. package/build/client/editor/_app/immutable/chunks/h4NBNrL0.js.gz +0 -0
  52. package/build/client/editor/_app/immutable/chunks/{sUNQfOMV.js → n4XDhzqP.js} +1 -1
  53. package/build/client/editor/_app/immutable/chunks/n4XDhzqP.js.br +3 -0
  54. package/build/client/editor/_app/immutable/chunks/n4XDhzqP.js.gz +0 -0
  55. package/build/client/editor/_app/immutable/chunks/yTA8YyXq.js +1 -0
  56. package/build/client/editor/_app/immutable/chunks/yTA8YyXq.js.br +2 -0
  57. package/build/client/editor/_app/immutable/chunks/yTA8YyXq.js.gz +0 -0
  58. package/build/client/editor/_app/immutable/entry/app.uFoAaN1G.js +2 -0
  59. package/build/client/editor/_app/immutable/entry/app.uFoAaN1G.js.br +0 -0
  60. package/build/client/editor/_app/immutable/entry/app.uFoAaN1G.js.gz +0 -0
  61. package/build/client/editor/_app/immutable/entry/start.CTqY9QUK.js +1 -0
  62. package/build/client/editor/_app/immutable/entry/start.CTqY9QUK.js.br +2 -0
  63. package/build/client/editor/_app/immutable/entry/start.CTqY9QUK.js.gz +0 -0
  64. package/build/client/editor/_app/immutable/nodes/{0.DxETR5fU.js → 0.CYGmrzfG.js} +1 -1
  65. package/build/client/editor/_app/immutable/nodes/0.CYGmrzfG.js.br +0 -0
  66. package/build/client/editor/_app/immutable/nodes/0.CYGmrzfG.js.gz +0 -0
  67. package/build/client/editor/_app/immutable/nodes/1.ChvqkYRO.js +1 -0
  68. package/build/client/editor/_app/immutable/nodes/1.ChvqkYRO.js.br +0 -0
  69. package/build/client/editor/_app/immutable/nodes/1.ChvqkYRO.js.gz +0 -0
  70. package/build/client/editor/_app/immutable/nodes/{2.C1Aba-tP.js → 2.CrNHks7B.js} +1 -1
  71. package/build/client/editor/_app/immutable/nodes/2.CrNHks7B.js.br +0 -0
  72. package/build/client/editor/_app/immutable/nodes/2.CrNHks7B.js.gz +0 -0
  73. package/build/client/editor/_app/immutable/nodes/{3.BYrpT4pI.js → 3.CGF0lT4P.js} +1 -1
  74. package/build/client/editor/_app/immutable/nodes/3.CGF0lT4P.js.br +0 -0
  75. package/build/client/editor/_app/immutable/nodes/3.CGF0lT4P.js.gz +0 -0
  76. package/build/client/editor/_app/immutable/nodes/4.CIOtEY1f.js +2 -0
  77. package/build/client/editor/_app/immutable/nodes/4.CIOtEY1f.js.br +0 -0
  78. package/build/client/editor/_app/immutable/nodes/4.CIOtEY1f.js.gz +0 -0
  79. package/build/client/editor/_app/immutable/nodes/{5.BTWdh43F.js → 5.BmU0R-v5.js} +1 -1
  80. package/build/client/editor/_app/immutable/nodes/5.BmU0R-v5.js.br +0 -0
  81. package/build/client/editor/_app/immutable/nodes/5.BmU0R-v5.js.gz +0 -0
  82. package/build/client/editor/_app/immutable/nodes/6.7KYKz379.js +1 -0
  83. package/build/client/editor/_app/immutable/nodes/6.7KYKz379.js.br +0 -0
  84. package/build/client/editor/_app/immutable/nodes/6.7KYKz379.js.gz +0 -0
  85. package/build/client/editor/_app/immutable/nodes/{7.CV8_KNFP.js → 7.3ef6EaL9.js} +1 -1
  86. package/build/client/editor/_app/immutable/nodes/7.3ef6EaL9.js.br +0 -0
  87. package/build/client/editor/_app/immutable/nodes/7.3ef6EaL9.js.gz +0 -0
  88. package/build/client/editor/_app/version.json +1 -1
  89. package/build/client/editor/_app/version.json.br +0 -0
  90. package/build/client/editor/_app/version.json.gz +0 -0
  91. package/build/server/chunks/{0-AjO2BQOI.js → 0-UPtBX1AG.js} +4 -4
  92. package/build/server/chunks/{0-AjO2BQOI.js.map → 0-UPtBX1AG.js.map} +1 -1
  93. package/build/server/chunks/1-MKoERUZf.js +9 -0
  94. package/build/server/chunks/{1-DNxC-WGZ.js.map → 1-MKoERUZf.js.map} +1 -1
  95. package/build/server/chunks/{2-BcKSGVgk.js → 2-C3nGu2Fb.js} +3 -3
  96. package/build/server/chunks/{2-BcKSGVgk.js.map → 2-C3nGu2Fb.js.map} +1 -1
  97. package/build/server/chunks/{3-C6bl8QxY.js → 3-DgI5gLXn.js} +3 -3
  98. package/build/server/chunks/{3-C6bl8QxY.js.map → 3-DgI5gLXn.js.map} +1 -1
  99. package/build/server/chunks/{4-dq3474EQ.js → 4-fS42hja9.js} +3 -3
  100. package/build/server/chunks/{4-dq3474EQ.js.map → 4-fS42hja9.js.map} +1 -1
  101. package/build/server/chunks/{5-BG4YexER.js → 5-lBUB20QJ.js} +3 -3
  102. package/build/server/chunks/{5-BG4YexER.js.map → 5-lBUB20QJ.js.map} +1 -1
  103. package/build/server/chunks/{6-DS2Tlclu.js → 6-CQ8u5GOg.js} +3 -3
  104. package/build/server/chunks/{6-DS2Tlclu.js.map → 6-CQ8u5GOg.js.map} +1 -1
  105. package/build/server/chunks/{7-LL2k2P3i.js → 7-gezf7Bo5.js} +3 -3
  106. package/build/server/chunks/{7-LL2k2P3i.js.map → 7-gezf7Bo5.js.map} +1 -1
  107. package/build/server/chunks/{ActionButton-bCBhEcfn.js → ActionButton-mkFYNSea.js} +2 -2
  108. package/build/server/chunks/ActionButton-mkFYNSea.js.map +1 -0
  109. package/build/server/chunks/{Checkbox-Cl0rz2av.js → Checkbox-fLLZz3yU.js} +3 -3
  110. package/build/server/chunks/Checkbox-fLLZz3yU.js.map +1 -0
  111. package/build/server/chunks/{Modal-gQ4_8JPX.js → Modal-CvVMDygt.js} +4 -4
  112. package/build/server/chunks/Modal-CvVMDygt.js.map +1 -0
  113. package/build/server/chunks/{SearchInput-BHGwfrD9.js → SearchInput-Be47rAks.js} +3 -3
  114. package/build/server/chunks/SearchInput-Be47rAks.js.map +1 -0
  115. package/build/server/chunks/{TagEdit-jGkfc4Yl.js → TagEdit-DkQl9Imu.js} +4 -4
  116. package/build/server/chunks/TagEdit-DkQl9Imu.js.map +1 -0
  117. package/build/server/chunks/{TextBox-BFIQcNco.js → TextBox-DsKw7Q67.js} +5 -5
  118. package/build/server/chunks/TextBox-DsKw7Q67.js.map +1 -0
  119. package/build/server/chunks/{Tooltip-D5TPQeJl.js → Tooltip-f7vWkyo7.js} +2 -2
  120. package/build/server/chunks/{Tooltip-D5TPQeJl.js.map → Tooltip-f7vWkyo7.js.map} +1 -1
  121. package/build/server/chunks/{_layout.svelte-BHetA6tT.js → _layout.svelte-B1UGWjtX.js} +10 -10
  122. package/build/server/chunks/_layout.svelte-B1UGWjtX.js.map +1 -0
  123. package/build/server/chunks/{_page.svelte-DFQGbb4O.js → _page.svelte-BycVqEYy.js} +5 -5
  124. package/build/server/chunks/_page.svelte-BycVqEYy.js.map +1 -0
  125. package/build/server/chunks/{_page.svelte-DGCzQMIr.js → _page.svelte-C1xPu8pW.js} +6 -6
  126. package/build/server/chunks/_page.svelte-C1xPu8pW.js.map +1 -0
  127. package/build/server/chunks/{_page.svelte-xfTeLlHa.js → _page.svelte-D-FqU1wG.js} +7 -7
  128. package/build/server/chunks/_page.svelte-D-FqU1wG.js.map +1 -0
  129. package/build/server/chunks/{_page.svelte-ChxSPa1G.js → _page.svelte-DJUFAqKy.js} +26 -16
  130. package/build/server/chunks/_page.svelte-DJUFAqKy.js.map +1 -0
  131. package/build/server/chunks/{_page.svelte-DFphiN_f.js → _page.svelte-DqOdNs2O.js} +11 -11
  132. package/build/server/chunks/_page.svelte-DqOdNs2O.js.map +1 -0
  133. package/build/server/chunks/{_page.svelte-DPUt9GFF.js → _page.svelte-Dwdn61Rz.js} +14 -14
  134. package/build/server/chunks/_page.svelte-Dwdn61Rz.js.map +1 -0
  135. package/build/server/chunks/{client-CJt7aej2.js → client-IRFEPlPd.js} +4 -4
  136. package/build/server/chunks/client-IRFEPlPd.js.map +1 -0
  137. package/build/server/chunks/error.svelte-tEjwweHd.js +15 -0
  138. package/build/server/chunks/{error.svelte-DpjxI-KC.js.map → error.svelte-tEjwweHd.js.map} +1 -1
  139. package/build/server/chunks/event-ByDKS2H7.js.map +1 -1
  140. package/build/server/chunks/{context-BmNrKtQb.js → exports-DTikbzSR.js} +104 -104
  141. package/build/server/chunks/exports-DTikbzSR.js.map +1 -0
  142. package/build/server/chunks/{galleryoverride.svelte-BRU5usdL.js → galleryoverride.svelte-DFvLyYKd.js} +2 -2
  143. package/build/server/chunks/{galleryoverride.svelte-BRU5usdL.js.map → galleryoverride.svelte-DFvLyYKd.js.map} +1 -1
  144. package/build/server/chunks/index-CoD1IJuy.js.map +1 -1
  145. package/build/server/chunks/{index2-DHJrk8_o.js → index-Z8eOP0z5.js} +394 -8
  146. package/build/server/chunks/index-Z8eOP0z5.js.map +1 -0
  147. package/build/server/chunks/{index-6Cdu3mod.js → index2-RKMiVZcy.js} +2 -2
  148. package/build/server/chunks/index2-RKMiVZcy.js.map +1 -0
  149. package/build/server/chunks/{index3-D6qAZ0Ak.js → index3-BZmvBuFZ.js} +4 -4
  150. package/build/server/chunks/{index3-D6qAZ0Ak.js.map → index3-BZmvBuFZ.js.map} +1 -1
  151. package/build/server/chunks/{state.svelte-CQgQefnE.js → state.svelte-BDFqjDVR.js} +2 -2
  152. package/build/server/chunks/{state.svelte-CQgQefnE.js.map → state.svelte-BDFqjDVR.js.map} +1 -1
  153. package/build/server/index.js +458 -669
  154. package/build/server/index.js.map +1 -1
  155. package/build/server/manifest.js +9 -9
  156. package/build/server/manifest.js.map +1 -1
  157. package/package.json +3 -3
  158. package/build/client/editor/_app/immutable/assets/0.D_2TxQkJ.css +0 -1
  159. package/build/client/editor/_app/immutable/assets/0.D_2TxQkJ.css.br +0 -0
  160. package/build/client/editor/_app/immutable/assets/0.D_2TxQkJ.css.gz +0 -0
  161. package/build/client/editor/_app/immutable/chunks/0KCptHmh.js.br +0 -0
  162. package/build/client/editor/_app/immutable/chunks/0KCptHmh.js.gz +0 -0
  163. package/build/client/editor/_app/immutable/chunks/5eNaY1gy.js +0 -2
  164. package/build/client/editor/_app/immutable/chunks/5eNaY1gy.js.br +0 -0
  165. package/build/client/editor/_app/immutable/chunks/5eNaY1gy.js.gz +0 -0
  166. package/build/client/editor/_app/immutable/chunks/B2HnU_F2.js.br +0 -0
  167. package/build/client/editor/_app/immutable/chunks/B2HnU_F2.js.gz +0 -0
  168. package/build/client/editor/_app/immutable/chunks/BT801B2w.js.br +0 -0
  169. package/build/client/editor/_app/immutable/chunks/BT801B2w.js.gz +0 -0
  170. package/build/client/editor/_app/immutable/chunks/BZViGcSm.js.br +0 -0
  171. package/build/client/editor/_app/immutable/chunks/BZViGcSm.js.gz +0 -0
  172. package/build/client/editor/_app/immutable/chunks/B_EcgHYV.js.br +0 -0
  173. package/build/client/editor/_app/immutable/chunks/B_EcgHYV.js.gz +0 -0
  174. package/build/client/editor/_app/immutable/chunks/BhmV8iRG.js.br +0 -0
  175. package/build/client/editor/_app/immutable/chunks/BhmV8iRG.js.gz +0 -0
  176. package/build/client/editor/_app/immutable/chunks/BpNosAwA.js.br +0 -0
  177. package/build/client/editor/_app/immutable/chunks/BpNosAwA.js.gz +0 -0
  178. package/build/client/editor/_app/immutable/chunks/BrxmDnNG.js.br +0 -0
  179. package/build/client/editor/_app/immutable/chunks/BrxmDnNG.js.gz +0 -0
  180. package/build/client/editor/_app/immutable/chunks/C4FIJGw8.js.br +0 -3
  181. package/build/client/editor/_app/immutable/chunks/C4FIJGw8.js.gz +0 -0
  182. package/build/client/editor/_app/immutable/chunks/Cbto24e2.js.br +0 -0
  183. package/build/client/editor/_app/immutable/chunks/Cbto24e2.js.gz +0 -0
  184. package/build/client/editor/_app/immutable/chunks/Cgk6vfk7.js +0 -3
  185. package/build/client/editor/_app/immutable/chunks/Cgk6vfk7.js.br +0 -0
  186. package/build/client/editor/_app/immutable/chunks/Cgk6vfk7.js.gz +0 -0
  187. package/build/client/editor/_app/immutable/chunks/DYdV_MTZ.js.br +0 -0
  188. package/build/client/editor/_app/immutable/chunks/DYdV_MTZ.js.gz +0 -0
  189. package/build/client/editor/_app/immutable/chunks/D_jTRcxm.js +0 -1
  190. package/build/client/editor/_app/immutable/chunks/D_jTRcxm.js.br +0 -2
  191. package/build/client/editor/_app/immutable/chunks/D_jTRcxm.js.gz +0 -0
  192. package/build/client/editor/_app/immutable/chunks/DuR8u9-d.js.br +0 -0
  193. package/build/client/editor/_app/immutable/chunks/DuR8u9-d.js.gz +0 -0
  194. package/build/client/editor/_app/immutable/chunks/WhzuguR0.js.br +0 -0
  195. package/build/client/editor/_app/immutable/chunks/WhzuguR0.js.gz +0 -0
  196. package/build/client/editor/_app/immutable/chunks/ga0QoJIG.js +0 -1
  197. package/build/client/editor/_app/immutable/chunks/ga0QoJIG.js.br +0 -0
  198. package/build/client/editor/_app/immutable/chunks/ga0QoJIG.js.gz +0 -0
  199. package/build/client/editor/_app/immutable/chunks/sUNQfOMV.js.br +0 -2
  200. package/build/client/editor/_app/immutable/chunks/sUNQfOMV.js.gz +0 -0
  201. package/build/client/editor/_app/immutable/entry/app.DqKo1zWB.js +0 -2
  202. package/build/client/editor/_app/immutable/entry/app.DqKo1zWB.js.br +0 -0
  203. package/build/client/editor/_app/immutable/entry/app.DqKo1zWB.js.gz +0 -0
  204. package/build/client/editor/_app/immutable/entry/start.CQfGMh2T.js +0 -1
  205. package/build/client/editor/_app/immutable/entry/start.CQfGMh2T.js.br +0 -2
  206. package/build/client/editor/_app/immutable/entry/start.CQfGMh2T.js.gz +0 -0
  207. package/build/client/editor/_app/immutable/nodes/0.DxETR5fU.js.br +0 -0
  208. package/build/client/editor/_app/immutable/nodes/0.DxETR5fU.js.gz +0 -0
  209. package/build/client/editor/_app/immutable/nodes/1.CbCobvVX.js +0 -1
  210. package/build/client/editor/_app/immutable/nodes/1.CbCobvVX.js.br +0 -0
  211. package/build/client/editor/_app/immutable/nodes/1.CbCobvVX.js.gz +0 -0
  212. package/build/client/editor/_app/immutable/nodes/2.C1Aba-tP.js.br +0 -0
  213. package/build/client/editor/_app/immutable/nodes/2.C1Aba-tP.js.gz +0 -0
  214. package/build/client/editor/_app/immutable/nodes/3.BYrpT4pI.js.br +0 -0
  215. package/build/client/editor/_app/immutable/nodes/3.BYrpT4pI.js.gz +0 -0
  216. package/build/client/editor/_app/immutable/nodes/4.qP3zBkd-.js +0 -1
  217. package/build/client/editor/_app/immutable/nodes/4.qP3zBkd-.js.br +0 -0
  218. package/build/client/editor/_app/immutable/nodes/4.qP3zBkd-.js.gz +0 -0
  219. package/build/client/editor/_app/immutable/nodes/5.BTWdh43F.js.br +0 -0
  220. package/build/client/editor/_app/immutable/nodes/5.BTWdh43F.js.gz +0 -0
  221. package/build/client/editor/_app/immutable/nodes/6.BnZ1oZbx.js +0 -1
  222. package/build/client/editor/_app/immutable/nodes/6.BnZ1oZbx.js.br +0 -0
  223. package/build/client/editor/_app/immutable/nodes/6.BnZ1oZbx.js.gz +0 -0
  224. package/build/client/editor/_app/immutable/nodes/7.CV8_KNFP.js.br +0 -0
  225. package/build/client/editor/_app/immutable/nodes/7.CV8_KNFP.js.gz +0 -0
  226. package/build/server/chunks/1-DNxC-WGZ.js +0 -9
  227. package/build/server/chunks/ActionButton-bCBhEcfn.js.map +0 -1
  228. package/build/server/chunks/Checkbox-Cl0rz2av.js.map +0 -1
  229. package/build/server/chunks/Modal-gQ4_8JPX.js.map +0 -1
  230. package/build/server/chunks/SearchInput-BHGwfrD9.js.map +0 -1
  231. package/build/server/chunks/TagEdit-jGkfc4Yl.js.map +0 -1
  232. package/build/server/chunks/TextBox-BFIQcNco.js.map +0 -1
  233. package/build/server/chunks/_layout.svelte-BHetA6tT.js.map +0 -1
  234. package/build/server/chunks/_page.svelte-ChxSPa1G.js.map +0 -1
  235. package/build/server/chunks/_page.svelte-DFQGbb4O.js.map +0 -1
  236. package/build/server/chunks/_page.svelte-DFphiN_f.js.map +0 -1
  237. package/build/server/chunks/_page.svelte-DGCzQMIr.js.map +0 -1
  238. package/build/server/chunks/_page.svelte-DPUt9GFF.js.map +0 -1
  239. package/build/server/chunks/_page.svelte-xfTeLlHa.js.map +0 -1
  240. package/build/server/chunks/client-CJt7aej2.js.map +0 -1
  241. package/build/server/chunks/context-BmNrKtQb.js.map +0 -1
  242. package/build/server/chunks/error.svelte-DpjxI-KC.js +0 -15
  243. package/build/server/chunks/index-6Cdu3mod.js.map +0 -1
  244. package/build/server/chunks/index2-DHJrk8_o.js.map +0 -1
@@ -1,9 +1,9 @@
1
- import { j as json, t as text, R as Redirect, S as SvelteKitError, H as HttpError, e as error, A as ActionFailure } from './chunks/index-CoD1IJuy.js';
1
+ import { S as SvelteKitError, j as json, t as text, R as Redirect, H as HttpError, e as error, A as ActionFailure } from './chunks/index-CoD1IJuy.js';
2
2
  import { w as with_request_store } from './chunks/event-ByDKS2H7.js';
3
3
  import { b as base, a as app_dir, e as exec, c as assets, r as relative, o as override, d as reset } from './chunks/routing-C4Egnc9A.js';
4
- import { t as text_decoder, b as base64_decode, d as define_property, o as object_prototype, a as array_prototype, g as get_descriptor, i as is_extensible, c as array_from, e as get_prototype_of, f as is_array, h as deferred, r as run_all, j as index_of, s as setContext, k as decode_pathname, l as decode_params, n as normalize_path, m as disable_search, v as validate_layout_server_exports, p as validate_layout_exports, q as validate_page_server_exports, u as validate_page_exports, w as text_encoder, x as resolve, y as make_trackable, z as base64_encode, A as get_relative_path } from './chunks/context-BmNrKtQb.js';
5
- import { s as safe_equals, e as equals, r as readable, w as writable } from './chunks/index-6Cdu3mod.js';
6
- import { r as render, L as LEGACY_PROPS, E as ERROR_VALUE, C as COMMENT_NODE, H as HYDRATION_START, a as HYDRATION_ERROR, S as STATE_SYMBOL, U as UNINITIALIZED, D as DERIVED, b as DIRTY, c as CONNECTED, d as CLEAN, M as MAYBE_DIRTY, I as INERT, B as BOUNDARY_EFFECT, e as EFFECT, f as BLOCK_EFFECT, W as WAS_MARKED, i as is_passive_event, g as BRANCH_EFFECT, R as ROOT_EFFECT, h as DESTROYED, j as MANAGED_EFFECT, A as ASYNC, k as HEAD_EFFECT, l as REACTION_IS_UPDATING, m as EFFECT_RAN, n as EFFECT_PRESERVED, o as EFFECT_TRANSPARENT, p as EAGER_EFFECT, q as STALE_REACTION, s as HYDRATION_END, t as RENDER_EFFECT, u as HYDRATION_START_ELSE, v as USER_EFFECT } from './chunks/index2-DHJrk8_o.js';
4
+ import { t as text_decoder, b as base64_decode, d as define_property, o as object_prototype, a as array_prototype, g as get_descriptor, i as is_extensible, c as array_from, e as get_prototype_of, f as is_array, h as deferred, r as run_all, j as index_of, s as setContext, k as decode_pathname, l as decode_params, n as normalize_path, m as disable_search, v as validate_layout_server_exports, p as validate_layout_exports, q as validate_page_server_exports, u as validate_page_exports, w as text_encoder, x as resolve, y as make_trackable, z as base64_encode, A as get_relative_path } from './chunks/exports-DTikbzSR.js';
5
+ import { D as DevalueError, i as is_primitive, g as get_type, a as is_plain_object, e as enumerable_symbols, s as stringify_key, b as stringify_string, r as render, L as LEGACY_PROPS, C as CONNECTED, E as ERROR_VALUE, c as COMMENT_NODE, H as HYDRATION_START, d as HYDRATION_ERROR, S as STATE_SYMBOL, U as UNINITIALIZED, f as DERIVED, h as DIRTY, M as MAYBE_DIRTY, j as CLEAN, I as INERT, k as EFFECT, B as BLOCK_EFFECT, W as WAS_MARKED, l as is_passive_event, m as BRANCH_EFFECT, R as ROOT_EFFECT, n as RENDER_EFFECT, o as MANAGED_EFFECT, p as DESTROYED, A as ASYNC, q as HEAD_EFFECT, t as REACTION_IS_UPDATING, u as EFFECT_RAN, v as EFFECT_PRESERVED, w as EFFECT_TRANSPARENT, x as BOUNDARY_EFFECT, y as EAGER_EFFECT, z as STALE_REACTION, F as HYDRATION_END, G as HYDRATION_START_ELSE, J as USER_EFFECT, K as uneval } from './chunks/index-Z8eOP0z5.js';
6
+ import { s as safe_equals, e as equals, r as readable, w as writable } from './chunks/index2-RKMiVZcy.js';
7
7
 
8
8
  const BROWSER = false;
9
9
 
@@ -23,94 +23,6 @@ function merge_tracing(event_like, current) {
23
23
  };
24
24
  }
25
25
 
26
- const escaped = {
27
- "<": "\\u003C",
28
- "\\": "\\\\",
29
- "\b": "\\b",
30
- "\f": "\\f",
31
- "\n": "\\n",
32
- "\r": "\\r",
33
- " ": "\\t",
34
- "\u2028": "\\u2028",
35
- "\u2029": "\\u2029"
36
- };
37
- class DevalueError extends Error {
38
- /**
39
- * @param {string} message
40
- * @param {string[]} keys
41
- * @param {any} [value] - The value that failed to be serialized
42
- * @param {any} [root] - The root value being serialized
43
- */
44
- constructor(message, keys, value, root) {
45
- super(message);
46
- this.name = "DevalueError";
47
- this.path = keys.join("");
48
- this.value = value;
49
- this.root = root;
50
- }
51
- }
52
- function is_primitive(thing) {
53
- return Object(thing) !== thing;
54
- }
55
- const object_proto_names = /* @__PURE__ */ Object.getOwnPropertyNames(
56
- Object.prototype
57
- ).sort().join("\0");
58
- function is_plain_object(thing) {
59
- const proto = Object.getPrototypeOf(thing);
60
- return proto === Object.prototype || proto === null || Object.getPrototypeOf(proto) === null || Object.getOwnPropertyNames(proto).sort().join("\0") === object_proto_names;
61
- }
62
- function get_type(thing) {
63
- return Object.prototype.toString.call(thing).slice(8, -1);
64
- }
65
- function get_escaped_char(char) {
66
- switch (char) {
67
- case '"':
68
- return '\\"';
69
- case "<":
70
- return "\\u003C";
71
- case "\\":
72
- return "\\\\";
73
- case "\n":
74
- return "\\n";
75
- case "\r":
76
- return "\\r";
77
- case " ":
78
- return "\\t";
79
- case "\b":
80
- return "\\b";
81
- case "\f":
82
- return "\\f";
83
- case "\u2028":
84
- return "\\u2028";
85
- case "\u2029":
86
- return "\\u2029";
87
- default:
88
- return char < " " ? `\\u${char.charCodeAt(0).toString(16).padStart(4, "0")}` : "";
89
- }
90
- }
91
- function stringify_string(str) {
92
- let result = "";
93
- let last_pos = 0;
94
- const len = str.length;
95
- for (let i = 0; i < len; i += 1) {
96
- const char = str[i];
97
- const replacement = get_escaped_char(char);
98
- if (replacement) {
99
- result += str.slice(last_pos, i) + replacement;
100
- last_pos = i + 1;
101
- }
102
- }
103
- return `"${last_pos === 0 ? str : result + str.slice(last_pos)}"`;
104
- }
105
- function enumerable_symbols(object) {
106
- return Object.getOwnPropertySymbols(object).filter(
107
- (symbol) => Object.getOwnPropertyDescriptor(object, symbol).enumerable
108
- );
109
- }
110
- const is_identifier = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
111
- function stringify_key(key) {
112
- return is_identifier.test(key) ? "." + key : "[" + JSON.stringify(key) + "]";
113
- }
114
26
  function encode64(arraybuffer) {
115
27
  const dv = new DataView(arraybuffer);
116
28
  let binaryString = "";
@@ -200,6 +112,7 @@ function unflatten(parsed, revivers) {
200
112
  parsed
201
113
  );
202
114
  const hydrated = Array(values.length);
115
+ let hydrating = null;
203
116
  function hydrate(index, standalone = false) {
204
117
  if (index === UNDEFINED) return void 0;
205
118
  if (index === NAN) return NaN;
@@ -222,7 +135,14 @@ function unflatten(parsed, revivers) {
222
135
  if (typeof i !== "number") {
223
136
  i = values.push(value[1]) - 1;
224
137
  }
225
- return hydrated[index] = reviver(hydrate(i));
138
+ hydrating ??= /* @__PURE__ */ new Set();
139
+ if (hydrating.has(i)) {
140
+ throw new Error("Invalid circular reference");
141
+ }
142
+ hydrating.add(i);
143
+ hydrated[index] = reviver(hydrate(i));
144
+ hydrating.delete(i);
145
+ return hydrated[index];
226
146
  }
227
147
  switch (type) {
228
148
  case "Date":
@@ -269,13 +189,20 @@ function unflatten(parsed, revivers) {
269
189
  case "Float64Array":
270
190
  case "BigInt64Array":
271
191
  case "BigUint64Array": {
192
+ if (values[value[1]][0] !== "ArrayBuffer") {
193
+ throw new Error("Invalid data");
194
+ }
272
195
  const TypedArrayConstructor = globalThis[type];
273
- const typedArray = new TypedArrayConstructor(hydrate(value[1]));
196
+ const buffer = hydrate(value[1]);
197
+ const typedArray = new TypedArrayConstructor(buffer);
274
198
  hydrated[index] = value[2] !== void 0 ? typedArray.subarray(value[2], value[3]) : typedArray;
275
199
  break;
276
200
  }
277
201
  case "ArrayBuffer": {
278
202
  const base64 = value[1];
203
+ if (typeof base64 !== "string") {
204
+ throw new Error("Invalid ArrayBuffer encoding");
205
+ }
279
206
  const arraybuffer = decode64(base64);
280
207
  hydrated[index] = arraybuffer;
281
208
  break;
@@ -361,14 +288,14 @@ function stringify$1(value, reducers) {
361
288
  }
362
289
  let str = "";
363
290
  if (is_primitive(thing)) {
364
- str = stringify_primitive$1(thing);
291
+ str = stringify_primitive(thing);
365
292
  } else {
366
293
  const type = get_type(thing);
367
294
  switch (type) {
368
295
  case "Number":
369
296
  case "String":
370
297
  case "Boolean":
371
- str = `["Object",${stringify_primitive$1(thing)}]`;
298
+ str = `["Object",${stringify_primitive(thing)}]`;
372
299
  break;
373
300
  case "BigInt":
374
301
  str = `["BigInt",${thing}]`;
@@ -412,7 +339,7 @@ function stringify$1(value, reducers) {
412
339
  str = '["Map"';
413
340
  for (const [key, value2] of thing) {
414
341
  keys.push(
415
- `.get(${is_primitive(key) ? stringify_primitive$1(key) : "..."})`
342
+ `.get(${is_primitive(key) ? stringify_primitive(key) : "..."})`
416
343
  );
417
344
  str += `,${flatten(key)},${flatten(value2)}`;
418
345
  keys.pop();
@@ -503,7 +430,7 @@ function stringify$1(value, reducers) {
503
430
  if (index < 0) return `${index}`;
504
431
  return `[${stringified.join(",")}]`;
505
432
  }
506
- function stringify_primitive$1(thing) {
433
+ function stringify_primitive(thing) {
507
434
  const type = typeof thing;
508
435
  if (type === "string") return stringify_string(thing);
509
436
  if (thing instanceof String) return stringify_string(thing.toString());
@@ -550,17 +477,22 @@ function convert_formdata(data) {
550
477
  }
551
478
  const BINARY_FORM_CONTENT_TYPE = "application/x-sveltekit-formdata";
552
479
  const BINARY_FORM_VERSION = 0;
480
+ const HEADER_BYTES = 1 + 4 + 2;
553
481
  async function deserialize_binary_form(request) {
554
482
  if (request.headers.get("content-type") !== BINARY_FORM_CONTENT_TYPE) {
555
483
  const form_data = await request.formData();
556
484
  return { data: convert_formdata(form_data), meta: {}, form_data };
557
485
  }
558
486
  if (!request.body) {
559
- throw new Error("Could not deserialize binary form: no body");
487
+ throw deserialize_error("no body");
488
+ }
489
+ const content_length = parseInt(request.headers.get("content-length") ?? "");
490
+ if (Number.isNaN(content_length)) {
491
+ throw deserialize_error("invalid Content-Length header");
560
492
  }
561
493
  const reader = request.body.getReader();
562
494
  const chunks = [];
563
- async function get_chunk(index) {
495
+ function get_chunk(index) {
564
496
  if (index in chunks) return chunks[index];
565
497
  let i = chunks.length;
566
498
  while (i <= index) {
@@ -586,8 +518,7 @@ async function deserialize_binary_form(request) {
586
518
  if (offset + length <= chunk_start + start_chunk.byteLength) {
587
519
  return start_chunk.subarray(offset - chunk_start, offset + length - chunk_start);
588
520
  }
589
- const buffer = new Uint8Array(length);
590
- buffer.set(start_chunk.subarray(offset - chunk_start));
521
+ const chunks2 = [start_chunk.subarray(offset - chunk_start)];
591
522
  let cursor = start_chunk.byteLength - offset + chunk_start;
592
523
  while (cursor < length) {
593
524
  chunk_index++;
@@ -596,35 +527,47 @@ async function deserialize_binary_form(request) {
596
527
  if (chunk.byteLength > length - cursor) {
597
528
  chunk = chunk.subarray(0, length - cursor);
598
529
  }
530
+ chunks2.push(chunk);
531
+ cursor += chunk.byteLength;
532
+ }
533
+ const buffer = new Uint8Array(length);
534
+ cursor = 0;
535
+ for (const chunk of chunks2) {
599
536
  buffer.set(chunk, cursor);
600
537
  cursor += chunk.byteLength;
601
538
  }
602
539
  return buffer;
603
540
  }
604
- const header = await get_buffer(0, 1 + 4 + 2);
605
- if (!header) throw new Error("Could not deserialize binary form: too short");
541
+ const header = await get_buffer(0, HEADER_BYTES);
542
+ if (!header) throw deserialize_error("too short");
606
543
  if (header[0] !== BINARY_FORM_VERSION) {
607
- throw new Error(
608
- `Could not deserialize binary form: got version ${header[0]}, expected version ${BINARY_FORM_VERSION}`
609
- );
544
+ throw deserialize_error(`got version ${header[0]}, expected version ${BINARY_FORM_VERSION}`);
610
545
  }
611
546
  const header_view = new DataView(header.buffer, header.byteOffset, header.byteLength);
612
547
  const data_length = header_view.getUint32(1, true);
548
+ if (HEADER_BYTES + data_length > content_length) {
549
+ throw deserialize_error("data overflow");
550
+ }
613
551
  const file_offsets_length = header_view.getUint16(5, true);
614
- const data_buffer = await get_buffer(1 + 4 + 2, data_length);
615
- if (!data_buffer) throw new Error("Could not deserialize binary form: data too short");
552
+ if (HEADER_BYTES + data_length + file_offsets_length > content_length) {
553
+ throw deserialize_error("file offset table overflow");
554
+ }
555
+ const data_buffer = await get_buffer(HEADER_BYTES, data_length);
556
+ if (!data_buffer) throw deserialize_error("data too short");
616
557
  let file_offsets;
617
558
  let files_start_offset;
618
559
  if (file_offsets_length > 0) {
619
- const file_offsets_buffer = await get_buffer(1 + 4 + 2 + data_length, file_offsets_length);
620
- if (!file_offsets_buffer)
621
- throw new Error("Could not deserialize binary form: file offset table too short");
560
+ const file_offsets_buffer = await get_buffer(HEADER_BYTES + data_length, file_offsets_length);
561
+ if (!file_offsets_buffer) throw deserialize_error("file offset table too short");
622
562
  file_offsets = /** @type {Array<number>} */
623
563
  JSON.parse(text_decoder.decode(file_offsets_buffer));
624
- files_start_offset = 1 + 4 + 2 + data_length + file_offsets_length;
564
+ files_start_offset = HEADER_BYTES + data_length + file_offsets_length;
625
565
  }
626
566
  const [data, meta] = parse(text_decoder.decode(data_buffer), {
627
567
  File: ([name, type, size, last_modified, index]) => {
568
+ if (files_start_offset + file_offsets[index] + size > content_length) {
569
+ throw deserialize_error("file data overflow");
570
+ }
628
571
  return new Proxy(
629
572
  new LazyFile(
630
573
  name,
@@ -651,6 +594,9 @@ async function deserialize_binary_form(request) {
651
594
  })();
652
595
  return { data, meta, form_data: null };
653
596
  }
597
+ function deserialize_error(message) {
598
+ return new SvelteKitError(400, "Bad Request", `Could not deserialize binary form: ${message}`);
599
+ }
654
600
  class LazyFile {
655
601
  /** @type {(index: number) => Promise<Uint8Array<ArrayBuffer> | undefined>} */
656
602
  #get_chunk;
@@ -745,7 +691,7 @@ class LazyFile {
745
691
  chunk_index++;
746
692
  let chunk = await this.#get_chunk(chunk_index);
747
693
  if (!chunk) {
748
- controller.error("Could not deserialize binary form: incomplete file data");
694
+ controller.error("incomplete file data");
749
695
  controller.close();
750
696
  return;
751
697
  }
@@ -784,7 +730,7 @@ function deep_set(object, keys, value) {
784
730
  const key = keys[i];
785
731
  check_prototype_pollution(key);
786
732
  const is_array = /^\d+$/.test(keys[i + 1]);
787
- const exists = key in current;
733
+ const exists = Object.hasOwn(current, key);
788
734
  const inner = current[key];
789
735
  if (exists && is_array !== Array.isArray(inner)) {
790
736
  throw new Error(`Invalid array key ${keys[i + 1]}`);
@@ -1000,6 +946,39 @@ function invoke_error_boundary(error, effect) {
1000
946
  }
1001
947
  throw error;
1002
948
  }
949
+ const STATUS_MASK = -7169;
950
+ function set_signal_status(signal, status) {
951
+ signal.f = signal.f & STATUS_MASK | status;
952
+ }
953
+ function update_derived_status(derived) {
954
+ if ((derived.f & CONNECTED) !== 0 || derived.deps === null) {
955
+ set_signal_status(derived, CLEAN);
956
+ } else {
957
+ set_signal_status(derived, MAYBE_DIRTY);
958
+ }
959
+ }
960
+ function clear_marked(deps) {
961
+ if (deps === null) return;
962
+ for (const dep of deps) {
963
+ if ((dep.f & DERIVED) === 0 || (dep.f & WAS_MARKED) === 0) {
964
+ continue;
965
+ }
966
+ dep.f ^= WAS_MARKED;
967
+ clear_marked(
968
+ /** @type {Derived} */
969
+ dep.deps
970
+ );
971
+ }
972
+ }
973
+ function defer_effect(effect, dirty_effects, maybe_dirty_effects) {
974
+ if ((effect.f & DIRTY) !== 0) {
975
+ dirty_effects.add(effect);
976
+ } else if ((effect.f & MAYBE_DIRTY) !== 0) {
977
+ maybe_dirty_effects.add(effect);
978
+ }
979
+ clear_marked(effect.deps);
980
+ set_signal_status(effect, CLEAN);
981
+ }
1003
982
  const batches = /* @__PURE__ */ new Set();
1004
983
  let current_batch = null;
1005
984
  let batch_values = null;
@@ -1073,25 +1052,21 @@ class Batch {
1073
1052
  process(root_effects) {
1074
1053
  queued_root_effects = [];
1075
1054
  this.apply();
1076
- var target = {
1077
- parent: null,
1078
- effect: null,
1079
- effects: [],
1080
- render_effects: []
1081
- };
1055
+ var effects = [];
1056
+ var render_effects = [];
1082
1057
  for (const root2 of root_effects) {
1083
- this.#traverse_effect_tree(root2, target);
1058
+ this.#traverse_effect_tree(root2, effects, render_effects);
1084
1059
  }
1085
1060
  if (!this.is_fork) {
1086
1061
  this.#resolve();
1087
1062
  }
1088
1063
  if (this.is_deferred()) {
1089
- this.#defer_effects(target.effects);
1090
- this.#defer_effects(target.render_effects);
1064
+ this.#defer_effects(render_effects);
1065
+ this.#defer_effects(effects);
1091
1066
  } else {
1092
1067
  current_batch = null;
1093
- flush_queued_effects(target.render_effects);
1094
- flush_queued_effects(target.effects);
1068
+ flush_queued_effects(render_effects);
1069
+ flush_queued_effects(effects);
1095
1070
  this.#deferred?.resolve();
1096
1071
  }
1097
1072
  batch_values = null;
@@ -1100,31 +1075,27 @@ class Batch {
1100
1075
  * Traverse the effect tree, executing effects or stashing
1101
1076
  * them for later execution as appropriate
1102
1077
  * @param {Effect} root
1103
- * @param {EffectTarget} target
1078
+ * @param {Effect[]} effects
1079
+ * @param {Effect[]} render_effects
1104
1080
  */
1105
- #traverse_effect_tree(root2, target) {
1081
+ #traverse_effect_tree(root2, effects, render_effects) {
1106
1082
  root2.f ^= CLEAN;
1107
1083
  var effect = root2.first;
1084
+ var pending_boundary = null;
1108
1085
  while (effect !== null) {
1109
1086
  var flags2 = effect.f;
1110
1087
  var is_branch = (flags2 & (BRANCH_EFFECT | ROOT_EFFECT)) !== 0;
1111
1088
  var is_skippable_branch = is_branch && (flags2 & CLEAN) !== 0;
1112
1089
  var skip = is_skippable_branch || (flags2 & INERT) !== 0 || this.skipped_effects.has(effect);
1113
- if ((effect.f & BOUNDARY_EFFECT) !== 0 && effect.b?.is_pending()) {
1114
- target = {
1115
- parent: target,
1116
- effect,
1117
- effects: [],
1118
- render_effects: []
1119
- };
1120
- }
1121
1090
  if (!skip && effect.fn !== null) {
1122
1091
  if (is_branch) {
1123
1092
  effect.f ^= CLEAN;
1093
+ } else if (pending_boundary !== null && (flags2 & (EFFECT | RENDER_EFFECT | MANAGED_EFFECT)) !== 0) {
1094
+ pending_boundary.b.defer_effect(effect);
1124
1095
  } else if ((flags2 & EFFECT) !== 0) {
1125
- target.effects.push(effect);
1096
+ effects.push(effect);
1126
1097
  } else if (is_dirty(effect)) {
1127
- if ((effect.f & BLOCK_EFFECT) !== 0) this.#dirty_effects.add(effect);
1098
+ if ((flags2 & BLOCK_EFFECT) !== 0) this.#dirty_effects.add(effect);
1128
1099
  update_effect(effect);
1129
1100
  }
1130
1101
  var child = effect.first;
@@ -1136,11 +1107,8 @@ class Batch {
1136
1107
  var parent = effect.parent;
1137
1108
  effect = effect.next;
1138
1109
  while (effect === null && parent !== null) {
1139
- if (parent === target.effect) {
1140
- this.#defer_effects(target.effects);
1141
- this.#defer_effects(target.render_effects);
1142
- target = /** @type {EffectTarget} */
1143
- target.parent;
1110
+ if (parent === pending_boundary) {
1111
+ pending_boundary = null;
1144
1112
  }
1145
1113
  effect = parent.next;
1146
1114
  parent = parent.parent;
@@ -1151,30 +1119,8 @@ class Batch {
1151
1119
  * @param {Effect[]} effects
1152
1120
  */
1153
1121
  #defer_effects(effects) {
1154
- for (const e of effects) {
1155
- if ((e.f & DIRTY) !== 0) {
1156
- this.#dirty_effects.add(e);
1157
- } else if ((e.f & MAYBE_DIRTY) !== 0) {
1158
- this.#maybe_dirty_effects.add(e);
1159
- }
1160
- this.#clear_marked(e.deps);
1161
- set_signal_status(e, CLEAN);
1162
- }
1163
- }
1164
- /**
1165
- * @param {Value[] | null} deps
1166
- */
1167
- #clear_marked(deps) {
1168
- if (deps === null) return;
1169
- for (const dep of deps) {
1170
- if ((dep.f & DERIVED) === 0 || (dep.f & WAS_MARKED) === 0) {
1171
- continue;
1172
- }
1173
- dep.f ^= WAS_MARKED;
1174
- this.#clear_marked(
1175
- /** @type {Derived} */
1176
- dep.deps
1177
- );
1122
+ for (var i = 0; i < effects.length; i += 1) {
1123
+ defer_effect(effects[i], this.#dirty_effects, this.#maybe_dirty_effects);
1178
1124
  }
1179
1125
  }
1180
1126
  /**
@@ -1184,7 +1130,7 @@ class Batch {
1184
1130
  * @param {any} value
1185
1131
  */
1186
1132
  capture(source2, value) {
1187
- if (!this.previous.has(source2)) {
1133
+ if (value !== UNINITIALIZED && !this.previous.has(source2)) {
1188
1134
  this.previous.set(source2, value);
1189
1135
  }
1190
1136
  if ((source2.f & ERROR_VALUE) === 0) {
@@ -1231,12 +1177,6 @@ class Batch {
1231
1177
  this.previous.clear();
1232
1178
  var previous_batch_values = batch_values;
1233
1179
  var is_earlier = true;
1234
- var dummy_target = {
1235
- parent: null,
1236
- effect: null,
1237
- effects: [],
1238
- render_effects: []
1239
- };
1240
1180
  for (const batch of batches) {
1241
1181
  if (batch === this) {
1242
1182
  is_earlier = false;
@@ -1269,7 +1209,7 @@ class Batch {
1269
1209
  current_batch = batch;
1270
1210
  batch.apply();
1271
1211
  for (const root2 of queued_root_effects) {
1272
- batch.#traverse_effect_tree(root2, dummy_target);
1212
+ batch.#traverse_effect_tree(root2, [], []);
1273
1213
  }
1274
1214
  batch.deactivate();
1275
1215
  }
@@ -1539,7 +1479,7 @@ function boundary(node, props, children) {
1539
1479
  class Boundary {
1540
1480
  /** @type {Boundary | null} */
1541
1481
  parent;
1542
- #pending = false;
1482
+ is_pending = false;
1543
1483
  /** @type {TemplateNode} */
1544
1484
  #anchor;
1545
1485
  /** @type {TemplateNode | null} */
@@ -1563,6 +1503,10 @@ class Boundary {
1563
1503
  #local_pending_count = 0;
1564
1504
  #pending_count = 0;
1565
1505
  #is_creating_fallback = false;
1506
+ /** @type {Set<Effect>} */
1507
+ #dirty_effects = /* @__PURE__ */ new Set();
1508
+ /** @type {Set<Effect>} */
1509
+ #maybe_dirty_effects = /* @__PURE__ */ new Set();
1566
1510
  /**
1567
1511
  * A source containing the number of pending async deriveds/expressions.
1568
1512
  * Only created if `$effect.pending()` is used inside the boundary,
@@ -1588,7 +1532,7 @@ class Boundary {
1588
1532
  this.#children = children;
1589
1533
  this.parent = /** @type {Effect} */
1590
1534
  active_effect.b;
1591
- this.#pending = !!this.#props.pending;
1535
+ this.is_pending = !!this.#props.pending;
1592
1536
  this.#effect = block(() => {
1593
1537
  active_effect.b = this;
1594
1538
  if (hydrating) {
@@ -1603,6 +1547,9 @@ class Boundary {
1603
1547
  this.#hydrate_pending_content();
1604
1548
  } else {
1605
1549
  this.#hydrate_resolved_content();
1550
+ if (this.#pending_count === 0) {
1551
+ this.is_pending = false;
1552
+ }
1606
1553
  }
1607
1554
  } else {
1608
1555
  var anchor = this.#get_anchor();
@@ -1614,7 +1561,7 @@ class Boundary {
1614
1561
  if (this.#pending_count > 0) {
1615
1562
  this.#show_pending_snippet();
1616
1563
  } else {
1617
- this.#pending = false;
1564
+ this.is_pending = false;
1618
1565
  }
1619
1566
  }
1620
1567
  return () => {
@@ -1631,7 +1578,6 @@ class Boundary {
1631
1578
  } catch (error) {
1632
1579
  this.error(error);
1633
1580
  }
1634
- this.#pending = false;
1635
1581
  }
1636
1582
  #hydrate_pending_content() {
1637
1583
  const pending = this.#props.pending;
@@ -1655,13 +1601,13 @@ class Boundary {
1655
1601
  this.#pending_effect = null;
1656
1602
  }
1657
1603
  );
1658
- this.#pending = false;
1604
+ this.is_pending = false;
1659
1605
  }
1660
1606
  });
1661
1607
  }
1662
1608
  #get_anchor() {
1663
1609
  var anchor = this.#anchor;
1664
- if (this.#pending) {
1610
+ if (this.is_pending) {
1665
1611
  this.#pending_anchor = create_text();
1666
1612
  this.#anchor.before(this.#pending_anchor);
1667
1613
  anchor = this.#pending_anchor;
@@ -1669,11 +1615,18 @@ class Boundary {
1669
1615
  return anchor;
1670
1616
  }
1671
1617
  /**
1672
- * Returns `true` if the effect exists inside a boundary whose pending snippet is shown
1618
+ * Defer an effect inside a pending boundary until the boundary resolves
1619
+ * @param {Effect} effect
1620
+ */
1621
+ defer_effect(effect) {
1622
+ defer_effect(effect, this.#dirty_effects, this.#maybe_dirty_effects);
1623
+ }
1624
+ /**
1625
+ * Returns `false` if the effect exists inside a boundary whose pending snippet is shown
1673
1626
  * @returns {boolean}
1674
1627
  */
1675
- is_pending() {
1676
- return this.#pending || !!this.parent && this.parent.is_pending();
1628
+ is_rendered() {
1629
+ return !this.is_pending && (!this.parent || this.parent.is_rendered());
1677
1630
  }
1678
1631
  has_pending_snippet() {
1679
1632
  return !!this.#props.pending;
@@ -1730,7 +1683,17 @@ class Boundary {
1730
1683
  }
1731
1684
  this.#pending_count += d;
1732
1685
  if (this.#pending_count === 0) {
1733
- this.#pending = false;
1686
+ this.is_pending = false;
1687
+ for (const e of this.#dirty_effects) {
1688
+ set_signal_status(e, DIRTY);
1689
+ schedule_effect(e);
1690
+ }
1691
+ for (const e of this.#maybe_dirty_effects) {
1692
+ set_signal_status(e, MAYBE_DIRTY);
1693
+ schedule_effect(e);
1694
+ }
1695
+ this.#dirty_effects.clear();
1696
+ this.#maybe_dirty_effects.clear();
1734
1697
  if (this.#pending_effect) {
1735
1698
  pause_effect(this.#pending_effect, () => {
1736
1699
  this.#pending_effect = null;
@@ -1807,7 +1770,7 @@ class Boundary {
1807
1770
  this.#failed_effect = null;
1808
1771
  });
1809
1772
  }
1810
- this.#pending = this.has_pending_snippet();
1773
+ this.is_pending = this.has_pending_snippet();
1811
1774
  this.#main_effect = this.#run(() => {
1812
1775
  this.#is_creating_fallback = false;
1813
1776
  return branch(() => this.#children(this.#anchor));
@@ -1815,7 +1778,7 @@ class Boundary {
1815
1778
  if (this.#pending_count > 0) {
1816
1779
  this.#show_pending_snippet();
1817
1780
  } else {
1818
- this.#pending = false;
1781
+ this.is_pending = false;
1819
1782
  }
1820
1783
  };
1821
1784
  var previous_reaction = active_reaction;
@@ -1900,10 +1863,14 @@ function execute_derived(derived) {
1900
1863
  function update_derived(derived) {
1901
1864
  var value = execute_derived(derived);
1902
1865
  if (!derived.equals(value)) {
1903
- if (!current_batch?.is_fork) {
1866
+ derived.wv = increment_write_version();
1867
+ if (!current_batch?.is_fork || derived.deps === null) {
1904
1868
  derived.v = value;
1869
+ if (derived.deps === null) {
1870
+ set_signal_status(derived, CLEAN);
1871
+ return;
1872
+ }
1905
1873
  }
1906
- derived.wv = increment_write_version();
1907
1874
  }
1908
1875
  if (is_destroying_effect) {
1909
1876
  return;
@@ -1913,8 +1880,7 @@ function update_derived(derived) {
1913
1880
  batch_values.set(derived, value);
1914
1881
  }
1915
1882
  } else {
1916
- var status = (derived.f & CONNECTED) === 0 ? MAYBE_DIRTY : CLEAN;
1917
- set_signal_status(derived, status);
1883
+ update_derived_status(derived);
1918
1884
  }
1919
1885
  }
1920
1886
  let eager_effects = /* @__PURE__ */ new Set();
@@ -1967,13 +1933,14 @@ function internal_set(source2, value) {
1967
1933
  var batch = Batch.ensure();
1968
1934
  batch.capture(source2, old_value);
1969
1935
  if ((source2.f & DERIVED) !== 0) {
1936
+ const derived = (
1937
+ /** @type {Derived} */
1938
+ source2
1939
+ );
1970
1940
  if ((source2.f & DIRTY) !== 0) {
1971
- execute_derived(
1972
- /** @type {Derived} */
1973
- source2
1974
- );
1941
+ execute_derived(derived);
1975
1942
  }
1976
- set_signal_status(source2, (source2.f & CONNECTED) !== 0 ? CLEAN : MAYBE_DIRTY);
1943
+ update_derived_status(derived);
1977
1944
  }
1978
1945
  source2.wv = increment_write_version();
1979
1946
  mark_reactions(source2, DIRTY);
@@ -2581,23 +2548,24 @@ function is_dirty(reaction) {
2581
2548
  reaction.f &= ~WAS_MARKED;
2582
2549
  }
2583
2550
  if ((flags2 & MAYBE_DIRTY) !== 0) {
2584
- var dependencies = reaction.deps;
2585
- if (dependencies !== null) {
2586
- var length = dependencies.length;
2587
- for (var i = 0; i < length; i++) {
2588
- var dependency = dependencies[i];
2589
- if (is_dirty(
2551
+ var dependencies = (
2552
+ /** @type {Value[]} */
2553
+ reaction.deps
2554
+ );
2555
+ var length = dependencies.length;
2556
+ for (var i = 0; i < length; i++) {
2557
+ var dependency = dependencies[i];
2558
+ if (is_dirty(
2559
+ /** @type {Derived} */
2560
+ dependency
2561
+ )) {
2562
+ update_derived(
2590
2563
  /** @type {Derived} */
2591
2564
  dependency
2592
- )) {
2593
- update_derived(
2594
- /** @type {Derived} */
2595
- dependency
2596
- );
2597
- }
2598
- if (dependency.wv > reaction.wv) {
2599
- return true;
2600
- }
2565
+ );
2566
+ }
2567
+ if (dependency.wv > reaction.wv) {
2568
+ return true;
2601
2569
  }
2602
2570
  }
2603
2571
  if ((flags2 & CONNECTED) !== 0 && // During time traveling we don't want to reset the status so that
@@ -2701,6 +2669,16 @@ function update_reaction(reaction) {
2701
2669
  }
2702
2670
  if (previous_reaction !== null && previous_reaction !== reaction) {
2703
2671
  read_version++;
2672
+ if (previous_reaction.deps !== null) {
2673
+ for (let i2 = 0; i2 < previous_skipped_deps; i2 += 1) {
2674
+ previous_reaction.deps[i2].rv = read_version;
2675
+ }
2676
+ }
2677
+ if (previous_deps !== null) {
2678
+ for (const dep of previous_deps) {
2679
+ dep.rv = read_version;
2680
+ }
2681
+ }
2704
2682
  if (untracked_writes !== null) {
2705
2683
  if (previous_untracked_writes === null) {
2706
2684
  previous_untracked_writes = untracked_writes;
@@ -2746,20 +2724,17 @@ function remove_reaction(signal, dependency) {
2746
2724
  // to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
2747
2725
  // allows us to skip the expensive work of disconnecting and immediately reconnecting it
2748
2726
  (new_deps === null || !new_deps.includes(dependency))) {
2749
- set_signal_status(dependency, MAYBE_DIRTY);
2750
- if ((dependency.f & CONNECTED) !== 0) {
2751
- dependency.f ^= CONNECTED;
2752
- dependency.f &= ~WAS_MARKED;
2753
- }
2754
- destroy_derived_effects(
2755
- /** @type {Derived} **/
2727
+ var derived = (
2728
+ /** @type {Derived} */
2756
2729
  dependency
2757
2730
  );
2758
- remove_reactions(
2759
- /** @type {Derived} **/
2760
- dependency,
2761
- 0
2762
- );
2731
+ if ((derived.f & CONNECTED) !== 0) {
2732
+ derived.f ^= CONNECTED;
2733
+ derived.f &= ~WAS_MARKED;
2734
+ }
2735
+ update_derived_status(derived);
2736
+ destroy_derived_effects(derived);
2737
+ remove_reactions(derived, 0);
2763
2738
  }
2764
2739
  }
2765
2740
  function remove_reactions(signal, start_index) {
@@ -2810,7 +2785,7 @@ function get(signal) {
2810
2785
  skipped_deps++;
2811
2786
  } else if (new_deps === null) {
2812
2787
  new_deps = [signal];
2813
- } else if (!new_deps.includes(signal)) {
2788
+ } else {
2814
2789
  new_deps.push(signal);
2815
2790
  }
2816
2791
  }
@@ -2825,15 +2800,15 @@ function get(signal) {
2825
2800
  }
2826
2801
  }
2827
2802
  }
2828
- if (is_destroying_effect) {
2829
- if (old_values.has(signal)) {
2830
- return old_values.get(signal);
2831
- }
2832
- if (is_derived) {
2833
- var derived = (
2834
- /** @type {Derived} */
2835
- signal
2836
- );
2803
+ if (is_destroying_effect && old_values.has(signal)) {
2804
+ return old_values.get(signal);
2805
+ }
2806
+ if (is_derived) {
2807
+ var derived = (
2808
+ /** @type {Derived} */
2809
+ signal
2810
+ );
2811
+ if (is_destroying_effect) {
2837
2812
  var value = derived.v;
2838
2813
  if ((derived.f & CLEAN) === 0 && derived.reactions !== null || depends_on_old_values(derived)) {
2839
2814
  value = execute_derived(derived);
@@ -2841,13 +2816,15 @@ function get(signal) {
2841
2816
  old_values.set(derived, value);
2842
2817
  return value;
2843
2818
  }
2844
- } else if (is_derived && (!batch_values?.has(signal) || current_batch?.is_fork && !effect_tracking())) {
2845
- derived = /** @type {Derived} */
2846
- signal;
2819
+ var should_connect = (derived.f & CONNECTED) === 0 && !untracking && active_reaction !== null && (is_updating_effect || (active_reaction.f & CONNECTED) !== 0);
2820
+ var is_new = derived.deps === null;
2847
2821
  if (is_dirty(derived)) {
2822
+ if (should_connect) {
2823
+ derived.f |= CONNECTED;
2824
+ }
2848
2825
  update_derived(derived);
2849
2826
  }
2850
- if (is_updating_effect && effect_tracking() && (derived.f & CONNECTED) === 0) {
2827
+ if (should_connect && !is_new) {
2851
2828
  reconnect(derived);
2852
2829
  }
2853
2830
  }
@@ -2861,7 +2838,7 @@ function get(signal) {
2861
2838
  }
2862
2839
  function reconnect(derived) {
2863
2840
  if (derived.deps === null) return;
2864
- derived.f ^= CONNECTED;
2841
+ derived.f |= CONNECTED;
2865
2842
  for (const dep of derived.deps) {
2866
2843
  (dep.reactions ??= []).push(derived);
2867
2844
  if ((dep.f & DERIVED) !== 0 && (dep.f & CONNECTED) === 0) {
@@ -2897,10 +2874,6 @@ function untrack(fn) {
2897
2874
  untracking = previous_untracking;
2898
2875
  }
2899
2876
  }
2900
- const STATUS_MASK = -7169;
2901
- function set_signal_status(signal, status) {
2902
- signal.f = signal.f & STATUS_MASK | status;
2903
- }
2904
2877
  const all_registered_events = /* @__PURE__ */ new Set();
2905
2878
  const root_event_handles = /* @__PURE__ */ new Set();
2906
2879
  let last_propagated_event = null;
@@ -3430,7 +3403,7 @@ const options = {
3430
3403
  <div class="error">
3431
3404
  <span class="status">` + status + '</span>\n <div class="message">\n <h1>' + message + "</h1>\n </div>\n </div>\n </body>\n</html>\n"
3432
3405
  },
3433
- version_hash: "107jfy4"
3406
+ version_hash: "1l8s7jm"
3434
3407
  };
3435
3408
  async function get_hooks() {
3436
3409
  let handle;
@@ -3465,301 +3438,6 @@ const IN_WEBCONTAINER = !!globalThis.process?.versions?.webcontainer;
3465
3438
  const SVELTE_KIT_ASSETS = "/_svelte_kit_assets";
3466
3439
  const ENDPOINT_METHODS = ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "HEAD"];
3467
3440
  const PAGE_METHODS = ["GET", "POST", "HEAD"];
3468
- const chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$";
3469
- const unsafe_chars = /[<\b\f\n\r\t\0\u2028\u2029]/g;
3470
- const reserved = /^(?: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)$/;
3471
- function uneval(value, replacer) {
3472
- const counts = /* @__PURE__ */ new Map();
3473
- const keys = [];
3474
- const custom = /* @__PURE__ */ new Map();
3475
- function walk(thing) {
3476
- if (!is_primitive(thing)) {
3477
- if (counts.has(thing)) {
3478
- counts.set(thing, counts.get(thing) + 1);
3479
- return;
3480
- }
3481
- counts.set(thing, 1);
3482
- if (replacer) {
3483
- const str2 = replacer(thing, (value2) => uneval(value2, replacer));
3484
- if (typeof str2 === "string") {
3485
- custom.set(thing, str2);
3486
- return;
3487
- }
3488
- }
3489
- if (typeof thing === "function") {
3490
- throw new DevalueError(`Cannot stringify a function`, keys, thing, value);
3491
- }
3492
- const type = get_type(thing);
3493
- switch (type) {
3494
- case "Number":
3495
- case "BigInt":
3496
- case "String":
3497
- case "Boolean":
3498
- case "Date":
3499
- case "RegExp":
3500
- case "URL":
3501
- case "URLSearchParams":
3502
- return;
3503
- case "Array":
3504
- thing.forEach((value2, i) => {
3505
- keys.push(`[${i}]`);
3506
- walk(value2);
3507
- keys.pop();
3508
- });
3509
- break;
3510
- case "Set":
3511
- Array.from(thing).forEach(walk);
3512
- break;
3513
- case "Map":
3514
- for (const [key2, value2] of thing) {
3515
- keys.push(
3516
- `.get(${is_primitive(key2) ? stringify_primitive(key2) : "..."})`
3517
- );
3518
- walk(value2);
3519
- keys.pop();
3520
- }
3521
- break;
3522
- case "Int8Array":
3523
- case "Uint8Array":
3524
- case "Uint8ClampedArray":
3525
- case "Int16Array":
3526
- case "Uint16Array":
3527
- case "Int32Array":
3528
- case "Uint32Array":
3529
- case "Float32Array":
3530
- case "Float64Array":
3531
- case "BigInt64Array":
3532
- case "BigUint64Array":
3533
- walk(thing.buffer);
3534
- return;
3535
- case "ArrayBuffer":
3536
- return;
3537
- case "Temporal.Duration":
3538
- case "Temporal.Instant":
3539
- case "Temporal.PlainDate":
3540
- case "Temporal.PlainTime":
3541
- case "Temporal.PlainDateTime":
3542
- case "Temporal.PlainMonthDay":
3543
- case "Temporal.PlainYearMonth":
3544
- case "Temporal.ZonedDateTime":
3545
- return;
3546
- default:
3547
- if (!is_plain_object(thing)) {
3548
- throw new DevalueError(
3549
- `Cannot stringify arbitrary non-POJOs`,
3550
- keys,
3551
- thing,
3552
- value
3553
- );
3554
- }
3555
- if (enumerable_symbols(thing).length > 0) {
3556
- throw new DevalueError(
3557
- `Cannot stringify POJOs with symbolic keys`,
3558
- keys,
3559
- thing,
3560
- value
3561
- );
3562
- }
3563
- for (const key2 in thing) {
3564
- keys.push(stringify_key(key2));
3565
- walk(thing[key2]);
3566
- keys.pop();
3567
- }
3568
- }
3569
- }
3570
- }
3571
- walk(value);
3572
- const names = /* @__PURE__ */ new Map();
3573
- Array.from(counts).filter((entry) => entry[1] > 1).sort((a, b) => b[1] - a[1]).forEach((entry, i) => {
3574
- names.set(entry[0], get_name(i));
3575
- });
3576
- function stringify2(thing) {
3577
- if (names.has(thing)) {
3578
- return names.get(thing);
3579
- }
3580
- if (is_primitive(thing)) {
3581
- return stringify_primitive(thing);
3582
- }
3583
- if (custom.has(thing)) {
3584
- return custom.get(thing);
3585
- }
3586
- const type = get_type(thing);
3587
- switch (type) {
3588
- case "Number":
3589
- case "String":
3590
- case "Boolean":
3591
- return `Object(${stringify2(thing.valueOf())})`;
3592
- case "RegExp":
3593
- return `new RegExp(${stringify_string(thing.source)}, "${thing.flags}")`;
3594
- case "Date":
3595
- return `new Date(${thing.getTime()})`;
3596
- case "URL":
3597
- return `new URL(${stringify_string(thing.toString())})`;
3598
- case "URLSearchParams":
3599
- return `new URLSearchParams(${stringify_string(thing.toString())})`;
3600
- case "Array":
3601
- const members = (
3602
- /** @type {any[]} */
3603
- thing.map(
3604
- (v, i) => i in thing ? stringify2(v) : ""
3605
- )
3606
- );
3607
- const tail = thing.length === 0 || thing.length - 1 in thing ? "" : ",";
3608
- return `[${members.join(",")}${tail}]`;
3609
- case "Set":
3610
- case "Map":
3611
- return `new ${type}([${Array.from(thing).map(stringify2).join(",")}])`;
3612
- case "Int8Array":
3613
- case "Uint8Array":
3614
- case "Uint8ClampedArray":
3615
- case "Int16Array":
3616
- case "Uint16Array":
3617
- case "Int32Array":
3618
- case "Uint32Array":
3619
- case "Float32Array":
3620
- case "Float64Array":
3621
- case "BigInt64Array":
3622
- case "BigUint64Array": {
3623
- let str2 = `new ${type}`;
3624
- if (counts.get(thing.buffer) === 1) {
3625
- const array2 = new thing.constructor(thing.buffer);
3626
- str2 += `([${array2}])`;
3627
- } else {
3628
- str2 += `([${stringify2(thing.buffer)}])`;
3629
- }
3630
- const a = thing.byteOffset;
3631
- const b = a + thing.byteLength;
3632
- if (a > 0 || b !== thing.buffer.byteLength) {
3633
- const m = +/(\d+)/.exec(type)[1] / 8;
3634
- str2 += `.subarray(${a / m},${b / m})`;
3635
- }
3636
- return str2;
3637
- }
3638
- case "ArrayBuffer": {
3639
- const ui8 = new Uint8Array(thing);
3640
- return `new Uint8Array([${ui8.toString()}]).buffer`;
3641
- }
3642
- case "Temporal.Duration":
3643
- case "Temporal.Instant":
3644
- case "Temporal.PlainDate":
3645
- case "Temporal.PlainTime":
3646
- case "Temporal.PlainDateTime":
3647
- case "Temporal.PlainMonthDay":
3648
- case "Temporal.PlainYearMonth":
3649
- case "Temporal.ZonedDateTime":
3650
- return `${type}.from(${stringify_string(thing.toString())})`;
3651
- default:
3652
- const keys2 = Object.keys(thing);
3653
- const obj = keys2.map((key2) => `${safe_key(key2)}:${stringify2(thing[key2])}`).join(",");
3654
- const proto = Object.getPrototypeOf(thing);
3655
- if (proto === null) {
3656
- return keys2.length > 0 ? `{${obj},__proto__:null}` : `{__proto__:null}`;
3657
- }
3658
- return `{${obj}}`;
3659
- }
3660
- }
3661
- const str = stringify2(value);
3662
- if (names.size) {
3663
- const params = [];
3664
- const statements = [];
3665
- const values = [];
3666
- names.forEach((name, thing) => {
3667
- params.push(name);
3668
- if (custom.has(thing)) {
3669
- values.push(
3670
- /** @type {string} */
3671
- custom.get(thing)
3672
- );
3673
- return;
3674
- }
3675
- if (is_primitive(thing)) {
3676
- values.push(stringify_primitive(thing));
3677
- return;
3678
- }
3679
- const type = get_type(thing);
3680
- switch (type) {
3681
- case "Number":
3682
- case "String":
3683
- case "Boolean":
3684
- values.push(`Object(${stringify2(thing.valueOf())})`);
3685
- break;
3686
- case "RegExp":
3687
- values.push(thing.toString());
3688
- break;
3689
- case "Date":
3690
- values.push(`new Date(${thing.getTime()})`);
3691
- break;
3692
- case "Array":
3693
- values.push(`Array(${thing.length})`);
3694
- thing.forEach((v, i) => {
3695
- statements.push(`${name}[${i}]=${stringify2(v)}`);
3696
- });
3697
- break;
3698
- case "Set":
3699
- values.push(`new Set`);
3700
- statements.push(
3701
- `${name}.${Array.from(thing).map((v) => `add(${stringify2(v)})`).join(".")}`
3702
- );
3703
- break;
3704
- case "Map":
3705
- values.push(`new Map`);
3706
- statements.push(
3707
- `${name}.${Array.from(thing).map(([k, v]) => `set(${stringify2(k)}, ${stringify2(v)})`).join(".")}`
3708
- );
3709
- break;
3710
- case "ArrayBuffer":
3711
- values.push(
3712
- `new Uint8Array([${new Uint8Array(thing).join(",")}]).buffer`
3713
- );
3714
- break;
3715
- default:
3716
- values.push(
3717
- Object.getPrototypeOf(thing) === null ? "Object.create(null)" : "{}"
3718
- );
3719
- Object.keys(thing).forEach((key2) => {
3720
- statements.push(
3721
- `${name}${safe_prop(key2)}=${stringify2(thing[key2])}`
3722
- );
3723
- });
3724
- }
3725
- });
3726
- statements.push(`return ${str}`);
3727
- return `(function(${params.join(",")}){${statements.join(
3728
- ";"
3729
- )}}(${values.join(",")}))`;
3730
- } else {
3731
- return str;
3732
- }
3733
- }
3734
- function get_name(num) {
3735
- let name = "";
3736
- do {
3737
- name = chars[num % chars.length] + name;
3738
- num = ~~(num / chars.length) - 1;
3739
- } while (num >= 0);
3740
- return reserved.test(name) ? `${name}0` : name;
3741
- }
3742
- function escape_unsafe_char(c) {
3743
- return escaped[c] || c;
3744
- }
3745
- function escape_unsafe_chars(str) {
3746
- return str.replace(unsafe_chars, escape_unsafe_char);
3747
- }
3748
- function safe_key(key2) {
3749
- return /^[_$a-zA-Z][_$a-zA-Z0-9]*$/.test(key2) ? key2 : escape_unsafe_chars(JSON.stringify(key2));
3750
- }
3751
- function safe_prop(key2) {
3752
- return /^[_$a-zA-Z][_$a-zA-Z0-9]*$/.test(key2) ? `.${key2}` : `[${escape_unsafe_chars(JSON.stringify(key2))}]`;
3753
- }
3754
- function stringify_primitive(thing) {
3755
- if (typeof thing === "string") return stringify_string(thing);
3756
- if (thing === void 0) return "void 0";
3757
- if (thing === 0 && 1 / thing < 0) return "-0";
3758
- const str = String(thing);
3759
- if (typeof thing === "number") return str.replace(/^(-)?0\./, "$1.");
3760
- if (typeof thing === "bigint") return thing + "n";
3761
- return str;
3762
- }
3763
3441
  function negotiate(accept, types) {
3764
3442
  const parts = [];
3765
3443
  accept.split(",").forEach((str, i) => {
@@ -6605,98 +6283,121 @@ function redirect_json_response(redirect) {
6605
6283
  }
6606
6284
  );
6607
6285
  }
6608
- var cookie = {};
6609
- var hasRequiredCookie;
6610
- function requireCookie() {
6611
- if (hasRequiredCookie) return cookie;
6612
- hasRequiredCookie = 1;
6613
- cookie.parse = parse;
6614
- cookie.serialize = serialize;
6615
- var __toString = Object.prototype.toString;
6616
- var fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;
6617
- function parse(str, options2) {
6618
- if (typeof str !== "string") {
6619
- throw new TypeError("argument str must be a string");
6620
- }
6621
- var obj = {};
6622
- var opt = options2 || {};
6623
- var dec = opt.decode || decode;
6624
- var index = 0;
6625
- while (index < str.length) {
6626
- var eqIdx = str.indexOf("=", index);
6627
- if (eqIdx === -1) {
6286
+ var dist = {};
6287
+ var hasRequiredDist;
6288
+ function requireDist() {
6289
+ if (hasRequiredDist) return dist;
6290
+ hasRequiredDist = 1;
6291
+ Object.defineProperty(dist, "__esModule", { value: true });
6292
+ dist.parseCookie = parseCookie;
6293
+ dist.parse = parseCookie;
6294
+ dist.stringifyCookie = stringifyCookie;
6295
+ dist.stringifySetCookie = stringifySetCookie;
6296
+ dist.serialize = stringifySetCookie;
6297
+ dist.parseSetCookie = parseSetCookie;
6298
+ dist.stringifySetCookie = stringifySetCookie;
6299
+ dist.serialize = stringifySetCookie;
6300
+ const cookieNameRegExp = /^[\u0021-\u003A\u003C\u003E-\u007E]+$/;
6301
+ const cookieValueRegExp = /^[\u0021-\u003A\u003C-\u007E]*$/;
6302
+ const domainValueRegExp = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i;
6303
+ const pathValueRegExp = /^[\u0020-\u003A\u003D-\u007E]*$/;
6304
+ const maxAgeRegExp = /^-?\d+$/;
6305
+ const __toString = Object.prototype.toString;
6306
+ const NullObject = /* @__PURE__ */ (() => {
6307
+ const C = function() {
6308
+ };
6309
+ C.prototype = /* @__PURE__ */ Object.create(null);
6310
+ return C;
6311
+ })();
6312
+ function parseCookie(str, options2) {
6313
+ const obj = new NullObject();
6314
+ const len = str.length;
6315
+ if (len < 2)
6316
+ return obj;
6317
+ const dec = options2?.decode || decode;
6318
+ let index = 0;
6319
+ do {
6320
+ const eqIdx = eqIndex(str, index, len);
6321
+ if (eqIdx === -1)
6628
6322
  break;
6629
- }
6630
- var endIdx = str.indexOf(";", index);
6631
- if (endIdx === -1) {
6632
- endIdx = str.length;
6633
- } else if (endIdx < eqIdx) {
6323
+ const endIdx = endIndex(str, index, len);
6324
+ if (eqIdx > endIdx) {
6634
6325
  index = str.lastIndexOf(";", eqIdx - 1) + 1;
6635
6326
  continue;
6636
6327
  }
6637
- var key2 = str.slice(index, eqIdx).trim();
6638
- if (void 0 === obj[key2]) {
6639
- var val = str.slice(eqIdx + 1, endIdx).trim();
6640
- if (val.charCodeAt(0) === 34) {
6641
- val = val.slice(1, -1);
6642
- }
6643
- obj[key2] = tryDecode(val, dec);
6328
+ const key2 = valueSlice(str, index, eqIdx);
6329
+ if (obj[key2] === void 0) {
6330
+ obj[key2] = dec(valueSlice(str, eqIdx + 1, endIdx));
6644
6331
  }
6645
6332
  index = endIdx + 1;
6646
- }
6333
+ } while (index < len);
6647
6334
  return obj;
6648
6335
  }
6649
- function serialize(name, val, options2) {
6650
- var opt = options2 || {};
6651
- var enc = opt.encode || encode2;
6652
- if (typeof enc !== "function") {
6653
- throw new TypeError("option encode is invalid");
6336
+ function stringifyCookie(cookie, options2) {
6337
+ const enc = options2?.encode || encodeURIComponent;
6338
+ const cookieStrings = [];
6339
+ for (const name of Object.keys(cookie)) {
6340
+ const val = cookie[name];
6341
+ if (val === void 0)
6342
+ continue;
6343
+ if (!cookieNameRegExp.test(name)) {
6344
+ throw new TypeError(`cookie name is invalid: ${name}`);
6345
+ }
6346
+ const value = enc(val);
6347
+ if (!cookieValueRegExp.test(value)) {
6348
+ throw new TypeError(`cookie val is invalid: ${val}`);
6349
+ }
6350
+ cookieStrings.push(`${name}=${value}`);
6654
6351
  }
6655
- if (!fieldContentRegExp.test(name)) {
6656
- throw new TypeError("argument name is invalid");
6352
+ return cookieStrings.join("; ");
6353
+ }
6354
+ function stringifySetCookie(_name, _val, _opts) {
6355
+ const cookie = typeof _name === "object" ? _name : { ..._opts, name: _name, value: String(_val) };
6356
+ const options2 = typeof _val === "object" ? _val : _opts;
6357
+ const enc = options2?.encode || encodeURIComponent;
6358
+ if (!cookieNameRegExp.test(cookie.name)) {
6359
+ throw new TypeError(`argument name is invalid: ${cookie.name}`);
6657
6360
  }
6658
- var value = enc(val);
6659
- if (value && !fieldContentRegExp.test(value)) {
6660
- throw new TypeError("argument val is invalid");
6361
+ const value = cookie.value ? enc(cookie.value) : "";
6362
+ if (!cookieValueRegExp.test(value)) {
6363
+ throw new TypeError(`argument val is invalid: ${cookie.value}`);
6661
6364
  }
6662
- var str = name + "=" + value;
6663
- if (null != opt.maxAge) {
6664
- var maxAge = opt.maxAge - 0;
6665
- if (isNaN(maxAge) || !isFinite(maxAge)) {
6666
- throw new TypeError("option maxAge is invalid");
6365
+ let str = cookie.name + "=" + value;
6366
+ if (cookie.maxAge !== void 0) {
6367
+ if (!Number.isInteger(cookie.maxAge)) {
6368
+ throw new TypeError(`option maxAge is invalid: ${cookie.maxAge}`);
6667
6369
  }
6668
- str += "; Max-Age=" + Math.floor(maxAge);
6370
+ str += "; Max-Age=" + cookie.maxAge;
6669
6371
  }
6670
- if (opt.domain) {
6671
- if (!fieldContentRegExp.test(opt.domain)) {
6672
- throw new TypeError("option domain is invalid");
6372
+ if (cookie.domain) {
6373
+ if (!domainValueRegExp.test(cookie.domain)) {
6374
+ throw new TypeError(`option domain is invalid: ${cookie.domain}`);
6673
6375
  }
6674
- str += "; Domain=" + opt.domain;
6376
+ str += "; Domain=" + cookie.domain;
6675
6377
  }
6676
- if (opt.path) {
6677
- if (!fieldContentRegExp.test(opt.path)) {
6678
- throw new TypeError("option path is invalid");
6378
+ if (cookie.path) {
6379
+ if (!pathValueRegExp.test(cookie.path)) {
6380
+ throw new TypeError(`option path is invalid: ${cookie.path}`);
6679
6381
  }
6680
- str += "; Path=" + opt.path;
6382
+ str += "; Path=" + cookie.path;
6681
6383
  }
6682
- if (opt.expires) {
6683
- var expires = opt.expires;
6684
- if (!isDate(expires) || isNaN(expires.valueOf())) {
6685
- throw new TypeError("option expires is invalid");
6384
+ if (cookie.expires) {
6385
+ if (!isDate(cookie.expires) || !Number.isFinite(cookie.expires.valueOf())) {
6386
+ throw new TypeError(`option expires is invalid: ${cookie.expires}`);
6686
6387
  }
6687
- str += "; Expires=" + expires.toUTCString();
6388
+ str += "; Expires=" + cookie.expires.toUTCString();
6688
6389
  }
6689
- if (opt.httpOnly) {
6390
+ if (cookie.httpOnly) {
6690
6391
  str += "; HttpOnly";
6691
6392
  }
6692
- if (opt.secure) {
6393
+ if (cookie.secure) {
6693
6394
  str += "; Secure";
6694
6395
  }
6695
- if (opt.partitioned) {
6396
+ if (cookie.partitioned) {
6696
6397
  str += "; Partitioned";
6697
6398
  }
6698
- if (opt.priority) {
6699
- var priority = typeof opt.priority === "string" ? opt.priority.toLowerCase() : opt.priority;
6399
+ if (cookie.priority) {
6400
+ const priority = typeof cookie.priority === "string" ? cookie.priority.toLowerCase() : void 0;
6700
6401
  switch (priority) {
6701
6402
  case "low":
6702
6403
  str += "; Priority=Low";
@@ -6708,49 +6409,130 @@ function requireCookie() {
6708
6409
  str += "; Priority=High";
6709
6410
  break;
6710
6411
  default:
6711
- throw new TypeError("option priority is invalid");
6412
+ throw new TypeError(`option priority is invalid: ${cookie.priority}`);
6712
6413
  }
6713
6414
  }
6714
- if (opt.sameSite) {
6715
- var sameSite = typeof opt.sameSite === "string" ? opt.sameSite.toLowerCase() : opt.sameSite;
6415
+ if (cookie.sameSite) {
6416
+ const sameSite = typeof cookie.sameSite === "string" ? cookie.sameSite.toLowerCase() : cookie.sameSite;
6716
6417
  switch (sameSite) {
6717
6418
  case true:
6419
+ case "strict":
6718
6420
  str += "; SameSite=Strict";
6719
6421
  break;
6720
6422
  case "lax":
6721
6423
  str += "; SameSite=Lax";
6722
6424
  break;
6723
- case "strict":
6724
- str += "; SameSite=Strict";
6725
- break;
6726
6425
  case "none":
6727
6426
  str += "; SameSite=None";
6728
6427
  break;
6729
6428
  default:
6730
- throw new TypeError("option sameSite is invalid");
6429
+ throw new TypeError(`option sameSite is invalid: ${cookie.sameSite}`);
6731
6430
  }
6732
6431
  }
6733
6432
  return str;
6734
6433
  }
6735
- function decode(str) {
6736
- return str.indexOf("%") !== -1 ? decodeURIComponent(str) : str;
6434
+ function parseSetCookie(str, options2) {
6435
+ const dec = options2?.decode || decode;
6436
+ const len = str.length;
6437
+ const endIdx = endIndex(str, 0, len);
6438
+ const eqIdx = eqIndex(str, 0, endIdx);
6439
+ const setCookie2 = eqIdx === -1 ? { name: "", value: dec(valueSlice(str, 0, endIdx)) } : {
6440
+ name: valueSlice(str, 0, eqIdx),
6441
+ value: dec(valueSlice(str, eqIdx + 1, endIdx))
6442
+ };
6443
+ let index = endIdx + 1;
6444
+ while (index < len) {
6445
+ const endIdx2 = endIndex(str, index, len);
6446
+ const eqIdx2 = eqIndex(str, index, endIdx2);
6447
+ const attr = eqIdx2 === -1 ? valueSlice(str, index, endIdx2) : valueSlice(str, index, eqIdx2);
6448
+ const val = eqIdx2 === -1 ? void 0 : valueSlice(str, eqIdx2 + 1, endIdx2);
6449
+ switch (attr.toLowerCase()) {
6450
+ case "httponly":
6451
+ setCookie2.httpOnly = true;
6452
+ break;
6453
+ case "secure":
6454
+ setCookie2.secure = true;
6455
+ break;
6456
+ case "partitioned":
6457
+ setCookie2.partitioned = true;
6458
+ break;
6459
+ case "domain":
6460
+ setCookie2.domain = val;
6461
+ break;
6462
+ case "path":
6463
+ setCookie2.path = val;
6464
+ break;
6465
+ case "max-age":
6466
+ if (val && maxAgeRegExp.test(val))
6467
+ setCookie2.maxAge = Number(val);
6468
+ break;
6469
+ case "expires":
6470
+ if (!val)
6471
+ break;
6472
+ const date = new Date(val);
6473
+ if (Number.isFinite(date.valueOf()))
6474
+ setCookie2.expires = date;
6475
+ break;
6476
+ case "priority":
6477
+ if (!val)
6478
+ break;
6479
+ const priority = val.toLowerCase();
6480
+ if (priority === "low" || priority === "medium" || priority === "high") {
6481
+ setCookie2.priority = priority;
6482
+ }
6483
+ break;
6484
+ case "samesite":
6485
+ if (!val)
6486
+ break;
6487
+ const sameSite = val.toLowerCase();
6488
+ if (sameSite === "lax" || sameSite === "strict" || sameSite === "none") {
6489
+ setCookie2.sameSite = sameSite;
6490
+ }
6491
+ break;
6492
+ }
6493
+ index = endIdx2 + 1;
6494
+ }
6495
+ return setCookie2;
6737
6496
  }
6738
- function encode2(val) {
6739
- return encodeURIComponent(val);
6497
+ function endIndex(str, min, len) {
6498
+ const index = str.indexOf(";", min);
6499
+ return index === -1 ? len : index;
6740
6500
  }
6741
- function isDate(val) {
6742
- return __toString.call(val) === "[object Date]" || val instanceof Date;
6501
+ function eqIndex(str, min, max) {
6502
+ const index = str.indexOf("=", min);
6503
+ return index < max ? index : -1;
6743
6504
  }
6744
- function tryDecode(str, decode2) {
6505
+ function valueSlice(str, min, max) {
6506
+ let start = min;
6507
+ let end = max;
6508
+ do {
6509
+ const code = str.charCodeAt(start);
6510
+ if (code !== 32 && code !== 9)
6511
+ break;
6512
+ } while (++start < end);
6513
+ while (end > start) {
6514
+ const code = str.charCodeAt(end - 1);
6515
+ if (code !== 32 && code !== 9)
6516
+ break;
6517
+ end--;
6518
+ }
6519
+ return str.slice(start, end);
6520
+ }
6521
+ function decode(str) {
6522
+ if (str.indexOf("%") === -1)
6523
+ return str;
6745
6524
  try {
6746
- return decode2(str);
6525
+ return decodeURIComponent(str);
6747
6526
  } catch (e) {
6748
6527
  return str;
6749
6528
  }
6750
6529
  }
6751
- return cookie;
6530
+ function isDate(val) {
6531
+ return __toString.call(val) === "[object Date]";
6532
+ }
6533
+ return dist;
6752
6534
  }
6753
- var cookieExports = requireCookie();
6535
+ var distExports = /* @__PURE__ */ requireDist();
6754
6536
  const INVALID_COOKIE_CHARACTER_REGEX = /[\x00-\x1F\x7F()<>@,;:"/[\]?={} \t]/;
6755
6537
  function validate_options(options2) {
6756
6538
  if (options2?.path === void 0) {
@@ -6762,7 +6544,7 @@ function generate_cookie_key(domain, path, name) {
6762
6544
  }
6763
6545
  function get_cookies(request, url) {
6764
6546
  const header = request.headers.get("cookie") ?? "";
6765
- const initial_cookies = cookieExports.parse(header, { decode: (value) => value });
6547
+ const initial_cookies = distExports.parse(header, { decode: (value) => value });
6766
6548
  let normalized_url;
6767
6549
  const new_cookies = /* @__PURE__ */ new Map();
6768
6550
  const defaults = {
@@ -6786,15 +6568,15 @@ function get_cookies(request, url) {
6786
6568
  if (best_match) {
6787
6569
  return best_match.options.maxAge === 0 ? void 0 : best_match.value;
6788
6570
  }
6789
- const req_cookies = cookieExports.parse(header, { decode: opts?.decode });
6790
- const cookie2 = req_cookies[name];
6791
- return cookie2;
6571
+ const req_cookies = distExports.parse(header, { decode: opts?.decode });
6572
+ const cookie = req_cookies[name];
6573
+ return cookie;
6792
6574
  },
6793
6575
  /**
6794
6576
  * @param {import('cookie').CookieParseOptions} [opts]
6795
6577
  */
6796
6578
  getAll(opts) {
6797
- const cookies2 = cookieExports.parse(header, { decode: opts?.decode });
6579
+ const cookies2 = distExports.parse(header, { decode: opts?.decode });
6798
6580
  const lookup = /* @__PURE__ */ new Map();
6799
6581
  for (const c of new_cookies.values()) {
6800
6582
  if (domain_matches(url.hostname, c.options.domain) && path_matches(url.pathname, c.options.path)) {
@@ -6848,7 +6630,7 @@ function get_cookies(request, url) {
6848
6630
  }
6849
6631
  path = resolve(normalized_url, path);
6850
6632
  }
6851
- return cookieExports.serialize(name, value, { ...defaults, ...options2, path });
6633
+ return distExports.serialize(name, value, { ...defaults, ...options2, path });
6852
6634
  }
6853
6635
  };
6854
6636
  function get_cookie_header(destination, header2) {
@@ -6856,14 +6638,14 @@ function get_cookies(request, url) {
6856
6638
  // cookies sent by the user agent have lowest precedence
6857
6639
  ...initial_cookies
6858
6640
  };
6859
- for (const cookie2 of new_cookies.values()) {
6860
- if (!domain_matches(destination.hostname, cookie2.options.domain)) continue;
6861
- if (!path_matches(destination.pathname, cookie2.options.path)) continue;
6862
- const encoder = cookie2.options.encode || encodeURIComponent;
6863
- combined_cookies[cookie2.name] = encoder(cookie2.value);
6641
+ for (const cookie of new_cookies.values()) {
6642
+ if (!domain_matches(destination.hostname, cookie.options.domain)) continue;
6643
+ if (!path_matches(destination.pathname, cookie.options.path)) continue;
6644
+ const encoder = cookie.options.encode || encodeURIComponent;
6645
+ combined_cookies[cookie.name] = encoder(cookie.value);
6864
6646
  }
6865
6647
  if (header2) {
6866
- const parsed = cookieExports.parse(header2, { decode: (value) => value });
6648
+ const parsed = distExports.parse(header2, { decode: (value) => value });
6867
6649
  for (const name in parsed) {
6868
6650
  combined_cookies[name] = parsed[name];
6869
6651
  }
@@ -6881,8 +6663,8 @@ function get_cookies(request, url) {
6881
6663
  path = resolve(normalized_url, path);
6882
6664
  }
6883
6665
  const cookie_key = generate_cookie_key(options2.domain, path, name);
6884
- const cookie2 = { name, value, options: { ...options2, path } };
6885
- new_cookies.set(cookie_key, cookie2);
6666
+ const cookie = { name, value, options: { ...options2, path } };
6667
+ new_cookies.set(cookie_key, cookie);
6886
6668
  }
6887
6669
  function set_trailing_slash(trailing_slash) {
6888
6670
  normalized_url = normalize_path(url.pathname, trailing_slash);
@@ -6905,10 +6687,10 @@ function path_matches(path, constraint) {
6905
6687
  function add_cookies_to_headers(headers2, cookies) {
6906
6688
  for (const new_cookie of cookies) {
6907
6689
  const { name, value, options: options2 } = new_cookie;
6908
- headers2.append("set-cookie", cookieExports.serialize(name, value, options2));
6690
+ headers2.append("set-cookie", distExports.serialize(name, value, options2));
6909
6691
  if (options2.path.endsWith(".html")) {
6910
6692
  const path = add_data_suffix(options2.path);
6911
- headers2.append("set-cookie", cookieExports.serialize(name, value, { ...options2, path }));
6693
+ headers2.append("set-cookie", distExports.serialize(name, value, { ...options2, path }));
6912
6694
  }
6913
6695
  }
6914
6696
  }
@@ -6949,9 +6731,9 @@ function requireSetCookie() {
6949
6731
  e
6950
6732
  );
6951
6733
  }
6952
- var cookie2 = createNullObj();
6953
- cookie2.name = name;
6954
- cookie2.value = value;
6734
+ var cookie = createNullObj();
6735
+ cookie.name = name;
6736
+ cookie.value = value;
6955
6737
  parts.forEach(function(part) {
6956
6738
  var sides = part.split("=");
6957
6739
  var key2 = sides.shift().trimLeft().toLowerCase();
@@ -6960,23 +6742,23 @@ function requireSetCookie() {
6960
6742
  }
6961
6743
  var value2 = sides.join("=");
6962
6744
  if (key2 === "expires") {
6963
- cookie2.expires = new Date(value2);
6745
+ cookie.expires = new Date(value2);
6964
6746
  } else if (key2 === "max-age") {
6965
6747
  var n = parseInt(value2, 10);
6966
- if (!Number.isNaN(n)) cookie2.maxAge = n;
6748
+ if (!Number.isNaN(n)) cookie.maxAge = n;
6967
6749
  } else if (key2 === "secure") {
6968
- cookie2.secure = true;
6750
+ cookie.secure = true;
6969
6751
  } else if (key2 === "httponly") {
6970
- cookie2.httpOnly = true;
6752
+ cookie.httpOnly = true;
6971
6753
  } else if (key2 === "samesite") {
6972
- cookie2.sameSite = value2;
6754
+ cookie.sameSite = value2;
6973
6755
  } else if (key2 === "partitioned") {
6974
- cookie2.partitioned = true;
6756
+ cookie.partitioned = true;
6975
6757
  } else if (key2) {
6976
- cookie2[key2] = value2;
6758
+ cookie[key2] = value2;
6977
6759
  }
6978
6760
  });
6979
- return cookie2;
6761
+ return cookie;
6980
6762
  }
6981
6763
  function parseNameValuePair(nameValuePairStr) {
6982
6764
  var name = "";
@@ -7026,9 +6808,9 @@ function requireSetCookie() {
7026
6808
  } else {
7027
6809
  var cookies = createNullObj();
7028
6810
  return input.filter(isNonEmptyString).reduce(function(cookies2, str) {
7029
- var cookie2 = parseString(str, options2);
7030
- if (cookie2 && !isForbiddenKey(cookie2.name)) {
7031
- cookies2[cookie2.name] = cookie2;
6811
+ var cookie = parseString(str, options2);
6812
+ if (cookie && !isForbiddenKey(cookie.name)) {
6813
+ cookies2[cookie.name] = cookie;
7032
6814
  }
7033
6815
  return cookies2;
7034
6816
  }, cookies);
@@ -7119,8 +6901,8 @@ function create_fetch({ event, options: options2, manifest, state, get_cookie_he
7119
6901
  }
7120
6902
  if (url.origin !== event.url.origin) {
7121
6903
  if (`.${url.hostname}`.endsWith(`.${event.url.hostname}`) && credentials !== "omit") {
7122
- const cookie2 = get_cookie_header(url, request.headers.get("cookie"));
7123
- if (cookie2) request.headers.set("cookie", cookie2);
6904
+ const cookie = get_cookie_header(url, request.headers.get("cookie"));
6905
+ if (cookie) request.headers.set("cookie", cookie);
7124
6906
  }
7125
6907
  return fetch(request);
7126
6908
  }
@@ -7153,9 +6935,9 @@ function create_fetch({ event, options: options2, manifest, state, get_cookie_he
7153
6935
  return await fetch(request);
7154
6936
  }
7155
6937
  if (credentials !== "omit") {
7156
- const cookie2 = get_cookie_header(url, request.headers.get("cookie"));
7157
- if (cookie2) {
7158
- request.headers.set("cookie", cookie2);
6938
+ const cookie = get_cookie_header(url, request.headers.get("cookie"));
6939
+ if (cookie) {
6940
+ request.headers.set("cookie", cookie);
7159
6941
  }
7160
6942
  const authorization = event.request.headers.get("authorization");
7161
6943
  if (authorization && !request.headers.has("authorization")) {
@@ -7384,20 +7166,27 @@ async function internal_respond(request, options2, manifest, state) {
7384
7166
  } catch {
7385
7167
  return text("Malformed URI", { status: 400 });
7386
7168
  }
7387
- if (resolved_path !== url.pathname && !state.prerendering?.fallback && has_prerendered_path(manifest, resolved_path)) {
7169
+ if (
7170
+ // the resolved path has been decoded so it should be compared to the decoded url pathname
7171
+ resolved_path !== decode_pathname(url.pathname) && !state.prerendering?.fallback && has_prerendered_path(manifest, resolved_path)
7172
+ ) {
7388
7173
  const url2 = new URL(request.url);
7389
7174
  url2.pathname = is_data_request ? add_data_suffix(resolved_path) : is_route_resolution_request ? add_resolution_suffix(resolved_path) : resolved_path;
7390
- const response = await fetch(url2, request);
7391
- const headers22 = new Headers(response.headers);
7392
- if (headers22.has("content-encoding")) {
7393
- headers22.delete("content-encoding");
7394
- headers22.delete("content-length");
7395
- }
7396
- return new Response(response.body, {
7397
- headers: headers22,
7398
- status: response.status,
7399
- statusText: response.statusText
7400
- });
7175
+ try {
7176
+ const response = await fetch(url2, request);
7177
+ const headers22 = new Headers(response.headers);
7178
+ if (headers22.has("content-encoding")) {
7179
+ headers22.delete("content-encoding");
7180
+ headers22.delete("content-length");
7181
+ }
7182
+ return new Response(response.body, {
7183
+ headers: headers22,
7184
+ status: response.status,
7185
+ statusText: response.statusText
7186
+ });
7187
+ } catch (error2) {
7188
+ return await handle_fatal_error(event, event_state, options2, error2);
7189
+ }
7401
7190
  }
7402
7191
  let route = null;
7403
7192
  if (base && !state.prerendering?.fallback) {