@noego/forge 0.1.12 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/client.mjs CHANGED
@@ -1,10 +1,10 @@
1
- import { p as $t, a as _ } from "./page.svelte-Bq1Q01H0.js";
2
- import { s as Ye } from "./page.svelte-Bq1Q01H0.js";
3
- import * as yt from "svelte/internal/client";
4
- import { hydrate as Gt } from "svelte";
5
- import Dt from "../src/components/RecursiveRender.svelte";
6
- function Mt(t) {
7
- const r = new $t(t);
1
+ import { p as Et, a as b } from "./page.svelte-Bq1Q01H0.js";
2
+ import { s as Se } from "./page.svelte-Bq1Q01H0.js";
3
+ import * as et from "svelte/internal/client";
4
+ import { hydrate as Ot } from "svelte";
5
+ import Pt from "../src/components/RecursiveRender.svelte";
6
+ function xt(t) {
7
+ const r = new Et(t);
8
8
  return (e) => {
9
9
  const n = r.match(e);
10
10
  if (!n) return null;
@@ -14,322 +14,116 @@ function Mt(t) {
14
14
  return o;
15
15
  };
16
16
  }
17
- function Ht(t) {
17
+ function It(t) {
18
18
  return t.map((r) => {
19
- const e = r.path, n = Mt(e);
19
+ const e = r.path, n = xt(e);
20
20
  return { pattern: e, parser: n };
21
21
  });
22
22
  }
23
- function W() {
24
- return W = Object.assign ? Object.assign.bind() : function(t) {
25
- for (var r = 1; r < arguments.length; r++) {
26
- var e = arguments[r];
27
- for (var n in e) ({}).hasOwnProperty.call(e, n) && (t[n] = e[n]);
28
- }
29
- return t;
30
- }, W.apply(null, arguments);
31
- }
32
- var k;
33
- (function(t) {
34
- t.Pop = "POP", t.Push = "PUSH", t.Replace = "REPLACE";
35
- })(k || (k = {}));
36
- var ct = process.env.NODE_ENV !== "production" ? function(t) {
37
- return Object.freeze(t);
38
- } : function(t) {
39
- return t;
40
- };
41
- function Wt(t, r) {
42
- {
43
- typeof console < "u" && console.warn(r);
44
- try {
45
- throw new Error(r);
46
- } catch {
47
- }
48
- }
49
- }
50
- var ut = "beforeunload", zt = "popstate";
51
- function Yt(t) {
52
- t === void 0 && (t = {});
53
- var r = t, e = r.window, n = e === void 0 ? document.defaultView : e, o = n.history;
54
- function i() {
55
- var p = n.location, w = p.pathname, E = p.search, T = p.hash, P = o.state || {};
56
- return [P.idx, ct({
57
- pathname: w,
58
- search: E,
59
- hash: T,
60
- state: P.usr || null,
61
- key: P.key || "default"
62
- })];
63
- }
64
- var a = null;
65
- function c() {
66
- if (a)
67
- f.call(a), a = null;
68
- else {
69
- var p = k.Pop, w = i(), E = w[0], T = w[1];
70
- if (f.length)
71
- if (E != null) {
72
- var P = l - E;
73
- P && (a = {
74
- action: p,
75
- location: T,
76
- retry: function() {
77
- C(P * -1);
78
- }
79
- }, C(P));
80
- } else
81
- process.env.NODE_ENV !== "production" && Wt(
82
- !1,
83
- // TODO: Write up a doc that explains our blocking strategy in
84
- // detail and link to it here so people can understand better what
85
- // is going on and how to avoid it.
86
- "You are trying to block a POP navigation to a location that was not created by the history library. The block will fail silently in production, but in general you should do all navigation with the history library (instead of using window.history.pushState directly) to avoid this situation."
87
- );
88
- else
89
- x(p);
90
- }
91
- }
92
- n.addEventListener(zt, c);
93
- var s = k.Pop, u = i(), l = u[0], d = u[1], h = ft(), f = ft();
94
- l == null && (l = 0, o.replaceState(W({}, o.state, {
95
- idx: l
96
- }), ""));
97
- function v(p) {
98
- return typeof p == "string" ? p : Xt(p);
99
- }
100
- function m(p, w) {
101
- return w === void 0 && (w = null), ct(W({
102
- pathname: d.pathname,
103
- hash: "",
104
- search: ""
105
- }, typeof p == "string" ? Jt(p) : p, {
106
- state: w,
107
- key: Bt()
108
- }));
109
- }
110
- function S(p, w) {
111
- return [{
112
- usr: p.state,
113
- key: p.key,
114
- idx: w
115
- }, v(p)];
116
- }
117
- function A(p, w, E) {
118
- return !f.length || (f.call({
119
- action: p,
120
- location: w,
121
- retry: E
122
- }), !1);
123
- }
124
- function x(p) {
125
- s = p;
126
- var w = i();
127
- l = w[0], d = w[1], h.call({
128
- action: s,
129
- location: d
130
- });
131
- }
132
- function O(p, w) {
133
- var E = k.Push, T = m(p, w);
134
- function P() {
135
- O(p, w);
136
- }
137
- if (A(E, T, P)) {
138
- var N = S(T, l + 1), K = N[0], V = N[1];
139
- try {
140
- o.pushState(K, "", V);
141
- } catch {
142
- n.location.assign(V);
143
- }
144
- x(E);
145
- }
146
- }
147
- function y(p, w) {
148
- var E = k.Replace, T = m(p, w);
149
- function P() {
150
- y(p, w);
151
- }
152
- if (A(E, T, P)) {
153
- var N = S(T, l), K = N[0], V = N[1];
154
- o.replaceState(K, "", V), x(E);
155
- }
156
- }
157
- function C(p) {
158
- o.go(p);
159
- }
160
- var Vt = {
161
- get action() {
162
- return s;
163
- },
164
- get location() {
165
- return d;
166
- },
167
- createHref: v,
168
- push: O,
169
- replace: y,
170
- go: C,
171
- back: function() {
172
- C(-1);
173
- },
174
- forward: function() {
175
- C(1);
176
- },
177
- listen: function(w) {
178
- return h.push(w);
179
- },
180
- block: function(w) {
181
- var E = f.push(w);
182
- return f.length === 1 && n.addEventListener(ut, lt), function() {
183
- E(), f.length || n.removeEventListener(ut, lt);
184
- };
185
- }
186
- };
187
- return Vt;
188
- }
189
- function lt(t) {
190
- t.preventDefault(), t.returnValue = "";
191
- }
192
- function ft() {
193
- var t = [];
194
- return {
195
- get length() {
196
- return t.length;
197
- },
198
- push: function(e) {
199
- return t.push(e), function() {
200
- t = t.filter(function(n) {
201
- return n !== e;
202
- });
203
- };
204
- },
205
- call: function(e) {
206
- t.forEach(function(n) {
207
- return n && n(e);
208
- });
209
- }
210
- };
211
- }
212
- function Bt() {
213
- return Math.random().toString(36).substr(2, 8);
214
- }
215
- function Xt(t) {
216
- var r = t.pathname, e = r === void 0 ? "/" : r, n = t.search, o = n === void 0 ? "" : n, i = t.hash, a = i === void 0 ? "" : i;
217
- return o && o !== "?" && (e += o.charAt(0) === "?" ? o : "?" + o), a && a !== "#" && (e += a.charAt(0) === "#" ? a : "#" + a), e;
218
- }
219
- function Jt(t) {
220
- var r = {};
221
- if (t) {
222
- var e = t.indexOf("#");
223
- e >= 0 && (r.hash = t.substr(e), t = t.substr(0, e));
224
- var n = t.indexOf("?");
225
- n >= 0 && (r.search = t.substr(n), t = t.substr(0, n)), t && (r.pathname = t);
226
- }
227
- return r;
228
- }
229
- var et = function(t, r) {
230
- return et = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, n) {
23
+ var D = function(t, r) {
24
+ return D = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, n) {
231
25
  e.__proto__ = n;
232
26
  } || function(e, n) {
233
27
  for (var o in n) Object.prototype.hasOwnProperty.call(n, o) && (e[o] = n[o]);
234
- }, et(t, r);
28
+ }, D(t, r);
235
29
  };
236
- function F(t, r) {
30
+ function I(t, r) {
237
31
  if (typeof r != "function" && r !== null)
238
32
  throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
239
- et(t, r);
33
+ D(t, r);
240
34
  function e() {
241
35
  this.constructor = t;
242
36
  }
243
37
  t.prototype = r === null ? Object.create(r) : (e.prototype = r.prototype, new e());
244
38
  }
245
- function Kt(t, r, e, n) {
39
+ function At(t, r, e, n) {
246
40
  function o(i) {
247
41
  return i instanceof e ? i : new e(function(a) {
248
42
  a(i);
249
43
  });
250
44
  }
251
45
  return new (e || (e = Promise))(function(i, a) {
252
- function c(l) {
46
+ function u(f) {
253
47
  try {
254
- u(n.next(l));
48
+ c(n.next(f));
255
49
  } catch (d) {
256
50
  a(d);
257
51
  }
258
52
  }
259
- function s(l) {
53
+ function s(f) {
260
54
  try {
261
- u(n.throw(l));
55
+ c(n.throw(f));
262
56
  } catch (d) {
263
57
  a(d);
264
58
  }
265
59
  }
266
- function u(l) {
267
- l.done ? i(l.value) : o(l.value).then(c, s);
60
+ function c(f) {
61
+ f.done ? i(f.value) : o(f.value).then(u, s);
268
62
  }
269
- u((n = n.apply(t, r || [])).next());
63
+ c((n = n.apply(t, r || [])).next());
270
64
  });
271
65
  }
272
- function wt(t, r) {
66
+ function rt(t, r) {
273
67
  var e = { label: 0, sent: function() {
274
68
  if (i[0] & 1) throw i[1];
275
69
  return i[1];
276
70
  }, trys: [], ops: [] }, n, o, i, a = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
277
- return a.next = c(0), a.throw = c(1), a.return = c(2), typeof Symbol == "function" && (a[Symbol.iterator] = function() {
71
+ return a.next = u(0), a.throw = u(1), a.return = u(2), typeof Symbol == "function" && (a[Symbol.iterator] = function() {
278
72
  return this;
279
73
  }), a;
280
- function c(u) {
281
- return function(l) {
282
- return s([u, l]);
74
+ function u(c) {
75
+ return function(f) {
76
+ return s([c, f]);
283
77
  };
284
78
  }
285
- function s(u) {
79
+ function s(c) {
286
80
  if (n) throw new TypeError("Generator is already executing.");
287
- for (; a && (a = 0, u[0] && (e = 0)), e; ) try {
288
- if (n = 1, o && (i = u[0] & 2 ? o.return : u[0] ? o.throw || ((i = o.return) && i.call(o), 0) : o.next) && !(i = i.call(o, u[1])).done) return i;
289
- switch (o = 0, i && (u = [u[0] & 2, i.value]), u[0]) {
81
+ for (; a && (a = 0, c[0] && (e = 0)), e; ) try {
82
+ if (n = 1, o && (i = c[0] & 2 ? o.return : c[0] ? o.throw || ((i = o.return) && i.call(o), 0) : o.next) && !(i = i.call(o, c[1])).done) return i;
83
+ switch (o = 0, i && (c = [c[0] & 2, i.value]), c[0]) {
290
84
  case 0:
291
85
  case 1:
292
- i = u;
86
+ i = c;
293
87
  break;
294
88
  case 4:
295
- return e.label++, { value: u[1], done: !1 };
89
+ return e.label++, { value: c[1], done: !1 };
296
90
  case 5:
297
- e.label++, o = u[1], u = [0];
91
+ e.label++, o = c[1], c = [0];
298
92
  continue;
299
93
  case 7:
300
- u = e.ops.pop(), e.trys.pop();
94
+ c = e.ops.pop(), e.trys.pop();
301
95
  continue;
302
96
  default:
303
- if (i = e.trys, !(i = i.length > 0 && i[i.length - 1]) && (u[0] === 6 || u[0] === 2)) {
97
+ if (i = e.trys, !(i = i.length > 0 && i[i.length - 1]) && (c[0] === 6 || c[0] === 2)) {
304
98
  e = 0;
305
99
  continue;
306
100
  }
307
- if (u[0] === 3 && (!i || u[1] > i[0] && u[1] < i[3])) {
308
- e.label = u[1];
101
+ if (c[0] === 3 && (!i || c[1] > i[0] && c[1] < i[3])) {
102
+ e.label = c[1];
309
103
  break;
310
104
  }
311
- if (u[0] === 6 && e.label < i[1]) {
312
- e.label = i[1], i = u;
105
+ if (c[0] === 6 && e.label < i[1]) {
106
+ e.label = i[1], i = c;
313
107
  break;
314
108
  }
315
109
  if (i && e.label < i[2]) {
316
- e.label = i[2], e.ops.push(u);
110
+ e.label = i[2], e.ops.push(c);
317
111
  break;
318
112
  }
319
113
  i[2] && e.ops.pop(), e.trys.pop();
320
114
  continue;
321
115
  }
322
- u = r.call(t, e);
323
- } catch (l) {
324
- u = [6, l], o = 0;
116
+ c = r.call(t, e);
117
+ } catch (f) {
118
+ c = [6, f], o = 0;
325
119
  } finally {
326
120
  n = i = 0;
327
121
  }
328
- if (u[0] & 5) throw u[1];
329
- return { value: u[0] ? u[1] : void 0, done: !0 };
122
+ if (c[0] & 5) throw c[1];
123
+ return { value: c[0] ? c[1] : void 0, done: !0 };
330
124
  }
331
125
  }
332
- function U(t) {
126
+ function P(t) {
333
127
  var r = typeof Symbol == "function" && Symbol.iterator, e = r && t[r], n = 0;
334
128
  if (e) return e.call(t);
335
129
  if (t && typeof t.length == "number") return {
@@ -339,14 +133,14 @@ function U(t) {
339
133
  };
340
134
  throw new TypeError(r ? "Object is not iterable." : "Symbol.iterator is not defined.");
341
135
  }
342
- function rt(t, r) {
136
+ function W(t, r) {
343
137
  var e = typeof Symbol == "function" && t[Symbol.iterator];
344
138
  if (!e) return t;
345
139
  var n = e.call(t), o, i = [], a;
346
140
  try {
347
141
  for (; (r === void 0 || r-- > 0) && !(o = n.next()).done; ) i.push(o.value);
348
- } catch (c) {
349
- a = { error: c };
142
+ } catch (u) {
143
+ a = { error: u };
350
144
  } finally {
351
145
  try {
352
146
  o && !o.done && (e = n.return) && e.call(n);
@@ -356,81 +150,81 @@ function rt(t, r) {
356
150
  }
357
151
  return i;
358
152
  }
359
- function nt(t, r, e) {
153
+ function G(t, r, e) {
360
154
  if (e || arguments.length === 2) for (var n = 0, o = r.length, i; n < o; n++)
361
155
  (i || !(n in r)) && (i || (i = Array.prototype.slice.call(r, 0, n)), i[n] = r[n]);
362
156
  return t.concat(i || Array.prototype.slice.call(r));
363
157
  }
364
- function L(t) {
365
- return this instanceof L ? (this.v = t, this) : new L(t);
158
+ function O(t) {
159
+ return this instanceof O ? (this.v = t, this) : new O(t);
366
160
  }
367
- function Qt(t, r, e) {
161
+ function Rt(t, r, e) {
368
162
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
369
163
  var n = e.apply(t, r || []), o, i = [];
370
- return o = Object.create((typeof AsyncIterator == "function" ? AsyncIterator : Object).prototype), c("next"), c("throw"), c("return", a), o[Symbol.asyncIterator] = function() {
164
+ return o = Object.create((typeof AsyncIterator == "function" ? AsyncIterator : Object).prototype), u("next"), u("throw"), u("return", a), o[Symbol.asyncIterator] = function() {
371
165
  return this;
372
166
  }, o;
373
- function a(f) {
167
+ function a(l) {
374
168
  return function(v) {
375
- return Promise.resolve(v).then(f, d);
169
+ return Promise.resolve(v).then(l, d);
376
170
  };
377
171
  }
378
- function c(f, v) {
379
- n[f] && (o[f] = function(m) {
380
- return new Promise(function(S, A) {
381
- i.push([f, m, S, A]) > 1 || s(f, m);
172
+ function u(l, v) {
173
+ n[l] && (o[l] = function(p) {
174
+ return new Promise(function(g, x) {
175
+ i.push([l, p, g, x]) > 1 || s(l, p);
382
176
  });
383
- }, v && (o[f] = v(o[f])));
177
+ }, v && (o[l] = v(o[l])));
384
178
  }
385
- function s(f, v) {
179
+ function s(l, v) {
386
180
  try {
387
- u(n[f](v));
388
- } catch (m) {
389
- h(i[0][3], m);
181
+ c(n[l](v));
182
+ } catch (p) {
183
+ h(i[0][3], p);
390
184
  }
391
185
  }
392
- function u(f) {
393
- f.value instanceof L ? Promise.resolve(f.value.v).then(l, d) : h(i[0][2], f);
186
+ function c(l) {
187
+ l.value instanceof O ? Promise.resolve(l.value.v).then(f, d) : h(i[0][2], l);
394
188
  }
395
- function l(f) {
396
- s("next", f);
189
+ function f(l) {
190
+ s("next", l);
397
191
  }
398
- function d(f) {
399
- s("throw", f);
192
+ function d(l) {
193
+ s("throw", l);
400
194
  }
401
- function h(f, v) {
402
- f(v), i.shift(), i.length && s(i[0][0], i[0][1]);
195
+ function h(l, v) {
196
+ l(v), i.shift(), i.length && s(i[0][0], i[0][1]);
403
197
  }
404
198
  }
405
- function Zt(t) {
199
+ function Tt(t) {
406
200
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
407
201
  var r = t[Symbol.asyncIterator], e;
408
- return r ? r.call(t) : (t = typeof U == "function" ? U(t) : t[Symbol.iterator](), e = {}, n("next"), n("throw"), n("return"), e[Symbol.asyncIterator] = function() {
202
+ return r ? r.call(t) : (t = typeof P == "function" ? P(t) : t[Symbol.iterator](), e = {}, n("next"), n("throw"), n("return"), e[Symbol.asyncIterator] = function() {
409
203
  return this;
410
204
  }, e);
411
205
  function n(i) {
412
206
  e[i] = t[i] && function(a) {
413
- return new Promise(function(c, s) {
414
- a = t[i](a), o(c, s, a.done, a.value);
207
+ return new Promise(function(u, s) {
208
+ a = t[i](a), o(u, s, a.done, a.value);
415
209
  });
416
210
  };
417
211
  }
418
- function o(i, a, c, s) {
419
- Promise.resolve(s).then(function(u) {
420
- i({ value: u, done: c });
212
+ function o(i, a, u, s) {
213
+ Promise.resolve(s).then(function(c) {
214
+ i({ value: c, done: u });
421
215
  }, a);
422
216
  }
423
217
  }
424
- function g(t) {
218
+ function m(t) {
425
219
  return typeof t == "function";
426
220
  }
427
- function mt(t) {
221
+ function nt(t) {
428
222
  var r = function(n) {
429
223
  Error.call(n), n.stack = new Error().stack;
430
224
  }, e = t(r);
431
225
  return e.prototype = Object.create(Error.prototype), e.prototype.constructor = e, e;
432
226
  }
433
- var Q = mt(function(t) {
227
+ var q = nt(function(t) {
434
228
  return function(e) {
435
229
  t(this), this.message = e ? e.length + ` errors occurred during unsubscription:
436
230
  ` + e.map(function(n, o) {
@@ -439,13 +233,13 @@ var Q = mt(function(t) {
439
233
  `) : "", this.name = "UnsubscriptionError", this.errors = e;
440
234
  };
441
235
  });
442
- function ot(t, r) {
236
+ function H(t, r) {
443
237
  if (t) {
444
238
  var e = t.indexOf(r);
445
239
  0 <= e && t.splice(e, 1);
446
240
  }
447
241
  }
448
- var B = (function() {
242
+ var L = (function() {
449
243
  function t(r) {
450
244
  this.initialTeardown = r, this.closed = !1, this._parentage = null, this._finalizers = null;
451
245
  }
@@ -457,58 +251,58 @@ var B = (function() {
457
251
  if (a)
458
252
  if (this._parentage = null, Array.isArray(a))
459
253
  try {
460
- for (var c = U(a), s = c.next(); !s.done; s = c.next()) {
461
- var u = s.value;
462
- u.remove(this);
254
+ for (var u = P(a), s = u.next(); !s.done; s = u.next()) {
255
+ var c = s.value;
256
+ c.remove(this);
463
257
  }
464
- } catch (m) {
465
- r = { error: m };
258
+ } catch (p) {
259
+ r = { error: p };
466
260
  } finally {
467
261
  try {
468
- s && !s.done && (e = c.return) && e.call(c);
262
+ s && !s.done && (e = u.return) && e.call(u);
469
263
  } finally {
470
264
  if (r) throw r.error;
471
265
  }
472
266
  }
473
267
  else
474
268
  a.remove(this);
475
- var l = this.initialTeardown;
476
- if (g(l))
269
+ var f = this.initialTeardown;
270
+ if (m(f))
477
271
  try {
478
- l();
479
- } catch (m) {
480
- i = m instanceof Q ? m.errors : [m];
272
+ f();
273
+ } catch (p) {
274
+ i = p instanceof q ? p.errors : [p];
481
275
  }
482
276
  var d = this._finalizers;
483
277
  if (d) {
484
278
  this._finalizers = null;
485
279
  try {
486
- for (var h = U(d), f = h.next(); !f.done; f = h.next()) {
487
- var v = f.value;
280
+ for (var h = P(d), l = h.next(); !l.done; l = h.next()) {
281
+ var v = l.value;
488
282
  try {
489
- dt(v);
490
- } catch (m) {
491
- i = i ?? [], m instanceof Q ? i = nt(nt([], rt(i)), rt(m.errors)) : i.push(m);
283
+ K(v);
284
+ } catch (p) {
285
+ i = i ?? [], p instanceof q ? i = G(G([], W(i)), W(p.errors)) : i.push(p);
492
286
  }
493
287
  }
494
- } catch (m) {
495
- n = { error: m };
288
+ } catch (p) {
289
+ n = { error: p };
496
290
  } finally {
497
291
  try {
498
- f && !f.done && (o = h.return) && o.call(h);
292
+ l && !l.done && (o = h.return) && o.call(h);
499
293
  } finally {
500
294
  if (n) throw n.error;
501
295
  }
502
296
  }
503
297
  }
504
298
  if (i)
505
- throw new Q(i);
299
+ throw new q(i);
506
300
  }
507
301
  }, t.prototype.add = function(r) {
508
302
  var e;
509
303
  if (r && r !== this)
510
304
  if (this.closed)
511
- dt(r);
305
+ K(r);
512
306
  else {
513
307
  if (r instanceof t) {
514
308
  if (r.closed || r._hasParent(this))
@@ -525,52 +319,52 @@ var B = (function() {
525
319
  this._parentage = Array.isArray(e) ? (e.push(r), e) : e ? [e, r] : r;
526
320
  }, t.prototype._removeParent = function(r) {
527
321
  var e = this._parentage;
528
- e === r ? this._parentage = null : Array.isArray(e) && ot(e, r);
322
+ e === r ? this._parentage = null : Array.isArray(e) && H(e, r);
529
323
  }, t.prototype.remove = function(r) {
530
324
  var e = this._finalizers;
531
- e && ot(e, r), r instanceof t && r._removeParent(this);
325
+ e && H(e, r), r instanceof t && r._removeParent(this);
532
326
  }, t.EMPTY = (function() {
533
327
  var r = new t();
534
328
  return r.closed = !0, r;
535
329
  })(), t;
536
- })(), bt = B.EMPTY;
537
- function gt(t) {
538
- return t instanceof B || t && "closed" in t && g(t.remove) && g(t.add) && g(t.unsubscribe);
330
+ })(), ot = L.EMPTY;
331
+ function it(t) {
332
+ return t instanceof L || t && "closed" in t && m(t.remove) && m(t.add) && m(t.unsubscribe);
539
333
  }
540
- function dt(t) {
541
- g(t) ? t() : t.unsubscribe();
334
+ function K(t) {
335
+ m(t) ? t() : t.unsubscribe();
542
336
  }
543
- var te = {
337
+ var jt = {
544
338
  Promise: void 0
545
- }, ee = {
339
+ }, Ut = {
546
340
  setTimeout: function(t, r) {
547
341
  for (var e = [], n = 2; n < arguments.length; n++)
548
342
  e[n - 2] = arguments[n];
549
- return setTimeout.apply(void 0, nt([t, r], rt(e)));
343
+ return setTimeout.apply(void 0, G([t, r], W(e)));
550
344
  },
551
345
  clearTimeout: function(t) {
552
346
  return clearTimeout(t);
553
347
  },
554
348
  delegate: void 0
555
349
  };
556
- function St(t) {
557
- ee.setTimeout(function() {
350
+ function at(t) {
351
+ Ut.setTimeout(function() {
558
352
  throw t;
559
353
  });
560
354
  }
561
- function ht() {
355
+ function Q() {
562
356
  }
563
- function G(t) {
357
+ function T(t) {
564
358
  t();
565
359
  }
566
- var at = (function(t) {
567
- F(r, t);
360
+ var X = (function(t) {
361
+ I(r, t);
568
362
  function r(e) {
569
363
  var n = t.call(this) || this;
570
- return n.isStopped = !1, e ? (n.destination = e, gt(e) && e.add(n)) : n.destination = oe, n;
364
+ return n.isStopped = !1, e ? (n.destination = e, it(e) && e.add(n)) : n.destination = Nt, n;
571
365
  }
572
366
  return r.create = function(e, n, o) {
573
- return new it(e, n, o);
367
+ return new z(e, n, o);
574
368
  }, r.prototype.next = function(e) {
575
369
  this.isStopped || this._next(e);
576
370
  }, r.prototype.error = function(e) {
@@ -594,7 +388,7 @@ var at = (function(t) {
594
388
  this.unsubscribe();
595
389
  }
596
390
  }, r;
597
- })(B), re = (function() {
391
+ })(L), kt = (function() {
598
392
  function t(r) {
599
393
  this.partialObserver = r;
600
394
  }
@@ -604,7 +398,7 @@ var at = (function(t) {
604
398
  try {
605
399
  e.next(r);
606
400
  } catch (n) {
607
- $(n);
401
+ R(n);
608
402
  }
609
403
  }, t.prototype.error = function(r) {
610
404
  var e = this.partialObserver;
@@ -612,56 +406,56 @@ var at = (function(t) {
612
406
  try {
613
407
  e.error(r);
614
408
  } catch (n) {
615
- $(n);
409
+ R(n);
616
410
  }
617
411
  else
618
- $(r);
412
+ R(r);
619
413
  }, t.prototype.complete = function() {
620
414
  var r = this.partialObserver;
621
415
  if (r.complete)
622
416
  try {
623
417
  r.complete();
624
418
  } catch (e) {
625
- $(e);
419
+ R(e);
626
420
  }
627
421
  }, t;
628
- })(), it = (function(t) {
629
- F(r, t);
422
+ })(), z = (function(t) {
423
+ I(r, t);
630
424
  function r(e, n, o) {
631
425
  var i = t.call(this) || this, a;
632
- return g(e) || !e ? a = {
426
+ return m(e) || !e ? a = {
633
427
  next: e ?? void 0,
634
428
  error: n ?? void 0,
635
429
  complete: o ?? void 0
636
- } : a = e, i.destination = new re(a), i;
430
+ } : a = e, i.destination = new kt(a), i;
637
431
  }
638
432
  return r;
639
- })(at);
640
- function $(t) {
641
- St(t);
433
+ })(X);
434
+ function R(t) {
435
+ at(t);
642
436
  }
643
- function ne(t) {
437
+ function Ct(t) {
644
438
  throw t;
645
439
  }
646
- var oe = {
440
+ var Nt = {
647
441
  closed: !0,
648
- next: ht,
649
- error: ne,
650
- complete: ht
651
- }, st = (function() {
442
+ next: Q,
443
+ error: Ct,
444
+ complete: Q
445
+ }, B = (function() {
652
446
  return typeof Symbol == "function" && Symbol.observable || "@@observable";
653
447
  })();
654
- function ie(t) {
448
+ function Lt(t) {
655
449
  return t;
656
450
  }
657
- function ae(t) {
658
- return t.length === 0 ? ie : t.length === 1 ? t[0] : function(e) {
451
+ function Ft(t) {
452
+ return t.length === 0 ? Lt : t.length === 1 ? t[0] : function(e) {
659
453
  return t.reduce(function(n, o) {
660
454
  return o(n);
661
455
  }, e);
662
456
  };
663
457
  }
664
- var I = (function() {
458
+ var S = (function() {
665
459
  function t(r) {
666
460
  r && (this._subscribe = r);
667
461
  }
@@ -669,10 +463,10 @@ var I = (function() {
669
463
  var e = new t();
670
464
  return e.source = this, e.operator = r, e;
671
465
  }, t.prototype.subscribe = function(r, e, n) {
672
- var o = this, i = ce(r) ? r : new it(r, e, n);
673
- return G(function() {
674
- var a = o, c = a.operator, s = a.source;
675
- i.add(c ? c.call(i, s) : s ? o._subscribe(i) : o._trySubscribe(i));
466
+ var o = this, i = Vt(r) ? r : new z(r, e, n);
467
+ return T(function() {
468
+ var a = o, u = a.operator, s = a.source;
469
+ i.add(u ? u.call(i, s) : s ? o._subscribe(i) : o._trySubscribe(i));
676
470
  }), i;
677
471
  }, t.prototype._trySubscribe = function(r) {
678
472
  try {
@@ -682,11 +476,11 @@ var I = (function() {
682
476
  }
683
477
  }, t.prototype.forEach = function(r, e) {
684
478
  var n = this;
685
- return e = pt(e), new e(function(o, i) {
686
- var a = new it({
687
- next: function(c) {
479
+ return e = Z(e), new e(function(o, i) {
480
+ var a = new z({
481
+ next: function(u) {
688
482
  try {
689
- r(c);
483
+ r(u);
690
484
  } catch (s) {
691
485
  i(s), a.unsubscribe();
692
486
  }
@@ -699,15 +493,15 @@ var I = (function() {
699
493
  }, t.prototype._subscribe = function(r) {
700
494
  var e;
701
495
  return (e = this.source) === null || e === void 0 ? void 0 : e.subscribe(r);
702
- }, t.prototype[st] = function() {
496
+ }, t.prototype[B] = function() {
703
497
  return this;
704
498
  }, t.prototype.pipe = function() {
705
499
  for (var r = [], e = 0; e < arguments.length; e++)
706
500
  r[e] = arguments[e];
707
- return ae(r)(this);
501
+ return Ft(r)(this);
708
502
  }, t.prototype.toPromise = function(r) {
709
503
  var e = this;
710
- return r = pt(r), new r(function(n, o) {
504
+ return r = Z(r), new r(function(n, o) {
711
505
  var i;
712
506
  e.subscribe(function(a) {
713
507
  return i = a;
@@ -721,22 +515,22 @@ var I = (function() {
721
515
  return new t(r);
722
516
  }, t;
723
517
  })();
724
- function pt(t) {
518
+ function Z(t) {
725
519
  var r;
726
- return (r = t ?? te.Promise) !== null && r !== void 0 ? r : Promise;
520
+ return (r = t ?? jt.Promise) !== null && r !== void 0 ? r : Promise;
727
521
  }
728
- function se(t) {
729
- return t && g(t.next) && g(t.error) && g(t.complete);
522
+ function qt(t) {
523
+ return t && m(t.next) && m(t.error) && m(t.complete);
730
524
  }
731
- function ce(t) {
732
- return t && t instanceof at || se(t) && gt(t);
525
+ function Vt(t) {
526
+ return t && t instanceof X || qt(t) && it(t);
733
527
  }
734
- function ue(t) {
735
- return g(t == null ? void 0 : t.lift);
528
+ function Mt(t) {
529
+ return m(t == null ? void 0 : t.lift);
736
530
  }
737
- function X(t) {
531
+ function J(t) {
738
532
  return function(r) {
739
- if (ue(r))
533
+ if (Mt(r))
740
534
  return r.lift(function(e) {
741
535
  try {
742
536
  return t(e, this);
@@ -747,32 +541,32 @@ function X(t) {
747
541
  throw new TypeError("Unable to lift unknown Observable type");
748
542
  };
749
543
  }
750
- function z(t, r, e, n, o) {
751
- return new le(t, r, e, n, o);
544
+ function Y(t, r, e, n, o) {
545
+ return new $t(t, r, e, n, o);
752
546
  }
753
- var le = (function(t) {
754
- F(r, t);
755
- function r(e, n, o, i, a, c) {
547
+ var $t = (function(t) {
548
+ I(r, t);
549
+ function r(e, n, o, i, a, u) {
756
550
  var s = t.call(this, e) || this;
757
- return s.onFinalize = a, s.shouldUnsubscribe = c, s._next = n ? function(u) {
551
+ return s.onFinalize = a, s.shouldUnsubscribe = u, s._next = n ? function(c) {
758
552
  try {
759
- n(u);
760
- } catch (l) {
761
- e.error(l);
553
+ n(c);
554
+ } catch (f) {
555
+ e.error(f);
762
556
  }
763
- } : t.prototype._next, s._error = i ? function(u) {
557
+ } : t.prototype._next, s._error = i ? function(c) {
764
558
  try {
765
- i(u);
766
- } catch (l) {
767
- e.error(l);
559
+ i(c);
560
+ } catch (f) {
561
+ e.error(f);
768
562
  } finally {
769
563
  this.unsubscribe();
770
564
  }
771
565
  } : t.prototype._error, s._complete = o ? function() {
772
566
  try {
773
567
  o();
774
- } catch (u) {
775
- e.error(u);
568
+ } catch (c) {
569
+ e.error(c);
776
570
  } finally {
777
571
  this.unsubscribe();
778
572
  }
@@ -785,38 +579,38 @@ var le = (function(t) {
785
579
  t.prototype.unsubscribe.call(this), !n && ((e = this.onFinalize) === null || e === void 0 || e.call(this));
786
580
  }
787
581
  }, r;
788
- })(at), fe = mt(function(t) {
582
+ })(X), Dt = nt(function(t) {
789
583
  return function() {
790
584
  t(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
791
585
  };
792
- }), Et = (function(t) {
793
- F(r, t);
586
+ }), st = (function(t) {
587
+ I(r, t);
794
588
  function r() {
795
589
  var e = t.call(this) || this;
796
590
  return e.closed = !1, e.currentObservers = null, e.observers = [], e.isStopped = !1, e.hasError = !1, e.thrownError = null, e;
797
591
  }
798
592
  return r.prototype.lift = function(e) {
799
- var n = new vt(this, this);
593
+ var n = new tt(this, this);
800
594
  return n.operator = e, n;
801
595
  }, r.prototype._throwIfClosed = function() {
802
596
  if (this.closed)
803
- throw new fe();
597
+ throw new Dt();
804
598
  }, r.prototype.next = function(e) {
805
599
  var n = this;
806
- G(function() {
600
+ T(function() {
807
601
  var o, i;
808
602
  if (n._throwIfClosed(), !n.isStopped) {
809
603
  n.currentObservers || (n.currentObservers = Array.from(n.observers));
810
604
  try {
811
- for (var a = U(n.currentObservers), c = a.next(); !c.done; c = a.next()) {
812
- var s = c.value;
605
+ for (var a = P(n.currentObservers), u = a.next(); !u.done; u = a.next()) {
606
+ var s = u.value;
813
607
  s.next(e);
814
608
  }
815
- } catch (u) {
816
- o = { error: u };
609
+ } catch (c) {
610
+ o = { error: c };
817
611
  } finally {
818
612
  try {
819
- c && !c.done && (i = a.return) && i.call(a);
613
+ u && !u.done && (i = a.return) && i.call(a);
820
614
  } finally {
821
615
  if (o) throw o.error;
822
616
  }
@@ -825,7 +619,7 @@ var le = (function(t) {
825
619
  });
826
620
  }, r.prototype.error = function(e) {
827
621
  var n = this;
828
- G(function() {
622
+ T(function() {
829
623
  if (n._throwIfClosed(), !n.isStopped) {
830
624
  n.hasError = n.isStopped = !0, n.thrownError = e;
831
625
  for (var o = n.observers; o.length; )
@@ -834,7 +628,7 @@ var le = (function(t) {
834
628
  });
835
629
  }, r.prototype.complete = function() {
836
630
  var e = this;
837
- G(function() {
631
+ T(function() {
838
632
  if (e._throwIfClosed(), !e.isStopped) {
839
633
  e.isStopped = !0;
840
634
  for (var n = e.observers; n.length; )
@@ -855,21 +649,21 @@ var le = (function(t) {
855
649
  }, r.prototype._subscribe = function(e) {
856
650
  return this._throwIfClosed(), this._checkFinalizedStatuses(e), this._innerSubscribe(e);
857
651
  }, r.prototype._innerSubscribe = function(e) {
858
- var n = this, o = this, i = o.hasError, a = o.isStopped, c = o.observers;
859
- return i || a ? bt : (this.currentObservers = null, c.push(e), new B(function() {
860
- n.currentObservers = null, ot(c, e);
652
+ var n = this, o = this, i = o.hasError, a = o.isStopped, u = o.observers;
653
+ return i || a ? ot : (this.currentObservers = null, u.push(e), new L(function() {
654
+ n.currentObservers = null, H(u, e);
861
655
  }));
862
656
  }, r.prototype._checkFinalizedStatuses = function(e) {
863
657
  var n = this, o = n.hasError, i = n.thrownError, a = n.isStopped;
864
658
  o ? e.error(i) : a && e.complete();
865
659
  }, r.prototype.asObservable = function() {
866
- var e = new I();
660
+ var e = new S();
867
661
  return e.source = this, e;
868
662
  }, r.create = function(e, n) {
869
- return new vt(e, n);
663
+ return new tt(e, n);
870
664
  }, r;
871
- })(I), vt = (function(t) {
872
- F(r, t);
665
+ })(S), tt = (function(t) {
666
+ I(r, t);
873
667
  function r(e, n) {
874
668
  var o = t.call(this) || this;
875
669
  return o.destination = e, o.source = n, o;
@@ -885,47 +679,47 @@ var le = (function(t) {
885
679
  (n = (e = this.destination) === null || e === void 0 ? void 0 : e.complete) === null || n === void 0 || n.call(e);
886
680
  }, r.prototype._subscribe = function(e) {
887
681
  var n, o;
888
- return (o = (n = this.source) === null || n === void 0 ? void 0 : n.subscribe(e)) !== null && o !== void 0 ? o : bt;
682
+ return (o = (n = this.source) === null || n === void 0 ? void 0 : n.subscribe(e)) !== null && o !== void 0 ? o : ot;
889
683
  }, r;
890
- })(Et), _t = (function(t) {
684
+ })(st), ct = (function(t) {
891
685
  return t && typeof t.length == "number" && typeof t != "function";
892
686
  });
893
- function Ot(t) {
894
- return g(t == null ? void 0 : t.then);
687
+ function ut(t) {
688
+ return m(t == null ? void 0 : t.then);
895
689
  }
896
- function Pt(t) {
897
- return g(t[st]);
690
+ function lt(t) {
691
+ return m(t[B]);
898
692
  }
899
- function It(t) {
900
- return Symbol.asyncIterator && g(t == null ? void 0 : t[Symbol.asyncIterator]);
693
+ function ft(t) {
694
+ return Symbol.asyncIterator && m(t == null ? void 0 : t[Symbol.asyncIterator]);
901
695
  }
902
- function At(t) {
696
+ function dt(t) {
903
697
  return new TypeError("You provided " + (t !== null && typeof t == "object" ? "an invalid object" : "'" + t + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.");
904
698
  }
905
- function de() {
699
+ function Wt() {
906
700
  return typeof Symbol != "function" || !Symbol.iterator ? "@@iterator" : Symbol.iterator;
907
701
  }
908
- var xt = de();
909
- function Tt(t) {
910
- return g(t == null ? void 0 : t[xt]);
702
+ var ht = Wt();
703
+ function pt(t) {
704
+ return m(t == null ? void 0 : t[ht]);
911
705
  }
912
- function Rt(t) {
913
- return Qt(this, arguments, function() {
706
+ function vt(t) {
707
+ return Rt(this, arguments, function() {
914
708
  var e, n, o, i;
915
- return wt(this, function(a) {
709
+ return rt(this, function(a) {
916
710
  switch (a.label) {
917
711
  case 0:
918
712
  e = t.getReader(), a.label = 1;
919
713
  case 1:
920
714
  a.trys.push([1, , 9, 10]), a.label = 2;
921
715
  case 2:
922
- return [4, L(e.read())];
716
+ return [4, O(e.read())];
923
717
  case 3:
924
- return n = a.sent(), o = n.value, i = n.done, i ? [4, L(void 0)] : [3, 5];
718
+ return n = a.sent(), o = n.value, i = n.done, i ? [4, O(void 0)] : [3, 5];
925
719
  case 4:
926
720
  return [2, a.sent()];
927
721
  case 5:
928
- return [4, L(o)];
722
+ return [4, O(o)];
929
723
  case 6:
930
724
  return [4, a.sent()];
931
725
  case 7:
@@ -940,63 +734,63 @@ function Rt(t) {
940
734
  });
941
735
  });
942
736
  }
943
- function jt(t) {
944
- return g(t == null ? void 0 : t.getReader);
737
+ function yt(t) {
738
+ return m(t == null ? void 0 : t.getReader);
945
739
  }
946
- function J(t) {
947
- if (t instanceof I)
740
+ function F(t) {
741
+ if (t instanceof S)
948
742
  return t;
949
743
  if (t != null) {
950
- if (Pt(t))
951
- return he(t);
952
- if (_t(t))
953
- return pe(t);
954
- if (Ot(t))
955
- return ve(t);
956
- if (It(t))
957
- return Nt(t);
958
- if (Tt(t))
959
- return ye(t);
960
- if (jt(t))
961
- return we(t);
744
+ if (lt(t))
745
+ return Gt(t);
746
+ if (ct(t))
747
+ return Ht(t);
748
+ if (ut(t))
749
+ return zt(t);
750
+ if (ft(t))
751
+ return mt(t);
752
+ if (pt(t))
753
+ return Yt(t);
754
+ if (yt(t))
755
+ return Xt(t);
962
756
  }
963
- throw At(t);
757
+ throw dt(t);
964
758
  }
965
- function he(t) {
966
- return new I(function(r) {
967
- var e = t[st]();
968
- if (g(e.subscribe))
759
+ function Gt(t) {
760
+ return new S(function(r) {
761
+ var e = t[B]();
762
+ if (m(e.subscribe))
969
763
  return e.subscribe(r);
970
764
  throw new TypeError("Provided object does not correctly implement Symbol.observable");
971
765
  });
972
766
  }
973
- function pe(t) {
974
- return new I(function(r) {
767
+ function Ht(t) {
768
+ return new S(function(r) {
975
769
  for (var e = 0; e < t.length && !r.closed; e++)
976
770
  r.next(t[e]);
977
771
  r.complete();
978
772
  });
979
773
  }
980
- function ve(t) {
981
- return new I(function(r) {
774
+ function zt(t) {
775
+ return new S(function(r) {
982
776
  t.then(function(e) {
983
777
  r.closed || (r.next(e), r.complete());
984
778
  }, function(e) {
985
779
  return r.error(e);
986
- }).then(null, St);
780
+ }).then(null, at);
987
781
  });
988
782
  }
989
- function ye(t) {
990
- return new I(function(r) {
783
+ function Yt(t) {
784
+ return new S(function(r) {
991
785
  var e, n;
992
786
  try {
993
- for (var o = U(t), i = o.next(); !i.done; i = o.next()) {
787
+ for (var o = P(t), i = o.next(); !i.done; i = o.next()) {
994
788
  var a = i.value;
995
789
  if (r.next(a), r.closed)
996
790
  return;
997
791
  }
998
- } catch (c) {
999
- e = { error: c };
792
+ } catch (u) {
793
+ e = { error: u };
1000
794
  } finally {
1001
795
  try {
1002
796
  i && !i.done && (n = o.return) && n.call(o);
@@ -1007,24 +801,24 @@ function ye(t) {
1007
801
  r.complete();
1008
802
  });
1009
803
  }
1010
- function Nt(t) {
1011
- return new I(function(r) {
1012
- me(t, r).catch(function(e) {
804
+ function mt(t) {
805
+ return new S(function(r) {
806
+ Bt(t, r).catch(function(e) {
1013
807
  return r.error(e);
1014
808
  });
1015
809
  });
1016
810
  }
1017
- function we(t) {
1018
- return Nt(Rt(t));
811
+ function Xt(t) {
812
+ return mt(vt(t));
1019
813
  }
1020
- function me(t, r) {
814
+ function Bt(t, r) {
1021
815
  var e, n, o, i;
1022
- return Kt(this, void 0, void 0, function() {
1023
- var a, c;
1024
- return wt(this, function(s) {
816
+ return At(this, void 0, void 0, function() {
817
+ var a, u;
818
+ return rt(this, function(s) {
1025
819
  switch (s.label) {
1026
820
  case 0:
1027
- s.trys.push([0, 5, 6, 11]), e = Zt(t), s.label = 1;
821
+ s.trys.push([0, 5, 6, 11]), e = Tt(t), s.label = 1;
1028
822
  case 1:
1029
823
  return [4, e.next()];
1030
824
  case 2:
@@ -1037,7 +831,7 @@ function me(t, r) {
1037
831
  case 4:
1038
832
  return [3, 11];
1039
833
  case 5:
1040
- return c = s.sent(), o = { error: c }, [3, 11];
834
+ return u = s.sent(), o = { error: u }, [3, 11];
1041
835
  case 6:
1042
836
  return s.trys.push([6, , 9, 10]), n && !n.done && (i = e.return) ? [4, i.call(e)] : [3, 8];
1043
837
  case 7:
@@ -1055,7 +849,7 @@ function me(t, r) {
1055
849
  });
1056
850
  });
1057
851
  }
1058
- function j(t, r, e, n, o) {
852
+ function E(t, r, e, n, o) {
1059
853
  n === void 0 && (n = 0), o === void 0 && (o = !1);
1060
854
  var i = r.schedule(function() {
1061
855
  e(), o ? t.add(this.schedule(null, n)) : this.unsubscribe();
@@ -1063,70 +857,70 @@ function j(t, r, e, n, o) {
1063
857
  if (t.add(i), !o)
1064
858
  return i;
1065
859
  }
1066
- function kt(t, r) {
1067
- return r === void 0 && (r = 0), X(function(e, n) {
1068
- e.subscribe(z(n, function(o) {
1069
- return j(n, t, function() {
860
+ function wt(t, r) {
861
+ return r === void 0 && (r = 0), J(function(e, n) {
862
+ e.subscribe(Y(n, function(o) {
863
+ return E(n, t, function() {
1070
864
  return n.next(o);
1071
865
  }, r);
1072
866
  }, function() {
1073
- return j(n, t, function() {
867
+ return E(n, t, function() {
1074
868
  return n.complete();
1075
869
  }, r);
1076
870
  }, function(o) {
1077
- return j(n, t, function() {
871
+ return E(n, t, function() {
1078
872
  return n.error(o);
1079
873
  }, r);
1080
874
  }));
1081
875
  });
1082
876
  }
1083
- function Lt(t, r) {
1084
- return r === void 0 && (r = 0), X(function(e, n) {
877
+ function bt(t, r) {
878
+ return r === void 0 && (r = 0), J(function(e, n) {
1085
879
  n.add(t.schedule(function() {
1086
880
  return e.subscribe(n);
1087
881
  }, r));
1088
882
  });
1089
883
  }
1090
- function be(t, r) {
1091
- return J(t).pipe(Lt(r), kt(r));
884
+ function Jt(t, r) {
885
+ return F(t).pipe(bt(r), wt(r));
1092
886
  }
1093
- function ge(t, r) {
1094
- return J(t).pipe(Lt(r), kt(r));
887
+ function Kt(t, r) {
888
+ return F(t).pipe(bt(r), wt(r));
1095
889
  }
1096
- function Se(t, r) {
1097
- return new I(function(e) {
890
+ function Qt(t, r) {
891
+ return new S(function(e) {
1098
892
  var n = 0;
1099
893
  return r.schedule(function() {
1100
894
  n === t.length ? e.complete() : (e.next(t[n++]), e.closed || this.schedule());
1101
895
  });
1102
896
  });
1103
897
  }
1104
- function Ee(t, r) {
1105
- return new I(function(e) {
898
+ function Zt(t, r) {
899
+ return new S(function(e) {
1106
900
  var n;
1107
- return j(e, r, function() {
1108
- n = t[xt](), j(e, r, function() {
901
+ return E(e, r, function() {
902
+ n = t[ht](), E(e, r, function() {
1109
903
  var o, i, a;
1110
904
  try {
1111
905
  o = n.next(), i = o.value, a = o.done;
1112
- } catch (c) {
1113
- e.error(c);
906
+ } catch (u) {
907
+ e.error(u);
1114
908
  return;
1115
909
  }
1116
910
  a ? e.complete() : e.next(i);
1117
911
  }, 0, !0);
1118
912
  }), function() {
1119
- return g(n == null ? void 0 : n.return) && n.return();
913
+ return m(n == null ? void 0 : n.return) && n.return();
1120
914
  };
1121
915
  });
1122
916
  }
1123
- function Ut(t, r) {
917
+ function gt(t, r) {
1124
918
  if (!t)
1125
919
  throw new Error("Iterable cannot be null");
1126
- return new I(function(e) {
1127
- j(e, r, function() {
920
+ return new S(function(e) {
921
+ E(e, r, function() {
1128
922
  var n = t[Symbol.asyncIterator]();
1129
- j(e, r, function() {
923
+ E(e, r, function() {
1130
924
  n.next().then(function(o) {
1131
925
  o.done ? e.complete() : e.next(o.value);
1132
926
  });
@@ -1134,57 +928,49 @@ function Ut(t, r) {
1134
928
  });
1135
929
  });
1136
930
  }
1137
- function _e(t, r) {
1138
- return Ut(Rt(t), r);
931
+ function te(t, r) {
932
+ return gt(vt(t), r);
1139
933
  }
1140
- function Oe(t, r) {
934
+ function ee(t, r) {
1141
935
  if (t != null) {
1142
- if (Pt(t))
1143
- return be(t, r);
1144
- if (_t(t))
1145
- return Se(t, r);
1146
- if (Ot(t))
1147
- return ge(t, r);
1148
- if (It(t))
1149
- return Ut(t, r);
1150
- if (Tt(t))
1151
- return Ee(t, r);
1152
- if (jt(t))
1153
- return _e(t, r);
936
+ if (lt(t))
937
+ return Jt(t, r);
938
+ if (ct(t))
939
+ return Qt(t, r);
940
+ if (ut(t))
941
+ return Kt(t, r);
942
+ if (ft(t))
943
+ return gt(t, r);
944
+ if (pt(t))
945
+ return Zt(t, r);
946
+ if (yt(t))
947
+ return te(t, r);
1154
948
  }
1155
- throw At(t);
949
+ throw dt(t);
1156
950
  }
1157
- function Pe(t, r) {
1158
- return r ? Oe(t, r) : J(t);
951
+ function re(t, r) {
952
+ return r ? ee(t, r) : F(t);
1159
953
  }
1160
- function Ie(t, r) {
1161
- return X(function(e, n) {
1162
- var o = 0;
1163
- e.subscribe(z(n, function(i) {
1164
- return t.call(r, i, o++) && n.next(i);
1165
- }));
1166
- });
1167
- }
1168
- function Ae(t, r) {
1169
- return X(function(e, n) {
1170
- var o = null, i = 0, a = !1, c = function() {
954
+ function ne(t, r) {
955
+ return J(function(e, n) {
956
+ var o = null, i = 0, a = !1, u = function() {
1171
957
  return a && !o && n.complete();
1172
958
  };
1173
- e.subscribe(z(n, function(s) {
959
+ e.subscribe(Y(n, function(s) {
1174
960
  o == null || o.unsubscribe();
1175
- var u = 0, l = i++;
1176
- J(t(s, l)).subscribe(o = z(n, function(d) {
1177
- return n.next(r ? r(s, d, l, u++) : d);
961
+ var c = 0, f = i++;
962
+ F(t(s, f)).subscribe(o = Y(n, function(d) {
963
+ return n.next(r ? r(s, d, f, c++) : d);
1178
964
  }, function() {
1179
- o = null, c();
965
+ o = null, u();
1180
966
  }));
1181
967
  }, function() {
1182
- a = !0, c();
968
+ a = !0, u();
1183
969
  }));
1184
970
  });
1185
971
  }
1186
- const xe = Yt(), Te = 1e4;
1187
- function Re(t, r, e) {
972
+ const oe = 1e4;
973
+ function ie(t, r, e) {
1188
974
  return Promise.race([
1189
975
  t,
1190
976
  new Promise((n, o) => {
@@ -1197,74 +983,66 @@ function Re(t, r, e) {
1197
983
  })
1198
984
  ]);
1199
985
  }
1200
- const Ct = new Et();
1201
- let qt = null, D = 0, M = null;
1202
- function je(t) {
1203
- t && t.redirectPath && (console.log("[NAVIGATION] Handling redirect to", t.redirectPath), setTimeout(
986
+ const St = new st();
987
+ let j = 0, U = null;
988
+ function ae(t) {
989
+ t && t.redirectPath && (console.log("[NAV] Handling redirect to", t.redirectPath), setTimeout(
1204
990
  () => {
1205
991
  window.dispatchEvent(new CustomEvent("forge-redirect", { detail: { path: t.redirectPath } }));
1206
992
  },
1207
993
  0
1208
994
  ));
1209
995
  }
1210
- Ct.pipe(
1211
- // Skip navigation if we just completed navigating to the same URL
1212
- // (prevents double navigation from click handler + pushstate listener)
1213
- Ie((t) => t.url === qt && !t.update ? (console.log("[NAVIGATION] Skipping duplicate navigation to", t.url), !1) : !0),
1214
- // switchMap: When a new event arrives, unsubscribe from previous and start new
1215
- // This means latest click wins - previous navigation is cancelled
1216
- Ae((t) => Pe(Re(Le(t), Te, () => {
1217
- console.error("[NAVIGATION] Navigation timed out, invalidating and resetting"), D++, M && (M.abort(), M = null);
1218
- }).catch((r) => {
1219
- console.error("[NAVIGATION] Navigation failed, recovering:", r);
1220
- })))
1221
- ).subscribe({
1222
- next: je,
1223
- // This should never fire now, but just in case
996
+ St.pipe(ne((t) => re(ie(ue(t), oe, () => {
997
+ console.error("[NAV] Navigation timed out"), j++, U && (U.abort(), U = null);
998
+ }).catch((r) => {
999
+ console.error("[NAV] Navigation failed:", r);
1000
+ })))).subscribe({
1001
+ next: ae,
1224
1002
  error: (t) => {
1225
- console.error("[NAVIGATION] Stream error (recovering):", t);
1003
+ console.error("[NAV] Stream error:", t);
1226
1004
  }
1227
1005
  });
1228
- function Ne(t) {
1229
- Ct.next(t);
1006
+ function se(t) {
1007
+ St.next(t);
1230
1008
  }
1231
- const b = yt.proxy({
1009
+ const w = et.proxy({
1232
1010
  layouts: [],
1233
1011
  view: null,
1234
1012
  data: null,
1235
1013
  params: null,
1236
1014
  urlParams: null,
1237
1015
  query: null,
1238
- page: _
1016
+ page: b
1239
1017
  });
1240
- function Y(...t) {
1018
+ function N(...t) {
1241
1019
  let r = t.map((e, n) => n === 0 ? e.replace(/\/+$/, "") : e.replace(/^\/+|\/+$/g, "")).join("/");
1242
1020
  return r.startsWith("/") || (r = "/" + r), r.split("?")[0];
1243
1021
  }
1244
- async function ke(t, r, e, n, o, i) {
1022
+ async function ce(t, r, e, n, o, i) {
1245
1023
  try {
1246
- const a = typeof r == "string" && r.indexOf("assets") !== -1, c = (e.layout || []).map((d) => {
1247
- let h = Y(r, d).toString();
1024
+ const a = typeof r == "string" && r.indexOf("assets") !== -1, u = (e.layout || []).map((d) => {
1025
+ let h = N(r, d).toString();
1248
1026
  return a && (h = h.endsWith(".svelte") ? h.replace(/\.svelte$/, ".js") : /[.][a-z]+$/.test(h) ? h : h + ".js"), h;
1249
1027
  });
1250
- let s = Y(r, e.view).toString();
1028
+ let s = N(r, e.view).toString();
1251
1029
  a && (s = s.endsWith(".svelte") ? s.replace(/\.svelte$/, ".js") : /[.][a-z]+$/.test(s) ? s : s + ".js");
1252
- const u = await Promise.all(c.map((d) => import(
1030
+ const c = await Promise.all(u.map((d) => import(
1253
1031
  /* @vite-ignore */
1254
1032
  d
1255
1033
  ).then((h) => h.default)));
1256
1034
  s.startsWith("/") || (s = "/" + s);
1257
- const l = await import(
1035
+ const f = await import(
1258
1036
  /* @vite-ignore */
1259
1037
  s
1260
1038
  ).then((d) => d.default);
1261
- b.layouts = u, b.view = l, b.params = n, b.data = window.__INITIAL_DATA__, b.urlParams = o, b.query = i, Gt(Dt, { target: t, props: b });
1039
+ w.layouts = c, w.view = f, w.params = n, w.data = window.__INITIAL_DATA__, w.urlParams = o, w.query = i, Ot(Pt, { target: t, props: w });
1262
1040
  } catch (a) {
1263
1041
  console.error("Client-side route loading failed:", a);
1264
1042
  }
1265
1043
  }
1266
- function q(t, r, e, n, o, i, a = !1, c = !0) {
1267
- Ne({
1044
+ function V(t, r, e, n, o, i, a = !1, u = !0) {
1045
+ se({
1268
1046
  url: t,
1269
1047
  base_path: r,
1270
1048
  route: e,
@@ -1272,10 +1050,10 @@ function q(t, r, e, n, o, i, a = !1, c = !0) {
1272
1050
  urlParams: o,
1273
1051
  query: i,
1274
1052
  server_loading: a,
1275
- update: c
1053
+ updateUrl: u
1276
1054
  });
1277
1055
  }
1278
- async function Le(t) {
1056
+ async function ue(t) {
1279
1057
  const {
1280
1058
  url: r,
1281
1059
  base_path: e,
@@ -1283,81 +1061,71 @@ async function Le(t) {
1283
1061
  params: o,
1284
1062
  urlParams: i,
1285
1063
  query: a,
1286
- server_loading: c,
1287
- update: s
1288
- } = t, u = ++D, l = new AbortController();
1289
- M = l, console.log("[NAVIGATION] Starting navigation", {
1290
- navigationId: u,
1291
- url: r,
1292
- server_loading: c,
1293
- route_path: n.path,
1294
- route_middleware: n.middleware
1295
- });
1064
+ server_loading: u,
1065
+ updateUrl: s
1066
+ } = t, c = ++j, f = new AbortController();
1067
+ U = f, console.log("[NAV] Starting navigation", { navigationId: c, url: r, updateUrl: s });
1296
1068
  try {
1297
- let d = null, h = !1, f = null;
1298
- if (c) {
1299
- console.log("[NAVIGATION] Making server fetch FIRST for", r);
1300
- const O = {
1069
+ let d = null, h = !1, l = null;
1070
+ if (u) {
1071
+ const _ = {
1301
1072
  method: n.method,
1302
1073
  headers: {
1303
1074
  "Content-Type": "application/json",
1304
1075
  Accept: "application/json"
1305
1076
  },
1306
- signal: l.signal
1077
+ signal: f.signal
1307
1078
  };
1308
- if (O[Ft] = !0, await fetch(r, O).then((y) => {
1309
- if (console.log("[NAVIGATION] Fetch response", {
1079
+ if (_[_t] = !0, await fetch(r, _).then((y) => {
1080
+ if (console.log("[NAV] Fetch response", {
1310
1081
  url: r,
1311
1082
  ok: y.ok,
1312
1083
  status: y.status,
1313
- type: y.type,
1314
- redirected: y.redirected,
1315
- finalUrl: y.url
1084
+ redirected: y.redirected
1316
1085
  }), y.redirected || y.headers.get("X-Forge-Redirect") === "true")
1317
- return console.log("[NAVIGATION] Redirect detected, not loading components"), h = !0, f = y.headers.get("X-Forge-Redirect-Path"), null;
1086
+ return console.log("[NAV] Redirect detected"), h = !0, l = y.headers.get("X-Forge-Redirect-Path"), null;
1318
1087
  if (y.ok)
1319
1088
  return y.json();
1320
1089
  throw new Error("Network response was not ok");
1321
1090
  }).then((y) => {
1322
1091
  d = y;
1323
1092
  }), h)
1324
- return console.log("[NAVIGATION] Exiting early due to redirect to", f), { redirectPath: f || void 0 };
1093
+ return { redirectPath: l || void 0 };
1325
1094
  }
1326
- const v = typeof e == "string" && e.indexOf("assets") !== -1, m = (n.layout || []).map((O) => {
1327
- let y = Y(e, O).toString();
1095
+ const v = typeof e == "string" && e.indexOf("assets") !== -1, p = (n.layout || []).map((_) => {
1096
+ let y = N(e, _).toString();
1328
1097
  return v && (y = y.endsWith(".svelte") ? y.replace(/\.svelte$/, ".js") : /[.][a-z]+$/.test(y) ? y : y + ".js"), y;
1329
1098
  });
1330
- let S = Y(e, n.view).toString();
1331
- v && (S = S.endsWith(".svelte") ? S.replace(/\.svelte$/, ".js") : /[.][a-z]+$/.test(S) ? S : S + ".js");
1332
- const A = await Promise.all(m.map((O) => import(
1099
+ let g = N(e, n.view).toString();
1100
+ v && (g = g.endsWith(".svelte") ? g.replace(/\.svelte$/, ".js") : /[.][a-z]+$/.test(g) ? g : g + ".js");
1101
+ const x = await Promise.all(p.map((_) => import(
1333
1102
  /* @vite-ignore */
1334
- O
1335
- ).then((y) => y.default))), x = await import(
1103
+ _
1104
+ ).then((y) => y.default))), A = await import(
1336
1105
  /* @vite-ignore */
1337
- S
1338
- ).then((O) => O.default);
1339
- if (u !== D) {
1340
- console.log("[NAVIGATION] Stale navigation detected, skipping ROOT update", { navigationId: u, currentNavigationId: D, url: r });
1106
+ g
1107
+ ).then((_) => _.default);
1108
+ if (c !== j) {
1109
+ console.log("[NAV] Stale navigation, skipping update", { navigationId: c, currentNavigationId: j });
1341
1110
  return;
1342
1111
  }
1343
- c ? (b.data = d, b.params = o, b.layouts = A, b.view = x, b.urlParams = i, b.query = a) : (console.log("[NAVIGATION] No server loading needed for", r), b.data = { layout: [], view: {} }, b.params = o, b.layouts = A, b.view = x, b.urlParams = i, b.query = a), window && window.scroll(0, 0), s && xe.push(r), qt = r;
1112
+ u ? w.data = d : w.data = { layout: [], view: {} }, w.params = o, w.layouts = x, w.view = A, w.urlParams = i, w.query = a, window && window.scroll(0, 0), s && window.history.pushState({}, "", r), console.log("[NAV] Navigation complete", { url: r });
1344
1113
  } catch (d) {
1345
- throw console.error("Client-side navigation failed for URL:", r, d), d;
1346
- } finally {
1114
+ throw console.error("[NAV] Navigation failed for URL:", r, d), d;
1347
1115
  }
1348
1116
  }
1349
- const R = yt.proxy({});
1350
- async function Ue() {
1351
- Object.assign(R, window.__MANIFEST__);
1117
+ const k = et.proxy({});
1118
+ async function le() {
1119
+ Object.assign(k, window.__MANIFEST__);
1352
1120
  }
1353
- function Ce(t, r, e) {
1121
+ function fe(t, r, e) {
1354
1122
  if (!document) {
1355
1123
  console.error("Document not found");
1356
1124
  return;
1357
1125
  }
1358
1126
  document.addEventListener("click", (n) => {
1359
- var a, c;
1360
- const o = window.location.pathname, i = ((a = n.target) == null ? void 0 : a.tagName) === "A" ? n.target : (c = n.target) == null ? void 0 : c.closest("A");
1127
+ var a, u;
1128
+ const o = window.location.pathname, i = ((a = n.target) == null ? void 0 : a.tagName) === "A" ? n.target : (u = n.target) == null ? void 0 : u.closest("A");
1361
1129
  if (i) {
1362
1130
  let s = i.getAttribute("href");
1363
1131
  if (o === s) {
@@ -1365,76 +1133,40 @@ function Ce(t, r, e) {
1365
1133
  return;
1366
1134
  }
1367
1135
  if (s && s.startsWith("/") || s.startsWith(".")) {
1368
- const u = s.split("?")[0], l = i.getAttribute("method") || "get", d = r.find((h) => h.method.toLowerCase() === l && e.find((f) => f.parser(u) && f.pattern === h.path));
1136
+ const c = s.split("?")[0], f = i.getAttribute("method") || "get", d = r.find((h) => h.method.toLowerCase() === f && e.find((l) => l.parser(c) && l.pattern === h.path));
1369
1137
  if (d) {
1370
1138
  n.preventDefault();
1371
- const h = e.find((x) => x.parser(u) && x.pattern === d.path), f = (h == null ? void 0 : h.parser(u)) || {}, v = new URLSearchParams(s.split("?")[1] || ""), m = Object.fromEntries(v.entries()) || {}, S = { ...f, ...m }, A = R[h == null ? void 0 : h.pattern];
1372
- console.log("[EVENTS] Navigation to", s, {
1373
- pattern: h == null ? void 0 : h.pattern,
1374
- requires_server_data: A,
1375
- manifest_store: R,
1376
- middleware: d.middleware
1377
- }), q(s, t, d, S, f, m, A);
1139
+ const h = e.find((A) => A.parser(c) && A.pattern === d.path), l = (h == null ? void 0 : h.parser(c)) || {}, v = new URLSearchParams(s.split("?")[1] || ""), p = Object.fromEntries(v.entries()) || {}, g = { ...l, ...p }, x = k[h == null ? void 0 : h.pattern];
1140
+ b.url = s, b.pathname = c, b.params = l, b.query = p, console.log("[EVENTS] Click navigation to", s), V(s, t, d, g, l, p, x, !0);
1378
1141
  } else
1379
1142
  console.log("No matching route found for URL:", s, "- using fallback navigation");
1380
1143
  }
1381
1144
  }
1382
1145
  }), window.addEventListener("popstate", (n) => {
1383
1146
  const o = window.location.pathname, i = window.location.pathname + window.location.search;
1384
- _.url = i, _.pathname = window.location.pathname;
1385
- const a = "get", c = r.find((s) => s.method.toLowerCase() === a && e.find((u) => u.parser(o) && u.pattern === s.path));
1386
- if (c) {
1387
- const s = e.find((v) => v.parser(o) && v.pattern === c.path), u = (s == null ? void 0 : s.parser(o)) || {}, l = new URLSearchParams(window.location.search), d = Object.fromEntries(l.entries()) || {};
1388
- _.params = u, _.query = d;
1389
- const h = { ...u, ...d }, f = R[s == null ? void 0 : s.pattern];
1390
- q(i, t, c, h, u, d, f, !1);
1147
+ b.url = i, b.pathname = window.location.pathname;
1148
+ const a = "get", u = r.find((s) => s.method.toLowerCase() === a && e.find((c) => c.parser(o) && c.pattern === s.path));
1149
+ if (u) {
1150
+ const s = e.find((v) => v.parser(o) && v.pattern === u.path), c = (s == null ? void 0 : s.parser(o)) || {}, f = new URLSearchParams(window.location.search), d = Object.fromEntries(f.entries()) || {};
1151
+ b.params = c, b.query = d;
1152
+ const h = { ...c, ...d }, l = k[s == null ? void 0 : s.pattern];
1153
+ console.log("[EVENTS] Popstate navigation to", i), V(i, t, u, h, c, d, l, !1);
1391
1154
  } else
1392
1155
  console.log("No matching route found for popstate navigation to:", o, "- using fallback navigation"), window.location.href = o;
1393
- }), (function() {
1394
- const n = history.pushState, o = history.replaceState;
1395
- history.pushState = function(...i) {
1396
- const a = n.apply(this, i), c = new Event("pushstate");
1397
- return c.state = i[0], c.url = i[2], window.dispatchEvent(c), a;
1398
- }, history.replaceState = function(...i) {
1399
- const a = o.apply(this, i), c = i[2], s = window.location.pathname;
1400
- if ((c ? new URL(c, window.location.origin).pathname : s) !== s) {
1401
- const l = new Event("replacestate");
1402
- l.state = i[0], l.url = i[2], window.dispatchEvent(l);
1403
- }
1404
- return a;
1405
- };
1406
- })(), window.addEventListener("pushstate", (n) => {
1407
- const o = n.url || window.location.pathname + window.location.search, i = o.split("?")[0], a = "get", c = r.find((s) => s.method.toLowerCase() === a && e.find((u) => u.parser(i) && u.pattern === s.path));
1408
- if (c) {
1409
- const s = e.find((v) => v.parser(i) && v.pattern === c.path), u = s == null ? void 0 : s.parser(i), l = new URLSearchParams(o.split("?")[1] || ""), d = Object.fromEntries(l.entries());
1410
- _.url = o, _.pathname = window.location.pathname, Object.assign(_.params, u), Object.assign(_.query, d);
1411
- const h = { ...u, ...d }, f = R[s == null ? void 0 : s.pattern];
1412
- q(o, t, c, h, u, d, f, !1);
1413
- } else
1414
- console.log("No matching route found for pushstate to:", i, "- using fallback navigation"), window.location.href = i;
1415
- }), window.addEventListener("replacestate", (n) => {
1416
- const o = n.url || window.location.pathname + window.location.search, i = o.split("?")[0];
1417
- _.url = o, _.pathname = window.location.pathname, _.query = Object.fromEntries(new URLSearchParams(o.split("?")[1] || ""));
1418
- const a = "get", c = r.find((s) => s.method.toLowerCase() === a && e.find((u) => u.parser(i) && u.pattern === s.path));
1419
- if (c) {
1420
- const s = e.find((v) => v.parser(i) && v.pattern === c.path), u = (s == null ? void 0 : s.parser(i)) || {}, l = new URLSearchParams(o.split("?")[1] || ""), d = Object.fromEntries(l.entries()) || {}, h = { ...u, ...d }, f = R[s == null ? void 0 : s.pattern];
1421
- q(o, t, c, h, u, d, f, !1);
1422
- } else
1423
- console.log("No matching route found for replacestate to:", i, "- using fallback navigation"), window.location.href = i;
1424
1156
  }), window.addEventListener("forge-redirect", ((n) => {
1425
1157
  const o = n.detail.path, i = o.split("?")[0];
1426
1158
  console.log("[EVENTS] Handling forge-redirect to:", o);
1427
- const a = "get", c = r.find((s) => s.method.toLowerCase() === a && e.find((u) => u.parser(i) && u.pattern === s.path));
1428
- if (c) {
1429
- const s = e.find((v) => v.parser(i) && v.pattern === c.path), u = (s == null ? void 0 : s.parser(i)) || {}, l = new URLSearchParams(o.split("?")[1] || ""), d = Object.fromEntries(l.entries()) || {}, h = { ...u, ...d }, f = R[s == null ? void 0 : s.pattern];
1430
- q(o, t, c, h, u, d, f, !0);
1159
+ const a = "get", u = r.find((s) => s.method.toLowerCase() === a && e.find((c) => c.parser(i) && c.pattern === s.path));
1160
+ if (u) {
1161
+ const s = e.find((v) => v.parser(i) && v.pattern === u.path), c = (s == null ? void 0 : s.parser(i)) || {}, f = new URLSearchParams(o.split("?")[1] || ""), d = Object.fromEntries(f.entries()) || {}, h = { ...c, ...d }, l = k[s == null ? void 0 : s.pattern];
1162
+ b.url = o, b.pathname = i, b.params = c, b.query = d, V(o, t, u, h, c, d, l, !0);
1431
1163
  } else
1432
1164
  console.log("No matching route found for redirect to:", i, "- using fallback navigation"), window.location.href = i;
1433
1165
  }));
1434
1166
  }
1435
- const Ft = Symbol("forge-load-function");
1436
- let H = [], Z = null;
1437
- function qe(t) {
1167
+ const _t = Symbol("forge-load-function");
1168
+ let C = [], M = null;
1169
+ function de(t) {
1438
1170
  try {
1439
1171
  const r = new URL(t, window.location.origin);
1440
1172
  return r.origin === window.location.origin && !r.pathname.startsWith("/api/");
@@ -1442,27 +1174,27 @@ function qe(t) {
1442
1174
  return !t.startsWith("/api/");
1443
1175
  }
1444
1176
  }
1445
- function Fe() {
1446
- typeof window < "u" && !Z && (Z = window.fetch, window.fetch = async function(t, r = {}) {
1177
+ function he() {
1178
+ typeof window < "u" && !M && (M = window.fetch, window.fetch = async function(t, r = {}) {
1447
1179
  let e = { ...r };
1448
- for (const i of H)
1180
+ for (const i of C)
1449
1181
  try {
1450
1182
  if (i.length === 2) {
1451
- const a = new Headers(e.headers), c = Object.fromEntries(a.entries());
1452
- await new Promise((s, u) => {
1183
+ const a = new Headers(e.headers), u = Object.fromEntries(a.entries());
1184
+ await new Promise((s, c) => {
1453
1185
  try {
1454
- i(c, (l) => {
1455
- if (l)
1456
- u(l);
1186
+ i(u, (f) => {
1187
+ if (f)
1188
+ c(f);
1457
1189
  else {
1458
1190
  const d = new Headers();
1459
- Object.entries(c).forEach(([h, f]) => {
1460
- f !== void 0 && d.set(h, f);
1191
+ Object.entries(u).forEach(([h, l]) => {
1192
+ l !== void 0 && d.set(h, l);
1461
1193
  }), e.headers = d, s();
1462
1194
  }
1463
1195
  });
1464
- } catch (l) {
1465
- u(l);
1196
+ } catch (f) {
1197
+ c(f);
1466
1198
  }
1467
1199
  });
1468
1200
  } else {
@@ -1472,13 +1204,13 @@ function Fe() {
1472
1204
  } catch (a) {
1473
1205
  throw console.error("🔴 Middleware error:", a), a;
1474
1206
  }
1475
- const n = e == null ? void 0 : e[Ft];
1207
+ const n = e == null ? void 0 : e[_t];
1476
1208
  console.log("[FETCH OVERRIDE] Request", {
1477
1209
  url: t,
1478
1210
  hasForgeSymbol: n,
1479
1211
  headers: e == null ? void 0 : e.headers
1480
1212
  });
1481
- const o = await Z(t, e);
1213
+ const o = await M(t, e);
1482
1214
  if (console.log("[FETCH OVERRIDE] Response", {
1483
1215
  url: t,
1484
1216
  responseUrl: o.url,
@@ -1492,8 +1224,8 @@ function Fe() {
1492
1224
  requested: i,
1493
1225
  final: a,
1494
1226
  redirected: o.redirected
1495
- }), qe(a)) {
1496
- const c = new URL(a), s = c.pathname + c.search;
1227
+ }), de(a)) {
1228
+ const u = new URL(a), s = u.pathname + u.search;
1497
1229
  return console.log("[FORGE REDIRECT] Detected redirect to:", s, "- will navigate after current request completes"), new Response(JSON.stringify({ layout: [], view: {} }), {
1498
1230
  status: 200,
1499
1231
  headers: {
@@ -1507,54 +1239,54 @@ function Fe() {
1507
1239
  return o;
1508
1240
  });
1509
1241
  }
1510
- Fe();
1511
- const Me = {
1242
+ he();
1243
+ const me = {
1512
1244
  /**
1513
1245
  * Add middleware to the fetch pipeline
1514
1246
  */
1515
1247
  configUpdate(t) {
1516
1248
  if (typeof t != "function")
1517
1249
  throw new Error("Middleware must be a function");
1518
- H.push(t);
1250
+ C.push(t);
1519
1251
  },
1520
1252
  /**
1521
1253
  * Reset all middleware
1522
1254
  */
1523
1255
  reset() {
1524
- H.length = 0;
1256
+ C.length = 0;
1525
1257
  },
1526
1258
  /**
1527
1259
  * Get current middleware count (for debugging)
1528
1260
  */
1529
1261
  getMiddlewareCount() {
1530
- return H.length;
1262
+ return C.length;
1531
1263
  }
1532
1264
  };
1533
- let tt;
1534
- async function He(t, r) {
1265
+ let $;
1266
+ async function we(t, r) {
1535
1267
  let e = window.__COMPONENT_DIR__ || r.component_dir;
1536
1268
  if (!e && typeof e != "string")
1537
1269
  throw new Error("No component directory provided");
1538
1270
  let n = window.__ROUTING__;
1539
- if (tt = Ht(n), window && window.location) {
1540
- const o = (window.location.pathname || "/").split("?")[0], i = tt.find((c) => c.parser(o));
1541
- let a = i ? n.find((c) => c.path === i.pattern) : null;
1271
+ if ($ = It(n), window && window.location) {
1272
+ const o = (window.location.pathname || "/").split("?")[0], i = $.find((u) => u.parser(o));
1273
+ let a = i ? n.find((u) => u.path === i.pattern) : null;
1542
1274
  if (i && a) {
1543
- const c = i.parser(o) || {}, s = new URLSearchParams(window.location.search), u = Object.fromEntries(s.entries()) || {}, l = { ...c, ...u };
1544
- Ue(), ke(t, e, a, l, c, u), Ce(e, n, tt);
1275
+ const u = i.parser(o) || {}, s = new URLSearchParams(window.location.search), c = Object.fromEntries(s.entries()) || {}, f = { ...u, ...c };
1276
+ le(), ce(t, e, a, f, u, c), fe(e, n, $);
1545
1277
  } else
1546
1278
  console.warn("No matching route found for:", o);
1547
1279
  }
1548
1280
  }
1549
1281
  export {
1550
- R as MANIFEST_STORE,
1551
- Ce as bootstrap_events,
1552
- He as createApp,
1553
- Me as fetch,
1554
- ke as loadRoute,
1555
- _ as page,
1556
- Ye as shadowUrl,
1557
- Ue as updateManifestStore,
1558
- q as updateRoute
1282
+ k as MANIFEST_STORE,
1283
+ fe as bootstrap_events,
1284
+ we as createApp,
1285
+ me as fetch,
1286
+ ce as loadRoute,
1287
+ b as page,
1288
+ Se as shadowUrl,
1289
+ le as updateManifestStore,
1290
+ V as updateRoute
1559
1291
  };
1560
1292
  //# sourceMappingURL=client.mjs.map