@axerity/cli 0.3.4 → 0.3.6

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 (272) hide show
  1. package/dist/client/_app/immutable/assets/0.D_9a5iYh.css +1 -0
  2. package/dist/client/_app/immutable/chunks/4WKVz0dQ2.js +8 -0
  3. package/dist/client/_app/immutable/chunks/{BxHXOXhk.js → 5Snhw0Ea.js} +1 -1
  4. package/dist/client/_app/immutable/chunks/{CU8220Uu.js → 7mNMRbyk.js} +7 -7
  5. package/dist/client/_app/immutable/chunks/8HqVteX22.js +132 -0
  6. package/dist/client/_app/immutable/chunks/B1bQHaXp2.js +1 -0
  7. package/dist/client/_app/immutable/chunks/B1vLyBkH.js +1 -0
  8. package/dist/client/_app/immutable/chunks/B38mTxN_2.js +1 -0
  9. package/dist/client/_app/immutable/chunks/B6Q2kmfG.js +1 -0
  10. package/dist/client/_app/immutable/chunks/B8df50Oe.js +1 -0
  11. package/dist/client/_app/immutable/chunks/B8pCsplA.js +4 -0
  12. package/dist/client/_app/immutable/chunks/BBJaonHc.js +7 -0
  13. package/dist/client/_app/immutable/chunks/BC0Z6JSt.js +127 -0
  14. package/dist/client/_app/immutable/chunks/BIZlbVKk.js +1 -0
  15. package/dist/client/_app/immutable/chunks/BLTdZGww.js +10 -0
  16. package/dist/client/_app/immutable/chunks/BO5quTzD2.js +1 -0
  17. package/dist/client/_app/immutable/chunks/BVDV3lUS.js +1 -0
  18. package/dist/client/_app/immutable/chunks/{D1JHp0AN.js → BYhISeFr2.js} +3 -3
  19. package/dist/client/_app/immutable/chunks/B_cUqGeH.js +2 -0
  20. package/dist/client/_app/immutable/chunks/Bb7SY-Hh.js +2 -0
  21. package/dist/client/_app/immutable/chunks/{BmELG9zI.js → BbOlTtur.js} +1 -1
  22. package/dist/client/_app/immutable/chunks/Bf-rMgGa.js +1 -0
  23. package/dist/client/_app/immutable/chunks/{CrHSbMyX.js → Bg_yhsUP.js} +1 -1
  24. package/dist/client/_app/immutable/chunks/Bjy-W4x2.js +81 -0
  25. package/dist/client/_app/immutable/chunks/Bq8Occ6m.js +1 -0
  26. package/dist/client/_app/immutable/chunks/Bs-bH16d2.js +36 -0
  27. package/dist/client/_app/immutable/chunks/BtTEEMTW.js +1 -0
  28. package/dist/client/_app/immutable/chunks/{BR2ZZ_D-.js → Bu2P_wCT.js} +9 -9
  29. package/dist/client/_app/immutable/chunks/C1MWiow4.js +1 -0
  30. package/dist/client/_app/immutable/chunks/{fbLwfhmm.js → C2-00Pdo.js} +8 -8
  31. package/dist/client/_app/immutable/chunks/C2FXoa5Z.js +1 -0
  32. package/dist/client/_app/immutable/chunks/CCHqIdNO.js +3 -0
  33. package/dist/client/_app/immutable/chunks/CDyVd27m2.js +1 -0
  34. package/dist/client/_app/immutable/chunks/{CrFMGgWF.js → CF0onlHk2.js} +1 -1
  35. package/dist/client/_app/immutable/chunks/CFMX0wTB2.js +2 -0
  36. package/dist/client/_app/immutable/chunks/CGzhSlOG2.js +88 -0
  37. package/dist/client/_app/immutable/chunks/{D1OSA14p2.js → CHdTS7qa2.js} +1 -1
  38. package/dist/client/_app/immutable/chunks/{CKUCToaK2.js → CHnO8ozm.js} +6 -6
  39. package/dist/client/_app/immutable/chunks/CIA0ThW0.js +1 -0
  40. package/dist/client/_app/immutable/chunks/CIFyFl372.js +2 -0
  41. package/dist/client/_app/immutable/chunks/CK1Au-AH.js +1 -0
  42. package/dist/client/_app/immutable/chunks/CORzmJfE2.js +1 -0
  43. package/dist/client/_app/immutable/chunks/{CrvMImwA.js → CP8i6059.js} +2 -2
  44. package/dist/client/_app/immutable/chunks/CR4TeO0O.js +156 -0
  45. package/dist/client/_app/immutable/chunks/CTgm3pse.js +1 -0
  46. package/dist/client/_app/immutable/chunks/CWKhPslf.js +1 -0
  47. package/dist/client/_app/immutable/chunks/{DWEIbyGx2.js → CWiCMZki2.js} +1 -1
  48. package/dist/client/_app/immutable/chunks/CZBscxHQ2.js +1 -0
  49. package/dist/client/_app/immutable/chunks/{Vhh-h91d.js → CddkPoXu.js} +1 -1
  50. package/dist/client/_app/immutable/chunks/CfzXM2Sw.js +24 -0
  51. package/dist/client/_app/immutable/chunks/{DVnPUkm_2.js → CgljPyk-.js} +1 -1
  52. package/dist/client/_app/immutable/chunks/Chofv7Zs2.js +11 -0
  53. package/dist/client/_app/immutable/chunks/CkDjHmRi.js +1 -0
  54. package/dist/client/_app/immutable/chunks/CqddNm0P.js +24 -0
  55. package/dist/client/_app/immutable/chunks/CtlrWY5d.js +1 -0
  56. package/dist/client/_app/immutable/chunks/CuRJVwEq.js +1 -0
  57. package/dist/client/_app/immutable/chunks/Cwm_NK7g2.js +1 -0
  58. package/dist/client/_app/immutable/chunks/{KMes_wgj.js → CxArn52D.js} +6 -6
  59. package/dist/client/_app/immutable/chunks/D0XLW3Y72.js +1 -0
  60. package/dist/client/_app/immutable/chunks/D3baVd8h.js +39 -0
  61. package/dist/client/_app/immutable/chunks/{DyvOZK_m.js → D53c3C1L.js} +1 -1
  62. package/dist/client/_app/immutable/chunks/D9D9EADq2.js +1 -0
  63. package/dist/client/_app/immutable/chunks/DAEwZWEo.js +1 -0
  64. package/dist/client/_app/immutable/chunks/DEkYOWll.js +1 -0
  65. package/dist/client/_app/immutable/chunks/DJR_kvNW.js +1 -0
  66. package/dist/client/_app/immutable/chunks/DJmG1hmx.js +1 -0
  67. package/dist/client/_app/immutable/chunks/DLuFpqVZ.js +1 -0
  68. package/dist/client/_app/immutable/chunks/DMWLK-DU2.js +231 -0
  69. package/dist/client/_app/immutable/chunks/DNzq6p3w.js +161 -0
  70. package/dist/client/_app/immutable/chunks/DSoM-AhV.js +292 -0
  71. package/dist/client/_app/immutable/chunks/{B2siGgVq.js → DUiFqfXY.js} +24 -24
  72. package/dist/client/_app/immutable/chunks/DVuOupEf.js +1 -0
  73. package/dist/client/_app/immutable/chunks/DY1BZ4Qc2.js +1 -0
  74. package/dist/client/_app/immutable/chunks/DYYXZ3DX.js +1 -0
  75. package/dist/client/_app/immutable/chunks/DbGyXH9B.js +1 -0
  76. package/dist/client/_app/immutable/chunks/DbfGBa34.js +1 -0
  77. package/dist/client/_app/immutable/chunks/{h6BdjjI92.js → Djp6vQyU2.js} +2 -2
  78. package/dist/client/_app/immutable/chunks/DlkSjMNB.js +3 -0
  79. package/dist/client/_app/immutable/chunks/{CqOdyAh12.js → Dq77RFat2.js} +19 -19
  80. package/dist/client/_app/immutable/chunks/DsF7k-Jl.js +1 -0
  81. package/dist/client/_app/immutable/chunks/{Cnog5E312.js → GV4wa_W82.js} +6 -6
  82. package/dist/client/_app/immutable/chunks/H8ZPB3lI.js +1 -0
  83. package/dist/client/_app/immutable/chunks/{D8Ssgrsp2.js → KythIMN82.js} +1 -1
  84. package/dist/client/_app/immutable/chunks/LevMccfs.js +62 -0
  85. package/dist/client/_app/immutable/chunks/{lVEu-GjD.js → MzKa3KJg.js} +1 -1
  86. package/dist/client/_app/immutable/chunks/{CO67I5FU.js → NwNz5UVg2.js} +7 -7
  87. package/dist/client/_app/immutable/chunks/WMQzk859.js +30 -0
  88. package/dist/client/_app/immutable/chunks/WqY32s1D.js +1 -0
  89. package/dist/client/_app/immutable/chunks/Xcyiycol2.js +34 -0
  90. package/dist/client/_app/immutable/chunks/hAYnLAr22.js +1 -0
  91. package/dist/client/_app/immutable/chunks/iW3ggMaf.js +1 -0
  92. package/dist/client/_app/immutable/chunks/mm27JPdG.js +85 -0
  93. package/dist/client/_app/immutable/chunks/mo9pLZen2.js +1 -0
  94. package/dist/client/_app/immutable/chunks/oWq97GrB.js +106 -0
  95. package/dist/client/_app/immutable/chunks/p8FwW_Sl.js +2 -0
  96. package/dist/client/_app/immutable/chunks/pHJTmPlB.js +41 -0
  97. package/dist/client/_app/immutable/chunks/qYxEWMoP2.js +1 -0
  98. package/dist/client/_app/immutable/chunks/snDW7wxp2.js +7 -0
  99. package/dist/client/_app/immutable/chunks/tvl5MGrS.js +62 -0
  100. package/dist/client/_app/immutable/entry/{app.BkF-rBjA.js → app.CWJWi65e.js} +2 -2
  101. package/dist/client/_app/immutable/entry/start.BnjVfvzh.js +1 -0
  102. package/dist/client/_app/immutable/nodes/0.KjaOE5W4.js +1 -0
  103. package/dist/client/_app/immutable/nodes/{1.D03cx22k.js → 1.BQfw1BrI.js} +1 -1
  104. package/dist/client/_app/immutable/nodes/2.Bm2kCMEX.js +21 -0
  105. package/dist/client/_app/version.json +1 -1
  106. package/dist/env.js +9 -33
  107. package/dist/env.js.map +1 -0
  108. package/dist/handler.js +23 -1493
  109. package/dist/handler.js.map +1 -0
  110. package/dist/index.js +33 -231
  111. package/dist/index.js.map +1 -0
  112. package/dist/server/chunks/{Icon-B39GsOhr.js → chunks/Icon.js-BuPXv_NW.js} +16 -14
  113. package/dist/server/chunks/chunks/Icon.js-BuPXv_NW.js.map +1 -0
  114. package/dist/server/chunks/{content-store-CkGb0SWT.js → chunks/content-store.js-BvDwR1n-.js} +7 -5
  115. package/dist/server/chunks/chunks/content-store.js-BvDwR1n-.js.map +1 -0
  116. package/dist/server/chunks/chunks/content.js-Ck7_Is4v.js +13 -0
  117. package/dist/server/chunks/chunks/content.js-Ck7_Is4v.js.map +1 -0
  118. package/dist/server/chunks/chunks/env.js-l0sNRNKZ.js +2 -0
  119. package/dist/server/chunks/chunks/env.js-l0sNRNKZ.js.map +1 -0
  120. package/dist/server/chunks/chunks/exports.js-DKNfc8Xi.js +152 -0
  121. package/dist/server/chunks/chunks/exports.js-DKNfc8Xi.js.map +1 -0
  122. package/dist/server/chunks/{internal2-Cc9tn9q-.js → chunks/internal.js-CS2S4fsh.js} +2931 -3573
  123. package/dist/server/chunks/chunks/internal.js-CS2S4fsh.js.map +1 -0
  124. package/dist/server/chunks/chunks/internal2.js-DnoW9Dd1.js +475 -0
  125. package/dist/server/chunks/chunks/internal2.js-DnoW9Dd1.js.map +1 -0
  126. package/dist/server/chunks/chunks/paths.js-BmhPy-Zq.js +4 -0
  127. package/dist/server/chunks/chunks/paths.js-BmhPy-Zq.js.map +1 -0
  128. package/dist/server/chunks/chunks/routing.js-CBkoLhW9.js +215 -0
  129. package/dist/server/chunks/chunks/routing.js-CBkoLhW9.js.map +1 -0
  130. package/dist/server/chunks/{exports-BYLl3AJT.js → chunks/shared.js-DL3We7L2.js} +13 -195
  131. package/dist/server/chunks/chunks/shared.js-DL3We7L2.js.map +1 -0
  132. package/dist/server/chunks/{site-BzEriToh.js → chunks/site.js-B9j7u8c5.js} +4 -2
  133. package/dist/server/chunks/chunks/site.js-B9j7u8c5.js.map +1 -0
  134. package/dist/server/chunks/chunks/utils.js-BqOwS4Ug.js +740 -0
  135. package/dist/server/chunks/chunks/utils.js-BqOwS4Ug.js.map +1 -0
  136. package/dist/server/chunks/{_server.ts-Ct0Ll5bb.js → entries/endpoints/_...path_mdfile_/_server.ts.js-Om7bYZKj.js} +5 -3
  137. package/dist/server/chunks/entries/endpoints/_...path_mdfile_/_server.ts.js-Om7bYZKj.js.map +1 -0
  138. package/dist/server/chunks/{_server.ts-CJRyggfF.js → entries/endpoints/__manifest/_server.ts.js-DDaYEkp-.js} +6 -4
  139. package/dist/server/chunks/entries/endpoints/__manifest/_server.ts.js-DDaYEkp-.js.map +1 -0
  140. package/dist/server/chunks/{_server.ts--AQtsWl0.js → entries/endpoints/llms-full.txt/_server.ts.js-DMfWG5dX.js} +6 -4
  141. package/dist/server/chunks/entries/endpoints/llms-full.txt/_server.ts.js-DMfWG5dX.js.map +1 -0
  142. package/dist/server/chunks/{_server.ts-BWRlkeWL.js → entries/endpoints/llms.txt/_server.ts.js-DriAXFu-.js} +6 -4
  143. package/dist/server/chunks/entries/endpoints/llms.txt/_server.ts.js-DriAXFu-.js.map +1 -0
  144. package/dist/server/chunks/{_server.ts-vfrX_ASl.js → entries/endpoints/og/_...slug_/_server.ts.js-DD3q5If5.js} +6 -4
  145. package/dist/server/chunks/entries/endpoints/og/_...slug_/_server.ts.js-DD3q5If5.js.map +1 -0
  146. package/dist/server/chunks/{_server.ts-D6CFL-gk.js → entries/endpoints/rss.xml/_server.ts.js-DaeHUkNT.js} +6 -4
  147. package/dist/server/chunks/entries/endpoints/rss.xml/_server.ts.js-DaeHUkNT.js.map +1 -0
  148. package/dist/server/chunks/{_server.ts-DrcvZqTi.js → entries/endpoints/search.json/_server.ts.js-BTKtjtuB.js} +5 -3
  149. package/dist/server/chunks/entries/endpoints/search.json/_server.ts.js-BTKtjtuB.js.map +1 -0
  150. package/dist/server/chunks/{_server.ts-C1Vx_DWq.js → entries/endpoints/sitemap.xml/_server.ts.js-AjE0bYBX.js} +6 -4
  151. package/dist/server/chunks/entries/endpoints/sitemap.xml/_server.ts.js-AjE0bYBX.js.map +1 -0
  152. package/dist/server/chunks/{hooks.server-CB5GWVYz.js → entries/hooks.server.js-DgpmswzZ.js} +5 -3
  153. package/dist/server/chunks/entries/hooks.server.js-DgpmswzZ.js.map +1 -0
  154. package/dist/server/chunks/{docpage-BkHysAhp.js → entries/matchers/docpage.js-BkHysAhp.js} +1 -1
  155. package/dist/server/chunks/entries/matchers/docpage.js-BkHysAhp.js.map +1 -0
  156. package/dist/server/chunks/{mdfile-DBiwGtNY.js → entries/matchers/mdfile.js-DBiwGtNY.js} +1 -1
  157. package/dist/server/chunks/entries/matchers/mdfile.js-DBiwGtNY.js.map +1 -0
  158. package/dist/server/chunks/entries/pages/_...slug_docpage_/_page.server.ts.js-BLrxDWKB.js +31 -0
  159. package/dist/server/chunks/entries/pages/_...slug_docpage_/_page.server.ts.js-BLrxDWKB.js.map +1 -0
  160. package/dist/server/chunks/{_page.svelte-Cmr6xyfK.js → entries/pages/_...slug_docpage_/_page.svelte.js-DHsQdIPq.js} +38 -34
  161. package/dist/server/chunks/entries/pages/_...slug_docpage_/_page.svelte.js-DHsQdIPq.js.map +1 -0
  162. package/dist/server/chunks/{_error.svelte-BmM3eia-.js → entries/pages/_error.svelte.js-C5IizUHI.js} +9 -6
  163. package/dist/server/chunks/entries/pages/_error.svelte.js-C5IizUHI.js.map +1 -0
  164. package/dist/server/chunks/entries/pages/_layout.server.ts.js-BVpOfaEd.js +18 -0
  165. package/dist/server/chunks/entries/pages/_layout.server.ts.js-BVpOfaEd.js.map +1 -0
  166. package/dist/server/chunks/{_layout.svelte-DN7VDoNA.js → entries/pages/_layout.svelte.js-C9fzvWFB.js} +11 -3
  167. package/dist/server/chunks/entries/pages/_layout.svelte.js-C9fzvWFB.js.map +1 -0
  168. package/dist/server/chunks/handler-ColT39Lk.js +1206 -0
  169. package/dist/server/chunks/handler-ColT39Lk.js.map +1 -0
  170. package/dist/server/{index.js → chunks/index.js-0pMmjHBu.js} +444 -1155
  171. package/dist/server/chunks/index.js-0pMmjHBu.js.map +1 -0
  172. package/dist/server/{manifest.js → chunks/manifest.js-Du2tEIKJ.js} +16 -20
  173. package/dist/server/chunks/manifest.js-Du2tEIKJ.js.map +1 -0
  174. package/dist/server/chunks/nodes/0.js-479vKOsq.js +30 -0
  175. package/dist/server/chunks/nodes/0.js-479vKOsq.js.map +1 -0
  176. package/dist/server/chunks/nodes/1.js-BUjLAE1S.js +9 -0
  177. package/dist/server/chunks/nodes/1.js-BUjLAE1S.js.map +1 -0
  178. package/dist/server/chunks/nodes/2.js-kHx_y3-d.js +32 -0
  179. package/dist/server/chunks/nodes/2.js-kHx_y3-d.js.map +1 -0
  180. package/dist/shims.js +2 -30
  181. package/dist/shims.js.map +1 -0
  182. package/package.json +26 -26
  183. package/dist/client/_app/immutable/assets/0.CZH7ZxPr.css +0 -1
  184. package/dist/client/_app/immutable/chunks/4QUyWxRp.js +0 -1
  185. package/dist/client/_app/immutable/chunks/5brL7le7.js +0 -1
  186. package/dist/client/_app/immutable/chunks/AVywM_y2.js +0 -85
  187. package/dist/client/_app/immutable/chunks/B-2v_FHk2.js +0 -36
  188. package/dist/client/_app/immutable/chunks/B2NH8-JT.js +0 -2
  189. package/dist/client/_app/immutable/chunks/B6GEGn8a.js +0 -10
  190. package/dist/client/_app/immutable/chunks/BMrnNhEK.js +0 -1
  191. package/dist/client/_app/immutable/chunks/BPr4vZF2.js +0 -292
  192. package/dist/client/_app/immutable/chunks/B_aLYNof2.js +0 -62
  193. package/dist/client/_app/immutable/chunks/Bcl_F5Rk.js +0 -162
  194. package/dist/client/_app/immutable/chunks/Bhp_hF4I.js +0 -7
  195. package/dist/client/_app/immutable/chunks/BiwHu9iZ.js +0 -34
  196. package/dist/client/_app/immutable/chunks/BncN_SFM.js +0 -1
  197. package/dist/client/_app/immutable/chunks/BqfYRTli.js +0 -1
  198. package/dist/client/_app/immutable/chunks/Bxc19hA4.js +0 -231
  199. package/dist/client/_app/immutable/chunks/C-2ebXi62.js +0 -1
  200. package/dist/client/_app/immutable/chunks/C5YJ1yll.js +0 -1
  201. package/dist/client/_app/immutable/chunks/C9ACkxc9.js +0 -1
  202. package/dist/client/_app/immutable/chunks/C9oUh5bS.js +0 -1
  203. package/dist/client/_app/immutable/chunks/CA-FvMpm2.js +0 -1
  204. package/dist/client/_app/immutable/chunks/CB683wti.js +0 -24
  205. package/dist/client/_app/immutable/chunks/CBw-Ef8i.js +0 -1
  206. package/dist/client/_app/immutable/chunks/CDzGDeIO.js +0 -2
  207. package/dist/client/_app/immutable/chunks/CGhzzHe4.js +0 -1
  208. package/dist/client/_app/immutable/chunks/CJIjuuPI.js +0 -3
  209. package/dist/client/_app/immutable/chunks/CLAkFX7S2.js +0 -1
  210. package/dist/client/_app/immutable/chunks/CNNqHIOE.js +0 -1
  211. package/dist/client/_app/immutable/chunks/COtBc-WT.js +0 -1
  212. package/dist/client/_app/immutable/chunks/CRPRTyhe2.js +0 -43
  213. package/dist/client/_app/immutable/chunks/CVwLGEVp.js +0 -9
  214. package/dist/client/_app/immutable/chunks/CYVFLYUH2.js +0 -132
  215. package/dist/client/_app/immutable/chunks/CmhcKymT2.js +0 -4
  216. package/dist/client/_app/immutable/chunks/CnsHLsSU2.js +0 -1
  217. package/dist/client/_app/immutable/chunks/D-mF3Ymq2.js +0 -1
  218. package/dist/client/_app/immutable/chunks/DFZLNBg4.js +0 -3
  219. package/dist/client/_app/immutable/chunks/DI0aitcY.js +0 -1
  220. package/dist/client/_app/immutable/chunks/DL8TMeQv.js +0 -4
  221. package/dist/client/_app/immutable/chunks/DWR0mSia.js +0 -24
  222. package/dist/client/_app/immutable/chunks/D_bFluSV2.js +0 -1
  223. package/dist/client/_app/immutable/chunks/DlpIbxXb.js +0 -159
  224. package/dist/client/_app/immutable/chunks/Drqwbptl2.js +0 -1
  225. package/dist/client/_app/immutable/chunks/DshlDaTJ.js +0 -1
  226. package/dist/client/_app/immutable/chunks/DtVGcudl.js +0 -3
  227. package/dist/client/_app/immutable/chunks/JN-hBVZx.js +0 -1
  228. package/dist/client/_app/immutable/chunks/KQRMt0jm2.js +0 -1
  229. package/dist/client/_app/immutable/chunks/KSCXtHEz.js +0 -30
  230. package/dist/client/_app/immutable/chunks/MNRJQPsd.js +0 -124
  231. package/dist/client/_app/immutable/chunks/S_AIhi7v2.js +0 -2
  232. package/dist/client/_app/immutable/chunks/hFfQmBrk2.js +0 -1
  233. package/dist/client/_app/immutable/chunks/pO9ctS3B.js +0 -1
  234. package/dist/client/_app/immutable/chunks/qKp3hrn2.js +0 -1
  235. package/dist/client/_app/immutable/chunks/uObJDEK6.js +0 -106
  236. package/dist/client/_app/immutable/chunks/vNSaohXd.js +0 -1
  237. package/dist/client/_app/immutable/chunks/wdqFE1Ck.js +0 -1
  238. package/dist/client/_app/immutable/chunks/zl68KYpW2.js +0 -10
  239. package/dist/client/_app/immutable/entry/start.2NHd-KNf.js +0 -1
  240. package/dist/client/_app/immutable/nodes/0.Dh5-dzOP.js +0 -1
  241. package/dist/client/_app/immutable/nodes/2.T06EL3l4.js +0 -21
  242. package/dist/server/chunks/0-DX38cI4t.js +0 -40
  243. package/dist/server/chunks/0-DX38cI4t.js.map +0 -1
  244. package/dist/server/chunks/1-DtLZVIEo.js +0 -9
  245. package/dist/server/chunks/1-DtLZVIEo.js.map +0 -1
  246. package/dist/server/chunks/2-D9UarvNQ.js +0 -54
  247. package/dist/server/chunks/2-D9UarvNQ.js.map +0 -1
  248. package/dist/server/chunks/Icon-B39GsOhr.js.map +0 -1
  249. package/dist/server/chunks/_error.svelte-BmM3eia-.js.map +0 -1
  250. package/dist/server/chunks/_layout.svelte-DN7VDoNA.js.map +0 -1
  251. package/dist/server/chunks/_page.svelte-Cmr6xyfK.js.map +0 -1
  252. package/dist/server/chunks/_server.ts--AQtsWl0.js.map +0 -1
  253. package/dist/server/chunks/_server.ts-BWRlkeWL.js.map +0 -1
  254. package/dist/server/chunks/_server.ts-C1Vx_DWq.js.map +0 -1
  255. package/dist/server/chunks/_server.ts-CJRyggfF.js.map +0 -1
  256. package/dist/server/chunks/_server.ts-Ct0Ll5bb.js.map +0 -1
  257. package/dist/server/chunks/_server.ts-D6CFL-gk.js.map +0 -1
  258. package/dist/server/chunks/_server.ts-DrcvZqTi.js.map +0 -1
  259. package/dist/server/chunks/_server.ts-vfrX_ASl.js.map +0 -1
  260. package/dist/server/chunks/content-store-CkGb0SWT.js.map +0 -1
  261. package/dist/server/chunks/docpage-BkHysAhp.js.map +0 -1
  262. package/dist/server/chunks/exports-BYLl3AJT.js.map +0 -1
  263. package/dist/server/chunks/hooks.server-CB5GWVYz.js.map +0 -1
  264. package/dist/server/chunks/internal2-Cc9tn9q-.js.map +0 -1
  265. package/dist/server/chunks/mdfile-DBiwGtNY.js.map +0 -1
  266. package/dist/server/chunks/site-BzEriToh.js.map +0 -1
  267. package/dist/server/index.js.map +0 -1
  268. package/dist/server/manifest.js.map +0 -1
  269. /package/dist/client/_app/immutable/chunks/{BifhSqXX.js → BifhSqXX2.js} +0 -0
  270. /package/dist/client/_app/immutable/chunks/{C8Fc0cco.js → C8Fc0cco2.js} +0 -0
  271. /package/dist/client/_app/immutable/chunks/{CSKSodPl2.js → CSKSodPl.js} +0 -0
  272. /package/dist/client/_app/immutable/chunks/{D6jRqBbL.js → D6jRqBbL2.js} +0 -0
