@qwik.dev/core 2.0.0-beta.37 → 2.0.0-beta.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/backpatch/package.json +1 -1
  2. package/dist/build/package.json +1 -1
  3. package/dist/cli.mjs +14 -5
  4. package/dist/core-internal.d.ts +397 -323
  5. package/dist/core.min.mjs +9 -8
  6. package/dist/core.mjs +1886 -1161
  7. package/dist/core.mjs.map +1 -1
  8. package/dist/core.prod.mjs +4646 -4048
  9. package/dist/loader/index.mjs +2 -2
  10. package/dist/loader/package.json +1 -1
  11. package/dist/optimizer.d.ts +5 -3
  12. package/dist/optimizer.mjs +1676 -1722
  13. package/dist/preloader.mjs +1 -1
  14. package/dist/qwikloader.debug.js +1 -1
  15. package/dist/qwikloader.js +1 -1
  16. package/dist/server.d.ts +7 -0
  17. package/dist/server.mjs +75 -34
  18. package/dist/server.prod.mjs +392 -345
  19. package/dist/starters/adapters/bun/src/entry.bun.ts +35 -0
  20. package/dist/starters/adapters/cloud-run/src/entry.cloud-run.tsx +20 -0
  21. package/dist/starters/adapters/deno/src/entry.deno.ts +41 -0
  22. package/dist/starters/adapters/express/src/entry.express.tsx +20 -0
  23. package/dist/starters/adapters/fastify/package.json +2 -2
  24. package/dist/starters/adapters/fastify/src/entry.fastify.tsx +20 -0
  25. package/dist/starters/adapters/fastify/src/plugins/fastify-qwik.ts +10 -1
  26. package/dist/starters/adapters/node-server/src/entry.node-server.tsx +20 -0
  27. package/dist/starters/features/csr/package.json +1 -1
  28. package/dist/starters/features/drizzle/package.json +1 -1
  29. package/dist/starters/features/vitest/package.json +1 -1
  30. package/dist/testing/index.d.ts +40 -31
  31. package/dist/testing/index.mjs +1568 -942
  32. package/dist/testing/package.json +1 -1
  33. package/dist/worker/package.json +1 -1
  34. package/dist/worker/worker.shared.js +1 -1
  35. package/handlers.mjs +3 -0
  36. package/package.json +7 -7
  37. package/public.d.ts +3 -0
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * @qwik.dev/core/server 2.0.0-beta.37-dev+82dc74d
3
+ * @qwik.dev/core/server 2.0.0-beta.39-dev+6fb620f
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
@@ -9,7 +9,7 @@
9
9
  import { setPlatform as setPlatform2 } from "@qwik.dev/core";
10
10
 
11
11
  // packages/qwik/src/server/platform.ts
12
- import { setPlatform as Hs } from "@qwik.dev/core";
12
+ import { setPlatform as mi } from "@qwik.dev/core";
13
13
 
14
14
  import { isDev as isDev6 } from "@qwik.dev/core/build";
15
15
 
@@ -17,7 +17,7 @@ import { isDev as isDev6 } from "@qwik.dev/core/build";
17
17
  import { isDev as isDev2 } from "@qwik.dev/core/build";
18
18
 
19
19
  // packages/qwik/src/core/shared/error/assert.ts
20
- import { isDev as me } from "@qwik.dev/core/build";
20
+ import { isDev as je } from "@qwik.dev/core/build";
21
21
 
22
22
  // packages/qwik/src/core/shared/utils/qdev.ts
23
23
  var qDev = globalThis.qDev !== false;
@@ -34,18 +34,18 @@ var qRuntimeQrl = globalThis.qRuntimeQrl === true;
34
34
  var STYLE = qDev ? `background: #564CE0; color: white; padding: 2px 3px; border-radius: 2px; font-size: 0.8em;` : "";
35
35
 
36
36
  var throwErrorAndStop = (e, ...t) => {
37
- const n = be(false, e, ...t);
37
+ const n = De(false, e, ...t);
38
38
  debugger;
39
39
  throw n;
40
40
  };
41
41
 
42
42
  var logErrorAndStop = (e, ...t) => {
43
- const n = be(qDev, e, ...t);
43
+ const n = De(qDev, e, ...t);
44
44
  debugger;
45
45
  return n;
46
46
  };
47
47
 
