astro 4.7.1 → 4.8.0

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 (222) hide show
  1. package/client.d.ts +1 -0
  2. package/content-module.template.mjs +2 -0
  3. package/dist/@types/astro.d.ts +219 -3
  4. package/dist/actions/consts.d.ts +3 -0
  5. package/dist/actions/consts.js +8 -0
  6. package/dist/actions/index.d.ts +2 -0
  7. package/dist/actions/index.js +72 -0
  8. package/dist/actions/runtime/middleware.d.ts +7 -0
  9. package/dist/actions/runtime/middleware.js +38 -0
  10. package/dist/actions/runtime/route.d.ts +2 -0
  11. package/dist/actions/runtime/route.js +37 -0
  12. package/dist/actions/runtime/store.d.ts +6 -0
  13. package/dist/actions/runtime/store.js +18 -0
  14. package/dist/actions/runtime/utils.d.ts +4 -0
  15. package/dist/actions/runtime/utils.js +23 -0
  16. package/dist/actions/runtime/virtual/client.d.ts +4 -0
  17. package/dist/actions/runtime/virtual/client.js +20 -0
  18. package/dist/actions/runtime/virtual/server.d.ts +21 -0
  19. package/dist/actions/runtime/virtual/server.js +98 -0
  20. package/dist/actions/runtime/virtual/shared.d.ts +37 -0
  21. package/dist/actions/runtime/virtual/shared.js +104 -0
  22. package/dist/actions/utils.d.ts +2 -0
  23. package/dist/actions/utils.js +18 -0
  24. package/dist/assets/build/generate.js +1 -1
  25. package/dist/assets/internal.js +1 -2
  26. package/dist/assets/services/service.js +2 -4
  27. package/dist/assets/services/sharp.js +2 -4
  28. package/dist/assets/services/squoosh.js +2 -4
  29. package/dist/assets/services/vendor/squoosh/avif/avif_node_dec.js +34 -68
  30. package/dist/assets/services/vendor/squoosh/avif/avif_node_enc.js +39 -78
  31. package/dist/assets/services/vendor/squoosh/mozjpeg/mozjpeg_node_dec.js +32 -64
  32. package/dist/assets/services/vendor/squoosh/mozjpeg/mozjpeg_node_enc.js +32 -64
  33. package/dist/assets/services/vendor/squoosh/png/squoosh_png.js +2 -4
  34. package/dist/assets/services/vendor/squoosh/webp/webp_node_dec.js +29 -58
  35. package/dist/assets/services/vendor/squoosh/webp/webp_node_enc.js +29 -58
  36. package/dist/assets/utils/getAssetsPrefix.js +2 -4
  37. package/dist/assets/utils/remotePattern.js +1 -2
  38. package/dist/assets/utils/remoteProbe.js +1 -2
  39. package/dist/assets/utils/vendor/image-size/types/cur.js +1 -2
  40. package/dist/assets/utils/vendor/image-size/types/icns.js +1 -2
  41. package/dist/assets/utils/vendor/image-size/types/ico.js +2 -4
  42. package/dist/assets/utils/vendor/image-size/types/jp2.js +2 -4
  43. package/dist/assets/utils/vendor/image-size/types/utils.js +4 -8
  44. package/dist/assets/vite-plugin-assets.js +1 -1
  45. package/dist/cli/add/babel.d.ts +1 -1
  46. package/dist/cli/add/imports.js +4 -8
  47. package/dist/cli/add/index.js +23 -46
  48. package/dist/cli/add/wrapper.js +1 -2
  49. package/dist/cli/index.js +1 -2
  50. package/dist/cli/info/index.js +1 -2
  51. package/dist/cli/install-package.js +3 -6
  52. package/dist/cli/throw-and-exit.js +1 -2
  53. package/dist/config/index.d.ts +2 -2
  54. package/dist/config/index.js +2 -2
  55. package/dist/content/index.d.ts +1 -1
  56. package/dist/content/index.js +1 -7
  57. package/dist/content/runtime.d.ts +2 -1
  58. package/dist/content/runtime.js +11 -20
  59. package/dist/content/server-listeners.js +5 -10
  60. package/dist/content/types-generator.js +5 -10
  61. package/dist/content/utils.d.ts +0 -4
  62. package/dist/content/utils.js +4 -15
  63. package/dist/content/vite-plugin-content-assets.d.ts +1 -1
  64. package/dist/content/vite-plugin-content-assets.js +14 -47
  65. package/dist/content/vite-plugin-content-imports.js +6 -11
  66. package/dist/content/vite-plugin-content-virtual-mod.js +7 -14
  67. package/dist/core/app/index.js +11 -46
  68. package/dist/core/app/node.js +4 -3
  69. package/dist/core/app/pipeline.d.ts +7 -2
  70. package/dist/core/app/pipeline.js +70 -2
  71. package/dist/core/app/types.d.ts +1 -0
  72. package/dist/core/base-pipeline.d.ts +16 -1
  73. package/dist/core/build/generate.js +15 -61
  74. package/dist/core/build/index.js +2 -4
  75. package/dist/core/build/internal.d.ts +39 -9
  76. package/dist/core/build/internal.js +43 -54
  77. package/dist/core/build/page-data.js +6 -6
  78. package/dist/core/build/pipeline.d.ts +7 -3
  79. package/dist/core/build/pipeline.js +134 -23
  80. package/dist/core/build/plugins/plugin-analyzer.js +11 -32
  81. package/dist/core/build/plugins/plugin-content.d.ts +1 -0
  82. package/dist/core/build/plugins/plugin-content.js +34 -32
  83. package/dist/core/build/plugins/plugin-css.js +23 -51
  84. package/dist/core/build/plugins/plugin-manifest.js +7 -8
  85. package/dist/core/build/plugins/plugin-pages.d.ts +0 -1
  86. package/dist/core/build/plugins/plugin-pages.js +10 -12
  87. package/dist/core/build/plugins/plugin-ssr.js +15 -13
  88. package/dist/core/build/plugins/util.d.ts +26 -11
  89. package/dist/core/build/plugins/util.js +22 -6
  90. package/dist/core/build/static-build.js +30 -25
  91. package/dist/core/build/types.d.ts +6 -6
  92. package/dist/core/client-directive/build.js +1 -2
  93. package/dist/core/config/config.js +2 -7
  94. package/dist/core/config/logging.js +1 -2
  95. package/dist/core/config/schema.d.ts +92 -60
  96. package/dist/core/config/schema.js +6 -2
  97. package/dist/core/config/settings.js +1 -2
  98. package/dist/core/config/timer.js +4 -8
  99. package/dist/core/constants.js +1 -1
  100. package/dist/core/cookies/cookies.js +3 -6
  101. package/dist/core/dev/dev.js +1 -1
  102. package/dist/core/dev/restart.js +1 -2
  103. package/dist/core/errors/errors-data.d.ts +24 -0
  104. package/dist/core/errors/errors-data.js +13 -2
  105. package/dist/core/errors/errors.js +1 -2
  106. package/dist/core/errors/overlay.js +1 -2
  107. package/dist/core/errors/printer.js +2 -4
  108. package/dist/core/errors/zod-error-map.js +2 -4
  109. package/dist/core/fs/index.js +2 -4
  110. package/dist/core/logger/vite.js +9 -18
  111. package/dist/core/messages.js +2 -2
  112. package/dist/core/middleware/callMiddleware.d.ts +3 -2
  113. package/dist/core/middleware/callMiddleware.js +13 -3
  114. package/dist/core/middleware/index.js +12 -8
  115. package/dist/core/middleware/sequence.js +22 -4
  116. package/dist/core/module-loader/vite.js +1 -2
  117. package/dist/core/render/params-and-props.js +2 -4
  118. package/dist/core/render/slots.js +4 -8
  119. package/dist/core/render-context.d.ts +15 -5
  120. package/dist/core/render-context.js +134 -28
  121. package/dist/core/request.js +1 -2
  122. package/dist/core/routing/manifest/create.js +3 -6
  123. package/dist/core/sync/index.js +10 -3
  124. package/dist/core/util.d.ts +2 -0
  125. package/dist/core/util.js +18 -19
  126. package/dist/i18n/index.js +2 -4
  127. package/dist/i18n/middleware.js +1 -2
  128. package/dist/i18n/utils.js +1 -2
  129. package/dist/i18n/vite-plugin-i18n.js +1 -2
  130. package/dist/integrations/hooks.js +5 -1
  131. package/dist/jsx/babel.d.ts +3 -0
  132. package/dist/jsx/babel.js +9 -18
  133. package/dist/jsx/rehype.d.ts +11 -0
  134. package/dist/jsx/rehype.js +197 -0
  135. package/dist/jsx/server.js +20 -14
  136. package/dist/jsx/transform-options.d.ts +3 -0
  137. package/dist/jsx-runtime/index.js +8 -16
  138. package/dist/preferences/index.js +3 -6
  139. package/dist/preferences/store.js +3 -6
  140. package/dist/prefetch/index.js +8 -16
  141. package/dist/prefetch/vite-plugin-prefetch.js +2 -4
  142. package/dist/prerender/metadata.js +1 -2
  143. package/dist/prerender/routing.js +1 -1
  144. package/dist/prerender/utils.d.ts +0 -1
  145. package/dist/prerender/utils.js +2 -5
  146. package/dist/runtime/client/dev-toolbar/apps/astro.js +5 -10
  147. package/dist/runtime/client/dev-toolbar/apps/audit/index.js +5 -10
  148. package/dist/runtime/client/dev-toolbar/apps/audit/rules/a11y.js +45 -90
  149. package/dist/runtime/client/dev-toolbar/apps/audit/rules/index.js +1 -2
  150. package/dist/runtime/client/dev-toolbar/apps/audit/rules/perf.js +16 -32
  151. package/dist/runtime/client/dev-toolbar/apps/audit/ui/audit-list-window.js +2 -4
  152. package/dist/runtime/client/dev-toolbar/apps/audit/ui/audit-ui.js +3 -6
  153. package/dist/runtime/client/dev-toolbar/apps/utils/highlight.js +1 -2
  154. package/dist/runtime/client/dev-toolbar/apps/utils/window.js +4 -8
  155. package/dist/runtime/client/dev-toolbar/entrypoint.js +8 -11
  156. package/dist/runtime/client/dev-toolbar/helpers.js +2 -4
  157. package/dist/runtime/client/dev-toolbar/toolbar.js +11 -22
  158. package/dist/runtime/client/dev-toolbar/ui-library/badge.js +1 -2
  159. package/dist/runtime/client/dev-toolbar/ui-library/button.d.ts +5 -0
  160. package/dist/runtime/client/dev-toolbar/ui-library/button.js +26 -5
  161. package/dist/runtime/client/dev-toolbar/ui-library/index.d.ts +1 -0
  162. package/dist/runtime/client/dev-toolbar/ui-library/index.js +2 -0
  163. package/dist/runtime/client/dev-toolbar/ui-library/radio-checkbox.d.ts +13 -0
  164. package/dist/runtime/client/dev-toolbar/ui-library/radio-checkbox.js +109 -0
  165. package/dist/runtime/client/visible.js +1 -2
  166. package/dist/runtime/server/astro-component.js +2 -4
  167. package/dist/runtime/server/astro-island.js +7 -14
  168. package/dist/runtime/server/astro-island.prebuilt-dev.d.ts +1 -1
  169. package/dist/runtime/server/astro-island.prebuilt-dev.js +1 -1
  170. package/dist/runtime/server/astro-island.prebuilt.d.ts +1 -1
  171. package/dist/runtime/server/astro-island.prebuilt.js +1 -1
  172. package/dist/runtime/server/index.js +3 -6
  173. package/dist/runtime/server/jsx.js +1 -2
  174. package/dist/runtime/server/render/any.js +1 -2
  175. package/dist/runtime/server/render/astro/instance.js +1 -2
  176. package/dist/runtime/server/render/astro/render.js +5 -10
  177. package/dist/runtime/server/render/component.js +6 -11
  178. package/dist/runtime/server/render/dom.js +1 -2
  179. package/dist/runtime/server/render/page.js +1 -2
  180. package/dist/runtime/server/render/script.js +1 -2
  181. package/dist/runtime/server/render/slot.js +1 -2
  182. package/dist/runtime/server/render/tags.js +2 -4
  183. package/dist/runtime/server/render/util.js +2 -4
  184. package/dist/runtime/server/shorthash.js +1 -2
  185. package/dist/runtime/server/transition.js +4 -8
  186. package/dist/runtime/server/util.js +1 -2
  187. package/dist/transitions/events.d.ts +3 -3
  188. package/dist/transitions/events.js +5 -4
  189. package/dist/transitions/router.js +22 -113
  190. package/dist/transitions/swap-functions.d.ts +12 -0
  191. package/dist/transitions/swap-functions.js +105 -0
  192. package/dist/vite-plugin-astro/compile.js +1 -2
  193. package/dist/vite-plugin-astro/hmr.js +5 -10
  194. package/dist/vite-plugin-astro/index.js +2 -4
  195. package/dist/vite-plugin-astro-server/pipeline.d.ts +8 -3
  196. package/dist/vite-plugin-astro-server/pipeline.js +59 -11
  197. package/dist/vite-plugin-astro-server/plugin.js +6 -6
  198. package/dist/vite-plugin-astro-server/response.js +1 -2
  199. package/dist/vite-plugin-astro-server/route.js +36 -42
  200. package/dist/vite-plugin-astro-server/vite.js +1 -2
  201. package/dist/vite-plugin-config-alias/index.js +7 -14
  202. package/dist/vite-plugin-head/index.js +3 -6
  203. package/dist/vite-plugin-html/index.js +1 -2
  204. package/dist/vite-plugin-html/transform/escape.js +2 -4
  205. package/dist/vite-plugin-html/transform/slots.js +1 -2
  206. package/dist/vite-plugin-html/transform/utils.js +1 -2
  207. package/dist/vite-plugin-inject-env-ts/index.js +37 -11
  208. package/dist/vite-plugin-integrations-container/index.js +3 -6
  209. package/dist/vite-plugin-load-fallback/index.js +1 -2
  210. package/dist/vite-plugin-markdown/index.js +1 -2
  211. package/dist/vite-plugin-mdx/index.d.ts +3 -0
  212. package/dist/vite-plugin-mdx/tag.d.ts +2 -0
  213. package/dist/vite-plugin-mdx/tag.js +3 -6
  214. package/dist/vite-plugin-mdx/transform-jsx.d.ts +3 -0
  215. package/dist/vite-plugin-mdx/transform-jsx.js +1 -2
  216. package/dist/vite-plugin-scanner/index.js +4 -6
  217. package/dist/vite-plugin-scanner/scan.js +2 -4
  218. package/dist/vite-plugin-scripts/page-ssr.js +3 -6
  219. package/package.json +18 -14
  220. package/templates/actions.mjs +61 -0
  221. package/types/actions.d.ts +3 -0
  222. package/types/content.d.ts +2 -2