@@ -0,0 +1,1206 @@
1
+ import '../../shims.js';
2
+ import * as fs from 'node:fs';
3
+ import fs__default, { readdirSync, statSync } from 'node:fs';
4
+ import path, { resolve, sep, join, normalize } from 'node:path';
5
+ import process from 'node:process';
6
+ import http from 'node:http';
7
+ import { setImmediate } from 'node:timers';
8
+ import * as qs from 'node:querystring';
9
+ import { createReadableStream, getRequest, setResponse } from '@sveltejs/kit/node';
10
+ import { S as Server } from './index.js-0pMmjHBu.js';
11
+ import { m as manifest } from './manifest.js-Du2tEIKJ.js';
12
+ import { env, dir, env_prefix } from '../../env.js';
13
+ import { format } from 'node:url';
14
+
15
+ function totalist(dir, callback, pre='') {
16
+ dir = resolve('.', dir);
17
+ let arr = readdirSync(dir);
18
+ let i=0, abs, stats;
19
+ for (; i < arr.length; i++) {
20
+ abs = join(dir, arr[i]);
21
+ stats = statSync(abs);
22
+ stats.isDirectory()
23
+ ? totalist(abs, callback, join(pre, arr[i]))
24
+ : callback(join(pre, arr[i]), abs, stats);
25
+ }
26
+ }
27
+
28
+ /**
29
+ * @typedef ParsedURL
30
+ * @type {import('.').ParsedURL}
31
+ */
32
+
33
+ /**
34
+ * @typedef Request
35
+ * @property {string} url
36
+ * @property {ParsedURL} _parsedUrl
37
+ */
38
+
39
+ /**
40
+ * @param {Request} req
41
+ * @returns {ParsedURL|void}
42
+ */
43
+ function parse$1(req) {
44
+ let raw = req.url;
45
+ if (raw == null) return;
46
+
47
+ let prev = req._parsedUrl;
48
+ if (prev && prev.raw === raw) return prev;
49
+
50
+ let pathname=raw, search='', query;
51
+
52
+ if (raw.length > 1) {
53
+ let idx = raw.indexOf('?', 1);
54
+
55
+ if (idx !== -1) {
56
+ search = raw.substring(idx);
57
+ pathname = raw.substring(0, idx);
58
+ if (search.length > 1) {
59
+ query = qs.parse(search.substring(1));
60
+ }
61
+ }
62
+ }
63
+
64
+ return req._parsedUrl = { pathname, search, query, raw };
65
+ }
66
+
67
+ const mimes = {
68
+ "3g2": "video/3gpp2",
69
+ "3gp": "video/3gpp",
70
+ "3gpp": "video/3gpp",
71
+ "3mf": "model/3mf",
72
+ "aac": "audio/aac",
73
+ "ac": "application/pkix-attr-cert",
74
+ "adp": "audio/adpcm",
75
+ "adts": "audio/aac",
76
+ "ai": "application/postscript",
77
+ "aml": "application/automationml-aml+xml",
78
+ "amlx": "application/automationml-amlx+zip",
79
+ "amr": "audio/amr",
80
+ "apng": "image/apng",
81
+ "appcache": "text/cache-manifest",
82
+ "appinstaller": "application/appinstaller",
83
+ "appx": "application/appx",
84
+ "appxbundle": "application/appxbundle",
85
+ "asc": "application/pgp-keys",
86
+ "atom": "application/atom+xml",
87
+ "atomcat": "application/atomcat+xml",
88
+ "atomdeleted": "application/atomdeleted+xml",
89
+ "atomsvc": "application/atomsvc+xml",
90
+ "au": "audio/basic",
91
+ "avci": "image/avci",
92
+ "avcs": "image/avcs",
93
+ "avif": "image/avif",
94
+ "aw": "application/applixware",
95
+ "bdoc": "application/bdoc",
96
+ "bin": "application/octet-stream",
97
+ "bmp": "image/bmp",
98
+ "bpk": "application/octet-stream",
99
+ "btf": "image/prs.btif",
100
+ "btif": "image/prs.btif",
101
+ "buffer": "application/octet-stream",
102
+ "ccxml": "application/ccxml+xml",
103
+ "cdfx": "application/cdfx+xml",
104
+ "cdmia": "application/cdmi-capability",
105
+ "cdmic": "application/cdmi-container",
106
+ "cdmid": "application/cdmi-domain",
107
+ "cdmio": "application/cdmi-object",
108
+ "cdmiq": "application/cdmi-queue",
109
+ "cer": "application/pkix-cert",
110
+ "cgm": "image/cgm",
111
+ "cjs": "application/node",
112
+ "class": "application/java-vm",
113
+ "coffee": "text/coffeescript",
114
+ "conf": "text/plain",
115
+ "cpl": "application/cpl+xml",
116
+ "cpt": "application/mac-compactpro",
117
+ "crl": "application/pkix-crl",
118
+ "css": "text/css",
119
+ "csv": "text/csv",
120
+ "cu": "application/cu-seeme",
121
+ "cwl": "application/cwl",
122
+ "cww": "application/prs.cww",
123
+ "davmount": "application/davmount+xml",
124
+ "dbk": "application/docbook+xml",
125
+ "deb": "application/octet-stream",
126
+ "def": "text/plain",
127
+ "deploy": "application/octet-stream",
128
+ "dib": "image/bmp",
129
+ "disposition-notification": "message/disposition-notification",
130
+ "dist": "application/octet-stream",
131
+ "distz": "application/octet-stream",
132
+ "dll": "application/octet-stream",
133
+ "dmg": "application/octet-stream",
134
+ "dms": "application/octet-stream",
135
+ "doc": "application/msword",
136
+ "dot": "application/msword",
137
+ "dpx": "image/dpx",
138
+ "drle": "image/dicom-rle",
139
+ "dsc": "text/prs.lines.tag",
140
+ "dssc": "application/dssc+der",
141
+ "dtd": "application/xml-dtd",
142
+ "dump": "application/octet-stream",
143
+ "dwd": "application/atsc-dwd+xml",
144
+ "ear": "application/java-archive",
145
+ "ecma": "application/ecmascript",
146
+ "elc": "application/octet-stream",
147
+ "emf": "image/emf",
148
+ "eml": "message/rfc822",
149
+ "emma": "application/emma+xml",
150
+ "emotionml": "application/emotionml+xml",
151
+ "eps": "application/postscript",
152
+ "epub": "application/epub+zip",
153
+ "exe": "application/octet-stream",
154
+ "exi": "application/exi",
155
+ "exp": "application/express",
156
+ "exr": "image/aces",
157
+ "ez": "application/andrew-inset",
158
+ "fdf": "application/fdf",
159
+ "fdt": "application/fdt+xml",
160
+ "fits": "image/fits",
161
+ "g3": "image/g3fax",
162
+ "gbr": "application/rpki-ghostbusters",
163
+ "geojson": "application/geo+json",
164
+ "gif": "image/gif",
165
+ "glb": "model/gltf-binary",
166
+ "gltf": "model/gltf+json",
167
+ "gml": "application/gml+xml",
168
+ "gpx": "application/gpx+xml",
169
+ "gram": "application/srgs",
170
+ "grxml": "application/srgs+xml",
171
+ "gxf": "application/gxf",
172
+ "gz": "application/gzip",
173
+ "h261": "video/h261",
174
+ "h263": "video/h263",
175
+ "h264": "video/h264",
176
+ "heic": "image/heic",
177
+ "heics": "image/heic-sequence",
178
+ "heif": "image/heif",
179
+ "heifs": "image/heif-sequence",
180
+ "hej2": "image/hej2k",
181
+ "held": "application/atsc-held+xml",
182
+ "hjson": "application/hjson",
183
+ "hlp": "application/winhlp",
184
+ "hqx": "application/mac-binhex40",
185
+ "hsj2": "image/hsj2",
186
+ "htm": "text/html",
187
+ "html": "text/html",
188
+ "ics": "text/calendar",
189
+ "ief": "image/ief",
190
+ "ifb": "text/calendar",
191
+ "iges": "model/iges",
192
+ "igs": "model/iges",
193
+ "img": "application/octet-stream",
194
+ "in": "text/plain",
195
+ "ini": "text/plain",
196
+ "ink": "application/inkml+xml",
197
+ "inkml": "application/inkml+xml",
198
+ "ipfix": "application/ipfix",
199
+ "iso": "application/octet-stream",
200
+ "its": "application/its+xml",
201
+ "jade": "text/jade",
202
+ "jar": "application/java-archive",
203
+ "jhc": "image/jphc",
204
+ "jls": "image/jls",
205
+ "jp2": "image/jp2",
206
+ "jpe": "image/jpeg",
207
+ "jpeg": "image/jpeg",
208
+ "jpf": "image/jpx",
209
+ "jpg": "image/jpeg",
210
+ "jpg2": "image/jp2",
211
+ "jpgm": "image/jpm",
212
+ "jpgv": "video/jpeg",
213
+ "jph": "image/jph",
214
+ "jpm": "image/jpm",
215
+ "jpx": "image/jpx",
216
+ "js": "text/javascript",
217
+ "json": "application/json",
218
+ "json5": "application/json5",
219
+ "jsonld": "application/ld+json",
220
+ "jsonml": "application/jsonml+json",
221
+ "jsx": "text/jsx",
222
+ "jt": "model/jt",
223
+ "jxr": "image/jxr",
224
+ "jxra": "image/jxra",
225
+ "jxrs": "image/jxrs",
226
+ "jxs": "image/jxs",
227
+ "jxsc": "image/jxsc",
228
+ "jxsi": "image/jxsi",
229
+ "jxss": "image/jxss",
230
+ "kar": "audio/midi",
231
+ "ktx": "image/ktx",
232
+ "ktx2": "image/ktx2",
233
+ "less": "text/less",
234
+ "lgr": "application/lgr+xml",
235
+ "list": "text/plain",
236
+ "litcoffee": "text/coffeescript",
237
+ "log": "text/plain",
238
+ "lostxml": "application/lost+xml",
239
+ "lrf": "application/octet-stream",
240
+ "m1v": "video/mpeg",
241
+ "m21": "application/mp21",
242
+ "m2a": "audio/mpeg",
243
+ "m2v": "video/mpeg",
244
+ "m3a": "audio/mpeg",
245
+ "m4a": "audio/mp4",
246
+ "m4p": "application/mp4",
247
+ "m4s": "video/iso.segment",
248
+ "ma": "application/mathematica",
249
+ "mads": "application/mads+xml",
250
+ "maei": "application/mmt-aei+xml",
251
+ "man": "text/troff",
252
+ "manifest": "text/cache-manifest",
253
+ "map": "application/json",
254
+ "mar": "application/octet-stream",
255
+ "markdown": "text/markdown",
256
+ "mathml": "application/mathml+xml",
257
+ "mb": "application/mathematica",
258
+ "mbox": "application/mbox",
259
+ "md": "text/markdown",
260
+ "mdx": "text/mdx",
261
+ "me": "text/troff",
262
+ "mesh": "model/mesh",
263
+ "meta4": "application/metalink4+xml",
264
+ "metalink": "application/metalink+xml",
265
+ "mets": "application/mets+xml",
266
+ "mft": "application/rpki-manifest",
267
+ "mid": "audio/midi",
268
+ "midi": "audio/midi",
269
+ "mime": "message/rfc822",
270
+ "mj2": "video/mj2",
271
+ "mjp2": "video/mj2",
272
+ "mjs": "text/javascript",
273
+ "mml": "text/mathml",
274
+ "mods": "application/mods+xml",
275
+ "mov": "video/quicktime",
276
+ "mp2": "audio/mpeg",
277
+ "mp21": "application/mp21",
278
+ "mp2a": "audio/mpeg",
279
+ "mp3": "audio/mpeg",
280
+ "mp4": "video/mp4",
281
+ "mp4a": "audio/mp4",
282
+ "mp4s": "application/mp4",
283
+ "mp4v": "video/mp4",
284
+ "mpd": "application/dash+xml",
285
+ "mpe": "video/mpeg",
286
+ "mpeg": "video/mpeg",
287
+ "mpf": "application/media-policy-dataset+xml",
288
+ "mpg": "video/mpeg",
289
+ "mpg4": "video/mp4",
290
+ "mpga": "audio/mpeg",
291
+ "mpp": "application/dash-patch+xml",
292
+ "mrc": "application/marc",
293
+ "mrcx": "application/marcxml+xml",
294
+ "ms": "text/troff",
295
+ "mscml": "application/mediaservercontrol+xml",
296
+ "msh": "model/mesh",
297
+ "msi": "application/octet-stream",
298
+ "msix": "application/msix",
299
+ "msixbundle": "application/msixbundle",
300
+ "msm": "application/octet-stream",
301
+ "msp": "application/octet-stream",
302
+ "mtl": "model/mtl",
303
+ "musd": "application/mmt-usd+xml",
304
+ "mxf": "application/mxf",
305
+ "mxmf": "audio/mobile-xmf",
306
+ "mxml": "application/xv+xml",
307
+ "n3": "text/n3",
308
+ "nb": "application/mathematica",
309
+ "nq": "application/n-quads",
310
+ "nt": "application/n-triples",
311
+ "obj": "model/obj",
312
+ "oda": "application/oda",
313
+ "oga": "audio/ogg",
314
+ "ogg": "audio/ogg",
315
+ "ogv": "video/ogg",
316
+ "ogx": "application/ogg",
317
+ "omdoc": "application/omdoc+xml",
318
+ "onepkg": "application/onenote",
319
+ "onetmp": "application/onenote",
320
+ "onetoc": "application/onenote",
321
+ "onetoc2": "application/onenote",
322
+ "opf": "application/oebps-package+xml",
323
+ "opus": "audio/ogg",
324
+ "otf": "font/otf",
325
+ "owl": "application/rdf+xml",
326
+ "oxps": "application/oxps",
327
+ "p10": "application/pkcs10",
328
+ "p7c": "application/pkcs7-mime",
329
+ "p7m": "application/pkcs7-mime",
330
+ "p7s": "application/pkcs7-signature",
331
+ "p8": "application/pkcs8",
332
+ "pdf": "application/pdf",
333
+ "pfr": "application/font-tdpfr",
334
+ "pgp": "application/pgp-encrypted",
335
+ "pkg": "application/octet-stream",
336
+ "pki": "application/pkixcmp",
337
+ "pkipath": "application/pkix-pkipath",
338
+ "pls": "application/pls+xml",
339
+ "png": "image/png",
340
+ "prc": "model/prc",
341
+ "prf": "application/pics-rules",
342
+ "provx": "application/provenance+xml",
343
+ "ps": "application/postscript",
344
+ "pskcxml": "application/pskc+xml",
345
+ "pti": "image/prs.pti",
346
+ "qt": "video/quicktime",
347
+ "raml": "application/raml+yaml",
348
+ "rapd": "application/route-apd+xml",
349
+ "rdf": "application/rdf+xml",
350
+ "relo": "application/p2p-overlay+xml",
351
+ "rif": "application/reginfo+xml",
352
+ "rl": "application/resource-lists+xml",
353
+ "rld": "application/resource-lists-diff+xml",
354
+ "rmi": "audio/midi",
355
+ "rnc": "application/relax-ng-compact-syntax",
356
+ "rng": "application/xml",
357
+ "roa": "application/rpki-roa",
358
+ "roff": "text/troff",
359
+ "rq": "application/sparql-query",
360
+ "rs": "application/rls-services+xml",
361
+ "rsat": "application/atsc-rsat+xml",
362
+ "rsd": "application/rsd+xml",
363
+ "rsheet": "application/urc-ressheet+xml",
364
+ "rss": "application/rss+xml",
365
+ "rtf": "text/rtf",
366
+ "rtx": "text/richtext",
367
+ "rusd": "application/route-usd+xml",
368
+ "s3m": "audio/s3m",
369
+ "sbml": "application/sbml+xml",
370
+ "scq": "application/scvp-cv-request",
371
+ "scs": "application/scvp-cv-response",
372
+ "sdp": "application/sdp",
373
+ "senmlx": "application/senml+xml",
374
+ "sensmlx": "application/sensml+xml",
375
+ "ser": "application/java-serialized-object",
376
+ "setpay": "application/set-payment-initiation",
377
+ "setreg": "application/set-registration-initiation",
378
+ "sgi": "image/sgi",
379
+ "sgm": "text/sgml",
380
+ "sgml": "text/sgml",
381
+ "shex": "text/shex",
382
+ "shf": "application/shf+xml",
383
+ "shtml": "text/html",
384
+ "sieve": "application/sieve",
385
+ "sig": "application/pgp-signature",
386
+ "sil": "audio/silk",
387
+ "silo": "model/mesh",
388
+ "siv": "application/sieve",
389
+ "slim": "text/slim",
390
+ "slm": "text/slim",
391
+ "sls": "application/route-s-tsid+xml",
392
+ "smi": "application/smil+xml",
393
+ "smil": "application/smil+xml",
394
+ "snd": "audio/basic",
395
+ "so": "application/octet-stream",
396
+ "spdx": "text/spdx",
397
+ "spp": "application/scvp-vp-response",
398
+ "spq": "application/scvp-vp-request",
399
+ "spx": "audio/ogg",
400
+ "sql": "application/sql",
401
+ "sru": "application/sru+xml",
402
+ "srx": "application/sparql-results+xml",
403
+ "ssdl": "application/ssdl+xml",
404
+ "ssml": "application/ssml+xml",
405
+ "stk": "application/hyperstudio",
406
+ "stl": "model/stl",
407
+ "stpx": "model/step+xml",
408
+ "stpxz": "model/step-xml+zip",
409
+ "stpz": "model/step+zip",
410
+ "styl": "text/stylus",
411
+ "stylus": "text/stylus",
412
+ "svg": "image/svg+xml",
413
+ "svgz": "image/svg+xml",
414
+ "swidtag": "application/swid+xml",
415
+ "t": "text/troff",
416
+ "t38": "image/t38",
417
+ "td": "application/urc-targetdesc+xml",
418
+ "tei": "application/tei+xml",
419
+ "teicorpus": "application/tei+xml",
420
+ "text": "text/plain",
421
+ "tfi": "application/thraud+xml",
422
+ "tfx": "image/tiff-fx",
423
+ "tif": "image/tiff",
424
+ "tiff": "image/tiff",
425
+ "toml": "application/toml",
426
+ "tr": "text/troff",
427
+ "trig": "application/trig",
428
+ "ts": "video/mp2t",
429
+ "tsd": "application/timestamped-data",
430
+ "tsv": "text/tab-separated-values",
431
+ "ttc": "font/collection",
432
+ "ttf": "font/ttf",
433
+ "ttl": "text/turtle",
434
+ "ttml": "application/ttml+xml",
435
+ "txt": "text/plain",
436
+ "u3d": "model/u3d",
437
+ "u8dsn": "message/global-delivery-status",
438
+ "u8hdr": "message/global-headers",
439
+ "u8mdn": "message/global-disposition-notification",
440
+ "u8msg": "message/global",
441
+ "ubj": "application/ubjson",
442
+ "uri": "text/uri-list",
443
+ "uris": "text/uri-list",
444
+ "urls": "text/uri-list",
445
+ "vcard": "text/vcard",
446
+ "vrml": "model/vrml",
447
+ "vtt": "text/vtt",
448
+ "vxml": "application/voicexml+xml",
449
+ "war": "application/java-archive",
450
+ "wasm": "application/wasm",
451
+ "wav": "audio/wav",
452
+ "weba": "audio/webm",
453
+ "webm": "video/webm",
454
+ "webmanifest": "application/manifest+json",
455
+ "webp": "image/webp",
456
+ "wgsl": "text/wgsl",
457
+ "wgt": "application/widget",
458
+ "wif": "application/watcherinfo+xml",
459
+ "wmf": "image/wmf",
460
+ "woff": "font/woff",
461
+ "woff2": "font/woff2",
462
+ "wrl": "model/vrml",
463
+ "wsdl": "application/wsdl+xml",
464
+ "wspolicy": "application/wspolicy+xml",
465
+ "x3d": "model/x3d+xml",
466
+ "x3db": "model/x3d+fastinfoset",
467
+ "x3dbz": "model/x3d+binary",
468
+ "x3dv": "model/x3d-vrml",
469
+ "x3dvz": "model/x3d+vrml",
470
+ "x3dz": "model/x3d+xml",
471
+ "xaml": "application/xaml+xml",
472
+ "xav": "application/xcap-att+xml",
473
+ "xca": "application/xcap-caps+xml",
474
+ "xcs": "application/calendar+xml",
475
+ "xdf": "application/xcap-diff+xml",
476
+ "xdssc": "application/dssc+xml",
477
+ "xel": "application/xcap-el+xml",
478
+ "xenc": "application/xenc+xml",
479
+ "xer": "application/patch-ops-error+xml",
480
+ "xfdf": "application/xfdf",
481
+ "xht": "application/xhtml+xml",
482
+ "xhtml": "application/xhtml+xml",
483
+ "xhvml": "application/xv+xml",
484
+ "xlf": "application/xliff+xml",
485
+ "xm": "audio/xm",
486
+ "xml": "text/xml",
487
+ "xns": "application/xcap-ns+xml",
488
+ "xop": "application/xop+xml",
489
+ "xpl": "application/xproc+xml",
490
+ "xsd": "application/xml",
491
+ "xsf": "application/prs.xsf+xml",
492
+ "xsl": "application/xml",
493
+ "xslt": "application/xml",
494
+ "xspf": "application/xspf+xml",
495
+ "xvm": "application/xv+xml",
496
+ "xvml": "application/xv+xml",
497
+ "yaml": "text/yaml",
498
+ "yang": "application/yang",
499
+ "yin": "application/yin+xml",
500
+ "yml": "text/yaml",
501
+ "zip": "application/zip"
502
+ };
503
+
504
+ function lookup(extn) {
505
+ let tmp = ('' + extn).trim().toLowerCase();
506
+ let idx = tmp.lastIndexOf('.');
507
+ return mimes[!~idx ? tmp : tmp.substring(++idx)];
508
+ }
509
+
510
+ const noop = () => {};
511
+
512
+ function isMatch(uri, arr) {
513
+ for (let i=0; i < arr.length; i++) {
514
+ if (arr[i].test(uri)) return true;
515
+ }
516
+ }
517
+
518
+ function toAssume(uri, extns) {
519
+ let i=0, x, len=uri.length - 1;
520
+ if (uri.charCodeAt(len) === 47) {
521
+ uri = uri.substring(0, len);
522
+ }
523
+
524
+ let arr=[], tmp=`${uri}/index`;
525
+ for (; i < extns.length; i++) {
526
+ x = extns[i] ? `.${extns[i]}` : '';
527
+ if (uri) arr.push(uri + x);
528
+ arr.push(tmp + x);
529
+ }
530
+
531
+ return arr;
532
+ }
533
+
534
+ function viaCache(cache, uri, extns) {
535
+ let i=0, data, arr=toAssume(uri, extns);
536
+ for (; i < arr.length; i++) {
537
+ if (data = cache[arr[i]]) return data;
538
+ }
539
+ }
540
+
541
+ function viaLocal(dir, isEtag, uri, extns) {
542
+ let i=0, arr=toAssume(uri, extns);
543
+ let abs, stats, name, headers;
544
+ for (; i < arr.length; i++) {
545
+ abs = normalize(
546
+ join(dir, name=arr[i])
547
+ );
548
+
549
+ if (abs.startsWith(dir) && fs.existsSync(abs)) {
550
+ stats = fs.statSync(abs);
551
+ if (stats.isDirectory()) continue;
552
+ headers = toHeaders(name, stats, isEtag);
553
+ headers['Cache-Control'] = isEtag ? 'no-cache' : 'no-store';
554
+ return { abs, stats, headers };
555
+ }
556
+ }
557
+ }
558
+
559
+ function is404(req, res) {
560
+ return (res.statusCode=404,res.end());
561
+ }
562
+
563
+ function send(req, res, file, stats, headers) {
564
+ let code=200, tmp, opts={};
565
+ headers = { ...headers };
566
+
567
+ for (let key in headers) {
568
+ tmp = res.getHeader(key);
569
+ if (tmp) headers[key] = tmp;
570
+ }
571
+
572
+ if (tmp = res.getHeader('content-type')) {
573
+ headers['Content-Type'] = tmp;
574
+ }
575
+
576
+ if (req.headers.range) {
577
+ code = 206;
578
+ let [x, y] = req.headers.range.replace('bytes=', '').split('-');
579
+ let end = opts.end = parseInt(y, 10) || stats.size - 1;
580
+ let start = opts.start = parseInt(x, 10) || 0;
581
+
582
+ if (end >= stats.size) {
583
+ end = stats.size - 1;
584
+ }
585
+
586
+ if (start >= stats.size) {
587
+ res.setHeader('Content-Range', `bytes */${stats.size}`);
588
+ res.statusCode = 416;
589
+ return res.end();
590
+ }
591
+
592
+ headers['Content-Range'] = `bytes ${start}-${end}/${stats.size}`;
593
+ headers['Content-Length'] = (end - start + 1);
594
+ headers['Accept-Ranges'] = 'bytes';
595
+ }
596
+
597
+ res.writeHead(code, headers);
598
+ fs.createReadStream(file, opts).pipe(res);
599
+ }
600
+
601
+ const ENCODING = {
602
+ '.br': 'br',
603
+ '.gz': 'gzip',
604
+ };
605
+
606
+ function toHeaders(name, stats, isEtag) {
607
+ let enc = ENCODING[name.slice(-3)];
608
+
609
+ let ctype = lookup(name.slice(0, enc && -3)) || '';
610
+ if (ctype === 'text/html') ctype += ';charset=utf-8';
611
+
612
+ let headers = {
613
+ 'Content-Length': stats.size,
614
+ 'Content-Type': ctype,
615
+ 'Last-Modified': stats.mtime.toUTCString(),
616
+ };
617
+
618
+ if (enc) headers['Content-Encoding'] = enc;
619
+ if (isEtag) headers['ETag'] = `W/"${stats.size}-${stats.mtime.getTime()}"`;
620
+
621
+ return headers;
622
+ }
623
+
624
+ function sirv (dir, opts={}) {
625
+ dir = resolve(dir || '.');
626
+
627
+ let isNotFound = opts.onNoMatch || is404;
628
+ let setHeaders = opts.setHeaders || noop;
629
+
630
+ let extensions = opts.extensions || ['html', 'htm'];
631
+ let gzips = opts.gzip && extensions.map(x => `${x}.gz`).concat('gz');
632
+ let brots = opts.brotli && extensions.map(x => `${x}.br`).concat('br');
633
+
634
+ const FILES = {};
635
+
636
+ let fallback = '/';
637
+ let isEtag = !!opts.etag;
638
+ let isSPA = !!opts.single;
639
+ if (typeof opts.single === 'string') {
640
+ let idx = opts.single.lastIndexOf('.');
641
+ fallback += !!~idx ? opts.single.substring(0, idx) : opts.single;
642
+ }
643
+
644
+ let ignores = [];
645
+ if (opts.ignores !== false) {
646
+ ignores.push(/[/]([A-Za-z\s\d~$._-]+\.\w+){1,}$/); // any extn
647
+ if (opts.dotfiles) ignores.push(/\/\.\w/);
648
+ else ignores.push(/\/\.well-known/);
649
+ [].concat(opts.ignores || []).forEach(x => {
650
+ ignores.push(new RegExp(x, 'i'));
651
+ });
652
+ }
653
+
654
+ let cc = opts.maxAge != null && `public,max-age=${opts.maxAge}`;
655
+ if (cc && opts.immutable) cc += ',immutable';
656
+ else if (cc && opts.maxAge === 0) cc += ',must-revalidate';
657
+
658
+ if (!opts.dev) {
659
+ totalist(dir, (name, abs, stats) => {
660
+ if (/\.well-known[\\+\/]/.test(name)) ; // keep
661
+ else if (!opts.dotfiles && /(^\.|[\\+|\/+]\.)/.test(name)) return;
662
+
663
+ let headers = toHeaders(name, stats, isEtag);
664
+ if (cc) headers['Cache-Control'] = cc;
665
+
666
+ FILES['/' + name.normalize().replace(/\\+/g, '/')] = { abs, stats, headers };
667
+ });
668
+ }
669
+
670
+ let lookup = opts.dev ? viaLocal.bind(0, dir + sep, isEtag) : viaCache.bind(0, FILES);
671
+
672
+ return function (req, res, next) {
673
+ let extns = [''];
674
+ let pathname = parse$1(req).pathname;
675
+ let val = req.headers['accept-encoding'] || '';
676
+ if (gzips && val.includes('gzip')) extns.unshift(...gzips);
677
+ if (brots && /(br|brotli)/i.test(val)) extns.unshift(...brots);
678
+ extns.push(...extensions); // [...br, ...gz, orig, ...exts]
679
+
680
+ if (pathname.indexOf('%') !== -1) {
681
+ try { pathname = decodeURI(pathname); }
682
+ catch (err) { /* malform uri */ }
683
+ }
684
+
685
+ let data = lookup(pathname, extns) || isSPA && !isMatch(pathname, ignores) && lookup(fallback, extns);
686
+ if (!data) return next ? next() : isNotFound(req, res);
687
+
688
+ if (isEtag && req.headers['if-none-match'] === data.headers['ETag']) {
689
+ res.writeHead(304);
690
+ return res.end();
691
+ }
692
+
693
+ if (gzips || brots) {
694
+ res.setHeader('Vary', 'Accept-Encoding');
695
+ }
696
+
697
+ setHeaders(res, pathname, data.stats);
698
+ send(req, res, data.abs, data.stats, data.headers);
699
+ };
700
+ }
701
+
702
+ /**
703
+ * @param {string|RegExp} input The route pattern
704
+ * @param {boolean} [loose] Allow open-ended matching. Ignored with `RegExp` input.
705
+ */
706
+ function parse(input, loose) {
707
+ if (input instanceof RegExp) return { keys:false, pattern:input };
708
+ var c, o, tmp, ext, keys=[], pattern='', arr = input.split('/');
709
+ arr[0] || arr.shift();
710
+
711
+ while (tmp = arr.shift()) {
712
+ c = tmp[0];
713
+ if (c === '*') {
714
+ keys.push(c);
715
+ pattern += tmp[1] === '?' ? '(?:/(.*))?' : '/(.*)';
716
+ } else if (c === ':') {
717
+ o = tmp.indexOf('?', 1);
718
+ ext = tmp.indexOf('.', 1);
719
+ keys.push( tmp.substring(1, !!~o ? o : !!~ext ? ext : tmp.length) );
720
+ pattern += !!~o && !~ext ? '(?:/([^/]+?))?' : '/([^/]+?)';
721
+ if (!!~ext) pattern += (!!~o ? '?' : '') + '\\' + tmp.substring(ext);
722
+ } else {
723
+ pattern += '/' + tmp;
724
+ }
725
+ }
726
+
727
+ return {
728
+ keys: keys,
729
+ pattern: new RegExp('^' + pattern + (loose ? '(?=$|\/)' : '\/?$'), 'i')
730
+ };
731
+ }
732
+
733
+ const MAP = {
734
+ "": 0,
735
+ GET: 1,
736
+ HEAD: 2,
737
+ PATCH: 3,
738
+ OPTIONS: 4,
739
+ CONNECT: 5,
740
+ DELETE: 6,
741
+ TRACE: 7,
742
+ POST: 8,
743
+ PUT: 9,
744
+ };
745
+
746
+ class Trouter {
747
+ constructor() {
748
+ this.routes = [];
749
+
750
+ this.all = this.add.bind(this, '');
751
+ this.get = this.add.bind(this, 'GET');
752
+ this.head = this.add.bind(this, 'HEAD');
753
+ this.patch = this.add.bind(this, 'PATCH');
754
+ this.options = this.add.bind(this, 'OPTIONS');
755
+ this.connect = this.add.bind(this, 'CONNECT');
756
+ this.delete = this.add.bind(this, 'DELETE');
757
+ this.trace = this.add.bind(this, 'TRACE');
758
+ this.post = this.add.bind(this, 'POST');
759
+ this.put = this.add.bind(this, 'PUT');
760
+ }
761
+
762
+ use(route, ...fns) {
763
+ let handlers = [].concat.apply([], fns);
764
+ let { keys, pattern } = parse(route, true);
765
+ this.routes.push({ keys, pattern, method: '', handlers, midx: MAP[''] });
766
+ return this;
767
+ }
768
+
769
+ add(method, route, ...fns) {
770
+ let { keys, pattern } = parse(route);
771
+ let handlers = [].concat.apply([], fns);
772
+ this.routes.push({ keys, pattern, method, handlers, midx: MAP[method] });
773
+ return this;
774
+ }
775
+
776
+ find(method, url) {
777
+ let midx = MAP[method];
778
+ let isHEAD = (midx === 2);
779
+ let i=0, j=0, k, tmp, arr=this.routes;
780
+ let matches=[], params={}, handlers=[];
781
+ for (; i < arr.length; i++) {
782
+ tmp = arr[i];
783
+ if (tmp.midx === midx || tmp.midx === 0 || (isHEAD && tmp.midx===1) ) {
784
+ if (tmp.keys === false) {
785
+ matches = tmp.pattern.exec(url);
786
+ if (matches === null) continue;
787
+ if (matches.groups !== void 0) for (k in matches.groups) params[k]=matches.groups[k];
788
+ tmp.handlers.length > 1 ? (handlers=handlers.concat(tmp.handlers)) : handlers.push(tmp.handlers[0]);
789
+ } else if (tmp.keys.length > 0) {
790
+ matches = tmp.pattern.exec(url);
791
+ if (matches === null) continue;
792
+ for (j=0; j < tmp.keys.length;) params[tmp.keys[j]]=matches[++j];
793
+ tmp.handlers.length > 1 ? (handlers=handlers.concat(tmp.handlers)) : handlers.push(tmp.handlers[0]);
794
+ } else if (tmp.pattern.test(url)) {
795
+ tmp.handlers.length > 1 ? (handlers=handlers.concat(tmp.handlers)) : handlers.push(tmp.handlers[0]);
796
+ }
797
+ } // else not a match
798
+ }
799
+
800
+ return { params, handlers };
801
+ }
802
+ }
803
+
804
+ function onError(err, req, res) {
805
+ let code = typeof err.status === 'number' && err.status;
806
+ code = res.statusCode = (code && code >= 100 ? code : 500);
807
+ if (typeof err === 'string' || Buffer.isBuffer(err)) res.end(err);
808
+ else res.end(err.message || http.STATUS_CODES[code]);
809
+ }
810
+
811
+ const mount = fn => fn instanceof Polka ? fn.attach : fn;
812
+
813
+ class Polka extends Trouter {
814
+ constructor(opts={}) {
815
+ super();
816
+ this.parse = parse$1;
817
+ this.server = opts.server;
818
+ this.handler = this.handler.bind(this);
819
+ this.onError = opts.onError || onError; // catch-all handler
820
+ this.onNoMatch = opts.onNoMatch || this.onError.bind(null, { status: 404 });
821
+ this.attach = (req, res) => setImmediate(this.handler, req, res);
822
+ }
823
+
824
+ use(base, ...fns) {
825
+ if (base === '/') {
826
+ super.use(base, fns.map(mount));
827
+ } else if (typeof base === 'function' || base instanceof Polka) {
828
+ super.use('/', [base, ...fns].map(mount));
829
+ } else {
830
+ super.use(base,
831
+ (req, _, next) => {
832
+ if (typeof base === 'string') {
833
+ let len = base.length;
834
+ base.startsWith('/') || len++;
835
+ req.url = req.url.substring(len) || '/';
836
+ req.path = req.path.substring(len) || '/';
837
+ } else {
838
+ req.url = req.url.replace(base, '') || '/';
839
+ req.path = req.path.replace(base, '') || '/';
840
+ }
841
+ if (req.url.charAt(0) !== '/') {
842
+ req.url = '/' + req.url;
843
+ }
844
+ next();
845
+ },
846
+ fns.map(mount),
847
+ (req, _, next) => {
848
+ req.path = req._parsedUrl.pathname;
849
+ req.url = req.path + req._parsedUrl.search;
850
+ next();
851
+ }
852
+ );
853
+ }
854
+ return this; // chainable
855
+ }
856
+
857
+ listen() {
858
+ (this.server = this.server || http.createServer()).on('request', this.attach);
859
+ this.server.listen.apply(this.server, arguments);
860
+ return this;
861
+ }
862
+
863
+ handler(req, res, next) {
864
+ let info = this.parse(req), path = info.pathname;
865
+ let obj = this.find(req.method, req.path=path);
866
+
867
+ req.url = path + info.search;
868
+ req.originalUrl = req.originalUrl || req.url;
869
+ req.query = info.query || {};
870
+ req.search = info.search;
871
+ req.params = obj.params;
872
+
873
+ if (path.length > 1 && path.indexOf('%', 1) !== -1) {
874
+ for (let k in req.params) {
875
+ try { req.params[k] = decodeURIComponent(req.params[k]); }
876
+ catch (e) { /* malform uri segment */ }
877
+ }
878
+ }
879
+
880
+ let i=0, arr=obj.handlers.concat(this.onNoMatch), len=arr.length;
881
+ let loop = async () => res.finished || (i < len) && arr[i++](req, res, next);
882
+ (next = next || (err => err ? this.onError(err, req, res, next) : loop().catch(next)))(); // init
883
+ }
884
+ }
885
+
886
+ function polka (opts) {
887
+ return new Polka(opts);
888
+ }
889
+
890
+ /**
891
+ * Parses the given value into number of bytes.
892
+ *
893
+ * @param {string} value - Size in bytes. Can also be specified with a unit suffix kilobytes (K), megabytes (M), or gigabytes (G).
894
+ * @returns {number}
895
+ */
896
+ function parse_as_bytes(value) {
897
+ const multiplier =
898
+ {
899
+ K: 1024,
900
+ M: 1024 * 1024,
901
+ G: 1024 * 1024 * 1024
902
+ }[value[value.length - 1]?.toUpperCase()] ?? 1;
903
+ return Number(multiplier != 1 ? value.substring(0, value.length - 1) : value) * multiplier;
904
+ }
905
+
906
+ /**
907
+ * Parses and validates an origin URL.
908
+ *
909
+ * @param {string | undefined} value - Origin URL with http:// or https:// protocol
910
+ * @returns {string | undefined} The validated origin, or undefined if value is undefined
911
+ * @throws {Error} If value is provided but invalid
912
+ */
913
+ function parse_origin(value) {
914
+ if (value === undefined) {
915
+ return undefined;
916
+ }
917
+
918
+ const trimmed = value.trim();
919
+
920
+ let url;
921
+ try {
922
+ url = new URL(trimmed);
923
+ } catch (error) {
924
+ throw new Error(
925
+ `Invalid ORIGIN: '${trimmed}'. ` +
926
+ `ORIGIN must be a valid URL with http:// or https:// protocol. ` +
927
+ `For example: 'http://localhost:3000' or 'https://my.site'`,
928
+ { cause: error }
929
+ );
930
+ }
931
+
932
+ if (url.protocol !== 'http:' && url.protocol !== 'https:') {
933
+ throw new Error(
934
+ `Invalid ORIGIN: '${trimmed}'. ` +
935
+ `Only http:// and https:// protocols are supported. ` +
936
+ `Received protocol: ${url.protocol}`
937
+ );
938
+ }
939
+
940
+ return url.origin;
941
+ }
942
+
943
+ /**
944
+ * Formats the address the server is listening on.
945
+ *
946
+ * @param {string | false} path
947
+ * @param {string} host
948
+ * @param {string | false} port
949
+ * @param {import('node:net').AddressInfo | string | null} address
950
+ * @returns {string}
951
+ */
952
+ function format_listening_address(path, host, port, address) {
953
+ if (path) {
954
+ return path;
955
+ }
956
+
957
+ if (address && typeof address === 'object') {
958
+ return format({
959
+ protocol: 'http:',
960
+ hostname: address.address,
961
+ port: address.port
962
+ });
963
+ }
964
+
965
+ return format({
966
+ protocol: 'http:',
967
+ hostname: host,
968
+ port: String(port)
969
+ });
970
+ }
971
+
972
+ const prerendered = new Set([]);
973
+
974
+ const server = new Server(manifest);
975
+
976
+ // parse_origin validates ORIGIN and throws descriptive errors for invalid values
977
+ const origin = parse_origin(env('ORIGIN', undefined));
978
+
979
+ const xff_depth = parseInt(env('XFF_DEPTH', '1'));
980
+ const address_header = env('ADDRESS_HEADER', '').toLowerCase();
981
+ const protocol_header = env('PROTOCOL_HEADER', '').toLowerCase();
982
+ const host_header = env('HOST_HEADER', '').toLowerCase();
983
+ const port_header = env('PORT_HEADER', '').toLowerCase();
984
+
985
+ const body_size_limit = parse_as_bytes(env('BODY_SIZE_LIMIT', '512K'));
986
+
987
+ if (isNaN(body_size_limit)) {
988
+ throw new Error(
989
+ `Invalid BODY_SIZE_LIMIT: '${env('BODY_SIZE_LIMIT')}'. Please provide a numeric value.`
990
+ );
991
+ }
992
+
993
+ const asset_dir = `${dir}/client${""}`;
994
+
995
+ await server.init({
996
+ env: /** @type {Record<string, string>} */ (process.env),
997
+ read: (file) => createReadableStream(`${asset_dir}/${file}`)
998
+ });
999
+
1000
+ /**
1001
+ * @param {string} path
1002
+ * @param {boolean} client
1003
+ */
1004
+ function serve(path, client = false) {
1005
+ return fs__default.existsSync(path)
1006
+ ? sirv(path, {
1007
+ etag: true,
1008
+ gzip: false,
1009
+ brotli: false,
1010
+ setHeaders: client
1011
+ ? (res, pathname) => {
1012
+ // only apply to build directory, not e.g. version.json
1013
+ if (
1014
+ pathname.startsWith(`/${manifest.appPath}/immutable/`) &&
1015
+ res.statusCode === 200
1016
+ ) {
1017
+ res.setHeader('cache-control', 'public,max-age=31536000,immutable');
1018
+ }
1019
+ }
1020
+ : undefined
1021
+ })
1022
+ : undefined;
1023
+ }
1024
+
1025
+ // required because the static file server ignores trailing slashes
1026
+ /** @returns {import('polka').Middleware} */
1027
+ function serve_prerendered() {
1028
+ const handler = serve(path.join(dir, 'prerendered'));
1029
+
1030
+ return (req, res, next) => {
1031
+ let { pathname, search, query } = parse$1(req);
1032
+
1033
+ try {
1034
+ pathname = decodeURIComponent(pathname);
1035
+ } catch {
1036
+ // ignore invalid URI
1037
+ }
1038
+
1039
+ if (prerendered.has(pathname)) {
1040
+ return handler?.(req, res, next);
1041
+ }
1042
+
1043
+ // remove or add trailing slash as appropriate
1044
+ let location = pathname.at(-1) === '/' ? pathname.slice(0, -1) : pathname + '/';
1045
+ if (prerendered.has(location)) {
1046
+ if (query) location += search;
1047
+ res.writeHead(308, { location }).end();
1048
+ } else {
1049
+ void next();
1050
+ }
1051
+ };
1052
+ }
1053
+
1054
+ /** @type {import('polka').Middleware} */
1055
+ const ssr = async (req, res) => {
1056
+ /** @type {Request} */
1057
+ let request;
1058
+
1059
+ try {
1060
+ request = await getRequest({
1061
+ base: origin || get_origin(req.headers),
1062
+ request: req,
1063
+ bodySizeLimit: body_size_limit
1064
+ });
1065
+ } catch {
1066
+ res.statusCode = 400;
1067
+ res.end('Bad Request');
1068
+ return;
1069
+ }
1070
+
1071
+ const response = await server.respond(request, {
1072
+ platform: { req },
1073
+ getClientAddress: () => {
1074
+ if (address_header) {
1075
+ if (!(address_header in req.headers)) {
1076
+ throw new Error(
1077
+ `Address header was specified with ${
1078
+ env_prefix + 'ADDRESS_HEADER'
1079
+ }=${address_header} but is absent from request`
1080
+ );
1081
+ }
1082
+
1083
+ const value = /** @type {string} */ (req.headers[address_header]) || '';
1084
+
1085
+ if (address_header === 'x-forwarded-for') {
1086
+ const addresses = value.split(',');
1087
+
1088
+ if (xff_depth < 1) {
1089
+ throw new Error(`${env_prefix + 'XFF_DEPTH'} must be a positive integer`);
1090
+ }
1091
+
1092
+ if (xff_depth > addresses.length) {
1093
+ throw new Error(
1094
+ `${env_prefix + 'XFF_DEPTH'} is ${xff_depth}, but only found ${
1095
+ addresses.length
1096
+ } addresses`
1097
+ );
1098
+ }
1099
+ return addresses[addresses.length - xff_depth].trim();
1100
+ }
1101
+
1102
+ return value;
1103
+ }
1104
+
1105
+ return (
1106
+ req.connection?.remoteAddress ||
1107
+ // @ts-expect-error
1108
+ req.connection?.socket?.remoteAddress ||
1109
+ req.socket?.remoteAddress ||
1110
+ // @ts-expect-error
1111
+ req.info?.remoteAddress
1112
+ );
1113
+ }
1114
+ });
1115
+
1116
+ // Reverse proxies such as nginx buffer responses by default (ignoring
1117
+ // `cache-control`), which breaks streaming responses like server-sent events.
1118
+ // `X-Accel-Buffering: no` opts out of that buffering and is a no-op on proxies
1119
+ // that don't recognise it. See https://github.com/sveltejs/kit/issues/15790
1120
+ if (response.headers.get('content-type') === 'text/event-stream') {
1121
+ response.headers.set('x-accel-buffering', 'no');
1122
+ }
1123
+
1124
+ await setResponse(res, response);
1125
+ };
1126
+
1127
+ /** @param {import('polka').Middleware[]} handlers */
1128
+ function sequence(handlers) {
1129
+ /** @type {import('polka').Middleware} */
1130
+ return (req, res, next) => {
1131
+ /**
1132
+ * @param {number} i
1133
+ * @returns {ReturnType<import('polka').Middleware>}
1134
+ */
1135
+ function handle(i) {
1136
+ if (i < handlers.length) {
1137
+ return handlers[i](req, res, () => handle(i + 1));
1138
+ } else {
1139
+ return next();
1140
+ }
1141
+ }
1142
+
1143
+ return handle(0);
1144
+ };
1145
+ }
1146
+
1147
+ /**
1148
+ * @param {string} name
1149
+ * @param {string | string[] | undefined} value
1150
+ * @returns {string | undefined}
1151
+ */
1152
+ function normalise_header(name, value) {
1153
+ if (!name) return undefined;
1154
+ if (Array.isArray(value)) {
1155
+ if (value.length === 0) return undefined;
1156
+ if (value.length === 1) return value[0];
1157
+ throw new Error(
1158
+ `Multiple values provided for ${name} header where only one expected: ${value}`
1159
+ );
1160
+ }
1161
+ return value;
1162
+ }
1163
+
1164
+ /**
1165
+ * @param {import('http').IncomingHttpHeaders} headers
1166
+ * @returns {string}
1167
+ */
1168
+ function get_origin(headers) {
1169
+ const protocol = decodeURIComponent(
1170
+ normalise_header(protocol_header, headers[protocol_header]) || 'https'
1171
+ );
1172
+
1173
+ // this helps us avoid host injections through the protocol header
1174
+ if (protocol.includes(':')) {
1175
+ throw new Error(
1176
+ `The ${protocol_header} header specified ${protocol} which is an invalid because it includes \`:\`. It should only contain the protocol scheme (e.g. \`https\`)`
1177
+ );
1178
+ }
1179
+
1180
+ const host =
1181
+ normalise_header(host_header, headers[host_header]) ||
1182
+ normalise_header('host', headers['host']);
1183
+ if (!host) {
1184
+ const header_names = host_header ? `${host_header} or host headers` : 'host header';
1185
+ throw new Error(
1186
+ `Could not determine host. The request must have a value provided by the ${header_names}`
1187
+ );
1188
+ }
1189
+
1190
+ const port = normalise_header(port_header, headers[port_header]);
1191
+ if (port && isNaN(+port)) {
1192
+ throw new Error(
1193
+ `The ${port_header} header specified ${port} which is an invalid port because it is not a number. The value should only contain the port number (e.g. 443)`
1194
+ );
1195
+ }
1196
+
1197
+ return port ? `${protocol}://${host}:${port}` : `${protocol}://${host}`;
1198
+ }
1199
+
1200
+ const handler = sequence(
1201
+ /** @type {(import('sirv').RequestHandler | import('polka').Middleware)[]} */
1202
+ ([serve(path.join(dir, 'client'), true), serve_prerendered(), ssr].filter(Boolean))
1203
+ );
1204
+
1205
+ export { format_listening_address as f, handler as h, polka as p };
1206
+ //# sourceMappingURL=handler-ColT39Lk.js.map