@qwik.dev/core 2.0.0-alpha.1 → 2.0.0-alpha.3
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.
- package/bindings/qwik.darwin-arm64.node +0 -0
- package/bindings/qwik.darwin-x64.node +0 -0
- package/bindings/qwik.linux-x64-gnu.node +0 -0
- package/bindings/qwik.wasm.cjs +259 -272
- package/bindings/qwik.wasm.mjs +259 -272
- package/bindings/qwik.win32-x64-msvc.node +0 -0
- package/bindings/qwik_wasm_bg.wasm +0 -0
- package/dist/build/package.json +1 -1
- package/dist/cli.cjs +1384 -761
- package/dist/core-internal.d.ts +14 -4
- package/dist/core.cjs +121 -106
- package/dist/core.cjs.map +1 -1
- package/dist/core.min.mjs +1 -1
- package/dist/core.mjs +121 -106
- package/dist/core.mjs.map +1 -1
- package/dist/core.prod.cjs +80 -63
- package/dist/core.prod.mjs +82 -65
- package/dist/insights/index.qwik.cjs +1 -1
- package/dist/insights/index.qwik.mjs +1 -1
- package/dist/loader/index.cjs +2 -2
- package/dist/loader/index.mjs +2 -2
- package/dist/loader/package.json +1 -1
- package/dist/optimizer.cjs +94 -80
- package/dist/optimizer.mjs +96 -82
- package/dist/prefetch/package.json +1 -1
- package/dist/qwikloader.debug.js +1 -0
- package/dist/qwikloader.js +2 -2
- package/dist/server.cjs +125 -96
- package/dist/server.mjs +125 -96
- package/dist/starters/features/auth/package.json +3 -1
- package/dist/starters/features/drizzle/package.json +2 -1
- package/dist/starters/features/postcss/package.json +3 -0
- package/dist/starters/features/prisma/package.json +2 -1
- package/dist/starters/features/tailwind/package.json +3 -0
- package/dist/starters/features/turso/package.json +4 -1
- package/dist/testing/index.cjs +121 -92
- package/dist/testing/index.mjs +121 -92
- package/dist/testing/package.json +1 -1
- package/package.json +6 -4
package/dist/server.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* @qwik.dev/core/server 2.0.0-alpha.
|
|
3
|
+
* @qwik.dev/core/server 2.0.0-alpha.3-dev+418fd6d
|
|
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
|
|
@@ -691,6 +691,11 @@ var SsrNode = class {
|
|
|
691
691
|
return `SSRNode [<${this.id}> ${stringifiedAttrs}]`;
|
|
692
692
|
}
|
|
693
693
|
};
|
|
694
|
+
var DomRef = class {
|
|
695
|
+
constructor($ssrNode$) {
|
|
696
|
+
this.$ssrNode$ = $ssrNode$;
|
|
697
|
+
}
|
|
698
|
+
};
|
|
694
699
|
var SsrComponentFrame = class {
|
|
695
700
|
constructor(componentNode) {
|
|
696
701
|
this.componentNode = componentNode;
|
|
@@ -990,7 +995,7 @@ function getBuildBase(opts) {
|
|
|
990
995
|
return `${import_meta.env.BASE_URL}build/`;
|
|
991
996
|
}
|
|
992
997
|
var versions = {
|
|
993
|
-
qwik: "2.0.0-alpha.
|
|
998
|
+
qwik: "2.0.0-alpha.3-dev+418fd6d",
|
|
994
999
|
qwikDom: "2.1.19"
|
|
995
1000
|
};
|
|
996
1001
|
|
|
@@ -1185,6 +1190,20 @@ var StoreHandler = class {
|
|
|
1185
1190
|
if (prop === STORE_TARGET) {
|
|
1186
1191
|
return true;
|
|
1187
1192
|
}
|
|
1193
|
+
if (typeof prop === "string") {
|
|
1194
|
+
const ctx = tryGetInvokeContext();
|
|
1195
|
+
if (ctx) {
|
|
1196
|
+
const effectSubscriber = ctx.$effectSubscriber$;
|
|
1197
|
+
if (effectSubscriber) {
|
|
1198
|
+
addEffect(
|
|
1199
|
+
target,
|
|
1200
|
+
Array.isArray(target) ? STORE_ARRAY_PROP : prop,
|
|
1201
|
+
this,
|
|
1202
|
+
effectSubscriber
|
|
1203
|
+
);
|
|
1204
|
+
}
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1188
1207
|
return Object.prototype.hasOwnProperty.call(target, prop);
|
|
1189
1208
|
}
|
|
1190
1209
|
ownKeys(target) {
|
|
@@ -1979,46 +1998,45 @@ var vnode_diff = (container, jsxNode, vStartNode, scopedStyleIdPrefix) => {
|
|
|
1979
1998
|
}
|
|
1980
1999
|
}
|
|
1981
2000
|
function descendContentToProject(children, host) {
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
const slotName = prop;
|
|
1995
|
-
projections.push(slotName);
|
|
1996
|
-
projections.push(createProjectionJSXNode(slotName));
|
|
1997
|
-
}
|
|
2001
|
+
const projectionChildren = Array.isArray(children) ? children : [children];
|
|
2002
|
+
const createProjectionJSXNode = (slotName) => {
|
|
2003
|
+
return new JSXNodeImpl(Projection, EMPTY_OBJ, null, [], 0, slotName);
|
|
2004
|
+
};
|
|
2005
|
+
const projections = [];
|
|
2006
|
+
if (host) {
|
|
2007
|
+
for (let i = vnode_getPropStartIndex(host); i < host.length; i = i + 2) {
|
|
2008
|
+
const prop = host[i];
|
|
2009
|
+
if (isSlotProp(prop)) {
|
|
2010
|
+
const slotName = prop;
|
|
2011
|
+
projections.push(slotName);
|
|
2012
|
+
projections.push(createProjectionJSXNode(slotName));
|
|
1998
2013
|
}
|
|
1999
2014
|
}
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
}
|
|
2015
|
+
}
|
|
2016
|
+
if (projections.length === 0 && children == null) {
|
|
2017
|
+
return;
|
|
2018
|
+
}
|
|
2019
|
+
for (let i = 0; i < projectionChildren.length; i++) {
|
|
2020
|
+
const child = projectionChildren[i];
|
|
2021
|
+
const slotName = String(
|
|
2022
|
+
isJSXNode2(child) && directGetPropsProxyProp(child, QSlot) || QDefaultSlot
|
|
2023
|
+
);
|
|
2024
|
+
const idx = mapApp_findIndx(projections, slotName, 0);
|
|
2025
|
+
let jsxBucket;
|
|
2026
|
+
if (idx >= 0) {
|
|
2027
|
+
jsxBucket = projections[idx + 1];
|
|
2028
|
+
} else {
|
|
2029
|
+
projections.splice(~idx, 0, slotName, jsxBucket = createProjectionJSXNode(slotName));
|
|
2016
2030
|
}
|
|
2017
|
-
|
|
2018
|
-
|
|
2031
|
+
const removeProjection = child === false;
|
|
2032
|
+
if (!removeProjection) {
|
|
2033
|
+
jsxBucket.children.push(child);
|
|
2019
2034
|
}
|
|
2020
|
-
descend(projections, true);
|
|
2021
2035
|
}
|
|
2036
|
+
for (let i = projections.length - 2; i >= 0; i = i - 2) {
|
|
2037
|
+
projections.splice(i, 1);
|
|
2038
|
+
}
|
|
2039
|
+
descend(projections, true);
|
|
2022
2040
|
}
|
|
2023
2041
|
function expectProjection() {
|
|
2024
2042
|
const jsxNode2 = jsxValue;
|
|
@@ -2470,7 +2488,7 @@ var vnode_diff = (container, jsxNode, vStartNode, scopedStyleIdPrefix) => {
|
|
|
2470
2488
|
container.$scheduler$(7 /* COMPONENT */, host, componentQRL, jsxProps);
|
|
2471
2489
|
}
|
|
2472
2490
|
}
|
|
2473
|
-
|
|
2491
|
+
descendContentToProject(jsxNode2.children, host);
|
|
2474
2492
|
} else {
|
|
2475
2493
|
const lookupKey = jsxNode2.key;
|
|
2476
2494
|
const vNodeLookupKey = getKey(host);
|
|
@@ -2784,7 +2802,17 @@ var createScheduler = (container, scheduleDrain, journalFlush) => {
|
|
|
2784
2802
|
chore.$payload$
|
|
2785
2803
|
),
|
|
2786
2804
|
(jsx3) => {
|
|
2787
|
-
|
|
2805
|
+
if (chore.$type$ === 7 /* COMPONENT */) {
|
|
2806
|
+
const styleScopedId = container.getHostProp(host, QScopedStyle);
|
|
2807
|
+
return vnode_diff(
|
|
2808
|
+
container,
|
|
2809
|
+
jsx3,
|
|
2810
|
+
host,
|
|
2811
|
+
addComponentStylePrefix(styleScopedId)
|
|
2812
|
+
);
|
|
2813
|
+
} else {
|
|
2814
|
+
return jsx3;
|
|
2815
|
+
}
|
|
2788
2816
|
},
|
|
2789
2817
|
(err) => container.handleError(err, host)
|
|
2790
2818
|
);
|
|
@@ -2873,7 +2901,10 @@ function choreComparator(a, b, shouldThrowOnHostMismatch) {
|
|
|
2873
2901
|
return hostDiff;
|
|
2874
2902
|
}
|
|
2875
2903
|
} else {
|
|
2876
|
-
const errorMessage =
|
|
2904
|
+
const errorMessage = `SERVER: during HTML streaming, re-running tasks on a different host is not allowed.
|
|
2905
|
+
You are attempting to change a state that has already been streamed to the client.
|
|
2906
|
+
This can lead to inconsistencies between Server-Side Rendering (SSR) and Client-Side Rendering (CSR).
|
|
2907
|
+
Problematic Node: ${aHost.toString()}`;
|
|
2877
2908
|
if (shouldThrowOnHostMismatch) {
|
|
2878
2909
|
throwErrorAndStop(errorMessage);
|
|
2879
2910
|
}
|
|
@@ -3044,9 +3075,11 @@ var isTask = (value) => {
|
|
|
3044
3075
|
return value instanceof Task;
|
|
3045
3076
|
};
|
|
3046
3077
|
|
|
3078
|
+
// packages/qwik/src/core/signal/flags.ts
|
|
3079
|
+
var NEEDS_COMPUTATION = Symbol("invalid");
|
|
3080
|
+
|
|
3047
3081
|
// packages/qwik/src/core/signal/signal.ts
|
|
3048
3082
|
var DEBUG3 = false;
|
|
3049
|
-
var NEEDS_COMPUTATION = Symbol("invalid");
|
|
3050
3083
|
var log2 = (...args) => console.log("SIGNAL", ...args.map(qwikDebugToString));
|
|
3051
3084
|
var throwIfQRLNotResolved = (qrl) => {
|
|
3052
3085
|
const resolved = qrl.resolved;
|
|
@@ -3382,7 +3415,7 @@ var WrappedSignal = class extends Signal {
|
|
|
3382
3415
|
};
|
|
3383
3416
|
|
|
3384
3417
|
// packages/qwik/src/core/version.ts
|
|
3385
|
-
var version = "2.0.0-alpha.
|
|
3418
|
+
var version = "2.0.0-alpha.3-dev+418fd6d";
|
|
3386
3419
|
|
|
3387
3420
|
// packages/qwik/src/core/shared/shared-container.ts
|
|
3388
3421
|
var _SharedContainer = class {
|
|
@@ -3409,9 +3442,10 @@ var _SharedContainer = class {
|
|
|
3409
3442
|
trackSignalValue(signal, subscriber, property, data) {
|
|
3410
3443
|
return trackSignal(() => signal.value, subscriber, property, this, data);
|
|
3411
3444
|
}
|
|
3412
|
-
serializationCtxFactory(NodeConstructor, symbolToChunkResolver, writer, prepVNodeData) {
|
|
3445
|
+
serializationCtxFactory(NodeConstructor, DomRefConstructor, symbolToChunkResolver, writer, prepVNodeData) {
|
|
3413
3446
|
return createSerializationContext(
|
|
3414
3447
|
NodeConstructor,
|
|
3448
|
+
DomRefConstructor,
|
|
3415
3449
|
symbolToChunkResolver,
|
|
3416
3450
|
this.getHostProp.bind(this),
|
|
3417
3451
|
this.setHostProp.bind(this),
|
|
@@ -5703,10 +5737,6 @@ var DomContainer = class extends _SharedContainer {
|
|
|
5703
5737
|
parseQRL(qrl) {
|
|
5704
5738
|
return inflateQRL(this, parseQRL(qrl));
|
|
5705
5739
|
}
|
|
5706
|
-
processJsx(host, jsx2) {
|
|
5707
|
-
const styleScopedId = this.getHostProp(host, QScopedStyle);
|
|
5708
|
-
return vnode_diff(this, jsx2, host, addComponentStylePrefix(styleScopedId));
|
|
5709
|
-
}
|
|
5710
5740
|
handleError(err, host) {
|
|
5711
5741
|
if (qDev) {
|
|
5712
5742
|
if (typeof document !== "undefined") {
|
|
@@ -5977,7 +6007,9 @@ var inflate = (container, target, typeId, data) => {
|
|
|
5977
6007
|
if (valType === 0 /* RootRef */ || valType >= 12 /* Error */) {
|
|
5978
6008
|
Object.defineProperty(target, key, {
|
|
5979
6009
|
get() {
|
|
5980
|
-
|
|
6010
|
+
const value = deserializeData(container, valType, valData);
|
|
6011
|
+
target[key] = value;
|
|
6012
|
+
return value;
|
|
5981
6013
|
},
|
|
5982
6014
|
set(value) {
|
|
5983
6015
|
Object.defineProperty(target, key, {
|
|
@@ -6301,12 +6333,8 @@ function inflateQRL(container, qrl) {
|
|
|
6301
6333
|
}
|
|
6302
6334
|
return qrl;
|
|
6303
6335
|
}
|
|
6304
|
-
var
|
|
6305
|
-
|
|
6306
|
-
this.id = id;
|
|
6307
|
-
}
|
|
6308
|
-
};
|
|
6309
|
-
var createSerializationContext = (NodeConstructor, symbolToChunkResolver, getProp, setProp, storeProxyMap, writer, prepVNodeData) => {
|
|
6336
|
+
var isDomRef = (obj) => false;
|
|
6337
|
+
var createSerializationContext = (NodeConstructor, DomRefConstructor, symbolToChunkResolver, getProp, setProp, storeProxyMap, writer, prepVNodeData) => {
|
|
6310
6338
|
if (!writer) {
|
|
6311
6339
|
const buffer = [];
|
|
6312
6340
|
writer = {
|
|
@@ -6330,11 +6358,13 @@ var createSerializationContext = (NodeConstructor, symbolToChunkResolver, getPro
|
|
|
6330
6358
|
return id;
|
|
6331
6359
|
};
|
|
6332
6360
|
const isSsrNode = NodeConstructor ? (obj) => obj instanceof NodeConstructor : () => false;
|
|
6361
|
+
isDomRef = DomRefConstructor ? (obj) => obj instanceof DomRefConstructor : () => false;
|
|
6333
6362
|
return {
|
|
6334
6363
|
$serialize$() {
|
|
6335
6364
|
serialize(this);
|
|
6336
6365
|
},
|
|
6337
6366
|
$isSsrNode$: isSsrNode,
|
|
6367
|
+
$isDomRef$: isDomRef,
|
|
6338
6368
|
$symbolToChunkResolver$: symbolToChunkResolver,
|
|
6339
6369
|
$wasSeen$,
|
|
6340
6370
|
$roots$: roots,
|
|
@@ -6443,6 +6473,8 @@ var createSerializationContext = (NodeConstructor, symbolToChunkResolver, getPro
|
|
|
6443
6473
|
discoveredValues.push(obj.$el$, obj.$qrl$, obj.$state$, obj.$effectDependencies$);
|
|
6444
6474
|
} else if (isSsrNode(obj)) {
|
|
6445
6475
|
discoveredValues.push(obj.vnodeData);
|
|
6476
|
+
} else if (isDomRef(obj)) {
|
|
6477
|
+
discoveredValues.push(obj.$ssrNode$.id);
|
|
6446
6478
|
} else if (isJSXNode2(obj)) {
|
|
6447
6479
|
discoveredValues.push(obj.type, obj.props, obj.constProps, obj.children);
|
|
6448
6480
|
} else if (Array.isArray(obj)) {
|
|
@@ -6497,7 +6529,7 @@ var createSerializationContext = (NodeConstructor, symbolToChunkResolver, getPro
|
|
|
6497
6529
|
};
|
|
6498
6530
|
var promiseResults = /* @__PURE__ */ new WeakMap();
|
|
6499
6531
|
function serialize(serializationContext) {
|
|
6500
|
-
const { $writer$, $isSsrNode$, $setProp$, $storeProxyMap$ } = serializationContext;
|
|
6532
|
+
const { $writer$, $isSsrNode$, $isDomRef$, $setProp$, $storeProxyMap$ } = serializationContext;
|
|
6501
6533
|
let depth = -1;
|
|
6502
6534
|
let writeType = false;
|
|
6503
6535
|
const output = (type, value) => {
|
|
@@ -6666,14 +6698,11 @@ function serialize(serializationContext) {
|
|
|
6666
6698
|
}
|
|
6667
6699
|
output(13 /* Object */, out);
|
|
6668
6700
|
}
|
|
6669
|
-
} else if (value
|
|
6670
|
-
|
|
6701
|
+
} else if ($isDomRef$(value)) {
|
|
6702
|
+
value.$ssrNode$.vnodeData[0] |= 8 /* SERIALIZE */;
|
|
6703
|
+
output(9 /* RefVNode */, value.$ssrNode$.id);
|
|
6671
6704
|
} else if (value instanceof Signal) {
|
|
6672
|
-
|
|
6673
|
-
if ($isSsrNode$(v)) {
|
|
6674
|
-
serializationContext.$addRoot$(v);
|
|
6675
|
-
v = new DomVRef(v.id);
|
|
6676
|
-
}
|
|
6705
|
+
const v = value instanceof ComputedSignal && (value.$invalid$ || fastSkipSerialize(value.$untrackedValue$)) ? NEEDS_COMPUTATION : value.$untrackedValue$;
|
|
6677
6706
|
if (value instanceof WrappedSignal) {
|
|
6678
6707
|
output(23 /* WrappedSignal */, [
|
|
6679
6708
|
...serializeWrappingFn(serializationContext, value),
|
|
@@ -6936,6 +6965,8 @@ var canSerialize = (value) => {
|
|
|
6936
6965
|
return true;
|
|
6937
6966
|
} else if (value instanceof Uint8Array) {
|
|
6938
6967
|
return true;
|
|
6968
|
+
} else if (isDomRef == null ? void 0 : isDomRef(value)) {
|
|
6969
|
+
return true;
|
|
6939
6970
|
}
|
|
6940
6971
|
} else if (typeof value === "function") {
|
|
6941
6972
|
if (isQrl2(value) || isQwikComponent(value)) {
|
|
@@ -7060,8 +7091,8 @@ var createQRL = (chunk, symbol, symbolRef, symbolFn, capture, captureRef, refSym
|
|
|
7060
7091
|
}
|
|
7061
7092
|
let _containerEl;
|
|
7062
7093
|
const qrl = async function(...args) {
|
|
7063
|
-
const
|
|
7064
|
-
const result = await
|
|
7094
|
+
const boundedFn = bindFnToContext.call(this, tryGetInvokeContext());
|
|
7095
|
+
const result = await boundedFn(...args);
|
|
7065
7096
|
return result;
|
|
7066
7097
|
};
|
|
7067
7098
|
const setContainer = (el) => {
|
|
@@ -7070,6 +7101,30 @@ var createQRL = (chunk, symbol, symbolRef, symbolFn, capture, captureRef, refSym
|
|
|
7070
7101
|
}
|
|
7071
7102
|
return _containerEl;
|
|
7072
7103
|
};
|
|
7104
|
+
function bindFnToContext(currentCtx, beforeFn) {
|
|
7105
|
+
return (...args) => maybeThen(resolveLazy(), (fn) => {
|
|
7106
|
+
if (!isFunction(fn)) {
|
|
7107
|
+
throw qError(QError_qrlIsNotFunction);
|
|
7108
|
+
}
|
|
7109
|
+
if (beforeFn && beforeFn() === false) {
|
|
7110
|
+
return;
|
|
7111
|
+
}
|
|
7112
|
+
const context = createOrReuseInvocationContext(currentCtx);
|
|
7113
|
+
const prevQrl = context.$qrl$;
|
|
7114
|
+
const prevEvent = context.$event$;
|
|
7115
|
+
context.$qrl$ = qrl;
|
|
7116
|
+
context.$event$ ||= this;
|
|
7117
|
+
try {
|
|
7118
|
+
return invoke.call(this, context, fn, ...args);
|
|
7119
|
+
} finally {
|
|
7120
|
+
context.$qrl$ = prevQrl;
|
|
7121
|
+
context.$event$ = prevEvent;
|
|
7122
|
+
}
|
|
7123
|
+
});
|
|
7124
|
+
}
|
|
7125
|
+
const resolveLazy = (containerEl) => {
|
|
7126
|
+
return symbolRef !== null ? symbolRef : resolve(containerEl);
|
|
7127
|
+
};
|
|
7073
7128
|
const wrapFn = (fn) => {
|
|
7074
7129
|
if (typeof fn !== "function" || !(capture == null ? void 0 : capture.length) && !(captureRef == null ? void 0 : captureRef.length)) {
|
|
7075
7130
|
return fn;
|
|
@@ -7119,30 +7174,6 @@ var createQRL = (chunk, symbol, symbolRef, symbolFn, capture, captureRef, refSym
|
|
|
7119
7174
|
}
|
|
7120
7175
|
return symbolRef;
|
|
7121
7176
|
};
|
|
7122
|
-
const resolveLazy = (containerEl) => {
|
|
7123
|
-
return symbolRef !== null ? symbolRef : resolve(containerEl);
|
|
7124
|
-
};
|
|
7125
|
-
function invokeFn(currentCtx, beforeFn) {
|
|
7126
|
-
return (...args) => maybeThen(resolveLazy(), (f) => {
|
|
7127
|
-
if (!isFunction(f)) {
|
|
7128
|
-
throw qError(QError_qrlIsNotFunction);
|
|
7129
|
-
}
|
|
7130
|
-
if (beforeFn && beforeFn() === false) {
|
|
7131
|
-
return;
|
|
7132
|
-
}
|
|
7133
|
-
const context = createOrReuseInvocationContext(currentCtx);
|
|
7134
|
-
const prevQrl = context.$qrl$;
|
|
7135
|
-
const prevEvent = context.$event$;
|
|
7136
|
-
context.$qrl$ = qrl;
|
|
7137
|
-
context.$event$ ||= this;
|
|
7138
|
-
try {
|
|
7139
|
-
return invoke.call(this, context, f, ...args);
|
|
7140
|
-
} finally {
|
|
7141
|
-
context.$qrl$ = prevQrl;
|
|
7142
|
-
context.$event$ = prevEvent;
|
|
7143
|
-
}
|
|
7144
|
-
});
|
|
7145
|
-
}
|
|
7146
7177
|
const createOrReuseInvocationContext = (invoke2) => {
|
|
7147
7178
|
if (invoke2 == null) {
|
|
7148
7179
|
return newInvokeContext();
|
|
@@ -7165,7 +7196,7 @@ var createQRL = (chunk, symbol, symbolRef, symbolFn, capture, captureRef, refSym
|
|
|
7165
7196
|
$symbol$: symbol,
|
|
7166
7197
|
$refSymbol$: refSymbol,
|
|
7167
7198
|
$hash$: hash2,
|
|
7168
|
-
getFn:
|
|
7199
|
+
getFn: bindFnToContext,
|
|
7169
7200
|
$capture$: capture,
|
|
7170
7201
|
$captureRef$: captureRef,
|
|
7171
7202
|
dev: null,
|
|
@@ -7867,6 +7898,7 @@ var SSRContainer = class extends import_core3._SharedContainer {
|
|
|
7867
7898
|
};
|
|
7868
7899
|
this.serializationCtx = this.serializationCtxFactory(
|
|
7869
7900
|
SsrNode,
|
|
7901
|
+
DomRef,
|
|
7870
7902
|
this.symbolToChunkResolver,
|
|
7871
7903
|
opts.writer,
|
|
7872
7904
|
(vNodeData) => this.addVNodeToSerializationRoots(vNodeData)
|
|
@@ -7882,9 +7914,6 @@ var SSRContainer = class extends import_core3._SharedContainer {
|
|
|
7882
7914
|
}
|
|
7883
7915
|
ensureProjectionResolved(host) {
|
|
7884
7916
|
}
|
|
7885
|
-
processJsx(host, jsx2) {
|
|
7886
|
-
throw new Error("Should not get here.");
|
|
7887
|
-
}
|
|
7888
7917
|
handleError(err, $host$) {
|
|
7889
7918
|
throw err;
|
|
7890
7919
|
}
|
|
@@ -8640,10 +8669,10 @@ var SSRContainer = class extends import_core3._SharedContainer {
|
|
|
8640
8669
|
if (key === "ref") {
|
|
8641
8670
|
const lastNode = this.getLastNode();
|
|
8642
8671
|
if ((0, import_core3.isSignal)(value)) {
|
|
8643
|
-
value.value = lastNode;
|
|
8672
|
+
value.value = new DomRef(lastNode);
|
|
8644
8673
|
continue;
|
|
8645
8674
|
} else if (typeof value === "function") {
|
|
8646
|
-
value(lastNode);
|
|
8675
|
+
value(new DomRef(lastNode));
|
|
8647
8676
|
continue;
|
|
8648
8677
|
}
|
|
8649
8678
|
}
|
|
@@ -8919,8 +8948,8 @@ function resolveManifest(manifest) {
|
|
|
8919
8948
|
var Q_FUNCS_PREFIX = 'document["qFuncs_HASH"]=';
|
|
8920
8949
|
|
|
8921
8950
|
// packages/qwik/src/server/scripts.ts
|
|
8922
|
-
var QWIK_LOADER_DEFAULT_MINIFIED = '(()=>{var e=Object.defineProperty,t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,
|
|
8923
|
-
var QWIK_LOADER_DEFAULT_DEBUG = '(() => {\n var __defProp = Object.defineProperty;\n var __getOwnPropSymbols = Object.getOwnPropertySymbols;\n var __hasOwnProp = Object.prototype.hasOwnProperty;\n var __propIsEnum = Object.prototype.propertyIsEnumerable;\n var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {\n enumerable: !0,\n configurable: !0,\n writable: !0,\n value: value\n }) : obj[key] = value;\n var __spreadValues = (a, b) => {\n for (var prop in b || (b = {})) {\n __hasOwnProp.call(b, prop) && __defNormalProp(a, prop, b[prop]);\n }\n if (__getOwnPropSymbols) {\n for (var prop of __getOwnPropSymbols(b)) {\n __propIsEnum.call(b, prop) && __defNormalProp(a, prop, b[prop]);\n }\n }\n return a;\n };\n ((doc, hasInitialized) => {\n const Q_CONTEXT = "__q_context__";\n const win = window;\n const events = new Set;\n const roots = new Set([ doc ]);\n const nativeQuerySelectorAll = (root, selector) => Array.from(root.querySelectorAll(selector));\n const querySelectorAll = query => {\n const elements = [];\n roots.forEach((root => elements.push(...nativeQuerySelectorAll(root, query))));\n return elements;\n };\n const findShadowRoots = fragment => {\n processEventOrNode(fragment);\n nativeQuerySelectorAll(fragment, "[q\\\\:shadowroot]").forEach((parent => {\n const shadowRoot = parent.shadowRoot;\n shadowRoot && findShadowRoots(shadowRoot);\n }));\n };\n const isPromise = promise => promise && "function" == typeof promise.then;\n const broadcast = (infix, ev, type = ev.type) => {\n querySelectorAll("[on" + infix + "\\\\:" + type + "]").forEach((el => dispatch(el, infix, ev, type)));\n };\n const resolveContainer = containerEl => {\n if (void 0 === containerEl._qwikjson_) {\n let script = (containerEl === doc.documentElement ? doc.body : containerEl).lastElementChild;\n while (script) {\n if ("SCRIPT" === script.tagName && "qwik/json" === script.getAttribute("type")) {\n containerEl._qwikjson_ = JSON.parse(script.textContent.replace(/\\\\x3C(\\/?script)/gi, "<$1"));\n break;\n }\n script = script.previousElementSibling;\n }\n }\n };\n const createEvent = (eventName, detail) => new CustomEvent(eventName, {\n detail: detail\n });\n const dispatch = async (element, scope, ev, eventName = ev.type) => {\n const attrName = "on" + scope + ":" + eventName;\n element.hasAttribute("preventdefault:" + eventName) && ev.preventDefault();\n const ctx = element._qc_;\n const relevantListeners = ctx && ctx.li.filter((li => li[0] === attrName));\n if (relevantListeners && relevantListeners.length > 0) {\n for (const listener of relevantListeners) {\n const results = listener[1].getFn([ element, ev ], (() => element.isConnected))(ev, element);\n const cancelBubble = ev.cancelBubble;\n isPromise(results) && await results;\n cancelBubble && ev.stopPropagation();\n }\n return;\n }\n const qDispatchEvent = element.qDispatchEvent;\n if (qDispatchEvent) {\n return qDispatchEvent(ev, scope);\n }\n const attrValue = element.getAttribute(attrName);\n if (attrValue) {\n const container = element.closest("[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])");\n const qBase = container.getAttribute("q:base");\n const qVersion = container.getAttribute("q:version") || "unknown";\n const qManifest = container.getAttribute("q:manifest-hash") || "dev";\n const base = new URL(qBase, doc.baseURI);\n for (const qrl of attrValue.split("\\n")) {\n const url = new URL(qrl, base);\n const href = url.href;\n const symbol = url.hash.replace(/^#?([^?[|]*).*$/, "$1") || "default";\n const reqTime = performance.now();\n let handler;\n let importError;\n let error;\n const isSync = qrl.startsWith("#");\n const eventData = {\n qBase: qBase,\n qManifest: qManifest,\n qVersion: qVersion,\n href: href,\n symbol: symbol,\n element: element,\n reqTime: reqTime\n };\n if (isSync) {\n const hash = container.getAttribute("q:instance");\n handler = (doc["qFuncs_" + hash] || [])[Number.parseInt(symbol)];\n if (!handler) {\n importError = "sync";\n error = new Error("sync handler error for symbol: " + symbol);\n }\n } else {\n const uri = url.href.split("#")[0];\n try {\n const module = import(\n uri);\n resolveContainer(container);\n handler = (await module)[symbol];\n if (!handler) {\n importError = "no-symbol";\n error = new Error(`${symbol} not in ${uri}`);\n }\n } catch (err) {\n importError || (importError = "async");\n error = err;\n }\n }\n if (!handler) {\n emitEvent("qerror", __spreadValues({\n importError: importError,\n error: error\n }, eventData));\n console.error(error);\n break;\n }\n const previousCtx = doc[Q_CONTEXT];\n if (element.isConnected) {\n const handleEvent = async (retryCount = 0) => {\n try {\n doc[Q_CONTEXT] = [ element, ev, url ];\n isSync || emitEvent("qsymbol", __spreadValues({}, eventData));\n const results = handler(ev, element);\n isPromise(results) && await results;\n } catch (error2) {\n isPromise(error2) && retryCount < 100 ? error2.then((() => handleEvent(retryCount++))) : emitEvent("qerror", __spreadValues({\n error: error2\n }, eventData));\n } finally {\n doc[Q_CONTEXT] = previousCtx;\n }\n };\n handleEvent();\n }\n }\n }\n };\n const emitEvent = (eventName, detail) => {\n doc.dispatchEvent(createEvent(eventName, detail));\n };\n const camelToKebab = str => str.replace(/([A-Z])/g, (a => "-" + a.toLowerCase()));\n const processDocumentEvent = async ev => {\n let type = camelToKebab(ev.type);\n let element = ev.target;\n broadcast("-document", ev, type);\n while (element && element.getAttribute) {\n const results = dispatch(element, "", ev, type);\n let cancelBubble = ev.cancelBubble;\n isPromise(results) && await results;\n cancelBubble = cancelBubble || ev.cancelBubble || element.hasAttribute("stoppropagation:" + ev.type);\n element = ev.bubbles && !0 !== cancelBubble ? element.parentElement : null;\n }\n };\n const processWindowEvent = ev => {\n broadcast("-window", ev, camelToKebab(ev.type));\n };\n const processReadyStateChange = () => {\n var _a;\n const readyState = doc.readyState;\n if (!hasInitialized && ("interactive" == readyState || "complete" == readyState)) {\n roots.forEach(findShadowRoots);\n hasInitialized = 1;\n emitEvent("qinit");\n (null != (_a = win.requestIdleCallback) ? _a : win.setTimeout).bind(win)((() => emitEvent("qidle")));\n if (events.has("qvisible")) {\n const results = querySelectorAll("[on\\\\:qvisible]");\n const observer = new IntersectionObserver((entries => {\n for (const entry of entries) {\n if (entry.isIntersecting) {\n observer.unobserve(entry.target);\n dispatch(entry.target, "", createEvent("qvisible", entry));\n }\n }\n }));\n results.forEach((el => observer.observe(el)));\n }\n }\n };\n const addEventListener = (el, eventName, handler, capture = !1) => el.addEventListener(eventName, handler, {\n capture: capture,\n passive: !1\n });\n const processEventOrNode = (...eventNames) => {\n for (const eventNameOrNode of eventNames) {\n if ("string" == typeof eventNameOrNode) {\n if (!events.has(eventNameOrNode)) {\n roots.forEach((root => addEventListener(root, eventNameOrNode, processDocumentEvent, !0)));\n addEventListener(win, eventNameOrNode, processWindowEvent, !0);\n events.add(eventNameOrNode);\n }\n } else if (!roots.has(eventNameOrNode)) {\n events.forEach((eventName => addEventListener(eventNameOrNode, eventName, processDocumentEvent, !0)));\n roots.add(eventNameOrNode);\n }\n }\n };\n if (!(Q_CONTEXT in doc)) {\n doc[Q_CONTEXT] = 0;\n const qwikevents = win.qwikevents;\n Array.isArray(qwikevents) && processEventOrNode(...qwikevents);\n win.qwikevents = {\n events: events,\n roots: roots,\n push: processEventOrNode\n };\n addEventListener(doc, "readystatechange", processReadyStateChange);\n processReadyStateChange();\n }\n })(document);\n})()';
|
|
8951
|
+
var QWIK_LOADER_DEFAULT_MINIFIED = '(()=>{var e=Object.defineProperty,t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,r=(t,n,o)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[n]=o,s=(e,s)=>{for(var a in s||(s={}))n.call(s,a)&&r(e,a,s[a]);if(t)for(var a of t(s))o.call(s,a)&&r(e,a,s[a]);return e};((e,t)=>{const n="__q_context__",o=window,r=new Set,a=new Set([e]),i="replace",c="forEach",l="target",f="getAttribute",p="isConnected",b="qvisible",u="_qwikjson_",h=(e,t)=>Array.from(e.querySelectorAll(t)),y=e=>{const t=[];return a.forEach((n=>t.push(...h(n,e)))),t},d=e=>{S(e),h(e,"[q\\\\:shadowroot]").forEach((e=>{const t=e.shadowRoot;t&&d(t)}))},q=e=>e&&"function"==typeof e.then,m=(e,t,n=t.type)=>{y("[on"+e+"\\\\:"+n+"]")[c]((o=>g(o,e,t,n)))},w=t=>{if(void 0===t[u]){let n=(t===e.documentElement?e.body:t).lastElementChild;for(;n;){if("SCRIPT"===n.tagName&&"qwik/json"===n[f]("type")){t[u]=JSON.parse(n.textContent[i](/\\\\x3C(\\/?script)/gi,"<$1"));break}n=n.previousElementSibling}}},v=(e,t)=>new CustomEvent(e,{detail:t}),g=async(t,o,r,a=r.type)=>{const c="on"+o+":"+a;t.hasAttribute("preventdefault:"+a)&&r.preventDefault(),t.hasAttribute("stoppropagation:"+a)&&r.stopPropagation();const l=t._qc_,b=l&&l.li.filter((e=>e[0]===c));if(b&&b.length>0){for(const e of b){const n=e[1].getFn([t,r],(()=>t[p]))(r,t),o=r.cancelBubble;q(n)&&await n,o&&r.stopPropagation()}return}const u=t.qDispatchEvent;if(u)return u(r,o);const h=t[f](c);if(h){const o=t.closest("[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])"),a=o[f]("q:base"),c=o[f]("q:version")||"unknown",l=o[f]("q:manifest-hash")||"dev",b=new URL(a,e.baseURI);for(const f of h.split("\\n")){const u=new URL(f,b),h=u.href,y=u.hash[i](/^#?([^?[|]*).*$/,"$1")||"default",d=performance.now();let m,v,g;const A=f.startsWith("#"),_={qBase:a,qManifest:l,qVersion:c,href:h,symbol:y,element:t,reqTime:d};if(A){const t=o.getAttribute("q:instance");m=(e["qFuncs_"+t]||[])[Number.parseInt(y)],m||(v="sync",g=Error("sync handler error for symbol: "+y))}else{const e=u.href.split("#")[0];try{const t=import(e);w(o),m=(await t)[y],m||(v="no-symbol",g=Error(`${y} not in ${e}`))}catch(e){v||(v="async"),g=e}}if(!m){E("qerror",s({importError:v,error:g},_)),console.error(g);break}const k=e[n];if(t[p]){const o=async(a=0)=>{try{e[n]=[t,r,u],A||E("qsymbol",s({},_));const o=m(r,t);q(o)&&await o}catch(e){q(e)&&a<100?e.then((()=>o(a++))):E("qerror",s({error:e},_))}finally{e[n]=k}};o()}}}},E=(t,n)=>{e.dispatchEvent(v(t,n))},A=e=>e[i](/([A-Z])/g,(e=>"-"+e.toLowerCase())),_=async e=>{let t=A(e.type),n=e[l];for(m("-document",e,t);n&&n[f];){const o=g(n,"",e,t);let r=e.cancelBubble;q(o)&&await o,r=r||e.cancelBubble||n.hasAttribute("stoppropagation:"+e.type),n=e.bubbles&&!0!==r?n.parentElement:null}},k=e=>{m("-window",e,A(e.type))},C=()=>{var n;const s=e.readyState;if(!t&&("interactive"==s||"complete"==s)&&(a.forEach(d),t=1,E("qinit"),(null!=(n=o.requestIdleCallback)?n:o.setTimeout).bind(o)((()=>E("qidle"))),r.has(b))){const e=y("[on\\\\:"+b+"]"),t=new IntersectionObserver((e=>{for(const n of e)n.isIntersecting&&(t.unobserve(n[l]),g(n[l],"",v(b,n)))}));e[c]((e=>t.observe(e)))}},O=(e,t,n,o=!1)=>e.addEventListener(t,n,{capture:o,passive:!1}),S=(...e)=>{for(const t of e)"string"==typeof t?r.has(t)||(a.forEach((e=>O(e,t,_,!0))),O(o,t,k,!0),r.add(t)):a.has(t)||(r.forEach((e=>O(t,e,_,!0))),a.add(t))};if(!(n in e)){e[n]=0;const t=o.qwikevents;Array.isArray(t)&&S(...t),o.qwikevents={events:r,roots:a,push:S},O(e,"readystatechange",C),C()}})(document)})()';
|
|
8952
|
+
var QWIK_LOADER_DEFAULT_DEBUG = '(() => {\n var __defProp = Object.defineProperty;\n var __getOwnPropSymbols = Object.getOwnPropertySymbols;\n var __hasOwnProp = Object.prototype.hasOwnProperty;\n var __propIsEnum = Object.prototype.propertyIsEnumerable;\n var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {\n enumerable: !0,\n configurable: !0,\n writable: !0,\n value: value\n }) : obj[key] = value;\n var __spreadValues = (a, b) => {\n for (var prop in b || (b = {})) {\n __hasOwnProp.call(b, prop) && __defNormalProp(a, prop, b[prop]);\n }\n if (__getOwnPropSymbols) {\n for (var prop of __getOwnPropSymbols(b)) {\n __propIsEnum.call(b, prop) && __defNormalProp(a, prop, b[prop]);\n }\n }\n return a;\n };\n ((doc, hasInitialized) => {\n const Q_CONTEXT = "__q_context__";\n const win = window;\n const events = new Set;\n const roots = new Set([ doc ]);\n const nativeQuerySelectorAll = (root, selector) => Array.from(root.querySelectorAll(selector));\n const querySelectorAll = query => {\n const elements = [];\n roots.forEach((root => elements.push(...nativeQuerySelectorAll(root, query))));\n return elements;\n };\n const findShadowRoots = fragment => {\n processEventOrNode(fragment);\n nativeQuerySelectorAll(fragment, "[q\\\\:shadowroot]").forEach((parent => {\n const shadowRoot = parent.shadowRoot;\n shadowRoot && findShadowRoots(shadowRoot);\n }));\n };\n const isPromise = promise => promise && "function" == typeof promise.then;\n const broadcast = (infix, ev, type = ev.type) => {\n querySelectorAll("[on" + infix + "\\\\:" + type + "]").forEach((el => dispatch(el, infix, ev, type)));\n };\n const resolveContainer = containerEl => {\n if (void 0 === containerEl._qwikjson_) {\n let script = (containerEl === doc.documentElement ? doc.body : containerEl).lastElementChild;\n while (script) {\n if ("SCRIPT" === script.tagName && "qwik/json" === script.getAttribute("type")) {\n containerEl._qwikjson_ = JSON.parse(script.textContent.replace(/\\\\x3C(\\/?script)/gi, "<$1"));\n break;\n }\n script = script.previousElementSibling;\n }\n }\n };\n const createEvent = (eventName, detail) => new CustomEvent(eventName, {\n detail: detail\n });\n const dispatch = async (element, scope, ev, eventName = ev.type) => {\n const attrName = "on" + scope + ":" + eventName;\n element.hasAttribute("preventdefault:" + eventName) && ev.preventDefault();\n element.hasAttribute("stoppropagation:" + eventName) && ev.stopPropagation();\n const ctx = element._qc_;\n const relevantListeners = ctx && ctx.li.filter((li => li[0] === attrName));\n if (relevantListeners && relevantListeners.length > 0) {\n for (const listener of relevantListeners) {\n const results = listener[1].getFn([ element, ev ], (() => element.isConnected))(ev, element);\n const cancelBubble = ev.cancelBubble;\n isPromise(results) && await results;\n cancelBubble && ev.stopPropagation();\n }\n return;\n }\n const qDispatchEvent = element.qDispatchEvent;\n if (qDispatchEvent) {\n return qDispatchEvent(ev, scope);\n }\n const attrValue = element.getAttribute(attrName);\n if (attrValue) {\n const container = element.closest("[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])");\n const qBase = container.getAttribute("q:base");\n const qVersion = container.getAttribute("q:version") || "unknown";\n const qManifest = container.getAttribute("q:manifest-hash") || "dev";\n const base = new URL(qBase, doc.baseURI);\n for (const qrl of attrValue.split("\\n")) {\n const url = new URL(qrl, base);\n const href = url.href;\n const symbol = url.hash.replace(/^#?([^?[|]*).*$/, "$1") || "default";\n const reqTime = performance.now();\n let handler;\n let importError;\n let error;\n const isSync = qrl.startsWith("#");\n const eventData = {\n qBase: qBase,\n qManifest: qManifest,\n qVersion: qVersion,\n href: href,\n symbol: symbol,\n element: element,\n reqTime: reqTime\n };\n if (isSync) {\n const hash = container.getAttribute("q:instance");\n handler = (doc["qFuncs_" + hash] || [])[Number.parseInt(symbol)];\n if (!handler) {\n importError = "sync";\n error = new Error("sync handler error for symbol: " + symbol);\n }\n } else {\n const uri = url.href.split("#")[0];\n try {\n const module = import(\n uri);\n resolveContainer(container);\n handler = (await module)[symbol];\n if (!handler) {\n importError = "no-symbol";\n error = new Error(`${symbol} not in ${uri}`);\n }\n } catch (err) {\n importError || (importError = "async");\n error = err;\n }\n }\n if (!handler) {\n emitEvent("qerror", __spreadValues({\n importError: importError,\n error: error\n }, eventData));\n console.error(error);\n break;\n }\n const previousCtx = doc[Q_CONTEXT];\n if (element.isConnected) {\n const handleEvent = async (retryCount = 0) => {\n try {\n doc[Q_CONTEXT] = [ element, ev, url ];\n isSync || emitEvent("qsymbol", __spreadValues({}, eventData));\n const results = handler(ev, element);\n isPromise(results) && await results;\n } catch (error2) {\n isPromise(error2) && retryCount < 100 ? error2.then((() => handleEvent(retryCount++))) : emitEvent("qerror", __spreadValues({\n error: error2\n }, eventData));\n } finally {\n doc[Q_CONTEXT] = previousCtx;\n }\n };\n handleEvent();\n }\n }\n }\n };\n const emitEvent = (eventName, detail) => {\n doc.dispatchEvent(createEvent(eventName, detail));\n };\n const camelToKebab = str => str.replace(/([A-Z])/g, (a => "-" + a.toLowerCase()));\n const processDocumentEvent = async ev => {\n let type = camelToKebab(ev.type);\n let element = ev.target;\n broadcast("-document", ev, type);\n while (element && element.getAttribute) {\n const results = dispatch(element, "", ev, type);\n let cancelBubble = ev.cancelBubble;\n isPromise(results) && await results;\n cancelBubble = cancelBubble || ev.cancelBubble || element.hasAttribute("stoppropagation:" + ev.type);\n element = ev.bubbles && !0 !== cancelBubble ? element.parentElement : null;\n }\n };\n const processWindowEvent = ev => {\n broadcast("-window", ev, camelToKebab(ev.type));\n };\n const processReadyStateChange = () => {\n var _a;\n const readyState = doc.readyState;\n if (!hasInitialized && ("interactive" == readyState || "complete" == readyState)) {\n roots.forEach(findShadowRoots);\n hasInitialized = 1;\n emitEvent("qinit");\n (null != (_a = win.requestIdleCallback) ? _a : win.setTimeout).bind(win)((() => emitEvent("qidle")));\n if (events.has("qvisible")) {\n const results = querySelectorAll("[on\\\\:qvisible]");\n const observer = new IntersectionObserver((entries => {\n for (const entry of entries) {\n if (entry.isIntersecting) {\n observer.unobserve(entry.target);\n dispatch(entry.target, "", createEvent("qvisible", entry));\n }\n }\n }));\n results.forEach((el => observer.observe(el)));\n }\n }\n };\n const addEventListener = (el, eventName, handler, capture = !1) => el.addEventListener(eventName, handler, {\n capture: capture,\n passive: !1\n });\n const processEventOrNode = (...eventNames) => {\n for (const eventNameOrNode of eventNames) {\n if ("string" == typeof eventNameOrNode) {\n if (!events.has(eventNameOrNode)) {\n roots.forEach((root => addEventListener(root, eventNameOrNode, processDocumentEvent, !0)));\n addEventListener(win, eventNameOrNode, processWindowEvent, !0);\n events.add(eventNameOrNode);\n }\n } else if (!roots.has(eventNameOrNode)) {\n events.forEach((eventName => addEventListener(eventNameOrNode, eventName, processDocumentEvent, !0)));\n roots.add(eventNameOrNode);\n }\n }\n };\n if (!(Q_CONTEXT in doc)) {\n doc[Q_CONTEXT] = 0;\n const qwikevents = win.qwikevents;\n Array.isArray(qwikevents) && processEventOrNode(...qwikevents);\n win.qwikevents = {\n events: events,\n roots: roots,\n push: processEventOrNode\n };\n addEventListener(doc, "readystatechange", processReadyStateChange);\n processReadyStateChange();\n }\n })(document);\n})()';
|
|
8924
8953
|
function getQwikLoaderScript(opts = {}) {
|
|
8925
8954
|
return opts.debug ? QWIK_LOADER_DEFAULT_DEBUG : QWIK_LOADER_DEFAULT_MINIFIED;
|
|
8926
8955
|
}
|