@@ -42,10 +42,8 @@ var Module = /* @__PURE__ */ function() {
42
42
  scriptDirectory = dirname(getModuleURL(import.meta.url)) + "/";
43
43
  }
44
44
  read_ = function shell_read(filename, binary) {
45
- if (!nodeFS)
46
- nodeFS = require2("node:fs");
47
- if (!nodePath)
48
- nodePath = require2("node:path");
45
+ if (!nodeFS) nodeFS = require2("node:fs");
46
+ if (!nodePath) nodePath = require2("node:path");
49
47
  filename = nodePath["normalize"](filename);
50
48
  return nodeFS["readFileSync"](filename, binary ? null : "utf8");
51
49
  };
@@ -77,19 +75,15 @@ var Module = /* @__PURE__ */ function() {
77
75
  }
78
76
  }
79
77
  moduleOverrides = null;
80
- if (Module2["arguments"])
81
- arguments_ = Module2["arguments"];
82
- if (Module2["thisProgram"])
83
- thisProgram = Module2["thisProgram"];
84
- if (Module2["quit"])
85
- quit_ = Module2["quit"];
78
+ if (Module2["arguments"]) arguments_ = Module2["arguments"];
79
+ if (Module2["thisProgram"]) thisProgram = Module2["thisProgram"];
80
+ if (Module2["quit"]) quit_ = Module2["quit"];
86
81
  var tempRet0 = 0;
