@qwik.dev/core 2.0.0-beta.42 → 2.0.0-beta.45

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.
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * @qwik.dev/core/optimizer 2.0.0-beta.42-dev+3473a49
3
+ * @qwik.dev/core/optimizer 2.0.0-beta.45-dev+596de70
4
4
  * Copyright QwikDev. All Rights Reserved.
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://github.com/QwikDev/qwik/blob/main/LICENSE
@@ -23,7 +23,7 @@ function r(e, r) {
23
23
  for (let [t, r] of Object.entries(e.mapping)) {
24
24
  if (t.startsWith("_") && t.length < 10) continue;
25
25
  let e = n(t);
26
- e && (o[e] = { dynamicImports: [r] });
26
+ e && (o[e] = { qrlImports: [r] });
27
27
  }
28
28
  if (r) {
29
29
  let t = {
@@ -32,11 +32,14 @@ function r(e, r) {
32
32
  };
33
33
  for (let e of r) {
34
34
  let n = e(t);
35
- n && Object.assign(o, n);
35
+ if (n) for (let [e, t] of Object.entries(n)) o[e] = {
36
+ ...t,
37
+ qrlImports: t.dynamicImports
38
+ };
36
39
  }
37
40
  }
38
41
  for (let e of Object.keys(o)) {
39
- let t = o[e], n = t.imports?.filter((e) => o[e]) || [], r = t.dynamicImports?.filter((e) => o[e] && (o[e].symbols || o[e].origins?.some((e) => !e.includes("node_modules")))) || [];
42
+ let t = o[e], n = t.imports?.filter((e) => o[e]) || [], r = t.qrlImports?.filter((e) => o[e]) || [];
40
43
  o[e] = {
41
44
  ...t,
42
45
  imports: n,
@@ -263,8 +266,16 @@ function h(e) {
263
266
  for (let i of t[n]) e[i].total = r;
264
267
  }
265
268
  }
266
- function g(e, t, n, r, i, a, s, c, l, u) {
267
- let f = {
269
+ function g(e, t, n, r) {
270
+ let i = /* @__PURE__ */ new Set();
271
+ for (let a of Object.keys(e.modules)) for (let e of r(a)?.dynamicallyImportedIds || []) {
272
+ let a = n.get(e), o = r(e)?.meta.segment;
273
+ a && a !== t && o && i.add(a);
274
+ }
275
+ return [...i];
276
+ }
277
+ function _(e, t, n, r, i, a, s, c, l, u, f) {
278
+ let p = {
268
279
  version: "1",
269
280
  manifestHash: "",
270
281
  options: {
@@ -282,24 +293,25 @@ function g(e, t, n, r, i, a, s, c, l, u) {
282
293
  assets: {},
283
294
  symbols: {},
284
295
  bundleGraph: void 0
285
- }, p = (e) => {
296
+ }, _ = (e) => {
286
297
  let t = r[e];
287
298
  if (!t) {
288
299
  console.warn(`Client manifest generation: skipping external import "${e}"`);
289
300
  return;
290
301
  }
291
302
  return s(t.fileName);
292
- }, g, _, v;
293
- f.qwikLoader = c ? s(c) : void 0;
303
+ }, v, y, b;
304
+ p.qwikLoader = l ? s(l) : void 0;
294
305
  for (let e of Object.values(r)) {
295
- let t = p(e.fileName);
296
- e.name === "qwik-core" && (g = t, v = t, f.core = t), e.name === "qwik-preloader" && (_ = t, f.preloader = t);
306
+ let t = _(e.fileName);
307
+ e.name === "qwik-core" && (v = t, b = t, p.core = t), e.name === "qwik-preloader" && (y = t, p.preloader = t);
297
308
  }
298
- l && l in r && (f.preloader = s(l)), u && u in r && (v = s(u));
299
- let y = new Set(t.map((e) => e.name));
309
+ u && u in r && (p.preloader = s(u)), f && f in r && (b = s(f));
310
+ let x = new Set(t.map((e) => e.name)), S = /* @__PURE__ */ new Map();
311
+ for (let e of Object.values(r)) if (e.type === "chunk") for (let t of Object.keys(e.modules)) S.set(t, _(e.fileName));
300
312
  for (let t of Object.values(r)) {
301
313
  if (t.type === "asset") {
302
- t.fileName.endsWith("js.map") || (f.assets[t.fileName] = {
314
+ t.fileName.endsWith("js.map") || (p.assets[t.fileName] = {
303
315
  name: t.names[0],
304
316
  size: t.source.length
305
317
  });
@@ -309,21 +321,25 @@ function g(e, t, n, r, i, a, s, c, l, u) {
309
321
  size: t.code.length,
310
322
  total: -1
311
323
  };
312
- for (let e of t.exports) y.has(e) && (!f.mapping[e] || t.exports.length !== 1) && (f.mapping[e] = n);
313
- let a = t.imports.map((e) => p(e)).filter((e) => e !== _ && e !== g && e !== v).filter(Boolean);
324
+ for (let e of t.exports) x.has(e) && (!p.mapping[e] || t.exports.length !== 1) && (p.mapping[e] = n);
325
+ let a = t.imports.map((e) => _(e)).filter((e) => e !== y && e !== v && e !== b).filter(Boolean);
314
326
  a.length > 0 && (r.imports = a);
315
- let o = t.dynamicImports.map((e) => p(e)).filter(Boolean);
316
- o.length > 0 && (r.dynamicImports = o);
317
- let c = (t.moduleIds || Object.keys(t.modules)).filter((e) => !e.startsWith("\0")).map((t) => e.relative(i.rootDir, t));
318
- c.length > 0 && (r.origins = c), f.bundles[n] = r;
327
+ let o = t.dynamicImports.map((e) => _(e)).filter(Boolean);
328
+ if (o.length > 0) {
329
+ r.dynamicImports = o;
330
+ let e = g(t, n, S, c);
331
+ e.length > 0 && (r.qrlImports = e);
332
+ }
333
+ let l = (t.moduleIds || Object.keys(t.modules)).filter((e) => !e.startsWith("\0")).map((t) => e.relative(i.rootDir, t));
334
+ l.length > 0 && (r.origins = l), p.bundles[n] = r;
319
335
  }
320
336
  for (let e of t) {
321
- let t = e.name, n = f.mapping[t];
337
+ let t = e.name, n = p.mapping[t];
322
338
  if (!n) {
323
- a(`Note: qrl ${e.name} is not in the bundle, likely tree shaken`, f);
339
+ a(`Note: qrl ${e.name} is not in the bundle, likely tree shaken`, p);
324
340
  continue;
325
341
  }
326
- (f.bundles[n].symbols ||= []).push(t), f.symbols[t] = {
342
+ (p.bundles[n].symbols ||= []).push(t), p.symbols[t] = {
327
343
  displayName: e.displayName,
328
344
  hash: e.hash,
329
345
  ctxKind: e.ctxKind,
@@ -337,7 +353,7 @@ function g(e, t, n, r, i, a, s, c, l, u) {
337
353
  captureNames: e.captureNames
338
354
  };
339
355
  }
340
- if (v) for (let e of o) f.symbols[e] = {
356
+ if (b) for (let e of o) p.symbols[e] = {
341
357
  origin: "Qwik core",
342
358
  displayName: e,
343
359
  canonicalFilename: "",
@@ -347,14 +363,14 @@ function g(e, t, n, r, i, a, s, c, l, u) {
347
363
  captures: !1,
348
364
  parent: null,
349
365
  loc: [0, 0]
350
- }, f.mapping[e] = v;
366
+ }, p.mapping[e] = b;
351
367
  else console.error("Qwik core bundle not found, is Qwik actually used in this project?");
352
- for (let e of Object.values(f.bundles)) e.interactivity = m(e, f);
353
- return h(f.bundles), d(f);
368
+ for (let e of Object.values(p.bundles)) e.interactivity = m(e, p);
369
+ return h(p.bundles), d(p);
354
370
  }
355
371
  //#endregion
356
372
  //#region packages/qwik-vite/src/plugins/eslint-plugin.ts
357
- async function _(e, t, n) {
373
+ async function v(e, t, n) {
358
374
  let r = await e.dynamicImport("eslint"), i = new r.ESLint({ cache: !0 });
359
375
  if ((await i.calculateConfigForFile("no-real-file.tsx")).parser === null) {
360
376
  let e = {
@@ -371,12 +387,12 @@ async function _(e, t, n) {
371
387
  }
372
388
  return { async lint(e, t, n) {
373
389
  try {
374
- let r = v(n);
390
+ let r = y(n);
375
391
  if (await i.isPathIgnored(r)) return null;
376
392
  (await i.lintText(t, { filePath: r })).forEach((t) => {
377
393
  for (let n of t.messages) {
378
394
  if (n.ruleId != null && !n.ruleId.startsWith("qwik/")) continue;
379
- let r = y(t.filePath, n);
395
+ let r = b(t.filePath, n);
380
396
  e.warn(r);
381
397
  }
382
398
  });
@@ -385,10 +401,10 @@ async function _(e, t, n) {
385
401
  }
386
402
  } };
387
403
  }
388
- function v(e) {
404
+ function y(e) {
389
405
  return e.split("?", 2)[0];
390
406
  }
391
- function y(e, t) {
407
+ function b(e, t) {
392
408
  return Object.assign(Error(t.message), {
393
409
  id: e,
394
410
  plugin: "vite-plugin-eslint",
@@ -402,18 +418,18 @@ function y(e, t) {
402
418
  }
403
419
  //#endregion
404
420
  //#region packages/qwik-vite/src/plugins/server-only-modules.ts
405
- var b = /\.server\.[cm]?[jt]sx?$/, x = /\.server\.[cm]?[jt]sx?_/, S = /(^|\/)server(\/|$)/, ee = (e) => e.includes(".server") || e.includes("/server") || e.includes("\\server") || e.includes("server/") || e.includes("server\\"), C = (e) => e.replace(/\\/g, "/").replace(/^\/@fs\//, ""), w = (e, t) => {
406
- let n = C(e), r = t.rootDir ? C(t.rootDir).replace(/\/+$/, "") : "";
421
+ var x = /\.server\.[cm]?[jt]sx?$/, S = /\.server\.[cm]?[jt]sx?_/, C = /(^|\/)server(\/|$)/, ee = (e) => e.includes(".server") || e.includes("/server") || e.includes("\\server") || e.includes("server/") || e.includes("server\\"), w = (e) => e.replace(/\\/g, "/").replace(/^\/@fs\//, ""), T = (e, t) => {
422
+ let n = w(e), r = t.rootDir ? w(t.rootDir).replace(/\/+$/, "") : "";
407
423
  return r && (n === r || n.startsWith(r + "/")) ? n : r && n.startsWith("/") && !n.startsWith("//") && !/^[a-zA-Z]:\//.test(n) ? `${r}${n}` : n;
408
- }, T = (e) => {
409
- let t = C(e);
410
- return b.test(t) || x.test(t);
411
- }, E = (e, t) => {
424
+ }, E = (e) => {
425
+ let t = w(e);
426
+ return x.test(t) || S.test(t);
427
+ }, D = (e, t) => {
412
428
  let n = typeof t == "string" || t == null ? { srcDir: t } : t;
413
429
  if (!n.srcDir) return !1;
414
- let r = w(e, n), i = C(n.srcDir).replace(/\/+$/, "");
415
- return r.startsWith(i + "/") ? S.test(r.slice(i.length + 1)) : !1;
416
- }, D = (e, t) => T(e) || E(e, t), te = (e, t) => `Server-only module cannot be imported by client code.\n\nServer-only module: ${e}${t ? `\nImporter: ${t}` : ""}\n\nFiles named \`.server.*\` or placed under \`src/**/server/**\` are excluded from client bundles. Move this import behind SSR-only route loaders, actions, endpoint handlers, or expose the operation through an intentional \`server$\` API.`, O = (e, t, n, r) => ({
430
+ let r = T(e, n), i = w(n.srcDir).replace(/\/+$/, "");
431
+ return r.startsWith(i + "/") ? C.test(r.slice(i.length + 1)) : !1;
432
+ }, te = (e, t) => E(e) || D(e, t), ne = (e, t) => `Server-only module cannot be imported by client code.\n\nServer-only module: ${e}${t ? `\nImporter: ${t}` : ""}\n\nFiles named \`.server.*\` or placed under \`src/**/server/**\` are excluded from client bundles. Move this import behind SSR-only route loaders, actions, endpoint handlers, or expose the operation through an intentional \`server$\` API.`, O = (e, t, n, r) => ({
417
433
  message: e,
418
434
  id: t,
419
435
  plugin: n,
@@ -451,19 +467,19 @@ var b = /\.server\.[cm]?[jt]sx?$/, x = /\.server\.[cm]?[jt]sx?_/, S = /(^|\/)ser
451
467
  } catch {
452
468
  return;
453
469
  }
454
- }, M = /\r?\n/, N = 2;
455
- function ne(e, t) {
470
+ }, M = /\r?\n/, re = 2;
471
+ function N(e, t) {
456
472
  if (typeof t == "number") return t;
457
473
  if (t.lo != null) return t.lo;
458
474
  let n = e.split(M), { line: r, column: i } = t, a = 0;
459
475
  for (let e = 0; e < r - 1 && e < n.length; e++) a += n[e].length + 1;
460
476
  return a + i;
461
477
  }
462
- function P(e, t = 0, n) {
463
- t = ne(e, t), n ||= t;
478
+ function ie(e, t = 0, n) {
479
+ t = N(e, t), n ||= t;
464
480
  let r = e.split(M), i = 0, a = [];
465
481
  for (let e = 0; e < r.length; e++) if (i += r[e].length + 1, i >= t) {
466
- for (let o = e - N; o <= e + N || n > i; o++) {
482
+ for (let o = e - re; o <= e + re || n > i; o++) {
467
483
  if (o < 0 || o >= r.length) continue;
468
484
  let s = o + 1;
469
485
  a.push(`${s}${" ".repeat(Math.max(3 - String(s).length, 0))}| ${r[o]}`);
@@ -483,10 +499,10 @@ function P(e, t = 0, n) {
483
499
  }
484
500
  return a.join("\n");
485
501
  }
486
- function re(e) {
502
+ function ae(e) {
487
503
  return e === "win32";
488
504
  }
489
- function F(e) {
505
+ function P(e) {
490
506
  let [t, n] = e.split("?"), r = n || "";
491
507
  return {
492
508
  originalId: e,
@@ -495,63 +511,63 @@ function F(e) {
495
511
  params: new URLSearchParams(r)
496
512
  };
497
513
  }
498
- var ie = (e) => e.replace(/^[A-Za-z]:/, "").replace(/^(\.\.[/\\])+/, "").replace(/^\.[/\\]/, "").replace(/^[/\\]+/, "").replace(/[/\\]+/g, "-"), I = /* @__PURE__ */ new Set([
514
+ var F = (e) => e.replace(/^[A-Za-z]:/, "").replace(/^(\.\.[/\\])+/, "").replace(/^\.[/\\]/, "").replace(/^[/\\]+/, "").replace(/[/\\]+/g, "-"), oe = /* @__PURE__ */ new Set([
499
515
  "qwik-core",
500
516
  "qwikloader",
501
517
  "qwik-preloader"
502
- ]), ae = (e) => {
518
+ ]), se = (e) => {
503
519
  if (!e) return null;
504
- let t = /[/\\]/.test(e) ? ie(e) : e;
505
- return t ? I.has(t) ? `${t}-segment` : t : null;
506
- }, oe = 44, se = 59, ce = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", le = /* @__PURE__ */ new Uint8Array(64), ue = /* @__PURE__ */ new Uint8Array(128);
507
- for (let e = 0; e < ce.length; e++) {
508
- let t = ce.charCodeAt(e);
509
- le[e] = t, ue[t] = e;
510
- }
511
- function L(e, t, n) {
512
- let r = t - n;
513
- r = r < 0 ? -r << 1 | 1 : r << 1;
520
+ let t = /[/\\]/.test(e) ? F(e) : e;
521
+ return t ? oe.has(t) ? `${t}-segment` : t : null;
522
+ }, ce = 44, le = 59, ue = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", de = /* @__PURE__ */ new Uint8Array(64), fe = /* @__PURE__ */ new Uint8Array(128);
523
+ for (let e = 0; e < ue.length; e++) {
524
+ let t = ue.charCodeAt(e);
525
+ de[e] = t, fe[t] = e;
526
+ }
527
+ function I(e, t) {
514
528
  do {
515
- let t = r & 31;
516
- r >>>= 5, r > 0 && (t |= 32), e.write(le[t]);
517
- } while (r > 0);
518
- return t;
529
+ let n = t & 31;
530
+ t >>>= 5, t > 0 && (n |= 32), e.write(de[n]);
531
+ } while (t > 0);
532
+ }
533
+ function L(e) {
534
+ return e < 0 ? -e << 1 | 1 : e << 1;
519
535
  }
520
- var de = 16384, R = typeof TextDecoder < "u" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer < "u" ? { decode(e) {
536
+ var pe = 16384, me = typeof TextDecoder < "u" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer < "u" ? { decode(e) {
521
537
  return Buffer.from(e.buffer, e.byteOffset, e.byteLength).toString();
522
538
  } } : { decode(e) {
523
539
  let t = "";
524
540
  for (let n = 0; n < e.length; n++) t += String.fromCharCode(e[n]);
525
541
  return t;
526
- } }, fe = class {
542
+ } }, he = class {
527
543
  constructor() {
528
- this.pos = 0, this.out = "", this.buffer = new Uint8Array(de);
544
+ this.pos = 0, this.out = "", this.buffer = new Uint8Array(pe);
529
545
  }
530
546
  write(e) {
531
547
  let { buffer: t } = this;
532
- t[this.pos++] = e, this.pos === de && (this.out += R.decode(t), this.pos = 0);
548
+ t[this.pos++] = e, this.pos === pe && (this.out += me.decode(t), this.pos = 0);
533
549
  }
534
550
  flush() {
535
551
  let { buffer: e, out: t, pos: n } = this;
536
- return n > 0 ? t + R.decode(e.subarray(0, n)) : t;
552
+ return n > 0 ? t + me.decode(e.subarray(0, n)) : t;
537
553
  }
538
554
  };
539
- function pe(e) {
540
- let t = new fe(), n = 0, r = 0, i = 0, a = 0;
555
+ function R(e) {
556
+ let t = new he(), n = 0, r = 0, i = 0, a = 0;
541
557
  for (let o = 0; o < e.length; o++) {
542
558
  let s = e[o];
543
- if (o > 0 && t.write(se), s.length === 0) continue;
559
+ if (o > 0 && t.write(le), s.length === 0) continue;
544
560
  let c = 0;
545
561
  for (let e = 0; e < s.length; e++) {
546
562
  let o = s[e];
547
- e > 0 && t.write(oe), c = L(t, o[0], c), o.length !== 1 && (n = L(t, o[1], n), r = L(t, o[2], r), i = L(t, o[3], i), o.length !== 4 && (a = L(t, o[4], a)));
563
+ e > 0 && t.write(ce), I(t, L(o[0] - c)), c = o[0], o.length !== 1 && (I(t, L(o[1] - n)), I(t, L(o[2] - r)), I(t, L(o[3] - i)), n = o[1], r = o[2], i = o[3], o.length !== 4 && (I(t, L(o[4] - a)), a = o[4]));
548
564
  }
549
565
  }
550
566
  return t.flush();
551
567
  }
552
568
  //#endregion
553
569
  //#region node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.mjs
554
- var me = class e {
570
+ var ge = class e {
555
571
  constructor(t) {
556
572
  this.bits = t instanceof e ? t.bits.slice() : [];
557
573
  }
@@ -561,7 +577,7 @@ var me = class e {
561
577
  has(e) {
562
578
  return !!(this.bits[e >> 5] & 1 << (e & 31));
563
579
  }
564
- }, z = class e {
580
+ }, _e = class e {
565
581
  constructor(e, t, n) {
566
582
  this.start = e, this.end = t, this.original = n, this.intro = "", this.outro = "", this.content = n, this.storeName = !1, this.edited = !1, this.previous = null, this.next = null;
567
583
  }
@@ -626,23 +642,23 @@ var me = class e {
626
642
  if (this.edit("", void 0, !0), this.outro = this.outro.replace(e, ""), this.outro.length) return !0;
627
643
  }
628
644
  };
629
- function he() {
645
+ function ve() {
630
646
  return typeof globalThis < "u" && typeof globalThis.btoa == "function" ? (e) => globalThis.btoa(unescape(encodeURIComponent(e))) : typeof Buffer == "function" ? (e) => Buffer.from(e, "utf-8").toString("base64") : () => {
631
647
  throw Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.");
632
648
  };
633
649
  }
634
- var ge = /*#__PURE__*/ he(), _e = class {
650
+ var ye = /*#__PURE__*/ ve(), be = class {
635
651
  constructor(e) {
636
- this.version = 3, this.file = e.file, this.sources = e.sources, this.sourcesContent = e.sourcesContent, this.names = e.names, this.mappings = pe(e.mappings), e.x_google_ignoreList !== void 0 && (this.x_google_ignoreList = e.x_google_ignoreList), e.debugId !== void 0 && (this.debugId = e.debugId);
652
+ this.version = 3, this.file = e.file, this.sources = e.sources, this.sourcesContent = e.sourcesContent, this.names = e.names, this.mappings = R(e.mappings), e.x_google_ignoreList !== void 0 && (this.x_google_ignoreList = e.x_google_ignoreList), e.debugId !== void 0 && (this.debugId = e.debugId);
637
653
  }
638
654
  toString() {
639
655
  return JSON.stringify(this);
640
656
  }
641
657
  toUrl() {
642
- return "data:application/json;charset=utf-8;base64," + ge(this.toString());
658
+ return "data:application/json;charset=utf-8;base64," + ye(this.toString());
643
659
  }
644
660
  };
645
- function ve(e) {
661
+ function z(e) {
646
662
  let t = e.split("\n"), n = t.filter((e) => /^\t+/.test(e)), r = t.filter((e) => /^ {2,}/.test(e));
647
663
  if (n.length === 0 && r.length === 0) return null;
648
664
  if (n.length >= r.length) return " ";
@@ -652,7 +668,7 @@ function ve(e) {
652
668
  }, Infinity);
653
669
  return Array(i + 1).join(" ");
654
670
  }
655
- function ye(e, t) {
671
+ function xe(e, t) {
656
672
  let n = e.split(/[/\\]/), r = t.split(/[/\\]/);
657
673
  for (n.pop(); n[0] === r[0];) n.shift(), r.shift();
658
674
  if (n.length) {
@@ -661,11 +677,11 @@ function ye(e, t) {
661
677
  }
662
678
  return n.concat(r).join("/");
663
679
  }
664
- var B = Object.prototype.toString;
665
- function be(e) {
666
- return B.call(e) === "[object Object]";
680
+ var Se = Object.prototype.toString;
681
+ function B(e) {
682
+ return Se.call(e) === "[object Object]";
667
683
  }
668
- function xe(e) {
684
+ function V(e) {
669
685
  let t = e.split("\n"), n = [];
670
686
  for (let e = 0, r = 0; e < t.length; e++) n.push(r), r += t[e].length + 1;
671
687
  return function(e) {
@@ -681,7 +697,7 @@ function xe(e) {
681
697
  };
682
698
  };
683
699
  }
684
- var V = /\w/, Se = class {
700
+ var Ce = /\w/, we = class {
685
701
  constructor(e) {
686
702
  this.hires = e, this.generatedCodeLine = 0, this.generatedCodeColumn = 0, this.raw = [], this.rawSegments = this.raw[this.generatedCodeLine] = [], this.pending = null;
687
703
  }
@@ -719,7 +735,7 @@ var V = /\w/, Se = class {
719
735
  r.line,
720
736
  r.column
721
737
  ];
722
- this.hires === "boundary" ? V.test(n[a]) ? s ||= (this.rawSegments.push(t), !0) : (this.rawSegments.push(t), s = !1) : this.rawSegments.push(t);
738
+ this.hires === "boundary" ? Ce.test(n[a]) ? s ||= (this.rawSegments.push(t), !0) : (this.rawSegments.push(t), s = !1) : this.rawSegments.push(t);
723
739
  }
724
740
  r.column += 1, this.generatedCodeColumn += 1, o = !1;
725
741
  }
@@ -740,9 +756,9 @@ var V = /\w/, Se = class {
740
756
  insertLeft: !1,
741
757
  insertRight: !1,
742
758
  storeName: !1
743
- }, Ce = class e {
759
+ }, Te = class e {
744
760
  constructor(e, t = {}) {
745
- let n = new z(0, e.length, e);
761
+ let n = new _e(0, e.length, e);
746
762
  Object.defineProperties(this, {
747
763
  original: {
748
764
  writable: !0,
@@ -786,7 +802,7 @@ var V = /\w/, Se = class {
786
802
  },
787
803
  sourcemapLocations: {
788
804
  writable: !0,
789
- value: new me()
805
+ value: new ge()
790
806
  },
791
807
  storedNames: {
792
808
  writable: !0,
@@ -835,17 +851,17 @@ var V = /\w/, Se = class {
835
851
  let e = n.next, i = e && e.clone();
836
852
  i && (r.next = i, i.previous = r, r = i), n = e;
837
853
  }
838
- return t.lastChunk = r, this.indentExclusionRanges && (t.indentExclusionRanges = this.indentExclusionRanges.slice()), t.sourcemapLocations = new me(this.sourcemapLocations), t.intro = this.intro, t.outro = this.outro, t;
854
+ return t.lastChunk = r, this.indentExclusionRanges && (t.indentExclusionRanges = this.indentExclusionRanges.slice()), t.sourcemapLocations = new ge(this.sourcemapLocations), t.intro = this.intro, t.outro = this.outro, t;
839
855
  }
840
856
  generateDecodedMap(e) {
841
857
  e ||= {};
842
- let t = Object.keys(this.storedNames), n = new Se(e.hires), r = xe(this.original);
858
+ let t = Object.keys(this.storedNames), n = new we(e.hires), r = V(this.original);
843
859
  return this.intro && n.advance(this.intro), this.firstChunk.eachNext((e) => {
844
860
  let i = r(e.start);
845
861
  e.intro.length && n.advance(e.intro), e.edited ? n.addEdit(0, e.content, i, e.storeName ? t.indexOf(e.original) : -1) : n.addUneditedChunk(0, e, this.original, i, this.sourcemapLocations), e.outro.length && n.advance(e.outro);
846
862
  }), this.outro && n.advance(this.outro), {
847
863
  file: e.file ? e.file.split(/[/\\]/).pop() : void 0,
848
- sources: [e.source ? ye(e.file || "", e.source) : e.file || ""],
864
+ sources: [e.source ? xe(e.file || "", e.source) : e.file || ""],
849
865
  sourcesContent: e.includeContent ? [this.original] : void 0,
850
866
  names: t,
851
867
  mappings: n.raw,
@@ -853,10 +869,10 @@ var V = /\w/, Se = class {
853
869
  };
854
870
  }
855
871
  generateMap(e) {
856
- return new _e(this.generateDecodedMap(e));
872
+ return new be(this.generateDecodedMap(e));
857
873
  }
858
874
  _ensureindentStr() {
859
- this.indentStr === void 0 && (this.indentStr = ve(this.original));
875
+ this.indentStr === void 0 && (this.indentStr = z(this.original));
860
876
  }
861
877
  _getRawIndentString() {
862
878
  return this._ensureindentStr(), this.indentStr;
@@ -866,7 +882,7 @@ var V = /\w/, Se = class {
866
882
  }
867
883
  indent(e, t) {
868
884
  let n = /^[^\r\n]/gm;
869
- if (be(e) && (t = e, e = void 0), e === void 0 && (this._ensureindentStr(), e = this.indentStr || " "), e === "") return this;
885
+ if (B(e) && (t = e, e = void 0), e === void 0 && (this._ensureindentStr(), e = this.indentStr || " "), e === "") return this;
870
886
  t ||= {};
871
887
  let r = {};
872
888
  t.exclude && (typeof t.exclude[0] == "number" ? [t.exclude] : t.exclude).forEach((e) => {
@@ -939,7 +955,7 @@ var V = /\w/, Se = class {
939
955
  }
940
956
  o.edit(n, i, !a);
941
957
  } else {
942
- let r = new z(e, t, "").edit(n, i);
958
+ let r = new _e(e, t, "").edit(n, i);
943
959
  s.next = r, r.previous = s;
944
960
  }
945
961
  return this;
@@ -1053,7 +1069,7 @@ var V = /\w/, Se = class {
1053
1069
  }
1054
1070
  _splitChunk(e, t) {
1055
1071
  if (e.edited && e.content.length) {
1056
- let n = xe(this.original)(t);
1072
+ let n = V(this.original)(t);
1057
1073
  throw Error(`Cannot split a chunk that has already been edited (${n.line}:${n.column} – "${e.original}")`);
1058
1074
  }
1059
1075
  let n = e.split(t);
@@ -1159,38 +1175,38 @@ var V = /\w/, Se = class {
1159
1175
  if (!e.global) throw TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");
1160
1176
  return this._replaceRegexp(e, t);
1161
1177
  }
1162
- }, we = "__QWIK_WORKER_QRL__:", Te = "__QWIK_WORKER_CORE__", Ee = RegExp(`${we}([^"'\\\`\\s]+)`, "g"), W = (e, t) => `${e.endsWith("/") ? e : `${e}/`}${t}`.replace(/\/{2,}/g, "/"), De = (e) => {
1178
+ }, Ee = "__QWIK_WORKER_QRL__:", De = "__QWIK_WORKER_CORE__", Oe = RegExp(`${Ee}([^"'\\\`\\s\\\\]+)`, "g"), ke = (e, t) => `${e.endsWith("/") ? e : `${e}/`}${t}`.replace(/\/{2,}/g, "/"), Ae = (e) => {
1163
1179
  let t = e.replace(/\/+$/, ""), n = t.lastIndexOf("/");
1164
1180
  return n === -1 ? "." : n === 0 ? "/" : t.slice(0, n);
1165
- }, Oe = (e, t) => {
1181
+ }, je = (e, t) => {
1166
1182
  let n = t.replace(/^\.\//, "");
1167
- return n === "build" || n.startsWith("build/") || !n.startsWith("../") && /^[^./][^?]*\/build\//.test(n) ? W(e, n) : new URL(n, `https://qwik.dev${W(e, "build/")}`).pathname;
1168
- }, ke = (e, t) => {
1183
+ return n === "build" || n.startsWith("build/") || !n.startsWith("../") && /^[^./][^?]*\/build\//.test(n) ? ke(e, n) : new URL(n, `https://qwik.dev${ke(e, "build/")}`).pathname;
1184
+ }, Me = (e, t) => {
1169
1185
  let n = /* @__PURE__ */ new Map();
1170
1186
  for (let [r, i] of Object.entries(e.symbols)) {
1171
1187
  let a = e.mapping[r];
1172
1188
  a && n.set(i.canonicalFilename, t(a));
1173
1189
  }
1174
1190
  return (e) => n.get(e.replace(/^\.\//, "").replace(/\.[^./?]+(?:\?.*)?$/, ""));
1175
- }, Ae = (e, t) => e.replace(Ee, (e, n) => t(n) ?? e), je = (e, t) => ke(e, (e) => Oe(t, e)), Me = (e) => {
1176
- let t = De(e.replace(/\\/g, "/"));
1191
+ }, Ne = (e, t) => e.replace(Oe, (e, n) => t(n) ?? e), Pe = (e, t) => Me(e, (e) => je(t, e)), Fe = (e) => {
1192
+ let t = Ae(e.replace(/\\/g, "/"));
1177
1193
  return (e) => {
1178
- let [, n = "", r = ""] = /^([^?#]*)(.*)$/.exec(e) ?? [], i = n.replace(/^\.\//, "").replace(/\.[^./?]+(?:\?.*)?$/, ""), a = W(t, `${i}.js`);
1194
+ let [, n = "", r = ""] = /^([^?#]*)(.*)$/.exec(e) ?? [], i = n.replace(/^\.\//, "").replace(/\.[^./?]+(?:\?.*)?$/, ""), a = ke(t, `${i}.js`);
1179
1195
  return r.startsWith("?") ? `${a}?worker_file&type=module&${r.slice(1)}` : r.startsWith("#") ? `${a}?worker_file&type=module${r}` : `${a}?worker_file&type=module`;
1180
1196
  };
1181
- }, Ne = (e) => e.startsWith(".") ? e : `./${e}`, Pe = (e) => {
1197
+ }, Ie = (e) => e.startsWith(".") ? e : `./${e}`, Le = (e) => {
1182
1198
  let t = [];
1183
1199
  for (let n of e.replace(/\\/g, "/").split("/")) !n || n === "." || (n === ".." && t.length > 0 && t[t.length - 1] !== ".." ? t.pop() : t.push(n));
1184
1200
  return t;
1185
- }, Fe = (e, t) => {
1186
- let n = e === "." ? [] : Pe(e), r = Pe(t), i = 0;
1201
+ }, Re = (e, t) => {
1202
+ let n = e === "." ? [] : Le(e), r = Le(t), i = 0;
1187
1203
  for (; i < n.length && i < r.length && n[i] === r[i];) i++;
1188
1204
  return [...n.slice(i).map(() => ".."), ...r.slice(i)].join("/");
1189
- }, Ie = (e) => (t) => Ne(Fe(De(t), e)), Le = (e, t) => {
1205
+ }, ze = (e) => (t) => Ie(Re(Ae(t), e)), Be = (e, t) => {
1190
1206
  if (!e.includes("__QWIK_WORKER_CORE__")) return e;
1191
1207
  let n = t();
1192
- return n ? e.replaceAll(Te, n) : e;
1193
- }, Re = ["server"], ze = [
1208
+ return n ? e.replaceAll(De, n) : e;
1209
+ }, Ve = ["server"], He = [
1194
1210
  "onGet",
1195
1211
  "onPost",
1196
1212
  "onPut",
@@ -1200,7 +1216,7 @@ var V = /\w/, Se = class {
1200
1216
  "onOptions",
1201
1217
  "onPatch",
1202
1218
  "onStaticGenerate"
1203
- ], Be = [
1219
+ ], Ue = [
1204
1220
  "useServer",
1205
1221
  "route",
1206
1222
  "server",
@@ -1209,17 +1225,22 @@ var V = /\w/, Se = class {
1209
1225
  "zod$",
1210
1226
  "validator$",
1211
1227
  "globalAction$"
1212
- ], Ve = [
1228
+ ], We = [
1213
1229
  "useClient",
1214
1230
  "useBrowser",
1215
1231
  "useVisibleTask",
1216
1232
  "client",
1217
1233
  "browser",
1218
1234
  "event$"
1219
- ], He = /* @__PURE__ */ function(e) {
1235
+ ], Ge = /* @__PURE__ */ function(e) {
1220
1236
  return e.each = "each", e.show = "show", e.suspense = "suspense", e.errorBoundary = "errorBoundary", e.valibot = "valibot", e.noSPA = "noSPA", e.insights = "insights", e.blockSSR = "blockSSR", e;
1221
- }({});
1222
- function Ue(t = {}) {
1237
+ }({}), Ke = (e) => {
1238
+ let t = typeof process == "object" ? process.env?.QWIK_OPTIMIZER : void 0;
1239
+ if (t === void 0 || t === "") return !!e;
1240
+ if (t === "ts" || t === "rust") return t === "ts";
1241
+ throw Error(`QWIK_OPTIMIZER must be "ts" or "rust", got "${t}"`);
1242
+ };
1243
+ function qe(t = {}) {
1223
1244
  let n = `${Math.round(Math.random() * 899) + 100}`, i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Set(), l = null, u, d = () => {}, f = {
1224
1245
  csr: !1,
1225
1246
  target: "client",
@@ -1248,10 +1269,10 @@ function Ue(t = {}) {
1248
1269
  inlineStylesUpToBytes: 2e4,
1249
1270
  lint: !1,
1250
1271
  experimental: void 0
1251
- }, m, h, v = async () => {
1272
+ }, m, h, g = async () => {
1252
1273
  if (!l) {
1253
- let e = (t._optimizer || await import("@qwik.dev/optimizer")).createOptimizer;
1254
- if (l = await e(t), m = We(l.sys), l.sys.env !== "browsermain" && l.sys.env !== "webworker") try {
1274
+ let e = (await (async () => t._optimizer ? t._optimizer : Ke(t.tsOptimizer) ? await import("./ts-optimizer.mjs") : import("@qwik.dev/optimizer"))()).createOptimizer;
1275
+ if (l = await e(t), m = Je(l.sys), l.sys.env !== "browsermain" && l.sys.env !== "webworker") try {
1255
1276
  h === void 0 && (h = await l.sys.dynamicImport("node:fs"));
1256
1277
  } catch {
1257
1278
  console.log("node:fs not available, disabling automatic manifest reading"), h = null;
@@ -1263,13 +1284,13 @@ function Ue(t = {}) {
1263
1284
  }, b = () => y().sys, x = () => y().sys.path, S, C = (e) => {
1264
1285
  S = e;
1265
1286
  }, w = async (e) => {
1266
- let n = Object.assign({}, e), r = y(), i = r.sys.path, a = (...e) => V(i.resolve(...e));
1287
+ let n = Object.assign({}, e), r = y(), i = r.sys.path, a = (...e) => B(i.resolve(...e));
1267
1288
  f.debug = !!n.debug, n.devTools && (f.devTools = {
1268
1289
  ...f.devTools,
1269
1290
  ...n.devTools
1270
1291
  }), n.target === "ssr" || n.target === "client" || n.target === "lib" || n.target === "test" ? f.target = n.target : f.target ||= "client", f.target === "lib" ? f.buildMode = "development" : n.buildMode === "production" || n.buildMode === "development" ? f.buildMode = n.buildMode : f.buildMode ||= "development", f.csr = !!n.csr, n.entryStrategy && typeof n.entryStrategy == "object" && (f.entryStrategy = { ...n.entryStrategy }), f.entryStrategy || (f.target === "ssr" || f.target === "test" ? f.entryStrategy = { type: "hoist" } : f.target === "lib" ? f.entryStrategy = { type: "inline" } : f.buildMode === "production" ? f.entryStrategy = { type: "smart" } : f.entryStrategy = { type: "segment" }), typeof n.rootDir == "string" && (f.rootDir = n.rootDir), typeof f.rootDir != "string" && (f.rootDir ||= r.sys.cwd()), f.rootDir = a(r.sys.cwd(), f.rootDir);
1271
1292
  let o = a(f.rootDir, "src");
1272
- if (typeof n.srcDir == "string" ? (f.srcDir = a(f.rootDir, n.srcDir), o = f.srcDir) : f.srcDir ||= o, f.srcDir = a(f.rootDir, f.srcDir), Array.isArray(n.tsconfigFileNames) && n.tsconfigFileNames.length > 0 && (f.tsconfigFileNames = n.tsconfigFileNames), !f.csr && !n.input && !f.input && (f.target === "ssr" ? f.input = [a(o, "entry.ssr")] : f.target === "client" ? f.input = [a(o, "root")] : f.input = void 0), n.outDir && (f.outDir = a(f.rootDir, n.outDir)), f.clientOutDir = a(f.rootDir, n.clientOutDir || "dist"), f.ssrOutDir = a(f.rootDir, n.ssrOutDir || "server"), f.target === "ssr" ? f.outDir ||= f.ssrOutDir : f.target === "lib" ? f.outDir ||= a(f.rootDir, tt) : f.outDir ||= f.clientOutDir, typeof n.manifestOutput == "function" && (f.manifestOutput = n.manifestOutput), n.manifestInput && (f.manifestInput = p(n.manifestInput) || null), typeof n.transformedModuleOutput == "function" && (f.transformedModuleOutput = n.transformedModuleOutput), n.scope !== void 0) f.scope = n.scope;
1293
+ if (typeof n.srcDir == "string" ? (f.srcDir = a(f.rootDir, n.srcDir), o = f.srcDir) : f.srcDir ||= o, f.srcDir = a(f.rootDir, f.srcDir), Array.isArray(n.tsconfigFileNames) && n.tsconfigFileNames.length > 0 && (f.tsconfigFileNames = n.tsconfigFileNames), !f.csr && !n.input && !f.input && (f.target === "ssr" ? f.input = [a(o, "entry.ssr")] : f.target === "client" ? f.input = [a(o, "root")] : f.input = void 0), n.outDir && (f.outDir = a(f.rootDir, n.outDir)), f.clientOutDir = a(f.rootDir, n.clientOutDir || "dist"), f.ssrOutDir = a(f.rootDir, n.ssrOutDir || "server"), f.target === "ssr" ? f.outDir ||= f.ssrOutDir : f.target === "lib" ? f.outDir ||= a(f.rootDir, at) : f.outDir ||= f.clientOutDir, typeof n.manifestOutput == "function" && (f.manifestOutput = n.manifestOutput), n.manifestInput && (f.manifestInput = p(n.manifestInput) || null), typeof n.transformedModuleOutput == "function" && (f.transformedModuleOutput = n.transformedModuleOutput), n.scope !== void 0) f.scope = n.scope;
1273
1294
  else if (!f.scope && h) {
1274
1295
  let e = "";
1275
1296
  try {
@@ -1289,7 +1310,7 @@ function Ue(t = {}) {
1289
1310
  }
1290
1311
  if (typeof n.resolveQwikBuild == "boolean" && (f.resolveQwikBuild = n.resolveQwikBuild), typeof n.devTools == "object" && ("imageDevTools" in n.devTools && (f.devTools.imageDevTools = n.devTools.imageDevTools), "clickToSource" in n.devTools && (f.devTools.clickToSource = n.devTools.clickToSource)), "inlineStylesUpToBytes" in t && (typeof t.inlineStylesUpToBytes == "number" ? f.inlineStylesUpToBytes = t.inlineStylesUpToBytes : (typeof f.inlineStylesUpToBytes != "number" || f.inlineStylesUpToBytes < 0) && (f.inlineStylesUpToBytes = 0)), typeof n.lint == "boolean" && (f.lint = n.lint), "experimental" in n) {
1291
1312
  f.experimental = void 0;
1292
- for (let e of n.experimental ?? []) He[e] ? (f.experimental ||= {})[e] = !0 : console.error(`Qwik plugin: Unknown experimental feature: ${e}`);
1313
+ for (let e of n.experimental ?? []) Ge[e] ? (f.experimental ||= {})[e] = !0 : console.error(`Qwik plugin: Unknown experimental feature: ${e}`);
1293
1314
  }
1294
1315
  let s = { ...f };
1295
1316
  return f.input ||= n.input, f.input && typeof f.input == "string" && (f.input = [f.input]), s;
@@ -1304,24 +1325,24 @@ function Ue(t = {}) {
1304
1325
  for (let [t, n] of Object.entries(f.input || {})) if (!await e(n)) throw Error(`Qwik input "${n}" not found.`);
1305
1326
  }
1306
1327
  }
1307
- }, O, k = !1, j, M, N, ne = async (e) => {
1308
- if (B("buildStart()", f.buildMode, f.scope, f.target, f.rootDir, f.srcDir), O = y(), k = !S, O.sys.env === "node" && f.target === "ssr" && f.lint) try {
1309
- u = await _(O.sys, f.rootDir, f.tsconfigFileNames);
1328
+ }, D, O = !1, k, j, M, re = async (e) => {
1329
+ if (z("buildStart()", f.buildMode, f.scope, f.target, f.rootDir, f.srcDir), D = y(), O = !S, D.sys.env === "node" && f.target === "ssr" && f.lint) try {
1330
+ u = await v(D.sys, f.rootDir, f.tsconfigFileNames);
1310
1331
  } catch {}
1311
- if (B("transformedOutputs.clear()"), a.clear(), o.clear(), j = void 0, M = void 0, N = void 0, f.target === "client" && !S) {
1332
+ if (z("transformedOutputs.clear()"), a.clear(), o.clear(), k = void 0, j = void 0, M = void 0, f.target === "client" && !S) {
1312
1333
  let t = await e.resolve("@qwik.dev/core/qwikloader.js", void 0, { skipSelf: !0 });
1313
- t && (j = e.emitFile({
1334
+ t && (k = e.emitFile({
1314
1335
  id: t.id,
1315
1336
  type: "chunk",
1316
1337
  preserveSignature: "allow-extension"
1317
1338
  }));
1318
1339
  }
1319
- }, P = (e, t) => e.environment ? e.environment.config.consumer === "server" : S ? !!t?.ssr : f.target === "ssr" || f.target === "test", re = (e) => !e && (f.target === "client" || !!S && f.target === "ssr"), ie = (e) => !!S && e && (f.target === "client" || f.target === "ssr"), I = (e, t, n = !1) => {
1320
- if (re(n) && D(e, f)) throw Error(te(e, t));
1340
+ }, N = (e, t) => e.environment ? e.environment.config.consumer === "server" : S ? !!t?.ssr : f.target === "ssr" || f.target === "test", ie = (e) => !e && (f.target === "client" || !!S && f.target === "ssr"), ae = (e) => !!S && e && (f.target === "client" || f.target === "ssr"), F = (e, t, n = !1) => {
1341
+ if (ie(n) && te(e, f)) throw Error(ne(e, t));
1321
1342
  }, oe = (e) => {
1322
1343
  let t = e.replace(/\\/g, "/");
1323
1344
  return t.includes(".server") || /(^|\/)server(\/|$)/.test(t);
1324
- }, se = (e, t) => {
1345
+ }, ce = (e, t) => {
1325
1346
  let n = /* @__PURE__ */ new Set(), r = (e) => {
1326
1347
  typeof e?.value == "string" && n.add(e.value);
1327
1348
  }, i = [e.parse(t)];
@@ -1338,41 +1359,41 @@ function Ue(t = {}) {
1338
1359
  }
1339
1360
  }
1340
1361
  return Array.from(n);
1341
- }, ce = async (e, t, n, r = n) => {
1342
- if (ee(t)) for (let i of se(e, t)) {
1362
+ }, le = async (e, t, n, r = n) => {
1363
+ if (ee(t)) for (let i of ce(e, t)) {
1343
1364
  if (!oe(i)) continue;
1344
- I(i, r);
1365
+ F(i, r);
1345
1366
  let t = await e.resolve(i, n, { skipSelf: !0 });
1346
- t && I(V(F(t.id).pathId), r);
1367
+ t && F(B(P(t.id).pathId), r);
1347
1368
  }
1348
- }, le = async (e, t, n, r, i = !1) => {
1369
+ }, ue = async (e, t, n, r, i = !1) => {
1349
1370
  let a = x();
1350
1371
  for (let o of t.modules) {
1351
- if (i && !Ge(o)) continue;
1352
- let t = V(a.join(n, o.path));
1353
- await ce(e, o.code, t, r ?? t);
1372
+ if (i && !Ye(o)) continue;
1373
+ let t = B(a.join(n, o.path));
1374
+ await le(e, o.code, t, r ?? t);
1354
1375
  }
1355
- }, ue = async (e, t, n) => {
1376
+ }, de = async (e, t, n) => {
1356
1377
  let r = await e.resolve(t, n, { skipSelf: !0 });
1357
1378
  if (!r || r.external || A(r.id)) return;
1358
- let i = F(r.id);
1379
+ let i = P(r.id);
1359
1380
  if (i.query) return;
1360
- let a = V(i.pathId);
1361
- if (x().extname(a).toLowerCase() in qe || Je.test(a)) return a;
1362
- }, L = async (e, t, n) => {
1381
+ let a = B(i.pathId);
1382
+ if (x().extname(a).toLowerCase() in Ze || Qe.test(a)) return a;
1383
+ }, fe = async (e, t, n) => {
1363
1384
  if (t.length === 0) return [];
1364
1385
  let r = [];
1365
1386
  for (let i of t) {
1366
- let t = await ue(e, i, n);
1387
+ let t = await de(e, i, n);
1367
1388
  t && r.push(t);
1368
1389
  }
1369
1390
  return r;
1370
- }, de = 0, R = !1, fe = async (e, t, n, r) => {
1391
+ }, I = 0, L = !1, pe = async (e, t, n, r) => {
1371
1392
  if (A(t)) return;
1372
1393
  let i = S && /^(.*)\?editor(:(\d+)(:\d+)?)?$/.exec(t);
1373
1394
  if (i) {
1374
- if (!R) {
1375
- R = !0, setTimeout(() => R = !1, 500);
1395
+ if (!L) {
1396
+ L = !0, setTimeout(() => L = !1, 500);
1376
1397
  let [, t, r] = i, a = await e.resolve(t, n);
1377
1398
  if (a) {
1378
1399
  let t = e.environment.moduleGraph.getModuleById(a.id)?.file;
@@ -1390,44 +1411,44 @@ function Ue(t = {}) {
1390
1411
  }
1391
1412
  return { id: "\0editor" };
1392
1413
  }
1393
- let a = de++, o = P(e, r);
1394
- B(`resolveId(${a})`, `begin ${t} | ${o ? "server" : "client"} | ${n}`);
1395
- let c = n && F(n);
1396
- if (n = c && V(c.pathId), t.startsWith(".") && c) {
1414
+ let a = I++, o = N(e, r);
1415
+ z(`resolveId(${a})`, `begin ${t} | ${o ? "server" : "client"} | ${n}`);
1416
+ let c = n && P(n);
1417
+ if (n = c && B(c.pathId), t.startsWith(".") && c) {
1397
1418
  let e = x(), n = e.dirname(c.pathId);
1398
1419
  n && (t = e.resolve(n, t));
1399
1420
  }
1400
- let l = F(t), u = V(l.pathId), d;
1401
- if (S && r?.scan || I(u, n, o), s.get(u)) B(`resolveId(${a}) Resolved already known ${u}`), d = {
1421
+ let l = P(t), u = B(l.pathId), d;
1422
+ if (S && r?.scan || F(u, n, o), s.get(u)) z(`resolveId(${a}) Resolved already known ${u}`), d = {
1402
1423
  id: u + l.query,
1403
1424
  moduleSideEffects: !1
1404
1425
  };
1405
- else if (u.endsWith("@qwik.dev/core/build")) f.resolveQwikBuild && (B(`resolveId(${a})`, "Resolved", q), d = {
1406
- id: q,
1426
+ else if (u.endsWith("@qwik.dev/core/build")) f.resolveQwikBuild && (z(`resolveId(${a})`, "Resolved", K), d = {
1427
+ id: K,
1407
1428
  moduleSideEffects: !1
1408
1429
  });
1409
- else if (u.endsWith("@qwik-client-manifest")) console.error(`${n ? `${n}: ` : ""}importing ${J} is deprecated. Use \`getClientManifest()\` instead.`), B(`resolveId(${a})`, "Resolved", J), d = {
1410
- id: J,
1430
+ else if (u.endsWith("@qwik-client-manifest")) console.error(`${n ? `${n}: ` : ""}importing ${q} is deprecated. Use \`getClientManifest()\` instead.`), z(`resolveId(${a})`, "Resolved", q), d = {
1431
+ id: q,
1411
1432
  moduleSideEffects: !1
1412
1433
  };
1413
1434
  else if (!S && !o && u.endsWith("@qwik.dev/core/preloader")) {
1414
- B(`resolveId(${a})`, "Resolved", Qe);
1415
- let t = await e.resolve(Qe, n, { skipSelf: !0 });
1416
- if (t) return M = e.emitFile({
1435
+ z(`resolveId(${a})`, "Resolved", nt);
1436
+ let t = await e.resolve(nt, n, { skipSelf: !0 });
1437
+ if (t) return j = e.emitFile({
1417
1438
  id: t.id,
1418
1439
  type: "chunk",
1419
1440
  preserveSignature: "allow-extension"
1420
1441
  }), t;
1421
- } else if (u.endsWith("@qwik-handlers")) B(`resolveId(${a})`, "Resolved", $e), d = {
1422
- id: $e,
1442
+ } else if (u.endsWith("@qwik-handlers")) z(`resolveId(${a})`, "Resolved", rt), d = {
1443
+ id: rt,
1423
1444
  moduleSideEffects: !1
1424
1445
  };
1425
1446
  else {
1426
- if (!o && k && t.endsWith("@qwik.dev/core")) {
1427
- k = !1;
1447
+ if (!o && O && t.endsWith("@qwik.dev/core")) {
1448
+ O = !1;
1428
1449
  let t = await e.resolve("@qwik.dev/core/handlers.mjs", n, { skipSelf: !0 });
1429
1450
  if (!t) throw Error("Failed to resolve @qwik.dev/core/handlers.mjs");
1430
- N = e.emitFile({
1451
+ M = e.emitFile({
1431
1452
  id: t.id,
1432
1453
  type: "chunk",
1433
1454
  preserveSignature: "allow-extension"
@@ -1438,31 +1459,31 @@ function Ue(t = {}) {
1438
1459
  let { parent: t, name: i, query: o } = r, c = await e.resolve(t, n, { skipSelf: !0 });
1439
1460
  if (c) {
1440
1461
  let e = c.id.split("?")[0], t = S && n?.endsWith(".html") ? `${e}_${i}.js` : u;
1441
- B(`resolveId(${a})`, `resolved to QRL ${i} of ${e}`), s.set(t, e), d = {
1462
+ z(`resolveId(${a})`, `resolved to QRL ${i} of ${e}`), s.set(t, e), d = {
1442
1463
  id: t + o,
1443
1464
  moduleSideEffects: !1
1444
1465
  };
1445
1466
  } else console.error(`resolveId(${a})`, `QRL parent ${t} does not exist!`);
1446
1467
  } else if (n) {
1447
1468
  let r = s.get(n);
1448
- if (r) return B(`resolveId(${a}) end`, `resolving via ${r}`), e.resolve(t, r, { skipSelf: !0 });
1469
+ if (r) return z(`resolveId(${a}) end`, `resolving via ${r}`), e.resolve(t, r, { skipSelf: !0 });
1449
1470
  }
1450
1471
  }
1451
- return B(`resolveId(${a}) end`, d?.id || d), d;
1452
- }, pe = 0, me = async (e, t, n) => {
1472
+ return z(`resolveId(${a}) end`, d?.id || d), d;
1473
+ }, me = 0, he = async (e, t, n) => {
1453
1474
  if (t === "\0editor") return "\"opening in editor\"";
1454
1475
  if (A(t)) return;
1455
- let r = pe++, i = P(e, n), c = F(t), l = V(c.pathId);
1456
- if (I(l, void 0, i), t.startsWith("/@fs/")) return;
1457
- if (f.resolveQwikBuild && t === "@qwik.dev/core/build") return B(`load(${r})`, q, f.buildMode), {
1476
+ let r = me++, i = N(e, n), c = P(t), l = B(c.pathId);
1477
+ if (F(l, void 0, i), t.startsWith("/@fs/")) return;
1478
+ if (f.resolveQwikBuild && t === "@qwik.dev/core/build") return z(`load(${r})`, K, f.buildMode), {
1458
1479
  moduleSideEffects: !1,
1459
- code: Se(i, f.target)
1480
+ code: V(i, f.target)
1460
1481
  };
1461
- if (t === "@qwik-client-manifest") return B(`load(${r})`, J, f.buildMode), {
1482
+ if (t === "@qwik-client-manifest") return z(`load(${r})`, q, f.buildMode), {
1462
1483
  moduleSideEffects: !1,
1463
1484
  code: "import { getClientManifest } from '@qwik.dev/core'; export const manifest = getClientManifest();\n"
1464
1485
  };
1465
- if (t === "@qwik-handlers") return B(`load(${r})`, $e, f.buildMode), {
1486
+ if (t === "@qwik-handlers") return z(`load(${r})`, rt, f.buildMode), {
1466
1487
  moduleSideEffects: !1,
1467
1488
  code: "export * from '@qwik.dev/core';"
1468
1489
  };
@@ -1471,7 +1492,7 @@ function Ue(t = {}) {
1471
1492
  if (S && !u.has(t)) {
1472
1493
  let e = s.get(t);
1473
1494
  if (e) {
1474
- B(`load(${r})`, "transforming QRL parent", e);
1495
+ z(`load(${r})`, "transforming QRL parent", e);
1475
1496
  let n = S.moduleGraph.getModuleById(e);
1476
1497
  if (n) await S.transformRequest(n.url);
1477
1498
  else try {
@@ -1479,12 +1500,12 @@ function Ue(t = {}) {
1479
1500
  } catch (t) {
1480
1501
  console.error(`load(${r})`, `could not transform QRL parent ${e}:`, t);
1481
1502
  }
1482
- if (!u.has(t)) return B(`load(${r})`, `QRL segment ${t} not found in ${e}`), null;
1503
+ if (!u.has(t)) return z(`load(${r})`, `QRL segment ${t} not found in ${e}`), null;
1483
1504
  }
1484
1505
  }
1485
1506
  let d = u.get(t);
1486
1507
  if (d) {
1487
- B(`load(${r})`, "Found", t);
1508
+ z(`load(${r})`, "Found", t);
1488
1509
  let { code: e } = d[0], { map: n, segment: i } = d[0], a = d[1];
1489
1510
  if (S?.hot && a && f.devTools.hmr && i?.ctxName !== "worker$") {
1490
1511
  let t = a.startsWith(f.rootDir) ? a.slice(f.rootDir.length) : a;
@@ -1496,22 +1517,22 @@ function Ue(t = {}) {
1496
1517
  meta: { segment: i }
1497
1518
  };
1498
1519
  }
1499
- return B(`load(${r})`, "Not a QRL or virtual module", t), null;
1500
- }, z, he = 0, ge = async function(e, t, n, r = {}) {
1520
+ return z(`load(${r})`, "Not a QRL or virtual module", t), null;
1521
+ }, R, ge = 0, _e = async function(e, t, n, r = {}) {
1501
1522
  if (A(n)) return;
1502
- let l = P(e, r), p = l ? o : a;
1523
+ let l = N(e, r), p = l ? o : a;
1503
1524
  if (p.has(n)) return;
1504
- let m = !1, h = he++, g = y(), _ = x(), { pathId: v } = F(n), b = V(v);
1505
- I(b, void 0, l);
1506
- let C = _.parse(v), w = C.dir, T = C.base, E = C.ext.toLowerCase(), D, te, O = f.target === "lib" ? "lib" : f.buildMode === "development" ? S?.hot && f.devTools.hmr ? "hmr" : "dev" : "prod";
1507
- if (O !== "lib" && (t = t.replaceAll(/__EXPERIMENTAL__\.(\w+)/g, (e, t) => (m = !0, f.experimental?.[t] ? "true" : "false"))), E in qe || Je.test(v)) {
1525
+ let m = !1, h = ge++, g = y(), _ = x(), { pathId: v } = P(n), b = B(v);
1526
+ F(b, void 0, l);
1527
+ let C = _.parse(v), w = C.dir, T = C.base, E = C.ext.toLowerCase(), D, te, ne = f.target === "lib" ? "lib" : f.buildMode === "development" ? S?.hot && f.devTools.hmr ? "hmr" : "dev" : "prod";
1528
+ if (ne !== "lib" && (t = t.replaceAll(/__EXPERIMENTAL__\.(\w+)/g, (e, t) => (m = !0, f.experimental?.[t] ? "true" : "false"))), E in Ze || Qe.test(v)) {
1508
1529
  let r = f.target === "client" || f.target === "ssr";
1509
- B(`transform(${h})`, `Transforming ${n} (for: ${l ? "server" : "client"}${r ? ", strip" : ""})`);
1530
+ z(`transform(${h})`, `Transforming ${n} (for: ${l ? "server" : "client"}${r ? ", strip" : ""})`);
1510
1531
  let a = T;
1511
- f.srcDir && (a = _.relative(f.srcDir, v)), a = V(a);
1512
- let o = f.srcDir ? f.srcDir : V(w), y = f.entryStrategy, x, C = e.environment?.moduleGraph ?? S?.moduleGraph;
1532
+ f.srcDir && (a = _.relative(f.srcDir, v)), a = B(a);
1533
+ let o = f.srcDir ? f.srcDir : B(w), y = f.entryStrategy, x, C = e.environment?.moduleGraph ?? S?.moduleGraph;
1513
1534
  if (C && (x = C.getModuleById(v)?.url, !x && f.rootDir)) {
1514
- let e = V(f.rootDir), t = V(v);
1535
+ let e = B(f.rootDir), t = B(v);
1515
1536
  t.startsWith(e) && (x = t.slice(e.length), x.startsWith("/") || (x = "/" + x));
1516
1537
  }
1517
1538
  let E = {
@@ -1529,33 +1550,33 @@ function Ue(t = {}) {
1529
1550
  preserveFilenames: !0,
1530
1551
  srcDir: o,
1531
1552
  rootDir: f.rootDir,
1532
- mode: O,
1553
+ mode: ne,
1533
1554
  scope: f.scope || void 0,
1534
1555
  isServer: l
1535
1556
  };
1536
- r && (l ? (E.stripCtxName = Ve, E.stripEventHandlers = !0, E.regCtxName = Re) : (E.stripCtxName = Be, E.stripExports = ze));
1537
- let k = Date.now(), A = await g.transformModules(E);
1538
- if (B(`transform(${h})`, `done in ${Date.now() - k}ms`), x) {
1539
- let e = Me(x);
1540
- for (let t of A.modules) t.code = Ae(t.code, e);
1557
+ r && (l ? (E.stripCtxName = We, E.stripEventHandlers = !0, E.regCtxName = Ve) : (E.stripCtxName = Ue, E.stripExports = He));
1558
+ let O = Date.now(), k = await g.transformModules(E);
1559
+ if (z(`transform(${h})`, `done in ${Date.now() - O}ms`), x) {
1560
+ let e = Fe(x);
1561
+ for (let t of k.modules) t.code = Ne(t.code, e);
1541
1562
  }
1542
- let j = A.modules.find((e) => !Ge(e));
1543
- if (re(l)) await le(e, A, o, b);
1544
- else if (ie(l) && ee(t)) {
1563
+ let A = k.modules.find((e) => !Ye(e));
1564
+ if (ie(l)) await ue(e, k, o, b);
1565
+ else if (ae(l) && ee(t)) {
1545
1566
  let t = {
1546
1567
  ...E,
1547
1568
  entryStrategy: y,
1548
1569
  isServer: !1
1549
1570
  };
1550
- r && (t.stripCtxName = Be, t.stripExports = ze, t.stripEventHandlers = void 0, t.regCtxName = void 0), await le(e, await g.transformModules(t), o, b, !0);
1571
+ r && (t.stripCtxName = Ue, t.stripExports = He, t.stripEventHandlers = void 0, t.regCtxName = void 0), await ue(e, await g.transformModules(t), o, b, !0);
1551
1572
  }
1552
- d(A.diagnostics, g, o);
1553
- let M = [];
1554
- l && r && (M = await L(e, j.imports ?? [], n)), l ? A.diagnostics.length === 0 && u && u.lint(e, t, n) : i.set(n, A);
1555
- let N = /* @__PURE__ */ new Set();
1556
- for (let t of A.modules) if (t !== j) {
1557
- let r = V(_.join(o, t.path));
1558
- if (B(`transform(${h})`, `segment ${r}`, t.segment.displayName), s.set(r, n), p.set(r, [t, n]), N.add(r), S) {
1573
+ d(k.diagnostics, g, o);
1574
+ let j = [];
1575
+ l && r && (j = await fe(e, A.imports ?? [], n)), l ? k.diagnostics.length === 0 && u && u.lint(e, t, n) : i.set(n, k);
1576
+ let M = /* @__PURE__ */ new Set();
1577
+ for (let t of k.modules) if (t !== A) {
1578
+ let r = B(_.join(o, t.path));
1579
+ if (z(`transform(${h})`, `segment ${r}`, t.segment.displayName), s.set(r, n), p.set(r, [t, n]), M.add(r), S) {
1559
1580
  let e = S.moduleGraph.getModuleById(r);
1560
1581
  e && S.moduleGraph.invalidateModule(e);
1561
1582
  }
@@ -1565,45 +1586,45 @@ function Ue(t = {}) {
1565
1586
  preserveSignature: "allow-extension"
1566
1587
  }), t.segment && c.size > 0) for (let e of c) e(n, t.segment);
1567
1588
  }
1568
- for (let e of M) N.add(e);
1569
- e.addWatchFile(n), t = j.code, D = j.map, te = {
1570
- segment: j.segment,
1571
- qwikdeps: Array.from(N)
1589
+ for (let e of j) M.add(e);
1590
+ e.addWatchFile(n), t = A.code, D = A.map, te = {
1591
+ segment: A.segment,
1592
+ qwikdeps: Array.from(M)
1572
1593
  }, m = !0;
1573
1594
  }
1574
- if (t.includes(`globalThis.${rt}`)) {
1575
- z === void 0 && (z = await H(l));
1576
- let e = new Ce(t);
1577
- e.replace(`!globalThis.${rt}`, "false"), z && e.replace(`globalThis.${rt}`, z), t = e.toString(), D ||= e.generateMap({
1595
+ if (t.includes(`globalThis.${st}`)) {
1596
+ R === void 0 && (R = await Ce(l));
1597
+ let e = new Te(t);
1598
+ e.replace(`!globalThis.${st}`, "false"), R && e.replace(`globalThis.${st}`, R), t = e.toString(), D ||= e.generateMap({
1578
1599
  source: n,
1579
1600
  includeContent: !1
1580
- }), m = !0, B(`transform(${h})`, `Replaced globalThis.${rt} with manifest input`);
1601
+ }), m = !0, z(`transform(${h})`, `Replaced globalThis.${st} with manifest input`);
1581
1602
  }
1582
- if (m) return Ke(n) && (D = null), {
1603
+ if (m) return Xe(n) && (D = null), {
1583
1604
  code: t,
1584
1605
  map: D,
1585
1606
  meta: te
1586
1607
  };
1587
- B(`transform(${h})`, "Not transforming", n);
1588
- }, _e = (t, n, r, a) => {
1589
- let o = [], s = { addInjection: (e) => o.push(e) };
1590
- return s.generateManifest = async (c) => {
1591
- let l = y().sys.path, u = l.resolve(f.rootDir, f.outDir, "build"), d = (e) => l.relative(u, l.resolve(f.rootDir, f.outDir, e));
1592
- s.canonPath = d;
1593
- let p = g(l, Array.from(i.values()).flatMap((e) => e.modules).map((e) => e.segment).filter((e) => !!e), o, t, f, B, d, n, r, a);
1594
- c && Object.assign(p, c);
1595
- for (let e of Object.values(p.symbols)) e.origin &&= V(e.origin);
1596
- for (let e of Object.values(p.bundles)) e.origins &&= e.origins.sort();
1597
- return p.manifestHash = e(JSON.stringify(p)), p;
1598
- }, s;
1599
- }, ve = () => f, ye = () => Array.from(a.values()).map((e) => e[0]), B = (...e) => {
1608
+ z(`transform(${h})`, "Not transforming", n);
1609
+ }, ve = (t, n, r, a, o) => {
1610
+ let s = [], c = { addInjection: (e) => s.push(e) };
1611
+ return c.generateManifest = async (l) => {
1612
+ let u = y().sys.path, d = u.resolve(f.rootDir, f.outDir, "build"), p = (e) => u.relative(d, u.resolve(f.rootDir, f.outDir, e));
1613
+ c.canonPath = p;
1614
+ let m = _(u, Array.from(i.values()).flatMap((e) => e.modules).map((e) => e.segment).filter((e) => !!e), s, t, f, z, p, n, r, a, o);
1615
+ l && Object.assign(m, l);
1616
+ for (let e of Object.values(m.symbols)) e.origin &&= B(e.origin);
1617
+ for (let e of Object.values(m.bundles)) e.origins &&= e.origins.sort();
1618
+ return m.manifestHash = e(JSON.stringify(m)), m;
1619
+ }, c;
1620
+ }, ye = () => f, be = () => Array.from(a.values()).map((e) => e[0]), z = (...e) => {
1600
1621
  f.debug && console.debug(`[QWIK PLUGIN: ${n}]`, ...e);
1601
- }, be = (...e) => {
1622
+ }, xe = (...e) => {
1602
1623
  console.log(`[QWIK PLUGIN: ${n}]`, ...e);
1603
- }, xe = (e) => {
1624
+ }, Se = (e) => {
1604
1625
  d = e;
1605
- }, V = (e) => m(e);
1606
- function Se(e, t) {
1626
+ }, B = (e) => m(e);
1627
+ function V(e, t) {
1607
1628
  let n = f.buildMode === "development";
1608
1629
  return n ? "// @qwik.dev/core/build\nexport const isBrowser = /*#__PURE__*/ (() =>\n typeof window !== 'undefined' &&\n typeof HTMLElement !== 'undefined' &&\n !!window.document &&\n String(HTMLElement).includes('[native code]'))();\nexport const isServer = !isBrowser;\nexport const isDev = true;\n" : `// @qwik.dev/core/build
1609
1630
  export const isServer = ${JSON.stringify(e)};
@@ -1611,10 +1632,10 @@ export const isBrowser = ${JSON.stringify(!e)};
1611
1632
  export const isDev = ${JSON.stringify(n)};
1612
1633
  `;
1613
1634
  }
1614
- async function H(e) {
1635
+ async function Ce(e) {
1615
1636
  if (!f.manifestInput && f.target === "ssr" && f.buildMode === "production" && h) {
1616
1637
  let e = x(), t = f.manifestInputPath || e.resolve(f.clientOutDir, "q-manifest.json");
1617
- await h.promises.stat(t).catch(() => !1) || (t = e.resolve(f.rootDir, et, nt));
1638
+ await h.promises.stat(t).catch(() => !1) || (t = e.resolve(f.rootDir, it, ot));
1618
1639
  try {
1619
1640
  let e = await h.promises.readFile(t, "utf-8");
1620
1641
  f.manifestInput = p(JSON.parse(e)) || null, console.info("Read client manifest from", t);
@@ -1634,26 +1655,26 @@ export const isDev = ${JSON.stringify(n)};
1634
1655
  bundleGraph: t.bundleGraph
1635
1656
  }), n && JSON.stringify(n);
1636
1657
  }
1637
- function U(e) {
1658
+ function we(e) {
1638
1659
  f.sourcemap = e;
1639
1660
  }
1640
- function we(e, t) {
1661
+ function H(e, t) {
1641
1662
  let n = e.name === "ssr";
1642
- B("hotUpdate()", t.file, e.name);
1663
+ z("hotUpdate()", t.file, e.name);
1643
1664
  let r = n ? o : a;
1644
1665
  for (let n of t.modules) {
1645
1666
  let { id: t } = n;
1646
1667
  if (t) {
1647
- B("hotUpdate()", `invalidate ${t}`), i.delete(t);
1668
+ z("hotUpdate()", `invalidate ${t}`), i.delete(t);
1648
1669
  for (let [n, [i, a]] of r) if (a === t) {
1649
- B("hotUpdate()", `invalidate ${t} segment ${n}`), r.delete(n);
1670
+ z("hotUpdate()", `invalidate ${t} segment ${n}`), r.delete(n);
1650
1671
  let i = e.moduleGraph.getModuleById(n);
1651
1672
  i && e.moduleGraph.invalidateModule(i);
1652
1673
  }
1653
1674
  }
1654
1675
  }
1655
1676
  }
1656
- let Te = /* @__PURE__ */ new Set([
1677
+ let U = /* @__PURE__ */ new Set([
1657
1678
  "qwikify$",
1658
1679
  "useVisibleTask$",
1659
1680
  "useComputed$"
@@ -1675,23 +1696,23 @@ export const isDev = ${JSON.stringify(n)};
1675
1696
  if (n) {
1676
1697
  let e = n.meta.segment;
1677
1698
  if (e) {
1678
- if (Te.has(e.ctxName)) return null;
1699
+ if (U.has(e.ctxName)) return null;
1679
1700
  let { hash: t } = e, n = f.entryStrategy.manual?.[t] || e.entry;
1680
- if (n) return ae(n);
1701
+ if (n) return se(n);
1681
1702
  }
1682
1703
  }
1683
1704
  return null;
1684
1705
  }
1685
1706
  }
1686
1707
  ] });
1687
- async function W(e, t, n, i) {
1688
- let a = j ? e.getFileName(j) : void 0, o = M ? e.getFileName(M) : void 0, s = N ? e.getFileName(N) : void 0, c = await _e(t, a, o, s).generateManifest(i);
1708
+ async function De(e, t, n, i) {
1709
+ let a = k ? e.getFileName(k) : void 0, o = j ? e.getFileName(j) : void 0, s = M ? e.getFileName(M) : void 0, c = await ve(t, (t) => e.getModuleInfo(t), a, o, s).generateManifest(i);
1689
1710
  c.platform = {
1690
1711
  ...i?.platform,
1691
1712
  rollup: e.meta?.rollupVersion || "",
1692
- env: O.sys.env,
1693
- os: O.sys.os
1694
- }, O.sys.env === "node" && (c.platform.node = process.versions.node);
1713
+ env: D.sys.env,
1714
+ os: D.sys.os
1715
+ }, D.sys.env === "node" && (c.platform.node = process.versions.node);
1695
1716
  let l = r(c, n), u = e.emitFile({
1696
1717
  type: "asset",
1697
1718
  name: "bundle-graph.json",
@@ -1703,51 +1724,51 @@ export const isDev = ${JSON.stringify(n)};
1703
1724
  };
1704
1725
  let p = JSON.stringify(c, null, " ");
1705
1726
  return e.emitFile({
1706
- fileName: nt,
1727
+ fileName: ot,
1707
1728
  type: "asset",
1708
1729
  source: p
1709
- }), typeof f.manifestOutput == "function" && await f.manifestOutput(c), typeof f.transformedModuleOutput == "function" && await f.transformedModuleOutput(ye()), c;
1730
+ }), typeof f.manifestOutput == "function" && await f.manifestOutput(c), typeof f.transformedModuleOutput == "function" && await f.transformedModuleOutput(be()), c;
1710
1731
  }
1711
1732
  return {
1712
- buildStart: ne,
1713
- createOutputAnalyzer: _e,
1714
- getQwikBuildModule: Se,
1733
+ buildStart: re,
1734
+ createOutputAnalyzer: ve,
1735
+ getQwikBuildModule: V,
1715
1736
  getOptimizer: y,
1716
- getOptions: ve,
1737
+ getOptions: ye,
1717
1738
  getPath: x,
1718
1739
  getSys: b,
1719
- getTransformedOutputs: ye,
1720
- init: v,
1721
- load: me,
1722
- debug: B,
1723
- log: be,
1740
+ getTransformedOutputs: be,
1741
+ init: g,
1742
+ load: he,
1743
+ debug: z,
1744
+ log: xe,
1724
1745
  normalizeOptions: w,
1725
- normalizePath: V,
1726
- onDiagnostics: xe,
1727
- resolveId: fe,
1746
+ normalizePath: B,
1747
+ onDiagnostics: Se,
1748
+ resolveId: pe,
1728
1749
  segmentCallbacks: c,
1729
- transform: ge,
1750
+ transform: _e,
1730
1751
  validateSource: E,
1731
- setSourceMapSupport: U,
1752
+ setSourceMapSupport: we,
1732
1753
  configureServer: C,
1733
- hotUpdate: we,
1754
+ hotUpdate: H,
1734
1755
  codeSplitting: Ee,
1735
- generateManifest: W
1756
+ generateManifest: De
1736
1757
  };
1737
1758
  }
1738
- var We = (e) => (t) => typeof t == "string" ? re(e.os) ? (t.startsWith("\\\\?\\") || /[^\u0000-\u0080]+/.test(t) || (t = t.replace(/\\/g, "/")), e.path.posix.normalize(t)) : e.path.normalize(t) : t;
1739
- function Ge(e) {
1759
+ var Je = (e) => (t) => typeof t == "string" ? ae(e.os) ? (t.startsWith("\\\\?\\") || /[^\u0000-\u0080]+/.test(t) || (t = t.replace(/\\/g, "/")), e.path.posix.normalize(t)) : e.path.normalize(t) : t;
1760
+ function Ye(e) {
1740
1761
  return e.isEntry || e.segment;
1741
1762
  }
1742
- var Ke = (e) => e.startsWith("virtual:"), qe = {
1763
+ var Xe = (e) => e.startsWith("virtual:"), Ze = {
1743
1764
  ".jsx": !0,
1744
1765
  ".ts": !0,
1745
1766
  ".tsx": !0
1746
- }, Je = /\.qwik\.[mc]?js$/, G = "@qwik.dev/core", K = "@qwik.dev/core/internal", q = "@qwik.dev/core/build", Ye = "@qwik.dev/core/jsx-runtime", Xe = "@qwik.dev/core/jsx-dev-runtime", Ze = "@qwik.dev/core/server", J = "@qwik-client-manifest", Qe = "@qwik.dev/core/preloader", $e = "@qwik-handlers", et = "dist", tt = "lib", nt = "q-manifest.json", rt = "__QWIK_MANIFEST__";
1767
+ }, Qe = /\.qwik\.[mc]?js$/, W = "@qwik.dev/core", G = "@qwik.dev/core/internal", K = "@qwik.dev/core/build", $e = "@qwik.dev/core/jsx-runtime", et = "@qwik.dev/core/jsx-dev-runtime", tt = "@qwik.dev/core/server", q = "@qwik-client-manifest", nt = "@qwik.dev/core/preloader", rt = "@qwik-handlers", it = "dist", at = "lib", ot = "q-manifest.json", st = "__QWIK_MANIFEST__";
1747
1768
  //#endregion
1748
1769
  //#region packages/qwik-vite/src/plugins/rolldown.ts
1749
- function it(e = {}) {
1750
- let t = Ue(e.optimizerOptions);
1770
+ function ct(e = {}) {
1771
+ let t = qe(e.optimizerOptions);
1751
1772
  return {
1752
1773
  name: "rolldown-plugin-qwik",
1753
1774
  api: {
@@ -1779,13 +1800,13 @@ function it(e = {}) {
1779
1800
  return n.input = i, n;
1780
1801
  },
1781
1802
  outputOptions(e) {
1782
- return st(t, e, t.getOptions().outDir);
1803
+ return dt(t, e, t.getOptions().outDir);
1783
1804
  },
1784
1805
  async buildStart() {
1785
1806
  t.onDiagnostics((e, n, r) => {
1786
1807
  e.forEach((e) => {
1787
1808
  let i = t.normalizePath(n.sys.path.join(r, e.file));
1788
- e.category === "error" ? this.error(ct(i, e)) : this.warn(ct(i, e));
1809
+ e.category === "error" ? this.error(ft(i, e)) : this.warn(ft(i, e));
1789
1810
  });
1790
1811
  }), await t.buildStart(this);
1791
1812
  },
@@ -1803,22 +1824,22 @@ function it(e = {}) {
1803
1824
  }
1804
1825
  };
1805
1826
  }
1806
- function at(e, t) {
1807
- return Array.isArray(t) ? (t.length || t.push({}), t.map((t) => st(e, t))) : st(e, t);
1827
+ function lt(e, t) {
1828
+ return Array.isArray(t) ? (t.length || t.push({}), t.map((t) => dt(e, t))) : dt(e, t);
1808
1829
  }
1809
- var ot = (e, t) => {
1830
+ var ut = (e, t) => {
1810
1831
  let n = "build/";
1811
1832
  return e.buildMode === "production" && !e.debug ? `${n}q-[hash].js` : (e) => {
1812
1833
  if (e.moduleIds?.some((e) => /core\.(prod|min)\.mjs$/.test(e))) return `${n}core.js`;
1813
1834
  if (e.moduleIds?.some((e) => /qwik-router\/lib\/index\.qwik\.mjs$/.test(e))) return `${n}qwik-router.js`;
1814
1835
  let r = t.sys.path.relative(t.sys.cwd(), e.name);
1815
- return `${n}${ie(r)}.js`;
1836
+ return `${n}${F(r)}.js`;
1816
1837
  };
1817
1838
  };
1818
- function st(e, t, n) {
1839
+ function dt(e, t, n) {
1819
1840
  let r = { ...t }, i = e.getOptions(), a = e.getOptimizer();
1820
1841
  r.assetFileNames ||= "assets/[hash]-[name].[ext]";
1821
- let o = ot(i, a);
1842
+ let o = ut(i, a);
1822
1843
  if (i.target === "client") {
1823
1844
  r.entryFileNames ||= o, r.chunkFileNames ||= o, r.format = "es";
1824
1845
  let t = r.codeSplitting === !0 ? void 0 : r.codeSplitting;
@@ -1831,159 +1852,159 @@ function st(e, t, n) {
1831
1852
  } else r.chunkFileNames ||= o;
1832
1853
  return !r.dir && n && (r.dir = n), r.format === "cjs" && typeof r.exports != "string" && (r.exports = "auto"), r;
1833
1854
  }
1834
- function ct(e, t) {
1855
+ function ft(e, t) {
1835
1856
  let n = t.highlights?.[0];
1836
1857
  return O(t.message, e, "qwik", n && {
1837
1858
  column: n.startCol,
1838
1859
  line: n.startLine
1839
1860
  });
1840
1861
  }
1841
- var lt = it, ut = "\"undefined\"==typeof window||window.__qwikViteLog||(window.__qwikViteLog=!0,console.debug(\"%c⭐️ Qwik Dev SSR Mode\",\"background: #0c75d2; color: white; padding: 2px 3px; border-radius: 2px; font-size: 0.8em;\",\"App is running in SSR development mode!\\n - Additional JS is loaded by Vite for debugging and live reloading\\n - Rendering performance might not be optimal\\n - Delayed interactivity because prefetching is disabled\\n - Vite dev bundles do not represent production output\\n\\nProduction build can be tested running 'npm run preview'\"))", dt = "if(\"undefined\"!=typeof document){const e=()=>{const e=\"data-qwik-inspector\",t=globalThis.__HOTKEYS__,o=globalThis.__BASE__;let n=document.querySelector(\"#qwik-inspector-info-popup\");n||(n=document.createElement(\"div\"),n.id=\"qwik-inspector-info-popup\",n[\"aria-hidden\"]=\"true\",document.body.appendChild(n)),n.textContent=`Click-to-Source: ${t.join(\" + \")}`,console.debug(\"%c🔍 Qwik Click-To-Source\",\"background: #564CE0; color: white; padding: 2px 3px; border-radius: 2px; font-size: 0.8em;\",`Hold-press the '${t.join(\" + \")}' key${t.length>1?\"s\":\"\"} and click a component to jump directly to the source code in your IDE!`),window.__qwik_inspector_state={pressedKeys:new Set};const r=document.body,i=document.createElement(\"div\");function s(t){return t&&t instanceof Element?t.closest(`[${e}]`):null}function d(){const e=window.__qwik_inspector_state.hoveredElement;if(e&&c()){const t=e.getBoundingClientRect();i.style.setProperty(\"height\",t.height+\"px\"),i.style.setProperty(\"width\",t.width+\"px\"),i.style.setProperty(\"top\",t.top+\"px\"),i.style.setProperty(\"left\",t.left+\"px\"),i.style.setProperty(\"visibility\",\"visible\"),r.style.setProperty(\"cursor\",\"pointer\")}else i.style.setProperty(\"height\",\"0px\"),i.style.setProperty(\"width\",\"0px\"),i.style.setProperty(\"visibility\",\"hidden\"),r.style.removeProperty(\"cursor\")}function c(){return function(){const e=Array.from(window.__qwik_inspector_state.pressedKeys).map(e=>e?e.replace(/(Left|Right)$/g,\"\"):void 0);return t.every(t=>e.includes(t))}()}i.id=\"qwik-inspector-overlay\",i.setAttribute(\"aria-hidden\",\"true\"),r.appendChild(i),document.addEventListener(\"keydown\",e=>{window.__qwik_inspector_state.pressedKeys.add(e.code),d()},{capture:!0}),document.addEventListener(\"keyup\",e=>{window.__qwik_inspector_state.pressedKeys.delete(e.code),d()},{capture:!0}),window.addEventListener(\"blur\",()=>{window.__qwik_inspector_state.pressedKeys.clear(),d()},{capture:!0}),document.addEventListener(\"mouseover\",e=>{const t=s(e.target);window.__qwik_inspector_state.hoveredElement=t||void 0,d()},{capture:!0}),document.addEventListener(\"click\",t=>{if(c()){window.__qwik_inspector_state.pressedKeys.clear();const n=s(t.target);if(n){t.preventDefault(),t.stopPropagation();const i=n.getAttribute(e);if(\"false\"!==i){r.style.setProperty(\"cursor\",\"progress\");const e=i.match(/^(.*?)(:\\d+(:\\d+)?)?$/);if(e){const[,t,n]=e;fetch(`${o}${t}?editor${n}`,{cache:\"no-cache\"}).then(e=>{r.style.removeProperty(\"cursor\"),e.blob()})}}}}},{capture:!0}),document.addEventListener(\"contextmenu\",e=>{if(c()){window.__qwik_inspector_state.pressedKeys.clear();s(e.target)&&e.preventDefault()}},{capture:!0}),window.addEventListener(\"resize\",d),document.addEventListener(\"scroll\",d)};document.addEventListener(\"DOMContentLoaded\",e)}", ft = "if(\"undefined\"!=typeof HTMLElement){class e extends HTMLElement{get _root(){return this.shadowRoot||this}constructor(){super(),this.state={},this.props||(this.props={}),this.componentProps=[\"children\",\"error\"],this.nodesToDestroy=[],this.pendingUpdate=!1,this.attachShadow({mode:\"open\"})}destroyAnyNodes(){this.nodesToDestroy.forEach(e=>e.remove()),this.nodesToDestroy=[]}connectedCallback(){this.getAttributeNames().forEach(e=>{const t=e.replace(/-/g,\"\"),o=new RegExp(t,\"i\");this.componentProps.forEach(t=>{if(o.test(t)){const o=this.getAttribute(e);this.props[t]!==o&&(this.props[t]=o)}})}),this._root.innerHTML='\\n\\n <template data-el=\"show-errored-host\">\\n <div class=\"error\">\\n <template data-el=\"div-errored-host-2\">\\n \\x3c!-- String(props.error) --\\x3e\\n </template>\\n </div>\\n </template>\\n\\n <div class=\"arrow\">👇 Uncaught error happened here 👇\\n <span class=\"dev-tools\">DevTools: Cmd+Alt+I</span>\\n </div>\\n <div class=\"div\">\\n <slot></slot>\\n </div>\\n\\n <style>\\n .error {\\n border-radius: 5px 5px 0px 0;\\n background: black;\\n color: white;\\n font-family: monospace;\\n font-size: 12px;\\n margin: 0;\\n padding: 10px;\\n }\\n .arrow {\\n background: #f47e81;\\n color: black;\\n font-size: 14px;\\n padding: 10px;\\n text-align: center;\\n font-family: sans-serif;\\n }\\n .dev-tools {\\n background: red;\\n padding: 2px 5px;\\n border-radius: 3px;\\n font-weight: 800;\\n }\\n .div {\\n outline: 5px solid red;\\n border-radius: 10px;\\n }\\n </style>',this.pendingUpdate=!0,this.render(),this.onMount(),this.pendingUpdate=!1,this.update()}showContent(e){const t=e.content.cloneNode(!0);Array.from(t.childNodes).forEach(t=>{e?.scope&&(t.scope=e.scope),e?.context&&(t.context=e.context),this.nodesToDestroy.push(t)}),e.after(t)}onMount(){}onUpdate(){}update(){!0!==this.pendingUpdate&&(this.pendingUpdate=!0,this.render(),this.onUpdate(),this.pendingUpdate=!1)}render(){this.destroyAnyNodes(),this.updateBindings()}updateBindings(){this._root.querySelectorAll(\"[data-el='show-errored-host']\").forEach(e=>{this.props.error&&this.showContent(e)}),this._root.querySelectorAll(\"[data-el='div-errored-host-2']\").forEach(e=>{this.renderTextNode(e,String(this.props.error))})}renderTextNode(e,t){const o=document.createTextNode(t);e?.scope&&(o.scope=e.scope),e?.context&&(o.context=e.context),e.after(o),this.nodesToDestroy.push(e.nextSibling)}}customElements.define(\"errored-host\",e),document.addEventListener(\"qerror\",e=>{const t=customElements.get(\"vite-error-overlay\");if(!t)return;const o=new t(e.detail.error);document.body.appendChild(o)})}", pt = "[data-qwik-cls]{outline:2px solid red}[data-qwik-cls]:after{content:\"CLS \" attr(data-qwik-cls);color:#fff;pointer-events:none;background:red;margin:-2px;padding:1px;font-family:monospace;font-size:12px;font-weight:700;line-height:1;position:absolute}#qwik-image-warning-container{contain:size layout style content;z-index:1;pointer-events:none!important;width:0!important;height:0!important;position:absolute!important;top:0!important;left:0!important;overflow:visible!important}", mt = "if(\"undefined\"!=typeof document){const e=()=>{class e extends HTMLElement{#e=null;constructor(){super(),this.attachShadow({mode:\"open\"}),this.shadowRoot.appendChild(document.createElement(\"template\").innerHTML=globalThis.__TEMPLATE__);const e=this.shadowRoot.querySelector(\"dialog\");this.shadowRoot.addEventListener(\"click\",async t=>{const o=t.target;\"BUTTON\"===o.nodeName&&(\"action-btn\"===o.id?this.#e&&(this.#e(),e.close()):\"icon\"===o.id?e.open?e.close():(e.className=function(e){const{x:t}=e.getBoundingClientRect();let o=\"right\";return t>window.innerWidth-260&&(o=\"left\"),`bottom ${o}`}(o),e.show()):\"loc\"===o.id&&o.dataset.url&&globalThis.qwikOpenInEditor(o.dataset.url))})}set loc(e){const t=this.shadowRoot.querySelector(\"#loc\");t.textContent=e,globalThis.qwikOpenInEditor&&(t.dataset.url=e)}set header(e){this.shadowRoot.querySelector(\"#title\").textContent=e}set message(e){this.shadowRoot.querySelector(\"#message\").innerHTML=e}set actionFn(e){this.#e=e}set actionName(e){e&&(this.shadowRoot.querySelector(\".action-container\").innerHTML=`<button id=\"action-btn\" type=\"button\">${e}</button>`)}}customElements.define(\"image-warning\",e);const t=new Map;let o=document.querySelector(\"#qwik-image-warning-container\");o||(o=document.createElement(\"div\"),o.id=\"qwik-image-warning-container\",document.body.appendChild(o));let n=!1;const i=new Map;function r(e){let t=i.get(e);return void 0===t&&(t=async function(e){if(!/^(https?|file|capacitor):/.test(e))return;const t=new URL(\"/__image_info\",location.href);return t.searchParams.set(\"url\",e),fetch(t).then(e=>e.json()).catch(()=>null)}(e),i.set(e,t)),t}function a(e){return e.endsWith(\"px\")}async function s(e){const i=t.get(e);e.isConnected?e.complete&&async function(e){const i=window.scrollX,s=window.scrollY,c=e.getBoundingClientRect(),d=e.currentSrc,l=await r(d);let h=t.get(e);const u=window.innerWidth>500;if(l&&u){let r=!1;const d=e.getAttribute(\"data-qwik-inspector\"),u=c.width*c.height;if(!e.hasAttribute(\"width\")||!e.hasAttribute(\"height\")){n=!0;const t=getComputedStyle(e),o=\"auto\"!==t.getPropertyValue(\"aspect-ratio\").toString(),i=a(t.getPropertyValue(\"width\").toString()),s=a(t.getPropertyValue(\"height\").toString()),c=\"absolute\"===t.getPropertyValue(\"position\").toString();r=u>1e3&&!c&&!o&&(!i||!s)}const g=u<.5*(l.width&&l.height)&&\"svg\"!==l.type;if(n=!1,r||g){if(h||(h=document.createElement(\"image-warning\"),o.appendChild(h),t.set(e,h)),h.style.top=c.top+s+\"px\",h.style.left=c.left+i+\"px\",h.style.width=c.width+\"px\",h.style.height=c.height+\"px\",h.info=l,h.loc=d,r){const t=`width=\"${l.width}\" height=\"${l.height}\"`;h.header=\"Perf: layout shift\",h.message=`Image's size is unknown until it's loaded, <a href=\"https://web.dev/cls/\" target=\"_blank\" rel=\"noopener noreferrer\">causing layout shift</a>.</p><p>To solve this problem set the width/height in the img tag:</p><pre>&lt;img <span>${t}</span></pre>`;const o=1===document.querySelectorAll('[data-qwik-inspector=\"'+d+'\"]').length;d&&(o?(h.actionName=\"Auto fix\",h.actionFn=async()=>{const t=new URL(\"/__image_fix\",location.href);t.searchParams.set(\"loc\",d),t.searchParams.set(\"width\",l.width),t.searchParams.set(\"height\",l.height),e.srcset||(t.searchParams.set(\"src\",e.currentSrc),t.searchParams.set(\"currentHref\",location.href)),await fetch(t,{method:\"POST\"})}):(h.actionName=\"Open in editor\",h.actionFn=async()=>{await navigator.clipboard.writeText(t),globalThis.qwikOpenInEditor(d)}))}else g&&(h.header=\"Perf: properly size image\",h.message=`The image is too big, <a href=\"https://developer.chrome.com/en/docs/lighthouse/performance/uses-responsive-images/\" target=\"_blank\" rel=\"noopener noreferrer\">hurting performance</a>, it should be resized to the size it's displayed at. The image dimensions are ${l.width} x ${l.height} but it's displayed at ${c.width}x${c.height}.</p>`);return}}h&&(h.remove(),t.delete(e))}(e):i&&(i.remove(),t.delete(e))}const c=new ResizeObserver(e=>{if(!n)for(const t of e)s(t.target)}),d=new MutationObserver(e=>{for(const t of e){for(const e of t.addedNodes)\"IMG\"===e.nodeName?c.observe(e):1===e.nodeType&&e.querySelectorAll(\"img\").forEach(e=>{c.observe(e)});for(const e of t.removedNodes)\"IMG\"===e.nodeName?(s(e),c.unobserve(e)):1===e.nodeType&&e.querySelectorAll(\"img\").forEach(e=>{s(e),c.unobserve(e)})}});let l,h=0;const u=()=>{setTimeout(()=>{l&&(l.disconnect(),h>.005&&console.error(\"Detected Layout Shift during page load\",h)),d.observe(document.body,{childList:!0,subtree:!0}),document.body.querySelectorAll(\"img\").forEach(e=>{c.observe(e)})},100)};\"complete\"===document.readyState?u():window.addEventListener(\"load\",u);const g=1===performance?.navigation.type||performance.getEntriesByType(\"navigation\").map(e=>e.type).includes(\"reload\");\"undefined\"==typeof PerformanceObserver||g||(l=new PerformanceObserver(e=>{e.getEntries().forEach(e=>{if(!e.hadRecentInput){if(e.value>.006)for(const t of e.sources)t.node&&1===t.node.nodeType&&\"IMAGE-WARNING\"!==t.node.nodeName&&t.node.setAttribute(\"data-qwik-cls\",Number(e.value).toFixed(3));h+=e.value}})}),l.observe({type:\"layout-shift\",buffered:!0}))};document.addEventListener(\"load\",e)}", ht = "<style>\n :host {\n position: absolute;\n border: 1px solid red;\n pointer-events: none;\n z-index: 1;\n contain: layout size;\n }\n\n #icon {\n border: 0;\n margin: 5px;\n color: black;\n max-width: 100%;\n width: 20px;\n background: yellow;\n border-radius: 100%;\n height: 20px;\n padding: 3px;\n pointer-events: all;\n cursor: pointer;\n }\n\n #icon svg {\n width: 100%;\n height: auto;\n pointer-events: none;\n }\n\n dialog {\n padding: 0;\n border: 0;\n margin: 0 5px;\n background: #ffffe8;\n color: black;\n width: 250px;\n font-size: 11px;\n position: absolute;\n inset-inline-start: unset;\n inset-inline-end: unset;\n border-radius: 5px;\n pointer-events: all;\n overflow: hidden;\n box-shadow: 0px -2px 20px 0px #0000002e;\n z-index: 10000;\n }\n\n .top {\n bottom: calc(100% + 5px);\n }\n .bottom {\n top: 40px;\n }\n .right {\n inset-inline-start: 0;\n inset-inline-end: unset;\n }\n .left {\n inset-inline-start: unset;\n inset-inline-end: calc(100% - 40px);\n }\n\n .content {\n padding: 5px;\n }\n\n #loc {\n background: #2e3801;\n color: #d2d2d2;\n font-family: monospace;\n padding: 3px 5px;\n pointer-events: all;\n margin: 0;\n border: 0;\n cursor: pointer;\n font-size: 11px;\n width: calc(100% - 24px);\n text-overflow: ellipsis;\n overflow: hidden;\n display: block;\n direction: rtl;\n text-align: right;\n }\n #loc:hover {\n background: #3a4a01;\n }\n\n pre {\n background: #f1fb8e;\n padding: 5px;\n margin: 5px 0;\n border-radius: 3px;\n user-select: none;\n }\n\n pre span {\n user-select: all;\n }\n\n a {\n text-decoration: underline;\n }\n\n #close {\n border: 0;\n width: 25px;\n height: 25px;\n position: absolute;\n right: 0;\n top: 0;\n background: #ffe14f;\n color: black;\n font-weight: 900;\n padding: 0;\n margin: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n line-height: 1;\n cursor: pointer;\n }\n #close:hover {\n background: #ffeb6f;\n }\n\n #action-btn {\n border: 2px solid #18ae00;\n padding: 2px 4px;\n background: #50ff50;\n border-radius: 5px;\n color: #0c5500;\n font-weight: 800;\n font-size: 10px;\n cursor: pointer;\n }\n\n p {\n margin: 5px 0;\n }\n\n h2 {\n font-weight: 900;\n margin: 10px 0;\n }\n</style>\n<button id=\"icon\" type=\"button\" aria-label=\"Open image dev dialog\">\n <svg width=\"32\" height=\"32\" viewBox=\"0 0 24 24\">\n <path\n fill=\"currentColor\"\n d=\"M2.725 21q-.275 0-.5-.138t-.35-.362q-.125-.225-.138-.488t.138-.512l9.25-16q.15-.25.388-.375T12 3q.25 0 .488.125t.387.375l9.25 16q.15.25.138.513t-.138.487q-.125.225-.35.363t-.5.137H2.725ZM12 18q.425 0 .713-.288T13 17q0-.425-.288-.713T12 16q-.425 0-.713.288T11 17q0 .425.288.713T12 18Zm0-3q.425 0 .713-.288T13 14v-3q0-.425-.288-.713T12 10q-.425 0-.713.288T11 11v3q0 .425.288.713T12 15Z\"\n />\n </svg>\n</button>\n<dialog>\n <form method=\"dialog\">\n <button id=\"close\" type=\"submit\" aria-label=\"Close\">X</button>\n </form>\n <button id=\"loc\"></button>\n <div class=\"content\">\n <h2 id=\"title\"></h2>\n <p id=\"message\"></p>\n <p class=\"action-container\"></p>\n </div>\n</dialog>\n", gt = "vite-error-overlay{--color-bright:#fffc;--color-yellow:#fff655cc;--qwik-dark-blue:#006ce9;--qwik-light-blue:#3ec2f7;--qwik-light-purple:#ac7ff4;--qwik-dark-purple:#713fc2;--yellow:#fff;--purple:var(--color-bright);--red:var(--qwik-light-blue);--vertical-box-spacing:15px;--box-padding:20px;--box-margin:0 0 var(--vertical-box-spacing) 0;--box-background:#00000080;--box-border-radius:8px}vite-error-overlay::part(backdrop){background:#020b1199}vite-error-overlay::part(window){box-shadow:none;box-sizing:border-box;max-width:1200px;padding:var(--box-padding);background:0 0;border:none;width:90%;margin:50px auto}vite-error-overlay::part(message){flex-direction:column;margin-bottom:30px;font-size:1.6rem;line-height:1.7;display:flex}vite-error-overlay::part(plugin){font-size:.8rem;font-weight:100}vite-error-overlay::part(file),vite-error-overlay::part(frame),vite-error-overlay::part(stack),vite-error-overlay::part(tip){background:var(--box-background);border-radius:var(--box-border-radius);margin:var(--box-margin);min-height:50px;padding:var(--box-padding);border-left:5px solid #0000;position:relative}vite-error-overlay::part(file){color:var(--color-bright);border-left-color:#19b6f6}vite-error-overlay::part(frame){border-left-color:var(--color-yellow);color:var(--color-yellow)}vite-error-overlay::part(stack){border-left-color:#ff5722}vite-error-overlay::part(tip){border-top:none;border-left-color:#ac7ff4}vite-error-overlay::part(file):before,vite-error-overlay::part(frame):before,vite-error-overlay::part(stack):before{color:var(--color-bright);border-bottom:1px solid #222;margin-bottom:15px;padding-bottom:5px;padding-left:30px;font-size:.8rem;display:block}vite-error-overlay::part(file):before{content:\"File\"}vite-error-overlay::part(frame):before{content:\"Frame\"}vite-error-overlay::part(stack):before{content:\"Stack Trace\"}vite-error-overlay::part(file):after,vite-error-overlay::part(frame):after,vite-error-overlay::part(stack):after{content:\"\";height:20px;left:var(--box-padding);top:var(--box-padding);width:20px;display:block;position:absolute}vite-error-overlay::part(file):after{background-image:url(\"data:image/svg+xml,%3Csvg width='20px' height='20px' viewBox='0 0 24 24' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Ctitle%3EFile-Generic%3C/title%3E%3Cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E%3Cg id='File-Generic'%3E%3Crect id='Rectangle' fill-rule='nonzero' x='0' y='0' width='24' height='24'%3E%3C/rect%3E%3Cpath d='M4 5 C4 3.89543 4.89543 3 6 3 L15.1716 3 C15.702 3 16.2107 3.21071 16.5858 3.58579 L19.4142 6.41421 C19.7893 6.78929 20 7.29799 20 7.82843 L20 19 C20 20.1046 19.1046 21 18 21 L6 21 C4.89543 21 4 20.1046 4 19 L4 5 Z' id='Path' stroke='rgba(255,255,255,0.7)' stroke-width='1' stroke-linecap='round'%3E%3C/path%3E%3Cpath d='M15 4 L15 6 C15 7.10457 15.8954 8 17 8 L19 8' id='Path' stroke='rgba(255,255,255,0.7)' stroke-width='1' stroke-linecap='round'%3E%3C/path%3E%3C/g%3E%3C/g%3E%3C/svg%3E\")}vite-error-overlay::part(frame):after{background-image:url(\"data:image/svg+xml,%3Csvg width='20px' height='20px' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M15.6602 2.84952H19.1516C20.2555 2.84952 21.1504 3.74444 21.1504 4.84839V8.3398' stroke='rgba(255,255,255,0.7)' stroke-width='1.69904' stroke-linecap='round'/%3E%3Cpath d='M2.84949 8.33981L2.84949 4.8484C2.84949 3.74446 3.74441 2.84953 4.84836 2.84953L8.33977 2.84953' stroke='rgba(255,255,255,0.7)' stroke-width='1.69904' stroke-linecap='round'/%3E%3Cpath d='M21.1505 15.6602L21.1505 19.1516C21.1505 20.2555 20.2556 21.1505 19.1516 21.1505L15.6602 21.1505' stroke='rgba(255,255,255,0.7)' stroke-width='1.69904' stroke-linecap='round'/%3E%3Cpath d='M8.33984 21.1505L4.84843 21.1505C3.74449 21.1505 2.84956 20.2555 2.84956 19.1516L2.84956 15.6602' stroke='rgba(255,255,255,0.7)' stroke-width='1.69904' stroke-linecap='round'/%3E%3C/svg%3E\")}vite-error-overlay::part(stack):after{background-image:url(\"data:image/svg+xml,%3Csvg width='20px' height='20px' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.78 20H9.78C7.98 20 4.58 19.09 4.58 15.64C4.58 12.19 7.98 11.28 9.78 11.28H14.22C14.37 11.28 17.92 11.23 17.92 8.42C17.92 5.61 14.37 5.56 14.22 5.56H9.22C9.02109 5.56 8.83032 5.48098 8.68967 5.34033C8.54902 5.19968 8.47 5.00891 8.47 4.81C8.47 4.61109 8.54902 4.42032 8.68967 4.27967C8.83032 4.13902 9.02109 4.06 9.22 4.06H14.22C16.02 4.06 19.42 4.97 19.42 8.42C19.42 11.87 16.02 12.78 14.22 12.78H9.78C9.63 12.78 6.08 12.83 6.08 15.64C6.08 18.45 9.63 18.5 9.78 18.5H14.78C14.9789 18.5 15.1697 18.579 15.3103 18.7197C15.451 18.8603 15.53 19.0511 15.53 19.25C15.53 19.4489 15.451 19.6397 15.3103 19.7803C15.1697 19.921 14.9789 20 14.78 20Z' fill='rgba(255,255,255,0.7)'/%3E%3Cpath d='M6.44 8.31C5.74314 8.30407 5.06363 8.09202 4.48708 7.70056C3.91054 7.30909 3.46276 6.75573 3.20018 6.11021C2.93759 5.46469 2.87195 4.75589 3.01153 4.07312C3.1511 3.39036 3.48965 2.76418 3.9845 2.2735C4.47935 1.78281 5.10837 1.44958 5.79229 1.31579C6.47622 1.182 7.18444 1.25363 7.82771 1.52167C8.47099 1.78971 9.02054 2.24215 9.40711 2.82199C9.79368 3.40182 9.99998 4.08311 10 4.78C10 5.2461 9.90773 5.70759 9.72846 6.13783C9.54919 6.56808 9.28648 6.95856 8.95551 7.28675C8.62453 7.61494 8.23184 7.87433 7.80009 8.04995C7.36834 8.22558 6.90609 8.31396 6.44 8.31ZM6.44 2.75C6.04444 2.75 5.65776 2.86729 5.32886 3.08706C4.99996 3.30682 4.74362 3.61918 4.59224 3.98463C4.44087 4.35008 4.40126 4.75221 4.47843 5.14018C4.5556 5.52814 4.74609 5.8845 5.02579 6.16421C5.3055 6.44391 5.66186 6.6344 6.04982 6.71157C6.43779 6.78874 6.83992 6.74913 7.20537 6.59776C7.57082 6.44638 7.88318 6.19003 8.10294 5.86114C8.32271 5.53224 8.44 5.14556 8.44 4.75C8.44 4.48735 8.38827 4.22728 8.28776 3.98463C8.18725 3.74198 8.03993 3.5215 7.85422 3.33578C7.6685 3.15007 7.44802 3.00275 7.20537 2.90224C6.96272 2.80173 6.70265 2.75 6.44 2.75Z' fill='rgba(255,255,255,0.7)'/%3E%3Cpath d='M17.56 22.75C16.8614 22.752 16.1779 22.5466 15.5961 22.1599C15.0143 21.7733 14.5603 21.2227 14.2916 20.5778C14.0229 19.933 13.9515 19.2229 14.0866 18.5375C14.2217 17.8521 14.5571 17.2221 15.0504 16.7275C15.5437 16.2328 16.1726 15.8956 16.8577 15.7586C17.5427 15.6215 18.253 15.6909 18.8986 15.9577C19.5442 16.2246 20.0961 16.6771 20.4844 17.2578C20.8727 17.8385 21.08 18.5214 21.08 19.22C21.08 20.1545 20.7095 21.0508 20.0496 21.7125C19.3898 22.3743 18.4945 22.7473 17.56 22.75ZM17.56 17.19C17.1644 17.19 16.7778 17.3073 16.4489 17.5271C16.12 17.7468 15.8636 18.0592 15.7122 18.4246C15.5609 18.7901 15.5213 19.1922 15.5984 19.5802C15.6756 19.9681 15.8661 20.3245 16.1458 20.6042C16.4255 20.8839 16.7819 21.0744 17.1698 21.1516C17.5578 21.2287 17.9599 21.1891 18.3254 21.0377C18.6908 20.8864 19.0032 20.63 19.2229 20.3011C19.4427 19.9722 19.56 19.5856 19.56 19.19C19.56 18.6596 19.3493 18.1508 18.9742 17.7758C18.5991 17.4007 18.0904 17.19 17.56 17.19Z' fill='rgba(255,255,255,0.7)'/%3E%3C/svg%3E\")}vite-error-overlay::part(tip):before{content:\"Not sure how to solve this? Visit https://qwik.dev or connect with the community on Discord.\";margin-bottom:1em;display:block}", _t = "#qwik-inspector-overlay{pointer-events:none;box-sizing:border-box;contain:strict;cursor:pointer;z-index:999999;background:#18b6f645;border:2px solid #ac7ef475;border-radius:4px;position:fixed}#qwik-inspector-info-popup{color:#fff;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);z-index:999999;contain:layout;background:#000000c2;border-radius:8px;padding:10px 20px;font-family:monospace;animation:.3s ease-in-out 3s forwards fadeOut;position:fixed;bottom:10px;right:10px;box-shadow:0 20px 25px -5px #00000057,0 8px 10px -6px #0000003d}#qwik-inspector-info-popup p{margin:0}@-webkit-keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes fadeOut{0%{opacity:1}to{opacity:0;visibility:hidden}}";
1862
+ var pt = ct, mt = "\"undefined\"==typeof window||window.__qwikViteLog||(window.__qwikViteLog=!0,console.debug(\"%c⭐️ Qwik Dev SSR Mode\",\"background: #0c75d2; color: white; padding: 2px 3px; border-radius: 2px; font-size: 0.8em;\",\"App is running in SSR development mode!\\n - Additional JS is loaded by Vite for debugging and live reloading\\n - Rendering performance might not be optimal\\n - Delayed interactivity because prefetching is disabled\\n - Vite dev bundles do not represent production output\\n\\nProduction build can be tested running 'npm run preview'\"))", ht = "if(\"undefined\"!=typeof document){const e=()=>{const e=\"data-qwik-inspector\",t=globalThis.__HOTKEYS__,o=globalThis.__BASE__;let n=document.querySelector(\"#qwik-inspector-info-popup\");n||(n=document.createElement(\"div\"),n.id=\"qwik-inspector-info-popup\",n[\"aria-hidden\"]=\"true\",document.body.appendChild(n)),n.textContent=`Click-to-Source: ${t.join(\" + \")}`,console.debug(\"%c🔍 Qwik Click-To-Source\",\"background: #564CE0; color: white; padding: 2px 3px; border-radius: 2px; font-size: 0.8em;\",`Hold-press the '${t.join(\" + \")}' key${t.length>1?\"s\":\"\"} and click a component to jump directly to the source code in your IDE!`),window.__qwik_inspector_state={pressedKeys:new Set};const r=document.body,i=document.createElement(\"div\");function s(t){return t&&t instanceof Element?t.closest(`[${e}]`):null}function d(){const e=window.__qwik_inspector_state.hoveredElement;if(e&&c()){const t=e.getBoundingClientRect();i.style.setProperty(\"height\",t.height+\"px\"),i.style.setProperty(\"width\",t.width+\"px\"),i.style.setProperty(\"top\",t.top+\"px\"),i.style.setProperty(\"left\",t.left+\"px\"),i.style.setProperty(\"visibility\",\"visible\"),r.style.setProperty(\"cursor\",\"pointer\")}else i.style.setProperty(\"height\",\"0px\"),i.style.setProperty(\"width\",\"0px\"),i.style.setProperty(\"visibility\",\"hidden\"),r.style.removeProperty(\"cursor\")}function c(){return function(){const e=Array.from(window.__qwik_inspector_state.pressedKeys).map(e=>e?e.replace(/(Left|Right)$/g,\"\"):void 0);return t.every(t=>e.includes(t))}()}i.id=\"qwik-inspector-overlay\",i.setAttribute(\"aria-hidden\",\"true\"),r.appendChild(i),document.addEventListener(\"keydown\",e=>{window.__qwik_inspector_state.pressedKeys.add(e.code),d()},{capture:!0}),document.addEventListener(\"keyup\",e=>{window.__qwik_inspector_state.pressedKeys.delete(e.code),d()},{capture:!0}),window.addEventListener(\"blur\",()=>{window.__qwik_inspector_state.pressedKeys.clear(),d()},{capture:!0}),document.addEventListener(\"mouseover\",e=>{const t=s(e.target);window.__qwik_inspector_state.hoveredElement=t||void 0,d()},{capture:!0}),document.addEventListener(\"click\",t=>{if(c()){window.__qwik_inspector_state.pressedKeys.clear();const n=s(t.target);if(n){t.preventDefault(),t.stopPropagation();const i=n.getAttribute(e);if(\"false\"!==i){r.style.setProperty(\"cursor\",\"progress\");const e=i.match(/^(.*?)(:\\d+(:\\d+)?)?$/);if(e){const[,t,n]=e;fetch(`${o}${t}?editor${n}`,{cache:\"no-cache\"}).then(e=>{r.style.removeProperty(\"cursor\"),e.blob()})}}}}},{capture:!0}),document.addEventListener(\"contextmenu\",e=>{if(c()){window.__qwik_inspector_state.pressedKeys.clear();s(e.target)&&e.preventDefault()}},{capture:!0}),window.addEventListener(\"resize\",d),document.addEventListener(\"scroll\",d)};document.addEventListener(\"DOMContentLoaded\",e)}", gt = "if(\"undefined\"!=typeof HTMLElement){class e extends HTMLElement{get _root(){return this.shadowRoot||this}constructor(){super(),this.state={},this.props||(this.props={}),this.componentProps=[\"children\",\"error\"],this.nodesToDestroy=[],this.pendingUpdate=!1,this.attachShadow({mode:\"open\"})}destroyAnyNodes(){this.nodesToDestroy.forEach(e=>e.remove()),this.nodesToDestroy=[]}connectedCallback(){this.getAttributeNames().forEach(e=>{const t=e.replace(/-/g,\"\"),o=new RegExp(t,\"i\");this.componentProps.forEach(t=>{if(o.test(t)){const o=this.getAttribute(e);this.props[t]!==o&&(this.props[t]=o)}})}),this._root.innerHTML='\\n\\n <template data-el=\"show-errored-host\">\\n <div class=\"error\">\\n <template data-el=\"div-errored-host-2\">\\n \\x3c!-- String(props.error) --\\x3e\\n </template>\\n </div>\\n </template>\\n\\n <div class=\"arrow\">👇 Uncaught error happened here 👇\\n <span class=\"dev-tools\">DevTools: Cmd+Alt+I</span>\\n </div>\\n <div class=\"div\">\\n <slot></slot>\\n </div>\\n\\n <style>\\n .error {\\n border-radius: 5px 5px 0px 0;\\n background: black;\\n color: white;\\n font-family: monospace;\\n font-size: 12px;\\n margin: 0;\\n padding: 10px;\\n }\\n .arrow {\\n background: #f47e81;\\n color: black;\\n font-size: 14px;\\n padding: 10px;\\n text-align: center;\\n font-family: sans-serif;\\n }\\n .dev-tools {\\n background: red;\\n padding: 2px 5px;\\n border-radius: 3px;\\n font-weight: 800;\\n }\\n .div {\\n outline: 5px solid red;\\n border-radius: 10px;\\n }\\n </style>',this.pendingUpdate=!0,this.render(),this.onMount(),this.pendingUpdate=!1,this.update()}showContent(e){const t=e.content.cloneNode(!0);Array.from(t.childNodes).forEach(t=>{e?.scope&&(t.scope=e.scope),e?.context&&(t.context=e.context),this.nodesToDestroy.push(t)}),e.after(t)}onMount(){}onUpdate(){}update(){!0!==this.pendingUpdate&&(this.pendingUpdate=!0,this.render(),this.onUpdate(),this.pendingUpdate=!1)}render(){this.destroyAnyNodes(),this.updateBindings()}updateBindings(){this._root.querySelectorAll(\"[data-el='show-errored-host']\").forEach(e=>{this.props.error&&this.showContent(e)}),this._root.querySelectorAll(\"[data-el='div-errored-host-2']\").forEach(e=>{this.renderTextNode(e,String(this.props.error))})}renderTextNode(e,t){const o=document.createTextNode(t);e?.scope&&(o.scope=e.scope),e?.context&&(o.context=e.context),e.after(o),this.nodesToDestroy.push(e.nextSibling)}}customElements.define(\"errored-host\",e),document.addEventListener(\"qerror\",e=>{const t=customElements.get(\"vite-error-overlay\");if(!t)return;const o=new t(e.detail.error);document.body.appendChild(o)})}", _t = "[data-qwik-cls]{outline:2px solid red}[data-qwik-cls]:after{content:\"CLS \" attr(data-qwik-cls);color:#fff;pointer-events:none;background:red;margin:-2px;padding:1px;font-family:monospace;font-size:12px;font-weight:700;line-height:1;position:absolute}#qwik-image-warning-container{contain:size layout style content;z-index:1;pointer-events:none!important;width:0!important;height:0!important;position:absolute!important;top:0!important;left:0!important;overflow:visible!important}", vt = "if(\"undefined\"!=typeof document){const e=()=>{class e extends HTMLElement{#e=null;constructor(){super(),this.attachShadow({mode:\"open\"}),this.shadowRoot.appendChild(document.createElement(\"template\").innerHTML=globalThis.__TEMPLATE__);const e=this.shadowRoot.querySelector(\"dialog\");this.shadowRoot.addEventListener(\"click\",async t=>{const o=t.target;\"BUTTON\"===o.nodeName&&(\"action-btn\"===o.id?this.#e&&(this.#e(),e.close()):\"icon\"===o.id?e.open?e.close():(e.className=function(e){const{x:t}=e.getBoundingClientRect();let o=\"right\";return t>window.innerWidth-260&&(o=\"left\"),`bottom ${o}`}(o),e.show()):\"loc\"===o.id&&o.dataset.url&&globalThis.qwikOpenInEditor(o.dataset.url))})}set loc(e){const t=this.shadowRoot.querySelector(\"#loc\");t.textContent=e,globalThis.qwikOpenInEditor&&(t.dataset.url=e)}set header(e){this.shadowRoot.querySelector(\"#title\").textContent=e}set message(e){this.shadowRoot.querySelector(\"#message\").innerHTML=e}set actionFn(e){this.#e=e}set actionName(e){e&&(this.shadowRoot.querySelector(\".action-container\").innerHTML=`<button id=\"action-btn\" type=\"button\">${e}</button>`)}}customElements.define(\"image-warning\",e);const t=new Map;let o=document.querySelector(\"#qwik-image-warning-container\");o||(o=document.createElement(\"div\"),o.id=\"qwik-image-warning-container\",document.body.appendChild(o));let n=!1;const i=new Map;function r(e){let t=i.get(e);return void 0===t&&(t=async function(e){if(!/^(https?|file|capacitor):/.test(e))return;const t=new URL(\"/__image_info\",location.href);return t.searchParams.set(\"url\",e),fetch(t).then(e=>e.json()).catch(()=>null)}(e),i.set(e,t)),t}function a(e){return e.endsWith(\"px\")}async function s(e){const i=t.get(e);e.isConnected?e.complete&&async function(e){const i=window.scrollX,s=window.scrollY,c=e.getBoundingClientRect(),d=e.currentSrc,l=await r(d);let h=t.get(e);const u=window.innerWidth>500;if(l&&u){let r=!1;const d=e.getAttribute(\"data-qwik-inspector\"),u=c.width*c.height;if(!e.hasAttribute(\"width\")||!e.hasAttribute(\"height\")){n=!0;const t=getComputedStyle(e),o=\"auto\"!==t.getPropertyValue(\"aspect-ratio\").toString(),i=a(t.getPropertyValue(\"width\").toString()),s=a(t.getPropertyValue(\"height\").toString()),c=\"absolute\"===t.getPropertyValue(\"position\").toString();r=u>1e3&&!c&&!o&&(!i||!s)}const g=u<.5*(l.width&&l.height)&&\"svg\"!==l.type;if(n=!1,r||g){if(h||(h=document.createElement(\"image-warning\"),o.appendChild(h),t.set(e,h)),h.style.top=c.top+s+\"px\",h.style.left=c.left+i+\"px\",h.style.width=c.width+\"px\",h.style.height=c.height+\"px\",h.info=l,h.loc=d,r){const t=`width=\"${l.width}\" height=\"${l.height}\"`;h.header=\"Perf: layout shift\",h.message=`Image's size is unknown until it's loaded, <a href=\"https://web.dev/cls/\" target=\"_blank\" rel=\"noopener noreferrer\">causing layout shift</a>.</p><p>To solve this problem set the width/height in the img tag:</p><pre>&lt;img <span>${t}</span></pre>`;const o=1===document.querySelectorAll('[data-qwik-inspector=\"'+d+'\"]').length;d&&(o?(h.actionName=\"Auto fix\",h.actionFn=async()=>{const t=new URL(\"/__image_fix\",location.href);t.searchParams.set(\"loc\",d),t.searchParams.set(\"width\",l.width),t.searchParams.set(\"height\",l.height),e.srcset||(t.searchParams.set(\"src\",e.currentSrc),t.searchParams.set(\"currentHref\",location.href)),await fetch(t,{method:\"POST\"})}):(h.actionName=\"Open in editor\",h.actionFn=async()=>{await navigator.clipboard.writeText(t),globalThis.qwikOpenInEditor(d)}))}else g&&(h.header=\"Perf: properly size image\",h.message=`The image is too big, <a href=\"https://developer.chrome.com/en/docs/lighthouse/performance/uses-responsive-images/\" target=\"_blank\" rel=\"noopener noreferrer\">hurting performance</a>, it should be resized to the size it's displayed at. The image dimensions are ${l.width} x ${l.height} but it's displayed at ${c.width}x${c.height}.</p>`);return}}h&&(h.remove(),t.delete(e))}(e):i&&(i.remove(),t.delete(e))}const c=new ResizeObserver(e=>{if(!n)for(const t of e)s(t.target)}),d=new MutationObserver(e=>{for(const t of e){for(const e of t.addedNodes)\"IMG\"===e.nodeName?c.observe(e):1===e.nodeType&&e.querySelectorAll(\"img\").forEach(e=>{c.observe(e)});for(const e of t.removedNodes)\"IMG\"===e.nodeName?(s(e),c.unobserve(e)):1===e.nodeType&&e.querySelectorAll(\"img\").forEach(e=>{s(e),c.unobserve(e)})}});let l,h=0;const u=()=>{setTimeout(()=>{l&&(l.disconnect(),h>.005&&console.error(\"Detected Layout Shift during page load\",h)),d.observe(document.body,{childList:!0,subtree:!0}),document.body.querySelectorAll(\"img\").forEach(e=>{c.observe(e)})},100)};\"complete\"===document.readyState?u():window.addEventListener(\"load\",u);const g=1===performance?.navigation.type||performance.getEntriesByType(\"navigation\").map(e=>e.type).includes(\"reload\");\"undefined\"==typeof PerformanceObserver||g||(l=new PerformanceObserver(e=>{e.getEntries().forEach(e=>{if(!e.hadRecentInput){if(e.value>.006)for(const t of e.sources)t.node&&1===t.node.nodeType&&\"IMAGE-WARNING\"!==t.node.nodeName&&t.node.setAttribute(\"data-qwik-cls\",Number(e.value).toFixed(3));h+=e.value}})}),l.observe({type:\"layout-shift\",buffered:!0}))};document.addEventListener(\"load\",e)}", yt = "<style>\n :host {\n position: absolute;\n border: 1px solid red;\n pointer-events: none;\n z-index: 1;\n contain: layout size;\n }\n\n #icon {\n border: 0;\n margin: 5px;\n color: black;\n max-width: 100%;\n width: 20px;\n background: yellow;\n border-radius: 100%;\n height: 20px;\n padding: 3px;\n pointer-events: all;\n cursor: pointer;\n }\n\n #icon svg {\n width: 100%;\n height: auto;\n pointer-events: none;\n }\n\n dialog {\n padding: 0;\n border: 0;\n margin: 0 5px;\n background: #ffffe8;\n color: black;\n width: 250px;\n font-size: 11px;\n position: absolute;\n inset-inline-start: unset;\n inset-inline-end: unset;\n border-radius: 5px;\n pointer-events: all;\n overflow: hidden;\n box-shadow: 0px -2px 20px 0px #0000002e;\n z-index: 10000;\n }\n\n .top {\n bottom: calc(100% + 5px);\n }\n .bottom {\n top: 40px;\n }\n .right {\n inset-inline-start: 0;\n inset-inline-end: unset;\n }\n .left {\n inset-inline-start: unset;\n inset-inline-end: calc(100% - 40px);\n }\n\n .content {\n padding: 5px;\n }\n\n #loc {\n background: #2e3801;\n color: #d2d2d2;\n font-family: monospace;\n padding: 3px 5px;\n pointer-events: all;\n margin: 0;\n border: 0;\n cursor: pointer;\n font-size: 11px;\n width: calc(100% - 24px);\n text-overflow: ellipsis;\n overflow: hidden;\n display: block;\n direction: rtl;\n text-align: right;\n }\n #loc:hover {\n background: #3a4a01;\n }\n\n pre {\n background: #f1fb8e;\n padding: 5px;\n margin: 5px 0;\n border-radius: 3px;\n user-select: none;\n }\n\n pre span {\n user-select: all;\n }\n\n a {\n text-decoration: underline;\n }\n\n #close {\n border: 0;\n width: 25px;\n height: 25px;\n position: absolute;\n right: 0;\n top: 0;\n background: #ffe14f;\n color: black;\n font-weight: 900;\n padding: 0;\n margin: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n line-height: 1;\n cursor: pointer;\n }\n #close:hover {\n background: #ffeb6f;\n }\n\n #action-btn {\n border: 2px solid #18ae00;\n padding: 2px 4px;\n background: #50ff50;\n border-radius: 5px;\n color: #0c5500;\n font-weight: 800;\n font-size: 10px;\n cursor: pointer;\n }\n\n p {\n margin: 5px 0;\n }\n\n h2 {\n font-weight: 900;\n margin: 10px 0;\n }\n</style>\n<button id=\"icon\" type=\"button\" aria-label=\"Open image dev dialog\">\n <svg width=\"32\" height=\"32\" viewBox=\"0 0 24 24\">\n <path\n fill=\"currentColor\"\n d=\"M2.725 21q-.275 0-.5-.138t-.35-.362q-.125-.225-.138-.488t.138-.512l9.25-16q.15-.25.388-.375T12 3q.25 0 .488.125t.387.375l9.25 16q.15.25.138.513t-.138.487q-.125.225-.35.363t-.5.137H2.725ZM12 18q.425 0 .713-.288T13 17q0-.425-.288-.713T12 16q-.425 0-.713.288T11 17q0 .425.288.713T12 18Zm0-3q.425 0 .713-.288T13 14v-3q0-.425-.288-.713T12 10q-.425 0-.713.288T11 11v3q0 .425.288.713T12 15Z\"\n />\n </svg>\n</button>\n<dialog>\n <form method=\"dialog\">\n <button id=\"close\" type=\"submit\" aria-label=\"Close\">X</button>\n </form>\n <button id=\"loc\"></button>\n <div class=\"content\">\n <h2 id=\"title\"></h2>\n <p id=\"message\"></p>\n <p class=\"action-container\"></p>\n </div>\n</dialog>\n", bt = "vite-error-overlay{--color-bright:#fffc;--color-yellow:#fff655cc;--qwik-dark-blue:#006ce9;--qwik-light-blue:#3ec2f7;--qwik-light-purple:#ac7ff4;--qwik-dark-purple:#713fc2;--yellow:#fff;--purple:var(--color-bright);--red:var(--qwik-light-blue);--vertical-box-spacing:15px;--box-padding:20px;--box-margin:0 0 var(--vertical-box-spacing) 0;--box-background:#00000080;--box-border-radius:8px}vite-error-overlay::part(backdrop){background:#020b1199}vite-error-overlay::part(window){box-shadow:none;box-sizing:border-box;max-width:1200px;padding:var(--box-padding);background:0 0;border:none;width:90%;margin:50px auto}vite-error-overlay::part(message){flex-direction:column;margin-bottom:30px;font-size:1.6rem;line-height:1.7;display:flex}vite-error-overlay::part(plugin){font-size:.8rem;font-weight:100}vite-error-overlay::part(file),vite-error-overlay::part(frame),vite-error-overlay::part(stack),vite-error-overlay::part(tip){background:var(--box-background);border-radius:var(--box-border-radius);margin:var(--box-margin);min-height:50px;padding:var(--box-padding);border-left:5px solid #0000;position:relative}vite-error-overlay::part(file){color:var(--color-bright);border-left-color:#19b6f6}vite-error-overlay::part(frame){border-left-color:var(--color-yellow);color:var(--color-yellow)}vite-error-overlay::part(stack){border-left-color:#ff5722}vite-error-overlay::part(tip){border-top:none;border-left-color:#ac7ff4}vite-error-overlay::part(file):before,vite-error-overlay::part(frame):before,vite-error-overlay::part(stack):before{color:var(--color-bright);border-bottom:1px solid #222;margin-bottom:15px;padding-bottom:5px;padding-left:30px;font-size:.8rem;display:block}vite-error-overlay::part(file):before{content:\"File\"}vite-error-overlay::part(frame):before{content:\"Frame\"}vite-error-overlay::part(stack):before{content:\"Stack Trace\"}vite-error-overlay::part(file):after,vite-error-overlay::part(frame):after,vite-error-overlay::part(stack):after{content:\"\";height:20px;left:var(--box-padding);top:var(--box-padding);width:20px;display:block;position:absolute}vite-error-overlay::part(file):after{background-image:url(\"data:image/svg+xml,%3Csvg width='20px' height='20px' viewBox='0 0 24 24' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Ctitle%3EFile-Generic%3C/title%3E%3Cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E%3Cg id='File-Generic'%3E%3Crect id='Rectangle' fill-rule='nonzero' x='0' y='0' width='24' height='24'%3E%3C/rect%3E%3Cpath d='M4 5 C4 3.89543 4.89543 3 6 3 L15.1716 3 C15.702 3 16.2107 3.21071 16.5858 3.58579 L19.4142 6.41421 C19.7893 6.78929 20 7.29799 20 7.82843 L20 19 C20 20.1046 19.1046 21 18 21 L6 21 C4.89543 21 4 20.1046 4 19 L4 5 Z' id='Path' stroke='rgba(255,255,255,0.7)' stroke-width='1' stroke-linecap='round'%3E%3C/path%3E%3Cpath d='M15 4 L15 6 C15 7.10457 15.8954 8 17 8 L19 8' id='Path' stroke='rgba(255,255,255,0.7)' stroke-width='1' stroke-linecap='round'%3E%3C/path%3E%3C/g%3E%3C/g%3E%3C/svg%3E\")}vite-error-overlay::part(frame):after{background-image:url(\"data:image/svg+xml,%3Csvg width='20px' height='20px' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M15.6602 2.84952H19.1516C20.2555 2.84952 21.1504 3.74444 21.1504 4.84839V8.3398' stroke='rgba(255,255,255,0.7)' stroke-width='1.69904' stroke-linecap='round'/%3E%3Cpath d='M2.84949 8.33981L2.84949 4.8484C2.84949 3.74446 3.74441 2.84953 4.84836 2.84953L8.33977 2.84953' stroke='rgba(255,255,255,0.7)' stroke-width='1.69904' stroke-linecap='round'/%3E%3Cpath d='M21.1505 15.6602L21.1505 19.1516C21.1505 20.2555 20.2556 21.1505 19.1516 21.1505L15.6602 21.1505' stroke='rgba(255,255,255,0.7)' stroke-width='1.69904' stroke-linecap='round'/%3E%3Cpath d='M8.33984 21.1505L4.84843 21.1505C3.74449 21.1505 2.84956 20.2555 2.84956 19.1516L2.84956 15.6602' stroke='rgba(255,255,255,0.7)' stroke-width='1.69904' stroke-linecap='round'/%3E%3C/svg%3E\")}vite-error-overlay::part(stack):after{background-image:url(\"data:image/svg+xml,%3Csvg width='20px' height='20px' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.78 20H9.78C7.98 20 4.58 19.09 4.58 15.64C4.58 12.19 7.98 11.28 9.78 11.28H14.22C14.37 11.28 17.92 11.23 17.92 8.42C17.92 5.61 14.37 5.56 14.22 5.56H9.22C9.02109 5.56 8.83032 5.48098 8.68967 5.34033C8.54902 5.19968 8.47 5.00891 8.47 4.81C8.47 4.61109 8.54902 4.42032 8.68967 4.27967C8.83032 4.13902 9.02109 4.06 9.22 4.06H14.22C16.02 4.06 19.42 4.97 19.42 8.42C19.42 11.87 16.02 12.78 14.22 12.78H9.78C9.63 12.78 6.08 12.83 6.08 15.64C6.08 18.45 9.63 18.5 9.78 18.5H14.78C14.9789 18.5 15.1697 18.579 15.3103 18.7197C15.451 18.8603 15.53 19.0511 15.53 19.25C15.53 19.4489 15.451 19.6397 15.3103 19.7803C15.1697 19.921 14.9789 20 14.78 20Z' fill='rgba(255,255,255,0.7)'/%3E%3Cpath d='M6.44 8.31C5.74314 8.30407 5.06363 8.09202 4.48708 7.70056C3.91054 7.30909 3.46276 6.75573 3.20018 6.11021C2.93759 5.46469 2.87195 4.75589 3.01153 4.07312C3.1511 3.39036 3.48965 2.76418 3.9845 2.2735C4.47935 1.78281 5.10837 1.44958 5.79229 1.31579C6.47622 1.182 7.18444 1.25363 7.82771 1.52167C8.47099 1.78971 9.02054 2.24215 9.40711 2.82199C9.79368 3.40182 9.99998 4.08311 10 4.78C10 5.2461 9.90773 5.70759 9.72846 6.13783C9.54919 6.56808 9.28648 6.95856 8.95551 7.28675C8.62453 7.61494 8.23184 7.87433 7.80009 8.04995C7.36834 8.22558 6.90609 8.31396 6.44 8.31ZM6.44 2.75C6.04444 2.75 5.65776 2.86729 5.32886 3.08706C4.99996 3.30682 4.74362 3.61918 4.59224 3.98463C4.44087 4.35008 4.40126 4.75221 4.47843 5.14018C4.5556 5.52814 4.74609 5.8845 5.02579 6.16421C5.3055 6.44391 5.66186 6.6344 6.04982 6.71157C6.43779 6.78874 6.83992 6.74913 7.20537 6.59776C7.57082 6.44638 7.88318 6.19003 8.10294 5.86114C8.32271 5.53224 8.44 5.14556 8.44 4.75C8.44 4.48735 8.38827 4.22728 8.28776 3.98463C8.18725 3.74198 8.03993 3.5215 7.85422 3.33578C7.6685 3.15007 7.44802 3.00275 7.20537 2.90224C6.96272 2.80173 6.70265 2.75 6.44 2.75Z' fill='rgba(255,255,255,0.7)'/%3E%3Cpath d='M17.56 22.75C16.8614 22.752 16.1779 22.5466 15.5961 22.1599C15.0143 21.7733 14.5603 21.2227 14.2916 20.5778C14.0229 19.933 13.9515 19.2229 14.0866 18.5375C14.2217 17.8521 14.5571 17.2221 15.0504 16.7275C15.5437 16.2328 16.1726 15.8956 16.8577 15.7586C17.5427 15.6215 18.253 15.6909 18.8986 15.9577C19.5442 16.2246 20.0961 16.6771 20.4844 17.2578C20.8727 17.8385 21.08 18.5214 21.08 19.22C21.08 20.1545 20.7095 21.0508 20.0496 21.7125C19.3898 22.3743 18.4945 22.7473 17.56 22.75ZM17.56 17.19C17.1644 17.19 16.7778 17.3073 16.4489 17.5271C16.12 17.7468 15.8636 18.0592 15.7122 18.4246C15.5609 18.7901 15.5213 19.1922 15.5984 19.5802C15.6756 19.9681 15.8661 20.3245 16.1458 20.6042C16.4255 20.8839 16.7819 21.0744 17.1698 21.1516C17.5578 21.2287 17.9599 21.1891 18.3254 21.0377C18.6908 20.8864 19.0032 20.63 19.2229 20.3011C19.4427 19.9722 19.56 19.5856 19.56 19.19C19.56 18.6596 19.3493 18.1508 18.9742 17.7758C18.5991 17.4007 18.0904 17.19 17.56 17.19Z' fill='rgba(255,255,255,0.7)'/%3E%3C/svg%3E\")}vite-error-overlay::part(tip):before{content:\"Not sure how to solve this? Visit https://qwik.dev or connect with the community on Discord.\";margin-bottom:1em;display:block}", xt = "#qwik-inspector-overlay{pointer-events:none;box-sizing:border-box;contain:strict;cursor:pointer;z-index:999999;background:#18b6f645;border:2px solid #ac7ef475;border-radius:4px;position:fixed}#qwik-inspector-info-popup{color:#fff;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);z-index:999999;contain:layout;background:#000000c2;border-radius:8px;padding:10px 20px;font-family:monospace;animation:.3s ease-in-out 3s forwards fadeOut;position:fixed;bottom:10px;right:10px;box-shadow:0 20px 25px -5px #00000057,0 8px 10px -6px #0000003d}#qwik-inspector-info-popup p{margin:0}@-webkit-keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes fadeOut{0%{opacity:1}to{opacity:0;visibility:hidden}}";
1842
1863
  //#endregion
1843
1864
  //#region packages/qwik-vite/src/plugins/dev/index.ts
1844
- async function vt(e, t, n, r) {
1865
+ async function St(e, t, n, r) {
1845
1866
  let i = await n.dynamicImport("node:fs"), a = await n.dynamicImport("node:url"), o = [
1846
1867
  "mjs",
1847
1868
  "cjs",
1848
1869
  "js"
1849
1870
  ].map((e) => r.join(t, `entry.preview.${e}`)).find((e) => i.existsSync(e));
1850
- if (!o) return yt(e, `Unable to find output "${t}/entry.preview" module.\n\nPlease ensure "src/entry.preview.tsx" has been built before the "preview" command.`);
1871
+ if (!o) return Ct(e, `Unable to find output "${t}/entry.preview" module.\n\nPlease ensure "src/entry.preview.tsx" has been built before the "preview" command.`);
1851
1872
  try {
1852
1873
  let t = a.pathToFileURL(o).href, r = await n.strictDynamicImport(t), i = null;
1853
- if (r.default && (typeof r.default == "function" ? i = r.default : typeof r.default == "object" && (i = r.default.router)), typeof i != "function") return yt(e, `Entry preview module "${o}" does not export a default middleware function`);
1874
+ if (r.default && (typeof r.default == "function" ? i = r.default : typeof r.default == "object" && (i = r.default.router)), typeof i != "function") return Ct(e, `Entry preview module "${o}" does not export a default middleware function`);
1854
1875
  e.use(i);
1855
1876
  } catch (t) {
1856
- return yt(e, String(t));
1877
+ return Ct(e, String(t));
1857
1878
  }
1858
1879
  }
1859
- function yt(e, t) {
1880
+ function Ct(e, t) {
1860
1881
  console.log(`\n❌ ${t}\n`), e.use((e, n) => {
1861
1882
  n.writeHead(400, { "Content-Type": "text/plain" }), n.end(t);
1862
1883
  });
1863
1884
  }
1864
- var bt = (e, t) => {
1885
+ var wt = (e, t) => {
1865
1886
  let n = [
1866
1887
  {
1867
1888
  tag: "style",
1868
- children: gt,
1889
+ children: bt,
1869
1890
  injectTo: "body"
1870
1891
  },
1871
1892
  {
1872
1893
  tag: "style",
1873
- children: _t,
1894
+ children: xt,
1874
1895
  injectTo: "body"
1875
1896
  },
1876
1897
  {
1877
1898
  tag: "script",
1878
1899
  attrs: { type: "module" },
1879
- children: ft,
1900
+ children: gt,
1880
1901
  injectTo: "body"
1881
1902
  },
1882
1903
  {
1883
1904
  tag: "script",
1884
1905
  attrs: { type: "module" },
1885
- children: ut,
1906
+ children: mt,
1886
1907
  injectTo: "body"
1887
1908
  }
1888
1909
  ];
1889
1910
  if ((e.devTools?.imageDevTools ?? !0) && n.push({
1890
1911
  tag: "style",
1891
- children: pt,
1912
+ children: _t,
1892
1913
  injectTo: "body"
1893
1914
  }, {
1894
1915
  tag: "script",
1895
1916
  attrs: { type: "module" },
1896
- children: mt.replace("globalThis.__TEMPLATE__", JSON.stringify(ht)),
1917
+ children: vt.replace("globalThis.__TEMPLATE__", JSON.stringify(yt)),
1897
1918
  injectTo: "body"
1898
1919
  }), e.devTools?.clickToSource ?? !0) {
1899
1920
  let r = e.devTools.clickToSource ?? [];
1900
1921
  t.endsWith("/") && (t = t.slice(0, -1)), n.push({
1901
1922
  tag: "script",
1902
1923
  attrs: { type: "module" },
1903
- children: dt.replace("globalThis.__HOTKEYS__", JSON.stringify(r)).replace("globalThis.__BASE__", JSON.stringify(t)),
1924
+ children: ht.replace("globalThis.__HOTKEYS__", JSON.stringify(r)).replace("globalThis.__BASE__", JSON.stringify(t)),
1904
1925
  injectTo: "body"
1905
1926
  });
1906
1927
  }
1907
1928
  return n;
1908
- }, xt = new TextDecoder(), St = (e, t = 0, n = e.length) => xt.decode(e.slice(t, n)), Ct = (e, t) => new DataView(e.buffer, e.byteOffset + t), wt = (e, t = 0) => Ct(e, t).getInt32(0, !0), Tt = (e, t = 0) => Ct(e, t).getUint32(0, !0), Et = {
1909
- validate: (e) => St(e, 0, 2) === "BM",
1929
+ }, Tt = new TextDecoder(), Et = (e, t = 0, n = e.length) => Tt.decode(e.slice(t, n)), Dt = (e, t) => new DataView(e.buffer, e.byteOffset + t), Ot = (e, t = 0) => Dt(e, t).getInt32(0, !0), kt = (e, t = 0) => Dt(e, t).getUint32(0, !0), At = {
1930
+ validate: (e) => Et(e, 0, 2) === "BM",
1910
1931
  calculate: (e) => ({
1911
- height: Math.abs(wt(e, 22)),
1912
- width: Tt(e, 18)
1932
+ height: Math.abs(Ot(e, 22)),
1933
+ width: kt(e, 18)
1913
1934
  })
1914
1935
  };
1915
1936
  //#endregion
1916
- //#region node_modules/.pnpm/image-size@2.0.2/node_modules/image-size/dist/types/cur.mjs
1937
+ //#region node_modules/.pnpm/image-size@2.0.2_patch_hash=528a7f0bab7d6d539a7b50aba6b45cb5e94dd506574151b0a5adc3a84721800c/node_modules/image-size/dist/types/cur.mjs
1917
1938
  new TextDecoder();
1918
- var Dt = (e, t) => new DataView(e.buffer, e.byteOffset + t), Y = (e, t = 0) => Dt(e, t).getUint16(0, !0), Ot = 1, kt = 6, At = 16;
1919
- function jt(e, t) {
1939
+ var jt = (e, t) => new DataView(e.buffer, e.byteOffset + t), J = (e, t = 0) => jt(e, t).getUint16(0, !0), Mt = 1, Nt = 6, Pt = 16;
1940
+ function Ft(e, t) {
1920
1941
  let n = e[t];
1921
1942
  return n === 0 ? 256 : n;
1922
1943
  }
1923
- function Mt(e, t) {
1924
- let n = kt + t * At;
1944
+ function It(e, t) {
1945
+ let n = Nt + t * Pt;
1925
1946
  return {
1926
- height: jt(e, n + 1),
1927
- width: jt(e, n)
1947
+ height: Ft(e, n + 1),
1948
+ width: Ft(e, n)
1928
1949
  };
1929
1950
  }
1930
- var Nt = {
1951
+ var Lt = {
1931
1952
  validate(e) {
1932
- let t = Y(e, 0), n = Y(e, 4);
1933
- return t !== 0 || n === 0 ? !1 : Y(e, 2) === Ot;
1953
+ let t = J(e, 0), n = J(e, 4);
1954
+ return t !== 0 || n === 0 ? !1 : J(e, 2) === Mt;
1934
1955
  },
1935
1956
  calculate(e) {
1936
- let t = Y(e, 4), n = Mt(e, 0);
1957
+ let t = J(e, 4), n = It(e, 0);
1937
1958
  if (t === 1) return n;
1938
1959
  let r = [];
1939
- for (let n = 0; n < t; n += 1) r.push(Mt(e, n));
1960
+ for (let n = 0; n < t; n += 1) r.push(It(e, n));
1940
1961
  return {
1941
1962
  width: n.width,
1942
1963
  height: n.height,
1943
1964
  images: r
1944
1965
  };
1945
1966
  }
1946
- }, Pt = 2, Ft = {
1967
+ }, Rt = 2, zt = {
1947
1968
  validate(e) {
1948
- let t = Y(e, 0), n = Y(e, 4);
1949
- return t !== 0 || n === 0 ? !1 : Y(e, 2) === Pt;
1969
+ let t = J(e, 0), n = J(e, 4);
1970
+ return t !== 0 || n === 0 ? !1 : J(e, 2) === Rt;
1950
1971
  },
1951
- calculate: (e) => Nt.calculate(e)
1972
+ calculate: (e) => Lt.calculate(e)
1952
1973
  };
1953
1974
  //#endregion
1954
- //#region node_modules/.pnpm/image-size@2.0.2/node_modules/image-size/dist/types/dds.mjs
1975
+ //#region node_modules/.pnpm/image-size@2.0.2_patch_hash=528a7f0bab7d6d539a7b50aba6b45cb5e94dd506574151b0a5adc3a84721800c/node_modules/image-size/dist/types/dds.mjs
1955
1976
  new TextDecoder();
1956
- var It = (e, t) => new DataView(e.buffer, e.byteOffset + t), Lt = (e, t = 0) => It(e, t).getUint32(0, !0), Rt = {
1957
- validate: (e) => Lt(e, 0) === 542327876,
1977
+ var Bt = (e, t) => new DataView(e.buffer, e.byteOffset + t), Vt = (e, t = 0) => Bt(e, t).getUint32(0, !0), Ht = {
1978
+ validate: (e) => Vt(e, 0) === 542327876,
1958
1979
  calculate: (e) => ({
1959
- height: Lt(e, 12),
1960
- width: Lt(e, 16)
1980
+ height: Vt(e, 12),
1981
+ width: Vt(e, 16)
1961
1982
  })
1962
- }, zt = new TextDecoder(), Bt = (e, t = 0, n = e.length) => zt.decode(e.slice(t, n)), Vt = (e, t) => new DataView(e.buffer, e.byteOffset + t), Ht = (e, t = 0) => Vt(e, t).getUint16(0, !0), Ut = /^GIF8[79]a/, Wt = {
1963
- validate: (e) => Ut.test(Bt(e, 0, 6)),
1983
+ }, Ut = new TextDecoder(), Wt = (e, t = 0, n = e.length) => Ut.decode(e.slice(t, n)), Gt = (e, t) => new DataView(e.buffer, e.byteOffset + t), Kt = (e, t = 0) => Gt(e, t).getUint16(0, !0), qt = /^GIF8[79]a/, Jt = {
1984
+ validate: (e) => qt.test(Wt(e, 0, 6)),
1964
1985
  calculate: (e) => ({
1965
- height: Ht(e, 8),
1966
- width: Ht(e, 6)
1986
+ height: Kt(e, 8),
1987
+ width: Kt(e, 6)
1967
1988
  })
1968
- }, Gt = new TextDecoder(), Kt = (e, t = 0, n = e.length) => Gt.decode(e.slice(t, n)), qt = (e, t) => new DataView(e.buffer, e.byteOffset + t), Jt = (e, t = 0) => qt(e, t).getUint32(0, !1);
1969
- function Yt(e, t) {
1989
+ }, Yt = new TextDecoder(), Xt = (e, t = 0, n = e.length) => Yt.decode(e.slice(t, n)), Zt = (e, t) => new DataView(e.buffer, e.byteOffset + t), Qt = (e, t = 0) => Zt(e, t).getUint32(0, !1);
1990
+ function $t(e, t) {
1970
1991
  if (e.length - t < 4) return;
1971
- let n = Jt(e, t);
1992
+ let n = Qt(e, t);
1972
1993
  if (!(e.length - t < n)) return {
1973
- name: Kt(e, 4 + t, 8 + t),
1994
+ name: Xt(e, 4 + t, 8 + t),
1974
1995
  offset: t,
1975
1996
  size: n
1976
1997
  };
1977
1998
  }
1978
- function X(e, t, n) {
1999
+ function Y(e, t, n) {
1979
2000
  for (; n < e.length;) {
1980
- let r = Yt(e, n);
2001
+ let r = $t(e, n);
1981
2002
  if (!r) break;
1982
2003
  if (r.name === t) return r;
1983
2004
  n += r.size > 0 ? r.size : 8;
1984
2005
  }
1985
2006
  }
1986
- var Xt = {
2007
+ var en = {
1987
2008
  avif: "avif",
1988
2009
  mif1: "heif",
1989
2010
  msf1: "heif",
@@ -1991,21 +2012,22 @@ var Xt = {
1991
2012
  heix: "heic",
1992
2013
  hevc: "heic",
1993
2014
  hevx: "heic"
1994
- }, Zt = {
2015
+ }, tn = {
1995
2016
  validate(e) {
1996
- if (Kt(e, 4, 8) !== "ftyp") return !1;
1997
- let t = X(e, "ftyp", 0);
1998
- return t ? Kt(e, t.offset + 8, t.offset + 12) in Xt : !1;
2017
+ if (Xt(e, 4, 8) !== "ftyp") return !1;
2018
+ let t = Y(e, "ftyp", 0);
2019
+ return t ? Xt(e, t.offset + 8, t.offset + 12) in en : !1;
1999
2020
  },
2000
2021
  calculate(e) {
2001
- let t = X(e, "meta", 0), n = t && X(e, "iprp", t.offset + 12), r = n && X(e, "ipco", n.offset + 8);
2022
+ let t = Y(e, "meta", 0), n = t && Y(e, "iprp", t.offset + 12), r = n && Y(e, "ipco", n.offset + 8);
2002
2023
  if (!r) throw TypeError("Invalid HEIF, no ipco box found");
2003
- let i = Kt(e, 8, 12), a = [], o = r.offset + 8;
2024
+ let i = Xt(e, 8, 12), a = [], o = r.offset + 8;
2004
2025
  for (; o < r.offset + r.size;) {
2005
- let t = X(e, "ispe", o);
2026
+ let t = Y(e, "ispe", o);
2006
2027
  if (!t) break;
2007
- let n = Jt(e, t.offset + 12), i = Jt(e, t.offset + 16), s = X(e, "clap", o), c = n, l = i;
2008
- s && s.offset < r.offset + r.size && (c = n - Jt(e, s.offset + 12)), a.push({
2028
+ if (t.size < 20) throw TypeError("Invalid HEIF ispe box size");
2029
+ let n = Qt(e, t.offset + 12), i = Qt(e, t.offset + 16), s = Y(e, "clap", o), c = n, l = i;
2030
+ s && s.offset < r.offset + r.size && (c = n - Qt(e, s.offset + 12)), a.push({
2009
2031
  height: l,
2010
2032
  width: c
2011
2033
  }), o = t.offset + t.size;
@@ -2018,7 +2040,7 @@ var Xt = {
2018
2040
  ...a.length > 1 ? { images: a } : {}
2019
2041
  };
2020
2042
  }
2021
- }, Qt = new TextDecoder(), $t = (e, t = 0, n = e.length) => Qt.decode(e.slice(t, n)), en = (e, t) => new DataView(e.buffer, e.byteOffset + t), tn = (e, t = 0) => en(e, t).getUint32(0, !1), nn = 8, rn = 4, an = 4, on = {
2043
+ }, nn = new TextDecoder(), rn = (e, t = 0, n = e.length) => nn.decode(e.slice(t, n)), an = (e, t) => new DataView(e.buffer, e.byteOffset + t), on = (e, t = 0) => an(e, t).getUint32(0, !1), sn = 8, cn = 4, ln = 4, un = {
2022
2044
  ICON: 32,
2023
2045
  "ICN#": 32,
2024
2046
  "icm#": 16,
@@ -2051,24 +2073,26 @@ var Xt = {
2051
2073
  ic14: 512,
2052
2074
  ic10: 1024
2053
2075
  };
2054
- function sn(e, t) {
2055
- let n = t + an;
2056
- return [$t(e, t, n), tn(e, n)];
2076
+ function dn(e, t) {
2077
+ let n = t + ln;
2078
+ return [rn(e, t, n), on(e, n)];
2057
2079
  }
2058
- function cn(e) {
2059
- let t = on[e];
2080
+ function fn(e) {
2081
+ let t = un[e];
2060
2082
  return {
2061
2083
  width: t,
2062
2084
  height: t,
2063
2085
  type: e
2064
2086
  };
2065
2087
  }
2066
- var ln = {
2067
- validate: (e) => $t(e, 0, 4) === "icns",
2088
+ var pn = {
2089
+ validate: (e) => rn(e, 0, 4) === "icns",
2068
2090
  calculate(e) {
2069
- let t = e.length, n = tn(e, rn), r = nn, i = [];
2091
+ let t = e.length, n = on(e, cn), r = sn, i = [];
2070
2092
  for (; r < n && r < t;) {
2071
- let t = sn(e, r), n = cn(t[0]);
2093
+ let t = dn(e, r);
2094
+ if (t[1] < sn) throw TypeError("Invalid ICNS entry length");
2095
+ let n = fn(t[0]);
2072
2096
  i.push(n), r += t[1];
2073
2097
  }
2074
2098
  if (i.length === 0) throw TypeError("Invalid ICNS, no sizes found");
@@ -2080,30 +2104,30 @@ var ln = {
2080
2104
  }
2081
2105
  };
2082
2106
  //#endregion
2083
- //#region node_modules/.pnpm/image-size@2.0.2/node_modules/image-size/dist/types/ico.mjs
2107
+ //#region node_modules/.pnpm/image-size@2.0.2_patch_hash=528a7f0bab7d6d539a7b50aba6b45cb5e94dd506574151b0a5adc3a84721800c/node_modules/image-size/dist/types/ico.mjs
2084
2108
  new TextDecoder();
2085
- var un = (e, t) => new DataView(e.buffer, e.byteOffset + t), dn = (e, t = 0) => un(e, t).getUint16(0, !0), fn = 1, pn = 6, mn = 16;
2086
- function hn(e, t) {
2109
+ var mn = (e, t) => new DataView(e.buffer, e.byteOffset + t), hn = (e, t = 0) => mn(e, t).getUint16(0, !0), gn = 1, _n = 6, vn = 16;
2110
+ function yn(e, t) {
2087
2111
  let n = e[t];
2088
2112
  return n === 0 ? 256 : n;
2089
2113
  }
2090
- function gn(e, t) {
2091
- let n = pn + t * mn;
2114
+ function bn(e, t) {
2115
+ let n = _n + t * vn;
2092
2116
  return {
2093
- height: hn(e, n + 1),
2094
- width: hn(e, n)
2117
+ height: yn(e, n + 1),
2118
+ width: yn(e, n)
2095
2119
  };
2096
2120
  }
2097
- var _n = {
2121
+ var xn = {
2098
2122
  validate(e) {
2099
- let t = dn(e, 0), n = dn(e, 4);
2100
- return t !== 0 || n === 0 ? !1 : dn(e, 2) === fn;
2123
+ let t = hn(e, 0), n = hn(e, 4);
2124
+ return t !== 0 || n === 0 ? !1 : hn(e, 2) === gn;
2101
2125
  },
2102
2126
  calculate(e) {
2103
- let t = dn(e, 4), n = gn(e, 0);
2127
+ let t = hn(e, 4), n = bn(e, 0);
2104
2128
  if (t === 1) return n;
2105
2129
  let r = [];
2106
- for (let n = 0; n < t; n += 1) r.push(gn(e, n));
2130
+ for (let n = 0; n < t; n += 1) r.push(bn(e, n));
2107
2131
  return {
2108
2132
  width: n.width,
2109
2133
  height: n.height,
@@ -2112,97 +2136,97 @@ var _n = {
2112
2136
  }
2113
2137
  };
2114
2138
  //#endregion
2115
- //#region node_modules/.pnpm/image-size@2.0.2/node_modules/image-size/dist/types/j2c.mjs
2139
+ //#region node_modules/.pnpm/image-size@2.0.2_patch_hash=528a7f0bab7d6d539a7b50aba6b45cb5e94dd506574151b0a5adc3a84721800c/node_modules/image-size/dist/types/j2c.mjs
2116
2140
  new TextDecoder();
2117
- var vn = (e, t) => new DataView(e.buffer, e.byteOffset + t), yn = (e, t = 0) => vn(e, t).getUint32(0, !1), bn = {
2118
- validate: (e) => yn(e, 0) === 4283432785,
2141
+ var Sn = (e, t) => new DataView(e.buffer, e.byteOffset + t), Cn = (e, t = 0) => Sn(e, t).getUint32(0, !1), wn = {
2142
+ validate: (e) => Cn(e, 0) === 4283432785,
2119
2143
  calculate: (e) => ({
2120
- height: yn(e, 12),
2121
- width: yn(e, 8)
2144
+ height: Cn(e, 12),
2145
+ width: Cn(e, 8)
2122
2146
  })
2123
- }, xn = new TextDecoder(), Sn = (e, t = 0, n = e.length) => xn.decode(e.slice(t, n)), Cn = (e, t) => new DataView(e.buffer, e.byteOffset + t), wn = (e, t = 0) => Cn(e, t).getUint32(0, !1);
2124
- function Tn(e, t) {
2147
+ }, Tn = new TextDecoder(), En = (e, t = 0, n = e.length) => Tn.decode(e.slice(t, n)), Dn = (e, t) => new DataView(e.buffer, e.byteOffset + t), On = (e, t = 0) => Dn(e, t).getUint32(0, !1);
2148
+ function kn(e, t) {
2125
2149
  if (e.length - t < 4) return;
2126
- let n = wn(e, t);
2150
+ let n = On(e, t);
2127
2151
  if (!(e.length - t < n)) return {
2128
- name: Sn(e, 4 + t, 8 + t),
2152
+ name: En(e, 4 + t, 8 + t),
2129
2153
  offset: t,
2130
2154
  size: n
2131
2155
  };
2132
2156
  }
2133
- function En(e, t, n) {
2157
+ function An(e, t, n) {
2134
2158
  for (; n < e.length;) {
2135
- let r = Tn(e, n);
2159
+ let r = kn(e, n);
2136
2160
  if (!r) break;
2137
2161
  if (r.name === t) return r;
2138
2162
  n += r.size > 0 ? r.size : 8;
2139
2163
  }
2140
2164
  }
2141
- var Dn = {
2165
+ var jn = {
2142
2166
  validate(e) {
2143
- if (Sn(e, 4, 8) !== "jP ") return !1;
2144
- let t = En(e, "ftyp", 0);
2145
- return t ? Sn(e, t.offset + 8, t.offset + 12) === "jp2 " : !1;
2167
+ if (En(e, 4, 8) !== "jP ") return !1;
2168
+ let t = An(e, "ftyp", 0);
2169
+ return t ? En(e, t.offset + 8, t.offset + 12) === "jp2 " : !1;
2146
2170
  },
2147
2171
  calculate(e) {
2148
- let t = En(e, "jp2h", 0), n = t && En(e, "ihdr", t.offset + 8);
2172
+ let t = An(e, "jp2h", 0), n = t && An(e, "ihdr", t.offset + 8);
2149
2173
  if (n) return {
2150
- height: wn(e, n.offset + 8),
2151
- width: wn(e, n.offset + 12)
2174
+ height: On(e, n.offset + 8),
2175
+ width: On(e, n.offset + 12)
2152
2176
  };
2153
2177
  throw TypeError("Unsupported JPEG 2000 format");
2154
2178
  }
2155
2179
  };
2156
2180
  //#endregion
2157
- //#region node_modules/.pnpm/image-size@2.0.2/node_modules/image-size/dist/types/jpg.mjs
2181
+ //#region node_modules/.pnpm/image-size@2.0.2_patch_hash=528a7f0bab7d6d539a7b50aba6b45cb5e94dd506574151b0a5adc3a84721800c/node_modules/image-size/dist/types/jpg.mjs
2158
2182
  new TextDecoder();
2159
- var On = (e, t = 0, n = e.length) => e.slice(t, n).reduce((e, t) => e + `0${t.toString(16)}`.slice(-2), ""), kn = (e, t) => new DataView(e.buffer, e.byteOffset + t), An = (e, t = 0) => kn(e, t).getUint16(0, !1), jn = {
2160
- readUInt16BE: An,
2161
- readUInt16LE: (e, t = 0) => kn(e, t).getUint16(0, !0),
2162
- readUInt32BE: (e, t = 0) => kn(e, t).getUint32(0, !1),
2163
- readUInt32LE: (e, t = 0) => kn(e, t).getUint32(0, !0)
2183
+ var Mn = (e, t = 0, n = e.length) => e.slice(t, n).reduce((e, t) => e + `0${t.toString(16)}`.slice(-2), ""), Nn = (e, t) => new DataView(e.buffer, e.byteOffset + t), Pn = (e, t = 0) => Nn(e, t).getUint16(0, !1), Fn = {
2184
+ readUInt16BE: Pn,
2185
+ readUInt16LE: (e, t = 0) => Nn(e, t).getUint16(0, !0),
2186
+ readUInt32BE: (e, t = 0) => Nn(e, t).getUint32(0, !1),
2187
+ readUInt32LE: (e, t = 0) => Nn(e, t).getUint32(0, !0)
2164
2188
  };
2165
- function Z(e, t, n = 0, r = !1) {
2166
- return jn[`readUInt${t}${r ? "BE" : "LE"}`](e, n);
2189
+ function X(e, t, n = 0, r = !1) {
2190
+ return Fn[`readUInt${t}${r ? "BE" : "LE"}`](e, n);
2167
2191
  }
2168
- var Mn = "45786966", Nn = 2, Pn = 6, Fn = 2, In = "4d4d", Ln = "4949", Rn = 12, zn = 2;
2169
- function Bn(e) {
2170
- return On(e, 2, 6) === Mn;
2192
+ var In = "45786966", Ln = 2, Rn = 6, zn = 2, Bn = "4d4d", Vn = "4949", Hn = 12, Un = 2;
2193
+ function Wn(e) {
2194
+ return Mn(e, 2, 6) === In;
2171
2195
  }
2172
- function Vn(e, t) {
2196
+ function Gn(e, t) {
2173
2197
  return {
2174
- height: An(e, t),
2175
- width: An(e, t + 2)
2198
+ height: Pn(e, t),
2199
+ width: Pn(e, t + 2)
2176
2200
  };
2177
2201
  }
2178
- function Hn(e, t) {
2179
- let n = Pn + 8, r = Z(e, 16, n, t);
2202
+ function Kn(e, t) {
2203
+ let n = Rn + 8, r = X(e, 16, n, t);
2180
2204
  for (let i = 0; i < r; i++) {
2181
- let r = n + zn + i * Rn, a = r + Rn;
2205
+ let r = n + Un + i * Hn, a = r + Hn;
2182
2206
  if (r > e.length) return;
2183
2207
  let o = e.slice(r, a);
2184
- if (Z(o, 16, 0, t) === 274) return Z(o, 16, 2, t) !== 3 || Z(o, 32, 4, t) !== 1 ? void 0 : Z(o, 16, 8, t);
2208
+ if (X(o, 16, 0, t) === 274) return X(o, 16, 2, t) !== 3 || X(o, 32, 4, t) !== 1 ? void 0 : X(o, 16, 8, t);
2185
2209
  }
2186
2210
  }
2187
- function Un(e, t) {
2188
- let n = e.slice(Nn, t), r = On(n, Pn, Pn + Fn), i = r === In;
2189
- if (i || r === Ln) return Hn(n, i);
2211
+ function qn(e, t) {
2212
+ let n = e.slice(Ln, t), r = Mn(n, Rn, Rn + zn), i = r === Bn;
2213
+ if (i || r === Vn) return Kn(n, i);
2190
2214
  }
2191
- function Wn(e, t) {
2215
+ function Jn(e, t) {
2192
2216
  if (t > e.length) throw TypeError("Corrupt JPG, exceeded buffer limits");
2193
2217
  }
2194
- var Gn = {
2195
- validate: (e) => On(e, 0, 2) === "ffd8",
2218
+ var Yn = {
2219
+ validate: (e) => Mn(e, 0, 2) === "ffd8",
2196
2220
  calculate(e) {
2197
2221
  let t = e.slice(4), n, r;
2198
2222
  for (; t.length;) {
2199
- let e = An(t, 0);
2200
- if (Wn(t, e), t[e] !== 255) {
2223
+ let e = Pn(t, 0);
2224
+ if (Jn(t, e), t[e] !== 255) {
2201
2225
  t = t.slice(1);
2202
2226
  continue;
2203
2227
  }
2204
- if (Bn(t) && (n = Un(t, e)), r = t[e + 1], r === 192 || r === 193 || r === 194) {
2205
- let r = Vn(t, e + 5);
2228
+ if (Wn(t) && (n = qn(t, e)), r = t[e + 1], r === 192 || r === 193 || r === 194) {
2229
+ let r = Gn(t, e + 5);
2206
2230
  return n ? {
2207
2231
  height: r.height,
2208
2232
  orientation: n,
@@ -2213,38 +2237,38 @@ var Gn = {
2213
2237
  }
2214
2238
  throw TypeError("Invalid JPG, no size found");
2215
2239
  }
2216
- }, Kn = new TextDecoder(), qn = (e, t = 0, n = e.length) => Kn.decode(e.slice(t, n)), Jn = (e, t) => new DataView(e.buffer, e.byteOffset + t), Yn = (e, t = 0) => Jn(e, t).getUint32(0, !0), Xn = {
2240
+ }, Xn = new TextDecoder(), Zn = (e, t = 0, n = e.length) => Xn.decode(e.slice(t, n)), Qn = (e, t) => new DataView(e.buffer, e.byteOffset + t), $n = (e, t = 0) => Qn(e, t).getUint32(0, !0), er = {
2217
2241
  validate: (e) => {
2218
- let t = qn(e, 1, 7);
2242
+ let t = Zn(e, 1, 7);
2219
2243
  return ["KTX 11", "KTX 20"].includes(t);
2220
2244
  },
2221
2245
  calculate: (e) => {
2222
2246
  let t = e[5] === 49 ? "ktx" : "ktx2", n = t === "ktx" ? 36 : 20;
2223
2247
  return {
2224
- height: Yn(e, n + 4),
2225
- width: Yn(e, n),
2248
+ height: $n(e, n + 4),
2249
+ width: $n(e, n),
2226
2250
  type: t
2227
2251
  };
2228
2252
  }
2229
- }, Zn = new TextDecoder(), Qn = (e, t = 0, n = e.length) => Zn.decode(e.slice(t, n)), $n = (e, t) => new DataView(e.buffer, e.byteOffset + t), er = (e, t = 0) => $n(e, t).getUint32(0, !1), tr = "PNG\r\n\n", nr = "IHDR", rr = "CgBI", ir = {
2253
+ }, tr = new TextDecoder(), nr = (e, t = 0, n = e.length) => tr.decode(e.slice(t, n)), rr = (e, t) => new DataView(e.buffer, e.byteOffset + t), ir = (e, t = 0) => rr(e, t).getUint32(0, !1), ar = "PNG\r\n\n", or = "IHDR", sr = "CgBI", cr = {
2230
2254
  validate(e) {
2231
- if (tr === Qn(e, 1, 8)) {
2232
- let t = Qn(e, 12, 16);
2233
- if (t === rr && (t = Qn(e, 28, 32)), t !== nr) throw TypeError("Invalid PNG");
2255
+ if (ar === nr(e, 1, 8)) {
2256
+ let t = nr(e, 12, 16);
2257
+ if (t === sr && (t = nr(e, 28, 32)), t !== or) throw TypeError("Invalid PNG");
2234
2258
  return !0;
2235
2259
  }
2236
2260
  return !1;
2237
2261
  },
2238
2262
  calculate(e) {
2239
- return Qn(e, 12, 16) === rr ? {
2240
- height: er(e, 36),
2241
- width: er(e, 32)
2263
+ return nr(e, 12, 16) === sr ? {
2264
+ height: ir(e, 36),
2265
+ width: ir(e, 32)
2242
2266
  } : {
2243
- height: er(e, 20),
2244
- width: er(e, 16)
2267
+ height: ir(e, 20),
2268
+ width: ir(e, 16)
2245
2269
  };
2246
2270
  }
2247
- }, ar = new TextDecoder(), or = (e, t = 0, n = e.length) => ar.decode(e.slice(t, n)), sr = {
2271
+ }, lr = new TextDecoder(), ur = (e, t = 0, n = e.length) => lr.decode(e.slice(t, n)), dr = {
2248
2272
  P1: "pbm/ascii",
2249
2273
  P2: "pgm/ascii",
2250
2274
  P3: "ppm/ascii",
@@ -2253,7 +2277,7 @@ var Gn = {
2253
2277
  P6: "ppm",
2254
2278
  P7: "pam",
2255
2279
  PF: "pfm"
2256
- }, cr = {
2280
+ }, fr = {
2257
2281
  default: (e) => {
2258
2282
  let t = [];
2259
2283
  for (; e.length > 0;) {
@@ -2283,60 +2307,60 @@ var Gn = {
2283
2307
  };
2284
2308
  throw TypeError("Invalid PAM");
2285
2309
  }
2286
- }, lr = {
2287
- validate: (e) => or(e, 0, 2) in sr,
2310
+ }, pr = {
2311
+ validate: (e) => ur(e, 0, 2) in dr,
2288
2312
  calculate(e) {
2289
- let t = sr[or(e, 0, 2)], n = or(e, 3).split(/[\r\n]+/);
2290
- return (cr[t] || cr.default)(n);
2313
+ let t = dr[ur(e, 0, 2)], n = ur(e, 3).split(/[\r\n]+/);
2314
+ return (fr[t] || fr.default)(n);
2291
2315
  }
2292
- }, ur = new TextDecoder(), dr = (e, t = 0, n = e.length) => ur.decode(e.slice(t, n)), fr = (e, t) => new DataView(e.buffer, e.byteOffset + t), pr = (e, t = 0) => fr(e, t).getUint32(0, !1), mr = {
2293
- validate: (e) => dr(e, 0, 4) === "8BPS",
2316
+ }, mr = new TextDecoder(), hr = (e, t = 0, n = e.length) => mr.decode(e.slice(t, n)), gr = (e, t) => new DataView(e.buffer, e.byteOffset + t), _r = (e, t = 0) => gr(e, t).getUint32(0, !1), vr = {
2317
+ validate: (e) => hr(e, 0, 4) === "8BPS",
2294
2318
  calculate: (e) => ({
2295
- height: pr(e, 14),
2296
- width: pr(e, 18)
2319
+ height: _r(e, 14),
2320
+ width: _r(e, 18)
2297
2321
  })
2298
- }, hr = new TextDecoder(), gr = (e, t = 0, n = e.length) => hr.decode(e.slice(t, n)), _r = /<svg\s([^>"']|"[^"]*"|'[^']*')*>/, vr = {
2322
+ }, yr = new TextDecoder(), br = (e, t = 0, n = e.length) => yr.decode(e.slice(t, n)), xr = /<svg\s([^>"']|"[^"]*"|'[^']*')*>/, Sr = {
2299
2323
  height: /\sheight=(['"])([^%]+?)\1/,
2300
- root: _r,
2324
+ root: xr,
2301
2325
  viewbox: /\sviewBox=(['"])(.+?)\1/i,
2302
2326
  width: /\swidth=(['"])([^%]+?)\1/
2303
- }, yr = 2.54, br = {
2327
+ }, Cr = 2.54, wr = {
2304
2328
  in: 96,
2305
- cm: 96 / yr,
2329
+ cm: 96 / Cr,
2306
2330
  em: 16,
2307
2331
  ex: 8,
2308
- m: 96 / yr * 100,
2309
- mm: 96 / yr / 10,
2332
+ m: 96 / Cr * 100,
2333
+ mm: 96 / Cr / 10,
2310
2334
  pc: 96 / 72 / 12,
2311
2335
  pt: 96 / 72,
2312
2336
  px: 1
2313
- }, xr = RegExp(`^([0-9.]+(?:e\\d+)?)(${Object.keys(br).join("|")})?$`);
2314
- function Sr(e) {
2315
- let t = xr.exec(e);
2316
- if (t) return Math.round(Number(t[1]) * (br[t[2]] || 1));
2337
+ }, Tr = RegExp(`^([0-9.]+(?:e\\d+)?)(${Object.keys(wr).join("|")})?$`);
2338
+ function Z(e) {
2339
+ let t = Tr.exec(e);
2340
+ if (t) return Math.round(Number(t[1]) * (wr[t[2]] || 1));
2317
2341
  }
2318
- function Cr(e) {
2342
+ function Er(e) {
2319
2343
  let t = e.split(" ");
2320
2344
  return {
2321
- height: Sr(t[3]),
2322
- width: Sr(t[2])
2345
+ height: Z(t[3]),
2346
+ width: Z(t[2])
2323
2347
  };
2324
2348
  }
2325
- function wr(e) {
2326
- let t = e.match(vr.width), n = e.match(vr.height), r = e.match(vr.viewbox);
2349
+ function Dr(e) {
2350
+ let t = e.match(Sr.width), n = e.match(Sr.height), r = e.match(Sr.viewbox);
2327
2351
  return {
2328
- height: n && Sr(n[2]),
2329
- viewbox: r && Cr(r[2]),
2330
- width: t && Sr(t[2])
2352
+ height: n && Z(n[2]),
2353
+ viewbox: r && Er(r[2]),
2354
+ width: t && Z(t[2])
2331
2355
  };
2332
2356
  }
2333
- function Tr(e) {
2357
+ function Or(e) {
2334
2358
  return {
2335
2359
  height: e.height,
2336
2360
  width: e.width
2337
2361
  };
2338
2362
  }
2339
- function Er(e, t) {
2363
+ function kr(e, t) {
2340
2364
  let n = t.width / t.height;
2341
2365
  return e.width ? {
2342
2366
  height: Math.floor(e.width / n),
@@ -2349,87 +2373,87 @@ function Er(e, t) {
2349
2373
  width: t.width
2350
2374
  };
2351
2375
  }
2352
- var Dr = {
2353
- validate: (e) => _r.test(gr(e, 0, 1e3)),
2376
+ var Ar = {
2377
+ validate: (e) => xr.test(br(e, 0, 1e3)),
2354
2378
  calculate(e) {
2355
- let t = gr(e).match(vr.root);
2379
+ let t = br(e).match(Sr.root);
2356
2380
  if (t) {
2357
- let e = wr(t[0]);
2358
- if (e.width && e.height) return Tr(e);
2359
- if (e.viewbox) return Er(e, e.viewbox);
2381
+ let e = Dr(t[0]);
2382
+ if (e.width && e.height) return Or(e);
2383
+ if (e.viewbox) return kr(e, e.viewbox);
2360
2384
  }
2361
2385
  throw TypeError("Invalid SVG");
2362
2386
  }
2363
2387
  };
2364
2388
  //#endregion
2365
- //#region node_modules/.pnpm/image-size@2.0.2/node_modules/image-size/dist/types/tga.mjs
2389
+ //#region node_modules/.pnpm/image-size@2.0.2_patch_hash=528a7f0bab7d6d539a7b50aba6b45cb5e94dd506574151b0a5adc3a84721800c/node_modules/image-size/dist/types/tga.mjs
2366
2390
  new TextDecoder();
2367
- var Or = (e, t) => new DataView(e.buffer, e.byteOffset + t), kr = (e, t = 0) => Or(e, t).getUint16(0, !0), Ar = {
2391
+ var jr = (e, t) => new DataView(e.buffer, e.byteOffset + t), Mr = (e, t = 0) => jr(e, t).getUint16(0, !0), Nr = {
2368
2392
  validate(e) {
2369
- return kr(e, 0) === 0 && kr(e, 4) === 0;
2393
+ return Mr(e, 0) === 0 && Mr(e, 4) === 0;
2370
2394
  },
2371
2395
  calculate(e) {
2372
2396
  return {
2373
- height: kr(e, 14),
2374
- width: kr(e, 12)
2397
+ height: Mr(e, 14),
2398
+ width: Mr(e, 12)
2375
2399
  };
2376
2400
  }
2377
- }, jr = new TextDecoder(), Mr = (e, t = 0, n = e.length) => jr.decode(e.slice(t, n)), Nr = (e, t = 0, n = e.length) => e.slice(t, n).reduce((e, t) => e + `0${t.toString(16)}`.slice(-2), ""), Pr = (e, t) => new DataView(e.buffer, e.byteOffset + t), Fr = (e, t = 0) => Pr(e, t).getInt16(0, !0), Ir = (e, t = 0) => {
2378
- let n = Pr(e, t);
2401
+ }, Pr = new TextDecoder(), Fr = (e, t = 0, n = e.length) => Pr.decode(e.slice(t, n)), Ir = (e, t = 0, n = e.length) => e.slice(t, n).reduce((e, t) => e + `0${t.toString(16)}`.slice(-2), ""), Lr = (e, t) => new DataView(e.buffer, e.byteOffset + t), Rr = (e, t = 0) => Lr(e, t).getInt16(0, !0), zr = (e, t = 0) => {
2402
+ let n = Lr(e, t);
2379
2403
  return n.getUint16(0, !0) + (n.getUint8(2) << 16);
2380
2404
  };
2381
- function Lr(e) {
2405
+ function Br(e) {
2382
2406
  return {
2383
- height: 1 + Ir(e, 7),
2384
- width: 1 + Ir(e, 4)
2407
+ height: 1 + zr(e, 7),
2408
+ width: 1 + zr(e, 4)
2385
2409
  };
2386
2410
  }
2387
- function Rr(e) {
2411
+ function Vr(e) {
2388
2412
  return {
2389
2413
  height: 1 + ((e[4] & 15) << 10 | e[3] << 2 | (e[2] & 192) >> 6),
2390
2414
  width: 1 + ((e[2] & 63) << 8 | e[1])
2391
2415
  };
2392
2416
  }
2393
- function zr(e) {
2417
+ function Hr(e) {
2394
2418
  return {
2395
- height: Fr(e, 8) & 16383,
2396
- width: Fr(e, 6) & 16383
2419
+ height: Rr(e, 8) & 16383,
2420
+ width: Rr(e, 6) & 16383
2397
2421
  };
2398
2422
  }
2399
- var Br = {
2423
+ var Ur = {
2400
2424
  validate(e) {
2401
- let t = Mr(e, 0, 4) === "RIFF", n = Mr(e, 8, 12) === "WEBP", r = Mr(e, 12, 15) === "VP8";
2425
+ let t = Fr(e, 0, 4) === "RIFF", n = Fr(e, 8, 12) === "WEBP", r = Fr(e, 12, 15) === "VP8";
2402
2426
  return t && n && r;
2403
2427
  },
2404
2428
  calculate(e) {
2405
- let t = Mr(e, 12, 16), n = e.slice(20, 30);
2429
+ let t = Fr(e, 12, 16), n = e.slice(20, 30);
2406
2430
  if (t === "VP8X") {
2407
2431
  let e = n[0], t = !(e & 192), r = !(e & 1);
2408
- if (t && r) return Lr(n);
2432
+ if (t && r) return Br(n);
2409
2433
  throw TypeError("Invalid WebP");
2410
2434
  }
2411
- if (t === "VP8 " && n[0] !== 47) return zr(n);
2412
- let r = Nr(n, 3, 6);
2413
- if (t === "VP8L" && r !== "9d012a") return Rr(n);
2435
+ if (t === "VP8 " && n[0] !== 47) return Hr(n);
2436
+ let r = Ir(n, 3, 6);
2437
+ if (t === "VP8L" && r !== "9d012a") return Vr(n);
2414
2438
  throw TypeError("Invalid WebP");
2415
2439
  }
2416
2440
  };
2417
2441
  //#endregion
2418
2442
  //#region packages/qwik-vite/src/plugins/format-error.ts
2419
- async function Vr(e, t) {
2443
+ async function Wr(e, t) {
2420
2444
  let n = t, r = n.loc;
2421
2445
  if (!n.frame && !n.plugin && (r ||= k(n), r && (n.loc = r, r.file))) {
2422
2446
  let t = await e.dynamicImport("node:fs"), { normalizePath: r } = await e.dynamicImport("vite");
2423
2447
  n.id = r(n.loc.file);
2424
2448
  try {
2425
- n.frame = P(t.readFileSync(n.loc.file, "utf-8"), n.loc);
2449
+ n.frame = ie(t.readFileSync(n.loc.file, "utf-8"), n.loc);
2426
2450
  } catch {}
2427
2451
  }
2428
2452
  return t;
2429
2453
  }
2430
2454
  //#endregion
2431
2455
  //#region packages/qwik-vite/src/plugins/dev/image-size-server.ts
2432
- var Hr = {
2456
+ var Gr = {
2433
2457
  56: "psd",
2434
2458
  66: "bmp",
2435
2459
  68: "dds",
@@ -2438,182 +2462,338 @@ var Hr = {
2438
2462
  105: "icns",
2439
2463
  137: "png",
2440
2464
  255: "jpg"
2441
- }, Q = {
2442
- webp: Br,
2443
- jpg: Gn,
2444
- png: ir,
2445
- svg: Dr,
2446
- gif: Wt,
2447
- avif: Zt,
2448
- bmp: Et,
2449
- cur: Ft,
2450
- dds: Rt,
2451
- icns: ln,
2452
- ico: _n,
2453
- j2c: bn,
2454
- jp2: Dn,
2455
- ktx: Xn,
2456
- pnm: lr,
2457
- psd: mr,
2458
- tga: Ar
2459
- }, Ur = Object.keys(Q);
2460
- function Wr(e) {
2461
- let t = Hr[e[0]];
2462
- return t && Q[t].validate(e) ? t : Ur.find((t) => Q[t].validate(e));
2463
- }
2464
- function Gr(e) {
2465
- let t = Wr(e);
2465
+ }, Kr = {
2466
+ webp: Ur,
2467
+ jpg: Yn,
2468
+ png: cr,
2469
+ svg: Ar,
2470
+ gif: Jt,
2471
+ avif: tn,
2472
+ bmp: At,
2473
+ cur: zt,
2474
+ dds: Ht,
2475
+ icns: pn,
2476
+ ico: xn,
2477
+ j2c: wn,
2478
+ jp2: jn,
2479
+ ktx: er,
2480
+ pnm: pr,
2481
+ psd: vr,
2482
+ tga: Nr
2483
+ }, qr = Object.keys(Kr), Jr = 10485760, Yr = 5;
2484
+ function Xr(e) {
2485
+ let t = Gr[e[0]];
2486
+ return t && Kr[t].validate(e) ? t : qr.find((t) => Kr[t].validate(e));
2487
+ }
2488
+ function Zr(e) {
2489
+ let t = Xr(e);
2466
2490
  if (t !== void 0) {
2467
- let n = Q[t].calculate(e);
2491
+ let n = Kr[t].calculate(e);
2468
2492
  if (n !== void 0) return n.type = t, n;
2469
2493
  }
2470
2494
  }
2471
- async function Kr(e) {
2472
- if (/^(https?|file|capacitor):/.test(e)) try {
2473
- let t = await fetch(e, { headers: { Accept: "image/*,*/*" } });
2474
- if (!t.ok) {
2475
- console.error("can not fetch", e);
2476
- return;
2495
+ async function Qr(e, t = {}) {
2496
+ try {
2497
+ let n = new URL(e);
2498
+ for (let e = 0; e <= Yr; e++) {
2499
+ let r = await $r(n, t);
2500
+ if (!r) return;
2501
+ let i = t.requestUrl ? await t.requestUrl(n, r[0]) : await fetch(n, {
2502
+ headers: { Accept: "image/*,*/*" },
2503
+ redirect: "manual",
2504
+ signal: AbortSignal.timeout(1e4)
2505
+ });
2506
+ if (ni(i.status)) {
2507
+ let t = i.headers.get("Location");
2508
+ if (await i.body?.cancel(), !t || e === Yr) return;
2509
+ n = new URL(t, n);
2510
+ continue;
2511
+ }
2512
+ if (!i.ok) return;
2513
+ let a = await ri(i);
2514
+ if (!a) return;
2515
+ let o = Zr(a);
2516
+ return o ? {
2517
+ width: o.width,
2518
+ height: o.height,
2519
+ type: o.type,
2520
+ size: a.byteLength
2521
+ } : void 0;
2477
2522
  }
2478
- let n = await t.arrayBuffer(), r = Gr(Buffer.from(n));
2479
- if (r) return {
2480
- width: r.width,
2481
- height: r.height,
2482
- type: r.type,
2483
- size: n.byteLength
2484
- };
2485
- } catch (e) {
2486
- console.error(e);
2523
+ } catch {
2487
2524
  return;
2488
2525
  }
2489
2526
  }
2490
- var qr = (e, t, n) => async (r, i, a) => {
2527
+ async function $r(e, t) {
2528
+ if (!["http:", "https:"].includes(e.protocol) || e.username || e.password) return;
2529
+ let n = t.addressPolicy;
2530
+ if (!n) return;
2531
+ let r = Q(e.hostname), i = n.isIp(r) ? [r] : await t.resolveHostname?.(r);
2532
+ if (i?.length) return i.every((e) => !n.isBlocked(e)) ? i : ei(e, i, t) ? [Q(t.localAddress)] : void 0;
2533
+ }
2534
+ function ei(e, t, n) {
2535
+ let { localAddress: r, localPort: i } = n;
2536
+ if (!r || !i || ti(e) !== i) return !1;
2537
+ let a = n.addressPolicy;
2538
+ return a ? t.every((e) => a.areSame(e, r)) ? !0 : e.hostname === "localhost" && a.isLoopback(r) && t.every(a.isLoopback) : !1;
2539
+ }
2540
+ function Q(e) {
2541
+ let t = e.toLowerCase().replace(/^\[|\]$/g, "").split("%")[0], n = t.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/)?.[1];
2542
+ if (n) return n;
2491
2543
  try {
2492
- let o = await e.dynamicImport("node:fs"), s = await e.dynamicImport("node:path"), c;
2493
- try {
2494
- c = new URL(r.url, "http://localhost:3000/");
2495
- } catch {
2496
- i.statusCode = 404, i.end();
2497
- return;
2498
- }
2499
- if (r.method === "GET" && c.pathname === "/__image_info") {
2500
- let e = c.searchParams.get("url");
2501
- if (i.setHeader("content-type", "application/json"), e) {
2502
- let t = await Kr(e);
2503
- i.setHeader("cache-control", "public, max-age=31536000, immutable"), t ? i.write(JSON.stringify(t)) : i.statusCode = 404;
2504
- } else i.statusCode = 500, i.write(JSON.stringify({ message: "error" }));
2505
- i.end();
2544
+ return t.includes(":") ? new URL(`http://[${t}]/`).hostname.slice(1, -1) : t;
2545
+ } catch {
2546
+ return t;
2547
+ }
2548
+ }
2549
+ function ti(e) {
2550
+ return Number(e.port || (e.protocol === "https:" ? 443 : 80));
2551
+ }
2552
+ function ni(e) {
2553
+ return [
2554
+ 301,
2555
+ 302,
2556
+ 303,
2557
+ 307,
2558
+ 308
2559
+ ].includes(e);
2560
+ }
2561
+ async function ri(e) {
2562
+ let t = Number(e.headers.get("Content-Length"));
2563
+ if (Number.isFinite(t) && t > Jr) {
2564
+ await e.body?.cancel();
2565
+ return;
2566
+ }
2567
+ if (!e.body) return Buffer.alloc(0);
2568
+ let n = [], r = e.body.getReader(), i = 0;
2569
+ for (;;) {
2570
+ let { done: e, value: t } = await r.read();
2571
+ if (e) return Buffer.concat(n, i);
2572
+ if (i += t.byteLength, i > Jr) {
2573
+ await r.cancel();
2506
2574
  return;
2507
2575
  }
2508
- if (r.method === "POST" && c.pathname === "/__image_fix") {
2509
- let e = c.searchParams.get("loc"), r = c.searchParams.get("width"), a = c.searchParams.get("height"), l = c.searchParams.get("src"), u = c.searchParams.get("currentHref"), d = e.split(":"), f = parseInt(d[d.length - 1], 10) - 1, p = parseInt(d[d.length - 2], 10) - 1, m = s.resolve(n, d.slice(0, d.length - 2).join(":")), h = s.extname(m).toLowerCase(), g = o.readFileSync(m).toString("utf-8"), _ = 0;
2510
- for (; _ < g.length; _++) if (p === 0) {
2511
- _ += f;
2512
- break;
2513
- } else if (g[_] === "\n") {
2514
- p--;
2515
- continue;
2516
- }
2517
- if (g.slice(_, _ + 4) !== "<img") {
2518
- console.error("Could not apply auto fix, because it was not possible to find the original <img> tag"), i.statusCode = 500;
2576
+ n.push(t);
2577
+ }
2578
+ }
2579
+ function ii({ BlockList: e, isIP: t }) {
2580
+ let n = new e(), r = new e();
2581
+ for (let [e, t] of [
2582
+ ["0.0.0.0", 8],
2583
+ ["10.0.0.0", 8],
2584
+ ["100.64.0.0", 10],
2585
+ ["127.0.0.0", 8],
2586
+ ["169.254.0.0", 16],
2587
+ ["172.16.0.0", 12],
2588
+ ["192.0.0.0", 24],
2589
+ ["192.0.2.0", 24],
2590
+ ["192.168.0.0", 16],
2591
+ ["198.18.0.0", 15],
2592
+ ["198.51.100.0", 24],
2593
+ ["203.0.113.0", 24],
2594
+ ["224.0.0.0", 4],
2595
+ ["240.0.0.0", 4]
2596
+ ]) n.addSubnet(e, t, "ipv4");
2597
+ for (let [e, t] of [
2598
+ ["::", 96],
2599
+ ["64:ff9b::", 96],
2600
+ ["64:ff9b:1::", 48],
2601
+ ["100::", 64],
2602
+ ["2001:db8::", 32],
2603
+ ["fc00::", 7],
2604
+ ["fe80::", 10],
2605
+ ["ff00::", 8]
2606
+ ]) n.addSubnet(e, t, "ipv6");
2607
+ r.addSubnet("127.0.0.0", 8, "ipv4"), r.addAddress("::1", "ipv6");
2608
+ let i = (e, n) => {
2609
+ let r = Q(n), i = t(r);
2610
+ return i !== 0 && e.check(r, i === 4 ? "ipv4" : "ipv6");
2611
+ };
2612
+ return {
2613
+ isIp: (e) => t(Q(e)) !== 0,
2614
+ isBlocked: (e) => !t(Q(e)) || i(n, e),
2615
+ isLoopback: (e) => i(r, e),
2616
+ areSame: (e, t) => Q(e) === Q(t)
2617
+ };
2618
+ }
2619
+ function ai(e, t, n, r) {
2620
+ return new Promise((i, a) => {
2621
+ let o = {
2622
+ protocol: e.protocol,
2623
+ hostname: Q(t),
2624
+ port: ti(e),
2625
+ path: `${e.pathname}${e.search}`,
2626
+ method: "GET",
2627
+ headers: {
2628
+ Accept: "image/*,*/*",
2629
+ Host: e.host
2630
+ },
2631
+ servername: e.hostname.startsWith("[") || /^\d{1,3}(?:\.\d{1,3}){3}$/.test(e.hostname) ? void 0 : e.hostname
2632
+ }, s = (e) => {
2633
+ e.on("close", () => clearTimeout(l)), e.on("end", () => clearTimeout(l));
2634
+ let t = new Headers();
2635
+ for (let n = 0; n < e.rawHeaders.length; n += 2) t.append(e.rawHeaders[n], e.rawHeaders[n + 1]);
2636
+ let n = new ReadableStream({
2637
+ start(t) {
2638
+ e.on("data", (e) => t.enqueue(e)), e.on("end", () => t.close()), e.on("error", (e) => t.error(e));
2639
+ },
2640
+ cancel() {
2641
+ e.destroy();
2642
+ }
2643
+ });
2644
+ i(new Response(n, {
2645
+ status: e.statusCode,
2646
+ statusText: e.statusMessage,
2647
+ headers: t
2648
+ }));
2649
+ }, c = e.protocol === "https:" ? r.request(o, s) : n.request(o, s), l = setTimeout(() => c.destroy(/* @__PURE__ */ Error("Image request timed out")), 1e4);
2650
+ c.on("error", (e) => {
2651
+ clearTimeout(l), a(e);
2652
+ }), c.end();
2653
+ });
2654
+ }
2655
+ var oi = (e, t, n) => {
2656
+ let r = e.dynamicImport("node:dns/promises"), i = e.dynamicImport("node:net").then(ii), a = e.dynamicImport("node:http"), o = e.dynamicImport("node:https");
2657
+ return async (s, c, l) => {
2658
+ try {
2659
+ let u = await e.dynamicImport("node:fs"), d = await e.dynamicImport("node:path"), f = await r, p = await i, m = await a, h = await o, g;
2660
+ try {
2661
+ g = new URL(s.url, "http://localhost:3000/");
2662
+ } catch {
2663
+ c.statusCode = 404, c.end();
2519
2664
  return;
2520
2665
  }
2521
- let v = g.indexOf(">", _) + 1;
2522
- if (v < _) {
2523
- console.error("Could not apply auto fix, because it was not possible to find the original <img> tag"), i.statusCode = 500;
2666
+ if (s.method === "GET" && g.pathname === "/__image_info") {
2667
+ let e = g.searchParams.get("url");
2668
+ if (c.setHeader("content-type", "application/json"), e) {
2669
+ let t = await Qr(e, {
2670
+ localAddress: s.socket.localAddress,
2671
+ localPort: s.socket.localPort,
2672
+ addressPolicy: p,
2673
+ resolveHostname: async (e) => (await f.lookup(e, {
2674
+ all: !0,
2675
+ verbatim: !0
2676
+ })).map(({ address: e }) => e),
2677
+ requestUrl: (e, t) => ai(e, t, m, h)
2678
+ });
2679
+ c.setHeader("cache-control", "public, max-age=31536000, immutable"), t ? c.write(JSON.stringify(t)) : c.statusCode = 404;
2680
+ } else c.statusCode = 500, c.write(JSON.stringify({ message: "error" }));
2681
+ c.end();
2524
2682
  return;
2525
2683
  }
2526
- let y = [
2527
- ".ts",
2528
- ".tsx",
2529
- ".js",
2530
- ".jsx",
2531
- ".mdx"
2532
- ].includes(h), b = g.slice(_, v);
2533
- if (l && u && y) {
2534
- let e = new URL(l), r = new URL(u);
2535
- if (e.origin === r.origin) {
2536
- let r = s.join(t, "public", e.pathname), i = s.join(t, e.pathname), a;
2537
- if (o.existsSync(r)) {
2538
- let t = s.join(n, "media", s.dirname(e.pathname));
2539
- await o.promises.mkdir(t, { recursive: !0 }), await o.promises.copyFile(r, s.join(n, "media", e.pathname)), a = "~/media" + e.pathname;
2540
- } else if (o.existsSync(i)) a = e.pathname.replace("/src/", "~/");
2541
- else return;
2542
- let c = Jr(e.pathname), l = `${a}?jsx`;
2543
- b = b.replace(/^<img/, `<${c}`), b = b.replace(/\bwidth=(({[^}]*})|('[^']*')|("[^"]*"))\s*/, ""), b = b.replace(/\bheight=(({[^}]*})|('[^']*')|("[^"]*"))\s*/, ""), b = b.replace(/\bsrc=(({[^}]*})|('[^']*')|("[^"]*"))\s*/, "");
2544
- let u = 0;
2545
- if (h === ".mdx" && g.startsWith("---") && (u = g.indexOf("---", 4) + 3, u === -1)) return;
2546
- let d = `\nimport ${c} from '${l}';`;
2547
- g = `${g.slice(0, u)}${d}${g.slice(u, _)}${b}${g.slice(v)}`, o.writeFileSync(m, g);
2684
+ if (s.method === "POST" && g.pathname === "/__image_fix") {
2685
+ let e = g.searchParams.get("loc"), r = g.searchParams.get("width"), i = g.searchParams.get("height"), a = g.searchParams.get("src"), o = g.searchParams.get("currentHref"), s = e.split(":"), l = parseInt(s[s.length - 1], 10) - 1, f = parseInt(s[s.length - 2], 10) - 1, p = d.resolve(n, s.slice(0, s.length - 2).join(":")), m = d.extname(p).toLowerCase(), h = u.readFileSync(p).toString("utf-8"), _ = 0;
2686
+ for (; _ < h.length; _++) if (f === 0) {
2687
+ _ += l;
2688
+ break;
2689
+ } else if (h[_] === "\n") {
2690
+ f--;
2691
+ continue;
2692
+ }
2693
+ if (h.slice(_, _ + 4) !== "<img") {
2694
+ console.error("Could not apply auto fix, because it was not possible to find the original <img> tag"), c.statusCode = 500;
2548
2695
  return;
2549
2696
  }
2550
- }
2551
- b = b.replace(/\bwidth=(({[^}]*})|('[^']*')|("[^"]*"))/, `width="${r}"`), b = b.replace(/\bheight=(({[^}]*})|('[^']*')|("[^"]*"))/, `height="${a}"`), b.includes("height=") || (b = b.replace(/<img/, `<img height="${a}"`)), b.includes("width=") || (b = b.replace(/<img/, `<img width="${r}"`)), g = g.slice(0, _) + b + g.slice(v), o.writeFileSync(m, g);
2552
- } else a();
2553
- } catch (t) {
2554
- t instanceof Error && await Vr(e, t), a(t);
2555
- }
2697
+ let v = h.indexOf(">", _) + 1;
2698
+ if (v < _) {
2699
+ console.error("Could not apply auto fix, because it was not possible to find the original <img> tag"), c.statusCode = 500;
2700
+ return;
2701
+ }
2702
+ let y = [
2703
+ ".ts",
2704
+ ".tsx",
2705
+ ".js",
2706
+ ".jsx",
2707
+ ".mdx"
2708
+ ].includes(m), b = h.slice(_, v);
2709
+ if (a && o && y) {
2710
+ let e = new URL(a), r = new URL(o);
2711
+ if (e.origin === r.origin) {
2712
+ let r = d.join(t, "public", e.pathname), i = d.join(t, e.pathname), a;
2713
+ if (u.existsSync(r)) {
2714
+ let t = d.join(n, "media", d.dirname(e.pathname));
2715
+ await u.promises.mkdir(t, { recursive: !0 }), await u.promises.copyFile(r, d.join(n, "media", e.pathname)), a = "~/media" + e.pathname;
2716
+ } else if (u.existsSync(i)) a = e.pathname.replace("/src/", "~/");
2717
+ else return;
2718
+ let o = si(e.pathname), s = `${a}?jsx`;
2719
+ b = b.replace(/^<img/, `<${o}`), b = b.replace(/\bwidth=(({[^}]*})|('[^']*')|("[^"]*"))\s*/, ""), b = b.replace(/\bheight=(({[^}]*})|('[^']*')|("[^"]*"))\s*/, ""), b = b.replace(/\bsrc=(({[^}]*})|('[^']*')|("[^"]*"))\s*/, "");
2720
+ let c = 0;
2721
+ if (m === ".mdx" && h.startsWith("---") && (c = h.indexOf("---", 4) + 3, c === -1)) return;
2722
+ let l = `\nimport ${o} from '${s}';`;
2723
+ h = `${h.slice(0, c)}${l}${h.slice(c, _)}${b}${h.slice(v)}`, u.writeFileSync(p, h);
2724
+ return;
2725
+ }
2726
+ }
2727
+ b = b.replace(/\bwidth=(({[^}]*})|('[^']*')|("[^"]*"))/, `width="${r}"`), b = b.replace(/\bheight=(({[^}]*})|('[^']*')|("[^"]*"))/, `height="${i}"`), b.includes("height=") || (b = b.replace(/<img/, `<img height="${i}"`)), b.includes("width=") || (b = b.replace(/<img/, `<img width="${r}"`)), h = h.slice(0, _) + b + h.slice(v), u.writeFileSync(p, h);
2728
+ } else l();
2729
+ } catch (t) {
2730
+ t instanceof Error && await Wr(e, t), l(t);
2731
+ }
2732
+ };
2556
2733
  };
2557
- function Jr(e) {
2734
+ function si(e) {
2558
2735
  let t = e.lastIndexOf("."), n = e.lastIndexOf("/");
2559
- return e = e.substring(n + 1, t), `Img${Yr(e)}`;
2736
+ return e = e.substring(n + 1, t), `Img${ci(e)}`;
2560
2737
  }
2561
- function Yr(e) {
2738
+ function ci(e) {
2562
2739
  return `${e}`.toLowerCase().replace(/* @__PURE__ */ new RegExp(/[-_]+/, "g"), " ").replace(/* @__PURE__ */ new RegExp(/[^\w\s]/, "g"), "").replace(/* @__PURE__ */ new RegExp(/\s+(.)(\w*)/, "g"), (e, t, n) => `${t.toUpperCase() + n}`).replace(/* @__PURE__ */ new RegExp(/\w/), (e) => e.toUpperCase());
2563
2740
  }
2564
2741
  //#endregion
2565
2742
  //#region packages/qwik-vite/src/plugins/worker-core.ts
2566
- var Xr = "@qwik-worker-core", Zr = "\nexport { setPlatform } from '@qwik.dev/core';\nexport { _deserialize } from '@qwik.dev/core/internal';\n", Qr = (e) => e.endsWith(Xr), $r = () => ({
2743
+ var li = "@qwik-worker-core", ui = "\nexport { setPlatform } from '@qwik.dev/core';\nexport { _deserialize } from '@qwik.dev/core/internal';\n", di = (e) => e.endsWith(li), fi = () => ({
2567
2744
  moduleSideEffects: !1,
2568
- code: Zr
2569
- }), ei = (e) => e.emitFile({
2570
- id: Xr,
2745
+ code: ui
2746
+ }), pi = (e) => e.emitFile({
2747
+ id: li,
2571
2748
  name: "qwik-worker-core",
2572
2749
  type: "chunk",
2573
2750
  preserveSignature: "allow-extension"
2574
- }), ti = (e, t, n) => t !== "client" && t !== "ssr" || n !== "build" ? e : {
2751
+ }), mi = (e, t, n) => t !== "client" && t !== "ssr" || n !== "build" ? e : {
2575
2752
  ...e,
2576
2753
  format: "es",
2577
- plugins: ai(e?.plugins)
2578
- }, ni = (e, t, n) => {
2579
- let r = n ? e.getFileName(n) : void 0, i = r ? Ie(r) : void 0;
2580
- oi(t, (e) => i?.(e));
2581
- }, ri = (e, t) => {
2582
- let n = si(t), r = n ? Ie(n) : void 0;
2583
- oi(e, (e) => r?.(e));
2584
- }, ii = () => ({
2754
+ plugins: vi(e?.plugins)
2755
+ }, hi = (e, t, n) => {
2756
+ let r = n ? e.getFileName(n) : void 0, i = r ? ze(r) : void 0;
2757
+ yi(t, (e) => i?.(e));
2758
+ }, gi = (e, t) => {
2759
+ let n = bi(t), r = n ? ze(n) : void 0;
2760
+ yi(e, (e) => r?.(e));
2761
+ }, _i = () => ({
2585
2762
  name: "vite-plugin-qwik-worker-core-external",
2586
2763
  enforce: "pre",
2587
2764
  resolveId(e) {
2588
2765
  return e === "@qwik.dev/core" || e === "@qwik.dev/core/internal" ? {
2589
- id: Te,
2766
+ id: De,
2590
2767
  external: !0
2591
2768
  } : null;
2592
2769
  }
2593
- }), ai = (e) => () => [...typeof e == "function" ? e() : Array.isArray(e) ? e : [], ii()], oi = (e, t) => {
2594
- for (let n of Object.values(e)) n.type === "chunk" ? n.code = Le(n.code, () => t(n.fileName)) : n.type === "asset" && typeof n.source == "string" && (n.source = Le(n.source, () => t(n.fileName)));
2595
- }, si = (e) => {
2770
+ }), vi = (e) => () => [...typeof e == "function" ? e() : Array.isArray(e) ? e : [], _i()], yi = (e, t) => {
2771
+ for (let n of Object.values(e)) n.type === "chunk" ? n.code = Be(n.code, () => t(n.fileName)) : n.type === "asset" && typeof n.source == "string" && (n.source = Be(n.source, () => t(n.fileName)));
2772
+ }, bi = (e) => {
2596
2773
  if (!e) return;
2597
2774
  let t = Object.keys(e.bundles).find((e) => /(?:^|[/\\])qwik-worker-core(?:[.-]|$)/.test(e));
2598
2775
  if (t) return t === "build" || t.startsWith("build/") || /[/\\]build[/\\]/.test(t) ? t : `build/${t}`;
2599
- }, ci = [
2776
+ }, xi = [
2777
+ W,
2778
+ $e,
2779
+ et,
2600
2780
  G,
2601
- Ye,
2602
- Xe,
2603
- K,
2604
2781
  "@builder.io/qwik",
2605
2782
  "@builder.io/qwik/jsx-runtime",
2606
2783
  "@builder.io/qwik/jsx-dev-runtime"
2607
- ], li = [
2784
+ ], Si = [
2608
2785
  ".css",
2609
2786
  ".scss",
2610
2787
  ".sass",
2611
2788
  ".less",
2612
2789
  ".styl",
2613
2790
  ".stylus"
2614
- ], ui = "@qwik-hmr-bridge", di = "\n // HMR bridge: connects Vite HMR events to Qwik's component re-rendering.\n if (import.meta.hot) {\n let timeout;\n import.meta.hot.on(\"qwik:hmr\", (data) => {\n if (data.t === document.__hmrT) {\n console.log(\"Received duplicate HMR update, ignoring\", data.files);\n return;\n }\n clearTimeout(timeout);\n document.__hmrT = data.t;\n document.__hmrDone = 0;\n document.dispatchEvent(\n new CustomEvent(\"qHmr\", { detail: data })\n );\n timeout = setTimeout(() => {\n console.log(document.__hmrDone, document.__hmrT);\n if (document.__hmrDone !== document.__hmrT) {\n console.log(\"HMR update did not match active code, reloading the page\", location.href);\n location.reload();\n }\n }, 500);\n });\n }\n";
2615
- function fi(e = {}) {
2616
- let t = "serve", n = null, r = "/", i = null, a = null, o = null, s = null, c = "development", l, u, d = e.client?.outDir, f = null, p = e.fileFilter ? (t, n) => Je.test(t) || e.fileFilter(t, n) : () => !0, m = [], h = Ue(e.optimizerOptions), g = /* @__PURE__ */ new Set();
2791
+ ], Ci = "@qwik-hmr-bridge", wi = "\n // HMR bridge: connects Vite HMR events to Qwik's component re-rendering.\n if (import.meta.hot) {\n let timeout;\n import.meta.hot.on(\"qwik:hmr\", (data) => {\n if (data.t === document.__hmrT) {\n console.log(\"Received duplicate HMR update, ignoring\", data.files);\n return;\n }\n clearTimeout(timeout);\n document.__hmrT = data.t;\n document.__hmrDone = 0;\n document.dispatchEvent(\n new CustomEvent(\"qHmr\", { detail: data })\n );\n timeout = setTimeout(() => {\n console.log(document.__hmrDone, document.__hmrT);\n if (document.__hmrDone !== document.__hmrT) {\n console.log(\"HMR update did not match active code, reloading the page\", location.href);\n location.reload();\n }\n }, 500);\n });\n }\n";
2792
+ function Ti(e = {}) {
2793
+ let t = "serve", n = null, r = "/", i = null, a = null, o = null, s = null, c = "development", l, u, d = e.client?.outDir, f = null, p = e.fileFilter ? (t, n) => Qe.test(t) || e.fileFilter(t, n) : () => !0, m = [], h = qe({
2794
+ tsOptimizer: e.tsOptimizer,
2795
+ ...e.optimizerOptions
2796
+ }), g = /* @__PURE__ */ new Set();
2617
2797
  return [
2618
2798
  {
2619
2799
  name: "vite-plugin-qwik",
@@ -2661,16 +2841,16 @@ function fi(e = {}) {
2661
2841
  manifestOutput: e.client?.manifestOutput
2662
2842
  }, v = await h.normalizeOptions(_);
2663
2843
  g ||= v.input, f = _, a = v.srcDir, o = v.rootDir, e.csr || (n = v.clientOutDir, i = n, s = v.ssrOutDir);
2664
- let y = c === "development", b = "globalThis.qDev", x = "globalThis.qTest", S = "globalThis.qInspector", ee = r?.define?.[b] ?? y, C = r?.define?.[S] ?? y, w = {
2844
+ let y = c === "development", b = "globalThis.qDev", x = "globalThis.qTest", S = "globalThis.qInspector", C = r?.define?.[b] ?? y, ee = r?.define?.[S] ?? y, w = {
2665
2845
  ssr: { noExternal: [
2846
+ W,
2666
2847
  G,
2667
- K,
2668
- Ze,
2669
- q
2848
+ tt,
2849
+ K
2670
2850
  ] },
2671
2851
  envPrefix: ["VITE_", "PUBLIC_"],
2672
2852
  resolve: {
2673
- dedupe: [...ci],
2853
+ dedupe: [...xi],
2674
2854
  alias: {
2675
2855
  "@builder.io/qwik": "@qwik.dev/core",
2676
2856
  "@builder.io/qwik/build": "@qwik.dev/core/build",
@@ -2687,13 +2867,13 @@ function fi(e = {}) {
2687
2867
  },
2688
2868
  optimizeDeps: {
2689
2869
  exclude: [
2870
+ W,
2690
2871
  G,
2872
+ tt,
2873
+ $e,
2874
+ et,
2691
2875
  K,
2692
- Ze,
2693
- Ye,
2694
- Xe,
2695
2876
  q,
2696
- J,
2697
2877
  "@builder.io/qwik"
2698
2878
  ],
2699
2879
  entries: g && (typeof g == "string" ? [g] : typeof g == "object" ? Object.values(g) : g)
@@ -2707,37 +2887,37 @@ function fi(e = {}) {
2707
2887
  experimental: { attachDebugInfo: r.build?.rolldownOptions?.experimental?.attachDebugInfo ?? "none" }
2708
2888
  }
2709
2889
  },
2710
- worker: ti(r.worker, u, t),
2890
+ worker: mi(r.worker, u, t),
2711
2891
  define: {
2712
- [b]: ee,
2713
- [S]: C,
2892
+ [b]: C,
2893
+ [S]: ee,
2714
2894
  [x]: JSON.stringify(process.env.NODE_ENV === "test")
2715
2895
  }
2716
2896
  };
2717
2897
  return e.csr || (w.build.cssCodeSplit = !1, v.outDir && (w.build.outDir = v.outDir), w.build.rolldownOptions = {
2718
2898
  ...w.build.rolldownOptions,
2719
- output: at(h, r.build?.rolldownOptions?.output),
2899
+ output: lt(h, r.build?.rolldownOptions?.output),
2720
2900
  preserveEntrySignatures: "allow-extension"
2721
2901
  }, v.target === "ssr" ? t === "build" && (w.publicDir = !1, w.build.ssr = !0, r.build?.minify == null && c === "production" && (w.build.minify = !0)) : v.target === "client" || (v.target === "lib" ? (w.build.minify = !1, w.build.rolldownOptions.external = [
2902
+ W,
2722
2903
  G,
2904
+ tt,
2905
+ $e,
2906
+ et,
2723
2907
  K,
2724
- Ze,
2725
- Ye,
2726
- Xe,
2727
- q,
2728
- J
2908
+ q
2729
2909
  ]) : w.define = {
2730
2910
  [b]: !0,
2731
2911
  [x]: !0,
2732
2912
  [S]: !1
2733
- }), globalThis.qDev = ee, globalThis.qTest = !0, globalThis.qInspector = C), w;
2913
+ }), globalThis.qDev = C, globalThis.qTest = !0, globalThis.qInspector = ee), w;
2734
2914
  },
2735
2915
  configEnvironment(e, t, n) {
2736
2916
  return e === "ssr" || e === "ssg" ? { resolve: { noExternal: [
2917
+ W,
2737
2918
  G,
2738
- K,
2739
- Ze,
2740
- q
2919
+ tt,
2920
+ K
2741
2921
  ] } } : c === "production" ? { resolve: { conditions: ["min"] } } : {};
2742
2922
  },
2743
2923
  async configResolved(n) {
@@ -2756,19 +2936,19 @@ function fi(e = {}) {
2756
2936
  await h.validateSource(e), h.onDiagnostics((e, t, n) => {
2757
2937
  e.forEach((e) => {
2758
2938
  let r = h.normalizePath(t.sys.path.join(n, e.file));
2759
- e.category === "error" ? this.error(ct(r, e)) : this.warn(ct(r, e));
2939
+ e.category === "error" ? this.error(ft(r, e)) : this.warn(ft(r, e));
2760
2940
  });
2761
- }), await h.buildStart(this), u = void 0, t === "build" && h.getOptions().target === "client" && (u = ei(this));
2941
+ }), await h.buildStart(this), u = void 0, t === "build" && h.getOptions().target === "client" && (u = pi(this));
2762
2942
  },
2763
2943
  resolveId(e, t, n) {
2764
- if (e.endsWith(ui)) return ui;
2765
- if (Qr(e)) return Xr;
2944
+ if (e.endsWith(Ci)) return Ci;
2945
+ if (di(e)) return li;
2766
2946
  let r = p(e, "resolveId");
2767
2947
  return A(e) || !r ? null : h.resolveId(this, e, t, n);
2768
2948
  },
2769
2949
  load(e, n) {
2770
- if (e === ui) return { code: di };
2771
- if (e === "@qwik-worker-core") return $r();
2950
+ if (e === Ci) return { code: wi };
2951
+ if (e === "@qwik-worker-core") return fi();
2772
2952
  let r = p(e, "load");
2773
2953
  return A(e) || !r ? null : (e = h.normalizePath(e), t === "serve" && e.endsWith("@qwik-client-manifest") ? { code: "export const manifest = undefined;" } : h.load(this, e, n));
2774
2954
  },
@@ -2799,7 +2979,7 @@ function fi(e = {}) {
2799
2979
  let e = h.getOptions();
2800
2980
  for (let [n, i] of Object.entries(t)) if (i.type === "asset") {
2801
2981
  let t = r + n;
2802
- li.some((e) => n.endsWith(e)) && (typeof i.source == "string" && i.source.length < e.inlineStylesUpToBytes ? m.push({
2982
+ Si.some((e) => n.endsWith(e)) && (typeof i.source == "string" && i.source.length < e.inlineStylesUpToBytes ? m.push({
2803
2983
  tag: "style",
2804
2984
  location: "head",
2805
2985
  attributes: {
@@ -2815,13 +2995,13 @@ function fi(e = {}) {
2815
2995
  }
2816
2996
  }));
2817
2997
  }
2818
- let n = je(await h.generateManifest(this, t, g, {
2998
+ let n = Pe(await h.generateManifest(this, t, g, {
2819
2999
  injections: m,
2820
3000
  platform: { vite: "" }
2821
3001
  }), r);
2822
- for (let e of Object.values(t)) e.type === "chunk" && (e.code = Ae(e.code, n));
2823
- ni(this, t, u);
2824
- } else i && ri(t, h.getOptions().manifestInput);
3002
+ for (let e of Object.values(t)) e.type === "chunk" && (e.code = Ne(e.code, n));
3003
+ hi(this, t, u);
3004
+ } else i && gi(t, h.getOptions().manifestInput);
2825
3005
  }
2826
3006
  },
2827
3007
  async writeBundle(e, t) {
@@ -2848,15 +3028,15 @@ function fi(e = {}) {
2848
3028
  }
2849
3029
  },
2850
3030
  transformIndexHtml() {
2851
- if (t === "serve") return bt(h.getOptions(), r);
3031
+ if (t === "serve") return wt(h.getOptions(), r);
2852
3032
  },
2853
3033
  configureServer(t) {
2854
- l = t, h.configureServer(t), (e?.devTools?.imageDevTools ?? !0) && t.middlewares.use(qr(h.getSys(), o, a));
3034
+ l = t, h.configureServer(t), (e?.devTools?.imageDevTools ?? !0) && t.middlewares.use(oi(h.getSys(), o, a));
2855
3035
  },
2856
3036
  configurePreviewServer(e) {
2857
3037
  return async () => {
2858
3038
  let t = h.getSys(), n = h.getPath();
2859
- await vt(e.middlewares, s, t, n);
3039
+ await St(e.middlewares, s, t, n);
2860
3040
  };
2861
3041
  },
2862
3042
  hotUpdate(t) {
@@ -2883,15 +3063,15 @@ function fi(e = {}) {
2883
3063
  },
2884
3064
  onLog(e, t) {
2885
3065
  if (t.plugin == "vite-plugin-qwik") {
2886
- let n = mi[e] || $.White, r = (t.frame || "").split("\n").map((e) => (e.match(/^\s*\^\s*$/) ? $.BrightWhite : $.BrightBlack) + e);
3066
+ let n = Di[e] || $.White, r = (t.frame || "").split("\n").map((e) => (e.match(/^\s*\^\s*$/) ? $.BrightWhite : $.BrightBlack) + e);
2887
3067
  return console[e](`${n}%s\n${$.BrightWhite}%s\n%s${$.RESET}`, `[${t.plugin}](${e}): ${t.message}\n`, ` ${t?.loc?.file}:${t?.loc?.line}:${t?.loc?.column}\n`, ` ${r.join("\n ")}\n`), !1;
2888
3068
  }
2889
3069
  }
2890
3070
  },
2891
- pi()
3071
+ Ei()
2892
3072
  ];
2893
3073
  }
2894
- async function pi() {
3074
+ async function Ei() {
2895
3075
  let e, t, n = !1;
2896
3076
  async function r() {
2897
3077
  if (n) return !0;
@@ -2998,10 +3178,10 @@ var $ = {
2998
3178
  BrightCyan: "\x1B[96m",
2999
3179
  BrightWhite: "\x1B[97m",
3000
3180
  RESET: "\x1B[0m"
3001
- }, mi = {
3181
+ }, Di = {
3002
3182
  warn: $.Yellow,
3003
3183
  info: $.Cyan,
3004
3184
  debug: $.BrightBlack
3005
3185
  };
3006
3186
  //#endregion
3007
- export { it as qwikRolldown, lt as qwikRollup, fi as qwikVite };
3187
+ export { ct as qwikRolldown, pt as qwikRollup, Ti as qwikVite };