mongoku 2.9.2 → 2.10.0-compat

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 (458) hide show
  1. package/build/client/_app/immutable/assets/0.D8aXA7G5.css +1 -0
  2. package/build/client/_app/immutable/assets/0.D8aXA7G5.css.br +0 -0
  3. package/build/client/_app/immutable/assets/0.D8aXA7G5.css.gz +0 -0
  4. package/build/client/_app/immutable/assets/10.-WSj0hXT.css +1 -0
  5. package/build/client/_app/immutable/assets/10.-WSj0hXT.css.br +1 -0
  6. package/build/client/_app/immutable/assets/10.-WSj0hXT.css.gz +0 -0
  7. package/build/client/_app/immutable/assets/16.BpmHh9U0.css +1 -0
  8. package/build/client/_app/immutable/assets/16.BpmHh9U0.css.br +0 -0
  9. package/build/client/_app/immutable/assets/16.BpmHh9U0.css.gz +0 -0
  10. package/build/client/_app/immutable/chunks/-8z-rXzu.js +1 -0
  11. package/build/client/_app/immutable/chunks/-8z-rXzu.js.br +0 -0
  12. package/build/client/_app/immutable/chunks/-8z-rXzu.js.gz +0 -0
  13. package/build/client/_app/immutable/chunks/ADrS3reX.js +1 -0
  14. package/build/client/_app/immutable/chunks/ADrS3reX.js.br +0 -0
  15. package/build/client/_app/immutable/chunks/ADrS3reX.js.gz +0 -0
  16. package/build/client/_app/immutable/chunks/B3A9hx44.js +1 -0
  17. package/build/client/_app/immutable/chunks/B3A9hx44.js.br +0 -0
  18. package/build/client/_app/immutable/chunks/B3A9hx44.js.gz +0 -0
  19. package/build/client/_app/immutable/chunks/B48saTbS.js +1 -0
  20. package/build/client/_app/immutable/chunks/B48saTbS.js.br +0 -0
  21. package/build/client/_app/immutable/chunks/B48saTbS.js.gz +0 -0
  22. package/build/client/_app/immutable/chunks/{IixngxlS.js → BoF-bMzh.js} +2 -2
  23. package/build/client/_app/immutable/chunks/BoF-bMzh.js.br +0 -0
  24. package/build/client/_app/immutable/chunks/BoF-bMzh.js.gz +0 -0
  25. package/build/client/_app/immutable/chunks/C5BvtFsa.js +1 -0
  26. package/build/client/_app/immutable/chunks/C5BvtFsa.js.br +0 -0
  27. package/build/client/_app/immutable/chunks/C5BvtFsa.js.gz +0 -0
  28. package/build/client/_app/immutable/chunks/C5dXZyme.js +1 -0
  29. package/build/client/_app/immutable/chunks/C5dXZyme.js.br +0 -0
  30. package/build/client/_app/immutable/chunks/C5dXZyme.js.gz +0 -0
  31. package/build/client/_app/immutable/chunks/CUBPtF8t.js +65 -0
  32. package/build/client/_app/immutable/chunks/CUBPtF8t.js.br +0 -0
  33. package/build/client/_app/immutable/chunks/CUBPtF8t.js.gz +0 -0
  34. package/build/client/_app/immutable/chunks/{9xpgPu5N.js → Cf6RCjfg.js} +1 -1
  35. package/build/client/_app/immutable/chunks/Cf6RCjfg.js.br +0 -0
  36. package/build/client/_app/immutable/chunks/Cf6RCjfg.js.gz +0 -0
  37. package/build/client/_app/immutable/chunks/CrLGr586.js +2 -0
  38. package/build/client/_app/immutable/chunks/CrLGr586.js.br +0 -0
  39. package/build/client/_app/immutable/chunks/CrLGr586.js.gz +0 -0
  40. package/build/client/_app/immutable/chunks/CsbWzWJI.js +1 -0
  41. package/build/client/_app/immutable/chunks/CsbWzWJI.js.br +0 -0
  42. package/build/client/_app/immutable/chunks/CsbWzWJI.js.gz +0 -0
  43. package/build/client/_app/immutable/chunks/CyTV7fHl.js +1 -0
  44. package/build/client/_app/immutable/chunks/CyTV7fHl.js.br +0 -0
  45. package/build/client/_app/immutable/chunks/CyTV7fHl.js.gz +0 -0
  46. package/build/client/_app/immutable/chunks/{DCAtHodH.js → D3UCTJm-.js} +2 -2
  47. package/build/client/_app/immutable/chunks/D3UCTJm-.js.br +0 -0
  48. package/build/client/_app/immutable/chunks/D3UCTJm-.js.gz +0 -0
  49. package/build/client/_app/immutable/chunks/{Dzt_TFtX.js → DH7nqg5-.js} +1 -1
  50. package/build/client/_app/immutable/chunks/DH7nqg5-.js.br +0 -0
  51. package/build/client/_app/immutable/chunks/DH7nqg5-.js.gz +0 -0
  52. package/build/client/_app/immutable/chunks/DKMyRjux.js +1 -0
  53. package/build/client/_app/immutable/chunks/DKMyRjux.js.br +0 -0
  54. package/build/client/_app/immutable/chunks/DKMyRjux.js.gz +0 -0
  55. package/build/client/_app/immutable/chunks/DO0gnjpd.js +1 -0
  56. package/build/client/_app/immutable/chunks/DO0gnjpd.js.br +0 -0
  57. package/build/client/_app/immutable/chunks/DO0gnjpd.js.gz +0 -0
  58. package/build/client/_app/immutable/chunks/DVIi8uNn.js +1 -0
  59. package/build/client/_app/immutable/chunks/DVIi8uNn.js.br +0 -0
  60. package/build/client/_app/immutable/chunks/DVIi8uNn.js.gz +0 -0
  61. package/build/client/_app/immutable/chunks/Dc47-4iR.js +1 -0
  62. package/build/client/_app/immutable/chunks/Dc47-4iR.js.br +0 -0
  63. package/build/client/_app/immutable/chunks/Dc47-4iR.js.gz +0 -0
  64. package/build/client/_app/immutable/chunks/{CTk2PBcX.js → Dcgd1m6P.js} +1 -1
  65. package/build/client/_app/immutable/chunks/Dcgd1m6P.js.br +0 -0
  66. package/build/client/_app/immutable/chunks/Dcgd1m6P.js.gz +0 -0
  67. package/build/client/_app/immutable/chunks/Ddz9xOa-.js +1 -0
  68. package/build/client/_app/immutable/chunks/Ddz9xOa-.js.br +0 -0
  69. package/build/client/_app/immutable/chunks/Ddz9xOa-.js.gz +0 -0
  70. package/build/client/_app/immutable/chunks/{IwGwbOe7.js → DfW1b8bA.js} +1 -1
  71. package/build/client/_app/immutable/chunks/DfW1b8bA.js.br +0 -0
  72. package/build/client/_app/immutable/chunks/{IwGwbOe7.js.gz → DfW1b8bA.js.gz} +0 -0
  73. package/build/client/_app/immutable/chunks/Dfjkeakv.js +1 -0
  74. package/build/client/_app/immutable/chunks/Dfjkeakv.js.br +0 -0
  75. package/build/client/_app/immutable/chunks/Dfjkeakv.js.gz +0 -0
  76. package/build/client/_app/immutable/chunks/{ChWGK2Ce.js → DgwByHCB.js} +1 -1
  77. package/build/client/_app/immutable/chunks/DgwByHCB.js.br +0 -0
  78. package/build/client/_app/immutable/chunks/DgwByHCB.js.gz +0 -0
  79. package/build/client/_app/immutable/chunks/{v8XDA7ui.js → DlVaABeK.js} +3 -3
  80. package/build/client/_app/immutable/chunks/DlVaABeK.js.br +0 -0
  81. package/build/client/_app/immutable/chunks/DlVaABeK.js.gz +0 -0
  82. package/build/client/_app/immutable/chunks/DupjJGFi.js +1 -0
  83. package/build/client/_app/immutable/chunks/DupjJGFi.js.br +0 -0
  84. package/build/client/_app/immutable/chunks/DupjJGFi.js.gz +0 -0
  85. package/build/client/_app/immutable/chunks/DymqlScG.js +1 -0
  86. package/build/client/_app/immutable/chunks/DymqlScG.js.br +0 -0
  87. package/build/client/_app/immutable/chunks/DymqlScG.js.gz +0 -0
  88. package/build/client/_app/immutable/chunks/{Z7BFksgg.js → J9ZSs_8c.js} +1 -1
  89. package/build/client/_app/immutable/chunks/J9ZSs_8c.js.br +0 -0
  90. package/build/client/_app/immutable/chunks/J9ZSs_8c.js.gz +0 -0
  91. package/build/client/_app/immutable/chunks/{CKvueigk.js → OvZJ6gNJ.js} +1 -1
  92. package/build/client/_app/immutable/chunks/OvZJ6gNJ.js.br +0 -0
  93. package/build/client/_app/immutable/chunks/OvZJ6gNJ.js.gz +0 -0
  94. package/build/client/_app/immutable/chunks/URA3nPWG.js +1 -0
  95. package/build/client/_app/immutable/chunks/URA3nPWG.js.br +0 -0
  96. package/build/client/_app/immutable/chunks/URA3nPWG.js.gz +0 -0
  97. package/build/client/_app/immutable/chunks/bZzTqofF.js +1 -0
  98. package/build/client/_app/immutable/chunks/bZzTqofF.js.br +0 -0
  99. package/build/client/_app/immutable/chunks/bZzTqofF.js.gz +0 -0
  100. package/build/client/_app/immutable/chunks/oSuzXE6i.js +1 -0
  101. package/build/client/_app/immutable/chunks/oSuzXE6i.js.br +0 -0
  102. package/build/client/_app/immutable/chunks/oSuzXE6i.js.gz +0 -0
  103. package/build/client/_app/immutable/chunks/wZh6TcLb.js +2 -0
  104. package/build/client/_app/immutable/chunks/wZh6TcLb.js.br +0 -0
  105. package/build/client/_app/immutable/chunks/wZh6TcLb.js.gz +0 -0
  106. package/build/client/_app/immutable/entry/app.G0Hwsu0f.js +2 -0
  107. package/build/client/_app/immutable/entry/app.G0Hwsu0f.js.br +0 -0
  108. package/build/client/_app/immutable/entry/app.G0Hwsu0f.js.gz +0 -0
  109. package/build/client/_app/immutable/entry/start.pOs5gHaO.js +1 -0
  110. package/build/client/_app/immutable/entry/start.pOs5gHaO.js.br +0 -0
  111. package/build/client/_app/immutable/entry/start.pOs5gHaO.js.gz +0 -0
  112. package/build/client/_app/immutable/nodes/0.BPw_KPrY.js +1 -0
  113. package/build/client/_app/immutable/nodes/0.BPw_KPrY.js.br +0 -0
  114. package/build/client/_app/immutable/nodes/0.BPw_KPrY.js.gz +0 -0
  115. package/build/client/_app/immutable/nodes/1.eWL7yJRK.js +1 -0
  116. package/build/client/_app/immutable/nodes/1.eWL7yJRK.js.br +4 -0
  117. package/build/client/_app/immutable/nodes/1.eWL7yJRK.js.gz +0 -0
  118. package/build/client/_app/immutable/nodes/10.AwBSgK4-.js +2 -0
  119. package/build/client/_app/immutable/nodes/10.AwBSgK4-.js.br +0 -0
  120. package/build/client/_app/immutable/nodes/10.AwBSgK4-.js.gz +0 -0
  121. package/build/client/_app/immutable/nodes/11.DS8hIvI2.js +6 -0
  122. package/build/client/_app/immutable/nodes/11.DS8hIvI2.js.br +0 -0
  123. package/build/client/_app/immutable/nodes/11.DS8hIvI2.js.gz +0 -0
  124. package/build/client/_app/immutable/nodes/{12.CuCxLKQr.js → 12.DP-oGzlU.js} +1 -1
  125. package/build/client/_app/immutable/nodes/12.DP-oGzlU.js.br +0 -0
  126. package/build/client/_app/immutable/nodes/12.DP-oGzlU.js.gz +0 -0
  127. package/build/client/_app/immutable/nodes/13.DCNBPtGq.js +1 -0
  128. package/build/client/_app/immutable/nodes/13.DCNBPtGq.js.br +0 -0
  129. package/build/client/_app/immutable/nodes/13.DCNBPtGq.js.gz +0 -0
  130. package/build/client/_app/immutable/nodes/14.B3qXj1Pz.js +65 -0
  131. package/build/client/_app/immutable/nodes/14.B3qXj1Pz.js.br +0 -0
  132. package/build/client/_app/immutable/nodes/14.B3qXj1Pz.js.gz +0 -0
  133. package/build/client/_app/immutable/nodes/15.DFTrPy3K.js +1 -0
  134. package/build/client/_app/immutable/nodes/15.DFTrPy3K.js.br +0 -0
  135. package/build/client/_app/immutable/nodes/15.DFTrPy3K.js.gz +0 -0
  136. package/build/client/_app/immutable/nodes/16.wrfG8awE.js +1 -0
  137. package/build/client/_app/immutable/nodes/16.wrfG8awE.js.br +0 -0
  138. package/build/client/_app/immutable/nodes/16.wrfG8awE.js.gz +0 -0
  139. package/build/client/_app/immutable/nodes/{2.Bai-TIgH.js → 2.6jE8uEJq.js} +1 -1
  140. package/build/client/_app/immutable/nodes/2.6jE8uEJq.js.br +0 -0
  141. package/build/client/_app/immutable/nodes/2.6jE8uEJq.js.gz +0 -0
  142. package/build/client/_app/immutable/nodes/{3.ev9oAmrG.js → 3.C59rlT3p.js} +1 -1
  143. package/build/client/_app/immutable/nodes/3.C59rlT3p.js.br +0 -0
  144. package/build/client/_app/immutable/nodes/3.C59rlT3p.js.gz +0 -0
  145. package/build/client/_app/immutable/nodes/4.DbZo8waJ.js +1 -0
  146. package/build/client/_app/immutable/nodes/4.DbZo8waJ.js.br +0 -0
  147. package/build/client/_app/immutable/nodes/4.DbZo8waJ.js.gz +0 -0
  148. package/build/client/_app/immutable/nodes/{5.CyK0fI1l.js → 5.Cu8LcB5H.js} +1 -1
  149. package/build/client/_app/immutable/nodes/5.Cu8LcB5H.js.br +0 -0
  150. package/build/client/_app/immutable/nodes/5.Cu8LcB5H.js.gz +0 -0
  151. package/build/client/_app/immutable/nodes/7.BSMf3Keu.js +1 -0
  152. package/build/client/_app/immutable/nodes/7.BSMf3Keu.js.br +0 -0
  153. package/build/client/_app/immutable/nodes/7.BSMf3Keu.js.gz +0 -0
  154. package/build/client/_app/immutable/nodes/8.CmQOYs57.js +2 -0
  155. package/build/client/_app/immutable/nodes/8.CmQOYs57.js.br +0 -0
  156. package/build/client/_app/immutable/nodes/8.CmQOYs57.js.gz +0 -0
  157. package/build/client/_app/immutable/nodes/9.6ZB3-a4j.js +1 -0
  158. package/build/client/_app/immutable/nodes/9.6ZB3-a4j.js.br +0 -0
  159. package/build/client/_app/immutable/nodes/9.6ZB3-a4j.js.gz +0 -0
  160. package/build/client/_app/version.json +1 -1
  161. package/build/client/_app/version.json.br +0 -0
  162. package/build/client/_app/version.json.gz +0 -0
  163. package/build/server/chunks/0-2tDL-Z_M.js +32 -0
  164. package/build/server/chunks/0-2tDL-Z_M.js.map +1 -0
  165. package/build/server/chunks/1-L1YRtIEr.js +9 -0
  166. package/build/server/chunks/{1-lx7f4PWt.js.map → 1-L1YRtIEr.js.map} +1 -1
  167. package/build/server/chunks/10-kSTe-NQK.js +43 -0
  168. package/build/server/chunks/10-kSTe-NQK.js.map +1 -0
  169. package/build/server/chunks/{11-BEDQUU1_.js → 11-BSFyIooa.js} +5 -24
  170. package/build/server/chunks/11-BSFyIooa.js.map +1 -0
  171. package/build/server/chunks/{12-CzhXMlU9.js → 12-DhN9fz9p.js} +4 -5
  172. package/build/server/chunks/12-DhN9fz9p.js.map +1 -0
  173. package/build/server/chunks/{13-D1eLiA_r.js → 13-B1mdDktE.js} +5 -24
  174. package/build/server/chunks/13-B1mdDktE.js.map +1 -0
  175. package/build/server/chunks/14-G2fvhIG4.js +38 -0
  176. package/build/server/chunks/14-G2fvhIG4.js.map +1 -0
  177. package/build/server/chunks/15-BxHbA5Ao.js +48 -0
  178. package/build/server/chunks/15-BxHbA5Ao.js.map +1 -0
  179. package/build/server/chunks/16-D0Gv3LNT.js +46 -0
  180. package/build/server/chunks/16-D0Gv3LNT.js.map +1 -0
  181. package/build/server/chunks/{2-ckJpvP-Z.js → 2-DGpX4fMQ.js} +2 -2
  182. package/build/server/chunks/{2-ckJpvP-Z.js.map → 2-DGpX4fMQ.js.map} +1 -1
  183. package/build/server/chunks/{3-TPjZ0P0_.js → 3-CwHfLh5P.js} +2 -2
  184. package/build/server/chunks/{3-TPjZ0P0_.js.map → 3-CwHfLh5P.js.map} +1 -1
  185. package/build/server/chunks/{4-DoW1zEiI.js → 4-B5F5-cxe.js} +10 -2
  186. package/build/server/chunks/4-B5F5-cxe.js.map +1 -0
  187. package/build/server/chunks/{5-cZ6VD-C-.js → 5-CxqBB_6c.js} +2 -2
  188. package/build/server/chunks/{5-cZ6VD-C-.js.map → 5-CxqBB_6c.js.map} +1 -1
  189. package/build/server/chunks/{6-eXO6RVDu.js → 6-Qus887OP.js} +3 -2
  190. package/build/server/chunks/{6-eXO6RVDu.js.map → 6-Qus887OP.js.map} +1 -1
  191. package/build/server/chunks/{7-BmJzLrSm.js → 7-BNgFbh-a.js} +6 -5
  192. package/build/server/chunks/{7-BmJzLrSm.js.map → 7-BNgFbh-a.js.map} +1 -1
  193. package/build/server/chunks/{8-Ba9OHB5H.js → 8-DOgOgmwJ.js} +4 -5
  194. package/build/server/chunks/8-DOgOgmwJ.js.map +1 -0
  195. package/build/server/chunks/{9-DSgRe_DY.js → 9-D-PO69az.js} +4 -5
  196. package/build/server/chunks/9-D-PO69az.js.map +1 -0
  197. package/build/server/chunks/IconChevronDown-D8V4kB6o.js +10 -0
  198. package/build/server/chunks/IconChevronDown-D8V4kB6o.js.map +1 -0
  199. package/build/server/chunks/{JsonValue-CGVfzyTL.js → JsonValue-B-iqFShN.js} +4 -3
  200. package/build/server/chunks/JsonValue-B-iqFShN.js.map +1 -0
  201. package/build/server/chunks/{Modal-D2E5OLRi.js → Modal-D10te4nR.js} +2 -2
  202. package/build/server/chunks/Modal-D10te4nR.js.map +1 -0
  203. package/build/server/chunks/{Panel-C6VWd6JD.js → Panel-CBztHh2Y.js} +2 -2
  204. package/build/server/chunks/Panel-CBztHh2Y.js.map +1 -0
  205. package/build/server/chunks/{PrettyJson-Bo4UtQ1o.js → PrettyJson-Dz5fCjPq.js} +6 -6
  206. package/build/server/chunks/PrettyJson-Dz5fCjPq.js.map +1 -0
  207. package/build/server/chunks/{Tooltip-OVylvwfb.js → Tooltip-BHX9gIpe.js} +2 -2
  208. package/build/server/chunks/Tooltip-BHX9gIpe.js.map +1 -0
  209. package/build/server/chunks/{TooltipTable-CLglfpck.js → TooltipTable-BIwNd3UB.js} +3 -3
  210. package/build/server/chunks/TooltipTable-BIwNd3UB.js.map +1 -0
  211. package/build/server/chunks/{_layout.svelte-CLPxHDiP.js → _layout.svelte-BX5H_goi.js} +38 -15
  212. package/build/server/chunks/_layout.svelte-BX5H_goi.js.map +1 -0
  213. package/build/server/chunks/{_page.svelte-zD7qndty.js → _page.svelte-Bh6uDLz6.js} +15 -15
  214. package/build/server/chunks/_page.svelte-Bh6uDLz6.js.map +1 -0
  215. package/build/server/chunks/_page.svelte-CHqJAnyH.js +258 -0
  216. package/build/server/chunks/_page.svelte-CHqJAnyH.js.map +1 -0
  217. package/build/server/chunks/{_page.svelte-CPcgVZQj.js → _page.svelte-CsCyoCpn.js} +15 -15
  218. package/build/server/chunks/_page.svelte-CsCyoCpn.js.map +1 -0
  219. package/build/server/chunks/{_page.svelte-CAAPpbun.js → _page.svelte-Cwyc6wIg.js} +14 -14
  220. package/build/server/chunks/_page.svelte-Cwyc6wIg.js.map +1 -0
  221. package/build/server/chunks/{_page.svelte-e5wWk327.js → _page.svelte-DE0XWW__.js} +12 -12
  222. package/build/server/chunks/_page.svelte-DE0XWW__.js.map +1 -0
  223. package/build/server/chunks/{_page.svelte-DVjTn-ck.js → _page.svelte-DIe5tQ3z.js} +14 -14
  224. package/build/server/chunks/_page.svelte-DIe5tQ3z.js.map +1 -0
  225. package/build/server/chunks/{_page.svelte-C3QVwl-z.js → _page.svelte-DT0U0FvS.js} +5 -4
  226. package/build/server/chunks/_page.svelte-DT0U0FvS.js.map +1 -0
  227. package/build/server/chunks/{_page.svelte-C_GX0K8M.js → _page.svelte-YOsljIow.js} +19 -22
  228. package/build/server/chunks/_page.svelte-YOsljIow.js.map +1 -0
  229. package/build/server/chunks/{_page.svelte-BeiSosXN.js → _page.svelte-aEFurJZ0.js} +55 -15
  230. package/build/server/chunks/_page.svelte-aEFurJZ0.js.map +1 -0
  231. package/build/server/chunks/{_page.svelte-CkZUu9Wh.js → _page.svelte-vWYc1vOs.js} +9 -9
  232. package/build/server/chunks/_page.svelte-vWYc1vOs.js.map +1 -0
  233. package/build/server/chunks/{_server.ts-i-glbZtX.js → _server.ts-BTmpua-U.js} +4 -3
  234. package/build/server/chunks/{_server.ts-i-glbZtX.js.map → _server.ts-BTmpua-U.js.map} +1 -1
  235. package/build/server/chunks/{_server.ts-CEBmCzTO.js → _server.ts-BhWrvCAV.js} +4 -3
  236. package/build/server/chunks/{_server.ts-CEBmCzTO.js.map → _server.ts-BhWrvCAV.js.map} +1 -1
  237. package/build/server/chunks/{_server.ts-CoUHVeKI.js → _server.ts-CUj-HfCf.js} +4 -3
  238. package/build/server/chunks/{_server.ts-CoUHVeKI.js.map → _server.ts-CUj-HfCf.js.map} +1 -1
  239. package/build/server/chunks/client-DrDUOhf5.js +7 -0
  240. package/build/server/chunks/{client-COtw9Xqw.js.map → client-DrDUOhf5.js.map} +1 -1
  241. package/build/server/chunks/{client2-BIa3wTXU.js → client2-Birk_77A.js} +4 -4
  242. package/build/server/chunks/{client2-BIa3wTXU.js.map → client2-Birk_77A.js.map} +1 -1
  243. package/build/server/chunks/error.svelte-DisWvlhZ.js +19 -0
  244. package/build/server/chunks/error.svelte-DisWvlhZ.js.map +1 -0
  245. package/build/server/chunks/{filters-B3U8Nh9P.js → filters-BTgp9cdC.js} +4 -7
  246. package/build/server/chunks/filters-BTgp9cdC.js.map +1 -0
  247. package/build/server/chunks/{hooks.server-BiUSRqj1.js → hooks.server-Cc7EKf-Z.js} +4 -3
  248. package/build/server/chunks/{hooks.server-BiUSRqj1.js.map → hooks.server-Cc7EKf-Z.js.map} +1 -1
  249. package/build/server/chunks/{index-CtYzvcG6.js → index-CDf-jMhD.js} +3 -2
  250. package/build/server/chunks/index-CDf-jMhD.js.map +1 -0
  251. package/build/server/chunks/{index2-B0RgZaJY.js → index2-DNcGQp0K.js} +3 -3
  252. package/build/server/chunks/index2-DNcGQp0K.js.map +1 -0
  253. package/build/server/chunks/{mongo-B92d7zNj.js → mongo-Du0OjH5b.js} +257 -24
  254. package/build/server/chunks/mongo-Du0OjH5b.js.map +1 -0
  255. package/build/server/chunks/{oauth-D6jTWKFd.js → oauth-CyIuK65I.js} +2 -2
  256. package/build/server/chunks/{oauth-D6jTWKFd.js.map → oauth-CyIuK65I.js.map} +1 -1
  257. package/build/server/chunks/{remote-xxtqbu-CDChJkWc.js → remote-xxtqbu-BCjbN3T4.js} +6 -6
  258. package/build/server/chunks/remote-xxtqbu-BCjbN3T4.js.map +1 -0
  259. package/build/server/chunks/renderer-wJWkLEmh.js +1844 -0
  260. package/build/server/chunks/renderer-wJWkLEmh.js.map +1 -0
  261. package/build/server/chunks/{root-otUAnOAR.js → root-Bs42DBih.js} +12 -1849
  262. package/build/server/chunks/root-Bs42DBih.js.map +1 -0
  263. package/build/server/chunks/{routing-EDfUNu8L.js → routing-CJRzZHIr.js} +2 -2
  264. package/build/server/chunks/{routing-EDfUNu8L.js.map → routing-CJRzZHIr.js.map} +1 -1
  265. package/build/server/chunks/{server2-D_y4YbpC.js → server2-B0ZXRoOj.js} +3 -3
  266. package/build/server/chunks/{server2-D_y4YbpC.js.map → server2-B0ZXRoOj.js.map} +1 -1
  267. package/build/server/chunks/{servers.remote-CGenkEHX.js → servers.remote-Bise-7j4.js} +5 -14
  268. package/build/server/chunks/servers.remote-Bise-7j4.js.map +1 -0
  269. package/build/server/chunks/shardKey-BnXqfB_r.js +11 -0
  270. package/build/server/chunks/shardKey-BnXqfB_r.js.map +1 -0
  271. package/build/server/chunks/{shared-DlqhoNLb.js → shared-BJTImRjE.js} +3 -2
  272. package/build/server/chunks/{shared-DlqhoNLb.js.map → shared-BJTImRjE.js.map} +1 -1
  273. package/build/server/chunks/{state.svelte-Bj5yxNNk.js → state.svelte-YUn1p3EK.js} +3 -2
  274. package/build/server/chunks/{state.svelte-Bj5yxNNk.js.map → state.svelte-YUn1p3EK.js.map} +1 -1
  275. package/build/server/index.js +7 -6
  276. package/build/server/index.js.map +1 -1
  277. package/build/server/manifest.js +29 -21
  278. package/build/server/manifest.js.map +1 -1
  279. package/package.json +1 -1
  280. package/src/api/servers.remote.ts +3 -12
  281. package/src/lib/collectionCategories.ts +25 -0
  282. package/src/lib/components/PageSwitcher.svelte +74 -6
  283. package/src/lib/components/ShardBadge.svelte +65 -0
  284. package/src/lib/server/connectionString.ts +50 -0
  285. package/src/lib/server/mongo.ts +208 -37
  286. package/src/lib/types.ts +34 -0
  287. package/src/lib/utils/filters.ts +5 -7
  288. package/src/lib/utils/mongoUri.ts +164 -0
  289. package/src/lib/utils/shardKey.ts +16 -0
  290. package/src/routes/servers/+page.svelte +1 -1
  291. package/src/routes/servers/[server]/databases/[database]/collections/+page.server.ts +5 -0
  292. package/src/routes/servers/[server]/databases/[database]/collections/+page.svelte +47 -9
  293. package/src/routes/servers/[server]/databases/[database]/collections/[collection]/+layout.ts +3 -0
  294. package/src/routes/servers/[server]/databases/[database]/collections/[collection]/sharding/+page.server.ts +26 -0
  295. package/src/routes/servers/[server]/databases/[database]/collections/[collection]/sharding/+page.svelte +319 -0
  296. package/src/tests/server/connectionString.test.ts +108 -0
  297. package/build/client/_app/immutable/assets/0.DTh4C4pw.css +0 -1
  298. package/build/client/_app/immutable/assets/0.DTh4C4pw.css.br +0 -0
  299. package/build/client/_app/immutable/assets/0.DTh4C4pw.css.gz +0 -0
  300. package/build/client/_app/immutable/chunks/8tf5Lvl3.js +0 -1
  301. package/build/client/_app/immutable/chunks/8tf5Lvl3.js.br +0 -0
  302. package/build/client/_app/immutable/chunks/8tf5Lvl3.js.gz +0 -0
  303. package/build/client/_app/immutable/chunks/951V-MIZ.js +0 -1
  304. package/build/client/_app/immutable/chunks/951V-MIZ.js.br +0 -0
  305. package/build/client/_app/immutable/chunks/951V-MIZ.js.gz +0 -0
  306. package/build/client/_app/immutable/chunks/9xpgPu5N.js.br +0 -0
  307. package/build/client/_app/immutable/chunks/9xpgPu5N.js.gz +0 -0
  308. package/build/client/_app/immutable/chunks/BDGd1aqF.js +0 -2
  309. package/build/client/_app/immutable/chunks/BDGd1aqF.js.br +0 -0
  310. package/build/client/_app/immutable/chunks/BDGd1aqF.js.gz +0 -0
  311. package/build/client/_app/immutable/chunks/BN_N9-2s.js +0 -1
  312. package/build/client/_app/immutable/chunks/BN_N9-2s.js.br +0 -0
  313. package/build/client/_app/immutable/chunks/BN_N9-2s.js.gz +0 -0
  314. package/build/client/_app/immutable/chunks/BUO1EOQu.js +0 -1
  315. package/build/client/_app/immutable/chunks/BUO1EOQu.js.br +0 -0
  316. package/build/client/_app/immutable/chunks/BUO1EOQu.js.gz +0 -0
  317. package/build/client/_app/immutable/chunks/BiVfO0yo.js +0 -1
  318. package/build/client/_app/immutable/chunks/BiVfO0yo.js.br +0 -0
  319. package/build/client/_app/immutable/chunks/BiVfO0yo.js.gz +0 -0
  320. package/build/client/_app/immutable/chunks/C6P2UOyZ.js +0 -1
  321. package/build/client/_app/immutable/chunks/C6P2UOyZ.js.br +0 -0
  322. package/build/client/_app/immutable/chunks/C6P2UOyZ.js.gz +0 -0
  323. package/build/client/_app/immutable/chunks/CCOVnadf.js +0 -1
  324. package/build/client/_app/immutable/chunks/CCOVnadf.js.br +0 -0
  325. package/build/client/_app/immutable/chunks/CCOVnadf.js.gz +0 -0
  326. package/build/client/_app/immutable/chunks/CKvueigk.js.br +0 -0
  327. package/build/client/_app/immutable/chunks/CKvueigk.js.gz +0 -0
  328. package/build/client/_app/immutable/chunks/CQE8d3kg.js +0 -1
  329. package/build/client/_app/immutable/chunks/CQE8d3kg.js.br +0 -0
  330. package/build/client/_app/immutable/chunks/CQE8d3kg.js.gz +0 -0
  331. package/build/client/_app/immutable/chunks/CTk2PBcX.js.br +0 -0
  332. package/build/client/_app/immutable/chunks/CTk2PBcX.js.gz +0 -0
  333. package/build/client/_app/immutable/chunks/ChWGK2Ce.js.br +0 -0
  334. package/build/client/_app/immutable/chunks/ChWGK2Ce.js.gz +0 -0
  335. package/build/client/_app/immutable/chunks/CkMoyTwc.js +0 -1
  336. package/build/client/_app/immutable/chunks/CkMoyTwc.js.br +0 -0
  337. package/build/client/_app/immutable/chunks/CkMoyTwc.js.gz +0 -0
  338. package/build/client/_app/immutable/chunks/CmI1igJD.js +0 -1
  339. package/build/client/_app/immutable/chunks/CmI1igJD.js.br +0 -0
  340. package/build/client/_app/immutable/chunks/CmI1igJD.js.gz +0 -0
  341. package/build/client/_app/immutable/chunks/DCAtHodH.js.br +0 -0
  342. package/build/client/_app/immutable/chunks/DCAtHodH.js.gz +0 -0
  343. package/build/client/_app/immutable/chunks/DFXj4NOH.js +0 -1
  344. package/build/client/_app/immutable/chunks/DFXj4NOH.js.br +0 -0
  345. package/build/client/_app/immutable/chunks/DFXj4NOH.js.gz +0 -0
  346. package/build/client/_app/immutable/chunks/DaMh_eeB.js +0 -1
  347. package/build/client/_app/immutable/chunks/DaMh_eeB.js.br +0 -0
  348. package/build/client/_app/immutable/chunks/DaMh_eeB.js.gz +0 -0
  349. package/build/client/_app/immutable/chunks/DqxUmOYD.js +0 -66
  350. package/build/client/_app/immutable/chunks/DqxUmOYD.js.br +0 -0
  351. package/build/client/_app/immutable/chunks/DqxUmOYD.js.gz +0 -0
  352. package/build/client/_app/immutable/chunks/Dzt_TFtX.js.br +0 -0
  353. package/build/client/_app/immutable/chunks/Dzt_TFtX.js.gz +0 -0
  354. package/build/client/_app/immutable/chunks/IixngxlS.js.br +0 -0
  355. package/build/client/_app/immutable/chunks/IixngxlS.js.gz +0 -0
  356. package/build/client/_app/immutable/chunks/IwGwbOe7.js.br +0 -0
  357. package/build/client/_app/immutable/chunks/YMZQSnF3.js +0 -1
  358. package/build/client/_app/immutable/chunks/YMZQSnF3.js.br +0 -0
  359. package/build/client/_app/immutable/chunks/YMZQSnF3.js.gz +0 -0
  360. package/build/client/_app/immutable/chunks/Z7BFksgg.js.br +0 -0
  361. package/build/client/_app/immutable/chunks/Z7BFksgg.js.gz +0 -0
  362. package/build/client/_app/immutable/chunks/dlHwFtkV.js +0 -1
  363. package/build/client/_app/immutable/chunks/dlHwFtkV.js.br +0 -0
  364. package/build/client/_app/immutable/chunks/dlHwFtkV.js.gz +0 -0
  365. package/build/client/_app/immutable/chunks/v8XDA7ui.js.br +0 -0
  366. package/build/client/_app/immutable/chunks/v8XDA7ui.js.gz +0 -0
  367. package/build/client/_app/immutable/entry/app.B1EvSYDg.js +0 -2
  368. package/build/client/_app/immutable/entry/app.B1EvSYDg.js.br +0 -0
  369. package/build/client/_app/immutable/entry/app.B1EvSYDg.js.gz +0 -0
  370. package/build/client/_app/immutable/entry/start.BFVM56Yz.js +0 -1
  371. package/build/client/_app/immutable/entry/start.BFVM56Yz.js.br +0 -0
  372. package/build/client/_app/immutable/entry/start.BFVM56Yz.js.gz +0 -0
  373. package/build/client/_app/immutable/nodes/0.1R1dLPSd.js +0 -1
  374. package/build/client/_app/immutable/nodes/0.1R1dLPSd.js.br +0 -0
  375. package/build/client/_app/immutable/nodes/0.1R1dLPSd.js.gz +0 -0
  376. package/build/client/_app/immutable/nodes/1.LhEdwE1H.js +0 -1
  377. package/build/client/_app/immutable/nodes/1.LhEdwE1H.js.br +0 -0
  378. package/build/client/_app/immutable/nodes/1.LhEdwE1H.js.gz +0 -0
  379. package/build/client/_app/immutable/nodes/10.eB7zuikE.js +0 -2
  380. package/build/client/_app/immutable/nodes/10.eB7zuikE.js.br +0 -0
  381. package/build/client/_app/immutable/nodes/10.eB7zuikE.js.gz +0 -0
  382. package/build/client/_app/immutable/nodes/11.fvrVbout.js +0 -6
  383. package/build/client/_app/immutable/nodes/11.fvrVbout.js.br +0 -0
  384. package/build/client/_app/immutable/nodes/11.fvrVbout.js.gz +0 -0
  385. package/build/client/_app/immutable/nodes/12.CuCxLKQr.js.br +0 -0
  386. package/build/client/_app/immutable/nodes/12.CuCxLKQr.js.gz +0 -0
  387. package/build/client/_app/immutable/nodes/13.DPotp8O6.js +0 -1
  388. package/build/client/_app/immutable/nodes/13.DPotp8O6.js.br +0 -0
  389. package/build/client/_app/immutable/nodes/13.DPotp8O6.js.gz +0 -0
  390. package/build/client/_app/immutable/nodes/14.D5zVPym5.js +0 -65
  391. package/build/client/_app/immutable/nodes/14.D5zVPym5.js.br +0 -0
  392. package/build/client/_app/immutable/nodes/14.D5zVPym5.js.gz +0 -0
  393. package/build/client/_app/immutable/nodes/15.Cucd16Gx.js +0 -1
  394. package/build/client/_app/immutable/nodes/15.Cucd16Gx.js.br +0 -0
  395. package/build/client/_app/immutable/nodes/15.Cucd16Gx.js.gz +0 -0
  396. package/build/client/_app/immutable/nodes/2.Bai-TIgH.js.br +0 -0
  397. package/build/client/_app/immutable/nodes/2.Bai-TIgH.js.gz +0 -0
  398. package/build/client/_app/immutable/nodes/3.ev9oAmrG.js.br +0 -0
  399. package/build/client/_app/immutable/nodes/3.ev9oAmrG.js.gz +0 -0
  400. package/build/client/_app/immutable/nodes/4.DS2d90xq.js +0 -1
  401. package/build/client/_app/immutable/nodes/4.DS2d90xq.js.br +0 -0
  402. package/build/client/_app/immutable/nodes/4.DS2d90xq.js.gz +0 -0
  403. package/build/client/_app/immutable/nodes/5.CyK0fI1l.js.br +0 -0
  404. package/build/client/_app/immutable/nodes/5.CyK0fI1l.js.gz +0 -0
  405. package/build/client/_app/immutable/nodes/7.D-uzybGz.js +0 -1
  406. package/build/client/_app/immutable/nodes/7.D-uzybGz.js.br +0 -0
  407. package/build/client/_app/immutable/nodes/7.D-uzybGz.js.gz +0 -0
  408. package/build/client/_app/immutable/nodes/8.CYKKqJhA.js +0 -2
  409. package/build/client/_app/immutable/nodes/8.CYKKqJhA.js.br +0 -0
  410. package/build/client/_app/immutable/nodes/8.CYKKqJhA.js.gz +0 -0
  411. package/build/client/_app/immutable/nodes/9.CQcxG5IS.js +0 -1
  412. package/build/client/_app/immutable/nodes/9.CQcxG5IS.js.br +0 -0
  413. package/build/client/_app/immutable/nodes/9.CQcxG5IS.js.gz +0 -0
  414. package/build/server/chunks/0-BRQgSkWt.js +0 -31
  415. package/build/server/chunks/0-BRQgSkWt.js.map +0 -1
  416. package/build/server/chunks/1-lx7f4PWt.js +0 -9
  417. package/build/server/chunks/10-Censc2uj.js +0 -42
  418. package/build/server/chunks/10-Censc2uj.js.map +0 -1
  419. package/build/server/chunks/11-BEDQUU1_.js.map +0 -1
  420. package/build/server/chunks/12-CzhXMlU9.js.map +0 -1
  421. package/build/server/chunks/13-D1eLiA_r.js.map +0 -1
  422. package/build/server/chunks/14-BVNQ2wyL.js +0 -57
  423. package/build/server/chunks/14-BVNQ2wyL.js.map +0 -1
  424. package/build/server/chunks/15-Ch9c9iYB.js +0 -67
  425. package/build/server/chunks/15-Ch9c9iYB.js.map +0 -1
  426. package/build/server/chunks/4-DoW1zEiI.js.map +0 -1
  427. package/build/server/chunks/8-Ba9OHB5H.js.map +0 -1
  428. package/build/server/chunks/9-DSgRe_DY.js.map +0 -1
  429. package/build/server/chunks/JsonValue-CGVfzyTL.js.map +0 -1
  430. package/build/server/chunks/Modal-D2E5OLRi.js.map +0 -1
  431. package/build/server/chunks/Panel-C6VWd6JD.js.map +0 -1
  432. package/build/server/chunks/PrettyJson-Bo4UtQ1o.js.map +0 -1
  433. package/build/server/chunks/Tooltip-OVylvwfb.js.map +0 -1
  434. package/build/server/chunks/TooltipTable-CLglfpck.js.map +0 -1
  435. package/build/server/chunks/_layout.svelte-CLPxHDiP.js.map +0 -1
  436. package/build/server/chunks/_page.svelte-BeiSosXN.js.map +0 -1
  437. package/build/server/chunks/_page.svelte-C3QVwl-z.js.map +0 -1
  438. package/build/server/chunks/_page.svelte-CAAPpbun.js.map +0 -1
  439. package/build/server/chunks/_page.svelte-CPcgVZQj.js.map +0 -1
  440. package/build/server/chunks/_page.svelte-C_GX0K8M.js.map +0 -1
  441. package/build/server/chunks/_page.svelte-CkZUu9Wh.js.map +0 -1
  442. package/build/server/chunks/_page.svelte-DVjTn-ck.js.map +0 -1
  443. package/build/server/chunks/_page.svelte-e5wWk327.js.map +0 -1
  444. package/build/server/chunks/_page.svelte-zD7qndty.js.map +0 -1
  445. package/build/server/chunks/client-COtw9Xqw.js +0 -7
  446. package/build/server/chunks/error.svelte-DUZ2SYyF.js +0 -18
  447. package/build/server/chunks/error.svelte-DUZ2SYyF.js.map +0 -1
  448. package/build/server/chunks/filters-B3U8Nh9P.js.map +0 -1
  449. package/build/server/chunks/index-CtYzvcG6.js.map +0 -1
  450. package/build/server/chunks/index2-B0RgZaJY.js.map +0 -1
  451. package/build/server/chunks/mongo-B92d7zNj.js.map +0 -1
  452. package/build/server/chunks/remote-xxtqbu-CDChJkWc.js.map +0 -1
  453. package/build/server/chunks/root-otUAnOAR.js.map +0 -1
  454. package/build/server/chunks/servers.remote-CGenkEHX.js.map +0 -1
  455. package/src/routes/servers/[server]/databases/[database]/collections/[collection]/documents/+page.ts +0 -11
  456. package/src/routes/servers/[server]/databases/[database]/collections/[collection]/indexes/+page.ts +0 -11
  457. package/src/routes/servers/[server]/databases/[database]/collections/[collection]/mappings/+page.ts +0 -11
  458. package/src/routes/servers/[server]/databases/[database]/collections/[collection]/schema/+page.ts +0 -11
