@noego/forge 0.1.25 → 0.1.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.
Files changed (35) hide show
  1. package/README.md +18 -1
  2. package/dist/client.cjs +2 -2
  3. package/dist/client.cjs.map +1 -1
  4. package/dist/client.d.ts +30 -1
  5. package/dist/client.mjs +756 -728
  6. package/dist/client.mjs.map +1 -1
  7. package/dist/options/ServerOptions.cjs.map +1 -1
  8. package/dist/options/ServerOptions.d.ts +3 -0
  9. package/dist/options/ServerOptions.mjs.map +1 -1
  10. package/dist/page.svelte-4uv4nQ2i.js.map +1 -1
  11. package/dist/page.svelte-CW8PJDdH.cjs.map +1 -1
  12. package/dist/plugins-cjs/options/ServerOptions.js.map +1 -1
  13. package/dist/plugins-es/options/ServerOptions.d.ts +3 -0
  14. package/dist/plugins-es/options/ServerOptions.js.map +1 -1
  15. package/dist-ssr/{path-BqcF5dbs.js → path-2bYzpvRB.js} +3 -1
  16. package/dist-ssr/{path-BqcF5dbs.js.map → path-2bYzpvRB.js.map} +1 -1
  17. package/dist-ssr/{path-sxXxpB6R.cjs → path-DCxJMpj7.cjs} +3 -1
  18. package/dist-ssr/{path-sxXxpB6R.cjs.map → path-DCxJMpj7.cjs.map} +1 -1
  19. package/dist-ssr/server.cjs +4 -3
  20. package/dist-ssr/server.cjs.map +1 -1
  21. package/dist-ssr/server.d.ts +4 -0
  22. package/dist-ssr/server.js +4 -3
  23. package/dist-ssr/server.js.map +1 -1
  24. package/dist-ssr/shared.cjs +1 -1
  25. package/dist-ssr/shared.js +1 -1
  26. package/dist-ssr/static.cjs +1 -1
  27. package/dist-ssr/static.d.ts +1 -0
  28. package/dist-ssr/static.js +1 -1
  29. package/dist-ssr/test.d.ts +1 -0
  30. package/dist-ssr/{url_parser-BX00zzMP.js → url_parser-B6dvK0DX.js} +2 -2
  31. package/dist-ssr/{url_parser-BX00zzMP.js.map → url_parser-B6dvK0DX.js.map} +1 -1
  32. package/dist-ssr/{url_parser-Dipo_fiS.cjs → url_parser-D7ZqJUTw.cjs} +2 -2
  33. package/dist-ssr/{url_parser-Dipo_fiS.cjs.map → url_parser-D7ZqJUTw.cjs.map} +1 -1
  34. package/package.json +1 -1
  35. package/src/components/RecursiveRender.svelte +37 -16
package/dist/client.mjs CHANGED
@@ -1,14 +1,14 @@
1
- var Xe = Object.defineProperty;
2
- var Ze = (e, t, r) => t in e ? Xe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var te = (e, t, r) => Ze(e, typeof t != "symbol" ? t + "" : t, r);
4
- import { p as Qe, a as D } from "./page.svelte-4uv4nQ2i.js";
5
- import { s as xr } from "./page.svelte-4uv4nQ2i.js";
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 et } from "svelte";
8
- import tt from "../src/components/RecursiveRender.svelte";
9
- import { writable as Ie, get as N } from "svelte/store";
10
- function rt(e) {
11
- const t = new Qe(e);
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,116 +18,116 @@ function rt(e) {
18
18
  return i;
19
19
  };
20
20
  }
21
- function nt(e) {
21
+ function st(e) {
22
22
  return e.map((t) => {
23
- const r = t.path, n = rt(r);
23
+ const r = t.path, n = at(r);
24
24
  return { pattern: r, parser: n };
25
25
  });
26
26
  }
27
- var ue = function(e, t) {
28
- return ue = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, n) {
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
- }, ue(e, t);
32
+ }, fe(e, t);
33
33
  };
34
- function M(e, t) {
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
- ue(e, t);
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 ot(e, t, r, n) {
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);
47
47
  });
48
48
  }
49
49
  return new (r || (r = Promise))(function(o, a) {
50
- function u(l) {
50
+ function c(l) {
51
51
  try {
52
- c(n.next(l));
53
- } catch (f) {
54
- a(f);
52
+ s(n.next(l));
53
+ } catch (p) {
54
+ a(p);
55
55
  }
56
56
  }
57
- function s(l) {
57
+ function u(l) {
58
58
  try {
59
- c(n.throw(l));
60
- } catch (f) {
61
- a(f);
59
+ s(n.throw(l));
60
+ } catch (p) {
61
+ a(p);
62
62
  }
63
63
  }
64
- function c(l) {
65
- l.done ? o(l.value) : i(l.value).then(u, s);
64
+ function s(l) {
65
+ l.done ? o(l.value) : i(l.value).then(c, u);
66
66
  }
67
- c((n = n.apply(e, t || [])).next());
67
+ s((n = n.apply(e, t || [])).next());
68
68
  });
69
69
  }
70
- function Pe(e, t) {
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];
74
74
  }, trys: [], ops: [] }, n, i, o, a = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
