@qwik.dev/core 2.0.0-beta.26 → 2.0.0-beta.28
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.linux-x64-gnu.node +0 -0
- package/bindings/qwik.win32-x64-msvc.node +0 -0
- package/bindings/qwik_wasm_bg.wasm +0 -0
- package/dist/backpatch/package.json +1 -1
- package/dist/build/package.json +1 -1
- package/dist/cli.mjs +2 -2
- package/dist/core-internal.d.ts +29 -5
- package/dist/core.min.mjs +1 -1
- package/dist/core.mjs +624 -582
- package/dist/core.mjs.map +1 -1
- package/dist/core.prod.mjs +6105 -6063
- package/dist/insights/index.qwik.mjs +80 -57
- package/dist/loader/package.json +1 -1
- package/dist/optimizer.d.ts +26 -19
- package/dist/optimizer.mjs +1278 -1234
- package/dist/server.mjs +29 -21
- package/dist/server.prod.mjs +3263 -0
- package/dist/starters/features/csr/index.html +4 -0
- package/dist/testing/index.d.ts +10 -1
- package/dist/testing/index.mjs +560 -563
- package/dist/testing/package.json +1 -1
- package/package.json +9 -5
package/dist/optimizer.mjs
CHANGED
|
@@ -1,228 +1,228 @@
|
|
|
1
|
-
function
|
|
2
|
-
function t(
|
|
3
|
-
if (typeof
|
|
4
|
-
throw new TypeError("Path must be a string. Received " + JSON.stringify(
|
|
5
|
-
}
|
|
6
|
-
function i(
|
|
7
|
-
let
|
|
8
|
-
for (let
|
|
9
|
-
if (
|
|
10
|
-
|
|
1
|
+
function jt(e = {}) {
|
|
2
|
+
function t(u) {
|
|
3
|
+
if (typeof u != "string")
|
|
4
|
+
throw new TypeError("Path must be a string. Received " + JSON.stringify(u));
|
|
5
|
+
}
|
|
6
|
+
function i(u, s) {
|
|
7
|
+
let p = "", _ = 0, S = -1, E = 0, c;
|
|
8
|
+
for (let w = 0; w <= u.length; ++w) {
|
|
9
|
+
if (w < u.length)
|
|
10
|
+
c = u.charCodeAt(w);
|
|
11
11
|
else {
|
|
12
|
-
if (
|
|
12
|
+
if (c === 47)
|
|
13
13
|
break;
|
|
14
|
-
|
|
14
|
+
c = 47;
|
|
15
15
|
}
|
|
16
|
-
if (
|
|
17
|
-
if (!(
|
|
18
|
-
if (
|
|
19
|
-
if (
|
|
20
|
-
const
|
|
21
|
-
if (
|
|
22
|
-
|
|
16
|
+
if (c === 47) {
|
|
17
|
+
if (!(S === w - 1 || E === 1)) if (S !== w - 1 && E === 2) {
|
|
18
|
+
if (p.length < 2 || _ !== 2 || p.charCodeAt(p.length - 1) !== 46 || p.charCodeAt(p.length - 2) !== 46) {
|
|
19
|
+
if (p.length > 2) {
|
|
20
|
+
const x = p.lastIndexOf("/");
|
|
21
|
+
if (x !== p.length - 1) {
|
|
22
|
+
x === -1 ? (p = "", _ = 0) : (p = p.slice(0, x), _ = p.length - 1 - p.lastIndexOf("/")), S = w, E = 0;
|
|
23
23
|
continue;
|
|
24
24
|
}
|
|
25
|
-
} else if (
|
|
26
|
-
|
|
25
|
+
} else if (p.length === 2 || p.length === 1) {
|
|
26
|
+
p = "", _ = 0, S = w, E = 0;
|
|
27
27
|
continue;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
|
|
30
|
+
s && (p.length > 0 ? p += "/.." : p = "..", _ = 2);
|
|
31
31
|
} else
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
} else
|
|
32
|
+
p.length > 0 ? p += "/" + u.slice(S + 1, w) : p = u.slice(S + 1, w), _ = w - S - 1;
|
|
33
|
+
S = w, E = 0;
|
|
34
|
+
} else c === 46 && E !== -1 ? ++E : E = -1;
|
|
35
35
|
}
|
|
36
|
-
return
|
|
36
|
+
return p;
|
|
37
37
|
}
|
|
38
|
-
function r(
|
|
39
|
-
const
|
|
40
|
-
return
|
|
38
|
+
function r(u, s) {
|
|
39
|
+
const p = s.dir || s.root, _ = s.base || (s.name || "") + (s.ext || "");
|
|
40
|
+
return p ? p === s.root ? p + _ : p + u + _ : _;
|
|
41
41
|
}
|
|
42
|
-
const o = function(...
|
|
43
|
-
let
|
|
44
|
-
for (let
|
|
45
|
-
let
|
|
46
|
-
|
|
42
|
+
const o = function(...s) {
|
|
43
|
+
let p = "", _ = !1, S;
|
|
44
|
+
for (let E = s.length - 1; E >= -1 && !_; E--) {
|
|
45
|
+
let c;
|
|
46
|
+
E >= 0 ? c = s[E] : (S === void 0 && (e && typeof e.cwd == "function" ? S = e.cwd() : typeof process < "u" && typeof process.cwd == "function" ? S = process.cwd() : S = "/"), c = S), t(c), c.length !== 0 && (p = c + "/" + p, _ = c.charCodeAt(0) === 47);
|
|
47
47
|
}
|
|
48
|
-
return
|
|
49
|
-
}, m = function(
|
|
50
|
-
if (t(
|
|
48
|
+
return p = i(p, !_), _ ? p.length > 0 ? "/" + p : "/" : p.length > 0 ? p : ".";
|
|
49
|
+
}, m = function(s) {
|
|
50
|
+
if (t(s), s.length === 0)
|
|
51
51
|
return ".";
|
|
52
|
-
const
|
|
53
|
-
return
|
|
54
|
-
}, l = function(
|
|
55
|
-
return t(
|
|
56
|
-
},
|
|
57
|
-
if (
|
|
52
|
+
const p = s.charCodeAt(0) === 47, _ = s.charCodeAt(s.length - 1) === 47;
|
|
53
|
+
return s = i(s, !p), s.length === 0 && !p && (s = "."), s.length > 0 && _ && (s += "/"), p ? "/" + s : s;
|
|
54
|
+
}, l = function(s) {
|
|
55
|
+
return t(s), s.length > 0 && s.charCodeAt(0) === 47;
|
|
56
|
+
}, a = function(...s) {
|
|
57
|
+
if (s.length === 0)
|
|
58
58
|
return ".";
|
|
59
|
-
let
|
|
60
|
-
for (let _ = 0; _ <
|
|
61
|
-
const
|
|
62
|
-
t(
|
|
63
|
-
}
|
|
64
|
-
return
|
|
65
|
-
}, f = function(
|
|
66
|
-
if (t(
|
|
59
|
+
let p;
|
|
60
|
+
for (let _ = 0; _ < s.length; ++_) {
|
|
61
|
+
const S = s[_];
|
|
62
|
+
t(S), S.length > 0 && (p === void 0 ? p = S : p += "/" + S);
|
|
63
|
+
}
|
|
64
|
+
return p === void 0 ? "." : m(p);
|
|
65
|
+
}, f = function(s, p) {
|
|
66
|
+
if (t(s), t(p), s === p || (s = o(s), p = o(p), s === p))
|
|
67
67
|
return "";
|
|
68
68
|
let _ = 1;
|
|
69
|
-
for (; _ <
|
|
69
|
+
for (; _ < s.length && s.charCodeAt(_) === 47; ++_)
|
|
70
70
|
;
|
|
71
|
-
const
|
|
72
|
-
let
|
|
73
|
-
for (;
|
|
71
|
+
const S = s.length, E = S - _;
|
|
72
|
+
let c = 1;
|
|
73
|
+
for (; c < p.length && p.charCodeAt(c) === 47; ++c)
|
|
74
74
|
;
|
|
75
|
-
const
|
|
76
|
-
let D = -1,
|
|
77
|
-
for (;
|
|
78
|
-
if (
|
|
79
|
-
if (
|
|
80
|
-
if (
|
|
81
|
-
return
|
|
82
|
-
if (
|
|
83
|
-
return
|
|
84
|
-
} else
|
|
75
|
+
const x = p.length - c, N = E < x ? E : x;
|
|
76
|
+
let D = -1, T = 0;
|
|
77
|
+
for (; T <= N; ++T) {
|
|
78
|
+
if (T === N) {
|
|
79
|
+
if (x > N) {
|
|
80
|
+
if (p.charCodeAt(c + T) === 47)
|
|
81
|
+
return p.slice(c + T + 1);
|
|
82
|
+
if (T === 0)
|
|
83
|
+
return p.slice(c + T);
|
|
84
|
+
} else E > N && (s.charCodeAt(_ + T) === 47 ? D = T : T === 0 && (D = 0));
|
|
85
85
|
break;
|
|
86
86
|
}
|
|
87
|
-
const
|
|
88
|
-
if (
|
|
87
|
+
const F = s.charCodeAt(_ + T), B = p.charCodeAt(c + T);
|
|
88
|
+
if (F !== B)
|
|
89
89
|
break;
|
|
90
|
-
|
|
90
|
+
F === 47 && (D = T);
|
|
91
91
|
}
|
|
92
92
|
let $ = "";
|
|
93
|
-
for (
|
|
94
|
-
(
|
|
95
|
-
return $.length > 0 ? $ +
|
|
96
|
-
}, n = function(
|
|
97
|
-
if (t(
|
|
93
|
+
for (T = _ + D + 1; T <= S; ++T)
|
|
94
|
+
(T === S || s.charCodeAt(T) === 47) && ($.length === 0 ? $ += ".." : $ += "/..");
|
|
95
|
+
return $.length > 0 ? $ + p.slice(c + D) : (c += D, p.charCodeAt(c) === 47 && ++c, p.slice(c));
|
|
96
|
+
}, n = function(s) {
|
|
97
|
+
if (t(s), s.length === 0)
|
|
98
98
|
return ".";
|
|
99
|
-
let
|
|
100
|
-
const _ =
|
|
101
|
-
let
|
|
102
|
-
for (let
|
|
103
|
-
if (
|
|
104
|
-
if (!
|
|
105
|
-
|
|
99
|
+
let p = s.charCodeAt(0);
|
|
100
|
+
const _ = p === 47;
|
|
101
|
+
let S = -1, E = !0;
|
|
102
|
+
for (let c = s.length - 1; c >= 1; --c)
|
|
103
|
+
if (p = s.charCodeAt(c), p === 47) {
|
|
104
|
+
if (!E) {
|
|
105
|
+
S = c;
|
|
106
106
|
break;
|
|
107
107
|
}
|
|
108
108
|
} else
|
|
109
|
-
|
|
110
|
-
return
|
|
111
|
-
},
|
|
112
|
-
if (
|
|
109
|
+
E = !1;
|
|
110
|
+
return S === -1 ? _ ? "/" : "." : _ && S === 1 ? "//" : s.slice(0, S);
|
|
111
|
+
}, b = function(s, p) {
|
|
112
|
+
if (p !== void 0 && typeof p != "string")
|
|
113
113
|
throw new TypeError('"ext" argument must be a string');
|
|
114
|
-
t(
|
|
115
|
-
let _ = 0,
|
|
116
|
-
if (
|
|
117
|
-
if (
|
|
114
|
+
t(s);
|
|
115
|
+
let _ = 0, S = -1, E = !0, c;
|
|
116
|
+
if (p !== void 0 && p.length > 0 && p.length <= s.length) {
|
|
117
|
+
if (p.length === s.length && p === s)
|
|
118
118
|
return "";
|
|
119
|
-
let
|
|
120
|
-
for (
|
|
121
|
-
const
|
|
122
|
-
if (
|
|
123
|
-
if (!
|
|
124
|
-
_ =
|
|
119
|
+
let w = p.length - 1, x = -1;
|
|
120
|
+
for (c = s.length - 1; c >= 0; --c) {
|
|
121
|
+
const N = s.charCodeAt(c);
|
|
122
|
+
if (N === 47) {
|
|
123
|
+
if (!E) {
|
|
124
|
+
_ = c + 1;
|
|
125
125
|
break;
|
|
126
126
|
}
|
|
127
127
|
} else
|
|
128
|
-
|
|
128
|
+
x === -1 && (E = !1, x = c + 1), w >= 0 && (N === p.charCodeAt(w) ? --w === -1 && (S = c) : (w = -1, S = x));
|
|
129
129
|
}
|
|
130
|
-
return _ ===
|
|
130
|
+
return _ === S ? S = x : S === -1 && (S = s.length), s.slice(_, S);
|
|
131
131
|
} else {
|
|
132
|
-
for (
|
|
133
|
-
if (
|
|
134
|
-
if (!
|
|
135
|
-
_ =
|
|
132
|
+
for (c = s.length - 1; c >= 0; --c)
|
|
133
|
+
if (s.charCodeAt(c) === 47) {
|
|
134
|
+
if (!E) {
|
|
135
|
+
_ = c + 1;
|
|
136
136
|
break;
|
|
137
137
|
}
|
|
138
|
-
} else
|
|
139
|
-
return
|
|
140
|
-
}
|
|
141
|
-
},
|
|
142
|
-
t(
|
|
143
|
-
let
|
|
144
|
-
for (let
|
|
145
|
-
const
|
|
146
|
-
if (
|
|
147
|
-
if (!
|
|
148
|
-
_ =
|
|
138
|
+
} else S === -1 && (E = !1, S = c + 1);
|
|
139
|
+
return S === -1 ? "" : s.slice(_, S);
|
|
140
|
+
}
|
|
141
|
+
}, v = function(s) {
|
|
142
|
+
t(s);
|
|
143
|
+
let p = -1, _ = 0, S = -1, E = !0, c = 0;
|
|
144
|
+
for (let w = s.length - 1; w >= 0; --w) {
|
|
145
|
+
const x = s.charCodeAt(w);
|
|
146
|
+
if (x === 47) {
|
|
147
|
+
if (!E) {
|
|
148
|
+
_ = w + 1;
|
|
149
149
|
break;
|
|
150
150
|
}
|
|
151
151
|
continue;
|
|
152
152
|
}
|
|
153
|
-
|
|
153
|
+
S === -1 && (E = !1, S = w + 1), x === 46 ? p === -1 ? p = w : c !== 1 && (c = 1) : p !== -1 && (c = -1);
|
|
154
154
|
}
|
|
155
|
-
return
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
}, I = function(
|
|
159
|
-
if (
|
|
155
|
+
return p === -1 || S === -1 || // We saw a non-dot character immediately before the dot
|
|
156
|
+
c === 0 || // The (right-most) trimmed path component is exactly '..'
|
|
157
|
+
c === 1 && p === S - 1 && p === _ + 1 ? "" : s.slice(p, S);
|
|
158
|
+
}, I = function(s) {
|
|
159
|
+
if (s === null || typeof s != "object")
|
|
160
160
|
throw new TypeError(
|
|
161
|
-
'The "pathObject" argument must be of type Object. Received type ' + typeof
|
|
161
|
+
'The "pathObject" argument must be of type Object. Received type ' + typeof s
|
|
162
162
|
);
|
|
163
|
-
return r("/",
|
|
164
|
-
},
|
|
165
|
-
t(
|
|
166
|
-
const
|
|
163
|
+
return r("/", s);
|
|
164
|
+
}, g = function(s) {
|
|
165
|
+
t(s);
|
|
166
|
+
const p = {
|
|
167
167
|
root: "",
|
|
168
168
|
dir: "",
|
|
169
169
|
base: "",
|
|
170
170
|
ext: "",
|
|
171
171
|
name: ""
|
|
172
172
|
};
|
|
173
|
-
if (
|
|
174
|
-
return
|
|
175
|
-
let _ =
|
|
176
|
-
const
|
|
177
|
-
|
|
178
|
-
let
|
|
179
|
-
for (; D >=
|
|
180
|
-
if (_ =
|
|
181
|
-
if (!
|
|
182
|
-
|
|
173
|
+
if (s.length === 0)
|
|
174
|
+
return p;
|
|
175
|
+
let _ = s.charCodeAt(0), S;
|
|
176
|
+
const E = _ === 47;
|
|
177
|
+
E ? (p.root = "/", S = 1) : S = 0;
|
|
178
|
+
let c = -1, w = 0, x = -1, N = !0, D = s.length - 1, T = 0;
|
|
179
|
+
for (; D >= S; --D) {
|
|
180
|
+
if (_ = s.charCodeAt(D), _ === 47) {
|
|
181
|
+
if (!N) {
|
|
182
|
+
w = D + 1;
|
|
183
183
|
break;
|
|
184
184
|
}
|
|
185
185
|
continue;
|
|
186
186
|
}
|
|
187
|
-
|
|
187
|
+
x === -1 && (N = !1, x = D + 1), _ === 46 ? c === -1 ? c = D : T !== 1 && (T = 1) : c !== -1 && (T = -1);
|
|
188
188
|
}
|
|
189
|
-
return
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
}, d = "/",
|
|
189
|
+
return c === -1 || x === -1 || // We saw a non-dot character immediately before the dot
|
|
190
|
+
T === 0 || // The (right-most) trimmed path component is exactly '..'
|
|
191
|
+
T === 1 && c === x - 1 && c === w + 1 ? x !== -1 && (w === 0 && E ? p.base = p.name = s.slice(1, x) : p.base = p.name = s.slice(w, x)) : (w === 0 && E ? (p.name = s.slice(1, c), p.base = s.slice(1, x)) : (p.name = s.slice(w, c), p.base = s.slice(w, x)), p.ext = s.slice(c, x)), w > 0 ? p.dir = s.slice(0, w - 1) : E && (p.dir = "/"), p;
|
|
192
|
+
}, d = "/", y = ":";
|
|
193
193
|
return {
|
|
194
194
|
relative: f,
|
|
195
195
|
resolve: o,
|
|
196
|
-
parse:
|
|
196
|
+
parse: g,
|
|
197
197
|
format: I,
|
|
198
|
-
join:
|
|
198
|
+
join: a,
|
|
199
199
|
isAbsolute: l,
|
|
200
|
-
basename:
|
|
200
|
+
basename: b,
|
|
201
201
|
normalize: m,
|
|
202
202
|
dirname: n,
|
|
203
|
-
extname:
|
|
204
|
-
delimiter:
|
|
203
|
+
extname: v,
|
|
204
|
+
delimiter: y,
|
|
205
205
|
sep: d,
|
|
206
206
|
win32: null,
|
|
207
207
|
posix: {
|
|
208
208
|
relative: f,
|
|
209
209
|
resolve: o,
|
|
210
|
-
parse:
|
|
210
|
+
parse: g,
|
|
211
211
|
format: I,
|
|
212
|
-
join:
|
|
212
|
+
join: a,
|
|
213
213
|
isAbsolute: l,
|
|
214
|
-
basename:
|
|
214
|
+
basename: b,
|
|
215
215
|
normalize: m,
|
|
216
216
|
dirname: n,
|
|
217
|
-
extname:
|
|
218
|
-
delimiter:
|
|
217
|
+
extname: v,
|
|
218
|
+
delimiter: y,
|
|
219
219
|
sep: d,
|
|
220
220
|
win32: null,
|
|
221
221
|
posix: null
|
|
222
222
|
}
|
|
223
223
|
};
|
|
224
224
|
}
|
|
225
|
-
const
|
|
225
|
+
const Ut = {
|
|
226
226
|
darwin: {
|
|
227
227
|
arm64: [
|
|
228
228
|
{
|
|
@@ -262,8 +262,8 @@ const jt = {
|
|
|
262
262
|
]
|
|
263
263
|
}
|
|
264
264
|
};
|
|
265
|
-
async function
|
|
266
|
-
const e =
|
|
265
|
+
async function Bt() {
|
|
266
|
+
const e = Tt(), t = {
|
|
267
267
|
dynamicImport: (i) => {
|
|
268
268
|
throw new Error(
|
|
269
269
|
`Qwik Optimizer sys.dynamicImport() not implemented, trying to import: "${i}"`
|
|
@@ -279,17 +279,17 @@ async function Ut() {
|
|
|
279
279
|
os: "unknown",
|
|
280
280
|
env: e
|
|
281
281
|
};
|
|
282
|
-
if (t.path =
|
|
282
|
+
if (t.path = jt(t), t.strictDynamicImport = t.dynamicImport = (i) => import(i), e !== "webworker" && e !== "browsermain")
|
|
283
283
|
try {
|
|
284
284
|
t.path = await t.dynamicImport("node:path"), t.cwd = () => process.cwd(), t.os = process.platform;
|
|
285
285
|
} catch {
|
|
286
286
|
}
|
|
287
287
|
return t;
|
|
288
288
|
}
|
|
289
|
-
async function
|
|
290
|
-
const t =
|
|
289
|
+
async function Rt(e) {
|
|
290
|
+
const t = Tt();
|
|
291
291
|
if (t === "node" || t === "bun") {
|
|
292
|
-
const i =
|
|
292
|
+
const i = Ut[process.platform];
|
|
293
293
|
if (i) {
|
|
294
294
|
const r = i[process.arch];
|
|
295
295
|
if (r)
|
|
@@ -307,22 +307,22 @@ async function Bt(e) {
|
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
309
|
if (t === "node" || t === "bun") {
|
|
310
|
-
const i = await e.dynamicImport("node:url"), r = e.path.dirname(i.fileURLToPath(import.meta.url)), o = e.path.join(r, "..", "bindings", "qwik_wasm_bg.wasm"), m = await e.dynamicImport("../bindings/qwik.wasm.mjs"),
|
|
310
|
+
const i = await e.dynamicImport("node:url"), r = e.path.dirname(i.fileURLToPath(import.meta.url)), o = e.path.join(r, "..", "bindings", "qwik_wasm_bg.wasm"), m = await e.dynamicImport("../bindings/qwik.wasm.mjs"), a = await (await e.dynamicImport("node:fs")).promises.readFile(o), f = await WebAssembly.compile(a);
|
|
311
311
|
return await m.default(f), m;
|
|
312
312
|
} else {
|
|
313
313
|
const i = await e.dynamicImport("../bindings/qwik.wasm.mjs");
|
|
314
314
|
return await i.default(), i;
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
|
-
const
|
|
318
|
-
const t = e?.sys || await
|
|
317
|
+
const Tt = () => typeof Deno < "u" ? "deno" : typeof Bun < "u" ? "bun" : typeof process < "u" && typeof global < "u" && process.versions && process.versions.node ? "node" : typeof self < "u" && typeof location < "u" && typeof navigator < "u" && typeof fetch == "function" && typeof WorkerGlobalScope == "function" && typeof self.importScripts == "function" ? "webworker" : typeof window < "u" && typeof document < "u" && typeof location < "u" && typeof navigator < "u" && typeof Window == "function" && typeof fetch == "function" ? "browsermain" : "unknown", At = async (e = {}) => {
|
|
318
|
+
const t = e?.sys || await Bt(), i = e?.binding || await Rt(t);
|
|
319
319
|
return {
|
|
320
320
|
async transformModules(o) {
|
|
321
321
|
return Ft(i, o);
|
|
322
322
|
},
|
|
323
323
|
sys: t
|
|
324
324
|
};
|
|
325
|
-
}, Ft = (e, t) => e.transform_modules(
|
|
325
|
+
}, Ft = (e, t) => e.transform_modules($t(t)), $t = (e) => {
|
|
326
326
|
const t = {
|
|
327
327
|
minify: "simplify",
|
|
328
328
|
sourceMaps: !1,
|
|
@@ -343,16 +343,16 @@ const Et = () => typeof Deno < "u" ? "deno" : typeof Bun < "u" ? "bun" : typeof
|
|
|
343
343
|
return Object.entries(e).forEach(([i, r]) => {
|
|
344
344
|
r != null && (t[i] = r);
|
|
345
345
|
}), t.entryStrategy = e.entryStrategy?.type ?? "smart", t.manualChunks = e.entryStrategy?.manual ?? void 0, t;
|
|
346
|
-
},
|
|
347
|
-
qwik: "2.0.0-beta.
|
|
348
|
-
},
|
|
346
|
+
}, zr = {
|
|
347
|
+
qwik: "2.0.0-beta.28-dev+fac55b7"
|
|
348
|
+
}, zt = (e, t = 0) => {
|
|
349
349
|
for (let i = 0; i < e.length; i++) {
|
|
350
350
|
const r = e.charCodeAt(i);
|
|
351
351
|
t = (t << 5) - t + r, t |= 0;
|
|
352
352
|
}
|
|
353
353
|
return Number(Math.abs(t)).toString(36);
|
|
354
|
-
},
|
|
355
|
-
function
|
|
354
|
+
}, Ht = /* @__PURE__ */ new Set(["_chk", "_rsc", "_res", "_run", "_task", "_val"]);
|
|
355
|
+
function Wt(e) {
|
|
356
356
|
const t = e.symbols;
|
|
357
357
|
return Object.keys(t).sort((i, r) => {
|
|
358
358
|
const o = t[i], m = t[r];
|
|
@@ -361,36 +361,36 @@ function Ht(e) {
|
|
|
361
361
|
if (o.ctxKind !== "eventHandler" && m.ctxKind === "eventHandler")
|
|
362
362
|
return 1;
|
|
363
363
|
if (o.ctxKind === "eventHandler" && m.ctxKind === "eventHandler") {
|
|
364
|
-
const l =
|
|
365
|
-
if (l > -1 &&
|
|
366
|
-
if (l <
|
|
364
|
+
const l = et.indexOf(o.ctxName.toLowerCase()), a = et.indexOf(m.ctxName.toLowerCase());
|
|
365
|
+
if (l > -1 && a > -1) {
|
|
366
|
+
if (l < a)
|
|
367
367
|
return -1;
|
|
368
|
-
if (l >
|
|
368
|
+
if (l > a)
|
|
369
369
|
return 1;
|
|
370
370
|
} else {
|
|
371
371
|
if (l > -1)
|
|
372
372
|
return -1;
|
|
373
|
-
if (
|
|
373
|
+
if (a > -1)
|
|
374
374
|
return 1;
|
|
375
375
|
}
|
|
376
376
|
} else if (o.ctxKind === "function" && m.ctxKind === "function") {
|
|
377
|
-
const l =
|
|
378
|
-
if (l > -1 &&
|
|
379
|
-
if (l <
|
|
377
|
+
const l = tt.indexOf(o.ctxName.toLowerCase()), a = tt.indexOf(m.ctxName.toLowerCase());
|
|
378
|
+
if (l > -1 && a > -1) {
|
|
379
|
+
if (l < a)
|
|
380
380
|
return -1;
|
|
381
|
-
if (l >
|
|
381
|
+
if (l > a)
|
|
382
382
|
return 1;
|
|
383
383
|
} else {
|
|
384
384
|
if (l > -1)
|
|
385
385
|
return -1;
|
|
386
|
-
if (
|
|
386
|
+
if (a > -1)
|
|
387
387
|
return 1;
|
|
388
388
|
}
|
|
389
389
|
}
|
|
390
390
|
return !o.parent && m.parent ? -1 : o.parent && !m.parent ? 1 : o.hash < m.hash ? -1 : o.hash > m.hash ? 1 : 0;
|
|
391
391
|
});
|
|
392
392
|
}
|
|
393
|
-
const
|
|
393
|
+
const et = [
|
|
394
394
|
// Click Events
|
|
395
395
|
"click",
|
|
396
396
|
"dblclick",
|
|
@@ -446,32 +446,32 @@ const Ve = [
|
|
|
446
446
|
"reset",
|
|
447
447
|
// Scroll Events
|
|
448
448
|
"scroll"
|
|
449
|
-
].map((e) => `on${e.toLowerCase()}$`),
|
|
449
|
+
].map((e) => `on${e.toLowerCase()}$`), tt = ["useTask$", "useVisibleTask$", "component$", "useStyles$", "useStylesScoped$"].map(
|
|
450
450
|
(e) => e.toLowerCase()
|
|
451
451
|
);
|
|
452
|
-
function Wt(e) {
|
|
453
|
-
return Object.keys(e.bundles).sort(je);
|
|
454
|
-
}
|
|
455
452
|
function Gt(e) {
|
|
456
|
-
|
|
453
|
+
return Object.keys(e.bundles).sort(Fe);
|
|
454
|
+
}
|
|
455
|
+
function Qt(e) {
|
|
456
|
+
const t = Wt(e), i = {}, r = {};
|
|
457
457
|
for (const l of t)
|
|
458
458
|
i[l] = e.symbols[l], r[l] = e.mapping[l];
|
|
459
|
-
const o =
|
|
459
|
+
const o = Gt(e), m = {};
|
|
460
460
|
for (const l of o) {
|
|
461
461
|
m[l] = e.bundles[l];
|
|
462
|
-
const
|
|
463
|
-
Array.isArray(
|
|
462
|
+
const a = e.bundles[l];
|
|
463
|
+
Array.isArray(a.imports) && a.imports.sort(Fe), Array.isArray(a.dynamicImports) && a.dynamicImports.sort(Fe);
|
|
464
464
|
const f = [];
|
|
465
465
|
for (const n of t)
|
|
466
466
|
l === r[n] && f.push(n);
|
|
467
|
-
f.length > 0 && (f.sort(
|
|
467
|
+
f.length > 0 && (f.sort(Fe), a.symbols = f);
|
|
468
468
|
}
|
|
469
469
|
return e.symbols = i, e.mapping = r, e.bundles = m, e;
|
|
470
470
|
}
|
|
471
|
-
function
|
|
471
|
+
function Fe(e, t) {
|
|
472
472
|
return e = e.toLocaleLowerCase(), t = t.toLocaleLowerCase(), e < t ? -1 : e > t ? 1 : 0;
|
|
473
473
|
}
|
|
474
|
-
function
|
|
474
|
+
function nt(e) {
|
|
475
475
|
if (e != null && e.mapping != null && typeof e.mapping == "object" && e.symbols != null && typeof e.symbols == "object" && e.bundles != null && typeof e.bundles == "object")
|
|
476
476
|
return e;
|
|
477
477
|
}
|
|
@@ -485,71 +485,71 @@ const Kt = (e, t) => {
|
|
|
485
485
|
}
|
|
486
486
|
return i;
|
|
487
487
|
};
|
|
488
|
-
function
|
|
488
|
+
function Jt(e) {
|
|
489
489
|
let t = 0;
|
|
490
490
|
const i = [], r = [], o = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Set();
|
|
491
|
-
function
|
|
491
|
+
function a(d) {
|
|
492
492
|
o.set(d, t), m.set(d, t), t++, i.push(d), l.add(d);
|
|
493
|
-
const
|
|
494
|
-
for (const
|
|
495
|
-
o.has(
|
|
493
|
+
const y = e[d].imports || [];
|
|
494
|
+
for (const u of y)
|
|
495
|
+
o.has(u) ? l.has(u) && m.set(d, Math.min(m.get(d), o.get(u))) : (a(u), m.set(d, Math.min(m.get(d), m.get(u))));
|
|
496
496
|
if (m.get(d) === o.get(d)) {
|
|
497
|
-
const
|
|
498
|
-
let
|
|
497
|
+
const u = [];
|
|
498
|
+
let s;
|
|
499
499
|
do
|
|
500
|
-
|
|
501
|
-
while (
|
|
502
|
-
r.push(
|
|
500
|
+
s = i.pop(), l.delete(s), u.push(s);
|
|
501
|
+
while (s !== d);
|
|
502
|
+
r.push(u);
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
505
|
for (const d of Object.keys(e))
|
|
506
|
-
o.has(d) ||
|
|
506
|
+
o.has(d) || a(d);
|
|
507
507
|
const f = /* @__PURE__ */ new Map();
|
|
508
|
-
r.forEach((d,
|
|
509
|
-
for (const
|
|
510
|
-
f.set(
|
|
508
|
+
r.forEach((d, y) => {
|
|
509
|
+
for (const u of d)
|
|
510
|
+
f.set(u, y);
|
|
511
511
|
});
|
|
512
512
|
const n = Array.from({ length: r.length }, () => /* @__PURE__ */ new Set());
|
|
513
513
|
for (const d of Object.keys(e)) {
|
|
514
|
-
const
|
|
515
|
-
for (const
|
|
516
|
-
const
|
|
517
|
-
|
|
514
|
+
const y = f.get(d);
|
|
515
|
+
for (const u of e[d].imports || []) {
|
|
516
|
+
const s = f.get(u);
|
|
517
|
+
y !== s && n[y].add(s);
|
|
518
518
|
}
|
|
519
519
|
}
|
|
520
|
-
const
|
|
520
|
+
const b = /* @__PURE__ */ new Set(), v = [];
|
|
521
521
|
function I(d) {
|
|
522
|
-
|
|
523
|
-
for (const
|
|
524
|
-
|
|
525
|
-
|
|
522
|
+
b.add(d);
|
|
523
|
+
for (const y of n[d])
|
|
524
|
+
b.has(y) || I(y);
|
|
525
|
+
v.push(d);
|
|
526
526
|
}
|
|
527
527
|
for (let d = 0; d < r.length; d++)
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
const
|
|
528
|
+
b.has(d) || I(d);
|
|
529
|
+
v.reverse();
|
|
530
|
+
const g = new Array(r.length).fill(0);
|
|
531
531
|
for (let d = 0; d < r.length; d++) {
|
|
532
|
-
let
|
|
533
|
-
for (const
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
}
|
|
537
|
-
for (let d =
|
|
538
|
-
const
|
|
539
|
-
let
|
|
540
|
-
for (const
|
|
541
|
-
|
|
542
|
-
y
|
|
532
|
+
let y = 0;
|
|
533
|
+
for (const u of r[d])
|
|
534
|
+
y += e[u].size;
|
|
535
|
+
g[d] = y;
|
|
536
|
+
}
|
|
537
|
+
for (let d = v.length - 1; d >= 0; d--) {
|
|
538
|
+
const y = v[d];
|
|
539
|
+
let u = g[y];
|
|
540
|
+
for (const s of n[y])
|
|
541
|
+
u += g[s];
|
|
542
|
+
g[y] = u;
|
|
543
543
|
}
|
|
544
544
|
for (let d = 0; d < r.length; d++) {
|
|
545
|
-
const
|
|
546
|
-
for (const
|
|
547
|
-
e[
|
|
545
|
+
const y = g[d];
|
|
546
|
+
for (const u of r[d])
|
|
547
|
+
e[u].total = y;
|
|
548
548
|
}
|
|
549
549
|
}
|
|
550
|
-
const
|
|
551
|
-
function
|
|
552
|
-
const
|
|
550
|
+
const rt = /[/\\](core|qwik)[/\\]dist[/\\]preloader\.(|c|m)js$/, ot = /[/\\](core|qwik)[/\\]dist[/\\]core(\.min|\.prod)?\.(|c|m)js$/, it = /[/\\](core|qwik)[/\\](dist[/\\])?qwikloader(\.debug)?\.[^/]*js$/;
|
|
551
|
+
function Yt(e, t, i, r, o, m, l) {
|
|
552
|
+
const a = {
|
|
553
553
|
version: "1",
|
|
554
554
|
manifestHash: "",
|
|
555
555
|
options: {
|
|
@@ -568,87 +568,87 @@ function Jt(e, t, i, r, o, m, l) {
|
|
|
568
568
|
assets: {},
|
|
569
569
|
symbols: {},
|
|
570
570
|
bundleGraph: void 0
|
|
571
|
-
}, f = (
|
|
572
|
-
const d = r[
|
|
571
|
+
}, f = (g) => {
|
|
572
|
+
const d = r[g];
|
|
573
573
|
if (!d) {
|
|
574
|
-
console.warn(`Client manifest generation: skipping external import "${
|
|
574
|
+
console.warn(`Client manifest generation: skipping external import "${g}"`);
|
|
575
575
|
return;
|
|
576
576
|
}
|
|
577
577
|
return l(d.fileName);
|
|
578
578
|
};
|
|
579
|
-
let n,
|
|
580
|
-
for (const
|
|
581
|
-
const d = f(
|
|
582
|
-
|
|
583
|
-
}
|
|
584
|
-
const I = new Set(t.map((
|
|
585
|
-
for (const
|
|
586
|
-
if (
|
|
587
|
-
|
|
588
|
-
name:
|
|
589
|
-
size:
|
|
579
|
+
let n, b, v;
|
|
580
|
+
for (const g of Object.values(r)) {
|
|
581
|
+
const d = f(g.fileName);
|
|
582
|
+
g.name === "core" && (n = d), g.name === "preloader" && (b = d), g.name === "handlers" && (v = d);
|
|
583
|
+
}
|
|
584
|
+
const I = new Set(t.map((g) => g.name));
|
|
585
|
+
for (const g of Object.values(r)) {
|
|
586
|
+
if (g.type === "asset") {
|
|
587
|
+
g.fileName.endsWith("js.map") || (a.assets[g.fileName] = {
|
|
588
|
+
name: g.names[0],
|
|
589
|
+
size: g.source.length
|
|
590
590
|
});
|
|
591
591
|
continue;
|
|
592
592
|
}
|
|
593
|
-
const d = l(
|
|
594
|
-
size:
|
|
593
|
+
const d = l(g.fileName), u = {
|
|
594
|
+
size: g.code.length,
|
|
595
595
|
total: -1
|
|
596
596
|
};
|
|
597
|
-
for (const
|
|
598
|
-
I.has(
|
|
599
|
-
const
|
|
600
|
-
|
|
601
|
-
const
|
|
602
|
-
|
|
603
|
-
const
|
|
604
|
-
|
|
605
|
-
}
|
|
606
|
-
for (const
|
|
607
|
-
const d =
|
|
608
|
-
if (!
|
|
609
|
-
m(`Note: qrl ${
|
|
597
|
+
for (const E of g.exports)
|
|
598
|
+
I.has(E) && (!a.mapping[E] || g.exports.length !== 1) && (a.mapping[E] = d);
|
|
599
|
+
const s = g.imports.filter((E) => g.code.includes(e.basename(E))).map((E) => f(E)).filter((E) => E !== b && E !== n && E !== v).filter(Boolean);
|
|
600
|
+
s.length > 0 && (u.imports = s);
|
|
601
|
+
const p = g.dynamicImports.filter((E) => g.code.includes(e.basename(E))).map((E) => f(E)).filter(Boolean);
|
|
602
|
+
p.length > 0 && (u.dynamicImports = p), g.facadeModuleId && (rt.test(g.facadeModuleId) ? a.preloader = d : ot.test(g.facadeModuleId) ? a.core = d : it.test(g.facadeModuleId) && (a.qwikLoader = d));
|
|
603
|
+
const S = (g.moduleIds || Object.keys(g.modules)).filter((E) => !E.startsWith("\0")).map((E) => e.relative(o.rootDir, E));
|
|
604
|
+
S.length > 0 && (u.origins = S, !a.preloader && S.some((E) => rt.test(E)) && (a.preloader = d), !a.core && S.some((E) => ot.test(E)) && (a.core = d), !a.qwikLoader && S.some((E) => it.test(E)) && (a.qwikLoader = d)), a.bundles[d] = u;
|
|
605
|
+
}
|
|
606
|
+
for (const g of t) {
|
|
607
|
+
const d = g.name, y = a.mapping[d];
|
|
608
|
+
if (!y) {
|
|
609
|
+
m(`Note: qrl ${g.name} is not in the bundle, likely tree shaken`, a);
|
|
610
610
|
continue;
|
|
611
611
|
}
|
|
612
|
-
(
|
|
613
|
-
displayName:
|
|
614
|
-
hash:
|
|
615
|
-
ctxKind:
|
|
616
|
-
ctxName:
|
|
617
|
-
captures:
|
|
618
|
-
canonicalFilename:
|
|
619
|
-
parent:
|
|
620
|
-
origin:
|
|
621
|
-
loc:
|
|
622
|
-
paramNames:
|
|
623
|
-
captureNames:
|
|
612
|
+
(a.bundles[y].symbols ||= []).push(d), a.symbols[d] = {
|
|
613
|
+
displayName: g.displayName,
|
|
614
|
+
hash: g.hash,
|
|
615
|
+
ctxKind: g.ctxKind,
|
|
616
|
+
ctxName: g.ctxName,
|
|
617
|
+
captures: g.captures,
|
|
618
|
+
canonicalFilename: g.canonicalFilename,
|
|
619
|
+
parent: g.parent,
|
|
620
|
+
origin: g.origin,
|
|
621
|
+
loc: g.loc,
|
|
622
|
+
paramNames: g.paramNames,
|
|
623
|
+
captureNames: g.captureNames
|
|
624
624
|
};
|
|
625
625
|
}
|
|
626
|
-
if (
|
|
627
|
-
for (const
|
|
628
|
-
|
|
626
|
+
if (v)
|
|
627
|
+
for (const g of Ht)
|
|
628
|
+
a.symbols[g] = {
|
|
629
629
|
origin: "Qwik core",
|
|
630
|
-
displayName:
|
|
630
|
+
displayName: g,
|
|
631
631
|
canonicalFilename: "",
|
|
632
|
-
hash:
|
|
632
|
+
hash: g,
|
|
633
633
|
ctxKind: "function",
|
|
634
|
-
ctxName:
|
|
634
|
+
ctxName: g,
|
|
635
635
|
captures: !1,
|
|
636
636
|
parent: null,
|
|
637
637
|
loc: [0, 0]
|
|
638
|
-
},
|
|
638
|
+
}, a.mapping[g] = v;
|
|
639
639
|
else
|
|
640
640
|
console.error("Qwik core bundle not found, is Qwik actually used in this project?");
|
|
641
|
-
for (const
|
|
642
|
-
const d = Kt(
|
|
643
|
-
|
|
641
|
+
for (const g of Object.values(a.bundles)) {
|
|
642
|
+
const d = Kt(g, a);
|
|
643
|
+
g.interactivity = d;
|
|
644
644
|
}
|
|
645
|
-
return
|
|
645
|
+
return Jt(a.bundles), Qt(a);
|
|
646
646
|
}
|
|
647
|
-
const
|
|
647
|
+
const Xt = 300, Vt = 0.5 / (Xt * 1024 / 8), Zt = (e) => {
|
|
648
648
|
const t = e.lastIndexOf("_");
|
|
649
649
|
return t > -1 ? e.slice(t + 1) : e;
|
|
650
650
|
};
|
|
651
|
-
function
|
|
651
|
+
function en(e, t) {
|
|
652
652
|
const i = [];
|
|
653
653
|
if (!e.bundles)
|
|
654
654
|
return [];
|
|
@@ -656,28 +656,28 @@ function Zt(e, t) {
|
|
|
656
656
|
for (const [f, n] of Object.entries(e.mapping)) {
|
|
657
657
|
if (f.startsWith("_") && f.length < 10)
|
|
658
658
|
continue;
|
|
659
|
-
const
|
|
660
|
-
|
|
659
|
+
const b = Zt(f);
|
|
660
|
+
b && (r[b] = { dynamicImports: [n] });
|
|
661
661
|
}
|
|
662
662
|
if (t) {
|
|
663
663
|
const f = { ...e, bundles: r };
|
|
664
664
|
for (const n of t) {
|
|
665
|
-
const
|
|
666
|
-
|
|
665
|
+
const b = n(f);
|
|
666
|
+
b && Object.assign(r, b);
|
|
667
667
|
}
|
|
668
668
|
}
|
|
669
669
|
for (const f of Object.keys(r)) {
|
|
670
|
-
const n = r[f],
|
|
670
|
+
const n = r[f], b = n.imports?.filter((I) => r[I]) || [], v = n.dynamicImports?.filter(
|
|
671
671
|
// we only want to include dynamic imports that belong to the app
|
|
672
672
|
// e.g. not all languages supported by shiki
|
|
673
673
|
(I) => r[I] && // either there are qrls
|
|
674
674
|
(r[I].symbols || // or it's a dynamic import from the app source
|
|
675
|
-
r[I].origins?.some((
|
|
675
|
+
r[I].origins?.some((g) => !g.includes("node_modules")))
|
|
676
676
|
) || [];
|
|
677
677
|
r[f] = {
|
|
678
678
|
...n,
|
|
679
|
-
imports:
|
|
680
|
-
dynamicImports:
|
|
679
|
+
imports: b,
|
|
680
|
+
dynamicImports: v
|
|
681
681
|
};
|
|
682
682
|
}
|
|
683
683
|
const o = new Set(Object.keys(r));
|
|
@@ -691,63 +691,63 @@ function Zt(e, t) {
|
|
|
691
691
|
const n = r[f];
|
|
692
692
|
!n.imports?.length && !n.dynamicImports?.length && delete r[f];
|
|
693
693
|
}
|
|
694
|
-
const m = Object.keys(r), l = /* @__PURE__ */ new Map(),
|
|
695
|
-
const
|
|
696
|
-
for (const I of
|
|
697
|
-
f.has(I) && f.delete(I),
|
|
694
|
+
const m = Object.keys(r), l = /* @__PURE__ */ new Map(), a = (f, n, b = /* @__PURE__ */ new Set()) => {
|
|
695
|
+
const v = r[n];
|
|
696
|
+
for (const I of v.imports)
|
|
697
|
+
f.has(I) && f.delete(I), b.has(I) || (b.add(I), a(f, I, b));
|
|
698
698
|
};
|
|
699
699
|
for (const f of m) {
|
|
700
|
-
const n = r[f],
|
|
701
|
-
for (const d of
|
|
702
|
-
|
|
703
|
-
const
|
|
704
|
-
for (const d of
|
|
705
|
-
|
|
706
|
-
const
|
|
707
|
-
let
|
|
708
|
-
if (
|
|
709
|
-
for (const
|
|
710
|
-
if (
|
|
711
|
-
|
|
700
|
+
const n = r[f], b = new Set(n.imports);
|
|
701
|
+
for (const d of b)
|
|
702
|
+
a(b, d);
|
|
703
|
+
const v = new Set(n.dynamicImports), I = /* @__PURE__ */ new Map();
|
|
704
|
+
for (const d of v) {
|
|
705
|
+
a(v, d);
|
|
706
|
+
const y = r[d];
|
|
707
|
+
let u = 0.5;
|
|
708
|
+
if (u += (y.interactivity || 0) * 0.08, n.origins && y.origins) {
|
|
709
|
+
for (const s of n.origins)
|
|
710
|
+
if (y.origins.some((p) => p.startsWith(s))) {
|
|
711
|
+
u += 0.25;
|
|
712
712
|
break;
|
|
713
713
|
}
|
|
714
714
|
}
|
|
715
|
-
|
|
715
|
+
y.total > Vt && (u += u > 0.5 ? 0.02 : -0.02), y.total < 1e3 && (u += 0.15), I.set(d, Math.min(u, 0.99));
|
|
716
716
|
}
|
|
717
|
-
if (
|
|
718
|
-
const d = Array.from(
|
|
719
|
-
(
|
|
717
|
+
if (v.size > 0) {
|
|
718
|
+
const d = Array.from(v).sort(
|
|
719
|
+
(u, s) => I.get(s) - I.get(u)
|
|
720
720
|
);
|
|
721
|
-
let
|
|
722
|
-
for (const
|
|
723
|
-
I.get(
|
|
721
|
+
let y = -1;
|
|
722
|
+
for (const u of d)
|
|
723
|
+
I.get(u) !== y && (y = I.get(u), b.add(-Math.round(y * 10))), b.add(u);
|
|
724
724
|
}
|
|
725
|
-
const
|
|
725
|
+
const g = i.length;
|
|
726
726
|
i.push(f);
|
|
727
|
-
for (let d = 0; d <
|
|
727
|
+
for (let d = 0; d < b.size; d++)
|
|
728
728
|
i.push(null);
|
|
729
|
-
l.set(f, { index:
|
|
729
|
+
l.set(f, { index: g, deps: b });
|
|
730
730
|
}
|
|
731
731
|
for (const f of m) {
|
|
732
732
|
const n = l.get(f);
|
|
733
|
-
let { index:
|
|
734
|
-
|
|
735
|
-
for (const I of
|
|
733
|
+
let { index: b, deps: v } = n;
|
|
734
|
+
b++;
|
|
735
|
+
for (const I of v) {
|
|
736
736
|
if (typeof I == "number") {
|
|
737
|
-
i[
|
|
737
|
+
i[b++] = I;
|
|
738
738
|
continue;
|
|
739
739
|
}
|
|
740
740
|
const d = l.get(I).index;
|
|
741
|
-
i[
|
|
741
|
+
i[b++] = d;
|
|
742
742
|
}
|
|
743
743
|
}
|
|
744
744
|
return i;
|
|
745
745
|
}
|
|
746
|
-
async function
|
|
746
|
+
async function tn(e, t, i) {
|
|
747
747
|
const r = await e.dynamicImport("eslint");
|
|
748
748
|
let o = new r.ESLint({ cache: !0 });
|
|
749
749
|
if ((await o.calculateConfigForFile("no-real-file.tsx")).parser === null) {
|
|
750
|
-
const
|
|
750
|
+
const a = {
|
|
751
751
|
cache: !0,
|
|
752
752
|
overrideConfig: {
|
|
753
753
|
languageOptions: {
|
|
@@ -763,34 +763,34 @@ async function en(e, t, i) {
|
|
|
763
763
|
}
|
|
764
764
|
}
|
|
765
765
|
};
|
|
766
|
-
o = new r.ESLint(
|
|
766
|
+
o = new r.ESLint(a);
|
|
767
767
|
}
|
|
768
768
|
return {
|
|
769
|
-
async lint(
|
|
769
|
+
async lint(a, f, n) {
|
|
770
770
|
try {
|
|
771
|
-
const
|
|
772
|
-
if (await o.isPathIgnored(
|
|
771
|
+
const b = nn(n);
|
|
772
|
+
if (await o.isPathIgnored(b))
|
|
773
773
|
return null;
|
|
774
774
|
(await o.lintText(f, {
|
|
775
|
-
filePath:
|
|
775
|
+
filePath: b
|
|
776
776
|
})).forEach((I) => {
|
|
777
|
-
for (const
|
|
778
|
-
if (
|
|
777
|
+
for (const g of I.messages) {
|
|
778
|
+
if (g.ruleId != null && !g.ruleId.startsWith("qwik/"))
|
|
779
779
|
continue;
|
|
780
|
-
const d =
|
|
781
|
-
|
|
780
|
+
const d = rn(I.filePath, g);
|
|
781
|
+
a.warn(d);
|
|
782
782
|
}
|
|
783
783
|
});
|
|
784
|
-
} catch (
|
|
785
|
-
console.warn(
|
|
784
|
+
} catch (b) {
|
|
785
|
+
console.warn(b);
|
|
786
786
|
}
|
|
787
787
|
}
|
|
788
788
|
};
|
|
789
789
|
}
|
|
790
|
-
function
|
|
790
|
+
function nn(e) {
|
|
791
791
|
return e.split("?", 2)[0];
|
|
792
792
|
}
|
|
793
|
-
function
|
|
793
|
+
function rn(e, t) {
|
|
794
794
|
return Object.assign(new Error(t.message), {
|
|
795
795
|
id: e,
|
|
796
796
|
plugin: "vite-plugin-eslint",
|
|
@@ -802,21 +802,21 @@ function nn(e, t) {
|
|
|
802
802
|
stack: ""
|
|
803
803
|
});
|
|
804
804
|
}
|
|
805
|
-
async function
|
|
805
|
+
async function on(e, t) {
|
|
806
806
|
const i = t;
|
|
807
807
|
let r = i.loc;
|
|
808
|
-
if (!i.frame && !i.plugin && (r || (r =
|
|
808
|
+
if (!i.frame && !i.plugin && (r || (r = sn(i)), r && (i.loc = r, r.file))) {
|
|
809
809
|
const o = await e.dynamicImport("node:fs"), { normalizePath: m } = await e.dynamicImport("vite");
|
|
810
810
|
i.id = m(i.loc.file);
|
|
811
811
|
try {
|
|
812
812
|
const l = o.readFileSync(i.loc.file, "utf-8");
|
|
813
|
-
i.frame =
|
|
813
|
+
i.frame = ln(l, i.loc);
|
|
814
814
|
} catch {
|
|
815
815
|
}
|
|
816
816
|
}
|
|
817
817
|
return t;
|
|
818
818
|
}
|
|
819
|
-
const
|
|
819
|
+
const sn = (e) => {
|
|
820
820
|
const t = e.stack;
|
|
821
821
|
if (typeof t == "string") {
|
|
822
822
|
const i = t.split(`
|
|
@@ -826,10 +826,10 @@ const on = (e) => {
|
|
|
826
826
|
if (/^\s+at/.test(o)) {
|
|
827
827
|
const m = o.indexOf("/"), l = o.lastIndexOf(")", m);
|
|
828
828
|
if (m > 0) {
|
|
829
|
-
const f = o.slice(m, l).split(":"), n =
|
|
830
|
-
return typeof n == "number" && typeof
|
|
829
|
+
const f = o.slice(m, l).split(":"), n = st(f[f.length - 1]), b = st(f[f.length - 2]);
|
|
830
|
+
return typeof n == "number" && typeof b == "number" ? (f.length -= 2, {
|
|
831
831
|
file: f.join(":"),
|
|
832
|
-
line:
|
|
832
|
+
line: b,
|
|
833
833
|
column: n
|
|
834
834
|
}) : typeof n == "number" ? (f.length -= 1, {
|
|
835
835
|
file: f.join(":"),
|
|
@@ -844,44 +844,44 @@ const on = (e) => {
|
|
|
844
844
|
}
|
|
845
845
|
}
|
|
846
846
|
}
|
|
847
|
-
},
|
|
847
|
+
}, ne = (e) => e.startsWith("\0"), st = (e) => {
|
|
848
848
|
try {
|
|
849
849
|
return parseInt(e, 10);
|
|
850
850
|
} catch {
|
|
851
851
|
return;
|
|
852
852
|
}
|
|
853
|
-
},
|
|
854
|
-
function
|
|
853
|
+
}, Ct = /\r?\n/, at = 2;
|
|
854
|
+
function an(e, t) {
|
|
855
855
|
if (typeof t == "number")
|
|
856
856
|
return t;
|
|
857
857
|
if (t.lo != null)
|
|
858
858
|
return t.lo;
|
|
859
|
-
const i = e.split(
|
|
859
|
+
const i = e.split(Ct), { line: r, column: o } = t;
|
|
860
860
|
let m = 0;
|
|
861
861
|
for (let l = 0; l < r - 1 && l < i.length; l++)
|
|
862
862
|
m += i[l].length + 1;
|
|
863
863
|
return m + o;
|
|
864
864
|
}
|
|
865
|
-
function
|
|
866
|
-
t =
|
|
867
|
-
const r = e.split(
|
|
865
|
+
function ln(e, t = 0, i) {
|
|
866
|
+
t = an(e, t), i = i || t;
|
|
867
|
+
const r = e.split(Ct);
|
|
868
868
|
let o = 0;
|
|
869
869
|
const m = [];
|
|
870
870
|
for (let l = 0; l < r.length; l++)
|
|
871
871
|
if (o += r[l].length + 1, o >= t) {
|
|
872
|
-
for (let
|
|
873
|
-
if (
|
|
872
|
+
for (let a = l - at; a <= l + at || i > o; a++) {
|
|
873
|
+
if (a < 0 || a >= r.length)
|
|
874
874
|
continue;
|
|
875
|
-
const f =
|
|
876
|
-
m.push(`${f}${" ".repeat(Math.max(3 - String(f).length, 0))}| ${r[
|
|
877
|
-
const n = r[
|
|
878
|
-
if (
|
|
879
|
-
const
|
|
880
|
-
m.push(" | " + " ".repeat(
|
|
881
|
-
} else if (
|
|
875
|
+
const f = a + 1;
|
|
876
|
+
m.push(`${f}${" ".repeat(Math.max(3 - String(f).length, 0))}| ${r[a]}`);
|
|
877
|
+
const n = r[a].length;
|
|
878
|
+
if (a === l) {
|
|
879
|
+
const b = Math.max(t - (o - n) + 1, 0), v = Math.max(1, i > o ? n - b : i - t);
|
|
880
|
+
m.push(" | " + " ".repeat(b) + "^".repeat(v));
|
|
881
|
+
} else if (a > l) {
|
|
882
882
|
if (i > o) {
|
|
883
|
-
const
|
|
884
|
-
m.push(" | " + "^".repeat(
|
|
883
|
+
const b = Math.max(Math.min(i - o, n), 1);
|
|
884
|
+
m.push(" | " + "^".repeat(b));
|
|
885
885
|
}
|
|
886
886
|
o += n + 1;
|
|
887
887
|
}
|
|
@@ -891,10 +891,10 @@ function an(e, t = 0, i) {
|
|
|
891
891
|
return m.join(`
|
|
892
892
|
`);
|
|
893
893
|
}
|
|
894
|
-
function
|
|
894
|
+
function cn(e) {
|
|
895
895
|
return e === "win32";
|
|
896
896
|
}
|
|
897
|
-
function
|
|
897
|
+
function Re(e) {
|
|
898
898
|
const [t, i] = e.split("?"), r = i || "";
|
|
899
899
|
return {
|
|
900
900
|
originalId: e,
|
|
@@ -903,7 +903,7 @@ function Le(e) {
|
|
|
903
903
|
params: new URLSearchParams(r)
|
|
904
904
|
};
|
|
905
905
|
}
|
|
906
|
-
const
|
|
906
|
+
const dn = ["server"], un = [
|
|
907
907
|
"onGet",
|
|
908
908
|
"onPost",
|
|
909
909
|
"onPut",
|
|
@@ -913,7 +913,7 @@ const cn = ["server"], dn = [
|
|
|
913
913
|
"onOptions",
|
|
914
914
|
"onPatch",
|
|
915
915
|
"onStaticGenerate"
|
|
916
|
-
],
|
|
916
|
+
], fn = [
|
|
917
917
|
"useServer",
|
|
918
918
|
"route",
|
|
919
919
|
"server",
|
|
@@ -922,7 +922,7 @@ const cn = ["server"], dn = [
|
|
|
922
922
|
"zod$",
|
|
923
923
|
"validator$",
|
|
924
924
|
"globalAction$"
|
|
925
|
-
],
|
|
925
|
+
], pn = [
|
|
926
926
|
"useClient",
|
|
927
927
|
"useBrowser",
|
|
928
928
|
"useVisibleTask",
|
|
@@ -930,10 +930,10 @@ const cn = ["server"], dn = [
|
|
|
930
930
|
"browser",
|
|
931
931
|
"event$"
|
|
932
932
|
];
|
|
933
|
-
var
|
|
934
|
-
function
|
|
933
|
+
var Pt = /* @__PURE__ */ ((e) => (e.preventNavigate = "preventNavigate", e.valibot = "valibot", e.noSPA = "noSPA", e.enableRequestRewrite = "enableRequestRewrite", e.webWorker = "webWorker", e.insights = "insights", e))(Pt || {});
|
|
934
|
+
function Dt(e = {}) {
|
|
935
935
|
const t = `${Math.round(Math.random() * 899) + 100}`, i = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map();
|
|
936
|
-
let l = null,
|
|
936
|
+
let l = null, a, f = () => {
|
|
937
937
|
};
|
|
938
938
|
const n = {
|
|
939
939
|
csr: !1,
|
|
@@ -958,140 +958,144 @@ function Ct(e = {}) {
|
|
|
958
958
|
scope: null,
|
|
959
959
|
devTools: {
|
|
960
960
|
imageDevTools: !0,
|
|
961
|
-
clickToSource: ["Alt"]
|
|
961
|
+
clickToSource: ["Alt"],
|
|
962
|
+
hmr: !0
|
|
962
963
|
},
|
|
963
964
|
inlineStylesUpToBytes: 2e4,
|
|
964
965
|
lint: !1,
|
|
965
966
|
experimental: void 0
|
|
966
967
|
};
|
|
967
|
-
let
|
|
968
|
+
let b, v;
|
|
968
969
|
const I = async () => {
|
|
969
|
-
if (!l && (l = await At(e),
|
|
970
|
+
if (!l && (l = await At(e), b = mn(l.sys), l.sys.env !== "browsermain" && l.sys.env !== "webworker"))
|
|
970
971
|
try {
|
|
971
|
-
|
|
972
|
+
v === void 0 && (v = await l.sys.dynamicImport("node:fs"));
|
|
972
973
|
} catch {
|
|
973
|
-
console.log("node:fs not available, disabling automatic manifest reading"),
|
|
974
|
+
console.log("node:fs not available, disabling automatic manifest reading"), v = null;
|
|
974
975
|
}
|
|
975
|
-
},
|
|
976
|
+
}, g = () => {
|
|
976
977
|
if (!l)
|
|
977
978
|
throw new Error("Qwik plugin has not been initialized");
|
|
978
979
|
return l;
|
|
979
|
-
}, d = () =>
|
|
980
|
-
let
|
|
981
|
-
const
|
|
982
|
-
|
|
983
|
-
},
|
|
984
|
-
const
|
|
985
|
-
n.debug = !!
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
980
|
+
}, d = () => g().sys, y = () => g().sys.path;
|
|
981
|
+
let u;
|
|
982
|
+
const s = (k) => {
|
|
983
|
+
u = k;
|
|
984
|
+
}, p = async (k) => {
|
|
985
|
+
const h = Object.assign({}, k), P = g(), q = P.sys.path, M = (...U) => K(q.resolve(...U));
|
|
986
|
+
n.debug = !!h.debug, h.devTools && (n.devTools = {
|
|
987
|
+
...n.devTools,
|
|
988
|
+
...h.devTools
|
|
989
|
+
}), h.assetsDir && (n.assetsDir = h.assetsDir), h.target === "ssr" || h.target === "client" || h.target === "lib" || h.target === "test" ? n.target = h.target : n.target ||= "client", n.target === "lib" ? n.buildMode = "development" : h.buildMode === "production" || h.buildMode === "development" ? n.buildMode = h.buildMode : n.buildMode ||= "development", n.csr = !!h.csr, h.entryStrategy && typeof h.entryStrategy == "object" && (n.entryStrategy = { ...h.entryStrategy }), n.entryStrategy || (n.target === "ssr" || n.target === "test" ? n.entryStrategy = { type: "hoist" } : n.target === "lib" ? n.entryStrategy = { type: "inline" } : n.buildMode === "production" ? n.entryStrategy = { type: "smart" } : n.entryStrategy = { type: "segment" }), typeof h.rootDir == "string" && (n.rootDir = h.rootDir), typeof n.rootDir != "string" && (n.rootDir ||= P.sys.cwd()), n.rootDir = M(P.sys.cwd(), n.rootDir);
|
|
990
|
+
let C = M(n.rootDir, yn);
|
|
991
|
+
if (typeof h.srcDir == "string" ? (n.srcDir = M(n.rootDir, h.srcDir), C = n.srcDir) : n.srcDir ||= C, n.srcDir = M(n.rootDir, n.srcDir), Array.isArray(h.tsconfigFileNames) && h.tsconfigFileNames.length > 0 && (n.tsconfigFileNames = h.tsconfigFileNames), !n.csr && !h.input && !n.input && (n.target === "ssr" ? n.input = [M(C, "entry.ssr")] : n.target === "client" ? n.input = [M(C, "root")] : n.input = void 0), h.outDir && (n.outDir = M(n.rootDir, h.outDir)), n.clientOutDir = M(n.rootDir, h.clientOutDir || lt), n.ssrOutDir = M(n.rootDir, h.ssrOutDir || vn), n.target === "ssr" ? n.outDir ||= n.ssrOutDir : n.target === "lib" ? n.outDir ||= M(n.rootDir, bn) : n.outDir ||= n.clientOutDir, typeof h.manifestOutput == "function" && (n.manifestOutput = h.manifestOutput), h.manifestInput && (n.manifestInput = nt(h.manifestInput) || null), typeof h.transformedModuleOutput == "function" && (n.transformedModuleOutput = h.transformedModuleOutput), h.scope !== void 0)
|
|
992
|
+
n.scope = h.scope;
|
|
993
|
+
else if (!n.scope && v) {
|
|
990
994
|
let U = "";
|
|
991
995
|
try {
|
|
992
|
-
let
|
|
993
|
-
for (; U =
|
|
994
|
-
const
|
|
995
|
-
if (
|
|
996
|
+
let R = n.rootDir;
|
|
997
|
+
for (; U = q.resolve(R, "package.json"), !await v.promises.stat(U).catch(() => !1); ) {
|
|
998
|
+
const O = q.resolve(R, "..");
|
|
999
|
+
if (O === R)
|
|
996
1000
|
break;
|
|
997
|
-
|
|
1001
|
+
R = O, U = "";
|
|
998
1002
|
}
|
|
999
1003
|
if (U) {
|
|
1000
|
-
const
|
|
1004
|
+
const O = await v.promises.readFile(U, "utf-8"), L = JSON.parse(O);
|
|
1001
1005
|
typeof L.name == "string" && (n.scope = L.name);
|
|
1002
1006
|
}
|
|
1003
|
-
} catch (
|
|
1007
|
+
} catch (R) {
|
|
1004
1008
|
console.warn(
|
|
1005
|
-
`could not read ${U || "package.json"} to determine package name, ignoring. (${
|
|
1009
|
+
`could not read ${U || "package.json"} to determine package name, ignoring. (${R})`
|
|
1006
1010
|
);
|
|
1007
1011
|
}
|
|
1008
1012
|
}
|
|
1009
|
-
if (typeof
|
|
1013
|
+
if (typeof h.resolveQwikBuild == "boolean" && (n.resolveQwikBuild = h.resolveQwikBuild), typeof h.devTools == "object" && ("imageDevTools" in h.devTools && (n.devTools.imageDevTools = h.devTools.imageDevTools), "clickToSource" in h.devTools && (n.devTools.clickToSource = h.devTools.clickToSource)), "inlineStylesUpToBytes" in e && (typeof e.inlineStylesUpToBytes == "number" ? n.inlineStylesUpToBytes = e.inlineStylesUpToBytes : (typeof n.inlineStylesUpToBytes != "number" || n.inlineStylesUpToBytes < 0) && (n.inlineStylesUpToBytes = 0)), typeof h.lint == "boolean" && (n.lint = h.lint), "experimental" in h) {
|
|
1010
1014
|
n.experimental = void 0;
|
|
1011
|
-
for (const U of
|
|
1012
|
-
|
|
1015
|
+
for (const U of h.experimental ?? [])
|
|
1016
|
+
Pt[U] ? (n.experimental ||= {})[U] = !0 : console.error(`Qwik plugin: Unknown experimental feature: ${U}`);
|
|
1013
1017
|
}
|
|
1014
|
-
const
|
|
1015
|
-
return n.input ||=
|
|
1018
|
+
const A = { ...n };
|
|
1019
|
+
return n.input ||= h.input, n.input && typeof n.input == "string" && (n.input = [n.input]), A;
|
|
1016
1020
|
};
|
|
1017
1021
|
let _ = !1;
|
|
1018
|
-
const
|
|
1022
|
+
const S = async (k) => {
|
|
1019
1023
|
if (!_) {
|
|
1020
1024
|
_ = !0;
|
|
1021
|
-
const
|
|
1022
|
-
if (
|
|
1023
|
-
const
|
|
1024
|
-
if (!
|
|
1025
|
+
const h = d();
|
|
1026
|
+
if (h.env === "node") {
|
|
1027
|
+
const P = await h.dynamicImport("node:fs");
|
|
1028
|
+
if (!P.existsSync(n.rootDir))
|
|
1025
1029
|
throw new Error(`Qwik rootDir "${n.rootDir}" not found.`);
|
|
1026
|
-
if (typeof n.srcDir == "string" && !
|
|
1030
|
+
if (typeof n.srcDir == "string" && !P.existsSync(n.srcDir))
|
|
1027
1031
|
throw new Error(`Qwik srcDir "${n.srcDir}" not found.`);
|
|
1028
|
-
for (const [
|
|
1029
|
-
if (!await
|
|
1030
|
-
throw new Error(`Qwik input "${
|
|
1032
|
+
for (const [q, M] of Object.entries(n.input || {}))
|
|
1033
|
+
if (!await k(M))
|
|
1034
|
+
throw new Error(`Qwik input "${M}" not found.`);
|
|
1031
1035
|
}
|
|
1032
1036
|
}
|
|
1033
1037
|
};
|
|
1034
|
-
let
|
|
1035
|
-
const
|
|
1036
|
-
if (
|
|
1038
|
+
let E, c = !1;
|
|
1039
|
+
const w = async (k) => {
|
|
1040
|
+
if (j("buildStart()", n.buildMode, n.scope, n.target, n.rootDir, n.srcDir), E = g(), c = !u, E.sys.env === "node" && n.target === "ssr" && n.lint)
|
|
1037
1041
|
try {
|
|
1038
|
-
|
|
1042
|
+
a = await tn(E.sys, n.rootDir, n.tsconfigFileNames);
|
|
1039
1043
|
} catch {
|
|
1040
1044
|
}
|
|
1041
|
-
if (
|
|
1042
|
-
const
|
|
1045
|
+
if (j("transformedOutputs.clear()"), r.clear(), o.clear(), n.target === "client") {
|
|
1046
|
+
const h = await k.resolve("@qwik.dev/core/qwikloader.js", void 0, {
|
|
1043
1047
|
skipSelf: !0
|
|
1044
1048
|
});
|
|
1045
|
-
|
|
1046
|
-
id:
|
|
1049
|
+
h && k.emitFile({
|
|
1050
|
+
id: h.id,
|
|
1047
1051
|
type: "chunk",
|
|
1048
1052
|
preserveSignature: "allow-extension"
|
|
1049
1053
|
});
|
|
1050
1054
|
}
|
|
1051
|
-
},
|
|
1052
|
-
let
|
|
1053
|
-
const
|
|
1054
|
-
if (
|
|
1055
|
+
}, x = (k, h) => k.environment ? k.environment.config.consumer === "server" : u ? !!h?.ssr : n.target === "ssr" || n.target === "test";
|
|
1056
|
+
let N = 0, D = !1;
|
|
1057
|
+
const T = async (k, h, P, q) => {
|
|
1058
|
+
if (ne(h))
|
|
1055
1059
|
return;
|
|
1056
|
-
const
|
|
1057
|
-
if (
|
|
1060
|
+
const M = u && /^(.*)\?editor(:(\d+)(:\d+)?)?$/.exec(h);
|
|
1061
|
+
if (M) {
|
|
1058
1062
|
if (!D) {
|
|
1059
1063
|
D = !0, setTimeout(() => D = !1, 500);
|
|
1060
|
-
const [,
|
|
1061
|
-
if (
|
|
1062
|
-
const
|
|
1063
|
-
if (
|
|
1064
|
-
const
|
|
1064
|
+
const [, H, W] = M, oe = await k.resolve(H, P);
|
|
1065
|
+
if (oe) {
|
|
1066
|
+
const ie = k.environment.moduleGraph.getModuleById(oe.id)?.file;
|
|
1067
|
+
if (ie) {
|
|
1068
|
+
const V = `${ie}${W}`;
|
|
1065
1069
|
try {
|
|
1066
|
-
console.warn(`Opening in editor: ${
|
|
1067
|
-
const
|
|
1068
|
-
|
|
1069
|
-
} catch (
|
|
1070
|
-
console.error(`Failed to open editor: ${
|
|
1070
|
+
console.warn(`Opening in editor: ${V}`);
|
|
1071
|
+
const se = (await import("launch-editor")).default;
|
|
1072
|
+
se(V);
|
|
1073
|
+
} catch (se) {
|
|
1074
|
+
console.error(`Failed to open editor: ${se.message}`);
|
|
1071
1075
|
}
|
|
1072
1076
|
}
|
|
1073
1077
|
}
|
|
1074
1078
|
}
|
|
1075
1079
|
return { id: "\0editor" };
|
|
1076
1080
|
}
|
|
1077
|
-
const C =
|
|
1078
|
-
|
|
1079
|
-
const U =
|
|
1080
|
-
if (
|
|
1081
|
-
const
|
|
1082
|
-
W && (
|
|
1081
|
+
const C = N++, A = x(k, q);
|
|
1082
|
+
j(`resolveId(${C})`, `begin ${h} | ${A ? "server" : "client"} | ${P}`);
|
|
1083
|
+
const U = P && Re(P);
|
|
1084
|
+
if (P = U && K(U.pathId), h.startsWith(".") && U) {
|
|
1085
|
+
const H = y(), W = H.dirname(U.pathId);
|
|
1086
|
+
W && (h = H.resolve(W, h));
|
|
1083
1087
|
}
|
|
1084
|
-
const
|
|
1088
|
+
const R = Re(h), O = K(R.pathId);
|
|
1085
1089
|
let L;
|
|
1086
1090
|
if (
|
|
1087
1091
|
/**
|
|
1088
1092
|
* Check if we know the QRL. During regular builds, we'll encounter and build parents before
|
|
1089
1093
|
* their QRLs, so this will always match.
|
|
1090
1094
|
*/
|
|
1091
|
-
m.get(
|
|
1095
|
+
m.get(O)
|
|
1092
1096
|
)
|
|
1093
|
-
|
|
1094
|
-
id:
|
|
1097
|
+
j(`resolveId(${C}) Resolved already known ${O}`), L = {
|
|
1098
|
+
id: O + R.query,
|
|
1095
1099
|
moduleSideEffects: !1
|
|
1096
1100
|
};
|
|
1097
1101
|
else if (
|
|
@@ -1100,135 +1104,145 @@ function Ct(e = {}) {
|
|
|
1100
1104
|
* been transformed yet.
|
|
1101
1105
|
*/
|
|
1102
1106
|
// We test with endsWith because the dev server adds the base pathname
|
|
1103
|
-
|
|
1107
|
+
O.endsWith(te)
|
|
1104
1108
|
)
|
|
1105
|
-
n.resolveQwikBuild && (
|
|
1106
|
-
id:
|
|
1109
|
+
n.resolveQwikBuild && (j(`resolveId(${C})`, "Resolved", te), L = {
|
|
1110
|
+
id: te,
|
|
1107
1111
|
moduleSideEffects: !1
|
|
1108
1112
|
});
|
|
1109
|
-
else if (
|
|
1110
|
-
|
|
1111
|
-
id:
|
|
1113
|
+
else if (O.endsWith(ae))
|
|
1114
|
+
j(`resolveId(${C})`, "Resolved", ae), L = {
|
|
1115
|
+
id: ae,
|
|
1112
1116
|
moduleSideEffects: !1
|
|
1113
1117
|
};
|
|
1114
|
-
else if (!
|
|
1115
|
-
|
|
1116
|
-
const
|
|
1118
|
+
else if (!u && !A && O.endsWith(We)) {
|
|
1119
|
+
j(`resolveId(${C})`, "Resolved", We);
|
|
1120
|
+
const H = await k.resolve(We, P, {
|
|
1117
1121
|
skipSelf: !0
|
|
1118
1122
|
});
|
|
1119
|
-
if (
|
|
1120
|
-
return
|
|
1121
|
-
id:
|
|
1123
|
+
if (H)
|
|
1124
|
+
return k.emitFile({
|
|
1125
|
+
id: H.id,
|
|
1122
1126
|
type: "chunk",
|
|
1123
1127
|
preserveSignature: "allow-extension"
|
|
1124
|
-
}),
|
|
1125
|
-
} else if (
|
|
1126
|
-
|
|
1127
|
-
id:
|
|
1128
|
+
}), H;
|
|
1129
|
+
} else if (O.endsWith(he))
|
|
1130
|
+
j(`resolveId(${C})`, "Resolved", he), L = {
|
|
1131
|
+
id: he,
|
|
1128
1132
|
moduleSideEffects: !1
|
|
1129
1133
|
};
|
|
1130
1134
|
else {
|
|
1131
|
-
if (!
|
|
1132
|
-
|
|
1133
|
-
const W = await
|
|
1135
|
+
if (!A && c && h.endsWith("@qwik.dev/core")) {
|
|
1136
|
+
c = !1;
|
|
1137
|
+
const W = await k.resolve("@qwik.dev/core/handlers.mjs", P, {
|
|
1134
1138
|
skipSelf: !0
|
|
1135
1139
|
});
|
|
1136
1140
|
if (!W)
|
|
1137
1141
|
throw new Error("Failed to resolve @qwik.dev/core/handlers.mjs");
|
|
1138
|
-
|
|
1142
|
+
k.emitFile({
|
|
1139
1143
|
id: W.id,
|
|
1140
1144
|
type: "chunk",
|
|
1141
1145
|
preserveSignature: "allow-extension"
|
|
1142
1146
|
});
|
|
1143
1147
|
}
|
|
1144
|
-
const
|
|
1145
|
-
if (
|
|
1146
|
-
const { parent: W, name:
|
|
1147
|
-
if (
|
|
1148
|
-
const
|
|
1149
|
-
|
|
1150
|
-
id:
|
|
1148
|
+
const H = /^(?<parent>.*\.[mc]?[jt]sx?)_(?<name>[^/]+)\.js(?<query>$|\?.*$)/.exec(h)?.groups;
|
|
1149
|
+
if (H) {
|
|
1150
|
+
const { parent: W, name: oe, query: pe } = H, ie = await k.resolve(W, P, { skipSelf: !0 });
|
|
1151
|
+
if (ie) {
|
|
1152
|
+
const V = ie.id.split("?")[0], Ue = u && P?.endsWith(".html") ? `${V}_${oe}.js` : O;
|
|
1153
|
+
j(`resolveId(${C})`, `resolved to QRL ${oe} of ${V}`), m.set(Ue, V), L = {
|
|
1154
|
+
id: Ue + pe,
|
|
1151
1155
|
// QRL segments can't have side effects. Probably never useful, but it's here for consistency
|
|
1152
1156
|
moduleSideEffects: !1
|
|
1153
1157
|
};
|
|
1154
1158
|
} else
|
|
1155
1159
|
console.error(`resolveId(${C})`, `QRL parent ${W} does not exist!`);
|
|
1156
|
-
} else if (
|
|
1157
|
-
const W = m.get(
|
|
1160
|
+
} else if (P) {
|
|
1161
|
+
const W = m.get(P);
|
|
1158
1162
|
if (W)
|
|
1159
|
-
return
|
|
1163
|
+
return j(`resolveId(${C}) end`, `resolving via ${W}`), k.resolve(h, W, { skipSelf: !0 });
|
|
1160
1164
|
}
|
|
1161
1165
|
}
|
|
1162
|
-
return
|
|
1166
|
+
return j(`resolveId(${C}) end`, L?.id || L), L;
|
|
1163
1167
|
};
|
|
1164
1168
|
let $ = 0;
|
|
1165
|
-
const
|
|
1166
|
-
if (
|
|
1169
|
+
const F = async (k, h, P) => {
|
|
1170
|
+
if (h === "\0editor")
|
|
1167
1171
|
return '"opening in editor"';
|
|
1168
|
-
if (
|
|
1172
|
+
if (ne(h) || h.startsWith("/@fs/"))
|
|
1169
1173
|
return;
|
|
1170
|
-
const
|
|
1171
|
-
if (n.resolveQwikBuild &&
|
|
1172
|
-
return
|
|
1174
|
+
const q = $++, M = x(k, P);
|
|
1175
|
+
if (n.resolveQwikBuild && h === te)
|
|
1176
|
+
return j(`load(${q})`, te, n.buildMode), {
|
|
1173
1177
|
moduleSideEffects: !1,
|
|
1174
|
-
code:
|
|
1178
|
+
code: z(M, n.target)
|
|
1175
1179
|
};
|
|
1176
|
-
if (
|
|
1177
|
-
return
|
|
1180
|
+
if (h === ae)
|
|
1181
|
+
return j(`load(${q})`, ae, n.buildMode), {
|
|
1178
1182
|
moduleSideEffects: !1,
|
|
1179
|
-
code: await
|
|
1183
|
+
code: await Le(M)
|
|
1180
1184
|
};
|
|
1181
|
-
if (
|
|
1182
|
-
return
|
|
1185
|
+
if (h === he)
|
|
1186
|
+
return j(`load(${q})`, he, n.buildMode), {
|
|
1183
1187
|
moduleSideEffects: !1,
|
|
1184
1188
|
code: "export * from '@qwik.dev/core';"
|
|
1185
1189
|
};
|
|
1186
|
-
const C =
|
|
1187
|
-
|
|
1188
|
-
const
|
|
1189
|
-
if (
|
|
1190
|
-
const
|
|
1191
|
-
if (
|
|
1192
|
-
const
|
|
1193
|
-
if (
|
|
1194
|
-
if (
|
|
1195
|
-
return
|
|
1190
|
+
const C = Re(h);
|
|
1191
|
+
h = K(C.pathId);
|
|
1192
|
+
const A = M ? o : r;
|
|
1193
|
+
if (u && !A.has(h)) {
|
|
1194
|
+
const R = m.get(h);
|
|
1195
|
+
if (R) {
|
|
1196
|
+
const O = u.moduleGraph.getModuleById(R);
|
|
1197
|
+
if (O) {
|
|
1198
|
+
if (j(`load(${q})`, "transforming QRL parent", R), await u.transformRequest(O.url), !A.has(h))
|
|
1199
|
+
return j(`load(${q})`, `QRL segment ${h} not found in ${R}`), null;
|
|
1196
1200
|
} else
|
|
1197
|
-
console.error(`load(${
|
|
1201
|
+
console.error(`load(${q})`, `module ${R} does not exist in the build graph!`);
|
|
1198
1202
|
}
|
|
1199
1203
|
}
|
|
1200
|
-
const U =
|
|
1204
|
+
const U = A.get(h);
|
|
1201
1205
|
if (U) {
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1206
|
+
j(`load(${q})`, "Found", h);
|
|
1207
|
+
let { code: R } = U[0];
|
|
1208
|
+
const { map: O, segment: L } = U[0], H = U[1];
|
|
1209
|
+
if (u?.hot && H && n.devTools.hmr) {
|
|
1210
|
+
const oe = "qHmr" + (H.startsWith(n.rootDir) ? H.slice(n.rootDir.length) : H).replace(/[^a-zA-Z0-9_]/g, "_");
|
|
1211
|
+
R += `
|
|
1212
|
+
if (import.meta.hot) {
|
|
1213
|
+
import.meta.hot.accept(() => {
|
|
1214
|
+
document.dispatchEvent(new CustomEvent(${JSON.stringify(oe)}));
|
|
1215
|
+
});
|
|
1216
|
+
}`;
|
|
1217
|
+
}
|
|
1218
|
+
return { code: R, map: O, meta: { segment: L } };
|
|
1205
1219
|
}
|
|
1206
|
-
return
|
|
1220
|
+
return j(`load(${q})`, "Not a QRL or virtual module", h), null;
|
|
1207
1221
|
};
|
|
1208
|
-
let
|
|
1209
|
-
const
|
|
1210
|
-
if (
|
|
1222
|
+
let B = 0;
|
|
1223
|
+
const J = async function(k, h, P, q = {}) {
|
|
1224
|
+
if (ne(P))
|
|
1211
1225
|
return;
|
|
1212
|
-
const
|
|
1213
|
-
if (
|
|
1226
|
+
const M = B++, C = x(k, q), A = C ? o : r;
|
|
1227
|
+
if (A.has(P))
|
|
1214
1228
|
return;
|
|
1215
|
-
const U =
|
|
1216
|
-
if (L.ext.toLowerCase() in
|
|
1217
|
-
const
|
|
1218
|
-
|
|
1219
|
-
`transform(${
|
|
1220
|
-
`Transforming ${
|
|
1229
|
+
const U = g(), R = y(), { pathId: O } = Re(P), L = R.parse(O), H = L.dir, W = L.base;
|
|
1230
|
+
if (L.ext.toLowerCase() in gn || Nt.test(O)) {
|
|
1231
|
+
const pe = n.target === "client" || n.target === "ssr";
|
|
1232
|
+
j(
|
|
1233
|
+
`transform(${M})`,
|
|
1234
|
+
`Transforming ${P} (for: ${C ? "server" : "client"}${pe ? ", strip" : ""})`
|
|
1221
1235
|
);
|
|
1222
|
-
const
|
|
1223
|
-
|
|
1224
|
-
let
|
|
1225
|
-
n.srcDir && (
|
|
1226
|
-
const
|
|
1227
|
-
let
|
|
1228
|
-
|
|
1229
|
-
const
|
|
1230
|
-
input: [{ code:
|
|
1231
|
-
entryStrategy: C ? { type: "hoist" } :
|
|
1236
|
+
const ie = n.target === "lib" ? "lib" : n.buildMode === "development" ? u?.hot && n.devTools.hmr ? "hmr" : "dev" : "prod";
|
|
1237
|
+
ie !== "lib" && (h = h.replaceAll(/__EXPERIMENTAL__\.(\w+)/g, (ee, ce) => n.experimental?.[ce] ? "true" : "false"));
|
|
1238
|
+
let V = W;
|
|
1239
|
+
n.srcDir && (V = R.relative(n.srcDir, O)), V = K(V);
|
|
1240
|
+
const se = n.srcDir ? n.srcDir : K(H), Ue = n.entryStrategy;
|
|
1241
|
+
let Ze;
|
|
1242
|
+
u && (Ze = u.moduleGraph.getModuleById(O)?.url);
|
|
1243
|
+
const ue = {
|
|
1244
|
+
input: [{ code: h, path: V, devPath: Ze }],
|
|
1245
|
+
entryStrategy: C ? { type: "hoist" } : Ue,
|
|
1232
1246
|
minify: "simplify",
|
|
1233
1247
|
// Always enable sourcemaps in dev for click-to-source
|
|
1234
1248
|
sourceMaps: n.sourcemap || n.buildMode === "development",
|
|
@@ -1236,88 +1250,88 @@ function Ct(e = {}) {
|
|
|
1236
1250
|
transpileJsx: !0,
|
|
1237
1251
|
explicitExtensions: !0,
|
|
1238
1252
|
preserveFilenames: !0,
|
|
1239
|
-
srcDir:
|
|
1253
|
+
srcDir: se,
|
|
1240
1254
|
rootDir: n.rootDir,
|
|
1241
|
-
mode:
|
|
1255
|
+
mode: ie,
|
|
1242
1256
|
scope: n.scope || void 0,
|
|
1243
1257
|
isServer: C
|
|
1244
1258
|
};
|
|
1245
|
-
|
|
1246
|
-
const
|
|
1247
|
-
|
|
1248
|
-
const
|
|
1249
|
-
f(
|
|
1250
|
-
const
|
|
1251
|
-
for (const
|
|
1252
|
-
if (
|
|
1253
|
-
const
|
|
1254
|
-
|
|
1255
|
-
id:
|
|
1259
|
+
pe && (C ? (ue.stripCtxName = pn, ue.stripEventHandlers = !0, ue.regCtxName = dn) : (ue.stripCtxName = fn, ue.stripExports = un));
|
|
1260
|
+
const Lt = Date.now(), me = await U.transformModules(ue);
|
|
1261
|
+
j(`transform(${M})`, `done in ${Date.now() - Lt}ms`);
|
|
1262
|
+
const Be = me.modules.find((ee) => !hn(ee));
|
|
1263
|
+
f(me.diagnostics, U, se), C ? me.diagnostics.length === 0 && a && a.lint(k, h, P) : i.set(P, me);
|
|
1264
|
+
const He = /* @__PURE__ */ new Set();
|
|
1265
|
+
for (const ee of me.modules)
|
|
1266
|
+
if (ee !== Be) {
|
|
1267
|
+
const ce = K(R.join(se, ee.path));
|
|
1268
|
+
j(`transform(${M})`, `segment ${ce}`, ee.segment.displayName), m.set(ce, P), A.set(ce, [ee, P]), He.add(ce), n.target === "client" && !u && k.emitFile({
|
|
1269
|
+
id: ce,
|
|
1256
1270
|
type: "chunk",
|
|
1257
1271
|
preserveSignature: "allow-extension"
|
|
1258
1272
|
});
|
|
1259
1273
|
}
|
|
1260
|
-
return await Promise.all([
|
|
1261
|
-
code:
|
|
1262
|
-
map:
|
|
1274
|
+
return await Promise.all([...He.values()].map((ee) => k.load({ id: ee }))), k.addWatchFile(P), {
|
|
1275
|
+
code: Be.code,
|
|
1276
|
+
map: Be.map,
|
|
1263
1277
|
meta: {
|
|
1264
|
-
segment:
|
|
1265
|
-
qwikdeps: Array.from(
|
|
1278
|
+
segment: Be.segment,
|
|
1279
|
+
qwikdeps: Array.from(He)
|
|
1266
1280
|
}
|
|
1267
1281
|
};
|
|
1268
1282
|
}
|
|
1269
|
-
return
|
|
1270
|
-
},
|
|
1271
|
-
const
|
|
1272
|
-
addInjection: (
|
|
1283
|
+
return j(`transform(${M})`, "Not transforming", P), null;
|
|
1284
|
+
}, Y = (k) => {
|
|
1285
|
+
const h = [], P = {
|
|
1286
|
+
addInjection: (q) => h.push(q)
|
|
1273
1287
|
};
|
|
1274
|
-
return
|
|
1275
|
-
const C =
|
|
1276
|
-
|
|
1277
|
-
const
|
|
1288
|
+
return P.generateManifest = async (q) => {
|
|
1289
|
+
const C = g().sys.path, A = C.resolve(n.rootDir, n.outDir, "build"), U = (L) => C.relative(A, C.resolve(n.rootDir, n.outDir, L));
|
|
1290
|
+
P.canonPath = U;
|
|
1291
|
+
const R = Array.from(i.values()).flatMap((L) => L.modules).map((L) => L.segment).filter((L) => !!L), O = Yt(
|
|
1278
1292
|
C,
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1293
|
+
R,
|
|
1294
|
+
h,
|
|
1295
|
+
k,
|
|
1282
1296
|
n,
|
|
1283
|
-
|
|
1297
|
+
j,
|
|
1284
1298
|
U
|
|
1285
1299
|
);
|
|
1286
|
-
|
|
1287
|
-
for (const L of Object.values(
|
|
1288
|
-
L.origin && (L.origin =
|
|
1289
|
-
for (const L of Object.values(
|
|
1300
|
+
q && Object.assign(O, q);
|
|
1301
|
+
for (const L of Object.values(O.symbols))
|
|
1302
|
+
L.origin && (L.origin = K(L.origin));
|
|
1303
|
+
for (const L of Object.values(O.bundles))
|
|
1290
1304
|
L.origins && (L.origins = L.origins.sort());
|
|
1291
|
-
return
|
|
1292
|
-
},
|
|
1293
|
-
},
|
|
1294
|
-
n.debug && console.debug(`[QWIK PLUGIN: ${t}]`, ...
|
|
1295
|
-
},
|
|
1296
|
-
console.log(`[QWIK PLUGIN: ${t}]`, ...
|
|
1297
|
-
},
|
|
1298
|
-
f =
|
|
1299
|
-
},
|
|
1300
|
-
function
|
|
1301
|
-
const
|
|
1305
|
+
return O.manifestHash = zt(JSON.stringify(O)), O;
|
|
1306
|
+
}, P;
|
|
1307
|
+
}, Z = () => n, X = () => Array.from(r.values()).map((k) => k[0]), j = (...k) => {
|
|
1308
|
+
n.debug && console.debug(`[QWIK PLUGIN: ${t}]`, ...k);
|
|
1309
|
+
}, fe = (...k) => {
|
|
1310
|
+
console.log(`[QWIK PLUGIN: ${t}]`, ...k);
|
|
1311
|
+
}, re = (k) => {
|
|
1312
|
+
f = k;
|
|
1313
|
+
}, K = (k) => b(k);
|
|
1314
|
+
function z(k, h) {
|
|
1315
|
+
const P = n.buildMode === "development";
|
|
1302
1316
|
return `// @qwik.dev/core/build
|
|
1303
|
-
export const isServer = ${JSON.stringify(
|
|
1304
|
-
export const isBrowser = ${JSON.stringify(!
|
|
1305
|
-
export const isDev = ${JSON.stringify(
|
|
1317
|
+
export const isServer = ${JSON.stringify(k)};
|
|
1318
|
+
export const isBrowser = ${JSON.stringify(!k)};
|
|
1319
|
+
export const isDev = ${JSON.stringify(P)};
|
|
1306
1320
|
`;
|
|
1307
1321
|
}
|
|
1308
|
-
async function
|
|
1309
|
-
if (!n.manifestInput && n.target === "ssr" && n.buildMode === "production" &&
|
|
1310
|
-
const
|
|
1311
|
-
let
|
|
1312
|
-
await
|
|
1322
|
+
async function Le(k) {
|
|
1323
|
+
if (!n.manifestInput && n.target === "ssr" && n.buildMode === "production" && v) {
|
|
1324
|
+
const q = y();
|
|
1325
|
+
let M = n.manifestInputPath || q.resolve(n.clientOutDir, Ge);
|
|
1326
|
+
await v.promises.stat(M).catch(() => !1) || (M = q.resolve(n.rootDir, lt, Ge));
|
|
1313
1327
|
try {
|
|
1314
|
-
const C = await
|
|
1315
|
-
n.manifestInput =
|
|
1328
|
+
const C = await v.promises.readFile(M, "utf-8");
|
|
1329
|
+
n.manifestInput = nt(JSON.parse(C)) || null, console.info("Read client manifest from", M);
|
|
1316
1330
|
} catch (C) {
|
|
1317
1331
|
console.warn(
|
|
1318
1332
|
`
|
|
1319
1333
|
==========
|
|
1320
|
-
Could not read Qwik client manifest ${
|
|
1334
|
+
Could not read Qwik client manifest ${M}.
|
|
1321
1335
|
Make sure you provide it to the qwikVite plugin via the \`manifestInput\` \`manifestInputPath\` arguments, or to the SSR renderer via the \`manifest\` argument, or define it in \`globalThis.__QWIK_MANIFEST__\` before the server bundle is loaded, or embed it in the server bundle by replacing \`globalThis.__QWIK_MANIFEST__\`.
|
|
1322
1336
|
Without the manifest, the SSR renderer will not be able to generate event handlers.
|
|
1323
1337
|
(${C})
|
|
@@ -1326,129 +1340,130 @@ Without the manifest, the SSR renderer will not be able to generate event handle
|
|
|
1326
1340
|
);
|
|
1327
1341
|
}
|
|
1328
1342
|
}
|
|
1329
|
-
const
|
|
1330
|
-
let
|
|
1331
|
-
return
|
|
1332
|
-
manifestHash:
|
|
1333
|
-
core:
|
|
1334
|
-
preloader:
|
|
1335
|
-
qwikLoader:
|
|
1336
|
-
bundleGraphAsset:
|
|
1337
|
-
injections:
|
|
1338
|
-
mapping:
|
|
1339
|
-
bundleGraph:
|
|
1343
|
+
const h = k ? n.manifestInput : null;
|
|
1344
|
+
let P = null;
|
|
1345
|
+
return h?.manifestHash && (P = {
|
|
1346
|
+
manifestHash: h.manifestHash,
|
|
1347
|
+
core: h.core,
|
|
1348
|
+
preloader: h.preloader,
|
|
1349
|
+
qwikLoader: h.qwikLoader,
|
|
1350
|
+
bundleGraphAsset: h.bundleGraphAsset,
|
|
1351
|
+
injections: h.injections,
|
|
1352
|
+
mapping: h.mapping,
|
|
1353
|
+
bundleGraph: h.bundleGraph
|
|
1340
1354
|
}), `// @qwik-client-manifest
|
|
1341
|
-
export const manifest = ${
|
|
1355
|
+
export const manifest = ${P ? JSON.stringify(P) : "globalThis.__QWIK_MANIFEST__"};
|
|
1342
1356
|
`;
|
|
1343
1357
|
}
|
|
1344
|
-
function
|
|
1345
|
-
n.sourcemap =
|
|
1346
|
-
}
|
|
1347
|
-
function
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1358
|
+
function de(k) {
|
|
1359
|
+
n.sourcemap = k;
|
|
1360
|
+
}
|
|
1361
|
+
function je(k, h) {
|
|
1362
|
+
const P = k.name === "ssr";
|
|
1363
|
+
j("hotUpdate()", h.file, k.name);
|
|
1364
|
+
const q = P ? o : r;
|
|
1365
|
+
for (const M of h.modules) {
|
|
1366
|
+
const { id: C } = M;
|
|
1367
|
+
if (C) {
|
|
1368
|
+
j("hotUpdate()", `invalidate ${C}`), i.delete(C);
|
|
1369
|
+
for (const [A, [U, R]] of q)
|
|
1370
|
+
if (R === C) {
|
|
1371
|
+
j("hotUpdate()", `invalidate ${C} segment ${A}`), q.delete(A);
|
|
1372
|
+
const O = k.moduleGraph.getModuleById(A);
|
|
1373
|
+
O && k.moduleGraph.invalidateModule(O);
|
|
1374
|
+
}
|
|
1360
1375
|
}
|
|
1361
1376
|
}
|
|
1362
1377
|
}
|
|
1363
|
-
const
|
|
1378
|
+
const qt = (k, { getModuleInfo: h }) => {
|
|
1364
1379
|
if (n.target === "client") {
|
|
1365
1380
|
if (
|
|
1366
1381
|
// The preloader has to stay in a separate chunk if it's a client build
|
|
1367
1382
|
// the vite preload helper must be included or to prevent breaking circular dependencies
|
|
1368
|
-
|
|
1383
|
+
k.endsWith("@qwik.dev/core/build") || /[/\\](core|qwik)[/\\]dist[/\\]preloader\.[cm]js$/.test(k) || k === "\0vite/preload-helper.js"
|
|
1369
1384
|
)
|
|
1370
1385
|
return "qwik-preloader";
|
|
1371
1386
|
if (
|
|
1372
1387
|
// likewise, core and handlers have to be in the same chunk so there's no import waterfall
|
|
1373
|
-
/[/\\](core|qwik)[/\\](handlers|dist[/\\]core(\.prod|\.min)?)\.[cm]js$/.test(
|
|
1388
|
+
/[/\\](core|qwik)[/\\](handlers|dist[/\\]core(\.prod|\.min)?)\.[cm]js$/.test(k)
|
|
1374
1389
|
)
|
|
1375
1390
|
return "qwik-core";
|
|
1376
|
-
if (/[/\\](core|qwik)[/\\]dist[/\\]qwikloader\.js$/.test(
|
|
1391
|
+
if (/[/\\](core|qwik)[/\\]dist[/\\]qwikloader\.js$/.test(k))
|
|
1377
1392
|
return "qwik-loader";
|
|
1378
1393
|
}
|
|
1379
|
-
const
|
|
1380
|
-
if (
|
|
1381
|
-
const
|
|
1382
|
-
if (
|
|
1383
|
-
if (["qwikify$", "useVisibleTask$", "useComputed$"].includes(
|
|
1394
|
+
const P = h(k);
|
|
1395
|
+
if (P) {
|
|
1396
|
+
const q = P.meta.segment;
|
|
1397
|
+
if (q) {
|
|
1398
|
+
if (["qwikify$", "useVisibleTask$", "useComputed$"].includes(q.ctxName))
|
|
1384
1399
|
return null;
|
|
1385
|
-
const { hash:
|
|
1400
|
+
const { hash: M } = q, C = n.entryStrategy.manual?.[M] || q.entry;
|
|
1386
1401
|
if (C)
|
|
1387
1402
|
return C;
|
|
1388
1403
|
}
|
|
1389
1404
|
}
|
|
1390
1405
|
return null;
|
|
1391
1406
|
};
|
|
1392
|
-
async function
|
|
1393
|
-
const C = await
|
|
1407
|
+
async function Ot(k, h, P, q) {
|
|
1408
|
+
const C = await Y(h).generateManifest(q);
|
|
1394
1409
|
C.platform = {
|
|
1395
|
-
...
|
|
1396
|
-
rollup:
|
|
1397
|
-
env:
|
|
1398
|
-
os:
|
|
1399
|
-
},
|
|
1400
|
-
const
|
|
1410
|
+
...q?.platform,
|
|
1411
|
+
rollup: k.meta?.rollupVersion || "",
|
|
1412
|
+
env: E.sys.env,
|
|
1413
|
+
os: E.sys.os
|
|
1414
|
+
}, E.sys.env === "node" && (C.platform.node = process.versions.node);
|
|
1415
|
+
const A = en(C, P), U = k.emitFile({
|
|
1401
1416
|
type: "asset",
|
|
1402
1417
|
name: "bundle-graph.json",
|
|
1403
|
-
source: JSON.stringify(
|
|
1404
|
-
}),
|
|
1405
|
-
C.bundleGraphAsset =
|
|
1418
|
+
source: JSON.stringify(A)
|
|
1419
|
+
}), R = k.getFileName(U);
|
|
1420
|
+
C.bundleGraphAsset = R, C.assets[R] = {
|
|
1406
1421
|
name: "bundle-graph.json",
|
|
1407
|
-
size:
|
|
1422
|
+
size: A.length
|
|
1408
1423
|
};
|
|
1409
|
-
const
|
|
1410
|
-
|
|
1411
|
-
fileName:
|
|
1424
|
+
const O = JSON.stringify(C, null, " ");
|
|
1425
|
+
k.emitFile({
|
|
1426
|
+
fileName: Ge,
|
|
1412
1427
|
type: "asset",
|
|
1413
|
-
source:
|
|
1414
|
-
}), typeof n.manifestOutput == "function" && await n.manifestOutput(C), typeof n.transformedModuleOutput == "function" && await n.transformedModuleOutput(
|
|
1428
|
+
source: O
|
|
1429
|
+
}), typeof n.manifestOutput == "function" && await n.manifestOutput(C), typeof n.transformedModuleOutput == "function" && await n.transformedModuleOutput(X());
|
|
1415
1430
|
}
|
|
1416
1431
|
return {
|
|
1417
|
-
buildStart:
|
|
1418
|
-
createOutputAnalyzer:
|
|
1419
|
-
getQwikBuildModule:
|
|
1420
|
-
getOptimizer:
|
|
1421
|
-
getOptions:
|
|
1422
|
-
getPath:
|
|
1432
|
+
buildStart: w,
|
|
1433
|
+
createOutputAnalyzer: Y,
|
|
1434
|
+
getQwikBuildModule: z,
|
|
1435
|
+
getOptimizer: g,
|
|
1436
|
+
getOptions: Z,
|
|
1437
|
+
getPath: y,
|
|
1423
1438
|
getSys: d,
|
|
1424
|
-
getTransformedOutputs:
|
|
1439
|
+
getTransformedOutputs: X,
|
|
1425
1440
|
init: I,
|
|
1426
|
-
load:
|
|
1427
|
-
debug:
|
|
1428
|
-
log:
|
|
1429
|
-
normalizeOptions:
|
|
1430
|
-
normalizePath:
|
|
1431
|
-
onDiagnostics:
|
|
1432
|
-
resolveId:
|
|
1433
|
-
transform:
|
|
1434
|
-
validateSource:
|
|
1435
|
-
setSourceMapSupport:
|
|
1436
|
-
configureServer:
|
|
1437
|
-
|
|
1438
|
-
manualChunks:
|
|
1439
|
-
generateManifest:
|
|
1441
|
+
load: F,
|
|
1442
|
+
debug: j,
|
|
1443
|
+
log: fe,
|
|
1444
|
+
normalizeOptions: p,
|
|
1445
|
+
normalizePath: K,
|
|
1446
|
+
onDiagnostics: re,
|
|
1447
|
+
resolveId: T,
|
|
1448
|
+
transform: J,
|
|
1449
|
+
validateSource: S,
|
|
1450
|
+
setSourceMapSupport: de,
|
|
1451
|
+
configureServer: s,
|
|
1452
|
+
hotUpdate: je,
|
|
1453
|
+
manualChunks: qt,
|
|
1454
|
+
generateManifest: Ot
|
|
1440
1455
|
};
|
|
1441
1456
|
}
|
|
1442
|
-
const
|
|
1457
|
+
const mn = (e) => (t) => typeof t == "string" ? cn(e.os) ? (t.startsWith("\\\\?\\") || /[^\u0000-\u0080]+/.test(t) || (t = t.replace(/\\/g, "/")), e.path.posix.normalize(t)) : e.path.normalize(t) : t;
|
|
1443
1458
|
function hn(e) {
|
|
1444
1459
|
return e.isEntry || e.segment;
|
|
1445
1460
|
}
|
|
1446
|
-
const
|
|
1461
|
+
const gn = {
|
|
1447
1462
|
".jsx": !0,
|
|
1448
1463
|
".ts": !0,
|
|
1449
1464
|
".tsx": !0
|
|
1450
|
-
},
|
|
1451
|
-
async function
|
|
1465
|
+
}, Nt = /\.qwik\.[mc]?js$/, qe = "@qwik.dev/core", Oe = "@qwik.dev/core/internal", te = "@qwik.dev/core/build", Ye = "@qwik.dev/core/jsx-runtime", Xe = "@qwik.dev/core/jsx-dev-runtime", Ae = "@qwik.dev/core/server", ae = "@qwik-client-manifest", We = "@qwik.dev/core/preloader", he = "@qwik-handlers", yn = "src", lt = "dist", vn = "server", bn = "lib", Ge = "q-manifest.json";
|
|
1466
|
+
async function wn(e, t, i) {
|
|
1452
1467
|
if (e.env === "browsermain" || e.env === "webworker")
|
|
1453
1468
|
return;
|
|
1454
1469
|
const r = await e.dynamicImport("node:fs");
|
|
@@ -1465,8 +1480,8 @@ async function vn(e, t, i) {
|
|
|
1465
1480
|
o = l;
|
|
1466
1481
|
}
|
|
1467
1482
|
}
|
|
1468
|
-
function
|
|
1469
|
-
const t =
|
|
1483
|
+
function Hr(e = {}) {
|
|
1484
|
+
const t = Dt(e.optimizerOptions);
|
|
1470
1485
|
return {
|
|
1471
1486
|
name: "rollup-plugin-qwik",
|
|
1472
1487
|
api: {
|
|
@@ -1476,8 +1491,8 @@ function $r(e = {}) {
|
|
|
1476
1491
|
async options(r) {
|
|
1477
1492
|
await t.init();
|
|
1478
1493
|
const o = r.onwarn;
|
|
1479
|
-
r.onwarn = (
|
|
1480
|
-
|
|
1494
|
+
r.onwarn = (a, f) => {
|
|
1495
|
+
a.plugin === "typescript" && a.message.includes("outputToFilesystem") || (o ? o(a, f) : f(a));
|
|
1481
1496
|
};
|
|
1482
1497
|
const m = {
|
|
1483
1498
|
csr: e.csr,
|
|
@@ -1502,42 +1517,42 @@ function $r(e = {}) {
|
|
|
1502
1517
|
return r.input = l, r;
|
|
1503
1518
|
},
|
|
1504
1519
|
outputOptions(r) {
|
|
1505
|
-
return
|
|
1520
|
+
return Ve(t, r, !1);
|
|
1506
1521
|
},
|
|
1507
1522
|
async buildStart() {
|
|
1508
1523
|
t.onDiagnostics((r, o, m) => {
|
|
1509
1524
|
r.forEach((l) => {
|
|
1510
|
-
const
|
|
1511
|
-
l.category === "error" ? this.error(
|
|
1525
|
+
const a = t.normalizePath(o.sys.path.join(m, l.file));
|
|
1526
|
+
l.category === "error" ? this.error($e(a, l)) : this.warn($e(a, l));
|
|
1512
1527
|
});
|
|
1513
1528
|
}), await t.buildStart(this);
|
|
1514
1529
|
},
|
|
1515
1530
|
resolveId(r, o) {
|
|
1516
|
-
return
|
|
1531
|
+
return ne(r) ? null : t.resolveId(this, r, o);
|
|
1517
1532
|
},
|
|
1518
1533
|
load(r) {
|
|
1519
|
-
return
|
|
1534
|
+
return ne(r) ? null : t.load(this, r);
|
|
1520
1535
|
},
|
|
1521
1536
|
transform(r, o) {
|
|
1522
|
-
return
|
|
1537
|
+
return ne(o) ? null : t.transform(this, r, o);
|
|
1523
1538
|
},
|
|
1524
1539
|
async generateBundle(r, o) {
|
|
1525
1540
|
t.getOptions().target === "client" && await t.generateManifest(this, o);
|
|
1526
1541
|
}
|
|
1527
1542
|
};
|
|
1528
1543
|
}
|
|
1529
|
-
async function
|
|
1544
|
+
async function xn(e, t, i, r) {
|
|
1530
1545
|
return Array.isArray(t) ? (t.length || t.push({}), await Promise.all(
|
|
1531
1546
|
t.map(async (o) => ({
|
|
1532
|
-
...await
|
|
1547
|
+
...await Ve(e, o, i),
|
|
1533
1548
|
dir: r || o.dir
|
|
1534
1549
|
}))
|
|
1535
1550
|
)) : {
|
|
1536
|
-
...await
|
|
1551
|
+
...await Ve(e, t, i),
|
|
1537
1552
|
dir: r || t?.dir
|
|
1538
1553
|
};
|
|
1539
1554
|
}
|
|
1540
|
-
const
|
|
1555
|
+
const In = (e, t, i) => t.buildMode === "production" && !t.debug ? `${e}build/q-[hash].js` : (r) => {
|
|
1541
1556
|
if (r.moduleIds?.some((l) => /core\.(prod|min)\.mjs$/.test(l)))
|
|
1542
1557
|
return `${e}build/core.js`;
|
|
1543
1558
|
if (r.moduleIds?.some((l) => /qwik-router\/lib\/index\.qwik\.mjs$/.test(l)))
|
|
@@ -1545,31 +1560,31 @@ const xn = (e, t, i) => t.buildMode === "production" && !t.debug ? `${e}build/q-
|
|
|
1545
1560
|
const m = i.sys.path.relative(i.sys.cwd(), r.name).replace(/^(\.\.\/)+/, "").replace(/^\/+/, "").replace(/\//g, "-");
|
|
1546
1561
|
return `${e}build/${m}.js`;
|
|
1547
1562
|
};
|
|
1548
|
-
async function
|
|
1563
|
+
async function Ve(e, t, i) {
|
|
1549
1564
|
const r = { ...t }, o = e.getOptions(), m = e.getOptimizer(), l = e.manualChunks;
|
|
1550
1565
|
r.assetFileNames || (r.assetFileNames = `${i ? `${o.assetsDir}/` : ""}assets/[hash]-[name].[ext]`);
|
|
1551
|
-
const
|
|
1566
|
+
const a = In(i ? `${o.assetsDir}` : "", o, m);
|
|
1552
1567
|
if (o.target === "client") {
|
|
1553
|
-
r.entryFileNames || (r.entryFileNames =
|
|
1568
|
+
r.entryFileNames || (r.entryFileNames = a), r.chunkFileNames || (r.chunkFileNames = a), r.format = "es";
|
|
1554
1569
|
const n = r.manualChunks;
|
|
1555
1570
|
if (n && typeof n != "function")
|
|
1556
1571
|
throw new Error("manualChunks must be a function");
|
|
1557
|
-
r.manualChunks = n ? (
|
|
1572
|
+
r.manualChunks = n ? (b, v) => n(b, v) || l(b, v) : l;
|
|
1558
1573
|
} else
|
|
1559
|
-
r.chunkFileNames || (r.chunkFileNames =
|
|
1574
|
+
r.chunkFileNames || (r.chunkFileNames = a);
|
|
1560
1575
|
r.dir || (r.dir = o.outDir), r.format === "cjs" && typeof r.exports != "string" && (r.exports = "auto"), r.hoistTransitiveImports = !1;
|
|
1561
|
-
const f = await
|
|
1576
|
+
const f = await wn(m.sys, "rollup", m.sys.cwd());
|
|
1562
1577
|
if (f)
|
|
1563
1578
|
try {
|
|
1564
|
-
const
|
|
1565
|
-
Number.isFinite(
|
|
1579
|
+
const b = await (await m.sys.dynamicImport("node:fs")).promises.readFile(f, "utf-8"), v = JSON.parse(b), I = String(v?.version || ""), [g, d, y] = I.split(".").map((s) => parseInt(s, 10));
|
|
1580
|
+
Number.isFinite(g) && (g > 4 || g === 4 && (d > 52 || d === 52 && (y || 0) >= 0)) ? r.onlyExplicitManualChunks = !0 : console.warn(
|
|
1566
1581
|
`⚠️ We detected that you're using a Rollup version prior to 4.52.0 (${I}). For the latest and greatest, we recommend to let Vite install the latest version for you, or manually install the latest version of Rollup in your project if that doesn't work. It will enable the new Rollup \`outputOpts.onlyExplicitManualChunks\` feature flag, which improves preloading performance and reduces cache invalidation for a snappier user experience.`
|
|
1567
1582
|
);
|
|
1568
1583
|
} catch {
|
|
1569
1584
|
}
|
|
1570
1585
|
return r;
|
|
1571
1586
|
}
|
|
1572
|
-
function
|
|
1587
|
+
function $e(e, t) {
|
|
1573
1588
|
const i = t.highlights?.[0];
|
|
1574
1589
|
return Object.assign(new Error(t.message), {
|
|
1575
1590
|
id: e,
|
|
@@ -1581,7 +1596,7 @@ function Ae(e, t) {
|
|
|
1581
1596
|
stack: ""
|
|
1582
1597
|
});
|
|
1583
1598
|
}
|
|
1584
|
-
const In = `"undefined"==typeof window||window.__qwikViteLog||(window.__qwikViteLog=!0,console.debug("%c⭐️ Qwik Dev SSR Mode","background: #0c75d2; color: white; padding: 2px 3px; border-radius: 2px; font-size: 0.8em;","App is running in SSR development mode!\\n - Additional JS is loaded by Vite for debugging and live reloading\\n - Rendering performance might not be optimal\\n - Delayed interactivity because prefetching is disabled\\n - Vite dev bundles do not represent production output\\n\\nProduction build can be tested running 'npm run preview'"))`, Sn = 'if("undefined"!=typeof document){const e=()=>{const e="data-qwik-inspector",t=globalThis.__HOTKEYS__,o=globalThis.__BASE__;let n=document.querySelector("#qwik-inspector-info-popup");n||(n=document.createElement("div"),n.id="qwik-inspector-info-popup",n["aria-hidden"]="true",document.body.appendChild(n)),n.textContent=`Click-to-Source: ${t.join(" + ")}`,console.debug("%c🔍 Qwik Click-To-Source","background: #564CE0; color: white; padding: 2px 3px; border-radius: 2px; font-size: 0.8em;",`Hold-press the \'${t.join(" + ")}\' key${t.length>1?"s":""} and click a component to jump directly to the source code in your IDE!`),window.__qwik_inspector_state={pressedKeys:new Set};const r=document.body,i=document.createElement("div");function s(t){return t&&t instanceof Element?t.closest(`[${e}]`):null}function d(){const e=window.__qwik_inspector_state.hoveredElement;if(e&&c()){const t=e.getBoundingClientRect();i.style.setProperty("height",t.height+"px"),i.style.setProperty("width",t.width+"px"),i.style.setProperty("top",t.top+"px"),i.style.setProperty("left",t.left+"px"),i.style.setProperty("visibility","visible"),r.style.setProperty("cursor","pointer")}else i.style.setProperty("height","0px"),i.style.setProperty("width","0px"),i.style.setProperty("visibility","hidden"),r.style.removeProperty("cursor")}function c(){return function(){const e=Array.from(window.__qwik_inspector_state.pressedKeys).map(e=>e?e.replace(/(Left|Right)$/g,""):void 0);return t.every(t=>e.includes(t))}()}i.id="qwik-inspector-overlay",i.setAttribute("aria-hidden","true"),r.appendChild(i),document.addEventListener("keydown",e=>{window.__qwik_inspector_state.pressedKeys.add(e.code),d()},{capture:!0}),document.addEventListener("keyup",e=>{window.__qwik_inspector_state.pressedKeys.delete(e.code),d()},{capture:!0}),window.addEventListener("blur",()=>{window.__qwik_inspector_state.pressedKeys.clear(),d()},{capture:!0}),document.addEventListener("mouseover",e=>{const t=s(e.target);window.__qwik_inspector_state.hoveredElement=t||void 0,d()},{capture:!0}),document.addEventListener("click",t=>{if(c()){window.__qwik_inspector_state.pressedKeys.clear();const n=s(t.target);if(n){t.preventDefault(),t.stopPropagation();const i=n.getAttribute(e);if("false"!==i){r.style.setProperty("cursor","progress");const e=i.match(/^(.*?)(:\\d+(:\\d+)?)?$/);if(e){const[,t,n]=e;fetch(`${o}${t}?editor${n}`).then(()=>{r.style.removeProperty("cursor")})}}}}},{capture:!0}),document.addEventListener("contextmenu",e=>{if(c()){window.__qwik_inspector_state.pressedKeys.clear();s(e.target)&&e.preventDefault()}},{capture:!0}),window.addEventListener("resize",d),document.addEventListener("scroll",d)};document.addEventListener("DOMContentLoaded",e)}', kn = `if("undefined"!=typeof HTMLElement){class e extends HTMLElement{get _root(){return this.shadowRoot||this}constructor(){super(),this.state={},this.props||(this.props={}),this.componentProps=["children","error"],this.nodesToDestroy=[],this.pendingUpdate=!1,this.attachShadow({mode:"open"})}destroyAnyNodes(){this.nodesToDestroy.forEach(e=>e.remove()),this.nodesToDestroy=[]}connectedCallback(){this.getAttributeNames().forEach(e=>{const t=e.replace(/-/g,""),o=new RegExp(t,"i");this.componentProps.forEach(t=>{if(o.test(t)){const o=this.getAttribute(e);this.props[t]!==o&&(this.props[t]=o)}})}),this._root.innerHTML='\\n\\n <template data-el="show-errored-host">\\n <div class="error">\\n <template data-el="div-errored-host-2">\\n \\x3c!-- String(props.error) --\\x3e\\n </template>\\n </div>\\n </template>\\n\\n <div class="arrow">👇 Uncaught error happened here 👇\\n <span class="dev-tools">DevTools: Cmd+Alt+I</span>\\n </div>\\n <div class="div">\\n <slot></slot>\\n </div>\\n\\n <style>\\n .error {\\n border-radius: 5px 5px 0px 0;\\n background: black;\\n color: white;\\n font-family: monospace;\\n font-size: 12px;\\n margin: 0;\\n padding: 10px;\\n }\\n .arrow {\\n background: #f47e81;\\n color: black;\\n font-size: 14px;\\n padding: 10px;\\n text-align: center;\\n font-family: sans-serif;\\n }\\n .dev-tools {\\n background: red;\\n padding: 2px 5px;\\n border-radius: 3px;\\n font-weight: 800;\\n }\\n .div {\\n outline: 5px solid red;\\n border-radius: 10px;\\n }\\n </style>',this.pendingUpdate=!0,this.render(),this.onMount(),this.pendingUpdate=!1,this.update()}showContent(e){const t=e.content.cloneNode(!0);Array.from(t.childNodes).forEach(t=>{e?.scope&&(t.scope=e.scope),e?.context&&(t.context=e.context),this.nodesToDestroy.push(t)}),e.after(t)}onMount(){}onUpdate(){}update(){!0!==this.pendingUpdate&&(this.pendingUpdate=!0,this.render(),this.onUpdate(),this.pendingUpdate=!1)}render(){this.destroyAnyNodes(),this.updateBindings()}updateBindings(){this._root.querySelectorAll("[data-el='show-errored-host']").forEach(e=>{this.props.error&&this.showContent(e)}),this._root.querySelectorAll("[data-el='div-errored-host-2']").forEach(e=>{this.renderTextNode(e,String(this.props.error))})}renderTextNode(e,t){const o=document.createTextNode(t);e?.scope&&(o.scope=e.scope),e?.context&&(o.context=e.context),e.after(o),this.nodesToDestroy.push(e.nextSibling)}}customElements.define("errored-host",e),document.addEventListener("qerror",e=>{const t=customElements.get("vite-error-overlay");if(!t)return;const o=new t(e.detail.error);document.body.appendChild(o)})}`, En = '[data-qwik-cls]{outline:2px solid red}[data-qwik-cls]:after{position:absolute;font-size:12px;content:"CLS " attr(data-qwik-cls);font-family:monospace;font-weight:700;background:red;color:#fff;margin:-2px;padding:1px;line-height:1;pointer-events:none}#qwik-image-warning-container{position:absolute!important;top:0!important;left:0!important;width:0!important;overflow:visible!important;height:0!important;pointer-events:none!important;contain:size layout style content;z-index:1}', _n = 'if("undefined"!=typeof document){const e=()=>{class e extends HTMLElement{#e=null;constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(document.createElement("template").innerHTML=globalThis.__TEMPLATE__);const e=this.shadowRoot.querySelector("dialog");this.shadowRoot.addEventListener("click",async t=>{const o=t.target;"BUTTON"===o.nodeName&&("action-btn"===o.id?this.#e&&(this.#e(),e.close()):"icon"===o.id?e.open?e.close():(e.className=function(e){const{x:t}=e.getBoundingClientRect();let o="right";return t>window.innerWidth-260&&(o="left"),`bottom ${o}`}(o),e.show()):"loc"===o.id&&o.dataset.url&&globalThis.qwikOpenInEditor(o.dataset.url))})}set loc(e){const t=this.shadowRoot.querySelector("#loc");t.textContent=e,globalThis.qwikOpenInEditor&&(t.dataset.url=e)}set header(e){this.shadowRoot.querySelector("#title").textContent=e}set message(e){this.shadowRoot.querySelector("#message").innerHTML=e}set actionFn(e){this.#e=e}set actionName(e){e&&(this.shadowRoot.querySelector(".action-container").innerHTML=`<button id="action-btn" type="button">${e}</button>`)}}customElements.define("image-warning",e);const t=new Map;let o=document.querySelector("#qwik-image-warning-container");o||(o=document.createElement("div"),o.id="qwik-image-warning-container",document.body.appendChild(o));let n=!1;const i=new Map;function r(e){let t=i.get(e);return void 0===t&&(t=async function(e){if(!/^(https?|file|capacitor):/.test(e))return;const t=new URL("/__image_info",location.href);return t.searchParams.set("url",e),fetch(t).then(e=>e.json()).catch(()=>null)}(e),i.set(e,t)),t}function a(e){return e.endsWith("px")}async function s(e){const i=t.get(e);e.isConnected?e.complete&&async function(e){const i=window.scrollX,s=window.scrollY,c=e.getBoundingClientRect(),d=e.currentSrc,l=await r(d);let h=t.get(e);const u=window.innerWidth>500;if(l&&u){let r=!1;const d=e.getAttribute("data-qwik-inspector"),u=c.width*c.height;if(!e.hasAttribute("width")||!e.hasAttribute("height")){n=!0;const t=getComputedStyle(e),o="auto"!==t.getPropertyValue("aspect-ratio").toString(),i=a(t.getPropertyValue("width").toString()),s=a(t.getPropertyValue("height").toString()),c="absolute"===t.getPropertyValue("position").toString();r=u>1e3&&!c&&!o&&(!i||!s)}const g=u<.5*(l.width&&l.height)&&"svg"!==l.type;if(n=!1,r||g){if(h||(h=document.createElement("image-warning"),o.appendChild(h),t.set(e,h)),h.style.top=c.top+s+"px",h.style.left=c.left+i+"px",h.style.width=c.width+"px",h.style.height=c.height+"px",h.info=l,h.loc=d,r){const t=`width="${l.width}" height="${l.height}"`;h.header="Perf: layout shift",h.message=`Image\'s size is unknown until it\'s loaded, <a href="https://web.dev/cls/" target="_blank" rel="noopener noreferrer">causing layout shift</a>.</p><p>To solve this problem set the width/height in the img tag:</p><pre><img <span>${t}</span></pre>`;const o=1===document.querySelectorAll(\'[data-qwik-inspector="\'+d+\'"]\').length;d&&(o?(h.actionName="Auto fix",h.actionFn=async()=>{const t=new URL("/__image_fix",location.href);t.searchParams.set("loc",d),t.searchParams.set("width",l.width),t.searchParams.set("height",l.height),e.srcset||(t.searchParams.set("src",e.currentSrc),t.searchParams.set("currentHref",location.href)),await fetch(t,{method:"POST"})}):(h.actionName="Open in editor",h.actionFn=async()=>{await navigator.clipboard.writeText(t),globalThis.qwikOpenInEditor(d)}))}else g&&(h.header="Perf: properly size image",h.message=`The image is too big, <a href="https://developer.chrome.com/en/docs/lighthouse/performance/uses-responsive-images/" target="_blank" rel="noopener noreferrer">hurting performance</a>, it should be resized to the size it\'s displayed at. The image dimensions are ${l.width} x ${l.height} but it\'s displayed at ${c.width}x${c.height}.</p>`);return}}h&&(h.remove(),t.delete(e))}(e):i&&(i.remove(),t.delete(e))}const c=new ResizeObserver(e=>{if(!n)for(const t of e)s(t.target)}),d=new MutationObserver(e=>{for(const t of e){for(const e of t.addedNodes)"IMG"===e.nodeName?c.observe(e):1===e.nodeType&&e.querySelectorAll("img").forEach(e=>{c.observe(e)});for(const e of t.removedNodes)"IMG"===e.nodeName?(s(e),c.unobserve(e)):1===e.nodeType&&e.querySelectorAll("img").forEach(e=>{s(e),c.unobserve(e)})}});let l,h=0;const u=()=>{setTimeout(()=>{l&&(l.disconnect(),h>.005&&console.error("Detected Layout Shift during page load",h)),d.observe(document.body,{childList:!0,subtree:!0}),document.body.querySelectorAll("img").forEach(e=>{c.observe(e)})},100)};"complete"===document.readyState?u():window.addEventListener("load",u);const g=1===performance?.navigation.type||performance.getEntriesByType("navigation").map(e=>e.type).includes("reload");"undefined"==typeof PerformanceObserver||g||(l=new PerformanceObserver(e=>{e.getEntries().forEach(e=>{if(!e.hadRecentInput){if(e.value>.006)for(const t of e.sources)t.node&&1===t.node.nodeType&&"IMAGE-WARNING"!==t.node.nodeName&&t.node.setAttribute("data-qwik-cls",Number(e.value).toFixed(3));h+=e.value}})}),l.observe({type:"layout-shift",buffered:!0}))};document.addEventListener("load",e)}', Tn = `<style>
|
|
1599
|
+
const Sn = `"undefined"==typeof window||window.__qwikViteLog||(window.__qwikViteLog=!0,console.debug("%c⭐️ Qwik Dev SSR Mode","background: #0c75d2; color: white; padding: 2px 3px; border-radius: 2px; font-size: 0.8em;","App is running in SSR development mode!\\n - Additional JS is loaded by Vite for debugging and live reloading\\n - Rendering performance might not be optimal\\n - Delayed interactivity because prefetching is disabled\\n - Vite dev bundles do not represent production output\\n\\nProduction build can be tested running 'npm run preview'"))`, En = 'if("undefined"!=typeof document){const e=()=>{const e="data-qwik-inspector",t=globalThis.__HOTKEYS__,o=globalThis.__BASE__;let n=document.querySelector("#qwik-inspector-info-popup");n||(n=document.createElement("div"),n.id="qwik-inspector-info-popup",n["aria-hidden"]="true",document.body.appendChild(n)),n.textContent=`Click-to-Source: ${t.join(" + ")}`,console.debug("%c🔍 Qwik Click-To-Source","background: #564CE0; color: white; padding: 2px 3px; border-radius: 2px; font-size: 0.8em;",`Hold-press the \'${t.join(" + ")}\' key${t.length>1?"s":""} and click a component to jump directly to the source code in your IDE!`),window.__qwik_inspector_state={pressedKeys:new Set};const r=document.body,i=document.createElement("div");function s(t){return t&&t instanceof Element?t.closest(`[${e}]`):null}function d(){const e=window.__qwik_inspector_state.hoveredElement;if(e&&c()){const t=e.getBoundingClientRect();i.style.setProperty("height",t.height+"px"),i.style.setProperty("width",t.width+"px"),i.style.setProperty("top",t.top+"px"),i.style.setProperty("left",t.left+"px"),i.style.setProperty("visibility","visible"),r.style.setProperty("cursor","pointer")}else i.style.setProperty("height","0px"),i.style.setProperty("width","0px"),i.style.setProperty("visibility","hidden"),r.style.removeProperty("cursor")}function c(){return function(){const e=Array.from(window.__qwik_inspector_state.pressedKeys).map(e=>e?e.replace(/(Left|Right)$/g,""):void 0);return t.every(t=>e.includes(t))}()}i.id="qwik-inspector-overlay",i.setAttribute("aria-hidden","true"),r.appendChild(i),document.addEventListener("keydown",e=>{window.__qwik_inspector_state.pressedKeys.add(e.code),d()},{capture:!0}),document.addEventListener("keyup",e=>{window.__qwik_inspector_state.pressedKeys.delete(e.code),d()},{capture:!0}),window.addEventListener("blur",()=>{window.__qwik_inspector_state.pressedKeys.clear(),d()},{capture:!0}),document.addEventListener("mouseover",e=>{const t=s(e.target);window.__qwik_inspector_state.hoveredElement=t||void 0,d()},{capture:!0}),document.addEventListener("click",t=>{if(c()){window.__qwik_inspector_state.pressedKeys.clear();const n=s(t.target);if(n){t.preventDefault(),t.stopPropagation();const i=n.getAttribute(e);if("false"!==i){r.style.setProperty("cursor","progress");const e=i.match(/^(.*?)(:\\d+(:\\d+)?)?$/);if(e){const[,t,n]=e;fetch(`${o}${t}?editor${n}`).then(()=>{r.style.removeProperty("cursor")})}}}}},{capture:!0}),document.addEventListener("contextmenu",e=>{if(c()){window.__qwik_inspector_state.pressedKeys.clear();s(e.target)&&e.preventDefault()}},{capture:!0}),window.addEventListener("resize",d),document.addEventListener("scroll",d)};document.addEventListener("DOMContentLoaded",e)}', kn = `if("undefined"!=typeof HTMLElement){class e extends HTMLElement{get _root(){return this.shadowRoot||this}constructor(){super(),this.state={},this.props||(this.props={}),this.componentProps=["children","error"],this.nodesToDestroy=[],this.pendingUpdate=!1,this.attachShadow({mode:"open"})}destroyAnyNodes(){this.nodesToDestroy.forEach(e=>e.remove()),this.nodesToDestroy=[]}connectedCallback(){this.getAttributeNames().forEach(e=>{const t=e.replace(/-/g,""),o=new RegExp(t,"i");this.componentProps.forEach(t=>{if(o.test(t)){const o=this.getAttribute(e);this.props[t]!==o&&(this.props[t]=o)}})}),this._root.innerHTML='\\n\\n <template data-el="show-errored-host">\\n <div class="error">\\n <template data-el="div-errored-host-2">\\n \\x3c!-- String(props.error) --\\x3e\\n </template>\\n </div>\\n </template>\\n\\n <div class="arrow">👇 Uncaught error happened here 👇\\n <span class="dev-tools">DevTools: Cmd+Alt+I</span>\\n </div>\\n <div class="div">\\n <slot></slot>\\n </div>\\n\\n <style>\\n .error {\\n border-radius: 5px 5px 0px 0;\\n background: black;\\n color: white;\\n font-family: monospace;\\n font-size: 12px;\\n margin: 0;\\n padding: 10px;\\n }\\n .arrow {\\n background: #f47e81;\\n color: black;\\n font-size: 14px;\\n padding: 10px;\\n text-align: center;\\n font-family: sans-serif;\\n }\\n .dev-tools {\\n background: red;\\n padding: 2px 5px;\\n border-radius: 3px;\\n font-weight: 800;\\n }\\n .div {\\n outline: 5px solid red;\\n border-radius: 10px;\\n }\\n </style>',this.pendingUpdate=!0,this.render(),this.onMount(),this.pendingUpdate=!1,this.update()}showContent(e){const t=e.content.cloneNode(!0);Array.from(t.childNodes).forEach(t=>{e?.scope&&(t.scope=e.scope),e?.context&&(t.context=e.context),this.nodesToDestroy.push(t)}),e.after(t)}onMount(){}onUpdate(){}update(){!0!==this.pendingUpdate&&(this.pendingUpdate=!0,this.render(),this.onUpdate(),this.pendingUpdate=!1)}render(){this.destroyAnyNodes(),this.updateBindings()}updateBindings(){this._root.querySelectorAll("[data-el='show-errored-host']").forEach(e=>{this.props.error&&this.showContent(e)}),this._root.querySelectorAll("[data-el='div-errored-host-2']").forEach(e=>{this.renderTextNode(e,String(this.props.error))})}renderTextNode(e,t){const o=document.createTextNode(t);e?.scope&&(o.scope=e.scope),e?.context&&(o.context=e.context),e.after(o),this.nodesToDestroy.push(e.nextSibling)}}customElements.define("errored-host",e),document.addEventListener("qerror",e=>{const t=customElements.get("vite-error-overlay");if(!t)return;const o=new t(e.detail.error);document.body.appendChild(o)})}`, _n = '[data-qwik-cls]{outline:2px solid red}[data-qwik-cls]:after{position:absolute;font-size:12px;content:"CLS " attr(data-qwik-cls);font-family:monospace;font-weight:700;background:red;color:#fff;margin:-2px;padding:1px;line-height:1;pointer-events:none}#qwik-image-warning-container{position:absolute!important;top:0!important;left:0!important;width:0!important;overflow:visible!important;height:0!important;pointer-events:none!important;contain:size layout style content;z-index:1}', Tn = 'if("undefined"!=typeof document){const e=()=>{class e extends HTMLElement{#e=null;constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(document.createElement("template").innerHTML=globalThis.__TEMPLATE__);const e=this.shadowRoot.querySelector("dialog");this.shadowRoot.addEventListener("click",async t=>{const o=t.target;"BUTTON"===o.nodeName&&("action-btn"===o.id?this.#e&&(this.#e(),e.close()):"icon"===o.id?e.open?e.close():(e.className=function(e){const{x:t}=e.getBoundingClientRect();let o="right";return t>window.innerWidth-260&&(o="left"),`bottom ${o}`}(o),e.show()):"loc"===o.id&&o.dataset.url&&globalThis.qwikOpenInEditor(o.dataset.url))})}set loc(e){const t=this.shadowRoot.querySelector("#loc");t.textContent=e,globalThis.qwikOpenInEditor&&(t.dataset.url=e)}set header(e){this.shadowRoot.querySelector("#title").textContent=e}set message(e){this.shadowRoot.querySelector("#message").innerHTML=e}set actionFn(e){this.#e=e}set actionName(e){e&&(this.shadowRoot.querySelector(".action-container").innerHTML=`<button id="action-btn" type="button">${e}</button>`)}}customElements.define("image-warning",e);const t=new Map;let o=document.querySelector("#qwik-image-warning-container");o||(o=document.createElement("div"),o.id="qwik-image-warning-container",document.body.appendChild(o));let n=!1;const i=new Map;function r(e){let t=i.get(e);return void 0===t&&(t=async function(e){if(!/^(https?|file|capacitor):/.test(e))return;const t=new URL("/__image_info",location.href);return t.searchParams.set("url",e),fetch(t).then(e=>e.json()).catch(()=>null)}(e),i.set(e,t)),t}function a(e){return e.endsWith("px")}async function s(e){const i=t.get(e);e.isConnected?e.complete&&async function(e){const i=window.scrollX,s=window.scrollY,c=e.getBoundingClientRect(),d=e.currentSrc,l=await r(d);let h=t.get(e);const u=window.innerWidth>500;if(l&&u){let r=!1;const d=e.getAttribute("data-qwik-inspector"),u=c.width*c.height;if(!e.hasAttribute("width")||!e.hasAttribute("height")){n=!0;const t=getComputedStyle(e),o="auto"!==t.getPropertyValue("aspect-ratio").toString(),i=a(t.getPropertyValue("width").toString()),s=a(t.getPropertyValue("height").toString()),c="absolute"===t.getPropertyValue("position").toString();r=u>1e3&&!c&&!o&&(!i||!s)}const g=u<.5*(l.width&&l.height)&&"svg"!==l.type;if(n=!1,r||g){if(h||(h=document.createElement("image-warning"),o.appendChild(h),t.set(e,h)),h.style.top=c.top+s+"px",h.style.left=c.left+i+"px",h.style.width=c.width+"px",h.style.height=c.height+"px",h.info=l,h.loc=d,r){const t=`width="${l.width}" height="${l.height}"`;h.header="Perf: layout shift",h.message=`Image\'s size is unknown until it\'s loaded, <a href="https://web.dev/cls/" target="_blank" rel="noopener noreferrer">causing layout shift</a>.</p><p>To solve this problem set the width/height in the img tag:</p><pre><img <span>${t}</span></pre>`;const o=1===document.querySelectorAll(\'[data-qwik-inspector="\'+d+\'"]\').length;d&&(o?(h.actionName="Auto fix",h.actionFn=async()=>{const t=new URL("/__image_fix",location.href);t.searchParams.set("loc",d),t.searchParams.set("width",l.width),t.searchParams.set("height",l.height),e.srcset||(t.searchParams.set("src",e.currentSrc),t.searchParams.set("currentHref",location.href)),await fetch(t,{method:"POST"})}):(h.actionName="Open in editor",h.actionFn=async()=>{await navigator.clipboard.writeText(t),globalThis.qwikOpenInEditor(d)}))}else g&&(h.header="Perf: properly size image",h.message=`The image is too big, <a href="https://developer.chrome.com/en/docs/lighthouse/performance/uses-responsive-images/" target="_blank" rel="noopener noreferrer">hurting performance</a>, it should be resized to the size it\'s displayed at. The image dimensions are ${l.width} x ${l.height} but it\'s displayed at ${c.width}x${c.height}.</p>`);return}}h&&(h.remove(),t.delete(e))}(e):i&&(i.remove(),t.delete(e))}const c=new ResizeObserver(e=>{if(!n)for(const t of e)s(t.target)}),d=new MutationObserver(e=>{for(const t of e){for(const e of t.addedNodes)"IMG"===e.nodeName?c.observe(e):1===e.nodeType&&e.querySelectorAll("img").forEach(e=>{c.observe(e)});for(const e of t.removedNodes)"IMG"===e.nodeName?(s(e),c.unobserve(e)):1===e.nodeType&&e.querySelectorAll("img").forEach(e=>{s(e),c.unobserve(e)})}});let l,h=0;const u=()=>{setTimeout(()=>{l&&(l.disconnect(),h>.005&&console.error("Detected Layout Shift during page load",h)),d.observe(document.body,{childList:!0,subtree:!0}),document.body.querySelectorAll("img").forEach(e=>{c.observe(e)})},100)};"complete"===document.readyState?u():window.addEventListener("load",u);const g=1===performance?.navigation.type||performance.getEntriesByType("navigation").map(e=>e.type).includes("reload");"undefined"==typeof PerformanceObserver||g||(l=new PerformanceObserver(e=>{e.getEntries().forEach(e=>{if(!e.hadRecentInput){if(e.value>.006)for(const t of e.sources)t.node&&1===t.node.nodeType&&"IMAGE-WARNING"!==t.node.nodeName&&t.node.setAttribute("data-qwik-cls",Number(e.value).toFixed(3));h+=e.value}})}),l.observe({type:"layout-shift",buffered:!0}))};document.addEventListener("load",e)}', Cn = `<style>
|
|
1585
1600
|
:host {
|
|
1586
1601
|
position: absolute;
|
|
1587
1602
|
border: 1px solid red;
|
|
@@ -1745,32 +1760,32 @@ const In = `"undefined"==typeof window||window.__qwikViteLog||(window.__qwikVite
|
|
|
1745
1760
|
<p class="action-container"></p>
|
|
1746
1761
|
</div>
|
|
1747
1762
|
</dialog>
|
|
1748
|
-
`,
|
|
1749
|
-
async function
|
|
1750
|
-
const o = await i.dynamicImport("node:fs"), m = await i.dynamicImport("node:url"),
|
|
1763
|
+
`, Pn = `vite-error-overlay{--color-bright: rgba(255, 255, 255, .8);--color-yellow: rgba(255, 246, 85, .8);--qwik-dark-blue: #006ce9;--qwik-light-blue: #3ec2f7;--qwik-light-purple: #ac7ff4;--qwik-dark-purple: #713fc2;--yellow: #fff;--purple: var(--color-bright);--red: var(--qwik-light-blue);--vertical-box-spacing: 15px;--box-padding: 20px;--box-margin: 0 0 var(--vertical-box-spacing) 0;--box-background: rgba(0, 0, 0, .5);--box-border-radius: 8px}vite-error-overlay::part(backdrop){background:#020b1199}vite-error-overlay::part(window){background:transparent;border:none;box-shadow:none;box-sizing:border-box;margin:50px auto;max-width:1200px;padding:var(--box-padding);width:90%}vite-error-overlay::part(message){display:flex;flex-direction:column;font-size:1.6rem;line-height:1.7;margin-bottom:30px}vite-error-overlay::part(plugin){font-size:.8rem;font-weight:100}vite-error-overlay::part(file),vite-error-overlay::part(frame),vite-error-overlay::part(stack),vite-error-overlay::part(tip){background:var(--box-background);border-left:5px solid transparent;border-radius:var(--box-border-radius);margin:var(--box-margin);min-height:50px;padding:var(--box-padding);position:relative}vite-error-overlay::part(file){border-left-color:#19b6f6;color:var(--color-bright)}vite-error-overlay::part(frame){border-left-color:var(--color-yellow);color:var(--color-yellow)}vite-error-overlay::part(stack){border-left-color:#ff5722}vite-error-overlay::part(tip){border-top:none;border-left-color:#ac7ff4}vite-error-overlay::part(file):before,vite-error-overlay::part(frame):before,vite-error-overlay::part(stack):before{border-bottom:1px solid #222;color:var(--color-bright);display:block;margin-bottom:15px;padding-bottom:5px;padding-left:30px;font-size:.8rem}vite-error-overlay::part(file):before{content:"File"}vite-error-overlay::part(frame):before{content:"Frame"}vite-error-overlay::part(stack):before{content:"Stack Trace"}vite-error-overlay::part(file):after,vite-error-overlay::part(frame):after,vite-error-overlay::part(stack):after{content:"";display:block;height:20px;position:absolute;left:var(--box-padding);top:var(--box-padding);width:20px}vite-error-overlay::part(file):after{background-image:url("data:image/svg+xml,%3Csvg width='20px' height='20px' viewBox='0 0 24 24' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Ctitle%3EFile-Generic%3C/title%3E%3Cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E%3Cg id='File-Generic'%3E%3Crect id='Rectangle' fill-rule='nonzero' x='0' y='0' width='24' height='24'%3E%3C/rect%3E%3Cpath d='M4 5 C4 3.89543 4.89543 3 6 3 L15.1716 3 C15.702 3 16.2107 3.21071 16.5858 3.58579 L19.4142 6.41421 C19.7893 6.78929 20 7.29799 20 7.82843 L20 19 C20 20.1046 19.1046 21 18 21 L6 21 C4.89543 21 4 20.1046 4 19 L4 5 Z' id='Path' stroke='rgba(255,255,255,0.7)' stroke-width='1' stroke-linecap='round'%3E%3C/path%3E%3Cpath d='M15 4 L15 6 C15 7.10457 15.8954 8 17 8 L19 8' id='Path' stroke='rgba(255,255,255,0.7)' stroke-width='1' stroke-linecap='round'%3E%3C/path%3E%3C/g%3E%3C/g%3E%3C/svg%3E")}vite-error-overlay::part(frame):after{background-image:url("data:image/svg+xml,%3Csvg width='20px' height='20px' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M15.6602 2.84952H19.1516C20.2555 2.84952 21.1504 3.74444 21.1504 4.84839V8.3398' stroke='rgba(255,255,255,0.7)' stroke-width='1.69904' stroke-linecap='round'/%3E%3Cpath d='M2.84949 8.33981L2.84949 4.8484C2.84949 3.74446 3.74441 2.84953 4.84836 2.84953L8.33977 2.84953' stroke='rgba(255,255,255,0.7)' stroke-width='1.69904' stroke-linecap='round'/%3E%3Cpath d='M21.1505 15.6602L21.1505 19.1516C21.1505 20.2555 20.2556 21.1505 19.1516 21.1505L15.6602 21.1505' stroke='rgba(255,255,255,0.7)' stroke-width='1.69904' stroke-linecap='round'/%3E%3Cpath d='M8.33984 21.1505L4.84843 21.1505C3.74449 21.1505 2.84956 20.2555 2.84956 19.1516L2.84956 15.6602' stroke='rgba(255,255,255,0.7)' stroke-width='1.69904' stroke-linecap='round'/%3E%3C/svg%3E")}vite-error-overlay::part(stack):after{background-image:url("data:image/svg+xml,%3Csvg width='20px' height='20px' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.78 20H9.78C7.98 20 4.58 19.09 4.58 15.64C4.58 12.19 7.98 11.28 9.78 11.28H14.22C14.37 11.28 17.92 11.23 17.92 8.42C17.92 5.61 14.37 5.56 14.22 5.56H9.22C9.02109 5.56 8.83032 5.48098 8.68967 5.34033C8.54902 5.19968 8.47 5.00891 8.47 4.81C8.47 4.61109 8.54902 4.42032 8.68967 4.27967C8.83032 4.13902 9.02109 4.06 9.22 4.06H14.22C16.02 4.06 19.42 4.97 19.42 8.42C19.42 11.87 16.02 12.78 14.22 12.78H9.78C9.63 12.78 6.08 12.83 6.08 15.64C6.08 18.45 9.63 18.5 9.78 18.5H14.78C14.9789 18.5 15.1697 18.579 15.3103 18.7197C15.451 18.8603 15.53 19.0511 15.53 19.25C15.53 19.4489 15.451 19.6397 15.3103 19.7803C15.1697 19.921 14.9789 20 14.78 20Z' fill='rgba(255,255,255,0.7)'/%3E%3Cpath d='M6.44 8.31C5.74314 8.30407 5.06363 8.09202 4.48708 7.70056C3.91054 7.30909 3.46276 6.75573 3.20018 6.11021C2.93759 5.46469 2.87195 4.75589 3.01153 4.07312C3.1511 3.39036 3.48965 2.76418 3.9845 2.2735C4.47935 1.78281 5.10837 1.44958 5.79229 1.31579C6.47622 1.182 7.18444 1.25363 7.82771 1.52167C8.47099 1.78971 9.02054 2.24215 9.40711 2.82199C9.79368 3.40182 9.99998 4.08311 10 4.78C10 5.2461 9.90773 5.70759 9.72846 6.13783C9.54919 6.56808 9.28648 6.95856 8.95551 7.28675C8.62453 7.61494 8.23184 7.87433 7.80009 8.04995C7.36834 8.22558 6.90609 8.31396 6.44 8.31ZM6.44 2.75C6.04444 2.75 5.65776 2.86729 5.32886 3.08706C4.99996 3.30682 4.74362 3.61918 4.59224 3.98463C4.44087 4.35008 4.40126 4.75221 4.47843 5.14018C4.5556 5.52814 4.74609 5.8845 5.02579 6.16421C5.3055 6.44391 5.66186 6.6344 6.04982 6.71157C6.43779 6.78874 6.83992 6.74913 7.20537 6.59776C7.57082 6.44638 7.88318 6.19003 8.10294 5.86114C8.32271 5.53224 8.44 5.14556 8.44 4.75C8.44 4.48735 8.38827 4.22728 8.28776 3.98463C8.18725 3.74198 8.03993 3.5215 7.85422 3.33578C7.6685 3.15007 7.44802 3.00275 7.20537 2.90224C6.96272 2.80173 6.70265 2.75 6.44 2.75Z' fill='rgba(255,255,255,0.7)'/%3E%3Cpath d='M17.56 22.75C16.8614 22.752 16.1779 22.5466 15.5961 22.1599C15.0143 21.7733 14.5603 21.2227 14.2916 20.5778C14.0229 19.933 13.9515 19.2229 14.0866 18.5375C14.2217 17.8521 14.5571 17.2221 15.0504 16.7275C15.5437 16.2328 16.1726 15.8956 16.8577 15.7586C17.5427 15.6215 18.253 15.6909 18.8986 15.9577C19.5442 16.2246 20.0961 16.6771 20.4844 17.2578C20.8727 17.8385 21.08 18.5214 21.08 19.22C21.08 20.1545 20.7095 21.0508 20.0496 21.7125C19.3898 22.3743 18.4945 22.7473 17.56 22.75ZM17.56 17.19C17.1644 17.19 16.7778 17.3073 16.4489 17.5271C16.12 17.7468 15.8636 18.0592 15.7122 18.4246C15.5609 18.7901 15.5213 19.1922 15.5984 19.5802C15.6756 19.9681 15.8661 20.3245 16.1458 20.6042C16.4255 20.8839 16.7819 21.0744 17.1698 21.1516C17.5578 21.2287 17.9599 21.1891 18.3254 21.0377C18.6908 20.8864 19.0032 20.63 19.2229 20.3011C19.4427 19.9722 19.56 19.5856 19.56 19.19C19.56 18.6596 19.3493 18.1508 18.9742 17.7758C18.5991 17.4007 18.0904 17.19 17.56 17.19Z' fill='rgba(255,255,255,0.7)'/%3E%3C/svg%3E")}vite-error-overlay::part(tip):before{content:"Not sure how to solve this? Visit https://qwik.dev or connect with the community on Discord.";display:block;margin-bottom:1em}`, Dn = "#qwik-inspector-overlay{position:fixed;background:#18b6f645;pointer-events:none;box-sizing:border-box;border:2px solid rgba(172,126,244,.46);border-radius:4px;contain:strict;cursor:pointer;z-index:999999}#qwik-inspector-info-popup{position:fixed;bottom:10px;right:10px;font-family:monospace;background:#000000c2;color:#fff;padding:10px 20px;border-radius:8px;box-shadow:0 20px 25px -5px #00000057,0 8px 10px -6px #0000003d;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);-webkit-animation:fadeOut .3s 3s ease-in-out forwards;animation:fadeOut .3s 3s ease-in-out forwards;z-index:999999;contain:layout}#qwik-inspector-info-popup p{margin:0}@-webkit-keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes fadeOut{0%{opacity:1}to{opacity:0;visibility:hidden}}";
|
|
1764
|
+
async function Nn(e, t, i, r) {
|
|
1765
|
+
const o = await i.dynamicImport("node:fs"), m = await i.dynamicImport("node:url"), a = ["mjs", "cjs", "js"].map(
|
|
1751
1766
|
(f) => r.join(t, `entry.preview.${f}`)
|
|
1752
1767
|
).find((f) => o.existsSync(f));
|
|
1753
|
-
if (!
|
|
1754
|
-
return
|
|
1768
|
+
if (!a)
|
|
1769
|
+
return Qe(
|
|
1755
1770
|
e,
|
|
1756
1771
|
`Unable to find output "${t}/entry.preview" module.
|
|
1757
1772
|
|
|
1758
1773
|
Please ensure "src/entry.preview.tsx" has been built before the "preview" command.`
|
|
1759
1774
|
);
|
|
1760
1775
|
try {
|
|
1761
|
-
const f = m.pathToFileURL(
|
|
1762
|
-
let
|
|
1763
|
-
if (n.default && (typeof n.default == "function" ?
|
|
1764
|
-
return
|
|
1776
|
+
const f = m.pathToFileURL(a).href, n = await i.strictDynamicImport(f);
|
|
1777
|
+
let b = null, v = null;
|
|
1778
|
+
if (n.default && (typeof n.default == "function" ? b = n.default : typeof n.default == "object" && (b = n.default.router, v = n.default.notFound)), typeof b != "function")
|
|
1779
|
+
return Qe(
|
|
1765
1780
|
e,
|
|
1766
|
-
`Entry preview module "${
|
|
1781
|
+
`Entry preview module "${a}" does not export a default middleware function`
|
|
1767
1782
|
);
|
|
1768
|
-
e.use(
|
|
1783
|
+
e.use(b), typeof v == "function" && e.use(v);
|
|
1769
1784
|
} catch (f) {
|
|
1770
|
-
return
|
|
1785
|
+
return Qe(e, String(f));
|
|
1771
1786
|
}
|
|
1772
1787
|
}
|
|
1773
|
-
function
|
|
1788
|
+
function Qe(e, t) {
|
|
1774
1789
|
console.log(`
|
|
1775
1790
|
❌ ${t}
|
|
1776
1791
|
`), e.use((i, r) => {
|
|
@@ -1779,25 +1794,25 @@ function Ge(e, t) {
|
|
|
1779
1794
|
}), r.end(t);
|
|
1780
1795
|
});
|
|
1781
1796
|
}
|
|
1782
|
-
const
|
|
1797
|
+
const Mn = (e, t) => {
|
|
1783
1798
|
const i = [
|
|
1784
|
-
{ tag: "style", children: Cn, injectTo: "body" },
|
|
1785
1799
|
{ tag: "style", children: Pn, injectTo: "body" },
|
|
1800
|
+
{ tag: "style", children: Dn, injectTo: "body" },
|
|
1786
1801
|
{ tag: "script", attrs: { type: "module" }, children: kn, injectTo: "body" },
|
|
1787
|
-
{ tag: "script", attrs: { type: "module" }, children:
|
|
1802
|
+
{ tag: "script", attrs: { type: "module" }, children: Sn, injectTo: "body" }
|
|
1788
1803
|
];
|
|
1789
1804
|
if ((e.devTools?.imageDevTools ?? !0) && i.push(
|
|
1790
1805
|
{
|
|
1791
1806
|
tag: "style",
|
|
1792
|
-
children:
|
|
1807
|
+
children: _n,
|
|
1793
1808
|
injectTo: "body"
|
|
1794
1809
|
},
|
|
1795
1810
|
{
|
|
1796
1811
|
tag: "script",
|
|
1797
1812
|
attrs: { type: "module" },
|
|
1798
|
-
children:
|
|
1813
|
+
children: Tn.replace(
|
|
1799
1814
|
"globalThis.__TEMPLATE__",
|
|
1800
|
-
JSON.stringify(
|
|
1815
|
+
JSON.stringify(Cn)
|
|
1801
1816
|
),
|
|
1802
1817
|
injectTo: "body"
|
|
1803
1818
|
}
|
|
@@ -1806,177 +1821,177 @@ const Nn = (e, t) => {
|
|
|
1806
1821
|
t.endsWith("/") && (t = t.slice(0, -1)), i.push({
|
|
1807
1822
|
tag: "script",
|
|
1808
1823
|
attrs: { type: "module" },
|
|
1809
|
-
children:
|
|
1824
|
+
children: En.replace("globalThis.__HOTKEYS__", JSON.stringify(r)).replace("globalThis.__BASE__", JSON.stringify(t)),
|
|
1810
1825
|
injectTo: "body"
|
|
1811
1826
|
});
|
|
1812
1827
|
}
|
|
1813
1828
|
return i;
|
|
1814
1829
|
};
|
|
1815
|
-
function
|
|
1830
|
+
function G(e) {
|
|
1816
1831
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1817
1832
|
}
|
|
1818
|
-
var
|
|
1819
|
-
function
|
|
1820
|
-
return
|
|
1833
|
+
var ge = {}, Ke = {}, ct;
|
|
1834
|
+
function Q() {
|
|
1835
|
+
return ct || (ct = 1, (function(e) {
|
|
1821
1836
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.findBox = e.readUInt = e.readUInt32LE = e.readUInt32BE = e.readInt32LE = e.readUInt24LE = e.readUInt16LE = e.readUInt16BE = e.readInt16LE = e.toHexString = e.toUTF8String = void 0;
|
|
1822
|
-
const t = new TextDecoder(), i = (
|
|
1837
|
+
const t = new TextDecoder(), i = (y, u = 0, s = y.length) => t.decode(y.slice(u, s));
|
|
1823
1838
|
e.toUTF8String = i;
|
|
1824
|
-
const r = (
|
|
1839
|
+
const r = (y, u = 0, s = y.length) => y.slice(u, s).reduce((p, _) => p + ("0" + _.toString(16)).slice(-2), "");
|
|
1825
1840
|
e.toHexString = r;
|
|
1826
|
-
const o = (
|
|
1827
|
-
const
|
|
1828
|
-
return
|
|
1841
|
+
const o = (y, u = 0) => {
|
|
1842
|
+
const s = y[u] + y[u + 1] * 256;
|
|
1843
|
+
return s | (s & 2 ** 15) * 131070;
|
|
1829
1844
|
};
|
|
1830
1845
|
e.readInt16LE = o;
|
|
1831
|
-
const m = (
|
|
1846
|
+
const m = (y, u = 0) => y[u] * 2 ** 8 + y[u + 1];
|
|
1832
1847
|
e.readUInt16BE = m;
|
|
1833
|
-
const l = (
|
|
1848
|
+
const l = (y, u = 0) => y[u] + y[u + 1] * 2 ** 8;
|
|
1834
1849
|
e.readUInt16LE = l;
|
|
1835
|
-
const
|
|
1836
|
-
e.readUInt24LE =
|
|
1837
|
-
const f = (
|
|
1850
|
+
const a = (y, u = 0) => y[u] + y[u + 1] * 2 ** 8 + y[u + 2] * 2 ** 16;
|
|
1851
|
+
e.readUInt24LE = a;
|
|
1852
|
+
const f = (y, u = 0) => y[u] + y[u + 1] * 2 ** 8 + y[u + 2] * 2 ** 16 + (y[u + 3] << 24);
|
|
1838
1853
|
e.readInt32LE = f;
|
|
1839
|
-
const n = (
|
|
1854
|
+
const n = (y, u = 0) => y[u] * 2 ** 24 + y[u + 1] * 2 ** 16 + y[u + 2] * 2 ** 8 + y[u + 3];
|
|
1840
1855
|
e.readUInt32BE = n;
|
|
1841
|
-
const
|
|
1842
|
-
e.readUInt32LE =
|
|
1843
|
-
const
|
|
1856
|
+
const b = (y, u = 0) => y[u] + y[u + 1] * 2 ** 8 + y[u + 2] * 2 ** 16 + y[u + 3] * 2 ** 24;
|
|
1857
|
+
e.readUInt32LE = b;
|
|
1858
|
+
const v = {
|
|
1844
1859
|
readUInt16BE: e.readUInt16BE,
|
|
1845
1860
|
readUInt16LE: e.readUInt16LE,
|
|
1846
1861
|
readUInt32BE: e.readUInt32BE,
|
|
1847
1862
|
readUInt32LE: e.readUInt32LE
|
|
1848
1863
|
};
|
|
1849
|
-
function I(
|
|
1850
|
-
|
|
1851
|
-
const _ =
|
|
1852
|
-
return
|
|
1864
|
+
function I(y, u, s, p) {
|
|
1865
|
+
s = s || 0;
|
|
1866
|
+
const _ = p ? "BE" : "LE", S = "readUInt" + u + _;
|
|
1867
|
+
return v[S](y, s);
|
|
1853
1868
|
}
|
|
1854
1869
|
e.readUInt = I;
|
|
1855
|
-
function y
|
|
1856
|
-
if (
|
|
1870
|
+
function g(y, u) {
|
|
1871
|
+
if (y.length - u < 4)
|
|
1857
1872
|
return;
|
|
1858
|
-
const
|
|
1859
|
-
if (!(
|
|
1873
|
+
const s = (0, e.readUInt32BE)(y, u);
|
|
1874
|
+
if (!(y.length - u < s))
|
|
1860
1875
|
return {
|
|
1861
|
-
name: (0, e.toUTF8String)(
|
|
1862
|
-
offset:
|
|
1863
|
-
size:
|
|
1876
|
+
name: (0, e.toUTF8String)(y, 4 + u, 8 + u),
|
|
1877
|
+
offset: u,
|
|
1878
|
+
size: s
|
|
1864
1879
|
};
|
|
1865
1880
|
}
|
|
1866
|
-
function d(
|
|
1867
|
-
for (;
|
|
1868
|
-
const
|
|
1869
|
-
if (!
|
|
1881
|
+
function d(y, u, s) {
|
|
1882
|
+
for (; s < y.length; ) {
|
|
1883
|
+
const p = g(y, s);
|
|
1884
|
+
if (!p)
|
|
1870
1885
|
break;
|
|
1871
|
-
if (
|
|
1872
|
-
return
|
|
1873
|
-
|
|
1886
|
+
if (p.name === u)
|
|
1887
|
+
return p;
|
|
1888
|
+
s += p.size > 0 ? p.size : 8;
|
|
1874
1889
|
}
|
|
1875
1890
|
}
|
|
1876
1891
|
e.findBox = d;
|
|
1877
1892
|
})(Ke)), Ke;
|
|
1878
1893
|
}
|
|
1879
|
-
var
|
|
1880
|
-
function
|
|
1881
|
-
if (
|
|
1882
|
-
|
|
1883
|
-
const e =
|
|
1884
|
-
return
|
|
1894
|
+
var dt;
|
|
1895
|
+
function qn() {
|
|
1896
|
+
if (dt) return ge;
|
|
1897
|
+
dt = 1, Object.defineProperty(ge, "__esModule", { value: !0 }), ge.BMP = void 0;
|
|
1898
|
+
const e = Q();
|
|
1899
|
+
return ge.BMP = {
|
|
1885
1900
|
validate: (t) => (0, e.toUTF8String)(t, 0, 2) === "BM",
|
|
1886
1901
|
calculate: (t) => ({
|
|
1887
1902
|
height: Math.abs((0, e.readInt32LE)(t, 22)),
|
|
1888
1903
|
width: (0, e.readUInt32LE)(t, 18)
|
|
1889
1904
|
})
|
|
1890
|
-
},
|
|
1905
|
+
}, ge;
|
|
1891
1906
|
}
|
|
1892
|
-
var
|
|
1893
|
-
const
|
|
1894
|
-
var
|
|
1895
|
-
function
|
|
1896
|
-
if (
|
|
1897
|
-
|
|
1898
|
-
const e =
|
|
1899
|
-
function o(l,
|
|
1900
|
-
const f = l[
|
|
1907
|
+
var On = qn();
|
|
1908
|
+
const Ln = /* @__PURE__ */ G(On);
|
|
1909
|
+
var ye = {}, ve = {}, ut;
|
|
1910
|
+
function Mt() {
|
|
1911
|
+
if (ut) return ve;
|
|
1912
|
+
ut = 1, Object.defineProperty(ve, "__esModule", { value: !0 }), ve.ICO = void 0;
|
|
1913
|
+
const e = Q(), t = 1, i = 6, r = 16;
|
|
1914
|
+
function o(l, a) {
|
|
1915
|
+
const f = l[a];
|
|
1901
1916
|
return f === 0 ? 256 : f;
|
|
1902
1917
|
}
|
|
1903
|
-
function m(l,
|
|
1904
|
-
const f = i +
|
|
1918
|
+
function m(l, a) {
|
|
1919
|
+
const f = i + a * r;
|
|
1905
1920
|
return {
|
|
1906
1921
|
height: o(l, f + 1),
|
|
1907
1922
|
width: o(l, f)
|
|
1908
1923
|
};
|
|
1909
1924
|
}
|
|
1910
|
-
return
|
|
1925
|
+
return ve.ICO = {
|
|
1911
1926
|
validate(l) {
|
|
1912
|
-
const
|
|
1913
|
-
return
|
|
1927
|
+
const a = (0, e.readUInt16LE)(l, 0), f = (0, e.readUInt16LE)(l, 4);
|
|
1928
|
+
return a !== 0 || f === 0 ? !1 : (0, e.readUInt16LE)(l, 2) === t;
|
|
1914
1929
|
},
|
|
1915
1930
|
calculate(l) {
|
|
1916
|
-
const
|
|
1917
|
-
if (
|
|
1931
|
+
const a = (0, e.readUInt16LE)(l, 4), f = m(l, 0);
|
|
1932
|
+
if (a === 1)
|
|
1918
1933
|
return f;
|
|
1919
1934
|
const n = [f];
|
|
1920
|
-
for (let
|
|
1921
|
-
n.push(m(l,
|
|
1935
|
+
for (let b = 1; b < a; b += 1)
|
|
1936
|
+
n.push(m(l, b));
|
|
1922
1937
|
return {
|
|
1923
1938
|
height: f.height,
|
|
1924
1939
|
images: n,
|
|
1925
1940
|
width: f.width
|
|
1926
1941
|
};
|
|
1927
1942
|
}
|
|
1928
|
-
},
|
|
1943
|
+
}, ve;
|
|
1929
1944
|
}
|
|
1930
|
-
var
|
|
1931
|
-
function
|
|
1932
|
-
if (
|
|
1933
|
-
|
|
1934
|
-
const e =
|
|
1935
|
-
return
|
|
1945
|
+
var ft;
|
|
1946
|
+
function jn() {
|
|
1947
|
+
if (ft) return ye;
|
|
1948
|
+
ft = 1, Object.defineProperty(ye, "__esModule", { value: !0 }), ye.CUR = void 0;
|
|
1949
|
+
const e = Mt(), t = Q(), i = 2;
|
|
1950
|
+
return ye.CUR = {
|
|
1936
1951
|
validate(r) {
|
|
1937
1952
|
const o = (0, t.readUInt16LE)(r, 0), m = (0, t.readUInt16LE)(r, 4);
|
|
1938
1953
|
return o !== 0 || m === 0 ? !1 : (0, t.readUInt16LE)(r, 2) === i;
|
|
1939
1954
|
},
|
|
1940
1955
|
calculate: (r) => e.ICO.calculate(r)
|
|
1941
|
-
},
|
|
1956
|
+
}, ye;
|
|
1942
1957
|
}
|
|
1943
|
-
var
|
|
1944
|
-
const
|
|
1945
|
-
var
|
|
1946
|
-
function
|
|
1947
|
-
if (
|
|
1948
|
-
|
|
1949
|
-
const e =
|
|
1950
|
-
return
|
|
1958
|
+
var Un = jn();
|
|
1959
|
+
const Bn = /* @__PURE__ */ G(Un);
|
|
1960
|
+
var be = {}, pt;
|
|
1961
|
+
function Rn() {
|
|
1962
|
+
if (pt) return be;
|
|
1963
|
+
pt = 1, Object.defineProperty(be, "__esModule", { value: !0 }), be.DDS = void 0;
|
|
1964
|
+
const e = Q();
|
|
1965
|
+
return be.DDS = {
|
|
1951
1966
|
validate: (t) => (0, e.readUInt32LE)(t, 0) === 542327876,
|
|
1952
1967
|
calculate: (t) => ({
|
|
1953
1968
|
height: (0, e.readUInt32LE)(t, 12),
|
|
1954
1969
|
width: (0, e.readUInt32LE)(t, 16)
|
|
1955
1970
|
})
|
|
1956
|
-
},
|
|
1971
|
+
}, be;
|
|
1957
1972
|
}
|
|
1958
|
-
var An =
|
|
1959
|
-
const Fn = /* @__PURE__ */
|
|
1960
|
-
var
|
|
1961
|
-
function
|
|
1962
|
-
if (
|
|
1963
|
-
|
|
1964
|
-
const e =
|
|
1965
|
-
return
|
|
1973
|
+
var An = Rn();
|
|
1974
|
+
const Fn = /* @__PURE__ */ G(An);
|
|
1975
|
+
var we = {}, mt;
|
|
1976
|
+
function $n() {
|
|
1977
|
+
if (mt) return we;
|
|
1978
|
+
mt = 1, Object.defineProperty(we, "__esModule", { value: !0 }), we.GIF = void 0;
|
|
1979
|
+
const e = Q(), t = /^GIF8[79]a/;
|
|
1980
|
+
return we.GIF = {
|
|
1966
1981
|
validate: (i) => t.test((0, e.toUTF8String)(i, 0, 6)),
|
|
1967
1982
|
calculate: (i) => ({
|
|
1968
1983
|
height: (0, e.readUInt16LE)(i, 8),
|
|
1969
1984
|
width: (0, e.readUInt16LE)(i, 6)
|
|
1970
1985
|
})
|
|
1971
|
-
},
|
|
1986
|
+
}, we;
|
|
1972
1987
|
}
|
|
1973
|
-
var
|
|
1974
|
-
const
|
|
1975
|
-
var
|
|
1976
|
-
function
|
|
1977
|
-
if (
|
|
1978
|
-
|
|
1979
|
-
const e =
|
|
1988
|
+
var zn = $n();
|
|
1989
|
+
const Hn = /* @__PURE__ */ G(zn);
|
|
1990
|
+
var xe = {}, ht;
|
|
1991
|
+
function Wn() {
|
|
1992
|
+
if (ht) return xe;
|
|
1993
|
+
ht = 1, Object.defineProperty(xe, "__esModule", { value: !0 }), xe.ICNS = void 0;
|
|
1994
|
+
const e = Q(), t = 8, i = 4, r = 4, o = {
|
|
1980
1995
|
ICON: 32,
|
|
1981
1996
|
"ICN#": 32,
|
|
1982
1997
|
// m => 16 x 16
|
|
@@ -2018,61 +2033,61 @@ function Hn() {
|
|
|
2018
2033
|
// . => 1024 x 1024
|
|
2019
2034
|
ic10: 1024
|
|
2020
2035
|
};
|
|
2021
|
-
function m(
|
|
2036
|
+
function m(a, f) {
|
|
2022
2037
|
const n = f + r;
|
|
2023
2038
|
return [
|
|
2024
|
-
(0, e.toUTF8String)(
|
|
2025
|
-
(0, e.readUInt32BE)(
|
|
2039
|
+
(0, e.toUTF8String)(a, f, n),
|
|
2040
|
+
(0, e.readUInt32BE)(a, n)
|
|
2026
2041
|
];
|
|
2027
2042
|
}
|
|
2028
|
-
function l(
|
|
2029
|
-
const f = o[
|
|
2030
|
-
return { width: f, height: f, type:
|
|
2043
|
+
function l(a) {
|
|
2044
|
+
const f = o[a];
|
|
2045
|
+
return { width: f, height: f, type: a };
|
|
2031
2046
|
}
|
|
2032
|
-
return
|
|
2033
|
-
validate: (
|
|
2034
|
-
calculate(
|
|
2035
|
-
const f =
|
|
2036
|
-
let
|
|
2037
|
-
if (
|
|
2047
|
+
return xe.ICNS = {
|
|
2048
|
+
validate: (a) => (0, e.toUTF8String)(a, 0, 4) === "icns",
|
|
2049
|
+
calculate(a) {
|
|
2050
|
+
const f = a.length, n = (0, e.readUInt32BE)(a, i);
|
|
2051
|
+
let b = t, v = m(a, b), I = l(v[0]);
|
|
2052
|
+
if (b += v[1], b === n)
|
|
2038
2053
|
return I;
|
|
2039
|
-
const
|
|
2054
|
+
const g = {
|
|
2040
2055
|
height: I.height,
|
|
2041
2056
|
images: [I],
|
|
2042
2057
|
width: I.width
|
|
2043
2058
|
};
|
|
2044
|
-
for (;
|
|
2045
|
-
|
|
2046
|
-
return
|
|
2059
|
+
for (; b < n && b < f; )
|
|
2060
|
+
v = m(a, b), I = l(v[0]), b += v[1], g.images.push(I);
|
|
2061
|
+
return g;
|
|
2047
2062
|
}
|
|
2048
|
-
},
|
|
2063
|
+
}, xe;
|
|
2049
2064
|
}
|
|
2050
|
-
var
|
|
2051
|
-
const
|
|
2052
|
-
var Kn =
|
|
2053
|
-
const
|
|
2054
|
-
var
|
|
2055
|
-
function
|
|
2056
|
-
if (
|
|
2057
|
-
|
|
2058
|
-
const e =
|
|
2059
|
-
return
|
|
2065
|
+
var Gn = Wn();
|
|
2066
|
+
const Qn = /* @__PURE__ */ G(Gn);
|
|
2067
|
+
var Kn = Mt();
|
|
2068
|
+
const Jn = /* @__PURE__ */ G(Kn);
|
|
2069
|
+
var Ie = {}, gt;
|
|
2070
|
+
function Yn() {
|
|
2071
|
+
if (gt) return Ie;
|
|
2072
|
+
gt = 1, Object.defineProperty(Ie, "__esModule", { value: !0 }), Ie.J2C = void 0;
|
|
2073
|
+
const e = Q();
|
|
2074
|
+
return Ie.J2C = {
|
|
2060
2075
|
// TODO: this doesn't seem right. SIZ marker doesn't have to be right after the SOC
|
|
2061
2076
|
validate: (t) => (0, e.readUInt32BE)(t, 0) === 4283432785,
|
|
2062
2077
|
calculate: (t) => ({
|
|
2063
2078
|
height: (0, e.readUInt32BE)(t, 12),
|
|
2064
2079
|
width: (0, e.readUInt32BE)(t, 8)
|
|
2065
2080
|
})
|
|
2066
|
-
},
|
|
2081
|
+
}, Ie;
|
|
2067
2082
|
}
|
|
2068
|
-
var
|
|
2069
|
-
const
|
|
2070
|
-
var
|
|
2071
|
-
function
|
|
2072
|
-
if (
|
|
2073
|
-
|
|
2074
|
-
const e =
|
|
2075
|
-
return
|
|
2083
|
+
var Xn = Yn();
|
|
2084
|
+
const Vn = /* @__PURE__ */ G(Xn);
|
|
2085
|
+
var Se = {}, yt;
|
|
2086
|
+
function Zn() {
|
|
2087
|
+
if (yt) return Se;
|
|
2088
|
+
yt = 1, Object.defineProperty(Se, "__esModule", { value: !0 }), Se.JP2 = void 0;
|
|
2089
|
+
const e = Q();
|
|
2090
|
+
return Se.JP2 = {
|
|
2076
2091
|
validate(t) {
|
|
2077
2092
|
if ((0, e.toUTF8String)(t, 4, 8) !== "jP ")
|
|
2078
2093
|
return !1;
|
|
@@ -2088,77 +2103,77 @@ function Vn() {
|
|
|
2088
2103
|
};
|
|
2089
2104
|
throw new TypeError("Unsupported JPEG 2000 format");
|
|
2090
2105
|
}
|
|
2091
|
-
},
|
|
2106
|
+
}, Se;
|
|
2092
2107
|
}
|
|
2093
|
-
var
|
|
2094
|
-
const
|
|
2095
|
-
var
|
|
2096
|
-
function
|
|
2097
|
-
if (
|
|
2098
|
-
|
|
2099
|
-
const e =
|
|
2108
|
+
var er = Zn();
|
|
2109
|
+
const tr = /* @__PURE__ */ G(er);
|
|
2110
|
+
var Ee = {}, vt;
|
|
2111
|
+
function nr() {
|
|
2112
|
+
if (vt) return Ee;
|
|
2113
|
+
vt = 1, Object.defineProperty(Ee, "__esModule", { value: !0 }), Ee.JPG = void 0;
|
|
2114
|
+
const e = Q(), t = "45786966", i = 2, r = 6, o = 2, m = "4d4d", l = "4949", a = 12, f = 2;
|
|
2100
2115
|
function n(d) {
|
|
2101
2116
|
return (0, e.toHexString)(d, 2, 6) === t;
|
|
2102
2117
|
}
|
|
2103
|
-
function
|
|
2118
|
+
function b(d, y) {
|
|
2104
2119
|
return {
|
|
2105
|
-
height: (0, e.readUInt16BE)(d,
|
|
2106
|
-
width: (0, e.readUInt16BE)(d,
|
|
2120
|
+
height: (0, e.readUInt16BE)(d, y),
|
|
2121
|
+
width: (0, e.readUInt16BE)(d, y + 2)
|
|
2107
2122
|
};
|
|
2108
2123
|
}
|
|
2109
|
-
function
|
|
2110
|
-
const
|
|
2111
|
-
for (let _ = 0; _ <
|
|
2112
|
-
const
|
|
2113
|
-
if (
|
|
2124
|
+
function v(d, y) {
|
|
2125
|
+
const s = r + 8, p = (0, e.readUInt)(d, 16, s, y);
|
|
2126
|
+
for (let _ = 0; _ < p; _++) {
|
|
2127
|
+
const S = s + f + _ * a, E = S + a;
|
|
2128
|
+
if (S > d.length)
|
|
2114
2129
|
return;
|
|
2115
|
-
const
|
|
2116
|
-
if ((0, e.readUInt)(
|
|
2117
|
-
return (0, e.readUInt)(
|
|
2130
|
+
const c = d.slice(S, E);
|
|
2131
|
+
if ((0, e.readUInt)(c, 16, 0, y) === 274)
|
|
2132
|
+
return (0, e.readUInt)(c, 16, 2, y) !== 3 || (0, e.readUInt)(c, 32, 4, y) !== 1 ? void 0 : (0, e.readUInt)(c, 16, 8, y);
|
|
2118
2133
|
}
|
|
2119
2134
|
}
|
|
2120
|
-
function I(d,
|
|
2121
|
-
const
|
|
2122
|
-
if (
|
|
2123
|
-
return
|
|
2135
|
+
function I(d, y) {
|
|
2136
|
+
const u = d.slice(i, y), s = (0, e.toHexString)(u, r, r + o), p = s === m;
|
|
2137
|
+
if (p || s === l)
|
|
2138
|
+
return v(u, p);
|
|
2124
2139
|
}
|
|
2125
|
-
function
|
|
2126
|
-
if (
|
|
2140
|
+
function g(d, y) {
|
|
2141
|
+
if (y > d.length)
|
|
2127
2142
|
throw new TypeError("Corrupt JPG, exceeded buffer limits");
|
|
2128
2143
|
}
|
|
2129
|
-
return
|
|
2144
|
+
return Ee.JPG = {
|
|
2130
2145
|
validate: (d) => (0, e.toHexString)(d, 0, 2) === "ffd8",
|
|
2131
2146
|
calculate(d) {
|
|
2132
2147
|
d = d.slice(4);
|
|
2133
|
-
let
|
|
2148
|
+
let y, u;
|
|
2134
2149
|
for (; d.length; ) {
|
|
2135
|
-
const
|
|
2136
|
-
if (d[
|
|
2150
|
+
const s = (0, e.readUInt16BE)(d, 0);
|
|
2151
|
+
if (d[s] !== 255) {
|
|
2137
2152
|
d = d.slice(1);
|
|
2138
2153
|
continue;
|
|
2139
2154
|
}
|
|
2140
|
-
if (n(d) && (
|
|
2141
|
-
const
|
|
2142
|
-
return
|
|
2143
|
-
height:
|
|
2144
|
-
orientation:
|
|
2145
|
-
width:
|
|
2146
|
-
} :
|
|
2155
|
+
if (n(d) && (y = I(d, s)), g(d, s), u = d[s + 1], u === 192 || u === 193 || u === 194) {
|
|
2156
|
+
const p = b(d, s + 5);
|
|
2157
|
+
return y ? {
|
|
2158
|
+
height: p.height,
|
|
2159
|
+
orientation: y,
|
|
2160
|
+
width: p.width
|
|
2161
|
+
} : p;
|
|
2147
2162
|
}
|
|
2148
|
-
d = d.slice(
|
|
2163
|
+
d = d.slice(s + 2);
|
|
2149
2164
|
}
|
|
2150
2165
|
throw new TypeError("Invalid JPG, no size found");
|
|
2151
2166
|
}
|
|
2152
|
-
},
|
|
2167
|
+
}, Ee;
|
|
2153
2168
|
}
|
|
2154
|
-
var
|
|
2155
|
-
const
|
|
2156
|
-
var
|
|
2157
|
-
function
|
|
2158
|
-
if (
|
|
2159
|
-
|
|
2160
|
-
const e =
|
|
2161
|
-
return
|
|
2169
|
+
var rr = nr();
|
|
2170
|
+
const or = /* @__PURE__ */ G(rr);
|
|
2171
|
+
var ke = {}, bt;
|
|
2172
|
+
function ir() {
|
|
2173
|
+
if (bt) return ke;
|
|
2174
|
+
bt = 1, Object.defineProperty(ke, "__esModule", { value: !0 }), ke.KTX = void 0;
|
|
2175
|
+
const e = Q();
|
|
2176
|
+
return ke.KTX = {
|
|
2162
2177
|
validate: (t) => {
|
|
2163
2178
|
const i = (0, e.toUTF8String)(t, 1, 7);
|
|
2164
2179
|
return ["KTX 11", "KTX 20"].includes(i);
|
|
@@ -2171,18 +2186,18 @@ function or() {
|
|
|
2171
2186
|
type: i
|
|
2172
2187
|
};
|
|
2173
2188
|
}
|
|
2174
|
-
},
|
|
2189
|
+
}, ke;
|
|
2175
2190
|
}
|
|
2176
|
-
var
|
|
2177
|
-
const
|
|
2178
|
-
var
|
|
2179
|
-
function
|
|
2180
|
-
if (
|
|
2181
|
-
|
|
2182
|
-
const e =
|
|
2191
|
+
var sr = ir();
|
|
2192
|
+
const ar = /* @__PURE__ */ G(sr);
|
|
2193
|
+
var _e = {}, wt;
|
|
2194
|
+
function lr() {
|
|
2195
|
+
if (wt) return _e;
|
|
2196
|
+
wt = 1, Object.defineProperty(_e, "__esModule", { value: !0 }), _e.PNG = void 0;
|
|
2197
|
+
const e = Q(), t = `PNG\r
|
|
2183
2198
|
|
|
2184
2199
|
`, i = "IHDR", r = "CgBI";
|
|
2185
|
-
return
|
|
2200
|
+
return _e.PNG = {
|
|
2186
2201
|
validate(o) {
|
|
2187
2202
|
if (t === (0, e.toUTF8String)(o, 1, 8)) {
|
|
2188
2203
|
let m = (0, e.toUTF8String)(o, 12, 16);
|
|
@@ -2201,15 +2216,15 @@ function ar() {
|
|
|
2201
2216
|
width: (0, e.readUInt32BE)(o, 16)
|
|
2202
2217
|
};
|
|
2203
2218
|
}
|
|
2204
|
-
},
|
|
2219
|
+
}, _e;
|
|
2205
2220
|
}
|
|
2206
|
-
var
|
|
2207
|
-
const
|
|
2208
|
-
var
|
|
2209
|
-
function
|
|
2210
|
-
if (
|
|
2211
|
-
|
|
2212
|
-
const e =
|
|
2221
|
+
var cr = lr();
|
|
2222
|
+
const dr = /* @__PURE__ */ G(cr);
|
|
2223
|
+
var Te = {}, xt;
|
|
2224
|
+
function ur() {
|
|
2225
|
+
if (xt) return Te;
|
|
2226
|
+
xt = 1, Object.defineProperty(Te, "__esModule", { value: !0 }), Te.PNM = void 0;
|
|
2227
|
+
const e = Q(), t = {
|
|
2213
2228
|
P1: "pbm/ascii",
|
|
2214
2229
|
P2: "pgm/ascii",
|
|
2215
2230
|
P3: "ppm/ascii",
|
|
@@ -2241,8 +2256,8 @@ function dr() {
|
|
|
2241
2256
|
const m = r.shift();
|
|
2242
2257
|
if (m.length > 16 || m.charCodeAt(0) > 128)
|
|
2243
2258
|
continue;
|
|
2244
|
-
const [l,
|
|
2245
|
-
if (l &&
|
|
2259
|
+
const [l, a] = m.split(" ");
|
|
2260
|
+
if (l && a && (o[l.toLowerCase()] = parseInt(a, 10)), o.height && o.width)
|
|
2246
2261
|
break;
|
|
2247
2262
|
}
|
|
2248
2263
|
if (o.height && o.width)
|
|
@@ -2253,36 +2268,36 @@ function dr() {
|
|
|
2253
2268
|
throw new TypeError("Invalid PAM");
|
|
2254
2269
|
}
|
|
2255
2270
|
};
|
|
2256
|
-
return
|
|
2271
|
+
return Te.PNM = {
|
|
2257
2272
|
validate: (r) => (0, e.toUTF8String)(r, 0, 2) in t,
|
|
2258
2273
|
calculate(r) {
|
|
2259
2274
|
const o = (0, e.toUTF8String)(r, 0, 2), m = t[o], l = (0, e.toUTF8String)(r, 3).split(/[\r\n]+/);
|
|
2260
2275
|
return (i[m] || i.default)(l);
|
|
2261
2276
|
}
|
|
2262
|
-
},
|
|
2277
|
+
}, Te;
|
|
2263
2278
|
}
|
|
2264
|
-
var
|
|
2265
|
-
const
|
|
2266
|
-
var
|
|
2267
|
-
function
|
|
2268
|
-
if (
|
|
2269
|
-
|
|
2270
|
-
const e =
|
|
2271
|
-
return
|
|
2279
|
+
var fr = ur();
|
|
2280
|
+
const pr = /* @__PURE__ */ G(fr);
|
|
2281
|
+
var Ce = {}, It;
|
|
2282
|
+
function mr() {
|
|
2283
|
+
if (It) return Ce;
|
|
2284
|
+
It = 1, Object.defineProperty(Ce, "__esModule", { value: !0 }), Ce.PSD = void 0;
|
|
2285
|
+
const e = Q();
|
|
2286
|
+
return Ce.PSD = {
|
|
2272
2287
|
validate: (t) => (0, e.toUTF8String)(t, 0, 4) === "8BPS",
|
|
2273
2288
|
calculate: (t) => ({
|
|
2274
2289
|
height: (0, e.readUInt32BE)(t, 14),
|
|
2275
2290
|
width: (0, e.readUInt32BE)(t, 18)
|
|
2276
2291
|
})
|
|
2277
|
-
},
|
|
2292
|
+
}, Ce;
|
|
2278
2293
|
}
|
|
2279
|
-
var hr =
|
|
2280
|
-
const
|
|
2281
|
-
var
|
|
2282
|
-
function
|
|
2283
|
-
if (
|
|
2284
|
-
|
|
2285
|
-
const e =
|
|
2294
|
+
var hr = mr();
|
|
2295
|
+
const gr = /* @__PURE__ */ G(hr);
|
|
2296
|
+
var Pe = {}, St;
|
|
2297
|
+
function yr() {
|
|
2298
|
+
if (St) return Pe;
|
|
2299
|
+
St = 1, Object.defineProperty(Pe, "__esModule", { value: !0 }), Pe.SVG = void 0;
|
|
2300
|
+
const e = Q(), t = /<svg\s([^>"']|"[^"]*"|'[^']*')*>/, i = {
|
|
2286
2301
|
height: /\sheight=(['"])([^%]+?)\1/,
|
|
2287
2302
|
root: t,
|
|
2288
2303
|
viewbox: /\sviewBox=(['"])(.+?)\1/i,
|
|
@@ -2298,69 +2313,69 @@ function gr() {
|
|
|
2298
2313
|
pt: 96 / 72,
|
|
2299
2314
|
px: 1
|
|
2300
2315
|
}, m = new RegExp(`^([0-9.]+(?:e\\d+)?)(${Object.keys(o).join("|")})?$`);
|
|
2301
|
-
function l(
|
|
2302
|
-
const I = m.exec(
|
|
2316
|
+
function l(v) {
|
|
2317
|
+
const I = m.exec(v);
|
|
2303
2318
|
if (I)
|
|
2304
2319
|
return Math.round(Number(I[1]) * (o[I[2]] || 1));
|
|
2305
2320
|
}
|
|
2306
|
-
function
|
|
2307
|
-
const I =
|
|
2321
|
+
function a(v) {
|
|
2322
|
+
const I = v.split(" ");
|
|
2308
2323
|
return {
|
|
2309
2324
|
height: l(I[3]),
|
|
2310
2325
|
width: l(I[2])
|
|
2311
2326
|
};
|
|
2312
2327
|
}
|
|
2313
|
-
function f(
|
|
2314
|
-
const I =
|
|
2328
|
+
function f(v) {
|
|
2329
|
+
const I = v.match(i.width), g = v.match(i.height), d = v.match(i.viewbox);
|
|
2315
2330
|
return {
|
|
2316
|
-
height:
|
|
2317
|
-
viewbox: d &&
|
|
2331
|
+
height: g && l(g[2]),
|
|
2332
|
+
viewbox: d && a(d[2]),
|
|
2318
2333
|
width: I && l(I[2])
|
|
2319
2334
|
};
|
|
2320
2335
|
}
|
|
2321
|
-
function n(
|
|
2336
|
+
function n(v) {
|
|
2322
2337
|
return {
|
|
2323
|
-
height:
|
|
2324
|
-
width:
|
|
2338
|
+
height: v.height,
|
|
2339
|
+
width: v.width
|
|
2325
2340
|
};
|
|
2326
2341
|
}
|
|
2327
|
-
function
|
|
2328
|
-
const
|
|
2329
|
-
return
|
|
2330
|
-
height: Math.floor(
|
|
2331
|
-
width:
|
|
2332
|
-
} :
|
|
2333
|
-
height:
|
|
2334
|
-
width: Math.floor(
|
|
2342
|
+
function b(v, I) {
|
|
2343
|
+
const g = I.width / I.height;
|
|
2344
|
+
return v.width ? {
|
|
2345
|
+
height: Math.floor(v.width / g),
|
|
2346
|
+
width: v.width
|
|
2347
|
+
} : v.height ? {
|
|
2348
|
+
height: v.height,
|
|
2349
|
+
width: Math.floor(v.height * g)
|
|
2335
2350
|
} : {
|
|
2336
2351
|
height: I.height,
|
|
2337
2352
|
width: I.width
|
|
2338
2353
|
};
|
|
2339
2354
|
}
|
|
2340
|
-
return
|
|
2355
|
+
return Pe.SVG = {
|
|
2341
2356
|
// Scan only the first kilo-byte to speed up the check on larger files
|
|
2342
|
-
validate: (
|
|
2343
|
-
calculate(
|
|
2344
|
-
const I = (0, e.toUTF8String)(
|
|
2357
|
+
validate: (v) => t.test((0, e.toUTF8String)(v, 0, 1e3)),
|
|
2358
|
+
calculate(v) {
|
|
2359
|
+
const I = (0, e.toUTF8String)(v).match(i.root);
|
|
2345
2360
|
if (I) {
|
|
2346
|
-
const
|
|
2347
|
-
if (
|
|
2348
|
-
return n(
|
|
2349
|
-
if (
|
|
2350
|
-
return
|
|
2361
|
+
const g = f(I[0]);
|
|
2362
|
+
if (g.width && g.height)
|
|
2363
|
+
return n(g);
|
|
2364
|
+
if (g.viewbox)
|
|
2365
|
+
return b(g, g.viewbox);
|
|
2351
2366
|
}
|
|
2352
2367
|
throw new TypeError("Invalid SVG");
|
|
2353
2368
|
}
|
|
2354
|
-
},
|
|
2369
|
+
}, Pe;
|
|
2355
2370
|
}
|
|
2356
|
-
var
|
|
2357
|
-
const br = /* @__PURE__ */
|
|
2358
|
-
var
|
|
2359
|
-
function
|
|
2360
|
-
if (
|
|
2361
|
-
|
|
2362
|
-
const e =
|
|
2363
|
-
return
|
|
2371
|
+
var vr = yr();
|
|
2372
|
+
const br = /* @__PURE__ */ G(vr);
|
|
2373
|
+
var De = {}, Et;
|
|
2374
|
+
function wr() {
|
|
2375
|
+
if (Et) return De;
|
|
2376
|
+
Et = 1, Object.defineProperty(De, "__esModule", { value: !0 }), De.TGA = void 0;
|
|
2377
|
+
const e = Q();
|
|
2378
|
+
return De.TGA = {
|
|
2364
2379
|
validate(t) {
|
|
2365
2380
|
return (0, e.readUInt16LE)(t, 0) === 0 && (0, e.readUInt16LE)(t, 4) === 0;
|
|
2366
2381
|
},
|
|
@@ -2370,15 +2385,15 @@ function vr() {
|
|
|
2370
2385
|
width: (0, e.readUInt16LE)(t, 12)
|
|
2371
2386
|
};
|
|
2372
2387
|
}
|
|
2373
|
-
},
|
|
2388
|
+
}, De;
|
|
2374
2389
|
}
|
|
2375
|
-
var
|
|
2376
|
-
const
|
|
2377
|
-
var
|
|
2378
|
-
function
|
|
2379
|
-
if (
|
|
2380
|
-
|
|
2381
|
-
const e =
|
|
2390
|
+
var xr = wr();
|
|
2391
|
+
const Ir = /* @__PURE__ */ G(xr);
|
|
2392
|
+
var Ne = {}, kt;
|
|
2393
|
+
function Sr() {
|
|
2394
|
+
if (kt) return Ne;
|
|
2395
|
+
kt = 1, Object.defineProperty(Ne, "__esModule", { value: !0 }), Ne.WEBP = void 0;
|
|
2396
|
+
const e = Q();
|
|
2382
2397
|
function t(o) {
|
|
2383
2398
|
return {
|
|
2384
2399
|
height: 1 + (0, e.readUInt24LE)(o, 7),
|
|
@@ -2397,15 +2412,15 @@ function Ir() {
|
|
|
2397
2412
|
width: (0, e.readInt16LE)(o, 6) & 16383
|
|
2398
2413
|
};
|
|
2399
2414
|
}
|
|
2400
|
-
return
|
|
2415
|
+
return Ne.WEBP = {
|
|
2401
2416
|
validate(o) {
|
|
2402
|
-
const m = (0, e.toUTF8String)(o, 0, 4) === "RIFF", l = (0, e.toUTF8String)(o, 8, 12) === "WEBP",
|
|
2403
|
-
return m && l &&
|
|
2417
|
+
const m = (0, e.toUTF8String)(o, 0, 4) === "RIFF", l = (0, e.toUTF8String)(o, 8, 12) === "WEBP", a = (0, e.toUTF8String)(o, 12, 15) === "VP8";
|
|
2418
|
+
return m && l && a;
|
|
2404
2419
|
},
|
|
2405
2420
|
calculate(o) {
|
|
2406
2421
|
const m = (0, e.toUTF8String)(o, 12, 16);
|
|
2407
2422
|
if (o = o.slice(20, 30), m === "VP8X") {
|
|
2408
|
-
const
|
|
2423
|
+
const a = o[0], f = (a & 192) === 0, n = (a & 1) === 0;
|
|
2409
2424
|
if (f && n)
|
|
2410
2425
|
return t(o);
|
|
2411
2426
|
throw new TypeError("Invalid WebP");
|
|
@@ -2417,15 +2432,15 @@ function Ir() {
|
|
|
2417
2432
|
return i(o);
|
|
2418
2433
|
throw new TypeError("Invalid WebP");
|
|
2419
2434
|
}
|
|
2420
|
-
},
|
|
2435
|
+
}, Ne;
|
|
2421
2436
|
}
|
|
2422
|
-
var
|
|
2423
|
-
const kr = /* @__PURE__ */
|
|
2424
|
-
var
|
|
2425
|
-
function
|
|
2426
|
-
if (
|
|
2427
|
-
|
|
2428
|
-
const e =
|
|
2437
|
+
var Er = Sr();
|
|
2438
|
+
const kr = /* @__PURE__ */ G(Er);
|
|
2439
|
+
var Me = {}, _t;
|
|
2440
|
+
function _r() {
|
|
2441
|
+
if (_t) return Me;
|
|
2442
|
+
_t = 1, Object.defineProperty(Me, "__esModule", { value: !0 }), Me.HEIF = void 0;
|
|
2443
|
+
const e = Q(), t = {
|
|
2429
2444
|
avif: "avif",
|
|
2430
2445
|
mif1: "heif",
|
|
2431
2446
|
msf1: "heif",
|
|
@@ -2437,7 +2452,7 @@ function Er() {
|
|
|
2437
2452
|
hevx: "heic"
|
|
2438
2453
|
// heic-sequence
|
|
2439
2454
|
};
|
|
2440
|
-
return
|
|
2455
|
+
return Me.HEIF = {
|
|
2441
2456
|
validate(i) {
|
|
2442
2457
|
if ((0, e.toUTF8String)(i, 4, 8) !== "ftyp")
|
|
2443
2458
|
return !1;
|
|
@@ -2454,10 +2469,10 @@ function Er() {
|
|
|
2454
2469
|
};
|
|
2455
2470
|
throw new TypeError("Invalid HEIF, no size found");
|
|
2456
2471
|
}
|
|
2457
|
-
},
|
|
2472
|
+
}, Me;
|
|
2458
2473
|
}
|
|
2459
|
-
var
|
|
2460
|
-
const
|
|
2474
|
+
var Tr = _r();
|
|
2475
|
+
const Cr = /* @__PURE__ */ G(Tr), Pr = {
|
|
2461
2476
|
56: "psd",
|
|
2462
2477
|
66: "bmp",
|
|
2463
2478
|
68: "dds",
|
|
@@ -2466,38 +2481,38 @@ const Tr = /* @__PURE__ */ z(_r), Cr = {
|
|
|
2466
2481
|
105: "icns",
|
|
2467
2482
|
137: "png",
|
|
2468
2483
|
255: "jpg"
|
|
2469
|
-
},
|
|
2484
|
+
}, ze = {
|
|
2470
2485
|
webp: kr.WEBP,
|
|
2471
|
-
jpg:
|
|
2472
|
-
png:
|
|
2486
|
+
jpg: or.JPG,
|
|
2487
|
+
png: dr.PNG,
|
|
2473
2488
|
svg: br.SVG,
|
|
2474
|
-
gif:
|
|
2475
|
-
avif:
|
|
2476
|
-
bmp:
|
|
2477
|
-
cur:
|
|
2489
|
+
gif: Hn.GIF,
|
|
2490
|
+
avif: Cr.HEIF,
|
|
2491
|
+
bmp: Ln.BMP,
|
|
2492
|
+
cur: Bn.CUR,
|
|
2478
2493
|
dds: Fn.DDS,
|
|
2479
|
-
icns:
|
|
2480
|
-
ico:
|
|
2481
|
-
j2c:
|
|
2482
|
-
jp2:
|
|
2483
|
-
ktx:
|
|
2484
|
-
pnm:
|
|
2485
|
-
psd:
|
|
2486
|
-
tga:
|
|
2487
|
-
},
|
|
2488
|
-
function Dr(e) {
|
|
2489
|
-
const t = e[0], i = Cr[t];
|
|
2490
|
-
return i && Fe[i].validate(e) ? i : Pr.find((r) => Fe[r].validate(e));
|
|
2491
|
-
}
|
|
2494
|
+
icns: Qn.ICNS,
|
|
2495
|
+
ico: Jn.ICO,
|
|
2496
|
+
j2c: Vn.J2C,
|
|
2497
|
+
jp2: tr.JP2,
|
|
2498
|
+
ktx: ar.KTX,
|
|
2499
|
+
pnm: pr.PNM,
|
|
2500
|
+
psd: gr.PSD,
|
|
2501
|
+
tga: Ir.TGA
|
|
2502
|
+
}, Dr = Object.keys(ze);
|
|
2492
2503
|
function Nr(e) {
|
|
2493
|
-
const t =
|
|
2504
|
+
const t = e[0], i = Pr[t];
|
|
2505
|
+
return i && ze[i].validate(e) ? i : Dr.find((r) => ze[r].validate(e));
|
|
2506
|
+
}
|
|
2507
|
+
function Mr(e) {
|
|
2508
|
+
const t = Nr(e);
|
|
2494
2509
|
if (typeof t < "u") {
|
|
2495
|
-
const i =
|
|
2510
|
+
const i = ze[t].calculate(e);
|
|
2496
2511
|
if (i !== void 0)
|
|
2497
2512
|
return i.type = t, i;
|
|
2498
2513
|
}
|
|
2499
2514
|
}
|
|
2500
|
-
async function
|
|
2515
|
+
async function qr(e) {
|
|
2501
2516
|
if (/^(https?|file|capacitor):/.test(e))
|
|
2502
2517
|
try {
|
|
2503
2518
|
const t = await fetch(e, {
|
|
@@ -2507,7 +2522,7 @@ async function Mr(e) {
|
|
|
2507
2522
|
console.error("can not fetch", e);
|
|
2508
2523
|
return;
|
|
2509
2524
|
}
|
|
2510
|
-
const i = await t.arrayBuffer(), r =
|
|
2525
|
+
const i = await t.arrayBuffer(), r = Mr(Buffer.from(i));
|
|
2511
2526
|
if (r)
|
|
2512
2527
|
return {
|
|
2513
2528
|
width: r.width,
|
|
@@ -2520,9 +2535,9 @@ async function Mr(e) {
|
|
|
2520
2535
|
return;
|
|
2521
2536
|
}
|
|
2522
2537
|
}
|
|
2523
|
-
const
|
|
2538
|
+
const Or = (e, t, i) => async (r, o, m) => {
|
|
2524
2539
|
try {
|
|
2525
|
-
const l = await e.dynamicImport("node:fs"),
|
|
2540
|
+
const l = await e.dynamicImport("node:fs"), a = await e.dynamicImport("node:path");
|
|
2526
2541
|
let f;
|
|
2527
2542
|
try {
|
|
2528
2543
|
f = new URL(r.url, "http://localhost:3000/");
|
|
@@ -2533,127 +2548,136 @@ const qr = (e, t, i) => async (r, o, m) => {
|
|
|
2533
2548
|
if (r.method === "GET" && f.pathname === "/__image_info") {
|
|
2534
2549
|
const n = f.searchParams.get("url");
|
|
2535
2550
|
if (o.setHeader("content-type", "application/json"), n) {
|
|
2536
|
-
const
|
|
2537
|
-
o.setHeader("cache-control", "public, max-age=31536000, immutable"),
|
|
2551
|
+
const b = await qr(n);
|
|
2552
|
+
o.setHeader("cache-control", "public, max-age=31536000, immutable"), b ? o.write(JSON.stringify(b)) : o.statusCode = 404;
|
|
2538
2553
|
} else {
|
|
2539
2554
|
o.statusCode = 500;
|
|
2540
|
-
const
|
|
2541
|
-
o.write(JSON.stringify(
|
|
2555
|
+
const b = { message: "error" };
|
|
2556
|
+
o.write(JSON.stringify(b));
|
|
2542
2557
|
}
|
|
2543
2558
|
o.end();
|
|
2544
2559
|
return;
|
|
2545
2560
|
} else if (r.method === "POST" && f.pathname === "/__image_fix") {
|
|
2546
|
-
const n = f.searchParams.get("loc"),
|
|
2547
|
-
let
|
|
2548
|
-
const
|
|
2549
|
-
let
|
|
2550
|
-
for (;
|
|
2551
|
-
if (
|
|
2552
|
-
|
|
2561
|
+
const n = f.searchParams.get("loc"), b = f.searchParams.get("width"), v = f.searchParams.get("height"), I = f.searchParams.get("src"), g = f.searchParams.get("currentHref"), d = n.split(":"), y = parseInt(d[d.length - 1], 10) - 1;
|
|
2562
|
+
let u = parseInt(d[d.length - 2], 10) - 1;
|
|
2563
|
+
const s = a.resolve(i, d.slice(0, d.length - 2).join(":")), p = a.extname(s).toLowerCase();
|
|
2564
|
+
let S = l.readFileSync(s).toString("utf-8"), E = 0;
|
|
2565
|
+
for (; E < S.length; E++)
|
|
2566
|
+
if (u === 0) {
|
|
2567
|
+
E += y;
|
|
2553
2568
|
break;
|
|
2554
|
-
} else if (
|
|
2569
|
+
} else if (S[E] === `
|
|
2555
2570
|
`) {
|
|
2556
|
-
|
|
2571
|
+
u--;
|
|
2557
2572
|
continue;
|
|
2558
2573
|
}
|
|
2559
|
-
if (
|
|
2574
|
+
if (S.slice(E, E + 4) !== "<img") {
|
|
2560
2575
|
console.error(
|
|
2561
2576
|
"Could not apply auto fix, because it was not possible to find the original <img> tag"
|
|
2562
2577
|
), o.statusCode = 500;
|
|
2563
2578
|
return;
|
|
2564
2579
|
}
|
|
2565
|
-
const
|
|
2566
|
-
if (
|
|
2580
|
+
const c = S.indexOf(">", E) + 1;
|
|
2581
|
+
if (c < E) {
|
|
2567
2582
|
console.error(
|
|
2568
2583
|
"Could not apply auto fix, because it was not possible to find the original <img> tag"
|
|
2569
2584
|
), o.statusCode = 500;
|
|
2570
2585
|
return;
|
|
2571
2586
|
}
|
|
2572
|
-
const
|
|
2573
|
-
let
|
|
2574
|
-
if (I &&
|
|
2575
|
-
const
|
|
2576
|
-
if (
|
|
2577
|
-
const
|
|
2578
|
-
let
|
|
2579
|
-
if (l.existsSync(
|
|
2580
|
-
const
|
|
2581
|
-
await l.promises.mkdir(
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
),
|
|
2587
|
+
const w = [".ts", ".tsx", ".js", ".jsx", ".mdx"].includes(p);
|
|
2588
|
+
let x = S.slice(E, c);
|
|
2589
|
+
if (I && g && w) {
|
|
2590
|
+
const N = new URL(I), D = new URL(g);
|
|
2591
|
+
if (N.origin === D.origin) {
|
|
2592
|
+
const T = a.join(t, "public", N.pathname), $ = a.join(t, N.pathname);
|
|
2593
|
+
let F;
|
|
2594
|
+
if (l.existsSync(T)) {
|
|
2595
|
+
const X = a.join(i, "media", a.dirname(N.pathname));
|
|
2596
|
+
await l.promises.mkdir(X, { recursive: !0 }), await l.promises.copyFile(
|
|
2597
|
+
T,
|
|
2598
|
+
a.join(i, "media", N.pathname)
|
|
2599
|
+
), F = "~/media" + N.pathname;
|
|
2585
2600
|
} else if (l.existsSync($))
|
|
2586
|
-
|
|
2601
|
+
F = N.pathname.replace("/src/", "~/");
|
|
2587
2602
|
else
|
|
2588
2603
|
return;
|
|
2589
|
-
const
|
|
2590
|
-
|
|
2591
|
-
let
|
|
2592
|
-
if (
|
|
2604
|
+
const B = Lr(N.pathname), J = `${F}?jsx`;
|
|
2605
|
+
x = x.replace(/^<img/, `<${B}`), x = x.replace(/\bwidth=(({[^}]*})|('[^']*')|("[^"]*"))\s*/, ""), x = x.replace(/\bheight=(({[^}]*})|('[^']*')|("[^"]*"))\s*/, ""), x = x.replace(/\bsrc=(({[^}]*})|('[^']*')|("[^"]*"))\s*/, "");
|
|
2606
|
+
let Y = 0;
|
|
2607
|
+
if (p === ".mdx" && S.startsWith("---") && (Y = S.indexOf("---", 4) + 3, Y === -1))
|
|
2593
2608
|
return;
|
|
2594
|
-
const
|
|
2595
|
-
import ${
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
)}${
|
|
2609
|
+
const Z = `
|
|
2610
|
+
import ${B} from '${J}';`;
|
|
2611
|
+
S = `${S.slice(0, Y)}${Z}${S.slice(
|
|
2612
|
+
Y,
|
|
2613
|
+
E
|
|
2614
|
+
)}${x}${S.slice(c)}`, l.writeFileSync(s, S);
|
|
2600
2615
|
return;
|
|
2601
2616
|
}
|
|
2602
2617
|
}
|
|
2603
|
-
|
|
2618
|
+
x = x.replace(/\bwidth=(({[^}]*})|('[^']*')|("[^"]*"))/, `width="${b}"`), x = x.replace(/\bheight=(({[^}]*})|('[^']*')|("[^"]*"))/, `height="${v}"`), x.includes("height=") || (x = x.replace(/<img/, `<img height="${v}"`)), x.includes("width=") || (x = x.replace(/<img/, `<img width="${b}"`)), S = S.slice(0, E) + x + S.slice(c), l.writeFileSync(s, S);
|
|
2604
2619
|
} else
|
|
2605
2620
|
m();
|
|
2606
2621
|
} catch (l) {
|
|
2607
|
-
l instanceof Error && await
|
|
2622
|
+
l instanceof Error && await on(e, l), m(l);
|
|
2608
2623
|
}
|
|
2609
2624
|
};
|
|
2610
|
-
function
|
|
2625
|
+
function Lr(e) {
|
|
2611
2626
|
const t = e.lastIndexOf("."), i = e.lastIndexOf("/");
|
|
2612
|
-
return e = e.substring(i + 1, t), `Img${
|
|
2627
|
+
return e = e.substring(i + 1, t), `Img${jr(e)}`;
|
|
2613
2628
|
}
|
|
2614
|
-
function
|
|
2629
|
+
function jr(e) {
|
|
2615
2630
|
return `${e}`.toLowerCase().replace(new RegExp(/[-_]+/, "g"), " ").replace(new RegExp(/[^\w\s]/, "g"), "").replace(new RegExp(/\s+(.)(\w*)/, "g"), (t, i, r) => `${i.toUpperCase() + r}`).replace(new RegExp(/\w/), (t) => t.toUpperCase());
|
|
2616
2631
|
}
|
|
2617
|
-
const
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2632
|
+
const Ur = [
|
|
2633
|
+
qe,
|
|
2634
|
+
Ye,
|
|
2635
|
+
Xe,
|
|
2636
|
+
Oe,
|
|
2622
2637
|
"@builder.io/qwik",
|
|
2623
2638
|
"@builder.io/qwik/jsx-runtime",
|
|
2624
2639
|
"@builder.io/qwik/jsx-dev-runtime"
|
|
2625
|
-
],
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2640
|
+
], Br = [".css", ".scss", ".sass", ".less", ".styl", ".stylus"], Rr = [".woff", ".woff2", ".ttf"], Je = "@qwik-hmr-bridge", Ar = `
|
|
2641
|
+
// HMR bridge: connects Vite HMR events to Qwik's component re-rendering.
|
|
2642
|
+
if (import.meta.hot) {
|
|
2643
|
+
import.meta.hot.on("qwik:hmr", (data) => {
|
|
2644
|
+
for (const file of data.files) {
|
|
2645
|
+
document.dispatchEvent(
|
|
2646
|
+
new CustomEvent("qHmr" + file.replace(/[^a-zA-Z0-9_]/g, "_"))
|
|
2647
|
+
);
|
|
2648
|
+
}
|
|
2649
|
+
});
|
|
2650
|
+
}
|
|
2651
|
+
`;
|
|
2652
|
+
function Wr(e = {}) {
|
|
2653
|
+
let t = "serve", i = null, r = null, o = "/", m = null, l, a = null, f = null, n = null, b = "development", v;
|
|
2654
|
+
const I = e.client?.outDir;
|
|
2655
|
+
let g = null;
|
|
2656
|
+
const d = e.fileFilter ? (c, w) => Nt.test(c) || e.fileFilter(c, w) : () => !0, y = e.disableFontPreload ?? !1, u = [], s = Dt(e.optimizerOptions), p = /* @__PURE__ */ new Set();
|
|
2631
2657
|
return [{
|
|
2632
2658
|
name: "vite-plugin-qwik",
|
|
2633
2659
|
enforce: "pre",
|
|
2634
2660
|
api: {
|
|
2635
|
-
getOptimizer: () =>
|
|
2636
|
-
getOptions: () =>
|
|
2661
|
+
getOptimizer: () => s.getOptimizer(),
|
|
2662
|
+
getOptions: () => s.getOptions(),
|
|
2637
2663
|
getManifest: () => i,
|
|
2638
|
-
getRootDir: () =>
|
|
2664
|
+
getRootDir: () => s.getOptions().rootDir,
|
|
2639
2665
|
getClientOutDir: () => r,
|
|
2640
2666
|
getClientPublicOutDir: () => m,
|
|
2641
2667
|
getAssetsDir: () => l,
|
|
2642
2668
|
registerBundleGraphAdder: (c) => p.add(c),
|
|
2643
2669
|
_oldDevSsrServer: () => e.devSsrServer
|
|
2644
2670
|
},
|
|
2645
|
-
async config(c,
|
|
2646
|
-
await
|
|
2647
|
-
let
|
|
2648
|
-
c.build?.ssr ||
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
target: b,
|
|
2656
|
-
buildMode: S,
|
|
2671
|
+
async config(c, w) {
|
|
2672
|
+
await s.init();
|
|
2673
|
+
let x;
|
|
2674
|
+
c.build?.ssr || w.mode === "ssr" ? x = "ssr" : w.mode === "lib" ? x = "lib" : w.mode === "test" ? x = "test" : x = "client", t = w.command, w.mode === "production" ? b = "production" : w.mode === "development" ? b = "development" : t === "build" && x === "client" ? b = "production" : b = "development", s.debug(`vite config(), command: ${t}, env.mode: ${w.mode}`), t === "serve" ? e.entryStrategy = { type: "segment" } : x === "ssr" ? e.entryStrategy = { type: "hoist" } : x === "lib" && (e.entryStrategy = { type: "inline" });
|
|
2675
|
+
const N = x === "ssr" ? typeof c.build?.ssr == "string" ? c.build.ssr : e.ssr?.input : void 0, D = x === "client" ? e.client?.input : void 0;
|
|
2676
|
+
let T = c.build?.rollupOptions?.input || D || N;
|
|
2677
|
+
T && typeof T == "string" && (T = [T]), l = c.build?.assetsDir;
|
|
2678
|
+
const $ = x === "client" && !!l && l !== "_astro", F = {
|
|
2679
|
+
target: x,
|
|
2680
|
+
buildMode: b,
|
|
2657
2681
|
csr: e.csr,
|
|
2658
2682
|
debug: e.debug,
|
|
2659
2683
|
entryStrategy: e.entryStrategy,
|
|
@@ -2664,28 +2688,28 @@ function zr(e = {}) {
|
|
|
2664
2688
|
transformedModuleOutput: e.transformedModuleOutput,
|
|
2665
2689
|
outDir: c.build?.outDir,
|
|
2666
2690
|
ssrOutDir: e.ssr?.outDir || c.build?.outDir,
|
|
2667
|
-
clientOutDir:
|
|
2691
|
+
clientOutDir: I || // When ssr is true, this is probably an adapter build and not where the client build is
|
|
2668
2692
|
// However, if client.outDir was explicitly set, always use it
|
|
2669
|
-
(c.build?.ssr && !
|
|
2670
|
-
assetsDir:
|
|
2693
|
+
(c.build?.ssr && !I ? void 0 : c.build?.outDir),
|
|
2694
|
+
assetsDir: $ ? l : void 0,
|
|
2671
2695
|
devTools: e.devTools,
|
|
2672
2696
|
sourcemap: !!c.build?.sourcemap,
|
|
2673
2697
|
lint: e.lint,
|
|
2674
2698
|
experimental: e.experimental,
|
|
2675
|
-
input:
|
|
2699
|
+
input: T,
|
|
2676
2700
|
manifestInput: e.ssr?.manifestInput,
|
|
2677
2701
|
manifestInputPath: e.ssr?.manifestInputPath,
|
|
2678
2702
|
manifestOutput: e.client?.manifestOutput
|
|
2679
|
-
},
|
|
2680
|
-
|
|
2681
|
-
const
|
|
2703
|
+
}, B = await s.normalizeOptions(F);
|
|
2704
|
+
T ||= B.input, g = F, i = B.manifestInput, a = B.srcDir, f = B.rootDir, e.csr || (r = B.clientOutDir, m = r, n = B.ssrOutDir);
|
|
2705
|
+
const J = b === "development", Y = "globalThis.qDev", Z = "globalThis.qTest", X = "globalThis.qInspector", j = "globalThis.qSerialize", fe = c?.define?.[Y] ?? J, re = c?.define?.[X] ?? J, K = c?.define?.[j] ?? J, z = {
|
|
2706
|
+
// Duplicated in configEnvironment to support legacy vite build --ssr compatibility
|
|
2682
2707
|
ssr: {
|
|
2683
|
-
noExternal: [
|
|
2708
|
+
noExternal: [qe, Oe, Ae, te]
|
|
2684
2709
|
},
|
|
2685
2710
|
envPrefix: ["VITE_", "PUBLIC_"],
|
|
2686
2711
|
resolve: {
|
|
2687
|
-
dedupe: [...
|
|
2688
|
-
conditions: S === "production" && b === "client" ? ["min"] : [],
|
|
2712
|
+
dedupe: [...Ur],
|
|
2689
2713
|
alias: {
|
|
2690
2714
|
"@builder.io/qwik": "@qwik.dev/core",
|
|
2691
2715
|
"@builder.io/qwik/build": "@qwik.dev/core/build",
|
|
@@ -2700,25 +2724,21 @@ function zr(e = {}) {
|
|
|
2700
2724
|
"@builder.io/qwik/testing": "@qwik.dev/core/testing"
|
|
2701
2725
|
}
|
|
2702
2726
|
},
|
|
2703
|
-
esbuild: t === "serve" ? !1 : {
|
|
2704
|
-
logLevel: "error",
|
|
2705
|
-
jsx: "automatic"
|
|
2706
|
-
},
|
|
2707
2727
|
optimizeDeps: {
|
|
2708
2728
|
exclude: [
|
|
2709
2729
|
// using optimized deps for qwik libraries will lead to duplicate imports
|
|
2710
2730
|
// this breaks Qwik because it relies a lot on module scoped symbols
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2731
|
+
qe,
|
|
2732
|
+
Oe,
|
|
2733
|
+
Ae,
|
|
2734
|
+
Ye,
|
|
2735
|
+
Xe,
|
|
2736
|
+
te,
|
|
2737
|
+
ae,
|
|
2718
2738
|
"@builder.io/qwik"
|
|
2719
2739
|
],
|
|
2720
2740
|
// Enforce scanning our input even when overridden later
|
|
2721
|
-
entries:
|
|
2741
|
+
entries: T && (typeof T == "string" ? [T] : typeof T == "object" ? Object.values(T) : T)
|
|
2722
2742
|
},
|
|
2723
2743
|
build: {
|
|
2724
2744
|
modulePreload: !1,
|
|
@@ -2734,76 +2754,91 @@ function zr(e = {}) {
|
|
|
2734
2754
|
*/
|
|
2735
2755
|
maxParallelFileOps: 1,
|
|
2736
2756
|
// This will amend the existing input
|
|
2737
|
-
input:
|
|
2757
|
+
input: T
|
|
2738
2758
|
// temporary fix for rolldown-vite types
|
|
2739
2759
|
}
|
|
2740
2760
|
},
|
|
2741
2761
|
define: {
|
|
2742
|
-
[
|
|
2743
|
-
[
|
|
2744
|
-
[
|
|
2745
|
-
[
|
|
2762
|
+
[Y]: fe,
|
|
2763
|
+
[X]: re,
|
|
2764
|
+
[j]: K,
|
|
2765
|
+
[Z]: JSON.stringify(process.env.NODE_ENV === "test")
|
|
2746
2766
|
}
|
|
2747
2767
|
};
|
|
2748
2768
|
if (!e.csr) {
|
|
2749
|
-
|
|
2750
|
-
const
|
|
2751
|
-
|
|
2752
|
-
...
|
|
2753
|
-
output: await
|
|
2754
|
-
|
|
2769
|
+
z.build.cssCodeSplit = !1, B.outDir && (z.build.outDir = B.outDir);
|
|
2770
|
+
const Le = z.build.rollupOptions?.onwarn;
|
|
2771
|
+
z.build.rollupOptions = {
|
|
2772
|
+
...z.build.rollupOptions,
|
|
2773
|
+
output: await xn(
|
|
2774
|
+
s,
|
|
2755
2775
|
c.build?.rollupOptions?.output,
|
|
2756
|
-
|
|
2757
|
-
|
|
2776
|
+
$,
|
|
2777
|
+
B.outDir
|
|
2758
2778
|
),
|
|
2759
2779
|
preserveEntrySignatures: "exports-only",
|
|
2760
|
-
onwarn: (
|
|
2761
|
-
|
|
2780
|
+
onwarn: (de, je) => {
|
|
2781
|
+
de.plugin === "typescript" && de.message.includes("outputToFilesystem") || (Le ? Le(de, je) : je(de));
|
|
2762
2782
|
}
|
|
2763
|
-
},
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
]) :
|
|
2772
|
-
[
|
|
2773
|
-
[
|
|
2774
|
-
[
|
|
2775
|
-
}), globalThis.qDev =
|
|
2783
|
+
}, B.target === "ssr" ? t === "build" && (z.publicDir = !1, z.build.ssr = !0, c.build?.minify == null && b === "production" && (z.build.minify = !0)) : B.target === "client" || (B.target === "lib" ? (z.build.minify = !1, z.build.rollupOptions.external = [
|
|
2784
|
+
qe,
|
|
2785
|
+
Oe,
|
|
2786
|
+
Ae,
|
|
2787
|
+
Ye,
|
|
2788
|
+
Xe,
|
|
2789
|
+
te,
|
|
2790
|
+
ae
|
|
2791
|
+
]) : z.define = {
|
|
2792
|
+
[Y]: !0,
|
|
2793
|
+
[Z]: !0,
|
|
2794
|
+
[X]: !1
|
|
2795
|
+
}), globalThis.qDev = fe, globalThis.qTest = !0, globalThis.qInspector = re;
|
|
2776
2796
|
}
|
|
2777
|
-
return
|
|
2797
|
+
return z;
|
|
2798
|
+
},
|
|
2799
|
+
configEnvironment(c, w, x) {
|
|
2800
|
+
return c === "ssr" ? {
|
|
2801
|
+
resolve: {
|
|
2802
|
+
noExternal: [qe, Oe, Ae, te]
|
|
2803
|
+
}
|
|
2804
|
+
} : b === "production" ? {
|
|
2805
|
+
resolve: {
|
|
2806
|
+
conditions: ["min"]
|
|
2807
|
+
}
|
|
2808
|
+
} : {};
|
|
2778
2809
|
},
|
|
2779
2810
|
async configResolved(c) {
|
|
2780
2811
|
if (o = c.base, !(o.startsWith("/") && o.endsWith("/")))
|
|
2781
2812
|
throw new Error("vite's config.base must begin and end with /");
|
|
2782
|
-
c.build.sourcemap && e.optimizerOptions?.sourcemap === void 0 &&
|
|
2813
|
+
c.build.sourcemap && e.optimizerOptions?.sourcemap === void 0 && s.setSourceMapSupport(!0), g ? s.normalizeOptions(g) : s.normalizeOptions(e);
|
|
2783
2814
|
},
|
|
2784
2815
|
async buildStart() {
|
|
2785
|
-
|
|
2816
|
+
u.length = 0;
|
|
2786
2817
|
const c = this.resolve.bind(this);
|
|
2787
|
-
await
|
|
2788
|
-
|
|
2789
|
-
const
|
|
2790
|
-
|
|
2818
|
+
await s.validateSource(c), s.onDiagnostics((w, x, N) => {
|
|
2819
|
+
w.forEach((D) => {
|
|
2820
|
+
const T = s.normalizePath(x.sys.path.join(N, D.file));
|
|
2821
|
+
D.category === "error" ? this.error($e(T, D)) : this.warn($e(T, D));
|
|
2791
2822
|
});
|
|
2792
|
-
}), await
|
|
2823
|
+
}), await s.buildStart(this);
|
|
2793
2824
|
},
|
|
2794
|
-
resolveId(c,
|
|
2795
|
-
|
|
2796
|
-
|
|
2825
|
+
resolveId(c, w, x) {
|
|
2826
|
+
if (c.endsWith(Je))
|
|
2827
|
+
return Je;
|
|
2828
|
+
const N = d(c, "resolveId");
|
|
2829
|
+
return ne(c) || !N ? null : s.resolveId(this, c, w, x);
|
|
2797
2830
|
},
|
|
2798
|
-
load(c,
|
|
2799
|
-
|
|
2800
|
-
|
|
2831
|
+
load(c, w) {
|
|
2832
|
+
if (c === Je)
|
|
2833
|
+
return { code: Ar };
|
|
2834
|
+
const x = d(c, "load");
|
|
2835
|
+
return ne(c) || !x ? null : (c = s.normalizePath(c), t === "serve" && c.endsWith(ae) ? {
|
|
2801
2836
|
code: "export const manifest = undefined;"
|
|
2802
|
-
} :
|
|
2837
|
+
} : s.load(this, c, w));
|
|
2803
2838
|
},
|
|
2804
|
-
transform(c,
|
|
2805
|
-
if (
|
|
2806
|
-
const
|
|
2839
|
+
transform(c, w, x) {
|
|
2840
|
+
if (w.includes(".vite/deps/") && c.slice(0, 5e3).includes("qwik") && /import[^\n]*qwik[^\n]*\n/.test(c)) {
|
|
2841
|
+
const T = f && w.startsWith(f) ? w.slice(f.length) : w;
|
|
2807
2842
|
throw new Error(
|
|
2808
2843
|
`
|
|
2809
2844
|
|
|
@@ -2812,222 +2847,231 @@ function zr(e = {}) {
|
|
|
2812
2847
|
⚠️ IMPORTANT: This dependency was pre-bundled by Vite, but it seems to use Qwik, which needs processing by the optimizer.
|
|
2813
2848
|
|
|
2814
2849
|
👉 Please add the original modulename to the "optimizeDeps.exclude" array in your Vite config
|
|
2815
|
-
👉 ${
|
|
2850
|
+
👉 ${T}
|
|
2816
2851
|
|
|
2817
2852
|
==============
|
|
2818
2853
|
|
|
2819
2854
|
`
|
|
2820
2855
|
);
|
|
2821
2856
|
}
|
|
2822
|
-
const
|
|
2823
|
-
return
|
|
2857
|
+
const N = d(w, "transform"), D = w.includes("?raw");
|
|
2858
|
+
return ne(w) || !N || D ? null : s.transform(this, c, w, x);
|
|
2824
2859
|
}
|
|
2825
2860
|
}, {
|
|
2826
2861
|
name: "vite-plugin-qwik-post",
|
|
2827
2862
|
enforce: "post",
|
|
2828
2863
|
generateBundle: {
|
|
2829
2864
|
order: "post",
|
|
2830
|
-
async handler(c,
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
for (const [
|
|
2834
|
-
if (
|
|
2835
|
-
const
|
|
2836
|
-
if (
|
|
2837
|
-
typeof
|
|
2865
|
+
async handler(c, w) {
|
|
2866
|
+
if (this.environment.config.consumer === "client") {
|
|
2867
|
+
const N = s.getOptions();
|
|
2868
|
+
for (const [D, T] of Object.entries(w))
|
|
2869
|
+
if (T.type === "asset") {
|
|
2870
|
+
const $ = o + D;
|
|
2871
|
+
if (Br.some((F) => D.endsWith(F)))
|
|
2872
|
+
typeof T.source == "string" && T.source.length < N.inlineStylesUpToBytes ? u.push({
|
|
2838
2873
|
tag: "style",
|
|
2839
2874
|
location: "head",
|
|
2840
2875
|
attributes: {
|
|
2841
|
-
"data-src":
|
|
2842
|
-
dangerouslySetInnerHTML:
|
|
2876
|
+
"data-src": $,
|
|
2877
|
+
dangerouslySetInnerHTML: T.source
|
|
2843
2878
|
}
|
|
2844
|
-
}) :
|
|
2879
|
+
}) : u.push({
|
|
2845
2880
|
tag: "link",
|
|
2846
2881
|
location: "head",
|
|
2847
2882
|
attributes: {
|
|
2848
2883
|
rel: "stylesheet",
|
|
2849
|
-
href:
|
|
2884
|
+
href: $
|
|
2850
2885
|
}
|
|
2851
2886
|
});
|
|
2852
2887
|
else {
|
|
2853
|
-
const
|
|
2854
|
-
|
|
2888
|
+
const F = Rr.find((B) => D.endsWith(B));
|
|
2889
|
+
F && !y && u.unshift({
|
|
2855
2890
|
tag: "link",
|
|
2856
2891
|
location: "head",
|
|
2857
2892
|
attributes: {
|
|
2858
2893
|
rel: "preload",
|
|
2859
|
-
href:
|
|
2894
|
+
href: $,
|
|
2860
2895
|
as: "font",
|
|
2861
|
-
type: `font/${
|
|
2896
|
+
type: `font/${F.slice(1)}`,
|
|
2862
2897
|
crossorigin: ""
|
|
2863
2898
|
}
|
|
2864
2899
|
});
|
|
2865
2900
|
}
|
|
2866
2901
|
}
|
|
2867
|
-
await
|
|
2868
|
-
injections:
|
|
2902
|
+
await s.generateManifest(this, w, p, {
|
|
2903
|
+
injections: u,
|
|
2869
2904
|
platform: { vite: "" }
|
|
2870
2905
|
});
|
|
2871
2906
|
}
|
|
2872
2907
|
}
|
|
2873
2908
|
},
|
|
2874
|
-
async writeBundle(c,
|
|
2875
|
-
const
|
|
2876
|
-
if (
|
|
2877
|
-
const
|
|
2878
|
-
if (
|
|
2879
|
-
const
|
|
2909
|
+
async writeBundle(c, w) {
|
|
2910
|
+
const x = s.getOptions();
|
|
2911
|
+
if (this.environment.config.consumer === "server") {
|
|
2912
|
+
const D = s.getSys();
|
|
2913
|
+
if (D.env === "node" || D.env === "bun" || D.env === "deno") {
|
|
2914
|
+
const T = Object.keys(w), $ = async (F) => {
|
|
2880
2915
|
try {
|
|
2881
|
-
const
|
|
2882
|
-
if ((
|
|
2883
|
-
const
|
|
2884
|
-
if (!
|
|
2885
|
-
const
|
|
2886
|
-
await
|
|
2887
|
-
|
|
2888
|
-
`export * from "./${
|
|
2916
|
+
const B = D.path.basename(F), J = D.path.extname(B);
|
|
2917
|
+
if ((B.startsWith("entry.") || B.startsWith("entry_")) && !B.includes("preview") && (J === ".mjs" || J === ".cjs")) {
|
|
2918
|
+
const Z = D.path.basename(B, J), X = `${Z}.js`, j = Z + J;
|
|
2919
|
+
if (!T.some((re) => D.path.basename(re) === X)) {
|
|
2920
|
+
const re = D.path.dirname(F), K = await D.dynamicImport("node:fs"), z = D.path.join(x.outDir, re);
|
|
2921
|
+
await K.promises.mkdir(z, { recursive: !0 }), await K.promises.writeFile(
|
|
2922
|
+
D.path.join(z, X),
|
|
2923
|
+
`export * from "./${j}";`
|
|
2889
2924
|
);
|
|
2890
2925
|
}
|
|
2891
2926
|
}
|
|
2892
|
-
} catch (
|
|
2893
|
-
console.error("patchModuleFormat",
|
|
2927
|
+
} catch (B) {
|
|
2928
|
+
console.error("patchModuleFormat", B);
|
|
2894
2929
|
}
|
|
2895
2930
|
};
|
|
2896
|
-
await Promise.all(
|
|
2931
|
+
await Promise.all(T.map($));
|
|
2897
2932
|
}
|
|
2898
2933
|
}
|
|
2899
2934
|
},
|
|
2900
2935
|
transformIndexHtml() {
|
|
2901
2936
|
if (t === "serve")
|
|
2902
|
-
return
|
|
2937
|
+
return Mn(s.getOptions(), o);
|
|
2903
2938
|
},
|
|
2904
2939
|
configureServer(c) {
|
|
2905
|
-
|
|
2940
|
+
v = c, s.configureServer(c), (e?.devTools?.imageDevTools ?? !0) && c.middlewares.use(Or(s.getSys(), f, a));
|
|
2906
2941
|
},
|
|
2907
2942
|
configurePreviewServer(c) {
|
|
2908
2943
|
return async () => {
|
|
2909
|
-
const
|
|
2910
|
-
await
|
|
2944
|
+
const w = s.getSys(), x = s.getPath();
|
|
2945
|
+
await Nn(c.middlewares, n, w, x);
|
|
2911
2946
|
};
|
|
2912
2947
|
},
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2948
|
+
hotUpdate(c) {
|
|
2949
|
+
s.hotUpdate(this.environment, c);
|
|
2950
|
+
const w = e?.devTools?.hmr ?? !0;
|
|
2951
|
+
if (this.environment.name === "ssr" && c.modules.length)
|
|
2952
|
+
if (w) {
|
|
2953
|
+
const x = c.modules.map((N) => N.type === "js" && N.url).filter(Boolean);
|
|
2954
|
+
x.length > 0 && v && v.environments.client.hot.send({
|
|
2955
|
+
type: "custom",
|
|
2956
|
+
event: "qwik:hmr",
|
|
2957
|
+
data: { files: x }
|
|
2958
|
+
});
|
|
2959
|
+
} else
|
|
2960
|
+
v?.environments.client.hot.send({ type: "full-reload" });
|
|
2917
2961
|
},
|
|
2918
|
-
onLog(c,
|
|
2919
|
-
if (
|
|
2920
|
-
const
|
|
2962
|
+
onLog(c, w) {
|
|
2963
|
+
if (w.plugin == "vite-plugin-qwik") {
|
|
2964
|
+
const x = $r[c] || le.White, N = (w.frame || "").split(`
|
|
2921
2965
|
`).map(
|
|
2922
|
-
(
|
|
2966
|
+
(D) => (D.match(/^\s*\^\s*$/) ? le.BrightWhite : le.BrightBlack) + D
|
|
2923
2967
|
);
|
|
2924
2968
|
return console[c](
|
|
2925
|
-
`${
|
|
2926
|
-
${
|
|
2927
|
-
%s${
|
|
2928
|
-
`[${
|
|
2969
|
+
`${x}%s
|
|
2970
|
+
${le.BrightWhite}%s
|
|
2971
|
+
%s${le.RESET}`,
|
|
2972
|
+
`[${w.plugin}](${c}): ${w.message}
|
|
2929
2973
|
`,
|
|
2930
|
-
` ${
|
|
2974
|
+
` ${w?.loc?.file}:${w?.loc?.line}:${w?.loc?.column}
|
|
2931
2975
|
`,
|
|
2932
|
-
` ${
|
|
2976
|
+
` ${N.join(`
|
|
2933
2977
|
`)}
|
|
2934
2978
|
`
|
|
2935
2979
|
), !1;
|
|
2936
2980
|
}
|
|
2937
2981
|
}
|
|
2938
|
-
},
|
|
2982
|
+
}, Fr()];
|
|
2939
2983
|
}
|
|
2940
|
-
async function
|
|
2984
|
+
async function Fr() {
|
|
2941
2985
|
let e, t;
|
|
2942
2986
|
try {
|
|
2943
|
-
e = await import("node:fs").then((
|
|
2987
|
+
e = await import("node:fs").then((a) => a.promises), t = await import("node:path");
|
|
2944
2988
|
} catch {
|
|
2945
2989
|
return;
|
|
2946
2990
|
}
|
|
2947
2991
|
const i = /* @__PURE__ */ new Set();
|
|
2948
2992
|
let r;
|
|
2949
2993
|
const o = "@qwik-dev/core", m = "@builder.io/qwik";
|
|
2950
|
-
async function l(
|
|
2994
|
+
async function l(a, f) {
|
|
2951
2995
|
for (; f; ) {
|
|
2952
|
-
const n = t.join(f, "node_modules",
|
|
2996
|
+
const n = t.join(f, "node_modules", a, "package.json");
|
|
2953
2997
|
try {
|
|
2954
2998
|
await e.access(n);
|
|
2955
|
-
const
|
|
2999
|
+
const v = await e.readFile(n, {
|
|
2956
3000
|
encoding: "utf-8"
|
|
2957
|
-
}), I = JSON.parse(
|
|
3001
|
+
}), I = JSON.parse(v);
|
|
2958
3002
|
return !!(I.qwik || I.dependencies?.[o] || I.peerDependencies?.[o] || I.dependencies?.[m] || I.peerDependencies?.[m]);
|
|
2959
3003
|
} catch {
|
|
2960
3004
|
}
|
|
2961
|
-
const
|
|
2962
|
-
if (
|
|
3005
|
+
const b = t.dirname(f);
|
|
3006
|
+
if (b === f)
|
|
2963
3007
|
break;
|
|
2964
|
-
f =
|
|
3008
|
+
f = b;
|
|
2965
3009
|
}
|
|
2966
3010
|
return !1;
|
|
2967
3011
|
}
|
|
2968
3012
|
return {
|
|
2969
3013
|
name: "checkQwikExternals",
|
|
2970
3014
|
enforce: "pre",
|
|
2971
|
-
configResolved: (
|
|
2972
|
-
r =
|
|
3015
|
+
configResolved: (a) => {
|
|
3016
|
+
r = a.root;
|
|
2973
3017
|
},
|
|
2974
3018
|
// Attempt to mark the Qwik dependencies as non-optimizeable
|
|
2975
3019
|
config: {
|
|
2976
3020
|
order: "post",
|
|
2977
|
-
async handler(
|
|
2978
|
-
const f = [], n = [
|
|
2979
|
-
for (const
|
|
2980
|
-
|
|
3021
|
+
async handler(a) {
|
|
3022
|
+
const f = [], n = [a.ssr?.noExternal, a.environments?.ssr?.resolve?.noExternal].flat().filter((v) => typeof v == "string"), b = a.optimizeDeps?.exclude ?? [];
|
|
3023
|
+
for (const v of n)
|
|
3024
|
+
b.includes(v) || await l(v, a.root || process.cwd()) && f.push(v);
|
|
2981
3025
|
return { optimizeDeps: { exclude: f } };
|
|
2982
3026
|
}
|
|
2983
3027
|
},
|
|
2984
3028
|
// We check all SSR build lookups for external Qwik deps
|
|
2985
3029
|
resolveId: {
|
|
2986
3030
|
order: "pre",
|
|
2987
|
-
async handler(
|
|
2988
|
-
if (!
|
|
3031
|
+
async handler(a, f, n) {
|
|
3032
|
+
if (!(this.environment.config.consumer === "server") || /^([./]|node:|[^a-z@])/i.test(a) || i.has(a))
|
|
2989
3033
|
return;
|
|
2990
|
-
const
|
|
2991
|
-
if (i.has(
|
|
3034
|
+
const v = (a.startsWith("@") ? a.split("/").slice(0, 2).join("/") : a.split("/")[0]).split("?")[0];
|
|
3035
|
+
if (i.has(v))
|
|
2992
3036
|
return;
|
|
2993
|
-
i.add(
|
|
2994
|
-
let
|
|
3037
|
+
i.add(a), i.add(v);
|
|
3038
|
+
let I;
|
|
2995
3039
|
try {
|
|
2996
|
-
|
|
3040
|
+
I = await this.resolve(v, f, { ...n, skipSelf: !0 });
|
|
2997
3041
|
} catch {
|
|
2998
3042
|
return;
|
|
2999
3043
|
}
|
|
3000
|
-
if (
|
|
3044
|
+
if (I?.external && await l(v, f ? t.dirname(f) : r))
|
|
3001
3045
|
throw new Error(
|
|
3002
3046
|
`
|
|
3003
3047
|
==============
|
|
3004
|
-
${
|
|
3048
|
+
${v} is being treated as an external dependency, but it should be included in the server bundle, because it uses Qwik and it needs to be processed by the optimizer.
|
|
3005
3049
|
Please add the package to "ssr.noExternal[]" as well as "optimizeDeps.exclude[]" in the Vite config.
|
|
3006
3050
|
==============
|
|
3007
3051
|
`
|
|
3008
3052
|
);
|
|
3009
|
-
if (
|
|
3010
|
-
return
|
|
3053
|
+
if (v === a)
|
|
3054
|
+
return I;
|
|
3011
3055
|
}
|
|
3012
3056
|
}
|
|
3013
3057
|
};
|
|
3014
3058
|
}
|
|
3015
|
-
const
|
|
3059
|
+
const le = {
|
|
3016
3060
|
Yellow: "\x1B[33m",
|
|
3017
3061
|
Cyan: "\x1B[36m",
|
|
3018
3062
|
White: "\x1B[37m",
|
|
3019
3063
|
BrightBlack: "\x1B[90m",
|
|
3020
3064
|
BrightWhite: "\x1B[97m",
|
|
3021
3065
|
RESET: "\x1B[0m"
|
|
3022
|
-
},
|
|
3023
|
-
warn:
|
|
3024
|
-
info:
|
|
3025
|
-
debug:
|
|
3026
|
-
},
|
|
3066
|
+
}, $r = {
|
|
3067
|
+
warn: le.Yellow,
|
|
3068
|
+
info: le.Cyan,
|
|
3069
|
+
debug: le.BrightBlack
|
|
3070
|
+
}, Gr = void 0;
|
|
3027
3071
|
export {
|
|
3028
3072
|
At as createOptimizer,
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3073
|
+
Hr as qwikRollup,
|
|
3074
|
+
Wr as qwikVite,
|
|
3075
|
+
Gr as symbolMapper,
|
|
3076
|
+
zr as versions
|
|
3033
3077
|
};
|