@@ -0,0 +1,1844 @@
1
+ import { a as async_mode_flag } from './async-DUoD1OpG.js';
2
+
3
+ const UNDEFINED = -1;
4
+ const HOLE = -2;
5
+ const NAN = -3;
6
+ const POSITIVE_INFINITY = -4;
7
+ const NEGATIVE_INFINITY = -5;
8
+ const NEGATIVE_ZERO = -6;
9
+ const SPARSE = -7;
10
+ const MAX_ARRAY_LEN = 2 ** 32 - 1;
11
+ const MAX_ARRAY_INDEX = MAX_ARRAY_LEN - 1;
12
+ const escaped = {
13
+ "<": "\\u003C",
14
+ "\\": "\\\\",
15
+ "\b": "\\b",
16
+ "\f": "\\f",
17
+ "\n": "\\n",
18
+ "\r": "\\r",
19
+ " ": "\\t",
20
+ "\u2028": "\\u2028",
21
+ "\u2029": "\\u2029"
22
+ };
23
+ class DevalueError extends Error {
24
+ /**
25
+ * @param {string} message
26
+ * @param {string[]} keys
27
+ * @param {any} [value] - The value that failed to be serialized
28
+ * @param {any} [root] - The root value being serialized
29
+ */
30
+ constructor(message, keys, value, root) {
31
+ super(message);
32
+ this.name = "DevalueError";
33
+ this.path = keys.join("");
34
+ this.value = value;
35
+ this.root = root;
36
+ }
37
+ }
38
+ function is_primitive(thing) {
39
+ return thing === null || typeof thing !== "object" && typeof thing !== "function";
40
+ }
41
+ const object_proto_names = /* @__PURE__ */ Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
42
+ function is_plain_object(thing) {
43
+ const proto = Object.getPrototypeOf(thing);
44
+ return proto === Object.prototype || proto === null || Object.getPrototypeOf(proto) === null || Object.getOwnPropertyNames(proto).sort().join("\0") === object_proto_names;
45
+ }
46
+ function get_type(thing) {
47
+ return Object.prototype.toString.call(thing).slice(8, -1);
48
+ }
49
+ function get_escaped_char(char) {
50
+ switch (char) {
51
+ case '"':
52
+ return '\\"';
53
+ case "<":
54
+ return "\\u003C";
55
+ case "\\":
56
+ return "\\\\";
57
+ case "\n":
58
+ return "\\n";
59
+ case "\r":
60
+ return "\\r";
61
+ case " ":
62
+ return "\\t";
63
+ case "\b":
64
+ return "\\b";
65
+ case "\f":
66
+ return "\\f";
67
+ case "\u2028":
68
+ return "\\u2028";
69
+ case "\u2029":
70
+ return "\\u2029";
71
+ default:
72
+ return char < " " ? `\\u${char.charCodeAt(0).toString(16).padStart(4, "0")}` : "";
73
+ }
74
+ }
75
+ function stringify_string(str) {
76
+ let result = "";
77
+ let last_pos = 0;
78
+ const len = str.length;
79
+ for (let i = 0; i < len; i += 1) {
80
+ const char = str[i];
81
+ const replacement = get_escaped_char(char);
82
+ if (replacement) {
83
+ result += str.slice(last_pos, i) + replacement;
84
+ last_pos = i + 1;
85
+ }
86
+ }
87
+ return `"${last_pos === 0 ? str : result + str.slice(last_pos)}"`;
88
+ }
89
+ function enumerable_symbols(object) {
90
+ return Object.getOwnPropertySymbols(object).filter(
91
+ (symbol) => Object.getOwnPropertyDescriptor(object, symbol).enumerable
92
+ );
93
+ }
94
+ const is_identifier = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
95
+ function stringify_key(key) {
96
+ return is_identifier.test(key) ? "." + key : "[" + JSON.stringify(key) + "]";
97
+ }
98
+ function is_valid_array_index(n) {
99
+ if (!Number.isInteger(n)) return false;
100
+ if (n < 0) return false;
101
+ if (n > MAX_ARRAY_INDEX) return false;
102
+ return true;
103
+ }
104
+ function is_valid_array_len(n) {
105
+ if (!Number.isInteger(n)) return false;
106
+ if (n < 0) return false;
107
+ if (n > MAX_ARRAY_LEN) return false;
108
+ return true;
109
+ }
110
+ function is_valid_array_index_string(s) {
111
+ if (s.length === 0) return false;
112
+ if (s.length > 1 && s.charCodeAt(0) === 48) return false;
113
+ for (let i = 0; i < s.length; i++) {
114
+ const c = s.charCodeAt(i);
115
+ if (c < 48 || c > 57) return false;
116
+ }
117
+ return is_valid_array_index(+s);
118
+ }
119
+ function valid_array_indices(array) {
120
+ const keys = Object.keys(array);
121
+ for (var i = keys.length - 1; i >= 0; i--) {
122
+ if (is_valid_array_index_string(keys[i])) {
123
+ break;
124
+ }
125
+ }
126
+ keys.length = i + 1;
127
+ return keys;
128
+ }
129
+ const chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$";
130
+ const unsafe_chars = /[<\b\f\n\r\t\0\u2028\u2029]/g;
131
+ 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)$/;
132
+ function uneval(value, replacer) {
133
+ const counts = /* @__PURE__ */ new Map();
134
+ const keys = [];
135
+ const custom = /* @__PURE__ */ new Map();
136
+ function walk(thing) {
137
+ if (!is_primitive(thing)) {
138
+ if (counts.has(thing)) {
139
+ counts.set(thing, counts.get(thing) + 1);
140
+ return;
141
+ }
142
+ counts.set(thing, 1);
143
+ if (replacer) {
144
+ const str2 = replacer(thing, (value2) => uneval(value2, replacer));
145
+ if (typeof str2 === "string") {
146
+ custom.set(thing, str2);
147
+ return;
148
+ }
149
+ }
150
+ if (typeof thing === "function") {
151
+ throw new DevalueError(`Cannot stringify a function`, keys, thing, value);
152
+ }
153
+ const type = get_type(thing);
154
+ switch (type) {
155
+ case "Number":
156
+ case "BigInt":
157
+ case "String":
158
+ case "Boolean":
159
+ case "Date":
160
+ case "RegExp":
161
+ case "URL":
162
+ case "URLSearchParams":
163
+ return;
164
+ case "Array":
165
+ thing.forEach((value2, i) => {
166
+ keys.push(`[${i}]`);
167
+ walk(value2);
168
+ keys.pop();
169
+ });
170
+ break;
171
+ case "Set":
172
+ Array.from(thing).forEach(walk);
173
+ break;
174
+ case "Map":
175
+ for (const [key, value2] of thing) {
176
+ keys.push(`.get(${is_primitive(key) ? stringify_primitive(key) : "..."})`);
177
+ walk(value2);
178
+ keys.pop();
179
+ }
180
+ break;
181
+ case "Int8Array":
182
+ case "Uint8Array":
183
+ case "Uint8ClampedArray":
184
+ case "Int16Array":
185
+ case "Uint16Array":
186
+ case "Float16Array":
187
+ case "Int32Array":
188
+ case "Uint32Array":
189
+ case "Float32Array":
190
+ case "Float64Array":
191
+ case "BigInt64Array":
192
+ case "BigUint64Array":
193
+ case "DataView":
194
+ walk(thing.buffer);
195
+ return;
196
+ case "ArrayBuffer":
197
+ return;
198
+ case "Temporal.Duration":
199
+ case "Temporal.Instant":
200
+ case "Temporal.PlainDate":
201
+ case "Temporal.PlainTime":
202
+ case "Temporal.PlainDateTime":
203
+ case "Temporal.PlainMonthDay":
204
+ case "Temporal.PlainYearMonth":
205
+ case "Temporal.ZonedDateTime":
206
+ return;
207
+ default:
208
+ if (!is_plain_object(thing)) {
209
+ throw new DevalueError(`Cannot stringify arbitrary non-POJOs`, keys, thing, value);
210
+ }
211
+ if (enumerable_symbols(thing).length > 0) {
212
+ throw new DevalueError(`Cannot stringify POJOs with symbolic keys`, keys, thing, value);
213
+ }
214
+ for (const key of Object.keys(thing)) {
215
+ if (key === "__proto__") {
216
+ throw new DevalueError(
217
+ `Cannot stringify objects with __proto__ keys`,
218
+ keys,
219
+ thing,
220
+ value
221
+ );
222
+ }
223
+ keys.push(stringify_key(key));
224
+ walk(thing[key]);
225
+ keys.pop();
226
+ }
227
+ }
228
+ } else if (typeof thing === "symbol") {
229
+ throw new DevalueError(`Cannot stringify a Symbol primitive`, keys, thing, value);
230
+ }
231
+ }
232
+ walk(value);
233
+ const names = /* @__PURE__ */ new Map();
234
+ Array.from(counts).filter((entry) => entry[1] > 1).sort((a, b) => b[1] - a[1]).forEach((entry, i) => {
235
+ names.set(entry[0], get_name(i));
236
+ });
237
+ function stringify(thing) {
238
+ if (names.has(thing)) {
239
+ return names.get(thing);
240
+ }
241
+ if (is_primitive(thing)) {
242
+ return stringify_primitive(thing);
243
+ }
244
+ if (custom.has(thing)) {
245
+ return custom.get(thing);
246
+ }
247
+ const type = get_type(thing);
248
+ switch (type) {
249
+ case "Number":
250
+ case "String":
251
+ case "Boolean":
252
+ case "BigInt":
253
+ return `Object(${stringify(thing.valueOf())})`;
254
+ case "RegExp":
255
+ const { source, flags } = thing;
256
+ return flags ? `new RegExp(${stringify_string(source)},"${flags}")` : `new RegExp(${stringify_string(source)})`;
257
+ case "Date":
258
+ return `new Date(${thing.getTime()})`;
259
+ case "URL":
260
+ return `new URL(${stringify_string(thing.toString())})`;
261
+ case "URLSearchParams":
262
+ return `new URLSearchParams(${stringify_string(thing.toString())})`;
263
+ case "Array": {
264
+ let has_holes = false;
265
+ let result = "[";
266
+ for (let i = 0; i < thing.length; i += 1) {
267
+ if (i > 0) result += ",";
268
+ if (Object.hasOwn(thing, i)) {
269
+ result += stringify(thing[i]);
270
+ } else if (!has_holes) {
271
+ const populated_keys = valid_array_indices(
272
+ /** @type {any[]} */
273
+ thing
274
+ );
275
+ const population = populated_keys.length;
276
+ const d = String(thing.length).length;
277
+ const hole_cost = thing.length + 2;
278
+ const sparse_cost = 25 + d + population * (d + 2);
279
+ if (hole_cost > sparse_cost) {
280
+ const entries = populated_keys.map((k) => `${k}:${stringify(thing[k])}`).join(",");
281
+ return `Object.assign(Array(${thing.length}),{${entries}})`;
282
+ }
283
+ has_holes = true;
284
+ i -= 1;
285
+ }
286
+ }
287
+ const tail = thing.length === 0 || thing.length - 1 in thing ? "" : ",";
288
+ return result + tail + "]";
289
+ }
290
+ case "Set":
291
+ case "Map":
292
+ return `new ${type}([${Array.from(thing).map(stringify).join(",")}])`;
293
+ case "Int8Array":
294
+ case "Uint8Array":
295
+ case "Uint8ClampedArray":
296
+ case "Int16Array":
297
+ case "Uint16Array":
298
+ case "Float16Array":
299
+ case "Int32Array":
300
+ case "Uint32Array":
301
+ case "Float32Array":
302
+ case "Float64Array":
303
+ case "BigInt64Array":
304
+ case "BigUint64Array": {
305
+ let str2 = `new ${type}`;
306
+ if (!names.has(thing.buffer)) {
307
+ const array = new thing.constructor(thing.buffer);
308
+ str2 += `([${array}])`;
309
+ } else {
310
+ str2 += `(${stringify(thing.buffer)})`;
311
+ }
312
+ if (thing.byteLength !== thing.buffer.byteLength) {
313
+ const start = thing.byteOffset / thing.BYTES_PER_ELEMENT;
314
+ const end = start + thing.length;
315
+ str2 += `.subarray(${start},${end})`;
316
+ }
317
+ return str2;
318
+ }
319
+ case "DataView": {
320
+ let str2 = `new DataView`;
321
+ if (!names.has(thing.buffer)) {
322
+ str2 += `(new Uint8Array([${new Uint8Array(thing.buffer)}]).buffer`;
323
+ } else {
324
+ str2 += `(${stringify(thing.buffer)}`;
325
+ }
326
+ if (thing.byteLength !== thing.buffer.byteLength) {
327
+ str2 += `,${thing.startOffset},${thing.byteLength}`;
328
+ }
329
+ return str2 + ")";
330
+ }
331
+ case "ArrayBuffer": {
332
+ const ui8 = new Uint8Array(thing);
333
+ return `new Uint8Array([${ui8.toString()}]).buffer`;
334
+ }
335
+ case "Temporal.Duration":
336
+ case "Temporal.Instant":
337
+ case "Temporal.PlainDate":
338
+ case "Temporal.PlainTime":
339
+ case "Temporal.PlainDateTime":
340
+ case "Temporal.PlainMonthDay":
341
+ case "Temporal.PlainYearMonth":
342
+ case "Temporal.ZonedDateTime":
343
+ return `${type}.from(${stringify_string(thing.toString())})`;
344
+ default:
345
+ const keys2 = Object.keys(thing);
346
+ const obj = keys2.map((key) => `${safe_key(key)}:${stringify(thing[key])}`).join(",");
347
+ const proto = Object.getPrototypeOf(thing);
348
+ if (proto === null) {
349
+ return keys2.length > 0 ? `{${obj},__proto__:null}` : `{__proto__:null}`;
350
+ }
351
+ return `{${obj}}`;
352
+ }
353
+ }
354
+ const str = stringify(value);
355
+ if (names.size) {
356
+ const params = [];
357
+ const statements = [];
358
+ const values = [];
359
+ names.forEach((name, thing) => {
360
+ params.push(name);
361
+ if (custom.has(thing)) {
362
+ values.push(
363
+ /** @type {string} */
364
+ custom.get(thing)
365
+ );
366
+ return;
367
+ }
368
+ if (is_primitive(thing)) {
369
+ values.push(stringify_primitive(thing));
370
+ return;
371
+ }
372
+ const type = get_type(thing);
373
+ switch (type) {
374
+ case "Number":
375
+ case "String":
376
+ case "Boolean":
377
+ case "BigInt":
378
+ values.push(`Object(${stringify(thing.valueOf())})`);
379
+ break;
380
+ case "RegExp":
381
+ const { source, flags } = thing;
382
+ const regexp = flags ? `new RegExp(${stringify_string(source)},"${flags}")` : `new RegExp(${stringify_string(source)})`;
383
+ values.push(regexp);
384
+ break;
385
+ case "Date":
386
+ values.push(`new Date(${thing.getTime()})`);
387
+ break;
388
+ case "URL":
389
+ values.push(`new URL(${stringify_string(thing.toString())})`);
390
+ break;
391
+ case "URLSearchParams":
392
+ values.push(`new URLSearchParams(${stringify_string(thing.toString())})`);
393
+ break;
394
+ case "Array":
395
+ values.push(`Array(${thing.length})`);
396
+ thing.forEach((v, i) => {
397
+ statements.push(`${name}[${i}]=${stringify(v)}`);
398
+ });
399
+ break;
400
+ case "Set":
401
+ values.push(`new Set`);
402
+ statements.push(
403
+ `${name}.${Array.from(thing).map((v) => `add(${stringify(v)})`).join(".")}`
404
+ );
405
+ break;
406
+ case "Map":
407
+ values.push(`new Map`);
408
+ statements.push(
409
+ `${name}.${Array.from(thing).map(([k, v]) => `set(${stringify(k)}, ${stringify(v)})`).join(".")}`
410
+ );
411
+ break;
412
+ case "Int8Array":
413
+ case "Uint8Array":
414
+ case "Uint8ClampedArray":
415
+ case "Int16Array":
416
+ case "Uint16Array":
417
+ case "Float16Array":
418
+ case "Int32Array":
419
+ case "Uint32Array":
420
+ case "Float32Array":
421
+ case "Float64Array":
422
+ case "BigInt64Array":
423
+ case "BigUint64Array": {
424
+ let str2 = `new ${type}`;
425
+ if (!names.has(thing.buffer)) {
426
+ const array = new thing.constructor(thing.buffer);
427
+ str2 += `([${array}])`;
428
+ } else {
429
+ str2 += `(${stringify(thing.buffer)})`;
430
+ }
431
+ if (thing.byteLength !== thing.buffer.byteLength) {
432
+ const start = thing.byteOffset / thing.BYTES_PER_ELEMENT;
433
+ const end = start + thing.length;
434
+ str2 += `.subarray(${start},${end})`;
435
+ }
436
+ values.push(`{}`);
437
+ statements.push(`${name}=${str2}`);
438
+ break;
439
+ }
440
+ case "DataView": {
441
+ let str2 = `new DataView`;
442
+ if (!names.has(thing.buffer)) {
443
+ str2 += `(new Uint8Array([${new Uint8Array(thing.buffer)}]).buffer`;
444
+ } else {
445
+ str2 += `(${stringify(thing.buffer)}`;
446
+ }
447
+ if (thing.byteLength !== thing.buffer.byteLength) {
448
+ str2 += `,${thing.byteOffset},${thing.byteLength}`;
449
+ }
450
+ str2 += ")";
451
+ values.push(`{}`);
452
+ statements.push(`${name}=${str2}`);
453
+ break;
454
+ }
455
+ case "ArrayBuffer":
456
+ values.push(`new Uint8Array([${new Uint8Array(thing)}]).buffer`);
457
+ break;
458
+ default:
459
+ values.push(Object.getPrototypeOf(thing) === null ? "Object.create(null)" : "{}");
460
+ Object.keys(thing).forEach((key) => {
461
+ statements.push(`${name}${safe_prop(key)}=${stringify(thing[key])}`);
462
+ });
463
+ }
464
+ });
465
+ statements.push(`return ${str}`);
466
+ return `(function(${params.join(",")}){${statements.join(";")}}(${values.join(",")}))`;
467
+ } else {
468
+ return str;
469
+ }
470
+ }
471
+ function get_name(num) {
472
+ let name = "";
473
+ do {
474
+ name = chars[num % chars.length] + name;
475
+ num = ~~(num / chars.length) - 1;
476
+ } while (num >= 0);
477
+ return reserved.test(name) ? `${name}0` : name;
478
+ }
479
+ function escape_unsafe_char(c) {
480
+ return escaped[c] || c;
481
+ }
482
+ function escape_unsafe_chars(str) {
483
+ return str.replace(unsafe_chars, escape_unsafe_char);
484
+ }
485
+ function safe_key(key) {
486
+ return /^[_$a-zA-Z][_$a-zA-Z0-9]*$/.test(key) ? key : escape_unsafe_chars(JSON.stringify(key));
487
+ }
488
+ function safe_prop(key) {
489
+ return /^[_$a-zA-Z][_$a-zA-Z0-9]*$/.test(key) ? `.${key}` : `[${escape_unsafe_chars(JSON.stringify(key))}]`;
490
+ }
491
+ function stringify_primitive(thing) {
492
+ const type = typeof thing;
493
+ if (type === "string") return stringify_string(thing);
494
+ if (thing === void 0) return "void 0";
495
+ if (thing === 0 && 1 / thing < 0) return "-0";
496
+ const str = String(thing);
497
+ if (type === "number") return str.replace(/^(-)?0\./, "$1.");
498
+ if (type === "bigint") return thing + "n";
499
+ return str;
500
+ }
501
+ function experimental_async_required(name) {
502
+ {
503
+ throw new Error(`https://svelte.dev/e/experimental_async_required`);
504
+ }
505
+ }
506
+ function lifecycle_outside_component(name) {
507
+ {
508
+ throw new Error(`https://svelte.dev/e/lifecycle_outside_component`);
509
+ }
510
+ }
511
+ function async_local_storage_unavailable() {
512
+ const error = new Error(`async_local_storage_unavailable
513
+ The node API \`AsyncLocalStorage\` is not available, but is required to use async server rendering.
514
+ https://svelte.dev/e/async_local_storage_unavailable`);
515
+ error.name = "Svelte error";
516
+ throw error;
517
+ }
518
+ function await_invalid() {
519
+ const error = new Error(`await_invalid
520
+ Encountered asynchronous work while rendering synchronously.
521
+ https://svelte.dev/e/await_invalid`);
522
+ error.name = "Svelte error";
523
+ throw error;
524
+ }
525
+ function html_deprecated() {
526
+ const error = new Error(`html_deprecated
527
+ The \`html\` property of server render results has been deprecated. Use \`body\` instead.
528
+ https://svelte.dev/e/html_deprecated`);
529
+ error.name = "Svelte error";
530
+ throw error;
531
+ }
532
+ function hydratable_serialization_failed(key, stack) {
533
+ const error = new Error(`hydratable_serialization_failed
534
+ Failed to serialize \`hydratable\` data for key \`${key}\`.
535
+
536
+ \`hydratable\` can serialize anything [\`uneval\` from \`devalue\`](https://npmjs.com/package/uneval) can, plus Promises.
537
+
538
+ Cause:
539
+ ${stack}
540
+ https://svelte.dev/e/hydratable_serialization_failed`);
541
+ error.name = "Svelte error";
542
+ throw error;
543
+ }
544
+ function invalid_csp() {
545
+ const error = new Error(`invalid_csp
546
+ \`csp.nonce\` was set while \`csp.hash\` was \`true\`. These options cannot be used simultaneously.
547
+ https://svelte.dev/e/invalid_csp`);
548
+ error.name = "Svelte error";
549
+ throw error;
550
+ }
551
+ function invalid_id_prefix() {
552
+ const error = new Error(`invalid_id_prefix
553
+ The \`idPrefix\` option cannot include \`--\`.
554
+ https://svelte.dev/e/invalid_id_prefix`);
555
+ error.name = "Svelte error";
556
+ throw error;
557
+ }
558
+ function server_context_required() {
559
+ const error = new Error(`server_context_required
560
+ Could not resolve \`render\` context.
561
+ https://svelte.dev/e/server_context_required`);
562
+ error.name = "Svelte error";
563
+ throw error;
564
+ }
565
+ var is_array = Array.isArray;
566
+ var index_of = Array.prototype.indexOf;
567
+ var includes = Array.prototype.includes;
568
+ var array_from = Array.from;
569
+ var define_property = Object.defineProperty;
570
+ var get_descriptor = Object.getOwnPropertyDescriptor;
571
+ var object_prototype = Object.prototype;
572
+ var array_prototype = Array.prototype;
573
+ var get_prototype_of = Object.getPrototypeOf;
574
+ var is_extensible = Object.isExtensible;
575
+ var has_own_property = Object.prototype.hasOwnProperty;
576
+ const noop = () => {
577
+ };
578
+ function is_promise(value) {
579
+ return typeof value?.then === "function";
580
+ }
581
+ function run_all(arr) {
582
+ for (var i = 0; i < arr.length; i++) {
583
+ arr[i]();
584
+ }
585
+ }
586
+ function deferred() {
587
+ var resolve;
588
+ var reject;
589
+ var promise = new Promise((res, rej) => {
590
+ resolve = res;
591
+ reject = rej;
592
+ });
593
+ return { promise, resolve, reject };
594
+ }
595
+ let current_render = null;
596
+ let context = null;
597
+ function get_render_context() {
598
+ const store = context ?? als?.getStore();
599
+ if (!store) {
600
+ server_context_required();
601
+ }
602
+ return store;
603
+ }
604
+ async function with_render_context(fn) {
605
+ context = {
606
+ hydratable: {
607
+ lookup: /* @__PURE__ */ new Map(),
608
+ comparisons: [],
609
+ unresolved_promises: /* @__PURE__ */ new Map()
610
+ }
611
+ };
612
+ if (in_webcontainer()) {
613
+ const { promise, resolve } = deferred();
614
+ const previous_render = current_render;
615
+ current_render = promise;
616
+ await previous_render;
617
+ return fn().finally(resolve);
618
+ }
619
+ try {
620
+ if (als === null) {
621
+ async_local_storage_unavailable();
622
+ }
623
+ return als.run(context, fn);
624
+ } finally {
625
+ context = null;
626
+ }
627
+ }
628
+ let als = null;
629
+ let als_import = null;
630
+ function init_render_context() {
631
+ als_import ??= import('node:async_hooks').then((hooks) => {
632
+ als = new hooks.AsyncLocalStorage();
633
+ }).then(noop, noop);
634
+ return als_import;
635
+ }
636
+ function in_webcontainer() {
637
+ return !!globalThis.process?.versions?.webcontainer;
638
+ }
639
+
640
+ var ssr_context = null;
641
+ function set_ssr_context(v) {
642
+ ssr_context = v;
643
+ }
644
+ function getContext(key) {
645
+ const context_map = get_or_init_context_map();
646
+ const result = (
647
+ /** @type {T} */
648
+ context_map.get(key)
649
+ );
650
+ return result;
651
+ }
652
+ function setContext(key, context) {
653
+ get_or_init_context_map().set(key, context);
654
+ return context;
655
+ }
656
+ function get_or_init_context_map(name) {
657
+ if (ssr_context === null) {
658
+ lifecycle_outside_component();
659
+ }
660
+ return ssr_context.c ??= new Map(get_parent_context(ssr_context) || void 0);
661
+ }
662
+ function push(fn) {
663
+ ssr_context = { p: ssr_context, c: null, r: null };
664
+ }
665
+ function pop() {
666
+ ssr_context = /** @type {SSRContext} */
667
+ ssr_context.p;
668
+ }
669
+ function get_parent_context(ssr_context2) {
670
+ let parent = ssr_context2.p;
671
+ while (parent !== null) {
672
+ const context_map = parent.c;
673
+ if (context_map !== null) {
674
+ return context_map;
675
+ }
676
+ parent = parent.p;
677
+ }
678
+ return null;
679
+ }
680
+ const DERIVED = 1 << 1;
681
+ const EFFECT = 1 << 2;
682
+ const RENDER_EFFECT = 1 << 3;
683
+ const MANAGED_EFFECT = 1 << 24;
684
+ const BLOCK_EFFECT = 1 << 4;
685
+ const BRANCH_EFFECT = 1 << 5;
686
+ const ROOT_EFFECT = 1 << 6;
687
+ const BOUNDARY_EFFECT = 1 << 7;
688
+ const CONNECTED = 1 << 9;
689
+ const CLEAN = 1 << 10;
690
+ const DIRTY = 1 << 11;
691
+ const MAYBE_DIRTY = 1 << 12;
692
+ const INERT = 1 << 13;
693
+ const DESTROYED = 1 << 14;
694
+ const REACTION_RAN = 1 << 15;
695
+ const DESTROYING = 1 << 25;
696
+ const EFFECT_TRANSPARENT = 1 << 16;
697
+ const EAGER_EFFECT = 1 << 17;
698
+ const HEAD_EFFECT = 1 << 18;
699
+ const EFFECT_PRESERVED = 1 << 19;
700
+ const USER_EFFECT = 1 << 20;
701
+ const WAS_MARKED = 1 << 16;
702
+ const REACTION_IS_UPDATING = 1 << 21;
703
+ const ASYNC = 1 << 22;
704
+ const ERROR_VALUE = 1 << 23;
705
+ const STATE_SYMBOL = /* @__PURE__ */ Symbol("$state");
706
+ const LEGACY_PROPS = /* @__PURE__ */ Symbol("legacy props");
707
+ const ATTRIBUTES_CACHE = /* @__PURE__ */ Symbol("attributes");
708
+ const CLASS_CACHE = /* @__PURE__ */ Symbol("class");
709
+ const STYLE_CACHE = /* @__PURE__ */ Symbol("style");
710
+ const TEXT_CACHE = /* @__PURE__ */ Symbol("text");
711
+ const STALE_REACTION = new class StaleReactionError extends Error {
712
+ name = "StaleReactionError";
713
+ message = "The reaction that called `getAbortSignal()` was re-run or destroyed";
714
+ }();
715
+ const COMMENT_NODE = 8;
716
+ let controller = null;
717
+ function abort() {
718
+ controller?.abort(STALE_REACTION);
719
+ controller = null;
720
+ }
721
+ const HYDRATION_START = "[";
722
+ const HYDRATION_START_ELSE = "[!";
723
+ const HYDRATION_START_FAILED = "[?";
724
+ const HYDRATION_END = "]";
725
+ const HYDRATION_ERROR = {};
726
+ const ELEMENT_IS_NAMESPACED = 1;
727
+ const ELEMENT_PRESERVE_ATTRIBUTE_CASE = 1 << 1;
728
+ const ELEMENT_IS_INPUT = 1 << 2;
729
+ const UNINITIALIZED = /* @__PURE__ */ Symbol();
730
+ function unresolved_hydratable(key, stack) {
731
+ {
732
+ console.warn(`https://svelte.dev/e/unresolved_hydratable`);
733
+ }
734
+ }
735
+ const BLOCK_OPEN = `<!--${HYDRATION_START}-->`;
736
+ const BLOCK_OPEN_ELSE = `<!--${HYDRATION_START_ELSE}-->`;
737
+ const BLOCK_CLOSE = `<!--${HYDRATION_END}-->`;
738
+ const EMPTY_COMMENT = `<!---->`;
739
+ const ATTR_REGEX = /[&"<]/g;
740
+ const CONTENT_REGEX = /[&<]/g;
741
+ function escape_html(value, is_attr) {
742
+ const str = String(value ?? "");
743
+ const pattern = is_attr ? ATTR_REGEX : CONTENT_REGEX;
744
+ pattern.lastIndex = 0;
745
+ let escaped = "";
746
+ let last = 0;
747
+ while (pattern.test(str)) {
748
+ const i = pattern.lastIndex - 1;
749
+ const ch = str[i];
750
+ escaped += str.substring(last, i) + (ch === "&" ? "&amp;" : ch === '"' ? "&quot;" : "&lt;");
751
+ last = i + 1;
752
+ }
753
+ return escaped + str.substring(last);
754
+ }
755
+ function r(e) {
756
+ var t, f, n = "";
757
+ if ("string" == typeof e || "number" == typeof e) n += e;
758
+ else if ("object" == typeof e) if (Array.isArray(e)) {
759
+ var o = e.length;
760
+ for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
761
+ } else for (f in e) e[f] && (n && (n += " "), n += f);
762
+ return n;
763
+ }
764
+ function clsx$1() {
765
+ for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
766
+ return n;
767
+ }
768
+ const replacements = {
769
+ translate: /* @__PURE__ */ new Map([
770
+ [true, "yes"],
771
+ [false, "no"]
772
+ ])
773
+ };
774
+ function attr(name, value, is_boolean = false) {
775
+ if (name === "hidden" && value !== "until-found") {
776
+ is_boolean = true;
777
+ }
778
+ if (value == null || !value && is_boolean) return "";
779
+ const normalized = has_own_property.call(replacements, name) && replacements[name].get(value) || value;
780
+ const assignment = is_boolean ? `=""` : `="${escape_html(normalized, true)}"`;
781
+ return ` ${name}${assignment}`;
782
+ }
783
+ function clsx(value) {
784
+ if (typeof value === "object") {
785
+ return clsx$1(value);
786
+ } else {
787
+ return value ?? "";
788
+ }
789
+ }
790
+ const whitespace = [..." \n\r\f \v\uFEFF"];
791
+ function to_class(value, hash, directives) {
792
+ var classname = value == null ? "" : "" + value;
793
+ if (hash) {
794
+ classname = classname ? classname + " " + hash : hash;
795
+ }
796
+ if (directives) {
797
+ for (var key of Object.keys(directives)) {
798
+ if (directives[key]) {
799
+ classname = classname ? classname + " " + key : key;
800
+ } else if (classname.length) {
801
+ var len = key.length;
802
+ var a = 0;
803
+ while ((a = classname.indexOf(key, a)) >= 0) {
804
+ var b = a + len;
805
+ if ((a === 0 || whitespace.includes(classname[a - 1])) && (b === classname.length || whitespace.includes(classname[b]))) {
806
+ classname = (a === 0 ? "" : classname.substring(0, a)) + classname.substring(b + 1);
807
+ } else {
808
+ a = b;
809
+ }
810
+ }
811
+ }
812
+ }
813
+ }
814
+ return classname === "" ? null : classname;
815
+ }
816
+ function append_styles(styles, important = false) {
817
+ var separator = important ? " !important;" : ";";
818
+ var css = "";
819
+ for (var key of Object.keys(styles)) {
820
+ var value = styles[key];
821
+ if (value != null && value !== "") {
822
+ css += " " + key + ": " + value + separator;
823
+ }
824
+ }
825
+ return css;
826
+ }
827
+ function to_css_name(name) {
828
+ if (name[0] !== "-" || name[1] !== "-") {
829
+ return name.toLowerCase();
830
+ }
831
+ return name;
832
+ }
833
+ function to_style(value, styles) {
834
+ if (styles) {
835
+ var new_style = "";
836
+ var normal_styles;
837
+ var important_styles;
838
+ if (Array.isArray(styles)) {
839
+ normal_styles = styles[0];
840
+ important_styles = styles[1];
841
+ } else {
842
+ normal_styles = styles;
843
+ }
844
+ if (value) {
845
+ value = String(value).replaceAll(/\s*\/\*.*?\*\/\s*/g, "").trim();
846
+ var in_str = false;
847
+ var in_apo = 0;
848
+ var in_comment = false;
849
+ var reserved_names = [];
850
+ if (normal_styles) {
851
+ reserved_names.push(...Object.keys(normal_styles).map(to_css_name));
852
+ }
853
+ if (important_styles) {
854
+ reserved_names.push(...Object.keys(important_styles).map(to_css_name));
855
+ }
856
+ var start_index = 0;
857
+ var name_index = -1;
858
+ const len = value.length;
859
+ for (var i = 0; i < len; i++) {
860
+ var c = value[i];
861
+ if (in_comment) {
862
+ if (c === "/" && value[i - 1] === "*") {
863
+ in_comment = false;
864
+ }
865
+ } else if (in_str) {
866
+ if (in_str === c) {
867
+ in_str = false;
868
+ }
869
+ } else if (c === "/" && value[i + 1] === "*") {
870
+ in_comment = true;
871
+ } else if (c === '"' || c === "'") {
872
+ in_str = c;
873
+ } else if (c === "(") {
874
+ in_apo++;
875
+ } else if (c === ")") {
876
+ in_apo--;
877
+ }
878
+ if (!in_comment && in_str === false && in_apo === 0) {
879
+ if (c === ":" && name_index === -1) {
880
+ name_index = i;
881
+ } else if (c === ";" || i === len - 1) {
882
+ if (name_index !== -1) {
883
+ var name = to_css_name(value.substring(start_index, name_index).trim());
884
+ if (!reserved_names.includes(name)) {
885
+ if (c !== ";") {
886
+ i++;
887
+ }
888
+ var property = value.substring(start_index, i).trim();
889
+ new_style += " " + property + ";";
890
+ }
891
+ }
892
+ start_index = i + 1;
893
+ name_index = -1;
894
+ }
895
+ }
896
+ }
897
+ }
898
+ if (normal_styles) {
899
+ new_style += append_styles(normal_styles);
900
+ }
901
+ if (important_styles) {
902
+ new_style += append_styles(important_styles, true);
903
+ }
904
+ new_style = new_style.trim();
905
+ return new_style === "" ? null : new_style;
906
+ }
907
+ return value == null ? null : String(value);
908
+ }
909
+ const DOM_BOOLEAN_ATTRIBUTES = [
910
+ "allowfullscreen",
911
+ "async",
912
+ "autofocus",
913
+ "autoplay",
914
+ "checked",
915
+ "controls",
916
+ "default",
917
+ "disabled",
918
+ "formnovalidate",
919
+ "indeterminate",
920
+ "inert",
921
+ "ismap",
922
+ "loop",
923
+ "multiple",
924
+ "muted",
925
+ "nomodule",
926
+ "novalidate",
927
+ "open",
928
+ "playsinline",
929
+ "readonly",
930
+ "required",
931
+ "reversed",
932
+ "seamless",
933
+ "selected",
934
+ "webkitdirectory",
935
+ "defer",
936
+ "disablepictureinpicture",
937
+ "disableremoteplayback"
938
+ ];
939
+ function is_boolean_attribute(name) {
940
+ return DOM_BOOLEAN_ATTRIBUTES.includes(name);
941
+ }
942
+ const PASSIVE_EVENTS = ["touchstart", "touchmove"];
943
+ function is_passive_event(name) {
944
+ return PASSIVE_EVENTS.includes(name);
945
+ }
946
+ const INVALID_ATTR_NAME_CHAR_REGEX = /[\s'">/=\u{FDD0}-\u{FDEF}\u{FFFE}\u{FFFF}\u{1FFFE}\u{1FFFF}\u{2FFFE}\u{2FFFF}\u{3FFFE}\u{3FFFF}\u{4FFFE}\u{4FFFF}\u{5FFFE}\u{5FFFF}\u{6FFFE}\u{6FFFF}\u{7FFFE}\u{7FFFF}\u{8FFFE}\u{8FFFF}\u{9FFFE}\u{9FFFF}\u{AFFFE}\u{AFFFF}\u{BFFFE}\u{BFFFF}\u{CFFFE}\u{CFFFF}\u{DFFFE}\u{DFFFF}\u{EFFFE}\u{EFFFF}\u{FFFFE}\u{FFFFF}\u{10FFFE}\u{10FFFF}]/u;
947
+ function render(component, options = {}) {
948
+ if (options.csp?.hash && options.csp.nonce) {
949
+ invalid_csp();
950
+ }
951
+ return Renderer.render(
952
+ /** @type {Component<Props>} */
953
+ component,
954
+ options
955
+ );
956
+ }
957
+ function head(hash, renderer, fn) {
958
+ renderer.head((renderer2) => {
959
+ renderer2.push(`<!--${hash}-->`);
960
+ renderer2.child(fn);
961
+ renderer2.push(EMPTY_COMMENT);
962
+ });
963
+ }
964
+ function attributes(attrs, css_hash, classes, styles, flags = 0) {
965
+ if (styles) {
966
+ attrs.style = to_style(attrs.style, styles);
967
+ }
968
+ if (attrs.class) {
969
+ attrs.class = clsx(attrs.class);
970
+ }
971
+ if (css_hash || classes) {
972
+ attrs.class = to_class(attrs.class, css_hash, classes);
973
+ }
974
+ let attr_str = "";
975
+ let name;
976
+ const is_html = (flags & ELEMENT_IS_NAMESPACED) === 0;
977
+ const lowercase = (flags & ELEMENT_PRESERVE_ATTRIBUTE_CASE) === 0;
978
+ const is_input = (flags & ELEMENT_IS_INPUT) !== 0;
979
+ for (name of Object.keys(attrs)) {
980
+ if (typeof attrs[name] === "function") continue;
981
+ if (name[0] === "$" && name[1] === "$") continue;
982
+ if (name === "" || INVALID_ATTR_NAME_CHAR_REGEX.test(name)) continue;
983
+ var value = attrs[name];
984
+ var lower = name.toLowerCase();
985
+ if (lowercase) name = lower;
986
+ if (lower.length > 2 && lower.startsWith("on")) continue;
987
+ if (is_input) {
988
+ if (name === "defaultvalue" || name === "defaultchecked") {
989
+ name = name === "defaultvalue" ? "value" : "checked";
990
+ if (attrs[name]) continue;
991
+ }
992
+ }
993
+ attr_str += attr(name, value, is_html && is_boolean_attribute(name));
994
+ }
995
+ return attr_str;
996
+ }
997
+ function stringify(value) {
998
+ return typeof value === "string" ? value : value == null ? "" : value + "";
999
+ }
1000
+ function attr_class(value, hash, directives) {
1001
+ var result = to_class(value, hash, directives);
1002
+ return result ? ` class="${escape_html(result, true)}"` : "";
1003
+ }
1004
+ function attr_style(value, directives) {
1005
+ var result = to_style(value, directives);
1006
+ return result ? ` style="${escape_html(result, true)}"` : "";
1007
+ }
1008
+ function bind_props(props_parent, props_now) {
1009
+ for (const key of Object.keys(props_now)) {
1010
+ const initial_value = props_parent[key];
1011
+ const value = props_now[key];
1012
+ if (initial_value === void 0 && value !== void 0 && Object.getOwnPropertyDescriptor(props_parent, key)?.set) {
1013
+ props_parent[key] = value;
1014
+ }
1015
+ }
1016
+ }
1017
+ function await_block(renderer, promise, pending_fn, then_fn) {
1018
+ if (is_promise(promise)) {
1019
+ renderer.push(BLOCK_OPEN);
1020
+ promise.then(null, noop);
1021
+ if (pending_fn !== null) {
1022
+ pending_fn();
1023
+ }
1024
+ } else if (then_fn !== null) {
1025
+ renderer.push(BLOCK_OPEN_ELSE);
1026
+ then_fn(promise);
1027
+ }
1028
+ }
1029
+ function ensure_array_like(array_like_or_iterator) {
1030
+ if (array_like_or_iterator) {
1031
+ return array_like_or_iterator.length !== void 0 ? array_like_or_iterator : Array.from(array_like_or_iterator);
1032
+ }
1033
+ return [];
1034
+ }
1035
+ function once(get_value) {
1036
+ let value = (
1037
+ /** @type {V} */
1038
+ UNINITIALIZED
1039
+ );
1040
+ return () => {
1041
+ if (value === UNINITIALIZED) {
1042
+ value = get_value();
1043
+ }
1044
+ return value;
1045
+ };
1046
+ }
1047
+ function derived(fn) {
1048
+ const get_value = ssr_context === null ? fn : once(fn);
1049
+ let updated_value;
1050
+ return function(new_value) {
1051
+ if (arguments.length === 0) {
1052
+ return updated_value ?? get_value();
1053
+ }
1054
+ updated_value = new_value;
1055
+ return updated_value;
1056
+ };
1057
+ }
1058
+ let text_encoder;
1059
+ let crypto;
1060
+ const obfuscated_import = (module_name) => import(
1061
+ /* @vite-ignore */
1062
+ module_name
1063
+ );
1064
+ async function sha256(data) {
1065
+ text_encoder ??= new TextEncoder();
1066
+ crypto ??= globalThis.crypto?.subtle?.digest ? globalThis.crypto : (
1067
+ // @ts-ignore - we don't install node types in the prod build
1068
+ // don't use import('node:crypto') directly because static analysers will think we rely on node when we don't
1069
+ (await obfuscated_import("node:crypto")).webcrypto
1070
+ );
1071
+ const hash_buffer = await crypto.subtle.digest("SHA-256", text_encoder.encode(data));
1072
+ return base64_encode(hash_buffer);
1073
+ }
1074
+ function base64_encode(bytes) {
1075
+ if (globalThis.Buffer) {
1076
+ return globalThis.Buffer.from(bytes).toString("base64");
1077
+ }
1078
+ let binary = "";
1079
+ for (let i = 0; i < bytes.length; i++) {
1080
+ binary += String.fromCharCode(bytes[i]);
1081
+ }
1082
+ return btoa(binary);
1083
+ }
1084
+ class Renderer {
1085
+ /**
1086
+ * The contents of the renderer.
1087
+ * @type {RendererItem[]}
1088
+ */
1089
+ #out = [];
1090
+ /**
1091
+ * Any `onDestroy` callbacks registered during execution of this renderer.
1092
+ * @type {(() => void)[] | undefined}
1093
+ */
1094
+ #on_destroy = void 0;
1095
+ /**
1096
+ * Whether this renderer is a component body.
1097
+ * @type {boolean}
1098
+ */
1099
+ #is_component_body = false;
1100
+ /**
1101
+ * If set, this renderer is an error boundary. When async collection
1102
+ * of the children fails, the failed snippet is rendered instead.
1103
+ * @type {{
1104
+ * failed: (renderer: Renderer, error: unknown, reset: () => void) => void;
1105
+ * transformError: (error: unknown) => unknown;
1106
+ * context: SSRContext | null;
1107
+ * } | null}
1108
+ */
1109
+ #boundary = null;
1110
+ /**
1111
+ * The type of string content that this renderer is accumulating.
1112
+ * @type {RendererType}
1113
+ */
1114
+ type;
1115
+ /** @type {Renderer | undefined} */
1116
+ #parent;
1117
+ /**
1118
+ * Asynchronous work associated with this renderer
1119
+ * @type {Promise<void> | undefined}
1120
+ */
1121
+ promise = void 0;
1122
+ /**
1123
+ * State which is associated with the content tree as a whole.
1124
+ * It will be re-exposed, uncopied, on all children.
1125
+ * @type {SSRState}
1126
+ * @readonly
1127
+ */
1128
+ global;
1129
+ /**
1130
+ * State that is local to the branch it is declared in.
1131
+ * It will be shallow-copied to all children.
1132
+ *
1133
+ * @type {{ select_value: string | undefined }}
1134
+ */
1135
+ local;
1136
+ /**
1137
+ * @param {SSRState} global
1138
+ * @param {Renderer | undefined} [parent]
1139
+ */
1140
+ constructor(global, parent) {
1141
+ this.#parent = parent;
1142
+ this.global = global;
1143
+ this.local = parent ? { ...parent.local } : { select_value: void 0 };
1144
+ this.type = parent ? parent.type : "body";
1145
+ }
1146
+ /**
1147
+ * @param {(renderer: Renderer) => void} fn
1148
+ */
1149
+ head(fn) {
1150
+ const head2 = new Renderer(this.global, this);
1151
+ head2.type = "head";
1152
+ this.#out.push(head2);
1153
+ head2.child(fn);
1154
+ }
1155
+ /**
1156
+ * @param {Array<Promise<void>>} blockers
1157
+ * @param {(renderer: Renderer) => void} fn
1158
+ */
1159
+ async_block(blockers, fn) {
1160
+ this.#out.push(BLOCK_OPEN);
1161
+ this.async(blockers, fn);
1162
+ this.#out.push(BLOCK_CLOSE);
1163
+ }
1164
+ /**
1165
+ * @param {Array<Promise<void>>} blockers
1166
+ * @param {(renderer: Renderer) => void} fn
1167
+ */
1168
+ async(blockers, fn) {
1169
+ let callback = fn;
1170
+ if (blockers.length > 0) {
1171
+ const context = ssr_context;
1172
+ callback = (renderer) => {
1173
+ return Promise.all(blockers).then(() => {
1174
+ const previous_context = ssr_context;
1175
+ try {
1176
+ set_ssr_context(context);
1177
+ return fn(renderer);
1178
+ } finally {
1179
+ set_ssr_context(previous_context);
1180
+ }
1181
+ });
1182
+ };
1183
+ }
1184
+ this.child(callback);
1185
+ }
1186
+ /**
1187
+ * @param {Array<() => void>} thunks
1188
+ */
1189
+ run(thunks) {
1190
+ const context = ssr_context;
1191
+ let promise = Promise.resolve(thunks[0]());
1192
+ const promises = [promise];
1193
+ for (const fn of thunks.slice(1)) {
1194
+ promise = promise.then(() => {
1195
+ const previous_context = ssr_context;
1196
+ set_ssr_context(context);
1197
+ try {
1198
+ return fn();
1199
+ } finally {
1200
+ set_ssr_context(previous_context);
1201
+ }
1202
+ });
1203
+ promises.push(promise);
1204
+ }
1205
+ promise.catch(noop);
1206
+ this.promise = promise;
1207
+ return promises;
1208
+ }
1209
+ /**
1210
+ * @param {(renderer: Renderer) => MaybePromise<void>} fn
1211
+ */
1212
+ child_block(fn) {
1213
+ this.#out.push(BLOCK_OPEN);
1214
+ this.child(fn);
1215
+ this.#out.push(BLOCK_CLOSE);
1216
+ }
1217
+ /**
1218
+ * Create a child renderer. The child renderer inherits the state from the parent,
1219
+ * but has its own content.
1220
+ * @param {(renderer: Renderer) => MaybePromise<void>} fn
1221
+ */
1222
+ child(fn) {
1223
+ const child = new Renderer(this.global, this);
1224
+ this.#out.push(child);
1225
+ const parent = ssr_context;
1226
+ set_ssr_context({
1227
+ ...ssr_context,
1228
+ p: parent,
1229
+ c: null,
1230
+ r: child
1231
+ });
1232
+ const result = fn(child);
1233
+ set_ssr_context(parent);
1234
+ if (result instanceof Promise) {
1235
+ result.catch(noop);
1236
+ result.finally(() => set_ssr_context(null)).catch(noop);
1237
+ if (child.global.mode === "sync") {
1238
+ await_invalid();
1239
+ }
1240
+ child.promise = result;
1241
+ }
1242
+ return child;
1243
+ }
1244
+ /**
1245
+ * Render children inside an error boundary. If the children throw and the API-level
1246
+ * `transformError` transform handles the error (doesn't re-throw), the `failed` snippet is
1247
+ * rendered instead. Otherwise the error propagates.
1248
+ *
1249
+ * @param {{ failed?: (renderer: Renderer, error: unknown, reset: () => void) => void }} props
1250
+ * @param {(renderer: Renderer) => MaybePromise<void>} children_fn
1251
+ */
1252
+ boundary(props, children_fn) {
1253
+ const child = new Renderer(this.global, this);
1254
+ this.#out.push(child);
1255
+ const parent_context = ssr_context;
1256
+ if (props.failed) {
1257
+ child.#boundary = {
1258
+ failed: props.failed,
1259
+ transformError: this.global.transformError,
1260
+ context: parent_context
1261
+ };
1262
+ }
1263
+ set_ssr_context({
1264
+ ...ssr_context,
1265
+ p: parent_context,
1266
+ c: null,
1267
+ r: child
1268
+ });
1269
+ try {
1270
+ const result = children_fn(child);
1271
+ set_ssr_context(parent_context);
1272
+ if (result instanceof Promise) {
1273
+ if (child.global.mode === "sync") {
1274
+ await_invalid();
1275
+ }
1276
+ result.catch(noop);
1277
+ child.promise = result;
1278
+ }
1279
+ } catch (error) {
1280
+ set_ssr_context(parent_context);
1281
+ const failed_snippet = props.failed;
1282
+ if (!failed_snippet) throw error;
1283
+ const result = this.global.transformError(error);
1284
+ child.#out.length = 0;
1285
+ child.#boundary = null;
1286
+ if (result instanceof Promise) {
1287
+ if (this.global.mode === "sync") {
1288
+ await_invalid();
1289
+ }
1290
+ child.promise = /** @type {Promise<unknown>} */
1291
+ result.then((transformed) => {
1292
+ set_ssr_context(parent_context);
1293
+ child.#out.push(Renderer.#serialize_failed_boundary(transformed));
1294
+ failed_snippet(child, transformed, noop);
1295
+ child.#out.push(BLOCK_CLOSE);
1296
+ });
1297
+ child.promise.catch(noop);
1298
+ } else {
1299
+ child.#out.push(Renderer.#serialize_failed_boundary(result));
1300
+ failed_snippet(child, result, noop);
1301
+ child.#out.push(BLOCK_CLOSE);
1302
+ }
1303
+ }
1304
+ }
1305
+ /**
1306
+ * Create a component renderer. The component renderer inherits the state from the parent,
1307
+ * but has its own content. It is treated as an ordering boundary for ondestroy callbacks.
1308
+ * @param {(renderer: Renderer) => MaybePromise<void>} fn
1309
+ * @param {Function} [component_fn]
1310
+ * @returns {void}
1311
+ */
1312
+ component(fn, component_fn) {
1313
+ push();
1314
+ const child = this.child(fn);
1315
+ child.#is_component_body = true;
1316
+ pop();
1317
+ }
1318
+ /**
1319
+ * @param {Record<string, any>} attrs
1320
+ * @param {(renderer: Renderer) => void} fn
1321
+ * @param {string | undefined} [css_hash]
1322
+ * @param {Record<string, boolean> | undefined} [classes]
1323
+ * @param {Record<string, string> | undefined} [styles]
1324
+ * @param {number | undefined} [flags]
1325
+ * @param {boolean | undefined} [is_rich]
1326
+ * @returns {void}
1327
+ */
1328
+ select(attrs, fn, css_hash, classes, styles, flags, is_rich) {
1329
+ const { value, ...select_attrs } = attrs;
1330
+ this.push(`<select${attributes(select_attrs, css_hash, classes, styles, flags)}>`);
1331
+ this.child((renderer) => {
1332
+ renderer.local.select_value = value;
1333
+ fn(renderer);
1334
+ });
1335
+ this.push(`${is_rich ? "<!>" : ""}</select>`);
1336
+ }
1337
+ /**
1338
+ * @param {Record<string, any>} attrs
1339
+ * @param {string | number | boolean | ((renderer: Renderer) => void)} body
1340
+ * @param {string | undefined} [css_hash]
1341
+ * @param {Record<string, boolean> | undefined} [classes]
1342
+ * @param {Record<string, string> | undefined} [styles]
1343
+ * @param {number | undefined} [flags]
1344
+ * @param {boolean | undefined} [is_rich]
1345
+ */
1346
+ option(attrs, body, css_hash, classes, styles, flags, is_rich) {
1347
+ this.#out.push(`<option${attributes(attrs, css_hash, classes, styles, flags)}`);
1348
+ const close = (renderer, value, { head: head2, body: body2 }) => {
1349
+ if (has_own_property.call(attrs, "value")) {
1350
+ value = attrs.value;
1351
+ }
1352
+ if (value === this.local.select_value) {
1353
+ renderer.#out.push(' selected=""');
1354
+ }
1355
+ renderer.#out.push(`>${body2}${is_rich ? "<!>" : ""}</option>`);
1356
+ if (head2) {
1357
+ renderer.head((child) => child.push(head2));
1358
+ }
1359
+ };
1360
+ if (typeof body === "function") {
1361
+ this.child((renderer) => {
1362
+ const r2 = new Renderer(this.global, this);
1363
+ body(r2);
1364
+ if (this.global.mode === "async") {
1365
+ return r2.#collect_content_async().then((content) => {
1366
+ close(renderer, content.body.replaceAll("<!---->", ""), content);
1367
+ });
1368
+ } else {
1369
+ const content = r2.#collect_content();
1370
+ close(renderer, content.body.replaceAll("<!---->", ""), content);
1371
+ }
1372
+ });
1373
+ } else {
1374
+ close(this, body, { body: escape_html(body) });
1375
+ }
1376
+ }
1377
+ /**
1378
+ * @param {(renderer: Renderer) => void} fn
1379
+ */
1380
+ title(fn) {
1381
+ const path = this.get_path();
1382
+ const close = (head2) => {
1383
+ this.global.set_title(head2, path);
1384
+ };
1385
+ this.child((renderer) => {
1386
+ const r2 = new Renderer(renderer.global, renderer);
1387
+ fn(r2);
1388
+ if (renderer.global.mode === "async") {
1389
+ return r2.#collect_content_async().then((content) => {
1390
+ close(content.head);
1391
+ });
1392
+ } else {
1393
+ const content = r2.#collect_content();
1394
+ close(content.head);
1395
+ }
1396
+ });
1397
+ }
1398
+ /**
1399
+ * @param {string | (() => Promise<string>)} content
1400
+ */
1401
+ push(content) {
1402
+ if (typeof content === "function") {
1403
+ this.child(async (renderer) => renderer.push(await content()));
1404
+ } else {
1405
+ this.#out.push(content);
1406
+ }
1407
+ }
1408
+ /**
1409
+ * @param {() => void} fn
1410
+ */
1411
+ on_destroy(fn) {
1412
+ (this.#on_destroy ??= []).push(fn);
1413
+ }
1414
+ /**
1415
+ * @returns {number[]}
1416
+ */
1417
+ get_path() {
1418
+ return this.#parent ? [...this.#parent.get_path(), this.#parent.#out.indexOf(this)] : [];
1419
+ }
1420
+ /**
1421
+ * @deprecated this is needed for legacy component bindings
1422
+ */
1423
+ copy() {
1424
+ const copy = new Renderer(this.global, this.#parent);
1425
+ copy.#out = this.#out.map((item) => item instanceof Renderer ? item.copy() : item);
1426
+ copy.promise = this.promise;
1427
+ return copy;
1428
+ }
1429
+ /**
1430
+ * @param {Renderer} other
1431
+ * @deprecated this is needed for legacy component bindings
1432
+ */
1433
+ subsume(other) {
1434
+ if (this.global.mode !== other.global.mode) {
1435
+ throw new Error(
1436
+ "invariant: A renderer cannot switch modes. If you're seeing this, there's a compiler bug. File an issue!"
1437
+ );
1438
+ }
1439
+ this.local = other.local;
1440
+ this.#out = other.#out.map((item, i) => {
1441
+ const current = this.#out[i];
1442
+ if (current instanceof Renderer && item instanceof Renderer) {
1443
+ current.subsume(item);
1444
+ return current;
1445
+ }
1446
+ return item;
1447
+ });
1448
+ this.promise = other.promise;
1449
+ this.type = other.type;
1450
+ }
1451
+ get length() {
1452
+ return this.#out.length;
1453
+ }
1454
+ /**
1455
+ * Creates the hydration comment that marks the start of a failed boundary.
1456
+ * The error is JSON-serialized and embedded inside an HTML comment for the client
1457
+ * to parse during hydration. The JSON is escaped to prevent `-->` or `<!--` sequences
1458
+ * from breaking out of the comment (XSS). Uses unicode escapes which `JSON.parse()`
1459
+ * handles transparently.
1460
+ * @param {unknown} error
1461
+ * @returns {string}
1462
+ */
1463
+ static #serialize_failed_boundary(error) {
1464
+ var json = JSON.stringify(error);
1465
+ var escaped = json.replace(/>/g, "\\u003e").replace(/</g, "\\u003c");
1466
+ return `<!--${HYDRATION_START_FAILED}${escaped}-->`;
1467
+ }
1468
+ /**
1469
+ * Only available on the server and when compiling with the `server` option.
1470
+ * Takes a component and returns an object with `body` and `head` properties on it, which you can use to populate the HTML when server-rendering your app.
1471
+ * @template {Record<string, any>} Props
1472
+ * @param {Component<Props>} component
1473
+ * @param {{ props?: Omit<Props, '$$slots' | '$$events'>; context?: Map<any, any>; idPrefix?: string; csp?: Csp }} [options]
1474
+ * @returns {RenderOutput}
1475
+ */
1476
+ static render(component, options = {}) {
1477
+ let sync;
1478
+ let async;
1479
+ const result = (
1480
+ /** @type {RenderOutput} */
1481
+ {}
1482
+ );
1483
+ Object.defineProperties(result, {
1484
+ html: {
1485
+ get: () => {
1486
+ return (sync ??= Renderer.#render(component, options)).body;
1487
+ }
1488
+ },
1489
+ head: {
1490
+ get: () => {
1491
+ return (sync ??= Renderer.#render(component, options)).head;
1492
+ }
1493
+ },
1494
+ body: {
1495
+ get: () => {
1496
+ return (sync ??= Renderer.#render(component, options)).body;
1497
+ }
1498
+ },
1499
+ hashes: {
1500
+ value: {
1501
+ script: ""
1502
+ }
1503
+ },
1504
+ then: {
1505
+ value: (
1506
+ /**
1507
+ * this is not type-safe, but honestly it's the best I can do right now, and it's a straightforward function.
1508
+ *
1509
+ * @template TResult1
1510
+ * @template [TResult2=never]
1511
+ * @param { (value: SyncRenderOutput) => TResult1 } onfulfilled
1512
+ * @param { (reason: unknown) => TResult2 } onrejected
1513
+ */
1514
+ (onfulfilled, onrejected) => {
1515
+ if (!async_mode_flag) {
1516
+ const result2 = sync ??= Renderer.#render(component, options);
1517
+ const user_result = onfulfilled({
1518
+ head: result2.head,
1519
+ body: result2.body,
1520
+ html: result2.body,
1521
+ hashes: { script: [] }
1522
+ });
1523
+ return Promise.resolve(user_result);
1524
+ }
1525
+ async ??= init_render_context().then(
1526
+ () => with_render_context(() => Renderer.#render_async(component, options))
1527
+ );
1528
+ return async.then((result2) => {
1529
+ Object.defineProperty(result2, "html", {
1530
+ // eslint-disable-next-line getter-return
1531
+ get: () => {
1532
+ html_deprecated();
1533
+ }
1534
+ });
1535
+ return onfulfilled(
1536
+ /** @type {SyncRenderOutput} */
1537
+ result2
1538
+ );
1539
+ }, onrejected);
1540
+ }
1541
+ )
1542
+ }
1543
+ });
1544
+ return result;
1545
+ }
1546
+ /**
1547
+ * Collect all of the `onDestroy` callbacks registered during rendering. In an async context, this is only safe to call
1548
+ * after awaiting `collect_async`.
1549
+ *
1550
+ * Child renderers are "porous" and don't affect execution order, but component body renderers
1551
+ * create ordering boundaries. Within a renderer, callbacks run in order until hitting a component boundary.
1552
+ * @returns {Iterable<() => void>}
1553
+ */
1554
+ *#collect_on_destroy() {
1555
+ for (const component of this.#traverse_components()) {
1556
+ yield* component.#collect_ondestroy();
1557
+ }
1558
+ }
1559
+ /**
1560
+ * Performs a depth-first search of renderers, yielding the deepest components first, then additional components as we backtrack up the tree.
1561
+ * @returns {Iterable<Renderer>}
1562
+ */
1563
+ *#traverse_components() {
1564
+ for (const child of this.#out) {
1565
+ if (typeof child !== "string") {
1566
+ yield* child.#traverse_components();
1567
+ }
1568
+ }
1569
+ if (this.#is_component_body) {
1570
+ yield this;
1571
+ }
1572
+ }
1573
+ /**
1574
+ * @returns {Iterable<() => void>}
1575
+ */
1576
+ *#collect_ondestroy() {
1577
+ if (this.#on_destroy) {
1578
+ for (const fn of this.#on_destroy) {
1579
+ yield fn;
1580
+ }
1581
+ }
1582
+ for (const child of this.#out) {
1583
+ if (child instanceof Renderer && !child.#is_component_body) {
1584
+ yield* child.#collect_ondestroy();
1585
+ }
1586
+ }
1587
+ }
1588
+ /**
1589
+ * Render a component. Throws if any of the children are performing asynchronous work.
1590
+ *
1591
+ * @template {Record<string, any>} Props
1592
+ * @param {Component<Props>} component
1593
+ * @param {{ props?: Omit<Props, '$$slots' | '$$events'>; context?: Map<any, any>; idPrefix?: string }} options
1594
+ * @returns {AccumulatedContent}
1595
+ */
1596
+ static #render(component, options) {
1597
+ var previous_context = ssr_context;
1598
+ try {
1599
+ const renderer = Renderer.#open_render("sync", component, options);
1600
+ const content = renderer.#collect_content();
1601
+ return Renderer.#close_render(content, renderer);
1602
+ } finally {
1603
+ abort();
1604
+ set_ssr_context(previous_context);
1605
+ }
1606
+ }
1607
+ /**
1608
+ * Render a component.
1609
+ *
1610
+ * @template {Record<string, any>} Props
1611
+ * @param {Component<Props>} component
1612
+ * @param {{ props?: Omit<Props, '$$slots' | '$$events'>; context?: Map<any, any>; idPrefix?: string; csp?: Csp }} options
1613
+ * @returns {Promise<AccumulatedContent & { hashes: { script: Sha256Source[] } }>}
1614
+ */
1615
+ static async #render_async(component, options) {
1616
+ const previous_context = ssr_context;
1617
+ try {
1618
+ const renderer = Renderer.#open_render("async", component, options);
1619
+ const content = await renderer.#collect_content_async();
1620
+ const hydratables = await renderer.#collect_hydratables();
1621
+ if (hydratables !== null) {
1622
+ content.head = hydratables + content.head;
1623
+ }
1624
+ return Renderer.#close_render(content, renderer);
1625
+ } finally {
1626
+ set_ssr_context(previous_context);
1627
+ abort();
1628
+ }
1629
+ }
1630
+ /**
1631
+ * Collect all of the code from the `out` array and return it as a string, or a promise resolving to a string.
1632
+ * @param {AccumulatedContent} content
1633
+ * @returns {AccumulatedContent}
1634
+ */
1635
+ #collect_content(content = { head: "", body: "" }) {
1636
+ for (const item of this.#out) {
1637
+ if (typeof item === "string") {
1638
+ content[this.type] += item;
1639
+ } else if (item instanceof Renderer) {
1640
+ item.#collect_content(content);
1641
+ }
1642
+ }
1643
+ return content;
1644
+ }
1645
+ /**
1646
+ * Collect all of the code from the `out` array and return it as a string.
1647
+ * @param {AccumulatedContent} content
1648
+ * @returns {Promise<AccumulatedContent>}
1649
+ */
1650
+ async #collect_content_async(content = { head: "", body: "" }) {
1651
+ await this.promise;
1652
+ for (const item of this.#out) {
1653
+ if (typeof item === "string") {
1654
+ content[this.type] += item;
1655
+ } else if (item instanceof Renderer) {
1656
+ if (item.#boundary) {
1657
+ const boundary_content = { head: "", body: "" };
1658
+ try {
1659
+ await item.#collect_content_async(boundary_content);
1660
+ content.head += boundary_content.head;
1661
+ content.body += boundary_content.body;
1662
+ } catch (error) {
1663
+ const { context, failed, transformError } = item.#boundary;
1664
+ set_ssr_context(context);
1665
+ let promise = transformError(error);
1666
+ set_ssr_context(null);
1667
+ let transformed = await promise;
1668
+ set_ssr_context(context);
1669
+ const failed_renderer = new Renderer(item.global, item);
1670
+ failed_renderer.type = item.type;
1671
+ failed_renderer.#out.push(Renderer.#serialize_failed_boundary(transformed));
1672
+ failed(failed_renderer, transformed, noop);
1673
+ failed_renderer.#out.push(BLOCK_CLOSE);
1674
+ await failed_renderer.#collect_content_async(content);
1675
+ }
1676
+ } else {
1677
+ await item.#collect_content_async(content);
1678
+ }
1679
+ }
1680
+ }
1681
+ return content;
1682
+ }
1683
+ async #collect_hydratables() {
1684
+ const ctx = get_render_context().hydratable;
1685
+ for (const [_, key] of ctx.unresolved_promises) {
1686
+ unresolved_hydratable(key, ctx.lookup.get(key)?.stack ?? "<missing stack trace>");
1687
+ }
1688
+ for (const comparison of ctx.comparisons) {
1689
+ await comparison;
1690
+ }
1691
+ return await this.#hydratable_block(ctx);
1692
+ }
1693
+ /**
1694
+ * @template {Record<string, any>} Props
1695
+ * @param {'sync' | 'async'} mode
1696
+ * @param {import('svelte').Component<Props>} component
1697
+ * @param {{ props?: Omit<Props, '$$slots' | '$$events'>; context?: Map<any, any>; idPrefix?: string; csp?: Csp; transformError?: (error: unknown) => unknown }} options
1698
+ * @returns {Renderer}
1699
+ */
1700
+ static #open_render(mode, component, options) {
1701
+ if (options.idPrefix?.includes("--")) {
1702
+ invalid_id_prefix();
1703
+ }
1704
+ var previous_context = ssr_context;
1705
+ try {
1706
+ const renderer = new Renderer(
1707
+ new SSRState(
1708
+ mode,
1709
+ options.idPrefix ? options.idPrefix + "-" : "",
1710
+ options.csp,
1711
+ options.transformError
1712
+ )
1713
+ );
1714
+ const context = { p: null, c: options.context ?? null, r: renderer };
1715
+ set_ssr_context(context);
1716
+ renderer.push(BLOCK_OPEN);
1717
+ component(renderer, options.props ?? {});
1718
+ renderer.push(BLOCK_CLOSE);
1719
+ return renderer;
1720
+ } finally {
1721
+ set_ssr_context(previous_context);
1722
+ }
1723
+ }
1724
+ /**
1725
+ * @param {AccumulatedContent} content
1726
+ * @param {Renderer} renderer
1727
+ * @returns {AccumulatedContent & { hashes: { script: Sha256Source[] } }}
1728
+ */
1729
+ static #close_render(content, renderer) {
1730
+ for (const cleanup of renderer.#collect_on_destroy()) {
1731
+ cleanup();
1732
+ }
1733
+ let head2 = content.head + renderer.global.get_title();
1734
+ let body = content.body;
1735
+ for (const { hash, code } of renderer.global.css) {
1736
+ head2 += `<style id="${hash}">${code}</style>`;
1737
+ }
1738
+ return {
1739
+ head: head2,
1740
+ body,
1741
+ hashes: {
1742
+ script: renderer.global.csp.script_hashes
1743
+ }
1744
+ };
1745
+ }
1746
+ /**
1747
+ * @param {HydratableContext} ctx
1748
+ */
1749
+ async #hydratable_block(ctx) {
1750
+ if (ctx.lookup.size === 0) {
1751
+ return null;
1752
+ }
1753
+ let entries = [];
1754
+ let has_promises = false;
1755
+ for (const [k, v] of ctx.lookup) {
1756
+ if (v.promises) {
1757
+ has_promises = true;
1758
+ for (const p of v.promises) await p;
1759
+ }
1760
+ entries.push(`[${uneval(k)},${v.serialized}]`);
1761
+ }
1762
+ let prelude = `const h = (window.__svelte ??= {}).h ??= new Map();`;
1763
+ if (has_promises) {
1764
+ prelude = `const r = (v) => Promise.resolve(v);
1765
+ ${prelude}`;
1766
+ }
1767
+ const body = `
1768
+ {
1769
+ ${prelude}
1770
+
1771
+ for (const [k, v] of [
1772
+ ${entries.join(",\n ")}
1773
+ ]) {
1774
+ h.set(k, v);
1775
+ }
1776
+ }
1777
+ `;
1778
+ let csp_attr = "";
1779
+ if (this.global.csp.nonce) {
1780
+ csp_attr = ` nonce="${this.global.csp.nonce}"`;
1781
+ } else if (this.global.csp.hash) {
1782
+ const hash = await sha256(body);
1783
+ this.global.csp.script_hashes.push(`sha256-${hash}`);
1784
+ }
1785
+ return `
1786
+ <script${csp_attr}>${body}<\/script>`;
1787
+ }
1788
+ }
1789
+ class SSRState {
1790
+ /** @readonly @type {Csp & { script_hashes: Sha256Source[] }} */
1791
+ csp;
1792
+ /** @readonly @type {'sync' | 'async'} */
1793
+ mode;
1794
+ /** @readonly @type {() => string} */
1795
+ uid;
1796
+ /** @readonly @type {Set<{ hash: string; code: string }>} */
1797
+ css = /* @__PURE__ */ new Set();
1798
+ /**
1799
+ * `transformError` passed to `render`. Called when an error boundary catches an error.
1800
+ * Throws by default if unset in `render`.
1801
+ * @type {(error: unknown) => unknown}
1802
+ */
1803
+ transformError;
1804
+ /** @type {{ path: number[], value: string }} */
1805
+ #title = { path: [], value: "" };
1806
+ /**
1807
+ * @param {'sync' | 'async'} mode
1808
+ * @param {string} id_prefix
1809
+ * @param {Csp} csp
1810
+ * @param {((error: unknown) => unknown) | undefined} [transformError]
1811
+ */
1812
+ constructor(mode, id_prefix = "", csp = { hash: false }, transformError) {
1813
+ this.mode = mode;
1814
+ this.csp = { ...csp, script_hashes: [] };
1815
+ this.transformError = transformError ?? ((error) => {
1816
+ throw error;
1817
+ });
1818
+ let uid = 1;
1819
+ this.uid = () => `${id_prefix}s${uid++}`;
1820
+ }
1821
+ get_title() {
1822
+ return this.#title.value;
1823
+ }
1824
+ /**
1825
+ * Performs a depth-first (lexicographic) comparison using the path. Rejects sets
1826
+ * from earlier than or equal to the current value.
1827
+ * @param {string} value
1828
+ * @param {number[]} path
1829
+ */
1830
+ set_title(value, path) {
1831
+ const current = this.#title.path;
1832
+ let i = 0;
1833
+ let l = Math.min(path.length, current.length);
1834
+ while (i < l && path[i] === current[i]) i += 1;
1835
+ if (path[i] === void 0) return;
1836
+ if (current[i] === void 0 || path[i] > current[i]) {
1837
+ this.#title.path = path;
1838
+ this.#title.value = value;
1839
+ }
1840
+ }
1841
+ }
1842
+
1843
+ export { CLASS_CACHE as $, noop as A, bind_props as B, render as C, DevalueError as D, define_property as E, CONNECTED as F, ERROR_VALUE as G, HOLE as H, COMMENT_NODE as I, HYDRATION_START as J, HYDRATION_ERROR as K, LEGACY_PROPS as L, MAX_ARRAY_INDEX as M, NAN as N, STATE_SYMBOL as O, POSITIVE_INFINITY as P, object_prototype as Q, REACTION_RAN as R, SPARSE as S, array_prototype as T, UNDEFINED as U, UNINITIALIZED as V, get_descriptor as W, DERIVED as X, DIRTY as Y, MAYBE_DIRTY as Z, is_extensible as _, attr as a, ATTRIBUTES_CACHE as a0, STYLE_CACHE as a1, TEXT_CACHE as a2, get_prototype_of as a3, is_array as a4, CLEAN as a5, INERT as a6, EFFECT as a7, RENDER_EFFECT as a8, MANAGED_EFFECT as a9, BLOCK_EFFECT as aa, ASYNC as ab, DESTROYED as ac, EAGER_EFFECT as ad, deferred as ae, ROOT_EFFECT as af, BRANCH_EFFECT as ag, WAS_MARKED as ah, REACTION_IS_UPDATING as ai, run_all as aj, includes as ak, EFFECT_PRESERVED as al, EFFECT_TRANSPARENT as am, HEAD_EFFECT as an, DESTROYING as ao, BOUNDARY_EFFECT as ap, index_of as aq, STALE_REACTION as ar, array_from as as, is_passive_event as at, setContext as au, HYDRATION_END as av, HYDRATION_START_ELSE as aw, HYDRATION_START_FAILED as ax, USER_EFFECT as ay, ensure_array_like as b, attr_class as c, attr_style as d, escape_html as e, derived as f, clsx as g, head as h, getContext as i, await_block as j, NEGATIVE_INFINITY as k, NEGATIVE_ZERO as l, is_valid_array_len as m, is_valid_array_index as n, is_primitive as o, get_type as p, is_plain_object as q, enumerable_symbols as r, stringify as s, stringify_key as t, stringify_string as u, valid_array_indices as v, experimental_async_required as w, get_render_context as x, uneval as y, hydratable_serialization_failed as z };
1844
+ //# sourceMappingURL=renderer-wJWkLEmh.js.map