@noego/forge 0.1.27 → 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.
package/dist/client.mjs CHANGED
@@ -47,24 +47,24 @@ function ut(e, t, r, n) {
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));
52
+ s(n.next(l));
53
53
  } catch (p) {
54
54
  a(p);
55
55
  }
56
56
  }
57
- function s(l) {
57
+ function u(l) {
58
58
  try {
59
- c(n.throw(l));
59
+ s(n.throw(l));
60
60
  } catch (p) {
61
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
70
  function je(e, t) {
@@ -72,59 +72,59 @@ function je(e, t) {
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
130
  function q(e) {
@@ -143,8 +143,8 @@ function z(e, t) {
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);
@@ -165,7 +165,7 @@ function W(e) {
165
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) {
@@ -173,31 +173,31 @@ function ct(e, t, r) {
173
173
  return Promise.resolve(v).then(d, p);
174
174
  };
175
175
  }
176
- function u(d, v) {
176
+ function c(d, v) {
177
177
  n[d] && (i[d] = function(f) {
178
- return new Promise(function(S, w) {
179
- o.push([d, f, S, w]) > 1 || s(d, f);
178
+ return new Promise(function(S, _) {
179
+ o.push([d, f, S, _]) > 1 || u(d, f);
180
180
  });
181
181
  }, v && (i[d] = v(i[d])));
182
182
  }
183
- function s(d, v) {
183
+ function u(d, v) {
184
184
  try {
185
- c(n[d](v));
185
+ s(n[d](v));
186
186
  } catch (f) {
187
187
  h(o[0][3], f);
188
188
  }
189
189
  }
190
- function c(d) {
190
+ function s(d) {
191
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
196
  function p(d) {
197
- s("throw", d);
197
+ u("throw", d);
198
198
  }
199
199
  function h(d, v) {
200
- d(v), o.shift(), o.length && s(o[0][0], o[0][1]);
200
+ d(v), o.shift(), o.length && u(o[0][0], o[0][1]);
201
201
  }
202
202
  }
203
203
  function lt(e) {
@@ -208,18 +208,18 @@ function lt(e) {
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
- function b(e) {
222
+ function w(e) {
223
223
  return typeof e == "function";
224
224
  }
225
225
  function me(e) {
@@ -255,15 +255,15 @@ var te = (function() {
255
255
  if (a)
256
256
  if (this._parentage = null, Array.isArray(a))
257
257
  try {
258
- for (var u = q(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
262
  } catch (f) {
263
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
  }
@@ -271,7 +271,7 @@ var te = (function() {
271
271
  else
272
272
  a.remove(this);
273
273
  var l = this.initialTeardown;
274
- if (b(l))
274
+ if (w(l))
275
275
  try {
276
276
  l();
277
277
  } catch (f) {
@@ -333,10 +333,10 @@ var te = (function() {
333
333
  })(), e;
334
334
  })(), Le = te.EMPTY;
335
335
  function Ne(e) {
336
- return e instanceof te || e && "closed" in e && b(e.remove) && b(e.add) && b(e.unsubscribe);
336
+ return e instanceof te || e && "closed" in e && w(e.remove) && w(e.add) && w(e.unsubscribe);
337
337
  }
338
338
  function Ee(e) {
339
- b(e) ? e() : e.unsubscribe();
339
+ w(e) ? e() : e.unsubscribe();
340
340
  }
341
341
  var ft = {
342
342
  Promise: void 0
@@ -427,7 +427,7 @@ var ye = (function(e) {
427
427
  G(t, e);
428
428
  function t(r, n, i) {
429
429
  var o = e.call(this) || this, a;
430
- return b(r) || !r ? a = {
430
+ return w(r) || !r ? a = {
431
431
  next: r ?? void 0,
432
432
  error: n ?? void 0,
433
433
  complete: i ?? void 0
@@ -469,8 +469,8 @@ var x = (function() {
469
469
  }, e.prototype.subscribe = function(t, r, n) {
470
470
  var i = this, o = bt(t) ? t : new B(t, r, n);
471
471
  return Z(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));
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 {
@@ -482,11 +482,11 @@ var x = (function() {
482
482
  var n = this;
483
483
  return r = xe(r), new r(function(i, o) {
484
484
  var a = new B({
485
- next: function(u) {
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,
@@ -524,13 +524,13 @@ function xe(e) {
524
524
  return (t = e ?? ft.Promise) !== null && t !== void 0 ? t : Promise;
525
525
  }
526
526
  function yt(e) {
527
- return e && b(e.next) && b(e.error) && b(e.complete);
527
+ return e && w(e.next) && w(e.error) && w(e.complete);
528
528
  }
529
529
  function bt(e) {
530
530
  return e && e instanceof ye || yt(e) && Ne(e);
531
531
  }
532
532
  function wt(e) {
533
- return b(e == null ? void 0 : e.lift);
533
+ return w(e == null ? void 0 : e.lift);
534
534
  }
535
535
  function j(e) {
536
536
  return function(t) {
@@ -550,31 +550,31 @@ function C(e, t, r, n, i) {
550
550
  }
551
551
  var gt = (function(e) {
552
552
  G(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) {
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;
@@ -606,15 +606,15 @@ var gt = (function(e) {
606
606
  if (n._throwIfClosed(), !n.isStopped) {
607
607
  n.currentObservers || (n.currentObservers = Array.from(n.observers));
608
608
  try {
609
- for (var a = q(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
  }
@@ -653,9 +653,9 @@ var gt = (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 ? Le : (this.currentObservers = null, u.push(r), new te(function() {
658
- n.currentObservers = null, de(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;
@@ -698,32 +698,32 @@ var gt = (function(e) {
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
716
  })(re), ge = (function(e) {
717
717
  return e && typeof e.length == "number" && typeof e != "function";
718
718
  });
719
719
  function ke(e) {
720
- return b(e == null ? void 0 : e.then);
720
+ return w(e == null ? void 0 : e.then);
721
721
  }
722
722
  function $e(e) {
723
- return b(e[be]);
723
+ return w(e[be]);
724
724
  }
725
725
  function Me(e) {
726
- return Symbol.asyncIterator && b(e == null ? void 0 : e[Symbol.asyncIterator]);
726
+ return Symbol.asyncIterator && w(e == null ? void 0 : e[Symbol.asyncIterator]);
727
727
  }
728
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.");
@@ -733,7 +733,7 @@ function Et() {
733
733
  }
734
734
  var We = Et();
735
735
  function qe(e) {
736
- return b(e == null ? void 0 : e[We]);
736
+ return w(e == null ? void 0 : e[We]);
737
737
  }
738
738
  function ze(e) {
739
739
  return ct(this, arguments, function() {
@@ -767,7 +767,7 @@ function ze(e) {
767
767
  });
768
768
  }
769
769
  function Be(e) {
770
- return b(e == null ? void 0 : e.getReader);
770
+ return w(e == null ? void 0 : e.getReader);
771
771
  }
772
772
  function L(e) {
773
773
  if (e instanceof x)
@@ -791,7 +791,7 @@ function L(e) {
791
791
  function Ot(e) {
792
792
  return new x(function(t) {
793
793
  var r = e[be]();
794
- if (b(r.subscribe))
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
  });
@@ -821,8 +821,8 @@ function Tt(e) {
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);
@@ -846,28 +846,28 @@ function It(e) {
846
846
  function Pt(e, t) {
847
847
  var r, n, i, o;
848
848
  return ut(this, void 0, void 0, function() {
849
- var a, u;
850
- return je(this, function(s) {
851
- switch (s.label) {
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 = lt(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:
@@ -935,14 +935,14 @@ function Lt(e, t) {
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);
943
943
  }, 0, !0);
944
944
  }), function() {
945
- return b(n == null ? void 0 : n.return) && n.return();
945
+ return w(n == null ? void 0 : n.return) && n.return();
946
946
  };
947
947
  });
948
948
  }
@@ -1019,27 +1019,27 @@ function Dt(e) {
1019
1019
  return Mt(e, t);
1020
1020
  });
1021
1021
  }
1022
- function Wt(e, t, r, n, i, o, a, u) {
1023
- var s = [], c = 0, l = 0, p = !1, h = function() {
1024
- p && !s.length && !c && t.complete();
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
1025
  }, d = function(f) {
1026
- return c < n ? v(f) : s.push(f);
1026
+ return s < n ? v(f) : u.push(f);
1027
1027
  }, v = function(f) {
1028
- c++;
1028
+ s++;
1029
1029
  var S = !1;
1030
- L(r(f, l++)).subscribe(C(t, function(w) {
1031
- t.next(w);
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 w = function() {
1039
- var g = s.shift();
1037
+ s--;
1038
+ for (var _ = function() {
1039
+ var g = u.shift();
1040
1040
  a || v(g);
1041
- }; s.length && c < n; )
1042
- w();
1041
+ }; u.length && s < n; )
1042
+ _();
1043
1043
  h();
1044
1044
  } catch (g) {
1045
1045
  t.error(g);
@@ -1052,7 +1052,7 @@ function Wt(e, t, r, n, i, o, a, u) {
1052
1052
  };
1053
1053
  }
1054
1054
  function Ke(e, t, r) {
1055
- return r === void 0 && (r = 1 / 0), b(t) ? Ke(function(n, i) {
1055
+ return r === void 0 && (r = 1 / 0), w(t) ? Ke(function(n, i) {
1056
1056
  return Se(function(o, a) {
1057
1057
  return t(n, o, i, a);
1058
1058
  })(L(e(n, i)));
@@ -1062,27 +1062,27 @@ function Ke(e, t, r) {
1062
1062
  }
1063
1063
  var qt = ["addListener", "removeListener"], zt = ["addEventListener", "removeEventListener"], Bt = ["on", "off"];
1064
1064
  function he(e, t, r, n) {
1065
- if (b(r) && (n = r, r = void 0), n)
1065
+ if (w(r) && (n = r, r = void 0), n)
1066
1066
  return he(e, t, r).pipe(Dt(n));
1067
- var i = z(Ht(e) ? zt.map(function(u) {
1068
- return function(s) {
1069
- return e[u](t, s, r);
1067
+ var i = z(Ht(e) ? zt.map(function(c) {
1068
+ return function(u) {
1069
+ return e[c](t, u, r);
1070
1070
  };
1071
1071
  }) : Gt(e) ? qt.map(Te(e, t)) : Vt(e) ? Bt.map(Te(e, t)) : [], 2), o = i[0], a = i[1];
1072
1072
  if (!o && ge(e))
1073
- return Ke(function(u) {
1074
- return he(u, t, r);
1073
+ return Ke(function(c) {
1074
+ return he(c, t, r);
1075
1075
  })(L(e));
1076
1076
  if (!o)
1077
1077
  throw new TypeError("Invalid event target");
1078
- return new x(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
  }
@@ -1094,13 +1094,13 @@ function Te(e, t) {
1094
1094
  };
1095
1095
  }
1096
1096
  function Gt(e) {
1097
- return b(e.addListener) && b(e.removeListener);
1097
+ return w(e.addListener) && w(e.removeListener);
1098
1098
  }
1099
1099
  function Vt(e) {
1100
- return b(e.on) && b(e.off);
1100
+ return w(e.on) && w(e.off);
1101
1101
  }
1102
1102
  function Ht(e) {
1103
- return b(e.addEventListener) && b(e.removeEventListener);
1103
+ return w(e.addEventListener) && w(e.removeEventListener);
1104
1104
  }
1105
1105
  function ae(e, t) {
1106
1106
  return j(function(r, n) {
@@ -1114,8 +1114,8 @@ function Yt(e, t) {
1114
1114
  return t === void 0 && (t = we), e = e ?? Jt, j(function(r, n) {
1115
1115
  var i, o = !0;
1116
1116
  r.subscribe(C(n, function(a) {
1117
- var u = t(a);
1118
- (o || !e(i, u)) && (o = !1, i = u, n.next(a));
1117
+ var c = t(a);
1118
+ (o || !e(i, c)) && (o = !1, i = c, n.next(a));
1119
1119
  }));
1120
1120
  });
1121
1121
  }
@@ -1126,33 +1126,33 @@ function Kt(e) {
1126
1126
  e === void 0 && (e = {});
1127
1127
  var t = e.connector, r = t === void 0 ? function() {
1128
1128
  return new re();
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) {
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
1131
  var l, p, h, d = 0, v = !1, f = !1, S = function() {
1132
1132
  p == null || p.unsubscribe(), p = void 0;
1133
- }, w = function() {
1133
+ }, _ = function() {
1134
1134
  S(), l = h = void 0, v = f = !1;
1135
1135
  }, g = function() {
1136
- var _ = l;
1137
- w(), _ == null || _.unsubscribe();
1136
+ var b = l;
1137
+ _(), b == null || b.unsubscribe();
1138
1138
  };
1139
- return j(function(_, T) {
1139
+ return j(function(b, T) {
1140
1140
  d++, !f && !v && S();
1141
1141
  var I = h = h ?? r();
1142
1142
  T.add(function() {
1143
- d--, d === 0 && !f && !v && (p = se(g, s));
1143
+ d--, d === 0 && !f && !v && (p = se(g, u));
1144
1144
  }), I.subscribe(T), !l && d > 0 && (l = new B({
1145
1145
  next: function(P) {
1146
1146
  return I.next(P);
1147
1147
  },
1148
1148
  error: function(P) {
1149
- f = !0, S(), p = se(w, i, P), I.error(P);
1149
+ f = !0, S(), p = se(_, i, P), I.error(P);
1150
1150
  },
1151
1151
  complete: function() {
1152
- v = !0, S(), p = se(w, a), I.complete();
1152
+ v = !0, S(), p = se(_, a), I.complete();
1153
1153
  }
1154
- }), L(_).subscribe(l));
1155
- })(c);
1154
+ }), L(b).subscribe(l));
1155
+ })(s);
1156
1156
  };
1157
1157
  }
1158
1158
  function se(e, t) {
@@ -1173,40 +1173,40 @@ function se(e, t) {
1173
1173
  }
1174
1174
  function Xe(e, t) {
1175
1175
  return j(function(r, n) {
1176
- var i = null, o = 0, a = !1, u = function() {
1176
+ var i = null, o = 0, a = !1, c = function() {
1177
1177
  return a && !i && n.complete();
1178
1178
  };
1179
- r.subscribe(C(n, function(s) {
1179
+ r.subscribe(C(n, function(u) {
1180
1180
  i == null || i.unsubscribe();
1181
- var c = 0, l = o++;
1182
- L(e(s, l)).subscribe(i = C(n, function(p) {
1183
- return n.next(t ? t(s, p, l, c++) : p);
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
1192
  function Xt(e, t, r) {
1193
- var n = b(e) || t || r ? { next: e, error: t, complete: r } : e;
1193
+ var n = w(e) || t || r ? { next: e, error: t, complete: r } : e;
1194
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(C(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
1211
  }) : we;
1212
1212
  }
@@ -1225,8 +1225,8 @@ function er(e, t) {
1225
1225
  Se((i) => {
1226
1226
  const o = i.target, a = (o == null ? void 0 : o.tagName) === "A" ? o : o == null ? void 0 : o.closest("A");
1227
1227
  if (!a) return null;
1228
- 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
1232
  ae((i) => i !== null),
@@ -1236,25 +1236,25 @@ function er(e, t) {
1236
1236
  Yt(),
1237
1237
  // Check that route requires server data
1238
1238
  ae((i) => {
1239
- const o = i.split("?")[0], a = "get", u = e.find(
1239
+ const o = i.split("?")[0], a = "get", c = e.find(
1240
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 !!R(V)[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
1247
  Xe((i) => {
1248
1248
  const o = N.get(i);
1249
1249
  if (o && Date.now() - o.createdAt < Q)
1250
1250
  return [];
1251
- const a = new AbortController(), u = new _t(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
- N.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,10 +1262,10 @@ function er(e, t) {
1262
1262
  },
1263
1263
  signal: a.signal
1264
1264
  };
1265
- return c[ne] = !0, Je(
1266
- fetch(i, c).then(
1267
- (l) => (u.next(l), u.complete(), i),
1268
- (l) => (u.error(l), N.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
1271
  Xt({
@@ -1478,10 +1478,10 @@ function _e(e) {
1478
1478
  const m = _e("forge:nav"), ar = 1e4;
1479
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, m.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
1487
  ), m.debug("Timeout scheduled for", t, "ms, timeoutId:", n);
@@ -1550,63 +1550,63 @@ const A = Ce({
1550
1550
  if (!n.ok) return !1;
1551
1551
  const i = await n.json(), o = R(A).navigationId;
1552
1552
  return e !== o ? (m.debug("Discarding stale poll response", { pollNavigationId: e, currentNavigationId: o }), !1) : (A.update((a) => {
1553
- var u;
1554
- return a.active.data = { layout: ((u = a.active.data) == null ? void 0 : u.layout) || [], view: i.view }, 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
1560
  k.update((e) => (e.poll = lr, e));
1561
- async function et(e, t, r, n, i) {
1561
+ async function et(e, t, r, n, i, o) {
1562
1562
  if (!t.controller) return;
1563
- let o = J(e, t.controller).toString();
1564
- i && (o = o.replace(/\.svelte\.ts$/, ".js").replace(/\.ts$/, ".js"), /\.[a-z]+$/.test(o) || (o += ".js")), o.startsWith("/") || (o = "/" + o);
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
1565
  const u = (await import(
1566
1566
  /* @vite-ignore */
1567
- o
1568
- )).default, s = new u();
1567
+ a
1568
+ )).default, s = o ? await Promise.resolve(o(u)) : new u();
1569
1569
  return typeof s.initialize == "function" && await Promise.resolve(s.initialize(r, n)), s;
1570
1570
  }
1571
1571
  function J(...e) {
1572
1572
  let t = e.map((r, n) => n === 0 ? r.replace(/\/+$/, "") : r.replace(/^\/+|\/+$/g, "")).join("/");
1573
1573
  return t.startsWith("/") || (t = "/" + t), t.split("?")[0];
1574
1574
  }
1575
- async function fr(e, t, r, n, i, o) {
1575
+ async function fr(e, t, r, n, i, o, a) {
1576
1576
  try {
1577
- const a = typeof t == "string" && t.indexOf("assets") !== -1, u = (r.layout || []).map((w) => {
1578
- let g = J(t, w).toString();
1579
- return a && (g = g.endsWith(".svelte") ? g.replace(/\.svelte$/, ".js") : /[.][a-z]+$/.test(g) ? g : g + ".js"), g;
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;
1580
1580
  });
1581
1581
  let s = J(t, r.view).toString();
1582
- a && (s = s.endsWith(".svelte") ? s.replace(/\.svelte$/, ".js") : /[.][a-z]+$/.test(s) ? s : s + ".js");
1583
- const c = await Promise.all(u.map((w) => import(
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(
1584
1584
  /* @vite-ignore */
1585
- w
1586
- ).then((g) => g.default)));
1585
+ g
1586
+ ).then((b) => b.default)));
1587
1587
  s.startsWith("/") || (s = "/" + s);
1588
- const l = await import(
1588
+ const p = await import(
1589
1589
  /* @vite-ignore */
1590
1590
  s
1591
- ).then((w) => w.default), p = window.__INITIAL_DATA__ || { layout: [], view: {} }, h = typeof t == "string" && t.indexOf("assets") !== -1, d = R(k), v = { params: n, urlParams: i, query: o, page: d }, f = await et(t, r, p.view, v, h), S = {
1592
- layouts: c,
1593
- 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,
1594
1594
  viewPath: r.view || null,
1595
1595
  // Store original path for debugging
1596
1596
  layoutPaths: r.layout || [],
1597
1597
  // Store original paths for debugging
1598
- data: p,
1598
+ data: h,
1599
1599
  params: n,
1600
1600
  urlParams: i,
1601
1601
  query: o,
1602
- controller: f
1602
+ controller: S
1603
1603
  };
1604
- A.update((w) => (w.active = S, w.phase = "idle", w)), ot(it, { target: e, props: { root: A } });
1605
- } catch (a) {
1606
- m.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);
1607
1607
  }
1608
1608
  }
1609
- function ce(e, t, r, n, i, o, a = !1, u = !0) {
1609
+ function ce(e, t, r, n, i, o, a = !1, c = !0) {
1610
1610
  cr({
1611
1611
  url: e,
1612
1612
  base_path: t,
@@ -1615,7 +1615,7 @@ function ce(e, t, r, n, i, o, a = !1, u = !0) {
1615
1615
  urlParams: i,
1616
1616
  query: o,
1617
1617
  server_loading: a,
1618
- updateUrl: u
1618
+ updateUrl: c
1619
1619
  });
1620
1620
  }
1621
1621
  async function dr(e) {
@@ -1627,21 +1627,21 @@ async function dr(e) {
1627
1627
  params: i,
1628
1628
  urlParams: o,
1629
1629
  query: a,
1630
- server_loading: u,
1631
- updateUrl: s
1632
- } = e, c = ++E, l = new AbortController();
1630
+ server_loading: c,
1631
+ updateUrl: u
1632
+ } = e, s = ++E, l = new AbortController();
1633
1633
  H = l, m.debug("Starting navigation", {
1634
- navigationId: c,
1634
+ navigationId: s,
1635
1635
  url: t,
1636
- updateUrl: s,
1637
- server_loading: u,
1636
+ updateUrl: u,
1637
+ server_loading: c,
1638
1638
  currentNavigationId: E,
1639
1639
  hasAbortController: !!H
1640
- }), A.update((h) => (h.phase = "loading", h.navigationId = c, h));
1640
+ }), A.update((h) => (h.phase = "loading", h.navigationId = s, h));
1641
1641
  try {
1642
1642
  let h = { layout: [], view: {} };
1643
- if (u) {
1644
- m.debug("Fetching server data", { navigationId: c, url: t });
1643
+ if (c) {
1644
+ m.debug("Fetching server data", { navigationId: s, url: t });
1645
1645
  let y = null;
1646
1646
  const O = Qt(t);
1647
1647
  if (O)
@@ -1662,7 +1662,7 @@ async function dr(e) {
1662
1662
  M[ne] = !0, y = await fetch(t, M);
1663
1663
  }
1664
1664
  if (m.debug("Fetch response received", {
1665
- navigationId: c,
1665
+ navigationId: s,
1666
1666
  url: t,
1667
1667
  ok: y.ok,
1668
1668
  status: y.status,
@@ -1676,11 +1676,11 @@ async function dr(e) {
1676
1676
  throw new Error(`Network response was not ok: ${y.status}`);
1677
1677
  h = await y.json(), m.debug("Server data received:", h);
1678
1678
  }
1679
- if (c !== E) {
1680
- m.debug("Stale navigation after fetch, aborting", { navigationId: c, currentNavigationId: E });
1679
+ if (s !== E) {
1680
+ m.debug("Stale navigation after fetch, aborting", { navigationId: s, currentNavigationId: E });
1681
1681
  return;
1682
1682
  }
1683
- m.debug("Loading components", { navigationId: c, view: n.view, layouts: n.layout });
1683
+ m.debug("Loading components", { navigationId: s, view: n.view, layouts: n.layout });
1684
1684
  const d = typeof r == "string" && r.indexOf("assets") !== -1, v = (n.layout || []).map((y) => {
1685
1685
  let O = J(r, y).toString();
1686
1686
  return d && (O = O.endsWith(".svelte") ? O.replace(/\.svelte$/, ".js") : /[.][a-z]+$/.test(O) ? O : O + ".js"), O;
@@ -1690,29 +1690,29 @@ async function dr(e) {
1690
1690
  const S = await Promise.all(v.map((y) => import(
1691
1691
  /* @vite-ignore */
1692
1692
  y
1693
- ).then((O) => O.default))), w = await import(
1693
+ ).then((O) => O.default))), _ = await import(
1694
1694
  /* @vite-ignore */
1695
1695
  f
1696
1696
  ).then((y) => y.default);
1697
1697
  if (m.debug("Components loaded", {
1698
- navigationId: c,
1698
+ navigationId: s,
1699
1699
  currentNavigationId: E,
1700
1700
  layoutsCount: S.length,
1701
- viewLoaded: !!w
1702
- }), c !== E) {
1703
- m.debug("Stale navigation after component load, aborting", { navigationId: c, currentNavigationId: E });
1701
+ viewLoaded: !!_
1702
+ }), s !== E) {
1703
+ m.debug("Stale navigation after component load, aborting", { navigationId: s, currentNavigationId: E });
1704
1704
  return;
1705
1705
  }
1706
- const g = R(k), _ = { params: i, urlParams: o, query: a, page: g }, T = await et(r, n, h.view, _, d);
1707
- if (c !== E) {
1708
- m.debug("Stale navigation after controller resolution, aborting", { navigationId: c, currentNavigationId: E }), (p = T == null ? void 0 : T.destroy) == null || p.call(T);
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
1709
  return;
1710
1710
  }
1711
1711
  const I = R(A).active.controller;
1712
1712
  I != null && I.destroy && I.destroy();
1713
1713
  const P = {
1714
1714
  layouts: S,
1715
- view: w,
1715
+ view: _,
1716
1716
  viewPath: n.view || null,
1717
1717
  // Store original path for debugging
1718
1718
  layoutPaths: n.layout || [],
@@ -1724,21 +1724,21 @@ async function dr(e) {
1724
1724
  controller: T
1725
1725
  };
1726
1726
  m.debug("Committing new state", {
1727
- navigationId: c,
1727
+ navigationId: s,
1728
1728
  currentNavigationId: E,
1729
1729
  layoutsCount: P.layouts.length,
1730
1730
  viewSet: !!P.view,
1731
1731
  dataKeys: Object.keys(P.data || {})
1732
1732
  }), A.update((y) => (y.active = P, y.phase = "idle", m.debug("ROOT.active updated", {
1733
- navigationId: c,
1733
+ navigationId: s,
1734
1734
  layoutsCount: y.active.layouts.length,
1735
1735
  viewSet: !!y.active.view,
1736
1736
  dataKeys: Object.keys(y.active.data || {}),
1737
1737
  paramsKeys: Object.keys(y.active.params || {})
1738
- }), y)), typeof window < "u" && window.scroll(0, 0), s && (m.debug("Updating browser URL", { url: t }), window.history.pushState({}, "", t)), m.debug("Navigation complete", { navigationId: c, url: t });
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
1739
  } catch (h) {
1740
1740
  if (m.error("Navigation failed", {
1741
- navigationId: c,
1741
+ navigationId: s,
1742
1742
  currentNavigationId: E,
1743
1743
  url: t,
1744
1744
  error: h instanceof Error ? h.message : String(h)
@@ -1756,40 +1756,40 @@ function hr(e, t, r) {
1756
1756
  return;
1757
1757
  }
1758
1758
  document.addEventListener("click", (n) => {
1759
- var a, u;
1760
- 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");
1761
1761
  if (o) {
1762
- let s = o.getAttribute("href");
1763
- if (i === s) {
1762
+ let u = o.getAttribute("href");
1763
+ if (i === u) {
1764
1764
  n.preventDefault();
1765
1765
  return;
1766
1766
  }
1767
- if (s && s.startsWith("/") || s.startsWith(".")) {
1768
- const c = s.split("?")[0], l = o.getAttribute("method") || "get", p = t.find((h) => h.method.toLowerCase() === l && r.find((d) => d.parser(c) && d.pattern === h.path));
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
1769
  if (p) {
1770
1770
  n.preventDefault();
1771
- const h = r.find((_) => _.parser(c) && _.pattern === p.path), d = (h == null ? void 0 : h.parser(c)) || {}, v = new URLSearchParams(s.split("?")[1] || ""), f = Object.fromEntries(v.entries()) || {}, S = { ...d, ...f }, g = R(V)[h == null ? void 0 : h.pattern];
1772
- k.update((_) => (_.url = s, _.pathname = c, _.params = d, _.query = f, _)), F.debug("Click navigation to", s), ce(s, e, p, S, d, f, g, !0);
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);
1773
1773
  } else
1774
- F.warn("No matching route found", s, "- using fallback navigation");
1774
+ F.warn("No matching route found", u, "- using fallback navigation");
1775
1775
  }
1776
1776
  }
1777
1777
  }), window.addEventListener("popstate", (n) => {
1778
- const i = window.location.pathname, o = window.location.pathname + window.location.search, a = "get", u = t.find((s) => s.method.toLowerCase() === a && r.find((c) => c.parser(i) && c.pattern === s.path));
1779
- if (u) {
1780
- const s = r.find((f) => f.parser(i) && f.pattern === u.path), c = (s == null ? void 0 : s.parser(i)) || {}, l = new URLSearchParams(window.location.search), p = Object.fromEntries(l.entries()) || {};
1781
- k.update((f) => (f.url = o, f.pathname = window.location.pathname, f.params = c, f.query = p, f));
1782
- const h = { ...c, ...p }, v = R(V)[s == null ? void 0 : s.pattern];
1783
- F.debug("Popstate navigation to", o), ce(o, e, u, h, c, p, v, !1);
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);
1784
1784
  } else
1785
1785
  F.warn("No matching route found", i, "- using fallback navigation"), window.location.href = i;
1786
1786
  }), window.addEventListener("forge-redirect", ((n) => {
1787
1787
  const i = n.detail.path, o = i.split("?")[0];
1788
1788
  F.debug("Handling forge-redirect to:", i);
1789
- const a = "get", u = t.find((s) => s.method.toLowerCase() === a && r.find((c) => c.parser(o) && c.pattern === s.path));
1790
- if (u) {
1791
- const s = r.find((f) => f.parser(o) && f.pattern === u.path), c = (s == null ? void 0 : s.parser(o)) || {}, l = new URLSearchParams(i.split("?")[1] || ""), p = Object.fromEntries(l.entries()) || {}, h = { ...c, ...p }, v = R(V)[s == null ? void 0 : s.pattern];
1792
- k.update((f) => (f.url = i, f.pathname = o, f.params = c, f.query = p, f)), ce(i, e, u, h, c, p, v, !0);
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);
1793
1793
  } else
1794
1794
  F.warn("No matching route found", o, "- using fallback navigation"), window.location.href = o;
1795
1795
  })), er(t, r);
@@ -1853,17 +1853,17 @@ function br() {
1853
1853
  for (const a of ee)
1854
1854
  try {
1855
1855
  if (a.length === 2) {
1856
- const u = new Headers(n.headers), s = Object.fromEntries(u.entries());
1857
- await new Promise((c, l) => {
1856
+ const c = new Headers(n.headers), u = Object.fromEntries(c.entries());
1857
+ await new Promise((s, l) => {
1858
1858
  try {
1859
- a(s, (p) => {
1859
+ a(u, (p) => {
1860
1860
  if (p)
1861
1861
  l(p);
1862
1862
  else {
1863
1863
  const h = new Headers();
1864
- Object.entries(s).forEach(([d, v]) => {
1864
+ Object.entries(u).forEach(([d, v]) => {
1865
1865
  v !== void 0 && h.set(d, v);
1866
- }), n.headers = h, c();
1866
+ }), n.headers = h, s();
1867
1867
  }
1868
1868
  });
1869
1869
  } catch (p) {
@@ -1871,11 +1871,11 @@ function br() {
1871
1871
  }
1872
1872
  });
1873
1873
  } else {
1874
- const u = await a(n, e);
1875
- u && typeof u == "object" && (n = u);
1874
+ const c = await a(n, e);
1875
+ c && typeof c == "object" && (n = c);
1876
1876
  }
1877
- } catch (u) {
1878
- throw D.error("Middleware error", u), u;
1877
+ } catch (c) {
1878
+ throw D.error("Middleware error", c), c;
1879
1879
  }
1880
1880
  const i = n == null ? void 0 : n[ne];
1881
1881
  D.debug("Fetch override request", {
@@ -1892,19 +1892,19 @@ function br() {
1892
1892
  type: o.type,
1893
1893
  hasForgeSymbol: i
1894
1894
  }), i && o.redirected) {
1895
- const a = typeof e == "string" ? e : e.url, u = o.url;
1895
+ const a = typeof e == "string" ? e : e.url, c = o.url;
1896
1896
  if (D.debug("Redirect detected", {
1897
1897
  requested: a,
1898
- final: u,
1898
+ final: c,
1899
1899
  redirected: o.redirected
1900
- }), yr(u)) {
1901
- const s = new URL(u), c = s.pathname + s.search;
1902
- return D.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: {} }), {
1903
1903
  status: 200,
1904
1904
  headers: {
1905
1905
  "Content-Type": "application/json",
1906
1906
  "X-Forge-Redirect": "true",
1907
- "X-Forge-Redirect-Path": c
1907
+ "X-Forge-Redirect-Path": s
1908
1908
  }
1909
1909
  });
1910
1910
  }
@@ -1947,11 +1947,19 @@ async function Ar(e, t) {
1947
1947
  throw new Error("No component directory provided");
1948
1948
  let n = window.__ROUTING__;
1949
1949
  if (le = st(n), window && window.location) {
1950
- const i = (window.location.pathname || "/").split("?")[0], o = le.find((u) => u.parser(i));
1951
- let a = o ? n.find((u) => u.path === o.pattern) : null;
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;
1952
1952
  if (o && a) {
1953
- const u = o.parser(i) || {}, s = new URLSearchParams(window.location.search), c = Object.fromEntries(s.entries()) || {}, l = { ...u, ...c };
1954
- Zt(), fr(e, r, a, l, u, c), hr(r, n, le);
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);
1955
1963
  } else
1956
1964
  D.warn("No matching route", i);
1957
1965
  }