@noego/forge 0.1.25 → 0.1.27
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/README.md +2 -0
- package/dist/client.cjs +2 -2
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.ts +25 -0
- package/dist/client.mjs +603 -583
- package/dist/client.mjs.map +1 -1
- package/dist/page.svelte-4uv4nQ2i.js.map +1 -1
- package/dist/page.svelte-CW8PJDdH.cjs.map +1 -1
- package/dist-ssr/{path-BqcF5dbs.js → path-2bYzpvRB.js} +3 -1
- package/dist-ssr/{path-BqcF5dbs.js.map → path-2bYzpvRB.js.map} +1 -1
- package/dist-ssr/{path-sxXxpB6R.cjs → path-DCxJMpj7.cjs} +3 -1
- package/dist-ssr/{path-sxXxpB6R.cjs.map → path-DCxJMpj7.cjs.map} +1 -1
- package/dist-ssr/server.cjs +4 -3
- package/dist-ssr/server.cjs.map +1 -1
- package/dist-ssr/server.js +4 -3
- package/dist-ssr/server.js.map +1 -1
- package/dist-ssr/shared.cjs +1 -1
- package/dist-ssr/shared.js +1 -1
- package/dist-ssr/static.cjs +1 -1
- package/dist-ssr/static.d.ts +1 -0
- package/dist-ssr/static.js +1 -1
- package/dist-ssr/test.d.ts +1 -0
- package/dist-ssr/{url_parser-BX00zzMP.js → url_parser-B6dvK0DX.js} +2 -2
- package/dist-ssr/{url_parser-BX00zzMP.js.map → url_parser-B6dvK0DX.js.map} +1 -1
- package/dist-ssr/{url_parser-Dipo_fiS.cjs → url_parser-D7ZqJUTw.cjs} +2 -2
- package/dist-ssr/{url_parser-Dipo_fiS.cjs.map → url_parser-D7ZqJUTw.cjs.map} +1 -1
- package/package.json +1 -1
- package/src/components/RecursiveRender.svelte +37 -16
package/dist/client.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { p as
|
|
5
|
-
import { s as
|
|
1
|
+
var tt = Object.defineProperty;
|
|
2
|
+
var rt = (e, t, r) => t in e ? tt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var oe = (e, t, r) => rt(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
+
import { p as nt, a as k } from "./page.svelte-4uv4nQ2i.js";
|
|
5
|
+
import { s as Pr } from "./page.svelte-4uv4nQ2i.js";
|
|
6
6
|
import "svelte/internal/client";
|
|
7
|
-
import { hydrate as
|
|
8
|
-
import
|
|
9
|
-
import { writable as
|
|
10
|
-
function
|
|
11
|
-
const t = new
|
|
7
|
+
import { hydrate as ot } from "svelte";
|
|
8
|
+
import it from "../src/components/RecursiveRender.svelte";
|
|
9
|
+
import { writable as Ce, get as R } from "svelte/store";
|
|
10
|
+
function at(e) {
|
|
11
|
+
const t = new nt(e);
|
|
12
12
|
return (r) => {
|
|
13
13
|
const n = t.match(r);
|
|
14
14
|
if (!n) return null;
|
|
@@ -18,29 +18,29 @@ function rt(e) {
|
|
|
18
18
|
return i;
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function st(e) {
|
|
22
22
|
return e.map((t) => {
|
|
23
|
-
const r = t.path, n =
|
|
23
|
+
const r = t.path, n = at(r);
|
|
24
24
|
return { pattern: r, parser: n };
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
|
-
var
|
|
28
|
-
return
|
|
27
|
+
var fe = function(e, t) {
|
|
28
|
+
return fe = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, n) {
|
|
29
29
|
r.__proto__ = n;
|
|
30
30
|
} || function(r, n) {
|
|
31
31
|
for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (r[i] = n[i]);
|
|
32
|
-
},
|
|
32
|
+
}, fe(e, t);
|
|
33
33
|
};
|
|
34
|
-
function
|
|
34
|
+
function G(e, t) {
|
|
35
35
|
if (typeof t != "function" && t !== null)
|
|
36
36
|
throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
|
|
37
|
-
|
|
37
|
+
fe(e, t);
|
|
38
38
|
function r() {
|
|
39
39
|
this.constructor = e;
|
|
40
40
|
}
|
|
41
41
|
e.prototype = t === null ? Object.create(t) : (r.prototype = t.prototype, new r());
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function ut(e, t, r, n) {
|
|
44
44
|
function i(o) {
|
|
45
45
|
return o instanceof r ? o : new r(function(a) {
|
|
46
46
|
a(o);
|
|
@@ -50,15 +50,15 @@ function ot(e, t, r, n) {
|
|
|
50
50
|
function u(l) {
|
|
51
51
|
try {
|
|
52
52
|
c(n.next(l));
|
|
53
|
-
} catch (
|
|
54
|
-
a(
|
|
53
|
+
} catch (p) {
|
|
54
|
+
a(p);
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
function s(l) {
|
|
58
58
|
try {
|
|
59
59
|
c(n.throw(l));
|
|
60
|
-
} catch (
|
|
61
|
-
a(
|
|
60
|
+
} catch (p) {
|
|
61
|
+
a(p);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
function c(l) {
|
|
@@ -67,7 +67,7 @@ function ot(e, t, r, n) {
|
|
|
67
67
|
c((n = n.apply(e, t || [])).next());
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function je(e, t) {
|
|
71
71
|
var r = { label: 0, sent: function() {
|
|
72
72
|
if (o[0] & 1) throw o[1];
|
|
73
73
|
return o[1];
|
|
@@ -127,7 +127,7 @@ function Pe(e, t) {
|
|
|
127
127
|
return { value: c[0] ? c[1] : void 0, done: !0 };
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
|
-
function
|
|
130
|
+
function q(e) {
|
|
131
131
|
var t = typeof Symbol == "function" && Symbol.iterator, r = t && e[t], n = 0;
|
|
132
132
|
if (r) return r.call(e);
|
|
133
133
|
if (e && typeof e.length == "number") return {
|
|
@@ -137,7 +137,7 @@ function U(e) {
|
|
|
137
137
|
};
|
|
138
138
|
throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
139
139
|
}
|
|
140
|
-
function
|
|
140
|
+
function z(e, t) {
|
|
141
141
|
var r = typeof Symbol == "function" && e[Symbol.iterator];
|
|
142
142
|
if (!r) return e;
|
|
143
143
|
var n = r.call(e), i, o = [], a;
|
|
@@ -154,56 +154,56 @@ function k(e, t) {
|
|
|
154
154
|
}
|
|
155
155
|
return o;
|
|
156
156
|
}
|
|
157
|
-
function
|
|
157
|
+
function Y(e, t, r) {
|
|
158
158
|
if (r || arguments.length === 2) for (var n = 0, i = t.length, o; n < i; n++)
|
|
159
159
|
(o || !(n in t)) && (o || (o = Array.prototype.slice.call(t, 0, n)), o[n] = t[n]);
|
|
160
160
|
return e.concat(o || Array.prototype.slice.call(t));
|
|
161
161
|
}
|
|
162
|
-
function
|
|
163
|
-
return this instanceof
|
|
162
|
+
function W(e) {
|
|
163
|
+
return this instanceof W ? (this.v = e, this) : new W(e);
|
|
164
164
|
}
|
|
165
|
-
function
|
|
165
|
+
function ct(e, t, r) {
|
|
166
166
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
167
167
|
var n = r.apply(e, t || []), i, o = [];
|
|
168
168
|
return i = Object.create((typeof AsyncIterator == "function" ? AsyncIterator : Object).prototype), u("next"), u("throw"), u("return", a), i[Symbol.asyncIterator] = function() {
|
|
169
169
|
return this;
|
|
170
170
|
}, i;
|
|
171
171
|
function a(d) {
|
|
172
|
-
return function(
|
|
173
|
-
return Promise.resolve(
|
|
172
|
+
return function(v) {
|
|
173
|
+
return Promise.resolve(v).then(d, p);
|
|
174
174
|
};
|
|
175
175
|
}
|
|
176
|
-
function u(d,
|
|
177
|
-
n[d] && (i[d] = function(
|
|
178
|
-
return new Promise(function(S,
|
|
179
|
-
o.push([d,
|
|
176
|
+
function u(d, v) {
|
|
177
|
+
n[d] && (i[d] = function(f) {
|
|
178
|
+
return new Promise(function(S, w) {
|
|
179
|
+
o.push([d, f, S, w]) > 1 || s(d, f);
|
|
180
180
|
});
|
|
181
|
-
},
|
|
181
|
+
}, v && (i[d] = v(i[d])));
|
|
182
182
|
}
|
|
183
|
-
function s(d,
|
|
183
|
+
function s(d, v) {
|
|
184
184
|
try {
|
|
185
|
-
c(n[d](
|
|
186
|
-
} catch (
|
|
187
|
-
|
|
185
|
+
c(n[d](v));
|
|
186
|
+
} catch (f) {
|
|
187
|
+
h(o[0][3], f);
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
function c(d) {
|
|
191
|
-
d.value instanceof
|
|
191
|
+
d.value instanceof W ? Promise.resolve(d.value.v).then(l, p) : h(o[0][2], d);
|
|
192
192
|
}
|
|
193
193
|
function l(d) {
|
|
194
194
|
s("next", d);
|
|
195
195
|
}
|
|
196
|
-
function
|
|
196
|
+
function p(d) {
|
|
197
197
|
s("throw", d);
|
|
198
198
|
}
|
|
199
|
-
function
|
|
200
|
-
d(
|
|
199
|
+
function h(d, v) {
|
|
200
|
+
d(v), o.shift(), o.length && s(o[0][0], o[0][1]);
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
|
-
function
|
|
203
|
+
function lt(e) {
|
|
204
204
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
205
205
|
var t = e[Symbol.asyncIterator], r;
|
|
206
|
-
return t ? t.call(e) : (e = typeof
|
|
206
|
+
return t ? t.call(e) : (e = typeof q == "function" ? q(e) : e[Symbol.iterator](), r = {}, n("next"), n("throw"), n("return"), r[Symbol.asyncIterator] = function() {
|
|
207
207
|
return this;
|
|
208
208
|
}, r);
|
|
209
209
|
function n(o) {
|
|
@@ -219,16 +219,16 @@ function at(e) {
|
|
|
219
219
|
}, a);
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
|
-
function
|
|
222
|
+
function b(e) {
|
|
223
223
|
return typeof e == "function";
|
|
224
224
|
}
|
|
225
|
-
function
|
|
225
|
+
function me(e) {
|
|
226
226
|
var t = function(n) {
|
|
227
227
|
Error.call(n), n.stack = new Error().stack;
|
|
228
228
|
}, r = e(t);
|
|
229
229
|
return r.prototype = Object.create(Error.prototype), r.prototype.constructor = r, r;
|
|
230
230
|
}
|
|
231
|
-
var
|
|
231
|
+
var ie = me(function(e) {
|
|
232
232
|
return function(r) {
|
|
233
233
|
e(this), this.message = r ? r.length + ` errors occurred during unsubscription:
|
|
234
234
|
` + r.map(function(n, i) {
|
|
@@ -237,13 +237,13 @@ var re = he(function(e) {
|
|
|
237
237
|
`) : "", this.name = "UnsubscriptionError", this.errors = r;
|
|
238
238
|
};
|
|
239
239
|
});
|
|
240
|
-
function
|
|
240
|
+
function de(e, t) {
|
|
241
241
|
if (e) {
|
|
242
242
|
var r = e.indexOf(t);
|
|
243
243
|
0 <= r && e.splice(r, 1);
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
|
-
var
|
|
246
|
+
var te = (function() {
|
|
247
247
|
function e(t) {
|
|
248
248
|
this.initialTeardown = t, this.closed = !1, this._parentage = null, this._finalizers = null;
|
|
249
249
|
}
|
|
@@ -255,12 +255,12 @@ var Z = (function() {
|
|
|
255
255
|
if (a)
|
|
256
256
|
if (this._parentage = null, Array.isArray(a))
|
|
257
257
|
try {
|
|
258
|
-
for (var u =
|
|
258
|
+
for (var u = q(a), s = u.next(); !s.done; s = u.next()) {
|
|
259
259
|
var c = s.value;
|
|
260
260
|
c.remove(this);
|
|
261
261
|
}
|
|
262
|
-
} catch (
|
|
263
|
-
t = { error:
|
|
262
|
+
} catch (f) {
|
|
263
|
+
t = { error: f };
|
|
264
264
|
} finally {
|
|
265
265
|
try {
|
|
266
266
|
s && !s.done && (r = u.return) && r.call(u);
|
|
@@ -271,42 +271,42 @@ var Z = (function() {
|
|
|
271
271
|
else
|
|
272
272
|
a.remove(this);
|
|
273
273
|
var l = this.initialTeardown;
|
|
274
|
-
if (
|
|
274
|
+
if (b(l))
|
|
275
275
|
try {
|
|
276
276
|
l();
|
|
277
|
-
} catch (
|
|
278
|
-
o =
|
|
277
|
+
} catch (f) {
|
|
278
|
+
o = f instanceof ie ? f.errors : [f];
|
|
279
279
|
}
|
|
280
|
-
var
|
|
281
|
-
if (
|
|
280
|
+
var p = this._finalizers;
|
|
281
|
+
if (p) {
|
|
282
282
|
this._finalizers = null;
|
|
283
283
|
try {
|
|
284
|
-
for (var
|
|
285
|
-
var
|
|
284
|
+
for (var h = q(p), d = h.next(); !d.done; d = h.next()) {
|
|
285
|
+
var v = d.value;
|
|
286
286
|
try {
|
|
287
|
-
|
|
288
|
-
} catch (
|
|
289
|
-
o = o ?? [],
|
|
287
|
+
Ee(v);
|
|
288
|
+
} catch (f) {
|
|
289
|
+
o = o ?? [], f instanceof ie ? o = Y(Y([], z(o)), z(f.errors)) : o.push(f);
|
|
290
290
|
}
|
|
291
291
|
}
|
|
292
|
-
} catch (
|
|
293
|
-
n = { error:
|
|
292
|
+
} catch (f) {
|
|
293
|
+
n = { error: f };
|
|
294
294
|
} finally {
|
|
295
295
|
try {
|
|
296
|
-
d && !d.done && (i =
|
|
296
|
+
d && !d.done && (i = h.return) && i.call(h);
|
|
297
297
|
} finally {
|
|
298
298
|
if (n) throw n.error;
|
|
299
299
|
}
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
302
|
if (o)
|
|
303
|
-
throw new
|
|
303
|
+
throw new ie(o);
|
|
304
304
|
}
|
|
305
305
|
}, e.prototype.add = function(t) {
|
|
306
306
|
var r;
|
|
307
307
|
if (t && t !== this)
|
|
308
308
|
if (this.closed)
|
|
309
|
-
|
|
309
|
+
Ee(t);
|
|
310
310
|
else {
|
|
311
311
|
if (t instanceof e) {
|
|
312
312
|
if (t.closed || t._hasParent(this))
|
|
@@ -323,52 +323,52 @@ var Z = (function() {
|
|
|
323
323
|
this._parentage = Array.isArray(r) ? (r.push(t), r) : r ? [r, t] : t;
|
|
324
324
|
}, e.prototype._removeParent = function(t) {
|
|
325
325
|
var r = this._parentage;
|
|
326
|
-
r === t ? this._parentage = null : Array.isArray(r) &&
|
|
326
|
+
r === t ? this._parentage = null : Array.isArray(r) && de(r, t);
|
|
327
327
|
}, e.prototype.remove = function(t) {
|
|
328
328
|
var r = this._finalizers;
|
|
329
|
-
r &&
|
|
329
|
+
r && de(r, t), t instanceof e && t._removeParent(this);
|
|
330
330
|
}, e.EMPTY = (function() {
|
|
331
331
|
var t = new e();
|
|
332
332
|
return t.closed = !0, t;
|
|
333
333
|
})(), e;
|
|
334
|
-
})(),
|
|
335
|
-
function
|
|
336
|
-
return e instanceof
|
|
334
|
+
})(), Le = te.EMPTY;
|
|
335
|
+
function Ne(e) {
|
|
336
|
+
return e instanceof te || e && "closed" in e && b(e.remove) && b(e.add) && b(e.unsubscribe);
|
|
337
337
|
}
|
|
338
|
-
function
|
|
339
|
-
|
|
338
|
+
function Ee(e) {
|
|
339
|
+
b(e) ? e() : e.unsubscribe();
|
|
340
340
|
}
|
|
341
|
-
var
|
|
341
|
+
var ft = {
|
|
342
342
|
Promise: void 0
|
|
343
|
-
},
|
|
343
|
+
}, dt = {
|
|
344
344
|
setTimeout: function(e, t) {
|
|
345
345
|
for (var r = [], n = 2; n < arguments.length; n++)
|
|
346
346
|
r[n - 2] = arguments[n];
|
|
347
|
-
return setTimeout.apply(void 0,
|
|
347
|
+
return setTimeout.apply(void 0, Y([e, t], z(r)));
|
|
348
348
|
},
|
|
349
349
|
clearTimeout: function(e) {
|
|
350
350
|
return clearTimeout(e);
|
|
351
351
|
},
|
|
352
352
|
delegate: void 0
|
|
353
353
|
};
|
|
354
|
-
function
|
|
355
|
-
|
|
354
|
+
function Fe(e) {
|
|
355
|
+
dt.setTimeout(function() {
|
|
356
356
|
throw e;
|
|
357
357
|
});
|
|
358
358
|
}
|
|
359
|
-
function
|
|
359
|
+
function Oe() {
|
|
360
360
|
}
|
|
361
|
-
function
|
|
361
|
+
function Z(e) {
|
|
362
362
|
e();
|
|
363
363
|
}
|
|
364
|
-
var
|
|
365
|
-
|
|
364
|
+
var ye = (function(e) {
|
|
365
|
+
G(t, e);
|
|
366
366
|
function t(r) {
|
|
367
367
|
var n = e.call(this) || this;
|
|
368
|
-
return n.isStopped = !1, r ? (n.destination = r,
|
|
368
|
+
return n.isStopped = !1, r ? (n.destination = r, Ne(r) && r.add(n)) : n.destination = vt, n;
|
|
369
369
|
}
|
|
370
370
|
return t.create = function(r, n, i) {
|
|
371
|
-
return new
|
|
371
|
+
return new B(r, n, i);
|
|
372
372
|
}, t.prototype.next = function(r) {
|
|
373
373
|
this.isStopped || this._next(r);
|
|
374
374
|
}, t.prototype.error = function(r) {
|
|
@@ -392,7 +392,7 @@ var pe = (function(e) {
|
|
|
392
392
|
this.unsubscribe();
|
|
393
393
|
}
|
|
394
394
|
}, t;
|
|
395
|
-
})(
|
|
395
|
+
})(te), ht = (function() {
|
|
396
396
|
function e(t) {
|
|
397
397
|
this.partialObserver = t;
|
|
398
398
|
}
|
|
@@ -402,7 +402,7 @@ var pe = (function(e) {
|
|
|
402
402
|
try {
|
|
403
403
|
r.next(t);
|
|
404
404
|
} catch (n) {
|
|
405
|
-
|
|
405
|
+
K(n);
|
|
406
406
|
}
|
|
407
407
|
}, e.prototype.error = function(t) {
|
|
408
408
|
var r = this.partialObserver;
|
|
@@ -410,56 +410,56 @@ var pe = (function(e) {
|
|
|
410
410
|
try {
|
|
411
411
|
r.error(t);
|
|
412
412
|
} catch (n) {
|
|
413
|
-
|
|
413
|
+
K(n);
|
|
414
414
|
}
|
|
415
415
|
else
|
|
416
|
-
|
|
416
|
+
K(t);
|
|
417
417
|
}, e.prototype.complete = function() {
|
|
418
418
|
var t = this.partialObserver;
|
|
419
419
|
if (t.complete)
|
|
420
420
|
try {
|
|
421
421
|
t.complete();
|
|
422
422
|
} catch (r) {
|
|
423
|
-
|
|
423
|
+
K(r);
|
|
424
424
|
}
|
|
425
425
|
}, e;
|
|
426
|
-
})(),
|
|
427
|
-
|
|
426
|
+
})(), B = (function(e) {
|
|
427
|
+
G(t, e);
|
|
428
428
|
function t(r, n, i) {
|
|
429
429
|
var o = e.call(this) || this, a;
|
|
430
|
-
return
|
|
430
|
+
return b(r) || !r ? a = {
|
|
431
431
|
next: r ?? void 0,
|
|
432
432
|
error: n ?? void 0,
|
|
433
433
|
complete: i ?? void 0
|
|
434
|
-
} : a = r, o.destination = new
|
|
434
|
+
} : a = r, o.destination = new ht(a), o;
|
|
435
435
|
}
|
|
436
436
|
return t;
|
|
437
|
-
})(
|
|
438
|
-
function
|
|
439
|
-
|
|
437
|
+
})(ye);
|
|
438
|
+
function K(e) {
|
|
439
|
+
Fe(e);
|
|
440
440
|
}
|
|
441
|
-
function
|
|
441
|
+
function pt(e) {
|
|
442
442
|
throw e;
|
|
443
443
|
}
|
|
444
|
-
var
|
|
444
|
+
var vt = {
|
|
445
445
|
closed: !0,
|
|
446
|
-
next:
|
|
447
|
-
error:
|
|
448
|
-
complete:
|
|
449
|
-
},
|
|
446
|
+
next: Oe,
|
|
447
|
+
error: pt,
|
|
448
|
+
complete: Oe
|
|
449
|
+
}, be = (function() {
|
|
450
450
|
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
|
451
451
|
})();
|
|
452
|
-
function
|
|
452
|
+
function we(e) {
|
|
453
453
|
return e;
|
|
454
454
|
}
|
|
455
|
-
function
|
|
456
|
-
return e.length === 0 ?
|
|
455
|
+
function mt(e) {
|
|
456
|
+
return e.length === 0 ? we : e.length === 1 ? e[0] : function(r) {
|
|
457
457
|
return e.reduce(function(n, i) {
|
|
458
458
|
return i(n);
|
|
459
459
|
}, r);
|
|
460
460
|
};
|
|
461
461
|
}
|
|
462
|
-
var
|
|
462
|
+
var x = (function() {
|
|
463
463
|
function e(t) {
|
|
464
464
|
t && (this._subscribe = t);
|
|
465
465
|
}
|
|
@@ -467,8 +467,8 @@ var E = (function() {
|
|
|
467
467
|
var r = new e();
|
|
468
468
|
return r.source = this, r.operator = t, r;
|
|
469
469
|
}, e.prototype.subscribe = function(t, r, n) {
|
|
470
|
-
var i = this, o =
|
|
471
|
-
return
|
|
470
|
+
var i = this, o = bt(t) ? t : new B(t, r, n);
|
|
471
|
+
return Z(function() {
|
|
472
472
|
var a = i, u = a.operator, s = a.source;
|
|
473
473
|
o.add(u ? u.call(o, s) : s ? i._subscribe(o) : i._trySubscribe(o));
|
|
474
474
|
}), o;
|
|
@@ -480,8 +480,8 @@ var E = (function() {
|
|
|
480
480
|
}
|
|
481
481
|
}, e.prototype.forEach = function(t, r) {
|
|
482
482
|
var n = this;
|
|
483
|
-
return r =
|
|
484
|
-
var a = new
|
|
483
|
+
return r = xe(r), new r(function(i, o) {
|
|
484
|
+
var a = new B({
|
|
485
485
|
next: function(u) {
|
|
486
486
|
try {
|
|
487
487
|
t(u);
|
|
@@ -497,15 +497,15 @@ var E = (function() {
|
|
|
497
497
|
}, e.prototype._subscribe = function(t) {
|
|
498
498
|
var r;
|
|
499
499
|
return (r = this.source) === null || r === void 0 ? void 0 : r.subscribe(t);
|
|
500
|
-
}, e.prototype[
|
|
500
|
+
}, e.prototype[be] = function() {
|
|
501
501
|
return this;
|
|
502
502
|
}, e.prototype.pipe = function() {
|
|
503
503
|
for (var t = [], r = 0; r < arguments.length; r++)
|
|
504
504
|
t[r] = arguments[r];
|
|
505
|
-
return
|
|
505
|
+
return mt(t)(this);
|
|
506
506
|
}, e.prototype.toPromise = function(t) {
|
|
507
507
|
var r = this;
|
|
508
|
-
return t =
|
|
508
|
+
return t = xe(t), new t(function(n, i) {
|
|
509
509
|
var o;
|
|
510
510
|
r.subscribe(function(a) {
|
|
511
511
|
return o = a;
|
|
@@ -519,22 +519,22 @@ var E = (function() {
|
|
|
519
519
|
return new e(t);
|
|
520
520
|
}, e;
|
|
521
521
|
})();
|
|
522
|
-
function
|
|
522
|
+
function xe(e) {
|
|
523
523
|
var t;
|
|
524
|
-
return (t = e ??
|
|
524
|
+
return (t = e ?? ft.Promise) !== null && t !== void 0 ? t : Promise;
|
|
525
525
|
}
|
|
526
|
-
function
|
|
527
|
-
return e &&
|
|
526
|
+
function yt(e) {
|
|
527
|
+
return e && b(e.next) && b(e.error) && b(e.complete);
|
|
528
528
|
}
|
|
529
|
-
function
|
|
530
|
-
return e && e instanceof
|
|
529
|
+
function bt(e) {
|
|
530
|
+
return e && e instanceof ye || yt(e) && Ne(e);
|
|
531
531
|
}
|
|
532
|
-
function
|
|
533
|
-
return
|
|
532
|
+
function wt(e) {
|
|
533
|
+
return b(e == null ? void 0 : e.lift);
|
|
534
534
|
}
|
|
535
|
-
function
|
|
535
|
+
function j(e) {
|
|
536
536
|
return function(t) {
|
|
537
|
-
if (
|
|
537
|
+
if (wt(t))
|
|
538
538
|
return t.lift(function(r) {
|
|
539
539
|
try {
|
|
540
540
|
return e(r, this);
|
|
@@ -545,11 +545,11 @@ function T(e) {
|
|
|
545
545
|
throw new TypeError("Unable to lift unknown Observable type");
|
|
546
546
|
};
|
|
547
547
|
}
|
|
548
|
-
function
|
|
549
|
-
return new
|
|
548
|
+
function C(e, t, r, n, i) {
|
|
549
|
+
return new gt(e, t, r, n, i);
|
|
550
550
|
}
|
|
551
|
-
var
|
|
552
|
-
|
|
551
|
+
var gt = (function(e) {
|
|
552
|
+
G(t, e);
|
|
553
553
|
function t(r, n, i, o, a, u) {
|
|
554
554
|
var s = e.call(this, r) || this;
|
|
555
555
|
return s.onFinalize = a, s.shouldUnsubscribe = u, s._next = n ? function(c) {
|
|
@@ -583,30 +583,30 @@ var mt = (function(e) {
|
|
|
583
583
|
e.prototype.unsubscribe.call(this), !n && ((r = this.onFinalize) === null || r === void 0 || r.call(this));
|
|
584
584
|
}
|
|
585
585
|
}, t;
|
|
586
|
-
})(
|
|
586
|
+
})(ye), St = me(function(e) {
|
|
587
587
|
return function() {
|
|
588
588
|
e(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
|
|
589
589
|
};
|
|
590
|
-
}),
|
|
591
|
-
|
|
590
|
+
}), re = (function(e) {
|
|
591
|
+
G(t, e);
|
|
592
592
|
function t() {
|
|
593
593
|
var r = e.call(this) || this;
|
|
594
594
|
return r.closed = !1, r.currentObservers = null, r.observers = [], r.isStopped = !1, r.hasError = !1, r.thrownError = null, r;
|
|
595
595
|
}
|
|
596
596
|
return t.prototype.lift = function(r) {
|
|
597
|
-
var n = new
|
|
597
|
+
var n = new Ae(this, this);
|
|
598
598
|
return n.operator = r, n;
|
|
599
599
|
}, t.prototype._throwIfClosed = function() {
|
|
600
600
|
if (this.closed)
|
|
601
|
-
throw new
|
|
601
|
+
throw new St();
|
|
602
602
|
}, t.prototype.next = function(r) {
|
|
603
603
|
var n = this;
|
|
604
|
-
|
|
604
|
+
Z(function() {
|
|
605
605
|
var i, o;
|
|
606
606
|
if (n._throwIfClosed(), !n.isStopped) {
|
|
607
607
|
n.currentObservers || (n.currentObservers = Array.from(n.observers));
|
|
608
608
|
try {
|
|
609
|
-
for (var a =
|
|
609
|
+
for (var a = q(n.currentObservers), u = a.next(); !u.done; u = a.next()) {
|
|
610
610
|
var s = u.value;
|
|
611
611
|
s.next(r);
|
|
612
612
|
}
|
|
@@ -623,7 +623,7 @@ var mt = (function(e) {
|
|
|
623
623
|
});
|
|
624
624
|
}, t.prototype.error = function(r) {
|
|
625
625
|
var n = this;
|
|
626
|
-
|
|
626
|
+
Z(function() {
|
|
627
627
|
if (n._throwIfClosed(), !n.isStopped) {
|
|
628
628
|
n.hasError = n.isStopped = !0, n.thrownError = r;
|
|
629
629
|
for (var i = n.observers; i.length; )
|
|
@@ -632,7 +632,7 @@ var mt = (function(e) {
|
|
|
632
632
|
});
|
|
633
633
|
}, t.prototype.complete = function() {
|
|
634
634
|
var r = this;
|
|
635
|
-
|
|
635
|
+
Z(function() {
|
|
636
636
|
if (r._throwIfClosed(), !r.isStopped) {
|
|
637
637
|
r.isStopped = !0;
|
|
638
638
|
for (var n = r.observers; n.length; )
|
|
@@ -654,20 +654,20 @@ var mt = (function(e) {
|
|
|
654
654
|
return this._throwIfClosed(), this._checkFinalizedStatuses(r), this._innerSubscribe(r);
|
|
655
655
|
}, t.prototype._innerSubscribe = function(r) {
|
|
656
656
|
var n = this, i = this, o = i.hasError, a = i.isStopped, u = i.observers;
|
|
657
|
-
return o || a ?
|
|
658
|
-
n.currentObservers = null,
|
|
657
|
+
return o || a ? Le : (this.currentObservers = null, u.push(r), new te(function() {
|
|
658
|
+
n.currentObservers = null, de(u, r);
|
|
659
659
|
}));
|
|
660
660
|
}, t.prototype._checkFinalizedStatuses = function(r) {
|
|
661
661
|
var n = this, i = n.hasError, o = n.thrownError, a = n.isStopped;
|
|
662
662
|
i ? r.error(o) : a && r.complete();
|
|
663
663
|
}, t.prototype.asObservable = function() {
|
|
664
|
-
var r = new
|
|
664
|
+
var r = new x();
|
|
665
665
|
return r.source = this, r;
|
|
666
666
|
}, t.create = function(r, n) {
|
|
667
|
-
return new
|
|
667
|
+
return new Ae(r, n);
|
|
668
668
|
}, t;
|
|
669
|
-
})(
|
|
670
|
-
|
|
669
|
+
})(x), Ae = (function(e) {
|
|
670
|
+
G(t, e);
|
|
671
671
|
function t(r, n) {
|
|
672
672
|
var i = e.call(this) || this;
|
|
673
673
|
return i.destination = r, i.source = n, i;
|
|
@@ -683,17 +683,17 @@ var mt = (function(e) {
|
|
|
683
683
|
(n = (r = this.destination) === null || r === void 0 ? void 0 : r.complete) === null || n === void 0 || n.call(r);
|
|
684
684
|
}, t.prototype._subscribe = function(r) {
|
|
685
685
|
var n, i;
|
|
686
|
-
return (i = (n = this.source) === null || n === void 0 ? void 0 : n.subscribe(r)) !== null && i !== void 0 ? i :
|
|
686
|
+
return (i = (n = this.source) === null || n === void 0 ? void 0 : n.subscribe(r)) !== null && i !== void 0 ? i : Le;
|
|
687
687
|
}, t;
|
|
688
|
-
})(
|
|
688
|
+
})(re), Ue = {
|
|
689
689
|
now: function() {
|
|
690
|
-
return (
|
|
690
|
+
return (Ue.delegate || Date).now();
|
|
691
691
|
},
|
|
692
692
|
delegate: void 0
|
|
693
|
-
},
|
|
694
|
-
|
|
693
|
+
}, _t = (function(e) {
|
|
694
|
+
G(t, e);
|
|
695
695
|
function t(r, n, i) {
|
|
696
|
-
r === void 0 && (r = 1 / 0), n === void 0 && (n = 1 / 0), i === void 0 && (i =
|
|
696
|
+
r === void 0 && (r = 1 / 0), n === void 0 && (n = 1 / 0), i === void 0 && (i = Ue);
|
|
697
697
|
var o = e.call(this) || this;
|
|
698
698
|
return o._bufferSize = r, o._windowTime = n, o._timestampProvider = i, o._buffer = [], o._infiniteTimeWindow = !0, o._infiniteTimeWindow = n === 1 / 0, o._bufferSize = Math.max(1, r), o._windowTime = Math.max(1, n), o;
|
|
699
699
|
}
|
|
@@ -713,45 +713,45 @@ var mt = (function(e) {
|
|
|
713
713
|
c && o.splice(0, c + 1);
|
|
714
714
|
}
|
|
715
715
|
}, t;
|
|
716
|
-
})(
|
|
716
|
+
})(re), ge = (function(e) {
|
|
717
717
|
return e && typeof e.length == "number" && typeof e != "function";
|
|
718
718
|
});
|
|
719
|
-
function
|
|
720
|
-
return
|
|
719
|
+
function ke(e) {
|
|
720
|
+
return b(e == null ? void 0 : e.then);
|
|
721
721
|
}
|
|
722
|
-
function
|
|
723
|
-
return
|
|
722
|
+
function $e(e) {
|
|
723
|
+
return b(e[be]);
|
|
724
724
|
}
|
|
725
|
-
function
|
|
726
|
-
return Symbol.asyncIterator &&
|
|
725
|
+
function Me(e) {
|
|
726
|
+
return Symbol.asyncIterator && b(e == null ? void 0 : e[Symbol.asyncIterator]);
|
|
727
727
|
}
|
|
728
|
-
function
|
|
728
|
+
function De(e) {
|
|
729
729
|
return new TypeError("You provided " + (e !== null && typeof e == "object" ? "an invalid object" : "'" + e + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.");
|
|
730
730
|
}
|
|
731
|
-
function
|
|
731
|
+
function Et() {
|
|
732
732
|
return typeof Symbol != "function" || !Symbol.iterator ? "@@iterator" : Symbol.iterator;
|
|
733
733
|
}
|
|
734
|
-
var
|
|
735
|
-
function
|
|
736
|
-
return
|
|
734
|
+
var We = Et();
|
|
735
|
+
function qe(e) {
|
|
736
|
+
return b(e == null ? void 0 : e[We]);
|
|
737
737
|
}
|
|
738
|
-
function
|
|
739
|
-
return
|
|
738
|
+
function ze(e) {
|
|
739
|
+
return ct(this, arguments, function() {
|
|
740
740
|
var r, n, i, o;
|
|
741
|
-
return
|
|
741
|
+
return je(this, function(a) {
|
|
742
742
|
switch (a.label) {
|
|
743
743
|
case 0:
|
|
744
744
|
r = e.getReader(), a.label = 1;
|
|
745
745
|
case 1:
|
|
746
746
|
a.trys.push([1, , 9, 10]), a.label = 2;
|
|
747
747
|
case 2:
|
|
748
|
-
return [4,
|
|
748
|
+
return [4, W(r.read())];
|
|
749
749
|
case 3:
|
|
750
|
-
return n = a.sent(), i = n.value, o = n.done, o ? [4,
|
|
750
|
+
return n = a.sent(), i = n.value, o = n.done, o ? [4, W(void 0)] : [3, 5];
|
|
751
751
|
case 4:
|
|
752
752
|
return [2, a.sent()];
|
|
753
753
|
case 5:
|
|
754
|
-
return [4,
|
|
754
|
+
return [4, W(i)];
|
|
755
755
|
case 6:
|
|
756
756
|
return [4, a.sent()];
|
|
757
757
|
case 7:
|
|
@@ -766,57 +766,57 @@ function De(e) {
|
|
|
766
766
|
});
|
|
767
767
|
});
|
|
768
768
|
}
|
|
769
|
-
function
|
|
770
|
-
return
|
|
769
|
+
function Be(e) {
|
|
770
|
+
return b(e == null ? void 0 : e.getReader);
|
|
771
771
|
}
|
|
772
|
-
function
|
|
773
|
-
if (e instanceof
|
|
772
|
+
function L(e) {
|
|
773
|
+
if (e instanceof x)
|
|
774
774
|
return e;
|
|
775
775
|
if (e != null) {
|
|
776
|
-
if (
|
|
777
|
-
return gt(e);
|
|
778
|
-
if (ye(e))
|
|
779
|
-
return St(e);
|
|
780
|
-
if (Ne(e))
|
|
781
|
-
return _t(e);
|
|
782
|
-
if (Ue(e))
|
|
783
|
-
return qe(e);
|
|
784
|
-
if (Me(e))
|
|
785
|
-
return Et(e);
|
|
786
|
-
if (We(e))
|
|
776
|
+
if ($e(e))
|
|
787
777
|
return Ot(e);
|
|
778
|
+
if (ge(e))
|
|
779
|
+
return xt(e);
|
|
780
|
+
if (ke(e))
|
|
781
|
+
return At(e);
|
|
782
|
+
if (Me(e))
|
|
783
|
+
return Ge(e);
|
|
784
|
+
if (qe(e))
|
|
785
|
+
return Tt(e);
|
|
786
|
+
if (Be(e))
|
|
787
|
+
return It(e);
|
|
788
788
|
}
|
|
789
|
-
throw
|
|
789
|
+
throw De(e);
|
|
790
790
|
}
|
|
791
|
-
function
|
|
792
|
-
return new
|
|
793
|
-
var r = e[
|
|
794
|
-
if (
|
|
791
|
+
function Ot(e) {
|
|
792
|
+
return new x(function(t) {
|
|
793
|
+
var r = e[be]();
|
|
794
|
+
if (b(r.subscribe))
|
|
795
795
|
return r.subscribe(t);
|
|
796
796
|
throw new TypeError("Provided object does not correctly implement Symbol.observable");
|
|
797
797
|
});
|
|
798
798
|
}
|
|
799
|
-
function
|
|
800
|
-
return new
|
|
799
|
+
function xt(e) {
|
|
800
|
+
return new x(function(t) {
|
|
801
801
|
for (var r = 0; r < e.length && !t.closed; r++)
|
|
802
802
|
t.next(e[r]);
|
|
803
803
|
t.complete();
|
|
804
804
|
});
|
|
805
805
|
}
|
|
806
|
-
function
|
|
807
|
-
return new
|
|
806
|
+
function At(e) {
|
|
807
|
+
return new x(function(t) {
|
|
808
808
|
e.then(function(r) {
|
|
809
809
|
t.closed || (t.next(r), t.complete());
|
|
810
810
|
}, function(r) {
|
|
811
811
|
return t.error(r);
|
|
812
|
-
}).then(null,
|
|
812
|
+
}).then(null, Fe);
|
|
813
813
|
});
|
|
814
814
|
}
|
|
815
|
-
function
|
|
816
|
-
return new
|
|
815
|
+
function Tt(e) {
|
|
816
|
+
return new x(function(t) {
|
|
817
817
|
var r, n;
|
|
818
818
|
try {
|
|
819
|
-
for (var i =
|
|
819
|
+
for (var i = q(e), o = i.next(); !o.done; o = i.next()) {
|
|
820
820
|
var a = o.value;
|
|
821
821
|
if (t.next(a), t.closed)
|
|
822
822
|
return;
|
|
@@ -833,24 +833,24 @@ function Et(e) {
|
|
|
833
833
|
t.complete();
|
|
834
834
|
});
|
|
835
835
|
}
|
|
836
|
-
function
|
|
837
|
-
return new
|
|
838
|
-
|
|
836
|
+
function Ge(e) {
|
|
837
|
+
return new x(function(t) {
|
|
838
|
+
Pt(e, t).catch(function(r) {
|
|
839
839
|
return t.error(r);
|
|
840
840
|
});
|
|
841
841
|
});
|
|
842
842
|
}
|
|
843
|
-
function
|
|
844
|
-
return
|
|
843
|
+
function It(e) {
|
|
844
|
+
return Ge(ze(e));
|
|
845
845
|
}
|
|
846
|
-
function
|
|
846
|
+
function Pt(e, t) {
|
|
847
847
|
var r, n, i, o;
|
|
848
|
-
return
|
|
848
|
+
return ut(this, void 0, void 0, function() {
|
|
849
849
|
var a, u;
|
|
850
|
-
return
|
|
850
|
+
return je(this, function(s) {
|
|
851
851
|
switch (s.label) {
|
|
852
852
|
case 0:
|
|
853
|
-
s.trys.push([0, 5, 6, 11]), r =
|
|
853
|
+
s.trys.push([0, 5, 6, 11]), r = lt(e), s.label = 1;
|
|
854
854
|
case 1:
|
|
855
855
|
return [4, r.next()];
|
|
856
856
|
case 2:
|
|
@@ -881,7 +881,7 @@ function xt(e, t) {
|
|
|
881
881
|
});
|
|
882
882
|
});
|
|
883
883
|
}
|
|
884
|
-
function
|
|
884
|
+
function $(e, t, r, n, i) {
|
|
885
885
|
n === void 0 && (n = 0), i === void 0 && (i = !1);
|
|
886
886
|
var o = t.schedule(function() {
|
|
887
887
|
r(), i ? e.add(this.schedule(null, n)) : this.unsubscribe();
|
|
@@ -889,49 +889,49 @@ function j(e, t, r, n, i) {
|
|
|
889
889
|
if (e.add(o), !i)
|
|
890
890
|
return o;
|
|
891
891
|
}
|
|
892
|
-
function
|
|
893
|
-
return t === void 0 && (t = 0),
|
|
894
|
-
r.subscribe(
|
|
895
|
-
return
|
|
892
|
+
function Ve(e, t) {
|
|
893
|
+
return t === void 0 && (t = 0), j(function(r, n) {
|
|
894
|
+
r.subscribe(C(n, function(i) {
|
|
895
|
+
return $(n, e, function() {
|
|
896
896
|
return n.next(i);
|
|
897
897
|
}, t);
|
|
898
898
|
}, function() {
|
|
899
|
-
return
|
|
899
|
+
return $(n, e, function() {
|
|
900
900
|
return n.complete();
|
|
901
901
|
}, t);
|
|
902
902
|
}, function(i) {
|
|
903
|
-
return
|
|
903
|
+
return $(n, e, function() {
|
|
904
904
|
return n.error(i);
|
|
905
905
|
}, t);
|
|
906
906
|
}));
|
|
907
907
|
});
|
|
908
908
|
}
|
|
909
|
-
function
|
|
910
|
-
return t === void 0 && (t = 0),
|
|
909
|
+
function He(e, t) {
|
|
910
|
+
return t === void 0 && (t = 0), j(function(r, n) {
|
|
911
911
|
n.add(e.schedule(function() {
|
|
912
912
|
return r.subscribe(n);
|
|
913
913
|
}, t));
|
|
914
914
|
});
|
|
915
915
|
}
|
|
916
|
-
function
|
|
917
|
-
return
|
|
916
|
+
function Rt(e, t) {
|
|
917
|
+
return L(e).pipe(He(t), Ve(t));
|
|
918
918
|
}
|
|
919
|
-
function
|
|
920
|
-
return
|
|
919
|
+
function Ct(e, t) {
|
|
920
|
+
return L(e).pipe(He(t), Ve(t));
|
|
921
921
|
}
|
|
922
|
-
function
|
|
923
|
-
return new
|
|
922
|
+
function jt(e, t) {
|
|
923
|
+
return new x(function(r) {
|
|
924
924
|
var n = 0;
|
|
925
925
|
return t.schedule(function() {
|
|
926
926
|
n === e.length ? r.complete() : (r.next(e[n++]), r.closed || this.schedule());
|
|
927
927
|
});
|
|
928
928
|
});
|
|
929
929
|
}
|
|
930
|
-
function
|
|
931
|
-
return new
|
|
930
|
+
function Lt(e, t) {
|
|
931
|
+
return new x(function(r) {
|
|
932
932
|
var n;
|
|
933
|
-
return
|
|
934
|
-
n = e[
|
|
933
|
+
return $(r, t, function() {
|
|
934
|
+
n = e[We](), $(r, t, function() {
|
|
935
935
|
var i, o, a;
|
|
936
936
|
try {
|
|
937
937
|
i = n.next(), o = i.value, a = i.done;
|
|
@@ -942,17 +942,17 @@ function Pt(e, t) {
|
|
|
942
942
|
a ? r.complete() : r.next(o);
|
|
943
943
|
}, 0, !0);
|
|
944
944
|
}), function() {
|
|
945
|
-
return
|
|
945
|
+
return b(n == null ? void 0 : n.return) && n.return();
|
|
946
946
|
};
|
|
947
947
|
});
|
|
948
948
|
}
|
|
949
|
-
function
|
|
949
|
+
function Ye(e, t) {
|
|
950
950
|
if (!e)
|
|
951
951
|
throw new Error("Iterable cannot be null");
|
|
952
|
-
return new
|
|
953
|
-
|
|
952
|
+
return new x(function(r) {
|
|
953
|
+
$(r, t, function() {
|
|
954
954
|
var n = e[Symbol.asyncIterator]();
|
|
955
|
-
|
|
955
|
+
$(r, t, function() {
|
|
956
956
|
n.next().then(function(i) {
|
|
957
957
|
i.done ? r.complete() : r.next(i.value);
|
|
958
958
|
});
|
|
@@ -960,122 +960,122 @@ function ze(e, t) {
|
|
|
960
960
|
});
|
|
961
961
|
});
|
|
962
962
|
}
|
|
963
|
-
function
|
|
964
|
-
return ze(
|
|
963
|
+
function Nt(e, t) {
|
|
964
|
+
return Ye(ze(e), t);
|
|
965
965
|
}
|
|
966
|
-
function
|
|
966
|
+
function Ft(e, t) {
|
|
967
967
|
if (e != null) {
|
|
968
|
-
if (
|
|
969
|
-
return At(e, t);
|
|
970
|
-
if (ye(e))
|
|
971
|
-
return It(e, t);
|
|
972
|
-
if (Ne(e))
|
|
973
|
-
return Tt(e, t);
|
|
974
|
-
if (Ue(e))
|
|
975
|
-
return ze(e, t);
|
|
976
|
-
if (Me(e))
|
|
977
|
-
return Pt(e, t);
|
|
978
|
-
if (We(e))
|
|
968
|
+
if ($e(e))
|
|
979
969
|
return Rt(e, t);
|
|
970
|
+
if (ge(e))
|
|
971
|
+
return jt(e, t);
|
|
972
|
+
if (ke(e))
|
|
973
|
+
return Ct(e, t);
|
|
974
|
+
if (Me(e))
|
|
975
|
+
return Ye(e, t);
|
|
976
|
+
if (qe(e))
|
|
977
|
+
return Lt(e, t);
|
|
978
|
+
if (Be(e))
|
|
979
|
+
return Nt(e, t);
|
|
980
980
|
}
|
|
981
|
-
throw
|
|
981
|
+
throw De(e);
|
|
982
982
|
}
|
|
983
|
-
function
|
|
984
|
-
return t ?
|
|
983
|
+
function Je(e, t) {
|
|
984
|
+
return t ? Ft(e, t) : L(e);
|
|
985
985
|
}
|
|
986
|
-
var
|
|
986
|
+
var Ut = me(function(e) {
|
|
987
987
|
return function() {
|
|
988
988
|
e(this), this.name = "EmptyError", this.message = "no elements in sequence";
|
|
989
989
|
};
|
|
990
990
|
});
|
|
991
|
-
function
|
|
991
|
+
function kt(e, t) {
|
|
992
992
|
return new Promise(function(r, n) {
|
|
993
|
-
var i = new
|
|
993
|
+
var i = new B({
|
|
994
994
|
next: function(o) {
|
|
995
995
|
r(o), i.unsubscribe();
|
|
996
996
|
},
|
|
997
997
|
error: n,
|
|
998
998
|
complete: function() {
|
|
999
|
-
n(new
|
|
999
|
+
n(new Ut());
|
|
1000
1000
|
}
|
|
1001
1001
|
});
|
|
1002
1002
|
e.subscribe(i);
|
|
1003
1003
|
});
|
|
1004
1004
|
}
|
|
1005
|
-
function
|
|
1006
|
-
return
|
|
1005
|
+
function Se(e, t) {
|
|
1006
|
+
return j(function(r, n) {
|
|
1007
1007
|
var i = 0;
|
|
1008
|
-
r.subscribe(
|
|
1008
|
+
r.subscribe(C(n, function(o) {
|
|
1009
1009
|
n.next(e.call(t, o, i++));
|
|
1010
1010
|
}));
|
|
1011
1011
|
});
|
|
1012
1012
|
}
|
|
1013
|
-
var
|
|
1014
|
-
function
|
|
1015
|
-
return
|
|
1013
|
+
var $t = Array.isArray;
|
|
1014
|
+
function Mt(e, t) {
|
|
1015
|
+
return $t(t) ? e.apply(void 0, Y([], z(t))) : e(t);
|
|
1016
1016
|
}
|
|
1017
|
-
function
|
|
1018
|
-
return
|
|
1019
|
-
return
|
|
1017
|
+
function Dt(e) {
|
|
1018
|
+
return Se(function(t) {
|
|
1019
|
+
return Mt(e, t);
|
|
1020
1020
|
});
|
|
1021
1021
|
}
|
|
1022
|
-
function
|
|
1023
|
-
var s = [], c = 0, l = 0,
|
|
1024
|
-
|
|
1025
|
-
}, d = function(
|
|
1026
|
-
return c < n ?
|
|
1027
|
-
},
|
|
1022
|
+
function Wt(e, t, r, n, i, o, a, u) {
|
|
1023
|
+
var s = [], c = 0, l = 0, p = !1, h = function() {
|
|
1024
|
+
p && !s.length && !c && t.complete();
|
|
1025
|
+
}, d = function(f) {
|
|
1026
|
+
return c < n ? v(f) : s.push(f);
|
|
1027
|
+
}, v = function(f) {
|
|
1028
1028
|
c++;
|
|
1029
1029
|
var S = !1;
|
|
1030
|
-
|
|
1031
|
-
t.next(
|
|
1030
|
+
L(r(f, l++)).subscribe(C(t, function(w) {
|
|
1031
|
+
t.next(w);
|
|
1032
1032
|
}, function() {
|
|
1033
1033
|
S = !0;
|
|
1034
1034
|
}, void 0, function() {
|
|
1035
1035
|
if (S)
|
|
1036
1036
|
try {
|
|
1037
1037
|
c--;
|
|
1038
|
-
for (var
|
|
1039
|
-
var
|
|
1040
|
-
a ||
|
|
1038
|
+
for (var w = function() {
|
|
1039
|
+
var g = s.shift();
|
|
1040
|
+
a || v(g);
|
|
1041
1041
|
}; s.length && c < n; )
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
} catch (
|
|
1045
|
-
t.error(
|
|
1042
|
+
w();
|
|
1043
|
+
h();
|
|
1044
|
+
} catch (g) {
|
|
1045
|
+
t.error(g);
|
|
1046
1046
|
}
|
|
1047
1047
|
}));
|
|
1048
1048
|
};
|
|
1049
|
-
return e.subscribe(
|
|
1050
|
-
|
|
1049
|
+
return e.subscribe(C(t, d, function() {
|
|
1050
|
+
p = !0, h();
|
|
1051
1051
|
})), function() {
|
|
1052
1052
|
};
|
|
1053
1053
|
}
|
|
1054
|
-
function
|
|
1055
|
-
return r === void 0 && (r = 1 / 0),
|
|
1056
|
-
return
|
|
1054
|
+
function Ke(e, t, r) {
|
|
1055
|
+
return r === void 0 && (r = 1 / 0), b(t) ? Ke(function(n, i) {
|
|
1056
|
+
return Se(function(o, a) {
|
|
1057
1057
|
return t(n, o, i, a);
|
|
1058
|
-
})(
|
|
1059
|
-
}, r) : (typeof t == "number" && (r = t),
|
|
1060
|
-
return
|
|
1058
|
+
})(L(e(n, i)));
|
|
1059
|
+
}, r) : (typeof t == "number" && (r = t), j(function(n, i) {
|
|
1060
|
+
return Wt(n, i, e, r);
|
|
1061
1061
|
}));
|
|
1062
1062
|
}
|
|
1063
|
-
var
|
|
1064
|
-
function
|
|
1065
|
-
if (
|
|
1066
|
-
return
|
|
1067
|
-
var i =
|
|
1063
|
+
var qt = ["addListener", "removeListener"], zt = ["addEventListener", "removeEventListener"], Bt = ["on", "off"];
|
|
1064
|
+
function he(e, t, r, n) {
|
|
1065
|
+
if (b(r) && (n = r, r = void 0), n)
|
|
1066
|
+
return he(e, t, r).pipe(Dt(n));
|
|
1067
|
+
var i = z(Ht(e) ? zt.map(function(u) {
|
|
1068
1068
|
return function(s) {
|
|
1069
1069
|
return e[u](t, s, r);
|
|
1070
1070
|
};
|
|
1071
|
-
}) :
|
|
1072
|
-
if (!o &&
|
|
1073
|
-
return
|
|
1074
|
-
return
|
|
1075
|
-
})(
|
|
1071
|
+
}) : Gt(e) ? qt.map(Te(e, t)) : Vt(e) ? Bt.map(Te(e, t)) : [], 2), o = i[0], a = i[1];
|
|
1072
|
+
if (!o && ge(e))
|
|
1073
|
+
return Ke(function(u) {
|
|
1074
|
+
return he(u, t, r);
|
|
1075
|
+
})(L(e));
|
|
1076
1076
|
if (!o)
|
|
1077
1077
|
throw new TypeError("Invalid event target");
|
|
1078
|
-
return new
|
|
1078
|
+
return new x(function(u) {
|
|
1079
1079
|
var s = function() {
|
|
1080
1080
|
for (var c = [], l = 0; l < arguments.length; l++)
|
|
1081
1081
|
c[l] = arguments[l];
|
|
@@ -1086,76 +1086,76 @@ function le(e, t, r, n) {
|
|
|
1086
1086
|
};
|
|
1087
1087
|
});
|
|
1088
1088
|
}
|
|
1089
|
-
function
|
|
1089
|
+
function Te(e, t) {
|
|
1090
1090
|
return function(r) {
|
|
1091
1091
|
return function(n) {
|
|
1092
1092
|
return e[r](t, n);
|
|
1093
1093
|
};
|
|
1094
1094
|
};
|
|
1095
1095
|
}
|
|
1096
|
-
function
|
|
1097
|
-
return
|
|
1096
|
+
function Gt(e) {
|
|
1097
|
+
return b(e.addListener) && b(e.removeListener);
|
|
1098
1098
|
}
|
|
1099
|
-
function
|
|
1100
|
-
return
|
|
1099
|
+
function Vt(e) {
|
|
1100
|
+
return b(e.on) && b(e.off);
|
|
1101
1101
|
}
|
|
1102
|
-
function
|
|
1103
|
-
return
|
|
1102
|
+
function Ht(e) {
|
|
1103
|
+
return b(e.addEventListener) && b(e.removeEventListener);
|
|
1104
1104
|
}
|
|
1105
|
-
function
|
|
1106
|
-
return
|
|
1105
|
+
function ae(e, t) {
|
|
1106
|
+
return j(function(r, n) {
|
|
1107
1107
|
var i = 0;
|
|
1108
|
-
r.subscribe(
|
|
1108
|
+
r.subscribe(C(n, function(o) {
|
|
1109
1109
|
return e.call(t, o, i++) && n.next(o);
|
|
1110
1110
|
}));
|
|
1111
1111
|
});
|
|
1112
1112
|
}
|
|
1113
|
-
function
|
|
1114
|
-
return t === void 0 && (t =
|
|
1113
|
+
function Yt(e, t) {
|
|
1114
|
+
return t === void 0 && (t = we), e = e ?? Jt, j(function(r, n) {
|
|
1115
1115
|
var i, o = !0;
|
|
1116
|
-
r.subscribe(
|
|
1116
|
+
r.subscribe(C(n, function(a) {
|
|
1117
1117
|
var u = t(a);
|
|
1118
1118
|
(o || !e(i, u)) && (o = !1, i = u, n.next(a));
|
|
1119
1119
|
}));
|
|
1120
1120
|
});
|
|
1121
1121
|
}
|
|
1122
|
-
function
|
|
1122
|
+
function Jt(e, t) {
|
|
1123
1123
|
return e === t;
|
|
1124
1124
|
}
|
|
1125
|
-
function
|
|
1125
|
+
function Kt(e) {
|
|
1126
1126
|
e === void 0 && (e = {});
|
|
1127
1127
|
var t = e.connector, r = t === void 0 ? function() {
|
|
1128
|
-
return new
|
|
1128
|
+
return new re();
|
|
1129
1129
|
} : t, n = e.resetOnError, i = n === void 0 ? !0 : n, o = e.resetOnComplete, a = o === void 0 ? !0 : o, u = e.resetOnRefCountZero, s = u === void 0 ? !0 : u;
|
|
1130
1130
|
return function(c) {
|
|
1131
|
-
var l,
|
|
1132
|
-
|
|
1131
|
+
var l, p, h, d = 0, v = !1, f = !1, S = function() {
|
|
1132
|
+
p == null || p.unsubscribe(), p = void 0;
|
|
1133
|
+
}, w = function() {
|
|
1134
|
+
S(), l = h = void 0, v = f = !1;
|
|
1133
1135
|
}, g = function() {
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
var b = l;
|
|
1137
|
-
g(), b == null || b.unsubscribe();
|
|
1136
|
+
var _ = l;
|
|
1137
|
+
w(), _ == null || _.unsubscribe();
|
|
1138
1138
|
};
|
|
1139
|
-
return
|
|
1140
|
-
d++, !
|
|
1141
|
-
var
|
|
1142
|
-
|
|
1143
|
-
d--, d === 0 && !
|
|
1144
|
-
}),
|
|
1145
|
-
next: function(
|
|
1146
|
-
return
|
|
1139
|
+
return j(function(_, T) {
|
|
1140
|
+
d++, !f && !v && S();
|
|
1141
|
+
var I = h = h ?? r();
|
|
1142
|
+
T.add(function() {
|
|
1143
|
+
d--, d === 0 && !f && !v && (p = se(g, s));
|
|
1144
|
+
}), I.subscribe(T), !l && d > 0 && (l = new B({
|
|
1145
|
+
next: function(P) {
|
|
1146
|
+
return I.next(P);
|
|
1147
1147
|
},
|
|
1148
|
-
error: function(
|
|
1149
|
-
|
|
1148
|
+
error: function(P) {
|
|
1149
|
+
f = !0, S(), p = se(w, i, P), I.error(P);
|
|
1150
1150
|
},
|
|
1151
1151
|
complete: function() {
|
|
1152
|
-
|
|
1152
|
+
v = !0, S(), p = se(w, a), I.complete();
|
|
1153
1153
|
}
|
|
1154
|
-
}),
|
|
1154
|
+
}), L(_).subscribe(l));
|
|
1155
1155
|
})(c);
|
|
1156
1156
|
};
|
|
1157
1157
|
}
|
|
1158
|
-
function
|
|
1158
|
+
function se(e, t) {
|
|
1159
1159
|
for (var r = [], n = 2; n < arguments.length; n++)
|
|
1160
1160
|
r[n - 2] = arguments[n];
|
|
1161
1161
|
if (t === !0) {
|
|
@@ -1163,24 +1163,24 @@ function oe(e, t) {
|
|
|
1163
1163
|
return;
|
|
1164
1164
|
}
|
|
1165
1165
|
if (t !== !1) {
|
|
1166
|
-
var i = new
|
|
1166
|
+
var i = new B({
|
|
1167
1167
|
next: function() {
|
|
1168
1168
|
i.unsubscribe(), e();
|
|
1169
1169
|
}
|
|
1170
1170
|
});
|
|
1171
|
-
return
|
|
1171
|
+
return L(t.apply(void 0, Y([], z(r)))).subscribe(i);
|
|
1172
1172
|
}
|
|
1173
1173
|
}
|
|
1174
|
-
function
|
|
1175
|
-
return
|
|
1174
|
+
function Xe(e, t) {
|
|
1175
|
+
return j(function(r, n) {
|
|
1176
1176
|
var i = null, o = 0, a = !1, u = function() {
|
|
1177
1177
|
return a && !i && n.complete();
|
|
1178
1178
|
};
|
|
1179
|
-
r.subscribe(
|
|
1179
|
+
r.subscribe(C(n, function(s) {
|
|
1180
1180
|
i == null || i.unsubscribe();
|
|
1181
1181
|
var c = 0, l = o++;
|
|
1182
|
-
|
|
1183
|
-
return n.next(t ? t(s,
|
|
1182
|
+
L(e(s, l)).subscribe(i = C(n, function(p) {
|
|
1183
|
+
return n.next(t ? t(s, p, l, c++) : p);
|
|
1184
1184
|
}, function() {
|
|
1185
1185
|
i = null, u();
|
|
1186
1186
|
}));
|
|
@@ -1189,13 +1189,13 @@ function Ye(e, t) {
|
|
|
1189
1189
|
}));
|
|
1190
1190
|
});
|
|
1191
1191
|
}
|
|
1192
|
-
function
|
|
1193
|
-
var n =
|
|
1194
|
-
return n ?
|
|
1192
|
+
function Xt(e, t, r) {
|
|
1193
|
+
var n = b(e) || t || r ? { next: e, error: t, complete: r } : e;
|
|
1194
|
+
return n ? j(function(i, o) {
|
|
1195
1195
|
var a;
|
|
1196
1196
|
(a = n.subscribe) === null || a === void 0 || a.call(n);
|
|
1197
1197
|
var u = !0;
|
|
1198
|
-
i.subscribe(
|
|
1198
|
+
i.subscribe(C(o, function(s) {
|
|
1199
1199
|
var c;
|
|
1200
1200
|
(c = n.next) === null || c === void 0 || c.call(n, s), o.next(s);
|
|
1201
1201
|
}, function() {
|
|
@@ -1208,52 +1208,52 @@ function Vt(e, t, r) {
|
|
|
1208
1208
|
var s, c;
|
|
1209
1209
|
u && ((s = n.unsubscribe) === null || s === void 0 || s.call(n)), (c = n.finalize) === null || c === void 0 || c.call(n);
|
|
1210
1210
|
}));
|
|
1211
|
-
}) :
|
|
1211
|
+
}) : we;
|
|
1212
1212
|
}
|
|
1213
|
-
const
|
|
1214
|
-
async function
|
|
1215
|
-
|
|
1213
|
+
const V = Ce({});
|
|
1214
|
+
async function Zt() {
|
|
1215
|
+
V.update((e) => (Object.assign(e, window.__MANIFEST__), e));
|
|
1216
1216
|
}
|
|
1217
|
-
const
|
|
1218
|
-
function
|
|
1219
|
-
const t =
|
|
1220
|
-
return t ? (
|
|
1217
|
+
const N = /* @__PURE__ */ new Map(), Q = 5e3;
|
|
1218
|
+
function Qt(e) {
|
|
1219
|
+
const t = N.get(e);
|
|
1220
|
+
return t ? (N.delete(e), Date.now() - t.createdAt > Q ? (t.abortController.abort(), null) : t.response$) : null;
|
|
1221
1221
|
}
|
|
1222
|
-
function
|
|
1223
|
-
|
|
1222
|
+
function er(e, t) {
|
|
1223
|
+
he(document, "mouseover").pipe(Kt()).pipe(
|
|
1224
1224
|
// Extract <a> element from hover target
|
|
1225
|
-
|
|
1225
|
+
Se((i) => {
|
|
1226
1226
|
const o = i.target, a = (o == null ? void 0 : o.tagName) === "A" ? o : o == null ? void 0 : o.closest("A");
|
|
1227
1227
|
if (!a) return null;
|
|
1228
1228
|
const u = a.getAttribute("href");
|
|
1229
1229
|
return !u || !u.startsWith("/") && !u.startsWith(".") ? null : u;
|
|
1230
1230
|
}),
|
|
1231
1231
|
// Drop non-link hovers
|
|
1232
|
-
|
|
1232
|
+
ae((i) => i !== null),
|
|
1233
1233
|
// Drop if same URL as current page
|
|
1234
|
-
|
|
1234
|
+
ae((i) => i !== window.location.pathname),
|
|
1235
1235
|
// Deduplicate consecutive hovers to same URL
|
|
1236
|
-
|
|
1236
|
+
Yt(),
|
|
1237
1237
|
// Check that route requires server data
|
|
1238
|
-
|
|
1238
|
+
ae((i) => {
|
|
1239
1239
|
const o = i.split("?")[0], a = "get", u = e.find(
|
|
1240
|
-
(l) => l.method.toLowerCase() === a && t.find((
|
|
1240
|
+
(l) => l.method.toLowerCase() === a && t.find((p) => p.parser(o) && p.pattern === l.path)
|
|
1241
1241
|
);
|
|
1242
1242
|
if (!u) return !1;
|
|
1243
1243
|
const s = t.find((l) => l.parser(o) && l.pattern === u.path);
|
|
1244
|
-
return !!
|
|
1244
|
+
return !!R(V)[s == null ? void 0 : s.pattern];
|
|
1245
1245
|
}),
|
|
1246
1246
|
// switchMap cancels prior prefetch when hovering a new link
|
|
1247
|
-
|
|
1248
|
-
const o =
|
|
1249
|
-
if (o && Date.now() - o.createdAt <
|
|
1247
|
+
Xe((i) => {
|
|
1248
|
+
const o = N.get(i);
|
|
1249
|
+
if (o && Date.now() - o.createdAt < Q)
|
|
1250
1250
|
return [];
|
|
1251
|
-
const a = new AbortController(), u = new
|
|
1251
|
+
const a = new AbortController(), u = new _t(1), s = {
|
|
1252
1252
|
response$: u,
|
|
1253
1253
|
createdAt: Date.now(),
|
|
1254
1254
|
abortController: a
|
|
1255
1255
|
};
|
|
1256
|
-
|
|
1256
|
+
N.set(i, s);
|
|
1257
1257
|
const c = {
|
|
1258
1258
|
method: "GET",
|
|
1259
1259
|
headers: {
|
|
@@ -1262,27 +1262,27 @@ function Kt(e, t) {
|
|
|
1262
1262
|
},
|
|
1263
1263
|
signal: a.signal
|
|
1264
1264
|
};
|
|
1265
|
-
return c[
|
|
1265
|
+
return c[ne] = !0, Je(
|
|
1266
1266
|
fetch(i, c).then(
|
|
1267
1267
|
(l) => (u.next(l), u.complete(), i),
|
|
1268
|
-
(l) => (u.error(l),
|
|
1268
|
+
(l) => (u.error(l), N.delete(i), null)
|
|
1269
1269
|
)
|
|
1270
1270
|
).pipe(
|
|
1271
|
-
|
|
1271
|
+
Xt({
|
|
1272
1272
|
unsubscribe: () => {
|
|
1273
|
-
a.abort(),
|
|
1273
|
+
a.abort(), N.delete(i);
|
|
1274
1274
|
}
|
|
1275
1275
|
})
|
|
1276
1276
|
);
|
|
1277
1277
|
})
|
|
1278
1278
|
).subscribe(), setInterval(() => {
|
|
1279
1279
|
const i = Date.now();
|
|
1280
|
-
for (const [o, a] of
|
|
1281
|
-
i - a.createdAt >
|
|
1282
|
-
},
|
|
1280
|
+
for (const [o, a] of N)
|
|
1281
|
+
i - a.createdAt > Q && (a.abortController.abort(), N.delete(o));
|
|
1282
|
+
}, Q);
|
|
1283
1283
|
}
|
|
1284
|
-
var
|
|
1285
|
-
const
|
|
1284
|
+
var U = /* @__PURE__ */ ((e) => (e[e.TRACE = 0] = "TRACE", e[e.DEBUG = 1] = "DEBUG", e[e.INFO = 2] = "INFO", e[e.WARN = 3] = "WARN", e[e.ERROR = 4] = "ERROR", e[e.FATAL = 5] = "FATAL", e))(U || {});
|
|
1285
|
+
const tr = {
|
|
1286
1286
|
trace: 0,
|
|
1287
1287
|
debug: 1,
|
|
1288
1288
|
info: 2,
|
|
@@ -1291,14 +1291,14 @@ const Xt = {
|
|
|
1291
1291
|
fatal: 5
|
|
1292
1292
|
/* FATAL */
|
|
1293
1293
|
};
|
|
1294
|
-
function
|
|
1294
|
+
function rr(e) {
|
|
1295
1295
|
if (!e) return 2;
|
|
1296
|
-
const t = e.trim().toLowerCase(), r =
|
|
1296
|
+
const t = e.trim().toLowerCase(), r = tr[t];
|
|
1297
1297
|
if (typeof r == "number") return r;
|
|
1298
1298
|
const n = Number(t);
|
|
1299
1299
|
return Number.isFinite(n) && n >= 0 && n <= 5 ? n : 2;
|
|
1300
1300
|
}
|
|
1301
|
-
function
|
|
1301
|
+
function Ze(e) {
|
|
1302
1302
|
switch (e) {
|
|
1303
1303
|
case 0:
|
|
1304
1304
|
return "TRACE";
|
|
@@ -1316,7 +1316,7 @@ function Je(e) {
|
|
|
1316
1316
|
return "INFO";
|
|
1317
1317
|
}
|
|
1318
1318
|
}
|
|
1319
|
-
function
|
|
1319
|
+
function Ie(e) {
|
|
1320
1320
|
if (e === void 0) return "undefined";
|
|
1321
1321
|
if (e === null) return null;
|
|
1322
1322
|
if (e instanceof Error)
|
|
@@ -1336,7 +1336,7 @@ function xe(e) {
|
|
|
1336
1336
|
return e;
|
|
1337
1337
|
}
|
|
1338
1338
|
}
|
|
1339
|
-
class
|
|
1339
|
+
class nr {
|
|
1340
1340
|
constructor(t, r, n) {
|
|
1341
1341
|
this.name = t, this.manager = r, this.contextData = n;
|
|
1342
1342
|
}
|
|
@@ -1345,7 +1345,7 @@ class Qt {
|
|
|
1345
1345
|
* Replaces the current logger's name (not hierarchical).
|
|
1346
1346
|
*/
|
|
1347
1347
|
named(t) {
|
|
1348
|
-
return new
|
|
1348
|
+
return new pe(t, this.manager, this.contextData);
|
|
1349
1349
|
}
|
|
1350
1350
|
/**
|
|
1351
1351
|
* Creates a new logger with additional context.
|
|
@@ -1355,45 +1355,45 @@ class Qt {
|
|
|
1355
1355
|
*/
|
|
1356
1356
|
withContext(t) {
|
|
1357
1357
|
const r = this.contextData ? { ...this.contextData, ...t } : t;
|
|
1358
|
-
return new
|
|
1358
|
+
return new pe(this.name, this.manager, r);
|
|
1359
1359
|
}
|
|
1360
1360
|
trace(t, ...r) {
|
|
1361
|
-
this.log(
|
|
1361
|
+
this.log(U.TRACE, t, r);
|
|
1362
1362
|
}
|
|
1363
1363
|
debug(t, ...r) {
|
|
1364
|
-
this.log(
|
|
1364
|
+
this.log(U.DEBUG, t, r);
|
|
1365
1365
|
}
|
|
1366
1366
|
info(t, ...r) {
|
|
1367
|
-
this.log(
|
|
1367
|
+
this.log(U.INFO, t, r);
|
|
1368
1368
|
}
|
|
1369
1369
|
warn(t, ...r) {
|
|
1370
|
-
this.log(
|
|
1370
|
+
this.log(U.WARN, t, r);
|
|
1371
1371
|
}
|
|
1372
1372
|
error(t, ...r) {
|
|
1373
|
-
this.log(
|
|
1373
|
+
this.log(U.ERROR, t, r);
|
|
1374
1374
|
}
|
|
1375
1375
|
fatal(t, ...r) {
|
|
1376
|
-
this.log(
|
|
1376
|
+
this.log(U.FATAL, t, r);
|
|
1377
1377
|
}
|
|
1378
1378
|
log(t, r, n) {
|
|
1379
1379
|
if (!this.manager.shouldLog(t, this.name)) return;
|
|
1380
1380
|
const i = (/* @__PURE__ */ new Date()).toISOString();
|
|
1381
|
-
let o = n.length > 0 ? n.length === 1 ?
|
|
1381
|
+
let o = n.length > 0 ? n.length === 1 ? Ie(n[0]) : n.map(Ie) : void 0, a;
|
|
1382
1382
|
this.contextData && o !== void 0 ? a = { ...this.contextData, args: o } : this.contextData ? a = this.contextData : a = o, this.manager.log({
|
|
1383
1383
|
timestamp: i,
|
|
1384
|
-
level:
|
|
1384
|
+
level: Ze(t),
|
|
1385
1385
|
logger: this.name,
|
|
1386
1386
|
message: r,
|
|
1387
1387
|
context: a
|
|
1388
1388
|
});
|
|
1389
1389
|
}
|
|
1390
1390
|
}
|
|
1391
|
-
class
|
|
1391
|
+
class pe extends nr {
|
|
1392
1392
|
constructor(t, r, n) {
|
|
1393
1393
|
super(t, r, n);
|
|
1394
1394
|
}
|
|
1395
1395
|
}
|
|
1396
|
-
class
|
|
1396
|
+
class or {
|
|
1397
1397
|
log(t) {
|
|
1398
1398
|
const r = t.context !== void 0 ? ` ${JSON.stringify(t.context)}` : "", n = `[${t.timestamp}] [${t.logger}] [${t.level}] ${t.message}${r}`;
|
|
1399
1399
|
switch (t.level) {
|
|
@@ -1410,13 +1410,13 @@ class er {
|
|
|
1410
1410
|
}
|
|
1411
1411
|
}
|
|
1412
1412
|
}
|
|
1413
|
-
const
|
|
1414
|
-
class
|
|
1413
|
+
const ue = /* @__PURE__ */ Symbol.for("@noego/logger");
|
|
1414
|
+
class ir {
|
|
1415
1415
|
constructor() {
|
|
1416
1416
|
var i, o, a;
|
|
1417
1417
|
this.transports = [], this.loggerLevels = /* @__PURE__ */ new Map();
|
|
1418
1418
|
const t = typeof process < "u" ? (i = process.env) == null ? void 0 : i.LOG_LEVEL : void 0, r = typeof process < "u" ? (o = process.env) == null ? void 0 : o.SERVICE_NAME : void 0, n = typeof process < "u" ? (a = process.env) == null ? void 0 : a.NODE_ENV : void 0;
|
|
1419
|
-
this.level =
|
|
1419
|
+
this.level = rr(t), this.service = r ?? "noego", this.environment = n ?? "development";
|
|
1420
1420
|
}
|
|
1421
1421
|
getLevel() {
|
|
1422
1422
|
return this.level;
|
|
@@ -1461,67 +1461,67 @@ class tr {
|
|
|
1461
1461
|
t.close && await t.close();
|
|
1462
1462
|
}
|
|
1463
1463
|
formatMessage(t, r, n) {
|
|
1464
|
-
return `[${(/* @__PURE__ */ new Date()).toISOString()}] [${r}] [${
|
|
1464
|
+
return `[${(/* @__PURE__ */ new Date()).toISOString()}] [${r}] [${Ze(t)}] ${n}`;
|
|
1465
1465
|
}
|
|
1466
1466
|
}
|
|
1467
|
-
function
|
|
1467
|
+
function Qe() {
|
|
1468
1468
|
const e = globalThis;
|
|
1469
|
-
if (!e[
|
|
1470
|
-
const t = new
|
|
1471
|
-
t.addTransport(new
|
|
1469
|
+
if (!e[ue]) {
|
|
1470
|
+
const t = new ir();
|
|
1471
|
+
t.addTransport(new or()), e[ue] = t;
|
|
1472
1472
|
}
|
|
1473
|
-
return e[
|
|
1473
|
+
return e[ue];
|
|
1474
1474
|
}
|
|
1475
|
-
function
|
|
1476
|
-
return new
|
|
1475
|
+
function _e(e) {
|
|
1476
|
+
return new pe(e, Qe());
|
|
1477
1477
|
}
|
|
1478
|
-
const
|
|
1479
|
-
function
|
|
1478
|
+
const m = _e("forge:nav"), ar = 1e4;
|
|
1479
|
+
function sr(e, t, r) {
|
|
1480
1480
|
let n = null, i = !1;
|
|
1481
1481
|
const o = new Promise((a, u) => {
|
|
1482
1482
|
n = setTimeout(
|
|
1483
1483
|
() => {
|
|
1484
|
-
i = !0,
|
|
1484
|
+
i = !0, m.error("Timeout fired after", t, "ms"), r(), u(new Error(`Navigation timed out after ${t}ms`));
|
|
1485
1485
|
},
|
|
1486
1486
|
t
|
|
1487
|
-
),
|
|
1487
|
+
), m.debug("Timeout scheduled for", t, "ms, timeoutId:", n);
|
|
1488
1488
|
});
|
|
1489
1489
|
return Promise.race([
|
|
1490
1490
|
e.finally(() => {
|
|
1491
|
-
n !== null && (i ?
|
|
1491
|
+
n !== null && (i ? m.warn("Promise settled AFTER timeout already fired") : (m.debug("Clearing timeout", n, "- promise settled successfully"), clearTimeout(n)));
|
|
1492
1492
|
}),
|
|
1493
1493
|
o
|
|
1494
1494
|
]);
|
|
1495
1495
|
}
|
|
1496
|
-
const
|
|
1497
|
-
let
|
|
1498
|
-
function
|
|
1499
|
-
e && e.redirectPath && (
|
|
1496
|
+
const ve = new re();
|
|
1497
|
+
let E = 0, H = null;
|
|
1498
|
+
function ur(e) {
|
|
1499
|
+
e && e.redirectPath && (m.debug("Handling redirect to", e.redirectPath), setTimeout(
|
|
1500
1500
|
() => {
|
|
1501
1501
|
window.dispatchEvent(new CustomEvent("forge-redirect", { detail: { path: e.redirectPath } }));
|
|
1502
1502
|
},
|
|
1503
1503
|
0
|
|
1504
1504
|
));
|
|
1505
1505
|
}
|
|
1506
|
-
|
|
1507
|
-
|
|
1506
|
+
ve.pipe(Xe((e) => Je(sr(dr(e), ar, () => {
|
|
1507
|
+
m.error("Navigation timed out"), E++, H && (H.abort(), H = null);
|
|
1508
1508
|
}).catch((t) => {
|
|
1509
|
-
|
|
1509
|
+
m.error("Navigation failed:", t);
|
|
1510
1510
|
})))).subscribe({
|
|
1511
|
-
next:
|
|
1511
|
+
next: ur,
|
|
1512
1512
|
error: (e) => {
|
|
1513
|
-
|
|
1513
|
+
m.error("Stream error:", e);
|
|
1514
1514
|
}
|
|
1515
1515
|
});
|
|
1516
|
-
function
|
|
1516
|
+
function cr(e) {
|
|
1517
1517
|
var t;
|
|
1518
|
-
|
|
1518
|
+
m.debug("Pushing navigation event to stream", {
|
|
1519
1519
|
url: e.url,
|
|
1520
|
-
currentNavigationId:
|
|
1521
|
-
subscriberCount: ((t =
|
|
1522
|
-
}),
|
|
1520
|
+
currentNavigationId: E,
|
|
1521
|
+
subscriberCount: ((t = ve.observers) == null ? void 0 : t.length) || 0
|
|
1522
|
+
}), ve.next(e);
|
|
1523
1523
|
}
|
|
1524
|
-
const
|
|
1524
|
+
const A = Ce({
|
|
1525
1525
|
active: {
|
|
1526
1526
|
layouts: [],
|
|
1527
1527
|
view: null,
|
|
@@ -1534,9 +1534,9 @@ const x = Ie({
|
|
|
1534
1534
|
},
|
|
1535
1535
|
phase: "idle",
|
|
1536
1536
|
navigationId: 0,
|
|
1537
|
-
page:
|
|
1538
|
-
}),
|
|
1539
|
-
const e =
|
|
1537
|
+
page: k
|
|
1538
|
+
}), lr = async () => {
|
|
1539
|
+
const e = R(A).navigationId;
|
|
1540
1540
|
try {
|
|
1541
1541
|
const t = window.location.pathname + window.location.search, r = {
|
|
1542
1542
|
method: "GET",
|
|
@@ -1545,11 +1545,11 @@ const x = Ie({
|
|
|
1545
1545
|
Accept: "application/json"
|
|
1546
1546
|
}
|
|
1547
1547
|
};
|
|
1548
|
-
r[
|
|
1548
|
+
r[ne] = !0;
|
|
1549
1549
|
const n = await fetch(t, r);
|
|
1550
1550
|
if (!n.ok) return !1;
|
|
1551
|
-
const i = await n.json(), o =
|
|
1552
|
-
return e !== o ? (
|
|
1551
|
+
const i = await n.json(), o = R(A).navigationId;
|
|
1552
|
+
return e !== o ? (m.debug("Discarding stale poll response", { pollNavigationId: e, currentNavigationId: o }), !1) : (A.update((a) => {
|
|
1553
1553
|
var u;
|
|
1554
1554
|
return a.active.data = { layout: ((u = a.active.data) == null ? void 0 : u.layout) || [], view: i.view }, a;
|
|
1555
1555
|
}), !0);
|
|
@@ -1557,46 +1557,57 @@ const x = Ie({
|
|
|
1557
1557
|
return !1;
|
|
1558
1558
|
}
|
|
1559
1559
|
};
|
|
1560
|
-
|
|
1561
|
-
function
|
|
1560
|
+
k.update((e) => (e.poll = lr, e));
|
|
1561
|
+
async function et(e, t, r, n, i) {
|
|
1562
|
+
if (!t.controller) return;
|
|
1563
|
+
let o = J(e, t.controller).toString();
|
|
1564
|
+
i && (o = o.replace(/\.svelte\.ts$/, ".js").replace(/\.ts$/, ".js"), /\.[a-z]+$/.test(o) || (o += ".js")), o.startsWith("/") || (o = "/" + o);
|
|
1565
|
+
const u = (await import(
|
|
1566
|
+
/* @vite-ignore */
|
|
1567
|
+
o
|
|
1568
|
+
)).default, s = new u();
|
|
1569
|
+
return typeof s.initialize == "function" && await Promise.resolve(s.initialize(r, n)), s;
|
|
1570
|
+
}
|
|
1571
|
+
function J(...e) {
|
|
1562
1572
|
let t = e.map((r, n) => n === 0 ? r.replace(/\/+$/, "") : r.replace(/^\/+|\/+$/g, "")).join("/");
|
|
1563
1573
|
return t.startsWith("/") || (t = "/" + t), t.split("?")[0];
|
|
1564
1574
|
}
|
|
1565
|
-
async function
|
|
1575
|
+
async function fr(e, t, r, n, i, o) {
|
|
1566
1576
|
try {
|
|
1567
|
-
const a = typeof t == "string" && t.indexOf("assets") !== -1, u = (r.layout || []).map((
|
|
1568
|
-
let
|
|
1569
|
-
return a && (
|
|
1577
|
+
const a = typeof t == "string" && t.indexOf("assets") !== -1, u = (r.layout || []).map((w) => {
|
|
1578
|
+
let g = J(t, w).toString();
|
|
1579
|
+
return a && (g = g.endsWith(".svelte") ? g.replace(/\.svelte$/, ".js") : /[.][a-z]+$/.test(g) ? g : g + ".js"), g;
|
|
1570
1580
|
});
|
|
1571
|
-
let s =
|
|
1581
|
+
let s = J(t, r.view).toString();
|
|
1572
1582
|
a && (s = s.endsWith(".svelte") ? s.replace(/\.svelte$/, ".js") : /[.][a-z]+$/.test(s) ? s : s + ".js");
|
|
1573
|
-
const c = await Promise.all(u.map((
|
|
1583
|
+
const c = await Promise.all(u.map((w) => import(
|
|
1574
1584
|
/* @vite-ignore */
|
|
1575
|
-
|
|
1576
|
-
).then((
|
|
1585
|
+
w
|
|
1586
|
+
).then((g) => g.default)));
|
|
1577
1587
|
s.startsWith("/") || (s = "/" + s);
|
|
1578
1588
|
const l = await import(
|
|
1579
1589
|
/* @vite-ignore */
|
|
1580
1590
|
s
|
|
1581
|
-
).then((
|
|
1591
|
+
).then((w) => w.default), p = window.__INITIAL_DATA__ || { layout: [], view: {} }, h = typeof t == "string" && t.indexOf("assets") !== -1, d = R(k), v = { params: n, urlParams: i, query: o, page: d }, f = await et(t, r, p.view, v, h), S = {
|
|
1582
1592
|
layouts: c,
|
|
1583
1593
|
view: l,
|
|
1584
1594
|
viewPath: r.view || null,
|
|
1585
1595
|
// Store original path for debugging
|
|
1586
1596
|
layoutPaths: r.layout || [],
|
|
1587
1597
|
// Store original paths for debugging
|
|
1588
|
-
data:
|
|
1598
|
+
data: p,
|
|
1589
1599
|
params: n,
|
|
1590
1600
|
urlParams: i,
|
|
1591
|
-
query: o
|
|
1601
|
+
query: o,
|
|
1602
|
+
controller: f
|
|
1592
1603
|
};
|
|
1593
|
-
|
|
1604
|
+
A.update((w) => (w.active = S, w.phase = "idle", w)), ot(it, { target: e, props: { root: A } });
|
|
1594
1605
|
} catch (a) {
|
|
1595
|
-
|
|
1606
|
+
m.error("Client-side route loading failed:", a);
|
|
1596
1607
|
}
|
|
1597
1608
|
}
|
|
1598
|
-
function
|
|
1599
|
-
|
|
1609
|
+
function ce(e, t, r, n, i, o, a = !1, u = !0) {
|
|
1610
|
+
cr({
|
|
1600
1611
|
url: e,
|
|
1601
1612
|
base_path: t,
|
|
1602
1613
|
route: r,
|
|
@@ -1607,7 +1618,8 @@ function ae(e, t, r, n, i, o, a = !1, u = !0) {
|
|
|
1607
1618
|
updateUrl: u
|
|
1608
1619
|
});
|
|
1609
1620
|
}
|
|
1610
|
-
async function
|
|
1621
|
+
async function dr(e) {
|
|
1622
|
+
var p;
|
|
1611
1623
|
const {
|
|
1612
1624
|
url: t,
|
|
1613
1625
|
base_path: r,
|
|
@@ -1617,29 +1629,29 @@ async function ur(e) {
|
|
|
1617
1629
|
query: a,
|
|
1618
1630
|
server_loading: u,
|
|
1619
1631
|
updateUrl: s
|
|
1620
|
-
} = e, c = ++
|
|
1621
|
-
|
|
1632
|
+
} = e, c = ++E, l = new AbortController();
|
|
1633
|
+
H = l, m.debug("Starting navigation", {
|
|
1622
1634
|
navigationId: c,
|
|
1623
1635
|
url: t,
|
|
1624
1636
|
updateUrl: s,
|
|
1625
1637
|
server_loading: u,
|
|
1626
|
-
currentNavigationId:
|
|
1627
|
-
hasAbortController: !!
|
|
1628
|
-
}),
|
|
1638
|
+
currentNavigationId: E,
|
|
1639
|
+
hasAbortController: !!H
|
|
1640
|
+
}), A.update((h) => (h.phase = "loading", h.navigationId = c, h));
|
|
1629
1641
|
try {
|
|
1630
|
-
let
|
|
1642
|
+
let h = { layout: [], view: {} };
|
|
1631
1643
|
if (u) {
|
|
1632
|
-
|
|
1633
|
-
let
|
|
1634
|
-
const
|
|
1635
|
-
if (
|
|
1644
|
+
m.debug("Fetching server data", { navigationId: c, url: t });
|
|
1645
|
+
let y = null;
|
|
1646
|
+
const O = Qt(t);
|
|
1647
|
+
if (O)
|
|
1636
1648
|
try {
|
|
1637
|
-
|
|
1649
|
+
m.debug("Using prefetched response for", t), y = await kt(O);
|
|
1638
1650
|
} catch {
|
|
1639
|
-
|
|
1651
|
+
m.debug("Prefetch failed, falling back to fetch", t), y = null;
|
|
1640
1652
|
}
|
|
1641
|
-
if (!
|
|
1642
|
-
const
|
|
1653
|
+
if (!y) {
|
|
1654
|
+
const M = {
|
|
1643
1655
|
method: n.method,
|
|
1644
1656
|
headers: {
|
|
1645
1657
|
"Content-Type": "application/json",
|
|
@@ -1647,92 +1659,100 @@ async function ur(e) {
|
|
|
1647
1659
|
},
|
|
1648
1660
|
signal: l.signal
|
|
1649
1661
|
};
|
|
1650
|
-
|
|
1662
|
+
M[ne] = !0, y = await fetch(t, M);
|
|
1651
1663
|
}
|
|
1652
|
-
if (
|
|
1664
|
+
if (m.debug("Fetch response received", {
|
|
1653
1665
|
navigationId: c,
|
|
1654
1666
|
url: t,
|
|
1655
|
-
ok:
|
|
1656
|
-
status:
|
|
1657
|
-
redirected:
|
|
1658
|
-
currentNavigationId:
|
|
1659
|
-
}),
|
|
1660
|
-
return
|
|
1661
|
-
redirectPath:
|
|
1667
|
+
ok: y.ok,
|
|
1668
|
+
status: y.status,
|
|
1669
|
+
redirected: y.redirected,
|
|
1670
|
+
currentNavigationId: E
|
|
1671
|
+
}), y.redirected || y.headers.get("X-Forge-Redirect") === "true")
|
|
1672
|
+
return m.debug("Redirect detected"), A.update((M) => (M.phase = "idle", M)), {
|
|
1673
|
+
redirectPath: y.headers.get("X-Forge-Redirect-Path") || void 0
|
|
1662
1674
|
};
|
|
1663
|
-
if (!
|
|
1664
|
-
throw new Error(`Network response was not ok: ${
|
|
1665
|
-
|
|
1675
|
+
if (!y.ok)
|
|
1676
|
+
throw new Error(`Network response was not ok: ${y.status}`);
|
|
1677
|
+
h = await y.json(), m.debug("Server data received:", h);
|
|
1666
1678
|
}
|
|
1667
|
-
if (c !==
|
|
1668
|
-
|
|
1679
|
+
if (c !== E) {
|
|
1680
|
+
m.debug("Stale navigation after fetch, aborting", { navigationId: c, currentNavigationId: E });
|
|
1669
1681
|
return;
|
|
1670
1682
|
}
|
|
1671
|
-
|
|
1672
|
-
const
|
|
1673
|
-
let
|
|
1674
|
-
return
|
|
1683
|
+
m.debug("Loading components", { navigationId: c, view: n.view, layouts: n.layout });
|
|
1684
|
+
const d = typeof r == "string" && r.indexOf("assets") !== -1, v = (n.layout || []).map((y) => {
|
|
1685
|
+
let O = J(r, y).toString();
|
|
1686
|
+
return d && (O = O.endsWith(".svelte") ? O.replace(/\.svelte$/, ".js") : /[.][a-z]+$/.test(O) ? O : O + ".js"), O;
|
|
1675
1687
|
});
|
|
1676
|
-
let
|
|
1677
|
-
|
|
1678
|
-
const
|
|
1688
|
+
let f = J(r, n.view).toString();
|
|
1689
|
+
d && (f = f.endsWith(".svelte") ? f.replace(/\.svelte$/, ".js") : /[.][a-z]+$/.test(f) ? f : f + ".js"), f.startsWith("/") || (f = "/" + f);
|
|
1690
|
+
const S = await Promise.all(v.map((y) => import(
|
|
1679
1691
|
/* @vite-ignore */
|
|
1680
|
-
|
|
1681
|
-
).then((
|
|
1692
|
+
y
|
|
1693
|
+
).then((O) => O.default))), w = await import(
|
|
1682
1694
|
/* @vite-ignore */
|
|
1683
|
-
|
|
1684
|
-
).then((
|
|
1685
|
-
if (
|
|
1695
|
+
f
|
|
1696
|
+
).then((y) => y.default);
|
|
1697
|
+
if (m.debug("Components loaded", {
|
|
1686
1698
|
navigationId: c,
|
|
1687
|
-
currentNavigationId:
|
|
1688
|
-
layoutsCount:
|
|
1689
|
-
viewLoaded: !!
|
|
1690
|
-
}), c !==
|
|
1691
|
-
|
|
1699
|
+
currentNavigationId: E,
|
|
1700
|
+
layoutsCount: S.length,
|
|
1701
|
+
viewLoaded: !!w
|
|
1702
|
+
}), c !== E) {
|
|
1703
|
+
m.debug("Stale navigation after component load, aborting", { navigationId: c, currentNavigationId: E });
|
|
1692
1704
|
return;
|
|
1693
1705
|
}
|
|
1694
|
-
const g = {
|
|
1695
|
-
|
|
1696
|
-
|
|
1706
|
+
const g = R(k), _ = { params: i, urlParams: o, query: a, page: g }, T = await et(r, n, h.view, _, d);
|
|
1707
|
+
if (c !== E) {
|
|
1708
|
+
m.debug("Stale navigation after controller resolution, aborting", { navigationId: c, currentNavigationId: E }), (p = T == null ? void 0 : T.destroy) == null || p.call(T);
|
|
1709
|
+
return;
|
|
1710
|
+
}
|
|
1711
|
+
const I = R(A).active.controller;
|
|
1712
|
+
I != null && I.destroy && I.destroy();
|
|
1713
|
+
const P = {
|
|
1714
|
+
layouts: S,
|
|
1715
|
+
view: w,
|
|
1697
1716
|
viewPath: n.view || null,
|
|
1698
1717
|
// Store original path for debugging
|
|
1699
1718
|
layoutPaths: n.layout || [],
|
|
1700
1719
|
// Store original paths for debugging
|
|
1701
|
-
data:
|
|
1720
|
+
data: h,
|
|
1702
1721
|
params: i,
|
|
1703
1722
|
urlParams: o,
|
|
1704
|
-
query: a
|
|
1723
|
+
query: a,
|
|
1724
|
+
controller: T
|
|
1705
1725
|
};
|
|
1706
|
-
|
|
1726
|
+
m.debug("Committing new state", {
|
|
1707
1727
|
navigationId: c,
|
|
1708
|
-
currentNavigationId:
|
|
1709
|
-
layoutsCount:
|
|
1710
|
-
viewSet: !!
|
|
1711
|
-
dataKeys: Object.keys(
|
|
1712
|
-
}),
|
|
1728
|
+
currentNavigationId: E,
|
|
1729
|
+
layoutsCount: P.layouts.length,
|
|
1730
|
+
viewSet: !!P.view,
|
|
1731
|
+
dataKeys: Object.keys(P.data || {})
|
|
1732
|
+
}), A.update((y) => (y.active = P, y.phase = "idle", m.debug("ROOT.active updated", {
|
|
1713
1733
|
navigationId: c,
|
|
1714
|
-
layoutsCount:
|
|
1715
|
-
viewSet: !!
|
|
1716
|
-
dataKeys: Object.keys(
|
|
1717
|
-
paramsKeys: Object.keys(
|
|
1718
|
-
}),
|
|
1719
|
-
} catch (
|
|
1720
|
-
if (
|
|
1734
|
+
layoutsCount: y.active.layouts.length,
|
|
1735
|
+
viewSet: !!y.active.view,
|
|
1736
|
+
dataKeys: Object.keys(y.active.data || {}),
|
|
1737
|
+
paramsKeys: Object.keys(y.active.params || {})
|
|
1738
|
+
}), y)), typeof window < "u" && window.scroll(0, 0), s && (m.debug("Updating browser URL", { url: t }), window.history.pushState({}, "", t)), m.debug("Navigation complete", { navigationId: c, url: t });
|
|
1739
|
+
} catch (h) {
|
|
1740
|
+
if (m.error("Navigation failed", {
|
|
1721
1741
|
navigationId: c,
|
|
1722
|
-
currentNavigationId:
|
|
1742
|
+
currentNavigationId: E,
|
|
1723
1743
|
url: t,
|
|
1724
|
-
error:
|
|
1725
|
-
}),
|
|
1726
|
-
|
|
1744
|
+
error: h instanceof Error ? h.message : String(h)
|
|
1745
|
+
}), A.update((d) => (d.phase = "idle", d)), h.name === "AbortError") {
|
|
1746
|
+
m.debug("Navigation aborted");
|
|
1727
1747
|
return;
|
|
1728
1748
|
}
|
|
1729
|
-
throw
|
|
1749
|
+
throw h;
|
|
1730
1750
|
}
|
|
1731
1751
|
}
|
|
1732
|
-
const
|
|
1733
|
-
function
|
|
1752
|
+
const F = _e("forge:events");
|
|
1753
|
+
function hr(e, t, r) {
|
|
1734
1754
|
if (!document) {
|
|
1735
|
-
|
|
1755
|
+
F.error("Document not found");
|
|
1736
1756
|
return;
|
|
1737
1757
|
}
|
|
1738
1758
|
document.addEventListener("click", (n) => {
|
|
@@ -1745,57 +1765,57 @@ function cr(e, t, r) {
|
|
|
1745
1765
|
return;
|
|
1746
1766
|
}
|
|
1747
1767
|
if (s && s.startsWith("/") || s.startsWith(".")) {
|
|
1748
|
-
const c = s.split("?")[0], l = o.getAttribute("method") || "get",
|
|
1749
|
-
if (
|
|
1768
|
+
const c = s.split("?")[0], l = o.getAttribute("method") || "get", p = t.find((h) => h.method.toLowerCase() === l && r.find((d) => d.parser(c) && d.pattern === h.path));
|
|
1769
|
+
if (p) {
|
|
1750
1770
|
n.preventDefault();
|
|
1751
|
-
const
|
|
1752
|
-
|
|
1771
|
+
const h = r.find((_) => _.parser(c) && _.pattern === p.path), d = (h == null ? void 0 : h.parser(c)) || {}, v = new URLSearchParams(s.split("?")[1] || ""), f = Object.fromEntries(v.entries()) || {}, S = { ...d, ...f }, g = R(V)[h == null ? void 0 : h.pattern];
|
|
1772
|
+
k.update((_) => (_.url = s, _.pathname = c, _.params = d, _.query = f, _)), F.debug("Click navigation to", s), ce(s, e, p, S, d, f, g, !0);
|
|
1753
1773
|
} else
|
|
1754
|
-
|
|
1774
|
+
F.warn("No matching route found", s, "- using fallback navigation");
|
|
1755
1775
|
}
|
|
1756
1776
|
}
|
|
1757
1777
|
}), window.addEventListener("popstate", (n) => {
|
|
1758
1778
|
const i = window.location.pathname, o = window.location.pathname + window.location.search, a = "get", u = t.find((s) => s.method.toLowerCase() === a && r.find((c) => c.parser(i) && c.pattern === s.path));
|
|
1759
1779
|
if (u) {
|
|
1760
|
-
const s = r.find((
|
|
1761
|
-
|
|
1762
|
-
const
|
|
1763
|
-
|
|
1780
|
+
const s = r.find((f) => f.parser(i) && f.pattern === u.path), c = (s == null ? void 0 : s.parser(i)) || {}, l = new URLSearchParams(window.location.search), p = Object.fromEntries(l.entries()) || {};
|
|
1781
|
+
k.update((f) => (f.url = o, f.pathname = window.location.pathname, f.params = c, f.query = p, f));
|
|
1782
|
+
const h = { ...c, ...p }, v = R(V)[s == null ? void 0 : s.pattern];
|
|
1783
|
+
F.debug("Popstate navigation to", o), ce(o, e, u, h, c, p, v, !1);
|
|
1764
1784
|
} else
|
|
1765
|
-
|
|
1785
|
+
F.warn("No matching route found", i, "- using fallback navigation"), window.location.href = i;
|
|
1766
1786
|
}), window.addEventListener("forge-redirect", ((n) => {
|
|
1767
1787
|
const i = n.detail.path, o = i.split("?")[0];
|
|
1768
|
-
|
|
1788
|
+
F.debug("Handling forge-redirect to:", i);
|
|
1769
1789
|
const a = "get", u = t.find((s) => s.method.toLowerCase() === a && r.find((c) => c.parser(o) && c.pattern === s.path));
|
|
1770
1790
|
if (u) {
|
|
1771
|
-
const s = r.find((
|
|
1772
|
-
|
|
1791
|
+
const s = r.find((f) => f.parser(o) && f.pattern === u.path), c = (s == null ? void 0 : s.parser(o)) || {}, l = new URLSearchParams(i.split("?")[1] || ""), p = Object.fromEntries(l.entries()) || {}, h = { ...c, ...p }, v = R(V)[s == null ? void 0 : s.pattern];
|
|
1792
|
+
k.update((f) => (f.url = i, f.pathname = o, f.params = c, f.query = p, f)), ce(i, e, u, h, c, p, v, !0);
|
|
1773
1793
|
} else
|
|
1774
|
-
|
|
1775
|
-
})),
|
|
1794
|
+
F.warn("No matching route found", o, "- using fallback navigation"), window.location.href = o;
|
|
1795
|
+
})), er(t, r);
|
|
1776
1796
|
}
|
|
1777
|
-
const
|
|
1778
|
-
class
|
|
1797
|
+
const Pe = "/__forge/dev-logs", pr = 100, vr = 20;
|
|
1798
|
+
class mr {
|
|
1779
1799
|
constructor() {
|
|
1780
|
-
|
|
1781
|
-
|
|
1800
|
+
oe(this, "buffer", []);
|
|
1801
|
+
oe(this, "timer", null);
|
|
1782
1802
|
typeof window < "u" && window.addEventListener("beforeunload", () => {
|
|
1783
1803
|
this.beaconFlush();
|
|
1784
1804
|
});
|
|
1785
1805
|
}
|
|
1786
1806
|
log(t) {
|
|
1787
|
-
if (this.buffer.push(t), this.buffer.length >=
|
|
1807
|
+
if (this.buffer.push(t), this.buffer.length >= vr) {
|
|
1788
1808
|
this.flush();
|
|
1789
1809
|
return;
|
|
1790
1810
|
}
|
|
1791
|
-
this.timer || (this.timer = setTimeout(() => this.flush(),
|
|
1811
|
+
this.timer || (this.timer = setTimeout(() => this.flush(), pr));
|
|
1792
1812
|
}
|
|
1793
1813
|
flush() {
|
|
1794
1814
|
if (this.timer && (clearTimeout(this.timer), this.timer = null), this.buffer.length === 0) return;
|
|
1795
1815
|
const t = this.buffer;
|
|
1796
1816
|
this.buffer = [];
|
|
1797
1817
|
try {
|
|
1798
|
-
fetch(
|
|
1818
|
+
fetch(Pe, {
|
|
1799
1819
|
method: "POST",
|
|
1800
1820
|
headers: { "Content-Type": "application/json" },
|
|
1801
1821
|
body: JSON.stringify(t),
|
|
@@ -1810,14 +1830,14 @@ class dr {
|
|
|
1810
1830
|
const t = this.buffer;
|
|
1811
1831
|
this.buffer = [];
|
|
1812
1832
|
try {
|
|
1813
|
-
navigator.sendBeacon(
|
|
1833
|
+
navigator.sendBeacon(Pe, JSON.stringify(t));
|
|
1814
1834
|
} catch {
|
|
1815
1835
|
}
|
|
1816
1836
|
}
|
|
1817
1837
|
}
|
|
1818
|
-
const
|
|
1819
|
-
let
|
|
1820
|
-
function
|
|
1838
|
+
const D = _e("forge:client"), ne = Symbol("forge-load-function");
|
|
1839
|
+
let ee = [], X = null;
|
|
1840
|
+
function yr(e) {
|
|
1821
1841
|
try {
|
|
1822
1842
|
const t = new URL(e, window.location.origin);
|
|
1823
1843
|
return t.origin === window.location.origin && !t.pathname.startsWith("/api/");
|
|
@@ -1825,29 +1845,29 @@ function hr(e) {
|
|
|
1825
1845
|
return !e.startsWith("/api/");
|
|
1826
1846
|
}
|
|
1827
1847
|
}
|
|
1828
|
-
function
|
|
1829
|
-
typeof window < "u" && !
|
|
1848
|
+
function br() {
|
|
1849
|
+
typeof window < "u" && !X && (X = window.fetch, window.fetch = async function(e, t = {}) {
|
|
1830
1850
|
if ((typeof e == "string" ? e : e instanceof URL ? e.toString() : e.url) === "/__forge/dev-logs")
|
|
1831
|
-
return
|
|
1851
|
+
return X(e, t);
|
|
1832
1852
|
let n = { ...t };
|
|
1833
|
-
for (const a of
|
|
1853
|
+
for (const a of ee)
|
|
1834
1854
|
try {
|
|
1835
1855
|
if (a.length === 2) {
|
|
1836
1856
|
const u = new Headers(n.headers), s = Object.fromEntries(u.entries());
|
|
1837
1857
|
await new Promise((c, l) => {
|
|
1838
1858
|
try {
|
|
1839
|
-
a(s, (
|
|
1840
|
-
if (
|
|
1841
|
-
l(
|
|
1859
|
+
a(s, (p) => {
|
|
1860
|
+
if (p)
|
|
1861
|
+
l(p);
|
|
1842
1862
|
else {
|
|
1843
|
-
const
|
|
1844
|
-
Object.entries(s).forEach(([d,
|
|
1845
|
-
|
|
1846
|
-
}), n.headers =
|
|
1863
|
+
const h = new Headers();
|
|
1864
|
+
Object.entries(s).forEach(([d, v]) => {
|
|
1865
|
+
v !== void 0 && h.set(d, v);
|
|
1866
|
+
}), n.headers = h, c();
|
|
1847
1867
|
}
|
|
1848
1868
|
});
|
|
1849
|
-
} catch (
|
|
1850
|
-
l(
|
|
1869
|
+
} catch (p) {
|
|
1870
|
+
l(p);
|
|
1851
1871
|
}
|
|
1852
1872
|
});
|
|
1853
1873
|
} else {
|
|
@@ -1855,16 +1875,16 @@ function pr() {
|
|
|
1855
1875
|
u && typeof u == "object" && (n = u);
|
|
1856
1876
|
}
|
|
1857
1877
|
} catch (u) {
|
|
1858
|
-
throw
|
|
1878
|
+
throw D.error("Middleware error", u), u;
|
|
1859
1879
|
}
|
|
1860
|
-
const i = n == null ? void 0 : n[
|
|
1861
|
-
|
|
1880
|
+
const i = n == null ? void 0 : n[ne];
|
|
1881
|
+
D.debug("Fetch override request", {
|
|
1862
1882
|
url: e,
|
|
1863
1883
|
hasForgeSymbol: i,
|
|
1864
1884
|
headers: n == null ? void 0 : n.headers
|
|
1865
1885
|
});
|
|
1866
|
-
const o = await
|
|
1867
|
-
if (
|
|
1886
|
+
const o = await X(e, n);
|
|
1887
|
+
if (D.debug("Fetch override response", {
|
|
1868
1888
|
url: e,
|
|
1869
1889
|
responseUrl: o.url,
|
|
1870
1890
|
redirected: o.redirected,
|
|
@@ -1873,13 +1893,13 @@ function pr() {
|
|
|
1873
1893
|
hasForgeSymbol: i
|
|
1874
1894
|
}), i && o.redirected) {
|
|
1875
1895
|
const a = typeof e == "string" ? e : e.url, u = o.url;
|
|
1876
|
-
if (
|
|
1896
|
+
if (D.debug("Redirect detected", {
|
|
1877
1897
|
requested: a,
|
|
1878
1898
|
final: u,
|
|
1879
1899
|
redirected: o.redirected
|
|
1880
|
-
}),
|
|
1900
|
+
}), yr(u)) {
|
|
1881
1901
|
const s = new URL(u), c = s.pathname + s.search;
|
|
1882
|
-
return
|
|
1902
|
+
return D.debug("Redirect detected to:", c, "- will navigate after current request completes"), new Response(JSON.stringify({ layout: [], view: {} }), {
|
|
1883
1903
|
status: 200,
|
|
1884
1904
|
headers: {
|
|
1885
1905
|
"Content-Type": "application/json",
|
|
@@ -1892,59 +1912,59 @@ function pr() {
|
|
|
1892
1912
|
return o;
|
|
1893
1913
|
});
|
|
1894
1914
|
}
|
|
1895
|
-
|
|
1896
|
-
var
|
|
1915
|
+
br();
|
|
1916
|
+
var Re;
|
|
1897
1917
|
if (typeof window < "u") {
|
|
1898
1918
|
const e = window.__CONFIGURATION__;
|
|
1899
|
-
(
|
|
1919
|
+
(Re = e == null ? void 0 : e.dev) != null && Re.enable_debug_log && Qe().addTransport(new mr());
|
|
1900
1920
|
}
|
|
1901
|
-
const
|
|
1921
|
+
const xr = {
|
|
1902
1922
|
/**
|
|
1903
1923
|
* Add middleware to the fetch pipeline
|
|
1904
1924
|
*/
|
|
1905
1925
|
configUpdate(e) {
|
|
1906
1926
|
if (typeof e != "function")
|
|
1907
1927
|
throw new Error("Middleware must be a function");
|
|
1908
|
-
|
|
1928
|
+
ee.push(e);
|
|
1909
1929
|
},
|
|
1910
1930
|
/**
|
|
1911
1931
|
* Reset all middleware
|
|
1912
1932
|
*/
|
|
1913
1933
|
reset() {
|
|
1914
|
-
|
|
1934
|
+
ee.length = 0;
|
|
1915
1935
|
},
|
|
1916
1936
|
/**
|
|
1917
1937
|
* Get current middleware count (for debugging)
|
|
1918
1938
|
*/
|
|
1919
1939
|
getMiddlewareCount() {
|
|
1920
|
-
return
|
|
1940
|
+
return ee.length;
|
|
1921
1941
|
}
|
|
1922
1942
|
};
|
|
1923
|
-
let
|
|
1924
|
-
async function
|
|
1943
|
+
let le;
|
|
1944
|
+
async function Ar(e, t) {
|
|
1925
1945
|
let r = window.__COMPONENT_DIR__ || t.component_dir;
|
|
1926
1946
|
if (!r && typeof r != "string")
|
|
1927
1947
|
throw new Error("No component directory provided");
|
|
1928
1948
|
let n = window.__ROUTING__;
|
|
1929
|
-
if (
|
|
1930
|
-
const i = (window.location.pathname || "/").split("?")[0], o =
|
|
1949
|
+
if (le = st(n), window && window.location) {
|
|
1950
|
+
const i = (window.location.pathname || "/").split("?")[0], o = le.find((u) => u.parser(i));
|
|
1931
1951
|
let a = o ? n.find((u) => u.path === o.pattern) : null;
|
|
1932
1952
|
if (o && a) {
|
|
1933
1953
|
const u = o.parser(i) || {}, s = new URLSearchParams(window.location.search), c = Object.fromEntries(s.entries()) || {}, l = { ...u, ...c };
|
|
1934
|
-
|
|
1954
|
+
Zt(), fr(e, r, a, l, u, c), hr(r, n, le);
|
|
1935
1955
|
} else
|
|
1936
|
-
|
|
1956
|
+
D.warn("No matching route", i);
|
|
1937
1957
|
}
|
|
1938
1958
|
}
|
|
1939
1959
|
export {
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1960
|
+
V as MANIFEST_STORE,
|
|
1961
|
+
hr as bootstrap_events,
|
|
1962
|
+
Ar as createApp,
|
|
1963
|
+
xr as fetch,
|
|
1964
|
+
fr as loadRoute,
|
|
1965
|
+
k as page,
|
|
1966
|
+
Pr as shadowUrl,
|
|
1967
|
+
Zt as updateManifestStore,
|
|
1968
|
+
ce as updateRoute
|
|
1949
1969
|
};
|
|
1950
1970
|
//# sourceMappingURL=client.mjs.map
|