75
- return a.next = u(0), a.throw = u(1), a.return = u(2), typeof Symbol == "function" && (a[Symbol.iterator] = function() {
75
+ return a.next = c(0), a.throw = c(1), a.return = c(2), typeof Symbol == "function" && (a[Symbol.iterator] = function() {
76
76
  return this;
77
77
  }), a;
78
- function u(c) {
78
+ function c(s) {
79
79
  return function(l) {
80
- return s([c, l]);
80
+ return u([s, l]);
81
81
  };
82
82
  }
83
- function s(c) {
83
+ function u(s) {
84
84
  if (n) throw new TypeError("Generator is already executing.");
85
- for (; a && (a = 0, c[0] && (r = 0)), r; ) try {
86
- if (n = 1, i && (o = c[0] & 2 ? i.return : c[0] ? i.throw || ((o = i.return) && o.call(i), 0) : i.next) && !(o = o.call(i, c[1])).done) return o;
87
- switch (i = 0, o && (c = [c[0] & 2, o.value]), c[0]) {
85
+ for (; a && (a = 0, s[0] && (r = 0)), r; ) try {
86
+ if (n = 1, i && (o = s[0] & 2 ? i.return : s[0] ? i.throw || ((o = i.return) && o.call(i), 0) : i.next) && !(o = o.call(i, s[1])).done) return o;
87
+ switch (i = 0, o && (s = [s[0] & 2, o.value]), s[0]) {
88
88
  case 0:
89
89
  case 1:
90
- o = c;
90
+ o = s;
91
91
  break;
92
92
  case 4:
93
- return r.label++, { value: c[1], done: !1 };
93
+ return r.label++, { value: s[1], done: !1 };
94
94
  case 5:
95
- r.label++, i = c[1], c = [0];
95
+ r.label++, i = s[1], s = [0];
96
96
  continue;
97
97
  case 7:
98
- c = r.ops.pop(), r.trys.pop();
98
+ s = r.ops.pop(), r.trys.pop();
99
99
  continue;
100
100
  default:
101
- if (o = r.trys, !(o = o.length > 0 && o[o.length - 1]) && (c[0] === 6 || c[0] === 2)) {
101
+ if (o = r.trys, !(o = o.length > 0 && o[o.length - 1]) && (s[0] === 6 || s[0] === 2)) {
102
102
  r = 0;
103
103
  continue;
104
104
  }
105
- if (c[0] === 3 && (!o || c[1] > o[0] && c[1] < o[3])) {
106
- r.label = c[1];
105
+ if (s[0] === 3 && (!o || s[1] > o[0] && s[1] < o[3])) {
106
+ r.label = s[1];
107
107
  break;
108
108
  }
109
- if (c[0] === 6 && r.label < o[1]) {
110
- r.label = o[1], o = c;
109
+ if (s[0] === 6 && r.label < o[1]) {
110
+ r.label = o[1], o = s;
111
111
  break;
112
112
  }
113
113
  if (o && r.label < o[2]) {
114
- r.label = o[2], r.ops.push(c);
114
+ r.label = o[2], r.ops.push(s);
115
115
  break;
116
116
  }
117
117
  o[2] && r.ops.pop(), r.trys.pop();
118
118
  continue;
119
119
  }
120
- c = t.call(e, r);
120
+ s = t.call(e, r);
121
121
  } catch (l) {
122
- c = [6, l], i = 0;
122
+ s = [6, l], i = 0;
123
123
  } finally {
124
124
  n = o = 0;
125
125
  }
126
- if (c[0] & 5) throw c[1];
127
- return { value: c[0] ? c[1] : void 0, done: !0 };
126
+ if (s[0] & 5) throw s[1];
127
+ return { value: s[0] ? s[1] : void 0, done: !0 };
128
128
  }
129
129
  }
130
- function U(e) {
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,14 +137,14 @@ function U(e) {
137
137
  };
138
138
  throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
139
139
  }
140
- function k(e, t) {
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;
144
144
  try {
145
145
  for (; (t === void 0 || t-- > 0) && !(i = n.next()).done; ) o.push(i.value);
146
- } catch (u) {
147
- a = { error: u };
146
+ } catch (c) {
147
+ a = { error: c };
148
148
  } finally {
149
149
  try {
150
150
  i && !i.done && (r = n.return) && r.call(n);
@@ -154,81 +154,81 @@ function k(e, t) {
154
154
  }
155
155
  return o;
156
156
  }
157
- function B(e, t, r) {
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 F(e) {
163
- return this instanceof F ? (this.v = e, this) : new F(e);
162
+ function W(e) {
163
+ return this instanceof W ? (this.v = e, this) : new W(e);
164
164
  }
165
- function it(e, t, r) {
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
- return i = Object.create((typeof AsyncIterator == "function" ? AsyncIterator : Object).prototype), u("next"), u("throw"), u("return", a), i[Symbol.asyncIterator] = function() {
168
+ return i = Object.create((typeof AsyncIterator == "function" ? AsyncIterator : Object).prototype), c("next"), c("throw"), c("return", a), i[Symbol.asyncIterator] = function() {
169
169
  return this;
170
170
  }, i;
171
171
  function a(d) {
172
- return function(p) {
173
- return Promise.resolve(p).then(d, f);
172
+ return function(v) {
173
+ return Promise.resolve(v).then(d, p);
174
174
  };
175
175
  }
176
- function u(d, p) {
177
- n[d] && (i[d] = function(h) {
178
- return new Promise(function(S, g) {
179
- o.push([d, h, S, g]) > 1 || s(d, h);
176
+ function c(d, v) {
177
+ n[d] && (i[d] = function(f) {
178
+ return new Promise(function(S, _) {
179
+ o.push([d, f, S, _]) > 1 || u(d, f);
180
180
  });
181
- }, p && (i[d] = p(i[d])));
181
+ }, v && (i[d] = v(i[d])));
182
182
  }
183
- function s(d, p) {
183
+ function u(d, v) {
184
184
  try {
185
- c(n[d](p));
186
- } catch (h) {
187
- v(o[0][3], h);
185
+ s(n[d](v));
186
+ } catch (f) {
187
+ h(o[0][3], f);
188
188
  }
189
189
  }
190
- function c(d) {
191
- d.value instanceof F ? Promise.resolve(d.value.v).then(l, f) : v(o[0][2], d);
190
+ function s(d) {
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
- s("next", d);
194
+ u("next", d);
195
195
  }
196
- function f(d) {
197
- s("throw", d);
196
+ function p(d) {
197
+ u("throw", d);
198
198
  }
199
- function v(d, p) {
200
- d(p), o.shift(), o.length && s(o[0][0], o[0][1]);
199
+ function h(d, v) {
200
+ d(v), o.shift(), o.length && u(o[0][0], o[0][1]);
201
201
  }
202
202
  }
203
- function at(e) {
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 U == "function" ? U(e) : e[Symbol.iterator](), r = {}, n("next"), n("throw"), n("return"), r[Symbol.asyncIterator] = function() {
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) {
210
210
  r[o] = e[o] && function(a) {
211
- return new Promise(function(u, s) {
212
- a = e[o](a), i(u, s, a.done, a.value);
211
+ return new Promise(function(c, u) {
212
+ a = e[o](a), i(c, u, a.done, a.value);
213
213
  });
214
214
  };
215
215
  }
216
- function i(o, a, u, s) {
217
- Promise.resolve(s).then(function(c) {
218
- o({ value: c, done: u });
216
+ function i(o, a, c, u) {
217
+ Promise.resolve(u).then(function(s) {
218
+ o({ value: s, done: c });
219
219
  }, a);
220
220
  }
221
221
  }
222
222
  function w(e) {
223
223
  return typeof e == "function";
224
224
  }
225
- function he(e) {
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 re = he(function(e) {
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 ce(e, t) {
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 Z = (function() {
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,15 +255,15 @@ var Z = (function() {
255
255
  if (a)
256
256
  if (this._parentage = null, Array.isArray(a))
257
257
  try {
258
- for (var u = U(a), s = u.next(); !s.done; s = u.next()) {
259
- var c = s.value;
260
- c.remove(this);
258
+ for (var c = q(a), u = c.next(); !u.done; u = c.next()) {
259
+ var s = u.value;
260
+ s.remove(this);
261
261
  }
262
- } catch (h) {
263
- t = { error: h };
262
+ } catch (f) {
263
+ t = { error: f };
264
264
  } finally {
265
265
  try {
266
- s && !s.done && (r = u.return) && r.call(u);
266
+ u && !u.done && (r = c.return) && r.call(c);
267
267
  } finally {
268
268
  if (t) throw t.error;
269
269
  }
@@ -274,39 +274,39 @@ var Z = (function() {
274
274
  if (w(l))
275
275
  try {
276
276
  l();
277
- } catch (h) {
278
- o = h instanceof re ? h.errors : [h];
277
+ } catch (f) {
278
+ o = f instanceof ie ? f.errors : [f];
279
279
  }
280
- var f = this._finalizers;
281
- if (f) {
280
+ var p = this._finalizers;
281
+ if (p) {
282
282
  this._finalizers = null;
283
283
  try {
284
- for (var v = U(f), d = v.next(); !d.done; d = v.next()) {
285
- var p = d.value;
284
+ for (var h = q(p), d = h.next(); !d.done; d = h.next()) {
285
+ var v = d.value;
286
286
  try {
287
- ge(p);
288
- } catch (h) {
289
- o = o ?? [], h instanceof re ? o = B(B([], k(o)), k(h.errors)) : o.push(h);
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 (h) {
293
- n = { error: h };
292
+ } catch (f) {
293
+ n = { error: f };
294
294
  } finally {
295
295
  try {
296
- d && !d.done && (i = v.return) && i.call(v);
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 re(o);
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
- ge(t);
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) && ce(r, t);
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 && ce(r, t), t instanceof e && t._removeParent(this);
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
- })(), Re = Z.EMPTY;
335
- function Ce(e) {
336
- return e instanceof Z || e && "closed" in e && w(e.remove) && w(e.add) && w(e.unsubscribe);
334
+ })(), Le = te.EMPTY;
335
+ function Ne(e) {
336
+ return e instanceof te || e && "closed" in e && w(e.remove) && w(e.add) && w(e.unsubscribe);
337
337
  }
338
- function ge(e) {
338
+ function Ee(e) {
339
339
  w(e) ? e() : e.unsubscribe();
340
340
  }
341
- var st = {
341
+ var ft = {
342
342
  Promise: void 0
343
- }, ut = {
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, B([e, t], k(r)));
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 je(e) {
355
- ut.setTimeout(function() {
354
+ function Fe(e) {
355
+ dt.setTimeout(function() {
356
356
  throw e;
357
357
  });
358
358
  }
359
- function Se() {
359
+ function Oe() {
360
360
  }
361
- function Y(e) {
361
+ function Z(e) {
362
362
  e();
363
363
  }
364
- var pe = (function(e) {
365
- M(t, e);
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, Ce(r) && r.add(n)) : n.destination = ft, n;
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 $(r, n, i);
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
- })(Z), ct = (function() {
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
- H(n);
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
- H(n);
413
+ K(n);
414
414
  }
415
415
  else
416
- H(t);
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
- H(r);
423
+ K(r);
424
424
  }
425
425
  }, e;
426
- })(), $ = (function(e) {
427
- M(t, e);
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
430
  return w(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 ct(a), o;
434
+ } : a = r, o.destination = new ht(a), o;
435
435
  }
436
436
  return t;
437
- })(pe);
438
- function H(e) {
439
- je(e);
437
+ })(ye);
438
+ function K(e) {
439
+ Fe(e);
440
440
  }
441
- function lt(e) {
441
+ function pt(e) {
442
442
  throw e;
443
443
  }
444
- var ft = {
444
+ var vt = {
445
445
  closed: !0,
446
- next: Se,
447
- error: lt,
448
- complete: Se
449
- }, ve = (function() {
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 me(e) {
452
+ function we(e) {
453
453
  return e;
454
454
  }
455
- function dt(e) {
456
- return e.length === 0 ? me : e.length === 1 ? e[0] : function(r) {
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 E = (function() {
462
+ var x = (function() {
463
463
  function e(t) {
464
464
  t && (this._subscribe = t);
465
465
  }
@@ -467,10 +467,10 @@ 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 = pt(t) ? t : new $(t, r, n);
471
- return Y(function() {
472
- var a = i, u = a.operator, s = a.source;
473
- o.add(u ? u.call(o, s) : s ? i._subscribe(o) : i._trySubscribe(o));
470
+ var i = this, o = bt(t) ? t : new B(t, r, n);
471
+ return Z(function() {
472
+ var a = i, c = a.operator, u = a.source;
473
+ o.add(c ? c.call(o, u) : u ? i._subscribe(o) : i._trySubscribe(o));
474
474
  }), o;
475
475
  }, e.prototype._trySubscribe = function(t) {
476
476
  try {
@@ -480,13 +480,13 @@ var E = (function() {
480
480
  }
481
481
  }, e.prototype.forEach = function(t, r) {
482
482
  var n = this;
483
- return r = _e(r), new r(function(i, o) {
484
- var a = new $({
485
- next: function(u) {
483
+ return r = xe(r), new r(function(i, o) {
484
+ var a = new B({
485
+ next: function(c) {
486
486
  try {
487
- t(u);
488
- } catch (s) {
489
- o(s), a.unsubscribe();
487
+ t(c);
488
+ } catch (u) {
489
+ o(u), a.unsubscribe();
490
490
  }
491
491
  },
492
492
  error: o,
@@ -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[ve] = function() {
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 dt(t)(this);
505
+ return mt(t)(this);
506
506
  }, e.prototype.toPromise = function(t) {
507
507
  var r = this;
508
- return t = _e(t), new t(function(n, i) {
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 _e(e) {
522
+ function xe(e) {
523
523
  var t;
524
- return (t = e ?? st.Promise) !== null && t !== void 0 ? t : Promise;
524
+ return (t = e ?? ft.Promise) !== null && t !== void 0 ? t : Promise;
525
525
  }
526
- function ht(e) {
526
+ function yt(e) {
527
527
  return e && w(e.next) && w(e.error) && w(e.complete);
528
528
  }
529
- function pt(e) {
530
- return e && e instanceof pe || ht(e) && Ce(e);
529
+ function bt(e) {
530
+ return e && e instanceof ye || yt(e) && Ne(e);
531
531
  }
532
- function vt(e) {
532
+ function wt(e) {
533
533
  return w(e == null ? void 0 : e.lift);
534
534
  }
535
- function T(e) {
535
+ function j(e) {
536
536
  return function(t) {
537
- if (vt(t))
537
+ if (wt(t))
538
538
  return t.lift(function(r) {
539
539
  try {
540
540
  return e(r, this);
@@ -545,36 +545,36 @@ function T(e) {
545
545
  throw new TypeError("Unable to lift unknown Observable type");
546
546
  };
547
547
  }
548
- function A(e, t, r, n, i) {
549
- return new mt(e, t, r, n, i);
548
+ function C(e, t, r, n, i) {
549
+ return new gt(e, t, r, n, i);
550
550
  }
551
- var mt = (function(e) {
552
- M(t, e);
553
- function t(r, n, i, o, a, u) {
554
- var s = e.call(this, r) || this;
555
- return s.onFinalize = a, s.shouldUnsubscribe = u, s._next = n ? function(c) {
551
+ var gt = (function(e) {
552
+ G(t, e);
553
+ function t(r, n, i, o, a, c) {
554
+ var u = e.call(this, r) || this;
555
+ return u.onFinalize = a, u.shouldUnsubscribe = c, u._next = n ? function(s) {
556
556
  try {
557
- n(c);
557
+ n(s);
558
558
  } catch (l) {
559
559
  r.error(l);
560
560
  }
561
- } : e.prototype._next, s._error = o ? function(c) {
561
+ } : e.prototype._next, u._error = o ? function(s) {
562
562
  try {
563
- o(c);
563
+ o(s);
564
564
  } catch (l) {
565
565
  r.error(l);
566
566
  } finally {
567
567
  this.unsubscribe();
568
568
  }
569
- } : e.prototype._error, s._complete = i ? function() {
569
+ } : e.prototype._error, u._complete = i ? function() {
570
570
  try {
571
571
  i();
572
- } catch (c) {
573
- r.error(c);
572
+ } catch (s) {
573
+ r.error(s);
574
574
  } finally {
575
575
  this.unsubscribe();
576
576
  }
577
- } : e.prototype._complete, s;
577
+ } : e.prototype._complete, u;
578
578
  }
579
579
  return t.prototype.unsubscribe = function() {
580
580
  var r;
@@ -583,38 +583,38 @@ 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
- })(pe), yt = he(function(e) {
586
+ })(ye), St = me(function(e) {
587
587
  return function() {
588
588
  e(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
589
589
  };
590
- }), Q = (function(e) {
591
- M(t, e);
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 Ee(this, this);
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 yt();
601
+ throw new St();
602
602
  }, t.prototype.next = function(r) {
603
603
  var n = this;
604
- Y(function() {
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 = U(n.currentObservers), u = a.next(); !u.done; u = a.next()) {
610
- var s = u.value;
611
- s.next(r);
609
+ for (var a = q(n.currentObservers), c = a.next(); !c.done; c = a.next()) {
610
+ var u = c.value;
611
+ u.next(r);
612
612
  }
613
- } catch (c) {
614
- i = { error: c };
613
+ } catch (s) {
614
+ i = { error: s };
615
615
  } finally {
616
616
  try {
617
- u && !u.done && (o = a.return) && o.call(a);
617
+ c && !c.done && (o = a.return) && o.call(a);
618
618
  } finally {
619
619
  if (i) throw i.error;
620
620
  }
@@ -623,7 +623,7 @@ var mt = (function(e) {
623
623
  });
624
624
  }, t.prototype.error = function(r) {
625
625
  var n = this;
626
- Y(function() {
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
- Y(function() {
635
+ Z(function() {
636
636
  if (r._throwIfClosed(), !r.isStopped) {
637
637
  r.isStopped = !0;
638
638
  for (var n = r.observers; n.length; )
@@ -653,21 +653,21 @@ var mt = (function(e) {
653
653
  }, t.prototype._subscribe = function(r) {
654
654
  return this._throwIfClosed(), this._checkFinalizedStatuses(r), this._innerSubscribe(r);
655
655
  }, t.prototype._innerSubscribe = function(r) {
656
- var n = this, i = this, o = i.hasError, a = i.isStopped, u = i.observers;
657
- return o || a ? Re : (this.currentObservers = null, u.push(r), new Z(function() {
658
- n.currentObservers = null, ce(u, r);
656
+ var n = this, i = this, o = i.hasError, a = i.isStopped, c = i.observers;
657
+ return o || a ? Le : (this.currentObservers = null, c.push(r), new te(function() {
658
+ n.currentObservers = null, de(c, 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 E();
664
+ var r = new x();
665
665
  return r.source = this, r;
666
666
  }, t.create = function(r, n) {
667
- return new Ee(r, n);
667
+ return new Ae(r, n);
668
668
  }, t;
669
- })(E), Ee = (function(e) {
670
- M(t, e);
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,75 +683,75 @@ 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 : Re;
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
- })(Q), Le = {
688
+ })(re), Ue = {
689
689
  now: function() {
690
- return (Le.delegate || Date).now();
690
+ return (Ue.delegate || Date).now();
691
691
  },
692
692
  delegate: void 0
693
- }, bt = (function(e) {
694
- M(t, e);
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 = Le);
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
  }
700
700
  return t.prototype.next = function(r) {
701
- var n = this, i = n.isStopped, o = n._buffer, a = n._infiniteTimeWindow, u = n._timestampProvider, s = n._windowTime;
702
- i || (o.push(r), !a && o.push(u.now() + s)), this._trimBuffer(), e.prototype.next.call(this, r);
701
+ var n = this, i = n.isStopped, o = n._buffer, a = n._infiniteTimeWindow, c = n._timestampProvider, u = n._windowTime;
702
+ i || (o.push(r), !a && o.push(c.now() + u)), this._trimBuffer(), e.prototype.next.call(this, r);
703
703
  }, t.prototype._subscribe = function(r) {
704
704
  this._throwIfClosed(), this._trimBuffer();
705
- for (var n = this._innerSubscribe(r), i = this, o = i._infiniteTimeWindow, a = i._buffer, u = a.slice(), s = 0; s < u.length && !r.closed; s += o ? 1 : 2)
706
- r.next(u[s]);
705
+ for (var n = this._innerSubscribe(r), i = this, o = i._infiniteTimeWindow, a = i._buffer, c = a.slice(), u = 0; u < c.length && !r.closed; u += o ? 1 : 2)
706
+ r.next(c[u]);
707
707
  return this._checkFinalizedStatuses(r), n;
708
708
  }, t.prototype._trimBuffer = function() {
709
- var r = this, n = r._bufferSize, i = r._timestampProvider, o = r._buffer, a = r._infiniteTimeWindow, u = (a ? 1 : 2) * n;
710
- if (n < 1 / 0 && u < o.length && o.splice(0, o.length - u), !a) {
711
- for (var s = i.now(), c = 0, l = 1; l < o.length && o[l] <= s; l += 2)
712
- c = l;
713
- c && o.splice(0, c + 1);
709
+ var r = this, n = r._bufferSize, i = r._timestampProvider, o = r._buffer, a = r._infiniteTimeWindow, c = (a ? 1 : 2) * n;
710
+ if (n < 1 / 0 && c < o.length && o.splice(0, o.length - c), !a) {
711
+ for (var u = i.now(), s = 0, l = 1; l < o.length && o[l] <= u; l += 2)
712
+ s = l;
713
+ s && o.splice(0, s + 1);
714
714
  }
715
715
  }, t;
716
- })(Q), ye = (function(e) {
716
+ })(re), ge = (function(e) {
717
717
  return e && typeof e.length == "number" && typeof e != "function";
718
718
  });
719
- function Ne(e) {
719
+ function ke(e) {
720
720
  return w(e == null ? void 0 : e.then);
721
721
  }
722
- function Fe(e) {
723
- return w(e[ve]);
722
+ function $e(e) {
723
+ return w(e[be]);
724
724
  }
725
- function Ue(e) {
725
+ function Me(e) {
726
726
  return Symbol.asyncIterator && w(e == null ? void 0 : e[Symbol.asyncIterator]);
727
727
  }
728
- function ke(e) {
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 wt() {
731
+ function Et() {
732
732
  return typeof Symbol != "function" || !Symbol.iterator ? "@@iterator" : Symbol.iterator;
733
733
  }
734
- var $e = wt();
735
- function Me(e) {
736
- return w(e == null ? void 0 : e[$e]);
734
+ var We = Et();
735
+ function qe(e) {
736
+ return w(e == null ? void 0 : e[We]);
737
737
  }
738
- function De(e) {
739
- return it(this, arguments, function() {
738
+ function ze(e) {
739
+ return ct(this, arguments, function() {
740
740
  var r, n, i, o;
741
- return Pe(this, function(a) {
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, F(r.read())];
748
+ return [4, W(r.read())];
749
749
  case 3:
750
- return n = a.sent(), i = n.value, o = n.done, o ? [4, F(void 0)] : [3, 5];
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, F(i)];
754
+ return [4, W(i)];
755
755
  case 6:
756
756
  return [4, a.sent()];
757
757
  case 7:
@@ -766,63 +766,63 @@ function De(e) {
766
766
  });
767
767
  });
768
768
  }
769
- function We(e) {
769
+ function Be(e) {
770
770
  return w(e == null ? void 0 : e.getReader);
771
771
  }
772
- function I(e) {
773
- if (e instanceof E)
772
+ function L(e) {
773
+ if (e instanceof x)
774
774
  return e;
775
775
  if (e != null) {
776
- if (Fe(e))
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 ke(e);
789
+ throw De(e);
790
790
  }
791
- function gt(e) {
792
- return new E(function(t) {
793
- var r = e[ve]();
791
+ function Ot(e) {
792
+ return new x(function(t) {
793
+ var r = e[be]();
794
794
  if (w(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 St(e) {
800
- return new E(function(t) {
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 _t(e) {
807
- return new E(function(t) {
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, je);
812
+ }).then(null, Fe);
813
813
  });
814
814
  }
815
- function Et(e) {
816
- return new E(function(t) {
815
+ function Tt(e) {
816
+ return new x(function(t) {
817
817
  var r, n;
818
818
  try {
819
- for (var i = U(e), o = i.next(); !o.done; o = i.next()) {
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;
823
823
  }
824
- } catch (u) {
825
- r = { error: u };
824
+ } catch (c) {
825
+ r = { error: c };
826
826
  } finally {
827
827
  try {
828
828
  o && !o.done && (n = i.return) && n.call(i);
@@ -833,41 +833,41 @@ function Et(e) {
833
833
  t.complete();
834
834
  });
835
835
  }
836
- function qe(e) {
837
- return new E(function(t) {
838
- xt(e, t).catch(function(r) {
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 Ot(e) {
844
- return qe(De(e));
843
+ function It(e) {
844
+ return Ge(ze(e));
845
845
  }
846
- function xt(e, t) {
846
+ function Pt(e, t) {
847
847
  var r, n, i, o;
848
- return ot(this, void 0, void 0, function() {
849
- var a, u;
850
- return Pe(this, function(s) {
851
- switch (s.label) {
848
+ return ut(this, void 0, void 0, function() {
849
+ var a, c;
850
+ return je(this, function(u) {
851
+ switch (u.label) {
852
852
  case 0:
853
- s.trys.push([0, 5, 6, 11]), r = at(e), s.label = 1;
853
+ u.trys.push([0, 5, 6, 11]), r = lt(e), u.label = 1;
854
854
  case 1:
855
855
  return [4, r.next()];
856
856
  case 2:
857
- if (n = s.sent(), !!n.done) return [3, 4];
857
+ if (n = u.sent(), !!n.done) return [3, 4];
858
858
  if (a = n.value, t.next(a), t.closed)
859
859
  return [2];
860
- s.label = 3;
860
+ u.label = 3;
861
861
  case 3:
862
862
  return [3, 1];
863
863
  case 4:
864
864
  return [3, 11];
865
865
  case 5:
866
- return u = s.sent(), i = { error: u }, [3, 11];
866
+ return c = u.sent(), i = { error: c }, [3, 11];
867
867
  case 6:
868
- return s.trys.push([6, , 9, 10]), n && !n.done && (o = r.return) ? [4, o.call(r)] : [3, 8];
868
+ return u.trys.push([6, , 9, 10]), n && !n.done && (o = r.return) ? [4, o.call(r)] : [3, 8];
869
869
  case 7:
870
- s.sent(), s.label = 8;
870
+ u.sent(), u.label = 8;
871
871
  case 8:
872
872
  return [3, 10];
873
873
  case 9:
@@ -881,7 +881,7 @@ function xt(e, t) {
881
881
  });
882
882
  });
883
883
  }
884
- function j(e, t, r, n, i) {
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,54 +889,54 @@ function j(e, t, r, n, i) {
889
889
  if (e.add(o), !i)
890
890
  return o;
891
891
  }
892
- function Be(e, t) {
893
- return t === void 0 && (t = 0), T(function(r, n) {
894
- r.subscribe(A(n, function(i) {
895
- return j(n, e, function() {
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 j(n, e, function() {
899
+ return $(n, e, function() {
900
900
  return n.complete();
901
901
  }, t);
902
902
  }, function(i) {
903
- return j(n, e, function() {
903
+ return $(n, e, function() {
904
904
  return n.error(i);
905
905
  }, t);
906
906
  }));
907
907
  });
908
908
  }
909
- function Ge(e, t) {
910
- return t === void 0 && (t = 0), T(function(r, n) {
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 At(e, t) {
917
- return I(e).pipe(Ge(t), Be(t));
916
+ function Rt(e, t) {
917
+ return L(e).pipe(He(t), Ve(t));
918
918
  }
919
- function Tt(e, t) {
920
- return I(e).pipe(Ge(t), Be(t));
919
+ function Ct(e, t) {
920
+ return L(e).pipe(He(t), Ve(t));
921
921
  }
922
- function It(e, t) {
923
- return new E(function(r) {
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 Pt(e, t) {
931
- return new E(function(r) {
930
+ function Lt(e, t) {
931
+ return new x(function(r) {
932
932
  var n;
933
- return j(r, t, function() {
934
- n = e[$e](), j(r, t, function() {
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;
938
- } catch (u) {
939
- r.error(u);
938
+ } catch (c) {
939
+ r.error(c);
940
940
  return;
941
941
  }
942
942
  a ? r.complete() : r.next(o);
@@ -946,13 +946,13 @@ function Pt(e, t) {
946
946
  };
947
947
  });
948
948
  }
949
- function ze(e, t) {
949
+ function Ye(e, t) {
950
950
  if (!e)
951
951
  throw new Error("Iterable cannot be null");
952
- return new E(function(r) {
953
- j(r, t, function() {
952
+ return new x(function(r) {
953
+ $(r, t, function() {
954
954
  var n = e[Symbol.asyncIterator]();
955
- j(r, t, function() {
955
+ $(r, t, function() {
956
956
  n.next().then(function(i) {
957
957
  i.done ? r.complete() : r.next(i.value);
958
958
  });
@@ -960,202 +960,202 @@ function ze(e, t) {
960
960
  });
961
961
  });
962
962
  }
963
- function Rt(e, t) {
964
- return ze(De(e), t);
963
+ function Nt(e, t) {
964
+ return Ye(ze(e), t);
965
965
  }
966
- function Ct(e, t) {
966
+ function Ft(e, t) {
967
967
  if (e != null) {
968
- if (Fe(e))
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 ke(e);
981
+ throw De(e);
982
982
  }
983
- function He(e, t) {
984
- return t ? Ct(e, t) : I(e);
983
+ function Je(e, t) {
984
+ return t ? Ft(e, t) : L(e);
985
985
  }
986
- var jt = he(function(e) {
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 Lt(e, t) {
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 jt());
999
+ n(new Ut());
1000
1000
  }
1001
1001
  });
1002
1002
  e.subscribe(i);
1003
1003
  });
1004
1004
  }
1005
- function be(e, t) {
1006
- return T(function(r, n) {
1005
+ function Se(e, t) {
1006
+ return j(function(r, n) {
1007
1007
  var i = 0;
1008
- r.subscribe(A(n, function(o) {
1008
+ r.subscribe(C(n, function(o) {
1009
1009
  n.next(e.call(t, o, i++));
1010
1010
  }));
1011
1011
  });
1012
1012
  }
1013
- var Nt = Array.isArray;
1014
- function Ft(e, t) {
1015
- return Nt(t) ? e.apply(void 0, B([], k(t))) : e(t);
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 Ut(e) {
1018
- return be(function(t) {
1019
- return Ft(e, t);
1017
+ function Dt(e) {
1018
+ return Se(function(t) {
1019
+ return Mt(e, t);
1020
1020
  });
1021
1021
  }
1022
- function kt(e, t, r, n, i, o, a, u) {
1023
- var s = [], c = 0, l = 0, f = !1, v = function() {
1024
- f && !s.length && !c && t.complete();
1025
- }, d = function(h) {
1026
- return c < n ? p(h) : s.push(h);
1027
- }, p = function(h) {
1028
- c++;
1022
+ function Wt(e, t, r, n, i, o, a, c) {
1023
+ var u = [], s = 0, l = 0, p = !1, h = function() {
1024
+ p && !u.length && !s && t.complete();
1025
+ }, d = function(f) {
1026
+ return s < n ? v(f) : u.push(f);
1027
+ }, v = function(f) {
1028
+ s++;
1029
1029
  var S = !1;
1030
- I(r(h, l++)).subscribe(A(t, function(g) {
1031
- t.next(g);
1030
+ L(r(f, l++)).subscribe(C(t, function(_) {
1031
+ t.next(_);
1032
1032
  }, function() {
1033
1033
  S = !0;
1034
1034
  }, void 0, function() {
1035
1035
  if (S)
1036
1036
  try {
1037
- c--;
1038
- for (var g = function() {
1039
- var m = s.shift();
1040
- a || p(m);
1041
- }; s.length && c < n; )
1042
- g();
1043
- v();
1044
- } catch (m) {
1045
- t.error(m);
1037
+ s--;
1038
+ for (var _ = function() {
1039
+ var g = u.shift();
1040
+ a || v(g);
1041
+ }; u.length && s < n; )
1042
+ _();
1043
+ h();
1044
+ } catch (g) {
1045
+ t.error(g);
1046
1046
  }
1047
1047
  }));
1048
1048
  };
1049
- return e.subscribe(A(t, d, function() {
1050
- f = !0, v();
1049
+ return e.subscribe(C(t, d, function() {
1050
+ p = !0, h();
1051
1051
  })), function() {
1052
1052
  };
1053
1053
  }
1054
- function Ve(e, t, r) {
1055
- return r === void 0 && (r = 1 / 0), w(t) ? Ve(function(n, i) {
1056
- return be(function(o, a) {
1054
+ function Ke(e, t, r) {
1055
+ return r === void 0 && (r = 1 / 0), w(t) ? Ke(function(n, i) {
1056
+ return Se(function(o, a) {
1057
1057
  return t(n, o, i, a);
1058
- })(I(e(n, i)));
1059
- }, r) : (typeof t == "number" && (r = t), T(function(n, i) {
1060
- return kt(n, i, e, r);
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 $t = ["addListener", "removeListener"], Mt = ["addEventListener", "removeEventListener"], Dt = ["on", "off"];
1064
- function le(e, t, r, n) {
1063
+ var qt = ["addListener", "removeListener"], zt = ["addEventListener", "removeEventListener"], Bt = ["on", "off"];
1064
+ function he(e, t, r, n) {
1065
1065
  if (w(r) && (n = r, r = void 0), n)
1066
- return le(e, t, r).pipe(Ut(n));
1067
- var i = k(Bt(e) ? Mt.map(function(u) {
1068
- return function(s) {
1069
- return e[u](t, s, r);
1066
+ return he(e, t, r).pipe(Dt(n));
1067
+ var i = z(Ht(e) ? zt.map(function(c) {
1068
+ return function(u) {
1069
+ return e[c](t, u, r);
1070
1070
  };
1071
- }) : Wt(e) ? $t.map(Oe(e, t)) : qt(e) ? Dt.map(Oe(e, t)) : [], 2), o = i[0], a = i[1];
1072
- if (!o && ye(e))
1073
- return Ve(function(u) {
1074
- return le(u, t, r);
1075
- })(I(e));
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(c) {
1074
+ return he(c, t, r);
1075
+ })(L(e));
1076
1076
  if (!o)
1077
1077
  throw new TypeError("Invalid event target");
1078
- return new E(function(u) {
1079
- var s = function() {
1080
- for (var c = [], l = 0; l < arguments.length; l++)
1081
- c[l] = arguments[l];
1082
- return u.next(1 < c.length ? c : c[0]);
1078
+ return new x(function(c) {
1079
+ var u = function() {
1080
+ for (var s = [], l = 0; l < arguments.length; l++)
1081
+ s[l] = arguments[l];
1082
+ return c.next(1 < s.length ? s : s[0]);
1083
1083
  };
1084
- return o(s), function() {
1085
- return a(s);
1084
+ return o(u), function() {
1085
+ return a(u);
1086
1086
  };
1087
1087
  });
1088
1088
  }
1089
- function Oe(e, t) {
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 Wt(e) {
1096
+ function Gt(e) {
1097
1097
  return w(e.addListener) && w(e.removeListener);
1098
1098
  }
1099
- function qt(e) {
1099
+ function Vt(e) {
1100
1100
  return w(e.on) && w(e.off);
1101
1101
  }
1102
- function Bt(e) {
1102
+ function Ht(e) {
1103
1103
  return w(e.addEventListener) && w(e.removeEventListener);
1104
1104
  }
1105
- function ne(e, t) {
1106
- return T(function(r, n) {
1105
+ function ae(e, t) {
1106
+ return j(function(r, n) {
1107
1107
  var i = 0;
1108
- r.subscribe(A(n, function(o) {
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 Gt(e, t) {
1114
- return t === void 0 && (t = me), e = e ?? zt, T(function(r, n) {
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(A(n, function(a) {
1117
- var u = t(a);
1118
- (o || !e(i, u)) && (o = !1, i = u, n.next(a));
1116
+ r.subscribe(C(n, function(a) {
1117
+ var c = t(a);
1118
+ (o || !e(i, c)) && (o = !1, i = c, n.next(a));
1119
1119
  }));
1120
1120
  });
1121
1121
  }
1122
- function zt(e, t) {
1122
+ function Jt(e, t) {
1123
1123
  return e === t;
1124
1124
  }
1125
- function Ht(e) {
1125
+ function Kt(e) {
1126
1126
  e === void 0 && (e = {});
1127
1127
  var t = e.connector, r = t === void 0 ? function() {
1128
- return new Q();
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
- return function(c) {
1131
- var l, f, v, d = 0, p = !1, h = !1, S = function() {
1132
- f == null || f.unsubscribe(), f = void 0;
1128
+ return new re();
1129
+ } : t, n = e.resetOnError, i = n === void 0 ? !0 : n, o = e.resetOnComplete, a = o === void 0 ? !0 : o, c = e.resetOnRefCountZero, u = c === void 0 ? !0 : c;
1130
+ return function(s) {
1131
+ var l, p, h, d = 0, v = !1, f = !1, S = function() {
1132
+ p == null || p.unsubscribe(), p = void 0;
1133
+ }, _ = function() {
1134
+ S(), l = h = void 0, v = f = !1;
1133
1135
  }, g = function() {
1134
- S(), l = v = void 0, p = h = !1;
1135
- }, m = function() {
1136
1136
  var b = l;
1137
- g(), b == null || b.unsubscribe();
1137
+ _(), b == null || b.unsubscribe();
1138
1138
  };
1139
- return T(function(b, O) {
1140
- d++, !h && !p && S();
1141
- var G = v = v ?? r();
1142
- O.add(function() {
1143
- d--, d === 0 && !h && !p && (f = oe(m, s));
1144
- }), G.subscribe(O), !l && d > 0 && (l = new $({
1145
- next: function(z) {
1146
- return G.next(z);
1139
+ return j(function(b, 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, u));
1144
+ }), I.subscribe(T), !l && d > 0 && (l = new B({
1145
+ next: function(P) {
1146
+ return I.next(P);
1147
1147
  },
1148
- error: function(z) {
1149
- h = !0, S(), f = oe(g, i, z), G.error(z);
1148
+ error: function(P) {
1149
+ f = !0, S(), p = se(_, i, P), I.error(P);
1150
1150
  },
1151
1151
  complete: function() {
1152
- p = !0, S(), f = oe(g, a), G.complete();
1152
+ v = !0, S(), p = se(_, a), I.complete();
1153
1153
  }
1154
- }), I(b).subscribe(l));
1155
- })(c);
1154
+ }), L(b).subscribe(l));
1155
+ })(s);
1156
1156
  };
1157
1157
  }
1158
- function oe(e, t) {
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,98 +1163,98 @@ 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 I(t.apply(void 0, B([], k(r)))).subscribe(i);
1171
+ return L(t.apply(void 0, Y([], z(r)))).subscribe(i);
1172
1172
  }
1173
1173
  }
1174
- function Ye(e, t) {
1175
- return T(function(r, n) {
1176
- var i = null, o = 0, a = !1, u = function() {
1174
+ function Xe(e, t) {
1175
+ return j(function(r, n) {
1176
+ var i = null, o = 0, a = !1, c = function() {
1177
1177
  return a && !i && n.complete();
1178
1178
  };
1179
- r.subscribe(A(n, function(s) {
1179
+ r.subscribe(C(n, function(u) {
1180
1180
  i == null || i.unsubscribe();
1181
- var c = 0, l = o++;
1182
- I(e(s, l)).subscribe(i = A(n, function(f) {
1183
- return n.next(t ? t(s, f, l, c++) : f);
1181
+ var s = 0, l = o++;
1182
+ L(e(u, l)).subscribe(i = C(n, function(p) {
1183
+ return n.next(t ? t(u, p, l, s++) : p);
1184
1184
  }, function() {
1185
- i = null, u();
1185
+ i = null, c();
1186
1186
  }));
1187
1187
  }, function() {
1188
- a = !0, u();
1188
+ a = !0, c();
1189
1189
  }));
1190
1190
  });
1191
1191
  }
1192
- function Vt(e, t, r) {
1192
+ function Xt(e, t, r) {
1193
1193
  var n = w(e) || t || r ? { next: e, error: t, complete: r } : e;
1194
- return n ? T(function(i, o) {
1194
+ return n ? j(function(i, o) {
1195
1195
  var a;
1196
1196
  (a = n.subscribe) === null || a === void 0 || a.call(n);
1197
- var u = !0;
1198
- i.subscribe(A(o, function(s) {
1199
- var c;
1200
- (c = n.next) === null || c === void 0 || c.call(n, s), o.next(s);
1197
+ var c = !0;
1198
+ i.subscribe(C(o, function(u) {
1199
+ var s;
1200
+ (s = n.next) === null || s === void 0 || s.call(n, u), o.next(u);
1201
1201
  }, function() {
1202
+ var u;
1203
+ c = !1, (u = n.complete) === null || u === void 0 || u.call(n), o.complete();
1204
+ }, function(u) {
1202
1205
  var s;
1203
- u = !1, (s = n.complete) === null || s === void 0 || s.call(n), o.complete();
1204
- }, function(s) {
1205
- var c;
1206
- u = !1, (c = n.error) === null || c === void 0 || c.call(n, s), o.error(s);
1206
+ c = !1, (s = n.error) === null || s === void 0 || s.call(n, u), o.error(u);
1207
1207
  }, function() {
1208
- var s, c;
1209
- u && ((s = n.unsubscribe) === null || s === void 0 || s.call(n)), (c = n.finalize) === null || c === void 0 || c.call(n);
1208
+ var u, s;
1209
+ c && ((u = n.unsubscribe) === null || u === void 0 || u.call(n)), (s = n.finalize) === null || s === void 0 || s.call(n);
1210
1210
  }));
1211
- }) : me;
1211
+ }) : we;
1212
1212
  }
1213
- const W = Ie({});
1214
- async function Yt() {
1215
- W.update((e) => (Object.assign(e, window.__MANIFEST__), e));
1213
+ const V = Ce({});
1214
+ async function Zt() {
1215
+ V.update((e) => (Object.assign(e, window.__MANIFEST__), e));
1216
1216
  }
1217
- const P = /* @__PURE__ */ new Map(), J = 5e3;
1218
- function Jt(e) {
1219
- const t = P.get(e);
1220
- return t ? (P.delete(e), Date.now() - t.createdAt > J ? (t.abortController.abort(), null) : t.response$) : null;
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 Kt(e, t) {
1223
- le(document, "mouseover").pipe(Ht()).pipe(
1222
+ function er(e, t) {
1223
+ he(document, "mouseover").pipe(Kt()).pipe(
1224
1224
  // Extract <a> element from hover target
1225
- be((i) => {
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
- const u = a.getAttribute("href");
1229
- return !u || !u.startsWith("/") && !u.startsWith(".") ? null : u;
1228
+ const c = a.getAttribute("href");
1229
+ return !c || !c.startsWith("/") && !c.startsWith(".") ? null : c;
1230
1230
  }),
1231
1231
  // Drop non-link hovers
1232
- ne((i) => i !== null),
1232
+ ae((i) => i !== null),
1233
1233
  // Drop if same URL as current page
1234
- ne((i) => i !== window.location.pathname),
1234
+ ae((i) => i !== window.location.pathname),
1235
1235
  // Deduplicate consecutive hovers to same URL
1236
- Gt(),
1236
+ Yt(),
1237
1237
  // Check that route requires server data
1238
- ne((i) => {
1239
- const o = i.split("?")[0], a = "get", u = e.find(
1240
- (l) => l.method.toLowerCase() === a && t.find((f) => f.parser(o) && f.pattern === l.path)
1238
+ ae((i) => {
1239
+ const o = i.split("?")[0], a = "get", c = e.find(
1240
+ (l) => l.method.toLowerCase() === a && t.find((p) => p.parser(o) && p.pattern === l.path)
1241
1241
  );
1242
- if (!u) return !1;
1243
- const s = t.find((l) => l.parser(o) && l.pattern === u.path);
1244
- return !!N(W)[s == null ? void 0 : s.pattern];
1242
+ if (!c) return !1;
1243
+ const u = t.find((l) => l.parser(o) && l.pattern === c.path);
1244
+ return !!R(V)[u == null ? void 0 : u.pattern];
1245
1245
  }),
1246
1246
  // switchMap cancels prior prefetch when hovering a new link
1247
- Ye((i) => {
1248
- const o = P.get(i);
1249
- if (o && Date.now() - o.createdAt < J)
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 bt(1), s = {
1252
- response$: u,
1251
+ const a = new AbortController(), c = new _t(1), u = {
1252
+ response$: c,
1253
1253
  createdAt: Date.now(),
1254
1254
  abortController: a
1255
1255
  };
1256
- P.set(i, s);
1257
- const c = {
1256
+ N.set(i, u);
1257
+ const s = {
1258
1258
  method: "GET",
1259
1259
  headers: {
1260
1260
  "Content-Type": "application/json",
@@ -1262,27 +1262,27 @@ function Kt(e, t) {
1262
1262
  },
1263
1263
  signal: a.signal
1264
1264
  };
1265
- return c[ee] = !0, He(
1266
- fetch(i, c).then(
1267
- (l) => (u.next(l), u.complete(), i),
1268
- (l) => (u.error(l), P.delete(i), null)
1265
+ return s[ne] = !0, Je(
1266
+ fetch(i, s).then(
1267
+ (l) => (c.next(l), c.complete(), i),
1268
+ (l) => (c.error(l), N.delete(i), null)
1269
1269
  )
1270
1270
  ).pipe(
1271
- Vt({
1271
+ Xt({
1272
1272
  unsubscribe: () => {
1273
- a.abort(), P.delete(i);
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 P)
1281
- i - a.createdAt > J && (a.abortController.abort(), P.delete(o));
1282
- }, J);
1280
+ for (const [o, a] of N)
1281
+ i - a.createdAt > Q && (a.abortController.abort(), N.delete(o));
1282
+ }, Q);
1283
1283
  }
1284
- var C = /* @__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))(C || {});
1285
- const Xt = {
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 Zt(e) {
1294
+ function rr(e) {
1295
1295
  if (!e) return 2;
1296
- const t = e.trim().toLowerCase(), r = Xt[t];
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 Je(e) {
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 xe(e) {
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 Qt {
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 fe(t, this.manager, this.contextData);
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 fe(this.name, this.manager, r);
1358
+ return new pe(this.name, this.manager, r);
1359
1359
  }
1360
1360
  trace(t, ...r) {
1361
- this.log(C.TRACE, t, r);
1361
+ this.log(U.TRACE, t, r);
1362
1362
  }
1363
1363
  debug(t, ...r) {
1364
- this.log(C.DEBUG, t, r);
1364
+ this.log(U.DEBUG, t, r);
1365
1365
  }
1366
1366
  info(t, ...r) {
1367
- this.log(C.INFO, t, r);
1367
+ this.log(U.INFO, t, r);
1368
1368
  }
1369
1369
  warn(t, ...r) {
1370
- this.log(C.WARN, t, r);
1370
+ this.log(U.WARN, t, r);
1371
1371
  }
1372
1372
  error(t, ...r) {
1373
- this.log(C.ERROR, t, r);
1373
+ this.log(U.ERROR, t, r);
1374
1374
  }
1375
1375
  fatal(t, ...r) {
1376
- this.log(C.FATAL, t, r);
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 ? xe(n[0]) : n.map(xe) : void 0, a;
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: Je(t),
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 fe extends Qt {
1391
+ class pe extends nr {
1392
1392
  constructor(t, r, n) {
1393
1393
  super(t, r, n);
1394
1394
  }
1395
1395
  }
1396
- class er {
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 ie = /* @__PURE__ */ Symbol.for("@noego/logger");
1414
- class tr {
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 = Zt(t), this.service = r ?? "noego", this.environment = n ?? "development";
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}] [${Je(t)}] ${n}`;
1464
+ return `[${(/* @__PURE__ */ new Date()).toISOString()}] [${r}] [${Ze(t)}] ${n}`;
1465
1465
  }
1466
1466
  }
1467
- function Ke() {
1467
+ function Qe() {
1468
1468
  const e = globalThis;
1469
- if (!e[ie]) {
1470
- const t = new tr();
1471
- t.addTransport(new er()), e[ie] = t;
1469
+ if (!e[ue]) {
1470
+ const t = new ir();
1471
+ t.addTransport(new or()), e[ue] = t;
1472
1472
  }
1473
- return e[ie];
1473
+ return e[ue];
1474
1474
  }
1475
- function we(e) {
1476
- return new fe(e, Ke());
1475
+ function _e(e) {
1476
+ return new pe(e, Qe());
1477
1477
  }
1478
- const y = we("forge:nav"), rr = 1e4;
1479
- function nr(e, t, r) {
1478
+ const m = _e("forge:nav"), ar = 1e4;
1479
+ function sr(e, t, r) {
1480
1480
  let n = null, i = !1;
1481
- const o = new Promise((a, u) => {
1481
+ const o = new Promise((a, c) => {
1482
1482
  n = setTimeout(
1483
1483
  () => {
1484
- i = !0, y.error("Timeout fired after", t, "ms"), r(), u(new Error(`Navigation timed out after ${t}ms`));
1484
+ i = !0, m.error("Timeout fired after", t, "ms"), r(), c(new Error(`Navigation timed out after ${t}ms`));
1485
1485
  },
1486
1486
  t
1487
- ), y.debug("Timeout scheduled for", t, "ms, timeoutId:", n);
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 ? y.warn("Promise settled AFTER timeout already fired") : (y.debug("Clearing timeout", n, "- promise settled successfully"), clearTimeout(n)));
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 de = new Q();
1497
- let _ = 0, q = null;
1498
- function or(e) {
1499
- e && e.redirectPath && (y.debug("Handling redirect to", e.redirectPath), setTimeout(
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
- de.pipe(Ye((e) => He(nr(ur(e), rr, () => {
1507
- y.error("Navigation timed out"), _++, q && (q.abort(), q = null);
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
- y.error("Navigation failed:", t);
1509
+ m.error("Navigation failed:", t);
1510
1510
  })))).subscribe({
1511
- next: or,
1511
+ next: ur,
1512
1512
  error: (e) => {
1513
- y.error("Stream error:", e);
1513
+ m.error("Stream error:", e);
1514
1514
  }
1515
1515
  });
1516
- function ir(e) {
1516
+ function cr(e) {
1517
1517
  var t;
1518
- y.debug("Pushing navigation event to stream", {
1518
+ m.debug("Pushing navigation event to stream", {
1519
1519
  url: e.url,
1520
- currentNavigationId: _,
1521
- subscriberCount: ((t = de.observers) == null ? void 0 : t.length) || 0
1522
- }), de.next(e);
1520
+ currentNavigationId: E,
1521
+ subscriberCount: ((t = ve.observers) == null ? void 0 : t.length) || 0
1522
+ }), ve.next(e);
1523
1523
  }
1524
- const x = Ie({
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: D
1538
- }), ar = async () => {
1539
- const e = N(x).navigationId;
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,58 +1545,69 @@ const x = Ie({
1545
1545
  Accept: "application/json"
1546
1546
  }
1547
1547
  };
1548
- r[ee] = !0;
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 = N(x).navigationId;
1552
- return e !== o ? (y.debug("Discarding stale poll response", { pollNavigationId: e, currentNavigationId: o }), !1) : (x.update((a) => {
1553
- var u;
1554
- return a.active.data = { layout: ((u = a.active.data) == null ? void 0 : u.layout) || [], view: i.view }, a;
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
+ var c;
1554
+ return a.active.data = { layout: ((c = a.active.data) == null ? void 0 : c.layout) || [], view: i.view }, a;
1555
1555
  }), !0);
1556
1556
  } catch {
1557
1557
  return !1;
1558
1558
  }
1559
1559
  };
1560
- D.update((e) => (e.poll = ar, e));
1561
- function X(...e) {
1560
+ k.update((e) => (e.poll = lr, e));
1561
+ async function et(e, t, r, n, i, o) {
1562
+ if (!t.controller) return;
1563
+ let a = J(e, t.controller).toString();
1564
+ i && (a = a.replace(/\.svelte\.ts$/, ".js").replace(/\.ts$/, ".js"), /\.[a-z]+$/.test(a) || (a += ".js")), a.startsWith("/") || (a = "/" + a);
1565
+ const u = (await import(
1566
+ /* @vite-ignore */
1567
+ a
1568
+ )).default, s = o ? await Promise.resolve(o(u)) : 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 sr(e, t, r, n, i, o) {
1575
+ async function fr(e, t, r, n, i, o, a) {
1566
1576
  try {
1567
- const a = typeof t == "string" && t.indexOf("assets") !== -1, u = (r.layout || []).map((d) => {
1568
- let p = X(t, d).toString();
1569
- return a && (p = p.endsWith(".svelte") ? p.replace(/\.svelte$/, ".js") : /[.][a-z]+$/.test(p) ? p : p + ".js"), p;
1577
+ const c = typeof t == "string" && t.indexOf("assets") !== -1, u = (r.layout || []).map((g) => {
1578
+ let b = J(t, g).toString();
1579
+ return c && (b = b.endsWith(".svelte") ? b.replace(/\.svelte$/, ".js") : /[.][a-z]+$/.test(b) ? b : b + ".js"), b;
1570
1580
  });
1571
- let s = X(t, r.view).toString();
1572
- a && (s = s.endsWith(".svelte") ? s.replace(/\.svelte$/, ".js") : /[.][a-z]+$/.test(s) ? s : s + ".js");
1573
- const c = await Promise.all(u.map((d) => import(
1581
+ let s = J(t, r.view).toString();
1582
+ c && (s = s.endsWith(".svelte") ? s.replace(/\.svelte$/, ".js") : /[.][a-z]+$/.test(s) ? s : s + ".js");
1583
+ const l = await Promise.all(u.map((g) => import(
1574
1584
  /* @vite-ignore */
1575
- d
1576
- ).then((p) => p.default)));
1585
+ g
1586
+ ).then((b) => b.default)));
1577
1587
  s.startsWith("/") || (s = "/" + s);
1578
- const l = await import(
1588
+ const p = await import(
1579
1589
  /* @vite-ignore */
1580
1590
  s
1581
- ).then((d) => d.default), f = window.__INITIAL_DATA__ || { layout: [], view: {} }, v = {
1582
- layouts: c,
1583
- view: l,
1591
+ ).then((g) => g.default), h = window.__INITIAL_DATA__ || { layout: [], view: {} }, d = typeof t == "string" && t.indexOf("assets") !== -1, v = R(k), f = { params: n, urlParams: i, query: o, page: v }, S = await et(t, r, h.view, f, d, a), _ = {
1592
+ layouts: l,
1593
+ view: p,
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: f,
1598
+ data: h,
1589
1599
  params: n,
1590
1600
  urlParams: i,
1591
- query: o
1601
+ query: o,
1602
+ controller: S
1592
1603
  };
1593
- x.update((d) => (d.active = v, d.phase = "idle", d)), et(tt, { target: e, props: { root: x } });
1594
- } catch (a) {
1595
- y.error("Client-side route loading failed:", a);
1604
+ A.update((g) => (g.active = _, g.phase = "idle", g)), ot(it, { target: e, props: { root: A } });
1605
+ } catch (c) {
1606
+ m.error("Client-side route loading failed:", c);
1596
1607
  }
1597
1608
  }
1598
- function ae(e, t, r, n, i, o, a = !1, u = !0) {
1599
- ir({
1609
+ function ce(e, t, r, n, i, o, a = !1, c = !0) {
1610
+ cr({
1600
1611
  url: e,
1601
1612
  base_path: t,
1602
1613
  route: r,
@@ -1604,10 +1615,11 @@ function ae(e, t, r, n, i, o, a = !1, u = !0) {
1604
1615
  urlParams: i,
1605
1616
  query: o,
1606
1617
  server_loading: a,
1607
- updateUrl: u
1618
+ updateUrl: c
1608
1619
  });
1609
1620
  }
1610
- async function ur(e) {
1621
+ async function dr(e) {
1622
+ var p;
1611
1623
  const {
1612
1624
  url: t,
1613
1625
  base_path: r,
@@ -1615,31 +1627,31 @@ async function ur(e) {
1615
1627
  params: i,
1616
1628
  urlParams: o,
1617
1629
  query: a,
1618
- server_loading: u,
1619
- updateUrl: s
1620
- } = e, c = ++_, l = new AbortController();
1621
- q = l, y.debug("Starting navigation", {
1622
- navigationId: c,
1630
+ server_loading: c,
1631
+ updateUrl: u
1632
+ } = e, s = ++E, l = new AbortController();
1633
+ H = l, m.debug("Starting navigation", {
1634
+ navigationId: s,
1623
1635
  url: t,
1624
- updateUrl: s,
1625
- server_loading: u,
1626
- currentNavigationId: _,
1627
- hasAbortController: !!q
1628
- }), x.update((f) => (f.phase = "loading", f.navigationId = c, f));
1636
+ updateUrl: u,
1637
+ server_loading: c,
1638
+ currentNavigationId: E,
1639
+ hasAbortController: !!H
1640
+ }), A.update((h) => (h.phase = "loading", h.navigationId = s, h));
1629
1641
  try {
1630
- let f = { layout: [], view: {} };
1631
- if (u) {
1632
- y.debug("Fetching server data", { navigationId: c, url: t });
1633
- let m = null;
1634
- const b = Jt(t);
1635
- if (b)
1642
+ let h = { layout: [], view: {} };
1643
+ if (c) {
1644
+ m.debug("Fetching server data", { navigationId: s, url: t });
1645
+ let y = null;
1646
+ const O = Qt(t);
1647
+ if (O)
1636
1648
  try {
1637
- y.debug("Using prefetched response for", t), m = await Lt(b);
1649
+ m.debug("Using prefetched response for", t), y = await kt(O);
1638
1650
  } catch {
1639
- y.debug("Prefetch failed, falling back to fetch", t), m = null;
1651
+ m.debug("Prefetch failed, falling back to fetch", t), y = null;
1640
1652
  }
1641
- if (!m) {
1642
- const O = {
1653
+ if (!y) {
1654
+ const M = {
1643
1655
  method: n.method,
1644
1656
  headers: {
1645
1657
  "Content-Type": "application/json",
@@ -1647,155 +1659,163 @@ async function ur(e) {
1647
1659
  },
1648
1660
  signal: l.signal
1649
1661
  };
1650
- O[ee] = !0, m = await fetch(t, O);
1662
+ M[ne] = !0, y = await fetch(t, M);
1651
1663
  }
1652
- if (y.debug("Fetch response received", {
1653
- navigationId: c,
1664
+ if (m.debug("Fetch response received", {
1665
+ navigationId: s,
1654
1666
  url: t,
1655
- ok: m.ok,
1656
- status: m.status,
1657
- redirected: m.redirected,
1658
- currentNavigationId: _
1659
- }), m.redirected || m.headers.get("X-Forge-Redirect") === "true")
1660
- return y.debug("Redirect detected"), x.update((O) => (O.phase = "idle", O)), {
1661
- redirectPath: m.headers.get("X-Forge-Redirect-Path") || void 0
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 (!m.ok)
1664
- throw new Error(`Network response was not ok: ${m.status}`);
1665
- f = await m.json(), y.debug("Server data received:", f);
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
- y.debug("Stale navigation after fetch, aborting", { navigationId: c, currentNavigationId: _ });
1679
+ if (s !== E) {
1680
+ m.debug("Stale navigation after fetch, aborting", { navigationId: s, currentNavigationId: E });
1669
1681
  return;
1670
1682
  }
1671
- y.debug("Loading components", { navigationId: c, view: n.view, layouts: n.layout });
1672
- const v = typeof r == "string" && r.indexOf("assets") !== -1, d = (n.layout || []).map((m) => {
1673
- let b = X(r, m).toString();
1674
- return v && (b = b.endsWith(".svelte") ? b.replace(/\.svelte$/, ".js") : /[.][a-z]+$/.test(b) ? b : b + ".js"), b;
1683
+ m.debug("Loading components", { navigationId: s, 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 p = X(r, n.view).toString();
1677
- v && (p = p.endsWith(".svelte") ? p.replace(/\.svelte$/, ".js") : /[.][a-z]+$/.test(p) ? p : p + ".js"), p.startsWith("/") || (p = "/" + p);
1678
- const h = await Promise.all(d.map((m) => import(
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
- m
1681
- ).then((b) => b.default))), S = await import(
1692
+ y
1693
+ ).then((O) => O.default))), _ = await import(
1682
1694
  /* @vite-ignore */
1683
- p
1684
- ).then((m) => m.default);
1685
- if (y.debug("Components loaded", {
1686
- navigationId: c,
1687
- currentNavigationId: _,
1688
- layoutsCount: h.length,
1689
- viewLoaded: !!S
1690
- }), c !== _) {
1691
- y.debug("Stale navigation after component load, aborting", { navigationId: c, currentNavigationId: _ });
1695
+ f
1696
+ ).then((y) => y.default);
1697
+ if (m.debug("Components loaded", {
1698
+ navigationId: s,
1699
+ currentNavigationId: E,
1700
+ layoutsCount: S.length,
1701
+ viewLoaded: !!_
1702
+ }), s !== E) {
1703
+ m.debug("Stale navigation after component load, aborting", { navigationId: s, currentNavigationId: E });
1692
1704
  return;
1693
1705
  }
1694
- const g = {
1695
- layouts: h,
1696
- view: S,
1706
+ const g = R(k), b = { params: i, urlParams: o, query: a, page: g }, T = await et(r, n, h.view, b, d, controllerFactory);
1707
+ if (s !== E) {
1708
+ m.debug("Stale navigation after controller resolution, aborting", { navigationId: s, 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: _,
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: f,
1720
+ data: h,
1702
1721
  params: i,
1703
1722
  urlParams: o,
1704
- query: a
1723
+ query: a,
1724
+ controller: T
1705
1725
  };
1706
- y.debug("Committing new state", {
1707
- navigationId: c,
1708
- currentNavigationId: _,
1709
- layoutsCount: g.layouts.length,
1710
- viewSet: !!g.view,
1711
- dataKeys: Object.keys(g.data || {})
1712
- }), x.update((m) => (m.active = g, m.phase = "idle", y.debug("ROOT.active updated", {
1713
- navigationId: c,
1714
- layoutsCount: m.active.layouts.length,
1715
- viewSet: !!m.active.view,
1716
- dataKeys: Object.keys(m.active.data || {}),
1717
- paramsKeys: Object.keys(m.active.params || {})
1718
- }), m)), typeof window < "u" && window.scroll(0, 0), s && (y.debug("Updating browser URL", { url: t }), window.history.pushState({}, "", t)), y.debug("Navigation complete", { navigationId: c, url: t });
1719
- } catch (f) {
1720
- if (y.error("Navigation failed", {
1721
- navigationId: c,
1722
- currentNavigationId: _,
1726
+ m.debug("Committing new state", {
1727
+ navigationId: s,
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", {
1733
+ navigationId: s,
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), u && (m.debug("Updating browser URL", { url: t }), window.history.pushState({}, "", t)), m.debug("Navigation complete", { navigationId: s, url: t });
1739
+ } catch (h) {
1740
+ if (m.error("Navigation failed", {
1741
+ navigationId: s,
1742
+ currentNavigationId: E,
1723
1743
  url: t,
1724
- error: f instanceof Error ? f.message : String(f)
1725
- }), x.update((v) => (v.phase = "idle", v)), f.name === "AbortError") {
1726
- y.debug("Navigation aborted");
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 f;
1749
+ throw h;
1730
1750
  }
1731
1751
  }
1732
- const R = we("forge:events");
1733
- function cr(e, t, r) {
1752
+ const F = _e("forge:events");
1753
+ function hr(e, t, r) {
1734
1754
  if (!document) {
1735
- R.error("Document not found");
1755
+ F.error("Document not found");
1736
1756
  return;
1737
1757
  }
1738
1758
  document.addEventListener("click", (n) => {
1739
- var a, u;
1740
- const i = window.location.pathname, o = ((a = n.target) == null ? void 0 : a.tagName) === "A" ? n.target : (u = n.target) == null ? void 0 : u.closest("A");
1759
+ var a, c;
1760
+ const i = window.location.pathname, o = ((a = n.target) == null ? void 0 : a.tagName) === "A" ? n.target : (c = n.target) == null ? void 0 : c.closest("A");
1741
1761
  if (o) {
1742
- let s = o.getAttribute("href");
1743
- if (i === s) {
1762
+ let u = o.getAttribute("href");
1763
+ if (i === u) {
1744
1764
  n.preventDefault();
1745
1765
  return;
1746
1766
  }
1747
- if (s && s.startsWith("/") || s.startsWith(".")) {
1748
- const c = s.split("?")[0], l = o.getAttribute("method") || "get", f = t.find((v) => v.method.toLowerCase() === l && r.find((d) => d.parser(c) && d.pattern === v.path));
1749
- if (f) {
1767
+ if (u && u.startsWith("/") || u.startsWith(".")) {
1768
+ const s = u.split("?")[0], l = o.getAttribute("method") || "get", p = t.find((h) => h.method.toLowerCase() === l && r.find((d) => d.parser(s) && d.pattern === h.path));
1769
+ if (p) {
1750
1770
  n.preventDefault();
1751
- const v = r.find((b) => b.parser(c) && b.pattern === f.path), d = (v == null ? void 0 : v.parser(c)) || {}, p = new URLSearchParams(s.split("?")[1] || ""), h = Object.fromEntries(p.entries()) || {}, S = { ...d, ...h }, m = N(W)[v == null ? void 0 : v.pattern];
1752
- D.update((b) => (b.url = s, b.pathname = c, b.params = d, b.query = h, b)), R.debug("Click navigation to", s), ae(s, e, f, S, d, h, m, !0);
1771
+ const h = r.find((b) => b.parser(s) && b.pattern === p.path), d = (h == null ? void 0 : h.parser(s)) || {}, v = new URLSearchParams(u.split("?")[1] || ""), f = Object.fromEntries(v.entries()) || {}, S = { ...d, ...f }, g = R(V)[h == null ? void 0 : h.pattern];
1772
+ k.update((b) => (b.url = u, b.pathname = s, b.params = d, b.query = f, b)), F.debug("Click navigation to", u), ce(u, e, p, S, d, f, g, !0);
1753
1773
  } else
1754
- R.warn("No matching route found", s, "- using fallback navigation");
1774
+ F.warn("No matching route found", u, "- using fallback navigation");
1755
1775
  }
1756
1776
  }
1757
1777
  }), window.addEventListener("popstate", (n) => {
1758
- 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
- if (u) {
1760
- const s = r.find((h) => h.parser(i) && h.pattern === u.path), c = (s == null ? void 0 : s.parser(i)) || {}, l = new URLSearchParams(window.location.search), f = Object.fromEntries(l.entries()) || {};
1761
- D.update((h) => (h.url = o, h.pathname = window.location.pathname, h.params = c, h.query = f, h));
1762
- const v = { ...c, ...f }, p = N(W)[s == null ? void 0 : s.pattern];
1763
- R.debug("Popstate navigation to", o), ae(o, e, u, v, c, f, p, !1);
1778
+ const i = window.location.pathname, o = window.location.pathname + window.location.search, a = "get", c = t.find((u) => u.method.toLowerCase() === a && r.find((s) => s.parser(i) && s.pattern === u.path));
1779
+ if (c) {
1780
+ const u = r.find((f) => f.parser(i) && f.pattern === c.path), s = (u == null ? void 0 : u.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 = s, f.query = p, f));
1782
+ const h = { ...s, ...p }, v = R(V)[u == null ? void 0 : u.pattern];
1783
+ F.debug("Popstate navigation to", o), ce(o, e, c, h, s, p, v, !1);
1764
1784
  } else
1765
- R.warn("No matching route found", i, "- using fallback navigation"), window.location.href = i;
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
- R.debug("Handling forge-redirect to:", i);
1769
- const a = "get", u = t.find((s) => s.method.toLowerCase() === a && r.find((c) => c.parser(o) && c.pattern === s.path));
1770
- if (u) {
1771
- const s = r.find((h) => h.parser(o) && h.pattern === u.path), c = (s == null ? void 0 : s.parser(o)) || {}, l = new URLSearchParams(i.split("?")[1] || ""), f = Object.fromEntries(l.entries()) || {}, v = { ...c, ...f }, p = N(W)[s == null ? void 0 : s.pattern];
1772
- D.update((h) => (h.url = i, h.pathname = o, h.params = c, h.query = f, h)), ae(i, e, u, v, c, f, p, !0);
1788
+ F.debug("Handling forge-redirect to:", i);
1789
+ const a = "get", c = t.find((u) => u.method.toLowerCase() === a && r.find((s) => s.parser(o) && s.pattern === u.path));
1790
+ if (c) {
1791
+ const u = r.find((f) => f.parser(o) && f.pattern === c.path), s = (u == null ? void 0 : u.parser(o)) || {}, l = new URLSearchParams(i.split("?")[1] || ""), p = Object.fromEntries(l.entries()) || {}, h = { ...s, ...p }, v = R(V)[u == null ? void 0 : u.pattern];
1792
+ k.update((f) => (f.url = i, f.pathname = o, f.params = s, f.query = p, f)), ce(i, e, c, h, s, p, v, !0);
1773
1793
  } else
1774
- R.warn("No matching route found", o, "- using fallback navigation"), window.location.href = o;
1775
- })), Kt(t, r);
1794
+ F.warn("No matching route found", o, "- using fallback navigation"), window.location.href = o;
1795
+ })), er(t, r);
1776
1796
  }
1777
- const Ae = "/__forge/dev-logs", lr = 100, fr = 20;
1778
- class dr {
1797
+ const Pe = "/__forge/dev-logs", pr = 100, vr = 20;
1798
+ class mr {
1779
1799
  constructor() {
1780
- te(this, "buffer", []);
1781
- te(this, "timer", null);
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 >= fr) {
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(), lr));
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(Ae, {
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(Ae, JSON.stringify(t));
1833
+ navigator.sendBeacon(Pe, JSON.stringify(t));
1814
1834
  } catch {
1815
1835
  }
1816
1836
  }
1817
1837
  }
1818
- const L = we("forge:client"), ee = Symbol("forge-load-function");
1819
- let K = [], V = null;
1820
- function hr(e) {
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,46 +1845,46 @@ function hr(e) {
1825
1845
  return !e.startsWith("/api/");
1826
1846
  }
1827
1847
  }
1828
- function pr() {
1829
- typeof window < "u" && !V && (V = window.fetch, window.fetch = async function(e, t = {}) {
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 V(e, t);
1851
+ return X(e, t);
1832
1852
  let n = { ...t };
1833
- for (const a of K)
1853
+ for (const a of ee)
1834
1854
  try {
1835
1855
  if (a.length === 2) {
1836
- const u = new Headers(n.headers), s = Object.fromEntries(u.entries());
1837
- await new Promise((c, l) => {
1856
+ const c = new Headers(n.headers), u = Object.fromEntries(c.entries());
1857
+ await new Promise((s, l) => {
1838
1858
  try {
1839
- a(s, (f) => {
1840
- if (f)
1841
- l(f);
1859
+ a(u, (p) => {
1860
+ if (p)
1861
+ l(p);
1842
1862
  else {
1843
- const v = new Headers();
1844
- Object.entries(s).forEach(([d, p]) => {
1845
- p !== void 0 && v.set(d, p);
1846
- }), n.headers = v, c();
1863
+ const h = new Headers();
1864
+ Object.entries(u).forEach(([d, v]) => {
1865
+ v !== void 0 && h.set(d, v);
1866
+ }), n.headers = h, s();
1847
1867
  }
1848
1868
  });
1849
- } catch (f) {
1850
- l(f);
1869
+ } catch (p) {
1870
+ l(p);
1851
1871
  }
1852
1872
  });
1853
1873
  } else {
1854
- const u = await a(n, e);
1855
- u && typeof u == "object" && (n = u);
1874
+ const c = await a(n, e);
1875
+ c && typeof c == "object" && (n = c);
1856
1876
  }
1857
- } catch (u) {
1858
- throw L.error("Middleware error", u), u;
1877
+ } catch (c) {
1878
+ throw D.error("Middleware error", c), c;
1859
1879
  }
1860
- const i = n == null ? void 0 : n[ee];
1861
- L.debug("Fetch override request", {
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 V(e, n);
1867
- if (L.debug("Fetch override response", {
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,
@@ -1872,19 +1892,19 @@ function pr() {
1872
1892
  type: o.type,
1873
1893
  hasForgeSymbol: i
1874
1894
  }), i && o.redirected) {
1875
- const a = typeof e == "string" ? e : e.url, u = o.url;
1876
- if (L.debug("Redirect detected", {
1895
+ const a = typeof e == "string" ? e : e.url, c = o.url;
1896
+ if (D.debug("Redirect detected", {
1877
1897
  requested: a,
1878
- final: u,
1898
+ final: c,
1879
1899
  redirected: o.redirected
1880
- }), hr(u)) {
1881
- const s = new URL(u), c = s.pathname + s.search;
1882
- return L.debug("Redirect detected to:", c, "- will navigate after current request completes"), new Response(JSON.stringify({ layout: [], view: {} }), {
1900
+ }), yr(c)) {
1901
+ const u = new URL(c), s = u.pathname + u.search;
1902
+ return D.debug("Redirect detected to:", s, "- 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",
1886
1906
  "X-Forge-Redirect": "true",
1887
- "X-Forge-Redirect-Path": c
1907
+ "X-Forge-Redirect-Path": s
1888
1908
  }
1889
1909
  });
1890
1910
  }
@@ -1892,59 +1912,67 @@ function pr() {
1892
1912
  return o;
1893
1913
  });
1894
1914
  }
1895
- pr();
1896
- var Te;
1915
+ br();
1916
+ var Re;
1897
1917
  if (typeof window < "u") {
1898
1918
  const e = window.__CONFIGURATION__;
1899
- (Te = e == null ? void 0 : e.dev) != null && Te.enable_debug_log && Ke().addTransport(new dr());
1919
+ (Re = e == null ? void 0 : e.dev) != null && Re.enable_debug_log && Qe().addTransport(new mr());
1900
1920
  }
1901
- const Sr = {
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
- K.push(e);
1928
+ ee.push(e);
1909
1929
  },
1910
1930
  /**
1911
1931
  * Reset all middleware
1912
1932
  */
1913
1933
  reset() {
1914
- K.length = 0;
1934
+ ee.length = 0;
1915
1935
  },
1916
1936
  /**
1917
1937
  * Get current middleware count (for debugging)
1918
1938
  */
1919
1939
  getMiddlewareCount() {
1920
- return K.length;
1940
+ return ee.length;
1921
1941
  }
1922
1942
  };
1923
- let se;
1924
- async function _r(e, t) {
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 (se = nt(n), window && window.location) {
1930
- const i = (window.location.pathname || "/").split("?")[0], o = se.find((u) => u.parser(i));
1931
- let a = o ? n.find((u) => u.path === o.pattern) : null;
1949
+ if (le = st(n), window && window.location) {
1950
+ const i = (window.location.pathname || "/").split("?")[0], o = le.find((c) => c.parser(i));
1951
+ let a = o ? n.find((c) => c.path === o.pattern) : null;
1932
1952
  if (o && a) {
1933
- const u = o.parser(i) || {}, s = new URLSearchParams(window.location.search), c = Object.fromEntries(s.entries()) || {}, l = { ...u, ...c };
1934
- Yt(), sr(e, r, a, l, u, c), cr(r, n, se);
1953
+ const c = o.parser(i) || {}, u = new URLSearchParams(window.location.search), s = Object.fromEntries(u.entries()) || {}, l = { ...c, ...s };
1954
+ Zt(), fr(
1955
+ e,
1956
+ r,
1957
+ a,
1958
+ l,
1959
+ c,
1960
+ s,
1961
+ t.controller_factory
1962
+ ), hr(r, n, le);
1935
1963
  } else
1936
- L.warn("No matching route", i);
1964
+ D.warn("No matching route", i);
1937
1965
  }
1938
1966
  }
1939
1967
  export {
1940
- W as MANIFEST_STORE,
1941
- cr as bootstrap_events,
1942
- _r as createApp,
1943
- Sr as fetch,
1944
- sr as loadRoute,
1945
- D as page,
1946
- xr as shadowUrl,
1947
- Yt as updateManifestStore,
1948
- ae as updateRoute
1968
+ V as MANIFEST_STORE,
1969
+ hr as bootstrap_events,
1970
+ Ar as createApp,
1971
+ xr as fetch,
1972
+ fr as loadRoute,
1973
+ k as page,
1974
+ Pr as shadowUrl,
1975
+ Zt as updateManifestStore,
1976
+ ce as updateRoute
1949
1977
  };
1950
1978
  //# sourceMappingURL=client.mjs.map