48
- var be = (e, t, ...n) => {
48
+ var De = (e, t, ...n) => {
49
49
  const r = t instanceof Error ? t : new Error(t);
50
50
  !qTest && console.error("%cQWIK ERROR", STYLE, r.message, ...n, r.stack);
51
51
  e && !qTest && setTimeout(() => {
@@ -58,7 +58,7 @@ var be = (e, t, ...n) => {
58
58
  var ASSERT_DISCLAIMER = "Internal assert, this is likely caused by a bug in Qwik: ";
59
59
 
60
60
  function assertTrue(e, t, ...n) {
61
- if (me) {
61
+ if (je) {
62
62
  if (e === true) {
63
63
  return;
64
64
  }
@@ -67,7 +67,7 @@ function assertTrue(e, t, ...n) {
67
67
  }
68
68
 
69
69
  // packages/qwik/src/core/client/util-mapArray.ts
70
- var ve = (e, t, n) => {
70
+ var Xe = (e, t, n) => {
71
71
  isDev2 && assertTrue(n % 2 === 0, "Expecting even number.");
72
72
  let r = n >> 1;
73
73
  let s = e.length - 2 >> 1;
@@ -86,8 +86,8 @@ var ve = (e, t, n) => {
86
86
  return r << 1 ^ -1;
87
87
  };
88
88
 
89
- var _e = (e, t, n, r, s = false) => {
90
- const i = ve(e, t, r);
89
+ var We = (e, t, n, r, s = false) => {
90
+ const i = Xe(e, t, r);
91
91
  if (i >= 0) {
92
92
  if (n == null && !s) {
93
93
  e.splice(i, 2);
@@ -100,7 +100,7 @@ var _e = (e, t, n, r, s = false) => {
100
100
  };
101
101
 
102
102
  var mapApp_remove = (e, t, n) => {
103
- const r = ve(e, t, n);
103
+ const r = Xe(e, t, n);
104
104
  let s = null;
105
105
  if (r >= 0) {
106
106
  s = e[r + 1];
@@ -110,8 +110,8 @@ var mapApp_remove = (e, t, n) => {
110
110
  return s;
111
111
  };
112
112
 
113
- var ge = (e, t, n) => {
114
- const r = ve(e, t, n);
113
+ var Ue = (e, t, n) => {
114
+ const r = Xe(e, t, n);
115
115
  if (r >= 0) {
116
116
  return e[r + 1];
117
117
  } else {
@@ -119,17 +119,17 @@ var ge = (e, t, n) => {
119
119
  }
120
120
  };
121
121
 
122
- var Ee = (e, t, n) => ve(e, t, n) >= 0;
122
+ var Ve = (e, t, n) => Xe(e, t, n) >= 0;
123
123
 
124
124
  // packages/qwik/src/core/shared/error/error.ts
125
125
  import { isDev as isDev3 } from "@qwik.dev/core/build";
126
126
 
127
127
  // packages/qwik/src/core/shared/utils/types.ts
128
- var ke = e => typeof e === "object" && e !== null;
128
+ var Be = e => typeof e === "object" && e !== null;
129
129
 
130
- var Re = e => Array.isArray(e);
130
+ var He = e => Array.isArray(e);
131
131
 
132
- var Pe = e => typeof e === "string";
132
+ var Qe = e => typeof e === "string";
133
133
 
134
134
  // packages/qwik/src/core/shared/error/error.ts
135
135
  var baseUrl = "https://qwikdev-build-v2.qwik-8nx.pages.dev/docs/errors/#q";
@@ -194,8 +194,8 @@ var codeToText = (e, ...t) => {
194
194
  // 27
195
195
  "Cannot coerce a Signal, use `.value` instead",
196
196
  // 28
197
- "useComputed$ QRL {{0}} {{1}} cannot return a Promise",
198
- // 29
197
+ "",
198
+ // 29 (cleared: useComputed$ now supports async functions)
199
199
  `===\nQwik version {{0}} already imported while importing {{1}}.\nThis can lead to issues due to duplicated shared structures.\nVerify that the Qwik libraries you're using are in "resolve.noExternal[]" and in "optimizeDeps.exclude".\n===\n`,
200
200
  // 30
201
201
  "WrappedSignal is read-only",
@@ -206,12 +206,18 @@ var codeToText = (e, ...t) => {
206
206
  // 33
207
207
  "Serialization Error: Cannot serialize function: {{0}}",
208
208
  // 34
209
- "Cannot read .value of a clientOnly async signal during SSR. Use .loading to check state, or provide an initial value." ];
209
+ "Cannot read .value of a clientOnly async signal during SSR. Use .loading to check state, or provide an initial value.",
210
+ // 35
211
+ "Invalid element name for SSR {{0}}",
212
+ // 36
213
+ "Invalid serialized Promise dependency",
214
+ // 37
215
+ "Invalid serialized Uint8Array payload" ];
210
216
  let r = n[e] ?? "";
211
217
  if (t.length) {
212
218
  r = r.replaceAll(/{{(\d+)}}/g, (e, n) => {
213
219
  let r = t[n];
214
- if (r && ke(r) && r.constructor === Object) {
220
+ if (r && Be(r) && r.constructor === Object) {
215
221
  r = JSON.stringify(r).slice(0, 50);
216
222
  }
217
223
  return r;
@@ -223,7 +229,7 @@ var codeToText = (e, ...t) => {
223
229
  }
224
230
  };
225
231
 
226
- var qe = (e, t = []) => {
232
+ var Ye = (e, t = []) => {
227
233
  const n = codeToText(e, ...t);
228
234
  return logErrorAndStop(n, ...t);
229
235
  };
@@ -231,10 +237,10 @@ var qe = (e, t = []) => {
231
237
  // packages/qwik/src/core/shared/qrl/qrl-utils.ts
232
238
  import { isDev as isDev4 } from "@qwik.dev/core/build";
233
239
 
234
- var Me = "<sync>";
240
+ var Ge = "<sync>";
235
241
 
236
242
  // packages/qwik/src/core/shared/types.ts
237
- var xe = "q:type";
243
+ var Ze = "q:type";
238
244
 
239
245
  // packages/qwik/src/core/shared/vnode-data-types.ts
240
246
  var VNodeDataSeparator = {
@@ -350,6 +356,10 @@ var VNodeDataChar = {
350
356
  // `<` - `q:renderFn' - Component QRL render function (body)
351
357
  RENDER_FN_CHAR:
352
358
  /* ** */ "<",
359
+ RENDER_HASH_PREFIX:
360
+ /* **/ 95,
361
+ // `_` after `<` identifies a component hash.
362
+ RENDER_HASH_PREFIX_CHAR: "_",
353
363
  ID:
354
364
  /* ***************** */ 61,
355
365
  // `=` - `q:id` - ID of the element.
@@ -406,7 +416,7 @@ var VNodeDataChar = {
406
416
  /* ******* */ "~"
407
417
  };
408
418
 
409
- var je = (e, t) => {
419
+ var ir = (e, t) => {
410
420
  const n = parseInt(e, 10) - 1;
411
421
  const r = n + t;
412
422
  return -(r * (r + 1) / 2 + t + 1);
@@ -496,29 +506,29 @@ function encodeVNodeDataKey(e) {
496
506
  }
497
507
 
498
508
  // packages/qwik/src/core/shared/utils/markers.ts
499
- var Le = "q:renderFn";
509
+ var sr = "q:renderFn";
500
510
 
501
- var De = "q:slot";
511
+ var cr = "q:slot";
502
512
 
503
513
  var QSlotParent = "q:sparent";
504
514
 
505
515
  var QStatePatchAttr = "q:patch";
506
516
 
507
- var Ph = "q:r";
517
+ var hr = "q:r";
508
518
 
509
- var Ue = "q:style";
519
+ var dr = "q:style";
510
520
 
511
- var ze = "style[q\\:style]";
521
+ var pr = "style[q\\:style]";
512
522
 
513
523
  var QStyleSSelector = "style[q\\:sstyle]";
514
524
 
515
- var Be = ze + "," + QStyleSSelector;
525
+ var $r = pr + "," + QStyleSSelector;
516
526
 
517
- var He = "q:sstyle";
527
+ var yr = "q:sstyle";
518
528
 
519
- var Je = "q:ctx";
529
+ var mr = "q:ctx";
520
530
 
521
- var Qe = "q:brefs";
531
+ var wr = "q:brefs";
522
532
 
523
533
  var QwikEvContainerReady = 0;
524
534
 
@@ -528,7 +538,7 @@ var QRuntimeAttr = "q:runtime";
528
538
 
529
539
  var QVersionAttr = "q:version";
530
540
 
531
- var Ge = "q:base";
541
+ var vr = "q:base";
532
542
 
533
543
  var QLocaleAttr = "q:locale";
534
544
 
@@ -536,74 +546,78 @@ var QManifestHashAttr = "q:manifest-hash";
536
546
 
537
547
  var QInstanceAttr = "q:instance";
538
548
 
539
- var Ke = "q:container-island";
549
+ var QStatePrewarmAttr = "q:prewarm";
540
550
 
541
- var Ze = "/" + Ke;
551
+ var _r = "q:container-island";
542
552
 
543
- var ts = "q:ignore";
553
+ var gr = "/" + _r;
544
554
 
545
- var ns = "/" + ts;
555
+ var Sr = "q:ignore";
546
556
 
547
- var es = "q:container";
557
+ var Er = "/" + Sr;
548
558
 
549
- var ss = "/" + es;
559
+ var kr = "q:container";
550
560
 
551
- var is = "q:template";
561
+ var Rr = "/" + kr;
552
562
 
553
- var os = "[q\\:container]:not([q\\:container=" + "html" /* HTML */ + "]):not([q\\:container=" + "text" /* TEXT */ + "])";
563
+ var Pr = "q:template";
564
+
565
+ var qr = "[q\\:container]:not([q\\:container=" + "html" /* HTML */ + "]):not([q\\:container=" + "text" /* TEXT */ + "])";
554
566
 
555
567
  var QDefaultSlot = "";
556
568
 
557
- var as = "q:id";
569
+ var Ir = "q:id";
558
570
 
559
- var hs = "q:key";
571
+ var Nr = "q:key";
560
572
 
561
- var ds = "q:props";
573
+ var Cr = "q:props";
562
574
 
563
- var ps = "q:seq";
575
+ var Or = "q:seq";
564
576
 
565
- var $s = "q:seqIdx";
577
+ var jr = "q:seqIdx";
566
578
 
567
579
  var ELEMENT_BACKPATCH_DATA = "qwik/backpatch";
568
580
 
569
- var ys = "q:p";
581
+ var Lr = "q:p";
582
+
583
+ var Fr = "q:ps";
570
584
 
571
- var ms = "q:ps";
585
+ var Dr = ":";
572
586
 
573
- var ws = ":";
587
+ var Xr = Dr + "on";
574
588
 
575
- var bs = ws + "on";
589
+ var Wr = Dr + "onIdx";
576
590
 
577
- var vs = ws + "onIdx";
591
+ var Ur = Dr + "onFlags";
578
592
 
579
- var _s = ws + "onFlags";
593
+ var Vr = Dr + "cursorBoundary";
580
594
 
581
- var gs = ws + "nearestCursorBoundary";
595
+ var zr = Dr + "nearestCursorBoundary";
582
596
 
583
- var Es = ":";
597
+ var Br = ":";
584
598
 
585
- var Ss = "dangerouslySetInnerHTML";
599
+ var Hr = "dangerouslySetInnerHTML";
586
600
 
587
601
  // packages/qwik/src/core/shared/utils/promises.ts
588
- import { isDev as isDev5, isServer as $e } from "@qwik.dev/core/build";
602
+ import { isDev as isDev5, isServer as Ce } from "@qwik.dev/core/build";
589
603
 
590
- var Rs = 100;
604
+ var Jr = 100;
591
605
 
592
- var Ps = e => !!e && typeof e == "object" && typeof e.then === "function";
606
+ var Yr = e => !!e && typeof e == "object" && typeof e.then === "function";
593
607
 
594
- var qs = (e, t) => Ps(e) ? e.then(t) : t(e);
608
+ var Kr = (e, t) => Yr(e) ? e.then(t) : t(e);
595
609
 
596
610
  var checkError = e => {
597
- if ($e && e instanceof ReferenceError && e.message.includes("window")) {
611
+ if (Ce && e instanceof ReferenceError && e.message.includes("window")) {
598
612
  e.message = 'It seems like you forgot to add "if (isBrowser) {...}" here:' + e.message;
599
613
  }
600
614
  };
601
615
 
602
- var As = e => {
616
+ var ti = e => {
603
617
  throw e;
604
618
  };
605
619
 
606
- function n(e, t = As) {
620
+ function n(e, t = ti) {
607
621
  let n = false;
608
622
  let r;
609
623
  try {
@@ -612,21 +626,21 @@ function n(e, t = As) {
612
626
  } catch (e) {
613
627
  r = e;
614
628
  }
615
- if (!Ps(r)) {
629
+ if (!Yr(r)) {
616
630
  if (n) {
617
631
  return r;
618
632
  }
619
633
  isDev5 && checkError(r);
620
634
  return t(r);
621
635
  }
622
- let s = Rs;
636
+ let s = Jr;
623
637
  const i = async n => {
624
- while (Ps(n)) {
638
+ while (Yr(n)) {
625
639
  try {
626
640
  await n;
627
641
  return await e();
628
642
  } catch (e) {
629
- if (Ps(e)) {
643
+ if (Yr(e)) {
630
644
  if (! --s) {
631
645
  n = new Error("Exceeded max retry count in retryOnPromise");
632
646
  break;
@@ -655,34 +669,34 @@ function convertStyleIdsToString(e) {
655
669
  }
656
670
 
657
671
  // packages/qwik/src/core/shared/utils/event-names.ts
658
- var Ns = e => e.charCodeAt(0) === 113 && e.charCodeAt(1) === 45 && (e.charCodeAt(3) === 58 || e.charCodeAt(3) === 112 && e.charCodeAt(4) === 58);
672
+ var ri = e => e.charCodeAt(0) === 113 && e.charCodeAt(1) === 45 && (e.charCodeAt(3) === 58 || e.charCodeAt(3) === 112 && e.charCodeAt(4) === 58);
659
673
 
660
674
  function isPreventDefault(e) {
661
675
  return e.startsWith("preventdefault:");
662
676
  }
663
677
 
664
678
  // packages/qwik/src/core/shared/utils/unitless_number.ts
665
- var Ls = /* @__PURE__ */ new Set([ "animationIterationCount", "aspectRatio", "borderImageOutset", "borderImageSlice", "borderImageWidth", "boxFlex", "boxFlexGroup", "boxOrdinalGroup", "columnCount", "columns", "flex", "flexGrow", "flexShrink", "gridArea", "gridRow", "gridRowEnd", "gridRowStart", "gridColumn", "gridColumnEnd", "gridColumnStart", "fontWeight", "lineClamp", "lineHeight", "opacity", "order", "orphans", "scale", "tabSize", "widows", "zIndex", "zoom", "MozAnimationIterationCount",
679
+ var li = /* @__PURE__ */ new Set([ "animationIterationCount", "aspectRatio", "borderImageOutset", "borderImageSlice", "borderImageWidth", "boxFlex", "boxFlexGroup", "boxOrdinalGroup", "columnCount", "columns", "flex", "flexGrow", "flexShrink", "gridArea", "gridRow", "gridRowEnd", "gridRowStart", "gridColumn", "gridColumnEnd", "gridColumnStart", "fontWeight", "lineClamp", "lineHeight", "opacity", "order", "orphans", "scale", "tabSize", "widows", "zIndex", "zoom", "MozAnimationIterationCount",
666
680
  // Known Prefixed Properties
667
681
  "MozBoxFlex",
668
682
  // TODO: Remove these since they shouldn't be used in modern code
669
683
  "msFlex", "msFlexPositive", "WebkitAnimationIterationCount", "WebkitBoxFlex", "WebkitBoxOrdinalGroup", "WebkitColumnCount", "WebkitColumns", "WebkitFlex", "WebkitFlexGrow", "WebkitFlexShrink", "WebkitLineClamp" ]);
670
684
 
671
- var isUnitlessNumber = e => Ls.has(e);
685
+ var isUnitlessNumber = e => li.has(e);
672
686
 
673
687
  // packages/qwik/src/core/shared/utils/styles.ts
674
- var Xs = e => {
688
+ var ci = e => {
675
689
  if (!e) {
676
690
  return "";
677
691
  }
678
- if (Pe(e)) {
692
+ if (Qe(e)) {
679
693
  return e.trim();
680
694
  }
681
695
  const t = [];
682
- if (Re(e)) {
696
+ if (He(e)) {
683
697
  for (let n = 0; n < e.length; n++) {
684
698
  const r = e[n];
685
- const s = Xs(r);
699
+ const s = ci(r);
686
700
  if (s) {
687
701
  t.push(s);
688
702
  }
@@ -697,15 +711,15 @@ var Xs = e => {
697
711
  return t.join(" ");
698
712
  };
699
713
 
700
- var Ds = e => e.replace(/([A-Z])/g, "-$1").toLowerCase();
714
+ var fi = e => e.replace(/([A-Z])/g, "-$1").toLowerCase();
701
715
 
702
- var stringifyStyle = e => {
716
+ var ai = e => {
703
717
  if (e == null) {
704
718
  return "";
705
719
  }
706
720
  if (typeof e == "object") {
707
- if (Re(e)) {
708
- throw qe(0 /* stringifyClassOrStyle */ , [ e, "style" ]);
721
+ if (He(e)) {
722
+ throw Ye(0 /* stringifyClassOrStyle */ , [ e, "style" ]);
709
723
  } else {
710
724
  const t = [];
711
725
  for (const n in e) {
@@ -715,7 +729,7 @@ var stringifyStyle = e => {
715
729
  if (n.startsWith("--")) {
716
730
  t.push(n + ":" + r);
717
731
  } else {
718
- t.push(Ds(n) + ":" + Ws(n, r));
732
+ t.push(fi(n) + ":" + hi(n, r));
719
733
  }
720
734
  }
721
735
  }
@@ -728,12 +742,12 @@ var stringifyStyle = e => {
728
742
 
729
743
  var serializeBooleanOrNumberAttribute = e => e != null ? String(e) : null;
730
744
 
731
- function s(e, t, n) {
745
+ function r(e, t, n) {
732
746
  if (isClassAttr(e)) {
733
- const e = Xs(t);
747
+ const e = ci(t);
734
748
  t = n ? n + (e.length ? " " + e : e) : e;
735
749
  } else if (e === "style") {
736
- t = stringifyStyle(t);
750
+ t = ai(t);
737
751
  } else if (isEnumeratedBooleanAttribute(e) || typeof t === "number") {
738
752
  t = serializeBooleanOrNumberAttribute(t);
739
753
  } else if (t === false || t == null) {
@@ -748,7 +762,7 @@ function isEnumeratedBooleanAttribute(e) {
748
762
  return isAriaAttribute(e) || [ "spellcheck", "draggable", "contenteditable" ].includes(e);
749
763
  }
750
764
 
751
- var Ws = (e, t) => {
765
+ var hi = (e, t) => {
752
766
  if (typeof t === "number" && t !== 0 && !isUnitlessNumber(e)) {
753
767
  return t + "px";
754
768
  }
@@ -777,9 +791,9 @@ var parseBundleGraph = e => {
777
791
  o = -i / 10;
778
792
  } else {
779
793
  s.push({
780
- Wt: e[i],
781
- Yt: o,
782
- Gt: 1
794
+ fn: e[i],
795
+ mn: o,
796
+ wn: 1
783
797
  });
784
798
  }
785
799
  n++;
@@ -798,7 +812,7 @@ var initPreloader = e => {
798
812
  };
799
813
 
800
814
  // packages/qwik/src/core/shared/utils/objects.ts
801
- var dr = e => {
815
+ var Oi = e => {
802
816
  for (const t in e) {
803
817
  if (Object.prototype.hasOwnProperty.call(e, t)) {
804
818
  return false;
@@ -820,13 +834,18 @@ var writeStringRootRef = (e, t) => e.write(String(t));
820
834
 
821
835
  var writeStringRootRefPath = (e, t) => e.write(stringifyRootRefPath(t));
822
836
 
823
- var pr = e => ({
837
+ var writeStringRootRefDelta = (e, t, n) => e.write(String(t - n));
838
+
839
+ var ji = e => ({
824
840
  write: e,
825
841
  writeRootRef(e) {
826
842
  return writeStringRootRef(this, e);
827
843
  },
828
844
  writeRootRefPath(e) {
829
845
  return writeStringRootRefPath(this, e);
846
+ },
847
+ writeRootRefDelta(e, t) {
848
+ return writeStringRootRefDelta(this, e, t);
830
849
  }
831
850
  });
832
851
 
@@ -837,21 +856,21 @@ var GT = ">";
837
856
 
838
857
  var CLOSE_TAG = "</";
839
858
 
840
- var ga = " ";
859
+ var Ga = " ";
841
860
 
842
861
  var ATTR_EQUALS_QUOTE = '="';
843
862
 
844
- var $r = '"';
863
+ var Li = '"';
845
864
 
846
865
  var EMPTY_ATTR = '=""';
847
866
 
848
- var yr = "[";
867
+ var Fi = "[";
849
868
 
850
- var mr = "]";
869
+ var Di = "]";
851
870
 
852
871
  var PAREN_CLOSE = ")";
853
872
 
854
- var wr = ",";
873
+ var Xi = ",";
855
874
 
856
875
  // packages/qwik/src/server/platform.ts
857
876
  var getDevSegmentPath = (e, t, n, r) => {
@@ -859,7 +878,7 @@ var getDevSegmentPath = (e, t, n, r) => {
859
878
  if (s) {
860
879
  return s;
861
880
  }
862
- if (n === Me) {
881
+ if (n === Ge) {
863
882
  return [ n, "" ];
864
883
  }
865
884
  if (!r) {
@@ -873,14 +892,14 @@ var getDevSegmentPath = (e, t, n, r) => {
873
892
  return [ n, i ];
874
893
  };
875
894
 
876
- function Us(e, t) {
895
+ function pi(e, t) {
877
896
  const n = t?.mapper;
878
897
  const r = e.symbolMapper ? e.symbolMapper : (e, t, r) => {
879
898
  if (n || isDev6 && import.meta.env?.MODE !== "test") {
880
- const t = Rh(e);
899
+ const t = sd(e);
881
900
  const s = !isDev6 ? n[t] : getDevSegmentPath(n, t, e, r);
882
901
  if (!s) {
883
- if (t === Me) {
902
+ if (t === Ge) {
884
903
  return [ t, "" ];
885
904
  }
886
905
  const s = globalThis.__qwik_reg_symbols?.has(t);
@@ -895,12 +914,12 @@ function Us(e, t) {
895
914
  const s = {
896
915
  isServer: true,
897
916
  async importSymbol(e, t, n) {
898
- const r = Rh(n);
917
+ const r = sd(n);
899
918
  const s = globalThis.__qwik_reg_symbols?.get(r);
900
919
  if (s) {
901
920
  return s;
902
921
  }
903
- throw qe(6 /* dynamicImportFailed */ , [ n ]);
922
+ throw Ye(6 /* dynamicImportFailed */ , [ n ]);
904
923
  },
905
924
  raf: () => {
906
925
  console.error("server can not rerender");
@@ -914,11 +933,11 @@ function Us(e, t) {
914
933
  }
915
934
 
916
935
  async function setServerPlatform(e, t) {
917
- const n = Us(e, t);
918
- Hs(n);
936
+ const n = pi(e, t);
937
+ mi(n);
919
938
  }
920
939
 
921
- var Rh = e => {
940
+ var sd = e => {
922
941
  const t = e.lastIndexOf("_");
923
942
  if (t > -1) {
924
943
  return e.slice(t + 1);
@@ -927,15 +946,15 @@ var Rh = e => {
927
946
  };
928
947
 
929
948
  // packages/qwik/src/server/ssr-render.ts
930
- import { getClientManifest as Qf } from "@qwik.dev/core";
949
+ import { getClientManifest as Ea } from "@qwik.dev/core";
931
950
 
932
951
  // packages/qwik/src/server/ssr-container.ts
933
952
  import { isDev as isDev8 } from "@qwik.dev/core/build";
934
953
 
935
- import { _SubscriptionData as Ti, _SharedContainer as lc, _jsxSorted as Di, _jsxSplit as Wi, _res as _, _setEvent, _walkJSX as Xn, _createQRL as xf, isSignal as lu } from "@qwik.dev/core/internal";
954
+ import { _SubscriptionData as Gs, _SharedContainer as Cc, _jsxSorted as fo, _jsxSplit as ao, _res as _, _setEvent, _walkJSX as zn, _createQRL as la, isSignal as Tu } from "@qwik.dev/core/internal";
936
955
 
937
956
  // packages/qwik/src/server/ooos-utils.ts
938
- import { _SubscriptionPatch as qu } from "@qwik.dev/core/internal";
957
+ import { _SubscriptionPatch as Ku } from "@qwik.dev/core/internal";
939
958
 
940
959
  var recordExternalRootEffect = (e, t, n, r, s, i, o, a) => {
941
960
  if (!r || o !== null && !a) {
@@ -945,11 +964,11 @@ var recordExternalRootEffect = (e, t, n, r, s, i, o, a) => {
945
964
  if (o !== null && s && (typeof s === "object" || typeof s === "function")) {
946
965
  l = n.get(s) || s;
947
966
  }
948
- const c = e.ge(l);
949
- t.St(l);
950
- t.St(i);
967
+ const c = e.Ne(l);
968
+ t.Rt(l);
969
+ t.Rt(i);
951
970
  if (o !== null && typeof o !== "string") {
952
- t.St(o);
971
+ t.Rt(o);
953
972
  }
954
973
  r.push({
955
974
  rootObj: l,
@@ -967,13 +986,13 @@ var collectSubscriptionPatches = (e, t, n) => {
967
986
  const s = /* @__PURE__ */ new Map;
968
987
  for (let i = 0; i < t.length; i++) {
969
988
  const o = t[i];
970
- const a = o.rootId === void 0 ? e.ge(o.rootObj) : o.rootId;
989
+ const a = o.rootId === void 0 ? e.Ne(o.rootObj) : o.rootId;
971
990
  if (a === void 0 || a >= n) {
972
991
  continue;
973
992
  }
974
993
  let l = s.get(a);
975
994
  if (!l) {
976
- l = new qu(a, o.prop === null ? /* @__PURE__ */ new Set : /* @__PURE__ */ new Map);
995
+ l = new Ku(a, o.prop === null ? /* @__PURE__ */ new Set : /* @__PURE__ */ new Map);
977
996
  s.set(a, l);
978
997
  r.push(l);
979
998
  }
@@ -997,7 +1016,7 @@ var collectSubscriptionPatches = (e, t, n) => {
997
1016
  };
998
1017
 
999
1018
  // packages/qwik/src/server/preload-impl.ts
1000
- import { getPlatform as Js } from "@qwik.dev/core";
1019
+ import { getPlatform as wi } from "@qwik.dev/core";
1001
1020
 
1002
1021
  var simplifyPath = (e, t) => {
1003
1022
  if (t == null) {
@@ -1017,7 +1036,7 @@ var simplifyPath = (e, t) => {
1017
1036
  };
1018
1037
 
1019
1038
  var getBase = e => {
1020
- let t = e.qe;
1039
+ let t = e.De;
1021
1040
  if (import.meta.env?.DEV && !qTest) {
1022
1041
  t = import.meta.env?.BASE_URL;
1023
1042
  }
@@ -1136,7 +1155,7 @@ var preloaderPost = (e, t, n) => {
1136
1155
  return;
1137
1156
  }
1138
1157
  if (t.preloader !== false) {
1139
- const r = Array.from(e.serializationCtx.xt);
1158
+ const r = Array.from(e.serializationCtx.It);
1140
1159
  const s = getBundles(r);
1141
1160
  includePreloader(e, t.preloader, s, n);
1142
1161
  }
@@ -1150,10 +1169,10 @@ function normalizePreLoaderOptions(e) {
1150
1169
  }
1151
1170
 
1152
1171
  var getBundles = e => {
1153
- const t = Js();
1172
+ const t = wi();
1154
1173
  const n = e?.map(e => {
1155
- const n = e.vt;
1156
- const r = e._t;
1174
+ const n = e.gt;
1175
+ const r = e.St;
1157
1176
  const s = t.chunkForSymbol(n, r, e.dev?.file);
1158
1177
  if (s) {
1159
1178
  return s[1];
@@ -1169,9 +1188,9 @@ var preLoaderOptionsDefault = {
1169
1188
  };
1170
1189
 
1171
1190
  // packages/qwik/src/server/scripts.ts
1172
- var QWIK_LOADER_DEFAULT_MINIFIED = 'const e=document,t=window,n="w",r="wp",o="d",s="dp",i="e",a="ep",c="capture:",l="readystatechange",p=0,u=new Set,d=new Set([e]),f=new Map,h={};let q,b,g;const m=(e,t)=>Array.from(e.querySelectorAll(t)),v=e=>{const t=[];return d.forEach(n=>t.push(...m(n,e))),t},w=(e,t,n,r=!1,o=!1)=>e.addEventListener(t,n,{capture:r,passive:o}),y=e=>{H(e);const t=m(e,"[q\\\\:shadowroot]");for(let e=0;e<t.length;e++){const n=t[e].shadowRoot;n&&y(n)}},A=e=>e&&"function"==typeof e.then,E=async e=>{for(let t=0;t<e.length;t++)await e[t]()},C=e=>{if(e.length){const t=()=>E(e);g=g?g.then(t,t):t()}},S=t=>{if(void 0===t._qwikjson_){let n=(t===e.documentElement?e.body:t).lastElementChild;for(;n;){if("SCRIPT"===n.tagName&&"qwik/json"===n.getAttribute("type")){t._qwikjson_=JSON.parse(n.textContent.replace(/\\\\x3C(\\/?script)/gi,"<$1"));break}n=n.previousElementSibling}}},_=e=>{h[e]=1,I(l)},k=t=>{const n=t.getAttribute("q:instance");return"paused"===t.getAttribute("q:container")&&"loading"===e.readyState&&!h[n]&&new Promise(t=>{w(e,l,()=>{("loading"!==e.readyState||h[n])&&t()})})},$=(e,t)=>new CustomEvent(e,{detail:t}),I=(t,n)=>{e.dispatchEvent($(t,n))},N=e=>e.replace(/([A-Z-])/g,e=>"-"+e.toLowerCase()),R=e=>e.replace(/-./g,e=>e[1].toUpperCase()),T=e=>{const t=e.indexOf(":");return{scope:e.slice(0,t),eventName:R(e.slice(t+1))}},x=e=>2===e.length,B=e=>e.charAt(0),L=e=>!!e&&1===e.nodeType,U=(e,t,n)=>e.hasAttribute(n)&&(!!e._qDispatch?.[t]||e.hasAttribute("q-"+t)),j=(t,n,r,o,s,i,a,c=!0)=>{const l={qBase:r,symbol:i,element:n,reqTime:a};if(!s){const n=(e["qFuncs_"+t.getAttribute("q:instance")]||[])[+i];if(!n&&c){const e=Error("sym:"+i);I("qerror",{importError:"sync",error:e,...l}),console.error(e)}return n}const p=`${i}|${r}|${s}`,u=f.get(p);if(u)return u;const d=new URL(s,o).href,h=import(d);return S(t),h.then(e=>{const t=e[i];if(t)f.set(p,t),I("qsymbol",l);else{const e=Error(`${i} not in ${d}`);I("qerror",{importError:"no-symbol",error:e,...l}),console.error(e)}return t},e=>{I("qerror",{importError:"async",error:e,...l}),console.error(e)})},D=(t,n,r,o,s,i=!0)=>{let a=!1;s&&(i&&t.hasAttribute("preventdefault:"+s)&&n.preventDefault(),t.hasAttribute("stoppropagation:"+s)&&n.stopPropagation());const c=t._qDispatch?.[r];if(c){if("function"==typeof c){const e=()=>c(n,t);if(a)o.push(async()=>{const t=e();A(t)&&await t});else{const t=e();A(t)&&(a=!0,o.push(()=>t))}}else if(c.length)for(let e=0;e<c.length;e++){const r=c[e];if(r){const e=()=>r(n,t);if(a)o.push(async()=>{const t=e();A(t)&&await t});else{const t=e();A(t)&&(a=!0,o.push(()=>t))}}}return}const l=t.getAttribute("q-"+r);if(l){const r=t.closest("[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])"),s=r.getAttribute("q:base"),i=new URL(s,e.baseURI),c=l.split("|"),p=k(r);for(let e=0;e<c.length;e++){const l=c[e],u=performance.now(),[d,f,h]=l.split("#"),q=e=>{if(e&&t.isConnected){const r=e=>{I("qerror",{error:e,qBase:s,symbol:f,element:t,reqTime:u})};try{const o=e.call(h,n,t);if(A(o))return o.catch(r)}catch(e){return r(e)}}},b=(e=!0)=>j(r,t,s,i,d,f,u,e),g=p?void 0:b();if(p)a=!0,o.push(async()=>{await p,await q(await b(!1)||await b())});else if(A(g))a=!0,o.push(()=>g.then(q));else if(a)a=!0,o.push(async()=>{await q(g||await b())});else{const e=q(g);A(e)&&(a=!0,o.push(()=>e))}}}},O=(e,t=i,n=!0)=>{const r=N(e.type),o=t+":"+r,s=c+r,a=[],l=[],p=[];let u=e.target;for(;u;)L(u)?(a.push(u),l.push(U(u,o,s)),u=u.parentElement):u=u.parentElement;for(let t=a.length-1;t>=0;t--)if(l[t]&&(D(a[t],e,o,p,r,n),e.cancelBubble))return void C(p);for(let t=0;t<a.length;t++)if(!l[t]&&(D(a[t],e,o,p,r,n),!e.bubbles||e.cancelBubble))return void C(p);C(p)},P=e=>O(e,a,!1),F=(e,t,n=!0)=>{const r=N(t.type),o=e+":"+r,s=v("[q-"+e+"\\\\:"+r+"]"),i=[];for(let e=0;e<s.length;e++){const a=s[e];D(a,t,o,i,r,n)}C(i)},J=e=>{F(o,e)},M=e=>{F(s,e,!1)},Z=e=>{F(n,e)},z=e=>{F(r,e,!1)},G=()=>{const n=e.readyState;if("interactive"==n||"complete"==n){if(b=1,d.forEach(y),u.has("d:qinit")){u.delete("d:qinit");const e=$("qinit"),t=v("[q-d\\\\:qinit]"),n=[];for(let r=0;r<t.length;r++){const o=t[r];D(o,e,"d:qinit",n),o.removeAttribute("q-d:qinit")}C(n)}if(u.has("d:qidle")&&(u.delete("d:qidle"),(t.requestIdleCallback??t.setTimeout).bind(t)(()=>{const e=$("qidle"),t=v("[q-d\\\\:qidle]"),n=[];for(let r=0;r<t.length;r++){const o=t[r];D(o,e,"d:qidle",n),o.removeAttribute("q-d:qidle")}C(n)})),u.has("e:qvisible")){q||(q=new IntersectionObserver(e=>{const t=[];for(let n=0;n<e.length;n++){const r=e[n];r.isIntersecting&&(q.unobserve(r.target),D(r.target,$("qvisible",r),"e:qvisible",t))}C(t)}));const e=v("[q-e\\\\:qvisible]:not([q\\\\:observed])");for(let t=0;t<e.length;t++){const n=e[t];q.observe(n),n.setAttribute("q:observed","true")}}}},H=(...e)=>{for(let r=0;r<e.length;r++){const s=e[r];if(0===s)_(e[++r]);else if("string"==typeof s){if(!u.has(s)){u.add(s);const{scope:e,eventName:r}=T(s),i=x(e),a=B(e);a===n?w(t,r,i?z:Z,!0,i):d.forEach(e=>w(e,r,a===o?i?M:J:i?P:O,!0,i)),1!==b||"e:qvisible"!==s&&"d:qinit"!==s&&"d:qidle"!==s||G()}}else d.has(s)||(u.forEach(e=>{const{scope:t,eventName:r}=T(e),i=x(t),a=B(t);a!==n&&w(s,r,a===o?i?M:J:i?P:O,!0,i)}),d.add(s))}},K=t._qwikEv;K?.roots||(Array.isArray(K)?H(...K):H("e:click","e:input"),t._qwikEv={events:u,roots:d,push:H},w(e,l,G),G())';
1191
+ var QWIK_LOADER_DEFAULT_MINIFIED = 'const e=document,t=window,n="w",r="wp",o="d",s="dp",i="e",a="ep",c="capture:",l="readystatechange",p=0,u=new Set,d=new Set([e]),f=new Map,h={};let q,b,g;const m=(e,t)=>Array.from(e.querySelectorAll(t)),v=e=>{const t=[];return d.forEach(n=>t.push(...m(n,e))),t},w=(e,t,n,r=!1,o=!1)=>e.addEventListener(t,n,{capture:r,passive:o}),y=e=>{H(e);const t=m(e,"[q\\\\:shadowroot]");for(let e=0;e<t.length;e++){const n=t[e].shadowRoot;n&&y(n)}},A=e=>e&&"function"==typeof e.then,E=async e=>{for(let t=0;t<e.length;t++)await e[t]()},S=e=>{if(e.length){const t=()=>E(e);g=g?g.then(t,t):t()}},C=t=>{if(void 0===t._qwikjson_){let n=(t===e.documentElement?e.body:t).lastElementChild;for(;n;){if("SCRIPT"===n.tagName&&"qwik/json"===n.getAttribute("type")){t._qwikjson_=JSON.parse(n.textContent.replace(/\\\\x3C(\\/?script)/gi,"<$1"));break}n=n.previousElementSibling}}},_=e=>{h[e]=1,I(l)},k=t=>{const n=t.getAttribute("q:instance");return"paused"===t.getAttribute("q:container")&&"loading"===e.readyState&&!h[n]&&new Promise(t=>{w(e,l,()=>{("loading"!==e.readyState||h[n])&&t()})})},$=(e,t)=>new CustomEvent(e,{detail:t}),I=(t,n)=>{e.dispatchEvent($(t,n))},N=e=>e.replace(/([A-Z-])/g,e=>"-"+e.toLowerCase()),R=e=>e.replace(/-./g,e=>e[1].toUpperCase()),T=e=>{const t=e.indexOf(":");return{scope:e.slice(0,t),eventName:R(e.slice(t+1))}},x=e=>2===e.length,B=e=>e.charAt(0),L=e=>!!e&&1===e.nodeType,U=(e,t,n)=>e.hasAttribute(n)&&(!!e._qDispatch?.[t]||e.hasAttribute("q-"+t)),j=(t,n,r,o,s,i,a,c=!0)=>{const l={qBase:r,symbol:i,element:n,reqTime:a};if(!s){const n=(e["qFuncs_"+t.getAttribute("q:instance")]||[])[+i];if(!n&&c){const e=Error("sym:"+i);I("qerror",{importError:"sync",error:e,...l}),console.error(e)}return n}const p=`${i}|${r}|${s}`,u=f.get(p);if(u)return u;const d=new URL(s,o).href,h=import(d);return C(t),h.then(e=>{const t=e[i];if(t)f.set(p,t),I("qsymbol",l);else{const e=Error(`${i} not in ${d}`);I("qerror",{importError:"no-symbol",error:e,...l}),console.error(e)}return t},e=>{I("qerror",{importError:"async",error:e,...l}),console.error(e)})},D=(t,n,r,o,s,i=!0)=>{let a=!1;s&&(i&&t.hasAttribute("preventdefault:"+s)&&n.preventDefault(),t.hasAttribute("stoppropagation:"+s)&&n.stopPropagation());const c=t._qDispatch?.[r];if(c){if("function"==typeof c){const e=()=>c(n,t);if(a)o.push(async()=>{const t=e();A(t)&&await t});else{const t=e();A(t)&&(a=!0,o.push(()=>t))}}else if(c.length)for(let e=0;e<c.length;e++){const r=c[e];if(r){const e=()=>r(n,t);if(a)o.push(async()=>{const t=e();A(t)&&await t});else{const t=e();A(t)&&(a=!0,o.push(()=>t))}}}return}const l=t.getAttribute("q-"+r);if(l){const r=t.closest("[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])"),s=r.getAttribute("q:base"),i=new URL(s,e.baseURI),c=l.split("|"),p=k(r);for(let e=0;e<c.length;e++){const l=c[e],u=performance.now(),[d,f,h]=l.split("#"),q=e=>{if(e&&t.isConnected){const r=e=>{I("qerror",{error:e,qBase:s,symbol:f,element:t,reqTime:u})};try{const o=e.call(h,n,t);if(A(o))return o.catch(r)}catch(e){return r(e)}}},b=(e=!0)=>j(r,t,s,i,d,f,u,e),g=p?void 0:b();if(p)a=!0,o.push(async()=>{await p,await q(await b(!1)||await b())});else if(A(g))a=!0,o.push(()=>g.then(q));else if(a)a=!0,o.push(async()=>{await q(g||await b())});else{const e=q(g);A(e)&&(a=!0,o.push(()=>e))}}}},O=(e,t=i,n=!0)=>{const r=N(e.type),o=t+":"+r,s=c+r,a=[],l=[],p=[];let u=e.target;for(;u;)L(u)?(a.push(u),l.push(U(u,o,s)),u=u.parentElement):u=u.parentElement;for(let t=a.length-1;t>=0;t--)if(l[t]&&(D(a[t],e,o,p,r,n),e.cancelBubble))return void S(p);for(let t=0;t<a.length;t++)if(!l[t]&&(D(a[t],e,o,p,r,n),!e.bubbles||e.cancelBubble))return void S(p);S(p)},P=e=>O(e,a,!1),F=(e,t,n=!0)=>{const r=N(t.type),o=e+":"+r,s=v("[q-"+CSS.escape(o)+"]"),i=[];for(let e=0;e<s.length;e++){const a=s[e];D(a,t,o,i,r,n)}S(i)},J=e=>{F(o,e)},M=e=>{F(s,e,!1)},Z=e=>{F(n,e)},z=e=>{F(r,e,!1)},G=()=>{const n=e.readyState;if("interactive"==n||"complete"==n){if(b=1,d.forEach(y),u.has("d:qinit")){u.delete("d:qinit");const e=$("qinit"),t=v("[q-d\\\\:qinit]"),n=[];for(let r=0;r<t.length;r++){const o=t[r];D(o,e,"d:qinit",n),o.removeAttribute("q-d:qinit")}S(n)}if(u.has("d:qidle")&&(u.delete("d:qidle"),(t.requestIdleCallback??t.setTimeout).bind(t)(()=>{const e=$("qidle"),t=v("[q-d\\\\:qidle]"),n=[];for(let r=0;r<t.length;r++){const o=t[r];D(o,e,"d:qidle",n),o.removeAttribute("q-d:qidle")}S(n)})),u.has("e:qvisible")){q||(q=new IntersectionObserver(e=>{const t=[];for(let n=0;n<e.length;n++){const r=e[n];r.isIntersecting&&(q.unobserve(r.target),D(r.target,$("qvisible",r),"e:qvisible",t))}S(t)}));const e=v("[q-e\\\\:qvisible]:not([q\\\\:observed])");for(let t=0;t<e.length;t++){const n=e[t];q.observe(n),n.setAttribute("q:observed","true")}}}},H=(...e)=>{for(let r=0;r<e.length;r++){const s=e[r];if(0===s)_(e[++r]);else if("string"==typeof s){if(!u.has(s)){u.add(s);const{scope:e,eventName:r}=T(s),i=x(e),a=B(e);a===n?w(t,r,i?z:Z,!0,i):d.forEach(e=>w(e,r,a===o?i?M:J:i?P:O,!0,i)),1!==b||"e:qvisible"!==s&&"d:qinit"!==s&&"d:qidle"!==s||G()}}else d.has(s)||(u.forEach(e=>{const{scope:t,eventName:r}=T(e),i=x(t),a=B(t);a!==n&&w(s,r,a===o?i?M:J:i?P:O,!0,i)}),d.add(s))}},K=t._qwikEv;K?.roots||(Array.isArray(K)?H(...K):H("e:click","e:input"),t._qwikEv={events:u,roots:d,push:H},w(e,l,G),G())';
1173
1192
 
1174
- var QWIK_LOADER_DEFAULT_DEBUG = 'const doc = document;\nconst win = window;\nconst windowPrefix = "w";\nconst passiveWindowPrefix = "wp";\nconst documentPrefix = "d";\nconst passiveDocumentPrefix = "dp";\nconst elementPrefix = "e";\nconst passiveElementPrefix = "ep";\nconst capturePrefix = "capture:";\nconst readyStateChange = "readystatechange";\nconst QwikEvContainerReady = 0;\nconst events = /* @__PURE__ */ new Set();\nconst roots = /* @__PURE__ */ new Set([doc]);\nconst symbols = /* @__PURE__ */ new Map();\nconst readyContainers = {};\nlet observer;\nlet hasInitialized;\nlet queuedTasks;\nconst nativeQuerySelectorAll = (root, selector) => Array.from(root.querySelectorAll(selector));\nconst querySelectorAll = (query) => {\n const elements = [];\n roots.forEach((root) => elements.push(...nativeQuerySelectorAll(root, query)));\n return elements;\n};\nconst addEventListener = (el, eventName, handler, capture = false, passive = false) => el.addEventListener(eventName, handler, { capture, passive });\nconst findShadowRoots = (fragment) => {\n addEventOrRoot(fragment);\n const shadowRoots = nativeQuerySelectorAll(fragment, "[q\\\\:shadowroot]");\n for (let i = 0; i < shadowRoots.length; i++) {\n const parent = shadowRoots[i];\n const shadowRoot = parent.shadowRoot;\n shadowRoot && findShadowRoots(shadowRoot);\n }\n};\nconst isPromise = (promise) => promise && typeof promise.then === "function";\nconst runTasks = async (tasks) => {\n for (let i = 0; i < tasks.length; i++) {\n await tasks[i]();\n }\n};\nconst queueTasks = (tasks) => {\n if (tasks.length) {\n const run = () => runTasks(tasks);\n queuedTasks = queuedTasks ? queuedTasks.then(run, run) : run();\n }\n};\nconst resolveContainer = (containerEl) => {\n if (containerEl._qwikjson_ === void 0) {\n const parentJSON = containerEl === doc.documentElement ? doc.body : containerEl;\n let script = parentJSON.lastElementChild;\n while (script) {\n if (script.tagName === "SCRIPT" && script.getAttribute("type") === "qwik/json") {\n containerEl._qwikjson_ = JSON.parse(\n script.textContent.replace(/\\\\x3C(\\/?script)/gi, "<$1")\n );\n break;\n }\n script = script.previousElementSibling;\n }\n }\n};\nconst markContainerReady = (hash) => {\n readyContainers[hash] = 1;\n emitEvent(readyStateChange);\n};\nconst waitForContainerReady = (container) => {\n const hash = container.getAttribute("q:instance");\n return container.getAttribute("q:container") === "paused" && doc.readyState === "loading" && !readyContainers[hash] && new Promise((resolve) => {\n const ready = () => {\n if (doc.readyState !== "loading" || readyContainers[hash]) {\n resolve();\n }\n };\n addEventListener(doc, readyStateChange, ready);\n });\n};\nconst createEvent = (eventName, detail) => new CustomEvent(eventName, { detail });\nconst emitEvent = (eventName, detail) => {\n doc.dispatchEvent(createEvent(eventName, detail));\n};\nconst camelToKebab = (str) => str.replace(/([A-Z-])/g, (a) => "-" + a.toLowerCase());\nconst kebabToCamel = (eventName) => eventName.replace(/-./g, (a) => a[1].toUpperCase());\nconst parseKebabEvent = (event) => {\n const separatorIndex = event.indexOf(":");\n const scope = event.slice(0, separatorIndex);\n return {\n scope,\n eventName: kebabToCamel(event.slice(separatorIndex + 1))\n };\n};\nconst isPassiveScope = (scope) => scope.length === 2;\nconst getRootScope = (scope) => scope.charAt(0);\nconst isElementNode = (node) => !!node && node.nodeType === 1;\nconst isCaptureHandlerElement = (element, scopedKebabName, captureAttribute) => element.hasAttribute(captureAttribute) && (!!element._qDispatch?.[scopedKebabName] || element.hasAttribute("q-" + scopedKebabName));\nconst resolveHandler = (container, element, qBase, base, chunk, symbol, reqTime, reportSyncError = true) => {\n const eventData = {\n qBase,\n symbol,\n element,\n reqTime\n };\n if (!chunk) {\n const handler2 = (doc["qFuncs_" + container.getAttribute("q:instance")] || [])[+symbol];\n if (!handler2 && reportSyncError) {\n const error = new Error("sym:" + symbol);\n emitEvent("qerror", {\n importError: "sync",\n error,\n ...eventData\n });\n console.error(error);\n }\n return handler2;\n }\n const key = `${symbol}|${qBase}|${chunk}`;\n const handler = symbols.get(key);\n if (handler) {\n return handler;\n }\n const href = new URL(chunk, base).href;\n const module = import(\n href\n );\n resolveContainer(container);\n return module.then(\n (module2) => {\n const handler2 = module2[symbol];\n if (!handler2) {\n const error = new Error(`${symbol} not in ${href}`);\n emitEvent("qerror", {\n importError: "no-symbol",\n error,\n ...eventData\n });\n console.error(error);\n } else {\n symbols.set(key, handler2);\n emitEvent("qsymbol", eventData);\n }\n return handler2;\n },\n (error) => {\n emitEvent("qerror", {\n importError: "async",\n error,\n ...eventData\n });\n console.error(error);\n return void 0;\n }\n );\n};\nconst dispatch = (element, ev, scopedKebabName, tasks, kebabName, allowPreventDefault = true) => {\n let defer = false;\n if (kebabName) {\n if (allowPreventDefault && element.hasAttribute("preventdefault:" + kebabName)) {\n ev.preventDefault();\n }\n if (element.hasAttribute("stoppropagation:" + kebabName)) {\n ev.stopPropagation();\n }\n }\n const handlers = element._qDispatch?.[scopedKebabName];\n if (handlers) {\n if (typeof handlers === "function") {\n const run = () => handlers(ev, element);\n if (defer) {\n tasks.push(async () => {\n const result = run();\n if (isPromise(result)) {\n await result;\n }\n });\n } else {\n const result = run();\n if (isPromise(result)) {\n defer = true;\n tasks.push(() => result);\n }\n }\n } else if (handlers.length) {\n for (let i = 0; i < handlers.length; i++) {\n const handler = handlers[i];\n if (handler) {\n const run = () => handler(ev, element);\n if (defer) {\n tasks.push(async () => {\n const result = run();\n if (isPromise(result)) {\n await result;\n }\n });\n } else {\n const result = run();\n if (isPromise(result)) {\n defer = true;\n tasks.push(() => result);\n }\n }\n }\n }\n }\n return;\n }\n const attrValue = element.getAttribute("q-" + scopedKebabName);\n if (attrValue) {\n const container = element.closest(\n "[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])"\n );\n const qBase = container.getAttribute("q:base");\n const base = new URL(qBase, doc.baseURI);\n const qrls = attrValue.split("|");\n const waitForReady = waitForContainerReady(container);\n for (let i = 0; i < qrls.length; i++) {\n const qrl = qrls[i];\n const reqTime = performance.now();\n const [chunk, symbol, capturedIds] = qrl.split("#");\n const run = (handler2) => {\n if (handler2 && element.isConnected) {\n const onError = (error) => {\n emitEvent("qerror", {\n error,\n qBase,\n symbol,\n element,\n reqTime\n });\n };\n try {\n const result = handler2.call(capturedIds, ev, element);\n if (isPromise(result)) {\n return result.catch(onError);\n }\n } catch (error) {\n return onError(error);\n }\n }\n };\n const resolve = (reportSyncError = true) => resolveHandler(container, element, qBase, base, chunk, symbol, reqTime, reportSyncError);\n const handler = waitForReady ? void 0 : resolve();\n if (waitForReady) {\n defer = true;\n tasks.push(async () => {\n await waitForReady;\n await run(await resolve(false) || await resolve());\n });\n } else if (isPromise(handler)) {\n defer = true;\n tasks.push(() => handler.then(run));\n } else if (defer) {\n defer = true;\n tasks.push(async () => {\n await run(handler || await resolve());\n });\n } else {\n const result = run(handler);\n if (isPromise(result)) {\n defer = true;\n tasks.push(() => result);\n }\n }\n }\n }\n};\nconst processElementEvent = (ev, scope = elementPrefix, allowPreventDefault = true) => {\n const kebabName = camelToKebab(ev.type);\n const scopedKebabName = scope + ":" + kebabName;\n const captureAttribute = capturePrefix + kebabName;\n const elements = [];\n const captureHandlers = [];\n const tasks = [];\n let current = ev.target;\n while (current) {\n if (isElementNode(current)) {\n elements.push(current);\n captureHandlers.push(isCaptureHandlerElement(current, scopedKebabName, captureAttribute));\n current = current.parentElement;\n } else {\n current = current.parentElement;\n }\n }\n for (let i = elements.length - 1; i >= 0; i--) {\n if (captureHandlers[i]) {\n dispatch(elements[i], ev, scopedKebabName, tasks, kebabName, allowPreventDefault);\n if (ev.cancelBubble) {\n queueTasks(tasks);\n return;\n }\n }\n }\n for (let i = 0; i < elements.length; i++) {\n if (!captureHandlers[i]) {\n dispatch(elements[i], ev, scopedKebabName, tasks, kebabName, allowPreventDefault);\n if (!ev.bubbles || ev.cancelBubble) {\n queueTasks(tasks);\n return;\n }\n }\n }\n queueTasks(tasks);\n};\nconst processPassiveElementEvent = (ev) => processElementEvent(ev, passiveElementPrefix, false);\nconst broadcast = (scope, ev, allowPreventDefault = true) => {\n const kebabName = camelToKebab(ev.type);\n const scopedKebabName = scope + ":" + kebabName;\n const elements = querySelectorAll("[q-" + scope + "\\\\:" + kebabName + "]");\n const tasks = [];\n for (let i = 0; i < elements.length; i++) {\n const el = elements[i];\n dispatch(el, ev, scopedKebabName, tasks, kebabName, allowPreventDefault);\n }\n queueTasks(tasks);\n};\nconst processDocumentEvent = (ev) => {\n broadcast(documentPrefix, ev);\n};\nconst processPassiveDocumentEvent = (ev) => {\n broadcast(passiveDocumentPrefix, ev, false);\n};\nconst processWindowEvent = (ev) => {\n broadcast(windowPrefix, ev);\n};\nconst processPassiveWindowEvent = (ev) => {\n broadcast(passiveWindowPrefix, ev, false);\n};\nconst processReadyStateChange = () => {\n const readyState = doc.readyState;\n if (readyState == "interactive" || readyState == "complete") {\n hasInitialized = 1;\n roots.forEach(findShadowRoots);\n if (events.has("d:qinit")) {\n events.delete("d:qinit");\n const ev = createEvent("qinit");\n const elements = querySelectorAll("[q-d\\\\:qinit]");\n const tasks = [];\n for (let i = 0; i < elements.length; i++) {\n const el = elements[i];\n dispatch(el, ev, "d:qinit", tasks);\n el.removeAttribute("q-d:qinit");\n }\n queueTasks(tasks);\n }\n if (events.has("d:qidle")) {\n events.delete("d:qidle");\n const riC = win.requestIdleCallback ?? win.setTimeout;\n riC.bind(win)(() => {\n const ev = createEvent("qidle");\n const elements = querySelectorAll("[q-d\\\\:qidle]");\n const tasks = [];\n for (let i = 0; i < elements.length; i++) {\n const el = elements[i];\n dispatch(el, ev, "d:qidle", tasks);\n el.removeAttribute("q-d:qidle");\n }\n queueTasks(tasks);\n });\n }\n if (events.has("e:qvisible")) {\n observer || (observer = new IntersectionObserver((entries) => {\n const tasks = [];\n for (let i = 0; i < entries.length; i++) {\n const entry = entries[i];\n if (entry.isIntersecting) {\n observer.unobserve(entry.target);\n dispatch(\n entry.target,\n createEvent("qvisible", entry),\n "e:qvisible",\n tasks\n );\n }\n }\n queueTasks(tasks);\n }));\n const elements = querySelectorAll("[q-e\\\\:qvisible]:not([q\\\\:observed])");\n for (let i = 0; i < elements.length; i++) {\n const el = elements[i];\n observer.observe(el);\n el.setAttribute("q:observed", "true");\n }\n }\n }\n};\nconst addEventOrRoot = (...eventNames) => {\n for (let i = 0; i < eventNames.length; i++) {\n const eventNameOrRoot = eventNames[i];\n if (eventNameOrRoot === QwikEvContainerReady) {\n markContainerReady(eventNames[++i]);\n } else if (typeof eventNameOrRoot === "string") {\n if (!events.has(eventNameOrRoot)) {\n events.add(eventNameOrRoot);\n const { scope, eventName } = parseKebabEvent(eventNameOrRoot);\n const passive = isPassiveScope(scope);\n const rootScope = getRootScope(scope);\n if (rootScope === windowPrefix) {\n addEventListener(\n win,\n eventName,\n passive ? processPassiveWindowEvent : processWindowEvent,\n true,\n passive\n );\n } else {\n roots.forEach(\n (root) => addEventListener(\n root,\n eventName,\n rootScope === documentPrefix ? passive ? processPassiveDocumentEvent : processDocumentEvent : passive ? processPassiveElementEvent : processElementEvent,\n true,\n passive\n )\n );\n }\n if (hasInitialized === 1 && (eventNameOrRoot === "e:qvisible" || eventNameOrRoot === "d:qinit" || eventNameOrRoot === "d:qidle")) {\n processReadyStateChange();\n }\n }\n } else {\n if (!roots.has(eventNameOrRoot)) {\n events.forEach((kebabEventName) => {\n const { scope, eventName } = parseKebabEvent(kebabEventName);\n const passive = isPassiveScope(scope);\n const rootScope = getRootScope(scope);\n if (rootScope !== windowPrefix) {\n addEventListener(\n eventNameOrRoot,\n eventName,\n rootScope === documentPrefix ? passive ? processPassiveDocumentEvent : processDocumentEvent : passive ? processPassiveElementEvent : processElementEvent,\n true,\n passive\n );\n }\n });\n roots.add(eventNameOrRoot);\n }\n }\n }\n};\nconst _qwikEv = win._qwikEv;\nif (!_qwikEv?.roots) {\n if (Array.isArray(_qwikEv)) {\n addEventOrRoot(..._qwikEv);\n } else {\n addEventOrRoot("e:click", "e:input");\n }\n win._qwikEv = {\n events,\n roots,\n push: addEventOrRoot\n };\n addEventListener(doc, readyStateChange, processReadyStateChange);\n processReadyStateChange();\n}';
1193
+ var QWIK_LOADER_DEFAULT_DEBUG = 'const doc = document;\nconst win = window;\nconst windowPrefix = "w";\nconst passiveWindowPrefix = "wp";\nconst documentPrefix = "d";\nconst passiveDocumentPrefix = "dp";\nconst elementPrefix = "e";\nconst passiveElementPrefix = "ep";\nconst capturePrefix = "capture:";\nconst readyStateChange = "readystatechange";\nconst QwikEvContainerReady = 0;\nconst events = /* @__PURE__ */ new Set();\nconst roots = /* @__PURE__ */ new Set([doc]);\nconst symbols = /* @__PURE__ */ new Map();\nconst readyContainers = {};\nlet observer;\nlet hasInitialized;\nlet queuedTasks;\nconst nativeQuerySelectorAll = (root, selector) => Array.from(root.querySelectorAll(selector));\nconst querySelectorAll = (query) => {\n const elements = [];\n roots.forEach((root) => elements.push(...nativeQuerySelectorAll(root, query)));\n return elements;\n};\nconst addEventListener = (el, eventName, handler, capture = false, passive = false) => el.addEventListener(eventName, handler, { capture, passive });\nconst findShadowRoots = (fragment) => {\n addEventOrRoot(fragment);\n const shadowRoots = nativeQuerySelectorAll(fragment, "[q\\\\:shadowroot]");\n for (let i = 0; i < shadowRoots.length; i++) {\n const parent = shadowRoots[i];\n const shadowRoot = parent.shadowRoot;\n shadowRoot && findShadowRoots(shadowRoot);\n }\n};\nconst isPromise = (promise) => promise && typeof promise.then === "function";\nconst runTasks = async (tasks) => {\n for (let i = 0; i < tasks.length; i++) {\n await tasks[i]();\n }\n};\nconst queueTasks = (tasks) => {\n if (tasks.length) {\n const run = () => runTasks(tasks);\n queuedTasks = queuedTasks ? queuedTasks.then(run, run) : run();\n }\n};\nconst resolveContainer = (containerEl) => {\n if (containerEl._qwikjson_ === void 0) {\n const parentJSON = containerEl === doc.documentElement ? doc.body : containerEl;\n let script = parentJSON.lastElementChild;\n while (script) {\n if (script.tagName === "SCRIPT" && script.getAttribute("type") === "qwik/json") {\n containerEl._qwikjson_ = JSON.parse(\n script.textContent.replace(/\\\\x3C(\\/?script)/gi, "<$1")\n );\n break;\n }\n script = script.previousElementSibling;\n }\n }\n};\nconst markContainerReady = (hash) => {\n readyContainers[hash] = 1;\n emitEvent(readyStateChange);\n};\nconst waitForContainerReady = (container) => {\n const hash = container.getAttribute("q:instance");\n return container.getAttribute("q:container") === "paused" && doc.readyState === "loading" && !readyContainers[hash] && new Promise((resolve) => {\n const ready = () => {\n if (doc.readyState !== "loading" || readyContainers[hash]) {\n resolve();\n }\n };\n addEventListener(doc, readyStateChange, ready);\n });\n};\nconst createEvent = (eventName, detail) => new CustomEvent(eventName, { detail });\nconst emitEvent = (eventName, detail) => {\n doc.dispatchEvent(createEvent(eventName, detail));\n};\nconst camelToKebab = (str) => str.replace(/([A-Z-])/g, (a) => "-" + a.toLowerCase());\nconst kebabToCamel = (eventName) => eventName.replace(/-./g, (a) => a[1].toUpperCase());\nconst parseKebabEvent = (event) => {\n const separatorIndex = event.indexOf(":");\n const scope = event.slice(0, separatorIndex);\n return {\n scope,\n eventName: kebabToCamel(event.slice(separatorIndex + 1))\n };\n};\nconst isPassiveScope = (scope) => scope.length === 2;\nconst getRootScope = (scope) => scope.charAt(0);\nconst isElementNode = (node) => !!node && node.nodeType === 1;\nconst isCaptureHandlerElement = (element, scopedKebabName, captureAttribute) => element.hasAttribute(captureAttribute) && (!!element._qDispatch?.[scopedKebabName] || element.hasAttribute("q-" + scopedKebabName));\nconst resolveHandler = (container, element, qBase, base, chunk, symbol, reqTime, reportSyncError = true) => {\n const eventData = {\n qBase,\n symbol,\n element,\n reqTime\n };\n if (!chunk) {\n const handler2 = (doc["qFuncs_" + container.getAttribute("q:instance")] || [])[+symbol];\n if (!handler2 && reportSyncError) {\n const error = new Error("sym:" + symbol);\n emitEvent("qerror", {\n importError: "sync",\n error,\n ...eventData\n });\n console.error(error);\n }\n return handler2;\n }\n const key = `${symbol}|${qBase}|${chunk}`;\n const handler = symbols.get(key);\n if (handler) {\n return handler;\n }\n const href = new URL(chunk, base).href;\n const module = import(\n href\n );\n resolveContainer(container);\n return module.then(\n (module2) => {\n const handler2 = module2[symbol];\n if (!handler2) {\n const error = new Error(`${symbol} not in ${href}`);\n emitEvent("qerror", {\n importError: "no-symbol",\n error,\n ...eventData\n });\n console.error(error);\n } else {\n symbols.set(key, handler2);\n emitEvent("qsymbol", eventData);\n }\n return handler2;\n },\n (error) => {\n emitEvent("qerror", {\n importError: "async",\n error,\n ...eventData\n });\n console.error(error);\n return void 0;\n }\n );\n};\nconst dispatch = (element, ev, scopedKebabName, tasks, kebabName, allowPreventDefault = true) => {\n let defer = false;\n if (kebabName) {\n if (allowPreventDefault && element.hasAttribute("preventdefault:" + kebabName)) {\n ev.preventDefault();\n }\n if (element.hasAttribute("stoppropagation:" + kebabName)) {\n ev.stopPropagation();\n }\n }\n const handlers = element._qDispatch?.[scopedKebabName];\n if (handlers) {\n if (typeof handlers === "function") {\n const run = () => handlers(ev, element);\n if (defer) {\n tasks.push(async () => {\n const result = run();\n if (isPromise(result)) {\n await result;\n }\n });\n } else {\n const result = run();\n if (isPromise(result)) {\n defer = true;\n tasks.push(() => result);\n }\n }\n } else if (handlers.length) {\n for (let i = 0; i < handlers.length; i++) {\n const handler = handlers[i];\n if (handler) {\n const run = () => handler(ev, element);\n if (defer) {\n tasks.push(async () => {\n const result = run();\n if (isPromise(result)) {\n await result;\n }\n });\n } else {\n const result = run();\n if (isPromise(result)) {\n defer = true;\n tasks.push(() => result);\n }\n }\n }\n }\n }\n return;\n }\n const attrValue = element.getAttribute("q-" + scopedKebabName);\n if (attrValue) {\n const container = element.closest(\n "[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])"\n );\n const qBase = container.getAttribute("q:base");\n const base = new URL(qBase, doc.baseURI);\n const qrls = attrValue.split("|");\n const waitForReady = waitForContainerReady(container);\n for (let i = 0; i < qrls.length; i++) {\n const qrl = qrls[i];\n const reqTime = performance.now();\n const [chunk, symbol, capturedIds] = qrl.split("#");\n const run = (handler2) => {\n if (handler2 && element.isConnected) {\n const onError = (error) => {\n emitEvent("qerror", {\n error,\n qBase,\n symbol,\n element,\n reqTime\n });\n };\n try {\n const result = handler2.call(capturedIds, ev, element);\n if (isPromise(result)) {\n return result.catch(onError);\n }\n } catch (error) {\n return onError(error);\n }\n }\n };\n const resolve = (reportSyncError = true) => resolveHandler(container, element, qBase, base, chunk, symbol, reqTime, reportSyncError);\n const handler = waitForReady ? void 0 : resolve();\n if (waitForReady) {\n defer = true;\n tasks.push(async () => {\n await waitForReady;\n await run(await resolve(false) || await resolve());\n });\n } else if (isPromise(handler)) {\n defer = true;\n tasks.push(() => handler.then(run));\n } else if (defer) {\n defer = true;\n tasks.push(async () => {\n await run(handler || await resolve());\n });\n } else {\n const result = run(handler);\n if (isPromise(result)) {\n defer = true;\n tasks.push(() => result);\n }\n }\n }\n }\n};\nconst processElementEvent = (ev, scope = elementPrefix, allowPreventDefault = true) => {\n const kebabName = camelToKebab(ev.type);\n const scopedKebabName = scope + ":" + kebabName;\n const captureAttribute = capturePrefix + kebabName;\n const elements = [];\n const captureHandlers = [];\n const tasks = [];\n let current = ev.target;\n while (current) {\n if (isElementNode(current)) {\n elements.push(current);\n captureHandlers.push(isCaptureHandlerElement(current, scopedKebabName, captureAttribute));\n current = current.parentElement;\n } else {\n current = current.parentElement;\n }\n }\n for (let i = elements.length - 1; i >= 0; i--) {\n if (captureHandlers[i]) {\n dispatch(elements[i], ev, scopedKebabName, tasks, kebabName, allowPreventDefault);\n if (ev.cancelBubble) {\n queueTasks(tasks);\n return;\n }\n }\n }\n for (let i = 0; i < elements.length; i++) {\n if (!captureHandlers[i]) {\n dispatch(elements[i], ev, scopedKebabName, tasks, kebabName, allowPreventDefault);\n if (!ev.bubbles || ev.cancelBubble) {\n queueTasks(tasks);\n return;\n }\n }\n }\n queueTasks(tasks);\n};\nconst processPassiveElementEvent = (ev) => processElementEvent(ev, passiveElementPrefix, false);\nconst broadcast = (scope, ev, allowPreventDefault = true) => {\n const kebabName = camelToKebab(ev.type);\n const scopedKebabName = scope + ":" + kebabName;\n const elements = querySelectorAll("[q-" + CSS.escape(scopedKebabName) + "]");\n const tasks = [];\n for (let i = 0; i < elements.length; i++) {\n const el = elements[i];\n dispatch(el, ev, scopedKebabName, tasks, kebabName, allowPreventDefault);\n }\n queueTasks(tasks);\n};\nconst processDocumentEvent = (ev) => {\n broadcast(documentPrefix, ev);\n};\nconst processPassiveDocumentEvent = (ev) => {\n broadcast(passiveDocumentPrefix, ev, false);\n};\nconst processWindowEvent = (ev) => {\n broadcast(windowPrefix, ev);\n};\nconst processPassiveWindowEvent = (ev) => {\n broadcast(passiveWindowPrefix, ev, false);\n};\nconst processReadyStateChange = () => {\n const readyState = doc.readyState;\n if (readyState == "interactive" || readyState == "complete") {\n hasInitialized = 1;\n roots.forEach(findShadowRoots);\n if (events.has("d:qinit")) {\n events.delete("d:qinit");\n const ev = createEvent("qinit");\n const elements = querySelectorAll("[q-d\\\\:qinit]");\n const tasks = [];\n for (let i = 0; i < elements.length; i++) {\n const el = elements[i];\n dispatch(el, ev, "d:qinit", tasks);\n el.removeAttribute("q-d:qinit");\n }\n queueTasks(tasks);\n }\n if (events.has("d:qidle")) {\n events.delete("d:qidle");\n const riC = win.requestIdleCallback ?? win.setTimeout;\n riC.bind(win)(() => {\n const ev = createEvent("qidle");\n const elements = querySelectorAll("[q-d\\\\:qidle]");\n const tasks = [];\n for (let i = 0; i < elements.length; i++) {\n const el = elements[i];\n dispatch(el, ev, "d:qidle", tasks);\n el.removeAttribute("q-d:qidle");\n }\n queueTasks(tasks);\n });\n }\n if (events.has("e:qvisible")) {\n observer || (observer = new IntersectionObserver((entries) => {\n const tasks = [];\n for (let i = 0; i < entries.length; i++) {\n const entry = entries[i];\n if (entry.isIntersecting) {\n observer.unobserve(entry.target);\n dispatch(\n entry.target,\n createEvent("qvisible", entry),\n "e:qvisible",\n tasks\n );\n }\n }\n queueTasks(tasks);\n }));\n const elements = querySelectorAll("[q-e\\\\:qvisible]:not([q\\\\:observed])");\n for (let i = 0; i < elements.length; i++) {\n const el = elements[i];\n observer.observe(el);\n el.setAttribute("q:observed", "true");\n }\n }\n }\n};\nconst addEventOrRoot = (...eventNames) => {\n for (let i = 0; i < eventNames.length; i++) {\n const eventNameOrRoot = eventNames[i];\n if (eventNameOrRoot === QwikEvContainerReady) {\n markContainerReady(eventNames[++i]);\n } else if (typeof eventNameOrRoot === "string") {\n if (!events.has(eventNameOrRoot)) {\n events.add(eventNameOrRoot);\n const { scope, eventName } = parseKebabEvent(eventNameOrRoot);\n const passive = isPassiveScope(scope);\n const rootScope = getRootScope(scope);\n if (rootScope === windowPrefix) {\n addEventListener(\n win,\n eventName,\n passive ? processPassiveWindowEvent : processWindowEvent,\n true,\n passive\n );\n } else {\n roots.forEach(\n (root) => addEventListener(\n root,\n eventName,\n rootScope === documentPrefix ? passive ? processPassiveDocumentEvent : processDocumentEvent : passive ? processPassiveElementEvent : processElementEvent,\n true,\n passive\n )\n );\n }\n if (hasInitialized === 1 && (eventNameOrRoot === "e:qvisible" || eventNameOrRoot === "d:qinit" || eventNameOrRoot === "d:qidle")) {\n processReadyStateChange();\n }\n }\n } else {\n if (!roots.has(eventNameOrRoot)) {\n events.forEach((kebabEventName) => {\n const { scope, eventName } = parseKebabEvent(kebabEventName);\n const passive = isPassiveScope(scope);\n const rootScope = getRootScope(scope);\n if (rootScope !== windowPrefix) {\n addEventListener(\n eventNameOrRoot,\n eventName,\n rootScope === documentPrefix ? passive ? processPassiveDocumentEvent : processDocumentEvent : passive ? processPassiveElementEvent : processElementEvent,\n true,\n passive\n );\n }\n });\n roots.add(eventNameOrRoot);\n }\n }\n }\n};\nconst _qwikEv = win._qwikEv;\nif (!_qwikEv?.roots) {\n if (Array.isArray(_qwikEv)) {\n addEventOrRoot(..._qwikEv);\n } else {\n addEventOrRoot("e:click", "e:input");\n }\n win._qwikEv = {\n events,\n roots,\n push: addEventOrRoot\n };\n addEventListener(doc, readyStateChange, processReadyStateChange);\n processReadyStateChange();\n}';
1175
1194
 
1176
1195
  var QWIK_BACKPATCH_EXECUTOR_MINIFIED = `const t='script[type="qwik/backpatch"]';function e(e,n){const o=n||e.querySelector("[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])");if(o){const n=o.querySelectorAll(t),r=n[n.length-1];if(r){const t=JSON.parse(r.textContent||"[]"),n=e.createTreeWalker(o,NodeFilter.SHOW_ELEMENT);let c=n.currentNode,i=c.hasAttribute(":")?0:-1;for(let e=0;e<t.length;e+=3){const o=t[e],r=t[e+1];let l=t[e+2];for(;i<o&&(c=n.nextNode(),c);)c.hasAttribute(":")&&i++;const s=c;null==l||!1===l?s.removeAttribute(r):("boolean"==typeof l&&(l=""),s.setAttribute(r,l))}}}}const n=document.currentScript;if(n){const t=n.closest("[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])");t&&e(document,t)}`;
1177
1196
 
@@ -1206,7 +1225,7 @@ function getQwikOutOfOrderExecutorScript(e = {}) {
1206
1225
  }
1207
1226
 
1208
1227
  // packages/qwik/src/server/ssr-node.ts
1209
- import { _isJSXNode as Ai, _EMPTY_OBJ, _EFFECT_BACK_REF as _r } from "@qwik.dev/core/internal";
1228
+ import { _isJSXNode as to, _EMPTY_OBJ, _EFFECT_BACK_REF as Vi } from "@qwik.dev/core/internal";
1210
1229
 
1211
1230
  import { isDev as isDev7 } from "@qwik.dev/core/build";
1212
1231
 
@@ -1225,6 +1244,11 @@ var SsrNode = class {
1225
1244
  throw new Error(`Invalid SSR node id: ${t}`);
1226
1245
  }
1227
1246
  }
1247
+ parentComponent;
1248
+ attributesIndex;
1249
+ cleanupQueue;
1250
+ vnodeData;
1251
+ currentFile;
1228
1252
  __brand__="SsrNode";
1229
1253
  /**
1230
1254
  * ID which the deserialize will use to retrieve the node.
@@ -1238,19 +1262,19 @@ var SsrNode = class {
1238
1262
  attrs;
1239
1263
  /** Local props which don't serialize; */
1240
1264
  localProps=null;
1241
- get [_r]() {
1242
- return this.getProp(Qe);
1265
+ get [Vi]() {
1266
+ return this.getProp(wr);
1243
1267
  }
1244
1268
  setProp(e, t) {
1245
1269
  if (this.attrs === _EMPTY_OBJ) {
1246
1270
  this.setEmptyArrayAsVNodeDataAttributes();
1247
1271
  }
1248
- if (e.startsWith(ws)) {
1272
+ if (e.startsWith(Dr)) {
1249
1273
  (this.localProps ||= {})[e] = t;
1250
1274
  } else {
1251
1275
  this.attrs[e] = t;
1252
1276
  }
1253
- if (e == ps && t) {
1277
+ if (e == Or && t) {
1254
1278
  this.cleanupQueue.push(t);
1255
1279
  }
1256
1280
  }
@@ -1266,14 +1290,14 @@ var SsrNode = class {
1266
1290
  }
1267
1291
  }
1268
1292
  getProp(e) {
1269
- if (e.startsWith(ws)) {
1293
+ if (e.startsWith(Dr)) {
1270
1294
  return this.localProps ? this.localProps[e] ?? null : null;
1271
1295
  } else {
1272
1296
  return this.attrs[e] ?? null;
1273
1297
  }
1274
1298
  }
1275
1299
  removeProp(e) {
1276
- if (e.startsWith(ws)) {
1300
+ if (e.startsWith(Dr)) {
1277
1301
  if (this.localProps) {
1278
1302
  delete this.localProps[e];
1279
1303
  }
@@ -1316,8 +1340,9 @@ var SsrNode = class {
1316
1340
 
1317
1341
  var DomRef = class {
1318
1342
  constructor(e) {
1319
- this.ne = e;
1343
+ this.he = e;
1320
1344
  }
1345
+ he;
1321
1346
  __brand__="DomRef";
1322
1347
  };
1323
1348
 
@@ -1325,6 +1350,7 @@ var SsrComponentFrame = class {
1325
1350
  constructor(e) {
1326
1351
  this.componentNode = e;
1327
1352
  }
1353
+ componentNode;
1328
1354
  slots=[];
1329
1355
  projectionDepth=0;
1330
1356
  scopedStyleIds=/* @__PURE__ */ new Set;
@@ -1333,14 +1359,14 @@ var SsrComponentFrame = class {
1333
1359
  distributeChildrenIntoSlots(e, t, n) {
1334
1360
  this.projectionScopedStyle = t;
1335
1361
  this.projectionComponentFrame = n;
1336
- if (Ai(e)) {
1362
+ if (to(e)) {
1337
1363
  const t = this.getSlotName(e);
1338
- _e(this.slots, t, e, 0);
1364
+ We(this.slots, t, e, 0);
1339
1365
  } else if (Array.isArray(e) && e.length > 0) {
1340
1366
  const t = [];
1341
1367
  for (let n = 0; n < e.length; n++) {
1342
1368
  const r = e[n];
1343
- if (Ai(r)) {
1369
+ if (to(r)) {
1344
1370
  const e = this.getSlotName(r);
1345
1371
  if (e === QDefaultSlot) {
1346
1372
  t.push(r);
@@ -1351,13 +1377,13 @@ var SsrComponentFrame = class {
1351
1377
  t.push(r);
1352
1378
  }
1353
1379
  }
1354
- t.length > 0 && _e(this.slots, QDefaultSlot, t, 0);
1380
+ t.length > 0 && We(this.slots, QDefaultSlot, t, 0);
1355
1381
  } else {
1356
- _e(this.slots, QDefaultSlot, e, 0);
1382
+ We(this.slots, QDefaultSlot, e, 0);
1357
1383
  }
1358
1384
  }
1359
1385
  updateSlot(e, t) {
1360
- let n = ge(this.slots, e, 0);
1386
+ let n = Ue(this.slots, e, 0);
1361
1387
  if (n === null) {
1362
1388
  n = t;
1363
1389
  } else if (Array.isArray(n)) {
@@ -1365,16 +1391,16 @@ var SsrComponentFrame = class {
1365
1391
  } else {
1366
1392
  n = [ n, t ];
1367
1393
  }
1368
- _e(this.slots, e, n, 0);
1394
+ We(this.slots, e, n, 0);
1369
1395
  }
1370
1396
  getSlotName(e) {
1371
- if (e.props[De]) {
1372
- return e.props[De];
1397
+ if (e.props[cr]) {
1398
+ return e.props[cr];
1373
1399
  }
1374
1400
  return QDefaultSlot;
1375
1401
  }
1376
1402
  hasSlot(e) {
1377
- return Ee(this.slots, e, 0);
1403
+ return Ve(this.slots, e, 0);
1378
1404
  }
1379
1405
  claimChildrenForSlot(e) {
1380
1406
  return mapApp_remove(this.slots, e, 0);
@@ -1394,6 +1420,10 @@ var renderSSRChunks = (e, t) => {
1394
1420
  const s = e[r];
1395
1421
  if (typeof s === "string") {
1396
1422
  n += s;
1423
+ } else if (s.type === "root-ref-delta") {
1424
+ const e = t ? t[s.localId] ?? s.localId : s.localId;
1425
+ const r = t ? t[s.localBaseId] ?? s.localBaseId : s.localBaseId;
1426
+ n += String(e - r);
1397
1427
  } else {
1398
1428
  const e = s.type === "root-ref" ? s.localId : s.localPath[0];
1399
1429
  n += String(t ? t[e] ?? e : e);
@@ -1420,6 +1450,9 @@ var StringSSRWriter = class {
1420
1450
  writeRootRefPath(e) {
1421
1451
  writeStringRootRefPath(this, e);
1422
1452
  }
1453
+ writeRootRefDelta(e, t) {
1454
+ writeStringRootRefDelta(this, e, t);
1455
+ }
1423
1456
  clear() {
1424
1457
  this.buffer.length = 0;
1425
1458
  }
@@ -1445,6 +1478,13 @@ var StringBufferSegmentWriter = class {
1445
1478
  localPath: e
1446
1479
  });
1447
1480
  }
1481
+ writeRootRefDelta(e, t) {
1482
+ this.chunks.push({
1483
+ type: "root-ref-delta",
1484
+ localId: e,
1485
+ localBaseId: t
1486
+ });
1487
+ }
1448
1488
  clear() {
1449
1489
  this.chunks.length = 0;
1450
1490
  }
@@ -1874,7 +1914,7 @@ function getBuildBase(e) {
1874
1914
  }
1875
1915
 
1876
1916
  var versions = {
1877
- qwik: "2.0.0-beta.37-dev+82dc74d",
1917
+ qwik: "2.0.0-beta.39-dev+6fb620f",
1878
1918
  qwikDom: "2.1.19"
1879
1919
  };
1880
1920
 
@@ -1973,6 +2013,8 @@ function encodeAsAlphanumeric(e) {
1973
2013
  }
1974
2014
 
1975
2015
  // packages/qwik/src/server/ssr-container.ts
2016
+ var VALID_ELEMENT_NAME = /^[A-Za-z][A-Za-z0-9._:-]*$/;
2017
+
1976
2018
  var NO_SCRIPT_HERE_ELEMENTS = /* @__PURE__ */ new Set([ "script", "style", "textarea", "title", "iframe", "noframes", "noscript", "xmp", "template", "svg", "math" ]);
1977
2019
 
1978
2020
  function ssrCreateContainer(e) {
@@ -2011,7 +2053,7 @@ var QTemplateProps = {
2011
2053
  "aria-hidden": true
2012
2054
  };
2013
2055
 
2014
- var SSRContainer = class extends lc {
2056
+ var SSRContainer = class extends Cc {
2015
2057
  tag;
2016
2058
  isHtml;
2017
2059
  writer;
@@ -2060,7 +2102,7 @@ var SSRContainer = class extends lc {
2060
2102
  componentStack=[];
2061
2103
  cleanupQueue=[];
2062
2104
  emitContainerDataFrame=null;
2063
- Te=randomStr();
2105
+ Ht=randomStr();
2064
2106
  // Temporary flag to find missing roots after the state was serialized
2065
2107
  t=false;
2066
2108
  qlInclude;
@@ -2093,7 +2135,7 @@ var SSRContainer = class extends lc {
2093
2135
  this.writer = e.writer;
2094
2136
  this.streamHandler = e.streamHandler;
2095
2137
  this.timing = e.timing;
2096
- this.qe = e.buildBase;
2138
+ this.De = e.buildBase;
2097
2139
  this.resolvedManifest = e.resolvedManifest;
2098
2140
  this.renderOptions = e.renderOptions;
2099
2141
  const t = this.renderOptions.streaming?.outOfOrder === true;
@@ -2105,7 +2147,7 @@ var SSRContainer = class extends lc {
2105
2147
  } else {
2106
2148
  this.outOfOrderStreaming = t;
2107
2149
  }
2108
- this.Pe = 1e5;
2150
+ this.Fe = 1e5;
2109
2151
  const n = this.renderOptions.qwikLoader;
2110
2152
  this.qlInclude = n ? typeof n === "object" ? n.include === "never" ? 2 /* Done */ : 0 /* Module */ : n === "inline" ? 1 /* Inline */ : n === "never" ? 2 /* Done */ : 0 /* Module */ : 0 /* Module */;
2111
2153
  if (this.qlInclude === 0 /* Module */) {
@@ -2114,7 +2156,7 @@ var SSRContainer = class extends lc {
2114
2156
  this.qlInclude = 1 /* Inline */;
2115
2157
  }
2116
2158
  }
2117
- this.v();
2159
+ this.m();
2118
2160
  }
2119
2161
  ensureProjectionResolved(e) {}
2120
2162
  handleError(e, t) {
@@ -2139,9 +2181,9 @@ var SSRContainer = class extends lc {
2139
2181
  await this.closeContainer();
2140
2182
  }
2141
2183
  async renderJSX(e, t) {
2142
- await Xn(this, e, t);
2184
+ await zn(this, e, t);
2143
2185
  }
2144
- A() {
2186
+ v() {
2145
2187
  return this.i === 2 /* OOOSReady */;
2146
2188
  }
2147
2189
  /** Queue OOOS serialization/write work that must not overlap with root state serialization. */ S(e) {
@@ -2151,23 +2193,23 @@ var SSRContainer = class extends lc {
2151
2193
  if (this.i === 0 /* NotReady */) {
2152
2194
  return e();
2153
2195
  }
2154
- const t = this.i === 1 /* DataStreamStarted */ ? this.renderQueue.then(() => this.C()).then(e) : this.renderQueue.then(e);
2196
+ const t = this.i === 1 /* DataStreamStarted */ ? this.renderQueue.then(() => this.A()).then(e) : this.renderQueue.then(e);
2155
2197
  this.renderQueue = t.catch(() => {});
2156
2198
  return t;
2157
2199
  }
2158
- C() {
2159
- if (!__EXPERIMENTAL__.suspense || !this.outOfOrderStreaming || this.A()) {
2200
+ A() {
2201
+ if (!__EXPERIMENTAL__.suspense || !this.outOfOrderStreaming || this.v()) {
2160
2202
  return;
2161
2203
  }
2162
2204
  return this.rootContainerReadyPromise ||= new Promise(e => {
2163
2205
  this.resolveRootContainerReady = e;
2164
2206
  });
2165
2207
  }
2166
- I() {
2167
- if (!__EXPERIMENTAL__.suspense || !this.outOfOrderStreaming || this.A()) {
2208
+ C() {
2209
+ if (!__EXPERIMENTAL__.suspense || !this.outOfOrderStreaming || this.v()) {
2168
2210
  return;
2169
2211
  }
2170
- this.rootContainerSerializedRootCount = this.serializationCtx.Yn.length;
2212
+ this.rootContainerSerializedRootCount = this.serializationCtx.le.length;
2171
2213
  this.i = 2 /* OOOSReady */;
2172
2214
  this.resolveRootContainerReady?.();
2173
2215
  this.resolveRootContainerReady = null;
@@ -2211,15 +2253,15 @@ var SSRContainer = class extends lc {
2211
2253
  throw e;
2212
2254
  }
2213
2255
  }
2214
- F() {
2256
+ I() {
2215
2257
  let e = this;
2216
2258
  while (e instanceof SSRSegmentContainer) {
2217
- e = e.Re;
2259
+ e = e.Le;
2218
2260
  }
2219
2261
  return e;
2220
2262
  }
2221
2263
  createSegmentContainer(e, t) {
2222
- const n = this.F();
2264
+ const n = this.I();
2223
2265
  const r = this.getOrCreateLastNode();
2224
2266
  this.addRoot(r);
2225
2267
  this.markVNodeRefForSerialization(r);
@@ -2237,17 +2279,17 @@ var SSRContainer = class extends lc {
2237
2279
  tagName: this.tag,
2238
2280
  writer: t,
2239
2281
  streamHandler: noopStreamHandler,
2240
- locale: this.jt,
2282
+ locale: this.en,
2241
2283
  timing: this.timing,
2242
- buildBase: this.qe || "/build/",
2284
+ buildBase: this.De || "/build/",
2243
2285
  resolvedManifest: this.resolvedManifest,
2244
2286
  renderOptions: this.renderOptions
2245
2287
  }, n);
2246
2288
  const o = i;
2247
- o.Cn = true;
2248
- o.dt = this.dt;
2289
+ o.Bn = true;
2290
+ o.yt = this.yt;
2249
2291
  i.serializationCtx = i.serializationCtxFactory(SsrNode, DomRef, this.symbolToChunkResolver, t);
2250
- i.serializationCtx.gt = this.serializationCtx.gt.bind(this.serializationCtx);
2292
+ i.serializationCtx.Et = this.serializationCtx.Et.bind(this.serializationCtx);
2251
2293
  i.currentElementFrame = s;
2252
2294
  i.currentComponentNode = this.currentComponentNode;
2253
2295
  i.depthFirstElementCount = 0;
@@ -2257,7 +2299,7 @@ var SSRContainer = class extends lc {
2257
2299
  i.styleIds = this.styleIds;
2258
2300
  i.emittedQwikEventNames = this.emittedQwikEventNames;
2259
2301
  i.qlInclude = 2 /* Done */;
2260
- i.Te = this.Te;
2302
+ i.Ht = this.Ht;
2261
2303
  o._didAddQwikLoader = true;
2262
2304
  return i;
2263
2305
  }
@@ -2278,19 +2320,19 @@ var SSRContainer = class extends lc {
2278
2320
  }
2279
2321
  setContext(e, t, n) {
2280
2322
  const r = e;
2281
- let s = r.getProp(Je);
2323
+ let s = r.getProp(mr);
2282
2324
  if (s == null) {
2283
- r.setProp(Je, s = []);
2325
+ r.setProp(mr, s = []);
2284
2326
  }
2285
- _e(s, t.id, n, 0, true);
2327
+ We(s, t.id, n, 0, true);
2286
2328
  this.addRoot(r);
2287
2329
  }
2288
2330
  resolveContext(e, t) {
2289
2331
  let n = e;
2290
2332
  while (n) {
2291
- const e = n.getProp(Je);
2292
- if (e != null && Ee(e, t.id, 0)) {
2293
- return ge(e, t.id, 0);
2333
+ const e = n.getProp(mr);
2334
+ if (e != null && Ve(e, t.id, 0)) {
2335
+ return Ue(e, t.id, 0);
2294
2336
  }
2295
2337
  n = n.parentComponent;
2296
2338
  }
@@ -2317,15 +2359,21 @@ var SSRContainer = class extends lc {
2317
2359
  }
2318
2360
  const e = this.renderOptions.containerAttributes || {};
2319
2361
  const t = e[QRenderAttr];
2320
- e[es] = "paused" /* PAUSED */;
2362
+ e[kr] = "paused" /* PAUSED */;
2321
2363
  e[QRuntimeAttr] = "2";
2322
- e[QVersionAttr] = this.ke ?? "dev";
2364
+ e[QVersionAttr] = this.je ?? "dev";
2323
2365
  e[QRenderAttr] = (t ? t + "-" : "") + (isDev8 ? "ssr-dev" : "ssr");
2324
- e[Ge] = this.qe || "";
2325
- e[QLocaleAttr] = this.jt;
2366
+ e[vr] = this.De || "";
2367
+ e[QLocaleAttr] = this.en;
2326
2368
  e[QManifestHashAttr] = this.resolvedManifest.manifest.manifestHash;
2327
- e[QInstanceAttr] = this.Te;
2328
- this.Dt.containerAttributes = e;
2369
+ e[QInstanceAttr] = this.Ht;
2370
+ const n = this.renderOptions.statePrewarm;
2371
+ if (typeof n === "number") {
2372
+ e[QStatePrewarmAttr] = String(n);
2373
+ } else {
2374
+ delete e[QStatePrewarmAttr];
2375
+ }
2376
+ this.un.containerAttributes = e;
2329
2377
  this.openElement(this.tag, null, e);
2330
2378
  if (!this.isHtml) {
2331
2379
  this.emitContainerDataFrame = this.currentElementFrame;
@@ -2334,18 +2382,21 @@ var SSRContainer = class extends lc {
2334
2382
  /** Renders closing tag for current container */ closeContainer() {
2335
2383
  return this.closeElement();
2336
2384
  }
2337
- qt=0;
2385
+ Tt=0;
2338
2386
  /** Renders opening tag for DOM element */
2339
2387
  openElement(e, t, n, r = null, s = null, i = null, o = true) {
2388
+ if (!VALID_ELEMENT_NAME.test(e)) {
2389
+ throw Ye(36 /* invalidElementName */ , [ JSON.stringify(e) ]);
2390
+ }
2340
2391
  const a = isQwikStyleElement(e, n) || isQwikStyleElement(e, r);
2341
2392
  if (NO_SCRIPT_HERE_ELEMENTS.has(e)) {
2342
- this.qt++;
2393
+ this.Tt++;
2343
2394
  }
2344
2395
  if (
2345
2396
  // don't append qwik loader before qwik style elements
2346
2397
  // it will confuse the resuming, because styles are expected to be the first nodes in subtree
2347
2398
  !a && this.qlInclude === 1 /* Inline */) {
2348
- if (this.qt === 0 && this.size > 30 * 1024 && e !== "body") {
2399
+ if (this.Tt === 0 && this.size > 30 * 1024 && e !== "body") {
2349
2400
  this.emitQwikLoaderInline();
2350
2401
  }
2351
2402
  }
@@ -2365,13 +2416,15 @@ var SSRContainer = class extends lc {
2365
2416
  if (n) {
2366
2417
  l = this.writeAttrs(e, n, false, s, i, o);
2367
2418
  }
2368
- this.write(" " + Es);
2419
+ this.write(" " + Br);
2369
2420
  if (t !== null) {
2370
- this.write(`="${t}"`);
2421
+ this.write(ATTR_EQUALS_QUOTE);
2422
+ this.write(escapeHTML(t));
2423
+ this.write(Li);
2371
2424
  } else if (qTest) {
2372
2425
  this.write(EMPTY_ATTR);
2373
2426
  }
2374
- if (r && !dr(r)) {
2427
+ if (r && !Oi(r)) {
2375
2428
  l = this.writeAttrs(e, r, true, s, i, o) || l;
2376
2429
  }
2377
2430
  this.write(GT);
@@ -2385,7 +2438,7 @@ var SSRContainer = class extends lc {
2385
2438
  this.emitContainerDataFrame = null;
2386
2439
  this.onRenderDone();
2387
2440
  const e = createTimer();
2388
- return qs(qs(this.emitContainerData(), () => this._closeElement()), () => {
2441
+ return Kr(Kr(this.emitContainerData(), () => this._closeElement()), () => {
2389
2442
  this.timing.snapshot = e();
2390
2443
  });
2391
2444
  }
@@ -2401,7 +2454,7 @@ var SSRContainer = class extends lc {
2401
2454
  for (let t = 0; t < e.length; t++) {
2402
2455
  const n = e[t];
2403
2456
  if (hasDestroy(n)) {
2404
- n.Tn();
2457
+ n.cn();
2405
2458
  }
2406
2459
  }
2407
2460
  e = this.cleanupQueue.pop();
@@ -2417,7 +2470,7 @@ var SSRContainer = class extends lc {
2417
2470
  }
2418
2471
  this.lastNode = null;
2419
2472
  if (NO_SCRIPT_HERE_ELEMENTS.has(t)) {
2420
- this.qt--;
2473
+ this.Tt--;
2421
2474
  }
2422
2475
  }
2423
2476
  /** Writes opening data to vNodeData for fragment boundaries */ openFragment(e) {
@@ -2483,7 +2536,7 @@ var SSRContainer = class extends lc {
2483
2536
  if (e.slots.length === 0) {
2484
2537
  return;
2485
2538
  }
2486
- this.openElement(is, null, QTemplateProps, null);
2539
+ this.openElement(Pr, null, QTemplateProps, null);
2487
2540
  const t = e.projectionScopedStyle;
2488
2541
  for (let n = 0; n < e.slots.length; n += 2) {
2489
2542
  const r = e.slots[n];
@@ -2492,12 +2545,12 @@ var SSRContainer = class extends lc {
2492
2545
  this.markVNodeRefForSerialization(e.componentNode);
2493
2546
  }
2494
2547
  this.openFragment(isDev8 ? {
2495
- [xe]: "P" /* Projection */ ,
2548
+ [Ze]: "P" /* Projection */ ,
2496
2549
  [QSlotParent]: e.componentNode.id,
2497
- [De]: r
2550
+ [cr]: r
2498
2551
  } : {
2499
2552
  [QSlotParent]: e.componentNode.id,
2500
- [De]: r
2553
+ [cr]: r
2501
2554
  });
2502
2555
  const i = this.getOrCreateLastNode();
2503
2556
  i.vnodeData[0] |= 16 /* SERIALIZE */;
@@ -2523,16 +2576,16 @@ var SSRContainer = class extends lc {
2523
2576
  }
2524
2577
  addRoot(e) {
2525
2578
  if (this.t) {
2526
- const t = this.serializationCtx.ge(e);
2579
+ const t = this.serializationCtx.Ne(e);
2527
2580
  return t;
2528
2581
  }
2529
- return this.serializationCtx.St(e);
2582
+ return this.serializationCtx.Rt(e);
2530
2583
  }
2531
2584
  getOrCreateLastNode() {
2532
2585
  if (!this.lastNode) {
2533
2586
  const e = this.currentElementFrame;
2534
2587
  const t = e.depthFirstElementIdx + 1;
2535
- const n = e.refBase ?? (this.vnodeSegment ? je(this.vnodeSegment, t) : t + this.vNodeDataOffset);
2588
+ const n = e.refBase ?? (this.vnodeSegment ? ir(this.vnodeSegment, t) : t + this.vNodeDataOffset);
2536
2589
  this.lastNode = vNodeData_createSsrNodeReference(this.currentComponentNode, e.vNodeData, n, this.cleanupQueue, e.currentFile);
2537
2590
  }
2538
2591
  return this.lastNode;
@@ -2540,14 +2593,14 @@ var SSRContainer = class extends lc {
2540
2593
  addUnclaimedProjection(e, t, n) {
2541
2594
  e.slots.push(t, n);
2542
2595
  }
2543
- v() {
2596
+ m() {
2544
2597
  const e = this.resolvedManifest.manifest.injections;
2545
2598
  if (!e) {
2546
2599
  return;
2547
2600
  }
2548
2601
  for (let t = 0; t < e.length; t++) {
2549
2602
  const n = e[t];
2550
- const r = Wi(n.tag, null, n.attributes || {}, null, 0, null);
2603
+ const r = ao(n.tag, null, n.attributes || {}, null, 0, null);
2551
2604
  if (n.location === "head") {
2552
2605
  this.additionalHeadNodes.push(r);
2553
2606
  } else {
@@ -2555,19 +2608,19 @@ var SSRContainer = class extends lc {
2555
2608
  }
2556
2609
  }
2557
2610
  }
2558
- Xe(e, t, n, r) {
2611
+ Ye(e, t, n, r) {
2559
2612
  if (r) {
2560
2613
  const e = this.getComponentFrame(0);
2561
2614
  e.scopedStyleIds.add(t);
2562
2615
  const r = convertStyleIdsToString(e.scopedStyleIds);
2563
- this.setHostProp(n, He, r);
2616
+ this.setHostProp(n, yr, r);
2564
2617
  }
2565
2618
  if (!this.styleIds.has(t)) {
2566
2619
  this.styleIds.add(t);
2567
2620
  if (this.currentElementFrame?.elementName === "html") {
2568
- this.additionalHeadNodes.push(Di("style", null, {
2621
+ this.additionalHeadNodes.push(fo("style", null, {
2569
2622
  dangerouslySetInnerHTML: e,
2570
- [Ue]: t
2623
+ [dr]: t
2571
2624
  }, null, 0, t));
2572
2625
  } else {
2573
2626
  this._styleNode(t, e);
@@ -2576,12 +2629,12 @@ var SSRContainer = class extends lc {
2576
2629
  }
2577
2630
  _styleNode(e, t) {
2578
2631
  this.openElement("style", null, {
2579
- [Ue]: e
2632
+ [dr]: e
2580
2633
  });
2581
2634
  this.write(t);
2582
2635
  this.closeElement();
2583
2636
  }
2584
- ut(e) {
2637
+ ft(e) {
2585
2638
  if (this.isHtml && this.currentElementFrame?.elementName === "html") {
2586
2639
  this.additionalHeadNodes.push(e);
2587
2640
  return true;
@@ -2592,11 +2645,11 @@ var SSRContainer = class extends lc {
2592
2645
  emitContainerData() {
2593
2646
  const e = this.renderOptions.streaming?.inOrder?.strategy === "disabled";
2594
2647
  const t = !e || __EXPERIMENTAL__.suspense && this.outOfOrderStreaming && this.outOfOrderUsed;
2595
- return qs(qs(t ? this.streamHandler.flush() : void 0, () => this.resolvePromiseAttributes()), () => {
2648
+ return Kr(Kr(t ? this.streamHandler.flush() : void 0, () => this.resolvePromiseAttributes()), () => {
2596
2649
  this.i = 1 /* DataStreamStarted */;
2597
- return qs(this.emitStateData(), () => {
2650
+ return Kr(this.emitStateData(), () => {
2598
2651
  this.t = true;
2599
- return qs(this.emitRestStateData(), () => this.emitOutOfOrderSegmentsAndData());
2652
+ return Kr(this.emitRestStateData(), () => this.emitOutOfOrderSegmentsAndData());
2600
2653
  });
2601
2654
  });
2602
2655
  }
@@ -2604,7 +2657,7 @@ var SSRContainer = class extends lc {
2604
2657
  this.emitVNodeData();
2605
2658
  this.emitDelayedOutOfOrderSegmentVNodeData();
2606
2659
  if (!isDev8) {
2607
- preloaderPost(this, this.renderOptions, this.Dt?.nonce);
2660
+ preloaderPost(this, this.renderOptions, this.un?.nonce);
2608
2661
  }
2609
2662
  this.emitSyncFnsData();
2610
2663
  this.emitPatchDataIfNeeded();
@@ -2617,8 +2670,8 @@ var SSRContainer = class extends lc {
2617
2670
  }
2618
2671
  for (let e = 0; e < this.outOfOrderSegments.length; e++) {
2619
2672
  const t = this.outOfOrderSegments[e];
2620
- if (t.Qe === 1 /* EarlyFinalized */) {
2621
- t.He();
2673
+ if (t.F === 1 /* EarlyFinalized */) {
2674
+ t.rr();
2622
2675
  e--;
2623
2676
  }
2624
2677
  }
@@ -2628,8 +2681,8 @@ var SSRContainer = class extends lc {
2628
2681
  return;
2629
2682
  }
2630
2683
  this.emitOutOfOrderExecutorIfNeeded();
2631
- return qs(this.streamHandler.flush(), async () => {
2632
- this.I();
2684
+ return Kr(this.streamHandler.flush(), async () => {
2685
+ this.C();
2633
2686
  if (this.outOfOrderPendingSegments.length) {
2634
2687
  await Promise.all(this.outOfOrderPendingSegments);
2635
2688
  }
@@ -2653,8 +2706,8 @@ var SSRContainer = class extends lc {
2653
2706
  * NOTE: Not every element will need vNodeData. So we need to encode how many elements should be
2654
2707
  * skipped. By choosing different separators we can encode different numbers of elements to skip.
2655
2708
  */ emitVNodeData(e) {
2656
- this.F().markVNodeDataOwnerEmitted(e);
2657
- if (!e && !this.serializationCtx.Yn.length && !this.hasVNodeRefsForSerialization) {
2709
+ this.I().markVNodeDataOwnerEmitted(e);
2710
+ if (!e && !this.serializationCtx.le.length && !this.hasVNodeRefsForSerialization) {
2658
2711
  return;
2659
2712
  }
2660
2713
  this.emitVNodeDataScript(e, this.vNodeDatas.entries());
@@ -2664,7 +2717,7 @@ var SSRContainer = class extends lc {
2664
2717
  type: "qwik/vnode"
2665
2718
  };
2666
2719
  if (__EXPERIMENTAL__.suspense && this.outOfOrderStreaming && e) {
2667
- r[Ph] = e;
2720
+ r[hr] = e;
2668
2721
  }
2669
2722
  if (n) {
2670
2723
  r[QStatePatchAttr] = true;
@@ -2698,7 +2751,7 @@ var SSRContainer = class extends lc {
2698
2751
  t--;
2699
2752
  this.write(VNodeDataChar.CLOSE_CHAR);
2700
2753
  } else if (i === WRITE_ELEMENT_ATTRS) {
2701
- if (e && !dr(e)) {
2754
+ if (e && !Oi(e)) {
2702
2755
  this.write(VNodeDataChar.SEPARATOR_CHAR);
2703
2756
  this.write(VNodeDataChar.SEPARATOR_CHAR);
2704
2757
  this.writeFragmentAttrs(e);
@@ -2766,47 +2819,52 @@ var SSRContainer = class extends lc {
2766
2819
  let r = n;
2767
2820
  let s;
2768
2821
  let i = null;
2769
- if (t === as && typeof n === "number") {
2822
+ if (t === Ir && typeof n === "number") {
2770
2823
  s = n;
2771
2824
  r = String(n);
2772
2825
  } else if (typeof n !== "string") {
2773
2826
  s = this.addRoot(n);
2774
2827
  if (s === void 0) {
2828
+ if (t === sr) {
2829
+ this.write(VNodeDataChar.RENDER_FN_CHAR);
2830
+ this.write(VNodeDataChar.RENDER_HASH_PREFIX_CHAR);
2831
+ this.write(encodeVNodeDataString(encodeVNodeDataKey(n.ot)));
2832
+ }
2775
2833
  continue;
2776
2834
  }
2777
2835
  r = String(s);
2778
2836
  }
2779
2837
  switch (t) {
2780
- case He:
2838
+ case yr:
2781
2839
  this.write(VNodeDataChar.SCOPED_STYLE_CHAR);
2782
2840
  break;
2783
2841
 
2784
- case Le:
2842
+ case sr:
2785
2843
  this.write(VNodeDataChar.RENDER_FN_CHAR);
2786
2844
  break;
2787
2845
 
2788
- case as:
2846
+ case Ir:
2789
2847
  this.write(VNodeDataChar.ID_CHAR);
2790
2848
  break;
2791
2849
 
2792
- case ds:
2850
+ case Cr:
2793
2851
  this.write(VNodeDataChar.PROPS_CHAR);
2794
2852
  break;
2795
2853
 
2796
- case hs:
2854
+ case Nr:
2797
2855
  i = encodeVNodeDataKey;
2798
2856
  this.write(VNodeDataChar.KEY_CHAR);
2799
2857
  break;
2800
2858
 
2801
- case ps:
2859
+ case Or:
2802
2860
  this.write(VNodeDataChar.SEQ_CHAR);
2803
2861
  break;
2804
2862
 
2805
- case $s:
2863
+ case jr:
2806
2864
  this.write(VNodeDataChar.SEQ_IDX_CHAR);
2807
2865
  break;
2808
2866
 
2809
- case Qe:
2867
+ case wr:
2810
2868
  this.write(VNodeDataChar.BACK_REFS_CHAR);
2811
2869
  break;
2812
2870
 
@@ -2815,11 +2873,12 @@ var SSRContainer = class extends lc {
2815
2873
  break;
2816
2874
 
2817
2875
  // Skipping `\` character for now because it is used for escaping.
2818
- case Je:
2876
+ case mr:
2819
2877
  this.write(VNodeDataChar.CONTEXT_CHAR);
2820
2878
  break;
2821
2879
 
2822
- case De:
2880
+ case cr:
2881
+ i = encodeVNodeDataKey;
2823
2882
  this.write(VNodeDataChar.SLOT_CHAR);
2824
2883
  break;
2825
2884
 
@@ -2827,7 +2886,7 @@ var SSRContainer = class extends lc {
2827
2886
  {
2828
2887
  i = encodeURI;
2829
2888
  this.write(VNodeDataChar.SEPARATOR_CHAR);
2830
- this.write(encodeVNodeDataString(t));
2889
+ this.write(encodeVNodeDataString(encodeVNodeDataKey(t)));
2831
2890
  this.write(VNodeDataChar.SEPARATOR_CHAR);
2832
2891
  }
2833
2892
  }
@@ -2845,29 +2904,29 @@ var SSRContainer = class extends lc {
2845
2904
  }
2846
2905
  }
2847
2906
  emitStateData() {
2848
- if (!this.serializationCtx.Yn.length) {
2907
+ if (!this.serializationCtx.le.length && !this.serializationCtx.Te.size) {
2849
2908
  return;
2850
2909
  }
2851
2910
  const e = this.stateScriptAttrs();
2852
2911
  this.openScript(e);
2853
- this.serializationCtx.Bn(this.writer);
2854
- return qs(this.serializationCtx.It(), () => {
2912
+ this.serializationCtx.re(this.writer);
2913
+ return Kr(this.serializationCtx.Ut(), () => {
2855
2914
  this.closeScript();
2856
2915
  });
2857
2916
  }
2858
2917
  /** Add q-d:qidle attribute to eagerly resume some state if needed */ stateScriptAttrs() {
2859
2918
  const e = {
2860
2919
  type: "qwik/state",
2861
- [QInstanceAttr]: this.Te
2920
+ [QInstanceAttr]: this.Ht
2862
2921
  };
2863
- const t = this.serializationCtx.Tt;
2922
+ const t = this.serializationCtx.Te;
2864
2923
  if (t.size > 0) {
2865
- e["q-d:qidle"] = xf(null, "_res", _, null, [ ...t ]);
2924
+ e["q-d:qidle"] = la(null, "_res", _, null, [ ...t ]);
2866
2925
  }
2867
2926
  return e;
2868
2927
  }
2869
2928
  emitSyncFnsData(e = false) {
2870
- const t = this.serializationCtx.$e;
2929
+ const t = this.serializationCtx.Re;
2871
2930
  const n = e ? this.emittedSyncFnCount : 0;
2872
2931
  if (t.length > n) {
2873
2932
  const r = {
@@ -2878,17 +2937,17 @@ var SSRContainer = class extends lc {
2878
2937
  }
2879
2938
  this.openScript(r);
2880
2939
  if (e) {
2881
- const e = Q_FUNCS_PREFIX.replace("HASH", this.Te).slice(0, -1);
2940
+ const e = Q_FUNCS_PREFIX.replace("HASH", this.Ht).slice(0, -1);
2882
2941
  this.write(`(${e}||(${e}=[])).push(`);
2883
2942
  } else {
2884
- this.write(Q_FUNCS_PREFIX.replace("HASH", this.Te));
2943
+ this.write(Q_FUNCS_PREFIX.replace("HASH", this.Ht));
2885
2944
  }
2886
2945
  if (!e) {
2887
- this.write(yr);
2946
+ this.write(Fi);
2888
2947
  }
2889
- this.writeArray(e ? t.slice(n) : t, wr);
2948
+ this.writeArray(e ? t.slice(n) : t, Xi);
2890
2949
  if (!e) {
2891
- this.write(mr);
2950
+ this.write(Di);
2892
2951
  }
2893
2952
  if (e) {
2894
2953
  this.write(")");
@@ -2902,7 +2961,7 @@ var SSRContainer = class extends lc {
2902
2961
  for (const [t, n] of this.backpatchMap) {
2903
2962
  for (let r = 0; r < n.length; r++) {
2904
2963
  const s = n[r];
2905
- e.push(t, s.attrName, lu(s.value) ? s.value.untrackedValue : s.value);
2964
+ e.push(t, s.attrName, Tu(s.value) ? s.value.untrackedValue : s.value);
2906
2965
  }
2907
2966
  }
2908
2967
  this.backpatchMap.clear();
@@ -2914,7 +2973,7 @@ var SSRContainer = class extends lc {
2914
2973
  if (this.renderOptions.serverData?.nonce) {
2915
2974
  t["nonce"] = this.renderOptions.serverData.nonce;
2916
2975
  }
2917
- this.writeScript(t, JSON.stringify(e));
2976
+ this.writeScript(t, JSON.stringify(e).replaceAll("<", "\\u003C"));
2918
2977
  }
2919
2978
  }
2920
2979
  emitBackpatchDataAndExecutorIfNeeded() {
@@ -2982,12 +3041,12 @@ var SSRContainer = class extends lc {
2982
3041
  }
2983
3042
  }
2984
3043
  isStatic() {
2985
- return !(__EXPERIMENTAL__.suspense && this.outOfOrderStreaming && this.outOfOrderUsed) && this.serializationCtx.xt.size === 0;
3044
+ return !(__EXPERIMENTAL__.suspense && this.outOfOrderStreaming && this.outOfOrderUsed) && this.serializationCtx.It.size === 0;
2986
3045
  }
2987
3046
  emitQwikLoaderAtTopIfNeeded() {
2988
3047
  if (this.qlInclude === 0 /* Module */) {
2989
3048
  this.qlInclude = 2 /* Done */;
2990
- const e = this.qe + this.resolvedManifest.manifest.qwikLoader;
3049
+ const e = this.De + this.resolvedManifest.manifest.qwikLoader;
2991
3050
  const t = {
2992
3051
  rel: "modulepreload",
2993
3052
  href: e
@@ -3034,14 +3093,14 @@ var SSRContainer = class extends lc {
3034
3093
  }
3035
3094
  emitNewQwikEvents(e = false) {
3036
3095
  const t = [];
3037
- for (const e of this.serializationCtx.At) {
3096
+ for (const e of this.serializationCtx.xt) {
3038
3097
  if (!this.emittedQwikEventNames.has(e)) {
3039
3098
  this.emittedQwikEventNames.add(e);
3040
3099
  t.push(JSON.stringify(e));
3041
3100
  }
3042
3101
  }
3043
3102
  if (e) {
3044
- t.push(`${QwikEvContainerReady}`, JSON.stringify(this.Te));
3103
+ t.push(`${QwikEvContainerReady}`, JSON.stringify(this.Ht));
3045
3104
  }
3046
3105
  this.emitQwikEvents(t);
3047
3106
  }
@@ -3054,7 +3113,7 @@ var SSRContainer = class extends lc {
3054
3113
  }
3055
3114
  this.openScript(t);
3056
3115
  this.write(`(window._qwikEv||(window._qwikEv=[])).push(`);
3057
- this.writeArray(e, wr);
3116
+ this.writeArray(e, Xi);
3058
3117
  this.write(PAREN_CLOSE);
3059
3118
  this.closeScript();
3060
3119
  }
@@ -3152,6 +3211,11 @@ var SSRContainer = class extends lc {
3152
3211
  this.size += 1 + String(e[t]).length;
3153
3212
  }
3154
3213
  }
3214
+ writeRootRefDelta(e, t) {
3215
+ const n = e - t;
3216
+ this.size += String(n).length;
3217
+ this.writer.writeRootRefDelta(e, t);
3218
+ }
3155
3219
  writeArray(e, t) {
3156
3220
  for (let n = 0; n < e.length; n++) {
3157
3221
  const r = e[n];
@@ -3161,22 +3225,22 @@ var SSRContainer = class extends lc {
3161
3225
  this.write(r);
3162
3226
  }
3163
3227
  }
3164
- writeAttrs(e, t, r, i, o, a) {
3228
+ writeAttrs(e, t, s, i, o, a) {
3165
3229
  let l = void 0;
3166
3230
  for (let c in t) {
3167
3231
  let u = t[c];
3168
3232
  if (isSSRUnsafeAttr(c)) {
3169
3233
  if (isDev8) {
3170
- throw qe(32 /* unsafeAttr */ , [ c ]);
3234
+ throw Ye(32 /* unsafeAttr */ , [ c ]);
3171
3235
  }
3172
3236
  continue;
3173
3237
  }
3174
- if (Ns(c)) {
3238
+ if (ri(c)) {
3175
3239
  u = _setEvent(this.serializationCtx, c, u, a);
3176
3240
  } else if (c === "ref") {
3177
3241
  const e = this.getOrCreateLastNode();
3178
- if (lu(u)) {
3179
- u.Zt = new DomRef(e);
3242
+ if (Tu(u)) {
3243
+ u.Ct = new DomRef(e);
3180
3244
  continue;
3181
3245
  } else if (typeof u === "function") {
3182
3246
  u(new DomRef(e));
@@ -3184,35 +3248,35 @@ var SSRContainer = class extends lc {
3184
3248
  } else if (u == null) {
3185
3249
  continue;
3186
3250
  } else {
3187
- throw qe(15 /* invalidRefValue */ , [ o ]);
3251
+ throw Ye(15 /* invalidRefValue */ , [ o ]);
3188
3252
  }
3189
- } else if (c === ys || c === ms) {
3253
+ } else if (c === Lr || c === Fr) {
3190
3254
  const e = this.addRoot(u);
3191
3255
  if (e === void 0) {
3192
3256
  continue;
3193
3257
  }
3194
3258
  u = typeof e === "number" ? [ e ] : String(e);
3195
- } else if (lu(u)) {
3259
+ } else if (Tu(u)) {
3196
3260
  const e = this.getOrCreateLastNode();
3197
- const t = new Ti({
3198
- O: i,
3199
- et: r
3261
+ const t = new Gs({
3262
+ j: i,
3263
+ rt: s
3200
3264
  });
3201
- const s = u;
3202
- u = n(() => this.trackSignalValue(s, e, c, t));
3265
+ const r = u;
3266
+ u = n(() => this.trackSignalValue(r, e, c, t));
3203
3267
  }
3204
- if (Ps(u)) {
3268
+ if (Yr(u)) {
3205
3269
  const e = this.getOrCreateLastNode();
3206
3270
  this.addPromiseAttribute(u);
3207
3271
  u.then(t => {
3208
- this.addBackpatchEntry(e.id, c, s(c, t, i));
3272
+ this.addBackpatchEntry(e.id, c, r(c, t, i));
3209
3273
  });
3210
3274
  continue;
3211
3275
  }
3212
- if (c === Ss) {
3276
+ if (c === Hr) {
3213
3277
  if (u) {
3214
3278
  l = String(u);
3215
- c = es;
3279
+ c = kr;
3216
3280
  u = "html" /* HTML */;
3217
3281
  }
3218
3282
  if (e === "style") {
@@ -3224,17 +3288,17 @@ var SSRContainer = class extends lc {
3224
3288
  if (e === "textarea" && c === "value") {
3225
3289
  if (u && typeof u !== "string") {
3226
3290
  if (isDev8) {
3227
- throw qe(23 /* wrongTextareaValue */ , [ o, u ]);
3291
+ throw Ye(23 /* wrongTextareaValue */ , [ o, u ]);
3228
3292
  }
3229
3293
  continue;
3230
3294
  }
3231
3295
  l = escapeHTML(u || "");
3232
- c = es;
3296
+ c = kr;
3233
3297
  u = "text" /* TEXT */;
3234
3298
  }
3235
- const h = s(c, u, i);
3299
+ const h = r(c, u, i);
3236
3300
  if (h != null && h !== false) {
3237
- this.write(ga);
3301
+ this.write(Ga);
3238
3302
  this.write(c);
3239
3303
  if (h !== true) {
3240
3304
  this.write(ATTR_EQUALS_QUOTE);
@@ -3244,7 +3308,7 @@ var SSRContainer = class extends lc {
3244
3308
  const e = escapeHTML(String(h));
3245
3309
  this.write(e);
3246
3310
  }
3247
- this.write($r);
3311
+ this.write(Li);
3248
3312
  }
3249
3313
  }
3250
3314
  }
@@ -3257,6 +3321,8 @@ var SSRContainer = class extends lc {
3257
3321
  this.write(escapeHTML(n));
3258
3322
  } else if (typeof n === "number") {
3259
3323
  this.writeRootRef(n);
3324
+ } else if ("base" in n) {
3325
+ this.writeRootRefDelta(n.id, n.base);
3260
3326
  } else {
3261
3327
  this.writeRootRefPath(n.path);
3262
3328
  }
@@ -3277,44 +3343,29 @@ var SSRContainer = class extends lc {
3277
3343
  var SSRSegmentContainer = class extends SSRContainer {
3278
3344
  constructor(e, t) {
3279
3345
  super(e);
3280
- this.Re = t;
3346
+ this.Le = t;
3281
3347
  }
3282
- Qe=0 /* Rendering */;
3283
- Ke=null;
3348
+ Le;
3349
+ F=0 /* Rendering */;
3350
+ sr=null;
3284
3351
  subscriptionPatchRecords=[];
3285
3352
  pendingVNodeDataPatches=null;
3286
- nextOutOfOrderId() {
3287
- return this.Re.nextOutOfOrderId();
3288
- }
3289
- S(e) {
3290
- return this.Re.S(e);
3291
- }
3292
- queueOutOfOrderSegment(e) {
3293
- this.Re.queueOutOfOrderSegment(e);
3294
- }
3295
- emitOutOfOrderSegmentScripts(e) {
3296
- this.Re.emitOutOfOrderSegmentScripts(e);
3297
- }
3298
- emitOutOfOrderExecutorIfNeeded() {
3299
- this.Re.emitOutOfOrderExecutorIfNeeded();
3300
- }
3301
- nn(e, t, n, r) {
3302
- recordExternalRootEffect(this.Re.serializationCtx, this.serializationCtx, this.Re.dt, this.subscriptionPatchRecords, e, t, n, r);
3353
+ _n(e, t, n, r) {
3354
+ recordExternalRootEffect(this.Le.serializationCtx, this.serializationCtx, this.Le.yt, this.subscriptionPatchRecords, e, t, n, r);
3303
3355
  }
3304
3356
  async P(e, t) {
3305
- const n = this.Re;
3306
- const r = n.A();
3357
+ const n = this.Le;
3358
+ const r = n.v();
3307
3359
  const s = this.serializationCtx;
3308
3360
  try {
3309
- const i = this.Ge(n, s);
3310
- this.Je(n, s);
3311
- this.Ye(n, s);
3312
- const o = this.Ze(n, r, s);
3361
+ const i = this.ir(n, s);
3362
+ this.ar(n, s);
3363
+ const o = this.lr(n, r, s);
3313
3364
  if (r && (i.newRootLocalIds.length > 0 || o !== void 0)) {
3314
- s.ue = n.serializationCtx.zn;
3365
+ s.be = n.serializationCtx.ee;
3315
3366
  await this.emitStatePatchData(e, i.newRootStart, i.newRootLocalIds, o);
3316
- n.serializationCtx.ae = n.serializationCtx.Yn.length + (n.serializationCtx.fe ? 1 : 0);
3317
- n.serializationCtx.zn += s.zn;
3367
+ n.serializationCtx.ge = n.serializationCtx.le.length + (n.serializationCtx._e ? 1 : 0);
3368
+ n.serializationCtx.ee += s.ee;
3318
3369
  }
3319
3370
  this.emitPendingVNodeDataPatches();
3320
3371
  if (r) {
@@ -3332,32 +3383,32 @@ var SSRSegmentContainer = class extends SSRContainer {
3332
3383
  this.drainCleanupQueue();
3333
3384
  const a = i.rootIdMap;
3334
3385
  if (r) {
3335
- this.Qe = 2 /* Done */;
3386
+ this.F = 2 /* Done */;
3336
3387
  } else {
3337
- this.Ke = a;
3338
- this.Qe = 1 /* EarlyFinalized */;
3388
+ this.sr = a;
3389
+ this.F = 1 /* EarlyFinalized */;
3339
3390
  }
3340
3391
  return {
3341
3392
  html: renderSSRChunks(t.htmlChunks, a),
3342
3393
  scripts: t.writer.toString(a)
3343
3394
  };
3344
3395
  } finally {
3345
- if (this.Qe !== 1 /* EarlyFinalized */) {
3346
- s.me = void 0;
3396
+ if (this.F !== 1 /* EarlyFinalized */) {
3397
+ s.qe = void 0;
3347
3398
  n.removeOutOfOrderSegment(this);
3348
3399
  }
3349
- n.serializationCtx.Bn(n.writer);
3400
+ n.serializationCtx.re(n.writer);
3350
3401
  }
3351
3402
  }
3352
- He() {
3403
+ rr() {
3353
3404
  try {
3354
3405
  this.emitVNodeData(this.vnodeSegment);
3355
3406
  this.emitPendingVNodeDataPatches();
3356
- this.Re.emitOutOfOrderSegmentScripts(this.writer.toString(this.Ke));
3357
- this.Qe = 2 /* Done */;
3358
- this.Re.removeOutOfOrderSegment(this);
3407
+ this.Le.emitOutOfOrderSegmentScripts(this.writer.toString(this.sr));
3408
+ this.F = 2 /* Done */;
3409
+ this.Le.removeOutOfOrderSegment(this);
3359
3410
  } finally {
3360
- this.serializationCtx.me = void 0;
3411
+ this.serializationCtx.qe = void 0;
3361
3412
  }
3362
3413
  }
3363
3414
  markVNodeDataForSerialization(e, t = 16 /* SERIALIZE */) {
@@ -3369,11 +3420,11 @@ var SSRSegmentContainer = class extends SSRContainer {
3369
3420
  }
3370
3421
  }
3371
3422
  queueLateVNodeDataPatch(e, t) {
3372
- if (!__EXPERIMENTAL__.suspense || !this.outOfOrderStreaming || !(t & (16 /* SERIALIZE */ | 8 /* REFERENCE */))) {
3423
+ if (!(t & (16 /* SERIALIZE */ | 8 /* REFERENCE */))) {
3373
3424
  return;
3374
3425
  }
3375
3426
  const n = this.getVNodeDataOwnerFromNodeId(e.id);
3376
- if (!this.F().isVNodeDataOwnerEmitted(n.owner)) {
3427
+ if (!this.I().isVNodeDataOwnerEmitted(n.owner)) {
3377
3428
  return;
3378
3429
  }
3379
3430
  let r = (this.pendingVNodeDataPatches ||= /* @__PURE__ */ new Map).get(n.owner);
@@ -3396,24 +3447,24 @@ var SSRSegmentContainer = class extends SSRContainer {
3396
3447
  this.emitVNodeDataScript(t, e, true);
3397
3448
  }
3398
3449
  }
3399
- Ge(e, t) {
3450
+ ir(e, t) {
3400
3451
  const n = this.commitSegmentRoots(e, t);
3401
- t.me = (t, r, s) => {
3452
+ t.qe = (t, r, s) => {
3402
3453
  this.commitSegmentRoot(e, t, r, s, n);
3403
3454
  };
3404
3455
  return n;
3405
3456
  }
3406
- Ze(e, t, n) {
3457
+ lr(e, t, n) {
3407
3458
  let r = void 0;
3408
3459
  const s = t ? this.collectSubscriptionPatches(e, e.rootContainerSerializedRootCount) : void 0;
3409
3460
  if (s) {
3410
- r = n.St(s);
3461
+ r = n.Rt(s);
3411
3462
  }
3412
3463
  return r;
3413
3464
  }
3414
3465
  commitSegmentRoots(e, t) {
3415
3466
  const n = [];
3416
- const r = e.A() ? e.serializationCtx.ae : e.serializationCtx.Yn.length;
3467
+ const r = e.v() ? e.serializationCtx.ge : e.serializationCtx.le.length;
3417
3468
  const s = [];
3418
3469
  const i = {
3419
3470
  rootIdMap: n,
@@ -3421,8 +3472,8 @@ var SSRSegmentContainer = class extends SSRContainer {
3421
3472
  newRootLocalIds: s
3422
3473
  };
3423
3474
  this.promoteSharedSegmentRoots(e, t, i);
3424
- const o = t.Yn;
3425
- const a = t.ye;
3475
+ const o = t.le;
3476
+ const a = t.Pe;
3426
3477
  for (let t = 0; t < o.length; t++) {
3427
3478
  const n = a[t];
3428
3479
  this.commitSegmentRoot(e, t, o[t], n, i);
@@ -3430,8 +3481,8 @@ var SSRSegmentContainer = class extends SSRContainer {
3430
3481
  return i;
3431
3482
  }
3432
3483
  promoteSharedSegmentRoots(e, t, n) {
3433
- const r = t.Yn;
3434
- const s = t.ye;
3484
+ const r = t.le;
3485
+ const s = t.Pe;
3435
3486
  for (let t = 0; t < s.length; t++) {
3436
3487
  const i = s[t];
3437
3488
  if (this.isRootOrUsedByOtherLiveSegment(e, i)) {
@@ -3440,7 +3491,7 @@ var SSRSegmentContainer = class extends SSRContainer {
3440
3491
  }
3441
3492
  }
3442
3493
  isRootOrUsedByOtherLiveSegment(e, t) {
3443
- if (e.serializationCtx.ge(t) !== void 0) {
3494
+ if (e.serializationCtx.Ne(t) !== void 0) {
3444
3495
  return true;
3445
3496
  }
3446
3497
  const n = e.outOfOrderSegments;
@@ -3449,7 +3500,7 @@ var SSRSegmentContainer = class extends SSRContainer {
3449
3500
  if (r === this) {
3450
3501
  continue;
3451
3502
  }
3452
- const s = r.serializationCtx.ye;
3503
+ const s = r.serializationCtx.Pe;
3453
3504
  for (let e = 0; e < s.length; e++) {
3454
3505
  if (s[e] === t) {
3455
3506
  return true;
@@ -3462,47 +3513,41 @@ var SSRSegmentContainer = class extends SSRContainer {
3462
3513
  if (s.rootIdMap[t] !== void 0) {
3463
3514
  return;
3464
3515
  }
3465
- let i = e.serializationCtx.ge(r);
3516
+ let i = e.serializationCtx.Ne(r);
3466
3517
  if (i === void 0) {
3467
- i = e.serializationCtx._e(n, r);
3518
+ i = e.serializationCtx.Ie(n, r);
3468
3519
  s.newRootLocalIds.push(t);
3469
3520
  this.seedCommittedRootForLiveSegments(e, r);
3470
3521
  }
3471
3522
  const o = e.serializationCtx;
3472
- s.rootIdMap[t] = e.A() && i >= o.ce ? i + (o.fe ? 1 : 0) : i;
3523
+ s.rootIdMap[t] = e.v() && i >= o.ve ? i + (o._e ? 1 : 0) : i;
3473
3524
  }
3474
3525
  seedCommittedRootForLiveSegments(e, t) {
3475
3526
  const n = e.outOfOrderSegments;
3476
3527
  for (let e = 0; e < n.length; e++) {
3477
3528
  const r = n[e];
3478
- if (r !== this && r.Qe === 0 /* Rendering */) {
3479
- r.serializationCtx.St(t);
3529
+ if (r !== this && r.F === 0 /* Rendering */) {
3530
+ r.serializationCtx.Rt(t);
3480
3531
  }
3481
3532
  }
3482
3533
  }
3483
- Je(e, t) {
3484
- for (const n of t.At) {
3485
- e.serializationCtx.At.add(n);
3486
- }
3534
+ ar(e, t) {
3487
3535
  for (const n of t.xt) {
3488
3536
  e.serializationCtx.xt.add(n);
3489
3537
  }
3490
- }
3491
- Ye(e, t) {
3492
- e.serializationCtx.$e.push(...t.$e);
3538
+ for (const n of t.It) {
3539
+ e.serializationCtx.It.add(n);
3540
+ }
3493
3541
  }
3494
3542
  collectSubscriptionPatches(e, t) {
3495
- if (!__EXPERIMENTAL__.suspense || !this.outOfOrderStreaming) {
3496
- return;
3497
- }
3498
3543
  return collectSubscriptionPatches(e.serializationCtx, this.subscriptionPatchRecords, t);
3499
3544
  }
3500
3545
  emitStatePatchData(e, t, n, r) {
3501
3546
  const s = this.statePatchScriptAttrs(e);
3502
3547
  this.openScript(s);
3503
- this.serializationCtx.Bn(this.writer);
3504
- this.serializationCtx.te = this.markVNodeDataForSerialization.bind(this);
3505
- return qs(this.serializationCtx.be(t, n, r, 0), () => {
3548
+ this.serializationCtx.re(this.writer);
3549
+ this.serializationCtx.ae = this.markVNodeDataForSerialization.bind(this);
3550
+ return Kr(this.serializationCtx.Me(t, n, r, 0), () => {
3506
3551
  this.closeScript();
3507
3552
  });
3508
3553
  }
@@ -3510,7 +3555,7 @@ var SSRSegmentContainer = class extends SSRContainer {
3510
3555
  const t = this.stateScriptAttrs();
3511
3556
  t[QStatePatchAttr] = true;
3512
3557
  if (e) {
3513
- t[Ph] = e;
3558
+ t[hr] = e;
3514
3559
  }
3515
3560
  return t;
3516
3561
  }
@@ -3518,17 +3563,17 @@ var SSRSegmentContainer = class extends SSRContainer {
3518
3563
 
3519
3564
  var isQwikStyleElement = (e, t) => {
3520
3565
  if (e === "style" && t != null) {
3521
- return Object.prototype.hasOwnProperty.call(t, Ue) || Object.prototype.hasOwnProperty.call(t, He);
3566
+ return Object.prototype.hasOwnProperty.call(t, dr) || Object.prototype.hasOwnProperty.call(t, yr);
3522
3567
  }
3523
3568
  return false;
3524
3569
  };
3525
3570
 
3526
3571
  function newTagError(e) {
3527
- return qe(12 /* tagError */ , [ e ]);
3572
+ return Ye(12 /* tagError */ , [ e ]);
3528
3573
  }
3529
3574
 
3530
3575
  function hasDestroy(e) {
3531
- return e && typeof e === "object" && typeof e.Tn === "function";
3576
+ return e && typeof e === "object" && typeof e.cn === "function";
3532
3577
  }
3533
3578
 
3534
3579
  function isSSRUnsafeAttr(e) {
@@ -3548,7 +3593,7 @@ function randomStr() {
3548
3593
  function addPreventDefaultEventToSerializationContext(e, t) {
3549
3594
  const n = "e" + t.substring(14);
3550
3595
  if (n) {
3551
- e.At.add(n);
3596
+ e.xt.add(n);
3552
3597
  }
3553
3598
  }
3554
3599
 
@@ -3565,6 +3610,8 @@ var StreamHandler = class {
3565
3610
  this.nativeStream = e.stream;
3566
3611
  this.stream = this.setupStreamWriter();
3567
3612
  }
3613
+ opts;
3614
+ timing;
3568
3615
  bufferSize=0;
3569
3616
  buffer="";
3570
3617
  networkFlushes=0;
@@ -3582,7 +3629,7 @@ var StreamHandler = class {
3582
3629
  let t;
3583
3630
  switch (this.inOrderStreaming.strategy) {
3584
3631
  case "disabled":
3585
- t = pr(t => {
3632
+ t = ji(t => {
3586
3633
  if (t === void 0 || t === null) {
3587
3634
  return;
3588
3635
  }
@@ -3593,7 +3640,7 @@ var StreamHandler = class {
3593
3640
  case "direct":
3594
3641
  {
3595
3642
  const n = this.nativeStream;
3596
- t = pr(t => {
3643
+ t = ji(t => {
3597
3644
  if (t === void 0 || t === null) {
3598
3645
  return;
3599
3646
  }
@@ -3611,7 +3658,7 @@ var StreamHandler = class {
3611
3658
  {
3612
3659
  const n = this.inOrderStreaming.maximumChunk ?? 0;
3613
3660
  const r = this.inOrderStreaming.maximumInitialChunk ?? 0;
3614
- t = pr(t => {
3661
+ t = ji(t => {
3615
3662
  if (t === void 0 || t === null) {
3616
3663
  return;
3617
3664
  }
@@ -3639,7 +3686,7 @@ var StreamHandler = class {
3639
3686
  }
3640
3687
  }
3641
3688
  trackPendingFlush(e) {
3642
- if (!Ps(e)) {
3689
+ if (!Yr(e)) {
3643
3690
  return;
3644
3691
  }
3645
3692
  const t = Promise.resolve(e).finally(() => {
@@ -3761,7 +3808,7 @@ var renderToStream = async (e, t) => {
3761
3808
  };
3762
3809
 
3763
3810
  function resolveManifest(e) {
3764
- const t = Qf();
3811
+ const t = Ea();
3765
3812
  const n = e ? {
3766
3813
  ...t,
3767
3814
  ...e
@@ -3773,7 +3820,7 @@ function resolveManifest(e) {
3773
3820
  const e = {};
3774
3821
  for (const t in n.mapping) {
3775
3822
  const r = n.mapping[t];
3776
- e[Rh(t)] = [ t, r ];
3823
+ e[sd(t)] = [ t, r ];
3777
3824
  }
3778
3825
  return {
3779
3826
  mapper: e,
@@ -3788,7 +3835,7 @@ var Q_FUNCS_PREFIX = 'document["qFuncs_HASH"]=';
3788
3835
 
3789
3836
  // packages/qwik/src/server/index.ts
3790
3837
  async function setServerPlatform2(e) {
3791
- const t = Us({
3838
+ const t = pi({
3792
3839
  manifest: e
3793
3840
  }, resolveManifest(e));
3794
3841
  setPlatform2(t);