87
82
  var setTempRet0 = function(value) {
88
83
  tempRet0 = value;
89
84
  };
90
85
  var wasmBinary;
91
- if (Module2["wasmBinary"])
92
- wasmBinary = Module2["wasmBinary"];
86
+ if (Module2["wasmBinary"]) wasmBinary = Module2["wasmBinary"];
93
87
  var noExitRuntime = Module2["noExitRuntime"] || true;
94
88
  if (typeof WebAssembly !== "object") {
95
89
  abort("no native wasm support detected");
@@ -106,23 +100,19 @@ var Module = /* @__PURE__ */ function() {
106
100
  function UTF8ArrayToString(heap, idx, maxBytesToRead) {
107
101
  var endIdx = idx + maxBytesToRead;
108
102
  var endPtr = idx;
109
- while (heap[endPtr] && !(endPtr >= endIdx))
110
- ++endPtr;
103
+ while (heap[endPtr] && !(endPtr >= endIdx)) ++endPtr;
111
104
  return UTF8Decoder.decode(
112
105
  heap.subarray ? heap.subarray(idx, endPtr) : new Uint8Array(heap.slice(idx, endPtr))
113
106
  );
114
107
  }
115
108
  function UTF8ToString(ptr, maxBytesToRead) {
116
- if (!ptr)
117
- return "";
109
+ if (!ptr) return "";
118
110
  var maxPtr = ptr + maxBytesToRead;
119
- for (var end = ptr; !(end >= maxPtr) && HEAPU8[end]; )
120
- ++end;
111
+ for (var end = ptr; !(end >= maxPtr) && HEAPU8[end]; ) ++end;
121
112
  return UTF8Decoder.decode(HEAPU8.subarray(ptr, end));
122
113
  }
123
114
  function stringToUTF8Array(str, heap, outIdx, maxBytesToWrite) {
124
- if (!(maxBytesToWrite > 0))
125
- return 0;
115
+ if (!(maxBytesToWrite > 0)) return 0;
126
116
  var startIdx = outIdx;
127
117
  var endIdx = outIdx + maxBytesToWrite - 1;
128
118
  for (var i = 0; i < str.length; ++i) {
@@ -132,23 +122,19 @@ var Module = /* @__PURE__ */ function() {
132
122
  u = 65536 + ((u & 1023) << 10) | u1 & 1023;
133
123
  }
134
124
  if (u <= 127) {
135
- if (outIdx >= endIdx)
136
- break;
125
+ if (outIdx >= endIdx) break;
137
126
  heap[outIdx++] = u;
138
127
  } else if (u <= 2047) {
139
- if (outIdx + 1 >= endIdx)
140
- break;
128
+ if (outIdx + 1 >= endIdx) break;
141
129
  heap[outIdx++] = 192 | u >> 6;
142
130
  heap[outIdx++] = 128 | u & 63;
143
131
  } else if (u <= 65535) {
144
- if (outIdx + 2 >= endIdx)
145
- break;
132
+ if (outIdx + 2 >= endIdx) break;
146
133
  heap[outIdx++] = 224 | u >> 12;
147
134
  heap[outIdx++] = 128 | u >> 6 & 63;
148
135
  heap[outIdx++] = 128 | u & 63;
149
136
  } else {
150
- if (outIdx + 3 >= endIdx)
151
- break;
137
+ if (outIdx + 3 >= endIdx) break;
152
138
  heap[outIdx++] = 240 | u >> 18;
153
139
  heap[outIdx++] = 128 | u >> 12 & 63;
154
140
  heap[outIdx++] = 128 | u >> 6 & 63;
@@ -167,14 +153,10 @@ var Module = /* @__PURE__ */ function() {
167
153
  var u = str.charCodeAt(i);
168
154
  if (u >= 55296 && u <= 57343)
169
155
  u = 65536 + ((u & 1023) << 10) | str.charCodeAt(++i) & 1023;
170
- if (u <= 127)
171
- ++len;
172
- else if (u <= 2047)
173
- len += 2;
174
- else if (u <= 65535)
175
- len += 3;
176
- else
177
- len += 4;
156
+ if (u <= 127) ++len;
157
+ else if (u <= 2047) len += 2;
158
+ else if (u <= 65535) len += 3;
159
+ else len += 4;
178
160
  }
179
161
  return len;
180
162
  }
@@ -183,15 +165,13 @@ var Module = /* @__PURE__ */ function() {
183
165
  var endPtr = ptr;
184
166
  var idx = endPtr >> 1;
185
167
  var maxIdx = idx + maxBytesToRead / 2;
186
- while (!(idx >= maxIdx) && HEAPU16[idx])
187
- ++idx;
168
+ while (!(idx >= maxIdx) && HEAPU16[idx]) ++idx;
188
169
  endPtr = idx << 1;
189
170
  return UTF16Decoder.decode(HEAPU8.subarray(ptr, endPtr));
190
171
  var str = "";
191
172
  for (var i = 0; !(i >= maxBytesToRead / 2); ++i) {
192
173
  var codeUnit = HEAP16[ptr + i * 2 >> 1];
193
- if (codeUnit == 0)
194
- break;
174
+ if (codeUnit == 0) break;
195
175
  str += String.fromCharCode(codeUnit);
196
176
  }
197
177
  return str;
@@ -200,8 +180,7 @@ var Module = /* @__PURE__ */ function() {
200
180
  if (maxBytesToWrite === void 0) {
201
181
  maxBytesToWrite = 2147483647;
202
182
  }
203
- if (maxBytesToWrite < 2)
204
- return 0;
183
+ if (maxBytesToWrite < 2) return 0;
205
184
  maxBytesToWrite -= 2;
206
185
  var startPtr = outPtr;
207
186
  var numCharsToWrite = maxBytesToWrite < str.length * 2 ? maxBytesToWrite / 2 : str.length;
@@ -221,8 +200,7 @@ var Module = /* @__PURE__ */ function() {
221
200
  var str = "";
222
201
  while (!(i >= maxBytesToRead / 4)) {
223
202
  var utf32 = HEAP32[ptr + i * 4 >> 2];
224
- if (utf32 == 0)
225
- break;
203
+ if (utf32 == 0) break;
226
204
  ++i;
227
205
  if (utf32 >= 65536) {
228
206
  var ch = utf32 - 65536;
@@ -237,8 +215,7 @@ var Module = /* @__PURE__ */ function() {
237
215
  if (maxBytesToWrite === void 0) {
238
216
  maxBytesToWrite = 2147483647;
239
217
  }
240
- if (maxBytesToWrite < 4)
241
- return 0;
218
+ if (maxBytesToWrite < 4) return 0;
242
219
  var startPtr = outPtr;
243
220
  var endPtr = startPtr + maxBytesToWrite - 4;
244
221
  for (var i = 0; i < str.length; ++i) {
@@ -249,8 +226,7 @@ var Module = /* @__PURE__ */ function() {
249
226
  }
250
227
  HEAP32[outPtr >> 2] = codeUnit;
251
228
  outPtr += 4;
252
- if (outPtr + 4 > endPtr)
253
- break;
229
+ if (outPtr + 4 > endPtr) break;
254
230
  }
255
231
  HEAP32[outPtr >> 2] = 0;
256
232
  return outPtr - startPtr;
@@ -259,8 +235,7 @@ var Module = /* @__PURE__ */ function() {
259
235
  var len = 0;
260
236
  for (var i = 0; i < str.length; ++i) {
261
237
  var codeUnit = str.charCodeAt(i);
262
- if (codeUnit >= 55296 && codeUnit <= 57343)
263
- ++i;
238
+ if (codeUnit >= 55296 && codeUnit <= 57343) ++i;
264
239
  len += 4;
265
240
  }
266
241
  return len;
@@ -269,8 +244,7 @@ var Module = /* @__PURE__ */ function() {
269
244
  for (var i = 0; i < str.length; ++i) {
270
245
  HEAP8[buffer2++ >> 0] = str.charCodeAt(i);
271
246
  }
272
- if (!dontAddNull)
273
- HEAP8[buffer2 >> 0] = 0;
247
+ if (!dontAddNull) HEAP8[buffer2 >> 0] = 0;
274
248
  }
275
249
  function alignUp(x, multiple) {
276
250
  if (x % multiple > 0) {
@@ -1666,10 +1640,8 @@ var Module = /* @__PURE__ */ function() {
1666
1640
  this.status = status;
1667
1641
  }
1668
1642
  dependenciesFulfilled = function runCaller() {
1669
- if (!calledRun)
1670
- run();
1671
- if (!calledRun)
1672
- dependenciesFulfilled = runCaller;
1643
+ if (!calledRun) run();
1644
+ if (!calledRun) dependenciesFulfilled = runCaller;
1673
1645
  };
1674
1646
  function run(args) {
1675
1647
  args = args || arguments_;
@@ -1681,16 +1653,13 @@ var Module = /* @__PURE__ */ function() {
1681
1653
  return;
1682
1654
  }
1683
1655
  function doRun() {
1684
- if (calledRun)
1685
- return;
1656
+ if (calledRun) return;
1686
1657
  calledRun = true;
1687
1658
  Module2["calledRun"] = true;
1688
- if (ABORT)
1689
- return;
1659
+ if (ABORT) return;
1690
1660
  initRuntime();
1691
1661
  readyPromiseResolve(Module2);
1692
- if (Module2["onRuntimeInitialized"])
1693
- Module2["onRuntimeInitialized"]();
1662
+ if (Module2["onRuntimeInitialized"]) Module2["onRuntimeInitialized"]();
1694
1663
  postRun();
1695
1664
  }
1696
1665
  if (Module2["setStatus"]) {
@@ -1714,8 +1683,7 @@ var Module = /* @__PURE__ */ function() {
1714
1683
  if (keepRuntimeAlive()) {
1715
1684
  } else {
1716
1685
  exitRuntime();
1717
- if (Module2["onExit"])
1718
- Module2["onExit"](status);
1686
+ if (Module2["onExit"]) Module2["onExit"](status);
1719
1687
  ABORT = true;
1720
1688
  }
1721
1689
  quit_(status, new ExitStatus(status));
@@ -28,8 +28,7 @@ const heap = new Array(32).fill(void 0);
28
28
  heap.push(void 0, null, true, false);
29
29
  let heap_next = heap.length;
30
30
  function addHeapObject(obj) {
31
- if (heap_next === heap.length)
32
- heap.push(heap.length + 1);
31
+ if (heap_next === heap.length) heap.push(heap.length + 1);
33
32
  const idx = heap_next;
34
33
  heap_next = heap[idx];
35
34
  heap[idx] = obj;
@@ -71,8 +70,7 @@ function getObject(idx) {
71
70
  return heap[idx];
72
71
  }
73
72
  function dropObject(idx) {
74
- if (idx < 36)
75
- return;
73
+ if (idx < 36) return;
76
74
  heap[idx] = heap_next;
77
75
  heap_next = idx;
78
76
  }
@@ -42,10 +42,8 @@ var Module = /* @__PURE__ */ function() {
42
42
  scriptDirectory = dirname(getModuleURL(import.meta.url)) + "/";
43
43
  }
44
44
  read_ = function shell_read(filename, binary) {
45
- if (!nodeFS)
46
- nodeFS = require2("node:fs");
47
- if (!nodePath)
48
- nodePath = require2("node:path");
45
+ if (!nodeFS) nodeFS = require2("node:fs");
46
+ if (!nodePath) nodePath = require2("node:path");
49
47
  filename = nodePath["normalize"](filename);
50
48
  return nodeFS["readFileSync"](filename, binary ? null : "utf8");
51
49
  };
@@ -77,15 +75,11 @@ var Module = /* @__PURE__ */ function() {
77
75
  }
78
76
  }
79
77
  moduleOverrides = null;
80
- if (Module2["arguments"])
81
- arguments_ = Module2["arguments"];
82
- if (Module2["thisProgram"])
83
- thisProgram = Module2["thisProgram"];
84
- if (Module2["quit"])
85
- quit_ = Module2["quit"];
78
+ if (Module2["arguments"]) arguments_ = Module2["arguments"];
79
+ if (Module2["thisProgram"]) thisProgram = Module2["thisProgram"];
80
+ if (Module2["quit"]) quit_ = Module2["quit"];
86
81
  var wasmBinary;
87
- if (Module2["wasmBinary"])
88
- wasmBinary = Module2["wasmBinary"];
82
+ if (Module2["wasmBinary"]) wasmBinary = Module2["wasmBinary"];
89
83
  var noExitRuntime = Module2["noExitRuntime"] || true;
90
84
  if (typeof WebAssembly !== "object") {
91
85
  abort("no native wasm support detected");
@@ -100,16 +94,13 @@ var Module = /* @__PURE__ */ function() {
100
94
  }
101
95
  var UTF8Decoder = new TextDecoder("utf8");
102
96
  function UTF8ToString(ptr, maxBytesToRead) {
103
- if (!ptr)
104
- return "";
97
+ if (!ptr) return "";
105
98
  var maxPtr = ptr + maxBytesToRead;
106
- for (var end = ptr; !(end >= maxPtr) && HEAPU8[end]; )
107
- ++end;
99
+ for (var end = ptr; !(end >= maxPtr) && HEAPU8[end]; ) ++end;
108
100
  return UTF8Decoder.decode(HEAPU8.subarray(ptr, end));
109
101
  }
110
102
  function stringToUTF8Array(str, heap, outIdx, maxBytesToWrite) {
111
- if (!(maxBytesToWrite > 0))
112
- return 0;
103
+ if (!(maxBytesToWrite > 0)) return 0;
113
104
  var startIdx = outIdx;
114
105
  var endIdx = outIdx + maxBytesToWrite - 1;
115
106
  for (var i = 0; i < str.length; ++i) {
@@ -119,23 +110,19 @@ var Module = /* @__PURE__ */ function() {
119
110
  u = 65536 + ((u & 1023) << 10) | u1 & 1023;
120
111
  }
121
112
  if (u <= 127) {
122
- if (outIdx >= endIdx)
123
- break;
113
+ if (outIdx >= endIdx) break;
124
114
  heap[outIdx++] = u;
125
115
  } else if (u <= 2047) {
126
- if (outIdx + 1 >= endIdx)
127
- break;
116
+ if (outIdx + 1 >= endIdx) break;
128
117
  heap[outIdx++] = 192 | u >> 6;
129
118
  heap[outIdx++] = 128 | u & 63;
130
119
  } else if (u <= 65535) {
131
- if (outIdx + 2 >= endIdx)
132
- break;
120
+ if (outIdx + 2 >= endIdx) break;
133
121
  heap[outIdx++] = 224 | u >> 12;
134
122
  heap[outIdx++] = 128 | u >> 6 & 63;
135
123
  heap[outIdx++] = 128 | u & 63;
136
124
  } else {
137
- if (outIdx + 3 >= endIdx)
138
- break;
125
+ if (outIdx + 3 >= endIdx) break;
139
126
  heap[outIdx++] = 240 | u >> 18;
140
127
  heap[outIdx++] = 128 | u >> 12 & 63;
141
128
  heap[outIdx++] = 128 | u >> 6 & 63;
@@ -154,14 +141,10 @@ var Module = /* @__PURE__ */ function() {
154
141
  var u = str.charCodeAt(i);
155
142
  if (u >= 55296 && u <= 57343)
156
143
  u = 65536 + ((u & 1023) << 10) | str.charCodeAt(++i) & 1023;
157
- if (u <= 127)
158
- ++len;
159
- else if (u <= 2047)
160
- len += 2;
161
- else if (u <= 65535)
162
- len += 3;
163
- else
164
- len += 4;
144
+ if (u <= 127) ++len;
145
+ else if (u <= 2047) len += 2;
146
+ else if (u <= 65535) len += 3;
147
+ else len += 4;
165
148
  }
166
149
  return len;
167
150
  }
@@ -170,15 +153,13 @@ var Module = /* @__PURE__ */ function() {
170
153
  var endPtr = ptr;
171
154
  var idx = endPtr >> 1;
172
155
  var maxIdx = idx + maxBytesToRead / 2;
173
- while (!(idx >= maxIdx) && HEAPU16[idx])
174
- ++idx;
156
+ while (!(idx >= maxIdx) && HEAPU16[idx]) ++idx;
175
157
  endPtr = idx << 1;
176
158
  return UTF16Decoder.decode(HEAPU8.subarray(ptr, endPtr));
177
159
  var str = "";
178
160
  for (var i = 0; !(i >= maxBytesToRead / 2); ++i) {
179
161
  var codeUnit = HEAP16[ptr + i * 2 >> 1];
180
- if (codeUnit == 0)
181
- break;
162
+ if (codeUnit == 0) break;
182
163
  str += String.fromCharCode(codeUnit);
183
164
  }
184
165
  return str;
@@ -187,8 +168,7 @@ var Module = /* @__PURE__ */ function() {
187
168
  if (maxBytesToWrite === void 0) {
188
169
  maxBytesToWrite = 2147483647;
189
170
  }
190
- if (maxBytesToWrite < 2)
191
- return 0;
171
+ if (maxBytesToWrite < 2) return 0;
192
172
  maxBytesToWrite -= 2;
193
173
  var startPtr = outPtr;
194
174
  var numCharsToWrite = maxBytesToWrite < str.length * 2 ? maxBytesToWrite / 2 : str.length;
@@ -208,8 +188,7 @@ var Module = /* @__PURE__ */ function() {
208
188
  var str = "";
209
189
  while (!(i >= maxBytesToRead / 4)) {
210
190
  var utf32 = HEAP32[ptr + i * 4 >> 2];
211
- if (utf32 == 0)
212
- break;
191
+ if (utf32 == 0) break;
213
192
  ++i;
214
193
  if (utf32 >= 65536) {
215
194
  var ch = utf32 - 65536;
@@ -224,8 +203,7 @@ var Module = /* @__PURE__ */ function() {
224
203
  if (maxBytesToWrite === void 0) {
225
204
  maxBytesToWrite = 2147483647;
226
205
  }
227
- if (maxBytesToWrite < 4)
228
- return 0;
206
+ if (maxBytesToWrite < 4) return 0;
229
207
  var startPtr = outPtr;
230
208
  var endPtr = startPtr + maxBytesToWrite - 4;
231
209
  for (var i = 0; i < str.length; ++i) {
@@ -236,8 +214,7 @@ var Module = /* @__PURE__ */ function() {
236
214
  }
237
215
  HEAP32[outPtr >> 2] = codeUnit;
238
216
  outPtr += 4;
239
- if (outPtr + 4 > endPtr)
240
- break;
217
+ if (outPtr + 4 > endPtr) break;
241
218
  }
242
219
  HEAP32[outPtr >> 2] = 0;
243
220
  return outPtr - startPtr;
@@ -246,8 +223,7 @@ var Module = /* @__PURE__ */ function() {
246
223
  var len = 0;
247
224
  for (var i = 0; i < str.length; ++i) {
248
225
  var codeUnit = str.charCodeAt(i);
249
- if (codeUnit >= 55296 && codeUnit <= 57343)
250
- ++i;
226
+ if (codeUnit >= 55296 && codeUnit <= 57343) ++i;
251
227
  len += 4;
252
228
  }
253
229
  return len;
@@ -1416,10 +1392,8 @@ var Module = /* @__PURE__ */ function() {
1416
1392
  };
1417
1393
  var calledRun;
1418
1394
  dependenciesFulfilled = function runCaller() {
1419
- if (!calledRun)
1420
- run();
1421
- if (!calledRun)
1422
- dependenciesFulfilled = runCaller;
1395
+ if (!calledRun) run();
1396
+ if (!calledRun) dependenciesFulfilled = runCaller;
1423
1397
  };
1424
1398
  function run(args) {
1425
1399
  args = args || arguments_;
@@ -1431,16 +1405,13 @@ var Module = /* @__PURE__ */ function() {
1431
1405
  return;
1432
1406
  }
1433
1407
  function doRun() {
1434
- if (calledRun)
1435
- return;
1408
+ if (calledRun) return;
1436
1409
  calledRun = true;
1437
1410
  Module2["calledRun"] = true;
1438
- if (ABORT)
1439
- return;
1411
+ if (ABORT) return;
1440
1412
  initRuntime();
1441
1413
  readyPromiseResolve(Module2);
1442
- if (Module2["onRuntimeInitialized"])
1443
- Module2["onRuntimeInitialized"]();
1414
+ if (Module2["onRuntimeInitialized"]) Module2["onRuntimeInitialized"]();
1444
1415
  postRun();
1445
1416
  }
1446
1417
  if (Module2["setStatus"]) {
@@ -42,10 +42,8 @@ var Module = /* @__PURE__ */ function() {
42
42
  scriptDirectory = dirname(getModuleURL(import.meta.url)) + "/";
43
43
  }
44
44
  read_ = function shell_read(filename, binary) {
45
- if (!nodeFS)
46
- nodeFS = require2("node:fs");
47
- if (!nodePath)
48
- nodePath = require2("node:path");
45
+ if (!nodeFS) nodeFS = require2("node:fs");
46
+ if (!nodePath) nodePath = require2("node:path");
49
47
  filename = nodePath["normalize"](filename);
50
48
  return nodeFS["readFileSync"](filename, binary ? null : "utf8");
51
49
  };
@@ -77,15 +75,11 @@ var Module = /* @__PURE__ */ function() {
77
75
  }
78
76
  }
79
77
  moduleOverrides = null;
80
- if (Module2["arguments"])
81
- arguments_ = Module2["arguments"];
82
- if (Module2["thisProgram"])
83
- thisProgram = Module2["thisProgram"];
84
- if (Module2["quit"])
85
- quit_ = Module2["quit"];
78
+ if (Module2["arguments"]) arguments_ = Module2["arguments"];
79
+ if (Module2["thisProgram"]) thisProgram = Module2["thisProgram"];
80
+ if (Module2["quit"]) quit_ = Module2["quit"];
86
81
  var wasmBinary;
87
- if (Module2["wasmBinary"])
88
- wasmBinary = Module2["wasmBinary"];
82
+ if (Module2["wasmBinary"]) wasmBinary = Module2["wasmBinary"];
89
83
  var noExitRuntime = Module2["noExitRuntime"] || true;
90
84
  if (typeof WebAssembly !== "object") {
91
85
  abort("no native wasm support detected");
@@ -100,16 +94,13 @@ var Module = /* @__PURE__ */ function() {
100
94
  }
101
95
  var UTF8Decoder = new TextDecoder("utf8");
102
96
  function UTF8ToString(ptr, maxBytesToRead) {
103
- if (!ptr)
104
- return "";
97
+ if (!ptr) return "";
105
98
  var maxPtr = ptr + maxBytesToRead;
106
- for (var end = ptr; !(end >= maxPtr) && HEAPU8[end]; )
107
- ++end;
99
+ for (var end = ptr; !(end >= maxPtr) && HEAPU8[end]; ) ++end;
108
100
  return UTF8Decoder.decode(HEAPU8.subarray(ptr, end));
109
101
  }
110
102
  function stringToUTF8Array(str, heap, outIdx, maxBytesToWrite) {
111
- if (!(maxBytesToWrite > 0))
112
- return 0;
103
+ if (!(maxBytesToWrite > 0)) return 0;
113
104
  var startIdx = outIdx;
114
105
  var endIdx = outIdx + maxBytesToWrite - 1;
115
106
  for (var i = 0; i < str.length; ++i) {
@@ -119,23 +110,19 @@ var Module = /* @__PURE__ */ function() {
119
110
  u = 65536 + ((u & 1023) << 10) | u1 & 1023;
120
111
  }
121
112
  if (u <= 127) {
122
- if (outIdx >= endIdx)
123
- break;
113
+ if (outIdx >= endIdx) break;
124
114
  heap[outIdx++] = u;
125
115
  } else if (u <= 2047) {
126
- if (outIdx + 1 >= endIdx)
127
- break;
116
+ if (outIdx + 1 >= endIdx) break;
128
117
  heap[outIdx++] = 192 | u >> 6;
129
118
  heap[outIdx++] = 128 | u & 63;
130
119
  } else if (u <= 65535) {
131
- if (outIdx + 2 >= endIdx)
132
- break;
120
+ if (outIdx + 2 >= endIdx) break;
133
121
  heap[outIdx++] = 224 | u >> 12;
134
122
  heap[outIdx++] = 128 | u >> 6 & 63;
135
123
  heap[outIdx++] = 128 | u & 63;
136
124
  } else {
137
- if (outIdx + 3 >= endIdx)
138
- break;
125
+ if (outIdx + 3 >= endIdx) break;
139
126
  heap[outIdx++] = 240 | u >> 18;
140
127
  heap[outIdx++] = 128 | u >> 12 & 63;
141
128
  heap[outIdx++] = 128 | u >> 6 & 63;
@@ -154,14 +141,10 @@ var Module = /* @__PURE__ */ function() {
154
141
  var u = str.charCodeAt(i);
155
142
  if (u >= 55296 && u <= 57343)
156
143
  u = 65536 + ((u & 1023) << 10) | str.charCodeAt(++i) & 1023;
157
- if (u <= 127)
158
- ++len;
159
- else if (u <= 2047)
160
- len += 2;
161
- else if (u <= 65535)
162
- len += 3;
163
- else
164
- len += 4;
144
+ if (u <= 127) ++len;
145
+ else if (u <= 2047) len += 2;
146
+ else if (u <= 65535) len += 3;
147
+ else len += 4;
165
148
  }
166
149
  return len;
167
150
  }
@@ -170,15 +153,13 @@ var Module = /* @__PURE__ */ function() {
170
153
  var endPtr = ptr;
171
154
  var idx = endPtr >> 1;
172
155
  var maxIdx = idx + maxBytesToRead / 2;
173
- while (!(idx >= maxIdx) && HEAPU16[idx])
174
- ++idx;
156
+ while (!(idx >= maxIdx) && HEAPU16[idx]) ++idx;
175
157
  endPtr = idx << 1;
176
158
  return UTF16Decoder.decode(HEAPU8.subarray(ptr, endPtr));
177
159
  var str = "";
178
160
  for (var i = 0; !(i >= maxBytesToRead / 2); ++i) {
179
161
  var codeUnit = HEAP16[ptr + i * 2 >> 1];
180
- if (codeUnit == 0)
181
- break;
162
+ if (codeUnit == 0) break;
182
163
  str += String.fromCharCode(codeUnit);
183
164
  }
184
165
  return str;
@@ -187,8 +168,7 @@ var Module = /* @__PURE__ */ function() {
187
168
  if (maxBytesToWrite === void 0) {
188
169
  maxBytesToWrite = 2147483647;
189
170
  }
190
- if (maxBytesToWrite < 2)
191
- return 0;
171
+ if (maxBytesToWrite < 2) return 0;
192
172
  maxBytesToWrite -= 2;
193
173
  var startPtr = outPtr;
194
174
  var numCharsToWrite = maxBytesToWrite < str.length * 2 ? maxBytesToWrite / 2 : str.length;
@@ -208,8 +188,7 @@ var Module = /* @__PURE__ */ function() {
208
188
  var str = "";
209
189
  while (!(i >= maxBytesToRead / 4)) {
210
190
  var utf32 = HEAP32[ptr + i * 4 >> 2];
211
- if (utf32 == 0)
212
- break;
191
+ if (utf32 == 0) break;
213
192
  ++i;
214
193
  if (utf32 >= 65536) {
215
194
  var ch = utf32 - 65536;
@@ -224,8 +203,7 @@ var Module = /* @__PURE__ */ function() {
224
203
  if (maxBytesToWrite === void 0) {
225
204
  maxBytesToWrite = 2147483647;
226
205
  }
227
- if (maxBytesToWrite < 4)
228
- return 0;
206
+ if (maxBytesToWrite < 4) return 0;
229
207
  var startPtr = outPtr;
230
208
  var endPtr = startPtr + maxBytesToWrite - 4;
231
209
  for (var i = 0; i < str.length; ++i) {
@@ -236,8 +214,7 @@ var Module = /* @__PURE__ */ function() {
236
214
  }
237
215
  HEAP32[outPtr >> 2] = codeUnit;
238
216
  outPtr += 4;
239
- if (outPtr + 4 > endPtr)
240
- break;
217
+ if (outPtr + 4 > endPtr) break;
241
218
  }
242
219
  HEAP32[outPtr >> 2] = 0;
243
220
  return outPtr - startPtr;
@@ -246,8 +223,7 @@ var Module = /* @__PURE__ */ function() {
246
223
  var len = 0;
247
224
  for (var i = 0; i < str.length; ++i) {
248
225
  var codeUnit = str.charCodeAt(i);
249
- if (codeUnit >= 55296 && codeUnit <= 57343)
250
- ++i;
226
+ if (codeUnit >= 55296 && codeUnit <= 57343) ++i;
251
227
  len += 4;
252
228
  }
253
229
  return len;
@@ -1583,10 +1559,8 @@ var Module = /* @__PURE__ */ function() {
1583
1559
  };
1584
1560
  var calledRun;
1585
1561
  dependenciesFulfilled = function runCaller() {
1586
- if (!calledRun)
1587
- run();
1588
- if (!calledRun)
1589
- dependenciesFulfilled = runCaller;
1562
+ if (!calledRun) run();
1563
+ if (!calledRun) dependenciesFulfilled = runCaller;
1590
1564
  };
1591
1565
  function run(args) {
1592
1566
  args = args || arguments_;
@@ -1598,16 +1572,13 @@ var Module = /* @__PURE__ */ function() {
1598
1572
  return;
1599
1573
  }
1600
1574
  function doRun() {
1601
- if (calledRun)
1602
- return;
1575
+ if (calledRun) return;
1603
1576
  calledRun = true;
1604
1577
  Module2["calledRun"] = true;
1605
- if (ABORT)
1606
- return;
1578
+ if (ABORT) return;
1607
1579
  initRuntime();
1608
1580
  readyPromiseResolve(Module2);
1609
- if (Module2["onRuntimeInitialized"])
1610
- Module2["onRuntimeInitialized"]();
1581
+ if (Module2["onRuntimeInitialized"]) Module2["onRuntimeInitialized"]();
1611
1582
  postRun();
1612
1583
  }
1613
1584
  if (Module2["setStatus"]) {
@@ -1,8 +1,6 @@
1
1
  function getAssetsPrefix(fileExtension, assetsPrefix) {
2
- if (!assetsPrefix)
3
- return "";
4
- if (typeof assetsPrefix === "string")
5
- return assetsPrefix;
2
+ if (!assetsPrefix) return "";
3
+ if (typeof assetsPrefix === "string") return assetsPrefix;
6
4
  const dotLessFileExtension = fileExtension.slice(1);
7
5
  if (assetsPrefix[dotLessFileExtension]) {
8
6
  return assetsPrefix[dotLessFileExtension];
@@ -42,8 +42,7 @@ function isRemoteAllowed(src, {
42
42
  domains = [],
43
43
  remotePatterns = []
44
44
  }) {
45
- if (!isRemotePath(src))
46
- return false;
45
+ if (!isRemotePath(src)) return false;
47
46
  const url = new URL(src);
48
47
  return domains.some((domain) => matchHostname(url, domain)) || remotePatterns.some((remotePattern) => matchPattern(url, remotePattern));
49
48
  }
@@ -10,8 +10,7 @@ async function probe(url) {
10
10
  while (!done) {
11
11
  const readResult = await reader.read();
12
12
  done = readResult.done;
13
- if (done)
14
- break;
13
+ if (done) break;
15
14
  if (readResult.value) {
16
15
  value = readResult.value;
17
16
  let tmp = new Uint8Array(accumulatedChunks.length + value.length);